@clickview/lite 0.44.2-rc.2 → 0.44.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (497) hide show
  1. package/dist/bundles.json +3 -3
  2. package/dist/css/{1247-lite-9a3f5f7160.chunk.css → 1247-lite-02e560ffcf.chunk.css} +2 -2
  3. package/dist/css/{140-lite-f39f9798e0.chunk.css → 140-lite-e9a20aeab2.chunk.css} +1 -1
  4. package/dist/css/{1437-lite-6042d08fa2.chunk.css → 1437-lite-c00023e06e.chunk.css} +1 -1
  5. package/dist/css/{1818-lite-9576f5191d.chunk.css → 1818-lite-028006a5ca.chunk.css} +1 -1
  6. package/dist/css/{1820-lite-462cd999ce.chunk.css → 1820-lite-269c94b335.chunk.css} +1 -1
  7. package/dist/css/{5305-lite-2e2b45f740.chunk.css → 2618-lite-627ebd3d8b.chunk.css} +2 -2
  8. package/dist/css/{2882-lite-1eb4501226.chunk.css → 2882-lite-e7d9de42c5.chunk.css} +1 -1
  9. package/dist/css/{2949-lite-09b9500537.chunk.css → 2949-lite-aed3ce5652.chunk.css} +1 -1
  10. package/dist/css/{298-lite-ff74f3b0c2.chunk.css → 298-lite-fb84b77d49.chunk.css} +1 -1
  11. package/dist/css/{2985-lite-e1eb74628f.chunk.css → 2985-lite-178e3d6fa5.chunk.css} +1 -1
  12. package/dist/css/{3095-lite-45e20b1fbe.chunk.css → 3095-lite-a17ba7d401.chunk.css} +1 -1
  13. package/dist/css/{3248-lite-c23a17e252.chunk.css → 3248-lite-cb46011cff.chunk.css} +1 -1
  14. package/dist/css/{349-lite-42731f56c0.chunk.css → 3276-lite-24011dd0df.chunk.css} +1 -1
  15. package/dist/css/{3528-lite-3d8c5a8753.chunk.css → 3528-lite-a8ddfabc25.chunk.css} +1 -1
  16. package/dist/css/{3567-lite-b984352ad1.chunk.css → 3567-lite-90e24e6c8b.chunk.css} +2 -2
  17. package/dist/css/{3626-lite-6d55b9cad7.chunk.css → 3626-lite-961b327ce9.chunk.css} +1 -1
  18. package/dist/css/{2258-lite-47fa3ad49b.chunk.css → 3645-lite-63013c63e9.chunk.css} +1 -1
  19. package/dist/css/{3695-lite-a72e961627.chunk.css → 3695-lite-af751fd0b1.chunk.css} +1 -1
  20. package/dist/css/{3801-lite-e1eb74628f.chunk.css → 3801-lite-178e3d6fa5.chunk.css} +1 -1
  21. package/dist/css/{8169-lite-4ff3b6474c.chunk.css → 3867-lite-b49fe21114.chunk.css} +1 -4
  22. package/dist/css/{4077-lite-b984352ad1.chunk.css → 4077-lite-90e24e6c8b.chunk.css} +2 -2
  23. package/dist/css/{7766-lite-6fde615b21.chunk.css → 4586-lite-57405d5422.chunk.css} +1 -1
  24. package/dist/css/{4608-lite-b9df44abe0.chunk.css → 4608-lite-26cc37d481.chunk.css} +1 -1
  25. package/dist/css/{5236-lite-64d73eb70b.chunk.css → 5236-lite-7c636da5ec.chunk.css} +1 -1
  26. package/dist/css/{2618-lite-2e2b45f740.chunk.css → 5305-lite-627ebd3d8b.chunk.css} +2 -2
  27. package/dist/css/{5595-lite-0170304bff.chunk.css → 5595-lite-9980bec60d.chunk.css} +1 -1
  28. package/dist/css/{6954-lite-8d378a0844.chunk.css → 6954-lite-20677d0252.chunk.css} +1 -1
  29. package/dist/css/{7734-lite-67b9310b87.chunk.css → 702-lite-8ab9b79dd1.chunk.css} +1 -1
  30. package/dist/css/{7240-lite-e81096bb61.chunk.css → 7240-lite-0c3922521e.chunk.css} +1 -1
  31. package/dist/css/{7498-lite-d309346ba5.chunk.css → 7498-lite-e570a649b0.chunk.css} +1 -1
  32. package/dist/css/7506-lite-979f9602d5.chunk.css +1 -0
  33. package/dist/css/{702-lite-67b9310b87.chunk.css → 7734-lite-8ab9b79dd1.chunk.css} +1 -1
  34. package/dist/css/{7776-lite-5771a62510.chunk.css → 7776-lite-7ec93ed2df.chunk.css} +2 -2
  35. package/dist/css/{8034-lite-37ebc1e8d1.chunk.css → 8034-lite-f5a2e3f41b.chunk.css} +1 -1
  36. package/dist/css/{8199-lite-58e6d638a1.chunk.css → 8199-lite-300c48d27b.chunk.css} +1 -1
  37. package/dist/css/{8581-lite-d06e59de94.chunk.css → 8581-lite-12c60b0ed8.chunk.css} +1 -1
  38. package/dist/css/{8713-lite-e81096bb61.chunk.css → 8713-lite-0c3922521e.chunk.css} +1 -1
  39. package/dist/css/{9367-lite-3165ec70f1.chunk.css → 9367-lite-1f62389eb4.chunk.css} +1 -1
  40. package/dist/css/{98-lite-1d8425f919.chunk.css → 98-lite-d3e459028c.chunk.css} +1 -1
  41. package/dist/css/{lite-app-f36b103975.css → lite-app-6142317405.css} +1 -1
  42. package/dist/languages/en.json +1 -1
  43. package/dist/scripts/{1080-9248b94574-lite.chunk.js → 1080-8c9dfbb491-lite.chunk.js} +1 -1
  44. package/dist/scripts/1081-713b2009f0-lite.chunk.js +1 -0
  45. package/dist/scripts/1197-3e8e196036-lite.chunk.js +1 -0
  46. package/dist/scripts/121-7ea66e5966-lite.chunk.js +1 -0
  47. package/dist/scripts/1247-914d177d3b-lite.chunk.js +1 -0
  48. package/dist/scripts/1276-3649cb6030-lite.chunk.js +2 -0
  49. package/dist/scripts/{1285-d07916724c-lite.chunk.js → 1285-11a8e0f8ce-lite.chunk.js} +1 -1
  50. package/dist/scripts/140-ce442e7c1e-lite.chunk.js +1 -0
  51. package/dist/scripts/1437-ca51aed59c-lite.chunk.js +1 -0
  52. package/dist/scripts/1466-1e609d0f2d-lite.chunk.js +2 -0
  53. package/dist/scripts/{1518-57002018d3-lite.chunk.js → 1518-5ababd6202-lite.chunk.js} +1 -1
  54. package/dist/scripts/{1526-58fe2eda49-lite.chunk.js → 1526-af2eac3dcb-lite.chunk.js} +1 -1
  55. package/dist/scripts/1672-3aee4ad2e0-lite.chunk.js +2 -0
  56. package/dist/scripts/{170-eb63a71b72-lite.chunk.js → 170-72e998fdba-lite.chunk.js} +2 -2
  57. package/dist/scripts/1725-679bfa45e5-lite.chunk.js +1 -0
  58. package/dist/scripts/1750-4771ddcf1d-lite.chunk.js +1 -0
  59. package/dist/scripts/1818-a6a4b731f7-lite.chunk.js +1 -0
  60. package/dist/scripts/1820-f846f13220-lite.chunk.js +1 -0
  61. package/dist/scripts/{1863-4c0dc81a7c-lite.chunk.js → 1863-32906a4163-lite.chunk.js} +1 -1
  62. package/dist/scripts/1891-ddedb4f12f-lite.chunk.js +1 -0
  63. package/dist/scripts/1895-d2546a0cd3-lite.chunk.js +2 -0
  64. package/dist/scripts/2118-dd0d1852f0-lite.chunk.js +2 -0
  65. package/dist/scripts/{2199-580e48a178-lite.chunk.js → 2199-b836f10122-lite.chunk.js} +1 -1
  66. package/dist/scripts/2235-c26089dac6-lite.chunk.js +1 -0
  67. package/dist/scripts/2261-e9a7e61d6d-lite.chunk.js +1 -0
  68. package/dist/scripts/2383-81084e360a-lite.chunk.js +1 -0
  69. package/dist/scripts/{287-80b9bd6994-lite.chunk.js → 287-384f5c9246-lite.chunk.js} +1 -1
  70. package/dist/scripts/2882-90f8dcd660-lite.chunk.js +1 -0
  71. package/dist/scripts/{2949-a126bef0fb-lite.chunk.js → 2949-695958186b-lite.chunk.js} +1 -1
  72. package/dist/scripts/298-e41aecf564-lite.chunk.js +1 -0
  73. package/dist/scripts/2985-8863367b73-lite.chunk.js +1 -0
  74. package/dist/scripts/3012-94fdb91743-lite.chunk.js +1 -0
  75. package/dist/scripts/3020-f7e674050d-lite.chunk.js +1 -0
  76. package/dist/scripts/3042-cb521d40b4-lite.chunk.js +1 -0
  77. package/dist/scripts/3081-b55baaca7c-lite.chunk.js +2 -0
  78. package/dist/scripts/3095-8ec332ba2b-lite.chunk.js +2 -0
  79. package/dist/scripts/3171-a923ee5f8e-lite.chunk.js +1 -0
  80. package/dist/scripts/3216-157a11893b-lite.chunk.js +1 -0
  81. package/dist/scripts/3248-8b982f50fe-lite.chunk.js +1 -0
  82. package/dist/scripts/3276-69c61e420c-lite.chunk.js +1 -0
  83. package/dist/scripts/3468-94968874b2-lite.chunk.js +1 -0
  84. package/dist/scripts/355-c2888d4603-lite.chunk.js +1 -0
  85. package/dist/scripts/3567-e6c2ad6aea-lite.chunk.js +1 -0
  86. package/dist/scripts/360-a6e2e997f5-lite.chunk.js +2 -0
  87. package/dist/scripts/3602-903eb1cd1e-lite.chunk.js +2 -0
  88. package/dist/scripts/3645-c9fbac4441-lite.chunk.js +1 -0
  89. package/dist/scripts/3654-758c9e46e0-lite.chunk.js +1 -0
  90. package/dist/scripts/3667-09226e6369-lite.chunk.js +2 -0
  91. package/dist/scripts/3728-c288e986a7-lite.chunk.js +1 -0
  92. package/dist/scripts/3801-ab8cf46584-lite.chunk.js +1 -0
  93. package/dist/scripts/3836-c1b0423e7a-lite.chunk.js +1 -0
  94. package/dist/scripts/3841-539aa9573e-lite.chunk.js +2 -0
  95. package/dist/scripts/3848-4eb815382b-lite.chunk.js +1 -0
  96. package/dist/scripts/3867-2626e2cf7c-lite.chunk.js +2 -0
  97. package/dist/scripts/389-ef43f1ab6a-lite.chunk.js +1 -0
  98. package/dist/scripts/3966-5c38e725b9-lite.chunk.js +1 -0
  99. package/dist/scripts/{4032-b03e3ab723-lite.chunk.js → 4032-447a2a4182-lite.chunk.js} +1 -1
  100. package/dist/scripts/4077-031a1f7250-lite.chunk.js +1 -0
  101. package/dist/scripts/4182-0d7de6c102-lite.chunk.js +1 -0
  102. package/dist/scripts/4343-aca8b5c502-lite.chunk.js +1 -0
  103. package/dist/scripts/4393-48db651ab8-lite.chunk.js +1 -0
  104. package/dist/scripts/4436-94af094875-lite.chunk.js +1 -0
  105. package/dist/scripts/4541-b750910fb7-lite.chunk.js +1 -0
  106. package/dist/scripts/4554-936b8f399b-lite.chunk.js +1 -0
  107. package/dist/scripts/4586-c7151fd59a-lite.chunk.js +1 -0
  108. package/dist/scripts/4608-7dce720218-lite.chunk.js +1 -0
  109. package/dist/scripts/4612-f6ba941518-lite.chunk.js +1 -0
  110. package/dist/scripts/4632-c98cece511-lite.chunk.js +1 -0
  111. package/dist/scripts/4676-beb0d246a2-lite.chunk.js +2 -0
  112. package/dist/scripts/{4753-c8a19a5c5f-lite.chunk.js → 4753-fa7c39e008-lite.chunk.js} +1 -1
  113. package/dist/scripts/4778-2d3bc4ef53-lite.chunk.js +2 -0
  114. package/dist/scripts/482-5fef71ddd5-lite.chunk.js +1 -0
  115. package/dist/scripts/4858-ba1101a0e4-lite.chunk.js +1 -0
  116. package/dist/scripts/4942-4900decb33-lite.chunk.js +2 -0
  117. package/dist/scripts/4972-92567d6389-lite.chunk.js +1 -0
  118. package/dist/scripts/5009-e742b3b11e-lite.chunk.js +2 -0
  119. package/dist/scripts/{5143-ae26a1f028-lite.chunk.js → 5143-a61ff5768d-lite.chunk.js} +1 -1
  120. package/dist/scripts/5229-e35f154a36-lite.chunk.js +1 -0
  121. package/dist/scripts/{5236-5ac333cb67-lite.chunk.js → 5236-5668fcb6e1-lite.chunk.js} +2 -2
  122. package/dist/scripts/5268-5d30359c44-lite.chunk.js +2 -0
  123. package/dist/scripts/5271-6cc2fa0197-lite.chunk.js +1 -1
  124. package/dist/scripts/537-546b4eb266-lite.chunk.js +2 -0
  125. package/dist/scripts/5385-29f8ab3707-lite.chunk.js +1 -0
  126. package/dist/scripts/5438-dba8f00d2c-lite.chunk.js +1 -0
  127. package/dist/scripts/5512-254e4101b7-lite.chunk.js +2 -0
  128. package/dist/scripts/5591-5ec262eb80-lite.chunk.js +1 -0
  129. package/dist/scripts/5595-61b7b1d2a8-lite.chunk.js +1 -0
  130. package/dist/scripts/5622-679a8d7288-lite.chunk.js +2 -0
  131. package/dist/scripts/5940-af6ed27cfb-lite.chunk.js +1 -0
  132. package/dist/scripts/5956-3eb2129d6c-lite.chunk.js +1 -0
  133. package/dist/scripts/6014-8ffb3f5601-lite.chunk.js +1 -0
  134. package/dist/scripts/6086-6e1cd58ace-lite.chunk.js +2 -0
  135. package/dist/scripts/6102-ae346e08c2-lite.chunk.js +2 -0
  136. package/dist/scripts/615-92aa23faec-lite.chunk.js +1 -0
  137. package/dist/scripts/6222-96aaa999aa-lite.chunk.js +1 -0
  138. package/dist/scripts/6263-9ff85d553f-lite.chunk.js +1 -0
  139. package/dist/scripts/6274-3f0d3d8a71-lite.chunk.js +1 -0
  140. package/dist/scripts/6290-c34fa51eaf-lite.chunk.js +1 -0
  141. package/dist/scripts/{6330-b5e65b8a25-lite.chunk.js → 6330-d1700c8c92-lite.chunk.js} +1 -1
  142. package/dist/scripts/6368-9615f5727d-lite.chunk.js +1 -0
  143. package/dist/scripts/6370-2d899b7961-lite.chunk.js +1 -0
  144. package/dist/scripts/6433-355f54088c-lite.chunk.js +2 -0
  145. package/dist/scripts/6465-0295a9dcab-lite.chunk.js +1 -0
  146. package/dist/scripts/6489-4d22ec2409-lite.chunk.js +2 -0
  147. package/dist/scripts/6532-0a8811d4b1-lite.chunk.js +1 -0
  148. package/dist/scripts/6617-60a05d215d-lite.chunk.js +2 -0
  149. package/dist/scripts/6689-57f59b3af4-lite.chunk.js +1 -0
  150. package/dist/scripts/6741-4ded0ca496-lite.chunk.js +2 -0
  151. package/dist/scripts/6801-48746c5267-lite.chunk.js +1 -0
  152. package/dist/scripts/6823-0c0e463dc4-lite.chunk.js +2 -0
  153. package/dist/scripts/6896-a3d38ae7a4-lite.chunk.js +2 -0
  154. package/dist/scripts/{6930-a5b9521c20-lite.chunk.js → 6930-c7f6b5b210-lite.chunk.js} +1 -1
  155. package/dist/scripts/{6954-6205be53b0-lite.chunk.js → 6954-183ae79c12-lite.chunk.js} +1 -1
  156. package/dist/scripts/7017-1c686d77cb-lite.chunk.js +2 -0
  157. package/dist/scripts/{702-75310735d2-lite.chunk.js → 702-528d530ef3-lite.chunk.js} +1 -1
  158. package/dist/scripts/7030-c786d4e8ec-lite.chunk.js +2 -0
  159. package/dist/scripts/7052-8b6c726a6a-lite.chunk.js +2 -0
  160. package/dist/scripts/7112-5be394a047-lite.chunk.js +2 -0
  161. package/dist/scripts/7117-91ae366d34-lite.chunk.js +1 -0
  162. package/dist/scripts/7128-a5539e9d1e-lite.chunk.js +1 -0
  163. package/dist/scripts/7167-acf0110c55-lite.chunk.js +1 -0
  164. package/dist/scripts/7172-e5c5a8dc78-lite.chunk.js +1 -0
  165. package/dist/scripts/7178-b0d19154b1-lite.chunk.js +1 -0
  166. package/dist/scripts/{7205-05c2b05546-lite.chunk.js → 7205-0a33c1ff11-lite.chunk.js} +1 -1
  167. package/dist/scripts/7221-fc696d1984-lite.chunk.js +2 -0
  168. package/dist/scripts/7288-2882ea6a8a-lite.chunk.js +1 -0
  169. package/dist/scripts/7293-64d787998a-lite.chunk.js +1 -0
  170. package/dist/scripts/7338-5f6e7f9a2d-lite.chunk.js +1 -0
  171. package/dist/scripts/7385-8472652f32-lite.chunk.js +2 -0
  172. package/dist/scripts/7402-88ffc2535a-lite.chunk.js +2 -0
  173. package/dist/scripts/{7422-2208e65ac7-lite.chunk.js → 7422-6474c1c476-lite.chunk.js} +2 -2
  174. package/dist/scripts/7498-99948c0bbd-lite.chunk.js +1 -0
  175. package/dist/scripts/7506-799a5aa8ba-lite.chunk.js +1 -0
  176. package/dist/scripts/7511-2d2fe41dea-lite.chunk.js +1 -0
  177. package/dist/scripts/{7540-d5cbd0a585-lite.chunk.js → 7540-7c5a0fc317-lite.chunk.js} +1 -1
  178. package/dist/scripts/{7555-181e877fce-lite.chunk.js → 7555-5650392ae9-lite.chunk.js} +1 -1
  179. package/dist/scripts/7670-9684a40bb3-lite.chunk.js +2 -0
  180. package/dist/scripts/771-2a50f4b492-lite.chunk.js +2 -0
  181. package/dist/scripts/7715-265074805b-lite.chunk.js +1 -0
  182. package/dist/scripts/7726-10f2482d47-lite.chunk.js +1 -0
  183. package/dist/scripts/{7734-e998524903-lite.chunk.js → 7734-5aaa0adc53-lite.chunk.js} +1 -1
  184. package/dist/scripts/{7776-80ddc33c9d-lite.chunk.js → 7776-cca2e735d7-lite.chunk.js} +1 -1
  185. package/dist/scripts/7855-f068755202-lite.chunk.js +1 -0
  186. package/dist/scripts/8025-9729bd9342-lite.chunk.js +1 -0
  187. package/dist/scripts/8046-39bdfad774-lite.chunk.js +1 -0
  188. package/dist/scripts/8199-04230d108d-lite.chunk.js +2 -0
  189. package/dist/scripts/{8323-b7d1f85ed9-lite.chunk.js → 8323-a1dff86e20-lite.chunk.js} +2 -2
  190. package/dist/scripts/841-204e8dffbc-lite.chunk.js +2 -0
  191. package/dist/scripts/8581-e6c2975133-lite.chunk.js +1 -0
  192. package/dist/scripts/8681-fd629972e5-lite.chunk.js +2 -0
  193. package/dist/scripts/8713-46ee309642-lite.chunk.js +1 -0
  194. package/dist/scripts/8759-e1bd74ab1c-lite.chunk.js +1 -0
  195. package/dist/scripts/8830-e25526bf4e-lite.chunk.js +1 -0
  196. package/dist/scripts/8935-ba43b3d0dd-lite.chunk.js +2 -0
  197. package/dist/scripts/9060-130c9abc2f-lite.chunk.js +1 -0
  198. package/dist/scripts/9173-33a8c5c0ba-lite.chunk.js +2 -0
  199. package/dist/scripts/{920-d860086880-lite.chunk.js → 920-27bb460d9b-lite.chunk.js} +1 -1
  200. package/dist/scripts/9226-f6b171dbe4-lite.chunk.js +1 -0
  201. package/dist/scripts/9230-bea3f74253-lite.chunk.js +2 -0
  202. package/dist/scripts/9242-6064f14b8c-lite.chunk.js +1 -0
  203. package/dist/scripts/9367-458a9db4c6-lite.chunk.js +1 -0
  204. package/dist/scripts/9371-adcc457db4-lite.chunk.js +2 -0
  205. package/dist/scripts/9428-02847e469a-lite.chunk.js +2 -0
  206. package/dist/scripts/9433-2633f88768-lite.chunk.js +1 -0
  207. package/dist/scripts/9455-bbdbd12f6b-lite.chunk.js +1 -0
  208. package/dist/scripts/9478-7cd9d681d8-lite.chunk.js +2 -0
  209. package/dist/scripts/9484-5a77c57259-lite.chunk.js +2 -0
  210. package/dist/scripts/9557-e27e33f362-lite.chunk.js +1 -0
  211. package/dist/scripts/9674-acb57a757f-lite.chunk.js +1 -0
  212. package/dist/scripts/9719-d0ad006c61-lite.chunk.js +2 -0
  213. package/dist/scripts/98-d6d242c58e-lite.chunk.js +1 -0
  214. package/dist/scripts/9843-cad445c061-lite.chunk.js +1 -0
  215. package/dist/scripts/9894-3628ac93b9-lite.chunk.js +2 -0
  216. package/dist/scripts/9918-eb167d3142-lite.chunk.js +2 -0
  217. package/dist/scripts/9931-abf79a99fb-lite.chunk.js +2 -0
  218. package/dist/scripts/bundle-a583c5a840.min.js +2 -0
  219. package/dist/scripts/{polyfills-7bd16772e3.min.js → polyfills-7cab3b27a6.min.js} +2 -2
  220. package/jest.config.js +11 -11
  221. package/package.json +60 -60
  222. package/typings/libs/CVEvents.d.ts +12 -12
  223. package/typings/libs/CVLanguages.d.ts +24 -24
  224. package/typings/libs/cloneDeep.d.ts +4 -4
  225. package/typings/libs/cookiesjs.d.ts +25 -25
  226. package/typings/libs/draft-convert.d.ts +3 -3
  227. package/typings/libs/google-api.d.ts +93 -93
  228. package/typings/libs/intersection-observer.d.ts +82 -82
  229. package/typings/libs/microsoft-teams.d.ts +2 -2
  230. package/typings/libs/react-table-config.d.ts +138 -138
  231. package/typings/libs/trackjs.d.ts +2 -2
  232. package/typings/libs/videojs-contrib-quality-levels.d.ts +28 -28
  233. package/typings/utils/imports.d.ts +13 -13
  234. package/dist/css/7506-lite-7a2414b78c.chunk.css +0 -2
  235. package/dist/scripts/1081-b8b0499d1f-lite.chunk.js +0 -1
  236. package/dist/scripts/1197-7a88489a7b-lite.chunk.js +0 -1
  237. package/dist/scripts/121-df5427ae82-lite.chunk.js +0 -1
  238. package/dist/scripts/1247-90b14f1e67-lite.chunk.js +0 -1
  239. package/dist/scripts/1276-c906943bd2-lite.chunk.js +0 -2
  240. package/dist/scripts/140-7a9c5d721f-lite.chunk.js +0 -1
  241. package/dist/scripts/1437-ddb316549a-lite.chunk.js +0 -1
  242. package/dist/scripts/1466-35e8964709-lite.chunk.js +0 -2
  243. package/dist/scripts/1617-e392fa036d-lite.chunk.js +0 -1
  244. package/dist/scripts/1672-74160832a8-lite.chunk.js +0 -2
  245. package/dist/scripts/1725-afe9c1c52a-lite.chunk.js +0 -1
  246. package/dist/scripts/1750-392a7ce984-lite.chunk.js +0 -1
  247. package/dist/scripts/1818-45a89c6fdf-lite.chunk.js +0 -1
  248. package/dist/scripts/1820-d958c2d7be-lite.chunk.js +0 -1
  249. package/dist/scripts/1857-4cf170856b-lite.chunk.js +0 -1
  250. package/dist/scripts/1891-421733c109-lite.chunk.js +0 -1
  251. package/dist/scripts/1895-0c967ec332-lite.chunk.js +0 -2
  252. package/dist/scripts/1905-2e999ec2fc-lite.chunk.js +0 -1
  253. package/dist/scripts/2118-104fa2c372-lite.chunk.js +0 -2
  254. package/dist/scripts/2235-17d38cbc78-lite.chunk.js +0 -1
  255. package/dist/scripts/2258-7be0bb5be4-lite.chunk.js +0 -1
  256. package/dist/scripts/2882-d0158d2376-lite.chunk.js +0 -1
  257. package/dist/scripts/298-cbf2afa399-lite.chunk.js +0 -1
  258. package/dist/scripts/2985-7ac9cb6d95-lite.chunk.js +0 -1
  259. package/dist/scripts/3012-a0fb81a113-lite.chunk.js +0 -1
  260. package/dist/scripts/3020-b9a55c1ce7-lite.chunk.js +0 -1
  261. package/dist/scripts/3042-df26d70c62-lite.chunk.js +0 -1
  262. package/dist/scripts/3081-108dff6034-lite.chunk.js +0 -2
  263. package/dist/scripts/3095-c647ba3436-lite.chunk.js +0 -2
  264. package/dist/scripts/3171-ce1cdce023-lite.chunk.js +0 -1
  265. package/dist/scripts/3216-31e78c8a37-lite.chunk.js +0 -1
  266. package/dist/scripts/3248-87ba43cb45-lite.chunk.js +0 -1
  267. package/dist/scripts/3468-e3772fffdc-lite.chunk.js +0 -1
  268. package/dist/scripts/3469-1bd50f9539-lite.chunk.js +0 -1
  269. package/dist/scripts/349-b13c1adbbb-lite.chunk.js +0 -1
  270. package/dist/scripts/3502-33d832cd64-lite.chunk.js +0 -1
  271. package/dist/scripts/355-f0d8123091-lite.chunk.js +0 -1
  272. package/dist/scripts/3567-3f972eb1f6-lite.chunk.js +0 -1
  273. package/dist/scripts/3602-e0583cdaf3-lite.chunk.js +0 -2
  274. package/dist/scripts/3645-faa5e4963c-lite.chunk.js +0 -2
  275. package/dist/scripts/3654-e4ce211ef5-lite.chunk.js +0 -1
  276. package/dist/scripts/3667-0ad1363288-lite.chunk.js +0 -2
  277. package/dist/scripts/3728-30979bda95-lite.chunk.js +0 -1
  278. package/dist/scripts/3801-d760952451-lite.chunk.js +0 -1
  279. package/dist/scripts/3836-cac33ce0fa-lite.chunk.js +0 -1
  280. package/dist/scripts/3841-ababd193b4-lite.chunk.js +0 -2
  281. package/dist/scripts/3848-3d23e7ebe9-lite.chunk.js +0 -1
  282. package/dist/scripts/389-bd048b09ed-lite.chunk.js +0 -1
  283. package/dist/scripts/3966-ff3550c17f-lite.chunk.js +0 -1
  284. package/dist/scripts/4077-b98cfd2b3d-lite.chunk.js +0 -1
  285. package/dist/scripts/4182-e162c4aa83-lite.chunk.js +0 -1
  286. package/dist/scripts/4343-b099355fb8-lite.chunk.js +0 -1
  287. package/dist/scripts/4393-f5ca3cd7cc-lite.chunk.js +0 -1
  288. package/dist/scripts/4436-02ef766975-lite.chunk.js +0 -1
  289. package/dist/scripts/4541-5eb06804a2-lite.chunk.js +0 -1
  290. package/dist/scripts/4608-e9173aefb6-lite.chunk.js +0 -1
  291. package/dist/scripts/4612-668b3947be-lite.chunk.js +0 -1
  292. package/dist/scripts/4632-adabe764af-lite.chunk.js +0 -1
  293. package/dist/scripts/4676-3b968e527e-lite.chunk.js +0 -2
  294. package/dist/scripts/4778-770cf1c70f-lite.chunk.js +0 -2
  295. package/dist/scripts/482-09e76ed3f8-lite.chunk.js +0 -1
  296. package/dist/scripts/4858-0dcad6d6b0-lite.chunk.js +0 -1
  297. package/dist/scripts/4942-036ec7661c-lite.chunk.js +0 -2
  298. package/dist/scripts/5009-9bdaf66444-lite.chunk.js +0 -2
  299. package/dist/scripts/5229-cb70d3a557-lite.chunk.js +0 -1
  300. package/dist/scripts/5268-fe232a976e-lite.chunk.js +0 -2
  301. package/dist/scripts/5341-b9b08c848d-lite.chunk.js +0 -1
  302. package/dist/scripts/537-083ca4cf35-lite.chunk.js +0 -2
  303. package/dist/scripts/5385-2d19a5cb12-lite.chunk.js +0 -1
  304. package/dist/scripts/5438-a51c81c8c1-lite.chunk.js +0 -1
  305. package/dist/scripts/5512-4498e5e270-lite.chunk.js +0 -2
  306. package/dist/scripts/5591-6c42c1db66-lite.chunk.js +0 -1
  307. package/dist/scripts/5595-c640391dca-lite.chunk.js +0 -1
  308. package/dist/scripts/5622-4ec48a03a5-lite.chunk.js +0 -2
  309. package/dist/scripts/5940-b82c66af95-lite.chunk.js +0 -1
  310. package/dist/scripts/5956-7591fc1665-lite.chunk.js +0 -1
  311. package/dist/scripts/6014-8b4d5ed71a-lite.chunk.js +0 -1
  312. package/dist/scripts/6086-119dd59a8c-lite.chunk.js +0 -2
  313. package/dist/scripts/6102-dc4cc7970e-lite.chunk.js +0 -2
  314. package/dist/scripts/615-47359245c1-lite.chunk.js +0 -1
  315. package/dist/scripts/6263-e200079fc1-lite.chunk.js +0 -1
  316. package/dist/scripts/6274-f850d775ba-lite.chunk.js +0 -1
  317. package/dist/scripts/6290-44e0fcacb1-lite.chunk.js +0 -1
  318. package/dist/scripts/6368-91546c0057-lite.chunk.js +0 -1
  319. package/dist/scripts/6433-2d6d2c0425-lite.chunk.js +0 -2
  320. package/dist/scripts/6465-3d023cd926-lite.chunk.js +0 -1
  321. package/dist/scripts/6489-d80d1f54e9-lite.chunk.js +0 -2
  322. package/dist/scripts/6532-ffb5c9cfad-lite.chunk.js +0 -1
  323. package/dist/scripts/6617-871ae46097-lite.chunk.js +0 -2
  324. package/dist/scripts/6689-503136d7fb-lite.chunk.js +0 -1
  325. package/dist/scripts/671-6ca8c3b017-lite.chunk.js +0 -1
  326. package/dist/scripts/6741-f123c02e16-lite.chunk.js +0 -2
  327. package/dist/scripts/6801-492372ca89-lite.chunk.js +0 -1
  328. package/dist/scripts/6823-4d9cec7108-lite.chunk.js +0 -2
  329. package/dist/scripts/6896-07e4c9237f-lite.chunk.js +0 -2
  330. package/dist/scripts/7017-68fd760191-lite.chunk.js +0 -2
  331. package/dist/scripts/7030-7143384a72-lite.chunk.js +0 -2
  332. package/dist/scripts/7052-ae6d1bd6b8-lite.chunk.js +0 -2
  333. package/dist/scripts/7112-8edf8c35c1-lite.chunk.js +0 -2
  334. package/dist/scripts/7117-59efcfef9b-lite.chunk.js +0 -1
  335. package/dist/scripts/7128-bfbf5bdcf9-lite.chunk.js +0 -1
  336. package/dist/scripts/7167-0c3b4dd5d9-lite.chunk.js +0 -1
  337. package/dist/scripts/7172-baf77c79b8-lite.chunk.js +0 -1
  338. package/dist/scripts/7178-b33f986d10-lite.chunk.js +0 -1
  339. package/dist/scripts/7221-f88ee657b5-lite.chunk.js +0 -2
  340. package/dist/scripts/7288-1890d3d440-lite.chunk.js +0 -1
  341. package/dist/scripts/7293-573251b2b3-lite.chunk.js +0 -1
  342. package/dist/scripts/7338-2be4393982-lite.chunk.js +0 -1
  343. package/dist/scripts/7385-3be9fca26f-lite.chunk.js +0 -2
  344. package/dist/scripts/7402-93086b41d0-lite.chunk.js +0 -2
  345. package/dist/scripts/7498-f52aa3fdd8-lite.chunk.js +0 -1
  346. package/dist/scripts/7506-a6178bc144-lite.chunk.js +0 -2
  347. package/dist/scripts/7670-e99e859abb-lite.chunk.js +0 -2
  348. package/dist/scripts/771-2c92e12e66-lite.chunk.js +0 -2
  349. package/dist/scripts/7715-929b4e2d3d-lite.chunk.js +0 -1
  350. package/dist/scripts/7726-2c99903817-lite.chunk.js +0 -1
  351. package/dist/scripts/7766-04d01167f3-lite.chunk.js +0 -1
  352. package/dist/scripts/7855-f84a0daeac-lite.chunk.js +0 -1
  353. package/dist/scripts/8025-32f7df46f8-lite.chunk.js +0 -1
  354. package/dist/scripts/8046-676d6a1499-lite.chunk.js +0 -1
  355. package/dist/scripts/8169-b3d5eb4956-lite.chunk.js +0 -2
  356. package/dist/scripts/8199-a8e14ce538-lite.chunk.js +0 -2
  357. package/dist/scripts/841-5a071d4f70-lite.chunk.js +0 -2
  358. package/dist/scripts/8581-b413f4bb93-lite.chunk.js +0 -1
  359. package/dist/scripts/8681-7f86d42bf9-lite.chunk.js +0 -2
  360. package/dist/scripts/8713-34e59e4d28-lite.chunk.js +0 -2
  361. package/dist/scripts/8759-38a1df6fa0-lite.chunk.js +0 -1
  362. package/dist/scripts/8830-887880a644-lite.chunk.js +0 -1
  363. package/dist/scripts/8935-661eae356d-lite.chunk.js +0 -2
  364. package/dist/scripts/9060-871125d2d8-lite.chunk.js +0 -1
  365. package/dist/scripts/9173-c1d7d055ee-lite.chunk.js +0 -2
  366. package/dist/scripts/9226-871971a670-lite.chunk.js +0 -1
  367. package/dist/scripts/9230-1ed255ad14-lite.chunk.js +0 -2
  368. package/dist/scripts/9242-253c1fa28f-lite.chunk.js +0 -1
  369. package/dist/scripts/9367-688c9cefc8-lite.chunk.js +0 -1
  370. package/dist/scripts/9371-e5956ba422-lite.chunk.js +0 -2
  371. package/dist/scripts/9428-839a0856b5-lite.chunk.js +0 -2
  372. package/dist/scripts/9433-d06ec92e01-lite.chunk.js +0 -1
  373. package/dist/scripts/9455-5696000911-lite.chunk.js +0 -1
  374. package/dist/scripts/9478-ddd8c3babb-lite.chunk.js +0 -2
  375. package/dist/scripts/9484-77682fd423-lite.chunk.js +0 -2
  376. package/dist/scripts/9557-498a86c785-lite.chunk.js +0 -1
  377. package/dist/scripts/9674-69063b67e5-lite.chunk.js +0 -1
  378. package/dist/scripts/9719-cc41b3c3b4-lite.chunk.js +0 -2
  379. package/dist/scripts/9758-a214b79f78-lite.chunk.js +0 -1
  380. package/dist/scripts/98-281be91b0d-lite.chunk.js +0 -1
  381. package/dist/scripts/9843-667a3d1766-lite.chunk.js +0 -1
  382. package/dist/scripts/9894-349903429e-lite.chunk.js +0 -2
  383. package/dist/scripts/9918-f80e4820dc-lite.chunk.js +0 -2
  384. package/dist/scripts/9931-d0df42247b-lite.chunk.js +0 -2
  385. package/dist/scripts/9931-d0df42247b-lite.chunk.js.LICENSE.txt +0 -1
  386. package/dist/scripts/bundle-6da55decf3.min.js +0 -2
  387. package/dist/scripts/polyfills-7bd16772e3.min.js.LICENSE.txt +0 -1
  388. /package/dist/css/{3645-lite-f1f1b748f7.chunk.css → 360-lite-f1f1b748f7.chunk.css} +0 -0
  389. /package/dist/css/{9758-lite-759fd29ff7.chunk.css → 4554-lite-759fd29ff7.chunk.css} +0 -0
  390. /package/dist/css/{3502-lite-4fa7c55b22.chunk.css → 6370-lite-4fa7c55b22.chunk.css} +0 -0
  391. /package/dist/scripts/{1276-c906943bd2-lite.chunk.js.LICENSE.txt → 1276-3649cb6030-lite.chunk.js.LICENSE.txt} +0 -0
  392. /package/dist/scripts/{1291-8def9e835a-lite.chunk.js → 1291-c91f6259b4-lite.chunk.js} +0 -0
  393. /package/dist/scripts/{1466-35e8964709-lite.chunk.js.LICENSE.txt → 1466-1e609d0f2d-lite.chunk.js.LICENSE.txt} +0 -0
  394. /package/dist/scripts/{1628-bc05035aef-lite.chunk.js → 1628-929aac77bd-lite.chunk.js} +0 -0
  395. /package/dist/scripts/{1672-74160832a8-lite.chunk.js.LICENSE.txt → 1672-3aee4ad2e0-lite.chunk.js.LICENSE.txt} +0 -0
  396. /package/dist/scripts/{170-eb63a71b72-lite.chunk.js.LICENSE.txt → 170-72e998fdba-lite.chunk.js.LICENSE.txt} +0 -0
  397. /package/dist/scripts/{1726-024ce46cd7-lite.chunk.js → 1726-65dd114ac5-lite.chunk.js} +0 -0
  398. /package/dist/scripts/{1798-9632d96ebf-lite.chunk.js → 1798-93ce8a7003-lite.chunk.js} +0 -0
  399. /package/dist/scripts/{1895-0c967ec332-lite.chunk.js.LICENSE.txt → 1895-d2546a0cd3-lite.chunk.js.LICENSE.txt} +0 -0
  400. /package/dist/scripts/{2118-104fa2c372-lite.chunk.js.LICENSE.txt → 2118-dd0d1852f0-lite.chunk.js.LICENSE.txt} +0 -0
  401. /package/dist/scripts/{2137-e96bd8168c-lite.chunk.js → 2137-006f32827a-lite.chunk.js} +0 -0
  402. /package/dist/scripts/{2229-0d299dd9bc-lite.chunk.js → 2229-ea1ec1fab3-lite.chunk.js} +0 -0
  403. /package/dist/scripts/{227-9c9dd02250-lite.chunk.js → 227-8353fbed4f-lite.chunk.js} +0 -0
  404. /package/dist/scripts/{2318-df68864976-lite.chunk.js → 2318-65a3456f40-lite.chunk.js} +0 -0
  405. /package/dist/scripts/{2452-c3f02e89b5-lite.chunk.js → 2452-54c1403617-lite.chunk.js} +0 -0
  406. /package/dist/scripts/{2561-3a98d17f30-lite.chunk.js → 2561-dea7e8d20a-lite.chunk.js} +0 -0
  407. /package/dist/scripts/{2665-e2ae12f9a5-lite.chunk.js → 2665-f93d7e24b1-lite.chunk.js} +0 -0
  408. /package/dist/scripts/{3079-a2da074bd0-lite.chunk.js → 3079-5e15985c8e-lite.chunk.js} +0 -0
  409. /package/dist/scripts/{3081-108dff6034-lite.chunk.js.LICENSE.txt → 3081-b55baaca7c-lite.chunk.js.LICENSE.txt} +0 -0
  410. /package/dist/scripts/{3095-c647ba3436-lite.chunk.js.LICENSE.txt → 3095-8ec332ba2b-lite.chunk.js.LICENSE.txt} +0 -0
  411. /package/dist/scripts/{3297-9c7672bad2-lite.chunk.js → 3297-22cfd8201a-lite.chunk.js} +0 -0
  412. /package/dist/scripts/{3394-d2ac0ab5f9-lite.chunk.js → 3394-6fdbd5d887-lite.chunk.js} +0 -0
  413. /package/dist/scripts/{3528-25d8b829df-lite.chunk.js → 3528-f80f824d13-lite.chunk.js} +0 -0
  414. /package/dist/scripts/{3602-e0583cdaf3-lite.chunk.js.LICENSE.txt → 360-a6e2e997f5-lite.chunk.js.LICENSE.txt} +0 -0
  415. /package/dist/scripts/{3645-faa5e4963c-lite.chunk.js.LICENSE.txt → 3602-903eb1cd1e-lite.chunk.js.LICENSE.txt} +0 -0
  416. /package/dist/scripts/{3626-c0e69af2a9-lite.chunk.js → 3626-2170936b96-lite.chunk.js} +0 -0
  417. /package/dist/scripts/{3667-0ad1363288-lite.chunk.js.LICENSE.txt → 3667-09226e6369-lite.chunk.js.LICENSE.txt} +0 -0
  418. /package/dist/scripts/{3695-b2b273bc77-lite.chunk.js → 3695-6402bb7a97-lite.chunk.js} +0 -0
  419. /package/dist/scripts/{3841-ababd193b4-lite.chunk.js.LICENSE.txt → 3841-539aa9573e-lite.chunk.js.LICENSE.txt} +0 -0
  420. /package/dist/scripts/{4676-3b968e527e-lite.chunk.js.LICENSE.txt → 3867-2626e2cf7c-lite.chunk.js.LICENSE.txt} +0 -0
  421. /package/dist/scripts/{3973-0951538606-lite.chunk.js → 3973-1ef41d2684-lite.chunk.js} +0 -0
  422. /package/dist/scripts/{4778-770cf1c70f-lite.chunk.js.LICENSE.txt → 4676-beb0d246a2-lite.chunk.js.LICENSE.txt} +0 -0
  423. /package/dist/scripts/{4942-036ec7661c-lite.chunk.js.LICENSE.txt → 4778-2d3bc4ef53-lite.chunk.js.LICENSE.txt} +0 -0
  424. /package/dist/scripts/{4893-5407310607-lite.chunk.js → 4893-1b48182ef4-lite.chunk.js} +0 -0
  425. /package/dist/scripts/{5009-9bdaf66444-lite.chunk.js.LICENSE.txt → 4942-4900decb33-lite.chunk.js.LICENSE.txt} +0 -0
  426. /package/dist/scripts/{5236-5ac333cb67-lite.chunk.js.LICENSE.txt → 5009-e742b3b11e-lite.chunk.js.LICENSE.txt} +0 -0
  427. /package/dist/scripts/{5268-fe232a976e-lite.chunk.js.LICENSE.txt → 5236-5668fcb6e1-lite.chunk.js.LICENSE.txt} +0 -0
  428. /package/dist/scripts/{537-083ca4cf35-lite.chunk.js.LICENSE.txt → 5268-5d30359c44-lite.chunk.js.LICENSE.txt} +0 -0
  429. /package/dist/scripts/{5305-2dc78005b4-lite.chunk.js → 5305-4638fd3450-lite.chunk.js} +0 -0
  430. /package/dist/scripts/{5512-4498e5e270-lite.chunk.js.LICENSE.txt → 537-546b4eb266-lite.chunk.js.LICENSE.txt} +0 -0
  431. /package/dist/scripts/{5622-4ec48a03a5-lite.chunk.js.LICENSE.txt → 5512-254e4101b7-lite.chunk.js.LICENSE.txt} +0 -0
  432. /package/dist/scripts/{5606-be4ef0812e-lite.chunk.js → 5606-7094ae7183-lite.chunk.js} +0 -0
  433. /package/dist/scripts/{6086-119dd59a8c-lite.chunk.js.LICENSE.txt → 5622-679a8d7288-lite.chunk.js.LICENSE.txt} +0 -0
  434. /package/dist/scripts/{5914-3a74bfbc81-lite.chunk.js → 5914-597eceb270-lite.chunk.js} +0 -0
  435. /package/dist/scripts/{5974-669721475e-lite.chunk.js → 5974-b86c9629c9-lite.chunk.js} +0 -0
  436. /package/dist/scripts/{6102-dc4cc7970e-lite.chunk.js.LICENSE.txt → 6086-6e1cd58ace-lite.chunk.js.LICENSE.txt} +0 -0
  437. /package/dist/scripts/{6433-2d6d2c0425-lite.chunk.js.LICENSE.txt → 6102-ae346e08c2-lite.chunk.js.LICENSE.txt} +0 -0
  438. /package/dist/scripts/{6158-ec9bb7f6cc-lite.chunk.js → 6158-48a151e5b5-lite.chunk.js} +0 -0
  439. /package/dist/scripts/{6489-d80d1f54e9-lite.chunk.js.LICENSE.txt → 6433-355f54088c-lite.chunk.js.LICENSE.txt} +0 -0
  440. /package/dist/scripts/{6480-6a7f18b224-lite.chunk.js → 6480-b4a37ff320-lite.chunk.js} +0 -0
  441. /package/dist/scripts/{6617-871ae46097-lite.chunk.js.LICENSE.txt → 6489-4d22ec2409-lite.chunk.js.LICENSE.txt} +0 -0
  442. /package/dist/scripts/{6604-cd37d51825-lite.chunk.js → 6604-4476f46bc6-lite.chunk.js} +0 -0
  443. /package/dist/scripts/{6741-f123c02e16-lite.chunk.js.LICENSE.txt → 6617-60a05d215d-lite.chunk.js.LICENSE.txt} +0 -0
  444. /package/dist/scripts/{6896-07e4c9237f-lite.chunk.js.LICENSE.txt → 6741-4ded0ca496-lite.chunk.js.LICENSE.txt} +0 -0
  445. /package/dist/scripts/{6746-564a293b71-lite.chunk.js → 6746-7193d451c6-lite.chunk.js} +0 -0
  446. /package/dist/scripts/{6817-22846bcb3f-lite.chunk.js → 6817-e7455761fe-lite.chunk.js} +0 -0
  447. /package/dist/scripts/{6823-4d9cec7108-lite.chunk.js.LICENSE.txt → 6823-0c0e463dc4-lite.chunk.js.LICENSE.txt} +0 -0
  448. /package/dist/scripts/{6863-ff80d60966-lite.chunk.js → 6863-41d98d9001-lite.chunk.js} +0 -0
  449. /package/dist/scripts/{6873-205f6fffc7-lite.chunk.js → 6873-25ef21a555-lite.chunk.js} +0 -0
  450. /package/dist/scripts/{7017-68fd760191-lite.chunk.js.LICENSE.txt → 6896-a3d38ae7a4-lite.chunk.js.LICENSE.txt} +0 -0
  451. /package/dist/scripts/{7030-7143384a72-lite.chunk.js.LICENSE.txt → 7017-1c686d77cb-lite.chunk.js.LICENSE.txt} +0 -0
  452. /package/dist/scripts/{7052-ae6d1bd6b8-lite.chunk.js.LICENSE.txt → 7030-c786d4e8ec-lite.chunk.js.LICENSE.txt} +0 -0
  453. /package/dist/scripts/{7045-68a587f133-lite.chunk.js → 7045-9aafbfa9c1-lite.chunk.js} +0 -0
  454. /package/dist/scripts/{7112-8edf8c35c1-lite.chunk.js.LICENSE.txt → 7052-8b6c726a6a-lite.chunk.js.LICENSE.txt} +0 -0
  455. /package/dist/scripts/{7221-f88ee657b5-lite.chunk.js.LICENSE.txt → 7112-5be394a047-lite.chunk.js.LICENSE.txt} +0 -0
  456. /package/dist/scripts/{7115-11f35fb0cc-lite.chunk.js → 7115-ae58b946c3-lite.chunk.js} +0 -0
  457. /package/dist/scripts/{714-fa342f12c2-lite.chunk.js → 714-8703be85ac-lite.chunk.js} +0 -0
  458. /package/dist/scripts/{7385-3be9fca26f-lite.chunk.js.LICENSE.txt → 7221-fc696d1984-lite.chunk.js.LICENSE.txt} +0 -0
  459. /package/dist/scripts/{7240-e030f5a919-lite.chunk.js → 7240-e5b2324ba0-lite.chunk.js} +0 -0
  460. /package/dist/scripts/{7402-93086b41d0-lite.chunk.js.LICENSE.txt → 7385-8472652f32-lite.chunk.js.LICENSE.txt} +0 -0
  461. /package/dist/scripts/{7506-a6178bc144-lite.chunk.js.LICENSE.txt → 7402-88ffc2535a-lite.chunk.js.LICENSE.txt} +0 -0
  462. /package/dist/scripts/{7422-2208e65ac7-lite.chunk.js.LICENSE.txt → 7422-6474c1c476-lite.chunk.js.LICENSE.txt} +0 -0
  463. /package/dist/scripts/{7670-e99e859abb-lite.chunk.js.LICENSE.txt → 7670-9684a40bb3-lite.chunk.js.LICENSE.txt} +0 -0
  464. /package/dist/scripts/{7708-3df315466d-lite.chunk.js → 7708-5c73a1b08d-lite.chunk.js} +0 -0
  465. /package/dist/scripts/{771-2c92e12e66-lite.chunk.js.LICENSE.txt → 771-2a50f4b492-lite.chunk.js.LICENSE.txt} +0 -0
  466. /package/dist/scripts/{7818-eea54a36c5-lite.chunk.js → 7818-5186bb89d3-lite.chunk.js} +0 -0
  467. /package/dist/scripts/{8034-4d9e38c193-lite.chunk.js → 8034-f19be390c5-lite.chunk.js} +0 -0
  468. /package/dist/scripts/{8169-b3d5eb4956-lite.chunk.js.LICENSE.txt → 8199-04230d108d-lite.chunk.js.LICENSE.txt} +0 -0
  469. /package/dist/scripts/{823-ccc72730ae-lite.chunk.js → 823-674a667315-lite.chunk.js} +0 -0
  470. /package/dist/scripts/{8252-e33607165b-lite.chunk.js → 8252-a446b8d912-lite.chunk.js} +0 -0
  471. /package/dist/scripts/{8199-a8e14ce538-lite.chunk.js.LICENSE.txt → 8323-a1dff86e20-lite.chunk.js.LICENSE.txt} +0 -0
  472. /package/dist/scripts/{8383-5df9f9cf8e-lite.chunk.js → 8383-a42af50992-lite.chunk.js} +0 -0
  473. /package/dist/scripts/{8323-b7d1f85ed9-lite.chunk.js.LICENSE.txt → 841-204e8dffbc-lite.chunk.js.LICENSE.txt} +0 -0
  474. /package/dist/scripts/{8419-2e398347c7-lite.chunk.js → 8419-371ef33b33-lite.chunk.js} +0 -0
  475. /package/dist/scripts/{841-5a071d4f70-lite.chunk.js.LICENSE.txt → 8681-fd629972e5-lite.chunk.js.LICENSE.txt} +0 -0
  476. /package/dist/scripts/{872-267c9bfa92-lite.chunk.js → 872-9040afaac3-lite.chunk.js} +0 -0
  477. /package/dist/scripts/{8681-7f86d42bf9-lite.chunk.js.LICENSE.txt → 8935-ba43b3d0dd-lite.chunk.js.LICENSE.txt} +0 -0
  478. /package/dist/scripts/{8955-8867b61cb7-lite.chunk.js → 8955-e5be10f3da-lite.chunk.js} +0 -0
  479. /package/dist/scripts/{8982-bc5868838b-lite.chunk.js → 8982-f4ad46f2ea-lite.chunk.js} +0 -0
  480. /package/dist/scripts/{9005-48698fd295-lite.chunk.js → 9005-5dff89581f-lite.chunk.js} +0 -0
  481. /package/dist/scripts/{9038-4e18bcff89-lite.chunk.js → 9038-9a586e7721-lite.chunk.js} +0 -0
  482. /package/dist/scripts/{9151-dcdf87c38a-lite.chunk.js → 9151-a1039ec095-lite.chunk.js} +0 -0
  483. /package/dist/scripts/{8713-34e59e4d28-lite.chunk.js.LICENSE.txt → 9173-33a8c5c0ba-lite.chunk.js.LICENSE.txt} +0 -0
  484. /package/dist/scripts/{8935-661eae356d-lite.chunk.js.LICENSE.txt → 9230-bea3f74253-lite.chunk.js.LICENSE.txt} +0 -0
  485. /package/dist/scripts/{9273-6934e07ad6-lite.chunk.js → 9273-8c48c409f1-lite.chunk.js} +0 -0
  486. /package/dist/scripts/{9173-c1d7d055ee-lite.chunk.js.LICENSE.txt → 9371-adcc457db4-lite.chunk.js.LICENSE.txt} +0 -0
  487. /package/dist/scripts/{9230-1ed255ad14-lite.chunk.js.LICENSE.txt → 9428-02847e469a-lite.chunk.js.LICENSE.txt} +0 -0
  488. /package/dist/scripts/{9371-e5956ba422-lite.chunk.js.LICENSE.txt → 9478-7cd9d681d8-lite.chunk.js.LICENSE.txt} +0 -0
  489. /package/dist/scripts/{9428-839a0856b5-lite.chunk.js.LICENSE.txt → 9484-5a77c57259-lite.chunk.js.LICENSE.txt} +0 -0
  490. /package/dist/scripts/{9614-ec3cb03fe8-lite.chunk.js → 9614-bf0f0be467-lite.chunk.js} +0 -0
  491. /package/dist/scripts/{9478-ddd8c3babb-lite.chunk.js.LICENSE.txt → 9719-d0ad006c61-lite.chunk.js.LICENSE.txt} +0 -0
  492. /package/dist/scripts/{9880-1e82cec7c6-lite.chunk.js → 9880-465f4dab26-lite.chunk.js} +0 -0
  493. /package/dist/scripts/{9484-77682fd423-lite.chunk.js.LICENSE.txt → 9894-3628ac93b9-lite.chunk.js.LICENSE.txt} +0 -0
  494. /package/dist/scripts/{9719-cc41b3c3b4-lite.chunk.js.LICENSE.txt → 9918-eb167d3142-lite.chunk.js.LICENSE.txt} +0 -0
  495. /package/dist/scripts/{9894-349903429e-lite.chunk.js.LICENSE.txt → 9931-abf79a99fb-lite.chunk.js.LICENSE.txt} +0 -0
  496. /package/dist/scripts/{bundle-6da55decf3.min.js.LICENSE.txt → bundle-a583c5a840.min.js.LICENSE.txt} +0 -0
  497. /package/dist/scripts/{9918-f80e4820dc-lite.chunk.js.LICENSE.txt → polyfills-7cab3b27a6.min.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3728],{49935:(e,a,t)=>{t.d(a,{Oo:()=>d,b2:()=>m});var n=t(32735),c=t(36848),r=t(86764),i=t(3747),o=t(5859),l=t(35223),s=t(83914),u=function(e){var a=e.breadcrumb,t=a.name,r=a.appLink,i=a.active,o=e.withBackIcon;return n.createElement("li",{className:"breadcrumb-item".concat(i?" active":"")},i?n.createElement("strong",null,t):n.createElement(c.F,{appLink:r},o&&n.createElement(s.x,{svgName:l.vn.ChevronLeft,size:s.S.Small}),n.createElement("span",{className:o?"ms-2":""},t)))},d=function(e){var a=e.breadcrumbs,t=(0,i.a)(r.r.XS),c=null==a?void 0:a.length;return!c||t&&c<2?n.createElement(n.Fragment,null):t?n.createElement("nav",{"aria-label":"breadcrumb"},n.createElement("ol",{className:"breadcrumb m-0 p-0"},n.createElement(u,{breadcrumb:a[c-2],withBackIcon:!0}))):n.createElement("nav",{"aria-label":"breadcrumb"},n.createElement("ol",{className:"breadcrumb m-0 p-0"},a.map((function(e,a){return n.createElement(u,{key:a,breadcrumb:e})}))))},m=n.memo((function(e){var a=e.numItems,t=void 0===a?3:a;return(0,i.a)(r.r.XS)?n.createElement("div",{className:"partial-loading-background",style:{height:"1.3125rem",width:"6rem"}}):n.createElement("nav",{"aria-label":"breadcrumb"},n.createElement("ol",{className:"breadcrumb m-0 p-0"},o.u.getPartialLoadingItems({numItems:t}).map((function(e,a){var t=e.width;return n.createElement("li",{key:a,className:"breadcrumb-item"},n.createElement("span",{className:"d-inline-block partial-loading-background",style:{width:t},dangerouslySetInnerHTML:{__html:"&nbsp"}}))}))))}))},5859:(e,a,t)=>{function n(e,a){(null==a||a>e.length)&&(a=e.length);for(var t=0,n=new Array(a);t<a;t++)n[t]=e[t];return n}t.d(a,{u:()=>r});var c={numItems:5,minWidth:50,maxWidth:100},r={getPartialLoadingItems:function(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign(Object.assign({},c),a);return(e=Array(t.numItems),function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,a){if(e){if("string"==typeof e)return n(e,a);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?n(e,a):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.")}()).map((function(){return{width:"".concat(Math.max(Math.floor(Math.random()*t.maxWidth),t.minWidth),"px")}}))}}},20342:(e,a,t)=>{t.d(a,{W:()=>E});var n=t(32735),c=t(82602),r=t(23481),i=t(36848),o=t(83345),l=t(76177),s=t(99742),u=t(14070),d=t(97291),m=t(19577);const v={status:"NXBdA"};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 f(e,a,t){var n;return n=function(e,a){if("object"!=p(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(a),(a="symbol"==p(n)?n:n+"")in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}var h="0001-01-01T00:00:00Z",b="settings.localCacheItem",y=r.T.encloseNamespace(b),g=f(f(f({},m._.Inactive,"offline"),m._.Active,"online"),m._.Updating,"updating");function k(e,a){return a===m._.Active?y("justNow"):e&&e!==h?(0,c.WU)(e):y("never")}function E(e){var a=e.localCache,t=e.canManage,c=e.minimal,r=a.status,p=a.deviceName,f=a.deviceId,h=a.lastSeen,E=r===m._.Inactive?s.W.LocalCache.OFFLINE:s.W.LocalCache.ONLINE,w=r===m._.Active?"bg-green":"bg-gray";return n.createElement("div",{className:"border rounded text-center ".concat(c?"py-3":"")},!c&&n.createElement("div",{className:"my-2 overflow-hidden"},n.createElement("h2",{className:"h6 text-truncate"},p)),n.createElement("img",{src:E,className:"img-fluid"}),n.createElement("div",{className:"pt-2 align-middle"},n.createElement("span",{className:"".concat(v.status," ").concat(w," d-inline-block rounded-circle align-middle me-1")}),n.createElement("span",{className:"align-middle"},n.createElement(l.u,{spanHack:!0,title:y("lastSeen",{time:k(h,r)}),spanHackClassName:""},n.createElement(o.x,{namespace:b,phrase:g[r]})))),!c&&(t?n.createElement(i.F,{appLink:{application:d.O.SETTINGS,action:u.e.Settings.LOCAL_CACHE,args:[f]},className:"btn btn-link text-info mb-1"},n.createElement(o.x,{namespace:b,phrase:"canManage"})):n.createElement("div",{className:"btn text-muted text-muted mb-1"},n.createElement(o.x,{namespace:b,phrase:"cantManage"}))))}},19577:(e,a,t)=>{var n;t.d(a,{_:()=>n}),function(e){e[e.Inactive=0]="Inactive",e[e.Active=1]="Active",e[e.Updating=2]="Updating"}(n||(n={}))},17923:(e,a,t)=>{t.d(a,{q:()=>o});var n=t(99940),c=t(97395),r=t(71995),i={namespace:"localcache",idAttribute:"deviceId"},o={devices:function(){return{url:"/api/localcache/v1/customers/devices",key:"localcache:devices",normalizeOptions:i}},device:function(e){return{url:"/api/localcache/v1/devices/".concat(e),key:"localcache:devices:".concat(e),normalizeOptions:i}},updateDevice:function(e,a,t,c,r){return{url:"/api/localcache/v1/devices/".concat(e),key:"localcache:devices:update",type:n.k.PUT,data:a,normalizeOptions:i,success:t,error:c,always:r}},deleteDevice:function(e,a,t,c){return{url:"/api/localcache/v1/devices/".concat(e),key:"localcache:devices:delete",type:n.k.DELETE,normalizeOptions:i,success:a,error:t,always:c}},updates:function(e){return{url:"/api/localcache/v1/devices/".concat(e,"/update"),key:"localcache:devices:".concat(e,":updates"),normalize:!1}},deviceUpdate:function(e){return{url:"/api/localcache/v1/devices/".concat(e,"/deviceupdate"),key:"localcache:devices:".concat(e,":deviceupdate"),normalize:!1}},update:function(e,a){return{url:"/api/localcache/v1/devices/".concat(e,"/update"),key:"localcache:update",type:n.k.POST,data:{versionString:a},normalize:!1,invalidationKeys:["localcache"]}},stats:function(e){var a={bytesDownloaded:"httpprovider.bytes_downloaded",bytesRead:"store.bytes_read",storageFree:"store.storage_free",storageUsed:"store.storage_used",count:"store.objects"},t={key:Object.values(a)};return{url:c._.urlBuilder("/api/localcache/v1/devices/".concat(e,"/stats/latest"),t),key:"localcache:devices:".concat(e,":stats"),normalize:!1,formatData:function(e){if(!e)return{};var t=e.reduce((function(e,a){return e[a.key]=a.value,e}),{});return Object.keys(a).reduce((function(e,n){return e[n]=t[a[n]],e}),{})}}},channels:function(e){return{url:"/api/localcache/v1/devices/".concat(e,"/channels"),key:"localcache:devices:".concat(e,":channels"),normalize:!1}},config:function(e){return{url:"/api/localcache/v1/configs/devices/".concat(e),key:"localcache:devices:".concat(e,":config"),normalize:!1,formatData:function(e){return null==e?void 0:e.configuration}}},updateConfig:function(e,a,t,c){var r={downloadQuality:a.downloadQuality,autoUpdate:a.autoUpdate,downloadTime:{start:a.downloadStartTime,end:a.downloadEndTime}};return{url:"/api/localcache/v1/configs/devices/".concat(e),key:"localcache:update:config",type:n.k.PUT,data:r,invalidationKeys:["localcache:devices:".concat(e,":config")],normalize:!1,success:t,error:c}},address:function(e){return{url:"/api/localcache/v1/devices/".concat(e,"/address"),key:"localcache:devices:".concat(e,":address"),normalize:!1}},ping:function(e,a){return{url:"".concat(a,"/ping"),key:"localcache:devices:".concat(e,":ping"),normalize:!1,cacheDuration:r.f.SHORT}}}},82602:(e,a,t)=>{t.d(a,{WU:()=>s});var n=["second","minute","hour","day","week","month","year"],c=["秒","分钟","小时","天","周","个月","年"],r={},i=function(e,a){r[e]=a},o=[60,60,24,7,365/7/12,12];function l(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}var s=function(e,a,t){var n=function(e,a){return(+(a?l(a):new Date)-+l(e))/1e3}(e,t&&t.relativeDate);return function(e,a){for(var t=e<0?1:0,n=e=Math.abs(e),c=0;e>=o[c]&&c<o.length;c++)e/=o[c];return(e=Math.floor(e))>(0==(c*=2)?9:1)&&(c+=1),a(e,c,n)[t].replace("%s",e.toString())}(n,function(e){return r[e]||r.en_US}(a))};i("en_US",(function(e,a){if(0===a)return["just now","right now"];var t=n[Math.floor(a/2)];return e>1&&(t+="s"),[e+" "+t+" ago","in "+e+" "+t]})),i("zh_CN",(function(e,a){if(0===a)return["刚刚","片刻后"];var t=c[~~(a/2)];return[e+" "+t+"前",e+" "+t+"后"]}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3801],{41021:(e,t,a)=>{a.r(t),a.d(t,{PlaySharedClipView:()=>T});var i=a(32735),n=a(20354),r=a(65858),c=a(16714),o=a(43012),l=a(39151),s=a(1666),d=a(28907),u=a(31949),p=a(1575),m=a(27995),v=a(22902),h=a(15311),g=a(79612),y=a(76753),f=a(56871),I=a(7179),E=a(49948),C=a(36873),A=a(27638),P=a(44110),V=a(35014),b=a(97816);function T(e){var t,a,T,k,w,x,S,L=(0,h.r)().hasProduct,N=(0,A.u)(r.LZ.VideoThumbnail),O=N.setFavourite,F=N.canFavourite,U=(0,v.T)().hasPermissions,R=n.a.useBasicFetch(u.N.currentUser()),q=n.a.useBasicFetch(l.L.config()),_=n.a.useBasicFetch(o.e.sharedClip(e.objectId,e.shareId)),M=n.a.useBasicFetch(!!(null===(t=_.data)||void 0===t?void 0:t._parentVideo)&&p.R.video(_.data._parentVideo.id)),G=(0,C.k)({video:M.data,context:e.queryParams.context,contextId:e.queryParams.contextId,moviesAndTv:e.queryParams.mtv,currentUser:R.data}),j=(0,P.i)(),B=n.a.useBasicFetch((null===(a=R.data)||void 0===a?void 0:a.isAuthenticated)&&s.h.yearGroups(R.data.customerId)),D=(0,E.l)(e.objectId),W=n.a.useBasicFetch((null===(k=null===(T=_.data)||void 0===T?void 0:T.glance)||void 0===k?void 0:k.theme)?d.r.themeImages(_.data.glance.theme,_.data.glance.type):null),H=U(c.C.ViewVideoGlance)&&(null===(x=null===(w=_.data)||void 0===w?void 0:w.glance)||void 0===x?void 0:x.theme),z=(0,V.I)();return(0,g.M)(y.CG.getClipMetadata({content:_.data})),(0,b.V)(null!==(S=G.videos)&&void 0!==S?S:[],{hasCurriculumLinks:!0}),(0,m.b)(_),(0,I.P)({id:e.objectId,app:"clips",shareId:e.shareId}),_.data&&R.hasCompleted&&q.hasCompleted&&D.hasCompleted?i.createElement(f.N,{shareId:e.shareId,clip:_.data,originalVideo:M.data,currentUser:R.data,yearGroups:B.data,relatedVideos:G,canFavourite:F,setFavourite:O,hasProduct:L,queryParams:e.queryParams,audiences:j.data,imageCdnUrl:q.data.imageCdnUrl,canManageVideoAccess:U(c.C.ManageVideoAccess),glanceTheme:W.data,glanceLoaded:!H||W.hasCompleted,pointsOfInterest:null==D?void 0:D.items,featureAccess:z}):i.createElement(i.Fragment,null)}},56871:(e,t,a)=>{a.d(t,{N:()=>B});var i=a(32735),n=a(23481),r=a(28400),c=a(65858),o=a(83345),l=a(19670),s=a(32614),d=a(4632),u=a(11518),p=a(15446),m=a(47862),v=a(26733),h=a(10439),g=a(35429),y=a(51365),f=a(4594),I=a(16714),E=a(12754),C=a(58704),A=a(22902),P=a(67753),V=a(31908),b=a(26492),T=a(57654),k=a(99092),w=a(47938),x=a(81024),S=a(78166),L=a(99719),N=a(42571),O=a(99742),F=a(14070),U=a(97291),R=a(2383),q=a(10741);function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}var M=function(e,t,a){return function(i){return a?{application:U.O.VIDEOS,action:F.e.Videos.PREVIEW_PDF,args:[i.id],params:{videoId:e,shareId:t}}:{application:U.O.SIGN_UP,action:F.e.SignUp.SIGN_UP}}},G="shared.playClip",j=n.T.encloseNamespace(G);function B(e){var t,a,n,B,D,W,H,z,Q,Y,Z,K,X,$,J,ee,te,ae=(0,g.g)(),ie=(0,A.T)().hasPermissions,ne=V.M.getCanBeConsumed(e.clip).canConsume,re=(0,R._)(R.i.VideoItem),ce=V.M.isVideoTypeArchived(e.clip),oe=ie(I.C.StudentExperience),le=i.useRef(!1),se=(0,s.Wp)(e.clip,e.glanceTheme)&&e.featureAccess.canViewGlance,de=(ee=i.useState({view:"loading",referrer:null}),te=2,function(e){if(Array.isArray(e))return e}(ee)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i,n,r,c,o=[],l=!0,s=!1;try{if(r=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;l=!1}else for(;!(l=(i=r.call(a)).done)&&(o.push(i.value),o.length!==t);l=!0);}catch(e){s=!0,n=e}finally{try{if(!l&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(s)throw n}}return o}}(ee,te)||function(e,t){if(e){if("string"==typeof e)return _(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_(e,t):void 0}}(ee,te)||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.")}()),ue=de[0],pe=de[1];function me(){var t;return!(null===(t=e.currentUser)||void 0===t?void 0:t.isAuthenticated)||!e.hasProduct(E.x.Primary)||!!oe}i.useEffect((function(){e.glanceLoaded&&pe({view:e.glanceTheme?"v@g":"details",referrer:null})}),[e.glanceLoaded,e.glanceTheme]);var ve=e.originalVideo&&!me()&&!!(null===(t=e.clip._canBeConsumed)||void 0===t?void 0:t.value),he="picture-in-picture"===ae.mode||e.featureAccess.canViewPublicLayout,ge=(0,k.jh)(e.clip,oe),ye=null!==(D=null===(B=null===(n=null===(a=e.originalVideo)||void 0===a?void 0:a.clips)||void 0===n?void 0:n.data)||void 0===B?void 0:B.filter((function(t){return t.id.toString()!==e.clip.id.toString()})))&&void 0!==D?D:[];return i.createElement("div",{className:"px-4"},i.createElement(w.W,{restrictions:e.clip._restrictions,yearGroups:e.yearGroups,objectId:e.clip.id,objectTypeId:f.E.Clip,canManageVideoAccess:e.canManageVideoAccess}),ce&&i.createElement(b.T,{typeId:e.clip.typeId,hasStudentExperience:oe}),i.createElement("section",{className:"mb-2"},ne&&i.createElement(h.r,{key:e.clip.id,objectId:e.clip.id,objectTypeId:e.clip.typeId,shareId:e.shareId,context:null===(W=e.queryParams)||void 0===W?void 0:W.context,contextId:null===(H=e.queryParams)||void 0===H?void 0:H.contextId,moviesAndTv:null===(z=e.queryParams)||void 0===z?void 0:z.mtv,playNext:null===(Q=e.queryParams)||void 0===Q?void 0:Q.playNext,startTime:null!==(Z=null===(Y=e.queryParams)||void 0===Y?void 0:Y.t)&&void 0!==Z?Z:null===(K=e.queryParams)||void 0===K?void 0:K.startTime,mode:"default",location:"play-page"}),i.createElement("div",{className:he?"":"d-none"},i.createElement(x.S,{video:e.clip,type:"pip"}))),i.createElement(T.v,{media:e.clip,yearGroups:e.yearGroups,audiences:e.audiences,originalVideoAppLink:ve?{application:U.O.VIDEOS,action:F.e.Videos.PLAY_VIDEO,args:[e.originalVideo.id,r.m.slugify(e.originalVideo.name)]}:null,featureAccess:e.featureAccess}),i.createElement("section",{className:"".concat("v@g"===ue.view?"d-block":"d-none")},i.createElement(l.o,{theme:e.glanceTheme,video:e.clip,pointsOfInterest:e.pointsOfInterest,onClickShowDescription:function(){return pe({view:"details",referrer:"v@g"})},setStartTime:function(e){var t;return null===(t=ae.playerRef.current)||void 0===t?void 0:t.currentTime(e)},getTagAppLink:function(e){return{application:U.O.SEARCH,action:F.e.Search.HOME,params:{tagOrClassification:e.name}}},suppressInteractivity:e.featureAccess.canViewPublicLayout})),i.createElement("section",{className:"".concat("details"===ue.view?"d-block":"d-none")},i.createElement(L.X,{video:e.clip,onLaunchImmersiveReader:function(){var e,t,a,i;le.current=!(null===(t=null===(e=null==ae?void 0:ae.playerRef)||void 0===e?void 0:e.current)||void 0===t?void 0:t.isPaused()),null===(i=null===(a=null==ae?void 0:ae.playerRef)||void 0===a?void 0:a.current)||void 0===i||i.pause()},onExitImmersiveReader:function(){var e,t;le.current&&(null===(t=null===(e=null==ae?void 0:ae.playerRef)||void 0===e?void 0:e.current)||void 0===t||t.play())},onClickClose:se&&function(){return pe({view:"v@g",referrer:"details"})},getTagAppLink:function(e){return{application:U.O.SEARCH,action:F.e.Search.HOME,params:{tagOrClassification:e.name}}},hideTags:se,suppressInteractivity:e.featureAccess.canViewPublicLayout})),i.createElement("section",{className:"".concat("loading"===ue.view?"d-block":"d-none")},i.createElement(N.H,null)),!!(null==ge?void 0:ge.length)&&i.createElement("section",{className:"pb-3"},i.createElement(u.kM,{name:j("resources",{count:ge.length}),contents:C.z.Resources,collection:ge,prefetched:!0,childComponent:v.R,extraChildComponentProps:{imageCdnUrl:e.imageCdnUrl,imageErrorFallbackUrl:O.W.Fallbacks.RESOURCE_THUMBNAIL,actionBehaviour:e.featureAccess.canViewResourceItems?"normal":"public"},getChildAppLink:M(null===(X=e.clip)||void 0===X?void 0:X.id,e.shareId,e.featureAccess.canViewResourceItems),analyticsOptions:e.featureAccess.canViewResourceItems?{}:{workflowPhase:c.eu.Start,descriptor:c.Yu.SignUp},analyticsData:{widgetId:"resources"}})),!(!(null==ye?void 0:ye.length)||me())&&i.createElement("div",{className:"pb-3"},i.createElement(u.kM,{name:j("otherClips",{count:ye.length}),contents:C.z.Clips,collection:ye,prefetched:!0,getChildAppLink:function(e){return{application:U.O.CLIPS,action:F.e.Clips.PLAY_CLIP,args:[e.id,r.m.slugify(e.name)]}},childComponent:p.C,extraChildComponentProps:{video:e.originalVideo,imageCdnUrl:e.imageCdnUrl},analyticsData:{widgetId:"clips"}})),!(!(null===(J=null===($=e.clip.interactives)||void 0===$?void 0:$.data)||void 0===J?void 0:J.length)||me())&&i.createElement("div",{className:"pb-3"},i.createElement(u.kM,{name:j("interactives",{count:e.clip.interactives.data.length}),contents:C.z.Interactives,collection:e.clip.interactives.data,prefetched:!0,getChildAppLink:function(e){return{application:U.O.INTERACTIVES,action:F.e.Interactives.VIEW_INTERACTIVE,args:[e.id,r.m.slugify(e.name)]}},childComponent:m.K,extraChildComponentProps:{video:e.clip,questionsAppLink:{application:U.O.INTERACTIVES,action:F.e.Interactives.PREVIEW_QUESTIONS},imageCdnUrl:e.imageCdnUrl},analyticsData:{widgetId:"interactives"}})),!!ve&&i.createElement("section",{className:"pb-2 pt-1"},i.createElement("h2",{className:"h4 mb-0"},i.createElement(o.x,{namespace:G,phrase:"clippedFrom"})),i.createElement(y.M.Provider,{value:re},i.createElement(d.E4,{videos:[e.originalVideo],yearGroups:e.yearGroups,setFavourite:e.setFavourite,canFavourite:e.canFavourite,getVideoAppLink:function(t){return P.W.getAppLink(t,{context:e.queryParams.context,contextId:e.queryParams.contextId,playNext:e.queryParams.playNext,shareId:e.shareId,moviesAndTv:e.queryParams.mtv})},presentationAudiences:e.audiences,getPreviewQuestionsAppLink:function(e){return q.j.getPreviewQuestionsAppLink(e)}}))),i.createElement("section",null,i.createElement(S.Z,{currentVideo:e.clip,yearGroups:e.yearGroups,relatedVideos:e.relatedVideos,setFavourite:e.setFavourite,canFavourite:e.canFavourite,currentUser:e.currentUser,audiences:e.audiences,getVideoAppLink:function(t){return P.W.getAppLink(t,{context:e.queryParams.context,contextId:e.queryParams.contextId,playNext:e.queryParams.playNext,shareId:e.shareId,moviesAndTv:e.queryParams.mtv})},moviesAndTv:e.queryParams.mtv})))}},44110:(e,t,a)=>{a.d(t,{i:()=>c});var i=a(20354),n=a(89454),r=a(86698),c=function(){var e=(0,r.y)({redirectOnError:!0}).activePresentation;return i.a.useBasicFetch(!!e&&n.O.presentationAudiences(e.id))}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3836,121],{86877:(e,t,n)=>{n.d(t,{Z:()=>f});var o=n(23481);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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,a(o.key),o)}}function a(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}function u(e,t,n){return t=l(t),function(e,t){if(t&&("object"===r(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)}(e,c()?Reflect.construct(t,n||[],l(e).constructor):t.apply(e,n))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var f=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),u(this,t,[e])}return 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&&s(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"FileTypeError"}},{key:"lang",get:function(){return"upload.fileType"}},{key:"dialogOptions",get:function(){return{title:o.T.getPhrase(this.lang,"heading"),text:o.T.getPhrase(this.lang,"body"),buttons:[{text:o.T.getPhrase(this.lang,"okay"),className:"btn btn-dark",success:!0},{text:o.T.getPhrase(this.lang,"close"),className:"btn btn-link",close:!0}]}}}])&&i(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(n(47663).S)},90121:(e,t,n)=>{n.r(t),n.d(t,{BaseVideoUploadService:()=>ye,LearningResourceUploadService:()=>be,SubtitleUploadService:()=>he,UploadType:()=>le});var o,r=n(48088),i=n(39479),a=n(46865),u=n(79976),c=n(37433),l=n(54149),s=n(71365),f=n(23481),p=n(70794),d=n(81886),y=n(49985),h=n(65858),b=n(29555);!function(e){e[e.Permanent=0]="Permanent",e[e.Temporary=1]="Temporary"}(o||(o={}));var g=n(86877),v=n(6339),m=n(52003),O=n(60735),w=n(53301),S=n.n(w),P=n(47663);function k(e){return k="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},k(e)}function j(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,T(o.key),o)}}function T(e){var t=function(e,t){if("object"!=k(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=k(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==k(t)?t:t+""}function U(e,t,n){return t=_(t),function(e,t){if(t&&("object"===k(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)}(e,E()?Reflect.construct(t,n||[],_(e).constructor):t.apply(e,n))}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(E=function(){return!!e})()}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}var L="upload.internetConnectivityError",C=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),U(this,t,[f.T.getPhrase(L,"title")])}return 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&&I(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"InternetConnectivityError"}},{key:"dialogOptions",get:function(){return{title:f.T.getPhrase(L,"heading"),text:f.T.getPhrase(L,"body"),buttons:[{text:f.T.getPhrase(L,"okay"),className:"btn btn-outline-dark",success:!0}]}}}])&&j(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(P.S),R=n(44331);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 D(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,x(o.key),o)}}function x(e){var t=function(e,t){if("object"!=A(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=A(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==A(t)?t:t+""}function F(e,t,n){return t=N(t),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)}(e,V()?Reflect.construct(t,n||[],N(e).constructor):t.apply(e,n))}function V(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(V=function(){return!!e})()}function N(e){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(e)}function z(e,t){return z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},z(e,t)}var B="upload.slowInternetError",M=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),F(this,t,[f.T.getPhrase(B,"title")])}return 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&&z(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"SlowInternetError"}},{key:"dialogOptions",get:function(){return{title:f.T.getPhrase(B,"heading"),text:f.T.getPhrase(B,"body"),buttons:[{text:f.T.getPhrase(B,"okay"),className:"btn btn-outline-dark",success:!0}]}}}])&&D(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(P.S);function Q(e){return Q="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},Q(e)}function q(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Y(o.key),o)}}function Y(e){var t=function(e,t){if("object"!=Q(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=Q(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Q(t)?t:t+""}function W(e,t,n){return t=K(t),function(e,t){if(t&&("object"===Q(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)}(e,Z()?Reflect.construct(t,n||[],K(e).constructor):t.apply(e,n))}function Z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Z=function(){return!!e})()}function K(e){return K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},K(e)}function H(e,t){return H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},H(e,t)}var J=[],G=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=W(this,t,[e])).slowInternetTimeout={},n.showSlowInternetTimeout=!0,n}return 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&&H(e,t)}(t,e),n=t,o=[{key:"name",get:function(){return"DropzoneWrapper"}},{key:"initialize",value:function(e){var t=this.options.loggingEnabled,n=r.Radio.channel(e.channelName),o=this;this.dropzone=new(S())(document.createElement("div"),{url:function(e){return e[0].cvUpload.ingestUrl},chunking:this.options.chunkingEnabled,chunkSize:this.options.chunkSize,forceChunking:!0,autoProcessQueue:!0,maxFilesize:this.options.maxFileSize,acceptedFiles:this.options.acceptedFiles,paramName:"content",timeout:18e4,init:function(){var e=this;t&&(i.each(J,(function(t){e.on(t,(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];var r=n[0]instanceof File?n[0].name:n[0];console.info(t,r,n)}))})),this.on("uploadprogress",(function(e,t,r){var i=r/e.size*100;n.trigger("progress",o.getId(e),i,r)})),this.on("success",(function(e){var t=e.upload.chunks,o=i.last(t),r=o.xhr;r||(r=o.file.xhr);var a=JSON.parse(r.response);e.cvUpload.fileId=a.id,n.trigger(b.S.UPLOAD_SUCCESS,e,a)})),this.on("error",(function(e,t,n){n&&0===n.status?d.Q.Ry.throw(new C):"canceled"!==e.status&&d.Q.Ry.throw(new R.n(f.T.getPhrase("upload.services","uploadError",{fileName:e.name,message:t.message})))})),this.on("sending",(function(e){window.clearTimeout(o.slowInternetTimeout[e.path]),o.showSlowInternetTimeout&&(o.slowInternetTimeout[e.path]=window.setTimeout((function(){o.showSlowInternetTimeout&&d.Q.Ry.throw(new M),o.showSlowInternetTimeout=!1}),3e4))})),this.on("complete",(function(e){return window.clearTimeout(o.slowInternetTimeout[e.path])})))},params:function(e,t,n){if(n)return{chunk_index:n.index,upload_length:n.file.size}},addedfile:function(){},thumbnail:function(){},uploadprogress:function(){}})}},{key:"getId",value:function(e){return e.upload.uuid}},{key:"addFile",value:function(e){this.dropzone.addFile(e)}},{key:"removeFile",value:function(e){this.dropzone.removeFile(e)}},{key:"start",value:function(){this.dropzone.processQueue()}},{key:"destroy",value:function(){this.dropzone.destroy()}}],a=[{key:"isValidFile",value:function(e,t){return S().isValidFile(e,t)}}],o&&q(n.prototype,o),a&&q(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o,a}(d.Q.t6);function $(e){return $="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},$(e)}function X(e,t,n){return(t=oe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function te(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,oe(o.key),o)}}function ne(e,t,n){return t&&te(e.prototype,t),n&&te(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function oe(e){var t=function(e,t){if("object"!=$(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=$(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$(t)?t:t+""}function re(e,t,n){return t=ae(t),function(e,t){if(t&&("object"===$(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)}(e,ie()?Reflect.construct(t,n||[],ae(e).constructor):t.apply(e,n))}function ie(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ie=function(){return!!e})()}function ae(e){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ae(e)}function ue(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&&ce(e,t)}function ce(e,t){return ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ce(e,t)}var le,se=function(e){function t(){var e;return ee(this,t),(e=re(this,t,[{dataProvider:s.u.getInstance(c.R.Ajax),cache:s.u.getInstance(a.p.Fifo),alertService:s.u.getInstance(u.P.ALERT)}])).incrementingUploadId=0,e}return ue(t,e),ne(t,[{key:"name",get:function(){return"UploadDataService"}},{key:"channelName",get:function(){return"private:upload:data:service"}},{key:"requestUploads",value:function(e,t,n,o,r){var a=this,u=this.chain();i.each(t,(function(t){a.incrementingUploadId++,u.create({resource:e,eventPrefix:"request:upload:".concat(a.incrementingUploadId),data:a.getFileUploadRequest(t,n),callback:function(e){o(t,e)},errorHandler:a.alertService.error("Something went wrong while we were uploading your video. Please try again.")})})),u.func((function(){r()})).run()}},{key:"cancelUpload",value:function(e,t,n){this.create({resource:"/api/upload/cancel",eventPrefix:"cancel:upload",data:{uploadId:e,ingestUrl:t},callback:n})}},{key:"getFileUploadRequest",value:function(e,t){var n=e.name.split(".");return{name:n.join("."),extension:n.length>1?n.pop():"",fileSize:e.size,fileLifestyle:t}}},{key:"onDestroy",value:function(){s.u.releaseInstance(c.R.Ajax).releaseInstance(a.p.Fifo)}}])}(l.B);!function(e){e[e.Video=0]="Video",e[e.LearningResource=1]="LearningResource",e[e.Subtitle=2]="Subtitle"}(le||(le={}));var fe=X(X(X({},le.Video,"video/*"),le.LearningResource,v.l.RESOURCES),le.Subtitle,v.l.SUBTITLES),pe=X(X(X({},le.Video,m.Q4.VIDEO_UPLOAD),le.LearningResource,m.Q4.RESOURCE_UPLOAD),le.Subtitle,m.Q4.SUBTITLE_UPLOAD),de=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ee(this,t),re(this,t,[Object.assign({uploadUrl:"/api/upload"},e)])}return ue(t,e),ne(t,[{key:"initialize",value:function(){this.uploadDataService=new se,this.progressViewModel=p.r.get("upload:progress:".concat(this.uploadType)),this.bindListeners()}},{key:"channelName",get:function(){return pe[this.uploadType]}},{key:"lang",get:function(){return"uploadShared.services"}},{key:"initUploader",value:function(e,t){if(!this.uploader){var n=4194304;e&&n<e&&(n=e),t&&n>t&&(n=t),this.uploader=new G({chunkingEnabled:!0,loggingEnabled:!0,chunkSize:n,maxFileSize:53687091200,acceptedFiles:this.getAcceptedFiles(),channelName:this.channelName})}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"progress",this.onProgress),this.listenTo(this.channelName,b.S.UPLOAD_SUCCESS,this.onSuccess)}},{key:"onProgress",value:function(e,t,n){var o=this.collection.get(e);o&&(o.set({progress:t>100?100:t,totalUploaded:n}),this.setOverallProgress())}},{key:"isUploading",value:function(){return!!this.getCollection().length}},{key:"getCollection",value:function(){return this.collection||(this.collection=new d.Q.FE),this.collection}},{key:"setOverallProgress",value:function(){var e=this,t=0,n=0,o=this.getCollection();if(o.length){o.each((function(e){t+=e.get("totalUploaded")||0,n+=e.get("file").size||0}));var r=t/n*100,i=r>=100,a=function(){e.progressViewModel.set({progress:i?100:r,done:i})};i?window.setTimeout(a,2e3):a()}else this.progressViewModel.set({progress:0})}},{key:"isValidFile",value:function(e){return G.isValidFile(e,this.getAcceptedFiles())}},{key:"addFiles",value:function(e,t){var n=this;i.any(e,(function(e){return!n.isValidFile(e)}))?d.Q.Ry.throw(new g.Z(f.T.getPhrase(this.lang,"invalidFileType"))):this.requestUploads(e,t)}},{key:"requestUploads",value:function(e,t){var n=this,o=this.isUploading(),i=this.getCollection();this.uploadDataService.requestUploads(this.options.uploadUrl,e,this.fileLifestyle,(function(e,t){n.initUploader(1024*t.minChunkSize,1024*t.maxChunkSize),e.cvUpload={uploadId:t.uploadId,ingestUrl:t.ingestUrl},n.uploader.addFile(e);var o=e.name;n.uploadType===le.Video&&(o=o.replace(/\.[^/.]+$/,"")),i.add(Object.assign({id:n.uploader.getId(e),file:e,name:o},n.getAdditionalFileInfo(e,t)),{at:i.length-1})}),(function(){t&&y.k.logUserAction({uploadCount:e.length},t),r.Radio.channel(n.channelName).trigger(b.S.FILES_ADDED,e,o)}))}},{key:"addFile",value:function(e,t){this.addFiles([e],t)}},{key:"cancelUpload",value:function(e){var t=this,n=this.getCollection(),o=n.get(e);if(o){var i=o.get("file");this.uploader.removeFile(i),n.remove(o),this.uploadDataService.cancelUpload(i.cvUpload.uploadId,i.cvUpload.ingestUrl,(function(){y.k.logUserAction(o.toJSON(),{entity:h.py.Video,actionType:h.Vw.Upload,workflowPhase:h.eu.Discard,descriptor:h.yh.Single,location:h.LZ.MyUploads}),r.Radio.channel(t.channelName).trigger(b.S.UPLOAD_CANCELLED)})),this.setOverallProgress()}}},{key:"onSuccess",value:function(e,t){var n=this.uploader.getId(e),o=this.getCollection().get(n);o.set("fileInfo",t),y.k.logUserAction({id:e.cvUpload.uploadId},{entity:h.py.Video,actionType:h.Vw.Upload,workflowPhase:h.eu.Complete,descriptor:h.yh.Single,location:h.LZ.VideoUpload}),r.Radio.channel(this.channelName).trigger(b.S.UPLOAD_COMPLETE,o)}},{key:"cancelAllUploads",value:function(){var e=this,t=this.getCollection().map((function(e){return e.get("id")}));i.each(t,(function(t){return e.cancelUpload(t)}))}},{key:"getUpload",value:function(e){var t=this.uploader.getId(e);return this.getCollection().get(t)}},{key:"getAcceptedFiles",value:function(){return fe[this.uploadType]}},{key:"getAdditionalFileInfo",value:function(e,t){return{}}}])}(d.Q.t6),ye=function(e){function t(){return ee(this,t),re(this,t,arguments)}return ue(t,e),ne(t,[{key:"uploadType",get:function(){return le.Video}},{key:"name",get:function(){return O.D.VideoUpload}},{key:"fileLifestyle",get:function(){return o.Temporary}}])}(de),he=function(e){function t(){return ee(this,t),re(this,t,arguments)}return ue(t,e),ne(t,[{key:"uploadType",get:function(){return le.Subtitle}},{key:"name",get:function(){return O.D.SubtitleUpload}},{key:"fileLifestyle",get:function(){return o.Permanent}}])}(de),be=function(e){function t(){return ee(this,t),re(this,t,arguments)}return ue(t,e),ne(t,[{key:"uploadType",get:function(){return le.LearningResource}},{key:"name",get:function(){return O.D.ResourceUpload}},{key:"fileLifestyle",get:function(){return o.Permanent}}])}(de)},6339:(e,t,n)=>{n.d(t,{l:()=>p,v:()=>d});var o=n(39479),r=["pdf"],i=["doc","docx","dotx","dot","rtf","docm","odt"],a=["csv","txt"],u=["xls","xlt","xlsx"],c=["jpg","tif","png","bmp","gif","jpeg"],l=["zip","rar"],s=["ppt","pot","pps","pptx"],f=["srt"],p={IMAGES:".".concat(c.join(",.")),RESOURCES:".".concat([].concat(i,u,s,r,a,c,l).join(",.")),SUBTITLES:".".concat(f.join(",."))},d={getResourceType:function(e){var t=e.toLowerCase();return o.contains(i,t)?"document":o.contains(u,t)?"excel":o.contains(s,t)?"powerpoint":o.contains(r,t)?"pdf":o.contains(a,t)?"text":o.contains(c,t)?"image":o.contains(l,t)?"archive":o.contains(f,t)?"subtitle":""}}},3836:(e,t,n)=>{n.r(t),n.d(t,{VideoUploadService:()=>E});var o,r=n(48088),i=n(79976),a=n(60139),u=n(71365),c=n(23481),l=n(29555),s=n(90121);!function(e){e[e.Upload=1]="Upload",e[e.Tv=2]="Tv"}(o||(o={}));var f,p,d=n(65728);!function(e){e[e.ExternalOnly=0]="ExternalOnly",e[e.EmbeddedOnly=1]="EmbeddedOnly"}(f||(f={})),function(e){e[e.IosApp=1]="IosApp",e[e.AndroidApp=2]="AndroidApp",e[e.WinApp=3]="WinApp",e[e.LibraryPublisher=4]="LibraryPublisher",e[e.ExchangeClient=5]="ExchangeClient",e[e.Online=6]="Online",e[e.Tinder=7]="Tinder",e[e.Cloud247=8]="Cloud247",e[e.Livestream=9]="Livestream",e[e.Curator=10]="Curator",e[e.LibraryEditor=11]="LibraryEditor",e[e.Lite=12]="Lite"}(p||(p={}));var y=n(75795),h=n(14070),b=n(97291),g=n(57322),v=n(16800);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 O(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,w(o.key),o)}}function w(e){var t=function(e,t){if("object"!=m(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=m(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==m(t)?t:t+""}function S(e,t,n){return t=j(t),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)}(e,P()?Reflect.construct(t,n||[],j(e).constructor):t.apply(e,n))}function P(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(P=function(){return!!e})()}function k(){return k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=j(e)););return e}(e,t);if(o){var r=Object.getOwnPropertyDescriptor(o,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},k.apply(this,arguments)}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function T(e,t){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},T(e,t)}var U=c.T.encloseNamespace("upload.services"),E=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),S(this,t,[e])}return 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)}(t,e),n=t,(c=[{key:"initialize",value:function(){k(j(t.prototype),"initialize",this).call(this),this.videoUploadDataService=u.u.getInstance(g.O.VideoUpload,this),this.pendingItemsService=u.u.getInstance(g.K.PendingItems,this),this.userDataService=u.u.getInstance(g.O.FlightUser,this),this.alertService=u.u.getInstance(i.P.ALERT,this),this.listenTo(this.channelName,l.S.FILES_ADDED,this.onUploadStart),this.listenTo(this.channelName,l.S.UPLOAD_COMPLETE,this.unlockNav),this.listenTo(this.channelName,l.S.UPLOAD_CANCELLED,this.unlockNav)}},{key:"onUploadStart",value:function(e){var t={type:a.NK.Success,heading:U("startUploadAlertHeading"),message:1===e.length?U("startUploadSingleAlertBody",{videoName:e[0].name}):U("startUploadMultipleAlertBody",{uploadCount:e.length})},n=y.O.getCurrentContext().appLink;!!v.Y.getMyVideosAppLinks().find((function(e){return n.application===e.application&&n.action===e.action}))||(t.appLinkText=U("startUploadAlertAppLinkText",{smartCount:e.length}),t.appLink={application:b.O.MY_VIDEOS,action:h.e.MyVideos.MY_VIDEOS},t.appLinkClassName="info-link"),this.alertService.createAlert(t)}},{key:"unlockNav",value:function(){this.getCollection().some((function(e){return e.get("progress")<100}))||r.Radio.channel(this.channelName).trigger(l.S.UNLOCK_NAV)}},{key:"completeUpload",value:function(e,t){var n=this;e.set("sending",!0),this.userDataService.getCurrentUser((function(r){n.userDataService.getCustomerSettings(r.customerId,(function(i){n.userDataService.getWorkspace((function(a){n.videoUploadDataService.completeVideoUpload({id:e.get("id"),userId:r.id,customerId:r.customerId,libraryId:a.id,categoryId:e.get("categoryId")||null,pendingProcessOrigin:o.Upload,origin:p.Lite,fileId:t.id,subtitleOptions:{subtitleExtractOptions:f.EmbeddedOnly},video:{name:e.get("name"),description:e.get("description")},autoCaption:!!i[d.E.AutoCaptioning].value},(function(t){e.set("pendingProcessId",t.pendingProcessId),n.pendingItemsService.forceFetchPendingItems({resetTimeout:!0})}))}))}))}))}},{key:"onSuccess",value:function(e,n){var o=this;k(j(t.prototype),"onSuccess",this).call(this,e,n);var r=this.getUpload(e);r.get("editingMetadata")?this.listenToOnce(r,"change:editingMetadata",(function(){o.completeUpload(r,n)})):this.completeUpload(r,n)}},{key:"getAdditionalFileInfo",value:function(e,t){var n=y.O.getCurrentRoute().appLink;return n.application!==b.O.MY_VIDEOS||n.action!==h.e.MyVideos.MY_VIDEOS_FOLDER?{}:{categoryId:+n.args[0]}}}])&&O(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c}(s.BaseVideoUploadService)}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 3841-539aa9573e-lite.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3841],{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:t+""}n.d(t,{n:()=>a});var a=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.listeners={}},t=[{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)}))}}}],t&&i(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}())},26733:(e,t,n)=>{n.d(t,{s:()=>O,R:()=>P});var r=n(32735),i=n(39202),o=n(97395),a=n(49985),s=n(65858),c=n(36848),u=n(75163),l=n(76177),f=n(71063),p=n(54610),h=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:p.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:p.h2.Medium,resizeType:p.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?p.__.Pdf:e.metadata.type===d.L.Image?p.__.Thumbnails:(null===(t=e.pdf)||void 0===t?void 0:t.url)?p.__.Pdf:(e.metadata.type,d.L.Zip,p.__.Thumbnails):p.__.Link}function O(e){var t,n,i,o,a,c,f,p=null,h=0;"metadata"in e.data&&(p=e.data.metadata,h=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==p?void 0:p.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(h,"deg)")},alt:e.data.name,analyticsOptions:{location:s.LZ.SlidingListItem},errorFallbackImageSrc:e.imageErrorFallbackUrl,imageClassName:(null==p?void 0:p.type)===d.L.Image?"".concat(b.imageTypeResource," ").concat(b.imageStyle):"",preload:e.preloadImage,preventLoad:!e.preloadImage})))}O.defaultProps={preloadImage:!0,actionBehaviour:"normal"};var P=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,[]),p=(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===h.E.Resource?s.py.Resource:s.py.Link});function m(){a.k.logUserAction(v,g)}var w,P=!!e.data.url;return l.applyHoverState=p||P,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(O,Object.assign({},l))):p?"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(O,Object.assign({},l))):r.createElement(c.F,{appLink:e.getAppLink(e.data),className:w,analyticsData:v,analyticsOptions:g},r.createElement(O,Object.assign({},l))):P?r.createElement("a",{href:e.data.url,className:w,onClick:m},r.createElement(O,Object.assign({},l))):r.createElement("div",{className:w},r.createElement(O,Object.assign({},l)))))}))},82452:(e,t,n)=>{n.r(t),n.d(t,{ClickViewPlayer:()=>Oi});var r=n(32735),i=n(36527),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:t+""}function u(e,t,n){return t=p(t),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)}(e,l()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function f(){return f="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=p(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}},f.apply(this,arguments)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}var d=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=u(this,t,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return 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&&h(e,t)}(t,e),n=t,(r=[{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(){f(p(t.prototype),"handleClick",this).call(this,null)}}])&&s(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getComponent("Button"));function y(e){return y="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},y(e)}function v(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,b(r.key),r)}}function b(e){var t=function(e,t){if("object"!=y(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function g(e,t,n){return t=w(t),function(e,t){if(t&&("object"===y(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)}(e,m()?Reflect.construct(t,n||[],w(e).constructor):t.apply(e,n))}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}d.prototype.controlText_="Create Clip",o.Z.registerComponent("CreateClipButton",d);var P=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=g(this,t,[e,n])).options=n,e.ready((function(){return r.onReady()})),r}return 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)}(t,e),n=t,(r=[{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)}}])&&v(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getPlugin("plugin"));function S(e){return S="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},S(e)}function k(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,j(r.key),r)}}function j(e){var t=function(e,t){if("object"!=S(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=S(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==S(t)?t:t+""}function C(e,t,n){return t=E(t),function(e,t){if(t&&("object"===S(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)}(e,T()?Reflect.construct(t,n||[],E(e).constructor):t.apply(e,n))}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(T=function(){return!!e})()}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}o.Z.registerPlugin("createClipButtonPlugin",P);var I=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),C(this,t,arguments)}return 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&&_(e,t)}(t,e),n=t,(r=[{key:"handlePictureInPictureEnabledChange",value:function(){this.enable()}}])&&k(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getComponent("PictureInPictureToggle"));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 R(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,M(r.key),r)}}function M(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:t+""}function L(e,t,n){return t=B(t),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 function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,D()?Reflect.construct(t,n||[],B(e).constructor):t.apply(e,n))}function D(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(D=function(){return!!e})()}function N(){return N="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=B(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}},N.apply(this,arguments)}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},B(e)}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},V(e,t)}o.Z.registerComponent("PictureInPictureToggle",I);var A=o.Z.getComponent("PlayToggle"),F=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=L(this,t,[e,n])).pictureInPictureEnabled=!1,r.options=n,r.bindFunctions(),r}return 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)}(t,e),n=t,(r=[{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 A(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,N(B(t.prototype),"dispose",this).call(this)}}])&&R(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("pictureInPicture",F);var U=n(23035),Z=n(42892),z=n(73758);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,Y(r.key),r)}}function Y(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:t+""}function H(e,t,n){return t=Q(t),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)}(e,W()?Reflect.construct(t,n||[],Q(e).constructor):t.apply(e,n))}function W(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(W=function(){return!!e})()}function $(){return $="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=Q(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}},$.apply(this,arguments)}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},X(e,t)}var J=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=H(this,t,[e,n])).hasBuffered=!1,r.hasPlayed=!1,r.eventsService=z.n,r.pointOfInterest=n.pointOfInterest,r.onMouseOver=r.onMouseOver.bind(r),r.onMouseLeave=r.onMouseLeave.bind(r),r.onGlancePointOfInterestMouseEnter=r.onGlancePointOfInterestMouseEnter.bind(r),r.onGlancePointOfInterestMouseLeave=r.onGlancePointOfInterestMouseLeave.bind(r),r.initialize(),r}return 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)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.setPosition(),this.bindListeners()}},{key:"buildCSSClass",value:function(){return"cv-point-of-interest-indicator ".concat($(Q(t.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,n,r){return $(Q(t.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r)}},{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")}}])&&q(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getComponent("Component"));function K(e){return K="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},K(e)}function ee(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,te(r.key),r)}}function te(e){var t=function(e,t){if("object"!=K(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=K(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==K(t)?t:t+""}function ne(e,t,n){return t=oe(t),function(e,t){if(t&&("object"===K(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)}(e,re()?Reflect.construct(t,n||[],oe(e).constructor):t.apply(e,n))}function re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(re=function(){return!!e})()}function ie(){return ie="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=oe(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}},ie.apply(this,arguments)}function oe(e){return oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oe(e)}function ae(e,t){return ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ae(e,t)}var se=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=ne(this,t,[e,n])).pointsOfInterestVisible=n.pointsOfInterestVisible,r.toggle(r.pointsOfInterestVisible),r}return 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&&ae(e,t)}(t,e),n=t,(r=[{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,n,r){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 i=ie(oe(t.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>'},r);return i.children[1].appendChild(this.toggleEl),i}}])&&ee(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getComponent("MenuItem"));function ce(e){return ce="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},ce(e)}function ue(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,le(r.key),r)}}function le(e){var t=function(e,t){if("object"!=ce(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=ce(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ce(t)?t:t+""}function fe(e,t,n){return t=he(t),function(e,t){if(t&&("object"===ce(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)}(e,pe()?Reflect.construct(t,n||[],he(e).constructor):t.apply(e,n))}function pe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(pe=function(){return!!e})()}function he(e){return he=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},he(e)}function de(e,t){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},de(e,t)}o.Z.registerComponent("PointsOfInterestMenuItem",se);var ye=o.Z.getPlugin("plugin"),ve="cvplayer-points-of-interest",be=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=fe(this,t,[e])).pointOfInterestIndicators=[],r.enabled=!0,r.pointsOfInterest=null==n?void 0:n.pointsOfInterest,r.initialize=r.initialize.bind(r),r.updateBuffered=r.updateBuffered.bind(r),r.updatePlaybackProgress=r.updatePlaybackProgress.bind(r),r.player.one("loadedmetadata",(function(){return r.player.ready(r.initialize)})),r}return 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&&de(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.pointsOfInterest&&(Z.S.hasLocalStorage()&&"false"===Z.S.get(ve)&&(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){Z.S.set(ve,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 J(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:se,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updateBuffered((0,U.b)(e.player))}))}},{key:"updatePlaybackProgress",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updatePlaybackProgress(e.player.currentTime())}))}}])&&ue(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ye);function ge(e){return ge="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},ge(e)}function me(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,we(r.key),r)}}function we(e){var t=function(e,t){if("object"!=ge(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=ge(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ge(t)?t:t+""}function Oe(e,t,n){return t=ke(t),function(e,t){if(t&&("object"===ge(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)}(e,Pe()?Reflect.construct(t,n||[],ke(e).constructor):t.apply(e,n))}function Pe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Pe=function(){return!!e})()}function Se(){return Se="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}},Se.apply(this,arguments)}function ke(e){return ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ke(e)}function je(e,t){return je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},je(e,t)}o.Z.registerPlugin("pointsOfInterestPlugin",be),n(93262);var Ce=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=Oe(this,t,[e,n])).initialize(),r}return 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)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.setPosition()}},{key:"buildCSSClass",value:function(){return"cv-range-indicator ".concat(Se(ke(t.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,n,r){return Se(ke(t.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r)}},{key:"setPosition",value:function(){var e=this.player().duration();this.el_.style.left=this.options_.time/e*100+"%"}}])&&me(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getComponent("Component"));function Te(e){return Te="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},Te(e)}function Ee(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"!=Te(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Te(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Te(t)?t:t+""}function Ie(e,t,n){return t=Me(t),function(e,t){if(t&&("object"===Te(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)}(e,xe()?Reflect.construct(t,n||[],Me(e).constructor):t.apply(e,n))}function xe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(xe=function(){return!!e})()}function Re(){return Re="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}},Re.apply(this,arguments)}function Me(e){return Me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Me(e)}function Le(e,t){return Le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Le(e,t)}var De=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ie(this,t,[e,n])}return 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&&Le(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-replay-view-button ".concat(Re(Me(t.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,n,r){return Re(Me(t.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},n),{innerHTML:'<span class="'.concat(this.options_.iconClassName,'"></span><span>').concat(this.options_.label,"</span>"),className:this.buildCSSClass()}),r)}},{key:"handleClick",value:function(){this.options_.onPress()}}])&&Ee(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getComponent("ClickableComponent"));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 Be(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"!=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:t+""}function Ae(e,t,n){return t=Ze(t),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)}(e,Fe()?Reflect.construct(t,n||[],Ze(e).constructor):t.apply(e,n))}function Fe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Fe=function(){return!!e})()}function Ue(){return Ue="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}},Ue.apply(this,arguments)}function Ze(e){return Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ze(e)}function ze(e,t){return ze=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ze(e,t)}var Ge=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ae(this,t,[e,n])}return 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&&ze(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-replay-view ".concat(Ue(Ze(t.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,n,r){var i=Ue(Ze(t.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r),a=o.Z.dom.createEl("h5",{innerHTML:this.localize("This clip has finished"),className:"cv-replay-heading"}),s=o.Z.dom.createEl("div",{className:"cv-button-container"}),c=new De(this.player_,{label:this.localize("Replay clip"),iconClassName:"cv-replay-icon",onPress:this.options_.onReplayPress}),u=new De(this.player_,{label:this.localize("Continue watching"),iconClassName:"cv-continue-icon",onPress:this.options_.onContinuePress});return i.appendChild(a),i.appendChild(s),s.appendChild(c.el()),s.appendChild(u.el()),i}}])&&Be(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getComponent("Component"));function qe(e){return qe="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},qe(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,He(r.key),r)}}function He(e){var t=function(e,t){if("object"!=qe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=qe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qe(t)?t:t+""}function We(e,t,n){return t=Xe(t),function(e,t){if(t&&("object"===qe(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)}(e,$e()?Reflect.construct(t,n||[],Xe(e).constructor):t.apply(e,n))}function $e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return($e=function(){return!!e})()}function Qe(){return Qe="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=Xe(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}},Qe.apply(this,arguments)}function Xe(e){return Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xe(e)}function Je(e,t){return Je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Je(e,t)}var Ke=function(e){function t(e,n){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=We(this,t,[e,n])).startTime=parseFloat(n.startTime.toPrecision(4)),r.endTime=parseFloat(n.endTime.toPrecision(4)),r.dismissed=!1,r.startTime>r.endTime)throw Error("Range start cannot be greater than range end");return r.bindFunctions(),r.initialize(),r}return 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)}(t,e),n=t,(r=[{key:"bindFunctions",value:function(){this.onReady=this.onReady.bind(this),this.onTimeUpdateOrSeeked=this.onTimeUpdateOrSeeked.bind(this),this.onReplayPress=this.onReplayPress.bind(this),this.onContinuePress=this.onContinuePress.bind(this)}},{key:"initialize",value:function(){var e=this;this.player.one("loadedmetadata",(function(){return e.player.ready(e.onReady)})),this.player.on("timeupdate",this.onTimeUpdateOrSeeked),this.player.on("seeked",this.onTimeUpdateOrSeeked)}},{key:"onReady",value:function(){this.addCssClasses(),this.showRangeIndicators(),this.addMaskToProgressBar()}},{key:"onTimeUpdateOrSeeked",value:function(){if(!this.dismissed){var e=this.player.currentTime();if(!(e<this.startTime))return e>this.endTime?(this.showReplayView(),this.disablePlayToggle(),this.player.pause(),void this.player.currentTime(this.endTime)):void 0;this.player.currentTime(this.startTime)}}},{key:"onReplayPress",value:function(){this.player.currentTime(this.startTime),this.player.play(),this.hideReplayView(),this.enablePlayToggle()}},{key:"onContinuePress",value:function(){this.dismissed=!0,this.player.play(),this.hideRangeIndicators(),this.removeMaskFromProgressBar(),this.hideReplayView(),this.enablePlayToggle(),this.removeCssClasses()}},{key:"showRangeIndicators",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");this.startTimeIndicator||(this.startTimeIndicator=new Ce(this.player,{time:this.startTime}),null==t||t.addChild(this.startTimeIndicator)),this.endTimeIndicator||(this.endTimeIndicator=new Ce(this.player,{time:this.endTime}),null==t||t.addChild(this.endTimeIndicator))}},{key:"hideRangeIndicators",value:function(){var e,t;null===(e=this.startTimeIndicator)||void 0===e||e.hide(),null===(t=this.endTimeIndicator)||void 0===t||t.hide()}},{key:"addMaskToProgressBar",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar"),n=null==t?void 0:t.el().getElementsByClassName("cv-chapter-bar-items");if(n&&n.length){var r=n[0],i=this.player.duration(),o=this.startTime/i*100,a=100-this.endTime/i*100;r.style.clipPath="inset(".concat(-5,"em ").concat(a,"% ").concat(-5,"em ").concat(o,"%)")}}},{key:"removeMaskFromProgressBar",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar"),n=null==t?void 0:t.el().getElementsByClassName("cv-chapter-bar-items");n&&n.length&&(n[0].style.clipPath="")}},{key:"showReplayView",value:function(){this.replayView||(this.replayView=new Ge(this.player,{onContinuePress:this.onContinuePress,onReplayPress:this.onReplayPress}),this.player.addChild(this.replayView)),this.replayView.show()}},{key:"hideReplayView",value:function(){var e;null===(e=this.replayView)||void 0===e||e.hide()}},{key:"getPlayToggle",value:function(){var e=this.player.getChild("collapserator");return null==e?void 0:e.getChild("PlayToggle")}},{key:"enablePlayToggle",value:function(){var e=this.getPlayToggle();e&&e.enable()}},{key:"disablePlayToggle",value:function(){var e=this.getPlayToggle();e&&e.disable()}},{key:"addCssClasses",value:function(){this.player.addClass("cv-range-indicator-plugin")}},{key:"removeCssClasses",value:function(){this.player.removeClass("cv-range-indicator-plugin")}},{key:"dispose",value:function(){var e,n,r;this.removeCssClasses(),this.player.off("timeupdate",this.onTimeUpdateOrSeeked),this.player.off("seeked",this.onTimeUpdateOrSeeked),null===(e=this.startTimeIndicator)||void 0===e||e.dispose(),null===(n=this.endTimeIndicator)||void 0===n||n.dispose(),null===(r=this.replayView)||void 0===r||r.dispose(),Qe(Xe(t.prototype),"dispose",this).call(this)}}])&&Ye(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("rangeIndicatorPlugin",Ke);var et=function(){var e,t,n;return null!==(n=null===(t=null===(e=window.crypto)||void 0===e?void 0:e.randomUUID)||void 0===t?void 0:t.call(e))&&void 0!==n?n:Math.random().toString()};function tt(e){return tt="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},tt(e)}function nt(){nt=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 p="suspendedStart",h="suspendedYield",d="executing",y="completed",v={};function b(){}function g(){}function m(){}var w={};u(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(x([])));P&&P!==n&&r.call(P,a)&&(w=P);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"==tt(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=p;return function(o,a){if(i===d)throw 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=T(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===p)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:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function T(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,T(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 E(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 _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function x(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(tt(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=x,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(_),!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 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),_(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;_(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function rt(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 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"!=tt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=tt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tt(t)?t:t+""}function at(e,t,n){return t=ut(t),function(e,t){if(t&&("object"===tt(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)}(e,st()?Reflect.construct(t,n||[],ut(e).constructor):t.apply(e,n))}function st(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(st=function(){return!!e})()}function ct(){return ct="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}},ct.apply(this,arguments)}function ut(e){return ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ut(e)}function lt(e,t){return lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lt(e,t)}var ft=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),at(this,t,[e,n])}return 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&&lt(e,t)}(t,e),n=t,(r=[{key:"getPlayerOptions",value:function(){var e,n,r=ct(ut(t.prototype),"getPlayerOptions",this).call(this);return(null===(e=r.devicesConfig)||void 0===e?void 0:e.canUserCastToDevices)?Object.assign(Object.assign({},r),{techOrder:["devices"].concat((n=r.techOrder,function(e){if(Array.isArray(e))return rt(e)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return rt(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)?rt(e,t):void 0}}(n)||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:et()}}):r}},{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 n,r,i,o,a,s=this,c=Object.create(null,{additionalSetup:{get:function(){return ct(ut(t.prototype),"additionalSetup",s)}}});return r=this,i=void 0,o=void 0,a=nt().mark((function t(){var r;return nt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c.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){t.next=7;break}if(null!==(r=e.additionalData)){t.next=6;break}throw Error("Invalid clip data");case 6:this.player.clipPlugin({startTime:r.startTime,endTime:r.endTime});case 7:if(!(null===(n=this.options.devicesConfig)||void 0===n?void 0:n.canUserCastToDevices)){t.next=11;break}if(this.player.devicesPlugin){t.next=10;break}return t.abrupt("return");case 10:this.player.devicesPlugin(Object.assign(Object.assign({},this.options.devicesConfig),{userId:parseInt(e.viewerId),title:e.title,analyticsService:this.analyticsService}));case 11:"MasterVideo"===e.mediaType&&this.options.startTime&&this.options.endTime&&this.player.rangeIndicatorPlugin({startTime:this.options.startTime,endTime:this.options.endTime});case 12:case"end":return t.stop()}}),t,this)})),new(o||(o=Promise))((function(e,t){function n(e){try{c(a.next(e))}catch(e){t(e)}}function s(e){try{c(a.throw(e))}catch(e){t(e)}}function c(t){var r;t.done?e(t.value):(r=t.value,r instanceof o?r:new o((function(e){e(r)}))).then(n,s)}c((a=a.apply(r,i||[])).next())}))}},{key:"setActivityStatus",value:function(e,t){this.player.activityStatusPlugin().setActivityStatus(e,t)}}])&&it(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.r),pt=n(63816),ht=n(65858),dt=n(86086),yt=n(12399),vt=n(6156),bt=n(11707);function gt(e){return gt="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},gt(e)}function mt(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,wt(r.key),r)}}function wt(e){var t=function(e,t){if("object"!=gt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=gt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gt(t)?t:t+""}var Ot={reconnectIntervalInMilliseconds:3e3,heartbeatEnabled:!1,heartbeatIntervalInMillseconds:1e4,heartbeatMessage:""},Pt=function(){return e=function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ot;!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({},Ot),r),this.webSocket=this.connect(),this.heartbeat=(new bt.b).schedule((function(){return n.send(n.options.heartbeatMessage)})).every(this.options.heartbeatIntervalInMillseconds)},(t=[{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()}}])&&mt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),St=n(95569),kt=n(35884);function jt(e){return jt="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},jt(e)}function Ct(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,Tt(r.key),r)}}function Tt(e){var t=function(e,t){if("object"!=jt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=jt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==jt(t)?t:t+""}var Et,_t=function(){return e=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=kt.l.withDebouncedSetters(this,2e3),kt.l.withTimestampedSetters(this)},(t=[{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}}])&&Ct(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function It(e){return It="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},It(e)}function xt(){xt=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 p="suspendedStart",h="suspendedYield",d="executing",y="completed",v={};function b(){}function g(){}function m(){}var w={};u(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(x([])));P&&P!==n&&r.call(P,a)&&(w=P);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"==It(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=p;return function(o,a){if(i===d)throw 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=T(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===p)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:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function T(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,T(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 E(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 _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function x(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(It(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=x,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(_),!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 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),_(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;_(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Rt(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,Mt(r.key),r)}}function Mt(e){var t=function(e,t){if("object"!=It(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=It(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==It(t)?t:t+""}function Lt(e,t,n){return t=Bt(t),function(e,t){if(t&&("object"===It(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)}(e,Dt()?Reflect.construct(t,n||[],Bt(e).constructor):t.apply(e,n))}function Dt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Dt=function(){return!!e})()}function Nt(){return Nt="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}},Nt.apply(this,arguments)}function Bt(e){return Bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bt(e)}function Vt(e,t){return Vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vt(e,t)}!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",e.Subtitles="subtitles"}(Et||(Et={}));var At=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())}))},Ft=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=Lt(this,t)).client=e,r.localState=new _t(n.title,n.device),r.bindFunctions(),r.initialize(),r}return 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)}(t,e),n=t,(r=[{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)})),Nt(Bt(t.prototype),"dispose",this).call(this)}},{key:"handleClientConnected",value:function(){return At(this,void 0,void 0,xt().mark((function e(){return xt().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 Et.Update:this.handleUpdateMessage(t,n);break;case Et.NewChapter:this.handleNewChapterMessage(t,n);break;case Et.Volume:this.handleVolumeMessage(t,n);break;case Et.Playing:this.handlePlayingMessage(t);break;case Et.Paused:this.handlePausedMessage(t);break;case Et.Finished:this.handleFinishedMessage(t);break;case Et.Stopped:this.handleStoppedMessage()}}},{key:"handleUpdateMessage",value:function(e,t){e.duration!==t.duration&&(e.duration=t.duration,this.trigger("durationchange",vt.j.void)),e.position!==t.position&&(e.position=t.position,this.trigger("positionchange",vt.j.void)),e.subtitles!==t.subtitles&&(e.subtitles=t.subtitles,this.trigger("subtitleschange",vt.j.void))}},{key:"handleVolumeMessage",value:function(e,t){e.volume!==t.level&&(e.volume=t.level,e.mute=0===t.level,this.trigger("volumechange",vt.j.void))}},{key:"handlePlayingMessage",value:function(e){!0!==e.playing&&(e.playing=!0,e.playbackFinished=!1,this.trigger("playingchange",vt.j.void))}},{key:"handlePausedMessage",value:function(e){!1!==e.playing&&(e.playing=!1,this.trigger("playingchange",vt.j.void))}},{key:"handleFinishedMessage",value:function(e){!0!==e.playbackFinished&&(e.playing=!1,e.playbackFinished=!0,this.trigger("playingchange",vt.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",vt.j.void))}},{key:"handleStoppedMessage",value:function(){this.dispose()}},{key:"loadSource",value:function(e,t){return At(this,void 0,void 0,xt().mark((function n(){var r,i;return xt().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",vt.j.void),i>0&&this.seek(i),t&&this.setSubtitles(t),n.next=22;break;case 18:n.prev=18,n.t0=n.catch(2),console.error(n.t0),this.trigger("error",new Error("Could not load video on Vivi device"));case 22:case"end":return n.stop()}}),n,this,[[2,18]])})))}},{key:"play",value:function(){this.localState.ready&&!0!==this.localState.playing&&(this.localState.playing=!0,this.client.play(this.getDevice().id),this.trigger("playingchange",vt.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",vt.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",vt.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",vt.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",vt.j.void))}},{key:"setSubtitles",value:function(e){return At(this,void 0,void 0,xt().mark((function t(){var n;return xt().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",vt.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}}])&&Rt(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(vt.N);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 p="suspendedStart",h="suspendedYield",d="executing",y="completed",v={};function b(){}function g(){}function m(){}var w={};u(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(x([])));P&&P!==n&&r.call(P,a)&&(w=P);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=p;return function(o,a){if(i===d)throw 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=T(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===p)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:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=y,r.method="throw",r.arg=u.arg)}}}function T(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,T(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 E(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 _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function x(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=x,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(_),!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 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),_(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;_(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function zt(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,Gt(r.key),r)}}function Gt(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:t+""}function qt(e,t,n){return t=Wt(t),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)}(e,Yt()?Reflect.construct(t,n||[],Wt(e).constructor):t.apply(e,n))}function Yt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Yt=function(){return!!e})()}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 Wt(e){return Wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wt(e)}function $t(e,t){return $t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$t(e,t)}var Qt=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())}))},Xt=1e4,Jt=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=qt(this,t)).options=e,n.accessToken="",n.devices=[],n.devicesFingerprint="",n.deviceDiscovery=new bt.b,n.bindFunctions(),n.initialize(),n}return 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)}(t,e),n=t,i=[{key:"createAckId",value:function(){return et()}},{key:"calculateFingerprint",value:function(e){return e.map((function(e){return e.id})).sort().join(",")}}],(r=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.sendMessage=this.sendMessage.bind(this),this.sendMessageDebounced=(0,St.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 Pt(this.options.url),this.webSocket.onMessage=function(t){return e.trigger("message",JSON.parse(t.data))},this.webSocket.onOpen=function(){return Qt(e,void 0,void 0,Zt().mark((function e(){return Zt().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",vt.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 Qt(e,void 0,void 0,Zt().mark((function e(){var n,r;return Zt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.getRoomList();case 3:if(n=e.sent,(r=t.calculateFingerprint(n))!==this.devicesFingerprint){e.next=7;break}return e.abrupt("return");case 7:this.devices=n.map((function(e){return{id:e.id,name:e.name,type:yt.Y.Vivi,status:yt.L.Available}})),this.devicesFingerprint=r,this.trigger("deviceschange",vt.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(),Ht(Wt(t.prototype),"dispose",this).call(this)}},{key:"canCastToDevice",value:function(e){return e===yt.Y.Vivi}},{key:"getDevices",value:function(){return this.devices}},{key:"startCastSession",value:function(e){return new Ft(this,e)}},{key:"authenticateWithVivi",value:function(){return Qt(this,void 0,void 0,Zt().mark((function e(){return Zt().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(Xt).catch((function(){throw new Error("Failed to authenticate with Vivi")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getRoomList",value:function(){return Qt(this,void 0,void 0,Zt().mark((function e(){var t;return Zt().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(Xt).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 Qt(this,void 0,void 0,Zt().mark((function t(){return Zt().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(Xt).catch((function(){throw new Error("Failed to join room")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"query",value:function(e){return Qt(this,void 0,void 0,Zt().mark((function n(){var r;return Zt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=t.createAckId(),this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:r,name:"query"}}),n.next=4,this.one("message",(function(e){return e.message.ack_id===r})).timeout(Xt).catch((function(){throw new Error("Failed to fetch query")}));case 4:return n.abrupt("return",n.sent);case 5:case"end":return n.stop()}}),n,this)})))}},{key:"loadQueue",value:function(e){var n=e.roomId,r=e.title,i=e.videoSource,o=e.subtitleSource;return Qt(this,void 0,void 0,Zt().mark((function e(){return Zt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:n,message:{type:"message_with_ack",ack_id:t.createAckId(),name:"queue_load",payload:{urls:[{title:r,url:i,suburl:o}]}}}),e.next=3,this.one("message",(function(e){var t;return e.source===n&&"ready"===(null===(t=e.message.payload)||void 0===t?void 0:t.event)})).timeout(Xt).catch((function(){throw new Error("Failed to load media")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"play",value:function(e){return Qt(this,void 0,void 0,Zt().mark((function t(){return Zt().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(Xt).catch((function(){throw new Error("Failed to play video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"pause",value:function(e){return Qt(this,void 0,void 0,Zt().mark((function t(){return Zt().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(Xt).catch((function(){throw new Error("Failed to pause video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"stop",value:function(e){return Qt(this,void 0,void 0,Zt().mark((function t(){return Zt().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(Xt).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 Qt(this,void 0,void 0,Zt().mark((function n(){return Zt().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(Xt).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 Qt(this,void 0,void 0,Zt().mark((function n(){return Zt().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(Xt).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 Qt(this,void 0,void 0,Zt().mark((function n(){return Zt().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(Xt).catch((function(){throw new Error("Failed to set mute")}));case 3:case"end":return n.stop()}}),n,this)})))}},{key:"setSubtitles",value:function(e,n){return Qt(this,void 0,void 0,Zt().mark((function r(){var i;return Zt().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=t.createAckId(),this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:i,name:"set_subtitles",payload:{subtitles:n}}}),r.next=4,this.one("message",(function(t){var n;return t.source===e&&"subtitles"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(Xt).catch((function(){throw new Error("Failed to set subtitles")}));case 4:case"end":return r.stop()}}),r,this)})))}}])&&zt(n.prototype,r),i&&zt(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(vt.N);function Kt(e){return Kt="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},Kt(e)}function en(e){return function(e){if(Array.isArray(e))return tn(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 tn(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)?tn(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 tn(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 nn(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,rn(r.key),r)}}function rn(e){var t=function(e,t){if("object"!=Kt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Kt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kt(t)?t:t+""}function on(e,t,n){return t=cn(t),function(e,t){if(t&&("object"===Kt(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)}(e,an()?Reflect.construct(t,n||[],cn(e).constructor):t.apply(e,n))}function an(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(an=function(){return!!e})()}function sn(){return sn="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=cn(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}},sn.apply(this,arguments)}function cn(e){return cn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cn(e)}function un(e,t){return un=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},un(e,t)}var ln=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=on(this,t)).instanceId=e,n.clients=[],n.bindFunctions(),n}return 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&&un(e,t)}(t,e),n=t,i=[{key:"getOrCreateInstance",value:function(e){if(!e)throw new Error("instanceId is required");return this.instances[e]||(this.instances[e]=new t(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}}],(r=[{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(en(e),en(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=[],sn(cn(t.prototype),"dispose",this).call(this)}}])&&nn(n.prototype,r),i&&nn(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(vt.N);ln.instances={};var fn=n(30050),pn=n(98115);function hn(e){return hn="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},hn(e)}function dn(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,yn(r.key),r)}}function yn(e){var t=function(e,t){if("object"!=hn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=hn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hn(t)?t:t+""}function vn(e,t,n){return t=mn(t),function(e,t){if(t&&("object"===hn(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)}(e,bn()?Reflect.construct(t,n||[],mn(e).constructor):t.apply(e,n))}function bn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(bn=function(){return!!e})()}function gn(){return gn="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=mn(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}},gn.apply(this,arguments)}function mn(e){return mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mn(e)}function wn(e,t){return wn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wn(e,t)}var On=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=vn(this,t,[e,n])).isVisible=r.isVisible.bind(r),r}return 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&&wn(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){return gn(mn(t.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(){gn(mn(t.prototype),"show",this).call(this)}},{key:"hide",value:function(){gn(mn(t.prototype),"hide",this).call(this)}},{key:"isVisible",value:function(){return!gn(mn(t.prototype),"hasClass",this).call(this,"vjs-hidden")}}])&&dn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getComponent("MenuItem")),Pn=n(86777);function Sn(e){return Sn="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},Sn(e)}function kn(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,jn(r.key),r)}}function jn(e){var t=function(e,t){if("object"!=Sn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Sn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Sn(t)?t:t+""}function Cn(e,t,n){return t=En(t),function(e,t){if(t&&("object"===Sn(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)}(e,Tn()?Reflect.construct(t,n||[],En(e).constructor):t.apply(e,n))}function Tn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Tn=function(){return!!e})()}function En(e){return En=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},En(e)}function _n(e,t){return _n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_n(e,t)}var In=o.Z.getComponent("Menu"),xn=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Cn(this,t,arguments)}return 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&&_n(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){var e=In.originalProto.createEl.apply(this),t=this.contentEl_;return this.contentWrapper=o.Z.dom.createEl("div",{className:"vjs-menu-content"}),e.className="vjs-menu cv-devices-menu",t.className="cv-devices-menu-item-list",e.removeChild(t),e.appendChild(this.contentWrapper),this.contentWrapper.appendChild(t),this.simpleBar=new Pn.Z(t,{autoHide:!1}),e}},{key:"addCta",value:function(e){this.ctaElement?console.warn("CTA has already been added to the menu - this is a no-op"):(this.ctaElement=e.el(),this.contentWrapper.prepend(this.ctaElement),this.el().classList.add("has-cta"))}},{key:"removeCta",value:function(){this.ctaElement&&(this.contentWrapper.removeChild(this.ctaElement),this.el().classList.remove("has-cta"))}}])&&kn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(In);o.Z.registerComponent("DevicesMenu",xn);var Rn=n(14735);function Mn(e){var t=e.inactiveIntegrations,n=e.canUserManageIntegrations,i=e.player,o=e.onDismiss,a=e.onInstall,s=e.onLearnMore,c=e.onContactSupport;if(0===t.length)return r.createElement(r.Fragment,null);var u,l=function(e){return i.localize(e)},f=function(e){return-1!==t.indexOf(e)};return u=f(yt.Y.AppleTv)&&f(yt.Y.Vivi)?"vivi_and_apple_tv":f(yt.Y.Vivi)?"vivi":"apple_tv",r.createElement("div",{className:"cv-devices-cta",tabIndex:-1},r.createElement(Ln,{context:u,localize:l,onDismiss:function(){return o(u)}}),r.createElement(Dn,{context:u}),r.createElement(Nn,{context:u,canUserManageIntegrations:n,localize:l,onContactSupport:function(){return c(u)},onInstall:function(){return a(u)},onLearnMore:function(){return s(u)}}))}function Ln(e){var t=e.context,n=e.localize,i=e.onDismiss;return r.createElement("div",{className:"cv-devices-cta-header"},r.createElement("span",{className:"cv-devices-badge"},n("New")),r.createElement("span",{className:"cv-devices-title"},"vivi_and_apple_tv"===t&&n("Cast to Vivi and Apple TV"),"vivi"===t&&n("Cast to Vivi"),"apple_tv"===t&&n("Cast to Apple TV")),r.createElement("span",{className:"cv-devices-close",onClick:i},r.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"white",d:"M11.9588 10.6413L16.3612 6.34478C16.7361 5.97191 17.3439 5.97191 17.7188 6.34478C18.0937 6.71764 18.0937 7.32218 17.7188 7.69505L13.3165 11.9916L17.7188 16.3701C18.0937 16.7429 18.0937 17.3475 17.7188 17.7203C17.3439 18.0932 16.7361 18.0932 16.3612 17.7203L11.9588 13.3419L7.63882 17.7203C7.26392 18.0932 6.65608 18.0932 6.28118 17.7203C5.90627 17.3475 5.90627 16.7429 6.28118 16.3701L10.6012 11.9916L6.28118 7.62993C5.90627 7.25706 5.90627 6.65252 6.28118 6.27965C6.65608 5.90678 7.26392 5.90678 7.63882 6.27965L11.9588 10.6413Z"}))))}function Dn(e){var t=e.context,n="vivi_and_apple_tv"===t?"bg-vivi-and-apple":"vivi"===t?"bg-vivi":"bg-apple";return r.createElement("div",{className:"cv-devices-cta-body ".concat(n)},("vivi_and_apple_tv"===t||"apple_tv"===t)&&r.createElement("div",{className:"cv-devices-icon-container"},r.createElement("span",{className:"cv-devices-icon apple"})),("vivi_and_apple_tv"===t||"vivi"===t)&&r.createElement("div",{className:"cv-devices-icon-container"},r.createElement("span",{className:"cv-devices-icon vivi"})))}function Nn(e){var t=e.context,n=e.canUserManageIntegrations,i=e.localize,o=e.onInstall,a=e.onLearnMore,s=e.onContactSupport;return n?r.createElement("div",{className:"cv-devices-cta-footer"},r.createElement("span",null,"vivi_and_apple_tv"===t&&i("Discover our new device integrations to make presenting in the classroom easy!"),"vivi"===t&&i("Discover our new Vivi integration."),"apple_tv"===t&&i("Discover our new Apple TV integration.")),r.createElement("br",null),r.createElement("span",{className:"cv-devices-link",onClick:o},i("Click here to install"))):r.createElement("div",{className:"cv-devices-cta-footer"},r.createElement("span",null,"vivi_and_apple_tv"===t&&i("Cast to Vivi and Apple TV is now available! Please contact "),"vivi"===t&&i("Cast to Vivi is now available! Please contact "),"apple_tv"===t&&i("Cast to Apple TV is now available! Please contact ")),r.createElement("span",{className:"cv-devices-link",onClick:s},"ClickView Support"),r.createElement("span",null,"vivi_and_apple_tv"===t&&i(" or your administrator to set up Apple TV and Vivi."),"vivi"===t&&i(" or your administrator to set up Vivi."),"apple_tv"===t&&i(" or your administrator to set up Apple TV.")),r.createElement("br",null),r.createElement("span",{className:"cv-devices-link",onClick:a},"Learn more"))}function Bn(e){return Bn="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},Bn(e)}function Vn(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,An(r.key),r)}}function An(e){var t=function(e,t){if("object"!=Bn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Bn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Bn(t)?t:t+""}function Fn(e,t,n){return t=zn(t),function(e,t){if(t&&("object"===Bn(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)}(e,Un()?Reflect.construct(t,n||[],zn(e).constructor):t.apply(e,n))}function Un(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Un=function(){return!!e})()}function Zn(){return Zn="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=zn(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}},Zn.apply(this,arguments)}function zn(e){return zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zn(e)}function Gn(e,t){return Gn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Gn(e,t)}o.Z.registerComponent("DevicesCta",(0,Rn.Z)((function(e,t){return r.createElement(Mn,Object.assign({player:e},t))}),{properties:{className:"cv-devices-cta-wrapper"}}));var qn=o.Z.getComponent("DevicesCta"),Yn=o.Z.getComponent("MenuButton"),Hn=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=Fn(this,t,[e,n])).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.className="cv-devices-menu-button",r.searchText="",r.devices=[],r.castSession=void 0,r.bindFunctions(),r.bindEventListeners(),r}return 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&&Gn(e,t)}(t,e),n=t,r=[{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.showNotificationBadge=this.showNotificationBadge.bind(this),this.hideNotificationBadge=this.hideNotificationBadge.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(){var r;t.removeEventListener("blur",n),null===(r=e.cta)||void 0===r||r.dispose()}))}},{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=Yn.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-devices-button ".concat(Zn(zn(t.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createMenu",value:function(){var e=this,t=new xn(this.player_,{menuButton:this});if(!this.options_.ctaOptions.hasBeenDismissed&&this.options_.ctaOptions.inactiveIntegrations.length>0){var n=this.options_.ctaOptions,r=n.onDismiss,i=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}(n,["onDismiss"]);this.cta=new qn(this.player(),Object.assign(Object.assign({},i),{onDismiss:function(n){e.hideNotificationBadge(),t.removeCta(),r(n)}})),this.showNotificationBadge(),t.addCta(this.cta)}return this.createItems().forEach((function(e){return t.addItem(e)})),t}},{key:"createItems",value:function(){var e=this,t=[];return this.headingItem=new fn.Z(this.player_,{label:this.localize("Select a device"),selectable:!1}),this.searchInputItem=new pn.Z(this.player_,{menuButton:this,search:function(t){return e.setSearchText(t)},className:"cv-devices-search-input"}),this.emptyPlaceholder=new pn.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;Zn(zn(t.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 On}))}},{key:"showNotificationBadge",value:function(){this.addClass("notification-badge")}},{key:"hideNotificationBadge",value:function(){this.removeClass("notification-badge")}},{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 On(t.player(),{id:e.id,label:e.name,selected:!1,multiSelectable:!1,selectable:!0,available:e.status===yt.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.searchInputItem.show(),this.menu.addClass("vertical-fill")):(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===yt.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(){Zn(zn(t.prototype),"handleClick",this).call(this,null),this.options_.onClick()}}],r&&Vn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Yn);Hn.prototype.controlText_="Devices",o.Z.registerComponent("DevicesButton",Hn);var Wn=n(10463);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 Qn(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,Xn(r.key),r)}}function Xn(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:t+""}function Jn(e,t,n){return t=tr(t),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 function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Kn()?Reflect.construct(t,n||[],tr(e).constructor):t.apply(e,n))}function Kn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Kn=function(){return!!e})()}function er(){return er="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=tr(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}},er.apply(this,arguments)}function tr(e){return tr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tr(e)}function nr(e,t){return nr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nr(e,t)}var rr=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Jn(this,t,[null,e])}return 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&&nr(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){return er(tr(t.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:yt.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(){}}])&&Qn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getComponent("Component"));function ir(e){return ir="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},ir(e)}function or(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,ar(r.key),r)}}function ar(e){var t=function(e,t){if("object"!=ir(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=ir(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ir(t)?t:t+""}function sr(e,t,n){return t=lr(t),function(e,t){if(t&&("object"===ir(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)}(e,cr()?Reflect.construct(t,n||[],lr(e).constructor):t.apply(e,n))}function cr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(cr=function(){return!!e})()}function ur(){return ur="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=lr(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}},ur.apply(this,arguments)}function lr(e){return lr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},lr(e)}function fr(e,t){return fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fr(e,t)}var pr=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=sr(this,t,[e,n])).featuresVolumeControl=!0,r.featuresPlaybackRate=!1,r.movingMediaElementInDOM=!1,r.featuresFullscreenResize=!0,r.featuresTimeupdateEvents=!0,r.featuresProgressEvents=!1,r.featuresNativeTextTracks=!1,r.featuresNativeAudioTracks=!1,r.featuresNativeVideoTracks=!1,r.featuresMuteControl=!0,r.featuresSourceset=!1,r.videojsPlayer=(0,o.Z)(r.options_.playerId),r.bindFunctions(),r.bindEventListeners(),r.ready((function(){r.setSource(r.options_.source)})),r.triggerReady(),r}return 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&&fr(e,t)}(t,e),n=t,i=[{key:"canPlayType",value:function(){return""}},{key:"canPlaySource",value:function(e,t){var n;return!!ln.getOrCreateInstance(null!==(n=null==t?void 0:t.instanceId)&&void 0!==n?n:"").getCastSession()}},{key:"isSupported",value:function(){return ln.isActive()}}],(r=[{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 Wn.O.findTrackByPredicate(this.videojsPlayer.player_,(function(e){return"showing"===e.mode&&!!e.src}))}},{key:"setSelectedTextTrack",value:function(e){Wn.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(),ur(lr(t.prototype),"cleanupAutoTextTracks",this).call(this),ur(lr(t.prototype),"dispose",this).call(this)}},{key:"createEl",value:function(){var e=this;return this.ui=this.ui||new rr({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 ur(lr(t.prototype),"addRemoteTextTrack",this).call(this,e,!0)}},{key:"getCastSession",value:function(){var e;return ln.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(){}}])&&or(n.prototype,r),i&&or(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(o.Z.getComponent("Tech"));function hr(e){return hr="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},hr(e)}function dr(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,yr(r.key),r)}}function yr(e){var t=function(e,t){if("object"!=hr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=hr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hr(t)?t:t+""}function vr(e,t,n){return t=mr(t),function(e,t){if(t&&("object"===hr(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)}(e,br()?Reflect.construct(t,n||[],mr(e).constructor):t.apply(e,n))}function br(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(br=function(){return!!e})()}function gr(){return gr="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=mr(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}},gr.apply(this,arguments)}function mr(e){return mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mr(e)}function wr(e,t){return wr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wr(e,t)}o.Z.registerTech("devices",pr);var Or=function(e){function t(e,n){var r,i,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=vr(this,t,[e,n])).options=n,r.instanceId=null!==(o=null===(i=r.player.options_.devices)||void 0===i?void 0:i.instanceId)&&void 0!==o?o:"",r.bindFunctions(),r.initialize(),r}return 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&&wr(e,t)}(t,e),n=t,(r=[{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=null==t?void 0:t.children().findIndex((function(e){return"OpenExternallyButton"===e.name()})),i=Math.max(n,r)+1,o=this.getSessionManager();if(t&&n&&-1!==n&&o){o.on("deviceschange",this.onDevicesChanged),o.on("castsessionchange",this.onCastSessionChanged),o.on("error",this.onDevicesError);var a=this.options.ctaOptions,s=this.options.vivi,c=[];this.options.appleTv.enabled||c.push(yt.Y.AppleTv),s.enabled&&s.accountConnected||c.push(yt.Y.Vivi);var u={onClick:function(){e.addViviClient(o),e.addAppleTvClient(o)},onDeviceMenuItemClick:function(t,n){var r;o.startCastSession({device:n,title:e.options.title}),null===(r=e.options.analyticsService)||void 0===r||r.logUserAction(n,{actionType:ht.Vw.Select,workflowPhase:ht.eu.Complete,descriptor:ht.UX.ChangeDevice,entity:ht.py.Device,eventVersion:ht.eq.V3})},ctaOptions:Object.assign(Object.assign({},a),{inactiveIntegrations:c})};this.devicesButton=t.addChild("DevicesButton",u,i)}}},{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(yt.Y.AppleTv)),this.player.removeClass("cv-device-".concat(yt.Y.Vivi)))}},{key:"onDevicesError",value:function(e){this.player.error(e.message),this.player.pause()}},{key:"addViviClient",value:function(e){if(this.options.vivi.enabled&&this.options.vivi.accountConnected&&this.options.vivi.apiUrl&&!e.hasInstanceOfClient(Jt)){var t=new Jt({url:this.options.vivi.apiUrl,fetchAccessToken:this.options.vivi.fetchAccessToken});e.addClient(t)}}},{key:"addAppleTvClient",value:function(e){if(this.options.appleTv.enabled&&this.options.trackingCode&&this.options.userId&&!e.hasInstanceOfClient(dt.w)){var t=new dt.w({fetchAccessToken:this.options.appleTv.fetchAccessToken,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 ln.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),ln.disposeAndRemoveInstance(e),gr(mr(t.prototype),"dispose",this).call(this))}}])&&dr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getPlugin("plugin"));function Pr(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 Sr(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 Pr(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)?Pr(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 kr(e){return kr="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},kr(e)}function jr(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,Cr(r.key),r)}}function Cr(e){var t=function(e,t){if("object"!=kr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=kr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==kr(t)?t:t+""}function Tr(e,t,n){return t=Ir(t),function(e,t){if(t&&("object"===kr(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)}(e,Er()?Reflect.construct(t,n||[],Ir(e).constructor):t.apply(e,n))}function Er(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Er=function(){return!!e})()}function _r(){return _r="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=Ir(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}},_r.apply(this,arguments)}function Ir(e){return Ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ir(e)}function xr(e,t){return xr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xr(e,t)}o.Z.registerPlugin("devicesPlugin",Or),o.Z.registerComponent("UpNext",(0,Rn.Z)((function(e,t){return r.createElement(Sr,Object.assign({player:e},t))})));var Rr=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=Tr(this,t,[e,n])).playNext=e.nextVideoPlugin().getShouldPlayNext(),r.toggle(r.playNext),r}return 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&&xr(e,t)}(t,e),n=t,(r=[{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,n,r){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 i=_r(Ir(t.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>'},r);return i.children[1].appendChild(this.toggleEl),i}}])&&jr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getComponent("MenuItem"));function Mr(e){return Mr="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},Mr(e)}function Lr(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,Dr(r.key),r)}}function Dr(e){var t=function(e,t){if("object"!=Mr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Mr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Mr(t)?t:t+""}function Nr(e,t,n){return t=Ar(t),function(e,t){if(t&&("object"===Mr(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)}(e,Br()?Reflect.construct(t,n||[],Ar(e).constructor):t.apply(e,n))}function Br(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Br=function(){return!!e})()}function Vr(){return Vr="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=Ar(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}},Vr.apply(this,arguments)}function Ar(e){return Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ar(e)}function Fr(e,t){return Fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fr(e,t)}o.Z.registerComponent("NextVideoMenuItem",Rr);var Ur="cv-persisttest",Zr="cv-play-next-video",zr=o.Z.getPlugin("plugin"),Gr=(o.Z.getComponent("MenuItem"),o.Z.getComponent("NextVideoMenuItem")),qr=function(e){function t(e){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=Nr(this,t,[e])).setShouldPlayNext=n.setShouldPlayNext.bind(n),n.getShouldPlayNext=n.getShouldPlayNext.bind(n),n.getChapterTrack=n.getChapterTrack.bind(n),n.onTimeUpdate=n.onTimeUpdate.bind(n),n.hasLocalStorage=n.testHasLocalStorage(),n.shouldPlayNextVideo=!1,n.hasLocalStorage){var r=window.localStorage.getItem(Zr);n.shouldPlayNextVideo="true"===r}return e.ready((function(){n.initialize()})),n}return 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&&Fr(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.player.isDisposed()||this.bindListeners()}},{key:"getChapterTrack",value:function(){return Wn.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:Gr,name:"NextVideoMenuItem"})}},{key:"getShouldPlayNext",value:function(){return this.shouldPlayNextVideo}},{key:"setShouldPlayNext",value:function(e,t){this.shouldPlayNextVideo=e,this.hasLocalStorage&&t&&window.localStorage.setItem(Zr,e.toString())}},{key:"bindListeners",value:function(){this.player.on("timeupdate",this.onTimeUpdate)}},{key:"dispose",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.hideUpNext(),Vr(Ar(t.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(Ur,"persistPlayNext"),window.localStorage.removeItem(Ur),!0}catch(e){return!1}}}])&&Lr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(zr);o.Z.registerPlugin("nextVideoPlugin",qr);var Yr=n(26733);function Hr(e){return Hr="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},Hr(e)}function Wr(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,$r(r.key),r)}}function $r(e){var t=function(e,t){if("object"!=Hr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Hr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Hr(t)?t:t+""}function Qr(e,t,n){return t=Jr(t),function(e,t){if(t&&("object"===Hr(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)}(e,Xr()?Reflect.construct(t,n||[],Jr(e).constructor):t.apply(e,n))}function Xr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Xr=function(){return!!e})()}function Jr(e){return Jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Jr(e)}function Kr(e,t){return Kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Kr(e,t)}function ei(e){return r.createElement("div",{className:"cv-resource-item"},r.createElement(Yr.s,{data:e.resource,imageCdnUrl:e.imageCdnUrl}))}var ti=(0,Rn.Z)((function(e,t){return r.createElement(ei,Object.assign({},t))})),ni=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=Qr(this,t,[e,n]);var i=new ti(e,{resource:n.resource,imageCdnUrl:n.imageCdnUrl});return r.addChild(i),r}return 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&&Kr(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){return o.Z.dom.createEl("div")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.options_.downloadResource(this.options_.resource)}}])&&Wr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getComponent("ClickableComponent"));function ri(e){return ri="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},ri(e)}function ii(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,oi(r.key),r)}}function oi(e){var t=function(e,t){if("object"!=ri(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=ri(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ri(t)?t:t+""}function ai(e,t,n){return t=ui(t),function(e,t){if(t&&("object"===ri(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)}(e,si()?Reflect.construct(t,n||[],ui(e).constructor):t.apply(e,n))}function si(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(si=function(){return!!e})()}function ci(){return ci="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=ui(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}},ci.apply(this,arguments)}function ui(e){return ui=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ui(e)}function li(e,t){return li=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},li(e,t)}var fi=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=ai(this,t,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return 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&&li(e,t)}(t,e),n=t,(r=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(ci(ui(t.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-resources-button ".concat(ci(ui(t.prototype),"buildCSSClass",this).call(this))}},{key:"update",value:function(){ci(ui(t.prototype),"update",this).call(this)}},{key:"createMenu",value:function(){return this.options_.title="Resources",ci(ui(t.prototype),"createMenu",this).call(this)}},{key:"createItems",value:function(){var e=this,t=[];return this.options_.resources.forEach((function(n){var r=new ni(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(){ci(ui(t.prototype),"handleClick",this).call(this,null)}}])&&ii(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getComponent("MenuButton"));function pi(e){return pi="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},pi(e)}function hi(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,di(r.key),r)}}function di(e){var t=function(e,t){if("object"!=pi(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=pi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pi(t)?t:t+""}function yi(e,t,n){return t=bi(t),function(e,t){if(t&&("object"===pi(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)}(e,vi()?Reflect.construct(t,n||[],bi(e).constructor):t.apply(e,n))}function vi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(vi=function(){return!!e})()}function bi(e){return bi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bi(e)}function gi(e,t){return gi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gi(e,t)}fi.prototype.controlText_="Resources",o.Z.registerComponent("ResourcesButton",fi);var mi=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=yi(this,t,[e,n])).options=n,e.ready((function(){return r.onReady()})),r}return 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&&gi(e,t)}(t,e),n=t,(r=[{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)}}}])&&hi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("resourcesPlugin",mi);var wi=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 Oi(e){var t=e.className,n=void 0===t?"":t,i=e.playerApi,o=e.onReady,a=e.onDispose,s=wi(e,["className","playerApi","onReady","onDispose"]),c=r.useRef();return r.useEffect((function(){if(c){var e=new ft(c.current,Object.assign(Object.assign({},s),{playerApi:i}));return o&&e.ready((function(){o((0,pt.G)(e))})),a&&e.one("dispose",a),function(){null==e||e.dispose()}}}),[e.viewKey]),r.createElement("div",{ref:c,className:n})}}}]);