@cloudflare/realtimekit-ui 1.0.0-staging.7 → 1.0.0-staging.8

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 (491) hide show
  1. package/dist/browser.js +1 -1
  2. package/dist/cjs/{TextMessage-cbe10d86.js → TextMessage-e9ca06aa.js} +1 -1
  3. package/dist/cjs/{chat-412ceea4.js → chat-46e7e4fe.js} +1 -1
  4. package/dist/cjs/{config-985d77d0.js → config-dba24e25.js} +7 -1
  5. package/dist/cjs/{index-b47380e3.js → index-daae8cee.js} +1 -1
  6. package/dist/cjs/index.cjs.js +4 -4
  7. package/dist/cjs/{notification-7af436af.js → notification-1948ed2f.js} +1 -1
  8. package/dist/cjs/rtk-ai-toggle.cjs.entry.js +2 -2
  9. package/dist/cjs/rtk-ai-transcriptions.cjs.entry.js +2 -2
  10. package/dist/cjs/rtk-ai.cjs.entry.js +2 -2
  11. package/dist/cjs/rtk-audio-grid.cjs.entry.js +2 -2
  12. package/dist/cjs/rtk-audio-tile.cjs.entry.js +2 -2
  13. package/dist/cjs/rtk-audio-visualizer_4.cjs.entry.js +2 -2
  14. package/dist/cjs/rtk-avatar_54.cjs.entry.js +6 -6
  15. package/dist/cjs/rtk-breakout-rooms-toggle.cjs.entry.js +2 -2
  16. package/dist/cjs/rtk-camera-selector_2.cjs.entry.js +2 -2
  17. package/dist/cjs/rtk-camera-toggle.cjs.entry.js +2 -2
  18. package/dist/cjs/rtk-caption-toggle.cjs.entry.js +2 -2
  19. package/dist/cjs/rtk-channel-selector-ui.cjs.entry.js +4 -4
  20. package/dist/cjs/rtk-chat-composer-ui.cjs.entry.js +3 -3
  21. package/dist/cjs/rtk-chat-selector-ui.cjs.entry.js +3 -3
  22. package/dist/cjs/rtk-chat-toggle.cjs.entry.js +3 -3
  23. package/dist/cjs/rtk-clock.cjs.entry.js +7 -6
  24. package/dist/cjs/rtk-controlbar-button.cjs.entry.js +2 -2
  25. package/dist/cjs/rtk-controlbar.cjs.entry.js +2 -2
  26. package/dist/cjs/rtk-debugger-toggle.cjs.entry.js +2 -2
  27. package/dist/cjs/rtk-ended-screen.cjs.entry.js +2 -2
  28. package/dist/cjs/rtk-file-dropzone.cjs.entry.js +2 -2
  29. package/dist/cjs/rtk-fullscreen-toggle.cjs.entry.js +2 -2
  30. package/dist/cjs/rtk-grid-pagination.cjs.entry.js +4 -4
  31. package/dist/cjs/rtk-grid.cjs.entry.js +2 -2
  32. package/dist/cjs/rtk-header.cjs.entry.js +2 -2
  33. package/dist/cjs/rtk-idle-screen.cjs.entry.js +2 -2
  34. package/dist/cjs/rtk-image-viewer.cjs.entry.js +2 -2
  35. package/dist/cjs/rtk-information-tooltip.cjs.entry.js +2 -2
  36. package/dist/cjs/rtk-leave-button.cjs.entry.js +2 -2
  37. package/dist/cjs/rtk-livestream-indicator_3.cjs.entry.js +6 -6
  38. package/dist/cjs/rtk-livestream-toggle.cjs.entry.js +2 -2
  39. package/dist/cjs/rtk-meeting-title.cjs.entry.js +5 -5
  40. package/dist/cjs/rtk-message-list-view.cjs.entry.js +2 -2
  41. package/dist/cjs/rtk-mic-toggle.cjs.entry.js +2 -2
  42. package/dist/cjs/rtk-mixed-grid.cjs.entry.js +2 -2
  43. package/dist/cjs/rtk-more-toggle.cjs.entry.js +2 -2
  44. package/dist/cjs/rtk-mute-all-button.cjs.entry.js +2 -2
  45. package/dist/cjs/rtk-name-tag.cjs.entry.js +2 -2
  46. package/dist/cjs/rtk-network-indicator.cjs.entry.js +2 -2
  47. package/dist/cjs/rtk-participant-count.cjs.entry.js +4 -4
  48. package/dist/cjs/rtk-participant-setup.cjs.entry.js +2 -2
  49. package/dist/cjs/rtk-participant_2.cjs.entry.js +2 -2
  50. package/dist/cjs/rtk-participants-audio.cjs.entry.js +2 -2
  51. package/dist/cjs/rtk-participants-stage-list_4.cjs.entry.js +2 -2
  52. package/dist/cjs/rtk-participants-toggle.cjs.entry.js +3 -3
  53. package/dist/cjs/rtk-participants.cjs.entry.js +2 -2
  54. package/dist/cjs/rtk-pip-toggle.cjs.entry.js +2 -2
  55. package/dist/cjs/rtk-plugin-main_2.cjs.entry.js +2 -2
  56. package/dist/cjs/rtk-plugins-toggle.cjs.entry.js +3 -3
  57. package/dist/cjs/rtk-plugins_2.cjs.entry.js +2 -2
  58. package/dist/cjs/rtk-poll_2.cjs.entry.js +2 -2
  59. package/dist/cjs/rtk-polls-toggle.cjs.entry.js +3 -3
  60. package/dist/cjs/rtk-recording-indicator.cjs.entry.js +4 -4
  61. package/dist/cjs/rtk-recording-toggle.cjs.entry.js +2 -2
  62. package/dist/cjs/rtk-screen-share-toggle.cjs.entry.js +2 -2
  63. package/dist/cjs/rtk-screenshare-view.cjs.entry.js +2 -2
  64. package/dist/cjs/rtk-settings-audio_2.cjs.entry.js +2 -2
  65. package/dist/cjs/rtk-settings-toggle.cjs.entry.js +2 -2
  66. package/dist/cjs/rtk-settings.cjs.entry.js +2 -2
  67. package/dist/cjs/rtk-setup-screen.cjs.entry.js +2 -2
  68. package/dist/cjs/rtk-sidebar-ui.cjs.entry.js +2 -2
  69. package/dist/cjs/rtk-sidebar.cjs.entry.js +3 -3
  70. package/dist/cjs/rtk-simple-grid.cjs.entry.js +2 -2
  71. package/dist/cjs/rtk-spotlight-grid.cjs.entry.js +2 -2
  72. package/dist/cjs/rtk-spotlight-indicator.cjs.entry.js +2 -2
  73. package/dist/cjs/rtk-stage-toggle.cjs.entry.js +2 -2
  74. package/dist/cjs/rtk-stage.cjs.entry.js +2 -2
  75. package/dist/cjs/rtk-transcript.cjs.entry.js +2 -2
  76. package/dist/cjs/rtk-transcripts.cjs.entry.js +2 -2
  77. package/dist/cjs/rtk-ui-provider.cjs.entry.js +2 -2
  78. package/dist/cjs/rtk-waiting-screen.cjs.entry.js +2 -2
  79. package/dist/cjs/{sidebar-023f63fc.js → sidebar-a3c87828.js} +1 -1
  80. package/dist/cjs/{ui-store-1d132800.js → ui-store-3ddce955.js} +6 -0
  81. package/dist/collection/components/rtk-clock/rtk-clock.css +5 -4
  82. package/dist/collection/components/rtk-clock/rtk-clock.js +4 -3
  83. package/dist/collection/components/rtk-grid-pagination/rtk-grid-pagination.css +5 -9
  84. package/dist/collection/components/rtk-grid-pagination/rtk-grid-pagination.js +1 -1
  85. package/dist/collection/components/rtk-livestream-indicator/rtk-livestream-indicator.css +5 -0
  86. package/dist/collection/components/rtk-livestream-indicator/rtk-livestream-indicator.js +1 -1
  87. package/dist/collection/components/rtk-meeting-title/rtk-meeting-title.css +5 -2
  88. package/dist/collection/components/rtk-meeting-title/rtk-meeting-title.js +2 -2
  89. package/dist/collection/components/rtk-participant-count/rtk-participant-count.css +5 -4
  90. package/dist/collection/components/rtk-participant-count/rtk-participant-count.js +1 -1
  91. package/dist/collection/components/rtk-recording-indicator/rtk-recording-indicator.css +5 -2
  92. package/dist/collection/components/rtk-recording-indicator/rtk-recording-indicator.js +1 -1
  93. package/dist/collection/components/rtk-viewer-count/rtk-viewer-count.css +5 -4
  94. package/dist/collection/components/rtk-viewer-count/rtk-viewer-count.js +1 -1
  95. package/dist/collection/lib/default-ui-config.js +6 -0
  96. package/dist/collection/utils/config.js +6 -0
  97. package/dist/components/index.js +5 -5
  98. package/dist/components/{p-e897d0cb.js → p-00649ab8.js} +8 -8
  99. package/dist/components/{p-7ef7b528.js → p-00b13124.js} +14 -14
  100. package/dist/components/{p-65afebd3.js → p-0a9d8224.js} +4 -4
  101. package/dist/components/{p-df6f544a.js → p-0c81aa9c.js} +9 -9
  102. package/dist/components/{p-d0306d37.js → p-0e13b6ee.js} +3 -3
  103. package/dist/components/{p-e114de57.js → p-0ea515b2.js} +4 -4
  104. package/dist/components/{p-d55da893.js → p-0eab3933.js} +5 -5
  105. package/dist/components/{p-3819cd85.js → p-0f937441.js} +3 -3
  106. package/dist/components/{p-8db0a4da.js → p-10182034.js} +2 -2
  107. package/dist/components/{p-793ed5cb.js → p-10759cad.js} +2 -2
  108. package/dist/components/{p-40ad6638.js → p-135d5d2f.js} +3 -3
  109. package/dist/components/{p-281e2d8b.js → p-13bf25de.js} +6 -6
  110. package/dist/components/{p-8720d374.js → p-14aafb1d.js} +5 -5
  111. package/dist/components/{p-ddc286c8.js → p-175b365f.js} +3 -3
  112. package/dist/components/{p-531aad34.js → p-1947c106.js} +3 -3
  113. package/dist/components/{p-6d518dc3.js → p-1bf54ab3.js} +10 -10
  114. package/dist/components/{p-2cfccf90.js → p-20354866.js} +4 -4
  115. package/dist/components/{p-129cc75c.js → p-24ffce5a.js} +2 -2
  116. package/dist/components/{p-a9b1e3dd.js → p-260b86da.js} +6 -6
  117. package/dist/components/{p-0a514f3f.js → p-2ce92a24.js} +7 -7
  118. package/dist/components/{p-456299a7.js → p-2f2fb96d.js} +1 -1
  119. package/dist/components/{p-3237d36e.js → p-2f7c0530.js} +52 -52
  120. package/dist/components/{p-c921dfb0.js → p-31ce3b90.js} +2 -2
  121. package/dist/components/{p-b99df227.js → p-32d788e7.js} +3 -3
  122. package/dist/components/{p-3b2f5ba8.js → p-35d6211b.js} +4 -4
  123. package/dist/components/{p-ec0d1a77.js → p-3d845f44.js} +3 -3
  124. package/dist/components/{p-5dd6a99e.js → p-3dbc09e4.js} +4 -4
  125. package/dist/components/{p-1e5c8aa3.js → p-4221b28d.js} +7 -7
  126. package/dist/components/{p-94d33473.js → p-4608147b.js} +5 -5
  127. package/dist/components/{p-7b48ba5a.js → p-46690510.js} +2 -2
  128. package/dist/components/{p-b2771f98.js → p-4a436e2d.js} +7 -1
  129. package/dist/components/{p-0536e520.js → p-4ba64e96.js} +13 -13
  130. package/dist/components/{p-f6f7191a.js → p-4c4025de.js} +8 -8
  131. package/dist/components/{p-56f3354e.js → p-4cc0e9a5.js} +1 -1
  132. package/dist/components/{p-0083965b.js → p-4cedc9e8.js} +2 -2
  133. package/dist/components/{p-6234f3c4.js → p-50ecaaf1.js} +1 -1
  134. package/dist/components/{p-5c7262b7.js → p-54c8b684.js} +13 -13
  135. package/dist/components/{p-d27979d5.js → p-56586bc8.js} +9 -9
  136. package/dist/components/{p-95c03709.js → p-594ed925.js} +5 -5
  137. package/dist/components/{p-083710da.js → p-59ea0ce1.js} +4 -4
  138. package/dist/components/{p-6cada312.js → p-5ffcbba3.js} +2 -2
  139. package/dist/components/{p-56ceecc0.js → p-619a7896.js} +6 -6
  140. package/dist/components/{p-15c3dd0e.js → p-62a6b783.js} +2 -2
  141. package/dist/components/{p-94417a57.js → p-664f872d.js} +2 -2
  142. package/dist/components/{p-8d377d94.js → p-66ff4a1a.js} +5 -5
  143. package/dist/components/{p-40528bcd.js → p-7373cc7e.js} +4 -4
  144. package/dist/components/{p-9977f17c.js → p-78444f97.js} +7 -7
  145. package/dist/components/{p-ea4ce54a.js → p-7d26c3e0.js} +5 -5
  146. package/dist/components/{p-c4f19df7.js → p-8227dcd2.js} +2 -2
  147. package/dist/components/{p-74c4573e.js → p-87f1e5db.js} +5 -5
  148. package/dist/components/{p-00c52995.js → p-8ca0d44f.js} +4 -4
  149. package/dist/components/{p-cb4940e9.js → p-8ca1fe4c.js} +11 -11
  150. package/dist/components/{p-789d49ad.js → p-8ceedb7f.js} +3 -3
  151. package/dist/components/{p-45386cf3.js → p-91cb38a3.js} +3 -3
  152. package/dist/components/{p-90dc317b.js → p-935b5e0f.js} +5 -5
  153. package/dist/components/{p-c4bae3c7.js → p-965a4bd9.js} +4 -4
  154. package/dist/components/{p-27988e7d.js → p-99b862b5.js} +6 -6
  155. package/dist/components/{p-f7a87f51.js → p-a24309fd.js} +4 -4
  156. package/dist/components/{p-02d2b0fd.js → p-a41e1b94.js} +3 -3
  157. package/dist/components/{p-ea04d205.js → p-a478e070.js} +2 -2
  158. package/dist/components/{p-df65f9e5.js → p-ae239151.js} +2 -2
  159. package/dist/components/{p-f894e365.js → p-b12e5011.js} +5 -5
  160. package/dist/components/{p-d64c69c2.js → p-b3537ccc.js} +4 -4
  161. package/dist/components/{p-96dc9653.js → p-b39c779d.js} +4 -4
  162. package/dist/components/{p-f27b3e2b.js → p-bd9a0ef8.js} +4 -4
  163. package/dist/components/{p-164424cd.js → p-c00de10a.js} +7 -7
  164. package/dist/components/{p-ecf5520f.js → p-c11b2f37.js} +1 -1
  165. package/dist/components/{p-79e3eeee.js → p-c7dcb441.js} +2 -2
  166. package/dist/components/{p-b40adc00.js → p-caf8596c.js} +6 -6
  167. package/dist/components/{p-2e04d08a.js → p-cd66e89b.js} +2 -2
  168. package/dist/components/{p-a9598bcb.js → p-d262b31f.js} +8 -8
  169. package/dist/components/{p-929d11f5.js → p-d3ca55ba.js} +4 -4
  170. package/dist/components/{p-15594b6b.js → p-d5791958.js} +1 -1
  171. package/dist/components/{p-41c73a61.js → p-d71db36f.js} +5 -5
  172. package/dist/components/{p-10a05286.js → p-db1e56e8.js} +7 -7
  173. package/dist/components/{p-9e617955.js → p-dc23e204.js} +4 -4
  174. package/dist/components/{p-5d748ac6.js → p-e2b78972.js} +4 -4
  175. package/dist/components/{p-dcd9f0d2.js → p-e3b59650.js} +1 -1
  176. package/dist/components/{p-0ecdf806.js → p-e4376670.js} +8 -8
  177. package/dist/components/{p-9fe29f26.js → p-e6d09c50.js} +6 -0
  178. package/dist/components/{p-61d7cfae.js → p-e99f574d.js} +25 -25
  179. package/dist/components/{p-1f182a69.js → p-eeea40dd.js} +5 -5
  180. package/dist/components/{p-be1b951d.js → p-ef376a73.js} +5 -5
  181. package/dist/components/{p-b05351e6.js → p-f682505d.js} +12 -12
  182. package/dist/components/{p-f9546c57.js → p-fe278fba.js} +3 -3
  183. package/dist/components/rtk-ai-toggle.js +5 -5
  184. package/dist/components/rtk-ai-transcriptions.js +1 -1
  185. package/dist/components/rtk-ai.js +5 -5
  186. package/dist/components/rtk-audio-grid.js +2 -2
  187. package/dist/components/rtk-audio-tile.js +6 -6
  188. package/dist/components/rtk-audio-visualizer.js +1 -1
  189. package/dist/components/rtk-avatar.js +1 -1
  190. package/dist/components/rtk-breakout-room-manager.js +1 -1
  191. package/dist/components/rtk-breakout-room-participants.js +1 -1
  192. package/dist/components/rtk-breakout-rooms-manager.js +1 -1
  193. package/dist/components/rtk-breakout-rooms-toggle.js +5 -5
  194. package/dist/components/rtk-broadcast-message-modal.js +1 -1
  195. package/dist/components/rtk-button.js +1 -1
  196. package/dist/components/rtk-camera-selector.js +1 -1
  197. package/dist/components/rtk-camera-toggle.js +6 -6
  198. package/dist/components/rtk-caption-toggle.js +5 -5
  199. package/dist/components/rtk-channel-creator.js +1 -1
  200. package/dist/components/rtk-channel-details.js +1 -1
  201. package/dist/components/rtk-channel-header.js +1 -1
  202. package/dist/components/rtk-channel-selector-ui.js +6 -6
  203. package/dist/components/rtk-channel-selector-view.js +1 -1
  204. package/dist/components/rtk-chat-composer-ui.js +8 -8
  205. package/dist/components/rtk-chat-composer-view.js +1 -1
  206. package/dist/components/rtk-chat-message.js +1 -1
  207. package/dist/components/rtk-chat-messages-ui-paginated.js +1 -1
  208. package/dist/components/rtk-chat-messages-ui.js +1 -1
  209. package/dist/components/rtk-chat-search-results.js +1 -1
  210. package/dist/components/rtk-chat-selector-ui.js +3 -3
  211. package/dist/components/rtk-chat-toggle.js +6 -6
  212. package/dist/components/rtk-chat.js +1 -1
  213. package/dist/components/rtk-clock.js +8 -7
  214. package/dist/components/rtk-confirmation-modal.js +1 -1
  215. package/dist/components/rtk-controlbar-button.js +1 -1
  216. package/dist/components/rtk-controlbar.js +2 -2
  217. package/dist/components/rtk-counter.js +1 -1
  218. package/dist/components/rtk-debugger-audio.js +1 -1
  219. package/dist/components/rtk-debugger-screenshare.js +1 -1
  220. package/dist/components/rtk-debugger-system.js +1 -1
  221. package/dist/components/rtk-debugger-toggle.js +5 -5
  222. package/dist/components/rtk-debugger-video.js +1 -1
  223. package/dist/components/rtk-debugger.js +1 -1
  224. package/dist/components/rtk-dialog-manager.js +1 -1
  225. package/dist/components/rtk-dialog.js +1 -1
  226. package/dist/components/rtk-draft-attachment-view.js +1 -1
  227. package/dist/components/rtk-emoji-picker-button.js +1 -1
  228. package/dist/components/rtk-emoji-picker.js +1 -1
  229. package/dist/components/rtk-ended-screen.js +4 -4
  230. package/dist/components/rtk-file-dropzone.js +3 -3
  231. package/dist/components/rtk-file-message-view.js +1 -1
  232. package/dist/components/rtk-file-message.js +1 -1
  233. package/dist/components/rtk-file-picker-button.js +1 -1
  234. package/dist/components/rtk-fullscreen-toggle.js +1 -1
  235. package/dist/components/rtk-grid-pagination.js +7 -7
  236. package/dist/components/rtk-grid.js +10 -10
  237. package/dist/components/rtk-header.js +2 -2
  238. package/dist/components/rtk-icon.js +1 -1
  239. package/dist/components/rtk-idle-screen.js +5 -5
  240. package/dist/components/rtk-image-message-view.js +1 -1
  241. package/dist/components/rtk-image-message.js +1 -1
  242. package/dist/components/rtk-image-viewer.js +4 -4
  243. package/dist/components/rtk-information-tooltip.js +3 -3
  244. package/dist/components/rtk-join-stage.js +1 -1
  245. package/dist/components/rtk-leave-button.js +5 -5
  246. package/dist/components/rtk-leave-meeting.js +1 -1
  247. package/dist/components/rtk-livestream-indicator.js +1 -1
  248. package/dist/components/rtk-livestream-player.js +1 -1
  249. package/dist/components/rtk-livestream-toggle.js +5 -5
  250. package/dist/components/rtk-logo.js +1 -1
  251. package/dist/components/rtk-meeting-title.js +6 -6
  252. package/dist/components/rtk-meeting.js +54 -54
  253. package/dist/components/rtk-menu-item.js +1 -1
  254. package/dist/components/rtk-menu-list.js +1 -1
  255. package/dist/components/rtk-menu.js +1 -1
  256. package/dist/components/rtk-message-list-view.js +4 -4
  257. package/dist/components/rtk-message-view.js +1 -1
  258. package/dist/components/rtk-mic-toggle.js +6 -6
  259. package/dist/components/rtk-microphone-selector.js +1 -1
  260. package/dist/components/rtk-mixed-grid.js +8 -8
  261. package/dist/components/rtk-more-toggle.js +5 -5
  262. package/dist/components/rtk-mute-all-button.js +6 -6
  263. package/dist/components/rtk-mute-all-confirmation.js +1 -1
  264. package/dist/components/rtk-name-tag.js +1 -1
  265. package/dist/components/rtk-network-indicator.js +3 -3
  266. package/dist/components/rtk-notification.js +1 -1
  267. package/dist/components/rtk-notifications.js +1 -1
  268. package/dist/components/rtk-overlay-modal.js +1 -1
  269. package/dist/components/rtk-paginated-list.js +1 -1
  270. package/dist/components/rtk-participant-count.js +5 -5
  271. package/dist/components/rtk-participant-setup.js +2 -2
  272. package/dist/components/rtk-participant-tile.js +1 -1
  273. package/dist/components/rtk-participant.js +1 -1
  274. package/dist/components/rtk-participants-audio.js +5 -5
  275. package/dist/components/rtk-participants-stage-list.js +1 -1
  276. package/dist/components/rtk-participants-stage-queue.js +1 -1
  277. package/dist/components/rtk-participants-toggle.js +6 -6
  278. package/dist/components/rtk-participants-viewer-list.js +1 -1
  279. package/dist/components/rtk-participants-waiting-list.js +1 -1
  280. package/dist/components/rtk-participants.js +15 -15
  281. package/dist/components/rtk-permissions-message.js +1 -1
  282. package/dist/components/rtk-pip-toggle.js +5 -5
  283. package/dist/components/rtk-plugin-main.js +1 -1
  284. package/dist/components/rtk-plugins-toggle.js +6 -6
  285. package/dist/components/rtk-plugins.js +1 -1
  286. package/dist/components/rtk-poll-form.js +1 -1
  287. package/dist/components/rtk-poll.js +1 -1
  288. package/dist/components/rtk-polls-toggle.js +6 -6
  289. package/dist/components/rtk-polls.js +1 -1
  290. package/dist/components/rtk-recording-indicator.js +5 -5
  291. package/dist/components/rtk-recording-toggle.js +5 -5
  292. package/dist/components/rtk-screen-share-toggle.js +6 -6
  293. package/dist/components/rtk-screenshare-view.js +5 -5
  294. package/dist/components/rtk-settings-audio.js +1 -1
  295. package/dist/components/rtk-settings-toggle.js +5 -5
  296. package/dist/components/rtk-settings-video.js +1 -1
  297. package/dist/components/rtk-settings.js +12 -12
  298. package/dist/components/rtk-setup-screen.js +8 -8
  299. package/dist/components/rtk-sidebar-ui.js +1 -1
  300. package/dist/components/rtk-sidebar.js +11 -11
  301. package/dist/components/rtk-simple-grid.js +2 -2
  302. package/dist/components/rtk-speaker-selector.js +1 -1
  303. package/dist/components/rtk-spinner.js +1 -1
  304. package/dist/components/rtk-spotlight-grid.js +2 -2
  305. package/dist/components/rtk-spotlight-indicator.js +1 -1
  306. package/dist/components/rtk-stage-toggle.js +6 -6
  307. package/dist/components/rtk-stage.js +2 -2
  308. package/dist/components/rtk-switch.js +1 -1
  309. package/dist/components/rtk-tab-bar.js +1 -1
  310. package/dist/components/rtk-text-composer-view.js +1 -1
  311. package/dist/components/rtk-text-message.js +1 -1
  312. package/dist/components/rtk-tooltip.js +1 -1
  313. package/dist/components/rtk-transcript.js +1 -1
  314. package/dist/components/rtk-transcripts.js +3 -3
  315. package/dist/components/rtk-ui-provider.js +2 -2
  316. package/dist/components/rtk-viewer-count.js +1 -1
  317. package/dist/components/rtk-waiting-screen.js +3 -3
  318. package/dist/docs/docs-components.json +1 -1
  319. package/dist/esm/{TextMessage-de672e39.js → TextMessage-efd224db.js} +1 -1
  320. package/dist/esm/{chat-e970cf90.js → chat-c25836b0.js} +1 -1
  321. package/dist/esm/{config-d4ed799b.js → config-1ca1ba30.js} +7 -1
  322. package/dist/esm/{index-d0112c6b.js → index-6aaa85ca.js} +1 -1
  323. package/dist/esm/index.js +6 -6
  324. package/dist/esm/loader.js +30 -17
  325. package/dist/esm/{notification-b7669c56.js → notification-800f2bcd.js} +1 -1
  326. package/dist/esm/rtk-ai-toggle.entry.js +2 -2
  327. package/dist/esm/rtk-ai-transcriptions.entry.js +2 -2
  328. package/dist/esm/rtk-ai.entry.js +2 -2
  329. package/dist/esm/rtk-audio-grid.entry.js +2 -2
  330. package/dist/esm/rtk-audio-tile.entry.js +2 -2
  331. package/dist/esm/rtk-audio-visualizer_4.entry.js +2 -2
  332. package/dist/esm/rtk-avatar_54.entry.js +6 -6
  333. package/dist/esm/rtk-breakout-rooms-toggle.entry.js +2 -2
  334. package/dist/esm/rtk-camera-selector_2.entry.js +2 -2
  335. package/dist/esm/rtk-camera-toggle.entry.js +2 -2
  336. package/dist/esm/rtk-caption-toggle.entry.js +2 -2
  337. package/dist/esm/rtk-channel-selector-ui.entry.js +4 -4
  338. package/dist/esm/rtk-chat-composer-ui.entry.js +3 -3
  339. package/dist/esm/rtk-chat-selector-ui.entry.js +3 -3
  340. package/dist/esm/rtk-chat-toggle.entry.js +3 -3
  341. package/dist/esm/rtk-clock.entry.js +7 -6
  342. package/dist/esm/rtk-controlbar-button.entry.js +2 -2
  343. package/dist/esm/rtk-controlbar.entry.js +2 -2
  344. package/dist/esm/rtk-debugger-toggle.entry.js +2 -2
  345. package/dist/esm/rtk-ended-screen.entry.js +2 -2
  346. package/dist/esm/rtk-file-dropzone.entry.js +2 -2
  347. package/dist/esm/rtk-fullscreen-toggle.entry.js +2 -2
  348. package/dist/esm/rtk-grid-pagination.entry.js +4 -4
  349. package/dist/esm/rtk-grid.entry.js +2 -2
  350. package/dist/esm/rtk-header.entry.js +2 -2
  351. package/dist/esm/rtk-idle-screen.entry.js +2 -2
  352. package/dist/esm/rtk-image-viewer.entry.js +2 -2
  353. package/dist/esm/rtk-information-tooltip.entry.js +2 -2
  354. package/dist/esm/rtk-leave-button.entry.js +2 -2
  355. package/dist/esm/rtk-livestream-indicator_3.entry.js +6 -6
  356. package/dist/esm/rtk-livestream-toggle.entry.js +2 -2
  357. package/dist/esm/rtk-meeting-title.entry.js +5 -5
  358. package/dist/esm/rtk-message-list-view.entry.js +2 -2
  359. package/dist/esm/rtk-mic-toggle.entry.js +2 -2
  360. package/dist/esm/rtk-mixed-grid.entry.js +2 -2
  361. package/dist/esm/rtk-more-toggle.entry.js +2 -2
  362. package/dist/esm/rtk-mute-all-button.entry.js +2 -2
  363. package/dist/esm/rtk-name-tag.entry.js +2 -2
  364. package/dist/esm/rtk-network-indicator.entry.js +2 -2
  365. package/dist/esm/rtk-participant-count.entry.js +4 -4
  366. package/dist/esm/rtk-participant-setup.entry.js +2 -2
  367. package/dist/esm/rtk-participant_2.entry.js +2 -2
  368. package/dist/esm/rtk-participants-audio.entry.js +2 -2
  369. package/dist/esm/rtk-participants-stage-list_4.entry.js +2 -2
  370. package/dist/esm/rtk-participants-toggle.entry.js +3 -3
  371. package/dist/esm/rtk-participants.entry.js +2 -2
  372. package/dist/esm/rtk-pip-toggle.entry.js +2 -2
  373. package/dist/esm/rtk-plugin-main_2.entry.js +2 -2
  374. package/dist/esm/rtk-plugins-toggle.entry.js +3 -3
  375. package/dist/esm/rtk-plugins_2.entry.js +2 -2
  376. package/dist/esm/rtk-poll_2.entry.js +2 -2
  377. package/dist/esm/rtk-polls-toggle.entry.js +3 -3
  378. package/dist/esm/rtk-recording-indicator.entry.js +4 -4
  379. package/dist/esm/rtk-recording-toggle.entry.js +2 -2
  380. package/dist/esm/rtk-screen-share-toggle.entry.js +2 -2
  381. package/dist/esm/rtk-screenshare-view.entry.js +2 -2
  382. package/dist/esm/rtk-settings-audio_2.entry.js +2 -2
  383. package/dist/esm/rtk-settings-toggle.entry.js +2 -2
  384. package/dist/esm/rtk-settings.entry.js +2 -2
  385. package/dist/esm/rtk-setup-screen.entry.js +2 -2
  386. package/dist/esm/rtk-sidebar-ui.entry.js +2 -2
  387. package/dist/esm/rtk-sidebar.entry.js +3 -3
  388. package/dist/esm/rtk-simple-grid.entry.js +2 -2
  389. package/dist/esm/rtk-spotlight-grid.entry.js +2 -2
  390. package/dist/esm/rtk-spotlight-indicator.entry.js +2 -2
  391. package/dist/esm/rtk-stage-toggle.entry.js +2 -2
  392. package/dist/esm/rtk-stage.entry.js +2 -2
  393. package/dist/esm/rtk-transcript.entry.js +2 -2
  394. package/dist/esm/rtk-transcripts.entry.js +2 -2
  395. package/dist/esm/rtk-ui-provider.entry.js +2 -2
  396. package/dist/esm/rtk-waiting-screen.entry.js +2 -2
  397. package/dist/esm/{sidebar-8b5e88e0.js → sidebar-cafaa8d3.js} +1 -1
  398. package/dist/esm/{ui-store-0f6095db.js → ui-store-b453cdf2.js} +6 -0
  399. package/dist/realtimekit-ui/index.esm.js +1 -1
  400. package/dist/realtimekit-ui/{p-2c575cd8.entry.js → p-01f5aba6.entry.js} +1 -1
  401. package/dist/realtimekit-ui/{p-7c147408.entry.js → p-03a04390.entry.js} +1 -1
  402. package/dist/realtimekit-ui/{p-38136f6d.entry.js → p-050469f0.entry.js} +1 -1
  403. package/dist/realtimekit-ui/{p-b5e01d07.entry.js → p-050f0b1f.entry.js} +1 -1
  404. package/dist/realtimekit-ui/{p-570a7910.entry.js → p-0a1d9e02.entry.js} +1 -1
  405. package/dist/realtimekit-ui/{p-73d6823a.entry.js → p-0d071b0c.entry.js} +1 -1
  406. package/dist/realtimekit-ui/{p-1c0358f4.entry.js → p-0d4db84d.entry.js} +1 -1
  407. package/dist/realtimekit-ui/{p-7ea7c01d.entry.js → p-131b1e94.entry.js} +1 -1
  408. package/dist/realtimekit-ui/{p-a7bed91d.entry.js → p-139da463.entry.js} +1 -1
  409. package/dist/realtimekit-ui/{p-2776bf3b.entry.js → p-238a19f8.entry.js} +1 -1
  410. package/dist/realtimekit-ui/{p-612e7cfa.entry.js → p-25c7522f.entry.js} +1 -1
  411. package/dist/realtimekit-ui/{p-7352c128.entry.js → p-29802710.entry.js} +1 -1
  412. package/dist/realtimekit-ui/p-2aa242f4.js +1 -0
  413. package/dist/realtimekit-ui/{p-3020ebef.entry.js → p-3611c234.entry.js} +1 -1
  414. package/dist/realtimekit-ui/{p-5b40b871.entry.js → p-373ea59c.entry.js} +1 -1
  415. package/dist/realtimekit-ui/{p-8c6e8627.entry.js → p-3d312beb.entry.js} +1 -1
  416. package/dist/realtimekit-ui/{p-1f94b76a.entry.js → p-3ed1c004.entry.js} +1 -1
  417. package/dist/realtimekit-ui/{p-1c87e187.entry.js → p-3fd79328.entry.js} +1 -1
  418. package/dist/realtimekit-ui/{p-801bdf55.entry.js → p-4211ad5e.entry.js} +1 -1
  419. package/dist/realtimekit-ui/{p-d1225160.entry.js → p-42a64cbb.entry.js} +1 -1
  420. package/dist/realtimekit-ui/{p-acab6548.entry.js → p-44915a3b.entry.js} +1 -1
  421. package/dist/realtimekit-ui/p-457a0412.entry.js +1 -0
  422. package/dist/realtimekit-ui/{p-0f27bd13.js → p-4b882b41.js} +1 -1
  423. package/dist/realtimekit-ui/{p-21f1348d.entry.js → p-4d8ab9a5.entry.js} +1 -1
  424. package/dist/realtimekit-ui/{p-12f2bd64.entry.js → p-4dc84daa.entry.js} +1 -1
  425. package/dist/realtimekit-ui/{p-bb563d65.entry.js → p-4f45e362.entry.js} +1 -1
  426. package/dist/realtimekit-ui/{p-288e8b44.entry.js → p-4ff47eb0.entry.js} +1 -1
  427. package/dist/realtimekit-ui/{p-18284fd7.entry.js → p-55503b00.entry.js} +1 -1
  428. package/dist/realtimekit-ui/{p-4e85f3b7.entry.js → p-556db3a1.entry.js} +1 -1
  429. package/dist/realtimekit-ui/p-5584d146.entry.js +1 -0
  430. package/dist/realtimekit-ui/{p-acf5b77f.entry.js → p-560c3d93.entry.js} +1 -1
  431. package/dist/realtimekit-ui/{p-bf8ee4dc.entry.js → p-5b15e3cf.entry.js} +1 -1
  432. package/dist/realtimekit-ui/{p-dd28e235.entry.js → p-679bd218.entry.js} +1 -1
  433. package/dist/realtimekit-ui/{p-d8ef9c71.entry.js → p-6be9be47.entry.js} +1 -1
  434. package/dist/realtimekit-ui/p-6c238609.entry.js +1 -0
  435. package/dist/realtimekit-ui/{p-eef2d66b.js → p-6ededa68.js} +1 -1
  436. package/dist/realtimekit-ui/{p-7ef6ba98.entry.js → p-7536cb87.entry.js} +1 -1
  437. package/dist/realtimekit-ui/{p-a3df14dd.entry.js → p-7af0573f.entry.js} +1 -1
  438. package/dist/realtimekit-ui/{p-60bd5711.entry.js → p-7dbd2a25.entry.js} +1 -1
  439. package/dist/realtimekit-ui/{p-cc349e60.entry.js → p-807dd186.entry.js} +1 -1
  440. package/dist/realtimekit-ui/{p-4c0282cf.entry.js → p-80a02bba.entry.js} +1 -1
  441. package/dist/realtimekit-ui/{p-dafa21f4.entry.js → p-85ff4a34.entry.js} +1 -1
  442. package/dist/realtimekit-ui/p-89f6a08a.entry.js +1 -0
  443. package/dist/realtimekit-ui/p-8fe6b03c.entry.js +1 -0
  444. package/dist/realtimekit-ui/{p-99f0d02d.entry.js → p-917f2951.entry.js} +1 -1
  445. package/dist/realtimekit-ui/{p-efd16e73.entry.js → p-93f881e2.entry.js} +1 -1
  446. package/dist/realtimekit-ui/{p-fe993d97.entry.js → p-9435f236.entry.js} +1 -1
  447. package/dist/realtimekit-ui/{p-193e4084.entry.js → p-94b739b4.entry.js} +1 -1
  448. package/dist/realtimekit-ui/{p-d2e08aa3.entry.js → p-9946b484.entry.js} +1 -1
  449. package/dist/realtimekit-ui/p-9bbe1d7c.entry.js +1 -0
  450. package/dist/realtimekit-ui/{p-06d64de4.entry.js → p-9ca13287.entry.js} +1 -1
  451. package/dist/realtimekit-ui/{p-83d064c4.entry.js → p-9ff45356.entry.js} +1 -1
  452. package/dist/realtimekit-ui/{p-91555d3d.entry.js → p-a5d22edf.entry.js} +1 -1
  453. package/dist/realtimekit-ui/p-a6f03681.entry.js +1 -0
  454. package/dist/realtimekit-ui/p-a738a7b3.entry.js +1 -0
  455. package/dist/realtimekit-ui/{p-9a30eb32.js → p-aaba206b.js} +1 -1
  456. package/dist/realtimekit-ui/{p-14697cc8.entry.js → p-affaaf1a.entry.js} +1 -1
  457. package/dist/realtimekit-ui/{p-f14df538.entry.js → p-b14563cb.entry.js} +1 -1
  458. package/dist/realtimekit-ui/{p-15979e9d.js → p-b16cee89.js} +1 -1
  459. package/dist/realtimekit-ui/{p-77c89c11.entry.js → p-b62f9abb.entry.js} +1 -1
  460. package/dist/realtimekit-ui/{p-526d3453.entry.js → p-bc17c582.entry.js} +1 -1
  461. package/dist/realtimekit-ui/{p-002a2c69.entry.js → p-bf56688f.entry.js} +1 -1
  462. package/dist/realtimekit-ui/{p-ae00b85e.entry.js → p-c7f14fd0.entry.js} +1 -1
  463. package/dist/realtimekit-ui/{p-65cd7711.entry.js → p-d013442a.entry.js} +1 -1
  464. package/dist/realtimekit-ui/{p-fa90fbe2.entry.js → p-d075d673.entry.js} +1 -1
  465. package/dist/realtimekit-ui/{p-8e4d1601.entry.js → p-d1e6d6c4.entry.js} +1 -1
  466. package/dist/realtimekit-ui/p-d77f7f22.entry.js +1 -0
  467. package/dist/realtimekit-ui/{p-bed5abea.entry.js → p-d9217d24.entry.js} +1 -1
  468. package/dist/realtimekit-ui/p-dbb95589.entry.js +1 -0
  469. package/dist/realtimekit-ui/{p-ba05218f.entry.js → p-dd9b1b30.entry.js} +1 -1
  470. package/dist/realtimekit-ui/{p-3acd31e4.entry.js → p-e1091812.entry.js} +1 -1
  471. package/dist/realtimekit-ui/{p-28d56c8d.entry.js → p-e13b5128.entry.js} +1 -1
  472. package/dist/realtimekit-ui/{p-39c6795d.entry.js → p-e171b1c4.entry.js} +1 -1
  473. package/dist/realtimekit-ui/p-ee167b96.js +1 -0
  474. package/dist/realtimekit-ui/{p-aae30d94.entry.js → p-f5ad8c8f.entry.js} +1 -1
  475. package/dist/realtimekit-ui/{p-8f4aa500.entry.js → p-fb67b669.entry.js} +1 -1
  476. package/dist/realtimekit-ui/{p-523d7f94.js → p-fc36f92c.js} +1 -1
  477. package/dist/realtimekit-ui/{p-580a9089.entry.js → p-fc704ef3.entry.js} +1 -1
  478. package/dist/realtimekit-ui/realtimekit-ui.esm.js +1 -1
  479. package/package.json +1 -1
  480. package/dist/realtimekit-ui/p-150c1647.entry.js +0 -1
  481. package/dist/realtimekit-ui/p-1b792ded.entry.js +0 -1
  482. package/dist/realtimekit-ui/p-2698a644.entry.js +0 -1
  483. package/dist/realtimekit-ui/p-424c9c68.entry.js +0 -1
  484. package/dist/realtimekit-ui/p-76d7fd68.entry.js +0 -1
  485. package/dist/realtimekit-ui/p-a1278d45.js +0 -1
  486. package/dist/realtimekit-ui/p-b3f93f40.entry.js +0 -1
  487. package/dist/realtimekit-ui/p-b4a51176.entry.js +0 -1
  488. package/dist/realtimekit-ui/p-b9281511.js +0 -1
  489. package/dist/realtimekit-ui/p-be75700c.entry.js +0 -1
  490. package/dist/realtimekit-ui/p-ddc1d2af.entry.js +0 -1
  491. package/dist/realtimekit-ui/p-f1a12dce.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as t,c as e,h as i,H as o}from"./p-0ee570cd.js";import{c as s,a}from"./p-b9281511.js";import{S as r}from"./p-a1278d45.js";var n=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};const c=class{constructor(i){t(this,i),this.stateUpdate=e(this,"rtkStateUpdate",7),this.variant="button",this.t=s(),this.iconPack=a}toggleDebugger(){var t;this.stateUpdate.emit({activeDebugger:!(null===(t=this.states)||void 0===t?void 0:t.activeDebugger),activeMoreMenu:!1})}render(){return i(o,{key:"e46722c024802f6c96cebb487c9049e8834c48f8",title:this.t("Troubleshooting")},i("rtk-controlbar-button",{key:"ee3d60dd6993d2757f763a0ae8ba173887c9ceba",size:this.size,iconPack:this.iconPack,onClick:()=>this.toggleDebugger(),icon:this.iconPack.debug,label:this.t("Troubleshooting"),variant:this.variant}))}};n([r()],c.prototype,"meeting",void 0),n([r()],c.prototype,"states",void 0),n([r()],c.prototype,"t",void 0),n([r()],c.prototype,"iconPack",void 0),n([r()],c.prototype,"size",void 0),c.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block}";export{c as rtk_debugger_toggle}
1
+ import{r as t,c as e,h as i,H as o}from"./p-0ee570cd.js";import{c as s,a}from"./p-ee167b96.js";import{S as r}from"./p-2aa242f4.js";var n=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};const c=class{constructor(i){t(this,i),this.stateUpdate=e(this,"rtkStateUpdate",7),this.variant="button",this.t=s(),this.iconPack=a}toggleDebugger(){var t;this.stateUpdate.emit({activeDebugger:!(null===(t=this.states)||void 0===t?void 0:t.activeDebugger),activeMoreMenu:!1})}render(){return i(o,{key:"e46722c024802f6c96cebb487c9049e8834c48f8",title:this.t("Troubleshooting")},i("rtk-controlbar-button",{key:"ee3d60dd6993d2757f763a0ae8ba173887c9ceba",size:this.size,iconPack:this.iconPack,onClick:()=>this.toggleDebugger(),icon:this.iconPack.debug,label:this.t("Troubleshooting"),variant:this.variant}))}};n([r()],c.prototype,"meeting",void 0),n([r()],c.prototype,"states",void 0),n([r()],c.prototype,"t",void 0),n([r()],c.prototype,"iconPack",void 0),n([r()],c.prototype,"size",void 0),c.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block}";export{c as rtk_debugger_toggle}
@@ -1 +1 @@
1
- import{r as t,c as r,h as o,H as a}from"./p-0ee570cd.js";import{a as i,c as s}from"./p-b9281511.js";import{S as e}from"./p-a1278d45.js";var n=function(t,r,o,a){var i,s=arguments.length,e=s<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)e=Reflect.decorate(t,r,o,a);else for(var n=t.length-1;n>=0;n--)(i=t[n])&&(e=(s<3?i(e):s>3?i(r,o,e):i(r,o))||e);return s>3&&e&&Object.defineProperty(r,o,e),e};const c=class{constructor(o){t(this,o),this.stateUpdate=r(this,"rtkStateUpdate",7),this.keyPressListener=t=>{"Escape"===t.key&&this.close()},this.stageStatusListener=()=>{this.canProduceVideo="ALLOWED"===this.meeting.self.permissions.canProduceVideo},this.iconPack=i,this.t=s(),this.activeTab="connection",this.isMobileMainVisible=!1,this.networkStatus="good",this.canProduceVideo=!1}connectedCallback(){document.addEventListener("keydown",this.keyPressListener),this.meetingChanged(this.meeting)}disconnectedCallback(){var t;this.keyPressListener&&document.removeEventListener("keydown",this.keyPressListener),this.poorConnectionListener&&(null===(t=this.meeting)||void 0===t||t.meta.removeListener("poorConnection",this.poorConnectionListener)),this.meeting.stage.removeListener("stageStatusUpdate",this.stageStatusListener)}meetingChanged(t){null!=t&&(this.canProduceVideo="ALLOWED"===this.meeting.self.permissions.canProduceVideo,this.activeTab=this.canProduceVideo?"video":"audio",this.poorConnectionListener=({score:t})=>{t<7?this.networkStatus="poor":t<4&&(this.networkStatus="poorest"),setTimeout((()=>{this.networkStatus="good"}),5e3)},t.meta.addListener("poorConnection",this.poorConnectionListener),t.stage.addListener("stageStatusUpdate",this.stageStatusListener))}changeTab(t){this.activeTab=t,"sm"===this.size&&(this.isMobileMainVisible||(this.isMobileMainVisible=!0))}close(){this.stateUpdate.emit({activeSettings:!1})}render(){if(null==this.meeting)return null;const t={meeting:this.meeting,states:this.states,iconPack:this.iconPack,t:this.t};return o(a,null,o("aside",{class:{hide:this.isMobileMainVisible},part:"menu"},o("header",null,o("h2",null,this.t("settings"))),o("button",{type:"button",class:{active:"audio"===this.activeTab},onClick:()=>this.changeTab("audio")},this.t("audio"),o("div",{class:"right"},o("rtk-icon",{icon:this.iconPack.mic_on}),"sm"===this.size&&o("rtk-icon",{icon:this.iconPack.chevron_right}))),this.canProduceVideo&&o("button",{type:"button",class:{active:"video"===this.activeTab},onClick:()=>this.changeTab("video")},this.t("video"),o("div",{class:"right"},o("rtk-icon",{icon:this.iconPack.video_on}),"sm"===this.size&&o("rtk-icon",{icon:this.iconPack.chevron_right}))),o("button",{type:"none",title:`Your network condition is ${this.networkStatus}`},this.t("connection"),o("div",{class:"right"},o("rtk-icon",{icon:this.iconPack.wifi,class:this.networkStatus})))),o("main",{class:{active:this.isMobileMainVisible,scrollbar:!0},part:"main-content"},"sm"===this.size&&o("header",null,o("rtk-button",{kind:"icon",class:"back-btn",onClick:()=>this.isMobileMainVisible=!1},o("rtk-icon",{icon:this.iconPack.chevron_left})),o("h2",null,this.t("audio"===this.activeTab?"audio":"video"))),"audio"===this.activeTab&&o("rtk-settings-audio",Object.assign({},t)),"video"===this.activeTab&&o("rtk-settings-video",Object.assign({},t))))}static get watchers(){return{meeting:["meetingChanged"]}}};n([e()],c.prototype,"meeting",void 0),n([e()],c.prototype,"states",void 0),n([e()],c.prototype,"size",void 0),n([e()],c.prototype,"iconPack",void 0),n([e()],c.prototype,"t",void 0),c.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{position:relative;display:flex;overflow:hidden;border-radius:var(--rtk-border-radius-md, 8px);width:100%;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-1000, 255 255 255))}header{display:flex;align-items:center;justify-content:space-between;padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}.title{font-size:20px;line-height:1}.back-btn,.dismiss-btn{border-radius:var(--rtk-border-radius-sm, 4px);background-color:transparent;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.back-btn:hover,.dismiss-btn:hover{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity))}aside{box-sizing:border-box;display:flex;min-width:var(--rtk-space-56, 224px);flex-direction:column;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));padding-left:var(--rtk-space-2, 8px)}aside button{margin-top:var(--rtk-space-4, 16px);box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:space-between;border-top-left-radius:var(--rtk-border-radius-sm, 4px);border-bottom-left-radius:var(--rtk-border-radius-sm, 4px);padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px);padding-top:var(--rtk-space-3, 12px);padding-bottom:var(--rtk-space-3, 12px);background-color:transparent;color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));cursor:default;font-size:16px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);border-width:var(--rtk-border-width-none, 0);border-style:none;outline:2px solid transparent;outline-offset:2px}aside button .right{display:flex;align-items:center}aside button .right rtk-icon{height:var(--rtk-space-6, 24px);width:var(--rtk-space-6, 24px)}aside button .right rtk-icon:last-child{margin-left:var(--rtk-space-4, 16px)}aside button[type='button']{cursor:pointer;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}aside button[type='button']:hover{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity))}aside button[type='button']{border-right:var(--rtk-border-width-md, 2px) solid transparent}aside button.active{--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-border-opacity));background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / 0.2)}aside button.active:hover{background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / 0.2)}rtk-icon.poor{--tw-text-opacity:1;color:rgba(var(--rtk-colors-warning, 255 205 7) / var(--tw-text-opacity))}rtk-icon.poorest{--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}rtk-icon.good{--tw-text-opacity:1;color:rgba(var(--rtk-colors-success, 98 165 4) / var(--tw-text-opacity))}main{display:flex;flex:1 1 0%;align-items:center;justify-content:center;padding-left:var(--rtk-space-6, 24px);padding-right:var(--rtk-space-6, 24px);box-sizing:border-box;width:100%;max-width:calc(100% - var(--rtk-space-56, 224px))}.dismiss-btn{position:absolute;top:var(--rtk-space-3, 12px);right:var(--rtk-space-3, 12px);height:var(--rtk-space-6, 24px);width:var(--rtk-space-6, 24px)}:host([size='sm']) aside{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity))}:host([size='sm']) .dismiss-btn{top:var(--rtk-space-5, 20px);right:var(--rtk-space-4, 16px)}:host([size='sm']) aside{width:100%;padding-left:var(--rtk-space-0, 0px)}:host([size='sm']) aside button{border-radius:var(--rtk-border-radius-none, 0)}:host([size='sm']) aside button.active{border-width:var(--rtk-border-width-none, 0);border-style:none;background-color:transparent}:host([size='sm']) aside button.active:hover{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity))}:host([size='sm']) aside.hide{display:none}:host([size='sm']) main{display:none;max-width:100%;overflow-y:auto;padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}:host([size='sm']) main header{justify-content:center}:host([size='sm']) main header rtk-button{position:absolute;left:var(--rtk-space-4, 16px)}:host([size='sm']) main.active{display:block}";export{c as rtk_settings}
1
+ import{r as t,c as r,h as o,H as a}from"./p-0ee570cd.js";import{a as i,c as s}from"./p-ee167b96.js";import{S as e}from"./p-2aa242f4.js";var n=function(t,r,o,a){var i,s=arguments.length,e=s<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)e=Reflect.decorate(t,r,o,a);else for(var n=t.length-1;n>=0;n--)(i=t[n])&&(e=(s<3?i(e):s>3?i(r,o,e):i(r,o))||e);return s>3&&e&&Object.defineProperty(r,o,e),e};const c=class{constructor(o){t(this,o),this.stateUpdate=r(this,"rtkStateUpdate",7),this.keyPressListener=t=>{"Escape"===t.key&&this.close()},this.stageStatusListener=()=>{this.canProduceVideo="ALLOWED"===this.meeting.self.permissions.canProduceVideo},this.iconPack=i,this.t=s(),this.activeTab="connection",this.isMobileMainVisible=!1,this.networkStatus="good",this.canProduceVideo=!1}connectedCallback(){document.addEventListener("keydown",this.keyPressListener),this.meetingChanged(this.meeting)}disconnectedCallback(){var t;this.keyPressListener&&document.removeEventListener("keydown",this.keyPressListener),this.poorConnectionListener&&(null===(t=this.meeting)||void 0===t||t.meta.removeListener("poorConnection",this.poorConnectionListener)),this.meeting.stage.removeListener("stageStatusUpdate",this.stageStatusListener)}meetingChanged(t){null!=t&&(this.canProduceVideo="ALLOWED"===this.meeting.self.permissions.canProduceVideo,this.activeTab=this.canProduceVideo?"video":"audio",this.poorConnectionListener=({score:t})=>{t<7?this.networkStatus="poor":t<4&&(this.networkStatus="poorest"),setTimeout((()=>{this.networkStatus="good"}),5e3)},t.meta.addListener("poorConnection",this.poorConnectionListener),t.stage.addListener("stageStatusUpdate",this.stageStatusListener))}changeTab(t){this.activeTab=t,"sm"===this.size&&(this.isMobileMainVisible||(this.isMobileMainVisible=!0))}close(){this.stateUpdate.emit({activeSettings:!1})}render(){if(null==this.meeting)return null;const t={meeting:this.meeting,states:this.states,iconPack:this.iconPack,t:this.t};return o(a,null,o("aside",{class:{hide:this.isMobileMainVisible},part:"menu"},o("header",null,o("h2",null,this.t("settings"))),o("button",{type:"button",class:{active:"audio"===this.activeTab},onClick:()=>this.changeTab("audio")},this.t("audio"),o("div",{class:"right"},o("rtk-icon",{icon:this.iconPack.mic_on}),"sm"===this.size&&o("rtk-icon",{icon:this.iconPack.chevron_right}))),this.canProduceVideo&&o("button",{type:"button",class:{active:"video"===this.activeTab},onClick:()=>this.changeTab("video")},this.t("video"),o("div",{class:"right"},o("rtk-icon",{icon:this.iconPack.video_on}),"sm"===this.size&&o("rtk-icon",{icon:this.iconPack.chevron_right}))),o("button",{type:"none",title:`Your network condition is ${this.networkStatus}`},this.t("connection"),o("div",{class:"right"},o("rtk-icon",{icon:this.iconPack.wifi,class:this.networkStatus})))),o("main",{class:{active:this.isMobileMainVisible,scrollbar:!0},part:"main-content"},"sm"===this.size&&o("header",null,o("rtk-button",{kind:"icon",class:"back-btn",onClick:()=>this.isMobileMainVisible=!1},o("rtk-icon",{icon:this.iconPack.chevron_left})),o("h2",null,this.t("audio"===this.activeTab?"audio":"video"))),"audio"===this.activeTab&&o("rtk-settings-audio",Object.assign({},t)),"video"===this.activeTab&&o("rtk-settings-video",Object.assign({},t))))}static get watchers(){return{meeting:["meetingChanged"]}}};n([e()],c.prototype,"meeting",void 0),n([e()],c.prototype,"states",void 0),n([e()],c.prototype,"size",void 0),n([e()],c.prototype,"iconPack",void 0),n([e()],c.prototype,"t",void 0),c.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{position:relative;display:flex;overflow:hidden;border-radius:var(--rtk-border-radius-md, 8px);width:100%;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-1000, 255 255 255))}header{display:flex;align-items:center;justify-content:space-between;padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}.title{font-size:20px;line-height:1}.back-btn,.dismiss-btn{border-radius:var(--rtk-border-radius-sm, 4px);background-color:transparent;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.back-btn:hover,.dismiss-btn:hover{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity))}aside{box-sizing:border-box;display:flex;min-width:var(--rtk-space-56, 224px);flex-direction:column;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));padding-left:var(--rtk-space-2, 8px)}aside button{margin-top:var(--rtk-space-4, 16px);box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:space-between;border-top-left-radius:var(--rtk-border-radius-sm, 4px);border-bottom-left-radius:var(--rtk-border-radius-sm, 4px);padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px);padding-top:var(--rtk-space-3, 12px);padding-bottom:var(--rtk-space-3, 12px);background-color:transparent;color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));cursor:default;font-size:16px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);border-width:var(--rtk-border-width-none, 0);border-style:none;outline:2px solid transparent;outline-offset:2px}aside button .right{display:flex;align-items:center}aside button .right rtk-icon{height:var(--rtk-space-6, 24px);width:var(--rtk-space-6, 24px)}aside button .right rtk-icon:last-child{margin-left:var(--rtk-space-4, 16px)}aside button[type='button']{cursor:pointer;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}aside button[type='button']:hover{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity))}aside button[type='button']{border-right:var(--rtk-border-width-md, 2px) solid transparent}aside button.active{--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-border-opacity));background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / 0.2)}aside button.active:hover{background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / 0.2)}rtk-icon.poor{--tw-text-opacity:1;color:rgba(var(--rtk-colors-warning, 255 205 7) / var(--tw-text-opacity))}rtk-icon.poorest{--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}rtk-icon.good{--tw-text-opacity:1;color:rgba(var(--rtk-colors-success, 98 165 4) / var(--tw-text-opacity))}main{display:flex;flex:1 1 0%;align-items:center;justify-content:center;padding-left:var(--rtk-space-6, 24px);padding-right:var(--rtk-space-6, 24px);box-sizing:border-box;width:100%;max-width:calc(100% - var(--rtk-space-56, 224px))}.dismiss-btn{position:absolute;top:var(--rtk-space-3, 12px);right:var(--rtk-space-3, 12px);height:var(--rtk-space-6, 24px);width:var(--rtk-space-6, 24px)}:host([size='sm']) aside{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity))}:host([size='sm']) .dismiss-btn{top:var(--rtk-space-5, 20px);right:var(--rtk-space-4, 16px)}:host([size='sm']) aside{width:100%;padding-left:var(--rtk-space-0, 0px)}:host([size='sm']) aside button{border-radius:var(--rtk-border-radius-none, 0)}:host([size='sm']) aside button.active{border-width:var(--rtk-border-width-none, 0);border-style:none;background-color:transparent}:host([size='sm']) aside button.active:hover{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity))}:host([size='sm']) aside.hide{display:none}:host([size='sm']) main{display:none;max-width:100%;overflow-y:auto;padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}:host([size='sm']) main header{justify-content:center}:host([size='sm']) main header rtk-button{position:absolute;left:var(--rtk-space-4, 16px)}:host([size='sm']) main.active{display:block}";export{c as rtk_settings}
@@ -1 +1 @@
1
- import{r as i,c as t,h as s,H as o}from"./p-0ee570cd.js";import{a as e,c as a}from"./p-b9281511.js";import{S as l}from"./p-a1278d45.js";var n=function(i,t,s,o){var e,a=arguments.length,l=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,s):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(i,t,s,o);else for(var n=i.length-1;n>=0;n--)(e=i[n])&&(l=(a<3?e(l):a>3?e(t,s,l):e(t,s))||l);return a>3&&l&&Object.defineProperty(t,s,l),l};const d=class{constructor(s){i(this,s),this.stateUpdate=t(this,"rtkStateUpdate",7),this.audioUpdateListener=({audioEnabled:i})=>{this.audioEnabled=i},this.stageStatusListener=()=>{this.stageStatus=this.meeting.stage.status,this.canProduceAudio="ALLOWED"===this.meeting.self.permissions.canProduceAudio},this.mediaPermissionUpdateListener=({kind:i,message:t})=>{"audio"===i&&(this.micPermission=t)},this.meetingPermissionsUpdateListener=i=>{var t;(null===(t=null==i?void 0:i.media)||void 0===t?void 0:t.audio)&&(this.canProduceAudio="ALLOWED"===this.meeting.self.permissions.canProduceAudio)},this.variant="button",this.iconPack=e,this.t=a(),this.audioEnabled=!1,this.canProduceAudio=!1,this.micPermission="NOT_REQUESTED",this.stageStatus="OFF_STAGE",this.toggleMic=()=>{var i,t,s,o,e,a,l,n,d,h,r,c;if(null===(i=this.meeting)||void 0===i||i.__internals__.logger.info("rtkMicToggle::toggleMic",{media:{audio:{enabled:Boolean(null===(s=null===(t=this.meeting)||void 0===t?void 0:t.self)||void 0===s?void 0:s.audioEnabled),permission:this.micPermission,canProduce:null===(a=null===(e=null===(o=this.meeting)||void 0===o?void 0:o.self)||void 0===e?void 0:e.permissions)||void 0===a?void 0:a.canProduceAudio}},webinar:{stageStatus:null===(n=null===(l=this.meeting)||void 0===l?void 0:l.stage)||void 0===n?void 0:n.status},livestream:{stageStatus:null===(h=null===(d=this.meeting)||void 0===d?void 0:d.stage)||void 0===h?void 0:h.status},moduleExists:{self:Boolean(null===(r=this.meeting)||void 0===r?void 0:r.self)}}),this.hasPermissionError())return this.stateUpdate.emit({activePermissionsMessage:{enabled:!0,kind:"audio"}}),!1;const v=null===(c=this.meeting)||void 0===c?void 0:c.self;null!=v&&this.canProduceAudio&&(v.audioEnabled?v.disableAudio():v.enableAudio())}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){var i,t,s,o,e,a,l;null===(i=this.meeting)||void 0===i||i.self.removeListener("audioUpdate",this.audioUpdateListener),null===(t=this.meeting)||void 0===t||t.self.removeListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),null===(o=null===(s=this.meeting)||void 0===s?void 0:s.stage)||void 0===o||o.removeListener("stageStatusUpdate",this.stageStatusListener),null===(l=null===(a=null===(e=this.meeting)||void 0===e?void 0:e.self)||void 0===a?void 0:a.permissions)||void 0===l||l.removeListener("permissionsUpdate",this.meetingPermissionsUpdateListener)}meetingChanged(i){var t,s;if(null!=i){const{self:o,stage:e}=i;this.canProduceAudio="ALLOWED"===this.meeting.self.permissions.canProduceAudio,this.micPermission=i.self.mediaPermissions.audio||"NOT_REQUESTED",this.audioEnabled=o.audioEnabled,this.stageStatus=i.stage.status,o.addListener("audioUpdate",this.audioUpdateListener),o.addListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),null==e||e.addListener("stageStatusUpdate",this.stageStatusListener),null===(s=null===(t=i.self)||void 0===t?void 0:t.permissions)||void 0===s||s.addListener("permissionsUpdate",this.meetingPermissionsUpdateListener)}}hasPermissionError(){return"DENIED"===this.micPermission||"SYSTEM_DENIED"===this.micPermission}getState(){let i="",t="",s="",o={},e=this.hasPermissionError(),a="COULD_NOT_START"===this.micPermission;return this.audioEnabled&&!e?(t=this.t("mic_on"),s=this.iconPack.mic_on):(t=this.t("mic_off"),s=this.iconPack.mic_off,o["red-icon"]=!0),i=this.t(a?"perm_could_not_start.audio":"SYSTEM_DENIED"===this.micPermission?"perm_sys_denied.audio":"DENIED"===this.micPermission?"perm_denied.audio":this.audioEnabled?"disable_mic":"enable_mic"),{tooltipLabel:i,label:t,icon:s,classList:o,showWarning:e||a,disable:e}}render(){if(!this.canProduceAudio||["OFF_STAGE","REQUESTED_TO_JOIN_STAGE"].includes(this.stageStatus))return s(o,{"data-hidden":!0});const{tooltipLabel:i,label:t,icon:e,classList:a,showWarning:l,disable:n}=this.getState();return s(o,{title:t},s("rtk-tooltip",{kind:"block",label:i,part:"tooltip"},s("rtk-controlbar-button",{part:"controlbar-button",icon:e,label:t,size:this.size,iconPack:this.iconPack,variant:this.variant,class:a,onClick:this.toggleMic,showWarning:l,disabled:n})))}static get watchers(){return{meeting:["meetingChanged"]}}};n([l()],d.prototype,"meeting",void 0),n([l()],d.prototype,"size",void 0),n([l()],d.prototype,"iconPack",void 0),n([l()],d.prototype,"t",void 0),d.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block}:host([data-hidden]){display:none}:host(.audioDisabled) :slotted(rtk-icon){--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}";export{d as rtk_mic_toggle}
1
+ import{r as i,c as t,h as s,H as o}from"./p-0ee570cd.js";import{a as e,c as a}from"./p-ee167b96.js";import{S as l}from"./p-2aa242f4.js";var n=function(i,t,s,o){var e,a=arguments.length,l=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,s):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(i,t,s,o);else for(var n=i.length-1;n>=0;n--)(e=i[n])&&(l=(a<3?e(l):a>3?e(t,s,l):e(t,s))||l);return a>3&&l&&Object.defineProperty(t,s,l),l};const d=class{constructor(s){i(this,s),this.stateUpdate=t(this,"rtkStateUpdate",7),this.audioUpdateListener=({audioEnabled:i})=>{this.audioEnabled=i},this.stageStatusListener=()=>{this.stageStatus=this.meeting.stage.status,this.canProduceAudio="ALLOWED"===this.meeting.self.permissions.canProduceAudio},this.mediaPermissionUpdateListener=({kind:i,message:t})=>{"audio"===i&&(this.micPermission=t)},this.meetingPermissionsUpdateListener=i=>{var t;(null===(t=null==i?void 0:i.media)||void 0===t?void 0:t.audio)&&(this.canProduceAudio="ALLOWED"===this.meeting.self.permissions.canProduceAudio)},this.variant="button",this.iconPack=e,this.t=a(),this.audioEnabled=!1,this.canProduceAudio=!1,this.micPermission="NOT_REQUESTED",this.stageStatus="OFF_STAGE",this.toggleMic=()=>{var i,t,s,o,e,a,l,n,d,h,r,c;if(null===(i=this.meeting)||void 0===i||i.__internals__.logger.info("rtkMicToggle::toggleMic",{media:{audio:{enabled:Boolean(null===(s=null===(t=this.meeting)||void 0===t?void 0:t.self)||void 0===s?void 0:s.audioEnabled),permission:this.micPermission,canProduce:null===(a=null===(e=null===(o=this.meeting)||void 0===o?void 0:o.self)||void 0===e?void 0:e.permissions)||void 0===a?void 0:a.canProduceAudio}},webinar:{stageStatus:null===(n=null===(l=this.meeting)||void 0===l?void 0:l.stage)||void 0===n?void 0:n.status},livestream:{stageStatus:null===(h=null===(d=this.meeting)||void 0===d?void 0:d.stage)||void 0===h?void 0:h.status},moduleExists:{self:Boolean(null===(r=this.meeting)||void 0===r?void 0:r.self)}}),this.hasPermissionError())return this.stateUpdate.emit({activePermissionsMessage:{enabled:!0,kind:"audio"}}),!1;const v=null===(c=this.meeting)||void 0===c?void 0:c.self;null!=v&&this.canProduceAudio&&(v.audioEnabled?v.disableAudio():v.enableAudio())}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){var i,t,s,o,e,a,l;null===(i=this.meeting)||void 0===i||i.self.removeListener("audioUpdate",this.audioUpdateListener),null===(t=this.meeting)||void 0===t||t.self.removeListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),null===(o=null===(s=this.meeting)||void 0===s?void 0:s.stage)||void 0===o||o.removeListener("stageStatusUpdate",this.stageStatusListener),null===(l=null===(a=null===(e=this.meeting)||void 0===e?void 0:e.self)||void 0===a?void 0:a.permissions)||void 0===l||l.removeListener("permissionsUpdate",this.meetingPermissionsUpdateListener)}meetingChanged(i){var t,s;if(null!=i){const{self:o,stage:e}=i;this.canProduceAudio="ALLOWED"===this.meeting.self.permissions.canProduceAudio,this.micPermission=i.self.mediaPermissions.audio||"NOT_REQUESTED",this.audioEnabled=o.audioEnabled,this.stageStatus=i.stage.status,o.addListener("audioUpdate",this.audioUpdateListener),o.addListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),null==e||e.addListener("stageStatusUpdate",this.stageStatusListener),null===(s=null===(t=i.self)||void 0===t?void 0:t.permissions)||void 0===s||s.addListener("permissionsUpdate",this.meetingPermissionsUpdateListener)}}hasPermissionError(){return"DENIED"===this.micPermission||"SYSTEM_DENIED"===this.micPermission}getState(){let i="",t="",s="",o={},e=this.hasPermissionError(),a="COULD_NOT_START"===this.micPermission;return this.audioEnabled&&!e?(t=this.t("mic_on"),s=this.iconPack.mic_on):(t=this.t("mic_off"),s=this.iconPack.mic_off,o["red-icon"]=!0),i=this.t(a?"perm_could_not_start.audio":"SYSTEM_DENIED"===this.micPermission?"perm_sys_denied.audio":"DENIED"===this.micPermission?"perm_denied.audio":this.audioEnabled?"disable_mic":"enable_mic"),{tooltipLabel:i,label:t,icon:s,classList:o,showWarning:e||a,disable:e}}render(){if(!this.canProduceAudio||["OFF_STAGE","REQUESTED_TO_JOIN_STAGE"].includes(this.stageStatus))return s(o,{"data-hidden":!0});const{tooltipLabel:i,label:t,icon:e,classList:a,showWarning:l,disable:n}=this.getState();return s(o,{title:t},s("rtk-tooltip",{kind:"block",label:i,part:"tooltip"},s("rtk-controlbar-button",{part:"controlbar-button",icon:e,label:t,size:this.size,iconPack:this.iconPack,variant:this.variant,class:a,onClick:this.toggleMic,showWarning:l,disabled:n})))}static get watchers(){return{meeting:["meetingChanged"]}}};n([l()],d.prototype,"meeting",void 0),n([l()],d.prototype,"size",void 0),n([l()],d.prototype,"iconPack",void 0),n([l()],d.prototype,"t",void 0),d.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block}:host([data-hidden]){display:none}:host(.audioDisabled) :slotted(rtk-icon){--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}";export{d as rtk_mic_toggle}
@@ -1 +1 @@
1
- import{r as t,c as a,h as e,H as i}from"./p-0ee570cd.js";import{a as s,c as o}from"./p-b9281511.js";import{S as r}from"./p-a1278d45.js";var n=function(t,a,e,i){var s,o=arguments.length,r=o<3?a:null===i?i=Object.getOwnPropertyDescriptor(a,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,a,e,i);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(o<3?s(r):o>3?s(a,e,r):s(a,e))||r);return o>3&&r&&Object.defineProperty(a,e,r),r};const c=class{constructor(e){t(this,e),this.stateUpdate=a(this,"rtkStateUpdate",7),this.variant="button",this.iconPack=s,this.t=o(),this.leave=()=>{this.stateUpdate.emit({activeLeaveConfirmation:!0})}}render(){const t=this.t("leave");return e(i,{key:"2ce38b68e83d44e924766230f74b18111db72771",label:t},e("rtk-controlbar-button",{key:"5bdc59145416c548a980178df00225781bbbadcc",size:this.size,iconPack:this.iconPack,class:"leave red-icon",onClick:this.leave,icon:this.iconPack.call_end,label:t,variant:this.variant,part:"controlbar-button"}))}};n([r()],c.prototype,"size",void 0),n([r()],c.prototype,"iconPack",void 0),n([r()],c.prototype,"t",void 0),c.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block}";export{c as rtk_leave_button}
1
+ import{r as t,c as e,h as a,H as i}from"./p-0ee570cd.js";import{a as s,c as o}from"./p-ee167b96.js";import{S as r}from"./p-2aa242f4.js";var n=function(t,e,a,i){var s,o=arguments.length,r=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(o<3?s(r):o>3?s(e,a,r):s(e,a))||r);return o>3&&r&&Object.defineProperty(e,a,r),r};const c=class{constructor(a){t(this,a),this.stateUpdate=e(this,"rtkStateUpdate",7),this.variant="button",this.iconPack=s,this.t=o(),this.leave=()=>{this.stateUpdate.emit({activeLeaveConfirmation:!0})}}render(){const t=this.t("leave");return a(i,{key:"2ce38b68e83d44e924766230f74b18111db72771",label:t},a("rtk-controlbar-button",{key:"5bdc59145416c548a980178df00225781bbbadcc",size:this.size,iconPack:this.iconPack,class:"leave red-icon",onClick:this.leave,icon:this.iconPack.call_end,label:t,variant:this.variant,part:"controlbar-button"}))}};n([r()],c.prototype,"size",void 0),n([r()],c.prototype,"iconPack",void 0),n([r()],c.prototype,"t",void 0),c.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block}";export{c as rtk_leave_button}
@@ -1 +1 @@
1
- import{r as t,c as i,h as s,H as a}from"./p-0ee570cd.js";import{a as e,c as n}from"./p-b9281511.js";import{a as r}from"./p-15979e9d.js";import{S as h}from"./p-a1278d45.js";var o=function(t,i,s,a){var e,n=arguments.length,r=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,s):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,i,s,a);else for(var h=t.length-1;h>=0;h--)(e=t[h])&&(r=(n<3?e(r):n>3?e(i,s,r):e(i,s))||r);return n>3&&r&&Object.defineProperty(i,s,r),r};const c=class{constructor(s){t(this,s),this.stateUpdate=i(this,"rtkStateUpdate",7),this.variant="button",this.iconPack=e,this.t=n(),this.participantsActive=!1,this.waitlistedParticipants=[],this.stageRequestedParticipants=[],this.badgeCount=0,this.canViewParticipants=!1,this.updateStageRequests=async t=>{var i,s,a;t||(t=null!==(a=null===(s=null===(i=this.meeting.stage)||void 0===i?void 0:i.getAccessRequests())||void 0===s?void 0:s.stageRequests)&&void 0!==a?a:[]),this.stageRequestedParticipants=t,this.stageRequestedParticipants="REQUESTED_TO_JOIN_STAGE"===this.meeting.stage.status?[this.meeting.self,...t]:t,this.updateBadgeCount()},this.updateBadgeCount=()=>{this.badgeCount=this.waitlistedParticipants.length+this.stageRequestedParticipants.length},this.updateCanView=()=>{this.canViewParticipants=r(this.meeting)}}connectedCallback(){this.meetingChanged(this.meeting),this.statesChanged(this.states)}disconnectedCallback(){var t,i,s;null!=this.meeting&&(null===(i=null===(t=this.meeting)||void 0===t?void 0:t.stage)||void 0===i||i.removeListener("stageStatusUpdate",this.updateCanView),this.waitlistedParticipantJoinedListener&&this.meeting.participants.waitlisted.removeListener("participantJoined",this.waitlistedParticipantJoinedListener),this.waitlistedParticipantLeftListener&&this.meeting.participants.waitlisted.removeListener("participantLeft",this.waitlistedParticipantLeftListener),null===(s=this.meeting.stage)||void 0===s||s.removeListener("stageAccessRequestUpdate",this.updateStageRequests))}meetingChanged(t){var i;null!=t&&(this.canViewParticipants=r(t),null===(i=null==t?void 0:t.stage)||void 0===i||i.on("stageStatusUpdate",this.updateCanView),t.self.permissions.acceptWaitingRequests&&(this.waitlistedParticipants=t.participants.waitlisted.toArray(),this.waitlistedParticipantJoinedListener=t=>{this.waitlistedParticipants.some((i=>i.id===t.id))||(this.waitlistedParticipants=[...this.waitlistedParticipants,t],this.updateBadgeCount())},this.waitlistedParticipantLeftListener=t=>{this.waitlistedParticipants=this.waitlistedParticipants.filter((i=>i.id!==t.id)),this.updateBadgeCount()},t.participants.waitlisted.addListener("participantJoined",this.waitlistedParticipantJoinedListener),t.participants.waitlisted.addListener("participantLeft",this.waitlistedParticipantLeftListener)),this.meeting.self.permissions.stageEnabled&&this.meeting.self.permissions.acceptStageRequests&&(this.updateStageRequests(),null==t||t.stage.on("stageAccessRequestUpdate",this.updateStageRequests)),this.updateBadgeCount())}statesChanged(t){null!=t&&(this.participantsActive=!0===t.activeSidebar&&"participants"===t.sidebar)}toggleParticipantsTab(){const t=this.states;this.participantsActive=!((null==t?void 0:t.activeSidebar)&&"participants"===(null==t?void 0:t.sidebar)),this.stateUpdate.emit({activeSidebar:this.participantsActive,sidebar:this.participantsActive?"participants":void 0,activeMoreMenu:!1,activeAI:!1})}handleParticipantsActiveChange(){this.participantsActive||this.states.activeSidebar||this.buttonEl.focus()}render(){if(!this.canViewParticipants)return s(a,{"data-hidden":!0});const t=this.t("participants");return s(a,{title:t},0!==this.badgeCount&&!this.participantsActive&&s("div",{class:"waiting-participants-count",part:"waiting-participants-count"},s("span",null,this.badgeCount<=100?this.badgeCount:"99+")),s("rtk-controlbar-button",{ref:t=>this.buttonEl=t,part:"controlbar-button",size:this.size,iconPack:this.iconPack,class:{active:this.participantsActive},onClick:()=>this.toggleParticipantsTab(),icon:this.iconPack.participants,label:t,variant:this.variant}))}static get watchers(){return{meeting:["meetingChanged"],states:["statesChanged"],participantsActive:["handleParticipantsActiveChange"]}}};o([h()],c.prototype,"meeting",void 0),o([h()],c.prototype,"states",void 0),o([h()],c.prototype,"size",void 0),o([h()],c.prototype,"iconPack",void 0),o([h()],c.prototype,"t",void 0),c.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{position:relative;display:block}:host([data-hidden]){display:none}.waiting-participants-count{position:absolute;right:var(--rtk-space-3, 12px);box-sizing:border-box;padding:var(--rtk-space-0\\.5, 2px);-webkit-user-select:none;-moz-user-select:none;user-select:none;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));font-size:12px;display:flex;height:var(--rtk-space-5, 20px);min-width:var(--rtk-space-5, 20px);align-items:center;justify-content:center;border-radius:9999px;z-index:1}:host([variant='horizontal']) .waiting-participants-count{right:var(--rtk-space-4, 16px);top:50%;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}";export{c as rtk_participants_toggle}
1
+ import{r as t,c as i,h as s,H as a}from"./p-0ee570cd.js";import{a as e,c as n}from"./p-ee167b96.js";import{a as r}from"./p-b16cee89.js";import{S as h}from"./p-2aa242f4.js";var o=function(t,i,s,a){var e,n=arguments.length,r=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,s):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,i,s,a);else for(var h=t.length-1;h>=0;h--)(e=t[h])&&(r=(n<3?e(r):n>3?e(i,s,r):e(i,s))||r);return n>3&&r&&Object.defineProperty(i,s,r),r};const c=class{constructor(s){t(this,s),this.stateUpdate=i(this,"rtkStateUpdate",7),this.variant="button",this.iconPack=e,this.t=n(),this.participantsActive=!1,this.waitlistedParticipants=[],this.stageRequestedParticipants=[],this.badgeCount=0,this.canViewParticipants=!1,this.updateStageRequests=async t=>{var i,s,a;t||(t=null!==(a=null===(s=null===(i=this.meeting.stage)||void 0===i?void 0:i.getAccessRequests())||void 0===s?void 0:s.stageRequests)&&void 0!==a?a:[]),this.stageRequestedParticipants=t,this.stageRequestedParticipants="REQUESTED_TO_JOIN_STAGE"===this.meeting.stage.status?[this.meeting.self,...t]:t,this.updateBadgeCount()},this.updateBadgeCount=()=>{this.badgeCount=this.waitlistedParticipants.length+this.stageRequestedParticipants.length},this.updateCanView=()=>{this.canViewParticipants=r(this.meeting)}}connectedCallback(){this.meetingChanged(this.meeting),this.statesChanged(this.states)}disconnectedCallback(){var t,i,s;null!=this.meeting&&(null===(i=null===(t=this.meeting)||void 0===t?void 0:t.stage)||void 0===i||i.removeListener("stageStatusUpdate",this.updateCanView),this.waitlistedParticipantJoinedListener&&this.meeting.participants.waitlisted.removeListener("participantJoined",this.waitlistedParticipantJoinedListener),this.waitlistedParticipantLeftListener&&this.meeting.participants.waitlisted.removeListener("participantLeft",this.waitlistedParticipantLeftListener),null===(s=this.meeting.stage)||void 0===s||s.removeListener("stageAccessRequestUpdate",this.updateStageRequests))}meetingChanged(t){var i;null!=t&&(this.canViewParticipants=r(t),null===(i=null==t?void 0:t.stage)||void 0===i||i.on("stageStatusUpdate",this.updateCanView),t.self.permissions.acceptWaitingRequests&&(this.waitlistedParticipants=t.participants.waitlisted.toArray(),this.waitlistedParticipantJoinedListener=t=>{this.waitlistedParticipants.some((i=>i.id===t.id))||(this.waitlistedParticipants=[...this.waitlistedParticipants,t],this.updateBadgeCount())},this.waitlistedParticipantLeftListener=t=>{this.waitlistedParticipants=this.waitlistedParticipants.filter((i=>i.id!==t.id)),this.updateBadgeCount()},t.participants.waitlisted.addListener("participantJoined",this.waitlistedParticipantJoinedListener),t.participants.waitlisted.addListener("participantLeft",this.waitlistedParticipantLeftListener)),this.meeting.self.permissions.stageEnabled&&this.meeting.self.permissions.acceptStageRequests&&(this.updateStageRequests(),null==t||t.stage.on("stageAccessRequestUpdate",this.updateStageRequests)),this.updateBadgeCount())}statesChanged(t){null!=t&&(this.participantsActive=!0===t.activeSidebar&&"participants"===t.sidebar)}toggleParticipantsTab(){const t=this.states;this.participantsActive=!((null==t?void 0:t.activeSidebar)&&"participants"===(null==t?void 0:t.sidebar)),this.stateUpdate.emit({activeSidebar:this.participantsActive,sidebar:this.participantsActive?"participants":void 0,activeMoreMenu:!1,activeAI:!1})}handleParticipantsActiveChange(){this.participantsActive||this.states.activeSidebar||this.buttonEl.focus()}render(){if(!this.canViewParticipants)return s(a,{"data-hidden":!0});const t=this.t("participants");return s(a,{title:t},0!==this.badgeCount&&!this.participantsActive&&s("div",{class:"waiting-participants-count",part:"waiting-participants-count"},s("span",null,this.badgeCount<=100?this.badgeCount:"99+")),s("rtk-controlbar-button",{ref:t=>this.buttonEl=t,part:"controlbar-button",size:this.size,iconPack:this.iconPack,class:{active:this.participantsActive},onClick:()=>this.toggleParticipantsTab(),icon:this.iconPack.participants,label:t,variant:this.variant}))}static get watchers(){return{meeting:["meetingChanged"],states:["statesChanged"],participantsActive:["handleParticipantsActiveChange"]}}};o([h()],c.prototype,"meeting",void 0),o([h()],c.prototype,"states",void 0),o([h()],c.prototype,"size",void 0),o([h()],c.prototype,"iconPack",void 0),o([h()],c.prototype,"t",void 0),c.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{position:relative;display:block}:host([data-hidden]){display:none}.waiting-participants-count{position:absolute;right:var(--rtk-space-3, 12px);box-sizing:border-box;padding:var(--rtk-space-0\\.5, 2px);-webkit-user-select:none;-moz-user-select:none;user-select:none;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));font-size:12px;display:flex;height:var(--rtk-space-5, 20px);min-width:var(--rtk-space-5, 20px);align-items:center;justify-content:center;border-radius:9999px;z-index:1}:host([variant='horizontal']) .waiting-participants-count{right:var(--rtk-space-4, 16px);top:50%;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}";export{c as rtk_participants_toggle}
@@ -0,0 +1 @@
1
+ import{r as a,h as t,H as e}from"./p-0ee570cd.js";import{d as i,a as s,c as r}from"./p-ee167b96.js";import{R as n}from"./p-c8eaa707.js";import{S as o}from"./p-2aa242f4.js";var c=function(a,t,e,i){var s,r=arguments.length,n=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(a,t,e,i);else for(var o=a.length-1;o>=0;o--)(s=a[o])&&(n=(r<3?s(n):r>3?s(t,e,n):s(t,e))||n);return r>3&&n&&Object.defineProperty(t,e,n),n};const d=class{constructor(t){a(this,t),this.variant="solid",this.disableRender=!1,this.config=i,this.iconPack=s,this.t=r()}render(){return t(e,{key:"0b3c18e3927465e198c26f79d810dadc31ebb74b"},!this.disableRender&&t(n,{key:"480d2f17a6d831dabb3d39abceb33fbc1aa6d78d",element:"rtk-header",defaults:{meeting:this.meeting,config:this.config,states:this.states,t:this.t,iconPack:this.iconPack,size:this.size},onlyChildren:!0}),t("slot",{key:"67f89c4a3574ba22976d3aa57268aabe4ce78d2a"}))}};c([o()],d.prototype,"meeting",void 0),c([o()],d.prototype,"states",void 0),c([o()],d.prototype,"iconPack",void 0),c([o()],d.prototype,"t",void 0),c([o()],d.prototype,"size",void 0),d.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:flex;height:var(--rtk-space-12, 48px);align-items:center;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}@media only screen and (max-device-height: 480px) and (orientation: landscape){:host{display:none !important}}@media only screen and (max-height: 480px) and (orientation: landscape){:host{display:none !important}}";export{d as rtk_header}
@@ -1 +1 @@
1
- import{r as t,c as i,h as a,H as s}from"./p-0ee570cd.js";import{e,a as r,c as o,q as h}from"./p-b9281511.js";import{l as d}from"./p-5605a420.js";import{S as c}from"./p-a1278d45.js";class n{constructor(t,i){this.meeting=t,this.audio=null!=i?i:document.createElement("audio"),this.audio.autoplay=!0,this.audioStream=new MediaStream,this.audio.srcObject=this.audioStream,this.audioTracks=[]}addTrack(t,i){this.audioTracks.some((i=>i.id===t))||(this.audioTracks.push({id:t,track:i}),this.audioStream.addTrack(i),this.play())}removeTrack(t){const i=this.audioTracks.find((i=>i.id===t));null!=i&&(this.audioStream.removeTrack(i.track),this.audioTracks=this.audioTracks.filter((i=>i.id!==t)))}async play(){var t;this.audio.srcObject=this.audioStream,await(null===(t=this.audio.play())||void 0===t?void 0:t.catch((t=>{"NotAllowedError"===t.name?null!=this._onError&&this._onError():"AbortError"!==t.name&&d.error("[rtk-audio] play() error\n",t)})))}async setDevice(t){var i,a,s;e(this.meeting)||await(null===(s=null===(a=(i=this.audio).setSinkId)||void 0===a?void 0:a.call(i,t))||void 0===s?void 0:s.catch((t=>{d.error("[rtk-audio] setSinkId() error\n",t)})))}onError(t){this._onError=t}}var l=function(t,i,a,s){var e,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,a):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,a,s);else for(var h=t.length-1;h>=0;h--)(e=t[h])&&(o=(r<3?e(o):r>3?e(i,a,o):e(i,a))||o);return r>3&&o&&Object.defineProperty(i,a,o),o};const p=class{constructor(a){t(this,a),this.dialogClose=i(this,"dialogClose",7),this.iconPack=r,this.t=o(),this.preloadedAudioElem=void 0,this.showPlayDialog=!1,this.onRtkDialogClose=()=>{this.showPlayDialog=!1,this.dialogClose.emit()}}componentDidLoad(){this.meetingChanged(this.meeting)}disconnectedCallback(){var t;null!=this.meeting&&(this.audioUpdateListener&&this.meeting.participants.joined.removeListener("audioUpdate",this.audioUpdateListener),this.screenShareUpdateListener&&this.meeting.participants.joined.removeListener("screenShareUpdate",this.screenShareUpdateListener),this.participantLeftListener&&this.meeting.participants.joined.removeListener("participantLeft",this.participantLeftListener),this.deviceUpdateListener&&this.meeting.self.removeListener("deviceUpdate",this.deviceUpdateListener),this.stageStatusUpdateListener&&(null===(t=this.meeting.stage)||void 0===t||t.removeListener("stageStatusUpdate",this.stageStatusUpdateListener)))}async setupAudio(){this.audio=new n(this.meeting,this.preloadedAudioElem);const t=this.meeting.self.getCurrentDevices();null!=t.speaker&&await this.audio.setDevice(t.speaker.deviceId)}async handleAutoPlayError(){this.audio||await this.setupAudio(),this.audio.onError((()=>{this.showPlayDialog=!0})),this.audio.play()}async handleEvents(t){this.audioUpdateListener=({id:t,audioEnabled:i,audioTrack:a})=>{const s=`audio-${t}`;i&&null!=a?this.audio.addTrack(s,a):this.audio.removeTrack(s)};const i=t.participants.joined.toArray();for(const t of i)this.audioUpdateListener(t);this.participantLeftListener=({id:t})=>{this.audio.removeTrack(`audio-${t}`),this.audio.removeTrack(`screenshare-${t}`)},this.screenShareUpdateListener=({id:t,screenShareEnabled:i,screenShareTracks:a})=>{const s=`screenshare-${t}`;i&&null!=a.audio?this.audio.addTrack(s,a.audio):this.audio.removeTrack(s)},this.deviceUpdateListener=({device:t,preview:i})=>{i||"audiooutput"===t.kind&&this.audio.setDevice(t.deviceId)},t.participants.joined.addListener("audioUpdate",this.audioUpdateListener),t.participants.joined.addListener("screenShareUpdate",this.screenShareUpdateListener),t.participants.joined.addListener("participantLeft",this.participantLeftListener),t.self.addListener("deviceUpdate",this.deviceUpdateListener)}async meetingChanged(t){var i;null!=t&&(this.setupAudio(),h(t)?(this.stageStatusUpdateListener=async t=>{"ON_STAGE"===t&&await this.handleAutoPlayError()},null===(i=t.stage)||void 0===i||i.on("stageStatusUpdate",this.stageStatusUpdateListener)):await this.handleAutoPlayError(),await this.handleEvents(t))}render(){return a(s,{key:"5c1ce4b10a43956964e2382e2434784617990be7"},this.showPlayDialog&&a("rtk-dialog",{key:"572cd0cbb7e6919318ed412820cbe9bc0204178c",open:!0,onRtkDialogClose:this.onRtkDialogClose,hideCloseButton:!0,disableEscapeKey:!0,iconPack:this.iconPack,t:this.t},a("div",{key:"3c48ac9420996a4bfc68f80fc982609b7110c5b0",class:"modal"},a("h3",{key:"20e87e695d0782d55a66401df6bbb6cebc8fe5c6"},this.t("audio_playback.title")),a("p",{key:"26c2fa6e74d533c543a286559a5b5b8e0450b220"},this.t("audio_playback.description")),a("rtk-button",{key:"7ac67b115d7ad2db95336c1a1d262ec3378c102d",kind:"wide",onClick:()=>{this.audio.play(),this.onRtkDialogClose()},title:this.t("audio_playback")},this.t("audio_playback")))))}static get watchers(){return{meeting:["meetingChanged"]}}};l([c()],p.prototype,"meeting",void 0),l([c()],p.prototype,"iconPack",void 0),l([c()],p.prototype,"t",void 0),p.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block;overflow-wrap:break-word;color:rgb(var(--rtk-colors-text-1000, 255 255 255));word-wrap:break-word}.modal{box-sizing:border-box;width:100%;max-width:var(--rtk-space-96, 384px);padding:var(--rtk-space-4, 16px);border-radius:var(--rtk-border-radius-md, 8px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity))}.modal h3{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px);font-size:24px;font-weight:500}.modal p{margin-top:var(--rtk-space-4, 16px);margin-bottom:var(--rtk-space-6, 24px)}.modal rtk-button{width:100%}";export{p as rtk_participants_audio}
1
+ import{r as t,c as i,h as a,H as s}from"./p-0ee570cd.js";import{e,a as r,c as o,q as h}from"./p-ee167b96.js";import{l as c}from"./p-5605a420.js";import{S as d}from"./p-2aa242f4.js";class n{constructor(t,i){this.meeting=t,this.audio=null!=i?i:document.createElement("audio"),this.audio.autoplay=!0,this.audioStream=new MediaStream,this.audio.srcObject=this.audioStream,this.audioTracks=[]}addTrack(t,i){this.audioTracks.some((i=>i.id===t))||(this.audioTracks.push({id:t,track:i}),this.audioStream.addTrack(i),this.play())}removeTrack(t){const i=this.audioTracks.find((i=>i.id===t));null!=i&&(this.audioStream.removeTrack(i.track),this.audioTracks=this.audioTracks.filter((i=>i.id!==t)))}async play(){var t;this.audio.srcObject=this.audioStream,await(null===(t=this.audio.play())||void 0===t?void 0:t.catch((t=>{"NotAllowedError"===t.name?null!=this._onError&&this._onError():"AbortError"!==t.name&&c.error("[rtk-audio] play() error\n",t)})))}async setDevice(t){var i,a,s;e(this.meeting)||await(null===(s=null===(a=(i=this.audio).setSinkId)||void 0===a?void 0:a.call(i,t))||void 0===s?void 0:s.catch((t=>{c.error("[rtk-audio] setSinkId() error\n",t)})))}onError(t){this._onError=t}}var l=function(t,i,a,s){var e,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,a):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,a,s);else for(var h=t.length-1;h>=0;h--)(e=t[h])&&(o=(r<3?e(o):r>3?e(i,a,o):e(i,a))||o);return r>3&&o&&Object.defineProperty(i,a,o),o};const p=class{constructor(a){t(this,a),this.dialogClose=i(this,"dialogClose",7),this.iconPack=r,this.t=o(),this.preloadedAudioElem=void 0,this.showPlayDialog=!1,this.onRtkDialogClose=()=>{this.showPlayDialog=!1,this.dialogClose.emit()}}componentDidLoad(){this.meetingChanged(this.meeting)}disconnectedCallback(){var t;null!=this.meeting&&(this.audioUpdateListener&&this.meeting.participants.joined.removeListener("audioUpdate",this.audioUpdateListener),this.screenShareUpdateListener&&this.meeting.participants.joined.removeListener("screenShareUpdate",this.screenShareUpdateListener),this.participantLeftListener&&this.meeting.participants.joined.removeListener("participantLeft",this.participantLeftListener),this.deviceUpdateListener&&this.meeting.self.removeListener("deviceUpdate",this.deviceUpdateListener),this.stageStatusUpdateListener&&(null===(t=this.meeting.stage)||void 0===t||t.removeListener("stageStatusUpdate",this.stageStatusUpdateListener)))}async setupAudio(){this.audio=new n(this.meeting,this.preloadedAudioElem);const t=this.meeting.self.getCurrentDevices();null!=t.speaker&&await this.audio.setDevice(t.speaker.deviceId)}async handleAutoPlayError(){this.audio||await this.setupAudio(),this.audio.onError((()=>{this.showPlayDialog=!0})),this.audio.play()}async handleEvents(t){this.audioUpdateListener=({id:t,audioEnabled:i,audioTrack:a})=>{const s=`audio-${t}`;i&&null!=a?this.audio.addTrack(s,a):this.audio.removeTrack(s)};const i=t.participants.joined.toArray();for(const t of i)this.audioUpdateListener(t);this.participantLeftListener=({id:t})=>{this.audio.removeTrack(`audio-${t}`),this.audio.removeTrack(`screenshare-${t}`)},this.screenShareUpdateListener=({id:t,screenShareEnabled:i,screenShareTracks:a})=>{const s=`screenshare-${t}`;i&&null!=a.audio?this.audio.addTrack(s,a.audio):this.audio.removeTrack(s)},this.deviceUpdateListener=({device:t,preview:i})=>{i||"audiooutput"===t.kind&&this.audio.setDevice(t.deviceId)},t.participants.joined.addListener("audioUpdate",this.audioUpdateListener),t.participants.joined.addListener("screenShareUpdate",this.screenShareUpdateListener),t.participants.joined.addListener("participantLeft",this.participantLeftListener),t.self.addListener("deviceUpdate",this.deviceUpdateListener)}async meetingChanged(t){var i;null!=t&&(this.setupAudio(),h(t)?(this.stageStatusUpdateListener=async t=>{"ON_STAGE"===t&&await this.handleAutoPlayError()},null===(i=t.stage)||void 0===i||i.on("stageStatusUpdate",this.stageStatusUpdateListener)):await this.handleAutoPlayError(),await this.handleEvents(t))}render(){return a(s,{key:"5c1ce4b10a43956964e2382e2434784617990be7"},this.showPlayDialog&&a("rtk-dialog",{key:"572cd0cbb7e6919318ed412820cbe9bc0204178c",open:!0,onRtkDialogClose:this.onRtkDialogClose,hideCloseButton:!0,disableEscapeKey:!0,iconPack:this.iconPack,t:this.t},a("div",{key:"3c48ac9420996a4bfc68f80fc982609b7110c5b0",class:"modal"},a("h3",{key:"20e87e695d0782d55a66401df6bbb6cebc8fe5c6"},this.t("audio_playback.title")),a("p",{key:"26c2fa6e74d533c543a286559a5b5b8e0450b220"},this.t("audio_playback.description")),a("rtk-button",{key:"7ac67b115d7ad2db95336c1a1d262ec3378c102d",kind:"wide",onClick:()=>{this.audio.play(),this.onRtkDialogClose()},title:this.t("audio_playback")},this.t("audio_playback")))))}static get watchers(){return{meeting:["meetingChanged"]}}};l([d()],p.prototype,"meeting",void 0),l([d()],p.prototype,"iconPack",void 0),l([d()],p.prototype,"t",void 0),p.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block;overflow-wrap:break-word;color:rgb(var(--rtk-colors-text-1000, 255 255 255));word-wrap:break-word}.modal{box-sizing:border-box;width:100%;max-width:var(--rtk-space-96, 384px);padding:var(--rtk-space-4, 16px);border-radius:var(--rtk-border-radius-md, 8px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity))}.modal h3{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px);font-size:24px;font-weight:500}.modal p{margin-top:var(--rtk-space-4, 16px);margin-bottom:var(--rtk-space-6, 24px)}.modal rtk-button{width:100%}";export{p as rtk_participants_audio}
@@ -1 +1 @@
1
- import{r as t,c as i,h as s,H as e}from"./p-0ee570cd.js";import{a,c as o}from"./p-b9281511.js";import{S as r}from"./p-a1278d45.js";var n=function(t,i,s,e){var a,o=arguments.length,r=o<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,i,s,e);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(r=(o<3?a(r):o>3?a(i,s,r):a(i,s))||r);return o>3&&r&&Object.defineProperty(i,s,r),r};const c=class{constructor(s){t(this,s),this.stateUpdate=i(this,"rtkStateUpdate",7),this.variant="button",this.iconPack=a,this.t=o(),this.aiActive=!1}statesChanged(t){this.aiActive=t.activeAI}toggleAI(){var t;this.aiActive=!(null===(t=this.states)||void 0===t?void 0:t.activeAI),this.stateUpdate.emit({activeAI:this.aiActive,activeMoreMenu:!1,activeSidebar:!1})}render(){var t,i;const a=this.t("ai.meeting_ai");return(null===(i=null===(t=this.meeting)||void 0===t?void 0:t.self)||void 0===i?void 0:i.permissions).transcriptionEnabled?s(e,{title:a},s("rtk-controlbar-button",{part:"controlbar-button",size:this.size,iconPack:this.iconPack,class:{active:this.aiActive},onClick:()=>this.toggleAI(),icon:this.iconPack.meeting_ai,label:a,variant:this.variant,brandIcon:!0})):s(e,{"data-hidden":!0})}static get watchers(){return{states:["statesChanged"]}}};n([r()],c.prototype,"states",void 0),n([r()],c.prototype,"meeting",void 0),n([r()],c.prototype,"size",void 0),n([r()],c.prototype,"iconPack",void 0),n([r()],c.prototype,"t",void 0),c.style=":host{display:block}:host([data-hidden]){display:none}";export{c as rtk_ai_toggle}
1
+ import{r as t,c as i,h as s,H as e}from"./p-0ee570cd.js";import{a,c as o}from"./p-ee167b96.js";import{S as r}from"./p-2aa242f4.js";var n=function(t,i,s,e){var a,o=arguments.length,r=o<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,i,s,e);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(r=(o<3?a(r):o>3?a(i,s,r):a(i,s))||r);return o>3&&r&&Object.defineProperty(i,s,r),r};const c=class{constructor(s){t(this,s),this.stateUpdate=i(this,"rtkStateUpdate",7),this.variant="button",this.iconPack=a,this.t=o(),this.aiActive=!1}statesChanged(t){this.aiActive=t.activeAI}toggleAI(){var t;this.aiActive=!(null===(t=this.states)||void 0===t?void 0:t.activeAI),this.stateUpdate.emit({activeAI:this.aiActive,activeMoreMenu:!1,activeSidebar:!1})}render(){var t,i;const a=this.t("ai.meeting_ai");return(null===(i=null===(t=this.meeting)||void 0===t?void 0:t.self)||void 0===i?void 0:i.permissions).transcriptionEnabled?s(e,{title:a},s("rtk-controlbar-button",{part:"controlbar-button",size:this.size,iconPack:this.iconPack,class:{active:this.aiActive},onClick:()=>this.toggleAI(),icon:this.iconPack.meeting_ai,label:a,variant:this.variant,brandIcon:!0})):s(e,{"data-hidden":!0})}static get watchers(){return{states:["statesChanged"]}}};n([r()],c.prototype,"states",void 0),n([r()],c.prototype,"meeting",void 0),n([r()],c.prototype,"size",void 0),n([r()],c.prototype,"iconPack",void 0),n([r()],c.prototype,"t",void 0),c.style=":host{display:block}:host([data-hidden]){display:none}";export{c as rtk_ai_toggle}
@@ -1 +1 @@
1
- import{r as o,h as t,H as r}from"./p-0ee570cd.js";import{S as a}from"./p-a1278d45.js";import{a as e}from"./p-b9281511.js";const i=class{constructor(t){o(this,t),this.iconPack=e}render(){return t(r,{key:"3dc48c8a69876a68b038340a948057dd04a5e9ef"},t("div",{key:"1f5a9c5379f882b249dee77376959d9b4de09d0b",class:"tooltip-container"},t("rtk-icon",{key:"cb0232b6e72f565895d3027747f957cba0e4910f",icon:this.iconPack.info,size:"sm"}),t("div",{key:"35a1b7abbb2026badb606444b330fcb239865d9f",class:"tooltip"},t("slot",{key:"3295df905bcd5c10f31d211e74bf7a0e4413dd87",name:"tootlip-text"}))))}};(function(o,t,r,a){var e,i=arguments.length,c=i<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,r):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(o,t,r,a);else for(var p=o.length-1;p>=0;p--)(e=o[p])&&(c=(i<3?e(c):i>3?e(t,r,c):e(t,r))||c);i>3&&c&&Object.defineProperty(t,r,c)})([a()],i.prototype,"iconPack",void 0),i.style=":host{margin-left:var(--rtk-space-2, 8px);margin-right:var(--rtk-space-2, 8px);cursor:pointer}.tooltip-container{position:relative;display:flex;flex-direction:row;align-items:center}.tooltip-container rtk-icon{cursor:pointer;color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52))}.tooltip-container rtk-icon:hover+.tooltip{display:flex !important}.tooltip{position:absolute;margin-left:var(--rtk-space-2, 8px);display:none !important;border-radius:var(--rtk-border-radius-md, 8px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));padding:var(--rtk-space-2, 8px);font-weight:400;color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52));z-index:50;display:flex;min-width:var(--rtk-space-60, 240px);flex-direction:column;--tw-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);left:14px}";export{i as rtk_information_tooltip}
1
+ import{r as o,h as t,H as r}from"./p-0ee570cd.js";import{S as a}from"./p-2aa242f4.js";import{a as e}from"./p-ee167b96.js";const i=class{constructor(t){o(this,t),this.iconPack=e}render(){return t(r,{key:"3dc48c8a69876a68b038340a948057dd04a5e9ef"},t("div",{key:"1f5a9c5379f882b249dee77376959d9b4de09d0b",class:"tooltip-container"},t("rtk-icon",{key:"cb0232b6e72f565895d3027747f957cba0e4910f",icon:this.iconPack.info,size:"sm"}),t("div",{key:"35a1b7abbb2026badb606444b330fcb239865d9f",class:"tooltip"},t("slot",{key:"3295df905bcd5c10f31d211e74bf7a0e4413dd87",name:"tootlip-text"}))))}};(function(o,t,r,a){var e,i=arguments.length,c=i<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,r):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(o,t,r,a);else for(var p=o.length-1;p>=0;p--)(e=o[p])&&(c=(i<3?e(c):i>3?e(t,r,c):e(t,r))||c);i>3&&c&&Object.defineProperty(t,r,c)})([a()],i.prototype,"iconPack",void 0),i.style=":host{margin-left:var(--rtk-space-2, 8px);margin-right:var(--rtk-space-2, 8px);cursor:pointer}.tooltip-container{position:relative;display:flex;flex-direction:row;align-items:center}.tooltip-container rtk-icon{cursor:pointer;color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52))}.tooltip-container rtk-icon:hover+.tooltip{display:flex !important}.tooltip{position:absolute;margin-left:var(--rtk-space-2, 8px);display:none !important;border-radius:var(--rtk-border-radius-md, 8px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));padding:var(--rtk-space-2, 8px);font-weight:400;color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52));z-index:50;display:flex;min-width:var(--rtk-space-60, 240px);flex-direction:column;--tw-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);left:14px}";export{i as rtk_information_tooltip}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e,H as s}from"./p-0ee570cd.js";import{a as o,c as a}from"./p-ee167b96.js";import{S as n}from"./p-2aa242f4.js";var r=function(t,i,e,s){var o,a=arguments.length,n=a<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,i,e,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(n=(a<3?o(n):a>3?o(i,e,n):o(i,e))||n);return a>3&&n&&Object.defineProperty(i,e,n),n};const l=class{constructor(e){t(this,e),this.stateUpdate=i(this,"rtkStateUpdate",7),this.variant="button",this.iconPack=o,this.t=a(),this.canDisable=!1,this.permissionsUpdateListener=()=>{var t;this.canDisable=!!(null===(t=this.meeting)||void 0===t?void 0:t.self.permissions.canDisableParticipantAudio)},this.onMuteAll=()=>{this.stateUpdate.emit({activeMuteAllConfirmation:!0})}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){var t,i,e;null===(e=null===(i=null===(t=this.meeting)||void 0===t?void 0:t.self)||void 0===i?void 0:i.permissions)||void 0===e||e.removeListener("permissionsUpdate",this.permissionsUpdateListener)}meetingChanged(t){t&&(this.canDisable=!!(null==t?void 0:t.self.permissions.canDisableParticipantAudio),t.self.permissions.addListener("permissionsUpdate",this.permissionsUpdateListener))}render(){if(!this.canDisable)return null;const t=this.t("mute_all");return e(s,{title:t},e("rtk-tooltip",{kind:"block",label:t,part:"tooltip"},e("rtk-controlbar-button",{part:"controlbar-button",icon:this.iconPack.speaker_off,label:t,size:this.size,iconPack:this.iconPack,variant:this.variant,onClick:this.onMuteAll})))}static get watchers(){return{meeting:["meetingChanged"]}}};r([n()],l.prototype,"meeting",void 0),r([n()],l.prototype,"size",void 0),r([n()],l.prototype,"iconPack",void 0),r([n()],l.prototype,"t",void 0),l.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block}";export{l as rtk_mute_all_button}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s,H as e}from"./p-0ee570cd.js";import{a,c as n}from"./p-ee167b96.js";import{b as l}from"./p-b16cee89.js";import{S as o}from"./p-2aa242f4.js";var h=function(t,i,s,e){var a,n=arguments.length,l=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,i,s,e);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(l=(n<3?a(l):n>3?a(i,s,l):a(i,s))||l);return n>3&&l&&Object.defineProperty(i,s,l),l};const r=class{constructor(s){t(this,s),this.stateUpdate=i(this,"rtkStateUpdate",7),this.variant="button",this.iconPack=a,this.t=n(),this.pluginsActive=!1,this.canViewPlugins=!1,this.updateCanView=()=>{this.canViewPlugins=l(this.meeting)}}disconnectedCallback(){var t,i,s,e;null===(i=null===(t=this.meeting)||void 0===t?void 0:t.stage)||void 0===i||i.removeListener("stageStatusUpdate",this.updateCanView),null===(e=null===(s=this.meeting)||void 0===s?void 0:s.self)||void 0===e||e.permissions.removeListener("pluginsUpdate",this.updateCanView)}connectedCallback(){this.statesChanged(this.states),this.meetingChanged(this.meeting)}meetingChanged(t){var i,s;null!=t&&(this.canViewPlugins=l(t),null===(i=null==t?void 0:t.stage)||void 0===i||i.on("stageStatusUpdate",this.updateCanView),null===(s=null==t?void 0:t.self)||void 0===s||s.permissions.addListener("pluginsUpdate",this.updateCanView))}statesChanged(t){null!=t&&(this.pluginsActive=!0===t.activeSidebar&&"plugins"===t.sidebar)}togglePlugins(){const t=this.states;this.pluginsActive=!((null==t?void 0:t.activeSidebar)&&"plugins"===(null==t?void 0:t.sidebar)),this.stateUpdate.emit({activeSidebar:this.pluginsActive,sidebar:this.pluginsActive?"plugins":void 0,activeMoreMenu:!1,activeAI:!1})}handlePluginsActiveChange(){this.pluginsActive||this.states.activeSidebar||this.buttonEl.focus()}render(){if(!this.canViewPlugins)return s(e,{"data-hidden":!0});const t=this.t("plugins");return s(e,{title:t},s("rtk-controlbar-button",{ref:t=>this.buttonEl=t,part:"controlbar-button",size:this.size,iconPack:this.iconPack,class:{active:this.pluginsActive},onClick:()=>this.togglePlugins(),icon:this.iconPack.rocket,label:t,variant:this.variant}))}static get watchers(){return{meeting:["meetingChanged"],states:["statesChanged"],pluginsActive:["handlePluginsActiveChange"]}}};h([o()],r.prototype,"meeting",void 0),h([o()],r.prototype,"states",void 0),h([o()],r.prototype,"size",void 0),h([o()],r.prototype,"iconPack",void 0),h([o()],r.prototype,"t",void 0),r.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block}:host([data-hidden]){display:none}";export{r as rtk_plugins_toggle}
@@ -1 +1 @@
1
- import{f as t}from"./p-b9281511.js";const n=t=>{let n=null;try{const e=JSON.parse(t.message),{target:s,message:r}=e;n=void 0===s||void 0===r?t:Object.assign(Object.assign({},t),{targetUserIds:s,message:r})}catch(e){n=t}return n};function e(t,n){return t.localeCompare(n)}function s(t){return t.sort(((t,n)=>t.localeCompare(n))).join("_")}function r(t,n){if(null==t)return!0;for(const e of t)if("file"===e.kind){const t=e.getAsFile();e.type.startsWith("image/")?n("image",t):n("file",t)}}function o({messages:t,participants:e,selfUserId:r}){const o={};for(const t of e)o[s([t.userId,r])]=[];return t.forEach((t=>{var e;const r=n(t);let c="everyone";if((null===(e=r.targetUserIds)||void 0===e?void 0:e.length)>0){const t=new Set([r.userId,...r.targetUserIds]);c=s(Array.from(t))}o[c]||(o[c]=[]),o[c].push({type:"chat",message:r})})),o}function c({messages:n,selfUserId:e,selectedGroupId:s,participants:r}){var c;const a=o({messages:n,selfUserId:e,participants:r}),i={};for(const n in a){const r=null!==(c=t[n])&&void 0!==c?c:0;n===s?(i[n]=0,t[n]=new Date):i[n]=a[n].filter((t=>"chat"==t.type&&t.message.time>r&&t.message.userId!==e)).length}return i}function a({groupId:t,selfUserId:n}){return t.split("_").find((t=>t!=n))}const i="dm__";function u(t){return t.isDirectMessage}function f(t){return[...new Set(t)].sort(e).join("<>")}function l(t){return t.split("").reverse().join("")}const p=/^\*([^*\s]+)\*/,d=/^_([^_\s]+)_/,b=/^~([^~\s]+)~/,g=/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.,~#?&//=]*)/,m=/<blockquote>[.\s\S]*<\/blockquote>\n\n/m;function _(t,n=!1){if(!m.test(t))return"";let e=0,s=13;return n&&(e=12,s=0),t.substring(t.indexOf("<blockquote>")+e,t.indexOf("</blockquote>")+s)}function v(t){return t.replace(m,"")}const q=2e3,I=["<a>","<b>","<i>","<q>","<s>"];function w(t){t=(t=t.split(" ").map((t=>{if(g.test(t)){const n=g.exec(t);t=t.replace(n[0],`<a>${n[0]}</a>`)}else{if(p.test(t)){const n=p.exec(t);t=t.replace(n[0],`<b>${n[1]}</b>`)}if(d.test(t)){const n=d.exec(t);t=t.replace(n[0],`<i>${n[1]}</i>`)}if(b.test(t)){const n=b.exec(t);t=t.replace(n[0],`<s>${n[1]}</s>`)}}return t})).join(" ")).split(" ").map(((t,n)=>">"!==t||0!==n&&">"!==t[n-1]?t:"<q></q>")).join(" ");const[n]=y(t);return n}function y(t,n=""){const e=[];if(0===t.length)return[e,0];let s=0;for(;s<t.length;){if(n.length&&n===t.substring(s,s+n.length))return[e,s+n.length];if(I.includes(t.substring(s,s+3))){const[n,r]=y(t.substring(s+3),`</${t[s+1]}>`);e.push({type:t[s+1],content:1===n.length&&"plain_text"===n[0].type?n[0].content:n}),s+=r+3}else{let n=e[e.length-1];n&&"plain_text"===n.type||(e.push({type:"plain_text",content:""}),n=e[e.length-1]),n.content+=t[s],s++}}return[e,s]}export{q as M,i as T,o as a,c as b,a as c,e as d,f as e,w as f,s as g,r as h,u as i,_ as j,m as k,n as p,l as r,v as s}
1
+ import{f as t}from"./p-ee167b96.js";const n=t=>{let n=null;try{const e=JSON.parse(t.message),{target:s,message:r}=e;n=void 0===s||void 0===r?t:Object.assign(Object.assign({},t),{targetUserIds:s,message:r})}catch(e){n=t}return n};function e(t,n){return t.localeCompare(n)}function s(t){return t.sort(((t,n)=>t.localeCompare(n))).join("_")}function r(t,n){if(null==t)return!0;for(const e of t)if("file"===e.kind){const t=e.getAsFile();e.type.startsWith("image/")?n("image",t):n("file",t)}}function o({messages:t,participants:e,selfUserId:r}){const o={};for(const t of e)o[s([t.userId,r])]=[];return t.forEach((t=>{var e;const r=n(t);let c="everyone";if((null===(e=r.targetUserIds)||void 0===e?void 0:e.length)>0){const t=new Set([r.userId,...r.targetUserIds]);c=s(Array.from(t))}o[c]||(o[c]=[]),o[c].push({type:"chat",message:r})})),o}function c({messages:n,selfUserId:e,selectedGroupId:s,participants:r}){var c;const a=o({messages:n,selfUserId:e,participants:r}),i={};for(const n in a){const r=null!==(c=t[n])&&void 0!==c?c:0;n===s?(i[n]=0,t[n]=new Date):i[n]=a[n].filter((t=>"chat"==t.type&&t.message.time>r&&t.message.userId!==e)).length}return i}function a({groupId:t,selfUserId:n}){return t.split("_").find((t=>t!=n))}const i="dm__";function u(t){return t.isDirectMessage}function f(t){return[...new Set(t)].sort(e).join("<>")}function l(t){return t.split("").reverse().join("")}const p=/^\*([^*\s]+)\*/,d=/^_([^_\s]+)_/,b=/^~([^~\s]+)~/,g=/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.,~#?&//=]*)/,m=/<blockquote>[.\s\S]*<\/blockquote>\n\n/m;function _(t,n=!1){if(!m.test(t))return"";let e=0,s=13;return n&&(e=12,s=0),t.substring(t.indexOf("<blockquote>")+e,t.indexOf("</blockquote>")+s)}function v(t){return t.replace(m,"")}const q=2e3,I=["<a>","<b>","<i>","<q>","<s>"];function w(t){t=(t=t.split(" ").map((t=>{if(g.test(t)){const n=g.exec(t);t=t.replace(n[0],`<a>${n[0]}</a>`)}else{if(p.test(t)){const n=p.exec(t);t=t.replace(n[0],`<b>${n[1]}</b>`)}if(d.test(t)){const n=d.exec(t);t=t.replace(n[0],`<i>${n[1]}</i>`)}if(b.test(t)){const n=b.exec(t);t=t.replace(n[0],`<s>${n[1]}</s>`)}}return t})).join(" ")).split(" ").map(((t,n)=>">"!==t||0!==n&&">"!==t[n-1]?t:"<q></q>")).join(" ");const[n]=y(t);return n}function y(t,n=""){const e=[];if(0===t.length)return[e,0];let s=0;for(;s<t.length;){if(n.length&&n===t.substring(s,s+n.length))return[e,s+n.length];if(I.includes(t.substring(s,s+3))){const[n,r]=y(t.substring(s+3),`</${t[s+1]}>`);e.push({type:t[s+1],content:1===n.length&&"plain_text"===n[0].type?n[0].content:n}),s+=r+3}else{let n=e[e.length-1];n&&"plain_text"===n.type||(e.push({type:"plain_text",content:""}),n=e[e.length-1]),n.content+=t[s],s++}}return[e,s]}export{q as M,i as T,o as a,c as b,a as c,e as d,f as e,w as f,s as g,r as h,u as i,_ as j,m as k,n as p,l as r,v as s}
@@ -1 +1 @@
1
- import{r,h as t,H as a}from"./p-0ee570cd.js";import{c as e}from"./p-b9281511.js";import{C as o}from"./p-0b1fabf5.js";import{s}from"./p-0752f2ba.js";import{S as i}from"./p-a1278d45.js";import{c}from"./p-c15d924f.js";import"./p-338c7261.js";import"./p-46923b34.js";import"./p-2c3cda13.js";var n=function(r,t,a,e){var o,s=arguments.length,i=s<3?t:null===e?e=Object.getOwnPropertyDescriptor(t,a):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(r,t,a,e);else for(var c=r.length-1;c>=0;c--)(o=r[c])&&(i=(s<3?o(i):s>3?o(t,a,i):o(t,a))||i);return s>3&&i&&Object.defineProperty(t,a,i),i};const d=class{constructor(t){r(this,t),this.participantQuery="",this.isProcessing=!1,this.t=e(),this.transcriptions=[],this.autoScrollEnabled=!0,this.onScroll=r=>{const{scrollTop:t,clientHeight:a,scrollHeight:e}=r.target;this.autoScrollEnabled=t+a+10>=e},this.onTranscriptHandler=r=>{this.transcriptions=this.transcriptionsReducer(this.transcriptions,r)}}transcriptionsReducer(r,t){if(!r.length||r[r.length-1].peerId!==t.peerId)return r.concat(t);const a=r[r.length-1];return a.id===t.id?(a.transcript=t.transcript,r.pop(),r.concat(a)):r.concat(t)}connectedCallback(){this.meeting&&this.meetingChanged(this.meeting)}componentDidLoad(){var r;null===(r=this.contentContainer)||void 0===r||r.addEventListener("scroll",this.onScroll)}disconnectedCallback(){var r,t,a;null===(t=null===(r=this.meeting)||void 0===r?void 0:r.ai)||void 0===t||t.off("transcript",this.onTranscriptHandler),null===(a=this.contentContainer)||void 0===a||a.removeEventListener("scroll",this.onScroll)}meetingChanged(r){var t,a;this.transcriptions=c(null===(t=null==r?void 0:r.ai)||void 0===t?void 0:t.transcripts),this.transcriptions=this.transcriptions.reduce(this.transcriptionsReducer,[]),null===(a=null==r?void 0:r.ai)||void 0===a||a.on("transcript",this.onTranscriptHandler)}transcriptionsChanged(){this.autoScrollEnabled&&setTimeout((()=>{s(this.contentContainer,!1)}),100)}renderTranscripts(){const r=this.transcriptions.filter((r=>!this.participantQuery||r.name.toLowerCase().includes(this.participantQuery.toLowerCase()))),a=[];return r.forEach((r=>{const t={name:r.name,date:r.date,peerId:r.peerId,transcript:r.transcript};if(!a.length)return void a.push(t);const e=a[a.length-1];r.peerId===e.peerId?e.transcript+=" "+r.transcript:a.push(t)})),a.map((r=>t("div",{class:"message"},t(o,{name:r.name,time:new Date(r.date),now:new Date}),t("div",{class:"body"},r.transcript))))}render(){return t(a,{key:"12573001a05a586495a63ecd420f99ad04ce780f"},t("div",{key:"2a51f65ba7cd339aee33291c77cdf9f5d69b8f07",class:"search-bar"},t("input",{key:"6cb5505e84ddff6e39c29012752a7309f715505c",type:"text",placeholder:"Search Participant",value:this.participantQuery,onInput:r=>this.participantQuery=r.target.value})),this.isProcessing&&t("div",{key:"b7f1c33aae0d2613e28dc328e5ccfd92ad067576",class:"processing"},t("p",{key:"ae8dc349ff7017a92b9c15e8c8ab051313c07e67"},"Processing audio....")),!this.isProcessing&&t("div",{key:"f5d9e637661b2b10dd323c6b9d6fa7381fd7768c",class:"content scrollbar",ref:r=>this.contentContainer=r},t("div",{key:"a029f8903f82deab573e2372f1c645de98fbc417",class:"started-message"},"Transcription started"),this.renderTranscripts()))}static get watchers(){return{meeting:["meetingChanged"],transcriptions:["transcriptionsChanged"]}}};n([i()],d.prototype,"t",void 0),n([i()],d.prototype,"meeting",void 0),d.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.head{display:flex;align-items:center}.head .name{margin-right:var(--rtk-space-4, 16px);font-size:12px;font-weight:700}.head .time{font-size:12px;color:rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76))}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}*{box-sizing:border-box;border-width:0;border-style:solid}:host{width:100%;display:flex;flex-direction:column}.processing{display:flex;flex:1 1 0%;flex-direction:column;align-items:center;justify-content:center}.content{box-sizing:border-box;display:flex;flex-direction:column;padding:var(--rtk-space-3, 12px);flex:1 0 0px;overflow-y:scroll}.started-message{margin-top:var(--rtk-space-5, 20px);margin-bottom:var(--rtk-space-5, 20px);text-align:center;font-size:12px;color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}.search-bar{height:var(--rtk-space-14, 56px);width:100%;border-bottom-width:var(--rtk-border-width-sm, 1px);--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));padding:var(--rtk-space-3, 12px)}input{height:100%;width:100%;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);font-size:14px;border-radius:var(--rtk-border-radius-sm, 4px);color:rgb(var(--rtk-colors-text-1000, 255 255 255))}.caption-view{height:var(--rtk-space-12, 48px);width:100%;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);padding-top:var(--rtk-space-3, 12px);padding-bottom:var(--rtk-space-3, 12px);border-bottom-width:var(--rtk-border-width-sm, 1px);border-style:solid;--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));display:flex;align-items:center;justify-content:space-between;font-size:14px}.message .body{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);font-size:14px;word-break:break-word}.message{margin-bottom:var(--rtk-space-3, 12px)}.message:last-child{margin-bottom:var(--rtk-space-0, 0px)}";export{d as rtk_ai_transcriptions}
1
+ import{r,h as t,H as a}from"./p-0ee570cd.js";import{c as e}from"./p-ee167b96.js";import{C as o}from"./p-0b1fabf5.js";import{s}from"./p-0752f2ba.js";import{S as i}from"./p-2aa242f4.js";import{c}from"./p-c15d924f.js";import"./p-338c7261.js";import"./p-46923b34.js";import"./p-2c3cda13.js";var n=function(r,t,a,e){var o,s=arguments.length,i=s<3?t:null===e?e=Object.getOwnPropertyDescriptor(t,a):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(r,t,a,e);else for(var c=r.length-1;c>=0;c--)(o=r[c])&&(i=(s<3?o(i):s>3?o(t,a,i):o(t,a))||i);return s>3&&i&&Object.defineProperty(t,a,i),i};const d=class{constructor(t){r(this,t),this.participantQuery="",this.isProcessing=!1,this.t=e(),this.transcriptions=[],this.autoScrollEnabled=!0,this.onScroll=r=>{const{scrollTop:t,clientHeight:a,scrollHeight:e}=r.target;this.autoScrollEnabled=t+a+10>=e},this.onTranscriptHandler=r=>{this.transcriptions=this.transcriptionsReducer(this.transcriptions,r)}}transcriptionsReducer(r,t){if(!r.length||r[r.length-1].peerId!==t.peerId)return r.concat(t);const a=r[r.length-1];return a.id===t.id?(a.transcript=t.transcript,r.pop(),r.concat(a)):r.concat(t)}connectedCallback(){this.meeting&&this.meetingChanged(this.meeting)}componentDidLoad(){var r;null===(r=this.contentContainer)||void 0===r||r.addEventListener("scroll",this.onScroll)}disconnectedCallback(){var r,t,a;null===(t=null===(r=this.meeting)||void 0===r?void 0:r.ai)||void 0===t||t.off("transcript",this.onTranscriptHandler),null===(a=this.contentContainer)||void 0===a||a.removeEventListener("scroll",this.onScroll)}meetingChanged(r){var t,a;this.transcriptions=c(null===(t=null==r?void 0:r.ai)||void 0===t?void 0:t.transcripts),this.transcriptions=this.transcriptions.reduce(this.transcriptionsReducer,[]),null===(a=null==r?void 0:r.ai)||void 0===a||a.on("transcript",this.onTranscriptHandler)}transcriptionsChanged(){this.autoScrollEnabled&&setTimeout((()=>{s(this.contentContainer,!1)}),100)}renderTranscripts(){const r=this.transcriptions.filter((r=>!this.participantQuery||r.name.toLowerCase().includes(this.participantQuery.toLowerCase()))),a=[];return r.forEach((r=>{const t={name:r.name,date:r.date,peerId:r.peerId,transcript:r.transcript};if(!a.length)return void a.push(t);const e=a[a.length-1];r.peerId===e.peerId?e.transcript+=" "+r.transcript:a.push(t)})),a.map((r=>t("div",{class:"message"},t(o,{name:r.name,time:new Date(r.date),now:new Date}),t("div",{class:"body"},r.transcript))))}render(){return t(a,{key:"12573001a05a586495a63ecd420f99ad04ce780f"},t("div",{key:"2a51f65ba7cd339aee33291c77cdf9f5d69b8f07",class:"search-bar"},t("input",{key:"6cb5505e84ddff6e39c29012752a7309f715505c",type:"text",placeholder:"Search Participant",value:this.participantQuery,onInput:r=>this.participantQuery=r.target.value})),this.isProcessing&&t("div",{key:"b7f1c33aae0d2613e28dc328e5ccfd92ad067576",class:"processing"},t("p",{key:"ae8dc349ff7017a92b9c15e8c8ab051313c07e67"},"Processing audio....")),!this.isProcessing&&t("div",{key:"f5d9e637661b2b10dd323c6b9d6fa7381fd7768c",class:"content scrollbar",ref:r=>this.contentContainer=r},t("div",{key:"a029f8903f82deab573e2372f1c645de98fbc417",class:"started-message"},"Transcription started"),this.renderTranscripts()))}static get watchers(){return{meeting:["meetingChanged"],transcriptions:["transcriptionsChanged"]}}};n([i()],d.prototype,"t",void 0),n([i()],d.prototype,"meeting",void 0),d.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.head{display:flex;align-items:center}.head .name{margin-right:var(--rtk-space-4, 16px);font-size:12px;font-weight:700}.head .time{font-size:12px;color:rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76))}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}*{box-sizing:border-box;border-width:0;border-style:solid}:host{width:100%;display:flex;flex-direction:column}.processing{display:flex;flex:1 1 0%;flex-direction:column;align-items:center;justify-content:center}.content{box-sizing:border-box;display:flex;flex-direction:column;padding:var(--rtk-space-3, 12px);flex:1 0 0px;overflow-y:scroll}.started-message{margin-top:var(--rtk-space-5, 20px);margin-bottom:var(--rtk-space-5, 20px);text-align:center;font-size:12px;color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}.search-bar{height:var(--rtk-space-14, 56px);width:100%;border-bottom-width:var(--rtk-border-width-sm, 1px);--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));padding:var(--rtk-space-3, 12px)}input{height:100%;width:100%;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);font-size:14px;border-radius:var(--rtk-border-radius-sm, 4px);color:rgb(var(--rtk-colors-text-1000, 255 255 255))}.caption-view{height:var(--rtk-space-12, 48px);width:100%;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);padding-top:var(--rtk-space-3, 12px);padding-bottom:var(--rtk-space-3, 12px);border-bottom-width:var(--rtk-border-width-sm, 1px);border-style:solid;--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));display:flex;align-items:center;justify-content:space-between;font-size:14px}.message .body{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);font-size:14px;word-break:break-word}.message{margin-bottom:var(--rtk-space-3, 12px)}.message:last-child{margin-bottom:var(--rtk-space-0, 0px)}";export{d as rtk_ai_transcriptions}
@@ -1 +1 @@
1
- import{r as n,c as t,h as e,H as a}from"./p-0ee570cd.js";import{S as r}from"./p-a1278d45.js";import{a as o,c as i}from"./p-b9281511.js";const s=class{constructor(e){n(this,e),this.tabChange=t(this,"tabChange",7),this.sidebarClose=t(this,"sidebarClose",7),this.view="sidebar",this.tabs=[],this.hideHeader=!1,this.hideCloseAction=!1,this.iconPack=o,this.focusCloseButton=!0,this.t=i(),this.onClose=()=>{this.sidebarClose.emit()}}componentDidLoad(){this.keydownListener=n=>{"Escape"===n.key&&this.onClose()},this.hostEl.addEventListener("keydown",this.keydownListener),this.handleFocusCloseButton()}handleFocusCloseButton(){"chat"===this.currentTab||this.hideCloseAction||this.closeButton.focus()}disconnectedCallback(){this.hostEl.removeEventListener("keydown",this.keydownListener)}render(){const n="full-screen"===this.view,t=this.tabs.find((n=>n.id===this.currentTab));return e(a,{key:"4afc881e8aeb5f51014817e1287aed7700bb56fb",ref:n=>this.hostEl=n,class:this.view},!this.hideCloseAction&&e("rtk-button",{key:"e95b2c25d32535630e0ccf30b46f067395c41a7f",ref:n=>this.closeButton=n,variant:"ghost",kind:"icon",class:"close",onClick:this.onClose,"aria-label":this.t("close")},e("rtk-icon",{key:"0d6398171fbebd8d9b0895fc2e9f0b08e7980ab2",icon:this.iconPack.dismiss})),t&&!this.hideHeader&&e("header",{key:"e92a6c60fa280a36b4643873d48adca3210e3c51",class:"main-header"},e("h3",{key:"8097b3e815c3005c7750c7076eb54242406034a9"},t.name),e("slot",{key:"f91814a6fb62726790ae5c91111be0f6d1ea121c",name:"pinned-state"})),n&&e("header",{key:"5ec434bbc22ffa7acf8a76361e02718080c7a99d",class:"mobile-tabs"},this.tabs.map((n=>e("button",{onClick:()=>{this.tabChange.emit(n.id)},class:{active:this.currentTab===n.id}},n.name)))),e("slot",{key:"77ee9da399e6991cc7bf3e0d979ffeec47e4b769",name:this.currentTab}))}static get watchers(){return{currentTab:["handleFocusCloseButton"]}}};(function(n,t,e,a){var r,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,e):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(n,t,e,a);else for(var s=n.length-1;s>=0;s--)(r=n[s])&&(i=(o<3?r(i):o>3?r(t,e,i):r(t,e))||i);o>3&&i&&Object.defineProperty(t,e,i)})([r()],s.prototype,"t",void 0),s.style=":host {\n line-height: initial;\n font-family: var(--rtk-font-family, sans-serif);\n\n font-feature-settings: normal;\n font-variation-settings: normal;\n}\n\np {\n margin: var(--rtk-space-0, 0px);\n padding: var(--rtk-space-0, 0px);\n}\n\n\n:host {\n position: relative;\n height: 100%;\n width: 100%;\n font-family: var(--rtk-font-family, sans-serif);\n z-index: 50;\n display: flex;\n flex-direction: column;\n\n container-type: size;\n container-name: sidebarui;\n}\n\n@container sidebarui (height < 370px) {\n .main-header {\n height: var(--rtk-space-8, 32px) !important;\n }\n .close {\n top: var(--rtk-space-0\\.5, 2px) !important;\n left: var(--rtk-space-0, 0px) !important;\n color: rgba(var(--rtk-colors-danger, 255 45 45) / 0.6);\n }\n}\n\n:host([view='sidebar']) {\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));\n}\n\n:host([view='full-screen']) {\n position: absolute;\n top: var(--rtk-space-0, 0px);\n right: var(--rtk-space-0, 0px);\n bottom: var(--rtk-space-0, 0px);\n left: var(--rtk-space-0, 0px);\n max-width: 100%;\n border: none;\n}\n\n::slotted(*) {\n flex-grow: 1;\n}\n\n.close {\n position: absolute;\n top: var(--rtk-space-2, 8px);\n left: var(--rtk-space-2, 8px);\n z-index: 10;\n}\n\n.main-header {\n position: relative;\n display: flex;\n height: var(--rtk-space-12, 48px);\n place-items: center;\n justify-content: center;\n}\n\n.main-header, \n.mobile-tabs {\n flex-shrink: 0;\n}\n\n.mobile-tabs {\n display: flex;\n place-items: center;\n justify-content: space-evenly;\n border-bottom: 1px solid rgb(var(--rtk-colors-background-700, 44 44 44));\n}\n\n.mobile-tabs button {\n margin: var(--rtk-space-0, 0px);\n border-width: var(--rtk-border-width-none, 0);\n border-style: none;\n background-color: transparent;\n padding: var(--rtk-space-0, 0px);\n color: rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52));\n height: var(--rtk-space-10, 40px);\n cursor: pointer;\n padding-left: var(--rtk-space-4, 16px);\n padding-right: var(--rtk-space-4, 16px);\n font-weight: 500;\n border-bottom: 1px solid transparent;\n}\n\n.mobile-tabs button.active {\n --tw-border-opacity: 1;\n border-color: rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-border-opacity));\n --tw-text-opacity: 1;\n color: rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-text-opacity));\n}\n\nheader h3 {\n font-size: 14px;\n font-weight: 500;\n}\n\n@media only screen and (max-device-height: 480px) and (orientation: landscape) {\n .main-header {\n display: none !important;\n }\n}\n\n.tab-participant-count-badge {\n display: inline-block;\n padding: 2px 5px;\n border-radius: 9999px;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));\n font-size: 12px;\n color: rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64));\n}\n\n.tab-participant-count-badge:not(.selected-tab) {\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));\n}\n\n.tab-participant-count-badge.requests-pending{\n background-color: rgba(var(--rtk-colors-danger));\n}\n";export{s as rtk_sidebar_ui}
1
+ import{r as n,c as t,h as e,H as a}from"./p-0ee570cd.js";import{S as r}from"./p-2aa242f4.js";import{a as o,c as i}from"./p-ee167b96.js";const s=class{constructor(e){n(this,e),this.tabChange=t(this,"tabChange",7),this.sidebarClose=t(this,"sidebarClose",7),this.view="sidebar",this.tabs=[],this.hideHeader=!1,this.hideCloseAction=!1,this.iconPack=o,this.focusCloseButton=!0,this.t=i(),this.onClose=()=>{this.sidebarClose.emit()}}componentDidLoad(){this.keydownListener=n=>{"Escape"===n.key&&this.onClose()},this.hostEl.addEventListener("keydown",this.keydownListener),this.handleFocusCloseButton()}handleFocusCloseButton(){"chat"===this.currentTab||this.hideCloseAction||this.closeButton.focus()}disconnectedCallback(){this.hostEl.removeEventListener("keydown",this.keydownListener)}render(){const n="full-screen"===this.view,t=this.tabs.find((n=>n.id===this.currentTab));return e(a,{key:"4afc881e8aeb5f51014817e1287aed7700bb56fb",ref:n=>this.hostEl=n,class:this.view},!this.hideCloseAction&&e("rtk-button",{key:"e95b2c25d32535630e0ccf30b46f067395c41a7f",ref:n=>this.closeButton=n,variant:"ghost",kind:"icon",class:"close",onClick:this.onClose,"aria-label":this.t("close")},e("rtk-icon",{key:"0d6398171fbebd8d9b0895fc2e9f0b08e7980ab2",icon:this.iconPack.dismiss})),t&&!this.hideHeader&&e("header",{key:"e92a6c60fa280a36b4643873d48adca3210e3c51",class:"main-header"},e("h3",{key:"8097b3e815c3005c7750c7076eb54242406034a9"},t.name),e("slot",{key:"f91814a6fb62726790ae5c91111be0f6d1ea121c",name:"pinned-state"})),n&&e("header",{key:"5ec434bbc22ffa7acf8a76361e02718080c7a99d",class:"mobile-tabs"},this.tabs.map((n=>e("button",{onClick:()=>{this.tabChange.emit(n.id)},class:{active:this.currentTab===n.id}},n.name)))),e("slot",{key:"77ee9da399e6991cc7bf3e0d979ffeec47e4b769",name:this.currentTab}))}static get watchers(){return{currentTab:["handleFocusCloseButton"]}}};(function(n,t,e,a){var r,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,e):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(n,t,e,a);else for(var s=n.length-1;s>=0;s--)(r=n[s])&&(i=(o<3?r(i):o>3?r(t,e,i):r(t,e))||i);o>3&&i&&Object.defineProperty(t,e,i)})([r()],s.prototype,"t",void 0),s.style=":host {\n line-height: initial;\n font-family: var(--rtk-font-family, sans-serif);\n\n font-feature-settings: normal;\n font-variation-settings: normal;\n}\n\np {\n margin: var(--rtk-space-0, 0px);\n padding: var(--rtk-space-0, 0px);\n}\n\n\n:host {\n position: relative;\n height: 100%;\n width: 100%;\n font-family: var(--rtk-font-family, sans-serif);\n z-index: 50;\n display: flex;\n flex-direction: column;\n\n container-type: size;\n container-name: sidebarui;\n}\n\n@container sidebarui (height < 370px) {\n .main-header {\n height: var(--rtk-space-8, 32px) !important;\n }\n .close {\n top: var(--rtk-space-0\\.5, 2px) !important;\n left: var(--rtk-space-0, 0px) !important;\n color: rgba(var(--rtk-colors-danger, 255 45 45) / 0.6);\n }\n}\n\n:host([view='sidebar']) {\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));\n}\n\n:host([view='full-screen']) {\n position: absolute;\n top: var(--rtk-space-0, 0px);\n right: var(--rtk-space-0, 0px);\n bottom: var(--rtk-space-0, 0px);\n left: var(--rtk-space-0, 0px);\n max-width: 100%;\n border: none;\n}\n\n::slotted(*) {\n flex-grow: 1;\n}\n\n.close {\n position: absolute;\n top: var(--rtk-space-2, 8px);\n left: var(--rtk-space-2, 8px);\n z-index: 10;\n}\n\n.main-header {\n position: relative;\n display: flex;\n height: var(--rtk-space-12, 48px);\n place-items: center;\n justify-content: center;\n}\n\n.main-header, \n.mobile-tabs {\n flex-shrink: 0;\n}\n\n.mobile-tabs {\n display: flex;\n place-items: center;\n justify-content: space-evenly;\n border-bottom: 1px solid rgb(var(--rtk-colors-background-700, 44 44 44));\n}\n\n.mobile-tabs button {\n margin: var(--rtk-space-0, 0px);\n border-width: var(--rtk-border-width-none, 0);\n border-style: none;\n background-color: transparent;\n padding: var(--rtk-space-0, 0px);\n color: rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52));\n height: var(--rtk-space-10, 40px);\n cursor: pointer;\n padding-left: var(--rtk-space-4, 16px);\n padding-right: var(--rtk-space-4, 16px);\n font-weight: 500;\n border-bottom: 1px solid transparent;\n}\n\n.mobile-tabs button.active {\n --tw-border-opacity: 1;\n border-color: rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-border-opacity));\n --tw-text-opacity: 1;\n color: rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-text-opacity));\n}\n\nheader h3 {\n font-size: 14px;\n font-weight: 500;\n}\n\n@media only screen and (max-device-height: 480px) and (orientation: landscape) {\n .main-header {\n display: none !important;\n }\n}\n\n.tab-participant-count-badge {\n display: inline-block;\n padding: 2px 5px;\n border-radius: 9999px;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));\n font-size: 12px;\n color: rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64));\n}\n\n.tab-participant-count-badge:not(.selected-tab) {\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));\n}\n\n.tab-participant-count-badge.requests-pending{\n background-color: rgba(var(--rtk-colors-danger));\n}\n";export{s as rtk_sidebar_ui}
@@ -1 +1 @@
1
- import{q as r}from"./p-b9281511.js";const t=r=>{if(r&&!r.chat)return!1;const{chatPublic:t,chatPrivate:n}=r.self.permissions;return t.canSend||t.canReceive||t.text||t.files||n.canSend||n.canReceive||n.files||n.text},n=r=>{if(r&&!r.polls)return!1;const{polls:t}=r.self.permissions;return t.canCreate||t.canView||t.canVote},u=r=>{var t;if(!(null===(t=r.self.permissions)||void 0===t?void 0:t.showParticipantList))return!1;if(r&&!r.participants)return!1;const n=null==r?void 0:r.self.config;return!(n&&!n.controlBar.elements.participants)},i=t=>{if(r(t))return!1;if(t&&!t.plugins)return!1;if("LIVESTREAM"===t.meta.viewType)return"ON_STAGE"===t.stage.status;const{plugins:n}=t.self.permissions;return n.canClose||n.canStart};export{u as a,i as b,t as c,n as d}
1
+ import{q as r}from"./p-ee167b96.js";const t=r=>{if(r&&!r.chat)return!1;const{chatPublic:t,chatPrivate:n}=r.self.permissions;return t.canSend||t.canReceive||t.text||t.files||n.canSend||n.canReceive||n.files||n.text},n=r=>{if(r&&!r.polls)return!1;const{polls:t}=r.self.permissions;return t.canCreate||t.canView||t.canVote},e=r=>{var t;if(!(null===(t=r.self.permissions)||void 0===t?void 0:t.showParticipantList))return!1;if(r&&!r.participants)return!1;const n=null==r?void 0:r.self.config;return!(n&&!n.controlBar.elements.participants)},u=t=>{if(r(t))return!1;if(t&&!t.plugins)return!1;if("LIVESTREAM"===t.meta.viewType)return"ON_STAGE"===t.stage.status;const{plugins:n}=t.self.permissions;return n.canClose||n.canStart};export{e as a,u as b,t as c,n as d}
@@ -1 +1 @@
1
- import{r as t,w as s,h as i}from"./p-0ee570cd.js";import{a as r}from"./p-b9281511.js";import{S as e}from"./p-a1278d45.js";import{d as h}from"./p-a08b5a59.js";import"./p-2c3cda13.js";const a=class{constructor(i){t(this,i),this.visibleItemsCount=20,this.estimateItemSize=100,this.iconPack=r,this.isFetching=!1,this.autoScroll=!0,this.totalHeight=0,this.sizes=new Map,this.lastScrollTop=0,this.scrollToBottomRetries=0,this.elementObserver=(()=>{let t=null;const s=()=>t||("undefined"!=typeof ResizeObserver?t=new ResizeObserver((t=>{t.forEach((t=>{this.measureElement(t.target,t)}))})):null);return{disconnect:()=>{var t;return null===(t=s())||void 0===t?void 0:t.disconnect()},observe:t=>{var i;return null===(i=s())||void 0===i?void 0:i.observe(t,{box:"border-box"})},unobserve:t=>{var i;return null===(i=s())||void 0===i?void 0:i.unobserve(t)}}})(),this.measureElement=(t,s)=>{if(!t)return;const i=t.dataset.id;if(this.sizes.has(i))return void this.elementObserver.unobserve(t);if(s){const r=s.borderBoxSize[0];if(r&&r.blockSize>0)return this.saveItemSize(i,r.blockSize),void this.elementObserver.unobserve(t)}const r=t.getBoundingClientRect();r.height>0&&this.saveItemSize(i,r.height)},this.getVisibleItems=()=>this.messages.slice(this.range.start,this.range.end+1),this.updateVisibleItems=(t,s)=>{const i=this.messages.length;let r=t,e=s;i<=this.visibleItemsCount?(r=0,e=i-1):s-t<this.visibleItemsCount-1&&(r=this.range.end-this.visibleItemsCount+1),this.range.start!==r&&(this.range={start:r,end:e},this.totalHeight=this.getRangeSize(0,i))},this.getEstimatedItemSize=()=>this.estimateItemSize,this.getRangeSize=(t,s)=>{let i=0,r=0;for(let e=t;e<s;e++)r=this.sizes.get(this.messages[e].id),i+=r||this.getEstimatedItemSize();return i},this.getScrollTop=()=>this.$listRef?Math.ceil(this.$listRef.scrollTop):0,this.getClientHeight=()=>this.$listRef?Math.ceil(this.$listRef.clientHeight):0,this.getScrollHeight=()=>this.$listRef?Math.ceil(this.$listRef.scrollHeight):0,this.getItemsScrolled=()=>{const t=this.lastScrollTop;if(t<=0)return 0;let s=0,i=0,r=0,e=this.messages.length;for(;s<=e;){if(i=s+e>>>1,r=this.getRangeSize(0,i),r===t)return i;r<t?s=i+1:r>t&&(e=i-1)}return s>0?--s:0},this.getEndByStart=t=>Math.min(t+this.visibleItemsCount,this.messages.length-1),this.scrollToOffset=t=>{this.$listRef&&(this.$listRef.scrollTop=t)},this.scrollToIndex=t=>{if(t>=this.messages.length-1)this.scrollToBottom();else{const s=t<1?0:this.getRangeSize(0,t);this.scrollToOffset(s)}},this.scrollToBottom=()=>{this.$listEndRef&&s((()=>{this.$listEndRef.scrollIntoView(),this.getScrollHeight()-(this.getScrollTop()+this.getClientHeight())>0&&this.scrollToBottomRetries<10?setTimeout((()=>{this.scrollToBottom()}),1e3/60):(this.scrollToBottomRetries=0,this.autoScroll=!0)}))},this.handleScroll=async()=>{if(this.isFetching)return;const t=this.getScrollTop(),s=t<this.lastScrollTop||0===t?"UP":"DOWN";if(this.lastScrollTop=t,this.loadMore&&0===t&&"UP"===s&&!1===this.isFetching){this.isFetching=!0;const t=await this.loadMore(this.messages[0]);t&&t.length&&(this.messages=[...t,...this.messages]),this.isFetching=!1}"UP"===s?this.handleTop():"DOWN"===s&&this.handleBottom()},this.handleTop=()=>{const t=this.getItemsScrolled();if(t<=this.range.end-5&&(this.autoScroll=!1),t>this.range.start+5)return;const s=Math.max(this.range.start-5,0);this.updateVisibleItems(s,this.getEndByStart(s))},this.handleBottom=()=>{if(this.getItemsScrolled()<this.range.start+5)return;const t=this.range.start+5,s=this.getEndByStart(t);this.updateVisibleItems(s===this.messages.length-1?s-this.visibleItemsCount:t,s)},this.updateTotalHeight=h((()=>{this.totalHeight=this.getRangeSize(0,this.messages.length)}),1e3/30,{leading:!0}),this.rendererInternal=(t,s,i)=>{if(!t)return;if(t.dataset.id===s.id)return;const r=this.renderer(s,i);t.hasChildNodes&&(t.innerHTML=""),this.elementObserver.observe(t),t.dataset.id=s.id,t.appendChild(r)}}connectedCallback(){const t=this.messages.length-1;this.range={start:t-this.visibleItemsCount,end:t},this.updateVisibleItems(this.range.start,this.range.end),this.totalHeight=this.getRangeSize(0,t)}componentDidLoad(){this.autoScroll&&this.scrollToBottom()}messagesUpdated(t,s){if(t.length>s.length){const i=t.length-s.length;this.updateVisibleItems(i,this.getEndByStart(i)),this.scrollToIndex(this.range.start)}}saveItemSize(t,s){this.sizes.set(t,Math.round(s)),this.updateTotalHeight()}render(){return i("div",{key:"0bd9791d55b2c7b17e0f2165815d592e400612b6",class:"scrollbar content-wrapper",ref:t=>this.$listRef=t,onScroll:this.handleScroll},i("div",{key:"b255bce421935f065862a6a3a34e9ae588c936cd",class:"scroller"},i("div",{key:"3eab5b317790b234f1a5c1935d7b8bf4d48620eb",style:{height:`${this.totalHeight}px`}}),i("div",{key:"47d070acc6cdd5e5cdd146594dbcb53906e5fc37",class:"smallest-dom-element",id:"list-end",ref:t=>this.$listEndRef=t})),i("div",{key:"348ec8b65c0f76146f6ab65cbda80057dde6d93d",class:"content",style:{transform:`translateY(${this.getRangeSize(0,this.range.start)}px)`}},this.isFetching&&i("div",{key:"100d528dae04469574a6c908ba4e0159d61a928f",class:"loader"},i("rtk-spinner",{key:"a3a7cc932bd40b71bf67d9bb95cb7cdd8e36696f",size:"md"})),this.getVisibleItems().map(((t,s)=>i("div",{key:t.id,ref:i=>this.rendererInternal(i,t,s)})))))}static get watchers(){return{messages:["messagesUpdated"]}}};(function(t,s,i,r){var e,h=arguments.length,a=h<3?s:null===r?r=Object.getOwnPropertyDescriptor(s,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,s,i,r);else for(var o=t.length-1;o>=0;o--)(e=t[o])&&(a=(h<3?e(a):h>3?e(s,i,a):e(s,i))||a);h>3&&a&&Object.defineProperty(s,i,a)})([e()],a.prototype,"iconPack",void 0),a.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}.loading{cursor:wait}.content-wrapper{height:100%;overflow-y:auto;position:relative;contain:strict}.scroller{width:1px;opacity:0}.content{position:absolute;top:0;width:100%}.smallest-dom-element{width:100%;height:2px;background:red}.loader{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);display:flex;justify-content:center}";export{a as rtk_message_list_view}
1
+ import{r as t,w as s,h as i}from"./p-0ee570cd.js";import{a as r}from"./p-ee167b96.js";import{S as e}from"./p-2aa242f4.js";import{d as h}from"./p-a08b5a59.js";import"./p-2c3cda13.js";const a=class{constructor(i){t(this,i),this.visibleItemsCount=20,this.estimateItemSize=100,this.iconPack=r,this.isFetching=!1,this.autoScroll=!0,this.totalHeight=0,this.sizes=new Map,this.lastScrollTop=0,this.scrollToBottomRetries=0,this.elementObserver=(()=>{let t=null;const s=()=>t||("undefined"!=typeof ResizeObserver?t=new ResizeObserver((t=>{t.forEach((t=>{this.measureElement(t.target,t)}))})):null);return{disconnect:()=>{var t;return null===(t=s())||void 0===t?void 0:t.disconnect()},observe:t=>{var i;return null===(i=s())||void 0===i?void 0:i.observe(t,{box:"border-box"})},unobserve:t=>{var i;return null===(i=s())||void 0===i?void 0:i.unobserve(t)}}})(),this.measureElement=(t,s)=>{if(!t)return;const i=t.dataset.id;if(this.sizes.has(i))return void this.elementObserver.unobserve(t);if(s){const r=s.borderBoxSize[0];if(r&&r.blockSize>0)return this.saveItemSize(i,r.blockSize),void this.elementObserver.unobserve(t)}const r=t.getBoundingClientRect();r.height>0&&this.saveItemSize(i,r.height)},this.getVisibleItems=()=>this.messages.slice(this.range.start,this.range.end+1),this.updateVisibleItems=(t,s)=>{const i=this.messages.length;let r=t,e=s;i<=this.visibleItemsCount?(r=0,e=i-1):s-t<this.visibleItemsCount-1&&(r=this.range.end-this.visibleItemsCount+1),this.range.start!==r&&(this.range={start:r,end:e},this.totalHeight=this.getRangeSize(0,i))},this.getEstimatedItemSize=()=>this.estimateItemSize,this.getRangeSize=(t,s)=>{let i=0,r=0;for(let e=t;e<s;e++)r=this.sizes.get(this.messages[e].id),i+=r||this.getEstimatedItemSize();return i},this.getScrollTop=()=>this.$listRef?Math.ceil(this.$listRef.scrollTop):0,this.getClientHeight=()=>this.$listRef?Math.ceil(this.$listRef.clientHeight):0,this.getScrollHeight=()=>this.$listRef?Math.ceil(this.$listRef.scrollHeight):0,this.getItemsScrolled=()=>{const t=this.lastScrollTop;if(t<=0)return 0;let s=0,i=0,r=0,e=this.messages.length;for(;s<=e;){if(i=s+e>>>1,r=this.getRangeSize(0,i),r===t)return i;r<t?s=i+1:r>t&&(e=i-1)}return s>0?--s:0},this.getEndByStart=t=>Math.min(t+this.visibleItemsCount,this.messages.length-1),this.scrollToOffset=t=>{this.$listRef&&(this.$listRef.scrollTop=t)},this.scrollToIndex=t=>{if(t>=this.messages.length-1)this.scrollToBottom();else{const s=t<1?0:this.getRangeSize(0,t);this.scrollToOffset(s)}},this.scrollToBottom=()=>{this.$listEndRef&&s((()=>{this.$listEndRef.scrollIntoView(),this.getScrollHeight()-(this.getScrollTop()+this.getClientHeight())>0&&this.scrollToBottomRetries<10?setTimeout((()=>{this.scrollToBottom()}),1e3/60):(this.scrollToBottomRetries=0,this.autoScroll=!0)}))},this.handleScroll=async()=>{if(this.isFetching)return;const t=this.getScrollTop(),s=t<this.lastScrollTop||0===t?"UP":"DOWN";if(this.lastScrollTop=t,this.loadMore&&0===t&&"UP"===s&&!1===this.isFetching){this.isFetching=!0;const t=await this.loadMore(this.messages[0]);t&&t.length&&(this.messages=[...t,...this.messages]),this.isFetching=!1}"UP"===s?this.handleTop():"DOWN"===s&&this.handleBottom()},this.handleTop=()=>{const t=this.getItemsScrolled();if(t<=this.range.end-5&&(this.autoScroll=!1),t>this.range.start+5)return;const s=Math.max(this.range.start-5,0);this.updateVisibleItems(s,this.getEndByStart(s))},this.handleBottom=()=>{if(this.getItemsScrolled()<this.range.start+5)return;const t=this.range.start+5,s=this.getEndByStart(t);this.updateVisibleItems(s===this.messages.length-1?s-this.visibleItemsCount:t,s)},this.updateTotalHeight=h((()=>{this.totalHeight=this.getRangeSize(0,this.messages.length)}),1e3/30,{leading:!0}),this.rendererInternal=(t,s,i)=>{if(!t)return;if(t.dataset.id===s.id)return;const r=this.renderer(s,i);t.hasChildNodes&&(t.innerHTML=""),this.elementObserver.observe(t),t.dataset.id=s.id,t.appendChild(r)}}connectedCallback(){const t=this.messages.length-1;this.range={start:t-this.visibleItemsCount,end:t},this.updateVisibleItems(this.range.start,this.range.end),this.totalHeight=this.getRangeSize(0,t)}componentDidLoad(){this.autoScroll&&this.scrollToBottom()}messagesUpdated(t,s){if(t.length>s.length){const i=t.length-s.length;this.updateVisibleItems(i,this.getEndByStart(i)),this.scrollToIndex(this.range.start)}}saveItemSize(t,s){this.sizes.set(t,Math.round(s)),this.updateTotalHeight()}render(){return i("div",{key:"0bd9791d55b2c7b17e0f2165815d592e400612b6",class:"scrollbar content-wrapper",ref:t=>this.$listRef=t,onScroll:this.handleScroll},i("div",{key:"b255bce421935f065862a6a3a34e9ae588c936cd",class:"scroller"},i("div",{key:"3eab5b317790b234f1a5c1935d7b8bf4d48620eb",style:{height:`${this.totalHeight}px`}}),i("div",{key:"47d070acc6cdd5e5cdd146594dbcb53906e5fc37",class:"smallest-dom-element",id:"list-end",ref:t=>this.$listEndRef=t})),i("div",{key:"348ec8b65c0f76146f6ab65cbda80057dde6d93d",class:"content",style:{transform:`translateY(${this.getRangeSize(0,this.range.start)}px)`}},this.isFetching&&i("div",{key:"100d528dae04469574a6c908ba4e0159d61a928f",class:"loader"},i("rtk-spinner",{key:"a3a7cc932bd40b71bf67d9bb95cb7cdd8e36696f",size:"md"})),this.getVisibleItems().map(((t,s)=>i("div",{key:t.id,ref:i=>this.rendererInternal(i,t,s)})))))}static get watchers(){return{messages:["messagesUpdated"]}}};(function(t,s,i,r){var e,h=arguments.length,a=h<3?s:null===r?r=Object.getOwnPropertyDescriptor(s,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,s,i,r);else for(var o=t.length-1;o>=0;o--)(e=t[o])&&(a=(h<3?e(a):h>3?e(s,i,a):e(s,i))||a);h>3&&a&&Object.defineProperty(s,i,a)})([e()],a.prototype,"iconPack",void 0),a.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}.loading{cursor:wait}.content-wrapper{height:100%;overflow-y:auto;position:relative;contain:strict}.scroller{width:1px;opacity:0}.content{position:absolute;top:0;width:100%}.smallest-dom-element{width:100%;height:2px;background:red}.loader{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);display:flex;justify-content:center}";export{a as rtk_message_list_view}
@@ -1 +1 @@
1
- import{r as t,c as i,h as s,H as e}from"./p-0ee570cd.js";import{d as a,a as n,c as r,q as h,l as o}from"./p-b9281511.js";import{d as p}from"./p-cbdd7a99.js";import{R as c}from"./p-c8eaa707.js";import{S as l}from"./p-a1278d45.js";import{d}from"./p-b13ddb7d.js";var g=function(t,i,s,e){var a,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,i,s,e);else for(var h=t.length-1;h>=0;h--)(a=t[h])&&(r=(n<3?a(r):n>3?a(i,s,r):a(i,s))||r);return n>3&&r&&Object.defineProperty(i,s,r),r};const v=class{constructor(s){t(this,s),this.stateUpdate=i(this,"rtkStateUpdate",7),this.hideSelf=!1,this.participants=[],this.pinnedParticipants=[],this.screenShareParticipants=[],this.plugins=[],this.emptyStage=!1,this.showLiveStreamPlayer=!1,this.canCurrentPeerHost=!1,this.pipSupported=!1,this.pipEnabled=!1,this.hidden=!1,this.layout="row",this.aspectRatio="16:9",this.gap=8,this.config=a,this.iconPack=n,this.t=r(),this.gridSize=d,this.overrides={},this.invalidRoomStates=["init","waitlisted","ended","kicked","rejected"],this.filterParticipants=t=>{var i;if(this.overrides&&(null===(i=this.overrides)||void 0===i?void 0:i.videoUnsubscribed)){const i=this.overrides.videoUnsubscribed.preset;i.length>0&&(t=t.filter((t=>!i.some((i=>void 0!==t.presetName&&t.presetName.match(i))))))}return t},this.onViewModeChanged=()=>{null!=this.meeting&&this.updateActiveParticipants()},this.onParticipantJoined=p((()=>{this.updateActiveParticipants()}),50),this.onParticipantLeft=p((()=>{this.updateActiveParticipants()}),50),this.stageStatusListener=()=>{this.updateActiveParticipants(),this.showLiveStreamPlayer=h(this.meeting),"ON_STAGE"!==this.meeting.stage.status&&this.removeScreenShare(this.meeting.self)},this.peerStageStatusListener=t=>{this.updateActiveParticipants(),"ON_STAGE"!==this.meeting.stage.status&&(this.removePinned(t),this.removeScreenShare(t))},this.onScreenShareUpdate=t=>{t.screenShareEnabled?this.addScreenShare(t):this.removeScreenShare(t)},this.onSelfScreenShareUpdate=({screenShareEnabled:t})=>{t?this.addScreenShare(this.meeting.self):this.removeScreenShare(this.meeting.self)},this.toggleTileListener=({hidden:t})=>{this.hidden=t,this.updateActiveParticipants()},this.onPluginStateUpdate=(t,{active:i})=>{i?this.plugins.some((i=>i.id===t.id))||(this.plugins=[...this.plugins,t]):this.plugins=this.plugins.filter((i=>i.id!==t.id))},this.onParticipantPinned=()=>{this.updateActiveParticipants()},this.onParticipantUnpinned=()=>{this.updateActiveParticipants()},this.updateRoomStateListener=()=>{this.roomState=this.meeting.self.roomState}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){this.disconnectMeeting(this.meeting)}disconnectMeeting(t){var i;if(null==t)return;this.participants=[],this.plugins=[];const{self:s,participants:e,plugins:a}=t;s.removeListener("pinned",this.onParticipantPinned),s.removeListener("unpinned",this.onParticipantUnpinned),s.removeListener("roomLeft",this.updateRoomStateListener),s.removeListener("roomJoined",this.updateRoomStateListener),s.removeListener("screenShareUpdate",this.onSelfScreenShareUpdate),s.removeListener("toggleTile",this.toggleTileListener),null==a||a.all.removeListener("stateUpdate",this.onPluginStateUpdate),null===(i=t.stage)||void 0===i||i.removeListener("stageStatusUpdate",this.stageStatusListener),e.removeListener("viewModeChanged",this.onViewModeChanged),e.active.removeListener("participantLeft",this.onParticipantLeft),e.active.removeListener("participantJoined",this.onParticipantJoined),e.pinned.removeListener("participantJoined",this.onParticipantPinned),e.pinned.removeListener("participantLeft",this.onParticipantUnpinned),e.joined.removeListener("screenShareUpdate",this.onScreenShareUpdate),e.joined.removeListener("stageStatusUpdate",this.peerStageStatusListener)}meetingChanged(t,i){var s,e,a,n;if(null!==i&&this.disconnectMeeting(i),null!=t){const{self:i,participants:r,plugins:h,stage:o}=t;this.pipSupported=(null===(s=this.meeting.participants.pip)||void 0===s?void 0:s.isSupported())&&(null===(e=t.self.config)||void 0===e?void 0:e.pipMode),this.pipSupported&&this.meeting.participants.pip.init();const{permissions:p}=i;this.roomState=i.roomState,this.hideSelf="ON_STAGE"!==this.meeting.stage.status||(null==p?void 0:p.isRecorder)||p.hiddenParticipant,this.participants=this.filterParticipants([...r.active.toArray(),...i.isPinned||this.hideSelf?[]:[i]]),this.pinnedParticipants=[...r.pinned.toArray(),...i.isPinned&&!this.hideSelf?[i]:[]],this.screenShareParticipants=r.joined.toArray().filter((t=>t.screenShareEnabled)),this.plugins=(null==h?void 0:h.active.toArray())||[],(null==p?void 0:p.stageEnabled)&&(this.canCurrentPeerHost=p.acceptStageRequests||p.canPresent,this.updateStage()),this.hidden=t.self.hidden,i.addListener("roomLeft",this.updateRoomStateListener),i.addListener("roomJoined",this.updateRoomStateListener),i.addListener("screenShareUpdate",this.onSelfScreenShareUpdate),i.addListener("pinned",this.onParticipantPinned),i.addListener("unpinned",this.onParticipantUnpinned),i.addListener("toggleTile",this.toggleTileListener),null==o||o.addListener("stageStatusUpdate",this.stageStatusListener),null==h||h.all.addListener("stateUpdate",this.onPluginStateUpdate),r.addListener("viewModeChanged",this.onViewModeChanged),r.active.addListener("participantLeft",this.onParticipantLeft),null===(a=null==r?void 0:r.joined)||void 0===a||a.on("stageStatusUpdate",this.peerStageStatusListener),r.joined.addListener("screenShareUpdate",this.onScreenShareUpdate),r.active.addListener("participantJoined",this.onParticipantJoined),r.pinned.addListener("participantJoined",this.onParticipantPinned),r.pinned.addListener("participantLeft",this.onParticipantUnpinned),(null===(n=t.stage)||void 0===n?void 0:n.status)&&this.stageStatusListener()}}overridesChanged(t){this.updateActiveParticipants()}screenShareParticipantsChanged(t){const i=t.length>0;!!o.states.activeScreenShare!==i&&(this.stateUpdate.emit({activeScreenShare:i}),o.states.activeScreenShare=i)}pluginsChanged(t){const i=t.length>0;!!o.states.activePlugin!==i&&(this.stateUpdate.emit({activePlugin:i}),o.states.activePlugin=i)}pinnedParticipantsChanged(t){const i=t.length>0;!!o.states.activeSpotlight!==i&&(this.stateUpdate.emit({activeSpotlight:i}),o.states.activeSpotlight=i)}updateActiveParticipants(){var t;const{self:i,participants:s,stage:e}=this.meeting;this.hideSelf=this.hidden||"ON_STAGE"!==e.status||(null===(t=i.permissions)||void 0===t?void 0:t.isRecorder)||i.permissions.hiddenParticipant,this.participants=this.filterParticipants([...s.active.toArray().filter((t=>t.id!==i.id)),..."ACTIVE_GRID"!==s.viewMode||i.isPinned||this.hideSelf?[]:[i]]),this.pinnedParticipants=[...s.pinned.toArray().filter((t=>t.id!==i.id)),...i.isPinned&&!this.hideSelf?[i]:[]],this.screenShareParticipants=s.joined.toArray().filter((t=>t.screenShareEnabled)),i.screenShareEnabled&&(this.screenShareParticipants=this.screenShareParticipants.concat([i])),this.updateStage()}updateStage(){var t;const{self:i}=this.meeting;this.meeting&&(this.emptyStage=!!(null===(t=null==i?void 0:i.permissions)||void 0===t?void 0:t.stageEnabled)&&0===this.participants.length&&0===this.pinnedParticipants.length)}addScreenShare(t){this.screenShareParticipants.some((i=>i.id===t.id))||(this.screenShareParticipants=[...this.screenShareParticipants,t])}removeScreenShare(t){this.screenShareParticipants=this.screenShareParticipants.filter((i=>i.id!==t.id))}removePinned(t){this.pinnedParticipants=this.pinnedParticipants.filter((i=>i.id!==t.id))}render(){const t={meeting:this.meeting,size:this.size,states:this.states,config:this.config,iconPack:this.iconPack,t:this.t};return this.invalidRoomStates.includes(this.roomState)?s(e,null,s("div",{class:"offline-grid"},s("rtk-icon",{icon:this.iconPack.join_stage,size:"xl"}),s("h3",null,this.t("disconnected")),s("p",null,this.t("disconnected.description")))):"disconnected"===this.roomState?s(e,null,s("div",{class:"offline-grid"},s("rtk-icon",{icon:this.iconPack.disconnected,size:"xl"}),s("h3",null,this.t("offline")),s("p",null,this.t("offline.description")))):"failed"===this.roomState?s(e,null,s("div",{class:"offline-grid"},s("rtk-icon",{icon:this.iconPack.disconnected,size:"xl"}),s("h3",null,this.t("failed")),s("p",null,this.t("failed.description")))):this.showLiveStreamPlayer?s(e,null,s("rtk-livestream-player",{meeting:this.meeting,size:this.size}),s("rtk-livestream-indicator",{meeting:this.meeting,size:"sm",t:this.t}),s("rtk-viewer-count",{meeting:this.meeting,variant:"embedded",t:this.t})):this.emptyStage?s(e,null,s("div",{class:"webinar-stage"},s("div",{class:"center"},this.canCurrentPeerHost&&s("div",{class:"ctr",part:"container"},s("p",{class:"message",part:"message"},this.t("stage.empty_host")),s("span",{class:"description",part:"description"},this.t("stage.empty_host_summary"))),!this.canCurrentPeerHost&&s("div",{class:"ctr",part:"container"},s("p",{class:"message",part:"message"},this.t("stage.empty_viewer")))))):s(e,null,s(c,{element:"rtk-grid",defaults:t,childProps:{participants:this.participants,screenShareParticipants:this.screenShareParticipants,plugins:this.plugins,pinnedParticipants:this.pinnedParticipants,aspectRatio:this.aspectRatio,gap:this.gap,layout:this.layout,gridSize:this.gridSize},onlyChildren:!0}),s("rtk-livestream-indicator",{meeting:this.meeting,size:"sm",t:this.t}),s("rtk-viewer-count",{meeting:this.meeting,variant:"embedded"}))}static get watchers(){return{meeting:["meetingChanged"],overrides:["overridesChanged"],screenShareParticipants:["screenShareParticipantsChanged"],plugins:["pluginsChanged"],pinnedParticipants:["pinnedParticipantsChanged"]}}};g([l()],v.prototype,"meeting",void 0),g([l()],v.prototype,"size",void 0),g([l()],v.prototype,"states",void 0),g([l()],v.prototype,"iconPack",void 0),g([l()],v.prototype,"t",void 0),v.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block;height:100%;width:100%}.offline-grid{display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center}.offline-grid h3{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);margin-left:var(--rtk-space-0, 0px);margin-right:var(--rtk-space-0, 0px);font-size:20px;font-weight:500;color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88))}.offline-grid p{margin-top:var(--rtk-space-1, 4px);margin-bottom:var(--rtk-space-1, 4px);margin-left:var(--rtk-space-0, 0px);margin-right:var(--rtk-space-0, 0px);text-align:center;font-size:16px;font-weight:400;color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}.offline-grid rtk-icon{margin-bottom:var(--rtk-space-2, 8px)}.webinar-stage{box-sizing:border-box;height:100%;display:flex;align-content:center;align-items:center;justify-content:center;text-align:center}.webinar-stage h2{margin:var(--rtk-space-0, 0px);font-weight:normal}rtk-viewer-count{display:none}.ctr{display:flex;flex-direction:column;align-items:center}.message{font-size:16px;border-radius:var(--rtk-border-radius-lg, 12px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));padding-left:var(--rtk-space-8, 32px);padding-right:var(--rtk-space-8, 32px);padding-top:var(--rtk-space-4, 16px);padding-bottom:var(--rtk-space-4, 16px);color:rgb(var(--rtk-colors-text-1000, 255 255 255))}.description{margin-top:var(--rtk-space-4, 16px);margin-bottom:var(--rtk-space-4, 16px);font-size:14px}rtk-livestream-indicator{display:none}@media only screen and (max-device-height: 480px) and (orientation: landscape){rtk-viewer-count[variant='embedded']{position:absolute;top:var(--rtk-space-0, 0px);right:var(--rtk-space-2, 8px);z-index:20;margin-top:var(--rtk-space-0, 0px);margin-left:var(--rtk-space-0, 0px);display:flex}rtk-livestream-indicator{position:absolute;top:var(--rtk-space-0, 0px);left:var(--rtk-space-2, 8px);z-index:20;margin-top:var(--rtk-space-0, 0px);margin-left:var(--rtk-space-0, 0px);display:flex}}";export{v as rtk_grid}
1
+ import{r as t,c as i,h as s,H as e}from"./p-0ee570cd.js";import{d as a,a as n,c as r,q as h,l as o}from"./p-ee167b96.js";import{d as p}from"./p-cbdd7a99.js";import{R as c}from"./p-c8eaa707.js";import{S as l}from"./p-2aa242f4.js";import{d}from"./p-b13ddb7d.js";var g=function(t,i,s,e){var a,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,i,s,e);else for(var h=t.length-1;h>=0;h--)(a=t[h])&&(r=(n<3?a(r):n>3?a(i,s,r):a(i,s))||r);return n>3&&r&&Object.defineProperty(i,s,r),r};const v=class{constructor(s){t(this,s),this.stateUpdate=i(this,"rtkStateUpdate",7),this.hideSelf=!1,this.participants=[],this.pinnedParticipants=[],this.screenShareParticipants=[],this.plugins=[],this.emptyStage=!1,this.showLiveStreamPlayer=!1,this.canCurrentPeerHost=!1,this.pipSupported=!1,this.pipEnabled=!1,this.hidden=!1,this.layout="row",this.aspectRatio="16:9",this.gap=8,this.config=a,this.iconPack=n,this.t=r(),this.gridSize=d,this.overrides={},this.invalidRoomStates=["init","waitlisted","ended","kicked","rejected"],this.filterParticipants=t=>{var i;if(this.overrides&&(null===(i=this.overrides)||void 0===i?void 0:i.videoUnsubscribed)){const i=this.overrides.videoUnsubscribed.preset;i.length>0&&(t=t.filter((t=>!i.some((i=>void 0!==t.presetName&&t.presetName.match(i))))))}return t},this.onViewModeChanged=()=>{null!=this.meeting&&this.updateActiveParticipants()},this.onParticipantJoined=p((()=>{this.updateActiveParticipants()}),50),this.onParticipantLeft=p((()=>{this.updateActiveParticipants()}),50),this.stageStatusListener=()=>{this.updateActiveParticipants(),this.showLiveStreamPlayer=h(this.meeting),"ON_STAGE"!==this.meeting.stage.status&&this.removeScreenShare(this.meeting.self)},this.peerStageStatusListener=t=>{this.updateActiveParticipants(),"ON_STAGE"!==this.meeting.stage.status&&(this.removePinned(t),this.removeScreenShare(t))},this.onScreenShareUpdate=t=>{t.screenShareEnabled?this.addScreenShare(t):this.removeScreenShare(t)},this.onSelfScreenShareUpdate=({screenShareEnabled:t})=>{t?this.addScreenShare(this.meeting.self):this.removeScreenShare(this.meeting.self)},this.toggleTileListener=({hidden:t})=>{this.hidden=t,this.updateActiveParticipants()},this.onPluginStateUpdate=(t,{active:i})=>{i?this.plugins.some((i=>i.id===t.id))||(this.plugins=[...this.plugins,t]):this.plugins=this.plugins.filter((i=>i.id!==t.id))},this.onParticipantPinned=()=>{this.updateActiveParticipants()},this.onParticipantUnpinned=()=>{this.updateActiveParticipants()},this.updateRoomStateListener=()=>{this.roomState=this.meeting.self.roomState}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){this.disconnectMeeting(this.meeting)}disconnectMeeting(t){var i;if(null==t)return;this.participants=[],this.plugins=[];const{self:s,participants:e,plugins:a}=t;s.removeListener("pinned",this.onParticipantPinned),s.removeListener("unpinned",this.onParticipantUnpinned),s.removeListener("roomLeft",this.updateRoomStateListener),s.removeListener("roomJoined",this.updateRoomStateListener),s.removeListener("screenShareUpdate",this.onSelfScreenShareUpdate),s.removeListener("toggleTile",this.toggleTileListener),null==a||a.all.removeListener("stateUpdate",this.onPluginStateUpdate),null===(i=t.stage)||void 0===i||i.removeListener("stageStatusUpdate",this.stageStatusListener),e.removeListener("viewModeChanged",this.onViewModeChanged),e.active.removeListener("participantLeft",this.onParticipantLeft),e.active.removeListener("participantJoined",this.onParticipantJoined),e.pinned.removeListener("participantJoined",this.onParticipantPinned),e.pinned.removeListener("participantLeft",this.onParticipantUnpinned),e.joined.removeListener("screenShareUpdate",this.onScreenShareUpdate),e.joined.removeListener("stageStatusUpdate",this.peerStageStatusListener)}meetingChanged(t,i){var s,e,a,n;if(null!==i&&this.disconnectMeeting(i),null!=t){const{self:i,participants:r,plugins:h,stage:o}=t;this.pipSupported=(null===(s=this.meeting.participants.pip)||void 0===s?void 0:s.isSupported())&&(null===(e=t.self.config)||void 0===e?void 0:e.pipMode),this.pipSupported&&this.meeting.participants.pip.init();const{permissions:p}=i;this.roomState=i.roomState,this.hideSelf="ON_STAGE"!==this.meeting.stage.status||(null==p?void 0:p.isRecorder)||p.hiddenParticipant,this.participants=this.filterParticipants([...r.active.toArray(),...i.isPinned||this.hideSelf?[]:[i]]),this.pinnedParticipants=[...r.pinned.toArray(),...i.isPinned&&!this.hideSelf?[i]:[]],this.screenShareParticipants=r.joined.toArray().filter((t=>t.screenShareEnabled)),this.plugins=(null==h?void 0:h.active.toArray())||[],(null==p?void 0:p.stageEnabled)&&(this.canCurrentPeerHost=p.acceptStageRequests||p.canPresent,this.updateStage()),this.hidden=t.self.hidden,i.addListener("roomLeft",this.updateRoomStateListener),i.addListener("roomJoined",this.updateRoomStateListener),i.addListener("screenShareUpdate",this.onSelfScreenShareUpdate),i.addListener("pinned",this.onParticipantPinned),i.addListener("unpinned",this.onParticipantUnpinned),i.addListener("toggleTile",this.toggleTileListener),null==o||o.addListener("stageStatusUpdate",this.stageStatusListener),null==h||h.all.addListener("stateUpdate",this.onPluginStateUpdate),r.addListener("viewModeChanged",this.onViewModeChanged),r.active.addListener("participantLeft",this.onParticipantLeft),null===(a=null==r?void 0:r.joined)||void 0===a||a.on("stageStatusUpdate",this.peerStageStatusListener),r.joined.addListener("screenShareUpdate",this.onScreenShareUpdate),r.active.addListener("participantJoined",this.onParticipantJoined),r.pinned.addListener("participantJoined",this.onParticipantPinned),r.pinned.addListener("participantLeft",this.onParticipantUnpinned),(null===(n=t.stage)||void 0===n?void 0:n.status)&&this.stageStatusListener()}}overridesChanged(t){this.updateActiveParticipants()}screenShareParticipantsChanged(t){const i=t.length>0;!!o.states.activeScreenShare!==i&&(this.stateUpdate.emit({activeScreenShare:i}),o.states.activeScreenShare=i)}pluginsChanged(t){const i=t.length>0;!!o.states.activePlugin!==i&&(this.stateUpdate.emit({activePlugin:i}),o.states.activePlugin=i)}pinnedParticipantsChanged(t){const i=t.length>0;!!o.states.activeSpotlight!==i&&(this.stateUpdate.emit({activeSpotlight:i}),o.states.activeSpotlight=i)}updateActiveParticipants(){var t;const{self:i,participants:s,stage:e}=this.meeting;this.hideSelf=this.hidden||"ON_STAGE"!==e.status||(null===(t=i.permissions)||void 0===t?void 0:t.isRecorder)||i.permissions.hiddenParticipant,this.participants=this.filterParticipants([...s.active.toArray().filter((t=>t.id!==i.id)),..."ACTIVE_GRID"!==s.viewMode||i.isPinned||this.hideSelf?[]:[i]]),this.pinnedParticipants=[...s.pinned.toArray().filter((t=>t.id!==i.id)),...i.isPinned&&!this.hideSelf?[i]:[]],this.screenShareParticipants=s.joined.toArray().filter((t=>t.screenShareEnabled)),i.screenShareEnabled&&(this.screenShareParticipants=this.screenShareParticipants.concat([i])),this.updateStage()}updateStage(){var t;const{self:i}=this.meeting;this.meeting&&(this.emptyStage=!!(null===(t=null==i?void 0:i.permissions)||void 0===t?void 0:t.stageEnabled)&&0===this.participants.length&&0===this.pinnedParticipants.length)}addScreenShare(t){this.screenShareParticipants.some((i=>i.id===t.id))||(this.screenShareParticipants=[...this.screenShareParticipants,t])}removeScreenShare(t){this.screenShareParticipants=this.screenShareParticipants.filter((i=>i.id!==t.id))}removePinned(t){this.pinnedParticipants=this.pinnedParticipants.filter((i=>i.id!==t.id))}render(){const t={meeting:this.meeting,size:this.size,states:this.states,config:this.config,iconPack:this.iconPack,t:this.t};return this.invalidRoomStates.includes(this.roomState)?s(e,null,s("div",{class:"offline-grid"},s("rtk-icon",{icon:this.iconPack.join_stage,size:"xl"}),s("h3",null,this.t("disconnected")),s("p",null,this.t("disconnected.description")))):"disconnected"===this.roomState?s(e,null,s("div",{class:"offline-grid"},s("rtk-icon",{icon:this.iconPack.disconnected,size:"xl"}),s("h3",null,this.t("offline")),s("p",null,this.t("offline.description")))):"failed"===this.roomState?s(e,null,s("div",{class:"offline-grid"},s("rtk-icon",{icon:this.iconPack.disconnected,size:"xl"}),s("h3",null,this.t("failed")),s("p",null,this.t("failed.description")))):this.showLiveStreamPlayer?s(e,null,s("rtk-livestream-player",{meeting:this.meeting,size:this.size}),s("rtk-livestream-indicator",{meeting:this.meeting,size:"sm",t:this.t}),s("rtk-viewer-count",{meeting:this.meeting,variant:"embedded",t:this.t})):this.emptyStage?s(e,null,s("div",{class:"webinar-stage"},s("div",{class:"center"},this.canCurrentPeerHost&&s("div",{class:"ctr",part:"container"},s("p",{class:"message",part:"message"},this.t("stage.empty_host")),s("span",{class:"description",part:"description"},this.t("stage.empty_host_summary"))),!this.canCurrentPeerHost&&s("div",{class:"ctr",part:"container"},s("p",{class:"message",part:"message"},this.t("stage.empty_viewer")))))):s(e,null,s(c,{element:"rtk-grid",defaults:t,childProps:{participants:this.participants,screenShareParticipants:this.screenShareParticipants,plugins:this.plugins,pinnedParticipants:this.pinnedParticipants,aspectRatio:this.aspectRatio,gap:this.gap,layout:this.layout,gridSize:this.gridSize},onlyChildren:!0}),s("rtk-livestream-indicator",{meeting:this.meeting,size:"sm",t:this.t}),s("rtk-viewer-count",{meeting:this.meeting,variant:"embedded"}))}static get watchers(){return{meeting:["meetingChanged"],overrides:["overridesChanged"],screenShareParticipants:["screenShareParticipantsChanged"],plugins:["pluginsChanged"],pinnedParticipants:["pinnedParticipantsChanged"]}}};g([l()],v.prototype,"meeting",void 0),g([l()],v.prototype,"size",void 0),g([l()],v.prototype,"states",void 0),g([l()],v.prototype,"iconPack",void 0),g([l()],v.prototype,"t",void 0),v.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block;height:100%;width:100%}.offline-grid{display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center}.offline-grid h3{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);margin-left:var(--rtk-space-0, 0px);margin-right:var(--rtk-space-0, 0px);font-size:20px;font-weight:500;color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88))}.offline-grid p{margin-top:var(--rtk-space-1, 4px);margin-bottom:var(--rtk-space-1, 4px);margin-left:var(--rtk-space-0, 0px);margin-right:var(--rtk-space-0, 0px);text-align:center;font-size:16px;font-weight:400;color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}.offline-grid rtk-icon{margin-bottom:var(--rtk-space-2, 8px)}.webinar-stage{box-sizing:border-box;height:100%;display:flex;align-content:center;align-items:center;justify-content:center;text-align:center}.webinar-stage h2{margin:var(--rtk-space-0, 0px);font-weight:normal}rtk-viewer-count{display:none}.ctr{display:flex;flex-direction:column;align-items:center}.message{font-size:16px;border-radius:var(--rtk-border-radius-lg, 12px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));padding-left:var(--rtk-space-8, 32px);padding-right:var(--rtk-space-8, 32px);padding-top:var(--rtk-space-4, 16px);padding-bottom:var(--rtk-space-4, 16px);color:rgb(var(--rtk-colors-text-1000, 255 255 255))}.description{margin-top:var(--rtk-space-4, 16px);margin-bottom:var(--rtk-space-4, 16px);font-size:14px}rtk-livestream-indicator{display:none}@media only screen and (max-device-height: 480px) and (orientation: landscape){rtk-viewer-count[variant='embedded']{position:absolute;top:var(--rtk-space-0, 0px);right:var(--rtk-space-2, 8px);z-index:20;margin-top:var(--rtk-space-0, 0px);margin-left:var(--rtk-space-0, 0px);display:flex}rtk-livestream-indicator{position:absolute;top:var(--rtk-space-0, 0px);left:var(--rtk-space-2, 8px);z-index:20;margin-top:var(--rtk-space-0, 0px);margin-left:var(--rtk-space-0, 0px);display:flex}}";export{v as rtk_grid}
@@ -1 +1 @@
1
- import{r as t,h as e,H as a}from"./p-0ee570cd.js";import{s as r,f as s}from"./p-338c7261.js";import{a as i,c as o}from"./p-b9281511.js";import{S as n}from"./p-a1278d45.js";var c=function(t,e,a,r){var s,i=arguments.length,o=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,a):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,a,r);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(o=(i<3?s(o):i>3?s(e,a,o):s(e,a))||o);return i>3&&o&&Object.defineProperty(e,a,o),o};const d=class{constructor(e){t(this,e),this.isScreenShare=!1,this.variant="default",this.iconPack=i,this.t=o(),this.length=13}sizeChanged(t){this.length="sm"===t?8:13}formatNameTag(t,e){return this.isScreenShare?e?`${this.t("screen")} - ${r(t,this.length-3)} (${this.t("you")})`:`${this.t("screen")} - ${r(t,this.length)}`:e?`${r(t,this.length-3)} (${this.t("you")})`:r(t,this.length)}render(){var t,r,i;const o=s((null===(t=this.participant)||void 0===t?void 0:t.name)||""),n=(null===(r=this.participant)||void 0===r?void 0:r.id)===(null===(i=this.meeting)||void 0===i?void 0:i.self.id);return e(a,{key:"52aa7e44f5a12d953eb5637346fff58cd40ed0bb",title:o},e("slot",{key:"24d7325456abe1ec7051c44eaf6067446e459f2d",name:"start"}),e("span",{key:"c2e7c6d2ca6ab1f5e097ccccad09b52fcc9c846a",class:"name"},this.formatNameTag(o,n)),e("slot",{key:"586b6e09b16c88cc219f45843ac8dfd746c0482a",name:"end"}))}static get watchers(){return{size:["sizeChanged"]}}};c([n()],d.prototype,"meeting",void 0),c([n()],d.prototype,"size",void 0),c([n()],d.prototype,"iconPack",void 0),c([n()],d.prototype,"t",void 0),d.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:inline-flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;padding-top:var(--rtk-space-1, 4px);padding-bottom:var(--rtk-space-1, 4px);padding-left:var(--rtk-space-1\\.5, 6px);padding-right:var(--rtk-space-1\\.5, 6px);font-size:14px;border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88))}span.name{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}::slotted(rtk-audio-visualizer[slot='start']){margin-right:var(--rtk-space-1\\.5, 6px)}::slotted(rtk-audio-visualizer[slot='end']){margin-left:var(--rtk-space-1\\.5, 6px)}:host([size='sm']){font-size:12px;--tw-bg-opacity:0.6}:host([variant='text']){background-color:transparent;padding:var(--rtk-space-0, 0px)}";export{d as rtk_name_tag}
1
+ import{r as t,h as e,H as a}from"./p-0ee570cd.js";import{s as r,f as s}from"./p-338c7261.js";import{a as i,c as o}from"./p-ee167b96.js";import{S as n}from"./p-2aa242f4.js";var c=function(t,e,a,r){var s,i=arguments.length,o=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,a):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,a,r);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(o=(i<3?s(o):i>3?s(e,a,o):s(e,a))||o);return i>3&&o&&Object.defineProperty(e,a,o),o};const d=class{constructor(e){t(this,e),this.isScreenShare=!1,this.variant="default",this.iconPack=i,this.t=o(),this.length=13}sizeChanged(t){this.length="sm"===t?8:13}formatNameTag(t,e){return this.isScreenShare?e?`${this.t("screen")} - ${r(t,this.length-3)} (${this.t("you")})`:`${this.t("screen")} - ${r(t,this.length)}`:e?`${r(t,this.length-3)} (${this.t("you")})`:r(t,this.length)}render(){var t,r,i;const o=s((null===(t=this.participant)||void 0===t?void 0:t.name)||""),n=(null===(r=this.participant)||void 0===r?void 0:r.id)===(null===(i=this.meeting)||void 0===i?void 0:i.self.id);return e(a,{key:"52aa7e44f5a12d953eb5637346fff58cd40ed0bb",title:o},e("slot",{key:"24d7325456abe1ec7051c44eaf6067446e459f2d",name:"start"}),e("span",{key:"c2e7c6d2ca6ab1f5e097ccccad09b52fcc9c846a",class:"name"},this.formatNameTag(o,n)),e("slot",{key:"586b6e09b16c88cc219f45843ac8dfd746c0482a",name:"end"}))}static get watchers(){return{size:["sizeChanged"]}}};c([n()],d.prototype,"meeting",void 0),c([n()],d.prototype,"size",void 0),c([n()],d.prototype,"iconPack",void 0),c([n()],d.prototype,"t",void 0),d.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:inline-flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;padding-top:var(--rtk-space-1, 4px);padding-bottom:var(--rtk-space-1, 4px);padding-left:var(--rtk-space-1\\.5, 6px);padding-right:var(--rtk-space-1\\.5, 6px);font-size:14px;border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88))}span.name{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}::slotted(rtk-audio-visualizer[slot='start']){margin-right:var(--rtk-space-1\\.5, 6px)}::slotted(rtk-audio-visualizer[slot='end']){margin-left:var(--rtk-space-1\\.5, 6px)}:host([size='sm']){font-size:12px;--tw-bg-opacity:0.6}:host([variant='text']){background-color:transparent;padding:var(--rtk-space-0, 0px)}";export{d as rtk_name_tag}
@@ -1 +1 @@
1
- import{r as t,c as e,h as i,H as s}from"./p-0ee570cd.js";import{a,c as o}from"./p-b9281511.js";import{S as r}from"./p-a1278d45.js";var n=function(t,e,i,s){var a,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(r=(o<3?a(r):o>3?a(e,i,r):a(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};const c=class{constructor(i){t(this,i),this.stateUpdate=e(this,"rtkStateUpdate",7),this.variant="button",this.iconPack=a,this.t=o()}toggleSettings(){const t={activeSettings:!0,activeMoreMenu:!1};this.states=Object.assign(Object.assign({},this.states),t),this.stateUpdate.emit(t)}render(){const t=this.t("settings");return i(s,{key:"e94a22b4a0fea761f050247af7af496627353d07",title:t},i("rtk-controlbar-button",{key:"62d3e20bf3ea31f4d05e323d56b699e6095b2742",part:"controlbar-button",size:this.size,iconPack:this.iconPack,onClick:()=>this.toggleSettings(),icon:this.iconPack.settings,label:t,variant:this.variant}))}};n([r()],c.prototype,"states",void 0),n([r()],c.prototype,"size",void 0),n([r()],c.prototype,"iconPack",void 0),n([r()],c.prototype,"t",void 0),c.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block}";export{c as rtk_settings_toggle}
1
+ import{r as t,c as e,h as i,H as s}from"./p-0ee570cd.js";import{a,c as o}from"./p-ee167b96.js";import{S as r}from"./p-2aa242f4.js";var n=function(t,e,i,s){var a,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(r=(o<3?a(r):o>3?a(e,i,r):a(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};const c=class{constructor(i){t(this,i),this.stateUpdate=e(this,"rtkStateUpdate",7),this.variant="button",this.iconPack=a,this.t=o()}toggleSettings(){const t={activeSettings:!0,activeMoreMenu:!1};this.states=Object.assign(Object.assign({},this.states),t),this.stateUpdate.emit(t)}render(){const t=this.t("settings");return i(s,{key:"e94a22b4a0fea761f050247af7af496627353d07",title:t},i("rtk-controlbar-button",{key:"62d3e20bf3ea31f4d05e323d56b699e6095b2742",part:"controlbar-button",size:this.size,iconPack:this.iconPack,onClick:()=>this.toggleSettings(),icon:this.iconPack.settings,label:t,variant:this.variant}))}};n([r()],c.prototype,"states",void 0),n([r()],c.prototype,"size",void 0),n([r()],c.prototype,"iconPack",void 0),n([r()],c.prototype,"t",void 0),c.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block}";export{c as rtk_settings_toggle}
@@ -1 +1 @@
1
- import{r as t,h as i,H as e,a}from"./p-0ee570cd.js";import{d as s,a as r,c as h}from"./p-b9281511.js";import{d as n}from"./p-b13ddb7d.js";import{R as d}from"./p-c8eaa707.js";import{S as o}from"./p-a1278d45.js";var l=function(t,i,e,a){var s,r=arguments.length,h=r<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,e):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,i,e,a);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(h=(r<3?s(h):r>3?s(i,e,h):s(i,e))||h);return r>3&&h&&Object.defineProperty(i,e,h),h};const p=class{constructor(i){t(this,i),this.layout="row",this.participants=[],this.pinnedParticipants=[],this.screenShareParticipants=[],this.plugins=[],this.aspectRatio="16:9",this.gap=8,this.config=s,this.iconPack=r,this.t=h(),this.gridSize=n}componentWillLoad(){this.initialised=!1,this.screenShareParticipantsChanged(this.screenShareParticipants),this.pluginsChanged(this.plugins),this.initialised=!0}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){var t;null===(t=this.meeting.meta)||void 0===t||t.removeListener("activeTabUpdate",this.activeTabUpdateListener)}meetingChanged(t){var i,e,a,s;null!=t&&(null!=(null===(i=t.meta)||void 0===i?void 0:i.selfActiveTab)&&this.onActiveTabUpdate(null===(e=t.meta.selfActiveTab)||void 0===e?void 0:e.type,null===(a=t.meta.selfActiveTab)||void 0===a?void 0:a.id),this.activeTabUpdateListener=t=>{this.onActiveTabUpdate(null==t?void 0:t.type,null==t?void 0:t.id)},null===(s=t.meta)||void 0===s||s.addListener("activeTabUpdate",this.activeTabUpdateListener))}screenShareParticipantsChanged(t=[]){(this.initialised||null==this.activeTab)&&(null==this.activeTab&&t.length>0?this.setActiveTab({type:"screenshare",participant:t[0]}):this.revalidateActiveTab())}pluginsChanged(t){(this.initialised||null==this.activeTab)&&(t.length>0?this.setActiveTab({type:"plugin",plugin:t[t.length-1]}):this.revalidateActiveTab())}revalidateActiveTab(){if(null!=this.activeTab)if("screenshare"===this.activeTab.type){const{participant:t}=this.activeTab;this.screenShareParticipants.some((i=>i.id===t.id))||this.reassignActiveTab()}else{const{plugin:t}=this.activeTab;this.plugins.some((i=>i.id===t.id))||this.reassignActiveTab()}}setActiveTab(t,i=!0){var e;this.activeTab=t,i&&(null===(e=this.meeting.meta)||void 0===e||e.setSelfActiveTab({type:t.type,id:"screenshare"===t.type?t.participant.id:t.plugin.id},0))}reassignActiveTab(){this.screenShareParticipants.length>0?this.setActiveTab({type:"screenshare",participant:this.screenShareParticipants[0]}):this.plugins.length>0&&this.setActiveTab({type:"plugin",plugin:this.plugins[this.plugins.length-1]})}onActiveTabUpdate(t,i){if(null!=t&&null!=i)switch(t){case"plugin":const t=this.plugins.find((t=>t.id===i));null!=t&&this.setActiveTab({type:"plugin",plugin:t},!1);break;case"screenshare":const e=this.screenShareParticipants.find((t=>t.id===i));null!=e&&this.setActiveTab({type:"screenshare",participant:e},!1)}}getTabs(){const t=this.screenShareParticipants.map((t=>({type:"screenshare",participant:t}))),i=this.plugins.map((t=>({type:"plugin",plugin:t})));return t.concat(i)}render(){var t,a;const s={meeting:this.meeting,config:this.config,states:this.states,size:this.size,iconPack:this.iconPack,t:this.t};return i(e,{key:"52e26a16c20eee51ac0f3d01d932df88d58acb05"},i("main",{key:"1838e7498d579bf70346bf921c9f3966721a1eea",id:"main-view",part:"main-view"},(null===(t=this.getTabs())||void 0===t?void 0:t.length)>1&&i("rtk-tab-bar",Object.assign({key:"b3f5f77e4b0bd36d12014881f0507c9de6e613af",activeTab:this.activeTab,tabs:this.getTabs(),onTabChange:t=>this.setActiveTab(t.detail)},s)),i("div",{id:"tabs",key:"tabs"},this.screenShareParticipants.map((t=>{var e,a;return i(d,{element:"rtk-screenshare-view",defaults:s,props:{participant:t,key:t.id,style:{display:"screenshare"===(null===(e=this.activeTab)||void 0===e?void 0:e.type)&&(null===(a=this.activeTab)||void 0===a?void 0:a.participant.id)===t.id?"flex":"none"}},childProps:{participant:t,isScreenShare:!0},deepProps:!0})})),this.plugins.map((t=>{var e,a;return i("rtk-plugin-main",Object.assign({},s,{plugin:t,key:t.id,style:{display:"plugin"===(null===(e=this.activeTab)||void 0===e?void 0:e.type)&&(null===(a=this.activeTab)||void 0===a?void 0:a.plugin.id)===t.id?"flex":"none"}}))})))),i(d,{key:"c3a9ce4706096e385fc522a37e3de7d9d30d1b70",element:"rtk-mixed-grid",defaults:s,childProps:{part:"participants-grid",class:this.gridSize.mixed?`grid-width-${this.gridSize.mixed}`:"grid-width-lg",participants:this.participants,pinnedParticipants:this.pinnedParticipants,screenShareParticipants:this.screenShareParticipants,plugins:this.plugins,aspectRatio:this.aspectRatio,gap:this.gap,size:"AUDIO_ROOM"===(null===(a=this.meeting.meta)||void 0===a?void 0:a.viewType)?"md":"sm",layout:"row"},onlyChildren:!0}))}get host(){return a(this)}static get watchers(){return{meeting:["meetingChanged"],screenShareParticipants:["screenShareParticipantsChanged"],plugins:["pluginsChanged"]}}};l([o()],p.prototype,"size",void 0),l([o()],p.prototype,"meeting",void 0),l([o()],p.prototype,"states",void 0),l([o()],p.prototype,"iconPack",void 0),l([o()],p.prototype,"t",void 0),p.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block;height:100%;width:100%;display:flex}main{display:flex;flex:1 1 0%;padding-left:var(--rtk-space-4, 16px)}:host([layout='column']) main{padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}main rtk-tab-bar{margin-right:var(--rtk-space-4, 16px);box-sizing:border-box;display:flex;height:100%;width:var(--rtk-space-16, 64px);flex-direction:column}main #tabs{height:100%;flex:1 1 0%}rtk-button{z-index:10}.grid-width-sm{width:25%}.grid-width-md{width:50%}.grid-width-lg{width:66.666667%}.col{display:flex;flex-direction:column;align-items:center}.tab{display:flex;height:var(--rtk-space-16, 64px);width:var(--rtk-space-16, 64px);align-items:center;justify-content:center;margin-bottom:var(--rtk-space-2, 8px);font-size:12px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity))}.tab.active{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity))}.tab img{height:var(--rtk-space-7, 28px);width:var(--rtk-space-7, 28px);border-radius:var(--rtk-border-radius-sm, 4px)}:host([size='sm']){flex-direction:column}:host([size='sm']) .grid-width-lg,:host([size='sm']) .grid-width-md{height:50%;width:100%;max-width:100%}:host([size='sm']) .grid-width-sm{height:33.333333%;width:100%;max-width:100%}:host([size='sm']) main{display:flex;flex:1 1 0%;flex-direction:column;padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}:host([size='sm']) rtk-tab-bar{height:var(--rtk-space-12, 48px);width:100%;flex-direction:row}:host([size='sm']) #tabs{flex:1 1 0%}:host([size='sm']) .tab{margin:var(--rtk-space-0, 0px);margin-right:var(--rtk-space-2, 8px)}:host([layout='column']){flex-direction:column}:host([layout='column']) main{display:flex;flex:1 1 0%}:host([layout='column']) .grid-width-lg,:host([layout='column']) .grid-width-md{height:50%;max-width:100%;width:100%}:host([layout='column']) .grid-width-sm{height:33.333333%;max-width:100%;width:100%}@media (orientation: portrait){:host{flex-direction:column}:host .grid-width-lg{height:50%;width:100%;max-width:100%}:host .grid-width-md{height:33.333333%;width:100%;max-width:100%}:host .grid-width-sm{height:25%;width:100%;max-width:100%}:host main{flex:1 1 0%;flex-direction:column;padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}:host([size='md']) main{flex:1 1 0%;flex-direction:column;padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}:host rtk-tab-bar{height:var(--rtk-space-16, 64px);width:100%;flex-direction:row}:host #tabs{flex:1 1 0%}:host .tab{margin:var(--rtk-space-0, 0px);margin-right:var(--rtk-space-2, 8px)}}@media (orientation: landscape){:host{flex-direction:row}:host([size='sm']){flex-direction:row}:host .grid-width-lg{height:50%;width:100%;max-width:100%}:host([size='sm']) .grid-width-sm{height:100%;max-height:100%;width:16.666667%}:host([size='sm']) main{flex:1 1 0%;flex-direction:row;padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px)}:host([size='md']) main{flex:1 1 0%;flex-direction:row;padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}:host([size='sm']) rtk-tab-bar{margin-right:var(--rtk-space-2, 8px);height:100%;width:var(--rtk-space-12, 48px);flex-direction:column}:host #tabs{flex:1 1 0%}:host .tab{margin:var(--rtk-space-0, 0px);margin-right:var(--rtk-space-2, 8px)}}";export{p as rtk_mixed_grid}
1
+ import{r as t,h as i,H as e,a}from"./p-0ee570cd.js";import{d as s,a as r,c as h}from"./p-ee167b96.js";import{d as n}from"./p-b13ddb7d.js";import{R as d}from"./p-c8eaa707.js";import{S as o}from"./p-2aa242f4.js";var l=function(t,i,e,a){var s,r=arguments.length,h=r<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,e):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,i,e,a);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(h=(r<3?s(h):r>3?s(i,e,h):s(i,e))||h);return r>3&&h&&Object.defineProperty(i,e,h),h};const p=class{constructor(i){t(this,i),this.layout="row",this.participants=[],this.pinnedParticipants=[],this.screenShareParticipants=[],this.plugins=[],this.aspectRatio="16:9",this.gap=8,this.config=s,this.iconPack=r,this.t=h(),this.gridSize=n}componentWillLoad(){this.initialised=!1,this.screenShareParticipantsChanged(this.screenShareParticipants),this.pluginsChanged(this.plugins),this.initialised=!0}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){var t;null===(t=this.meeting.meta)||void 0===t||t.removeListener("activeTabUpdate",this.activeTabUpdateListener)}meetingChanged(t){var i,e,a,s;null!=t&&(null!=(null===(i=t.meta)||void 0===i?void 0:i.selfActiveTab)&&this.onActiveTabUpdate(null===(e=t.meta.selfActiveTab)||void 0===e?void 0:e.type,null===(a=t.meta.selfActiveTab)||void 0===a?void 0:a.id),this.activeTabUpdateListener=t=>{this.onActiveTabUpdate(null==t?void 0:t.type,null==t?void 0:t.id)},null===(s=t.meta)||void 0===s||s.addListener("activeTabUpdate",this.activeTabUpdateListener))}screenShareParticipantsChanged(t=[]){(this.initialised||null==this.activeTab)&&(null==this.activeTab&&t.length>0?this.setActiveTab({type:"screenshare",participant:t[0]}):this.revalidateActiveTab())}pluginsChanged(t){(this.initialised||null==this.activeTab)&&(t.length>0?this.setActiveTab({type:"plugin",plugin:t[t.length-1]}):this.revalidateActiveTab())}revalidateActiveTab(){if(null!=this.activeTab)if("screenshare"===this.activeTab.type){const{participant:t}=this.activeTab;this.screenShareParticipants.some((i=>i.id===t.id))||this.reassignActiveTab()}else{const{plugin:t}=this.activeTab;this.plugins.some((i=>i.id===t.id))||this.reassignActiveTab()}}setActiveTab(t,i=!0){var e;this.activeTab=t,i&&(null===(e=this.meeting.meta)||void 0===e||e.setSelfActiveTab({type:t.type,id:"screenshare"===t.type?t.participant.id:t.plugin.id},0))}reassignActiveTab(){this.screenShareParticipants.length>0?this.setActiveTab({type:"screenshare",participant:this.screenShareParticipants[0]}):this.plugins.length>0&&this.setActiveTab({type:"plugin",plugin:this.plugins[this.plugins.length-1]})}onActiveTabUpdate(t,i){if(null!=t&&null!=i)switch(t){case"plugin":const t=this.plugins.find((t=>t.id===i));null!=t&&this.setActiveTab({type:"plugin",plugin:t},!1);break;case"screenshare":const e=this.screenShareParticipants.find((t=>t.id===i));null!=e&&this.setActiveTab({type:"screenshare",participant:e},!1)}}getTabs(){const t=this.screenShareParticipants.map((t=>({type:"screenshare",participant:t}))),i=this.plugins.map((t=>({type:"plugin",plugin:t})));return t.concat(i)}render(){var t,a;const s={meeting:this.meeting,config:this.config,states:this.states,size:this.size,iconPack:this.iconPack,t:this.t};return i(e,{key:"52e26a16c20eee51ac0f3d01d932df88d58acb05"},i("main",{key:"1838e7498d579bf70346bf921c9f3966721a1eea",id:"main-view",part:"main-view"},(null===(t=this.getTabs())||void 0===t?void 0:t.length)>1&&i("rtk-tab-bar",Object.assign({key:"b3f5f77e4b0bd36d12014881f0507c9de6e613af",activeTab:this.activeTab,tabs:this.getTabs(),onTabChange:t=>this.setActiveTab(t.detail)},s)),i("div",{id:"tabs",key:"tabs"},this.screenShareParticipants.map((t=>{var e,a;return i(d,{element:"rtk-screenshare-view",defaults:s,props:{participant:t,key:t.id,style:{display:"screenshare"===(null===(e=this.activeTab)||void 0===e?void 0:e.type)&&(null===(a=this.activeTab)||void 0===a?void 0:a.participant.id)===t.id?"flex":"none"}},childProps:{participant:t,isScreenShare:!0},deepProps:!0})})),this.plugins.map((t=>{var e,a;return i("rtk-plugin-main",Object.assign({},s,{plugin:t,key:t.id,style:{display:"plugin"===(null===(e=this.activeTab)||void 0===e?void 0:e.type)&&(null===(a=this.activeTab)||void 0===a?void 0:a.plugin.id)===t.id?"flex":"none"}}))})))),i(d,{key:"c3a9ce4706096e385fc522a37e3de7d9d30d1b70",element:"rtk-mixed-grid",defaults:s,childProps:{part:"participants-grid",class:this.gridSize.mixed?`grid-width-${this.gridSize.mixed}`:"grid-width-lg",participants:this.participants,pinnedParticipants:this.pinnedParticipants,screenShareParticipants:this.screenShareParticipants,plugins:this.plugins,aspectRatio:this.aspectRatio,gap:this.gap,size:"AUDIO_ROOM"===(null===(a=this.meeting.meta)||void 0===a?void 0:a.viewType)?"md":"sm",layout:"row"},onlyChildren:!0}))}get host(){return a(this)}static get watchers(){return{meeting:["meetingChanged"],screenShareParticipants:["screenShareParticipantsChanged"],plugins:["pluginsChanged"]}}};l([o()],p.prototype,"size",void 0),l([o()],p.prototype,"meeting",void 0),l([o()],p.prototype,"states",void 0),l([o()],p.prototype,"iconPack",void 0),l([o()],p.prototype,"t",void 0),p.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block;height:100%;width:100%;display:flex}main{display:flex;flex:1 1 0%;padding-left:var(--rtk-space-4, 16px)}:host([layout='column']) main{padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}main rtk-tab-bar{margin-right:var(--rtk-space-4, 16px);box-sizing:border-box;display:flex;height:100%;width:var(--rtk-space-16, 64px);flex-direction:column}main #tabs{height:100%;flex:1 1 0%}rtk-button{z-index:10}.grid-width-sm{width:25%}.grid-width-md{width:50%}.grid-width-lg{width:66.666667%}.col{display:flex;flex-direction:column;align-items:center}.tab{display:flex;height:var(--rtk-space-16, 64px);width:var(--rtk-space-16, 64px);align-items:center;justify-content:center;margin-bottom:var(--rtk-space-2, 8px);font-size:12px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity))}.tab.active{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity))}.tab img{height:var(--rtk-space-7, 28px);width:var(--rtk-space-7, 28px);border-radius:var(--rtk-border-radius-sm, 4px)}:host([size='sm']){flex-direction:column}:host([size='sm']) .grid-width-lg,:host([size='sm']) .grid-width-md{height:50%;width:100%;max-width:100%}:host([size='sm']) .grid-width-sm{height:33.333333%;width:100%;max-width:100%}:host([size='sm']) main{display:flex;flex:1 1 0%;flex-direction:column;padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}:host([size='sm']) rtk-tab-bar{height:var(--rtk-space-12, 48px);width:100%;flex-direction:row}:host([size='sm']) #tabs{flex:1 1 0%}:host([size='sm']) .tab{margin:var(--rtk-space-0, 0px);margin-right:var(--rtk-space-2, 8px)}:host([layout='column']){flex-direction:column}:host([layout='column']) main{display:flex;flex:1 1 0%}:host([layout='column']) .grid-width-lg,:host([layout='column']) .grid-width-md{height:50%;max-width:100%;width:100%}:host([layout='column']) .grid-width-sm{height:33.333333%;max-width:100%;width:100%}@media (orientation: portrait){:host{flex-direction:column}:host .grid-width-lg{height:50%;width:100%;max-width:100%}:host .grid-width-md{height:33.333333%;width:100%;max-width:100%}:host .grid-width-sm{height:25%;width:100%;max-width:100%}:host main{flex:1 1 0%;flex-direction:column;padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}:host([size='md']) main{flex:1 1 0%;flex-direction:column;padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}:host rtk-tab-bar{height:var(--rtk-space-16, 64px);width:100%;flex-direction:row}:host #tabs{flex:1 1 0%}:host .tab{margin:var(--rtk-space-0, 0px);margin-right:var(--rtk-space-2, 8px)}}@media (orientation: landscape){:host{flex-direction:row}:host([size='sm']){flex-direction:row}:host .grid-width-lg{height:50%;width:100%;max-width:100%}:host([size='sm']) .grid-width-sm{height:100%;max-height:100%;width:16.666667%}:host([size='sm']) main{flex:1 1 0%;flex-direction:row;padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px)}:host([size='md']) main{flex:1 1 0%;flex-direction:row;padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}:host([size='sm']) rtk-tab-bar{margin-right:var(--rtk-space-2, 8px);height:100%;width:var(--rtk-space-12, 48px);flex-direction:column}:host #tabs{flex:1 1 0%}:host .tab{margin:var(--rtk-space-0, 0px);margin-right:var(--rtk-space-2, 8px)}}";export{p as rtk_mixed_grid}
@@ -1 +1 @@
1
- import{r as t,c as i,h as e,H as s}from"./p-0ee570cd.js";import{a,c as r,i as n}from"./p-b9281511.js";import{S as h}from"./p-a1278d45.js";var o=function(t,i,e,s){var a,r=arguments.length,n=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(a=t[h])&&(n=(r<3?a(n):r>3?a(i,e,n):a(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};const l=class{constructor(e){t(this,e),this.stateUpdate=i(this,"rtkStateUpdate",7),this.apiError=i(this,"rtkApiError",7),this.variant="button",this.iconPack=a,this.t=r(),this.livestreamState="IDLE",this.livestreamStateListener=t=>{this.livestreamState=t,"LIVESTREAMING"!==t&&"IDLE"!==t||this.stateUpdate.emit({activeMoreMenu:!1})},this.isLoading=()=>null==this.meeting||"STARTING"===this.livestreamState||"STOPPING"===this.livestreamState}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){this.clearListeners()}meetingChanged(t){var i,e;null!=t&&(this.livestreamState=null===(i=this.meeting.livestream)||void 0===i?void 0:i.state,null===(e=this.meeting.livestream)||void 0===e||e.on("livestreamUpdate",this.livestreamStateListener))}async toggleLivestream(){var t,i;if("LIVESTREAMING"===this.livestreamState)try{await(null===(t=this.meeting.livestream)||void 0===t?void 0:t.stop())}catch(t){this.apiError.emit({trace:this.t("livestream.stop"),message:this.t("livestream.error.stop")})}else try{await(null===(i=this.meeting.livestream)||void 0===i?void 0:i.start())}catch(t){this.apiError.emit({trace:this.t("livestream.start"),message:this.t("livestream.error.start")})}}clearListeners(){var t;null===(t=this.meeting.livestream)||void 0===t||t.removeListener("livestreamUpdate",this.livestreamStateListener)}getLivestreamLabel(){switch(this.livestreamState){case"IDLE":return this.t("livestream.go_live");case"LIVESTREAMING":return this.t("livestream.end_live");case"WAITING_ON_MANUAL_INGESTION":return this.t("livestream.waiting_on_manual_ingestion");case"STARTING":return this.t("livestream.starting");case"STOPPING":return this.t("livestream.stopping");default:return this.t("livestream.error")}}getLivestreamIcon(){switch(this.livestreamState){case"IDLE":case"WAITING_ON_MANUAL_INGESTION":return this.iconPack.start_livestream;default:return this.iconPack.stop_livestream}}render(){return n(this.meeting)?e(s,null,e("rtk-controlbar-button",{part:"controlbar-button",size:this.size,iconPack:this.iconPack,isLoading:this.isLoading(),class:{"active-livestream":"LIVESTREAMING"===this.livestreamState},onClick:()=>this.toggleLivestream(),icon:this.getLivestreamIcon(),disabled:this.isLoading(),label:this.t(this.getLivestreamLabel()),variant:this.variant})):e(s,{"data-hidden":!0})}static get watchers(){return{meeting:["meetingChanged"]}}};o([h()],l.prototype,"meeting",void 0),o([h()],l.prototype,"size",void 0),o([h()],l.prototype,"iconPack",void 0),o([h()],l.prototype,"t",void 0),l.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block}:host([data-hidden]){display:none}";export{l as rtk_livestream_toggle}
1
+ import{r as t,c as i,h as e,H as s}from"./p-0ee570cd.js";import{a,c as r,i as n}from"./p-ee167b96.js";import{S as h}from"./p-2aa242f4.js";var o=function(t,i,e,s){var a,r=arguments.length,n=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(a=t[h])&&(n=(r<3?a(n):r>3?a(i,e,n):a(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};const l=class{constructor(e){t(this,e),this.stateUpdate=i(this,"rtkStateUpdate",7),this.apiError=i(this,"rtkApiError",7),this.variant="button",this.iconPack=a,this.t=r(),this.livestreamState="IDLE",this.livestreamStateListener=t=>{this.livestreamState=t,"LIVESTREAMING"!==t&&"IDLE"!==t||this.stateUpdate.emit({activeMoreMenu:!1})},this.isLoading=()=>null==this.meeting||"STARTING"===this.livestreamState||"STOPPING"===this.livestreamState}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){this.clearListeners()}meetingChanged(t){var i,e;null!=t&&(this.livestreamState=null===(i=this.meeting.livestream)||void 0===i?void 0:i.state,null===(e=this.meeting.livestream)||void 0===e||e.on("livestreamUpdate",this.livestreamStateListener))}async toggleLivestream(){var t,i;if("LIVESTREAMING"===this.livestreamState)try{await(null===(t=this.meeting.livestream)||void 0===t?void 0:t.stop())}catch(t){this.apiError.emit({trace:this.t("livestream.stop"),message:this.t("livestream.error.stop")})}else try{await(null===(i=this.meeting.livestream)||void 0===i?void 0:i.start())}catch(t){this.apiError.emit({trace:this.t("livestream.start"),message:this.t("livestream.error.start")})}}clearListeners(){var t;null===(t=this.meeting.livestream)||void 0===t||t.removeListener("livestreamUpdate",this.livestreamStateListener)}getLivestreamLabel(){switch(this.livestreamState){case"IDLE":return this.t("livestream.go_live");case"LIVESTREAMING":return this.t("livestream.end_live");case"WAITING_ON_MANUAL_INGESTION":return this.t("livestream.waiting_on_manual_ingestion");case"STARTING":return this.t("livestream.starting");case"STOPPING":return this.t("livestream.stopping");default:return this.t("livestream.error")}}getLivestreamIcon(){switch(this.livestreamState){case"IDLE":case"WAITING_ON_MANUAL_INGESTION":return this.iconPack.start_livestream;default:return this.iconPack.stop_livestream}}render(){return n(this.meeting)?e(s,null,e("rtk-controlbar-button",{part:"controlbar-button",size:this.size,iconPack:this.iconPack,isLoading:this.isLoading(),class:{"active-livestream":"LIVESTREAMING"===this.livestreamState},onClick:()=>this.toggleLivestream(),icon:this.getLivestreamIcon(),disabled:this.isLoading(),label:this.t(this.getLivestreamLabel()),variant:this.variant})):e(s,{"data-hidden":!0})}static get watchers(){return{meeting:["meetingChanged"]}}};o([h()],l.prototype,"meeting",void 0),o([h()],l.prototype,"size",void 0),o([h()],l.prototype,"iconPack",void 0),o([h()],l.prototype,"t",void 0),l.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block}:host([data-hidden]){display:none}";export{l as rtk_livestream_toggle}
@@ -1 +1 @@
1
- import{r as t,c as i,h as e,H as s,a as n}from"./p-0ee570cd.js";import{d as h,l as o,u as a}from"./p-b9281511.js";import{g as r,p as d,d as c}from"./p-eef2d66b.js";import{g}from"./p-96be234f.js";import"./p-46923b34.js";import"./p-2c3cda13.js";const m=class{constructor(e){t(this,e),this.statesUpdate=i(this,"rtkStatesUpdate",7),this.config=h,this.showSetupScreen=!1,this.noRenderUntilMeeting=!1,this.handleResize=()=>{this.size=g(this.host.clientWidth)},this.loadTheme=()=>{var t;if(this.config===h){const{config:t}=r(this.meeting.self.config,this.meeting);this.config=t}(null===(t=this.config)||void 0===t?void 0:t.designTokens)&&d(document.documentElement,this.config.designTokens)},this.roomJoinedListener=()=>{this.updateStates({meeting:"joined"})},this.waitlistedListener=()=>{this.updateStates({meeting:"waiting"})},this.roomLeftListener=({state:t})=>{"disconnected"!==t&&"failed"!==t&&this.updateStates({meeting:"ended",roomLeftState:t})},this.mediaPermissionUpdateListener=({kind:t,message:i})=>{!["audio","video"].includes(t)||"DENIED"!==i&&"SYSTEM_DENIED"!==i||!0===o.states.activeDebugger||this.updateStates({activePermissionsMessage:{enabled:!0,kind:t}})},this.socketConnectionUpdateListener=({state:t})=>{"failed"===t&&setTimeout((()=>{this.meeting.leave("disconnected")}),1e4)}}listenState(t){this.updateStates(t.detail)}updateStates(t){const i=Object.assign({},o.states);o.states=c(i,t),this.statesUpdate.emit(o.states)}connectedCallback(){"undefined"!=typeof window&&(this.authErrorListener=t=>{t.detail.message.includes("401")&&this.updateStates({meeting:"ended",roomLeftState:"unauthorized"})},window.addEventListener("rtkError",this.authErrorListener)),this.onMeetingChange(this.meeting),this.onIconPackChange(this.iconPack),this.onTChange(this.t),this.onConfigChange(this.config),this.onSizeChange(this.size),this.resizeObserver=new ResizeObserver((()=>this.handleResize())),this.resizeObserver.observe(this.host)}disconnectedCallback(){this.resizeObserver.disconnect(),window.removeEventListener("rtkError",this.authErrorListener),this.meeting&&(this.meeting.self.removeListener("roomLeft",this.roomLeftListener),this.meeting.self.removeListener("roomJoined",this.roomJoinedListener),this.meeting.self.removeListener("waitlisted",this.waitlistedListener),this.meeting.self.removeListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),this.meeting.meta.removeListener("socketConnectionUpdate",this.socketConnectionUpdateListener))}onMeetingChange(t){a.state.meeting=t,t&&(this.updateStates({viewType:t.meta.viewType}),this.loadTheme(),t.self.addListener("roomJoined",this.roomJoinedListener),t.self.addListener("waitlisted",this.waitlistedListener),t.self.addListener("roomLeft",this.roomLeftListener),t.self.addListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),t.meta.addListener("socketConnectionUpdate",this.socketConnectionUpdateListener),t.connectedMeetings.supportsConnectedMeetings&&t.connectedMeetings.once("changingMeeting",this.handleChangingMeeting),t.self.roomJoined?this.updateStates({meeting:"joined"}):this.showSetupScreen?this.updateStates({meeting:"setup"}):t.joinRoom(),window.removeEventListener("rtkError",this.authErrorListener))}onIconPackChange(t){a.state.iconPack=t}onTChange(t){a.state.t=t}onConfigChange(t){a.state.config=t}onSizeChange(t){a.state.size=t}handleChangingMeeting(t){this.updateStates({activeBreakoutRoomsManager:Object.assign(Object.assign({},o.states.activeBreakoutRoomsManager),{destinationMeetingId:t})})}render(){return e(s,{key:"ce61aaa074ff4c285bb9b39ea420c456a03ea2b6"},this.noRenderUntilMeeting&&!this.meeting?null:e("slot",null))}get host(){return n(this)}static get watchers(){return{meeting:["onMeetingChange"],iconPack:["onIconPackChange"],t:["onTChange"],config:["onConfigChange"],size:["onSizeChange"]}}};m.style="rtk-ui-provider{display:block;width:100%;height:100%}";export{m as rtk_ui_provider}
1
+ import{r as t,c as i,h as e,H as s,a as n}from"./p-0ee570cd.js";import{d as h,l as o,u as a}from"./p-ee167b96.js";import{g as r,p as d,d as c}from"./p-6ededa68.js";import{g}from"./p-96be234f.js";import"./p-46923b34.js";import"./p-2c3cda13.js";const m=class{constructor(e){t(this,e),this.statesUpdate=i(this,"rtkStatesUpdate",7),this.config=h,this.showSetupScreen=!1,this.noRenderUntilMeeting=!1,this.handleResize=()=>{this.size=g(this.host.clientWidth)},this.loadTheme=()=>{var t;if(this.config===h){const{config:t}=r(this.meeting.self.config,this.meeting);this.config=t}(null===(t=this.config)||void 0===t?void 0:t.designTokens)&&d(document.documentElement,this.config.designTokens)},this.roomJoinedListener=()=>{this.updateStates({meeting:"joined"})},this.waitlistedListener=()=>{this.updateStates({meeting:"waiting"})},this.roomLeftListener=({state:t})=>{"disconnected"!==t&&"failed"!==t&&this.updateStates({meeting:"ended",roomLeftState:t})},this.mediaPermissionUpdateListener=({kind:t,message:i})=>{!["audio","video"].includes(t)||"DENIED"!==i&&"SYSTEM_DENIED"!==i||!0===o.states.activeDebugger||this.updateStates({activePermissionsMessage:{enabled:!0,kind:t}})},this.socketConnectionUpdateListener=({state:t})=>{"failed"===t&&setTimeout((()=>{this.meeting.leave("disconnected")}),1e4)}}listenState(t){this.updateStates(t.detail)}updateStates(t){const i=Object.assign({},o.states);o.states=c(i,t),this.statesUpdate.emit(o.states)}connectedCallback(){"undefined"!=typeof window&&(this.authErrorListener=t=>{t.detail.message.includes("401")&&this.updateStates({meeting:"ended",roomLeftState:"unauthorized"})},window.addEventListener("rtkError",this.authErrorListener)),this.onMeetingChange(this.meeting),this.onIconPackChange(this.iconPack),this.onTChange(this.t),this.onConfigChange(this.config),this.onSizeChange(this.size),this.resizeObserver=new ResizeObserver((()=>this.handleResize())),this.resizeObserver.observe(this.host)}disconnectedCallback(){this.resizeObserver.disconnect(),window.removeEventListener("rtkError",this.authErrorListener),this.meeting&&(this.meeting.self.removeListener("roomLeft",this.roomLeftListener),this.meeting.self.removeListener("roomJoined",this.roomJoinedListener),this.meeting.self.removeListener("waitlisted",this.waitlistedListener),this.meeting.self.removeListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),this.meeting.meta.removeListener("socketConnectionUpdate",this.socketConnectionUpdateListener))}onMeetingChange(t){a.state.meeting=t,t&&(this.updateStates({viewType:t.meta.viewType}),this.loadTheme(),t.self.addListener("roomJoined",this.roomJoinedListener),t.self.addListener("waitlisted",this.waitlistedListener),t.self.addListener("roomLeft",this.roomLeftListener),t.self.addListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),t.meta.addListener("socketConnectionUpdate",this.socketConnectionUpdateListener),t.connectedMeetings.supportsConnectedMeetings&&t.connectedMeetings.once("changingMeeting",this.handleChangingMeeting),t.self.roomJoined?this.updateStates({meeting:"joined"}):this.showSetupScreen?this.updateStates({meeting:"setup"}):t.joinRoom(),window.removeEventListener("rtkError",this.authErrorListener))}onIconPackChange(t){a.state.iconPack=t}onTChange(t){a.state.t=t}onConfigChange(t){a.state.config=t}onSizeChange(t){a.state.size=t}handleChangingMeeting(t){this.updateStates({activeBreakoutRoomsManager:Object.assign(Object.assign({},o.states.activeBreakoutRoomsManager),{destinationMeetingId:t})})}render(){return e(s,{key:"ce61aaa074ff4c285bb9b39ea420c456a03ea2b6"},this.noRenderUntilMeeting&&!this.meeting?null:e("slot",null))}get host(){return n(this)}static get watchers(){return{meeting:["onMeetingChange"],iconPack:["onIconPackChange"],t:["onTChange"],config:["onConfigChange"],size:["onSizeChange"]}}};m.style="rtk-ui-provider{display:block;width:100%;height:100%}";export{m as rtk_ui_provider}
@@ -0,0 +1 @@
1
+ import{r as t,h as e,H as i}from"./p-0ee570cd.js";import{a}from"./p-ee167b96.js";import{S as n}from"./p-2aa242f4.js";var s=function(t,e,i,a){var n,s=arguments.length,r=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,a);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};const r=t=>Math.trunc(t).toString().padStart(2,"0"),o=class{constructor(e){t(this,e),this.iconPack=a,this.disconnectMeeting=()=>{var t,e;this.timeout&&clearTimeout(this.timeout),"number"==typeof this.request&&cancelAnimationFrame(this.request),null===(e=null===(t=this.meeting)||void 0===t?void 0:t.meta)||void 0===e||e.removeListener("meetingStartTimeUpdate",this.startedTimeUpdateListener)},this.startedTimeUpdateListener=()=>{var t,e,i;this.startedTime=null===(i=null===(e=null===(t=this.meeting)||void 0===t?void 0:t.meta)||void 0===e?void 0:e.meetingStartedTimestamp)||void 0===i?void 0:i.toISOString()}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){this.disconnectMeeting()}meetingChanged(t){var e,i,a;this.disconnectMeeting(),null!=t&&(this.startedTime=null===(i=null===(e=t.meta)||void 0===e?void 0:e.meetingStartedTimestamp)||void 0===i?void 0:i.toISOString(),null===(a=t.meta)||void 0===a||a.addListener("meetingStartTimeUpdate",this.startedTimeUpdateListener))}startedTimeChanged(t){if(void 0!==t){const t=()=>{this.timeDiff=(Date.now()-new Date(this.startedTime).getTime())/1e3,this.timeout=setTimeout((()=>{null!=this.request&&(this.request=requestAnimationFrame(t))}),500)};this.request=requestAnimationFrame(t)}}getFormattedTime(){if(null==this.timeDiff)return null;const t=this.timeDiff;let e="";return t>=3600&&(e=`${r(t/3600)}:`),e+=`${r(t%3600/60)}:${r(t%60)}`,e}render(){return e(i,{key:"2775471382c6d07aae0ba8e18677d6850fd9cb34","data-hidden":!(void 0!==this.startedTime),tabIndex:0,role:"timer","aria-live":"off"},void 0!==this.startedTime&&[e("rtk-icon",{key:"48b8bdfeef973d7f3eb4cdd526e386226a4b999a",icon:this.iconPack.clock,"aria-hidden":!0,tabIndex:-1,part:"icon"}),e("span",{key:"9f2bb7aa7adc6ecb65c5fef57e406801e6592e59",part:"text"},this.getFormattedTime())])}static get watchers(){return{meeting:["meetingChanged"],startedTime:["startedTimeChanged"]}}};s([n()],o.prototype,"meeting",void 0),s([n()],o.prototype,"iconPack",void 0),o.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:inline-flex;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;font-size:14px;color:rgb(var(--rtk-colors-text-1000, 255 255 255));font-variant-numeric:tabular-nums}:host([data-hidden]){display:none}:host([size='sm']){font-size:12px}rtk-icon{margin-right:var(--rtk-space-1, 4px);height:var(--rtk-space-5, 20px);width:var(--rtk-space-5, 20px)}:host([size='sm']) rtk-icon{height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px)}";export{o as rtk_clock}
@@ -1 +1 @@
1
- import{r as t,w as i,h as s,H as e,a as r}from"./p-0ee570cd.js";import{d as n,c as a}from"./p-b9281511.js";import{S as o}from"./p-a1278d45.js";import{c}from"./p-c15d924f.js";import"./p-46923b34.js";import"./p-2c3cda13.js";var h=function(t,i,s,e){var r,n=arguments.length,a=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,s,e);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(n<3?r(a):n>3?r(i,s,a):r(i,s))||a);return n>3&&a&&Object.defineProperty(i,s,a),a};const d=class{constructor(i){t(this,i),this.config=n,this.t=a(),this.transcripts=[],this.listenerAttached=!1,this.onTranscript=t=>{t.transcript&&this.add(t)}}connectedCallback(){this.meetingChanged(this.meeting)}addListener(t){var i;null===(i=null==t?void 0:t.ai)||void 0===i||i.addListener("transcript",this.onTranscript),this.listenerAttached=!0}clearListeners(t){var i;this.onTranscript&&(null===(i=null==t?void 0:t.ai)||void 0===i||i.removeListener("transcript",this.onTranscript)),this.listenerAttached=!1,clearTimeout(this.disconnectTimeout),this.transcripts=[]}disconnectedCallback(){null!=this.meeting&&this.clearListeners(this.meeting)}meetingChanged(t,i){clearTimeout(this.disconnectTimeout),void 0!==i&&this.clearListeners(i),null!=t&&this.states.activeCaptions&&this.addListener(t)}statesChanged(t){t&&(t.activeCaptions&&!this.listenerAttached&&this.addListener(this.meeting),!t.activeCaptions&&this.listenerAttached&&this.clearListeners(this.meeting))}transcriptionsReducer(t,i){if(!t.length)return[i];let s=t[t.length-1];return s.peerId!==i.peerId?t.concat(i):s.id===i.id?(s.transcript=i.transcript,t.pop(),t.concat(c(s))):t.concat(i)}add(t){this.transcripts=this.transcriptionsReducer(this.transcripts,t)}remove(t){this.transcripts=this.transcripts.filter((i=>i.renderedId!==t))}handleDismiss(t){t.stopPropagation();const{id:s,renderedId:e}=t.detail,r=this.host.shadowRoot.querySelector(`[data-id="${s}"]`);null==r||r.classList.add("exit"),setTimeout((()=>{i((()=>{this.remove(e)}))}),400)}renderTranscripts(){const t=[];return this.transcripts.forEach((i=>{const s={name:i.name,date:i.date,peerId:i.peerId,transcript:i.transcript,id:i.id,renderedId:i.id};if(!t.length)return i.renderedId=s.renderedId,void t.push(s);const e=t[t.length-1];if(e.transcript.length+s.transcript.length>400||e.peerId!==i.peerId)return i.renderedId=s.renderedId,void t.push(s);e.transcript+=" "+i.transcript,i.renderedId=e.renderedId})),t.splice(0,t.length-2),null==t?void 0:t.map((t=>s("rtk-transcript",{key:t.id,"data-id":t.id,transcript:t,onRtkTranscriptDismiss:t=>this.handleDismiss(t),t:this.t})))}render(){if(this.states.activeCaptions)return s(e,null,this.renderTranscripts())}get host(){return r(this)}static get watchers(){return{meeting:["meetingChanged"],states:["statesChanged"]}}};h([o()],d.prototype,"meeting",void 0),h([o()],d.prototype,"states",void 0),h([o()],d.prototype,"t",void 0),d.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{position:absolute;top:var(--rtk-space-4, 16px);right:var(--rtk-space-4, 16px);bottom:var(--rtk-space-4, 16px);left:var(--rtk-space-4, 16px);top:auto;display:flex;flex-direction:column;pointer-events:none;justify-content:center;width:100%;z-index:5}rtk-transcript{margin-top:var(--rtk-space-2, 8px)}";export{d as rtk_transcripts}
1
+ import{r as t,w as i,h as s,H as e,a as r}from"./p-0ee570cd.js";import{d as n,c as a}from"./p-ee167b96.js";import{S as o}from"./p-2aa242f4.js";import{c}from"./p-c15d924f.js";import"./p-46923b34.js";import"./p-2c3cda13.js";var h=function(t,i,s,e){var r,n=arguments.length,a=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,s,e);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(n<3?r(a):n>3?r(i,s,a):r(i,s))||a);return n>3&&a&&Object.defineProperty(i,s,a),a};const d=class{constructor(i){t(this,i),this.config=n,this.t=a(),this.transcripts=[],this.listenerAttached=!1,this.onTranscript=t=>{t.transcript&&this.add(t)}}connectedCallback(){this.meetingChanged(this.meeting)}addListener(t){var i;null===(i=null==t?void 0:t.ai)||void 0===i||i.addListener("transcript",this.onTranscript),this.listenerAttached=!0}clearListeners(t){var i;this.onTranscript&&(null===(i=null==t?void 0:t.ai)||void 0===i||i.removeListener("transcript",this.onTranscript)),this.listenerAttached=!1,clearTimeout(this.disconnectTimeout),this.transcripts=[]}disconnectedCallback(){null!=this.meeting&&this.clearListeners(this.meeting)}meetingChanged(t,i){clearTimeout(this.disconnectTimeout),void 0!==i&&this.clearListeners(i),null!=t&&this.states.activeCaptions&&this.addListener(t)}statesChanged(t){t&&(t.activeCaptions&&!this.listenerAttached&&this.addListener(this.meeting),!t.activeCaptions&&this.listenerAttached&&this.clearListeners(this.meeting))}transcriptionsReducer(t,i){if(!t.length)return[i];let s=t[t.length-1];return s.peerId!==i.peerId?t.concat(i):s.id===i.id?(s.transcript=i.transcript,t.pop(),t.concat(c(s))):t.concat(i)}add(t){this.transcripts=this.transcriptionsReducer(this.transcripts,t)}remove(t){this.transcripts=this.transcripts.filter((i=>i.renderedId!==t))}handleDismiss(t){t.stopPropagation();const{id:s,renderedId:e}=t.detail,r=this.host.shadowRoot.querySelector(`[data-id="${s}"]`);null==r||r.classList.add("exit"),setTimeout((()=>{i((()=>{this.remove(e)}))}),400)}renderTranscripts(){const t=[];return this.transcripts.forEach((i=>{const s={name:i.name,date:i.date,peerId:i.peerId,transcript:i.transcript,id:i.id,renderedId:i.id};if(!t.length)return i.renderedId=s.renderedId,void t.push(s);const e=t[t.length-1];if(e.transcript.length+s.transcript.length>400||e.peerId!==i.peerId)return i.renderedId=s.renderedId,void t.push(s);e.transcript+=" "+i.transcript,i.renderedId=e.renderedId})),t.splice(0,t.length-2),null==t?void 0:t.map((t=>s("rtk-transcript",{key:t.id,"data-id":t.id,transcript:t,onRtkTranscriptDismiss:t=>this.handleDismiss(t),t:this.t})))}render(){if(this.states.activeCaptions)return s(e,null,this.renderTranscripts())}get host(){return r(this)}static get watchers(){return{meeting:["meetingChanged"],states:["statesChanged"]}}};h([o()],d.prototype,"meeting",void 0),h([o()],d.prototype,"states",void 0),h([o()],d.prototype,"t",void 0),d.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{position:absolute;top:var(--rtk-space-4, 16px);right:var(--rtk-space-4, 16px);bottom:var(--rtk-space-4, 16px);left:var(--rtk-space-4, 16px);top:auto;display:flex;flex-direction:column;pointer-events:none;justify-content:center;width:100%;z-index:5}rtk-transcript{margin-top:var(--rtk-space-2, 8px)}";export{d as rtk_transcripts}