@cloudflare/realtimekit-ui 2.0.4-staging.2 → 2.0.4-staging.4

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 (230) hide show
  1. package/dist/browser.js +1 -1
  2. package/dist/cjs/{breakout-rooms-manager-Bgk5FEK1.js → breakout-rooms-manager-CI4CY88g.js} +1 -0
  3. package/dist/cjs/index.cjs.js +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/realtimekit-ui.cjs.js +1 -1
  6. package/dist/cjs/rtk-ai_3.cjs.entry.js +1 -1
  7. package/dist/cjs/rtk-audio-grid.cjs.entry.js +1 -1
  8. package/dist/cjs/rtk-audio-tile.cjs.entry.js +1 -1
  9. package/dist/cjs/rtk-avatar_26.cjs.entry.js +1 -1
  10. package/dist/cjs/rtk-breakout-room-manager_3.cjs.entry.js +1 -1
  11. package/dist/cjs/rtk-breakout-rooms-manager_8.cjs.entry.js +1 -1
  12. package/dist/cjs/rtk-camera-selector_2.cjs.entry.js +1 -1
  13. package/dist/cjs/rtk-caption-toggle.cjs.entry.js +1 -1
  14. package/dist/cjs/rtk-chat-composer-ui.cjs.entry.js +1 -1
  15. package/dist/cjs/rtk-chat-message.cjs.entry.js +1 -1
  16. package/dist/cjs/rtk-chat-messages-ui.cjs.entry.js +1 -1
  17. package/dist/cjs/rtk-chat-search-results.cjs.entry.js +1 -1
  18. package/dist/cjs/rtk-chat-selector-ui.cjs.entry.js +1 -1
  19. package/dist/cjs/rtk-controlbar.cjs.entry.js +1 -1
  20. package/dist/cjs/rtk-debugger-audio_4.cjs.entry.js +1 -1
  21. package/dist/cjs/rtk-ended-screen.cjs.entry.js +1 -1
  22. package/dist/cjs/rtk-file-dropzone.cjs.entry.js +1 -1
  23. package/dist/cjs/rtk-header.cjs.entry.js +1 -1
  24. package/dist/cjs/rtk-idle-screen.cjs.entry.js +1 -1
  25. package/dist/cjs/rtk-information-tooltip.cjs.entry.js +1 -1
  26. package/dist/cjs/rtk-livestream-indicator_3.cjs.entry.js +1 -1
  27. package/dist/cjs/rtk-logo.cjs.entry.js +1 -1
  28. package/dist/cjs/rtk-meeting-title.cjs.entry.js +23 -2
  29. package/dist/cjs/rtk-message-list-view.cjs.entry.js +1 -1
  30. package/dist/cjs/rtk-mute-all-button.cjs.entry.js +1 -1
  31. package/dist/cjs/rtk-network-indicator.cjs.entry.js +1 -1
  32. package/dist/cjs/rtk-notifications.cjs.entry.js +1 -1
  33. package/dist/cjs/rtk-participant-setup.cjs.entry.js +1 -1
  34. package/dist/cjs/rtk-participant_2.cjs.entry.js +1 -1
  35. package/dist/cjs/rtk-participants-stage-list_4.cjs.entry.js +1 -1
  36. package/dist/cjs/rtk-participants.cjs.entry.js +1 -1
  37. package/dist/cjs/rtk-pip-toggle.cjs.entry.js +1 -1
  38. package/dist/cjs/rtk-sidebar-ui.cjs.entry.js +1 -1
  39. package/dist/cjs/rtk-stage-toggle.cjs.entry.js +1 -1
  40. package/dist/cjs/rtk-transcripts.cjs.entry.js +1 -1
  41. package/dist/cjs/rtk-ui-provider.cjs.entry.js +1 -1
  42. package/dist/cjs/rtk-waiting-screen.cjs.entry.js +1 -1
  43. package/dist/collection/components/rtk-meeting-title/rtk-meeting-title.js +29 -2
  44. package/dist/collection/utils/breakout-rooms-manager.js +1 -0
  45. package/dist/components/index.js +1 -1
  46. package/dist/components/{p-ByPpyWt6.js → p-5quurE-Z.js} +1 -1
  47. package/dist/components/{p-Bux-kSlP.js → p-B3XpiAaE.js} +1 -1
  48. package/dist/components/{p-pcKO_EeI.js → p-B4Ap4n7a.js} +1 -1
  49. package/dist/components/{p-vqPkhXWC.js → p-B5XTxQov.js} +1 -1
  50. package/dist/components/{p-93ZUKlQ1.js → p-BD2FfUwc.js} +1 -1
  51. package/dist/components/{p-CAsupO2z.js → p-BL_lNnwE.js} +1 -1
  52. package/dist/components/{p-DnOzzBR9.js → p-BODcekJl.js} +1 -1
  53. package/dist/components/{p-CHh7GAdL.js → p-BVwe7Wfq.js} +1 -1
  54. package/dist/components/{p--CEA0NQj.js → p-BW3eEJGd.js} +1 -1
  55. package/dist/components/{p-Bf-vQ6U9.js → p-BYNelMao.js} +1 -1
  56. package/dist/components/{p-DnkJztTd.js → p-BueZc6Xo.js} +1 -1
  57. package/dist/components/{p-y_feb08f.js → p-Bw12zqoT.js} +1 -1
  58. package/dist/components/{p--VK1POSX.js → p-CBGt9ESN.js} +1 -1
  59. package/dist/components/{p-D_AEDHUV.js → p-CGBdi6J9.js} +1 -1
  60. package/dist/components/{p-C0ESgBoj.js → p-CPnv0ZqZ.js} +1 -1
  61. package/dist/components/{p-BXHUa6x_.js → p-CRI4EXkA.js} +1 -1
  62. package/dist/components/{p-BY_rxRub.js → p-CgQKQwo8.js} +1 -1
  63. package/dist/components/{p-CuRSxmeD.js → p-CxE6v80l.js} +1 -1
  64. package/dist/components/{p-Ryaxu6vl.js → p-D3fF-6sB.js} +1 -1
  65. package/dist/components/{p-VHRH6fkb.js → p-D6Vrf7V1.js} +1 -1
  66. package/dist/components/p-D9EtbXLL.js +1 -0
  67. package/dist/components/{p-CU7xL-hP.js → p-DRDGwBZ3.js} +1 -1
  68. package/dist/components/{p-Bn6JMUc9.js → p-DhkCjo6N.js} +1 -1
  69. package/dist/components/{p-CMyYEHgz.js → p-Djf3ZrmN.js} +1 -1
  70. package/dist/components/{p-BbE6o8zj.js → p-LohuIsNV.js} +1 -1
  71. package/dist/components/{p-DZcwJOUW.js → p-hPdGZ_Bf.js} +1 -1
  72. package/dist/components/{p-BQJoMtIK.js → p-igDs79FY.js} +1 -1
  73. package/dist/components/{p-CBWhDYEo.js → p-iyI_rAph.js} +1 -1
  74. package/dist/components/{p-Bf-HIBwL.js → p-oJLPa1F-.js} +1 -1
  75. package/dist/components/{p-gixOLeKl.js → p-tZ9CpAsl.js} +1 -1
  76. package/dist/components/{p-DhG2PF_5.js → p-ukr4mPVB.js} +1 -1
  77. package/dist/components/{p-DdSpe6Sb.js → p-xKvr8ufu.js} +1 -1
  78. package/dist/components/{p-E1D1eNFh.js → p-xnw0dG3-.js} +1 -1
  79. package/dist/components/rtk-audio-grid.js +1 -1
  80. package/dist/components/rtk-audio-tile.js +1 -1
  81. package/dist/components/rtk-breakout-rooms-manager.js +1 -1
  82. package/dist/components/rtk-caption-toggle.js +1 -1
  83. package/dist/components/rtk-chat-composer-ui.js +1 -1
  84. package/dist/components/rtk-chat-composer-view.js +1 -1
  85. package/dist/components/rtk-chat-header.js +1 -1
  86. package/dist/components/rtk-chat-message.js +1 -1
  87. package/dist/components/rtk-chat-messages-ui-paginated.js +1 -1
  88. package/dist/components/rtk-chat-messages-ui.js +1 -1
  89. package/dist/components/rtk-chat-search-results.js +1 -1
  90. package/dist/components/rtk-chat-selector-ui.js +1 -1
  91. package/dist/components/rtk-chat-selector.js +1 -1
  92. package/dist/components/rtk-chat.js +1 -1
  93. package/dist/components/rtk-controlbar.js +1 -1
  94. package/dist/components/rtk-counter.js +1 -1
  95. package/dist/components/rtk-debugger-audio.js +1 -1
  96. package/dist/components/rtk-debugger-screenshare.js +1 -1
  97. package/dist/components/rtk-debugger-system.js +1 -1
  98. package/dist/components/rtk-debugger-video.js +1 -1
  99. package/dist/components/rtk-debugger.js +1 -1
  100. package/dist/components/rtk-dialog-manager.js +1 -1
  101. package/dist/components/rtk-draft-attachment-view.js +1 -1
  102. package/dist/components/rtk-emoji-picker-button.js +1 -1
  103. package/dist/components/rtk-ended-screen.js +1 -1
  104. package/dist/components/rtk-file-dropzone.js +1 -1
  105. package/dist/components/rtk-file-message-view.js +1 -1
  106. package/dist/components/rtk-file-picker-button.js +1 -1
  107. package/dist/components/rtk-grid.js +1 -1
  108. package/dist/components/rtk-header.js +1 -1
  109. package/dist/components/rtk-idle-screen.js +1 -1
  110. package/dist/components/rtk-image-message-view.js +1 -1
  111. package/dist/components/rtk-information-tooltip.js +1 -1
  112. package/dist/components/rtk-livestream-indicator.js +1 -1
  113. package/dist/components/rtk-livestream-player.js +1 -1
  114. package/dist/components/rtk-logo.js +1 -1
  115. package/dist/components/rtk-meeting-title.js +1 -1
  116. package/dist/components/rtk-meeting.js +1 -1
  117. package/dist/components/rtk-message-list-view.js +1 -1
  118. package/dist/components/rtk-message-view.js +1 -1
  119. package/dist/components/rtk-mute-all-button.js +1 -1
  120. package/dist/components/rtk-network-indicator.js +1 -1
  121. package/dist/components/rtk-notifications.js +1 -1
  122. package/dist/components/rtk-participant-setup.js +1 -1
  123. package/dist/components/rtk-participant-tile.js +1 -1
  124. package/dist/components/rtk-participant.js +1 -1
  125. package/dist/components/rtk-participants-stage-list.js +1 -1
  126. package/dist/components/rtk-participants-stage-queue.js +1 -1
  127. package/dist/components/rtk-participants-viewer-list.js +1 -1
  128. package/dist/components/rtk-participants-waiting-list.js +1 -1
  129. package/dist/components/rtk-participants.js +1 -1
  130. package/dist/components/rtk-pip-toggle.js +1 -1
  131. package/dist/components/rtk-plugins.js +1 -1
  132. package/dist/components/rtk-polls.js +1 -1
  133. package/dist/components/rtk-settings-video.js +1 -1
  134. package/dist/components/rtk-settings.js +1 -1
  135. package/dist/components/rtk-sidebar-ui.js +1 -1
  136. package/dist/components/rtk-sidebar.js +1 -1
  137. package/dist/components/rtk-stage-toggle.js +1 -1
  138. package/dist/components/rtk-text-composer-view.js +1 -1
  139. package/dist/components/rtk-transcripts.js +1 -1
  140. package/dist/components/rtk-ui-provider.js +1 -1
  141. package/dist/components/rtk-waiting-screen.js +1 -1
  142. package/dist/docs/docs-components.json +1 -1
  143. package/dist/esm/{breakout-rooms-manager-B1Qky9zO.js → breakout-rooms-manager-DOKq3YH6.js} +1 -0
  144. package/dist/esm/index.js +1 -1
  145. package/dist/esm/loader.js +25 -3
  146. package/dist/esm/realtimekit-ui.js +1 -1
  147. package/dist/esm/rtk-ai_3.entry.js +1 -1
  148. package/dist/esm/rtk-audio-grid.entry.js +1 -1
  149. package/dist/esm/rtk-audio-tile.entry.js +1 -1
  150. package/dist/esm/rtk-avatar_26.entry.js +1 -1
  151. package/dist/esm/rtk-breakout-room-manager_3.entry.js +1 -1
  152. package/dist/esm/rtk-breakout-rooms-manager_8.entry.js +1 -1
  153. package/dist/esm/rtk-camera-selector_2.entry.js +1 -1
  154. package/dist/esm/rtk-caption-toggle.entry.js +1 -1
  155. package/dist/esm/rtk-chat-composer-ui.entry.js +1 -1
  156. package/dist/esm/rtk-chat-message.entry.js +1 -1
  157. package/dist/esm/rtk-chat-messages-ui.entry.js +1 -1
  158. package/dist/esm/rtk-chat-search-results.entry.js +1 -1
  159. package/dist/esm/rtk-chat-selector-ui.entry.js +1 -1
  160. package/dist/esm/rtk-controlbar.entry.js +1 -1
  161. package/dist/esm/rtk-debugger-audio_4.entry.js +1 -1
  162. package/dist/esm/rtk-ended-screen.entry.js +1 -1
  163. package/dist/esm/rtk-file-dropzone.entry.js +1 -1
  164. package/dist/esm/rtk-header.entry.js +1 -1
  165. package/dist/esm/rtk-idle-screen.entry.js +1 -1
  166. package/dist/esm/rtk-information-tooltip.entry.js +1 -1
  167. package/dist/esm/rtk-livestream-indicator_3.entry.js +1 -1
  168. package/dist/esm/rtk-logo.entry.js +1 -1
  169. package/dist/esm/rtk-meeting-title.entry.js +23 -2
  170. package/dist/esm/rtk-message-list-view.entry.js +1 -1
  171. package/dist/esm/rtk-mute-all-button.entry.js +1 -1
  172. package/dist/esm/rtk-network-indicator.entry.js +1 -1
  173. package/dist/esm/rtk-notifications.entry.js +1 -1
  174. package/dist/esm/rtk-participant-setup.entry.js +1 -1
  175. package/dist/esm/rtk-participant_2.entry.js +1 -1
  176. package/dist/esm/rtk-participants-stage-list_4.entry.js +1 -1
  177. package/dist/esm/rtk-participants.entry.js +1 -1
  178. package/dist/esm/rtk-pip-toggle.entry.js +1 -1
  179. package/dist/esm/rtk-sidebar-ui.entry.js +1 -1
  180. package/dist/esm/rtk-stage-toggle.entry.js +1 -1
  181. package/dist/esm/rtk-transcripts.entry.js +1 -1
  182. package/dist/esm/rtk-ui-provider.entry.js +1 -1
  183. package/dist/esm/rtk-waiting-screen.entry.js +1 -1
  184. package/dist/realtimekit-ui/index.esm.js +1 -1
  185. package/dist/realtimekit-ui/{p-a646f038.entry.js → p-0742c744.entry.js} +1 -1
  186. package/dist/realtimekit-ui/{p-09ce95b2.entry.js → p-1b3ffb5e.entry.js} +1 -1
  187. package/dist/realtimekit-ui/{p-b27db286.entry.js → p-1f144efb.entry.js} +1 -1
  188. package/dist/realtimekit-ui/{p-c6f6afcd.entry.js → p-2715643b.entry.js} +1 -1
  189. package/dist/realtimekit-ui/{p-01c014e4.entry.js → p-29ab5d68.entry.js} +1 -1
  190. package/dist/realtimekit-ui/{p-ac79ef88.entry.js → p-439c8ce4.entry.js} +1 -1
  191. package/dist/realtimekit-ui/p-4a7927d1.entry.js +1 -0
  192. package/dist/realtimekit-ui/{p-56df9c19.entry.js → p-4f3e5cb4.entry.js} +1 -1
  193. package/dist/realtimekit-ui/{p-401b9ed3.entry.js → p-5093081b.entry.js} +1 -1
  194. package/dist/realtimekit-ui/{p-20734a3a.entry.js → p-52e797c1.entry.js} +1 -1
  195. package/dist/realtimekit-ui/{p-d9c7c4d8.entry.js → p-55ba62c3.entry.js} +1 -1
  196. package/dist/realtimekit-ui/{p-de4ecd17.entry.js → p-5e3931a3.entry.js} +1 -1
  197. package/dist/realtimekit-ui/{p-e38967d0.entry.js → p-661b7281.entry.js} +1 -1
  198. package/dist/realtimekit-ui/{p-23e14ccd.entry.js → p-6cc9da9f.entry.js} +1 -1
  199. package/dist/realtimekit-ui/p-6d3b4996.entry.js +1 -0
  200. package/dist/realtimekit-ui/{p-b46d416b.entry.js → p-70de46f0.entry.js} +1 -1
  201. package/dist/realtimekit-ui/{p-d4ff2477.entry.js → p-77c92672.entry.js} +1 -1
  202. package/dist/realtimekit-ui/{p-ff89f0f6.entry.js → p-77e9a0cb.entry.js} +1 -1
  203. package/dist/realtimekit-ui/{p-6e0f43e4.entry.js → p-8c77aa57.entry.js} +1 -1
  204. package/dist/realtimekit-ui/{p-27751707.entry.js → p-8e7d8c30.entry.js} +1 -1
  205. package/dist/realtimekit-ui/{p-4bd89bff.entry.js → p-91bcabc0.entry.js} +1 -1
  206. package/dist/realtimekit-ui/{p-815d9724.entry.js → p-9913c4ca.entry.js} +1 -1
  207. package/dist/realtimekit-ui/p-D9EtbXLL.js +1 -0
  208. package/dist/realtimekit-ui/{p-47abb821.entry.js → p-a6ec2863.entry.js} +1 -1
  209. package/dist/realtimekit-ui/{p-80b42139.entry.js → p-b16313e9.entry.js} +1 -1
  210. package/dist/realtimekit-ui/{p-4ed011a1.entry.js → p-b918e87c.entry.js} +1 -1
  211. package/dist/realtimekit-ui/{p-dc7a28a6.entry.js → p-bac3c4fb.entry.js} +1 -1
  212. package/dist/realtimekit-ui/{p-21f69c50.entry.js → p-c317b4a0.entry.js} +1 -1
  213. package/dist/realtimekit-ui/{p-bcc42454.entry.js → p-d003eb81.entry.js} +1 -1
  214. package/dist/realtimekit-ui/{p-bcc20509.entry.js → p-d51ab494.entry.js} +1 -1
  215. package/dist/realtimekit-ui/{p-4add313e.entry.js → p-da2e626e.entry.js} +1 -1
  216. package/dist/realtimekit-ui/{p-ba7fb049.entry.js → p-e7a4954c.entry.js} +1 -1
  217. package/dist/realtimekit-ui/{p-e347e0d8.entry.js → p-ebdece22.entry.js} +1 -1
  218. package/dist/realtimekit-ui/{p-e8e6a1c8.entry.js → p-ee65922b.entry.js} +1 -1
  219. package/dist/realtimekit-ui/{p-da9c7efe.entry.js → p-ef030197.entry.js} +1 -1
  220. package/dist/realtimekit-ui/p-f27494e7.entry.js +1 -0
  221. package/dist/realtimekit-ui/{p-ce81ffaa.entry.js → p-f33e4112.entry.js} +1 -1
  222. package/dist/realtimekit-ui/{p-61032e04.entry.js → p-fa84f55a.entry.js} +1 -1
  223. package/dist/realtimekit-ui/realtimekit-ui.esm.js +1 -1
  224. package/dist/types/components/rtk-meeting-title/rtk-meeting-title.d.ts +5 -0
  225. package/package.json +1 -1
  226. package/dist/components/p-DxDYE5-a.js +0 -1
  227. package/dist/realtimekit-ui/p-6b387775.entry.js +0 -1
  228. package/dist/realtimekit-ui/p-DxDYE5-a.js +0 -1
  229. package/dist/realtimekit-ui/p-bf54cdd9.entry.js +0 -1
  230. package/dist/realtimekit-ui/p-cd5069ea.entry.js +0 -1
@@ -1 +1 @@
1
- import{p as t,H as e,h as r,d as s,t as a}from"./p-BBHQOrFK.js";import{c as o,e as n,i}from"./p-DhwysA2e.js";import"./p-DxDYE5-a.js";import"./p-C0vp-Q7v.js";import"./p-Dguuxuf6.js";import{S as c}from"./p-bRRQr4xn.js";import{d as p}from"./p-BYIBbfJ8.js";import{d}from"./p-DnkJztTd.js";var l=function(t,e,r,s){var a,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,r):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,r,s);else for(var i=t.length-1;i>=0;i--)(a=t[i])&&(n=(o<3?a(n):o>3?a(e,r,n):a(e,r))||n);return o>3&&n&&Object.defineProperty(e,r,n),n};const m=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.config=o(),this.icon=n,this.t=i(),this.iconPack=n,this.message=""}connectedCallback(){this.statesChanged(this.states)}getBreakoutRoomsMessage(t){var e;let r;return"connected-meeting"===(null==t?void 0:t.roomLeftState)&&(r=(null===(e=this.states.activeBreakoutRoomsManager)||void 0===e?void 0:e.destinationMeetingId)===this.meeting.connectedMeetings.parentMeeting.id?"breakout_rooms.move_reason.switch_main_room":"breakout_rooms.move_reason.switch_room"),r}statesChanged(t){if(null!=t)switch(null==t?void 0:t.roomLeftState){case"left":this.message="ended.left";break;case"kicked":this.message="ended.kicked";break;case"disconnected":this.message="ended.disconnected";break;case"rejected":this.message="ended.rejected";break;case"connected-meeting":this.message=this.getBreakoutRoomsMessage(t);break;case"unauthorized":this.message="ended.unauthorized";break;default:this.message="ended"}}renderBreakoutRoomScreen(){return r(s,null,r("div",{class:"ctr",part:"container"},r("rtk-icon",{icon:this.iconPack.breakout_rooms}),r("p",{part:"message",class:"breakout"},this.t(this.message))))}render(){if(!this.meeting)return null;const t=this.states;return"connected-meeting"===t.roomLeftState?this.renderBreakoutRoomScreen():r(s,null,r("div",{class:"ctr",part:"container"},r("rtk-logo",{meeting:this.meeting,config:this.config,part:"logo",t:this.t}),r("p",{part:"message"},this.t(this.message)),"disconnected"===(null==t?void 0:t.roomLeftState)&&r("span",{part:"description"},this.t("ended.network"))))}static get watchers(){return{states:[{statesChanged:0}]}}static get style(){return":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{height:100%;width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;display:flex;flex-direction:column;align-items:center;justify-content:center}.ctr{display:flex;flex-direction:column;align-items:center;gap:var(--rtk-space-8, 32px)}rtk-logo.loaded{height:var(--rtk-space-12, 48px)}.rejoin-button{margin-top:var(--rtk-space-4, 16px);margin-bottom:var(--rtk-space-4, 16px);padding-top:var(--rtk-space-6, 24px);padding-bottom:var(--rtk-space-6, 24px);padding-left:var(--rtk-space-16, 64px);padding-right:var(--rtk-space-16, 64px)}.rejoin-icon{margin-right:var(--rtk-space-2, 8px)}p{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))}p.breakout{font-size:20px;display:flex;flex-direction:column;align-items:center}p.breakout span{margin-top:var(--rtk-space-1, 4px);margin-bottom:var(--rtk-space-0, 0px);color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52))}span{margin-top:var(--rtk-space-4, 16px);margin-bottom:var(--rtk-space-4, 16px);font-size:14px}"}},[1,"rtk-ended-screen",{config:[16],size:[513],states:[16],t:[16],iconPack:[16],meeting:[16],icon:[32],message:[32]},void 0,{states:[{statesChanged:0}]}]);function g(){"undefined"!=typeof customElements&&["rtk-ended-screen","rtk-icon","rtk-logo"].forEach((t=>{switch(t){case"rtk-ended-screen":customElements.get(a(t))||customElements.define(a(t),m);break;case"rtk-icon":customElements.get(a(t))||p();break;case"rtk-logo":customElements.get(a(t))||d()}}))}l([c()],m.prototype,"config",void 0),l([c()],m.prototype,"states",void 0),l([c()],m.prototype,"t",void 0),l([c()],m.prototype,"iconPack",void 0),l([c()],m.prototype,"meeting",void 0),g();const k=m,u=g;export{k as RtkEndedScreen,u as defineCustomElement}
1
+ import{p as t,H as e,h as r,d as s,t as a}from"./p-BBHQOrFK.js";import{c as o,e as i,i as n}from"./p-DhwysA2e.js";import"./p-D9EtbXLL.js";import"./p-C0vp-Q7v.js";import"./p-Dguuxuf6.js";import{S as c}from"./p-bRRQr4xn.js";import{d as p}from"./p-BYIBbfJ8.js";import{d}from"./p-BueZc6Xo.js";var l=function(t,e,r,s){var a,o=arguments.length,i=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,r):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,s);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(i=(o<3?a(i):o>3?a(e,r,i):a(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i};const m=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.config=o(),this.icon=i,this.t=n(),this.iconPack=i,this.message=""}connectedCallback(){this.statesChanged(this.states)}getBreakoutRoomsMessage(t){var e;let r;return"connected-meeting"===(null==t?void 0:t.roomLeftState)&&(r=(null===(e=this.states.activeBreakoutRoomsManager)||void 0===e?void 0:e.destinationMeetingId)===this.meeting.connectedMeetings.parentMeeting.id?"breakout_rooms.move_reason.switch_main_room":"breakout_rooms.move_reason.switch_room"),r}statesChanged(t){if(null!=t)switch(null==t?void 0:t.roomLeftState){case"left":this.message="ended.left";break;case"kicked":this.message="ended.kicked";break;case"disconnected":this.message="ended.disconnected";break;case"rejected":this.message="ended.rejected";break;case"connected-meeting":this.message=this.getBreakoutRoomsMessage(t);break;case"unauthorized":this.message="ended.unauthorized";break;default:this.message="ended"}}renderBreakoutRoomScreen(){return r(s,null,r("div",{class:"ctr",part:"container"},r("rtk-icon",{icon:this.iconPack.breakout_rooms}),r("p",{part:"message",class:"breakout"},this.t(this.message))))}render(){if(!this.meeting)return null;const t=this.states;return"connected-meeting"===t.roomLeftState?this.renderBreakoutRoomScreen():r(s,null,r("div",{class:"ctr",part:"container"},r("rtk-logo",{meeting:this.meeting,config:this.config,part:"logo",t:this.t}),r("p",{part:"message"},this.t(this.message)),"disconnected"===(null==t?void 0:t.roomLeftState)&&r("span",{part:"description"},this.t("ended.network"))))}static get watchers(){return{states:[{statesChanged:0}]}}static get style(){return":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{height:100%;width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;display:flex;flex-direction:column;align-items:center;justify-content:center}.ctr{display:flex;flex-direction:column;align-items:center;gap:var(--rtk-space-8, 32px)}rtk-logo.loaded{height:var(--rtk-space-12, 48px)}.rejoin-button{margin-top:var(--rtk-space-4, 16px);margin-bottom:var(--rtk-space-4, 16px);padding-top:var(--rtk-space-6, 24px);padding-bottom:var(--rtk-space-6, 24px);padding-left:var(--rtk-space-16, 64px);padding-right:var(--rtk-space-16, 64px)}.rejoin-icon{margin-right:var(--rtk-space-2, 8px)}p{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))}p.breakout{font-size:20px;display:flex;flex-direction:column;align-items:center}p.breakout span{margin-top:var(--rtk-space-1, 4px);margin-bottom:var(--rtk-space-0, 0px);color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52))}span{margin-top:var(--rtk-space-4, 16px);margin-bottom:var(--rtk-space-4, 16px);font-size:14px}"}},[1,"rtk-ended-screen",{config:[16],size:[513],states:[16],t:[16],iconPack:[16],meeting:[16],icon:[32],message:[32]},void 0,{states:[{statesChanged:0}]}]);function g(){"undefined"!=typeof customElements&&["rtk-ended-screen","rtk-icon","rtk-logo"].forEach((t=>{switch(t){case"rtk-ended-screen":customElements.get(a(t))||customElements.define(a(t),m);break;case"rtk-icon":customElements.get(a(t))||p();break;case"rtk-logo":customElements.get(a(t))||d()}}))}l([c()],m.prototype,"config",void 0),l([c()],m.prototype,"states",void 0),l([c()],m.prototype,"t",void 0),l([c()],m.prototype,"iconPack",void 0),l([c()],m.prototype,"meeting",void 0),g();const k=m,u=g;export{k as RtkEndedScreen,u as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as e,c as o,h as r,d as c,t as s}from"./p-BBHQOrFK.js";import"./p-DxDYE5-a.js";import"./p-C0vp-Q7v.js";import{e as i,i as a}from"./p-DhwysA2e.js";import"./p-Dguuxuf6.js";import{S as n}from"./p-bRRQr4xn.js";import{d as p}from"./p-BYIBbfJ8.js";var d=function(t,e,o,r){var c,s=arguments.length,i=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(c=t[a])&&(i=(s<3?c(i):s>3?c(e,o,i):c(e,o))||i);return s>3&&i&&Object.defineProperty(e,o,i),i};const f=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.onDropCallback=o(this,"dropCallback",7),this.iconPack=i,this.t=a(),this.dropzoneActivated=!1}connectedCallback(){if(!this.hostEl)throw Error("hostEl prop is required");this.hostEl.addEventListener("dragover",(t=>{t.preventDefault(),this.dropzoneActivated=!0})),this.hostEl.addEventListener("dragleave",(()=>{this.dropzoneActivated=!1})),this.hostEl.addEventListener("drop",(t=>{t.preventDefault(),this.dropzoneActivated=!1,this.onDropCallback.emit(t)}))}render(){return r(c,{key:"31d5ca1c0b9612c257ca9fb2233c6c1d2a4d049f"},r("div",{key:"697c79cbd3c736b7efb890fddfca94c393b48d08",id:"dropzone",class:{active:this.dropzoneActivated},part:"dropzone"},r("rtk-icon",{key:"3fea26663f603965ef5dfc7d548cdcfc892bbc90",icon:this.iconPack.attach}),r("p",{key:"cab674da2e590d75ad20ca66661753cb52771925"},this.t("chat.send_attachment"))))}static get style(){return"#dropzone{position:absolute;top:var(--rtk-space-0, 0px);right:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);z-index:10;display:none;flex-direction:column;align-items:center;justify-content:center;--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-700, 255 255 255 / 0.64))}#dropzone.active{display:flex;animation:0.2s slide-up ease-in}"}},[1,"rtk-file-dropzone",{hostEl:[16],iconPack:[16],t:[16],dropzoneActivated:[32]}]);function l(){"undefined"!=typeof customElements&&["rtk-file-dropzone","rtk-icon"].forEach((t=>{switch(t){case"rtk-file-dropzone":customElements.get(s(t))||customElements.define(s(t),f);break;case"rtk-icon":customElements.get(s(t))||p()}}))}d([n()],f.prototype,"iconPack",void 0),d([n()],f.prototype,"t",void 0),l();const b=f,h=l;export{b as RtkFileDropzone,h as defineCustomElement}
1
+ import{p as t,H as e,c as o,h as r,d as c,t as s}from"./p-BBHQOrFK.js";import"./p-D9EtbXLL.js";import"./p-C0vp-Q7v.js";import{e as i,i as a}from"./p-DhwysA2e.js";import"./p-Dguuxuf6.js";import{S as n}from"./p-bRRQr4xn.js";import{d as p}from"./p-BYIBbfJ8.js";var d=function(t,e,o,r){var c,s=arguments.length,i=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(c=t[a])&&(i=(s<3?c(i):s>3?c(e,o,i):c(e,o))||i);return s>3&&i&&Object.defineProperty(e,o,i),i};const f=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.onDropCallback=o(this,"dropCallback",7),this.iconPack=i,this.t=a(),this.dropzoneActivated=!1}connectedCallback(){if(!this.hostEl)throw Error("hostEl prop is required");this.hostEl.addEventListener("dragover",(t=>{t.preventDefault(),this.dropzoneActivated=!0})),this.hostEl.addEventListener("dragleave",(()=>{this.dropzoneActivated=!1})),this.hostEl.addEventListener("drop",(t=>{t.preventDefault(),this.dropzoneActivated=!1,this.onDropCallback.emit(t)}))}render(){return r(c,{key:"31d5ca1c0b9612c257ca9fb2233c6c1d2a4d049f"},r("div",{key:"697c79cbd3c736b7efb890fddfca94c393b48d08",id:"dropzone",class:{active:this.dropzoneActivated},part:"dropzone"},r("rtk-icon",{key:"3fea26663f603965ef5dfc7d548cdcfc892bbc90",icon:this.iconPack.attach}),r("p",{key:"cab674da2e590d75ad20ca66661753cb52771925"},this.t("chat.send_attachment"))))}static get style(){return"#dropzone{position:absolute;top:var(--rtk-space-0, 0px);right:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);z-index:10;display:none;flex-direction:column;align-items:center;justify-content:center;--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-700, 255 255 255 / 0.64))}#dropzone.active{display:flex;animation:0.2s slide-up ease-in}"}},[1,"rtk-file-dropzone",{hostEl:[16],iconPack:[16],t:[16],dropzoneActivated:[32]}]);function l(){"undefined"!=typeof customElements&&["rtk-file-dropzone","rtk-icon"].forEach((t=>{switch(t){case"rtk-file-dropzone":customElements.get(s(t))||customElements.define(s(t),f);break;case"rtk-icon":customElements.get(s(t))||p()}}))}d([n()],f.prototype,"iconPack",void 0),d([n()],f.prototype,"t",void 0),l();const b=f,h=l;export{b as RtkFileDropzone,h as defineCustomElement}
@@ -1 +1 @@
1
- import{R as o,d as s}from"./p-CuRSxmeD.js";const m=o,p=s;export{m as RtkFileMessageView,p as defineCustomElement}
1
+ import{R as o,d as s}from"./p-CxE6v80l.js";const p=o,r=s;export{p as RtkFileMessageView,r as defineCustomElement}
@@ -1 +1 @@
1
- import{R as o,d as s}from"./p-gixOLeKl.js";const p=o,r=s;export{p as RtkFilePickerButton,r as defineCustomElement}
1
+ import{R as s,d as o}from"./p-tZ9CpAsl.js";const p=s,t=o;export{p as RtkFilePickerButton,t as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as i,c as s,h as e,d as r,t as a}from"./p-BBHQOrFK.js";import{c as n,e as o,i as h}from"./p-DhwysA2e.js";import{d as p}from"./p-t72veIFj.js";import{R as c}from"./p-CBJjerDR.js";import{a as l}from"./p-C0vp-Q7v.js";import{S as d}from"./p-bRRQr4xn.js";import{d as g}from"./p-CmmyVCoN.js";import{d as m}from"./p-D6vw6bT2.js";import{d as v}from"./p-CFBS-gbK.js";import{d as u}from"./p-CEK_XoGw.js";import{d as f}from"./p-BYIBbfJ8.js";import{d as k}from"./p-vqPkhXWC.js";import{d as x}from"./p-DhG2PF_5.js";import{d as b}from"./p-B0SC1Zj-.js";import{d as S}from"./p-DViKr-34.js";var y=function(t,i,s,e){var r,a=arguments.length,n=a<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,i,s,e);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(n=(a<3?r(n):a>3?r(i,s,n):r(i,s))||n);return a>3&&n&&Object.defineProperty(i,s,n),n};const C=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.stateUpdate=s(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=n(),this.iconPack=o,this.t=h(),this.gridSize=g,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=()=>{this.meeting&&this.updateActiveParticipants()},this.refreshParticipants=p((()=>{this.updateActiveParticipants()}),50),this.stageStatusListener=()=>{this.updateActiveParticipants(),this.showLiveStreamPlayer=l(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(!t)return;this.refreshParticipants.cancel(),this.participants=[],this.plugins=[];const{self:s,participants:e,plugins:r}=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==r||r.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.refreshParticipants),e.active.removeListener("participantJoined",this.refreshParticipants),e.active.removeListener("participantsUpdate",this.refreshParticipants),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,r,a;if(null!==i&&this.disconnectMeeting(i),null!=t){const{self:i,participants:n,plugins:o,stage:h}=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([...n.active.toArray(),...i.isPinned||this.hideSelf?[]:[i]]),this.pinnedParticipants=[...n.pinned.toArray(),...i.isPinned&&!this.hideSelf?[i]:[]],this.screenShareParticipants=n.joined.toArray().filter((t=>t.screenShareEnabled)),this.plugins=(null==o?void 0:o.active.toArray())||[],(null==p?void 0:p.stageEnabled)&&(this.canCurrentPeerHost=p.acceptStageRequests||"ALLOWED"===p.canProduceAudio||"ALLOWED"===p.canProduceVideo||"ALLOWED"===p.canProduceScreenshare,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==h||h.addListener("stageStatusUpdate",this.stageStatusListener),null==o||o.all.addListener("stateUpdate",this.onPluginStateUpdate),n.addListener("viewModeChanged",this.onViewModeChanged),n.active.addListener("participantLeft",this.refreshParticipants),null===(r=null==n?void 0:n.joined)||void 0===r||r.on("stageStatusUpdate",this.peerStageStatusListener),n.joined.addListener("screenShareUpdate",this.onScreenShareUpdate),n.active.addListener("participantJoined",this.refreshParticipants),n.active.addListener("participantsUpdate",this.refreshParticipants),n.pinned.addListener("participantJoined",this.onParticipantPinned),n.pinned.addListener("participantLeft",this.onParticipantUnpinned),(null===(a=t.stage)||void 0===a?void 0:a.status)&&this.stageStatusListener()}}overridesChanged(t){this.updateActiveParticipants()}screenShareParticipantsChanged(t){const i=t.length>0;!!this.states.activeScreenShare!==i&&(this.stateUpdate.emit({activeScreenShare:i}),this.states.activeScreenShare=i)}pluginsChanged(t){const i=t.length>0;!!this.states.activePlugin!==i&&(this.stateUpdate.emit({activePlugin:i}),this.states.activePlugin=i)}pinnedParticipantsChanged(t){const i=t.length>0;!!this.states.activeSpotlight!==i&&(this.stateUpdate.emit({activeSpotlight:i}),this.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","MANUAL"].includes(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(){var t,i,s,a;const n={meeting:this.meeting,size:this.size,states:this.states,config:this.config,iconPack:this.iconPack,t:this.t};if(this.invalidRoomStates.includes(this.roomState))return e(r,null,e("div",{class:"offline-grid"},e("rtk-icon",{icon:this.iconPack.join_stage,size:"xl"}),e("h3",null,this.t("disconnected")),e("p",null,this.t("disconnected.description"))));if("disconnected"===this.roomState){const n=null===(i=null===(t=this.meeting)||void 0===t?void 0:t.meta)||void 0===i?void 0:i.mediaState;if("connected"!==(null===(s=null==n?void 0:n.send)||void 0===s?void 0:s.state)||"connected"!==(null===(a=null==n?void 0:n.recv)||void 0===a?void 0:a.state))return e(r,null,e("div",{class:"offline-grid"},e("rtk-icon",{icon:this.iconPack.disconnected,size:"xl"}),e("h3",null,this.t("offline")),e("p",null,this.t("offline.description"))))}return"failed"===this.roomState?e(r,null,e("div",{class:"offline-grid"},e("rtk-icon",{icon:this.iconPack.disconnected,size:"xl"}),e("h3",null,this.t("failed")),e("p",null,this.t("failed.description")))):this.showLiveStreamPlayer?e(r,null,e("rtk-livestream-player",{meeting:this.meeting,size:this.size}),e("rtk-livestream-indicator",{meeting:this.meeting,size:"sm",t:this.t}),e("rtk-viewer-count",{meeting:this.meeting,variant:"embedded",t:this.t})):this.emptyStage?e(r,null,e("div",{class:"webinar-stage"},e("div",{class:"center"},this.canCurrentPeerHost&&e("div",{class:"ctr",part:"container"},e("p",{class:"message",part:"message"},this.t("stage.empty_host")),e("span",{class:"description",part:"description"},this.t("stage.empty_host_summary"))),!this.canCurrentPeerHost&&e("div",{class:"ctr",part:"container"},e("p",{class:"message",part:"message"},this.t("stage.empty_viewer")))))):e(r,null,e(c,{element:"rtk-grid",defaults:n,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}),e("rtk-livestream-indicator",{meeting:this.meeting,size:"sm",t:this.t}),e("rtk-viewer-count",{meeting:this.meeting,variant:"embedded",t:this.t}))}static get watchers(){return{meeting:[{meetingChanged:0}],overrides:[{overridesChanged:0}],screenShareParticipants:[{screenShareParticipantsChanged:0}],plugins:[{pluginsChanged:0}],pinnedParticipants:[{pinnedParticipantsChanged:0}]}}static get style(){return":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}}"}},[1,"rtk-grid",{layout:[513],aspectRatio:[513,"aspect-ratio"],meeting:[16],gap:[514],size:[513],states:[16],config:[16],iconPack:[16],t:[16],gridSize:[16],overrides:[8],participants:[32],pinnedParticipants:[32],screenShareParticipants:[32],plugins:[32],emptyStage:[32],showLiveStreamPlayer:[32],canCurrentPeerHost:[32],pipSupported:[32],pipEnabled:[32],hidden:[32],roomState:[32]},void 0,{meeting:[{meetingChanged:0}],overrides:[{overridesChanged:0}],screenShareParticipants:[{screenShareParticipantsChanged:0}],plugins:[{pluginsChanged:0}],pinnedParticipants:[{pinnedParticipantsChanged:0}]}]);function w(){"undefined"!=typeof customElements&&["rtk-grid","rtk-button","rtk-controlbar-button","rtk-fullscreen-toggle","rtk-icon","rtk-livestream-indicator","rtk-livestream-player","rtk-spinner","rtk-viewer-count"].forEach((t=>{switch(t){case"rtk-grid":customElements.get(a(t))||customElements.define(a(t),C);break;case"rtk-button":customElements.get(a(t))||m();break;case"rtk-controlbar-button":customElements.get(a(t))||v();break;case"rtk-fullscreen-toggle":customElements.get(a(t))||u();break;case"rtk-icon":customElements.get(a(t))||f();break;case"rtk-livestream-indicator":customElements.get(a(t))||k();break;case"rtk-livestream-player":customElements.get(a(t))||x();break;case"rtk-spinner":customElements.get(a(t))||b();break;case"rtk-viewer-count":customElements.get(a(t))||S()}}))}y([d()],C.prototype,"meeting",void 0),y([d()],C.prototype,"states",void 0),y([d()],C.prototype,"config",void 0),y([d()],C.prototype,"iconPack",void 0),y([d()],C.prototype,"t",void 0),w();const P=C,j=w;export{P as RtkGrid,j as defineCustomElement}
1
+ import{p as t,H as i,c as s,h as e,d as r,t as a}from"./p-BBHQOrFK.js";import{c as n,e as o,i as h}from"./p-DhwysA2e.js";import{d as p}from"./p-t72veIFj.js";import{R as c}from"./p-CBJjerDR.js";import{a as l}from"./p-C0vp-Q7v.js";import{S as d}from"./p-bRRQr4xn.js";import{d as g}from"./p-CmmyVCoN.js";import{d as m}from"./p-D6vw6bT2.js";import{d as v}from"./p-CFBS-gbK.js";import{d as u}from"./p-CEK_XoGw.js";import{d as f}from"./p-BYIBbfJ8.js";import{d as k}from"./p-B5XTxQov.js";import{d as x}from"./p-ukr4mPVB.js";import{d as b}from"./p-B0SC1Zj-.js";import{d as S}from"./p-DViKr-34.js";var y=function(t,i,s,e){var r,a=arguments.length,n=a<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,i,s,e);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(n=(a<3?r(n):a>3?r(i,s,n):r(i,s))||n);return a>3&&n&&Object.defineProperty(i,s,n),n};const C=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.stateUpdate=s(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=n(),this.iconPack=o,this.t=h(),this.gridSize=g,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=()=>{this.meeting&&this.updateActiveParticipants()},this.refreshParticipants=p((()=>{this.updateActiveParticipants()}),50),this.stageStatusListener=()=>{this.updateActiveParticipants(),this.showLiveStreamPlayer=l(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(!t)return;this.refreshParticipants.cancel(),this.participants=[],this.plugins=[];const{self:s,participants:e,plugins:r}=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==r||r.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.refreshParticipants),e.active.removeListener("participantJoined",this.refreshParticipants),e.active.removeListener("participantsUpdate",this.refreshParticipants),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,r,a;if(null!==i&&this.disconnectMeeting(i),null!=t){const{self:i,participants:n,plugins:o,stage:h}=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([...n.active.toArray(),...i.isPinned||this.hideSelf?[]:[i]]),this.pinnedParticipants=[...n.pinned.toArray(),...i.isPinned&&!this.hideSelf?[i]:[]],this.screenShareParticipants=n.joined.toArray().filter((t=>t.screenShareEnabled)),this.plugins=(null==o?void 0:o.active.toArray())||[],(null==p?void 0:p.stageEnabled)&&(this.canCurrentPeerHost=p.acceptStageRequests||"ALLOWED"===p.canProduceAudio||"ALLOWED"===p.canProduceVideo||"ALLOWED"===p.canProduceScreenshare,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==h||h.addListener("stageStatusUpdate",this.stageStatusListener),null==o||o.all.addListener("stateUpdate",this.onPluginStateUpdate),n.addListener("viewModeChanged",this.onViewModeChanged),n.active.addListener("participantLeft",this.refreshParticipants),null===(r=null==n?void 0:n.joined)||void 0===r||r.on("stageStatusUpdate",this.peerStageStatusListener),n.joined.addListener("screenShareUpdate",this.onScreenShareUpdate),n.active.addListener("participantJoined",this.refreshParticipants),n.active.addListener("participantsUpdate",this.refreshParticipants),n.pinned.addListener("participantJoined",this.onParticipantPinned),n.pinned.addListener("participantLeft",this.onParticipantUnpinned),(null===(a=t.stage)||void 0===a?void 0:a.status)&&this.stageStatusListener()}}overridesChanged(t){this.updateActiveParticipants()}screenShareParticipantsChanged(t){const i=t.length>0;!!this.states.activeScreenShare!==i&&(this.stateUpdate.emit({activeScreenShare:i}),this.states.activeScreenShare=i)}pluginsChanged(t){const i=t.length>0;!!this.states.activePlugin!==i&&(this.stateUpdate.emit({activePlugin:i}),this.states.activePlugin=i)}pinnedParticipantsChanged(t){const i=t.length>0;!!this.states.activeSpotlight!==i&&(this.stateUpdate.emit({activeSpotlight:i}),this.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","MANUAL"].includes(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(){var t,i,s,a;const n={meeting:this.meeting,size:this.size,states:this.states,config:this.config,iconPack:this.iconPack,t:this.t};if(this.invalidRoomStates.includes(this.roomState))return e(r,null,e("div",{class:"offline-grid"},e("rtk-icon",{icon:this.iconPack.join_stage,size:"xl"}),e("h3",null,this.t("disconnected")),e("p",null,this.t("disconnected.description"))));if("disconnected"===this.roomState){const n=null===(i=null===(t=this.meeting)||void 0===t?void 0:t.meta)||void 0===i?void 0:i.mediaState;if("connected"!==(null===(s=null==n?void 0:n.send)||void 0===s?void 0:s.state)||"connected"!==(null===(a=null==n?void 0:n.recv)||void 0===a?void 0:a.state))return e(r,null,e("div",{class:"offline-grid"},e("rtk-icon",{icon:this.iconPack.disconnected,size:"xl"}),e("h3",null,this.t("offline")),e("p",null,this.t("offline.description"))))}return"failed"===this.roomState?e(r,null,e("div",{class:"offline-grid"},e("rtk-icon",{icon:this.iconPack.disconnected,size:"xl"}),e("h3",null,this.t("failed")),e("p",null,this.t("failed.description")))):this.showLiveStreamPlayer?e(r,null,e("rtk-livestream-player",{meeting:this.meeting,size:this.size}),e("rtk-livestream-indicator",{meeting:this.meeting,size:"sm",t:this.t}),e("rtk-viewer-count",{meeting:this.meeting,variant:"embedded",t:this.t})):this.emptyStage?e(r,null,e("div",{class:"webinar-stage"},e("div",{class:"center"},this.canCurrentPeerHost&&e("div",{class:"ctr",part:"container"},e("p",{class:"message",part:"message"},this.t("stage.empty_host")),e("span",{class:"description",part:"description"},this.t("stage.empty_host_summary"))),!this.canCurrentPeerHost&&e("div",{class:"ctr",part:"container"},e("p",{class:"message",part:"message"},this.t("stage.empty_viewer")))))):e(r,null,e(c,{element:"rtk-grid",defaults:n,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}),e("rtk-livestream-indicator",{meeting:this.meeting,size:"sm",t:this.t}),e("rtk-viewer-count",{meeting:this.meeting,variant:"embedded",t:this.t}))}static get watchers(){return{meeting:[{meetingChanged:0}],overrides:[{overridesChanged:0}],screenShareParticipants:[{screenShareParticipantsChanged:0}],plugins:[{pluginsChanged:0}],pinnedParticipants:[{pinnedParticipantsChanged:0}]}}static get style(){return":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}}"}},[1,"rtk-grid",{layout:[513],aspectRatio:[513,"aspect-ratio"],meeting:[16],gap:[514],size:[513],states:[16],config:[16],iconPack:[16],t:[16],gridSize:[16],overrides:[8],participants:[32],pinnedParticipants:[32],screenShareParticipants:[32],plugins:[32],emptyStage:[32],showLiveStreamPlayer:[32],canCurrentPeerHost:[32],pipSupported:[32],pipEnabled:[32],hidden:[32],roomState:[32]},void 0,{meeting:[{meetingChanged:0}],overrides:[{overridesChanged:0}],screenShareParticipants:[{screenShareParticipantsChanged:0}],plugins:[{pluginsChanged:0}],pinnedParticipants:[{pinnedParticipantsChanged:0}]}]);function w(){"undefined"!=typeof customElements&&["rtk-grid","rtk-button","rtk-controlbar-button","rtk-fullscreen-toggle","rtk-icon","rtk-livestream-indicator","rtk-livestream-player","rtk-spinner","rtk-viewer-count"].forEach((t=>{switch(t){case"rtk-grid":customElements.get(a(t))||customElements.define(a(t),C);break;case"rtk-button":customElements.get(a(t))||m();break;case"rtk-controlbar-button":customElements.get(a(t))||v();break;case"rtk-fullscreen-toggle":customElements.get(a(t))||u();break;case"rtk-icon":customElements.get(a(t))||f();break;case"rtk-livestream-indicator":customElements.get(a(t))||k();break;case"rtk-livestream-player":customElements.get(a(t))||x();break;case"rtk-spinner":customElements.get(a(t))||b();break;case"rtk-viewer-count":customElements.get(a(t))||S()}}))}y([d()],C.prototype,"meeting",void 0),y([d()],C.prototype,"states",void 0),y([d()],C.prototype,"config",void 0),y([d()],C.prototype,"iconPack",void 0),y([d()],C.prototype,"t",void 0),w();const j=C,P=w;export{j as RtkGrid,P as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as e,h as a,d as i,t as s}from"./p-BBHQOrFK.js";import"./p-DxDYE5-a.js";import{c as r,e as n,i as o}from"./p-DhwysA2e.js";import"./p-C0vp-Q7v.js";import"./p-Dguuxuf6.js";import{R as c}from"./p-CBJjerDR.js";import{S as d}from"./p-bRRQr4xn.js";var p=function(t,e,a,i){var s,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,a,i);else for(var o=t.length-1;o>=0;o--)(s=t[o])&&(n=(r<3?s(n):r>3?s(e,a,n):s(e,a))||n);return r>3&&n&&Object.defineProperty(e,a,n),n};const f=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.variant="solid",this.disableRender=!1,this.config=r(),this.iconPack=n,this.t=o()}render(){return a(i,{key:"a323f95dac8cde8fdb77b1ecb0950402b7d418bb"},!this.disableRender&&a(c,{key:"a7beb145a76f2f879af3f54c9ec08317865b17d2",element:"rtk-header",defaults:{meeting:this.meeting,config:this.config,states:this.states,t:this.t,iconPack:this.iconPack,size:this.size},onlyChildren:!0}),a("slot",{key:"5bee25d9949611736d9c772e438314655ab8ae58"}))}static get style(){return":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}}"}},[257,"rtk-header",{variant:[513],disableRender:[4,"disable-render"],meeting:[16],config:[16],states:[16],iconPack:[16],t:[16],size:[513]}]);function l(){"undefined"!=typeof customElements&&["rtk-header"].forEach((t=>{"rtk-header"===t&&(customElements.get(s(t))||customElements.define(s(t),f))}))}p([d()],f.prototype,"meeting",void 0),p([d()],f.prototype,"config",void 0),p([d()],f.prototype,"states",void 0),p([d()],f.prototype,"iconPack",void 0),p([d()],f.prototype,"t",void 0),l();const h=f,m=l;export{h as RtkHeader,m as defineCustomElement}
1
+ import{p as t,H as e,h as a,d as i,t as s}from"./p-BBHQOrFK.js";import"./p-D9EtbXLL.js";import{c as r,e as n,i as o}from"./p-DhwysA2e.js";import"./p-C0vp-Q7v.js";import"./p-Dguuxuf6.js";import{R as c}from"./p-CBJjerDR.js";import{S as d}from"./p-bRRQr4xn.js";var p=function(t,e,a,i){var s,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,a,i);else for(var o=t.length-1;o>=0;o--)(s=t[o])&&(n=(r<3?s(n):r>3?s(e,a,n):s(e,a))||n);return r>3&&n&&Object.defineProperty(e,a,n),n};const f=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.variant="solid",this.disableRender=!1,this.config=r(),this.iconPack=n,this.t=o()}render(){return a(i,{key:"a323f95dac8cde8fdb77b1ecb0950402b7d418bb"},!this.disableRender&&a(c,{key:"a7beb145a76f2f879af3f54c9ec08317865b17d2",element:"rtk-header",defaults:{meeting:this.meeting,config:this.config,states:this.states,t:this.t,iconPack:this.iconPack,size:this.size},onlyChildren:!0}),a("slot",{key:"5bee25d9949611736d9c772e438314655ab8ae58"}))}static get style(){return":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}}"}},[257,"rtk-header",{variant:[513],disableRender:[4,"disable-render"],meeting:[16],config:[16],states:[16],iconPack:[16],t:[16],size:[513]}]);function l(){"undefined"!=typeof customElements&&["rtk-header"].forEach((t=>{"rtk-header"===t&&(customElements.get(s(t))||customElements.define(s(t),f))}))}p([d()],f.prototype,"meeting",void 0),p([d()],f.prototype,"config",void 0),p([d()],f.prototype,"states",void 0),p([d()],f.prototype,"iconPack",void 0),p([d()],f.prototype,"t",void 0),l();const h=f,m=l;export{h as RtkHeader,m as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as e,h as r,d as o,t as a}from"./p-BBHQOrFK.js";import"./p-DxDYE5-a.js";import{c as i,e as n,i as s}from"./p-DhwysA2e.js";import"./p-C0vp-Q7v.js";import"./p-Dguuxuf6.js";import{S as c}from"./p-bRRQr4xn.js";import{d as l}from"./p-BYIBbfJ8.js";import{d}from"./p-DnkJztTd.js";import{d as p}from"./p-B0SC1Zj-.js";var g=function(t,e,r,o){var a,i=arguments.length,n=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,r,o);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(n=(i<3?a(n):i>3?a(e,r,n):a(e,r))||n);return i>3&&n&&Object.defineProperty(e,r,n),n};const k=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.config=i(),this.iconPack=n,this.t=s(),this.socketStateUpdate=({state:t})=>{var e;this.connectionState=t,"connected"===t&&((null===(e=this.states)||void 0===e?void 0:e.preJoinError)||(this.preJoinError=void 0))}}connectedCallback(){this.meetingChanged(this.meeting,void 0),this.statesChanged(this.states)}disconnectedCallback(){var t,e;null===(e=null===(t=this.meeting)||void 0===t?void 0:t.meta)||void 0===e||e.removeListener("socketConnectionUpdate",this.socketStateUpdate)}meetingChanged(t,e){var r,o,a,i;null===(r=null==e?void 0:e.meta)||void 0===r||r.removeListener("socketConnectionUpdate",this.socketStateUpdate),t&&(this.connectionState=null===(a=null===(o=t.meta)||void 0===o?void 0:o.socketState)||void 0===a?void 0:a.state,null===(i=t.meta)||void 0===i||i.addListener("socketConnectionUpdate",this.socketStateUpdate))}statesChanged(t){this.preJoinError=null==t?void 0:t.preJoinError}render(){var t,e;const a=null===(t=this.preJoinError)||void 0===t?void 0:t.message,i=null===(e=this.preJoinError)||void 0===e?void 0:e.code,n=!!this.connectionState&&"connected"!==this.connectionState&&!a,s=a||this.t("failed"===this.connectionState?"network.lost_extended":"network.lost");return r(o,{key:"5fbe382c783b15c48e8eeed8bed062e6a80bffca"},r("slot",{key:"45e242986aad838894c2f27292f163d62367398c"},r("div",{key:"7d67aec81786055ece1ab723628a8d574497a89a",class:"ctr",part:"container"},r("rtk-logo",{key:"4619a800a8a28678d7872a0c246a92d1a08ec359",meeting:this.meeting,config:this.config,t:this.t,part:"logo"}),a||n?r("div",{class:"error-state"},r("div",{class:"no-network-badge",part:"network-badge",role:"alert"},r("rtk-icon",{size:"md",variant:"danger",icon:this.iconPack.disconnected,part:"network-badge-icon"}),s),this.meeting&&a&&r("a",{class:"troubleshoot-link",href:"https://test.realtime.cloudflare.com?authToken="+this.meeting.__internals__.authToken,target:"_blank",rel:"noopener noreferrer"},this.t("network.troubleshoot")),i&&r("span",{class:"error-code",part:"error-code"},this.t("join.error_code"),": ",i)):r("rtk-spinner",{"aria-label":"Idle, waiting for meeting data",part:"spinner",iconPack:this.iconPack}))))}static get watchers(){return{meeting:[{meetingChanged:0}],states:[{statesChanged:0}]}}static get style(){return":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{height:100%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}.ctr{display:flex;flex-direction:column;align-items:center;gap:var(--rtk-space-8, 32px)}.no-network-badge{margin-top:var(--rtk-space-2, 8px);display:flex;width:100%;flex-direction:row;align-items:center;justify-content:flex-start;border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));background-color:rgba(var(--rtk-colors-danger, 255 45 45) / 0.1);padding-top:var(--rtk-space-1, 4px);padding-bottom:var(--rtk-space-1, 4px);font-size:12px;color:rgba(var(--rtk-colors-danger, 255 45 45) / 0.75)}.no-network-badge rtk-icon{margin-left:var(--rtk-space-2, 8px);margin-right:var(--rtk-space-2, 8px)}.error-state{display:flex;width:100%;flex-direction:column;align-items:center}.troubleshoot-link{margin-top:var(--rtk-space-1, 4px);font-size:12px;--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-400, 53 110 253) / var(--tw-text-opacity));text-decoration-line:underline;text-underline-offset:2px}.troubleshoot-link:hover{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-text-opacity))}.error-code{margin-top:var(--rtk-space-1, 4px);font-size:10px;color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52))}rtk-logo.loaded{height:var(--rtk-space-12, 48px)}rtk-spinner{height:var(--rtk-space-12, 48px);width:var(--rtk-space-12, 48px);--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-text-opacity))}"}},[257,"rtk-idle-screen",{meeting:[16],states:[16],config:[16],iconPack:[16],t:[16],preJoinError:[32],connectionState:[32]},void 0,{meeting:[{meetingChanged:0}],states:[{statesChanged:0}]}]);function h(){"undefined"!=typeof customElements&&["rtk-idle-screen","rtk-icon","rtk-logo","rtk-spinner"].forEach((t=>{switch(t){case"rtk-idle-screen":customElements.get(a(t))||customElements.define(a(t),k);break;case"rtk-icon":customElements.get(a(t))||l();break;case"rtk-logo":customElements.get(a(t))||d();break;case"rtk-spinner":customElements.get(a(t))||p()}}))}g([c()],k.prototype,"meeting",void 0),g([c()],k.prototype,"states",void 0),g([c()],k.prototype,"config",void 0),g([c()],k.prototype,"iconPack",void 0),g([c()],k.prototype,"t",void 0),h();const v=k,f=h;export{v as RtkIdleScreen,f as defineCustomElement}
1
+ import{p as t,H as e,h as r,d as o,t as a}from"./p-BBHQOrFK.js";import"./p-D9EtbXLL.js";import{c as i,e as n,i as s}from"./p-DhwysA2e.js";import"./p-C0vp-Q7v.js";import"./p-Dguuxuf6.js";import{S as c}from"./p-bRRQr4xn.js";import{d as l}from"./p-BYIBbfJ8.js";import{d}from"./p-BueZc6Xo.js";import{d as p}from"./p-B0SC1Zj-.js";var g=function(t,e,r,o){var a,i=arguments.length,n=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,r,o);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(n=(i<3?a(n):i>3?a(e,r,n):a(e,r))||n);return i>3&&n&&Object.defineProperty(e,r,n),n};const k=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.config=i(),this.iconPack=n,this.t=s(),this.socketStateUpdate=({state:t})=>{var e;this.connectionState=t,"connected"===t&&((null===(e=this.states)||void 0===e?void 0:e.preJoinError)||(this.preJoinError=void 0))}}connectedCallback(){this.meetingChanged(this.meeting,void 0),this.statesChanged(this.states)}disconnectedCallback(){var t,e;null===(e=null===(t=this.meeting)||void 0===t?void 0:t.meta)||void 0===e||e.removeListener("socketConnectionUpdate",this.socketStateUpdate)}meetingChanged(t,e){var r,o,a,i;null===(r=null==e?void 0:e.meta)||void 0===r||r.removeListener("socketConnectionUpdate",this.socketStateUpdate),t&&(this.connectionState=null===(a=null===(o=t.meta)||void 0===o?void 0:o.socketState)||void 0===a?void 0:a.state,null===(i=t.meta)||void 0===i||i.addListener("socketConnectionUpdate",this.socketStateUpdate))}statesChanged(t){this.preJoinError=null==t?void 0:t.preJoinError}render(){var t,e;const a=null===(t=this.preJoinError)||void 0===t?void 0:t.message,i=null===(e=this.preJoinError)||void 0===e?void 0:e.code,n=!!this.connectionState&&"connected"!==this.connectionState&&!a,s=a||this.t("failed"===this.connectionState?"network.lost_extended":"network.lost");return r(o,{key:"5fbe382c783b15c48e8eeed8bed062e6a80bffca"},r("slot",{key:"45e242986aad838894c2f27292f163d62367398c"},r("div",{key:"7d67aec81786055ece1ab723628a8d574497a89a",class:"ctr",part:"container"},r("rtk-logo",{key:"4619a800a8a28678d7872a0c246a92d1a08ec359",meeting:this.meeting,config:this.config,t:this.t,part:"logo"}),a||n?r("div",{class:"error-state"},r("div",{class:"no-network-badge",part:"network-badge",role:"alert"},r("rtk-icon",{size:"md",variant:"danger",icon:this.iconPack.disconnected,part:"network-badge-icon"}),s),this.meeting&&a&&r("a",{class:"troubleshoot-link",href:"https://test.realtime.cloudflare.com?authToken="+this.meeting.__internals__.authToken,target:"_blank",rel:"noopener noreferrer"},this.t("network.troubleshoot")),i&&r("span",{class:"error-code",part:"error-code"},this.t("join.error_code"),": ",i)):r("rtk-spinner",{"aria-label":"Idle, waiting for meeting data",part:"spinner",iconPack:this.iconPack}))))}static get watchers(){return{meeting:[{meetingChanged:0}],states:[{statesChanged:0}]}}static get style(){return":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{height:100%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}.ctr{display:flex;flex-direction:column;align-items:center;gap:var(--rtk-space-8, 32px)}.no-network-badge{margin-top:var(--rtk-space-2, 8px);display:flex;width:100%;flex-direction:row;align-items:center;justify-content:flex-start;border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));background-color:rgba(var(--rtk-colors-danger, 255 45 45) / 0.1);padding-top:var(--rtk-space-1, 4px);padding-bottom:var(--rtk-space-1, 4px);font-size:12px;color:rgba(var(--rtk-colors-danger, 255 45 45) / 0.75)}.no-network-badge rtk-icon{margin-left:var(--rtk-space-2, 8px);margin-right:var(--rtk-space-2, 8px)}.error-state{display:flex;width:100%;flex-direction:column;align-items:center}.troubleshoot-link{margin-top:var(--rtk-space-1, 4px);font-size:12px;--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-400, 53 110 253) / var(--tw-text-opacity));text-decoration-line:underline;text-underline-offset:2px}.troubleshoot-link:hover{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-text-opacity))}.error-code{margin-top:var(--rtk-space-1, 4px);font-size:10px;color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52))}rtk-logo.loaded{height:var(--rtk-space-12, 48px)}rtk-spinner{height:var(--rtk-space-12, 48px);width:var(--rtk-space-12, 48px);--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-text-opacity))}"}},[257,"rtk-idle-screen",{meeting:[16],states:[16],config:[16],iconPack:[16],t:[16],preJoinError:[32],connectionState:[32]},void 0,{meeting:[{meetingChanged:0}],states:[{statesChanged:0}]}]);function h(){"undefined"!=typeof customElements&&["rtk-idle-screen","rtk-icon","rtk-logo","rtk-spinner"].forEach((t=>{switch(t){case"rtk-idle-screen":customElements.get(a(t))||customElements.define(a(t),k);break;case"rtk-icon":customElements.get(a(t))||l();break;case"rtk-logo":customElements.get(a(t))||d();break;case"rtk-spinner":customElements.get(a(t))||p()}}))}g([c()],k.prototype,"meeting",void 0),g([c()],k.prototype,"states",void 0),g([c()],k.prototype,"config",void 0),g([c()],k.prototype,"iconPack",void 0),g([c()],k.prototype,"t",void 0),h();const v=k,f=h;export{v as RtkIdleScreen,f as defineCustomElement}
@@ -1 +1 @@
1
- import{R as o,d as s}from"./p-DZcwJOUW.js";const p=o,r=s;export{p as RtkImageMessageView,r as defineCustomElement}
1
+ import{R as o,d as s}from"./p-hPdGZ_Bf.js";const p=o,r=s;export{p as RtkImageMessageView,r as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as o,h as r,d as e,t as a}from"./p-BBHQOrFK.js";import{S as i}from"./p-bRRQr4xn.js";import"./p-DxDYE5-a.js";import"./p-C0vp-Q7v.js";import{e as s}from"./p-DhwysA2e.js";import"./p-Dguuxuf6.js";import{d as c}from"./p-BYIBbfJ8.js";const p=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.iconPack=s}render(){return r(e,{key:"ff8e44d0644f3a81e71ec3595f109c396effd80e"},r("div",{key:"9b07fcd50ec2050f65008ad447b42fe0a2431fba",class:"tooltip-container"},r("rtk-icon",{key:"09393761a1ee443f54d08034c451397adf05c0a2",icon:this.iconPack.info,size:"sm"}),r("div",{key:"edcc65636e3888864a4f619b34929a494a748b43",class:"tooltip"},r("slot",{key:"298db1c52802862d8d1da4a3b9cfc33e3695163d",name:"tootlip-text"}))))}static get style(){return":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}"}},[257,"rtk-information-tooltip",{iconPack:[16]}]);function n(){"undefined"!=typeof customElements&&["rtk-information-tooltip","rtk-icon"].forEach((t=>{switch(t){case"rtk-information-tooltip":customElements.get(a(t))||customElements.define(a(t),p);break;case"rtk-icon":customElements.get(a(t))||c()}}))}(function(t,o,r,e){var a,i=arguments.length,s=i<3?o:null===e?e=Object.getOwnPropertyDescriptor(o,r):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,o,r,e);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(s=(i<3?a(s):i>3?a(o,r,s):a(o,r))||s);i>3&&s&&Object.defineProperty(o,r,s)})([i()],p.prototype,"iconPack",void 0),n();const l=p,d=n;export{l as RtkInformationTooltip,d as defineCustomElement}
1
+ import{p as t,H as o,h as r,d as e,t as a}from"./p-BBHQOrFK.js";import{S as i}from"./p-bRRQr4xn.js";import"./p-D9EtbXLL.js";import"./p-C0vp-Q7v.js";import{e as s}from"./p-DhwysA2e.js";import"./p-Dguuxuf6.js";import{d as c}from"./p-BYIBbfJ8.js";const p=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.iconPack=s}render(){return r(e,{key:"ff8e44d0644f3a81e71ec3595f109c396effd80e"},r("div",{key:"9b07fcd50ec2050f65008ad447b42fe0a2431fba",class:"tooltip-container"},r("rtk-icon",{key:"09393761a1ee443f54d08034c451397adf05c0a2",icon:this.iconPack.info,size:"sm"}),r("div",{key:"edcc65636e3888864a4f619b34929a494a748b43",class:"tooltip"},r("slot",{key:"298db1c52802862d8d1da4a3b9cfc33e3695163d",name:"tootlip-text"}))))}static get style(){return":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}"}},[257,"rtk-information-tooltip",{iconPack:[16]}]);function n(){"undefined"!=typeof customElements&&["rtk-information-tooltip","rtk-icon"].forEach((t=>{switch(t){case"rtk-information-tooltip":customElements.get(a(t))||customElements.define(a(t),p);break;case"rtk-icon":customElements.get(a(t))||c()}}))}(function(t,o,r,e){var a,i=arguments.length,s=i<3?o:null===e?e=Object.getOwnPropertyDescriptor(o,r):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,o,r,e);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(s=(i<3?a(s):i>3?a(o,r,s):a(o,r))||s);i>3&&s&&Object.defineProperty(o,r,s)})([i()],p.prototype,"iconPack",void 0),n();const l=p,d=n;export{l as RtkInformationTooltip,d as defineCustomElement}
@@ -1 +1 @@
1
- import{R as o,d as s}from"./p-vqPkhXWC.js";const p=o,r=s;export{p as RtkLivestreamIndicator,r as defineCustomElement}
1
+ import{R as o,d as s}from"./p-B5XTxQov.js";const p=o,r=s;export{p as RtkLivestreamIndicator,r as defineCustomElement}
@@ -1 +1 @@
1
- import{R as o,d as s}from"./p-DhG2PF_5.js";const p=o,r=s;export{p as RtkLivestreamPlayer,r as defineCustomElement}
1
+ import{R as o,d as r}from"./p-ukr4mPVB.js";const s=o,m=r;export{s as RtkLivestreamPlayer,m as defineCustomElement}
@@ -1 +1 @@
1
- import{R as o,d as s}from"./p-DnkJztTd.js";const t=o,p=s;export{t as RtkLogo,p as defineCustomElement}
1
+ import{R as o,d as s}from"./p-BueZc6Xo.js";const p=o,r=s;export{p as RtkLogo,r as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as e,h as i,d as o,t as s}from"./p-BBHQOrFK.js";import{e as n,i as r}from"./p-DhwysA2e.js";import{S as a}from"./p-bRRQr4xn.js";import{d as l}from"./p-DHSRRtn3.js";var c=function(t,e,i,o){var s,n=arguments.length,r=n<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 a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const p=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.iconPack=n,this.t=r()}render(){var t;const e=null===(t=this.meeting)||void 0===t?void 0:t.meta.meetingTitle;return null==e?i(o,{"data-hidden":!0}):i(o,{role:"banner","aria-label":e},i("rtk-tooltip",{label:e,part:"tooltip"},i("div",{class:"title",part:"title"},e)))}static get style(){return":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{-webkit-user-select:none;-moz-user-select:none;user-select:none;font-size:16px;color:rgb(var(--rtk-colors-text-1000, 255 255 255))}:host([data-hidden]){display:none}.title{text-align:center;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}:host([size='sm']){font-size:12px}"}},[1,"rtk-meeting-title",{meeting:[16],iconPack:[16],t:[16]}]);function m(){"undefined"!=typeof customElements&&["rtk-meeting-title","rtk-tooltip"].forEach((t=>{switch(t){case"rtk-meeting-title":customElements.get(s(t))||customElements.define(s(t),p);break;case"rtk-tooltip":customElements.get(s(t))||l()}}))}c([a()],p.prototype,"meeting",void 0),c([a()],p.prototype,"iconPack",void 0),c([a()],p.prototype,"t",void 0),m();const f=p,d=m;export{f as RtkMeetingTitle,d as defineCustomElement}
1
+ import{p as t,H as e,h as i,d as n,t as o}from"./p-BBHQOrFK.js";import{e as s,i as l}from"./p-DhwysA2e.js";import{S as r}from"./p-bRRQr4xn.js";import{d as a}from"./p-DHSRRtn3.js";var c=function(t,e,i,n){var o,s=arguments.length,l=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(l=(s<3?o(l):s>3?o(e,i,l):o(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};const d=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.iconPack=s,this.t=l(),this.titleUpdateListener=({meetingTitle:t})=>{this.meetingTitle=t}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){var t,e;null===(e=null===(t=this.meeting)||void 0===t?void 0:t.meta)||void 0===e||e.removeListener("meetingTitleUpdate",this.titleUpdateListener)}meetingChanged(t,e){var i,n,o,s;null===(i=null==e?void 0:e.meta)||void 0===i||i.removeListener("meetingTitleUpdate",this.titleUpdateListener),this.meetingTitle=null===(n=null==t?void 0:t.meta)||void 0===n?void 0:n.meetingTitle,null===(o=null==t?void 0:t.meta)||void 0===o||o.removeListener("meetingTitleUpdate",this.titleUpdateListener),null===(s=null==t?void 0:t.meta)||void 0===s||s.addListener("meetingTitleUpdate",this.titleUpdateListener)}render(){const t=this.meetingTitle;return null==t?i(n,{"data-hidden":!0}):i(n,{role:"banner","aria-label":t},i("rtk-tooltip",{label:t,part:"tooltip"},i("div",{class:"title",part:"title"},t)))}static get watchers(){return{meeting:[{meetingChanged:0}]}}static get style(){return":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{-webkit-user-select:none;-moz-user-select:none;user-select:none;font-size:16px;color:rgb(var(--rtk-colors-text-1000, 255 255 255))}:host([data-hidden]){display:none}.title{text-align:center;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}:host([size='sm']){font-size:12px}"}},[1,"rtk-meeting-title",{meeting:[16],iconPack:[16],t:[16],meetingTitle:[32]},void 0,{meeting:[{meetingChanged:0}]}]);function m(){"undefined"!=typeof customElements&&["rtk-meeting-title","rtk-tooltip"].forEach((t=>{switch(t){case"rtk-meeting-title":customElements.get(o(t))||customElements.define(o(t),d);break;case"rtk-tooltip":customElements.get(o(t))||a()}}))}c([r()],d.prototype,"meeting",void 0),c([r()],d.prototype,"iconPack",void 0),c([r()],d.prototype,"t",void 0),m();const p=d,h=m;export{p as RtkMeetingTitle,h as defineCustomElement}
@@ -1 +1 @@
1
- import{t,p as e,H as s,c as i,h as r}from"./p-BBHQOrFK.js";import{p as o,m as a}from"./p-CfIrQkMg.js";import{u as n,i as m,c as h,e as c,f as d,b as p}from"./p-DhwysA2e.js";import{R as k}from"./p-CBJjerDR.js";import"./p-DxDYE5-a.js";import{g as l}from"./p-B4dw_Fnl.js";import"./p-Dguuxuf6.js";import{i as u}from"./p-FdeAvICb.js";import{g}from"./p-DE1s0fDa.js";import{g as f}from"./p-vBfDtD_u.js";import{d as v}from"./p-BHHJ7_MS.js";import{d as b}from"./p-D6vw6bT2.js";import{d as j}from"./p-C0ESgBoj.js";import{d as E}from"./p-VHRH6fkb.js";import{d as w}from"./p-E1D1eNFh.js";import{d as C}from"./p-CAsupO2z.js";import{d as x}from"./p-ByPpyWt6.js";import{d as S}from"./p--CEA0NQj.js";import{d as y}from"./p-NKK4fZcP.js";import{d as D}from"./p-D_AEDHUV.js";import{d as P}from"./p-CuRSxmeD.js";import{d as B}from"./p-gixOLeKl.js";import{d as U}from"./p-BYIBbfJ8.js";import{d as R}from"./p-DZcwJOUW.js";import{d as M}from"./p-oXrlIvqH.js";import{d as H}from"./p-B1HaRABx.js";import{d as I}from"./p-DMbGWtns.js";import{d as J}from"./p-Z8VMlEx7.js";import{d as O}from"./p-BQJoMtIK.js";import{d as L}from"./p-C9UuqXCX.js";import{d as q}from"./p-BoqfUgTL.js";import{d as A}from"./p-B0SC1Zj-.js";import{d as T}from"./p-y_feb08f.js";import{d as _}from"./p-sSs7a3Ms.js";import{d as z}from"./p-DHSRRtn3.js";const F=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.statesUpdate=i(this,"rtkStatesUpdate",7),this.providerId="provider-"+Math.floor(100*Math.random()),this.roomJoinedListener=()=>{this.updateStates({meeting:"joined",preJoinError:null})},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:e})=>{!["audio","video"].includes(t)||"DENIED"!==e&&"SYSTEM_DENIED"!==e||!0===(this.peerStore||n).state.states.activeDebugger||this.updateStates({activePermissionsMessage:{enabled:!0,kind:t}})},this.socketConnectionUpdateListener=({state:t})=>{"failed"===t&&setTimeout((()=>{this.meeting.leave("disconnected")}),this.leaveRoomTimer)},this.peerStore=null,this.loadConfigFromPreset=!1,this.applyDesignSystem=!1,this.mode="fixed",this.leaveOnUnmount=!1,this.t=m(),this.config=h(),this.gridLayout="row",this.iconPack=c,this.overrides=d,this.handleChangingMeeting=t=>{this.updateStates({activeBreakoutRoomsManager:Object.assign(Object.assign({},(this.peerStore||n).state.states.activeBreakoutRoomsManager),{destinationMeetingId:t})})}}connectedCallback(){var t;"undefined"!=typeof window&&(this.initErrorListener=t=>{const e=g(this.t,t.detail);e&&this.updateStates({preJoinError:e})},window.addEventListener("ClientError",this.initErrorListener)),this.leaveRoomTimer=1e4,this.loadConfigFromPreset=!0,this.applyDesignSystem=!0,this.setupStoreRequestListener(),this.setupStateUpdateListener(),this.meetingChanged(this.meeting),this.iconPackChanged(this.iconPack),this.tChanged(this.t),this.configChanged(this.config),this.overridesChanged(this.overrides),this.resizeObserver=new u((()=>this.handleResize())),this.resizeObserver.observe(this.host),this.applyDesignSystem&&null!=(null===(t=this.config)||void 0===t?void 0:t.designTokens)&&"undefined"!=typeof document&&!0!==(this.peerStore||n).state.states.activeDebugger&&o(document.documentElement,this.config.designTokens)}disconnectedCallback(){var t;this.leaveOnUnmount&&(null===(t=this.meeting)||void 0===t||t.leave()),this.resizeObserver.disconnect(),window.removeEventListener("ClientError",this.initErrorListener),this.storeRequestListener&&(this.host.removeEventListener("rtkRequestStore",this.storeRequestListener),this.storeRequestListener=null),this.stateUpdateListener&&(this.host.removeEventListener("rtkStateUpdate",this.stateUpdateListener),this.stateUpdateListener=null),this.meeting&&this.clearListeners(this.meeting)}setupStoreRequestListener(){this.storeRequestListener&&this.host.removeEventListener("rtkRequestStore",this.storeRequestListener),this.storeRequestListener=t=>{if(!this.peerStore)return;const e=new CustomEvent("rtkProvideStore",{detail:{store:this.peerStore,requestId:t.detail.requestId}});document.dispatchEvent(e),t.stopPropagation()},this.host.addEventListener("rtkRequestStore",this.storeRequestListener)}setupStateUpdateListener(){this.stateUpdateListener&&this.host.removeEventListener("rtkStateUpdate",this.stateUpdateListener),this.stateUpdateListener=t=>{this.host.contains(t.target)&&this.updateStates(t.detail)},this.host.addEventListener("rtkStateUpdate",this.stateUpdateListener)}clearListeners(t){t&&(t.self.removeListener("roomLeft",this.roomLeftListener),t.self.removeListener("roomJoined",this.roomJoinedListener),t.self.removeListener("waitlisted",this.waitlistedListener),t.self.removeListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),t.meta.removeListener("socketConnectionUpdate",this.socketConnectionUpdateListener))}meetingChanged(t,e){var s,i;if(!t)return;t?(this.peerStore=p({meeting:t,config:this.config,iconPack:this.iconPack,t:this.t,providerId:this.providerId,overrides:a(Object.assign({},d),this.overrides)}),document.dispatchEvent(new CustomEvent("rtkPeerStoreReady",{detail:{peerId:t.self.id}}))):this.peerStore=null;const r=this.peerStore||n;if(this.updateStates({viewType:t.meta.viewType,activeCaptions:e?!!r.state.states.activeCaptions:!!t.self.permissions.transcriptionEnabled}),this.loadConfigFromPreset&&null!=t.self.config){const e=t.self.config,{config:i,data:o}=l(e,t);this.config=i,null==this.showSetupScreen&&(this.showSetupScreen=o.showSetupScreen),(null===(s=r.state.states.activeBreakoutRoomsManager)||void 0===s?void 0:s.destinationMeetingId)&&(this.showSetupScreen=!1)}this.applyDesignSystem&&null!=(null===(i=this.config)||void 0===i?void 0:i.designTokens)&&"undefined"!=typeof document&&!0!==r.state.states.activeDebugger&&o(document.documentElement,this.config.designTokens),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.once("changingMeeting",this.handleChangingMeeting),t.self.roomJoined?this.updateStates({meeting:"joined"}):this.showSetupScreen?this.updateStates({meeting:"setup"}):t.join().then((()=>{this.updateStates({preJoinError:null})})).catch((t=>{const{message:e,code:s}=f(this.t,t);this.updateStates({preJoinError:{message:e,code:s}})})),window.removeEventListener("ClientError",this.initErrorListener)}iconPackChanged(t){this.peerStore&&(this.peerStore.state.iconPack=t)}tChanged(t){this.peerStore&&(this.peerStore.state.t=t)}configChanged(t){this.peerStore&&(this.peerStore.state.config=t),(null==t?void 0:t.designTokens)&&"undefined"!=typeof document&&!0!==(this.peerStore||n).state.states.activeDebugger&&o(document.documentElement,t.designTokens)}overridesChanged(t){this.peerStore&&(this.peerStore.state.overrides=a(Object.assign({},d),t))}handleResize(){this.size=(t=>t>=1080?"lg":t>=768?"md":"sm")(this.host.clientWidth)}updateStates(t){const e=this.peerStore||n,s=Object.assign({},e.state.states);e.state.states=a(s,t),this.statesUpdate.emit(e.state.states);const i=new CustomEvent("rtkStatesUpdate",{detail:e.state.states,bubbles:!0,composed:!0});this.host.dispatchEvent(i)}render(){const t={meeting:this.meeting,size:this.size,states:(this.peerStore||n).state.states,config:this.config||h(),iconPack:this.iconPack,t:this.t};return"CHAT"===(this.peerStore||n).state.states.viewType?r("rtk-chat",Object.assign({},t)):r(k,{element:"rtk-meeting",defaults:t,asHost:!0,elementProps:{"rtk-grid":{layout:this.gridLayout}}})}get host(){return this}static get watchers(){return{meeting:[{meetingChanged:0}],iconPack:[{iconPackChanged:0}],t:[{tChanged:0}],config:[{configChanged:0}],overrides:[{overridesChanged:0}]}}static get style(){return":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{box-sizing:border-box;display:flex;flex-direction:column;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));overflow:hidden;position:fixed;top:var(--rtk-space-0, 0px);right:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);height:100%;width:100%}:host([mode='fill']){position:relative}"}},[1,"rtk-meeting",{loadConfigFromPreset:[1028,"load-config-from-preset"],applyDesignSystem:[1028,"apply-design-system"],mode:[513],leaveOnUnmount:[4,"leave-on-unmount"],meeting:[16],showSetupScreen:[1028,"show-setup-screen"],t:[16],config:[1040],size:[1537],gridLayout:[1,"grid-layout"],iconPack:[16],overrides:[16]},void 0,{meeting:[{meetingChanged:0}],iconPack:[{iconPackChanged:0}],t:[{tChanged:0}],config:[{configChanged:0}],overrides:[{overridesChanged:0}]}]);function K(){"undefined"!=typeof customElements&&["rtk-meeting","rtk-avatar","rtk-button","rtk-chat","rtk-chat-composer-view","rtk-chat-header","rtk-chat-messages-ui-paginated","rtk-chat-selector","rtk-draft-attachment-view","rtk-emoji-picker","rtk-emoji-picker-button","rtk-file-message-view","rtk-file-picker-button","rtk-icon","rtk-image-message-view","rtk-markdown-view","rtk-menu","rtk-menu-item","rtk-menu-list","rtk-message-view","rtk-paginated-list","rtk-pinned-message-selector","rtk-spinner","rtk-text-composer-view","rtk-text-message-view","rtk-tooltip"].forEach((e=>{switch(e){case"rtk-meeting":customElements.get(t(e))||customElements.define(t(e),F);break;case"rtk-avatar":customElements.get(t(e))||v();break;case"rtk-button":customElements.get(t(e))||b();break;case"rtk-chat":customElements.get(t(e))||j();break;case"rtk-chat-composer-view":customElements.get(t(e))||E();break;case"rtk-chat-header":customElements.get(t(e))||w();break;case"rtk-chat-messages-ui-paginated":customElements.get(t(e))||C();break;case"rtk-chat-selector":customElements.get(t(e))||x();break;case"rtk-draft-attachment-view":customElements.get(t(e))||S();break;case"rtk-emoji-picker":customElements.get(t(e))||y();break;case"rtk-emoji-picker-button":customElements.get(t(e))||D();break;case"rtk-file-message-view":customElements.get(t(e))||P();break;case"rtk-file-picker-button":customElements.get(t(e))||B();break;case"rtk-icon":customElements.get(t(e))||U();break;case"rtk-image-message-view":customElements.get(t(e))||R();break;case"rtk-markdown-view":customElements.get(t(e))||M();break;case"rtk-menu":customElements.get(t(e))||H();break;case"rtk-menu-item":customElements.get(t(e))||I();break;case"rtk-menu-list":customElements.get(t(e))||J();break;case"rtk-message-view":customElements.get(t(e))||O();break;case"rtk-paginated-list":customElements.get(t(e))||L();break;case"rtk-pinned-message-selector":customElements.get(t(e))||q();break;case"rtk-spinner":customElements.get(t(e))||A();break;case"rtk-text-composer-view":customElements.get(t(e))||T();break;case"rtk-text-message-view":customElements.get(t(e))||_();break;case"rtk-tooltip":customElements.get(t(e))||z()}}))}K();const N=F,Q=K;export{N as RtkMeeting,Q as defineCustomElement}
1
+ import{t,p as e,H as s,c as i,h as r}from"./p-BBHQOrFK.js";import{p as o,m as a}from"./p-CfIrQkMg.js";import{u as n,i as m,c as h,e as c,f as d,b as p}from"./p-DhwysA2e.js";import{R as l}from"./p-CBJjerDR.js";import"./p-D9EtbXLL.js";import{g as k}from"./p-B4dw_Fnl.js";import"./p-Dguuxuf6.js";import{i as u}from"./p-FdeAvICb.js";import{g}from"./p-DE1s0fDa.js";import{g as f}from"./p-vBfDtD_u.js";import{d as v}from"./p-BHHJ7_MS.js";import{d as b}from"./p-D6vw6bT2.js";import{d as E}from"./p-CPnv0ZqZ.js";import{d as j}from"./p-D6Vrf7V1.js";import{d as w}from"./p-xnw0dG3-.js";import{d as C}from"./p-BL_lNnwE.js";import{d as x}from"./p-5quurE-Z.js";import{d as S}from"./p-BW3eEJGd.js";import{d as y}from"./p-NKK4fZcP.js";import{d as B}from"./p-CGBdi6J9.js";import{d as D}from"./p-CxE6v80l.js";import{d as P}from"./p-tZ9CpAsl.js";import{d as U}from"./p-BYIBbfJ8.js";import{d as M}from"./p-hPdGZ_Bf.js";import{d as R}from"./p-oXrlIvqH.js";import{d as q}from"./p-B1HaRABx.js";import{d as J}from"./p-DMbGWtns.js";import{d as L}from"./p-Z8VMlEx7.js";import{d as I}from"./p-igDs79FY.js";import{d as H}from"./p-C9UuqXCX.js";import{d as O}from"./p-BoqfUgTL.js";import{d as Z}from"./p-B0SC1Zj-.js";import{d as T}from"./p-Bw12zqoT.js";import{d as _}from"./p-sSs7a3Ms.js";import{d as z}from"./p-DHSRRtn3.js";const A=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.statesUpdate=i(this,"rtkStatesUpdate",7),this.providerId="provider-"+Math.floor(100*Math.random()),this.roomJoinedListener=()=>{this.updateStates({meeting:"joined",preJoinError:null})},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:e})=>{!["audio","video"].includes(t)||"DENIED"!==e&&"SYSTEM_DENIED"!==e||!0===(this.peerStore||n).state.states.activeDebugger||this.updateStates({activePermissionsMessage:{enabled:!0,kind:t}})},this.socketConnectionUpdateListener=({state:t})=>{"failed"===t&&setTimeout((()=>{this.meeting.leave("disconnected")}),this.leaveRoomTimer)},this.peerStore=null,this.loadConfigFromPreset=!1,this.applyDesignSystem=!1,this.mode="fixed",this.leaveOnUnmount=!1,this.t=m(),this.config=h(),this.gridLayout="row",this.iconPack=c,this.overrides=d,this.handleChangingMeeting=t=>{this.updateStates({activeBreakoutRoomsManager:Object.assign(Object.assign({},(this.peerStore||n).state.states.activeBreakoutRoomsManager),{destinationMeetingId:t})})}}connectedCallback(){var t;"undefined"!=typeof window&&(this.initErrorListener=t=>{const e=g(this.t,t.detail);e&&this.updateStates({preJoinError:e})},window.addEventListener("ClientError",this.initErrorListener)),this.leaveRoomTimer=1e4,this.loadConfigFromPreset=!0,this.applyDesignSystem=!0,this.setupStoreRequestListener(),this.setupStateUpdateListener(),this.meetingChanged(this.meeting),this.iconPackChanged(this.iconPack),this.tChanged(this.t),this.configChanged(this.config),this.overridesChanged(this.overrides),this.resizeObserver=new u((()=>this.handleResize())),this.resizeObserver.observe(this.host),this.applyDesignSystem&&null!=(null===(t=this.config)||void 0===t?void 0:t.designTokens)&&"undefined"!=typeof document&&!0!==(this.peerStore||n).state.states.activeDebugger&&o(document.documentElement,this.config.designTokens)}disconnectedCallback(){var t;this.leaveOnUnmount&&(null===(t=this.meeting)||void 0===t||t.leave()),this.resizeObserver.disconnect(),window.removeEventListener("ClientError",this.initErrorListener),this.storeRequestListener&&(this.host.removeEventListener("rtkRequestStore",this.storeRequestListener),this.storeRequestListener=null),this.stateUpdateListener&&(this.host.removeEventListener("rtkStateUpdate",this.stateUpdateListener),this.stateUpdateListener=null),this.meeting&&this.clearListeners(this.meeting)}setupStoreRequestListener(){this.storeRequestListener&&this.host.removeEventListener("rtkRequestStore",this.storeRequestListener),this.storeRequestListener=t=>{if(!this.peerStore)return;const e=new CustomEvent("rtkProvideStore",{detail:{store:this.peerStore,requestId:t.detail.requestId}});document.dispatchEvent(e),t.stopPropagation()},this.host.addEventListener("rtkRequestStore",this.storeRequestListener)}setupStateUpdateListener(){this.stateUpdateListener&&this.host.removeEventListener("rtkStateUpdate",this.stateUpdateListener),this.stateUpdateListener=t=>{this.host.contains(t.target)&&this.updateStates(t.detail)},this.host.addEventListener("rtkStateUpdate",this.stateUpdateListener)}clearListeners(t){t&&(t.self.removeListener("roomLeft",this.roomLeftListener),t.self.removeListener("roomJoined",this.roomJoinedListener),t.self.removeListener("waitlisted",this.waitlistedListener),t.self.removeListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),t.meta.removeListener("socketConnectionUpdate",this.socketConnectionUpdateListener))}meetingChanged(t,e){var s,i;if(!t)return;t?(this.peerStore=p({meeting:t,config:this.config,iconPack:this.iconPack,t:this.t,providerId:this.providerId,overrides:a(Object.assign({},d),this.overrides)}),document.dispatchEvent(new CustomEvent("rtkPeerStoreReady",{detail:{peerId:t.self.id}}))):this.peerStore=null;const r=this.peerStore||n;if(this.updateStates({viewType:t.meta.viewType,activeCaptions:e?!!r.state.states.activeCaptions:!!t.self.permissions.transcriptionEnabled}),this.loadConfigFromPreset&&null!=t.self.config){const e=t.self.config,{config:i,data:o}=k(e,t);this.config=i,null==this.showSetupScreen&&(this.showSetupScreen=o.showSetupScreen),(null===(s=r.state.states.activeBreakoutRoomsManager)||void 0===s?void 0:s.destinationMeetingId)&&(this.showSetupScreen=!1)}this.applyDesignSystem&&null!=(null===(i=this.config)||void 0===i?void 0:i.designTokens)&&"undefined"!=typeof document&&!0!==r.state.states.activeDebugger&&o(document.documentElement,this.config.designTokens),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.once("changingMeeting",this.handleChangingMeeting),t.self.roomJoined?this.updateStates({meeting:"joined"}):this.showSetupScreen?this.updateStates({meeting:"setup"}):t.join().then((()=>{this.updateStates({preJoinError:null})})).catch((t=>{const{message:e,code:s}=f(this.t,t);this.updateStates({preJoinError:{message:e,code:s}})})),window.removeEventListener("ClientError",this.initErrorListener)}iconPackChanged(t){this.peerStore&&(this.peerStore.state.iconPack=t)}tChanged(t){this.peerStore&&(this.peerStore.state.t=t)}configChanged(t){this.peerStore&&(this.peerStore.state.config=t),(null==t?void 0:t.designTokens)&&"undefined"!=typeof document&&!0!==(this.peerStore||n).state.states.activeDebugger&&o(document.documentElement,t.designTokens)}overridesChanged(t){this.peerStore&&(this.peerStore.state.overrides=a(Object.assign({},d),t))}handleResize(){this.size=(t=>t>=1080?"lg":t>=768?"md":"sm")(this.host.clientWidth)}updateStates(t){const e=this.peerStore||n,s=Object.assign({},e.state.states);e.state.states=a(s,t),this.statesUpdate.emit(e.state.states);const i=new CustomEvent("rtkStatesUpdate",{detail:e.state.states,bubbles:!0,composed:!0});this.host.dispatchEvent(i)}render(){const t={meeting:this.meeting,size:this.size,states:(this.peerStore||n).state.states,config:this.config||h(),iconPack:this.iconPack,t:this.t};return"CHAT"===(this.peerStore||n).state.states.viewType?r("rtk-chat",Object.assign({},t)):r(l,{element:"rtk-meeting",defaults:t,asHost:!0,elementProps:{"rtk-grid":{layout:this.gridLayout}}})}get host(){return this}static get watchers(){return{meeting:[{meetingChanged:0}],iconPack:[{iconPackChanged:0}],t:[{tChanged:0}],config:[{configChanged:0}],overrides:[{overridesChanged:0}]}}static get style(){return":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{box-sizing:border-box;display:flex;flex-direction:column;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));overflow:hidden;position:fixed;top:var(--rtk-space-0, 0px);right:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);height:100%;width:100%}:host([mode='fill']){position:relative}"}},[1,"rtk-meeting",{loadConfigFromPreset:[1028,"load-config-from-preset"],applyDesignSystem:[1028,"apply-design-system"],mode:[513],leaveOnUnmount:[4,"leave-on-unmount"],meeting:[16],showSetupScreen:[1028,"show-setup-screen"],t:[16],config:[1040],size:[1537],gridLayout:[1,"grid-layout"],iconPack:[16],overrides:[16]},void 0,{meeting:[{meetingChanged:0}],iconPack:[{iconPackChanged:0}],t:[{tChanged:0}],config:[{configChanged:0}],overrides:[{overridesChanged:0}]}]);function F(){"undefined"!=typeof customElements&&["rtk-meeting","rtk-avatar","rtk-button","rtk-chat","rtk-chat-composer-view","rtk-chat-header","rtk-chat-messages-ui-paginated","rtk-chat-selector","rtk-draft-attachment-view","rtk-emoji-picker","rtk-emoji-picker-button","rtk-file-message-view","rtk-file-picker-button","rtk-icon","rtk-image-message-view","rtk-markdown-view","rtk-menu","rtk-menu-item","rtk-menu-list","rtk-message-view","rtk-paginated-list","rtk-pinned-message-selector","rtk-spinner","rtk-text-composer-view","rtk-text-message-view","rtk-tooltip"].forEach((e=>{switch(e){case"rtk-meeting":customElements.get(t(e))||customElements.define(t(e),A);break;case"rtk-avatar":customElements.get(t(e))||v();break;case"rtk-button":customElements.get(t(e))||b();break;case"rtk-chat":customElements.get(t(e))||E();break;case"rtk-chat-composer-view":customElements.get(t(e))||j();break;case"rtk-chat-header":customElements.get(t(e))||w();break;case"rtk-chat-messages-ui-paginated":customElements.get(t(e))||C();break;case"rtk-chat-selector":customElements.get(t(e))||x();break;case"rtk-draft-attachment-view":customElements.get(t(e))||S();break;case"rtk-emoji-picker":customElements.get(t(e))||y();break;case"rtk-emoji-picker-button":customElements.get(t(e))||B();break;case"rtk-file-message-view":customElements.get(t(e))||D();break;case"rtk-file-picker-button":customElements.get(t(e))||P();break;case"rtk-icon":customElements.get(t(e))||U();break;case"rtk-image-message-view":customElements.get(t(e))||M();break;case"rtk-markdown-view":customElements.get(t(e))||R();break;case"rtk-menu":customElements.get(t(e))||q();break;case"rtk-menu-item":customElements.get(t(e))||J();break;case"rtk-menu-list":customElements.get(t(e))||L();break;case"rtk-message-view":customElements.get(t(e))||I();break;case"rtk-paginated-list":customElements.get(t(e))||H();break;case"rtk-pinned-message-selector":customElements.get(t(e))||O();break;case"rtk-spinner":customElements.get(t(e))||Z();break;case"rtk-text-composer-view":customElements.get(t(e))||T();break;case"rtk-text-message-view":customElements.get(t(e))||_();break;case"rtk-tooltip":customElements.get(t(e))||z()}}))}F();const G=A,N=F;export{G as RtkMeeting,N as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as s,w as i,h as e,t as r}from"./p-BBHQOrFK.js";import"./p-DxDYE5-a.js";import"./p-C0vp-Q7v.js";import{e as h}from"./p-DhwysA2e.js";import"./p-Dguuxuf6.js";import{S as a}from"./p-bRRQr4xn.js";import{d as o}from"./p-BYIBbfJ8.js";import{d as n}from"./p-B0SC1Zj-.js";import{d as c}from"./p-DLocSBO3.js";const l=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.visibleItemsCount=20,this.estimateItemSize=100,this.iconPack=h,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 e=s.borderBoxSize[0];if(e&&e.blockSize>0)return this.saveItemSize(i,e.blockSize),void this.elementObserver.unobserve(t)}const e=t.getBoundingClientRect();e.height>0&&this.saveItemSize(i,e.height)},this.getVisibleItems=()=>this.messages.slice(this.range.start,this.range.end+1),this.updateVisibleItems=(t,s)=>{const i=this.messages.length;let e=t,r=s;i<=this.visibleItemsCount?(e=0,r=i-1):s-t<this.visibleItemsCount-1&&(e=this.range.end-this.visibleItemsCount+1),this.range.start!==e&&(this.range={start:e,end:r},this.totalHeight=this.getRangeSize(0,i))},this.getEstimatedItemSize=()=>this.estimateItemSize,this.getRangeSize=(t,s)=>{let i=0,e=0;for(let r=t;r<s;r++)e=this.sizes.get(this.messages[r].id),i+=e||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,e=0,r=this.messages.length;for(;s<=r;){if(i=s+r>>>1,e=this.getRangeSize(0,i),e===t)return i;e<t?s=i+1:e>t&&(r=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&&i((()=>{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=c((()=>{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 e=this.renderer(s,i);t.hasChildNodes&&(t.innerHTML=""),this.elementObserver.observe(t),t.dataset.id=s.id,t.appendChild(e)}}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 e("div",{key:"8da5ac7ee83f43da54ce1af023e178d206436b80",class:"scrollbar content-wrapper",ref:t=>this.$listRef=t,onScroll:this.handleScroll},e("div",{key:"3aeec25e25aeb2864b7ce0d68a08d58bb2b63cef",class:"scroller"},e("div",{key:"b65b2fb4471307f38c08480d268adfaafdb696fb",style:{height:this.totalHeight+"px"}}),e("div",{key:"08aa1dcf4740ce438b152527e8d60aff28704e8a",class:"smallest-dom-element",id:"list-end",ref:t=>this.$listEndRef=t})),e("div",{key:"48ba3788f83f2329174fb3ddd107eaf4da91699a",class:"content",style:{transform:`translateY(${this.getRangeSize(0,this.range.start)}px)`}},this.isFetching&&e("div",{key:"1a53b6b02899df6ce80c781b44fcd71802105fdf",class:"loader"},e("rtk-spinner",{key:"222bdf5ad19f45914f48c91afb65075e3fef277f",size:"md"})),this.getVisibleItems().map(((t,s)=>e("div",{key:t.id,ref:i=>this.rendererInternal(i,t,s)})))))}static get watchers(){return{messages:[{messagesUpdated:0}]}}static get style(){return":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))) 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}"}},[0,"rtk-message-list-view",{messages:[16],renderer:[16],loadMore:[16],visibleItemsCount:[2,"visible-items-count"],estimateItemSize:[2,"estimate-item-size"],iconPack:[16],range:[32],isFetching:[32],autoScroll:[32],totalHeight:[32]},void 0,{messages:[{messagesUpdated:0}]}]);function d(){"undefined"!=typeof customElements&&["rtk-message-list-view","rtk-icon","rtk-spinner"].forEach((t=>{switch(t){case"rtk-message-list-view":customElements.get(r(t))||customElements.define(r(t),l);break;case"rtk-icon":customElements.get(r(t))||o();break;case"rtk-spinner":customElements.get(r(t))||n()}}))}(function(t,s,i,e){var r,h=arguments.length,a=h<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,s,i,e);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(h<3?r(a):h>3?r(s,i,a):r(s,i))||a);h>3&&a&&Object.defineProperty(s,i,a)})([a()],l.prototype,"iconPack",void 0),d();const f=l,p=d;export{f as RtkMessageListView,p as defineCustomElement}
1
+ import{p as t,H as s,w as i,h as e,t as r}from"./p-BBHQOrFK.js";import"./p-D9EtbXLL.js";import"./p-C0vp-Q7v.js";import{e as h}from"./p-DhwysA2e.js";import"./p-Dguuxuf6.js";import{S as a}from"./p-bRRQr4xn.js";import{d as o}from"./p-BYIBbfJ8.js";import{d as n}from"./p-B0SC1Zj-.js";import{d as c}from"./p-DLocSBO3.js";const l=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.visibleItemsCount=20,this.estimateItemSize=100,this.iconPack=h,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 e=s.borderBoxSize[0];if(e&&e.blockSize>0)return this.saveItemSize(i,e.blockSize),void this.elementObserver.unobserve(t)}const e=t.getBoundingClientRect();e.height>0&&this.saveItemSize(i,e.height)},this.getVisibleItems=()=>this.messages.slice(this.range.start,this.range.end+1),this.updateVisibleItems=(t,s)=>{const i=this.messages.length;let e=t,r=s;i<=this.visibleItemsCount?(e=0,r=i-1):s-t<this.visibleItemsCount-1&&(e=this.range.end-this.visibleItemsCount+1),this.range.start!==e&&(this.range={start:e,end:r},this.totalHeight=this.getRangeSize(0,i))},this.getEstimatedItemSize=()=>this.estimateItemSize,this.getRangeSize=(t,s)=>{let i=0,e=0;for(let r=t;r<s;r++)e=this.sizes.get(this.messages[r].id),i+=e||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,e=0,r=this.messages.length;for(;s<=r;){if(i=s+r>>>1,e=this.getRangeSize(0,i),e===t)return i;e<t?s=i+1:e>t&&(r=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&&i((()=>{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=c((()=>{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 e=this.renderer(s,i);t.hasChildNodes&&(t.innerHTML=""),this.elementObserver.observe(t),t.dataset.id=s.id,t.appendChild(e)}}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 e("div",{key:"8da5ac7ee83f43da54ce1af023e178d206436b80",class:"scrollbar content-wrapper",ref:t=>this.$listRef=t,onScroll:this.handleScroll},e("div",{key:"3aeec25e25aeb2864b7ce0d68a08d58bb2b63cef",class:"scroller"},e("div",{key:"b65b2fb4471307f38c08480d268adfaafdb696fb",style:{height:this.totalHeight+"px"}}),e("div",{key:"08aa1dcf4740ce438b152527e8d60aff28704e8a",class:"smallest-dom-element",id:"list-end",ref:t=>this.$listEndRef=t})),e("div",{key:"48ba3788f83f2329174fb3ddd107eaf4da91699a",class:"content",style:{transform:`translateY(${this.getRangeSize(0,this.range.start)}px)`}},this.isFetching&&e("div",{key:"1a53b6b02899df6ce80c781b44fcd71802105fdf",class:"loader"},e("rtk-spinner",{key:"222bdf5ad19f45914f48c91afb65075e3fef277f",size:"md"})),this.getVisibleItems().map(((t,s)=>e("div",{key:t.id,ref:i=>this.rendererInternal(i,t,s)})))))}static get watchers(){return{messages:[{messagesUpdated:0}]}}static get style(){return":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))) 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}"}},[0,"rtk-message-list-view",{messages:[16],renderer:[16],loadMore:[16],visibleItemsCount:[2,"visible-items-count"],estimateItemSize:[2,"estimate-item-size"],iconPack:[16],range:[32],isFetching:[32],autoScroll:[32],totalHeight:[32]},void 0,{messages:[{messagesUpdated:0}]}]);function d(){"undefined"!=typeof customElements&&["rtk-message-list-view","rtk-icon","rtk-spinner"].forEach((t=>{switch(t){case"rtk-message-list-view":customElements.get(r(t))||customElements.define(r(t),l);break;case"rtk-icon":customElements.get(r(t))||o();break;case"rtk-spinner":customElements.get(r(t))||n()}}))}(function(t,s,i,e){var r,h=arguments.length,a=h<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,s,i,e);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(h<3?r(a):h>3?r(s,i,a):r(s,i))||a);h>3&&a&&Object.defineProperty(s,i,a)})([a()],l.prototype,"iconPack",void 0),d();const f=l,p=d;export{f as RtkMessageListView,p as defineCustomElement}
@@ -1 +1 @@
1
- import{R as o,d as s}from"./p-BQJoMtIK.js";const t=o,p=s;export{t as RtkMessageView,p as defineCustomElement}
1
+ import{R as s,d as o}from"./p-igDs79FY.js";const p=s,r=o;export{p as RtkMessageView,r as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as i,c as e,h as s,d as o,t as n}from"./p-BBHQOrFK.js";import"./p-DxDYE5-a.js";import"./p-C0vp-Q7v.js";import{e as r,i as a}from"./p-DhwysA2e.js";import"./p-Dguuxuf6.js";import{S as l}from"./p-bRRQr4xn.js";import{d as c}from"./p-CFBS-gbK.js";import{d as m}from"./p-BYIBbfJ8.js";import{d as p}from"./p-B0SC1Zj-.js";import{d as u}from"./p-DHSRRtn3.js";var h=function(t,i,e,s){var o,n=arguments.length,r=n<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,i,e,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};const d=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.stateUpdate=e(this,"rtkStateUpdate",7),this.variant="button",this.iconPack=r,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.meeting)return null;if(!this.canDisable)return null;const t=this.t("mute_all");return s(o,{title:t},s("rtk-tooltip",{kind:"block",label:t,part:"tooltip"},s("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:0}]}}static get style(){return":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}"}},[1,"rtk-mute-all-button",{variant:[513],meeting:[16],size:[513],iconPack:[16],t:[16],canDisable:[32]},void 0,{meeting:[{meetingChanged:0}]}]);function f(){"undefined"!=typeof customElements&&["rtk-mute-all-button","rtk-controlbar-button","rtk-icon","rtk-spinner","rtk-tooltip"].forEach((t=>{switch(t){case"rtk-mute-all-button":customElements.get(n(t))||customElements.define(n(t),d);break;case"rtk-controlbar-button":customElements.get(n(t))||c();break;case"rtk-icon":customElements.get(n(t))||m();break;case"rtk-spinner":customElements.get(n(t))||p();break;case"rtk-tooltip":customElements.get(n(t))||u()}}))}h([l()],d.prototype,"meeting",void 0),h([l()],d.prototype,"iconPack",void 0),h([l()],d.prototype,"t",void 0),f();const k=d,b=f;export{k as RtkMuteAllButton,b as defineCustomElement}
1
+ import{p as t,H as i,c as e,h as s,d as o,t as n}from"./p-BBHQOrFK.js";import"./p-D9EtbXLL.js";import"./p-C0vp-Q7v.js";import{e as r,i as a}from"./p-DhwysA2e.js";import"./p-Dguuxuf6.js";import{S as l}from"./p-bRRQr4xn.js";import{d as c}from"./p-CFBS-gbK.js";import{d as m}from"./p-BYIBbfJ8.js";import{d as p}from"./p-B0SC1Zj-.js";import{d as u}from"./p-DHSRRtn3.js";var h=function(t,i,e,s){var o,n=arguments.length,r=n<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,i,e,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};const d=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.stateUpdate=e(this,"rtkStateUpdate",7),this.variant="button",this.iconPack=r,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.meeting)return null;if(!this.canDisable)return null;const t=this.t("mute_all");return s(o,{title:t},s("rtk-tooltip",{kind:"block",label:t,part:"tooltip"},s("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:0}]}}static get style(){return":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}"}},[1,"rtk-mute-all-button",{variant:[513],meeting:[16],size:[513],iconPack:[16],t:[16],canDisable:[32]},void 0,{meeting:[{meetingChanged:0}]}]);function f(){"undefined"!=typeof customElements&&["rtk-mute-all-button","rtk-controlbar-button","rtk-icon","rtk-spinner","rtk-tooltip"].forEach((t=>{switch(t){case"rtk-mute-all-button":customElements.get(n(t))||customElements.define(n(t),d);break;case"rtk-controlbar-button":customElements.get(n(t))||c();break;case"rtk-icon":customElements.get(n(t))||m();break;case"rtk-spinner":customElements.get(n(t))||p();break;case"rtk-tooltip":customElements.get(n(t))||u()}}))}h([l()],d.prototype,"meeting",void 0),h([l()],d.prototype,"iconPack",void 0),h([l()],d.prototype,"t",void 0),f();const b=d,k=f;export{b as RtkMuteAllButton,k as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as r,h as e,d as a,t as i}from"./p-BBHQOrFK.js";import"./p-DxDYE5-a.js";import"./p-C0vp-Q7v.js";import{e as o,i as s}from"./p-DhwysA2e.js";import"./p-Dguuxuf6.js";import{S as c}from"./p-bRRQr4xn.js";import{d as n}from"./p-BYIBbfJ8.js";var p=function(t,r,e,a){var i,o=arguments.length,s=o<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,e):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,r,e,a);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(s=(o<3?i(s):o>3?i(r,e,s):i(r,e))||s);return o>3&&s&&Object.defineProperty(r,e,s),s};const l=t(class extends r{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.iconPack=o,this.t=s(),this.isScreenShare=!1,this.score=10,this.onMediaScoreUpdate=({kind:t,isScreenshare:r,score:e})=>{("video"===t||this.isScreenShare&&r)&&(this.score=e)}}connectedCallback(){this.participantChanged(this.participant)}participantChanged(t){t&&t.addListener("mediaScoreUpdate",this.onMediaScoreUpdate)}disconnectedCallback(){var t;null===(t=this.participant)||void 0===t||t.removeListener("mediaScoreUpdate",this.onMediaScoreUpdate)}render(){let t=Math.round(this.score/2),r="good";if(t>3)return null;switch(t<1&&(t=1),t){case 3:case 2:r="poor";break;case 1:r="poorest"}return e(a,null,e("rtk-icon",{icon:this.iconPack["signal_"+t],class:r}),e("rtk-icon",{icon:this.iconPack.signal_5,class:"bg-signal"}))}static get watchers(){return{participant:[{participantChanged:0}]}}static get style(){return":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;height:var(--rtk-space-7, 28px);width:var(--rtk-space-7, 28px)}rtk-icon{position:absolute;top:var(--rtk-space-0, 0px);right:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);z-index:10;height:100%;width:100%;--tw-text-opacity:1;color:rgba(var(--rtk-colors-success, 98 165 4) / var(--tw-text-opacity))}rtk-icon.good{--tw-text-opacity:1;color:rgba(var(--rtk-colors-success, 98 165 4) / var(--tw-text-opacity))}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))}:host([size='md']){height:var(--rtk-space-6, 24px);width:var(--rtk-space-6, 24px)}:host([size='sm']){height:var(--rtk-space-5, 20px);width:var(--rtk-space-5, 20px)}.bg-signal{position:absolute;top:var(--rtk-space-0, 0px);right:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);z-index:0;color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52))}"}},[1,"rtk-network-indicator",{participant:[16],meeting:[16],iconPack:[16],t:[16],isScreenShare:[4,"is-screen-share"],score:[32]},void 0,{participant:[{participantChanged:0}]}]);function h(){"undefined"!=typeof customElements&&["rtk-network-indicator","rtk-icon"].forEach((t=>{switch(t){case"rtk-network-indicator":customElements.get(i(t))||customElements.define(i(t),l);break;case"rtk-icon":customElements.get(i(t))||n()}}))}p([c()],l.prototype,"meeting",void 0),p([c()],l.prototype,"iconPack",void 0),p([c()],l.prototype,"t",void 0),h();const k=l,v=h;export{k as RtkNetworkIndicator,v as defineCustomElement}
1
+ import{p as t,H as r,h as e,d as a,t as i}from"./p-BBHQOrFK.js";import"./p-D9EtbXLL.js";import"./p-C0vp-Q7v.js";import{e as o,i as s}from"./p-DhwysA2e.js";import"./p-Dguuxuf6.js";import{S as c}from"./p-bRRQr4xn.js";import{d as n}from"./p-BYIBbfJ8.js";var p=function(t,r,e,a){var i,o=arguments.length,s=o<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,e):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,r,e,a);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(s=(o<3?i(s):o>3?i(r,e,s):i(r,e))||s);return o>3&&s&&Object.defineProperty(r,e,s),s};const l=t(class extends r{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.iconPack=o,this.t=s(),this.isScreenShare=!1,this.score=10,this.onMediaScoreUpdate=({kind:t,isScreenshare:r,score:e})=>{("video"===t||this.isScreenShare&&r)&&(this.score=e)}}connectedCallback(){this.participantChanged(this.participant)}participantChanged(t){t&&t.addListener("mediaScoreUpdate",this.onMediaScoreUpdate)}disconnectedCallback(){var t;null===(t=this.participant)||void 0===t||t.removeListener("mediaScoreUpdate",this.onMediaScoreUpdate)}render(){let t=Math.round(this.score/2),r="good";if(t>3)return null;switch(t<1&&(t=1),t){case 3:case 2:r="poor";break;case 1:r="poorest"}return e(a,null,e("rtk-icon",{icon:this.iconPack["signal_"+t],class:r}),e("rtk-icon",{icon:this.iconPack.signal_5,class:"bg-signal"}))}static get watchers(){return{participant:[{participantChanged:0}]}}static get style(){return":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;height:var(--rtk-space-7, 28px);width:var(--rtk-space-7, 28px)}rtk-icon{position:absolute;top:var(--rtk-space-0, 0px);right:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);z-index:10;height:100%;width:100%;--tw-text-opacity:1;color:rgba(var(--rtk-colors-success, 98 165 4) / var(--tw-text-opacity))}rtk-icon.good{--tw-text-opacity:1;color:rgba(var(--rtk-colors-success, 98 165 4) / var(--tw-text-opacity))}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))}:host([size='md']){height:var(--rtk-space-6, 24px);width:var(--rtk-space-6, 24px)}:host([size='sm']){height:var(--rtk-space-5, 20px);width:var(--rtk-space-5, 20px)}.bg-signal{position:absolute;top:var(--rtk-space-0, 0px);right:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);z-index:0;color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52))}"}},[1,"rtk-network-indicator",{participant:[16],meeting:[16],iconPack:[16],t:[16],isScreenShare:[4,"is-screen-share"],score:[32]},void 0,{participant:[{participantChanged:0}]}]);function h(){"undefined"!=typeof customElements&&["rtk-network-indicator","rtk-icon"].forEach((t=>{switch(t){case"rtk-network-indicator":customElements.get(i(t))||customElements.define(i(t),l);break;case"rtk-icon":customElements.get(i(t))||n()}}))}p([c()],l.prototype,"meeting",void 0),p([c()],l.prototype,"iconPack",void 0),p([c()],l.prototype,"t",void 0),h();const k=l,v=h;export{k as RtkNetworkIndicator,v as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as i,w as s,h as e,d as n,t as o}from"./p-BBHQOrFK.js";import{R as a}from"./p-B56IYWsZ.js";import{f as c}from"./p-CJsXePY3.js";import{c as h,i as r,e as d}from"./p-DhwysA2e.js";import"./p-DxDYE5-a.js";import{s as u}from"./p-C0vp-Q7v.js";import{f as l}from"./p-Bj1kNPpe.js";import{S as p}from"./p-bRRQr4xn.js";import{d as g}from"./p-D6vw6bT2.js";import{d as m}from"./p-BYIBbfJ8.js";import{d as f}from"./p-CCxMYXjI.js";const v=2e3,k=Object.freeze({notifications:{participant_joined:!0,participant_left:!0,participant_joined_waitlist:!0,chat:!0,polls:!0,webinar:!0,tab_sync:!0,recording_started:!0,recording_stopped:!0},notification_sounds:{participant_joined:!0,participant_left:!0,chat:!0,polls:!0,webinar:!0,participant_joined_waitlist:!0},notification_duration:{participant_joined:2100,participant_left:2100,participant_joined_waitlist:4e3,chat:v,polls:v,webinar:v,tab_sync:v,recording_started:v,recording_stopped:v},participant_joined_sound_notification_limit:10,participant_chat_message_sound_notification_limit:10});var _=function(t,i,s,e){var n,o=arguments.length,a=o<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 c=t.length-1;c>=0;c--)(n=t[c])&&(a=(o<3?n(a):o>3?n(i,s,a):n(i,s))||a);return o>3&&a&&Object.defineProperty(i,s,a),a};function j(t){return Object.keys(t).filter((i=>t[i]))}const b=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.permissions=k,this.enabledSounds=j(k.notification_sounds),this.config=h(),this.t=r(),this.iconPack=d,this.notifications=[],this.addStagePeersListeners=t=>{t.participants.joined.addListener("participantJoined",this.participantJoinedListener),t.participants.joined.addListener("participantLeft",this.participantLeftListener)},this.removeStagePeersListeners=t=>{t.participants.joined.removeListener("participantJoined",this.participantJoinedListener),t.participants.joined.removeListener("participantLeft",this.participantLeftListener)},this.onNotification=t=>{this.add(t.detail);const i=t.detail.playSound;null!=i&&this.audio.play(i)},this.onRecordingUpdate=t=>{var i,s;"RECORDING"===t&&!1!==this.permissions.notifications.recording_started?this.add({id:"recording-started",icon:this.iconPack.recording,message:this.t("recording.started"),duration:null!==(i=this.permissions.notification_duration.recording_started)&&void 0!==i?i:v}):"STOPPING"===t&&!1!==this.permissions.notifications.recording_stopped&&this.add({id:"recording-stopped",icon:this.iconPack.stop_recording,message:this.t("recording.stopped"),duration:null!==(s=this.permissions.notification_duration.recording_stopped)&&void 0!==s?s:v})},this.paused=!1}connectedCallback(){"undefined"!=typeof document&&(null===document||void 0===document||document.addEventListener("rtkNotification",this.onNotification)),this.meetingChanged(this.meeting),this.configChanged(this.config),this.statesChanged(this.states)}clearListeners(t){var i,s,e,n,o,a,c,h;const r="LIVESTREAM"===t.meta.viewType;(r&&"ON_STAGE"===(null===(i=t.stage)||void 0===i?void 0:i.status)||!r)&&this.removeStagePeersListeners(t),this.chatUpdateListener&&(null===(s=t.chat)||void 0===s||s.removeListener("chatUpdate",this.chatUpdateListener)),this.pollUpdateListener&&(null===(e=t.polls)||void 0===e||e.removeListener("pollsUpdate",this.pollUpdateListener)),t.meta.removeListener("socketConnectionUpdate",this.socketConnectionUpdateListener),this.stageRequestAccepted&&(null===(n=t.stage)||void 0===n||n.removeListener("stageRequestApproved",this.stageRequestAccepted)),this.stageRequestRejected&&(null===(o=t.stage)||void 0===o||o.removeListener("stageRequestRejected",this.stageRequestRejected)),this.newStageRequests&&(null===(a=t.stage)||void 0===a||a.removeListener("newStageRequest",this.newStageRequests)),this.stageStatusUpdateListener&&(null===(c=t.stage)||void 0===c||c.removeListener("stageStatusUpdate",this.stageStatusUpdateListener)),null===(h=t.recording)||void 0===h||h.removeListener("recordingUpdate",this.onRecordingUpdate),clearTimeout(this.disconnectTimeout),t.self.removeListener("deviceUpdate",this.deviceUpdateListener)}disconnectedCallback(){var t;"undefined"!=typeof document&&(null===document||void 0===document||document.removeEventListener("rtkNotification",this.onNotification)),this.meeting&&(this.clearListeners(this.meeting),this.waitlistedParticipantJoinedListener&&this.meeting.participants.waitlisted.removeListener("participantJoined",this.waitlistedParticipantJoinedListener),this.waitlistedParticipantLeftListener&&this.meeting.participants.waitlisted.removeListener("participantLeft",this.waitlistedParticipantLeftListener),this.activeTabUpdateListener&&(null===(t=this.meeting.meta)||void 0===t||t.removeListener("activeTabUpdate",this.activeTabUpdateListener)),this.peerStageStatusListener&&this.meeting.participants.joined.removeListener("stageStatusUpdate",this.peerStageStatusListener))}meetingChanged(t,i){var s,e,n,o,h,r,d,p,g;if(clearTimeout(this.disconnectTimeout),i&&this.clearListeners(i),!t)return;const m="LIVESTREAM"===t.meta.viewType;this.audio=new a(t);const{notifications:f,notification_duration:v,notification_sounds:k}=this.permissions;if(this.participantJoinedListener=t=>{f.participant_joined&&this.add({id:t.id+"-joined",message:`${c(t.name)} ${this.t("notifications.joined")}`,image:t.picture,duration:v.participant_joined}),k.participant_joined&&this.canPlayParticipantJoinedSound()&&this.audio.play("joined")},this.participantLeftListener=t=>{const{socketState:{state:i}}=this.meeting.meta;f.participant_left&&"connected"!==i&&this.add({id:t.id+"-left",message:`${c(t.name)} ${this.t("notifications.left")}`,image:t.picture,duration:v.participant_left}),k.participant_left&&this.canPlayParticipantJoinedSound()&&this.audio.play("left")},this.waitlistedParticipantJoinedListener=t=>{if(!this.canAcceptWaitingRequests())return;const i=t.id+"-joined-waitlist";this.add({id:i,message:`${c(t.name)} ${this.t("notifications.requesting_to_join_meeting")}`,image:t.picture,duration:v.participant_joined_waitlist,button:{text:this.t("notifications.accept"),variant:"primary",onClick:async()=>{await this.meeting.participants.acceptWaitingRoomRequest(t.id),this.remove(i)}}}),k.participant_joined_waitlist&&this.canPlayParticipantJoinedSound()&&this.audio.play("message")},this.waitlistedParticipantLeftListener=t=>{this.remove(t.id+"-joined-waitlist")},this.chatUpdateListener=({message:i,action:s})=>{if("add"!==s)return;const e=l(i);if(null!=e){if(e.userId===t.self.userId)return;"text"===e.type&&(f.chat&&this.add({id:"message-"+Math.random().toString(36),icon:this.iconPack.chat,message:`${e.displayName}: ${e.message}`,duration:v.chat}),k.chat&&this.canPlayChatSound()&&this.audio.play("message"))}},this.pollUpdateListener=({polls:t,newPoll:i})=>{!1!==i&&(f.polls&&this.meeting.self.userId!==t[t.length-1].createdByUserId&&this.add({id:"poll-"+Math.random().toString(36),icon:this.iconPack.poll,message:`${this.t("notifications.new_poll_created_by")} ${t[t.length-1].createdBy}`,duration:v.polls}),k.polls&&this.meeting.self.userId!==t[t.length-1].createdByUserId&&this.canPlayChatSound()&&this.audio.play("message"))},this.deviceUpdateListener=({device:t,preview:i})=>{i||("audiooutput"===t.kind&&(this.audio.setDevice(t.deviceId),this.remove("speaker-switched"),this.add({id:"speaker-switched",message:`${this.t("notifications.connected_to")} ${t.label}`,icon:this.iconPack.speaker,duration:5e3})),"videoinput"===t.kind&&(this.remove("camera-switched"),this.add({id:"camera-switched",message:`${this.t("notifications.connected_to")} ${t.label}`,icon:this.meeting.self.videoEnabled?this.iconPack.video_on:this.iconPack.video_off,iconVariant:this.meeting.self.videoEnabled?"primary":"danger",duration:5e3})),"audioinput"===t.kind&&(this.remove("mic-switched"),this.add({id:"mic-switched",message:`${this.t("notifications.connected_to")} ${t.label}`,icon:this.meeting.self.audioEnabled?this.iconPack.mic_on:this.iconPack.mic_off,iconVariant:this.meeting.self.audioEnabled?"primary":"danger",duration:5e3})))},this.socketConnectionUpdateListener=({state:t,reconnectionAttempt:i,reconnected:s})=>{switch(t){case"connected":this.remove("socket"),s&&this.add({id:"socket",icon:this.iconPack.wifi,message:this.t("network.restored"),duration:3e3});break;case"disconnected":this.remove("socket"),this.add({id:"socket",icon:this.iconPack.disconnected,message:this.t("network.reconnecting")});break;case"reconnecting":i>=6?(this.remove("socket"),this.add({id:"socket",icon:this.iconPack.disconnected,message:this.t("network.disconnected"),button:{text:this.t("end"),variant:"danger",onClick:()=>{var t;return null===(t=this.meeting)||void 0===t?void 0:t.leave()}}})):i>=4&&(this.remove("socket"),this.add({id:"socket",icon:this.iconPack.disconnected,message:this.t("network.delay_extended")}));break;case"failed":this.remove("socket"),this.add({id:"socket",icon:this.iconPack.disconnected,message:this.t("network.leaving"),button:{text:this.t("end"),variant:"danger",onClick:()=>{var t;return null===(t=this.meeting)||void 0===t?void 0:t.leave()}}})}},this.activeTabUpdateListener=i=>{if(f.tab_sync)switch(i.type){case"plugin":const s=t.plugins.active.toArray().find((t=>t.id==i.id));null!=s&&this.add({id:"activeTab",message:`${this.t("notifications.plugin_switched_to")} ${s.name}`,duration:v.participant_joined});break;case"screenshare":const e=t.participants.joined.toArray().filter((t=>t.screenShareEnabled)).find((t=>t.id==i.id));null!=e&&this.add({id:"spotlight",message:`Now watching ${e.name}'s screen`,duration:v.webinar})}},this.peerStageStatusListener=t=>{"REQUESTED_TO_JOIN_STAGE"===t.stageStatus&&(this.add({id:"stage-request-"+t.id,message:`${t.name} ${this.t("notifications.requested_to_join_stage")}`,duration:v.webinar,button:{text:this.t("notifications.accept"),variant:"primary",onClick:async()=>{await this.meeting.stage.grantAccess([t.userId]),this.remove("stage-request-"+t.id)}}}),k.webinar&&this.audio.play("joined")),"ON_STAGE"===t.stageStatus&&(this.add({id:"stage-joined-"+t.id,message:`${t.name} ${this.t("notifications.joined_stage")}`,duration:v.webinar}),k.webinar&&this.audio.play("joined"))},this.stageRequestAccepted=()=>{this.add({id:"stage-request-accepted",message:this.t("notifications.request_to_join_accepted"),duration:3e3})},this.stageRequestRejected=()=>{this.add({id:"stage-request-rejected",message:this.t("notifications.request_to_join_rejected"),duration:3e3})},this.newStageRequests=({count:t})=>{this.add({id:"new-stage-request",message:`You have ${t<0?"new stage":t+" pending"} request${1===t?"":"s"}`,duration:3e3})},this.stageStatusUpdateListener=i=>{"ON_STAGE"===i?this.addStagePeersListeners(t):this.removeStagePeersListeners(t)},!u(t)&&(null===(s=t.chat)||void 0===s||s.addListener("chatUpdate",this.chatUpdateListener)),"CHAT"===(null===(e=t.self.config.viewType)||void 0===e?void 0:""+e))return;const _=t.self.getCurrentDevices();null!=_.speaker&&this.audio.setDevice(_.speaker.deviceId),m?null===(n=t.stage)||void 0===n||n.on("stageStatusUpdate",this.stageStatusUpdateListener):this.addStagePeersListeners(t),this.canAcceptWaitingRequests()&&(t.participants.waitlisted.addListener("participantJoined",this.waitlistedParticipantJoinedListener),t.participants.waitlisted.addListener("participantLeft",this.waitlistedParticipantLeftListener)),null===(o=t.polls)||void 0===o||o.addListener("pollsUpdate",this.pollUpdateListener),t.self.addListener("deviceUpdate",this.deviceUpdateListener),t.meta.addListener("socketConnectionUpdate",this.socketConnectionUpdateListener),null===(h=t.meta)||void 0===h||h.addListener("activeTabUpdate",this.activeTabUpdateListener),null===(r=t.recording)||void 0===r||r.addListener("recordingUpdate",this.onRecordingUpdate),null===(d=t.stage)||void 0===d||d.addListener("stageRequestApproved",this.stageRequestAccepted),null===(p=t.stage)||void 0===p||p.addListener("stageRequestRejected",this.stageRequestRejected),t.self.permissions.stageEnabled&&t.self.permissions.acceptStageRequests&&(null===(g=t.stage)||void 0===g||g.addListener("newStageRequest",this.newStageRequests))}configChanged(t){null!=t&&null!=(null==t?void 0:t.config)&&(this.permissions=function(t){const i=Object.assign({},k);return null==t||(Object.assign(i.notification_sounds,t.notification_sounds),Object.assign(i.notifications,t.notifications),Object.assign(i.notification_duration,t.notification_duration),i.participant_chat_message_sound_notification_limit=t.participant_chat_message_sound_notification_limit,i.participant_joined_sound_notification_limit=t.participant_joined_sound_notification_limit),i}(t.config),this.enabledSounds=j(this.permissions.notification_sounds))}statesChanged(t){var i;if(null!=t){const s=!(null===(i=null==t?void 0:t.prefs)||void 0===i?void 0:i.muteNotificationSounds);for(const t of this.enabledSounds)t in this.permissions.notification_sounds&&(this.permissions.notification_sounds[t]=s)}}apiErrorListener({detail:t}){const{trace:i,message:s}=t;this.add({id:i,message:s,duration:v,icon:this.iconPack.warning})}sendNotificationListener({detail:t}){const{trace:i,message:s}=t;this.add({id:i,message:s,duration:v})}add(t){"visible"===document.visibilityState&&this.notifications.length<5&&(this.notifications=[...this.notifications,t])}remove(t){this.notifications=this.notifications.filter((i=>i.id!==t))}handleDismiss(t){t.stopPropagation();const i=t.detail,e=this.host.shadowRoot.querySelector(`[data-id="${i}"]`);null==e||e.classList.add("exit"),setTimeout((()=>{s((()=>{this.remove(i)}))}),400)}canPlayParticipantJoinedSound(){return null==this.permissions.participant_joined_sound_notification_limit||this.permissions.participant_joined_sound_notification_limit<=0||this.meeting.participants.count<=this.permissions.participant_joined_sound_notification_limit}canPlayChatSound(){return null==this.permissions.participant_chat_message_sound_notification_limit||this.permissions.participant_chat_message_sound_notification_limit<=0||this.meeting.participants.count<=this.permissions.participant_chat_message_sound_notification_limit}canAcceptWaitingRequests(){return this.permissions.notifications.participant_joined_waitlist&&this.meeting.self.permissions.acceptWaitingRequests}render(){if(this.meeting)return e(n,null,e("div",{onMouseEnter:()=>this.paused=!0,onFocusin:()=>this.paused=!0,onMouseLeave:()=>this.paused=!1,onFocusout:()=>this.paused=!1},this.notifications.map((t=>e("rtk-notification",{size:this.size,key:t.id,"data-id":t.id,notification:t,onRtkNotificationDismiss:t=>this.handleDismiss(t),iconPack:this.iconPack,paused:this.paused,t:this.t})))))}get host(){return this}static get watchers(){return{meeting:[{meetingChanged:0}],config:[{configChanged:0}],states:[{statesChanged:0}]}}static get style(){return":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;z-index:100}rtk-notification{margin-top:var(--rtk-space-2, 8px)}"}},[1,"rtk-notifications",{meeting:[16],states:[16],config:[16],t:[16],size:[513],iconPack:[16],notifications:[32],paused:[32]},[[8,"rtkApiError","apiErrorListener"],[8,"rtkSendNotification","sendNotificationListener"]],{meeting:[{meetingChanged:0}],config:[{configChanged:0}],states:[{statesChanged:0}]}]);function w(){"undefined"!=typeof customElements&&["rtk-notifications","rtk-button","rtk-icon","rtk-notification"].forEach((t=>{switch(t){case"rtk-notifications":customElements.get(o(t))||customElements.define(o(t),b);break;case"rtk-button":customElements.get(o(t))||g();break;case"rtk-icon":customElements.get(o(t))||m();break;case"rtk-notification":customElements.get(o(t))||f()}}))}_([p()],b.prototype,"meeting",void 0),_([p()],b.prototype,"states",void 0),_([p()],b.prototype,"config",void 0),_([p()],b.prototype,"t",void 0),_([p()],b.prototype,"iconPack",void 0),w();const $=b,C=w;export{$ as RtkNotifications,C as defineCustomElement}
1
+ import{p as t,H as i,w as s,h as e,d as n,t as o}from"./p-BBHQOrFK.js";import{R as a}from"./p-B56IYWsZ.js";import{f as c}from"./p-CJsXePY3.js";import{c as h,i as r,e as d}from"./p-DhwysA2e.js";import"./p-D9EtbXLL.js";import{s as u}from"./p-C0vp-Q7v.js";import{f as l}from"./p-Bj1kNPpe.js";import{S as p}from"./p-bRRQr4xn.js";import{d as g}from"./p-D6vw6bT2.js";import{d as m}from"./p-BYIBbfJ8.js";import{d as f}from"./p-CCxMYXjI.js";const v=2e3,k=Object.freeze({notifications:{participant_joined:!0,participant_left:!0,participant_joined_waitlist:!0,chat:!0,polls:!0,webinar:!0,tab_sync:!0,recording_started:!0,recording_stopped:!0},notification_sounds:{participant_joined:!0,participant_left:!0,chat:!0,polls:!0,webinar:!0,participant_joined_waitlist:!0},notification_duration:{participant_joined:2100,participant_left:2100,participant_joined_waitlist:4e3,chat:v,polls:v,webinar:v,tab_sync:v,recording_started:v,recording_stopped:v},participant_joined_sound_notification_limit:10,participant_chat_message_sound_notification_limit:10});var _=function(t,i,s,e){var n,o=arguments.length,a=o<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 c=t.length-1;c>=0;c--)(n=t[c])&&(a=(o<3?n(a):o>3?n(i,s,a):n(i,s))||a);return o>3&&a&&Object.defineProperty(i,s,a),a};function j(t){return Object.keys(t).filter((i=>t[i]))}const b=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.permissions=k,this.enabledSounds=j(k.notification_sounds),this.config=h(),this.t=r(),this.iconPack=d,this.notifications=[],this.addStagePeersListeners=t=>{t.participants.joined.addListener("participantJoined",this.participantJoinedListener),t.participants.joined.addListener("participantLeft",this.participantLeftListener)},this.removeStagePeersListeners=t=>{t.participants.joined.removeListener("participantJoined",this.participantJoinedListener),t.participants.joined.removeListener("participantLeft",this.participantLeftListener)},this.onNotification=t=>{this.add(t.detail);const i=t.detail.playSound;null!=i&&this.audio.play(i)},this.onRecordingUpdate=t=>{var i,s;"RECORDING"===t&&!1!==this.permissions.notifications.recording_started?this.add({id:"recording-started",icon:this.iconPack.recording,message:this.t("recording.started"),duration:null!==(i=this.permissions.notification_duration.recording_started)&&void 0!==i?i:v}):"STOPPING"===t&&!1!==this.permissions.notifications.recording_stopped&&this.add({id:"recording-stopped",icon:this.iconPack.stop_recording,message:this.t("recording.stopped"),duration:null!==(s=this.permissions.notification_duration.recording_stopped)&&void 0!==s?s:v})},this.paused=!1}connectedCallback(){"undefined"!=typeof document&&(null===document||void 0===document||document.addEventListener("rtkNotification",this.onNotification)),this.meetingChanged(this.meeting),this.configChanged(this.config),this.statesChanged(this.states)}clearListeners(t){var i,s,e,n,o,a,c,h;const r="LIVESTREAM"===t.meta.viewType;(r&&"ON_STAGE"===(null===(i=t.stage)||void 0===i?void 0:i.status)||!r)&&this.removeStagePeersListeners(t),this.chatUpdateListener&&(null===(s=t.chat)||void 0===s||s.removeListener("chatUpdate",this.chatUpdateListener)),this.pollUpdateListener&&(null===(e=t.polls)||void 0===e||e.removeListener("pollsUpdate",this.pollUpdateListener)),t.meta.removeListener("socketConnectionUpdate",this.socketConnectionUpdateListener),this.stageRequestAccepted&&(null===(n=t.stage)||void 0===n||n.removeListener("stageRequestApproved",this.stageRequestAccepted)),this.stageRequestRejected&&(null===(o=t.stage)||void 0===o||o.removeListener("stageRequestRejected",this.stageRequestRejected)),this.newStageRequests&&(null===(a=t.stage)||void 0===a||a.removeListener("newStageRequest",this.newStageRequests)),this.stageStatusUpdateListener&&(null===(c=t.stage)||void 0===c||c.removeListener("stageStatusUpdate",this.stageStatusUpdateListener)),null===(h=t.recording)||void 0===h||h.removeListener("recordingUpdate",this.onRecordingUpdate),clearTimeout(this.disconnectTimeout),t.self.removeListener("deviceUpdate",this.deviceUpdateListener)}disconnectedCallback(){var t;"undefined"!=typeof document&&(null===document||void 0===document||document.removeEventListener("rtkNotification",this.onNotification)),this.meeting&&(this.clearListeners(this.meeting),this.waitlistedParticipantJoinedListener&&this.meeting.participants.waitlisted.removeListener("participantJoined",this.waitlistedParticipantJoinedListener),this.waitlistedParticipantLeftListener&&this.meeting.participants.waitlisted.removeListener("participantLeft",this.waitlistedParticipantLeftListener),this.activeTabUpdateListener&&(null===(t=this.meeting.meta)||void 0===t||t.removeListener("activeTabUpdate",this.activeTabUpdateListener)),this.peerStageStatusListener&&this.meeting.participants.joined.removeListener("stageStatusUpdate",this.peerStageStatusListener))}meetingChanged(t,i){var s,e,n,o,h,r,d,p,g;if(clearTimeout(this.disconnectTimeout),i&&this.clearListeners(i),!t)return;const m="LIVESTREAM"===t.meta.viewType;this.audio=new a(t);const{notifications:f,notification_duration:v,notification_sounds:k}=this.permissions;if(this.participantJoinedListener=t=>{f.participant_joined&&this.add({id:t.id+"-joined",message:`${c(t.name)} ${this.t("notifications.joined")}`,image:t.picture,duration:v.participant_joined}),k.participant_joined&&this.canPlayParticipantJoinedSound()&&this.audio.play("joined")},this.participantLeftListener=t=>{const{socketState:{state:i}}=this.meeting.meta;f.participant_left&&"connected"!==i&&this.add({id:t.id+"-left",message:`${c(t.name)} ${this.t("notifications.left")}`,image:t.picture,duration:v.participant_left}),k.participant_left&&this.canPlayParticipantJoinedSound()&&this.audio.play("left")},this.waitlistedParticipantJoinedListener=t=>{if(!this.canAcceptWaitingRequests())return;const i=t.id+"-joined-waitlist";this.add({id:i,message:`${c(t.name)} ${this.t("notifications.requesting_to_join_meeting")}`,image:t.picture,duration:v.participant_joined_waitlist,button:{text:this.t("notifications.accept"),variant:"primary",onClick:async()=>{await this.meeting.participants.acceptWaitingRoomRequest(t.id),this.remove(i)}}}),k.participant_joined_waitlist&&this.canPlayParticipantJoinedSound()&&this.audio.play("message")},this.waitlistedParticipantLeftListener=t=>{this.remove(t.id+"-joined-waitlist")},this.chatUpdateListener=({message:i,action:s})=>{if("add"!==s)return;const e=l(i);if(null!=e){if(e.userId===t.self.userId)return;"text"===e.type&&(f.chat&&this.add({id:"message-"+Math.random().toString(36),icon:this.iconPack.chat,message:`${e.displayName}: ${e.message}`,duration:v.chat}),k.chat&&this.canPlayChatSound()&&this.audio.play("message"))}},this.pollUpdateListener=({polls:t,newPoll:i})=>{!1!==i&&(f.polls&&this.meeting.self.userId!==t[t.length-1].createdByUserId&&this.add({id:"poll-"+Math.random().toString(36),icon:this.iconPack.poll,message:`${this.t("notifications.new_poll_created_by")} ${t[t.length-1].createdBy}`,duration:v.polls}),k.polls&&this.meeting.self.userId!==t[t.length-1].createdByUserId&&this.canPlayChatSound()&&this.audio.play("message"))},this.deviceUpdateListener=({device:t,preview:i})=>{i||("audiooutput"===t.kind&&(this.audio.setDevice(t.deviceId),this.remove("speaker-switched"),this.add({id:"speaker-switched",message:`${this.t("notifications.connected_to")} ${t.label}`,icon:this.iconPack.speaker,duration:5e3})),"videoinput"===t.kind&&(this.remove("camera-switched"),this.add({id:"camera-switched",message:`${this.t("notifications.connected_to")} ${t.label}`,icon:this.meeting.self.videoEnabled?this.iconPack.video_on:this.iconPack.video_off,iconVariant:this.meeting.self.videoEnabled?"primary":"danger",duration:5e3})),"audioinput"===t.kind&&(this.remove("mic-switched"),this.add({id:"mic-switched",message:`${this.t("notifications.connected_to")} ${t.label}`,icon:this.meeting.self.audioEnabled?this.iconPack.mic_on:this.iconPack.mic_off,iconVariant:this.meeting.self.audioEnabled?"primary":"danger",duration:5e3})))},this.socketConnectionUpdateListener=({state:t,reconnectionAttempt:i,reconnected:s})=>{switch(t){case"connected":this.remove("socket"),s&&this.add({id:"socket",icon:this.iconPack.wifi,message:this.t("network.restored"),duration:3e3});break;case"disconnected":this.remove("socket"),this.add({id:"socket",icon:this.iconPack.disconnected,message:this.t("network.reconnecting")});break;case"reconnecting":i>=6?(this.remove("socket"),this.add({id:"socket",icon:this.iconPack.disconnected,message:this.t("network.disconnected"),button:{text:this.t("end"),variant:"danger",onClick:()=>{var t;return null===(t=this.meeting)||void 0===t?void 0:t.leave()}}})):i>=4&&(this.remove("socket"),this.add({id:"socket",icon:this.iconPack.disconnected,message:this.t("network.delay_extended")}));break;case"failed":this.remove("socket"),this.add({id:"socket",icon:this.iconPack.disconnected,message:this.t("network.leaving"),button:{text:this.t("end"),variant:"danger",onClick:()=>{var t;return null===(t=this.meeting)||void 0===t?void 0:t.leave()}}})}},this.activeTabUpdateListener=i=>{if(f.tab_sync)switch(i.type){case"plugin":const s=t.plugins.active.toArray().find((t=>t.id==i.id));null!=s&&this.add({id:"activeTab",message:`${this.t("notifications.plugin_switched_to")} ${s.name}`,duration:v.participant_joined});break;case"screenshare":const e=t.participants.joined.toArray().filter((t=>t.screenShareEnabled)).find((t=>t.id==i.id));null!=e&&this.add({id:"spotlight",message:`Now watching ${e.name}'s screen`,duration:v.webinar})}},this.peerStageStatusListener=t=>{"REQUESTED_TO_JOIN_STAGE"===t.stageStatus&&(this.add({id:"stage-request-"+t.id,message:`${t.name} ${this.t("notifications.requested_to_join_stage")}`,duration:v.webinar,button:{text:this.t("notifications.accept"),variant:"primary",onClick:async()=>{await this.meeting.stage.grantAccess([t.userId]),this.remove("stage-request-"+t.id)}}}),k.webinar&&this.audio.play("joined")),"ON_STAGE"===t.stageStatus&&(this.add({id:"stage-joined-"+t.id,message:`${t.name} ${this.t("notifications.joined_stage")}`,duration:v.webinar}),k.webinar&&this.audio.play("joined"))},this.stageRequestAccepted=()=>{this.add({id:"stage-request-accepted",message:this.t("notifications.request_to_join_accepted"),duration:3e3})},this.stageRequestRejected=()=>{this.add({id:"stage-request-rejected",message:this.t("notifications.request_to_join_rejected"),duration:3e3})},this.newStageRequests=({count:t})=>{this.add({id:"new-stage-request",message:`You have ${t<0?"new stage":t+" pending"} request${1===t?"":"s"}`,duration:3e3})},this.stageStatusUpdateListener=i=>{"ON_STAGE"===i?this.addStagePeersListeners(t):this.removeStagePeersListeners(t)},!u(t)&&(null===(s=t.chat)||void 0===s||s.addListener("chatUpdate",this.chatUpdateListener)),"CHAT"===(null===(e=t.self.config.viewType)||void 0===e?void 0:""+e))return;const _=t.self.getCurrentDevices();null!=_.speaker&&this.audio.setDevice(_.speaker.deviceId),m?null===(n=t.stage)||void 0===n||n.on("stageStatusUpdate",this.stageStatusUpdateListener):this.addStagePeersListeners(t),this.canAcceptWaitingRequests()&&(t.participants.waitlisted.addListener("participantJoined",this.waitlistedParticipantJoinedListener),t.participants.waitlisted.addListener("participantLeft",this.waitlistedParticipantLeftListener)),null===(o=t.polls)||void 0===o||o.addListener("pollsUpdate",this.pollUpdateListener),t.self.addListener("deviceUpdate",this.deviceUpdateListener),t.meta.addListener("socketConnectionUpdate",this.socketConnectionUpdateListener),null===(h=t.meta)||void 0===h||h.addListener("activeTabUpdate",this.activeTabUpdateListener),null===(r=t.recording)||void 0===r||r.addListener("recordingUpdate",this.onRecordingUpdate),null===(d=t.stage)||void 0===d||d.addListener("stageRequestApproved",this.stageRequestAccepted),null===(p=t.stage)||void 0===p||p.addListener("stageRequestRejected",this.stageRequestRejected),t.self.permissions.stageEnabled&&t.self.permissions.acceptStageRequests&&(null===(g=t.stage)||void 0===g||g.addListener("newStageRequest",this.newStageRequests))}configChanged(t){null!=t&&null!=(null==t?void 0:t.config)&&(this.permissions=function(t){const i=Object.assign({},k);return null==t||(Object.assign(i.notification_sounds,t.notification_sounds),Object.assign(i.notifications,t.notifications),Object.assign(i.notification_duration,t.notification_duration),i.participant_chat_message_sound_notification_limit=t.participant_chat_message_sound_notification_limit,i.participant_joined_sound_notification_limit=t.participant_joined_sound_notification_limit),i}(t.config),this.enabledSounds=j(this.permissions.notification_sounds))}statesChanged(t){var i;if(null!=t){const s=!(null===(i=null==t?void 0:t.prefs)||void 0===i?void 0:i.muteNotificationSounds);for(const t of this.enabledSounds)t in this.permissions.notification_sounds&&(this.permissions.notification_sounds[t]=s)}}apiErrorListener({detail:t}){const{trace:i,message:s}=t;this.add({id:i,message:s,duration:v,icon:this.iconPack.warning})}sendNotificationListener({detail:t}){const{trace:i,message:s}=t;this.add({id:i,message:s,duration:v})}add(t){"visible"===document.visibilityState&&this.notifications.length<5&&(this.notifications=[...this.notifications,t])}remove(t){this.notifications=this.notifications.filter((i=>i.id!==t))}handleDismiss(t){t.stopPropagation();const i=t.detail,e=this.host.shadowRoot.querySelector(`[data-id="${i}"]`);null==e||e.classList.add("exit"),setTimeout((()=>{s((()=>{this.remove(i)}))}),400)}canPlayParticipantJoinedSound(){return null==this.permissions.participant_joined_sound_notification_limit||this.permissions.participant_joined_sound_notification_limit<=0||this.meeting.participants.count<=this.permissions.participant_joined_sound_notification_limit}canPlayChatSound(){return null==this.permissions.participant_chat_message_sound_notification_limit||this.permissions.participant_chat_message_sound_notification_limit<=0||this.meeting.participants.count<=this.permissions.participant_chat_message_sound_notification_limit}canAcceptWaitingRequests(){return this.permissions.notifications.participant_joined_waitlist&&this.meeting.self.permissions.acceptWaitingRequests}render(){if(this.meeting)return e(n,null,e("div",{onMouseEnter:()=>this.paused=!0,onFocusin:()=>this.paused=!0,onMouseLeave:()=>this.paused=!1,onFocusout:()=>this.paused=!1},this.notifications.map((t=>e("rtk-notification",{size:this.size,key:t.id,"data-id":t.id,notification:t,onRtkNotificationDismiss:t=>this.handleDismiss(t),iconPack:this.iconPack,paused:this.paused,t:this.t})))))}get host(){return this}static get watchers(){return{meeting:[{meetingChanged:0}],config:[{configChanged:0}],states:[{statesChanged:0}]}}static get style(){return":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;z-index:100}rtk-notification{margin-top:var(--rtk-space-2, 8px)}"}},[1,"rtk-notifications",{meeting:[16],states:[16],config:[16],t:[16],size:[513],iconPack:[16],notifications:[32],paused:[32]},[[8,"rtkApiError","apiErrorListener"],[8,"rtkSendNotification","sendNotificationListener"]],{meeting:[{meetingChanged:0}],config:[{configChanged:0}],states:[{statesChanged:0}]}]);function w(){"undefined"!=typeof customElements&&["rtk-notifications","rtk-button","rtk-icon","rtk-notification"].forEach((t=>{switch(t){case"rtk-notifications":customElements.get(o(t))||customElements.define(o(t),b);break;case"rtk-button":customElements.get(o(t))||g();break;case"rtk-icon":customElements.get(o(t))||m();break;case"rtk-notification":customElements.get(o(t))||f()}}))}_([p()],b.prototype,"meeting",void 0),_([p()],b.prototype,"states",void 0),_([p()],b.prototype,"config",void 0),_([p()],b.prototype,"t",void 0),_([p()],b.prototype,"iconPack",void 0),w();const $=b,C=w;export{$ as RtkNotifications,C as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as i,h as e,d as r,t as a}from"./p-BBHQOrFK.js";import{c as o,e as s,i as n}from"./p-DhwysA2e.js";import"./p-DxDYE5-a.js";import"./p-C0vp-Q7v.js";import"./p-Dguuxuf6.js";import{S as d}from"./p-bRRQr4xn.js";var c=function(t,i,e,r){var a,o=arguments.length,s=o<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,e):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,e,r);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(s=(o<3?a(s):o>3?a(i,e,s):a(i,e))||s);return o>3&&s&&Object.defineProperty(i,e,s),s};const p=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.isPinned=!1,this.nameTagPosition="bottom-left",this.isPreview=!1,this.config=o(),this.variant="solid",this.iconPack=s,this.t=n(),this.onVideoUpdate=t=>{this.videoState=t}}connectedCallback(){this.participantsChanged(this.participant)}componentDidLoad(){this.videoStateChanged(this.videoState)}disconnectedCallback(){null!=this.participant&&this.participant.removeListener("videoUpdate",this.onVideoUpdate)}async participantsChanged(t){null!=t&&(this.videoState={videoEnabled:t.videoEnabled,videoTrack:t.videoTrack},this.isPinned=t.isPinned,t.addListener("videoUpdate",this.onVideoUpdate))}videoStateChanged(t){if(null!=t&&null!=this.videoEl)if(t.videoEnabled){const i=new MediaStream;i.addTrack(t.videoTrack),this.videoEl.srcObject=i}else this.videoEl.srcObject=void 0}isMirrored(){var t;if(null!=this.participant&&("preview"in this.participant||this.isPreview)){const i=this.states,e=null===(t=null==i?void 0:i.prefs)||void 0===t?void 0:t.mirrorVideo;if("boolean"==typeof e)return e}return!1}render(){var t,i,a,o;return e(r,{key:"28dd3343464f9c18cae6161f8ad56005b748a637"},e("video",{key:"556343e40a061ddb9522569a77b574309bed9f31",ref:t=>this.videoEl=t,class:{visible:null===(t=this.videoState)||void 0===t?void 0:t.videoEnabled,mirror:this.isMirrored(),[null!==(o=null===(a=null===(i=this.config)||void 0===i?void 0:i.config)||void 0===a?void 0:a.videoFit)&&void 0!==o?o:"cover"]:!0},autoPlay:!0,playsInline:!0,muted:!0}),e("slot",{key:"c5da0b57d92652e54ef88cedcc269ccc720d1054"}))}static get watchers(){return{participant:[{participantsChanged:0}],videoState:[{videoStateChanged:0}]}}static get style(){return":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:flex;align-items:center;justify-content:center;aspect-ratio:16 / 9;height:var(--rtk-space-56, 224px);overflow:hidden;border-radius:var(--rtk-border-radius-lg, 12px);-webkit-user-select:none;-moz-user-select:none;user-select:none;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-video-bg, 24 24 24) / var(--tw-bg-opacity));transition-property:var(--rtk-transition-property, all);transition-duration:150ms}@media (prefers-reduced-motion){:host{--rtk-transition-property:none}}:host([size='sm'][variant='solid']) ::slotted(rtk-name-tag){left:var(--rtk-space-2, 8px);bottom:var(--rtk-space-2, 8px);height:var(--rtk-space-4, 16px)}video{display:none;position:absolute;height:100%;width:100%;border-radius:var(--rtk-border-radius-lg, 12px)}video.contain{-o-object-fit:contain;object-fit:contain}video.cover{-o-object-fit:cover;object-fit:cover}video.visible{display:block}video::-webkit-media-controls{display:none !important}:host([variant='gradient']) ::slotted(rtk-audio-visualizer){position:absolute;top:var(--rtk-space-2, 8px);right:var(--rtk-space-2, 8px);border-radius:9999px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));padding:var(--rtk-space-2, 8px)}:host([variant='gradient']) ::slotted(rtk-name-tag){bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);display:flex;width:100%;align-items:center;justify-content:center;text-align:center;background-color:transparent;background-image:linear-gradient(to top, var(--tw-gradient-stops));--tw-gradient-from:rgb(var(--rtk-colors-background-1000, 8 8 8));--tw-gradient-to:rgba(var(--rtk-colors-background-1000, 8 8 8) / 0);--tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to:transparent}video.mirror{transform:scaleX(-1)}@media (orientation: portrait){:host{height:var(--rtk-space-44, 176px)}}"}},[257,"rtk-participant-setup",{nameTagPosition:[513,"name-tag-position"],isPreview:[4,"is-preview"],participant:[16],states:[16],config:[16],variant:[513],size:[513],iconPack:[16],t:[16],videoState:[32],isPinned:[32]},void 0,{participant:[{participantsChanged:0}],videoState:[{videoStateChanged:0}]}]);function l(){"undefined"!=typeof customElements&&["rtk-participant-setup"].forEach((t=>{"rtk-participant-setup"===t&&(customElements.get(a(t))||customElements.define(a(t),p))}))}c([d()],p.prototype,"states",void 0),c([d()],p.prototype,"config",void 0),c([d()],p.prototype,"iconPack",void 0),c([d()],p.prototype,"t",void 0),l();const v=p,h=l;export{v as RtkParticipantSetup,h as defineCustomElement}
1
+ import{p as t,H as i,h as e,d as r,t as a}from"./p-BBHQOrFK.js";import{c as o,e as s,i as n}from"./p-DhwysA2e.js";import"./p-D9EtbXLL.js";import"./p-C0vp-Q7v.js";import"./p-Dguuxuf6.js";import{S as d}from"./p-bRRQr4xn.js";var c=function(t,i,e,r){var a,o=arguments.length,s=o<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,e):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,e,r);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(s=(o<3?a(s):o>3?a(i,e,s):a(i,e))||s);return o>3&&s&&Object.defineProperty(i,e,s),s};const p=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.isPinned=!1,this.nameTagPosition="bottom-left",this.isPreview=!1,this.config=o(),this.variant="solid",this.iconPack=s,this.t=n(),this.onVideoUpdate=t=>{this.videoState=t}}connectedCallback(){this.participantsChanged(this.participant)}componentDidLoad(){this.videoStateChanged(this.videoState)}disconnectedCallback(){null!=this.participant&&this.participant.removeListener("videoUpdate",this.onVideoUpdate)}async participantsChanged(t){null!=t&&(this.videoState={videoEnabled:t.videoEnabled,videoTrack:t.videoTrack},this.isPinned=t.isPinned,t.addListener("videoUpdate",this.onVideoUpdate))}videoStateChanged(t){if(null!=t&&null!=this.videoEl)if(t.videoEnabled){const i=new MediaStream;i.addTrack(t.videoTrack),this.videoEl.srcObject=i}else this.videoEl.srcObject=void 0}isMirrored(){var t;if(null!=this.participant&&("preview"in this.participant||this.isPreview)){const i=this.states,e=null===(t=null==i?void 0:i.prefs)||void 0===t?void 0:t.mirrorVideo;if("boolean"==typeof e)return e}return!1}render(){var t,i,a,o;return e(r,{key:"28dd3343464f9c18cae6161f8ad56005b748a637"},e("video",{key:"556343e40a061ddb9522569a77b574309bed9f31",ref:t=>this.videoEl=t,class:{visible:null===(t=this.videoState)||void 0===t?void 0:t.videoEnabled,mirror:this.isMirrored(),[null!==(o=null===(a=null===(i=this.config)||void 0===i?void 0:i.config)||void 0===a?void 0:a.videoFit)&&void 0!==o?o:"cover"]:!0},autoPlay:!0,playsInline:!0,muted:!0}),e("slot",{key:"c5da0b57d92652e54ef88cedcc269ccc720d1054"}))}static get watchers(){return{participant:[{participantsChanged:0}],videoState:[{videoStateChanged:0}]}}static get style(){return":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:flex;align-items:center;justify-content:center;aspect-ratio:16 / 9;height:var(--rtk-space-56, 224px);overflow:hidden;border-radius:var(--rtk-border-radius-lg, 12px);-webkit-user-select:none;-moz-user-select:none;user-select:none;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-video-bg, 24 24 24) / var(--tw-bg-opacity));transition-property:var(--rtk-transition-property, all);transition-duration:150ms}@media (prefers-reduced-motion){:host{--rtk-transition-property:none}}:host([size='sm'][variant='solid']) ::slotted(rtk-name-tag){left:var(--rtk-space-2, 8px);bottom:var(--rtk-space-2, 8px);height:var(--rtk-space-4, 16px)}video{display:none;position:absolute;height:100%;width:100%;border-radius:var(--rtk-border-radius-lg, 12px)}video.contain{-o-object-fit:contain;object-fit:contain}video.cover{-o-object-fit:cover;object-fit:cover}video.visible{display:block}video::-webkit-media-controls{display:none !important}:host([variant='gradient']) ::slotted(rtk-audio-visualizer){position:absolute;top:var(--rtk-space-2, 8px);right:var(--rtk-space-2, 8px);border-radius:9999px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));padding:var(--rtk-space-2, 8px)}:host([variant='gradient']) ::slotted(rtk-name-tag){bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);display:flex;width:100%;align-items:center;justify-content:center;text-align:center;background-color:transparent;background-image:linear-gradient(to top, var(--tw-gradient-stops));--tw-gradient-from:rgb(var(--rtk-colors-background-1000, 8 8 8));--tw-gradient-to:rgba(var(--rtk-colors-background-1000, 8 8 8) / 0);--tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to:transparent}video.mirror{transform:scaleX(-1)}@media (orientation: portrait){:host{height:var(--rtk-space-44, 176px)}}"}},[257,"rtk-participant-setup",{nameTagPosition:[513,"name-tag-position"],isPreview:[4,"is-preview"],participant:[16],states:[16],config:[16],variant:[513],size:[513],iconPack:[16],t:[16],videoState:[32],isPinned:[32]},void 0,{participant:[{participantsChanged:0}],videoState:[{videoStateChanged:0}]}]);function l(){"undefined"!=typeof customElements&&["rtk-participant-setup"].forEach((t=>{"rtk-participant-setup"===t&&(customElements.get(a(t))||customElements.define(a(t),p))}))}c([d()],p.prototype,"states",void 0),c([d()],p.prototype,"config",void 0),c([d()],p.prototype,"iconPack",void 0),c([d()],p.prototype,"t",void 0),l();const v=p,h=l;export{v as RtkParticipantSetup,h as defineCustomElement}
@@ -1 +1 @@
1
- import{R as o,d as s}from"./p-BXHUa6x_.js";const a=o,p=s;export{a as RtkParticipantTile,p as defineCustomElement}
1
+ import{R as o,d as s}from"./p-CRI4EXkA.js";const p=o,r=s;export{p as RtkParticipantTile,r as defineCustomElement}
@@ -1 +1 @@
1
- import{R as o,d as s}from"./p--VK1POSX.js";const p=o,r=s;export{p as RtkParticipant,r as defineCustomElement}
1
+ import{R as o,d as s}from"./p-CBGt9ESN.js";const t=o,p=s;export{t as RtkParticipant,p as defineCustomElement}
@@ -1 +1 @@
1
- import{R as o,d as s}from"./p-Bf-vQ6U9.js";const p=o,r=s;export{p as RtkParticipantsStageList,r as defineCustomElement}
1
+ import{R as o,d as s}from"./p-BYNelMao.js";const a=o,p=s;export{a as RtkParticipantsStageList,p as defineCustomElement}
@@ -1 +1 @@
1
- import{R as o,d as s}from"./p-93ZUKlQ1.js";const p=o,r=s;export{p as RtkParticipantsStageQueue,r as defineCustomElement}
1
+ import{R as o,d as s}from"./p-BD2FfUwc.js";const p=o,r=s;export{p as RtkParticipantsStageQueue,r as defineCustomElement}
@@ -1 +1 @@
1
- import{R as o,d as s}from"./p-Bf-HIBwL.js";const p=o,r=s;export{p as RtkParticipantsViewerList,r as defineCustomElement}
1
+ import{R as o,d as s}from"./p-oJLPa1F-.js";const a=o,p=s;export{a as RtkParticipantsViewerList,p as defineCustomElement}
@@ -1 +1 @@
1
- import{R as o,d as p}from"./p-DdSpe6Sb.js";const s=o,r=p;export{s as RtkParticipantsWaitingList,r as defineCustomElement}
1
+ import{R as o,d as r}from"./p-xKvr8ufu.js";const s=o,p=r;export{s as RtkParticipantsWaitingList,p as defineCustomElement}