@clickview/lite 0.35.2-dev.0 → 0.35.2

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 (297) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/109-lite-e638e5617a.chunk.css +3 -0
  3. package/dist/css/{6683-lite-bfbd8a654d.chunk.css → 1366-lite-69969922c3.chunk.css} +1 -1
  4. package/dist/css/{8541-lite-0f6c636afb.chunk.css → 1781-lite-62db879d64.chunk.css} +1 -1
  5. package/dist/css/{1820-lite-983fc2b64e.chunk.css → 1820-lite-e06465f5de.chunk.css} +1 -1
  6. package/dist/css/{7726-lite-25438ca851.chunk.css → 1944-lite-6cd5066b84.chunk.css} +0 -1
  7. package/dist/css/{1201-lite-c31c094e0b.chunk.css → 1980-lite-3c1d9a0bd8.chunk.css} +1 -1
  8. package/dist/css/{5306-lite-40a1dcaba5.chunk.css → 275-lite-4f19640eb7.chunk.css} +1 -1
  9. package/dist/css/{9251-lite-3c8ef33419.chunk.css → 3446-lite-1b1ec87a28.chunk.css} +2 -2
  10. package/dist/css/{4463-lite-b9b1686d14.chunk.css → 3755-lite-0da0cc9d62.chunk.css} +1 -1
  11. package/dist/css/{8469-lite-bc1a27e4da.chunk.css → 3987-lite-26ebfc882b.chunk.css} +1 -1
  12. package/dist/css/{9704-lite-60ead9f8df.chunk.css → 4145-lite-10dcae6491.chunk.css} +1 -1
  13. package/dist/css/{3311-lite-8f53694323.chunk.css → 4373-lite-70e0bc4a9c.chunk.css} +1 -1
  14. package/dist/css/{5127-lite-be5b495f2e.chunk.css → 4405-lite-d4ae59eb2d.chunk.css} +1 -1
  15. package/dist/css/{4728-lite-be5b495f2e.chunk.css → 5151-lite-d4ae59eb2d.chunk.css} +1 -1
  16. package/dist/css/{8364-lite-8c45fd1bcc.chunk.css → 5171-lite-67352d5f48.chunk.css} +1 -1
  17. package/dist/css/{9719-lite-f28f11cc5a.chunk.css → 519-lite-e5eb6a5c45.chunk.css} +1 -2
  18. package/dist/css/{1519-lite-8818fa8d4c.chunk.css → 5555-lite-0ad79a4f81.chunk.css} +1 -1
  19. package/dist/css/{763-lite-8818fa8d4c.chunk.css → 5611-lite-0ad79a4f81.chunk.css} +1 -1
  20. package/dist/css/{5965-lite-8818fa8d4c.chunk.css → 5659-lite-0ad79a4f81.chunk.css} +1 -1
  21. package/dist/css/{9133-lite-bc1a27e4da.chunk.css → 6076-lite-26ebfc882b.chunk.css} +1 -1
  22. package/dist/css/{2408-lite-d788a06bf3.chunk.css → 6154-lite-9de6d937cb.chunk.css} +1 -1
  23. package/dist/css/{1461-lite-8a6d9f8005.chunk.css → 6702-lite-7caa0be777.chunk.css} +1 -1
  24. package/dist/css/{1514-lite-b377d8aad7.chunk.css → 6822-lite-2c4dbd6721.chunk.css} +1 -1
  25. package/dist/css/{4546-lite-3d08e5e8c2.chunk.css → 6957-lite-d486456f1e.chunk.css} +1 -1
  26. package/dist/css/{9516-lite-4751b1e0aa.chunk.css → 7164-lite-4424261809.chunk.css} +5 -5
  27. package/dist/css/7178-lite-b4e4346f43.chunk.css +3 -0
  28. package/dist/css/{3401-lite-0b8496b169.chunk.css → 7286-lite-871baa523e.chunk.css} +2 -2
  29. package/dist/css/{9871-lite-71a39d9bb3.chunk.css → 7484-lite-bef9094c58.chunk.css} +1 -1
  30. package/dist/css/{2469-lite-7a8e220d2f.chunk.css → 7564-lite-d60de6c7e1.chunk.css} +1 -1
  31. package/dist/css/{7679-lite-66e1f0dc57.chunk.css → 7701-lite-6d26cc737a.chunk.css} +0 -1
  32. package/dist/css/{4956-lite-12f53a63d0.chunk.css → 8095-lite-814daf86d6.chunk.css} +1 -1
  33. package/dist/css/{4210-lite-5f2e12e28a.chunk.css → 817-lite-d4b875a3bb.chunk.css} +1 -1
  34. package/dist/css/8329-lite-1f86f27b10.chunk.css +3 -0
  35. package/dist/css/8978-lite-aa21368531.chunk.css +3 -0
  36. package/dist/css/{2651-lite-c31c094e0b.chunk.css → 9522-lite-3c1d9a0bd8.chunk.css} +1 -1
  37. package/dist/css/{1688-lite-cbde295a12.chunk.css → 9622-lite-23f29cce3d.chunk.css} +1 -1
  38. package/dist/css/{757-lite-649ce0643d.chunk.css → 9714-lite-ac0b76a84c.chunk.css} +1 -1
  39. package/dist/css/{2703-lite-c11aaae4be.chunk.css → 9869-lite-baa5f27c85.chunk.css} +3 -6
  40. package/dist/css/{lite-app-ddb4f64bbb.css → lite-app-df99273901.css} +7 -7
  41. package/dist/languages/en.json +1 -1
  42. package/dist/scripts/109-c94f9ee532-lite.chunk.js +1 -0
  43. package/dist/scripts/1285-2d3299c556-lite.chunk.js +1 -0
  44. package/dist/scripts/{1316-a4f3ec3b20-lite.chunk.js → 1316-6f10b36512-lite.chunk.js} +1 -1
  45. package/dist/scripts/1366-9085be8f1d-lite.chunk.js +2 -0
  46. package/dist/scripts/{9433-17de94d578-lite.chunk.js → 1517-b1cad166ec-lite.chunk.js} +1 -1
  47. package/dist/scripts/{1518-bed0a6528c-lite.chunk.js → 1518-eaabe78385-lite.chunk.js} +1 -1
  48. package/dist/scripts/1672-18d6a86a04-lite.chunk.js +2 -0
  49. package/dist/scripts/{8541-e93ccc1e65-lite.chunk.js → 1781-a04e438477-lite.chunk.js} +1 -1
  50. package/dist/scripts/1820-d34eefdad4-lite.chunk.js +1 -0
  51. package/dist/scripts/{1863-0c5334f2c2-lite.chunk.js → 1863-e2e84114ee-lite.chunk.js} +1 -1
  52. package/dist/scripts/1913-00de345658-lite.chunk.js +1 -0
  53. package/dist/scripts/1944-23f4b400c6-lite.chunk.js +1 -0
  54. package/dist/scripts/{1201-c93ac8a29a-lite.chunk.js → 1980-535747e896-lite.chunk.js} +1 -1
  55. package/dist/scripts/209-d5def5db16-lite.chunk.js +1 -0
  56. package/dist/scripts/{2118-7741e69919-lite.chunk.js → 2118-4e769f5020-lite.chunk.js} +1 -1
  57. package/dist/scripts/2208-c345263710-lite.chunk.js +1 -0
  58. package/dist/scripts/2269-48415bbc64-lite.chunk.js +1 -0
  59. package/dist/scripts/2279-02a72d36ec-lite.chunk.js +1 -0
  60. package/dist/scripts/{2318-0eb533e9f6-lite.chunk.js → 2318-a0fc0fe177-lite.chunk.js} +1 -1
  61. package/dist/scripts/2608-5af270eedf-lite.chunk.js +1 -0
  62. package/dist/scripts/2743-deafaa1681-lite.chunk.js +1 -0
  63. package/dist/scripts/275-ba99531836-lite.chunk.js +1 -0
  64. package/dist/scripts/3012-cc96ee5265-lite.chunk.js +1 -0
  65. package/dist/scripts/{3020-b05e9ea141-lite.chunk.js → 3020-923bf44c9b-lite.chunk.js} +1 -1
  66. package/dist/scripts/3154-539a352006-lite.chunk.js +1 -0
  67. package/dist/scripts/3371-bb9a674c07-lite.chunk.js +1 -0
  68. package/dist/scripts/{9251-c959bef104-lite.chunk.js → 3446-f8a4d517dd-lite.chunk.js} +1 -1
  69. package/dist/scripts/3488-dd8581e604-lite.chunk.js +2 -0
  70. package/dist/scripts/{3645-d1313ec6dc-lite.chunk.js → 3645-30ba602f0c-lite.chunk.js} +1 -1
  71. package/dist/scripts/{3667-6ce2b5b14a-lite.chunk.js → 3667-c9a9052d61-lite.chunk.js} +1 -1
  72. package/dist/scripts/3706-482b7bb8d2-lite.chunk.js +2 -0
  73. package/dist/scripts/{4463-7a07bc54f0-lite.chunk.js → 3755-6ed23bfa7a-lite.chunk.js} +1 -1
  74. package/dist/scripts/3865-f7e73fec9c-lite.chunk.js +1 -0
  75. package/dist/scripts/3962-3dcedae047-lite.chunk.js +1 -0
  76. package/dist/scripts/{8469-c872f52295-lite.chunk.js → 3987-8a8da439f0-lite.chunk.js} +1 -1
  77. package/dist/scripts/{9704-a3a54ec316-lite.chunk.js → 4145-8a549f2fd1-lite.chunk.js} +1 -1
  78. package/dist/scripts/4373-388f025686-lite.chunk.js +1 -0
  79. package/dist/scripts/4417-1ef8363302-lite.chunk.js +1 -0
  80. package/dist/scripts/4537-6383a3ea11-lite.chunk.js +1 -0
  81. package/dist/scripts/4632-ac71090d0d-lite.chunk.js +1 -0
  82. package/dist/scripts/{4690-a714a10250-lite.chunk.js → 4690-57efd6540e-lite.chunk.js} +1 -1
  83. package/dist/scripts/{4728-8837108457-lite.chunk.js → 5151-28b95c9098-lite.chunk.js} +1 -1
  84. package/dist/scripts/{8364-7054d36da8-lite.chunk.js → 5171-8572a352e6-lite.chunk.js} +1 -1
  85. package/dist/scripts/519-4140367219-lite.chunk.js +1 -0
  86. package/dist/scripts/528-9a6deb93d3-lite.chunk.js +1 -0
  87. package/dist/scripts/{5965-ba2cf10fc0-lite.chunk.js → 5555-e227390cc4-lite.chunk.js} +1 -1
  88. package/dist/scripts/{1519-5df8482b24-lite.chunk.js → 5611-d521edcea1-lite.chunk.js} +1 -1
  89. package/dist/scripts/5659-176b355d0b-lite.chunk.js +1 -0
  90. package/dist/scripts/5974-8af9af8fae-lite.chunk.js +1 -0
  91. package/dist/scripts/{9133-d324adda28-lite.chunk.js → 6076-d0ab857b36-lite.chunk.js} +1 -1
  92. package/dist/scripts/{2408-04112a0ed3-lite.chunk.js → 6154-05e9ba5525-lite.chunk.js} +1 -1
  93. package/dist/scripts/{6274-7545674bdd-lite.chunk.js → 6274-f3769a7518-lite.chunk.js} +1 -1
  94. package/dist/scripts/6290-337e7cf0ba-lite.chunk.js +1 -0
  95. package/dist/scripts/{6368-91be19eabb-lite.chunk.js → 6368-632bb31d55-lite.chunk.js} +1 -1
  96. package/dist/scripts/{6433-8a473c7c44-lite.chunk.js → 6433-7b2bd48f40-lite.chunk.js} +2 -2
  97. package/dist/scripts/{6572-d500d16bea-lite.chunk.js → 6572-02f3301356-lite.chunk.js} +1 -1
  98. package/dist/scripts/6609-433a3003e6-lite.chunk.js +1 -0
  99. package/dist/scripts/{1461-f7e964ae21-lite.chunk.js → 6702-d96686b5d6-lite.chunk.js} +1 -1
  100. package/dist/scripts/{1514-c423b48155-lite.chunk.js → 6822-35fc1ff6f9-lite.chunk.js} +1 -1
  101. package/dist/scripts/689-30388920c3-lite.chunk.js +1 -0
  102. package/dist/scripts/6930-9f739d475b-lite.chunk.js +1 -0
  103. package/dist/scripts/6957-691d6fbdc7-lite.chunk.js +1 -0
  104. package/dist/scripts/{6998-43af06b2d9-lite.chunk.js → 6998-309a16b24e-lite.chunk.js} +1 -1
  105. package/dist/scripts/7052-ff6e30ba46-lite.chunk.js +2 -0
  106. package/dist/scripts/{7056-b2c401e297-lite.chunk.js → 7056-6d3a7715c8-lite.chunk.js} +1 -1
  107. package/dist/scripts/7112-25e9780c3f-lite.chunk.js +2 -0
  108. package/dist/scripts/7115-c73692fe3a-lite.chunk.js +1 -0
  109. package/dist/scripts/714-02e02b6b62-lite.chunk.js +1 -0
  110. package/dist/scripts/7164-6489adf352-lite.chunk.js +1 -0
  111. package/dist/scripts/7178-3c36d6ca9f-lite.chunk.js +1 -0
  112. package/dist/scripts/7286-96e1818fd0-lite.chunk.js +1 -0
  113. package/dist/scripts/{7293-026c162545-lite.chunk.js → 7293-9edf8dab3b-lite.chunk.js} +1 -1
  114. package/dist/scripts/{9871-239c33690a-lite.chunk.js → 7484-f15261951b-lite.chunk.js} +1 -1
  115. package/dist/scripts/{2469-436887b1ed-lite.chunk.js → 7564-b42d4f59a6-lite.chunk.js} +1 -1
  116. package/dist/scripts/{7679-0155d80ba4-lite.chunk.js → 7701-d1233778f2-lite.chunk.js} +1 -1
  117. package/dist/scripts/{7703-2cc80445d8-lite.chunk.js → 7703-5b15c739bd-lite.chunk.js} +1 -1
  118. package/dist/scripts/{7855-f51632f802-lite.chunk.js → 7855-4598a122c5-lite.chunk.js} +1 -1
  119. package/dist/scripts/{8046-55ad30beea-lite.chunk.js → 8046-82f07ecfc6-lite.chunk.js} +1 -1
  120. package/dist/scripts/{4956-b0840f1cfa-lite.chunk.js → 8095-c6901b0fa6-lite.chunk.js} +1 -1
  121. package/dist/scripts/817-fc0acd6208-lite.chunk.js +1 -0
  122. package/dist/scripts/{8323-5d423659d5-lite.chunk.js → 8323-ca8e0d6371-lite.chunk.js} +1 -1
  123. package/dist/scripts/8329-db3ca45cb6-lite.chunk.js +2 -0
  124. package/dist/scripts/8367-6946446a01-lite.chunk.js +1 -0
  125. package/dist/scripts/8466-2c58de04c4-lite.chunk.js +1 -0
  126. package/dist/scripts/8564-3183d8595c-lite.chunk.js +1 -0
  127. package/dist/scripts/{8771-fdb379457c-lite.chunk.js → 8771-4530cc4e58-lite.chunk.js} +1 -1
  128. package/dist/scripts/{8873-514feb8faa-lite.chunk.js → 8873-e305e24d04-lite.chunk.js} +1 -1
  129. package/dist/scripts/8905-039126dc2f-lite.chunk.js +1 -0
  130. package/dist/scripts/8978-2cb6319c36-lite.chunk.js +2 -0
  131. package/dist/scripts/{9016-68a0088483-lite.chunk.js → 9016-236a5997d4-lite.chunk.js} +1 -1
  132. package/dist/scripts/9118-53bed185a5-lite.chunk.js +1 -0
  133. package/dist/scripts/{9151-97d4bda2a9-lite.chunk.js → 9151-a4b1b99c42-lite.chunk.js} +1 -1
  134. package/dist/scripts/{9226-81363cd855-lite.chunk.js → 9226-8d25ca41f8-lite.chunk.js} +1 -1
  135. package/dist/scripts/{9478-48fd914e48-lite.chunk.js → 9478-6f19948322-lite.chunk.js} +2 -2
  136. package/dist/scripts/{2651-1323807150-lite.chunk.js → 9522-f6a3bf5aa5-lite.chunk.js} +1 -1
  137. package/dist/scripts/9581-41cb8eba5b-lite.chunk.js +1 -0
  138. package/dist/scripts/{1688-ca1a2a9f04-lite.chunk.js → 9622-365c5b0e22-lite.chunk.js} +1 -1
  139. package/dist/scripts/9714-f8d16adc4e-lite.chunk.js +1 -0
  140. package/dist/scripts/9869-87a902e2d1-lite.chunk.js +2 -0
  141. package/dist/scripts/{9894-0e66baa841-lite.chunk.js → 9894-1e493082b6-lite.chunk.js} +1 -1
  142. package/dist/scripts/bundle-d66378a758.min.js +2 -0
  143. package/package.json +3 -4
  144. package/dist/css/1426-lite-840995aa62.chunk.css +0 -26
  145. package/dist/css/1805-lite-971ea2bd5a.chunk.css +0 -5
  146. package/dist/css/2819-lite-1ebce7bdcf.chunk.css +0 -6
  147. package/dist/css/487-lite-96ad0f943f.chunk.css +0 -5
  148. package/dist/css/536-lite-b8b24bff42.chunk.css +0 -29
  149. package/dist/css/5379-lite-b9ce6d4999.chunk.css +0 -29
  150. package/dist/css/5442-lite-5b422a19e4.chunk.css +0 -4
  151. package/dist/css/6746-lite-cbacfd109f.chunk.css +0 -1
  152. package/dist/css/7167-lite-e7bc934b47.chunk.css +0 -5
  153. package/dist/css/7178-lite-d470e2a870.chunk.css +0 -3
  154. package/dist/css/7791-lite-afbd54454d.chunk.css +0 -7
  155. package/dist/css/7864-lite-eaa787cfb2.chunk.css +0 -3
  156. package/dist/css/7877-lite-753ceb57d9.chunk.css +0 -7
  157. package/dist/css/8296-lite-1e63b6b5d8.chunk.css +0 -6
  158. package/dist/css/9230-lite-5010e72da6.chunk.css +0 -4
  159. package/dist/scripts/1285-d2e1267792-lite.chunk.js +0 -1
  160. package/dist/scripts/1426-94857a953c-lite.chunk.js +0 -2
  161. package/dist/scripts/1672-9ae25f79a6-lite.chunk.js +0 -2
  162. package/dist/scripts/1805-05413695af-lite.chunk.js +0 -2
  163. package/dist/scripts/1820-e2042d77dd-lite.chunk.js +0 -1
  164. package/dist/scripts/1913-fef63b944b-lite.chunk.js +0 -1
  165. package/dist/scripts/1919-7860ed3158-lite.chunk.js +0 -1
  166. package/dist/scripts/209-f1187b4df2-lite.chunk.js +0 -1
  167. package/dist/scripts/214-4053c37c3f-lite.chunk.js +0 -1
  168. package/dist/scripts/2188-0278da007c-lite.chunk.js +0 -1
  169. package/dist/scripts/2208-1799924a6a-lite.chunk.js +0 -1
  170. package/dist/scripts/2251-519ee9915e-lite.chunk.js +0 -1
  171. package/dist/scripts/2269-aa5750345e-lite.chunk.js +0 -1
  172. package/dist/scripts/2279-d09cf05062-lite.chunk.js +0 -1
  173. package/dist/scripts/2703-b8b40c84ef-lite.chunk.js +0 -2
  174. package/dist/scripts/2819-a949173a2e-lite.chunk.js +0 -2
  175. package/dist/scripts/3012-cd7060bdc9-lite.chunk.js +0 -1
  176. package/dist/scripts/3154-eb045d3ab6-lite.chunk.js +0 -1
  177. package/dist/scripts/3311-808538c9c6-lite.chunk.js +0 -1
  178. package/dist/scripts/3401-4f2a173341-lite.chunk.js +0 -1
  179. package/dist/scripts/3962-3738b0a52e-lite.chunk.js +0 -1
  180. package/dist/scripts/407-1e3ffc6e32-lite.chunk.js +0 -2
  181. package/dist/scripts/4210-dcf489c86f-lite.chunk.js +0 -1
  182. package/dist/scripts/4537-34124b109e-lite.chunk.js +0 -1
  183. package/dist/scripts/4546-a3452a1fd5-lite.chunk.js +0 -1
  184. package/dist/scripts/4632-450e2f3cf2-lite.chunk.js +0 -1
  185. package/dist/scripts/487-55f69c7d70-lite.chunk.js +0 -2
  186. package/dist/scripts/5177-ea01e21af3-lite.chunk.js +0 -2
  187. package/dist/scripts/528-8cfebb9254-lite.chunk.js +0 -1
  188. package/dist/scripts/5306-b25542939f-lite.chunk.js +0 -1
  189. package/dist/scripts/536-7c7970277a-lite.chunk.js +0 -2
  190. package/dist/scripts/5379-95b5e191fe-lite.chunk.js +0 -1
  191. package/dist/scripts/5442-82e8147edc-lite.chunk.js +0 -2
  192. package/dist/scripts/5940-875bf13577-lite.chunk.js +0 -1
  193. package/dist/scripts/5974-9d5df057b3-lite.chunk.js +0 -1
  194. package/dist/scripts/6086-642813efbe-lite.chunk.js +0 -2
  195. package/dist/scripts/6290-b8e7be07c0-lite.chunk.js +0 -1
  196. package/dist/scripts/6347-5fa92cd82e-lite.chunk.js +0 -1
  197. package/dist/scripts/6683-6a53507e03-lite.chunk.js +0 -2
  198. package/dist/scripts/6746-a32d22602e-lite.chunk.js +0 -1
  199. package/dist/scripts/689-165a5a700c-lite.chunk.js +0 -1
  200. package/dist/scripts/6891-8f643cb84b-lite.chunk.js +0 -1
  201. package/dist/scripts/6930-91a3463106-lite.chunk.js +0 -1
  202. package/dist/scripts/7052-aeeed6bc6d-lite.chunk.js +0 -2
  203. package/dist/scripts/7052-aeeed6bc6d-lite.chunk.js.LICENSE.txt +0 -1
  204. package/dist/scripts/7112-02e4fa8fd1-lite.chunk.js +0 -2
  205. package/dist/scripts/7112-02e4fa8fd1-lite.chunk.js.LICENSE.txt +0 -1
  206. package/dist/scripts/7115-0b2f29dca8-lite.chunk.js +0 -1
  207. package/dist/scripts/714-bb31ad5ca8-lite.chunk.js +0 -1
  208. package/dist/scripts/7167-9a5391a56e-lite.chunk.js +0 -1
  209. package/dist/scripts/7178-d9ec32d7d3-lite.chunk.js +0 -1
  210. package/dist/scripts/757-67c0765021-lite.chunk.js +0 -1
  211. package/dist/scripts/763-beed241551-lite.chunk.js +0 -1
  212. package/dist/scripts/7726-6d5241cf36-lite.chunk.js +0 -1
  213. package/dist/scripts/7791-45cbec4cb9-lite.chunk.js +0 -2
  214. package/dist/scripts/7791-45cbec4cb9-lite.chunk.js.LICENSE.txt +0 -1
  215. package/dist/scripts/7864-eb01ccb48c-lite.chunk.js +0 -2
  216. package/dist/scripts/7864-eb01ccb48c-lite.chunk.js.LICENSE.txt +0 -1
  217. package/dist/scripts/7877-b7427a8fc3-lite.chunk.js +0 -2
  218. package/dist/scripts/7877-b7427a8fc3-lite.chunk.js.LICENSE.txt +0 -1
  219. package/dist/scripts/8296-61fbedf389-lite.chunk.js +0 -2
  220. package/dist/scripts/8296-61fbedf389-lite.chunk.js.LICENSE.txt +0 -1
  221. package/dist/scripts/8323-5d423659d5-lite.chunk.js.LICENSE.txt +0 -1
  222. package/dist/scripts/8466-627dcf6218-lite.chunk.js +0 -1
  223. package/dist/scripts/8834-bb079c32a4-lite.chunk.js +0 -1
  224. package/dist/scripts/8905-7e47ba1360-lite.chunk.js +0 -1
  225. package/dist/scripts/9118-43d2bf9226-lite.chunk.js +0 -1
  226. package/dist/scripts/9230-b5f75f4b25-lite.chunk.js +0 -2
  227. package/dist/scripts/9230-b5f75f4b25-lite.chunk.js.LICENSE.txt +0 -1
  228. package/dist/scripts/9478-48fd914e48-lite.chunk.js.LICENSE.txt +0 -1
  229. package/dist/scripts/9516-c47539c35b-lite.chunk.js +0 -1
  230. package/dist/scripts/9657-50adfc790f-lite.chunk.js +0 -1
  231. package/dist/scripts/9719-c890a68331-lite.chunk.js +0 -2
  232. package/dist/scripts/9719-c890a68331-lite.chunk.js.LICENSE.txt +0 -1
  233. package/dist/scripts/9894-0e66baa841-lite.chunk.js.LICENSE.txt +0 -1
  234. package/dist/scripts/993-51d56e4686-lite.chunk.js +0 -2
  235. package/dist/scripts/993-51d56e4686-lite.chunk.js.LICENSE.txt +0 -1
  236. package/dist/scripts/bundle-0846da5fd2.min.js +0 -2
  237. /package/dist/css/{1919-lite-ab01f5dc3b.chunk.css → 2743-lite-ab01f5dc3b.chunk.css} +0 -0
  238. /package/dist/css/{5177-lite-8601f9a468.chunk.css → 3706-lite-8601f9a468.chunk.css} +0 -0
  239. /package/dist/css/{6891-lite-a288188c68.chunk.css → 3865-lite-a288188c68.chunk.css} +0 -0
  240. /package/dist/css/{9657-lite-08c053955f.chunk.css → 6609-lite-08c053955f.chunk.css} +0 -0
  241. /package/dist/css/{5940-lite-a3507f7491.chunk.css → 8367-lite-a3507f7491.chunk.css} +0 -0
  242. /package/dist/scripts/{1426-94857a953c-lite.chunk.js.LICENSE.txt → 1366-9085be8f1d-lite.chunk.js.LICENSE.txt} +0 -0
  243. /package/dist/scripts/{1672-9ae25f79a6-lite.chunk.js.LICENSE.txt → 1672-18d6a86a04-lite.chunk.js.LICENSE.txt} +0 -0
  244. /package/dist/scripts/{1725-0e284a32f3-lite.chunk.js → 1725-2eb898f9e6-lite.chunk.js} +0 -0
  245. /package/dist/scripts/{1750-82cf9361fb-lite.chunk.js → 1750-dd4c1bf3fc-lite.chunk.js} +0 -0
  246. /package/dist/scripts/{1830-95f21db5dc-lite.chunk.js → 1830-6aba57235d-lite.chunk.js} +0 -0
  247. /package/dist/scripts/{1891-dd253c3378-lite.chunk.js → 1891-c0e59b8132-lite.chunk.js} +0 -0
  248. /package/dist/scripts/{1805-05413695af-lite.chunk.js.LICENSE.txt → 2118-4e769f5020-lite.chunk.js.LICENSE.txt} +0 -0
  249. /package/dist/scripts/{2767-299f58bb17-lite.chunk.js → 2767-5df93b7c43-lite.chunk.js} +0 -0
  250. /package/dist/scripts/{3108-86d4c73e29-lite.chunk.js → 3108-ae911e3d71-lite.chunk.js} +0 -0
  251. /package/dist/scripts/{3171-9eda288c67-lite.chunk.js → 3171-663aa64cae-lite.chunk.js} +0 -0
  252. /package/dist/scripts/{3468-8926a9db70-lite.chunk.js → 3468-4d7076a979-lite.chunk.js} +0 -0
  253. /package/dist/scripts/{2118-7741e69919-lite.chunk.js.LICENSE.txt → 3488-dd8581e604-lite.chunk.js.LICENSE.txt} +0 -0
  254. /package/dist/scripts/{2703-b8b40c84ef-lite.chunk.js.LICENSE.txt → 3645-30ba602f0c-lite.chunk.js.LICENSE.txt} +0 -0
  255. /package/dist/scripts/{2819-a949173a2e-lite.chunk.js.LICENSE.txt → 3667-c9a9052d61-lite.chunk.js.LICENSE.txt} +0 -0
  256. /package/dist/scripts/{3645-d1313ec6dc-lite.chunk.js.LICENSE.txt → 3706-482b7bb8d2-lite.chunk.js.LICENSE.txt} +0 -0
  257. /package/dist/scripts/{389-2ab260e7d2-lite.chunk.js → 389-e7037a0807-lite.chunk.js} +0 -0
  258. /package/dist/scripts/{4182-6869dfda31-lite.chunk.js → 4182-2de6622588-lite.chunk.js} +0 -0
  259. /package/dist/scripts/{4541-9ad274071e-lite.chunk.js → 4541-c08f765eab-lite.chunk.js} +0 -0
  260. /package/dist/scripts/{4617-940157b232-lite.chunk.js → 4617-3f998d9b1e-lite.chunk.js} +0 -0
  261. /package/dist/scripts/{482-c9fd7b68d3-lite.chunk.js → 482-8139ae4723-lite.chunk.js} +0 -0
  262. /package/dist/scripts/{5229-fed729d13a-lite.chunk.js → 5229-7329bd81e6-lite.chunk.js} +0 -0
  263. /package/dist/scripts/{5385-2719aaaf84-lite.chunk.js → 5385-f53e603625-lite.chunk.js} +0 -0
  264. /package/dist/scripts/{5595-ed6e8d9ca0-lite.chunk.js → 5595-5ee4c1c5ed-lite.chunk.js} +0 -0
  265. /package/dist/scripts/{5606-68f1afd060-lite.chunk.js → 5606-2596d38d1b-lite.chunk.js} +0 -0
  266. /package/dist/scripts/{5877-1dc9ca4f2d-lite.chunk.js → 5877-0acd7d3124-lite.chunk.js} +0 -0
  267. /package/dist/scripts/{6057-3c43af21b1-lite.chunk.js → 6057-a8b9812431-lite.chunk.js} +0 -0
  268. /package/dist/scripts/{3667-6ce2b5b14a-lite.chunk.js.LICENSE.txt → 6433-7b2bd48f40-lite.chunk.js.LICENSE.txt} +0 -0
  269. /package/dist/scripts/{6450-0bde4cef33-lite.chunk.js → 6450-1b69ecb4d2-lite.chunk.js} +0 -0
  270. /package/dist/scripts/{6465-5b42f81416-lite.chunk.js → 6465-7a63bc80b6-lite.chunk.js} +0 -0
  271. /package/dist/scripts/{6480-93ab348bf1-lite.chunk.js → 6480-3e17c41241-lite.chunk.js} +0 -0
  272. /package/dist/scripts/{6689-65a1b86bb2-lite.chunk.js → 6689-ec5171ba5f-lite.chunk.js} +0 -0
  273. /package/dist/scripts/{6863-d4f402b72e-lite.chunk.js → 6863-5dbc85c4b9-lite.chunk.js} +0 -0
  274. /package/dist/scripts/{407-1e3ffc6e32-lite.chunk.js.LICENSE.txt → 7052-ff6e30ba46-lite.chunk.js.LICENSE.txt} +0 -0
  275. /package/dist/scripts/{487-55f69c7d70-lite.chunk.js.LICENSE.txt → 7112-25e9780c3f-lite.chunk.js.LICENSE.txt} +0 -0
  276. /package/dist/scripts/{7128-bb219eed51-lite.chunk.js → 7128-87b101d7b7-lite.chunk.js} +0 -0
  277. /package/dist/scripts/{7172-7710a90e85-lite.chunk.js → 7172-7dadcbf10c-lite.chunk.js} +0 -0
  278. /package/dist/scripts/{7338-a5d6a68d8e-lite.chunk.js → 7338-e0306c666f-lite.chunk.js} +0 -0
  279. /package/dist/scripts/{7432-87ce1798ff-lite.chunk.js → 7432-ed0fdcb18c-lite.chunk.js} +0 -0
  280. /package/dist/scripts/{7708-b642cddc03-lite.chunk.js → 7708-966b540945-lite.chunk.js} +0 -0
  281. /package/dist/scripts/{7715-4f575c978b-lite.chunk.js → 7715-b21edc60f0-lite.chunk.js} +0 -0
  282. /package/dist/scripts/{7925-29ca2fc37a-lite.chunk.js → 7925-c8cd8aace8-lite.chunk.js} +0 -0
  283. /package/dist/scripts/{8025-0ef8f041ea-lite.chunk.js → 8025-1982900b56-lite.chunk.js} +0 -0
  284. /package/dist/scripts/{8236-057a7f40db-lite.chunk.js → 8236-10fe50cf1f-lite.chunk.js} +0 -0
  285. /package/dist/scripts/{5177-ea01e21af3-lite.chunk.js.LICENSE.txt → 8323-ca8e0d6371-lite.chunk.js.LICENSE.txt} +0 -0
  286. /package/dist/scripts/{536-7c7970277a-lite.chunk.js.LICENSE.txt → 8329-db3ca45cb6-lite.chunk.js.LICENSE.txt} +0 -0
  287. /package/dist/scripts/{8830-122c8ae807-lite.chunk.js → 8830-16c2fd1319-lite.chunk.js} +0 -0
  288. /package/dist/scripts/{5442-82e8147edc-lite.chunk.js.LICENSE.txt → 8978-2cb6319c36-lite.chunk.js.LICENSE.txt} +0 -0
  289. /package/dist/scripts/{9016-68a0088483-lite.chunk.js.LICENSE.txt → 9016-236a5997d4-lite.chunk.js.LICENSE.txt} +0 -0
  290. /package/dist/scripts/{9060-c035711b40-lite.chunk.js → 9060-aea36d49b0-lite.chunk.js} +0 -0
  291. /package/dist/scripts/{9455-c80c14ea98-lite.chunk.js → 9455-283f477332-lite.chunk.js} +0 -0
  292. /package/dist/scripts/{6086-642813efbe-lite.chunk.js.LICENSE.txt → 9478-6f19948322-lite.chunk.js.LICENSE.txt} +0 -0
  293. /package/dist/scripts/{9674-f5e66f8c06-lite.chunk.js → 9674-25ccc9ee52-lite.chunk.js} +0 -0
  294. /package/dist/scripts/{9843-07f0304cc4-lite.chunk.js → 9843-d084ed32bf-lite.chunk.js} +0 -0
  295. /package/dist/scripts/{6433-8a473c7c44-lite.chunk.js.LICENSE.txt → 9869-87a902e2d1-lite.chunk.js.LICENSE.txt} +0 -0
  296. /package/dist/scripts/{6683-6a53507e03-lite.chunk.js.LICENSE.txt → 9894-1e493082b6-lite.chunk.js.LICENSE.txt} +0 -0
  297. /package/dist/scripts/{bundle-0846da5fd2.min.js.LICENSE.txt → bundle-d66378a758.min.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[4546],{31754:(e,t,a)=>{a.d(t,{x:()=>c});var n=a(82602),r=a(75896),i=a(89682),o=a(11576),c={groupByDateShared:function(e){var t=r.m.groupBy(e,"dateShared");return Object.keys(t).sort().reverse().reduce((function(e,a){var r=(0,n.WU)(a);return e[r]||(e[r]=[]),e[r]=e[r].concat(t[a]),e}),{})},mapActivityStatusToCheckMarkStatus:function(e){switch(e){case o.T.Complete:return i.h.Complete;case o.T.Incomplete:return i.h.Incomplete;case o.T.None:return i.h.None}},mapCheckMarkStatusToActivityStatus:function(e){switch(e){case i.h.Complete:return o.T.Complete;case i.h.Incomplete:return o.T.Incomplete;case i.h.None:return o.T.None}}}},83657:(e,t,a)=>{a.d(t,{e:()=>s});var n=a(32735),r=a(79014),i=a(10874),o=a(76177),c=a(42735),l=a(86509);function s(e){var t=n.useMemo((function(){return e.actions.sort((function(e,t){return e.order-t.order}))}),[e.actions]),a=[],s=[];t.forEach((function(e){e.button?a.push(e):s.push(e)}));var u="d-flex";return e.className&&(u+=" ".concat(e.className)),a.length||s.length?n.createElement("div",{className:u},n.createElement(n.Fragment,null,n.createElement("span",{className:"d-flex align-items-center"},a.length?a.map((function(e,t){return n.createElement(n.Fragment,{key:t},function(){if(e.label){var t=r.q.isFunction(e.label)?e.label:function(){return n.createElement(n.Fragment,null,e.label)};return n.createElement(c.K,{appLink:e.appLink,href:e.href,onClick:e.onClick,svgName:e.svgName,className:e.className,tooltip:e.tooltip,showSpinner:e.showSpinner,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled},t())}var a=n.createElement(i.h,{appLink:e.appLink,href:e.href,onClick:e.onClick,svgName:e.svgName,className:e.className,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled});return e.tooltip?n.createElement(o.u,{title:e.tooltip,spanHack:!0},a):a}())})):n.createElement(n.Fragment,null),e.sortComponent&&e.sortComponent,s.length?n.createElement(l.m,{actions:s,dropdownToggleClassName:e.actionsDropdownClassName,dropdownToggleSvgSize:e.dropdownToggleSvgSize}):n.createElement(n.Fragment,null)))):n.createElement(n.Fragment,null)}},86509:(e,t,a)=>{a.d(t,{m:()=>p});var n=a(32735),r=a(79014),i=a(81886),o=a(45157),c=a(49985),l=a(36848),s=a(83914),u=a(76177),d=a(35223);const m={dropdownToggle:"UCAnJ"};function f(e){var t="dropdown-item";return e&&(t+=" ".concat(e)),t}function v(e){var t=r.q.isFunction(e.action.label)?e.action.label:function(){return n.createElement(n.Fragment,null,e.action.label)};if(e.action.appLink)return n.createElement(l.F,{appLink:e.action.appLink,onClick:e.action.onClick,className:f(e.action.className),analyticsData:e.action.analyticsData,analyticsOptions:e.action.analyticsOptions,openInNewTab:e.action.openInNewTab,disabled:e.action.disabled},t());function a(t){t.preventDefault(),e.action.analyticsData&&e.action.analyticsOptions&&c.k.logUserAction(e.action.analyticsData,e.action.analyticsOptions),r.q.isFunction(e.action.onClick)&&e.action.onClick(),e.action.href&&i.Q.Ab.PageLoad(e.action.href,e.action.openInNewTab)}return e.action.href?n.createElement("a",{className:f(e.action.className),onClick:a,href:e.action.href},t()):n.createElement("span",{className:"cursor-pointer ".concat(f(e.action.className)),onClick:a,role:"button",tabIndex:0,onKeyDown:function(e){return"Enter"===e.key&&a(e)}},t())}function p(e){if(!e.actions||!e.actions.length)return n.createElement(n.Fragment,null);var t="dropdown";e.className&&(t+=" ".concat(e.className));var a="actions-dropdown-".concat(o.Y.getRandomInt()),r="dropdown-toggle px-0 ".concat(m.dropdownToggle);return e.dropdownToggleClassName&&(r+=" ".concat(e.dropdownToggleClassName)),n.createElement("div",{className:t},n.createElement("button",{className:r,type:"button",id:a,"data-bs-toggle":"dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},n.createElement(s.x,{svgName:d.vn.More,size:e.dropdownToggleSvgSize})),n.createElement("div",{className:"dropdown-menu dropdown-menu-end dropdown-menu-right","aria-labelledby":a},e.actions.map((function(e,t){return e.tooltip?n.createElement(u.u,{key:t,title:e.tooltip,spanHack:!0},n.createElement(v,{action:e})):n.createElement(v,{key:t,action:e})}))))}p.defaultProps={dropdownToggleClassName:"btn btn-light",dropdownToggleSvgSize:s.S.Small}},94644:(e,t,a)=>{a.d(t,{r:()=>u});var n=a(50242),r=a(81886),i=a(67058),o=a(14553),c=a(49267),l=a(49075),s={notFound:i.d,forbidden:{rating:o.q,yearLevel:o.q,region:c.a,privacy:o.q},badRequest:l._};function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e){var i;i="number"==typeof e?e:e.status;var o=Object.assign(Object.assign({},s),t);i&&r.Q.Ry.isStatusCodeError(i)&&(i!==n.o.NotFound?i!==n.o.Forbidden?a.badRequest||r.Q.Ry.throw(new o.badRequest):a.forbidden||r.Q.Ry.throw(new o.forbidden.privacy):a.notFound||r.Q.Ry.throw(new o.notFound))}}},1395:(e,t,a)=>{a.r(t),a.d(t,{StudentFeedView:()=>pt});var n=a(32735),r=a(83118),i=a(23481),o=a(81886),c=a(20354),l=a(65858),s=a(11518),u=a(39151),d=a(31949),m=a(90605),f=a(97037),v=a(65294),p=a(79612),g=a(75795),y=a(14070),h=a(97291),E=a(82602),b=a(28400),S=a(31754),N=a(20789),w=a(72188),A=a(54610),k=a(4594),D=a(68626),I=a(58704),F=a(32725),C=a(55452);const x={avatar:"y1nvt",higherWidgetBtn:"EQjTN"};var O="studentFeed.recentActivities",T=function(e){var t;if(e.shareId)return{application:h.O.SHARE,action:y.e.Share.VIEW_SHARE_LINK,args:[e.shareId]};switch(null===(t=e.object)||void 0===t?void 0:t.typeId){case k.E.Video:return{application:h.O.VIDEOS,action:y.e.Videos.PLAY_VIDEO,args:[e.object.id,b.m.slugify(e.object.name)]};case k.E.Clip:return{application:h.O.CLIPS,action:y.e.Clips.PLAY_CLIP,args:[e.object.id,b.m.slugify(e.object.name)]};case k.E.Interactive:return{application:h.O.INTERACTIVES,action:y.e.Interactives.VIEW_INTERACTIVE,args:[e.object.id,b.m.slugify(e.object.name)]};default:return null}};function j(e){var t,a,r,i;return n.createElement("div",{className:"p-1 flex-shrink-0 position-relative col-6 col-sm-4 col-md-3"},n.createElement(w.u,{video:e.data.object,type:"static",appLink:T(e.data),textPosition:D.z.Overlay,imageOptions:{size:A.h2.Medium},preload:e.preloadImage,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,setFavourite:e.setFavourite,canFavourite:e.canFavourite,checkMarkStatus:S.x.mapActivityStatusToCheckMarkStatus(null===(t=e.data.share)||void 0===t?void 0:t.activityStatus),setCheckMarkStatus:function(t){return e.setActivityStatus(e.data.shareId,e.data.object,S.x.mapCheckMarkStatusToActivityStatus(t))}}),!!(null===(r=null===(a=e.data.share)||void 0===a?void 0:a.owner)||void 0===r?void 0:r.id)&&n.createElement("div",{className:"d-flex align-items-center mt-1"},n.createElement("div",{className:"".concat(x.avatar," me-1 flex-shrink-0")},n.createElement(N.q,{imageCdnUrl:e.config.imageCdnUrl,initials:C.l.getInitials(e.data.share.owner.name,e.data.share.owner.surname),imageUrl:null===(i=e.data.share.owner.avatar)||void 0===i?void 0:i.url})),n.createElement("div",{className:"d-flex flex-column"},n.createElement("h3",{className:"font-size-normal mb-0"},C.l.getDisplayName(e.data.share.owner)),n.createElement("small",null,(0,E.WU)(e.data.share.dateShared),e.data.share.recipient.typeId!==k.E.User&&n.createElement(n.Fragment,null," • ",e.data.share.recipient.name)))))}function L(e){if(!e.recentActivities)return n.createElement(n.Fragment,null);var t=!!e.recentActivities.find((function(e){var t,a;return!!(null===(a=null===(t=e.share)||void 0===t?void 0:t.owner)||void 0===a?void 0:a.id)}));return n.createElement("div",{className:"pb-3"},n.createElement(s.kM,{name:i.T.getPhrase(O,"continueActivity"),type:F.l9.Row,contents:I.z.RecentActivities,childComponent:j,extraChildComponentProps:{config:e.config,setFavourite:e.setFavourite,canFavourite:e.canFavourite,setActivityStatus:e.setActivityStatus},collection:e.recentActivities,leftWidgetButtonClassName:t?x.higherWidgetBtn:"",rightWidgetButtonClassName:t?x.higherWidgetBtn:"",prefetched:!0}))}const M={partialAvatar:"kgqoG",partialName:"yctHY",partialDateShared:"Vno44",partialThumbnail:"OIIaa",partialAction:"acv6h",partialSeries:"S2Srj",partialTitle:"fkwl5",partialDescription:"Nim0N"};function R(){return n.createElement("div",{className:"pb-4"},n.createElement("div",{className:"mb-2"},n.createElement("div",{className:"d-flex align-items-center"},n.createElement("div",{className:"".concat(M.partialAvatar," me-2 rounded-circle partial-loading-background")}),n.createElement("div",{className:"d-flex flex-column"},n.createElement("div",{className:"partial-loading-background mb-1 ".concat(M.partialName)}),n.createElement("div",{className:"partial-loading-background ".concat(M.partialDateShared)})))),n.createElement("div",{className:"partial-loading-background rounded ".concat(M.partialThumbnail)}),n.createElement("div",{className:"d-flex align-items-center my-1"},n.createElement("div",{className:"partial-loading-background me-1 ".concat(M.partialAction)}),n.createElement("div",{className:"partial-loading-background ms-1 ".concat(M.partialAction)})),n.createElement("div",{className:"partial-loading-background mb-1 ".concat(M.partialSeries)}),n.createElement("div",{className:"partial-loading-background mb-1 ".concat(M.partialTitle)}),n.createElement("div",{className:"partial-loading-background mt-1 ".concat(M.partialDescription)}))}function z(e){return n.createElement(n.Fragment,null,new Array(e.items).fill(null).map((function(e,t){return n.createElement(R,{key:t})})))}var _=a(48548),V=a(110),P=a(1048),q=a(83345),B=i.T.encloseNamespace("studentFeed.utils");function U(e){return e.setHours(23),e.setMinutes(59),e.setSeconds(59),e}var Y={getPresetDateRanges:function(){return[{name:B("mostRecent"),default:!0},{name:B("lastWeek"),endDate:(e=new Date,e.setDate(e.getDate()+5-7-(e.getDay()||7)),U(e))},{name:B("lastMonth"),endDate:U(new Date((new Date).getFullYear(),(new Date).getMonth(),0))}];var e}};const H={dropdownDescription:"wmk99"};var W="studentFeed.studentFeedDateFilter";function $(e){if(!e.dateRange)return n.createElement(n.Fragment,null);var t=Y.getPresetDateRanges();return n.createElement(_.Z,null,n.createElement(_.Z.Toggle,{id:"student-feed-date-filter",variant:"outline-dark",className:e.floating?"rounded-pill px-3":"",size:e.floating?"lg":void 0},n.createElement(q.x,{namespace:W,phrase:"jumpTo"})),n.createElement(_.Z.Menu,{className:e.floating?"w-100":"",align:"end"},n.createElement(_.Z.Item,{as:"div",className:H.dropdownDescription},n.createElement(q.x,{namespace:W,phrase:"jumpTo"}),"..."),t.map((function(t){return n.createElement(_.Z.Item,{key:t.name,onClick:function(){return function(t){var a=o.Q.C$.getCurrentAppLink(),n=a.params||{},r=V.O.format(t.endDate,"YYYY-MM-DD");if(n.date!==r){var i=P.t.omit(n,["date"]);t.endDate&&(i.date=V.O.format(t.endDate,"YYYY-MM-DD")),o.Q.C$.trigger(Object.assign(Object.assign({},a),{params:i}),{replace:!0})}else e.scrollToCurrent()}(t)}},t.name)}))))}var Q="studentFeed.studentFeedHeader";function Z(e){return n.createElement("div",{className:"d-flex justify-content-between align-items-center"},n.createElement("h1",{className:"h2"},n.createElement(q.x,{namespace:Q,phrase:"hello",options:{name:e.currentUser.givenName}})),n.createElement($,{dateRange:e.dateRange,scrollToCurrent:e.scrollToCurrent}))}var K,G=a(97395),J=a(71995),X=a(62803),ee=a(4434);!function(e){e[e.DateAscending=0]="DateAscending",e[e.DateDescending=1]="DateDescending"}(K||(K={}));var te={getFeed:function(e){var t=e.ownerId,a=e.from,n=e.to,r=e.cursor,i=e.limit,o=e.sort,c=e.success,l=e.error,s={},u=function(e){var t=V.O.convertDateToUTC(e);return V.O.format(t,"YYYY-MM-DDTHH:mm:ss")};return r&&(s.cursor=r),t&&(s.ownerId=t),a&&(s.from=u(a)),n&&(s.to=u(n)),i&&(s.limit=i),void 0!==o&&(s.sort=o),{url:G._.urlBuilder("{gateway}/v1/users/me/feed",s),key:"feed:".concat(s.ownerId,":").concat(s.from,":").concat(s.to,":").concat(s.cursor,":").concat(s.sort,":").concat(s.limit),expiryTime:J.f.SHORT,success:c,error:l,formatData:function(e){return s.sort===K.DateAscending&&e.data.reverse(),e}}},getRecentActivities:function(){return{url:G._.urlBuilder("{gateway}/v1/users/me/recent-activities",{"query.video":ee.H.WIDGET_VIDEO_COLLECTION,"query.interactive":X.v.INTERACTIVE,"query.clip":X.v.CLIP_COLLECTION}),key:"recent:share:activities",expiryTime:J.f.SHORT,formatData:function(e){return e.map((function(e){return e.id="".concat(e.shareId,":").concat(e.object.id),e.share?(e.share.activityStatus=e.activityStatus,e):e}))}}}};function ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var ne=function(){var e,t,a=(e=n.useState(null),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,i,o,c=[],l=!0,s=!1;try{if(i=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;l=!1}else for(;!(l=(n=i.call(a)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=a.return&&(o=a.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ae(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?ae(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=a[0],i=a[1],c=o.Q.C$.getCurrentAppLink(),l=c.params||{},s=Y.getPresetDateRanges();return n.useEffect((function(){if(l.from||l.to){var e=!1;s.forEach((function(t){if(!e){var a=t.startDate&&V.O.format(t.startDate,"YYYY-MM-DD"),n=t.endDate&&V.O.format(t.endDate,"YYYY-MM-DD");a&&a!==l.from||n&&n!==l.to||(n||a)&&(e=!0,i(t))}})),e||o.Q.C$.trigger(Object.assign(Object.assign({},c),{params:P.t.omit(l,["from","to"])}),{replace:!0})}else i(s.find((function(e){return e.default})))}),[l.from,l.to]),r},re=a(23232),ie=a(99742);const oe={image:"ohAxN"};var ce="studentFeed.emptyState",le={application:h.O.DASHBOARD,action:y.e.Dashboard.HOME};function se(){return n.createElement(q.D.Provider,{value:ce},n.createElement(re.u,{className:"pt-3"},n.createElement(re.u.Image,{src:ie.W.EmptyStates.STUDENT_FEED,className:oe.image}),n.createElement(re.u.Heading,{className:"h3 d-flex align-items-center justify-content-center"},n.createElement(q.x,{phrase:"emptyStateHeading"})),n.createElement(re.u.Info,null,n.createElement(q.x,{phrase:"emptyStateInfo"})),n.createElement(re.u.Cta,{appLink:le,text:i.T.getPhrase(ce,"cta")})))}var ue=a(83657),de=a(36848),me=a(96022),fe=a(31908),ve=a(65986),pe=a(82431);const ge={avatar:"QEQhk"};function ye(e){var t;return n.createElement(n.Fragment,null,n.createElement("div",{className:"d-flex align-items-center"},n.createElement("div",{className:"".concat(ge.avatar," me-2")},n.createElement(N.q,{imageCdnUrl:e.config.imageCdnUrl,initials:C.l.getInitials(e.shareData.owner.name,e.shareData.owner.surname),imageUrl:null===(t=e.shareData.owner.avatar)||void 0===t?void 0:t.url})),n.createElement("div",{className:"d-flex flex-column"},n.createElement("h2",{className:"h6 mb-0"},C.l.getDisplayName(e.shareData.owner)),n.createElement("div",null,(0,E.WU)(e.shareData.dateShared)))),!!e.shareData.message&&n.createElement("p",{className:"mt-1 mb-0 fw-semibold"},e.shareData.message))}var he=a(78276);const Ee={imageClass:"Qig1U",fallbackText:"Bt4GN"};var be="studentFeed.feedVideoThumbnail";function Se(e){return fe.M.getCanBeConsumed(e.video).canConsume?n.createElement(w.u,{video:e.video,setFavourite:e.setFavourite,canFavourite:e.canFavourite,setCheckMarkStatus:function(t){return e.setActivityStatus(e.shareData.id,e.video,S.x.mapCheckMarkStatusToActivityStatus(t))},checkMarkStatus:S.x.mapActivityStatusToCheckMarkStatus(e.shareData.activityStatus),type:"static",textPosition:D.z.Independent,imageOptions:{size:A.h2.Large},analyticsOptions:{location:l.LZ.StudentFeed},appLink:e.appLink,preload:!0}):n.createElement(he.Z,{data:ie.W.Fallbacks.VIDEO_UNAVAILABLE_STUDENT_FEED,className:"border rounded",imageType:A.__.Thumbnails,imageClassName:"".concat(Ee.imageClass," w-25 h-25")},n.createElement("div",{className:Ee.fallbackText},n.createElement("h3",{className:"h4"},n.createElement(q.x,{namespace:be,phrase:"unavailable"})),n.createElement("p",null,n.createElement(q.x,{namespace:be,phrase:"unavailableDescription"}))))}var Ne=function(e){return{application:h.O.SHARE,action:y.e.Share.VIEW_SHARE_LINK,args:[e]}};function we(e){var t=e.data.object,a=(0,ve._)(ve.i.StudentFeed),r=fe.M.getCanBeConsumed(t).canConsume;return n.createElement("div",{className:"pb-4"},n.createElement("div",{className:"pb-2"},n.createElement(ye,{config:e.config,shareData:e.data})),n.createElement(Se,{video:e.data.object,appLink:Ne(e.data.id),shareData:e.data,setFavourite:e.setFavourite,canFavourite:e.canFavourite,setActivityStatus:e.setActivityStatus}),n.createElement(ue.e,{actions:r?a(t):[]}),fe.M.isVideo(t)&&n.createElement(me.Mr,{video:t,appLink:pe.j.getSeriesAppLink(t.series),analyticsOptions:{location:l.LZ.StudentFeed},className:r?"":"mt-2"}),n.createElement("div",null,n.createElement(de.F,{className:"d-inline-block",appLink:r?Ne(e.data.id):null},n.createElement("h3",{className:"h4 mb-0"},t.name))),!!t.description&&n.createElement("p",{className:"clamp-2 mb-0 mt-1"},t.description))}var Ae=a(68050),ke=a(69111),De=a(75896),Ie=a(11607),Fe=a(83914),Ce=a(45778),xe=a(35223);const Oe={circle:"BJPA7",active:"YuQnu",sm:"wI7Zf",xs:"KkKSG"};function Te(e){var t=e.indicator,a=e.onClick,r=Oe.circle;return t.active&&(r+=" "+Oe.active),"sm"===t.size&&(r+=" "+Oe.sm),"xs"===t.size&&(r+=" "+Oe.xs),"invisible"===t.size&&(r+=" d-none"),n.createElement(Ie.L,{className:r,onClick:a})}function je(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,i,o,c=[],l=!0,s=!1;try{if(i=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;l=!1}else for(;!(l=(n=i.call(a)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=a.return&&(o=a.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Le(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Le(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Le(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function Me(e){var t,a=function(t){return e.videos.findIndex((function(e){return e.id===t.id}))},r=je(n.useState(a(e.currentVideo)),2),i=r[0],o=r[1],c=n.useState(function(e){var t=e.videos.findIndex((function(t){return t.id===e.currentVideo.id})),a=function(e){return e<5?"std":5===e?"sm":6===e?"xs":"invisible"};return e.videos.map((function(e,n){return{active:t===n,size:a(n)}}))}(e)),l=je(c,2),s=l[0],u=l[1];n.useEffect((function(){var t=i,n=a(e.currentVideo);if(t!==n){var r=d+(n-t);o(n);var c=s.map((function(e,t){return{active:t===r,size:e.size}}));if(u(c),"std"!==s[r].size){var l=function(e,t){var a,n;e.forEach((function(e,t){"std"===e.size&&void 0===a&&(a=t),"std"===e.size&&(n=t)}));var r=P.t.deepClone(e);return"left"===t?(r[a-1]={active:!0,size:"std"},r[a-2]={active:!1,size:"sm"},r[a-3]={active:!1,size:"xs"},r[n+2]={active:!1,size:"invisible"},r[n+1]={active:!1,size:"xs"},r[n]={active:!1,size:"sm"}):(r[n+1]={active:!0,size:"std"},r[n+2]&&(r[n+2]={active:!1,size:"sm"}),r[n+3]&&(r[n+3]={active:!1,size:"xs"}),r[a-2]={active:!1,size:"invisible"},r[a-1]={active:!1,size:"xs"},r[a]={active:!1,size:"sm"}),r}(c,n<t?"left":"right");u(l)}}}),[null===(t=e.currentVideo)||void 0===t?void 0:t.id]);var d=s.findIndex((function(e){return e.active}));return n.createElement("div",{className:"d-flex align-items-center"},s.map((function(t,a){return n.createElement(Te,{key:a,indicator:t,onClick:function(){return e.onSelectIndex(a)}})})))}var Re=a(183),ze=function(e,t){var a={application:h.O.SHARE,action:y.e.Share.VIEW_SHARE_LINK,args:[e]};return t&&(a.params=t),a},_e=function(e){return fe.M.isClip(e)?{clipId:e.id}:fe.M.isInteractive(e)?{interactiveId:e.id}:{videoId:e.id}};function Ve(e){return n.createElement("div",{className:"flex-shrink-0 position-relative w-100"},n.createElement(Se,{video:e.data,appLink:ze(e.shareData.id,Object.assign(Object.assign({},_e(e.data)),{contextId:e.shareData.object.id,context:e.shareData.object.typeId===k.E.Playlist?Re.Q.Playlist:Re.Q.Series})),shareData:e.shareData,setFavourite:e.setFavourite,canFavourite:e.canFavourite,setActivityStatus:e.setActivityStatus}))}var Pe=function(e,t){var a={application:h.O.SHARE,action:y.e.Share.VIEW_SHARE_LINK,args:[e]};return t&&(a.params=t),a},qe=function(e){return fe.M.isClip(e)?{clipId:e.id}:fe.M.isInteractive(e)?{interactiveId:e.id}:{videoId:e.id}};function Be(e){return n.createElement("div",{className:"p-1 flex-shrink-0 position-relative col-6 col-sm-4 col-md-3"},n.createElement(w.u,{video:e.data,type:"static",appLink:Pe(e.shareData.id,Object.assign(Object.assign({},qe(e.data)),{contextId:e.shareData.object.id,context:e.shareData.object.typeId===k.E.Playlist?Re.Q.Playlist:Re.Q.Series})),textPosition:D.z.Overlay,imageOptions:{size:A.h2.Medium},preload:e.preloadImage,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,setFavourite:e.setFavourite,canFavourite:e.canFavourite}))}var Ue="studentFeed.feedVideoCollectionEmptyState";function Ye(e){return n.createElement(re.u,{className:"border rounded-3 pt-5 pb-3"},n.createElement(re.u.Image,{src:ie.W.EmptyStates.Playlists.PLAYLIST_VIDEOS}),n.createElement(re.u.Heading,null,n.createElement(q.x,{namespace:Ue,phrase:"heading",options:{name:e.data.name}})),e.data.typeId===k.E.Playlist&&n.createElement(re.u.Info,null,n.createElement(q.x,{namespace:Ue,phrase:"playlistInfo"})))}const He={leftWidgetButton:"bux3R",rightWidgetButton:"QTLk7"};function We(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,i,o,c=[],l=!0,s=!1;try{if(i=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;l=!1}else for(;!(l=(n=i.call(a)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=a.return&&(o=a.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return $e(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?$e(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $e(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var Qe=function(e,t){var a={application:h.O.SHARE,action:y.e.Share.VIEW_SHARE_LINK,args:[e]};return t&&(a.params=t),a},Ze=function(e){return Ce.G.isType(e,k.E.Playlist)?e.union.data:e.videos.data};function Ke(e){var t=e.data.object,a=Ze(e.data.object),r=We(n.useState(De.m.first(a)),2),i=r[0],o=r[1],c=We(n.useState(!1),2),l=c[0],u=c[1],d=n.useRef(null),m=(0,ve._)(ve.i.StudentFeed),f=a.findIndex((function(e){return e.id===i.id}));return n.createElement("div",{className:"pb-4"},n.createElement("div",{className:"pb-2"},n.createElement(ye,{config:e.config,shareData:e.data})),i?n.createElement(n.Fragment,null,n.createElement("div",{className:"position-relative"},n.createElement(s.kM,{controlsRef:d,type:F.l9.Row,contents:I.z.FeedVideos,childComponent:Ve,extraChildComponentProps:{setFavourite:e.setFavourite,canFavourite:e.canFavourite,setActivityStatus:e.setActivityStatus,shareData:e.data},collection:a,onNext:function(){o(a[f+1])},onPrevious:function(){o(a[f-1])},leftWidgetButtonClassName:He.leftWidgetButton,rightWidgetButtonClassName:He.rightWidgetButton,hideBleedingContent:!0,hideName:!0,hideExtendedClickableArea:!0,prefetched:!0,lazyLoad:!1,touchBehavior:"drag"})),n.createElement("div",{className:"position-relative"},n.createElement(Ae.Z,{noGutters:!0},n.createElement(ke.Z,{xs:2,className:"d-flex align-items-center justify-content-start"},n.createElement(ue.e,{actions:m(i)})),n.createElement(ke.Z,{xs:8,className:"d-flex align-items-center justify-content-center"},n.createElement(Me,{videos:a,currentVideo:i,onSelectIndex:function(e){d.current&&(o(a[e]),d.current.jumpToIndex(e))}})),n.createElement(ke.Z,{xs:2,className:"d-flex align-items-center justify-content-end"},n.createElement(Ie.L,{onClick:function(){return u((function(e){return!e}))}},n.createElement(Fe.x,{svgName:l?xe.vn.ChevronUp:xe.vn.ChevronDown}))))),n.createElement("div",null,n.createElement(de.F,{className:"d-inline-block",appLink:Qe(e.data.id)},n.createElement("h3",{className:"h4 mb-0"},t.name))),l?n.createElement("div",{className:"pt-1"},n.createElement(s.kM,{type:F.l9.Row,contents:I.z.Videos,childComponent:Be,extraChildComponentProps:{setFavourite:e.setFavourite,canFavourite:e.canFavourite,shareData:e.data},collection:a,appLink:Qe(e.data.id),touchBehavior:"drag",limitTotalItems:!0,hideName:!0,prefetched:!0})):!!t.description&&n.createElement("p",{className:"clamp-2 mb-0 mt-1"},t.description)):n.createElement(Ye,{data:e.data.object}))}function Ge(e){return n.createElement(n.Fragment,null,e.feed.map((function(t,a){var r;switch(null===(r=t.object)||void 0===r?void 0:r.typeId){case k.E.Video:case k.E.Clip:case k.E.Interactive:return n.createElement(we,{key:"".concat(t.id,":").concat(a),data:t,config:e.config,setFavourite:e.setFavourite,canFavourite:e.canFavourite,setActivityStatus:e.setActivityStatus});case k.E.Playlist:case k.E.Series:return n.createElement(Ke,{key:"".concat(t.id,":").concat(a),data:t,config:e.config,setFavourite:e.setFavourite,canFavourite:e.canFavourite,setActivityStatus:e.setActivityStatus});case k.E.Subject:default:return n.createElement(n.Fragment,{key:a})}})))}function Je(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var Xe=15,et=635;function tt(e){var t,a,r,i=e.request,o=e.reversed,l=e.scrollTo,s=n.useRef(),u=(0,v.Y)({triggerOnce:!1,rootMargin:et+"px"}),d=u.ref,m=u.inView,f=null===(t=c.a.useBasicFetch(m?i:null).data)||void 0===t?void 0:t.data,p=window.scrollY,g=(a=n.useState(et*e.limit),r=2,function(e){if(Array.isArray(e))return e}(a)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,i,o,c=[],l=!0,s=!1;try{if(i=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;l=!1}else for(;!(l=(n=i.call(a)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=a.return&&(o=a.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(a,r)||function(e,t){if(e){if("string"==typeof e)return Je(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Je(e,t):void 0}}(a,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=g[0],h=g[1];return n.useLayoutEffect((function(){var e=s.current.getBoundingClientRect();o?window.scrollTo(0,p+e.height):l&&window.requestAnimationFrame((function(){window.scrollTo(0,p+e.top-100)}))}),[l]),n.useLayoutEffect((function(){if(y){var e=s.current.getBoundingClientRect().height;if(h(e),!(y<e+Xe&&y>e-Xe||s.current.offsetTop>p)){var t=y-e;window.scrollTo(0,p-t)}}})),n.createElement("div",{ref:d},n.createElement("div",{ref:s},(null==f?void 0:f.length)?n.createElement(Ge,{feed:f,config:e.config,setFavourite:e.setFavourite,canFavourite:e.canFavourite,setActivityStatus:e.setActivityStatus}):n.createElement("div",{style:{height:y,overflow:"hidden"}},n.createElement(z,{items:e.limit}))))}var at=a(70680),nt=a(94644),rt=a(69883);function it(e){return function(e){if(Array.isArray(e))return lt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ct(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ot(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,i,o,c=[],l=!0,s=!1;try{if(i=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;l=!1}else for(;!(l=(n=i.call(a)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=a.return&&(o=a.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(e,t)||ct(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ct(e,t){if(e){if("string"==typeof e)return lt(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?lt(e,t):void 0}}function lt(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var st=i.T.encloseNamespace("studentFeed.studentFeed"),ut=function(e,t){var a=(0,at.oR)(),r=(0,rt.Z)(),i=ot(n.useState([]),2),o=i[0],l=i[1],s=ot(n.useState(!1),2),u=s[0],d=s[1];function m(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.from,i=t.to,o=t.cursor,s=t.reverse,u=function(e){var a,n;if(u=null,e.data.length){if(null===(n=null===(a=e.pagination)||void 0===a?void 0:a.cursors)||void 0===n?void 0:n.next)if(s){var r={request:m(Object.assign(Object.assign({},t),{cursor:e.pagination.cursors.next})),reversed:!0};l((function(e){return[r].concat(it(e))}))}else{var i={request:m(Object.assign(Object.assign({},t),{cursor:e.pagination.cursors.next}))};l((function(e){return[].concat(it(e),[i])}))}}else l((function(e){var t=e.findIndex((function(e){return e.request.key===f.key})),a=[].concat(it(e.slice(0,t)),it(e.slice(t+1)));return a.length||d(!0),a}))},f=te.getFeed({from:n,to:i,cursor:o,sort:s?K.DateAscending:K.DateDescending,limit:e,success:function(e){window.requestAnimationFrame((function(){u&&u(e)}))},error:function(e){return function(e,t){if(!e)return(0,nt.r)(t.status);r.error(st("error"))}(o,e)}}),v=c.a.getResponse(a.getState(),f.key);return v.data&&window.setTimeout((function(){u(v.data)}),0),f}return n.useEffect((function(){var e=null;if(isNaN(Date.parse(t))||(e=new Date(t)),e){var a={request:m({from:e,reverse:!0}),reversed:!0},n={request:m({to:e}),current:!0};l([n]),window.requestAnimationFrame((function(){l((function(e){return[a].concat(it(e))}))}))}else l([{request:m(),current:!0}])}),[]),{requests:o,isEmpty:u}};function dt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,i,o,c=[],l=!0,s=!1;try{if(i=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;l=!1}else for(;!(l=(n=i.call(a)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=a.return&&(o=a.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return mt(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?mt(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mt(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var ft=i.T.encloseNamespace("studentFeed.studentFeed"),vt=10;function pt(e){var t=e.date,a=(0,f.c)(l.LZ.StudentFeed),i=a.setFavourite,E=a.canFavourite,b=(0,m.O)(l.LZ.StudentFeed),S=ne();(0,p.M)({title:ft("pageTitle")});var N=c.a.useBasicFetch(d.N.currentUser()),w=c.a.useBasicFetch(u.L.config()),A=c.a.useBasicFetch(te.getRecentActivities()),k=ut(vt,t),D=k.requests,I=k.isEmpty,F=dt(n.useState(!1),2),C=F[0],x=F[1],O=(0,v.Y)({triggerOnce:!1,rootMargin:"300px"}),T=O.ref,j=O.inView,M=O.initialized&&!j,R=dt(n.useState(null),2),_=R[0],V=R[1];function P(){var e=D.find((function(e){return e.current}));e?V(e.request.key):window.scrollTo(0,document.body.scrollHeight)}return n.useLayoutEffect((function(){V(null)})),C?n.createElement(n.Fragment,null):I&&g.O.fromPageLoad()?(x(!0),o.Q.C$.trigger({application:h.O.DASHBOARD,action:y.e.Dashboard.HOME},{replace:!0}),n.createElement(n.Fragment,null)):n.createElement("div",{className:"px-4 container-compact"},n.createElement("div",{className:"pb-2 border-bottom mb-3",ref:T},n.createElement(Z,{currentUser:N.data,dateRange:S,scrollToCurrent:P})),n.createElement("div",{className:"d-flex justify-content-center"},n.createElement("div",{className:"floating-jump-to"},n.createElement(r.Z,{timeout:M?500:0,in:M,className:"floating-jump-to",classNames:"floating-jump-to",mountOnEnter:!0,unmountOnExit:!0},n.createElement($,{dateRange:S,floating:!0,scrollToCurrent:P})))),A.data?n.createElement(L,{recentActivities:A.data,config:w.data,setFavourite:i,canFavourite:E,setActivityStatus:b}):n.createElement("div",{className:"pb-3"},n.createElement(s.j7,{hideDescription:!0})),(!N.data||!w.data)&&n.createElement(z,{items:vt}),I&&n.createElement(se,null),null==D?void 0:D.map((function(e){return n.createElement(tt,{key:e.request.key,limit:vt,request:e.request,reversed:e.reversed,config:w.data,setFavourite:i,canFavourite:E,setActivityStatus:b,scrollTo:e.request.key===_})})))}},41063:(e,t,a)=>{a.d(t,{b:()=>o});var n=a(16714),r=a(22902),i=a(37802);function o(){var e=(0,r.T)().hasPermissions;return(0,i.r)(null).manageVideoAccess&&e(n.C.ManageVideoAccess)}},68050:(e,t,a)=>{a.d(t,{Z:()=>s});var n=a(40841),r=a.n(n),i=a(32735),o=a(46304),c=a(74512);const l=i.forwardRef((({bsPrefix:e,className:t,as:a="div",...n},i)=>{const l=(0,o.vE)(e,"row"),s=(0,o.pi)(),u=(0,o.zG)(),d=`${l}-cols`,m=[];return s.forEach((e=>{const t=n[e];let a;delete n[e],null!=t&&"object"==typeof t?({cols:a}=t):a=t;const r=e!==u?`-${e}`:"";null!=a&&m.push(`${d}${r}-${a}`)})),(0,c.jsx)(a,{ref:i,...n,className:r()(t,l,...m)})}));l.displayName="Row";const s=l},82602:(e,t,a)=>{a.d(t,{WU:()=>s});var n=["second","minute","hour","day","week","month","year"],r=["秒","分钟","小时","天","周","个月","年"],i={},o=function(e,t){i[e]=t},c=[60,60,24,7,365/7/12,12];function l(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}var s=function(e,t,a){var n=function(e,t){return(+(t?l(t):new Date)-+l(e))/1e3}(e,a&&a.relativeDate);return function(e,t){for(var a=e<0?1:0,n=e=Math.abs(e),r=0;e>=c[r]&&r<c.length;r++)e/=c[r];return(e=Math.floor(e))>(0==(r*=2)?9:1)&&(r+=1),t(e,r,n)[a].replace("%s",e.toString())}(n,function(e){return i[e]||i.en_US}(t))};o("en_US",(function(e,t){if(0===t)return["just now","right now"];var a=n[Math.floor(t/2)];return e>1&&(a+="s"),[e+" "+a+" ago","in "+e+" "+a]})),o("zh_CN",(function(e,t){if(0===t)return["刚刚","片刻后"];var a=r[~~(t/2)];return[e+" "+a+"前",e+" "+a+"后"]}))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[4632],{92869:(e,t,n)=>{n.d(t,{t:()=>i});var a=n(48088),r=n(95846),i={preventScrollTop:function(){a.Radio.channel(r.G.SHELL).trigger("prevent:scroll:top")}}},78259:(e,t,n)=>{n.d(t,{O:()=>s});var a=n(58176),r=n.n(a),i=n(39479),o={className:"info-link",defaultProtocol:"https"},s={linkifyText:function(e,t){if(e){var n=t?i.extend({},o,t):o;return r()(e,n)}}}},37395:(e,t,n)=>{n.d(t,{t:()=>u});var a=n(32735),r=n(98269),i=n(92869),o=n(49985),s=n(65858),l=n(36848),c=n(83345);function d(e,t){var n;if(!t)return null;var a=null!==(n=e.params)&&void 0!==n?n:{};return{application:e.application,action:e.action,args:e.args,params:Object.assign(Object.assign({},a),{cursor:t})}}function u(e){var t=e.appLink,n=e.cursors,u=e.className,m=e.buttonVariant,p=e.onClick;function v(e){t&&i.t.preventScrollTop(),o.k.logUserAction({page:e},{location:s.LZ.Pagination,entity:s.py.Pagination,actionType:s.Vw.Navigate}),p&&p(n[e])}return t?a.createElement(c.D.Provider,{value:"shared.pagination"},a.createElement("div",{className:u},a.createElement(l.F,{appLink:d(t,n.previous),className:"btn btn-".concat(m," me-1 ").concat(n.previous?"":"disabled"),onClick:function(){return v("previous")}},a.createElement(c.x,{phrase:"previous"})),a.createElement(l.F,{appLink:d(t,n.next),className:"btn btn-".concat(m," ").concat(n.next?"":"disabled"),onClick:function(){return v("next")}},a.createElement(c.x,{phrase:"next"})))):a.createElement(c.D.Provider,{value:"shared.pagination"},a.createElement("div",{className:u},a.createElement(r.Z,{variant:m,className:"me-1 ".concat(n.previous?"":"disabled"),onClick:function(){return v("previous")}},a.createElement(c.x,{phrase:"previous"})),a.createElement(r.Z,{variant:m,className:"btn ".concat(n.next?"":"disabled"),onClick:function(){return v("next")}},a.createElement(c.x,{phrase:"next"}))))}u.defaultProps={className:"py-2",buttonVariant:"secondary"}},4632:(e,t,n)=>{n.d(t,{BR:()=>p,E4:()=>v,NB:()=>g});var a=n(32735),r=n(81886),i=n(37395),o=n(17808),s=n(31908),l=n(50333),c=n(17585),d=n(55577),u=n(25007);function m(e,t){return s.M.isClip(e)?t?l.s:l.I:s.M.isInteractive(e)?t?c.n:c.H:t?d.o:d.m}var p=a.createContext({isSortable:!1});function v(e){var t=a.useContext(p).isSortable,n=r.Q.C$.getCurrentAppLink();return a.createElement(a.Fragment,null,a.createElement("div",{className:"position-relative ".concat(u.Z.videoList)},e.videos.map((function(n,r){var i=m(n,t),o=Number.isInteger(e.startingPositionIndex)?e.startingPositionIndex:0;return a.createElement(i,{key:"".concat(n.id,":").concat(r),video:n,yearGroups:e.yearGroups,idx:r,index:r,getVideoAppLink:e.getVideoAppLink,getSeriesAppLink:e.getSeriesAppLink,setFavourite:e.setFavourite,canFavourite:e.canFavourite,dragHandleIcon:e.dragHandleIcon,dragHandleIconSize:e.dragHandleIconSize,showSignIn:e.showSignIn,analyticsData:{pagePositionIndex:o+r},canRemovePrivateVideos:e.canRemovePrivateVideos,presentationAudiences:e.presentationAudiences,showIndexes:e.showIndexes})}))),e.cursors&&a.createElement(i.t,{appLink:n,cursors:e.cursors}))}var g=function(e){var t=e.videos.map((function(e){return e.id}));return a.createElement(o.Q,{ids:t,getDragOverlay:function(t){var n=e.videos.find((function(e){return e.id===t})),r=m(n,!0);return a.createElement("div",{className:"bg-white ".concat(u.Z.sortableVideo)},a.createElement(p.Provider,{value:{isSortable:!0}},a.createElement(r,{video:n,yearGroups:e.yearGroups,getVideoAppLink:e.getVideoAppLink,getSeriesAppLink:e.getSeriesAppLink,setFavourite:e.setFavourite,canFavourite:e.canFavourite,dragHandleIcon:e.dragHandleIcon,dragHandleIconSize:e.dragHandleIconSize,showSignIn:e.showSignIn})))},onSortEnd:e.onSortEnd,onSortStart:e.onSortStart},a.createElement(p.Provider,{value:{isSortable:!0,currentSortingIndex:e.currentSortingIndex}},a.createElement(v,Object.assign({},e))))}},9977:(e,t,n)=>{n.d(t,{O:()=>a});var a={getThumbnailColumns:function(){return{xs:12,sm:4,lg:3}},getDetailsColumns:function(){return{xs:12,sm:8,lg:9}},getSize:function(e,t){return e.sm?"sm":t||"md"},getThumbnailColSize:function(e){return e?10:12}}},50333:(e,t,n)=>{n.d(t,{I:()=>C,s:()=>A});var a=n(32735),r=n(69111),i=n(68050),o=n(65858),s=n(40955),l=n(76246),c=n(17464),d=n(1287),u=n(72188),m=n(51685),p=n(74289),v=n(94696),g=n(70872),f=n(40138),y=n(4632),b=n(9977),h=n(54610),E=n(68626),I=n(79967),S=n(49439),x=n(80143),w=n(31908),O=n(25007);function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var C=a.forwardRef((function(e,t){var n,d,C,A=(0,I.k)(),L=(d=(0,S.X)(),C=2,function(e){if(Array.isArray(e))return e}(d)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(s.push(a.value),s.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw r}}return s}}(d,C)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}(d,C)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),j=L[0],N=L[1],H=b.O.getSize(A,e.size),P="sm"===H,z=a.useContext(y.BR).isSortable,D=w.M.getParentVideo(e.video),F=(0,x.n)(null===(n=e.video.subjectPresentationAudiences)||void 0===n?void 0:n.data,e.presentationAudiences),M=z&&!A.xs&&(N||void 0===e.index||!e.showIndexes),Z=e.showIndexes&&!M&&!A.xs,T=(M||e.showIndexes)&&!A.xs,V=e.getVideoAppLink(e.video),G={analyticsData:e.analyticsData,analyticsOptions:{entity:o.py.Clip,location:o.LZ.ClipListItem}};return a.createElement("div",{ref:j},a.createElement("div",{className:"row g-0 ".concat(P?"":"py-2"),ref:t,style:e.style},a.createElement(r.Z,Object.assign({},b.O.getThumbnailColumns(),{className:"flex-column align-items-flex-start ".concat(P?"pb-2 pe-2":"mb-1 px-2")}),a.createElement(i.Z,null,a.createElement(p.r,{index:e.index,showDragHandle:M,showIndexes:Z,dragHandleIcon:e.dragHandleIcon,dragHandleIconSize:e.dragHandleIconSize,dragAttributes:e.dragAttributes,dragListeners:e.dragListeners}),a.createElement(r.Z,{xs:b.O.getThumbnailColSize(T)},a.createElement(u.u,Object.assign({},G,{video:e.video,appLink:V,audience:F,imageOptions:{size:h.h2.Medium},textPosition:E.z.Independent,type:"static",setFavourite:e.setFavourite,canFavourite:e.canFavourite,canRemovePrivateVideos:e.canRemovePrivateVideos,showSignIn:e.showSignIn,size:H}))))),a.createElement(r.Z,Object.assign({},b.O.getDetailsColumns(),{className:P?"pb-2":"px-2"}),a.createElement(f.H,Object.assign({},G,{video:e.video,appLink:V,showSignIn:e.showSignIn})),a.createElement(g.u,Object.assign({video:e.video,appLink:V,size:H,yearGroups:e.yearGroups},G)),P?a.createElement(c.c,{className:O.Z.badgeContainer},!!F&&a.createElement(s.P,{audience:F,className:"bg-white text-dark",border:"dark"}),a.createElement(l.C,{type:l.g.DurationApproximate,data:w.M.getDuration(e.video)})):a.createElement(c.c,null,a.createElement(l.C,{type:l.g.ProductionYear,data:null==D?void 0:D.productionYear}),a.createElement(l.C,{type:l.g.Captions,data:!!(null==D?void 0:D.subtitles)})),!P&&a.createElement(m.g,{video:e.video,showSignIn:e.showSignIn}),a.createElement(v.B,{video:e.video,yearGroups:e.yearGroups}))))})),A=function(e){return a.createElement(d.W,{id:e.video.id,childComponent:C,childProps:e})}},51685:(e,t,n)=>{n.d(t,{g:()=>v});var a=n(32735),r=n(78259),i=n(83345),o=n(86764),s=n(3747),l=n(26361),c=n(31908);const d={ellipsis:"UqaA_"};function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var m="shared.videoItemDescription";function p(e){var t;return e.video.description?a.createElement(a.Fragment,null,a.createElement("span",{dangerouslySetInnerHTML:{__html:r.O.linkifyText(e.video.description)}}),!!e.isExpandable&&a.createElement("span",{className:"cursor-pointer ".concat(d.ellipsis),onClick:function(){return e.setIsTruncated(!e.isTruncated)}},a.createElement(i.x,{namespace:m,phrase:e.isTruncated?"showMore":"showLess"}))):(null===(t=c.M.getCanBeConsumed(e.video))||void 0===t?void 0:t.canNavigate)?a.createElement(a.Fragment,null):a.createElement("em",null,c.M.getPrivacyReasoning(e.video,e.showSignIn))}function v(e){var t,n,r=(t=a.useState(e.truncate),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(s.push(a.value),s.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw r}}return s}}(t,n)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=r[0],c=r[1],d=(0,s.a)(o.r.XS),m=l.l.hasRestrictions(e.video);return d||m?a.createElement(a.Fragment,null):a.createElement("div",{className:"position-relative overflow-hidden ".concat(i?"clamp-2":"")},a.createElement("p",{className:"m-0"},a.createElement(p,{isTruncated:i,setIsTruncated:c,video:e.video,isExpandable:e.isExpandable,showSignIn:e.showSignIn})))}v.defaultProps={truncate:!0}},74289:(e,t,n)=>{n.d(t,{r:()=>l});var a=n(32735),r=n(69111),i=n(83914),o=n(35223);const s={dragHandleContainer:"mcAFC"};function l(e){var t,n=e.showDragHandle?Object.assign(Object.assign({},e.dragAttributes),e.dragListeners):{},o=(t="d-flex justify-content-center align-items-center",e.showDragHandle?"".concat(t," cursor-pointer ").concat(s.dragHandleContainer):t);return e.showDragHandle||e.showIndexes?a.createElement(r.Z,Object.assign({xs:2,className:o},n),!!e.showDragHandle&&a.createElement(i.x,{svgName:e.dragHandleIcon,size:e.dragHandleIconSize}),!!e.showIndexes&&a.createElement("span",{className:"fw-semibold"},e.index+1)):a.createElement(a.Fragment,null)}l.defaultProps={dragHandleIcon:o.vn.Handle,dragHandleIconSize:i.S.Small}},84678:(e,t,n)=>{n.d(t,{L:()=>i});var a=n(32735),r=n(76246);function i(e){return a.createElement(r.C,{type:r.g.Restriction,data:{restrictions:e.restrictions,yearGroups:e.yearGroups},inline:!0})}},94696:(e,t,n)=>{n.d(t,{B:()=>l});var a=n(32735),r=n(17464),i=n(84678),o=n(26361),s=n(31908);function l(e){var t=o.l.hasRestrictions(e.video),n=s.M.getCanBeConsumed(e.video).canConsume;return t&&e.yearGroups&&n?a.createElement(r.c,{className:e.className||"pt-1"},a.createElement(i.L,{restrictions:e.video._restrictions,yearGroups:e.yearGroups})):a.createElement(a.Fragment,null)}},40138:(e,t,n)=>{n.d(t,{H:()=>d});var a=n(32735),r=n(36848),i=n(83345),o="shared.signInToWatch";function s(e){return a.createElement(r.F,{appLink:e.appLink,className:e.className},a.createElement(i.x,{namespace:o,phrase:"signInToWatch"}))}var l=n(85784),c=n(31908);function d(e){var t=c.M.getCanBeConsumed(e.video).canNavigate;return e.showSignIn&&!t?a.createElement(s,{appLink:e.appLink,className:"btn btn-outline-dark float-end"}):a.createElement(l.Q,{video:e.video,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions})}},17585:(e,t,n)=>{n.d(t,{H:()=>z,n:()=>D});var a=n(32735),r=n(69111),i=n(68050),o=n(65858),s=n(40955),l=n(76246),c=n(17464),d=n(1287),u=n(72188),m=n(51685),p=n(74289),v=n(94696),g=n(70872),f=n(40138),y=n(86572),b=n(83345),h=n(86764),E=n(81514),I=n(32725);function S(e){var t,n,r=(n=(0,E.V)())===h.r.XS?3:n===h.r.SM?1:n===h.r.MD||n===h.r.LG?2:3;if(!(null===(t=e.timepoints)||void 0===t?void 0:t.length))return a.createElement(a.Fragment,null);var i=[],o=0;e.timepoints.forEach((function(t){null==t||t.interactions.forEach((function(n){if(o<r){o++;var a=n.typeId===I.Z9.Annotation&&"string"==typeof n.data?JSON.parse(n.data):n.data,s=Object.assign(Object.assign({},n),{data:Object.assign(Object.assign({},a),{appLink:e.appLink&&Object.assign(Object.assign({},e.appLink),{params:{t:Math.floor(t.visibleAt/1e3)}})})});i.push(s)}}))}));var s=e.timepoints.reduce((function(e,t){var n,a;return e+(null!==(a=null===(n=null==t?void 0:t.interactions)||void 0===n?void 0:n.length)&&void 0!==a?a:0)}),0);return i.length?a.createElement(a.Fragment,null,a.createElement("div",{className:"fw-semibold mb-1"},a.createElement(b.x,{namespace:"shared.interactiveItem",phrase:"previewQuestions",options:{questionsShown:i.length,smartCount:s}})),i.map((function(e){var t;return a.createElement("div",{key:e.id,className:"d-flex align-items-center mb-1"},a.createElement("div",{className:"clamp-1"},a.createElement(y.y,{interaction:e,appLink:null===(t=e.data)||void 0===t?void 0:t.appLink,smallIcon:!0})))}))):a.createElement(a.Fragment,null)}var x=n(4632),w=n(9977),O=n(5960),k=n(54610),C=n(68626),A=n(79967),L=n(49439),j=n(80143),N=n(31908),H=n(25007);function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var z=a.forwardRef((function(e,t){var n,d,y,b,h=(0,A.k)(),E=(y=(0,L.X)(),b=2,function(e){if(Array.isArray(e))return e}(y)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(s.push(a.value),s.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw r}}return s}}(y,b)||function(e,t){if(e){if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(e,t):void 0}}(y,b)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),I=E[0],z=E[1],D=w.O.getSize(h,e.size),F="sm"===D,M=a.useContext(x.BR).isSortable,Z=N.M.getParentVideo(e.video),T=(0,j.n)(null===(n=e.video.subjectPresentationAudiences)||void 0===n?void 0:n.data,e.presentationAudiences),V=M&&!h.xs&&(z||void 0===e.index||!e.showIndexes),G=e.showIndexes&&!V&&!h.xs,R=(V||e.showIndexes)&&!h.xs,B=e.getVideoAppLink(e.video),_={analyticsData:e.analyticsData,analyticsOptions:{entity:o.py.Interactive,location:o.LZ.InteractiveListItem}},X=N.M.getCanBeConsumed(e.video).canNavigate;return a.createElement("div",{ref:I},a.createElement("div",{className:"row g-0 py-2",ref:t,style:e.style},a.createElement(r.Z,Object.assign({},w.O.getThumbnailColumns(),{className:"flex-column align-items-flex-start ".concat(F?"pb-2 pe-2":"mb-1 px-2")}),a.createElement(i.Z,null,a.createElement(p.r,{index:e.index,showDragHandle:V,showIndexes:G,dragHandleIcon:e.dragHandleIcon,dragHandleIconSize:e.dragHandleIconSize,dragAttributes:e.dragAttributes,dragListeners:e.dragListeners}),a.createElement(r.Z,{xs:w.O.getThumbnailColSize(R)},a.createElement(u.u,Object.assign({},_,{video:e.video,appLink:B,audience:T,imageOptions:{size:k.h2.Medium},textPosition:C.z.Independent,type:"static",setFavourite:e.setFavourite,canFavourite:e.canFavourite,canRemovePrivateVideos:e.canRemovePrivateVideos,showSignIn:e.showSignIn,size:D}))))),a.createElement(r.Z,Object.assign({},w.O.getDetailsColumns(),{className:F?"pb-2":"px-2"}),a.createElement(f.H,Object.assign({},_,{video:e.video,appLink:B,showSignIn:e.showSignIn})),a.createElement(g.u,Object.assign({video:e.video,appLink:B,size:D,yearGroups:e.yearGroups},_)),F?a.createElement(c.c,{className:H.Z.badgeContainer},!!T&&a.createElement(s.P,{audience:T,className:"bg-white text-dark",border:"dark"}),a.createElement(l.C,{type:l.g.DurationApproximate,data:N.M.getDuration(e.video)}),e.video.status===O.X.Draft&&a.createElement(l.C,{type:l.g.Status,data:e.video.status})):a.createElement(c.c,null,e.video.status===O.X.Draft&&a.createElement(l.C,{type:l.g.Status,data:e.video.status}),a.createElement(l.C,{type:l.g.ProductionYear,data:null==Z?void 0:Z.productionYear})),X?a.createElement(S,{timepoints:null===(d=e.video._timepoints)||void 0===d?void 0:d.value,appLink:B}):a.createElement(m.g,{video:e.video,showSignIn:e.showSignIn}),a.createElement(v.B,{video:e.video,yearGroups:e.yearGroups}))))})),D=function(e){return a.createElement(d.W,{id:e.video.id,childComponent:z,childProps:e})}},55577:(e,t,n)=>{n.d(t,{m:()=>j,o:()=>N});var a=n(32735),r=n(69111),i=n(68050),o=n(65858),s=n(40955),l=n(76246),c=n(17464),d=n(96022),u=n(1287),m=n(83914),p=n(72188),v=n(51685),g=n(74289),f=n(94696),y=n(70872),b=n(40138),h=n(4632),E=n(9977),I=n(54610),S=n(68626),x=n(79967),w=n(49439),O=n(80143),k=n(35223),C=n(31908),A=n(25007);function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var j=a.forwardRef((function(e,t){var n,u,m,k,j,N,H,P,z=(0,x.k)(),D=(H=(0,w.X)(),P=2,function(e){if(Array.isArray(e))return e}(H)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(s.push(a.value),s.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw r}}return s}}(H,P)||function(e,t){if(e){if("string"==typeof e)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(e,t):void 0}}(H,P)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),F=D[0],M=D[1],Z=E.O.getSize(z,e.size),T="sm"===Z,V=a.useContext(h.BR).isSortable,G=null===(u=null===(n=e.video)||void 0===n?void 0:n.subjectPresentationAudiences)||void 0===u?void 0:u.data,R=(0,O.n)(G,e.presentationAudiences),B=V&&!z.xs&&(M||void 0===e.index||!e.showIndexes),_=e.showIndexes&&!B&&!z.xs,X=(B||e.showIndexes)&&!z.xs,U=e.getVideoAppLink(e.video),Y=function(){var t;return C.M.hasSeries(e.video)&&(null===(t=e.getSeriesAppLink)||void 0===t?void 0:t.call(e,e.video.series))}(),Q={analyticsData:e.analyticsData,analyticsOptions:null!==(m=e.analyticsOptions)&&void 0!==m?m:{entity:o.py.Video,location:o.LZ.VideoListItem}};return a.createElement("div",{ref:F},a.createElement("div",{className:"row g-0 ".concat(T?"":"py-2"),style:e.style,ref:t},a.createElement(r.Z,Object.assign({},E.O.getThumbnailColumns(),{className:"flex-column align-items-flex-start ".concat(T?"pb-2 pe-2":"mb-1 px-2")}),a.createElement(i.Z,null,a.createElement(g.r,{index:e.index,showDragHandle:B,showIndexes:_,dragHandleIcon:e.dragHandleIcon,dragHandleIconSize:e.dragHandleIconSize,dragAttributes:e.dragAttributes,dragListeners:e.dragListeners}),a.createElement(r.Z,{xs:E.O.getThumbnailColSize(X)},a.createElement(p.u,Object.assign({},Q,{video:e.video,appLink:U,seriesAppLink:Y,audience:R,imageOptions:{size:X?I.h2.Small:I.h2.Medium},textPosition:S.z.Independent,setFavourite:e.setFavourite,canFavourite:e.canFavourite,type:"static",canRemovePrivateVideos:e.canRemovePrivateVideos,showSignIn:e.showSignIn,hideDuration:T,size:Z,hideRating:!1}))))),a.createElement(r.Z,Object.assign({},E.O.getDetailsColumns(),{className:T?"pb-2":"px-2"}),a.createElement(b.H,Object.assign({},Q,{video:e.video,appLink:U,showSignIn:e.showSignIn})),a.createElement(d.Mr,Object.assign({},Q,{video:e.video,appLink:Y})),a.createElement(y.u,Object.assign({video:e.video,appLink:U,size:Z,yearGroups:e.yearGroups},Q)),T?a.createElement(c.c,{className:A.Z.badgeContainer},!!R&&a.createElement(s.P,{audience:R,className:"bg-white text-dark",border:"dark"}),!R&&a.createElement(l.C,{type:l.g.DurationApproximate,data:C.M.getDuration(e.video)})):a.createElement(c.c,null,a.createElement(l.C,{type:l.g.ProductionYear,data:null===(k=e.video)||void 0===k?void 0:k.productionYear}),a.createElement(l.C,{type:l.g.Captions,data:(null===(j=e.video)||void 0===j?void 0:j.hasSubtitle)||(null===(N=e.video)||void 0===N?void 0:N.subtitles)})),!T&&a.createElement(v.g,{video:e.video,showSignIn:e.showSignIn}),a.createElement(f.B,{video:e.video,yearGroups:e.yearGroups}))))}));j.defaultProps={dragHandleIcon:k.vn.Handle,dragHandleIconSize:m.S.Small,size:"md"};var N=function(e){return a.createElement(u.W,{id:e.video.id,childComponent:j,childProps:e})}},25007:(e,t,n)=>{n.d(t,{Z:()=>a});const a={sortableVideo:"xaH09",videoList:"kO5Q0",badgeContainer:"FP8l5"}}}]);
@@ -1,2 +0,0 @@
1
- /*! For license information please see 487-55f69c7d70-lite.chunk.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[487],{12058:(t,e,n)=>{n.d(e,{X:()=>o});var r=n(32735);function o(t){return r.createElement("p",{className:t.className},t.children)}},75919:(t,e,n)=>{n.d(e,{N:()=>a});var r=n(32735);const o={annotation:"LkdHB",above:"ROdbm",below:"OzyHx",left:"W9EBF",right:"zhio2",divider:"cdR_p",height:"kRhKC"};function a(t){return r.createElement("div",{className:(e="d-flex align-items-center text-center position-relative w-100 ".concat(o.height),"center"===t.contentPosition&&(e+=" px-5 justify-content-center"),"right"===t.contentPosition&&(e+=" me-n5 justify-content-end"),e)},r.createElement("div",{className:function(){var e=o.annotation;switch(t.annotationPosition){case"top-left":e+=" ".concat(o.above," ").concat(o.left);break;case"top-right":e+=" ".concat(o.above," ").concat(o.right);break;case"bottom-left":e+=" ".concat(o.below," ").concat(o.left);break;case"bottom-right":e+=" ".concat(o.below," ").concat(o.right)}return t.annotationClassName&&(e+=" ".concat(t.annotationClassName)),e}()},r.createElement("img",{className:"img-fluid",src:t.annotationUrl})),t.children,"right"===t.contentPosition&&r.createElement("div",{className:o.divider}));var e}a.defaultProps={contentPosition:"center"}},45038:(t,e,n)=>{n.d(e,{P:()=>i});var r=n(32735),o=n(57245);const a={playerContainer:"w7_Oy",fallback:"xcBuH"};function i(t){return r.createElement("div",{className:"".concat(a.playerContainer," w-100")},t.hasDataLoaded?r.createElement(o._,{config:t.config,video:t.video,currentUser:t.currentUser,shareLink:t.shareLink,viewKey:t.viewKey,onReady:t.onReady,allowPip:!1,allowCreateClip:!1}):r.createElement("div",{className:"".concat(a.fallback," w-100 h-100 bg-light rounded-3 overflow-hidden")}))}},98065:(t,e,n)=>{n.d(e,{x:()=>r});var r={getWelcomeVideo:function(t){return t?t.primaryUrl.includes("staging")?{videoId:"43000110",shareId:"GgX4xD"}:{videoId:"49331262",shareId:"0DYKrb"}:null},getAdvisorVideo:function(t){return t?t.primaryUrl.includes("staging")?{videoId:"43002959",shareId:"b98KVj"}:{videoId:"49331262",shareId:"0DYKrb"}:null}}},30544:(t,e,n)=>{n.r(e),n.d(e,{OnboardingWelcomeVideoView:()=>P});var r=n(32735),o=n(20354),a=n(30439),i=n(83914),c=n(83345),l=n(60051),u=n(39151),s=n(47812),f=n(31949),h=n(1575),d=n(79967),p=n(35223),m=n(99742),v=n(75359),y=n(12058),g=n(27583),b=n(75919),w=n(45038),E=n(73190),x=n(98065);const k={headingContainer:"hPvDP",buttonContainer:"ORgxa",icon:"BogCL",skipButton:"uaLaz",replayContainer:"d1Nj9",playerContainer:"pHDzd",infoContainer:"lmbyg"};function L(t){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},L(t)}function N(){N=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var a=e&&e.prototype instanceof y?e:y,i=Object.create(a.prototype),c=new I(r||[]);return o(i,"_invoke",{value:j(t,n,c)}),i}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",d="suspendedYield",p="executing",m="completed",v={};function y(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(T([])));x&&x!==n&&r.call(x,i)&&(w=x);var k=b.prototype=y.prototype=Object.create(w);function C(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function n(o,a,i,c){var l=f(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==L(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,i,c)}),(function(t){n("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return n("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return a=a?a.then(o,o):o()}})}function j(e,n,r){var o=h;return function(a,i){if(o===p)throw new Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:t,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=O(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?m:d,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=m,r.method="throw",r.arg=u.arg)}}}function O(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=f(o,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(L(e)+" is not iterable")}return g.prototype=b,o(k,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},C(S.prototype),u(S.prototype,c,(function(){return this})),e.AsyncIterator=S,e.async=function(t,n,r,o,a){void 0===a&&(a=Promise);var i=new S(s(t,n,r,o),a);return e.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(k),u(k,l,"Generator"),u(k,i,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),_(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:T(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function C(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return S(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var j=function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{l(r.next(t))}catch(t){a(t)}}function c(t){try{l(r.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}l((r=r.apply(t,e||[])).next())}))},O="onboarding.welcomeVideo";function P(){var t=(0,E.Q)(),e=t.completeStepAsync,n=t.onSaveError,L=o.a.useBasicFetch(u.L.config()),S=o.a.useBasicFetch(f.N.currentUser()),P=x.x.getWelcomeVideo(L.data),_=r.useRef(),I=o.a.useBasicFetch(P&&h.R.sharedVideo(P.videoId,P.shareId)),T=o.a.useBasicFetch(a.o.getShareObject(P.shareId)),V=o.a.useBasicFetch(s.k.createViewKey(P.shareId,l.f.Share)),B=C(r.useState(!1),2),R=B[0],A=B[1],F=C(r.useState(0),2),U=F[0],G=F[1],K=C(r.useState(!1),2),D=K[0],z=K[1],W=C(r.useState(!1),2),H=W[0],Y=W[1],X=(0,d.k)();function M(){return j(this,void 0,void 0,N().mark((function t(){return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e();case 3:t.next=9;break;case 5:return t.prev=5,t.t0=t.catch(0),n(),t.abrupt("return",Promise.reject());case 9:case"end":return t.stop()}}),t,null,[[0,5]])})))}function Q(t){_.current=t;var e=function(){var e=t.currentTime();e===t.duration()&&Y(!0),!t.isPaused()&&!D&&!R&&e>=t.duration()-23&&A(!0)};t.on("timeupdate",e),t.one("dispose",(function(){t.off("timeupdate",e)}))}r.useEffect((function(){if(R){G(3);var t=window.setTimeout((function(){G(2)}),1e3),e=window.setTimeout((function(){G(1)}),2e3),n=window.setTimeout((function(){G(0),z(!0)}),3e3);return function(){window.clearTimeout(t),window.clearTimeout(e),window.clearTimeout(n)}}}),[R]);var $=I.data&&S.hasCompleted&&L.hasCompleted&&T.hasCompleted&&V.hasCompleted,q=X.lg||X.xl||X.xxl;return r.createElement(g.z,{namespace:O},r.createElement(g.z.Left,{className:"bg-dark-blue d-flex justify-content-center flex-column"},q&&r.createElement(b.N,{annotationUrl:m.W.OnboardingV2.WelcomeVideo.HIT_PLAY,annotationPosition:"bottom-right",annotationClassName:"pe-5"},r.createElement(w.P,{hasDataLoaded:$,config:L.data,video:I.data,currentUser:S.data,shareLink:T.data,viewKey:V.data,onReady:Q}))),r.createElement(g.z.Right,{hasCustomButtons:!0},r.createElement(v.W,{className:k.headingContainer},r.createElement(c.x,{phrase:"heading"})),!q&&r.createElement(w.P,{hasDataLoaded:$,config:L.data,video:I.data,currentUser:S.data,shareLink:T.data,viewKey:V.data,onReady:Q}),r.createElement(y.X,{className:k.infoContainer},r.createElement(c.x,{phrase:"watchVideo"})),H&&r.createElement("div",{className:"position-absolute ".concat(k.replayContainer)},r.createElement("button",{className:"btn btn-link text-info text-decoration-none btn-lg ".concat(k.replayButton),onClick:function(){var t,e;Y(!1),null===(t=_.current)||void 0===t||t.currentTime(0),null===(e=_.current)||void 0===e||e.play()}},r.createElement(i.x,{svgName:p.vn.Retry,className:"svg-container ".concat(k.icon)}),r.createElement(c.x,{phrase:"replayVideo"}))),r.createElement("div",{className:"position-absolute ".concat(k.buttonContainer)},r.createElement("button",{className:"btn btn-link text-decoration-none btn-lg ".concat(k.skipButton),onClick:function(){M()}},r.createElement(c.x,{phrase:"skipVideo"})),0!==U||D?r.createElement("button",{className:"btn btn-dark btn-lg",disabled:!D,onClick:function(){M()}},U>0?r.createElement(c.x,{phrase:"getStartedIn",options:{time:U}}):r.createElement(c.x,{phrase:"getStarted"})):r.createElement("button",{className:"btn btn-dark btn-lg",onClick:function(){var t;null===(t=_.current)||void 0===t||t.play()}},r.createElement(i.x,{svgName:p.vn.Play,className:"svg-container ".concat(k.icon)}),r.createElement(c.x,{phrase:"playVideo"})))))}}}]);
@@ -1,2 +0,0 @@
1
- /*! For license information please see 5177-ea01e21af3-lite.chunk.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[5177],{73758:(e,t,n)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function o(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:String(t)}n.d(t,{n:()=>a});var a=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.listeners={}}var t,n;return t=e,n=[{key:"subscribe",value:function(e,t){this.registerListener(e,t)}},{key:"subscribeOnce",value:function(e,t){this.registerListener(e,t,1)}},{key:"unsubscribe",value:function(e,t){this.deregisterListener(e,t)}},{key:"trigger",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.triggerCallbacks(e,n)}},{key:"registerListener",value:function(e,t,n){var r;if("string"!=typeof e)throw new Error("Event name must be a string");if("function"!=typeof t)throw new Error("Event callback must be a function");if(n&&"number"!=typeof n)throw new Error("Execution limit must be a number or undefined");this.listeners[e]=null!==(r=this.listeners[e])&&void 0!==r?r:[],this.listeners[e].push({callback:t,executionLimit:n})}},{key:"deregisterListener",value:function(e,t){var n;if("string"!=typeof e)throw new Error("Event name must be a string");if(t&&"function"!=typeof t)throw new Error("Event callback must be a function");if(t){var r=null===(n=this.listeners[e])||void 0===n?void 0:n.findIndex((function(e){return e.callback===t}));"number"==typeof r&&-1!==r&&(this.listeners[e].splice(r,1),0===this.listeners[e].length&&delete this.listeners[e])}else this.listeners[e]=[]}},{key:"triggerCallbacks",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(this.listeners[e]){var o=[];this.listeners[e].forEach((function(e){var t,n;"number"==typeof e.executionLimit&&(e.executionCount=null!==(n=e.executionCount)&&void 0!==n?n:0,e.executionCount++,e.executionCount===e.executionLimit&&o.push(e.callback)),(t=e.callback).apply.apply(t,[null].concat(r))})),o.length&&o.forEach((function(n){return t.deregisterListener(e,n)}))}}}],n&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}())},26733:(e,t,n)=>{n.d(t,{s:()=>P,R:()=>O});var r=n(32735),i=n(39202),o=n(97395),a=n(49985),s=n(65858),c=n(36848),u=n(78276),l=n(76177),f=n(71063),h=n(54610),p=n(4594),d=n(1164),y=n(79967),v=n(67453);const b={imageStyle:"I9E5O",item:"tqUFn",background:"s1dNr",thumbnailContainer:"EDiGi",teacherPack:"_tdVE",text:"g5NWS",hoverState:"xRYhX",atomGuide:"X39wU",studentActivity:"X9pMl",additionalMaterials:"qRVUo",userUploaded:"_18JaV",imageTypeResource:"KYtZL"};var g={width:200,resizeType:h.Nq.Cover};function m(e,t){var n,r,i;if("thumbnail"in t&&(null===(n=t.thumbnail)||void 0===n?void 0:n.url))return v.j.createUrl(null===(r=t.thumbnail)||void 0===r?void 0:r.url,Object.assign({},g));var a=o._.safeUrlConcat(e,"/v1/previews");return"metadata"in t?t.metadata.type===d.L.Pdf?v.j.createResourceImage(a,t.url,g):t.metadata.type===d.L.Image?v.j.createUrl(t.url,{size:h.h2.Medium,resizeType:h.Nq.Cover}):(null===(i=t.pdf)||void 0===i?void 0:i.url)?v.j.createResourceImage(a,t.pdf.url,g):(t.metadata.type,d.L.Zip,"/images/zip-resource.png"):v.j.createResourceImage(a,t.url,Object.assign({},g))}function w(e){var t;return"metadata"in e?e.metadata.type===d.L.Pdf?h.__.Pdf:e.metadata.type===d.L.Image?h.__.Thumbnails:(null===(t=e.pdf)||void 0===t?void 0:t.url)?h.__.Pdf:(e.metadata.type,d.L.Zip,h.__.Thumbnails):h.__.Link}function P(e){var t,n,i,o,a,c,f,h=null,p=0;"metadata"in e.data&&(h=e.data.metadata,p=null!==(i=null===(n=null===(t=e.data.thumbnail)||void 0===t?void 0:t.metadata)||void 0===n?void 0:n.rotation)&&void 0!==i?i:0);var y="".concat(null!==(a=null===(o=e.theme)||void 0===o?void 0:o.containerClass)&&void 0!==a?a:""," pt-3 px-3 rounded-3 d-flex flex-column align-items-center")+" justify-content-end ".concat(function(e){switch(e){case"atom-guide":return b.atomGuide;case"student-activity":return b.studentActivity;case"teacher-pack":return b.teacherPack;case"additional-materials":return b.additionalMaterials;default:return b.userUploaded}}(null==h?void 0:h.resourceType)," ").concat(b.background," ").concat(e.applyHoverState?b.hoverState:""," ");return r.createElement("div",{className:y},!e.hideHeading&&r.createElement(l.u,{title:e.data.name},r.createElement("h3",{className:"text-center text-break h5 mb-3 ".concat(b.text)},r.createElement("span",{className:"clamp-1"},e.data.name))),r.createElement("div",{className:"".concat(null!==(f=null===(c=e.theme)||void 0===c?void 0:c.thumbnailContainerClass)&&void 0!==f?f:""," w-75 overflow-hidden ").concat(b.thumbnailContainer," ").concat(b.imageStyle)},r.createElement(u.Z,{data:m(e.imageCdnUrl,e.data),imageType:w(e.data),imageStyle:{transform:"rotate(".concat(p,"deg)")},alt:e.data.name,analyticsOptions:{location:s.LZ.SlidingListItem},errorFallbackImageSrc:e.imageErrorFallbackUrl,imageClassName:(null==h?void 0:h.type)===d.L.Image?"".concat(b.imageTypeResource," ").concat(b.imageStyle):"",preload:e.preloadImage,preventLoad:!e.preloadImage})))}P.defaultProps={preloadImage:!0,actionBehaviour:"normal"};var O=r.memo((function(e){var t,n,o,u,l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,[]),h=(t=e.data,n=e.actionBehaviour,u=(0,y.k)(),"public"===n||!u.xs&&!u.sm&&"resource"===t.type&&"metadata"in t&&(t.metadata.type===d.L.Image||(t.metadata.type===d.L.Pdf?!!t.url:!!(null===(o=t.pdf)||void 0===o?void 0:o.url)))),v=Object.assign(Object.assign({},e.analyticsData),e.data),g=Object.assign(Object.assign({},e.analyticsOptions),{actionType:s.Vw.Click,entity:e.data.typeId===p.E.Resource?s.py.Resource:s.py.Link});function m(){a.k.logUserAction(v,g)}var w,O=!!e.data.url;return l.applyHoverState=h||O,r.createElement("div",{className:"pt-1 px-1 flex-shrink-0 ".concat(b.item," ").concat(f.M.RESOURCE_ITEM_SELECTOR)},(w="d-block no-decoration","link"===e.data.type?r.createElement("a",{href:e.data.url,target:"_blank",className:w,onClick:m},r.createElement(P,Object.assign({},l))):h?"public"===e.actionBehaviour?r.createElement("div",{className:"".concat(w," cursor-pointer d-inline"),onClick:function(){m(),i.C$.trigger(e.getAppLink(e.data))}},r.createElement(P,Object.assign({},l))):r.createElement(c.F,{appLink:e.getAppLink(e.data),className:w,analyticsData:v,analyticsOptions:g},r.createElement(P,Object.assign({},l))):O?r.createElement("a",{href:e.data.url,className:w,onClick:m},r.createElement(P,Object.assign({},l))):r.createElement("div",{className:w},r.createElement(P,Object.assign({},l)))))}))},65100:(e,t,n)=>{n.r(t),n.d(t,{ClickViewPlayer:()=>zn});var r=n(32735),i=n(51482),o=(n(16852),n(93861));function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function c(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:String(t)}function u(){return u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},u.apply(this,arguments)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(c,e);var t,n,r,i,o=(r=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(r);if(i){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(e=o.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=c,(n=[{key:"buildCSSClass",value:function(){return"cv-create-clip-button"}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){u(f(c.prototype),"handleClick",this).call(this,null)}}])&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.Z.getComponent("Button"));function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,y(r.key),r)}}function y(e){var t=function(e,t){if("object"!=p(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:String(t)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}h.prototype.controlText_="Create Clip",o.Z.registerComponent("CreateClipButton",h);var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=b(r);if(i){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=a,(n=[{key:"onReady",value:function(){var e,t=this.player.getChild("collapserator"),n=null===(e=null==t?void 0:t.children())||void 0===e?void 0:e.findIndex((function(e){return"CustomControlSpacer"===e.name()}));n&&-1!==n&&t.addChild("CreateClipButton",{clickHandler:this.options.onClick},n+1)}}])&&d(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,P(r.key),r)}}function P(e){var t=function(e,t){if("object"!=m(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==m(t)?t:String(t)}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}o.Z.registerPlugin("createClipButtonPlugin",g);var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=S(r);if(i){var n=S(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"handlePictureInPictureEnabledChange",value:function(){this.enable()}}])&&w(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getComponent("PictureInPictureToggle"));function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,E(r.key),r)}}function E(e){var t=function(e,t){if("object"!=j(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=j(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==j(t)?t:String(t)}function T(){return T="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=I(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},T.apply(this,arguments)}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}o.Z.registerComponent("PictureInPictureToggle",k);var _=o.Z.getComponent("PlayToggle"),R=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&x(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=I(r);if(i){var n=I(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===j(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).pictureInPictureEnabled=!1,n.options=t,n.bindFunctions(),n}return t=a,(n=[{key:"bindFunctions",value:function(){this.requestPictureInPicture=this.requestPictureInPicture.bind(this),this.exitPictureInPicture=this.exitPictureInPicture.bind(this),this.onPlayerResize=this.onPlayerResize.bind(this),this.playerRequestPictureInPictureFn=this.player.requestPictureInPicture,this.playerExitPictureInPictureFn=this.player.exitPictureInPicture,this.player.requestPictureInPicture=this.requestPictureInPicture,this.player.exitPictureInPicture=this.exitPictureInPicture}},{key:"enablePictureInPicture",value:function(){var e=this;if(this.player.options_.fluid&&!this.pictureInPictureEnabled){var t=this.getToggleParentComponent();if(t){this.pictureInPictureEnabled=!0;var n=t.children().findIndex((function(e){var t;return"fullscreentoggle"===(null===(t=e.name())||void 0===t?void 0:t.toLowerCase())}));-1===n&&(n=t.children().length-1),t.addChild("pictureInPictureToggle",{},n);var r=t.getChild("pictureInPictureToggle");null==r||r.enable(),this.player.on("playerresize",this.onPlayerResize),this.player.on("dispose",(function(){var t;null===(t=e.player)||void 0===t||t.off("playerresize",e.onPlayerResize)}))}}}},{key:"disablePictureInPicture",value:function(){if(this.pictureInPictureEnabled){this.pictureInPictureEnabled=!1;var e=this.getToggleParentComponent(),t=null==e?void 0:e.getChild("pictureInPictureToggle");t&&e.removeChild(t),this.player.off("playerresize",this.onPlayerResize)}}},{key:"togglePictureInPicture",value:function(e){if(e!==this.player.isInPictureInPicture()){var t=e?"enterpictureinpicture":"leavepictureinpicture";this.player.isInPictureInPicture(e),this.player.trigger(t),e?this.addPipStyles():this.removePipStyles()}}},{key:"onPlayerResize",value:function(){if(!this.player.isInPictureInPicture()){var e=this.player.el().getBoundingClientRect();0!==e.width&&(e.width<800?this.disablePictureInPicture():this.enablePictureInPicture())}}},{key:"addPipStyles",value:function(){this.player.addClass("cv-picture-in-picture"),this.playToggle=new _(this.player),this.playToggle.addClass("cv-pip-play-toggle"),this.player.addChild(this.playToggle),this.player.paused()?this.playToggle.handlePause():this.playToggle.handlePlay()}},{key:"removePipStyles",value:function(){this.player.removeClass("cv-picture-in-picture"),this.player.removeChild(this.playToggle),delete this.playToggle}},{key:"requestPictureInPicture",value:function(){var e;this.pictureInPictureEnabled&&(this.togglePictureInPicture(!0),"function"==typeof(null===(e=this.options)||void 0===e?void 0:e.onRequestPictureInPicture)&&this.options.onRequestPictureInPicture(!0))}},{key:"exitPictureInPicture",value:function(){this.togglePictureInPicture(!1),this.options.onRequestPictureInPicture(!1),this.removePipStyles()}},{key:"getToggleParentComponent",value:function(){return this.player.getChild("collapserator")}},{key:"dispose",value:function(){this.player.requestPictureInPicture=this.playerRequestPictureInPictureFn,this.player.exitPictureInPicture=this.playerExitPictureInPictureFn,T(I(a.prototype),"dispose",this).call(this)}}])&&C(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("pictureInPicture",R);var M=n(23035),L=n(42892),D=n(73758);function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,V(r.key),r)}}function V(e){var t=function(e,t){if("object"!=N(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=N(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==N(t)?t:String(t)}function B(){return B="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Z(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},B.apply(this,arguments)}function F(e,t){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},F(e,t)}function U(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Z(e){return Z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Z(e)}var z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&F(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Z(r);if(i){var n=Z(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===N(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return U(e)}(this,e)});function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=a.call(this,e,t)).hasBuffered=!1,n.hasPlayed=!1,n.eventsService=D.n,n.pointOfInterest=t.pointOfInterest,n.onMouseOver=n.onMouseOver.bind(U(n)),n.onMouseLeave=n.onMouseLeave.bind(U(n)),n.onGlancePointOfInterestMouseEnter=n.onGlancePointOfInterestMouseEnter.bind(U(n)),n.onGlancePointOfInterestMouseLeave=n.onGlancePointOfInterestMouseLeave.bind(U(n)),n.initialize(),n}return t=s,(n=[{key:"initialize",value:function(){this.setPosition(),this.bindListeners()}},{key:"buildCSSClass",value:function(){return"cv-point-of-interest-indicator ".concat(B(Z(s.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return B(Z(s.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"bindListeners",value:function(){this.on("mouseover",this.onMouseOver),this.on("mouseleave",this.onMouseLeave),this.eventsService.subscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.subscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"dispose",value:function(){this.eventsService.unsubscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.unsubscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"getPointOfInterestTime",value:function(){return this.pointOfInterest.startTime}},{key:"setPosition",value:function(){var e=this.player().duration();this.el_.style.left=this.getPointOfInterestTime()/e*100+"%"}},{key:"updateBuffered",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasBuffered){this.hasBuffered=t;var n="cv-point-of-interest-indicator-buffered";this.hasBuffered?this.addClass(n):this.removeClass(n)}}},{key:"updatePlaybackProgress",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasPlayed){this.hasPlayed=t;var n="cv-point-of-interest-indicator-played";t?this.addClass(n):this.removeClass(n)}}},{key:"toggleVisibility",value:function(e){var t="cv-point-of-interest-indicator-hidden";e?this.removeClass(t):this.addClass(t)}},{key:"onMouseOver",value:function(){this.setTimeTooltipText(),this.eventsService.trigger("player:poi:mouseover",this.pointOfInterest)}},{key:"onMouseLeave",value:function(){this.clearTimeTooltipText(),this.eventsService.trigger("player:poi:mouseleave")}},{key:"onGlancePointOfInterestMouseEnter",value:function(e){e.id===this.pointOfInterest.id&&(this.addClass("cv-point-of-interest-indicator-highlight"),this.setTimeTooltipTime(),this.setTimeTooltipText(),this.positionMouseTimeDisplay(),this.showMouseTimeDisplay())}},{key:"onGlancePointOfInterestMouseLeave",value:function(){this.removeClass("cv-point-of-interest-indicator-highlight"),this.hideMouseTimeDisplay()}},{key:"setTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText(this.pointOfInterest.description)}},{key:"clearTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText()}},{key:"setTimeTooltipTime",value:function(){var e=this.getTimeTooltip();null==e||e.updateTime(this.getPointOfInterestTime())}},{key:"positionMouseTimeDisplay",value:function(){var e,t,n=null===(e=this.getSeekBar())||void 0===e?void 0:e.el();if(n){var r=o.Z.dom.findPosition(n),i=this.getPointOfInterestTime()/this.player().duration();null===(t=this.getMouseTimeDisplay())||void 0===t||t.update(r,i)}}},{key:"showMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.forceShow()}},{key:"hideMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.removeForceShow()}},{key:"getSeekBar",value:function(){var e;return null===(e=this.player().controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar")}},{key:"getMouseTimeDisplay",value:function(){var e;return null===(e=this.getSeekBar())||void 0===e?void 0:e.getChild("MouseTimeDisplay")}},{key:"getTimeTooltip",value:function(){var e;return null===(e=this.getMouseTimeDisplay())||void 0===e?void 0:e.getChild("TimeTooltip")}}])&&A(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("Component"));function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,H(r.key),r)}}function H(e){var t=function(e,t){if("object"!=G(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=G(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==G(t)?t:String(t)}function Y(){return Y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=$(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Y.apply(this,arguments)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W(e,t)}function $(e){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$(e)}var Q=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=$(r);if(i){var n=$(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===G(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=a.call(this,e,t)).pointsOfInterestVisible=t.pointsOfInterestVisible,n.toggle(n.pointsOfInterestVisible),n}return t=s,(n=[{key:"handleToggle",value:function(){this.toggle(!this.pointsOfInterestVisible)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){o.Z.dom.addClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!0,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"toggleOff",value:function(){o.Z.dom.removeClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!1,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,t,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=o.Z.dom.createEl("div",{className:"custom-toggle toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=Y($(s.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Points of Interest</span>\n <span class="cv-toggle-container"></span>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&q(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("MenuItem"));function X(e){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(e)}function J(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,K(r.key),r)}}function K(e){var t=function(e,t){if("object"!=X(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=X(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==X(t)?t:String(t)}function ee(e,t){return ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ee(e,t)}function te(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ne(e){return ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ne(e)}o.Z.registerComponent("PointsOfInterestMenuItem",Q);var re=o.Z.getPlugin("plugin"),ie="cvplayer-points-of-interest",oe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ee(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ne(r);if(i){var n=ne(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===X(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return te(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e)).pointOfInterestIndicators=[],n.enabled=!0,n.pointsOfInterest=null==t?void 0:t.pointsOfInterest,n.initialize=n.initialize.bind(te(n)),n.updateBuffered=n.updateBuffered.bind(te(n)),n.updatePlaybackProgress=n.updatePlaybackProgress.bind(te(n)),n.player.one("loadedmetadata",(function(){return n.player.ready(n.initialize)})),n}return t=a,(n=[{key:"initialize",value:function(){this.pointsOfInterest&&(L.S.hasLocalStorage()&&"false"===L.S.get(ie)&&(this.enabled=!1),this.setupTrack(),this.createPointOfInterestIndicators(),this.addMenuItem(),this.bindListeners())}},{key:"bindListeners",value:function(){var e=this;this.player.on("progress",this.updateBuffered),this.player.on("timeupdate",this.updatePlaybackProgress),this.player.on("dispose",(function(){var t,n;null===(t=e.player)||void 0===t||t.off("progress",e.updateBuffered),null===(n=e.player)||void 0===n||n.off("timeupdate",e.updatePlaybackProgress)}))}},{key:"togglePointsOfInterest",value:function(e){L.S.set(ie,e.toString()),this.pointOfInterestIndicators.forEach((function(t){return t.toggleVisibility(e)}))}},{key:"setupTrack",value:function(){var e=this.player.addTextTrack("metadata","pointsofinterest");this.pointsOfInterest.forEach((function(t){e.addCue({startTime:t.startTime,endTime:t.endTime,text:t.description})})),e.trigger({type:"loadeddata",target:e})}},{key:"createPointOfInterestIndicators",value:function(){var e,t=this,n=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");this.pointsOfInterest.forEach((function(e){var r=new z(t.player,{pointOfInterest:e});t.pointOfInterestIndicators.push(r),n.addChild(r)}))}},{key:"addMenuItem",value:function(){var e;(null===(e=this.player.getChild("collapserator"))||void 0===e?void 0:e.getChild("cogButton")).addItem({index:0,ctor:Q,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updateBuffered((0,M.b)(e.player))}))}},{key:"updatePlaybackProgress",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updatePlaybackProgress(e.player.currentTime())}))}}])&&J(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(re);o.Z.registerPlugin("pointsOfInterestPlugin",oe),n(93262);var ae=n(65858),se=n(86086),ce=n(12399),ue=n(6156);function le(e){return le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},le(e)}function fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,he(r.key),r)}}function he(e){var t=function(e,t){if("object"!=le(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=le(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==le(t)?t:String(t)}var pe=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bindFunctions()}var t,n;return t=e,(n=[{key:"bindFunctions",value:function(){this.schedule=this.schedule.bind(this),this.every=this.every.bind(this),this.trigger=this.trigger.bind(this),this.start=this.start.bind(this),this.stop=this.stop.bind(this)}},{key:"schedule",value:function(e){return this.task=e,this}},{key:"every",value:function(e){return this.intervalInMilliseconds=e,this}},{key:"trigger",value:function(){var e;return null===(e=this.task)||void 0===e||e.call(this,this),this}},{key:"start",value:function(){var e=this;return this.intervalId||(this.intervalId=setInterval((function(){return e.trigger()}),this.intervalInMilliseconds)),this}},{key:"stop",value:function(){return this.intervalId&&(clearInterval(this.intervalId),this.intervalId=void 0),this}}])&&fe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function de(e){return de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},de(e)}function ye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ve(r.key),r)}}function ve(e){var t=function(e,t){if("object"!=de(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=de(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==de(t)?t:String(t)}var be={reconnectIntervalInMilliseconds:3e3,heartbeatEnabled:!1,heartbeatIntervalInMillseconds:1e4,heartbeatMessage:""},ge=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:be;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bindFunctions(),this.url=t,this.options=Object.assign(Object.assign({},be),r),this.webSocket=this.connect(),this.heartbeat=(new pe).schedule((function(){return n.send(n.options.heartbeatMessage)})).every(this.options.heartbeatIntervalInMillseconds)}var t,n;return t=e,(n=[{key:"bindFunctions",value:function(){this.cleanup=this.cleanup.bind(this),this.handleOpen=this.handleOpen.bind(this),this.handleMessage=this.handleMessage.bind(this),this.handleClose=this.handleClose.bind(this),this.handleError=this.handleError.bind(this),this.connect=this.connect.bind(this),this.send=this.send.bind(this),this.dipose=this.dipose.bind(this)}},{key:"cleanup",value:function(){this.heartbeat.stop(),this.webSocket.removeEventListener("error",this.handleError),this.webSocket.removeEventListener("message",this.handleMessage),this.webSocket.removeEventListener("open",this.handleOpen),this.webSocket.removeEventListener("close",this.handleClose)}},{key:"handleOpen",value:function(e){var t;null===(t=this.onOpen)||void 0===t||t.call(this,e),this.options.heartbeatEnabled&&this.heartbeat.start()}},{key:"handleMessage",value:function(e){var t;null===(t=this.onMessage)||void 0===t||t.call(this,e)}},{key:"handleClose",value:function(e){var t,n=this;null===(t=this.onClose)||void 0===t||t.call(this,e),this.cleanup(),setTimeout((function(){n.webSocket=n.connect()}),this.options.reconnectIntervalInMilliseconds)}},{key:"handleError",value:function(e){var t;null===(t=this.onError)||void 0===t||t.call(this,e),this.handleClose()}},{key:"connect",value:function(){var e=new WebSocket(this.url);return e.addEventListener("open",this.handleOpen),e.addEventListener("message",this.handleMessage),e.addEventListener("close",this.handleClose),e.addEventListener("error",this.handleError),e}},{key:"send",value:function(e){this.webSocket.send(e)}},{key:"dipose",value:function(){this.cleanup(),this.webSocket.close()}}])&&ye(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),me=n(95569),we=function(){var e,t;return null!==(t=null===(e=window.crypto)||void 0===e?void 0:e.randomUUID())&&void 0!==t?t:Math.random().toString()},Pe=n(35884);function Oe(e){return Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Oe(e)}function Se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ke(r.key),r)}}function ke(e){var t=function(e,t){if("object"!=Oe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Oe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Oe(t)?t:String(t)}var je,Ce=function(){function e(t,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._timerStartedAt=0,this.position=0,this.duration=void 0,this.playing=!1,this.mute=!1,this.videoSource="",this.subtitleSource="",this.subtitles=!1,this.volume=0,this.title=t,this.device=n,this.ready=!1,this.playbackFinished=!1,this.debounced=Pe.l.withDebouncedSetters(this,2e3),Pe.l.withTimestampedSetters(this)}var t,n;return t=e,(n=[{key:"position",get:function(){return this._position+this.getTimerDurationInSeconds()},set:function(e){this._position=e,this.restartTimer()}},{key:"playing",get:function(){return this._playing},set:function(e){this._playing=e,e?this.restartTimer():(this._position+=this.getTimerDurationInSeconds(),this.stopTimer())}},{key:"restartTimer",value:function(){this._timerStartedAt=Date.now()}},{key:"stopTimer",value:function(){this._timerStartedAt=0}},{key:"getTimerDurationInSeconds",value:function(){return this._timerStartedAt?(Date.now()-this._timerStartedAt)/1e3:0}}])&&Se(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ee(e){return Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ee(e)}function Te(){Te=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new I(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function b(){}function g(){}function m(){}var w={};u(w,a,(function(){return this}));var P=Object.getPrototypeOf,O=P&&P(P(_([])));O&&O!==n&&r.call(O,a)&&(w=O);var S=m.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var c=f(e[i],e,o);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==Ee(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=h;return function(o,a){if(i===d)throw new Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var u=f(t,n,r);if("normal"===u.type){if(i=r.done?y:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function _(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Ee(t)+" is not iterable")}return g.prototype=m,i(S,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:g,configurable:!0}),g.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,u(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},k(j.prototype),u(j.prototype,s,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(S),u(S,c,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=_,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:_(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ie(r.key),r)}}function Ie(e){var t=function(e,t){if("object"!=Ee(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Ee(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ee(t)?t:String(t)}function _e(){return _e="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Me(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},_e.apply(this,arguments)}function Re(e,t){return Re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Re(e,t)}function Me(e){return Me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Me(e)}!function(e){e.Update="update",e.Volume="volume",e.Playing="playing",e.Paused="paused",e.NewChapter="new_chapter",e.Stopped="stopped",e.Ready="ready",e.Mute="mute",e.Finished="finished"}(je||(je={}));var Le=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},De=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Re(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Me(r);if(i){var n=Me(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this)).client=e,n.localState=new Ce(t.title,t.device),n.bindFunctions(),n.initialize(),n}return t=a,(n=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.dispose=this.dispose.bind(this),this.handleClientConnected=this.handleClientConnected.bind(this),this.handleDisconnectMessage=this.handleDisconnectMessage.bind(this),this.handleAllVideoMessages=this.handleAllVideoMessages.bind(this),this.handleUpdateMessage=this.handleUpdateMessage.bind(this),this.handleVolumeMessage=this.handleVolumeMessage.bind(this),this.handlePlayingMessage=this.handlePlayingMessage.bind(this),this.handlePausedMessage=this.handlePausedMessage.bind(this),this.handleFinishedMessage=this.handleFinishedMessage.bind(this),this.handleNewChapterMessage=this.handleNewChapterMessage.bind(this),this.handleStoppedMessage=this.handleStoppedMessage.bind(this),this.loadSource=this.loadSource.bind(this),this.play=this.play.bind(this),this.pause=this.pause.bind(this),this.seek=this.seek.bind(this),this.setVolume=this.setVolume.bind(this),this.isPlaying=this.isPlaying.bind(this),this.getPosition=this.getPosition.bind(this),this.getDuration=this.getDuration.bind(this),this.getVolume=this.getVolume.bind(this)}},{key:"initialize",value:function(){var e=this;this.client.on("dispose",this.dispose),this.client.on("connected",this.handleClientConnected),this.client.on("message",this.handleDisconnectMessage).filter((function(t){return t.source===e.getDevice().id&&"disconnect"===t.message.type})),this.client.on("message",this.handleAllVideoMessages).filter((function(t){return t.source===e.getDevice().id&&"video_event"===t.message.type}))}},{key:"dispose",value:function(){this.client.off("dispose",this.dispose),this.client.off("connected",this.handleClientConnected),this.client.off("message",this.handleDisconnectMessage),this.client.off("message",this.handleAllVideoMessages),this.client.stop(this.getDevice().id).catch((function(e){return console.error(e)})),_e(Me(a.prototype),"dispose",this).call(this)}},{key:"handleClientConnected",value:function(){return Le(this,void 0,void 0,Te().mark((function e(){return Te().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.client.joinRoom(this.getDevice().id);case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),this.trigger("error",e.t0);case 8:case"end":return e.stop()}}),e,this,[[0,5]])})))}},{key:"handleDisconnectMessage",value:function(){this.dispose()}},{key:"handleAllVideoMessages",value:function(e){var t=this.localState.debounced,n=e.message.payload.params||{};switch(e.message.payload.event){case je.Update:this.handleUpdateMessage(t,n);break;case je.NewChapter:this.handleNewChapterMessage(t,n);break;case je.Volume:this.handleVolumeMessage(t,n);break;case je.Playing:this.handlePlayingMessage(t);break;case je.Paused:this.handlePausedMessage(t);break;case je.Finished:this.handleFinishedMessage(t);break;case je.Stopped:this.handleStoppedMessage()}}},{key:"handleUpdateMessage",value:function(e,t){e.duration!==t.duration&&(e.duration=t.duration,this.trigger("durationchange",ue.j.void)),e.position!==t.position&&(e.position=t.position,this.trigger("positionchange",ue.j.void)),e.subtitles!==t.subtitles&&(e.subtitles=t.subtitles,this.trigger("subtitleschange",ue.j.void))}},{key:"handleVolumeMessage",value:function(e,t){e.volume!==t.level&&(e.volume=t.level,e.mute=0===t.level,this.trigger("volumechange",ue.j.void))}},{key:"handlePlayingMessage",value:function(e){!0!==e.playing&&(e.playing=!0,e.playbackFinished=!1,this.trigger("playingchange",ue.j.void))}},{key:"handlePausedMessage",value:function(e){!1!==e.playing&&(e.playing=!1,this.trigger("playingchange",ue.j.void))}},{key:"handleFinishedMessage",value:function(e){!0!==e.playbackFinished&&(e.playing=!1,e.playbackFinished=!0,this.trigger("playingchange",ue.j.void))}},{key:"handleNewChapterMessage",value:function(e,t){var n,r=(null!==(n=t.queue)&&void 0!==n?n:[]).find((function(t){return t.url===e.videoSource}));if(!r)return console.info("The device is no longer playing the source we loaded - disposing the session"),void this.dispose();e.subtitleSource!==r.suburl&&(e.subtitleSource=r.suburl,this.trigger("subtitleschange",ue.j.void))}},{key:"handleStoppedMessage",value:function(){this.dispose()}},{key:"loadSource",value:function(e,t){return Le(this,void 0,void 0,Te().mark((function n(){var r,i;return Te().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.localState.videoSource!==e||this.localState.subtitleSource!==t){n.next=2;break}return n.abrupt("return");case 2:return n.prev=2,r=this.getDevice().id,i=this.getPosition(),this.localState.videoSource=e,this.localState.subtitleSource=t,this.localState.ready=!1,n.next=10,this.client.joinRoom(r);case 10:return n.next=12,this.client.loadQueue({title:this.getTitle(),roomId:r,videoSource:e,subtitleSource:t});case 12:this.localState.ready=!0,this.trigger("sourceloaded",ue.j.void),i>0&&this.client.seek(r,i),n.next=21;break;case 17:n.prev=17,n.t0=n.catch(2),console.error(n.t0),this.trigger("error",new Error("Could not load video on Vivi device"));case 21:case"end":return n.stop()}}),n,this,[[2,17]])})))}},{key:"play",value:function(){this.localState.ready&&!0!==this.localState.playing&&(this.localState.playing=!0,this.client.play(this.getDevice().id),this.trigger("playingchange",ue.j.void))}},{key:"pause",value:function(){this.localState.ready&&!1!==this.localState.playing&&(this.localState.playing=!1,this.client.pause(this.getDevice().id),this.trigger("playingchange",ue.j.void))}},{key:"seek",value:function(e){this.localState.ready&&this.localState.position!==e&&(this.localState.position=e,this.client.seek(this.getDevice().id,e),this.trigger("positionchange",ue.j.void))}},{key:"setVolume",value:function(e){this.localState.ready&&this.localState.volume!==e&&(this.localState.volume=e,this.client.setVolume(this.getDevice().id,e),this.trigger("volumechange",ue.j.void))}},{key:"setMuted",value:function(e){this.localState.ready&&this.localState.mute!==e&&(this.localState.mute=e,this.client.setMuted(this.getDevice().id,e),this.trigger("volumechange",ue.j.void))}},{key:"setSubtitles",value:function(e){return Le(this,void 0,void 0,Te().mark((function t(){var n;return Te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.localState.ready){t.next=2;break}return t.abrupt("return");case 2:if(!e){t.next=5;break}return t.next=5,this.loadSource(this.localState.videoSource,e);case 5:n=!!e,this.localState.subtitles!==n&&(this.localState.subtitles=n,this.client.setSubtitles(this.getDevice().id,n),this.trigger("subtitleschange",ue.j.void));case 7:case"end":return t.stop()}}),t,this)})))}},{key:"isPlaying",value:function(){return this.localState.playing}},{key:"isPlaybackFinished",value:function(){return this.localState.playbackFinished}},{key:"getPosition",value:function(){return this.localState.position}},{key:"getDuration",value:function(){return this.localState.duration}},{key:"getVolume",value:function(){return this.localState.volume}},{key:"getMuted",value:function(){return this.localState.mute}},{key:"getSubtitles",value:function(){if(this.localState.subtitles)return this.localState.subtitleSource}},{key:"getDevice",value:function(){return this.localState.device}},{key:"getTitle",value:function(){return this.localState.title}}])&&xe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(ue.N);function Ne(e){return Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ne(e)}function Ae(){Ae=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new I(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function b(){}function g(){}function m(){}var w={};u(w,a,(function(){return this}));var P=Object.getPrototypeOf,O=P&&P(P(_([])));O&&O!==n&&r.call(O,a)&&(w=O);var S=m.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var c=f(e[i],e,o);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==Ne(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=h;return function(o,a){if(i===d)throw new Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var u=f(t,n,r);if("normal"===u.type){if(i=r.done?y:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function _(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Ne(t)+" is not iterable")}return g.prototype=m,i(S,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:g,configurable:!0}),g.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,u(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},k(j.prototype),u(j.prototype,s,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(S),u(S,c,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=_,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:_(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Ve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Be(r.key),r)}}function Be(e){var t=function(e,t){if("object"!=Ne(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Ne(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ne(t)?t:String(t)}function Fe(){return Fe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ze(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Fe.apply(this,arguments)}function Ue(e,t){return Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ue(e,t)}function Ze(e){return Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ze(e)}var ze=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Ge=1e4,qe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ue(e,t)}(s,e);var t,n,r,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ze(i);if(o){var n=Ze(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this)).options=e,t.accessToken="",t.devices=[],t.devicesFingerprint="",t.deviceDiscovery=new pe,t.bindFunctions(),t.initialize(),t}return t=s,r=[{key:"createAckId",value:function(){return we()}},{key:"calculateFingerprint",value:function(e){return e.map((function(e){return e.id})).sort().join(",")}}],(n=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.sendMessage=this.sendMessage.bind(this),this.sendMessageDebounced=(0,me.Ds)(this.sendMessage,500,!0),this.beginDeviceDiscovery=this.beginDeviceDiscovery.bind(this),this.dispose=this.dispose.bind(this),this.canCastToDevice=this.canCastToDevice.bind(this),this.getDevices=this.getDevices.bind(this),this.startCastSession=this.startCastSession.bind(this),this.authenticateWithVivi=this.authenticateWithVivi.bind(this),this.getRoomList=this.getRoomList.bind(this),this.joinRoom=this.joinRoom.bind(this),this.query=this.query.bind(this),this.loadQueue=this.loadQueue.bind(this),this.play=this.play.bind(this),this.pause=this.pause.bind(this),this.stop=this.stop.bind(this),this.seek=this.seek.bind(this),this.setVolume=this.setVolume.bind(this),this.setMuted=this.setMuted.bind(this),this.setSubtitles=this.setSubtitles.bind(this)}},{key:"initialize",value:function(){var e=this;this.webSocket=new ge(this.options.url.toString()),this.webSocket.onMessage=function(t){return e.trigger("message",JSON.parse(t.data))},this.webSocket.onOpen=function(){return ze(e,void 0,void 0,Ae().mark((function e(){return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.options.fetchAccessToken();case 3:return this.accessToken=e.sent,e.next=6,this.authenticateWithVivi();case 6:this.beginDeviceDiscovery(),this.trigger("connected",ue.j.void),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(0),console.error(e.t0),this.trigger("error",new Error("Could not connect to Vivi"));case 14:case"end":return e.stop()}}),e,this,[[0,10]])})))}}},{key:"sendMessage",value:function(e){var t;null===(t=this.webSocket)||void 0===t||t.send(JSON.stringify(e))}},{key:"beginDeviceDiscovery",value:function(){var e=this;this.deviceDiscovery.every(1e4).schedule((function(){return ze(e,void 0,void 0,Ae().mark((function e(){var t,n;return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.getRoomList();case 3:if(t=e.sent,(n=s.calculateFingerprint(t))!==this.devicesFingerprint){e.next=7;break}return e.abrupt("return");case 7:this.devices=t.map((function(e){return{id:e.id,name:e.name,type:ce.Y.Vivi,status:ce.L.Available}})),this.devicesFingerprint=n,this.trigger("deviceschange",ue.j.void),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),console.warn(e.t0);case 15:case"end":return e.stop()}}),e,this,[[0,12]])})))})).trigger().start()}},{key:"dispose",value:function(){var e;this.deviceDiscovery.stop(),null===(e=this.webSocket)||void 0===e||e.dipose(),Fe(Ze(s.prototype),"dispose",this).call(this)}},{key:"canCastToDevice",value:function(e){return e===ce.Y.Vivi}},{key:"getDevices",value:function(){return this.devices}},{key:"startCastSession",value:function(e){return new De(this,e)}},{key:"authenticateWithVivi",value:function(){return ze(this,void 0,void 0,Ae().mark((function e(){return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:"relay",message:{token:this.accessToken,type:"identify_video_api"}}),e.next=3,this.one("message",(function(e){return"video_api_identified"===e.message.type})).timeout(Ge).catch((function(){throw new Error("Failed to authenticate with Vivi")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getRoomList",value:function(){return ze(this,void 0,void 0,Ae().mark((function e(){var t;return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:"relay",message:{type:"video_api_rooms"}}),e.next=3,this.one("message",(function(e){return"video_api_rooms"===e.message.type})).timeout(Ge).catch((function(){throw new Error("Failed to fetch rooms")}));case 3:return t=e.sent,e.abrupt("return",t.message.rooms||[]);case 5:case"end":return e.stop()}}),e,this)})))}},{key:"joinRoom",value:function(e){return ze(this,void 0,void 0,Ae().mark((function t(){return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:"relay",message:{destination_type:"box",new_destination:e,token:this.accessToken,type:"connect"}}),t.next=3,this.one("message",(function(t){return t.source===e&&"connect"===t.message.type||"error"===t.message.type&&"already_connected"===t.message.error_type||void 0})).timeout(Ge).catch((function(){throw new Error("Failed to join room")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"query",value:function(e){return ze(this,void 0,void 0,Ae().mark((function t(){var n;return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=s.createAckId(),this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:n,name:"query"}}),t.next=4,this.one("message",(function(e){return e.message.ack_id===n})).timeout(Ge).catch((function(){throw new Error("Failed to fetch query")}));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"loadQueue",value:function(e){var t=e.roomId,n=e.title,r=e.videoSource,i=e.subtitleSource;return ze(this,void 0,void 0,Ae().mark((function e(){return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:t,message:{type:"message_with_ack",ack_id:s.createAckId(),name:"queue_load",payload:{urls:[{title:n,url:r,suburl:i}]}}}),e.next=3,this.one("message",(function(e){var n;return e.source===t&&"ready"===(null===(n=e.message.payload)||void 0===n?void 0:n.event)})).timeout(Ge).catch((function(){throw new Error("Failed to load media")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"play",value:function(e){return ze(this,void 0,void 0,Ae().mark((function t(){return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_play",payload:{}}}),t.next=3,this.one("message",(function(t){var n;return t.source===e&&"playing"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(Ge).catch((function(){throw new Error("Failed to play video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"pause",value:function(e){return ze(this,void 0,void 0,Ae().mark((function t(){return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_pause"}}),t.next=3,this.one("message",(function(t){var n;return t.source===e&&"paused"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(Ge).catch((function(){throw new Error("Failed to pause video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"stop",value:function(e){return ze(this,void 0,void 0,Ae().mark((function t(){return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_stop"}}),t.next=3,this.one("message",(function(t){var n;return t.source===e&&"stopped"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(Ge).catch((function(){throw new Error("Failed to stop video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"seek",value:function(e,t){return ze(this,void 0,void 0,Ae().mark((function n(){return Ae().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.sendMessageDebounced({destination:e,message:{type:"message",name:"video_seek",payload:{position:t}}})){n.next=4;break}return n.next=4,this.one("message",(function(t){var n;return t.source===e&&"playing"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(Ge).catch((function(){throw new Error("Failed to seek video")}));case 4:case"end":return n.stop()}}),n,this)})))}},{key:"setVolume",value:function(e,t){return ze(this,void 0,void 0,Ae().mark((function n(){return Ae().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.sendMessageDebounced({destination:e,message:{type:"message",name:"set_volume",payload:{volume:t}}})){n.next=4;break}return n.next=4,this.one("message",(function(t){var n;return t.source===e&&"volume"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(Ge).catch((function(){throw new Error("Failed to set volume")}));case 4:case"end":return n.stop()}}),n,this)})))}},{key:"setMuted",value:function(e,t){return ze(this,void 0,void 0,Ae().mark((function n(){return Ae().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"set_mute",payload:{mute:t}}}),n.next=3,this.one("message",(function(t){var n;return t.source===e&&"mute"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(Ge).catch((function(){throw new Error("Failed to set mute")}));case 3:case"end":return n.stop()}}),n,this)})))}},{key:"setSubtitles",value:function(e,t){return ze(this,void 0,void 0,Ae().mark((function n(){var r;return Ae().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=s.createAckId(),this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:r,name:"set_subtitles",payload:{subtitles:t}}}),n.next=4,this.one("message",(function(t){return t.source===e&&t.message.ack_id===r})).timeout(Ge).catch((function(){throw new Error("Failed to set subtitles")}));case 4:case"end":return n.stop()}}),n,this)})))}}])&&Ve(t.prototype,n),r&&Ve(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(ue.N);function He(e){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},He(e)}function Ye(e){return function(e){if(Array.isArray(e))return We(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return We(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?We(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function We(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Qe(r.key),r)}}function Qe(e){var t=function(e,t){if("object"!=He(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=He(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==He(t)?t:String(t)}function Xe(){return Xe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ke(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Xe.apply(this,arguments)}function Je(e,t){return Je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Je(e,t)}function Ke(e){return Ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ke(e)}var et=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Je(e,t)}(s,e);var t,n,r,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ke(i);if(o){var n=Ke(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===He(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this)).instanceId=e,t.clients=[],t.bindFunctions(),t}return t=s,r=[{key:"getOrCreateInstance",value:function(e){if(!e)throw new Error("instanceId is required");return this.instances[e]||(this.instances[e]=new s(e)),this.instances[e]}},{key:"disposeAndRemoveInstance",value:function(e){e.dispose(),delete this.instances[e.instanceId]}},{key:"isActive",value:function(){return Object.keys(this.instances).length>0}}],(n=[{key:"bindFunctions",value:function(){this.addClient=this.addClient.bind(this),this.hasInstanceOfClient=this.hasInstanceOfClient.bind(this),this.startCastSession=this.startCastSession.bind(this),this.gatherAndPublishDevices=this.gatherAndPublishDevices.bind(this),this.dispose=this.dispose.bind(this)}},{key:"addClient",value:function(e){var t=this;e.on("deviceschange",this.gatherAndPublishDevices),e.on("error",(function(e){return t.trigger("error",e)})),this.clients.push(e)}},{key:"hasInstanceOfClient",value:function(e){return this.clients.some((function(t){return t instanceof e}))}},{key:"startCastSession",value:function(e){var t=this;if(this.castSession){if(this.castSession.getDevice().id===e.device.id)return void console.info("A session with device ".concat(e.device.id," already exists - this is a no-op"));this.castSession.dispose()}var n=this.clients.find((function(t){return t.canCastToDevice(e.device.type)}));n&&(this.castSession=n.startCastSession(e),this.castSession.on("error",(function(e){t.castSession.dispose(),t.trigger("error",e)})),this.castSession.on("dispose",(function(){t.castSession=void 0,t.trigger("castsessionchange",void 0)})),this.trigger("castsessionchange",this.castSession))}},{key:"getCastSession",value:function(){return this.castSession}},{key:"gatherAndPublishDevices",value:function(){var e=this.clients.map((function(e){return e.getDevices()})).reduce((function(e,t){return[].concat(Ye(e),Ye(t))}),[]);this.trigger("deviceschange",e)}},{key:"dispose",value:function(){var e;null===(e=this.castSession)||void 0===e||e.dispose(),this.clients.forEach((function(e){return e.dispose()})),this.castSession=void 0,this.clients=[],Xe(Ke(s.prototype),"dispose",this).call(this)}}])&&$e(t.prototype,n),r&&$e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(ue.N);et.instances={};var tt=n(30050),nt=n(98115);function rt(e){return rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rt(e)}function it(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ot(r.key),r)}}function ot(e){var t=function(e,t){if("object"!=rt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=rt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rt(t)?t:String(t)}function at(){return at="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ut(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},at.apply(this,arguments)}function st(e,t){return st=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},st(e,t)}function ct(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ut(e){return ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ut(e)}var lt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&st(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ut(r);if(i){var n=ut(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===rt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ct(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).isVisible=n.isVisible.bind(ct(n)),n}return t=a,(n=[{key:"createEl",value:function(){return at(ut(a.prototype),"createEl",this).call(this,"li",{className:"vjs-menu-item cv-device-menu-item",innerHTML:'\n <span class="cv-device-icon '.concat({vivi:"cv-vivi-icon","apple-tv":"cv-apple-icon"}[this.options_.type],'"></span>\n <span class="vjs-menu-item-text">').concat(this.options_.label,"</span>\n ")})}},{key:"handleClick",value:function(){this.options_.onClick()}},{key:"show",value:function(){at(ut(a.prototype),"show",this).call(this)}},{key:"hide",value:function(){at(ut(a.prototype),"hide",this).call(this)}},{key:"isVisible",value:function(){return!at(ut(a.prototype),"hasClass",this).call(this,"vjs-hidden")}}])&&it(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getComponent("MenuItem"));function ft(e){return ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ft(e)}function ht(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pt(r.key),r)}}function pt(e){var t=function(e,t){if("object"!=ft(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=ft(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ft(t)?t:String(t)}function dt(){return dt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=vt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},dt.apply(this,arguments)}function yt(e,t){return yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yt(e,t)}function vt(e){return vt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vt(e)}var bt=o.Z.getComponent("MenuButton"),gt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=vt(r);if(i){var n=vt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===ft(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).alwaysCollapsed=!1,n.isCollapsed=!1,n.isCollabsible=!0,n.className="cv-devices-menu-button",n.searchText="",n.devices=[],n.castSession=void 0,n.bindFunctions(),n.bindEventListeners(),n}return t=a,n=[{key:"bindFunctions",value:function(){this.bindEventListeners=this.bindEventListeners.bind(this),this.setDevices=this.setDevices.bind(this),this.setCastSession=this.setCastSession.bind(this),this.setSearchText=this.setSearchText.bind(this),this.getDeviceMenuItems=this.getDeviceMenuItems.bind(this),this.render=this.render.bind(this),this.removeMenuItems=this.removeMenuItems.bind(this),this.addMenuItemsForDevices=this.addMenuItemsForDevices.bind(this),this.shouldShowSearchInput=this.shouldShowSearchInput.bind(this),this.toggleSearchInput=this.toggleSearchInput.bind(this),this.toggleDeviceMenuItems=this.toggleDeviceMenuItems.bind(this),this.toggleEmptyStatePlaceholder=this.toggleEmptyStatePlaceholder.bind(this)}},{key:"bindEventListeners",value:function(){var e=this,t=this.$("button"),n=function(t){e.menu.handleBlur(t)};t.addEventListener("blur",n),this.one("dispose",(function(){t.removeEventListener("blur",n)}))}},{key:"createEl",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=bt.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-devices-button ".concat(dt(vt(a.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=this,t=[];return this.headingItem=new tt.Z(this.player_,{label:this.localize("Select a device"),selectable:!1}),this.searchInputItem=new nt.Z(this.player_,{menuButton:this,search:function(t){return e.setSearchText(t)},className:"cv-devices-search-input"}),this.emptyPlaceholder=new nt.C(this.player_,{label:"No devices found",selected:!1,selectable:!1,multiSelectable:!1}),this.headingItem.show(),this.searchInputItem.hide(),this.emptyPlaceholder.show(),t.push(this.headingItem,this.searchInputItem,this.emptyPlaceholder),t}},{key:"pressButton",value:function(){var e;dt(vt(a.prototype),"pressButton",this).call(this),this.shouldShowSearchInput()&&(null===(e=this.searchInputItem)||void 0===e||e.focus())}},{key:"setDevices",value:function(e){this.devices=e,this.render()}},{key:"setCastSession",value:function(e){this.castSession=e,this.render()}},{key:"setSearchText",value:function(e){this.searchText=e,this.render()}},{key:"getDeviceMenuItems",value:function(){return this.menu.children_.filter((function(e){return e instanceof lt}))}},{key:"render",value:function(){this.removeMenuItems(this.getDeviceMenuItems()),this.addMenuItemsForDevices(this.devices),this.toggleSearchInput(),this.toggleDeviceMenuItems(),this.toggleEmptyStatePlaceholder()}},{key:"removeMenuItems",value:function(e){var t=this;e.forEach((function(e){t.menu.removeChild(e),e.dispose()}))}},{key:"addMenuItemsForDevices",value:function(e){var t=this;e.sort((function(e,t){return"".concat(e.type,"-").concat(e.name).localeCompare("".concat(t.type,"-").concat(t.name))})).forEach((function(e){var n=new lt(t.player(),{id:e.id,label:e.name,selected:!1,multiSelectable:!1,selectable:!0,available:e.status===ce.L.Available,type:e.type,onClick:function(){t.options_.onDeviceMenuItemClick(n,e)}});t.menu.addItem(n)}))}},{key:"shouldShowSearchInput",value:function(){return this.getDeviceMenuItems().length>=20}},{key:"toggleSearchInput",value:function(){this.shouldShowSearchInput()?(this.headingItem.hide(),this.searchInputItem.show(),this.menu.addClass("vertical-fill")):(this.headingItem.show(),this.searchInputItem.hide(),this.menu.removeClass("vertical-fill"))}},{key:"toggleDeviceMenuItems",value:function(){var e=this,t=this.getDeviceMenuItems(),n=this.shouldShowSearchInput(),r=this.searchText.toLowerCase();t.forEach((function(t){var i,o=e.devices.find((function(e){return e.id===t.options_.id}));if(o){var a=o.status===ce.L.Available,s=!n||-1!==o.name.toLowerCase().indexOf(r),c=o.id===(null===(i=e.castSession)||void 0===i?void 0:i.getDevice().id);a?t.enable():t.disable(),s?t.show():t.hide(),c?t.selected(!0):t.selected(!1)}}))}},{key:"toggleEmptyStatePlaceholder",value:function(){var e=this.getDeviceMenuItems();e.filter((function(e){return e.isVisible()})).length?this.emptyPlaceholder.hide():this.emptyPlaceholder.show(),e.length?this.emptyPlaceholder.setLabel(this.localize("No matching results")):this.emptyPlaceholder.setLabel(this.localize("No devices found"))}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){var e,t;return null!==(t=null===(e=this.castSession)||void 0===e?void 0:e.getDevice().name)&&void 0!==t?t:" "}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){this.handleClick()}},{key:"handleClick",value:function(){dt(vt(a.prototype),"handleClick",this).call(this,null),this.options_.onClick()}}],n&&ht(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(bt);gt.prototype.controlText_="Devices",o.Z.registerComponent("DevicesButton",gt);var mt=n(10463);function wt(e){return wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wt(e)}function Pt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ot(r.key),r)}}function Ot(e){var t=function(e,t){if("object"!=wt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=wt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wt(t)?t:String(t)}function St(){return St="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=jt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},St.apply(this,arguments)}function kt(e,t){return kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kt(e,t)}function jt(e){return jt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jt(e)}var Ct=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=jt(r);if(i){var n=jt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===wt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,null,e)}return t=a,(n=[{key:"createEl",value:function(){return St(jt(a.prototype),"createEl",this).call(this,"div",{className:"cv-devices-tech"})}},{key:"setPoster",value:function(e){this.poster=e,this.update()}},{key:"setDevice",value:function(e){this.device=e,this.update()}},{key:"update",value:function(){var e,t,n,r,i=this;this.el_.innerHTML='\n <div class="cv-devices-content">\n <p>'.concat(this.localize("Currently playing on"),'</p>\n <h2><span class="cv-device-icon ').concat({vivi:"cv-vivi-icon","apple-tv":"cv-apple-icon"}[null!==(t=null===(e=this.device)||void 0===e?void 0:e.type)&&void 0!==t?t:ce.Y.Vivi],'"></span>').concat(null!==(r=null===(n=this.device)||void 0===n?void 0:n.name)&&void 0!==r?r:"",'</h2>\n </div>\n <div class="cv-devices-background" style="background-image: url(').concat(this.poster,')"></div>\n ');var o=document.createElement("button"),a=function(e){e.stopPropagation(),i.options_.onStopCasting()};o.onclick=a,o.ontouchstart=a,o.className="stop-casting-button",o.innerHTML=this.localize("Stop casting"),this.el_.querySelector(".cv-devices-content").appendChild(o)}},{key:"play",value:function(){}}])&&Pt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getComponent("Component"));function Et(e){return Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Et(e)}function Tt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xt(r.key),r)}}function xt(e){var t=function(e,t){if("object"!=Et(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Et(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Et(t)?t:String(t)}function It(){return It="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Rt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},It.apply(this,arguments)}function _t(e,t){return _t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_t(e,t)}function Rt(e){return Rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rt(e)}var Mt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_t(e,t)}(c,e);var t,n,r,i,a,s=(i=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Rt(i);if(a){var n=Rt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Et(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(n=s.call(this,e,t)).featuresVolumeControl=!0,n.featuresPlaybackRate=!1,n.movingMediaElementInDOM=!1,n.featuresFullscreenResize=!0,n.featuresTimeupdateEvents=!0,n.featuresProgressEvents=!1,n.featuresNativeTextTracks=!1,n.featuresNativeAudioTracks=!1,n.featuresNativeVideoTracks=!1,n.featuresMuteControl=!0,n.featuresSourceset=!1,n.videojsPlayer=(0,o.Z)(n.options_.playerId),n.bindFunctions(),n.bindEventListeners(),n.ready((function(){n.setSource(n.options_.source)})),n.triggerReady(),n}return t=c,r=[{key:"canPlayType",value:function(){return""}},{key:"canPlaySource",value:function(e,t){var n;return!!et.getOrCreateInstance(null!==(n=null==t?void 0:t.instanceId)&&void 0!==n?n:"").getCastSession()}},{key:"isSupported",value:function(){return et.isActive()}}],(n=[{key:"bindFunctions",value:function(){this.bindEventListeners=this.bindEventListeners.bind(this),this.onTextTrackChanged=this.onTextTrackChanged.bind(this),this.getSelectedTextTrack=this.getSelectedTextTrack.bind(this),this.setSelectedTextTrack=this.setSelectedTextTrack.bind(this),this.showUI=this.showUI.bind(this),this.hideUI=this.hideUI.bind(this),this.dispose=this.dispose.bind(this),this.setSource=this.setSource.bind(this),this.getCastSession=this.getCastSession.bind(this)}},{key:"bindEventListeners",value:function(){var e=this,t=this.getCastSession();t&&(this.textTracks().on("change",this.onTextTrackChanged),this.videojsPlayer.one("ended",(function(){t.dispose()})),t.on("durationchange",(function(){e.trigger("durationchange")})),t.on("dispose",(function(){e.trigger("ended"),e.hideUI()})),t.on("playingchange",(function(){t.isPlaying()?(e.trigger("play"),e.trigger("playing")):e.trigger("pause")})),t.on("volumechange",(function(){e.trigger("volumechange")})),t.on("sourceloaded",(function(){e.trigger("loadeddata")})),t.on("subtitleschange",(function(){e.setSelectedTextTrack(t.getSubtitles())})))}},{key:"onTextTrackChanged",value:function(){var e,t=this.getSelectedTextTrack();null===(e=this.getCastSession())||void 0===e||e.setSubtitles(null==t?void 0:t.src)}},{key:"getSelectedTextTrack",value:function(){return mt.O.findTrackByPredicate(this.videojsPlayer.player_,(function(e){return"showing"===e.mode&&!!e.src}))}},{key:"setSelectedTextTrack",value:function(e){mt.O.forEachTrack(this.videojsPlayer.player_,(function(t){t.src===e?t.mode="showing":t.mode="hidden"}))}},{key:"showUI",value:function(e){this.ui&&(this.ui.setPoster(this.options_.poster),this.ui.setDevice(e),this.ui.show())}},{key:"hideUI",value:function(){var e;null===(e=this.ui)||void 0===e||e.hide()}},{key:"dispose",value:function(){this.textTracks().off("change",this.onTextTrackChanged);var e=this.getCastSession();e&&e.dispose(),It(Rt(c.prototype),"cleanupAutoTextTracks",this).call(this),It(Rt(c.prototype),"dispose",this).call(this)}},{key:"createEl",value:function(){var e=this;return this.ui=this.ui||new Ct({onStopCasting:function(){var t;null===(t=e.getCastSession())||void 0===t||t.dispose()}}),this.ui.el()}},{key:"setSource",value:function(e){var t=this.getCastSession();if(t){this.showUI(t.getDevice()),this.trigger("loadstart");var n=this.getSelectedTextTrack();t.loadSource(e.src,null==n?void 0:n.src)}}},{key:"addRemoteTextTrack",value:function(e){return It(Rt(c.prototype),"addRemoteTextTrack",this).call(this,e,!0)}},{key:"getCastSession",value:function(){var e;return et.getOrCreateInstance(null!==(e=this.options_.instanceId)&&void 0!==e?e:"").getCastSession()}},{key:"play",value:function(){var e;null===(e=this.getCastSession())||void 0===e||e.play()}},{key:"pause",value:function(){var e;null===(e=this.getCastSession())||void 0===e||e.pause()}},{key:"paused",value:function(){var e;return!1===(null===(e=this.getCastSession())||void 0===e?void 0:e.isPlaying())}},{key:"ended",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.isPlaybackFinished())&&void 0!==t&&t}},{key:"setCurrentTime",value:function(e){var t;null===(t=this.getCastSession())||void 0===t||t.seek(null!=e?e:0)}},{key:"currentTime",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getPosition())&&void 0!==t?t:0}},{key:"duration",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getDuration())&&void 0!==t?t:this.videojsPlayer.duration()}},{key:"volume",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getVolume())&&void 0!==t?t:1}},{key:"setVolume",value:function(e){var t;null===(t=this.getCastSession())||void 0===t||t.setVolume(e)}},{key:"muted",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getMuted())&&void 0!==t&&t}},{key:"setMuted",value:function(e){var t;null===(t=this.getCastSession())||void 0===t||t.setMuted(e)}},{key:"buffered",value:function(){}},{key:"seekable",value:function(){return o.Z.createTimeRanges(0,this.duration())}},{key:"playbackRate",value:function(){return 1}},{key:"readyState",value:function(){return 4}},{key:"controls",value:function(){return!1}},{key:"playsinline",value:function(){return!0}},{key:"supportsFullScreen",value:function(){return!0}},{key:"setAutoplay",value:function(){}},{key:"preload",value:function(){}},{key:"load",value:function(){}},{key:"setPlaybackRate",value:function(){}}])&&Tt(t.prototype,n),r&&Tt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.Z.getComponent("Tech"));function Lt(e){return Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lt(e)}function Dt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Nt(r.key),r)}}function Nt(e){var t=function(e,t){if("object"!=Lt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Lt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Lt(t)?t:String(t)}function At(){return At="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Bt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},At.apply(this,arguments)}function Vt(e,t){return Vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vt(e,t)}function Bt(e){return Bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bt(e)}o.Z.registerTech("devices",Mt);var Ft=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Bt(r);if(i){var n=Bt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Lt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n,r,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).options=t,n.instanceId=null!==(i=null===(r=n.player.options_.devices)||void 0===r?void 0:r.instanceId)&&void 0!==i?i:"",n.bindFunctions(),n.initialize(),n}return t=a,(n=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.onReady=this.onReady.bind(this),this.onDevicesChanged=this.onDevicesChanged.bind(this),this.onCastSessionChanged=this.onCastSessionChanged.bind(this),this.onDevicesError=this.onDevicesError.bind(this),this.addViviClient=this.addViviClient.bind(this),this.addAppleTvClient=this.addAppleTvClient.bind(this),this.reloadTech=this.reloadTech.bind(this),this.getSessionManager=this.getSessionManager.bind(this),this.dispose=this.dispose.bind(this)}},{key:"initialize",value:function(){this.player.ready(this.onReady)}},{key:"onReady",value:function(){var e=this,t=this.player.getChild("collapserator"),n=null==t?void 0:t.children().findIndex((function(e){return"CustomControlSpacer"===e.name()})),r=this.getSessionManager();if(t&&n&&-1!==n&&r){r.on("deviceschange",this.onDevicesChanged),r.on("castsessionchange",this.onCastSessionChanged),r.on("error",this.onDevicesError);var i={onClick:function(){e.addViviClient(r),e.addAppleTvClient(r)},onDeviceMenuItemClick:function(t,n){var i;r.startCastSession({device:n,title:e.options.title}),null===(i=e.options.analyticsService)||void 0===i||i.logUserAction({device:n},{actionType:ae.Vw.Play,workflowPhase:ae.eu.Complete,descriptor:ae.UX.CastToDevice})}};this.devicesButton=t.addChild("DevicesButton",i,n+1)}}},{key:"onDevicesChanged",value:function(e){var t;null===(t=this.devicesButton)||void 0===t||t.setDevices(e)}},{key:"onCastSessionChanged",value:function(e){var t;null===(t=this.devicesButton)||void 0===t||t.setCastSession(e),this.reloadTech(),e?(this.player.addClass("cv-device-casting"),this.player.addClass("cv-device-".concat(e.getDevice().type)),this.player.isFullscreen()&&this.player.exitFullscreen()):(this.player.removeClass("cv-device-casting"),this.player.removeClass("cv-device-".concat(ce.Y.AppleTv)),this.player.removeClass("cv-device-".concat(ce.Y.Vivi)))}},{key:"onDevicesError",value:function(e){this.player.error(e.message),this.player.pause()}},{key:"addViviClient",value:function(e){if(this.options.viviEnabled&&this.options.viviApi&&this.options.fetchViviAccessToken&&!e.hasInstanceOfClient(qe)){var t=new qe({url:this.options.viviApi,fetchAccessToken:this.options.fetchViviAccessToken});e.addClient(t)}}},{key:"addAppleTvClient",value:function(e){if(this.options.appleTvEnabled&&this.options.fetchOnlineApiAccessToken&&this.options.trackingCode&&this.options.userId&&!e.hasInstanceOfClient(se.w)){var t=new se.w({fetchAccessToken:this.options.fetchOnlineApiAccessToken,trackingCode:this.options.trackingCode,userId:this.options.userId});e.addClient(t)}}},{key:"reloadTech",value:function(){var e=this.player,t=e.currentSources(),n=e.volume(),r=e.muted(),i=e.currentTime(),o=e.paused();e.src(t),e.one("playing",(function(){e.volume(n),e.muted(r),e.currentTime(i),o?e.pause():e.play()}))}},{key:"getSessionManager",value:function(){if(this.instanceId)return et.getOrCreateInstance(this.instanceId)}},{key:"dispose",value:function(){var e=this.getSessionManager();e&&(e.off("deviceschange",this.onDevicesChanged),e.off("castsessionchange",this.onCastSessionChanged),e.off("error",this.onDevicesError),et.disposeAndRemoveInstance(e),At(Bt(a.prototype),"dispose",this).call(this))}}])&&Dt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));function Ut(e){return Ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ut(e)}function Zt(){Zt=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new I(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function b(){}function g(){}function m(){}var w={};u(w,a,(function(){return this}));var P=Object.getPrototypeOf,O=P&&P(P(_([])));O&&O!==n&&r.call(O,a)&&(w=O);var S=m.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var c=f(e[i],e,o);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==Ut(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=h;return function(o,a){if(i===d)throw new Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var u=f(t,n,r);if("normal"===u.type){if(i=r.done?y:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function _(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Ut(t)+" is not iterable")}return g.prototype=m,i(S,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:g,configurable:!0}),g.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,u(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},k(j.prototype),u(j.prototype,s,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(S),u(S,c,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=_,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:_(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qt(r.key),r)}}function qt(e){var t=function(e,t){if("object"!=Ut(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Ut(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ut(t)?t:String(t)}function Ht(){return Ht="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Wt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Ht.apply(this,arguments)}function Yt(e,t){return Yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yt(e,t)}function Wt(e){return Wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wt(e)}o.Z.registerPlugin("devicesPlugin",Ft);var $t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Wt(r);if(i){var n=Wt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ut(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,e,t)}return t=a,(n=[{key:"getPlayerOptions",value:function(){var e,t=Ht(Wt(a.prototype),"getPlayerOptions",this).call(this);return this.areDevicesEnabled()?Object.assign(Object.assign({},t),{techOrder:["devices"].concat((e=t.techOrder,function(e){if(Array.isArray(e))return zt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return zt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zt(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),devices:{instanceId:we()}}):t}},{key:"configurePlugins",value:function(){var e;try{this.options.onClickCreateClip&&this.player.createClipButtonPlugin({onClick:this.options.onClickCreateClip}),this.options.onRequestPictureInPicture&&this.player.pictureInPicture({onRequestPictureInPicture:this.options.onRequestPictureInPicture}),(null===(e=this.options.pointsOfInterest)||void 0===e?void 0:e.length)&&this.player.pointsOfInterestPlugin({pointsOfInterest:this.options.pointsOfInterest})}catch(e){console.log("failed to register plugins",e)}}},{key:"setNextVideo",value:function(e,t,n){this.player.nextVideoPlugin&&this.player.nextVideoPlugin().setNextVideo(e,t,n)}},{key:"enablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.enablePictureInPicture()}},{key:"disablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.disablePictureInPicture()}},{key:"togglePictureInPicture",value:function(e){var t=this.player.pictureInPicture();t&&t.togglePictureInPicture(e)}},{key:"additionalSetup",value:function(e){var t,n,r,i,o,s,c,u,l,f,h=this,p=Object.create(null,{additionalSetup:{get:function(){return Ht(Wt(a.prototype),"additionalSetup",h)}}});return c=this,u=void 0,l=void 0,f=Zt().mark((function a(){var c;return Zt().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(p.additionalSetup.call(this,e),this.options.showResources&&e.resources&&this.player.resourcesPlugin&&this.player.resourcesPlugin({resources:e.resources.list,imageCdnUrl:this.options.imageCdnUrl}),"MasterClip"!==e.mediaType){a.next=7;break}if(null!==(c=e.additionalData)){a.next=6;break}throw Error("Invalid clip data");case 6:this.player.clipPlugin({startTime:c.startTime,endTime:c.endTime});case 7:this.areDevicesEnabled()&&this.player.devicesPlugin({viviEnabled:null===(t=this.options.devicesConfig)||void 0===t?void 0:t.viviEnabled,viviApi:null===(n=this.options.devicesConfig)||void 0===n?void 0:n.viviApi,fetchViviAccessToken:null===(r=this.options.devicesConfig)||void 0===r?void 0:r.fetchViviAccessToken,appleTvEnabled:null===(i=this.options.devicesConfig)||void 0===i?void 0:i.appleTvEnabled,fetchOnlineApiAccessToken:null===(o=this.options.devicesConfig)||void 0===o?void 0:o.fetchOnlineApiAccessToken,trackingCode:null===(s=this.options.devicesConfig)||void 0===s?void 0:s.trackingCode,userId:parseInt(e.viewerId),title:e.title,analyticsService:this.analyticsService});case 8:case"end":return a.stop()}}),a,this)})),new(l||(l=Promise))((function(e,t){function n(e){try{i(f.next(e))}catch(e){t(e)}}function r(e){try{i(f.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):(i=t.value,i instanceof l?i:new l((function(e){e(i)}))).then(n,r)}i((f=f.apply(c,u||[])).next())}))}},{key:"setActivityStatus",value:function(e,t){this.player.activityStatusPlugin().setActivityStatus(e,t)}}])&&Gt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(i.r),Qt=n(63816),Xt=n(14735);function Jt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Kt(e){var t,n,i,o=r.useRef(e.player.duration()-e.player.currentTime()),a=(n=r.useState(o.current),i=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(n,i)||function(e,t){if(e){if("string"==typeof e)return Jt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jt(e,t):void 0}}(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=a[0],c=a[1];function u(){var t=e.player.duration()-e.player.currentTime();c(t),t>o.current&&(o.current=t)}if(r.useEffect((function(){return e.player.on("timeupdate",u),function(){e.player.off("timeupdate",u)}}),[]),!e.nextVideo||!e.onPlayNext)return r.createElement(r.Fragment,null);var l=Math.ceil(s),f=1===l?"second":"seconds";return r.createElement(r.Fragment,null,r.createElement("div",{className:"cv-up-next-container"},r.createElement("div",{className:"cv-cancel-up-next cursor-pointer",role:"button",onClick:e.onCancel},"×"),r.createElement("div",{className:"cv-up-next-heading"},"Up next in ",l," ",f,":"),r.createElement("div",{className:"cv-up-next-image cursor-pointer",onClick:e.onPlayNext,style:{backgroundImage:"url(".concat(null===(t=e.nextVideo)||void 0===t?void 0:t.thumbnailUrl,")")}}),r.createElement("div",{className:"cv-up-next-title"},e.nextVideo.name)))}function en(e){return en="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},en(e)}function tn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nn(r.key),r)}}function nn(e){var t=function(e,t){if("object"!=en(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=en(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==en(t)?t:String(t)}function rn(){return rn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=an(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},rn.apply(this,arguments)}function on(e,t){return on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},on(e,t)}function an(e){return an=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},an(e)}o.Z.registerComponent("UpNext",(0,Xt.Z)((function(e,t){return r.createElement(Kt,Object.assign({player:e},t))})));var sn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&on(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=an(r);if(i){var n=an(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===en(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=a.call(this,e,t)).playNext=e.nextVideoPlugin().getShouldPlayNext(),n.toggle(n.playNext),n}return t=s,(n=[{key:"handleToggle",value:function(){this.toggle(!this.playNext)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){this.playNext=!0,o.Z.dom.addClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{key:"toggleOff",value:function(){this.playNext=!1,o.Z.dom.removeClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,t,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=o.Z.dom.createEl("div",{className:"custom-toggle toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=rn(an(s.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Play next video</span>\n <span class="cv-toggle-container"></span>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&tn(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("MenuItem"));function cn(e){return cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cn(e)}function un(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ln(r.key),r)}}function ln(e){var t=function(e,t){if("object"!=cn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=cn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cn(t)?t:String(t)}function fn(){return fn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=dn(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},fn.apply(this,arguments)}function hn(e,t){return hn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hn(e,t)}function pn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dn(e){return dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},dn(e)}o.Z.registerComponent("NextVideoMenuItem",sn);var yn="cv-persisttest",vn="cv-play-next-video",bn=o.Z.getPlugin("plugin"),gn=(o.Z.getComponent("MenuItem"),o.Z.getComponent("NextVideoMenuItem")),mn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hn(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=dn(r);if(i){var n=dn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===cn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pn(e)}(this,e)});function a(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).setShouldPlayNext=t.setShouldPlayNext.bind(pn(t)),t.getShouldPlayNext=t.getShouldPlayNext.bind(pn(t)),t.getChapterTrack=t.getChapterTrack.bind(pn(t)),t.onTimeUpdate=t.onTimeUpdate.bind(pn(t)),t.hasLocalStorage=t.testHasLocalStorage(),t.shouldPlayNextVideo=!1,t.hasLocalStorage){var n=window.localStorage.getItem(vn);t.shouldPlayNextVideo="true"===n}return e.ready((function(){t.initialize()})),t}return t=a,(n=[{key:"initialize",value:function(){this.player.isDisposed()||this.bindListeners()}},{key:"getChapterTrack",value:function(){return mt.O.getTrack(this.player,"chapters",null)}},{key:"setNextVideo",value:function(e,t,n){var r;this.nextVideo=e,this.callback=n,t&&this.setShouldPlayNext(!0),(null===(r=this.player.getChild("collapserator"))||void 0===r?void 0:r.getChild("cogButton")).addItem({index:0,ctor:gn,name:"NextVideoMenuItem"})}},{key:"getShouldPlayNext",value:function(){return this.shouldPlayNextVideo}},{key:"setShouldPlayNext",value:function(e,t){this.shouldPlayNextVideo=e,this.hasLocalStorage&&t&&window.localStorage.setItem(vn,e.toString())}},{key:"bindListeners",value:function(){this.player.on("timeupdate",this.onTimeUpdate)}},{key:"dispose",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.hideUpNext(),fn(dn(a.prototype),"dispose",this).call(this)}},{key:"onTimeUpdate",value:function(){var e,t;if(!this.player.pictureInPicture||!this.player.isInPictureInPicture())if(this.getShouldPlayNext()){if(this.player.ended())return this.callback(),void this.hideUpNext();if(!(this.player.duration()<=0||this.upNextRendered&&this.player.currentTime()>this.upNextTimepoint)){var n=this.getChapterTrack(),r=(null===(e=null==n?void 0:n.activeCues)||void 0===e?void 0:e.length)&&n.activeCues[0];"credits"===(null===(t=null==r?void 0:r.text)||void 0===t?void 0:t.toLowerCase())||this.player.currentTime()>=this.player.duration()-5?this.showUpNext():this.hideUpNext()}}else this.hideUpNext()}},{key:"showUpNext",value:function(){var e=this;this.upNextRendered||(this.upNextRendered=!0,this.upNextTimepoint=this.player.currentTime(),this.player.addChild("UpNext",{nextVideo:this.nextVideo,onPlayNext:this.callback,onCancel:function(){e.hideUpNext(),e.setShouldPlayNext(!1)}}))}},{key:"hideUpNext",value:function(){if(this.upNextRendered){this.upNextRendered=!1,this.upNextTimepoint=null;var e=this.player.getChild("UpNext");e&&(this.player.removeChild(e),e.dispose())}}},{key:"testHasLocalStorage",value:function(){try{return window.localStorage.setItem(yn,"persistPlayNext"),window.localStorage.removeItem(yn),!0}catch(e){return!1}}}])&&un(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(bn);o.Z.registerPlugin("nextVideoPlugin",mn);var wn=n(26733);function Pn(e){return Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pn(e)}function On(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Sn(r.key),r)}}function Sn(e){var t=function(e,t){if("object"!=Pn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Pn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pn(t)?t:String(t)}function kn(e,t){return kn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kn(e,t)}function jn(e){return jn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jn(e)}function Cn(e){return r.createElement("div",{className:"cv-resource-item"},r.createElement(wn.s,{data:e.resource,imageCdnUrl:e.imageCdnUrl}))}var En=(0,Xt.Z)((function(e,t){return r.createElement(Cn,Object.assign({},t))})),Tn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kn(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=jn(r);if(i){var n=jn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Pn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),n=a.call(this,e,t);var r=new En(e,{resource:t.resource,imageCdnUrl:t.imageCdnUrl});return n.addChild(r),n}return t=s,(n=[{key:"createEl",value:function(){return o.Z.dom.createEl("div")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.options_.downloadResource(this.options_.resource)}}])&&On(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("ClickableComponent"));function xn(e){return xn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xn(e)}function In(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_n(r.key),r)}}function _n(e){var t=function(e,t){if("object"!=xn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=xn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xn(t)?t:String(t)}function Rn(){return Rn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ln(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Rn.apply(this,arguments)}function Mn(e,t){return Mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Mn(e,t)}function Ln(e){return Ln=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ln(e)}var Dn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mn(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ln(r);if(i){var n=Ln(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===xn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(e=a.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=s,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(Rn(Ln(s.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-resources-button ".concat(Rn(Ln(s.prototype),"buildCSSClass",this).call(this))}},{key:"update",value:function(){Rn(Ln(s.prototype),"update",this).call(this)}},{key:"createMenu",value:function(){return this.options_.title="Resources",Rn(Ln(s.prototype),"createMenu",this).call(this)}},{key:"createItems",value:function(){var e=this,t=[];return this.options_.resources.forEach((function(n){var r=new Tn(e.player(),{resource:n,imageCdnUrl:e.options_.imageCdnUrl,downloadResource:function(t){return e.downloadResource(t)}});t.push(r)})),t}},{key:"downloadResource",value:function(e){this.getDownloadIframe().src=e.url}},{key:"getDownloadIframe",value:function(){return this.downloadIframe||(this.downloadIframe=o.Z.dom.createEl("iframe"),this.downloadIframe.style.display="none",o.Z.dom.appendContent(o.Z.dom.$("body"),this.downloadIframe)),this.downloadIframe}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){Rn(Ln(s.prototype),"handleClick",this).call(this,null)}}])&&In(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("MenuButton"));function Nn(e){return Nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nn(e)}function An(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Vn(r.key),r)}}function Vn(e){var t=function(e,t){if("object"!=Nn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Nn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Nn(t)?t:String(t)}function Bn(e,t){return Bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bn(e,t)}function Fn(e){return Fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fn(e)}Dn.prototype.controlText_="Resources",o.Z.registerComponent("ResourcesButton",Dn);var Un=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bn(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Fn(r);if(i){var n=Fn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Nn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=a,(n=[{key:"onReady",value:function(){if(this.options.resources.length){var e=this.player.getChild("collapserator");e.addChild("ResourcesButton",{resources:this.options.resources,imageCdnUrl:this.options.imageCdnUrl},e.children_.length-3)}}}])&&An(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("resourcesPlugin",Un);var Zn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function zn(e){var t=e.className,n=void 0===t?"":t,i=e.playerApi,o=e.onReady,a=e.onDispose,s=Zn(e,["className","playerApi","onReady","onDispose"]),c=r.useRef();return r.useEffect((function(){if(c){var e=new $t(c.current,Object.assign(Object.assign({},s),{playerApi:i}));return o&&e.ready((function(){o((0,Qt.G)(e))})),a&&e.one("dispose",a),function(){null==e||e.dispose()}}}),[e.viewKey]),r.createElement("div",{ref:c,className:n})}}}]);