@clickview/lite 0.35.0 → 0.35.2-dev.0

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 (406) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/{1980-lite-3c1d9a0bd8.chunk.css → 1201-lite-c31c094e0b.chunk.css} +1 -1
  3. package/dist/css/1426-lite-840995aa62.chunk.css +26 -0
  4. package/dist/css/{6702-lite-7caa0be777.chunk.css → 1461-lite-8a6d9f8005.chunk.css} +1 -1
  5. package/dist/css/{6822-lite-2c4dbd6721.chunk.css → 1514-lite-b377d8aad7.chunk.css} +1 -1
  6. package/dist/css/{5611-lite-0ad79a4f81.chunk.css → 1519-lite-8818fa8d4c.chunk.css} +1 -1
  7. package/dist/css/{9622-lite-23f29cce3d.chunk.css → 1688-lite-cbde295a12.chunk.css} +1 -1
  8. package/dist/css/1805-lite-971ea2bd5a.chunk.css +5 -0
  9. package/dist/css/{1820-lite-e06465f5de.chunk.css → 1820-lite-983fc2b64e.chunk.css} +1 -1
  10. package/dist/css/{6154-lite-9de6d937cb.chunk.css → 2408-lite-d788a06bf3.chunk.css} +1 -1
  11. package/dist/css/{7564-lite-d60de6c7e1.chunk.css → 2469-lite-7a8e220d2f.chunk.css} +1 -1
  12. package/dist/css/{9522-lite-3c1d9a0bd8.chunk.css → 2651-lite-c31c094e0b.chunk.css} +1 -1
  13. package/dist/css/{9869-lite-baa5f27c85.chunk.css → 2703-lite-c11aaae4be.chunk.css} +6 -3
  14. package/dist/css/2819-lite-1ebce7bdcf.chunk.css +6 -0
  15. package/dist/css/{4373-lite-70e0bc4a9c.chunk.css → 3311-lite-8f53694323.chunk.css} +1 -1
  16. package/dist/css/{7286-lite-871baa523e.chunk.css → 3401-lite-0b8496b169.chunk.css} +2 -2
  17. package/dist/css/{817-lite-d4b875a3bb.chunk.css → 4210-lite-5f2e12e28a.chunk.css} +1 -1
  18. package/dist/css/{3755-lite-0da0cc9d62.chunk.css → 4463-lite-b9b1686d14.chunk.css} +1 -1
  19. package/dist/css/{6957-lite-d486456f1e.chunk.css → 4546-lite-3d08e5e8c2.chunk.css} +1 -1
  20. package/dist/css/{5151-lite-d4ae59eb2d.chunk.css → 4728-lite-be5b495f2e.chunk.css} +1 -1
  21. package/dist/css/487-lite-96ad0f943f.chunk.css +5 -0
  22. package/dist/css/{8095-lite-814daf86d6.chunk.css → 4956-lite-12f53a63d0.chunk.css} +1 -1
  23. package/dist/css/{4405-lite-d4ae59eb2d.chunk.css → 5127-lite-be5b495f2e.chunk.css} +1 -1
  24. package/dist/css/{275-lite-4f19640eb7.chunk.css → 5306-lite-40a1dcaba5.chunk.css} +1 -1
  25. package/dist/css/536-lite-b8b24bff42.chunk.css +29 -0
  26. package/dist/css/5379-lite-b9ce6d4999.chunk.css +29 -0
  27. package/dist/css/5442-lite-5b422a19e4.chunk.css +4 -0
  28. package/dist/css/{5659-lite-0ad79a4f81.chunk.css → 5965-lite-8818fa8d4c.chunk.css} +1 -1
  29. package/dist/css/{1366-lite-69969922c3.chunk.css → 6683-lite-bfbd8a654d.chunk.css} +1 -1
  30. package/dist/css/6746-lite-cbacfd109f.chunk.css +1 -0
  31. package/dist/css/7167-lite-e7bc934b47.chunk.css +5 -0
  32. package/dist/css/7178-lite-d470e2a870.chunk.css +3 -0
  33. package/dist/css/{9714-lite-ac0b76a84c.chunk.css → 757-lite-649ce0643d.chunk.css} +1 -1
  34. package/dist/css/{5555-lite-0ad79a4f81.chunk.css → 763-lite-8818fa8d4c.chunk.css} +1 -1
  35. package/dist/css/{7701-lite-6d26cc737a.chunk.css → 7679-lite-66e1f0dc57.chunk.css} +1 -0
  36. package/dist/css/{1944-lite-6cd5066b84.chunk.css → 7726-lite-25438ca851.chunk.css} +1 -0
  37. package/dist/css/7791-lite-afbd54454d.chunk.css +7 -0
  38. package/dist/css/7864-lite-eaa787cfb2.chunk.css +3 -0
  39. package/dist/css/7877-lite-753ceb57d9.chunk.css +7 -0
  40. package/dist/css/8296-lite-1e63b6b5d8.chunk.css +6 -0
  41. package/dist/css/{5171-lite-67352d5f48.chunk.css → 8364-lite-8c45fd1bcc.chunk.css} +1 -1
  42. package/dist/css/{6076-lite-26ebfc882b.chunk.css → 8469-lite-bc1a27e4da.chunk.css} +1 -1
  43. package/dist/css/{1781-lite-62db879d64.chunk.css → 8541-lite-0f6c636afb.chunk.css} +1 -1
  44. package/dist/css/{3987-lite-26ebfc882b.chunk.css → 9133-lite-bc1a27e4da.chunk.css} +1 -1
  45. package/dist/css/9230-lite-5010e72da6.chunk.css +4 -0
  46. package/dist/css/{3446-lite-1b1ec87a28.chunk.css → 9251-lite-3c8ef33419.chunk.css} +2 -2
  47. package/dist/css/{7164-lite-4424261809.chunk.css → 9516-lite-4751b1e0aa.chunk.css} +5 -5
  48. package/dist/css/{4145-lite-10dcae6491.chunk.css → 9704-lite-60ead9f8df.chunk.css} +1 -1
  49. package/dist/css/{519-lite-e5eb6a5c45.chunk.css → 9719-lite-f28f11cc5a.chunk.css} +2 -1
  50. package/dist/css/{7484-lite-bef9094c58.chunk.css → 9871-lite-71a39d9bb3.chunk.css} +1 -1
  51. package/dist/css/{lite-app-df99273901.css → lite-app-ddb4f64bbb.css} +7 -7
  52. package/dist/languages/en.json +1 -1
  53. package/dist/scripts/{1980-535747e896-lite.chunk.js → 1201-c93ac8a29a-lite.chunk.js} +1 -1
  54. package/dist/scripts/1285-d2e1267792-lite.chunk.js +1 -0
  55. package/dist/scripts/1316-a4f3ec3b20-lite.chunk.js +1 -0
  56. package/dist/scripts/1426-94857a953c-lite.chunk.js +2 -0
  57. package/dist/scripts/{6702-7f040268d0-lite.chunk.js → 1461-f7e964ae21-lite.chunk.js} +1 -1
  58. package/dist/scripts/{6822-35fc1ff6f9-lite.chunk.js → 1514-c423b48155-lite.chunk.js} +1 -1
  59. package/dist/scripts/{1518-eaabe78385-lite.chunk.js → 1518-bed0a6528c-lite.chunk.js} +1 -1
  60. package/dist/scripts/1519-5df8482b24-lite.chunk.js +1 -0
  61. package/dist/scripts/{1526-eda6832e12-lite.chunk.js → 1526-93624f65f1-lite.chunk.js} +1 -1
  62. package/dist/scripts/1672-9ae25f79a6-lite.chunk.js +2 -0
  63. package/dist/scripts/{9622-365c5b0e22-lite.chunk.js → 1688-ca1a2a9f04-lite.chunk.js} +1 -1
  64. package/dist/scripts/1805-05413695af-lite.chunk.js +2 -0
  65. package/dist/scripts/1820-e2042d77dd-lite.chunk.js +1 -0
  66. package/dist/scripts/{1830-8741ff0b49-lite.chunk.js → 1830-95f21db5dc-lite.chunk.js} +1 -1
  67. package/dist/scripts/{1863-e2e84114ee-lite.chunk.js → 1863-0c5334f2c2-lite.chunk.js} +1 -1
  68. package/dist/scripts/1913-fef63b944b-lite.chunk.js +1 -0
  69. package/dist/scripts/1919-7860ed3158-lite.chunk.js +1 -0
  70. package/dist/scripts/209-f1187b4df2-lite.chunk.js +1 -0
  71. package/dist/scripts/{2118-4e769f5020-lite.chunk.js → 2118-7741e69919-lite.chunk.js} +1 -1
  72. package/dist/scripts/214-4053c37c3f-lite.chunk.js +1 -0
  73. package/dist/scripts/2188-0278da007c-lite.chunk.js +1 -0
  74. package/dist/scripts/2208-1799924a6a-lite.chunk.js +1 -0
  75. package/dist/scripts/2235-4a03aae86f-lite.chunk.js +1 -0
  76. package/dist/scripts/2251-519ee9915e-lite.chunk.js +1 -0
  77. package/dist/scripts/2269-aa5750345e-lite.chunk.js +1 -0
  78. package/dist/scripts/2279-d09cf05062-lite.chunk.js +1 -0
  79. package/dist/scripts/{2318-a0fc0fe177-lite.chunk.js → 2318-0eb533e9f6-lite.chunk.js} +1 -1
  80. package/dist/scripts/{6154-05e9ba5525-lite.chunk.js → 2408-04112a0ed3-lite.chunk.js} +1 -1
  81. package/dist/scripts/{7564-b42d4f59a6-lite.chunk.js → 2469-436887b1ed-lite.chunk.js} +1 -1
  82. package/dist/scripts/{9522-f6a3bf5aa5-lite.chunk.js → 2651-1323807150-lite.chunk.js} +1 -1
  83. package/dist/scripts/2703-b8b40c84ef-lite.chunk.js +2 -0
  84. package/dist/scripts/2819-a949173a2e-lite.chunk.js +2 -0
  85. package/dist/scripts/{287-3eba510d3a-lite.chunk.js → 287-c53e62a45c-lite.chunk.js} +1 -1
  86. package/dist/scripts/3012-cd7060bdc9-lite.chunk.js +1 -0
  87. package/dist/scripts/{3020-1f43870f76-lite.chunk.js → 3020-b05e9ea141-lite.chunk.js} +1 -1
  88. package/dist/scripts/3154-eb045d3ab6-lite.chunk.js +1 -0
  89. package/dist/scripts/3216-d62de73736-lite.chunk.js +1 -0
  90. package/dist/scripts/3311-808538c9c6-lite.chunk.js +1 -0
  91. package/dist/scripts/3401-4f2a173341-lite.chunk.js +1 -0
  92. package/dist/scripts/355-59bd6e899f-lite.chunk.js +1 -0
  93. package/dist/scripts/3645-d1313ec6dc-lite.chunk.js +2 -0
  94. package/dist/scripts/3654-0961346057-lite.chunk.js +1 -0
  95. package/dist/scripts/3667-6ce2b5b14a-lite.chunk.js +2 -0
  96. package/dist/scripts/3728-51b81bfa83-lite.chunk.js +1 -0
  97. package/dist/scripts/3836-5487914e10-lite.chunk.js +1 -0
  98. package/dist/scripts/3848-b85b763432-lite.chunk.js +1 -0
  99. package/dist/scripts/3962-3738b0a52e-lite.chunk.js +1 -0
  100. package/dist/scripts/3966-80e9cd7a87-lite.chunk.js +1 -0
  101. package/dist/scripts/{4032-ad48f98700-lite.chunk.js → 4032-01f86c1e49-lite.chunk.js} +1 -1
  102. package/dist/scripts/407-1e3ffc6e32-lite.chunk.js +2 -0
  103. package/dist/scripts/414-50eeedf502-lite.chunk.js +1 -0
  104. package/dist/scripts/4210-dcf489c86f-lite.chunk.js +1 -0
  105. package/dist/scripts/4393-56a2324cff-lite.chunk.js +1 -0
  106. package/dist/scripts/4436-2615b1ce10-lite.chunk.js +1 -0
  107. package/dist/scripts/4441-372ecffa04-lite.chunk.js +2 -0
  108. package/dist/scripts/{3755-6ed23bfa7a-lite.chunk.js → 4463-7a07bc54f0-lite.chunk.js} +1 -1
  109. package/dist/scripts/4537-34124b109e-lite.chunk.js +1 -0
  110. package/dist/scripts/4546-a3452a1fd5-lite.chunk.js +1 -0
  111. package/dist/scripts/4612-60a22d0dd6-lite.chunk.js +1 -0
  112. package/dist/scripts/4617-940157b232-lite.chunk.js +1 -0
  113. package/dist/scripts/4632-450e2f3cf2-lite.chunk.js +1 -0
  114. package/dist/scripts/4676-9295ffc870-lite.chunk.js +2 -0
  115. package/dist/scripts/{4690-b7b01cea5f-lite.chunk.js → 4690-a714a10250-lite.chunk.js} +1 -1
  116. package/dist/scripts/{5151-28b95c9098-lite.chunk.js → 4728-8837108457-lite.chunk.js} +1 -1
  117. package/dist/scripts/{4753-d8e01a7af9-lite.chunk.js → 4753-e9cd640ceb-lite.chunk.js} +1 -1
  118. package/dist/scripts/487-55f69c7d70-lite.chunk.js +2 -0
  119. package/dist/scripts/4956-b0840f1cfa-lite.chunk.js +1 -0
  120. package/dist/scripts/5041-2af2a2541f-lite.chunk.js +1 -0
  121. package/dist/scripts/{5143-56be0b0492-lite.chunk.js → 5143-8ad2cd9a86-lite.chunk.js} +1 -1
  122. package/dist/scripts/5177-ea01e21af3-lite.chunk.js +2 -0
  123. package/dist/scripts/5271-da40b4f079-lite.chunk.js +1 -1
  124. package/dist/scripts/528-8cfebb9254-lite.chunk.js +1 -0
  125. package/dist/scripts/5306-b25542939f-lite.chunk.js +1 -0
  126. package/dist/scripts/536-7c7970277a-lite.chunk.js +2 -0
  127. package/dist/scripts/5379-95b5e191fe-lite.chunk.js +1 -0
  128. package/dist/scripts/5442-82e8147edc-lite.chunk.js +2 -0
  129. package/dist/scripts/5940-875bf13577-lite.chunk.js +1 -0
  130. package/dist/scripts/5965-ba2cf10fc0-lite.chunk.js +1 -0
  131. package/dist/scripts/5974-9d5df057b3-lite.chunk.js +1 -0
  132. package/dist/scripts/5986-6f6b2bdf89-lite.chunk.js +1 -0
  133. package/dist/scripts/6086-642813efbe-lite.chunk.js +2 -0
  134. package/dist/scripts/615-20af1b2df5-lite.chunk.js +1 -0
  135. package/dist/scripts/{6274-f3769a7518-lite.chunk.js → 6274-7545674bdd-lite.chunk.js} +1 -1
  136. package/dist/scripts/6290-b8e7be07c0-lite.chunk.js +1 -0
  137. package/dist/scripts/6330-34349d1457-lite.chunk.js +1 -0
  138. package/dist/scripts/6347-5fa92cd82e-lite.chunk.js +1 -0
  139. package/dist/scripts/6368-91be19eabb-lite.chunk.js +1 -0
  140. package/dist/scripts/{6433-7b2bd48f40-lite.chunk.js → 6433-8a473c7c44-lite.chunk.js} +2 -2
  141. package/dist/scripts/6532-19e258fc3e-lite.chunk.js +1 -0
  142. package/dist/scripts/6572-d500d16bea-lite.chunk.js +1 -0
  143. package/dist/scripts/6683-6a53507e03-lite.chunk.js +2 -0
  144. package/dist/scripts/6746-a32d22602e-lite.chunk.js +1 -0
  145. package/dist/scripts/6801-30961910e4-lite.chunk.js +1 -0
  146. package/dist/scripts/6823-ca63f0d5eb-lite.chunk.js +2 -0
  147. package/dist/scripts/689-165a5a700c-lite.chunk.js +1 -0
  148. package/dist/scripts/6891-8f643cb84b-lite.chunk.js +1 -0
  149. package/dist/scripts/6896-e0f3a08bf2-lite.chunk.js +2 -0
  150. package/dist/scripts/6930-91a3463106-lite.chunk.js +1 -0
  151. package/dist/scripts/6998-43af06b2d9-lite.chunk.js +1 -0
  152. package/dist/scripts/7017-5eb39ba9d6-lite.chunk.js +2 -0
  153. package/dist/scripts/7052-aeeed6bc6d-lite.chunk.js +2 -0
  154. package/dist/scripts/7052-aeeed6bc6d-lite.chunk.js.LICENSE.txt +1 -0
  155. package/dist/scripts/{7056-6d3a7715c8-lite.chunk.js → 7056-b2c401e297-lite.chunk.js} +1 -1
  156. package/dist/scripts/{7072-e5581f0660-lite.chunk.js → 7072-1cf02994dd-lite.chunk.js} +2 -2
  157. package/dist/scripts/7072-1cf02994dd-lite.chunk.js.LICENSE.txt +1 -0
  158. package/dist/scripts/7112-02e4fa8fd1-lite.chunk.js +2 -0
  159. package/dist/scripts/7112-02e4fa8fd1-lite.chunk.js.LICENSE.txt +1 -0
  160. package/dist/scripts/7115-0b2f29dca8-lite.chunk.js +1 -0
  161. package/dist/scripts/7117-a7ffb9474e-lite.chunk.js +1 -0
  162. package/dist/scripts/714-bb31ad5ca8-lite.chunk.js +1 -0
  163. package/dist/scripts/7167-9a5391a56e-lite.chunk.js +1 -0
  164. package/dist/scripts/7178-d9ec32d7d3-lite.chunk.js +1 -0
  165. package/dist/scripts/7205-1852c97c81-lite.chunk.js +1 -0
  166. package/dist/scripts/{7221-d71ae05428-lite.chunk.js → 7221-f5d0743e30-lite.chunk.js} +2 -2
  167. package/dist/scripts/7221-f5d0743e30-lite.chunk.js.LICENSE.txt +1 -0
  168. package/dist/scripts/7288-3d3041485c-lite.chunk.js +1 -0
  169. package/dist/scripts/{7293-9edf8dab3b-lite.chunk.js → 7293-026c162545-lite.chunk.js} +1 -1
  170. package/dist/scripts/7506-75116824b9-lite.chunk.js +1 -0
  171. package/dist/scripts/{7540-2694a96451-lite.chunk.js → 7540-419fef286c-lite.chunk.js} +1 -1
  172. package/dist/scripts/{7555-3d6fa65b58-lite.chunk.js → 7555-e79e8614f1-lite.chunk.js} +1 -1
  173. package/dist/scripts/757-67c0765021-lite.chunk.js +1 -0
  174. package/dist/scripts/763-beed241551-lite.chunk.js +1 -0
  175. package/dist/scripts/{7701-3eb0dab472-lite.chunk.js → 7679-0155d80ba4-lite.chunk.js} +1 -1
  176. package/dist/scripts/{7703-58a0f0e91e-lite.chunk.js → 7703-2cc80445d8-lite.chunk.js} +1 -1
  177. package/dist/scripts/7726-6d5241cf36-lite.chunk.js +1 -0
  178. package/dist/scripts/7791-45cbec4cb9-lite.chunk.js +2 -0
  179. package/dist/scripts/7791-45cbec4cb9-lite.chunk.js.LICENSE.txt +1 -0
  180. package/dist/scripts/{7855-4598a122c5-lite.chunk.js → 7855-f51632f802-lite.chunk.js} +1 -1
  181. package/dist/scripts/7864-eb01ccb48c-lite.chunk.js +2 -0
  182. package/dist/scripts/7864-eb01ccb48c-lite.chunk.js.LICENSE.txt +1 -0
  183. package/dist/scripts/7877-b7427a8fc3-lite.chunk.js +2 -0
  184. package/dist/scripts/7877-b7427a8fc3-lite.chunk.js.LICENSE.txt +1 -0
  185. package/dist/scripts/8046-55ad30beea-lite.chunk.js +1 -0
  186. package/dist/scripts/8296-61fbedf389-lite.chunk.js +2 -0
  187. package/dist/scripts/8296-61fbedf389-lite.chunk.js.LICENSE.txt +1 -0
  188. package/dist/scripts/{8323-e7e2a0a948-lite.chunk.js → 8323-5d423659d5-lite.chunk.js} +1 -1
  189. package/dist/scripts/8323-5d423659d5-lite.chunk.js.LICENSE.txt +1 -0
  190. package/dist/scripts/{5171-4e637c7361-lite.chunk.js → 8364-7054d36da8-lite.chunk.js} +1 -1
  191. package/dist/scripts/8466-627dcf6218-lite.chunk.js +1 -0
  192. package/dist/scripts/{3987-8a8da439f0-lite.chunk.js → 8469-c872f52295-lite.chunk.js} +1 -1
  193. package/dist/scripts/{1781-a04e438477-lite.chunk.js → 8541-e93ccc1e65-lite.chunk.js} +1 -1
  194. package/dist/scripts/8759-46b3f7b560-lite.chunk.js +1 -0
  195. package/dist/scripts/8763-8fc868e00e-lite.chunk.js +1 -0
  196. package/dist/scripts/{8771-4530cc4e58-lite.chunk.js → 8771-fdb379457c-lite.chunk.js} +1 -1
  197. package/dist/scripts/8834-bb079c32a4-lite.chunk.js +1 -0
  198. package/dist/scripts/{8873-e305e24d04-lite.chunk.js → 8873-514feb8faa-lite.chunk.js} +1 -1
  199. package/dist/scripts/8905-7e47ba1360-lite.chunk.js +1 -0
  200. package/dist/scripts/{9016-e97d214ce1-lite.chunk.js → 9016-68a0088483-lite.chunk.js} +1 -1
  201. package/dist/scripts/9118-43d2bf9226-lite.chunk.js +1 -0
  202. package/dist/scripts/{6076-d0ab857b36-lite.chunk.js → 9133-d324adda28-lite.chunk.js} +1 -1
  203. package/dist/scripts/{9151-a4b1b99c42-lite.chunk.js → 9151-97d4bda2a9-lite.chunk.js} +1 -1
  204. package/dist/scripts/9226-81363cd855-lite.chunk.js +1 -0
  205. package/dist/scripts/9230-b5f75f4b25-lite.chunk.js +2 -0
  206. package/dist/scripts/9230-b5f75f4b25-lite.chunk.js.LICENSE.txt +1 -0
  207. package/dist/scripts/9242-02b00e644d-lite.chunk.js +1 -0
  208. package/dist/scripts/{3446-f4de03ea76-lite.chunk.js → 9251-c959bef104-lite.chunk.js} +1 -1
  209. package/dist/scripts/9433-17de94d578-lite.chunk.js +1 -0
  210. package/dist/scripts/{9478-6f19948322-lite.chunk.js → 9478-48fd914e48-lite.chunk.js} +2 -2
  211. package/dist/scripts/9478-48fd914e48-lite.chunk.js.LICENSE.txt +1 -0
  212. package/dist/scripts/9516-c47539c35b-lite.chunk.js +1 -0
  213. package/dist/scripts/9657-50adfc790f-lite.chunk.js +1 -0
  214. package/dist/scripts/9704-a3a54ec316-lite.chunk.js +1 -0
  215. package/dist/scripts/9719-c890a68331-lite.chunk.js +2 -0
  216. package/dist/scripts/9719-c890a68331-lite.chunk.js.LICENSE.txt +1 -0
  217. package/dist/scripts/{7484-f15261951b-lite.chunk.js → 9871-239c33690a-lite.chunk.js} +1 -1
  218. package/dist/scripts/{9894-1e493082b6-lite.chunk.js → 9894-0e66baa841-lite.chunk.js} +1 -1
  219. package/dist/scripts/9894-0e66baa841-lite.chunk.js.LICENSE.txt +1 -0
  220. package/dist/scripts/993-51d56e4686-lite.chunk.js +2 -0
  221. package/dist/scripts/993-51d56e4686-lite.chunk.js.LICENSE.txt +1 -0
  222. package/dist/scripts/bundle-0846da5fd2.min.js +2 -0
  223. package/jest.config.js +11 -11
  224. package/package.json +62 -61
  225. package/typings/libs/CVEvents.d.ts +12 -12
  226. package/typings/libs/CVLanguages.d.ts +24 -24
  227. package/typings/libs/cloneDeep.d.ts +4 -4
  228. package/typings/libs/cookiesjs.d.ts +25 -25
  229. package/typings/libs/draft-convert.d.ts +3 -3
  230. package/typings/libs/google-api.d.ts +93 -93
  231. package/typings/libs/intersection-observer.d.ts +82 -82
  232. package/typings/libs/microsoft-teams.d.ts +2 -2
  233. package/typings/libs/react-table-config.d.ts +138 -138
  234. package/typings/libs/trackjs.d.ts +2 -2
  235. package/typings/libs/videojs-contrib-quality-levels.d.ts +28 -28
  236. package/typings/utils/imports.d.ts +13 -13
  237. package/dist/css/109-lite-e638e5617a.chunk.css +0 -3
  238. package/dist/css/7178-lite-b4e4346f43.chunk.css +0 -3
  239. package/dist/css/8329-lite-1f86f27b10.chunk.css +0 -3
  240. package/dist/css/8978-lite-aa21368531.chunk.css +0 -3
  241. package/dist/scripts/109-c94f9ee532-lite.chunk.js +0 -1
  242. package/dist/scripts/1285-2d3299c556-lite.chunk.js +0 -1
  243. package/dist/scripts/1316-5123580c25-lite.chunk.js +0 -1
  244. package/dist/scripts/1366-e5b46ac15b-lite.chunk.js +0 -2
  245. package/dist/scripts/1517-9158f5a30a-lite.chunk.js +0 -1
  246. package/dist/scripts/1672-4ff30fe0d9-lite.chunk.js +0 -2
  247. package/dist/scripts/1820-d34eefdad4-lite.chunk.js +0 -1
  248. package/dist/scripts/1913-196e6dbf6e-lite.chunk.js +0 -1
  249. package/dist/scripts/1944-8faad6e742-lite.chunk.js +0 -1
  250. package/dist/scripts/209-03f1ffaa32-lite.chunk.js +0 -1
  251. package/dist/scripts/2208-8e54f2060f-lite.chunk.js +0 -1
  252. package/dist/scripts/2235-02fa6854c8-lite.chunk.js +0 -1
  253. package/dist/scripts/2269-48415bbc64-lite.chunk.js +0 -1
  254. package/dist/scripts/2279-02a72d36ec-lite.chunk.js +0 -1
  255. package/dist/scripts/2608-9d9eb7d113-lite.chunk.js +0 -1
  256. package/dist/scripts/2743-550d89b378-lite.chunk.js +0 -1
  257. package/dist/scripts/275-cfe76208a9-lite.chunk.js +0 -1
  258. package/dist/scripts/3012-cc96ee5265-lite.chunk.js +0 -1
  259. package/dist/scripts/3154-539a352006-lite.chunk.js +0 -1
  260. package/dist/scripts/3216-9caff8afdd-lite.chunk.js +0 -1
  261. package/dist/scripts/3371-bb9a674c07-lite.chunk.js +0 -1
  262. package/dist/scripts/3488-402969da0d-lite.chunk.js +0 -2
  263. package/dist/scripts/355-3eb0659bd4-lite.chunk.js +0 -1
  264. package/dist/scripts/3645-e68fabc894-lite.chunk.js +0 -2
  265. package/dist/scripts/3654-96999f107e-lite.chunk.js +0 -1
  266. package/dist/scripts/3667-289cb6db16-lite.chunk.js +0 -2
  267. package/dist/scripts/3706-e997fb8467-lite.chunk.js +0 -2
  268. package/dist/scripts/3728-8f767eeedd-lite.chunk.js +0 -1
  269. package/dist/scripts/3836-060f903a23-lite.chunk.js +0 -1
  270. package/dist/scripts/3848-a3b274c11c-lite.chunk.js +0 -1
  271. package/dist/scripts/3865-f7e73fec9c-lite.chunk.js +0 -1
  272. package/dist/scripts/3962-3dcedae047-lite.chunk.js +0 -1
  273. package/dist/scripts/3966-e4ad0f453d-lite.chunk.js +0 -1
  274. package/dist/scripts/4145-24137c0973-lite.chunk.js +0 -1
  275. package/dist/scripts/4373-d7d9c8effd-lite.chunk.js +0 -1
  276. package/dist/scripts/4393-bb6bbe6eb1-lite.chunk.js +0 -1
  277. package/dist/scripts/4417-1ef8363302-lite.chunk.js +0 -1
  278. package/dist/scripts/4436-b92639529d-lite.chunk.js +0 -1
  279. package/dist/scripts/4441-3d09d55849-lite.chunk.js +0 -2
  280. package/dist/scripts/4537-6383a3ea11-lite.chunk.js +0 -1
  281. package/dist/scripts/4612-cfc046e6e9-lite.chunk.js +0 -1
  282. package/dist/scripts/4617-94a4942af7-lite.chunk.js +0 -1
  283. package/dist/scripts/4632-ac71090d0d-lite.chunk.js +0 -1
  284. package/dist/scripts/5041-8e820ed93c-lite.chunk.js +0 -1
  285. package/dist/scripts/519-30f9dc5f0c-lite.chunk.js +0 -1
  286. package/dist/scripts/528-9a6deb93d3-lite.chunk.js +0 -1
  287. package/dist/scripts/5555-e3cdd91f35-lite.chunk.js +0 -1
  288. package/dist/scripts/5611-1eeee649ed-lite.chunk.js +0 -1
  289. package/dist/scripts/5659-176b355d0b-lite.chunk.js +0 -1
  290. package/dist/scripts/5974-8af9af8fae-lite.chunk.js +0 -1
  291. package/dist/scripts/5986-1e0b21c0d6-lite.chunk.js +0 -1
  292. package/dist/scripts/615-0322d641a3-lite.chunk.js +0 -1
  293. package/dist/scripts/6290-4f53628aac-lite.chunk.js +0 -1
  294. package/dist/scripts/6330-ff1a098eb1-lite.chunk.js +0 -1
  295. package/dist/scripts/6368-38cc77beda-lite.chunk.js +0 -1
  296. package/dist/scripts/6532-5bc872b460-lite.chunk.js +0 -1
  297. package/dist/scripts/6572-a77a3b657b-lite.chunk.js +0 -1
  298. package/dist/scripts/6609-5e0d55ee56-lite.chunk.js +0 -1
  299. package/dist/scripts/6725-6fe76436f5-lite.chunk.js +0 -1
  300. package/dist/scripts/6736-7223de888f-lite.chunk.js +0 -2
  301. package/dist/scripts/6801-fb5064f563-lite.chunk.js +0 -1
  302. package/dist/scripts/6823-b2eb2f9837-lite.chunk.js +0 -2
  303. package/dist/scripts/689-1c6a46496d-lite.chunk.js +0 -1
  304. package/dist/scripts/6896-8b4fc3fd6d-lite.chunk.js +0 -1
  305. package/dist/scripts/6930-9f739d475b-lite.chunk.js +0 -1
  306. package/dist/scripts/6957-691d6fbdc7-lite.chunk.js +0 -1
  307. package/dist/scripts/6998-1aa38379f3-lite.chunk.js +0 -1
  308. package/dist/scripts/7017-dc16719bf3-lite.chunk.js +0 -1
  309. package/dist/scripts/7052-d9ae572322-lite.chunk.js +0 -2
  310. package/dist/scripts/7112-25e9780c3f-lite.chunk.js +0 -2
  311. package/dist/scripts/7115-c73692fe3a-lite.chunk.js +0 -1
  312. package/dist/scripts/7117-1da2d8e101-lite.chunk.js +0 -1
  313. package/dist/scripts/714-676e0b469a-lite.chunk.js +0 -1
  314. package/dist/scripts/7164-9dec6a0e20-lite.chunk.js +0 -1
  315. package/dist/scripts/7178-a1115d825b-lite.chunk.js +0 -1
  316. package/dist/scripts/7205-20ace43ff9-lite.chunk.js +0 -1
  317. package/dist/scripts/7286-ba6c277af4-lite.chunk.js +0 -1
  318. package/dist/scripts/7288-8fca167593-lite.chunk.js +0 -1
  319. package/dist/scripts/7506-d91786f020-lite.chunk.js +0 -1
  320. package/dist/scripts/8046-1c2056961d-lite.chunk.js +0 -1
  321. package/dist/scripts/8095-ee8a101682-lite.chunk.js +0 -1
  322. package/dist/scripts/817-68aeef8671-lite.chunk.js +0 -1
  323. package/dist/scripts/8329-db3ca45cb6-lite.chunk.js +0 -2
  324. package/dist/scripts/8367-87790190cb-lite.chunk.js +0 -1
  325. package/dist/scripts/8466-2c58de04c4-lite.chunk.js +0 -1
  326. package/dist/scripts/8564-fbf34ea798-lite.chunk.js +0 -1
  327. package/dist/scripts/8759-d8e5c29a2e-lite.chunk.js +0 -1
  328. package/dist/scripts/8772-0cae662668-lite.chunk.js +0 -1
  329. package/dist/scripts/8905-039126dc2f-lite.chunk.js +0 -1
  330. package/dist/scripts/8978-2cb6319c36-lite.chunk.js +0 -2
  331. package/dist/scripts/9118-53bed185a5-lite.chunk.js +0 -1
  332. package/dist/scripts/9226-f59a8a5d53-lite.chunk.js +0 -1
  333. package/dist/scripts/9242-a9f54957c0-lite.chunk.js +0 -1
  334. package/dist/scripts/9581-41cb8eba5b-lite.chunk.js +0 -1
  335. package/dist/scripts/9714-f8d16adc4e-lite.chunk.js +0 -1
  336. package/dist/scripts/9869-601bc00f9b-lite.chunk.js +0 -2
  337. package/dist/scripts/bundle-6f143bc21b.min.js +0 -2
  338. /package/dist/css/{2743-lite-ab01f5dc3b.chunk.css → 1919-lite-ab01f5dc3b.chunk.css} +0 -0
  339. /package/dist/css/{6725-lite-db1dbcbd39.chunk.css → 414-lite-db1dbcbd39.chunk.css} +0 -0
  340. /package/dist/css/{3706-lite-8601f9a468.chunk.css → 5177-lite-8601f9a468.chunk.css} +0 -0
  341. /package/dist/css/{8367-lite-a3507f7491.chunk.css → 5940-lite-a3507f7491.chunk.css} +0 -0
  342. /package/dist/css/{3865-lite-a288188c68.chunk.css → 6891-lite-a288188c68.chunk.css} +0 -0
  343. /package/dist/css/{8772-lite-db1dbcbd39.chunk.css → 8763-lite-db1dbcbd39.chunk.css} +0 -0
  344. /package/dist/css/{6609-lite-08c053955f.chunk.css → 9657-lite-08c053955f.chunk.css} +0 -0
  345. /package/dist/scripts/{1366-e5b46ac15b-lite.chunk.js.LICENSE.txt → 1426-94857a953c-lite.chunk.js.LICENSE.txt} +0 -0
  346. /package/dist/scripts/{1672-4ff30fe0d9-lite.chunk.js.LICENSE.txt → 1672-9ae25f79a6-lite.chunk.js.LICENSE.txt} +0 -0
  347. /package/dist/scripts/{1725-082ef05b56-lite.chunk.js → 1725-0e284a32f3-lite.chunk.js} +0 -0
  348. /package/dist/scripts/{1750-dd4c1bf3fc-lite.chunk.js → 1750-82cf9361fb-lite.chunk.js} +0 -0
  349. /package/dist/scripts/{2118-4e769f5020-lite.chunk.js.LICENSE.txt → 1805-05413695af-lite.chunk.js.LICENSE.txt} +0 -0
  350. /package/dist/scripts/{1891-af9f943f4d-lite.chunk.js → 1891-dd253c3378-lite.chunk.js} +0 -0
  351. /package/dist/scripts/{3488-402969da0d-lite.chunk.js.LICENSE.txt → 2118-7741e69919-lite.chunk.js.LICENSE.txt} +0 -0
  352. /package/dist/scripts/{2452-446607a894-lite.chunk.js → 2452-f96e548d17-lite.chunk.js} +0 -0
  353. /package/dist/scripts/{3645-e68fabc894-lite.chunk.js.LICENSE.txt → 2703-b8b40c84ef-lite.chunk.js.LICENSE.txt} +0 -0
  354. /package/dist/scripts/{2767-5df93b7c43-lite.chunk.js → 2767-299f58bb17-lite.chunk.js} +0 -0
  355. /package/dist/scripts/{3667-289cb6db16-lite.chunk.js.LICENSE.txt → 2819-a949173a2e-lite.chunk.js.LICENSE.txt} +0 -0
  356. /package/dist/scripts/{3108-ae911e3d71-lite.chunk.js → 3108-86d4c73e29-lite.chunk.js} +0 -0
  357. /package/dist/scripts/{3171-663aa64cae-lite.chunk.js → 3171-9eda288c67-lite.chunk.js} +0 -0
  358. /package/dist/scripts/{3468-4d7076a979-lite.chunk.js → 3468-8926a9db70-lite.chunk.js} +0 -0
  359. /package/dist/scripts/{3706-e997fb8467-lite.chunk.js.LICENSE.txt → 3645-d1313ec6dc-lite.chunk.js.LICENSE.txt} +0 -0
  360. /package/dist/scripts/{4441-3d09d55849-lite.chunk.js.LICENSE.txt → 3667-6ce2b5b14a-lite.chunk.js.LICENSE.txt} +0 -0
  361. /package/dist/scripts/{389-e7037a0807-lite.chunk.js → 389-2ab260e7d2-lite.chunk.js} +0 -0
  362. /package/dist/scripts/{6433-7b2bd48f40-lite.chunk.js.LICENSE.txt → 407-1e3ffc6e32-lite.chunk.js.LICENSE.txt} +0 -0
  363. /package/dist/scripts/{4182-e9700be806-lite.chunk.js → 4182-6869dfda31-lite.chunk.js} +0 -0
  364. /package/dist/scripts/{6736-7223de888f-lite.chunk.js.LICENSE.txt → 4441-372ecffa04-lite.chunk.js.LICENSE.txt} +0 -0
  365. /package/dist/scripts/{4541-c08f765eab-lite.chunk.js → 4541-9ad274071e-lite.chunk.js} +0 -0
  366. /package/dist/scripts/{7052-d9ae572322-lite.chunk.js.LICENSE.txt → 4676-9295ffc870-lite.chunk.js.LICENSE.txt} +0 -0
  367. /package/dist/scripts/{482-8139ae4723-lite.chunk.js → 482-c9fd7b68d3-lite.chunk.js} +0 -0
  368. /package/dist/scripts/{7072-e5581f0660-lite.chunk.js.LICENSE.txt → 487-55f69c7d70-lite.chunk.js.LICENSE.txt} +0 -0
  369. /package/dist/scripts/{7112-25e9780c3f-lite.chunk.js.LICENSE.txt → 5177-ea01e21af3-lite.chunk.js.LICENSE.txt} +0 -0
  370. /package/dist/scripts/{5229-7329bd81e6-lite.chunk.js → 5229-fed729d13a-lite.chunk.js} +0 -0
  371. /package/dist/scripts/{7221-d71ae05428-lite.chunk.js.LICENSE.txt → 536-7c7970277a-lite.chunk.js.LICENSE.txt} +0 -0
  372. /package/dist/scripts/{5385-f53e603625-lite.chunk.js → 5385-2719aaaf84-lite.chunk.js} +0 -0
  373. /package/dist/scripts/{8323-e7e2a0a948-lite.chunk.js.LICENSE.txt → 5442-82e8147edc-lite.chunk.js.LICENSE.txt} +0 -0
  374. /package/dist/scripts/{5595-5ee4c1c5ed-lite.chunk.js → 5595-ed6e8d9ca0-lite.chunk.js} +0 -0
  375. /package/dist/scripts/{5606-404debcda3-lite.chunk.js → 5606-68f1afd060-lite.chunk.js} +0 -0
  376. /package/dist/scripts/{5877-d728cd98a7-lite.chunk.js → 5877-1dc9ca4f2d-lite.chunk.js} +0 -0
  377. /package/dist/scripts/{6057-a8b9812431-lite.chunk.js → 6057-3c43af21b1-lite.chunk.js} +0 -0
  378. /package/dist/scripts/{8329-db3ca45cb6-lite.chunk.js.LICENSE.txt → 6086-642813efbe-lite.chunk.js.LICENSE.txt} +0 -0
  379. /package/dist/scripts/{8978-2cb6319c36-lite.chunk.js.LICENSE.txt → 6433-8a473c7c44-lite.chunk.js.LICENSE.txt} +0 -0
  380. /package/dist/scripts/{6450-87b22756f6-lite.chunk.js → 6450-0bde4cef33-lite.chunk.js} +0 -0
  381. /package/dist/scripts/{6465-7a63bc80b6-lite.chunk.js → 6465-5b42f81416-lite.chunk.js} +0 -0
  382. /package/dist/scripts/{6480-3e17c41241-lite.chunk.js → 6480-93ab348bf1-lite.chunk.js} +0 -0
  383. /package/dist/scripts/{6604-19f0427fcc-lite.chunk.js → 6604-d331808398-lite.chunk.js} +0 -0
  384. /package/dist/scripts/{9478-6f19948322-lite.chunk.js.LICENSE.txt → 6683-6a53507e03-lite.chunk.js.LICENSE.txt} +0 -0
  385. /package/dist/scripts/{6689-ec5171ba5f-lite.chunk.js → 6689-65a1b86bb2-lite.chunk.js} +0 -0
  386. /package/dist/scripts/{6823-b2eb2f9837-lite.chunk.js.LICENSE.txt → 6823-ca63f0d5eb-lite.chunk.js.LICENSE.txt} +0 -0
  387. /package/dist/scripts/{6863-5dbc85c4b9-lite.chunk.js → 6863-d4f402b72e-lite.chunk.js} +0 -0
  388. /package/dist/scripts/{9869-601bc00f9b-lite.chunk.js.LICENSE.txt → 6896-e0f3a08bf2-lite.chunk.js.LICENSE.txt} +0 -0
  389. /package/dist/scripts/{9894-1e493082b6-lite.chunk.js.LICENSE.txt → 7017-5eb39ba9d6-lite.chunk.js.LICENSE.txt} +0 -0
  390. /package/dist/scripts/{7128-87b101d7b7-lite.chunk.js → 7128-bb219eed51-lite.chunk.js} +0 -0
  391. /package/dist/scripts/{7172-7dadcbf10c-lite.chunk.js → 7172-7710a90e85-lite.chunk.js} +0 -0
  392. /package/dist/scripts/{7338-e0306c666f-lite.chunk.js → 7338-a5d6a68d8e-lite.chunk.js} +0 -0
  393. /package/dist/scripts/{7432-337ec5be0e-lite.chunk.js → 7432-87ce1798ff-lite.chunk.js} +0 -0
  394. /package/dist/scripts/{7708-966b540945-lite.chunk.js → 7708-b642cddc03-lite.chunk.js} +0 -0
  395. /package/dist/scripts/{7715-b21edc60f0-lite.chunk.js → 7715-4f575c978b-lite.chunk.js} +0 -0
  396. /package/dist/scripts/{7818-c81c2d60b9-lite.chunk.js → 7818-a9ab33bdd4-lite.chunk.js} +0 -0
  397. /package/dist/scripts/{7925-c8cd8aace8-lite.chunk.js → 7925-29ca2fc37a-lite.chunk.js} +0 -0
  398. /package/dist/scripts/{8025-1982900b56-lite.chunk.js → 8025-0ef8f041ea-lite.chunk.js} +0 -0
  399. /package/dist/scripts/{8236-10fe50cf1f-lite.chunk.js → 8236-057a7f40db-lite.chunk.js} +0 -0
  400. /package/dist/scripts/{8830-16c2fd1319-lite.chunk.js → 8830-122c8ae807-lite.chunk.js} +0 -0
  401. /package/dist/scripts/{9016-e97d214ce1-lite.chunk.js.LICENSE.txt → 9016-68a0088483-lite.chunk.js.LICENSE.txt} +0 -0
  402. /package/dist/scripts/{9060-aea36d49b0-lite.chunk.js → 9060-c035711b40-lite.chunk.js} +0 -0
  403. /package/dist/scripts/{9455-283f477332-lite.chunk.js → 9455-c80c14ea98-lite.chunk.js} +0 -0
  404. /package/dist/scripts/{9674-25ccc9ee52-lite.chunk.js → 9674-f5e66f8c06-lite.chunk.js} +0 -0
  405. /package/dist/scripts/{9843-d084ed32bf-lite.chunk.js → 9843-07f0304cc4-lite.chunk.js} +0 -0
  406. /package/dist/scripts/{bundle-6f143bc21b.min.js.LICENSE.txt → bundle-0846da5fd2.min.js.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
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})}}}]);