@clickview/lite 0.33.4 → 0.34.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (403) hide show
  1. package/dist/bundles.json +1 -1
  2. package/dist/css/{4380-lite-161e1f072a.chunk.css → 1980-lite-3c1d9a0bd8.chunk.css} +11 -9
  3. package/dist/css/{2318-lite-1d266f666c.chunk.css → 2318-lite-12e260481d.chunk.css} +1 -1
  4. package/dist/css/{3446-lite-de70566195.chunk.css → 3446-lite-1b1ec87a28.chunk.css} +2 -2
  5. package/dist/css/{3091-lite-1acf740394.chunk.css → 3987-lite-26ebfc882b.chunk.css} +4 -4
  6. package/dist/css/{9744-lite-1acf740394.chunk.css → 6076-lite-26ebfc882b.chunk.css} +4 -4
  7. package/dist/css/6433-lite-f8f5523a6f.chunk.css +1 -0
  8. package/dist/css/7164-lite-4424261809.chunk.css +16 -0
  9. package/dist/css/{420-lite-7722827119.chunk.css → 7703-lite-7b8ce5ad7c.chunk.css} +4 -0
  10. package/dist/css/{9151-lite-c4a0ad3e8f.chunk.css → 9151-lite-01a42bf0ee.chunk.css} +1 -1
  11. package/dist/css/{8556-lite-161e1f072a.chunk.css → 9522-lite-3c1d9a0bd8.chunk.css} +11 -9
  12. package/dist/css/{637-lite-91dd88a8e6.chunk.css → 9869-lite-baa5f27c85.chunk.css} +4 -4
  13. package/dist/languages/en.json +1 -1
  14. package/dist/scripts/1316-d38802f300-lite.chunk.js +1 -0
  15. package/dist/scripts/{1354-33c5905ae6-lite.chunk.js → 1354-699ae85dcd-lite.chunk.js} +1 -1
  16. package/dist/scripts/1366-e5b46ac15b-lite.chunk.js +2 -0
  17. package/dist/scripts/1517-33781ad8b0-lite.chunk.js +1 -0
  18. package/dist/scripts/{1526-9645db89aa-lite.chunk.js → 1526-d2dc785640-lite.chunk.js} +1 -1
  19. package/dist/scripts/1672-4ff30fe0d9-lite.chunk.js +2 -0
  20. package/dist/scripts/{1725-e2ec42a1fb-lite.chunk.js → 1725-082ef05b56-lite.chunk.js} +1 -1
  21. package/dist/scripts/{1750-96f71f7748-lite.chunk.js → 1750-ac0959f614-lite.chunk.js} +1 -1
  22. package/dist/scripts/{1830-833c57cf63-lite.chunk.js → 1830-81e56b06f9-lite.chunk.js} +1 -1
  23. package/dist/scripts/{1863-89b9772cda-lite.chunk.js → 1863-3770b31fd2-lite.chunk.js} +1 -1
  24. package/dist/scripts/{1891-4e1fc9cefe-lite.chunk.js → 1891-af9f943f4d-lite.chunk.js} +1 -1
  25. package/dist/scripts/1980-57b7ad70d4-lite.chunk.js +1 -0
  26. package/dist/scripts/209-03f1ffaa32-lite.chunk.js +1 -0
  27. package/dist/scripts/2118-4e769f5020-lite.chunk.js +2 -0
  28. package/dist/scripts/2208-3ef7b44cd5-lite.chunk.js +1 -0
  29. package/dist/scripts/2235-a8ac4b7110-lite.chunk.js +1 -0
  30. package/dist/scripts/2608-a613c9f4ec-lite.chunk.js +1 -0
  31. package/dist/scripts/{2678-b53d60e821-lite.chunk.js → 2678-fee97a31e2-lite.chunk.js} +1 -1
  32. package/dist/scripts/2743-bf20f487a2-lite.chunk.js +1 -0
  33. package/dist/scripts/275-3f5dcc4c57-lite.chunk.js +1 -0
  34. package/dist/scripts/287-3eba510d3a-lite.chunk.js +1 -0
  35. package/dist/scripts/3042-72050bd1b4-lite.chunk.js +1 -0
  36. package/dist/scripts/3216-acc193b366-lite.chunk.js +1 -0
  37. package/dist/scripts/3446-3ea1cdc255-lite.chunk.js +1 -0
  38. package/dist/scripts/{3602-c5f7a74c8b-lite.chunk.js → 3602-85a8cf7466-lite.chunk.js} +1 -1
  39. package/dist/scripts/{3645-2683fa5003-lite.chunk.js → 3645-e68fabc894-lite.chunk.js} +1 -1
  40. package/dist/scripts/3654-3b91720535-lite.chunk.js +1 -0
  41. package/dist/scripts/3667-9c94c5f35d-lite.chunk.js +2 -0
  42. package/dist/scripts/3728-5d9da27ef4-lite.chunk.js +1 -0
  43. package/dist/scripts/3789-c93bdc1db3-lite.chunk.js +2 -0
  44. package/dist/scripts/3836-19765a2696-lite.chunk.js +1 -0
  45. package/dist/scripts/{3849-fee503c55c-lite.chunk.js → 3849-2be883c0b0-lite.chunk.js} +1 -1
  46. package/dist/scripts/3865-e85d687540-lite.chunk.js +1 -0
  47. package/dist/scripts/3966-ea5ccf719b-lite.chunk.js +1 -0
  48. package/dist/scripts/3987-8a8da439f0-lite.chunk.js +1 -0
  49. package/dist/scripts/{4032-24c9c52076-lite.chunk.js → 4032-9acbc08a28-lite.chunk.js} +1 -1
  50. package/dist/scripts/4145-880a35009e-lite.chunk.js +1 -0
  51. package/dist/scripts/{4343-c463efc266-lite.chunk.js → 4343-357f26db79-lite.chunk.js} +1 -1
  52. package/dist/scripts/4373-cf0cc66781-lite.chunk.js +1 -0
  53. package/dist/scripts/4393-1c97cb39e3-lite.chunk.js +1 -0
  54. package/dist/scripts/4441-110900a9aa-lite.chunk.js +2 -0
  55. package/dist/scripts/4612-5bbb0a67fe-lite.chunk.js +1 -0
  56. package/dist/scripts/4617-4b290b7533-lite.chunk.js +1 -0
  57. package/dist/scripts/4632-ac71090d0d-lite.chunk.js +1 -0
  58. package/dist/scripts/4657-fcd6ff63dd-lite.chunk.js +2 -0
  59. package/dist/scripts/{4676-adc55dfa15-lite.chunk.js → 4676-3931770101-lite.chunk.js} +2 -2
  60. package/dist/scripts/{4690-7f098e333b-lite.chunk.js → 4690-3bfc632794-lite.chunk.js} +1 -1
  61. package/dist/scripts/{4753-79b2c82aaf-lite.chunk.js → 4753-c2ff023429-lite.chunk.js} +1 -1
  62. package/dist/scripts/4942-8b3935e911-lite.chunk.js +2 -0
  63. package/dist/scripts/{5009-93cd88833d-lite.chunk.js → 5009-82cfb5a6d6-lite.chunk.js} +1 -1
  64. package/dist/scripts/5041-c671395800-lite.chunk.js +1 -0
  65. package/dist/scripts/5143-5fcc666d2e-lite.chunk.js +1 -0
  66. package/dist/scripts/519-30f9dc5f0c-lite.chunk.js +1 -0
  67. package/dist/scripts/5268-6c93736375-lite.chunk.js +2 -0
  68. package/dist/scripts/{5271-1df4d9d742-lite.chunk.js → 5271-439dc8abc5-lite.chunk.js} +1 -1
  69. package/dist/scripts/{5595-c6cb52f09d-lite.chunk.js → 5595-9ccd0ef053-lite.chunk.js} +1 -1
  70. package/dist/scripts/5606-404debcda3-lite.chunk.js +1 -0
  71. package/dist/scripts/{5622-7b29606856-lite.chunk.js → 5622-9fd84985bd-lite.chunk.js} +1 -1
  72. package/dist/scripts/5877-d728cd98a7-lite.chunk.js +1 -0
  73. package/dist/scripts/5986-c2ac84fc87-lite.chunk.js +1 -0
  74. package/dist/scripts/6076-d0ab857b36-lite.chunk.js +1 -0
  75. package/dist/scripts/{6117-f4f7197ab2-lite.chunk.js → 6117-e071957d15-lite.chunk.js} +1 -1
  76. package/dist/scripts/615-5d93f99210-lite.chunk.js +1 -0
  77. package/dist/scripts/{6158-eef3f7dc44-lite.chunk.js → 6158-bbbace7640-lite.chunk.js} +1 -1
  78. package/dist/scripts/{6290-40d12a27d7-lite.chunk.js → 6290-4f53628aac-lite.chunk.js} +1 -1
  79. package/dist/scripts/6330-dd799d318b-lite.chunk.js +1 -0
  80. package/dist/scripts/{6368-f3803b36c2-lite.chunk.js → 6368-3f3a251189-lite.chunk.js} +1 -1
  81. package/dist/scripts/6433-1c5d1c7ee1-lite.chunk.js +2 -0
  82. package/dist/scripts/{6572-7935a3e09e-lite.chunk.js → 6572-94123a1aaf-lite.chunk.js} +1 -1
  83. package/dist/scripts/6609-df975fb60f-lite.chunk.js +1 -0
  84. package/dist/scripts/{6689-683fac656a-lite.chunk.js → 6689-ec21bfcd2f-lite.chunk.js} +1 -1
  85. package/dist/scripts/{6801-d3cf047fb8-lite.chunk.js → 6801-fb5064f563-lite.chunk.js} +1 -1
  86. package/dist/scripts/{6896-75b32c41e8-lite.chunk.js → 6896-57a08030e2-lite.chunk.js} +2 -2
  87. package/dist/scripts/6957-bc94654046-lite.chunk.js +1 -0
  88. package/dist/scripts/6998-6ee7566d59-lite.chunk.js +1 -0
  89. package/dist/scripts/{7017-35c73244a6-lite.chunk.js → 7017-ad460892cd-lite.chunk.js} +2 -2
  90. package/dist/scripts/{7030-7a8f86bff3-lite.chunk.js → 7030-3d96a322d1-lite.chunk.js} +1 -1
  91. package/dist/scripts/7052-6a2c889fad-lite.chunk.js +2 -0
  92. package/dist/scripts/{7112-2f2e97d06b-lite.chunk.js → 7112-4ac30d206c-lite.chunk.js} +1 -1
  93. package/dist/scripts/7164-9dec6a0e20-lite.chunk.js +1 -0
  94. package/dist/scripts/7178-77d1cc145a-lite.chunk.js +1 -0
  95. package/dist/scripts/{7205-09a3d98105-lite.chunk.js → 7205-3c765f792f-lite.chunk.js} +1 -1
  96. package/dist/scripts/7221-93267ee8ca-lite.chunk.js +2 -0
  97. package/dist/scripts/{7288-8fca167593-lite.chunk.js → 7288-394b622cce-lite.chunk.js} +1 -1
  98. package/dist/scripts/7293-f8e0f7e712-lite.chunk.js +1 -0
  99. package/dist/scripts/7332-d5d2c50311-lite.chunk.js +1 -0
  100. package/dist/scripts/{7422-164d07dc57-lite.chunk.js → 7422-91954804ee-lite.chunk.js} +2 -2
  101. package/dist/scripts/{7506-67be832385-lite.chunk.js → 7506-a623cf821d-lite.chunk.js} +1 -1
  102. package/dist/scripts/754-c4f64fa21c-lite.chunk.js +1 -0
  103. package/dist/scripts/{7540-dc84bc4164-lite.chunk.js → 7540-6ad70b637c-lite.chunk.js} +1 -1
  104. package/dist/scripts/{7555-dd3000fe61-lite.chunk.js → 7555-6b4c3bfecb-lite.chunk.js} +1 -1
  105. package/dist/scripts/7564-47241b622f-lite.chunk.js +1 -0
  106. package/dist/scripts/7703-de6cbcd44a-lite.chunk.js +1 -0
  107. package/dist/scripts/{7708-6940f8aca3-lite.chunk.js → 7708-4131b22e42-lite.chunk.js} +1 -1
  108. package/dist/scripts/7818-c81c2d60b9-lite.chunk.js +1 -0
  109. package/dist/scripts/8046-83bcffb587-lite.chunk.js +1 -0
  110. package/dist/scripts/823-8c9802b94a-lite.chunk.js +1 -0
  111. package/dist/scripts/{8236-b1ba6a195c-lite.chunk.js → 8236-0f875aa540-lite.chunk.js} +1 -1
  112. package/dist/scripts/8323-077cca4d3c-lite.chunk.js +2 -0
  113. package/dist/scripts/{8367-b58cdd0725-lite.chunk.js → 8367-511fc0a70f-lite.chunk.js} +1 -1
  114. package/dist/scripts/{8466-07a5b1bdeb-lite.chunk.js → 8466-c1097777b2-lite.chunk.js} +1 -1
  115. package/dist/scripts/8564-34d58492f5-lite.chunk.js +1 -0
  116. package/dist/scripts/{8681-7d0092afe1-lite.chunk.js → 8681-8bea9c38e4-lite.chunk.js} +1 -1
  117. package/dist/scripts/{8873-d5bcff1f82-lite.chunk.js → 8873-99f49dc0d3-lite.chunk.js} +1 -1
  118. package/dist/scripts/{8935-0d9c59e8b3-lite.chunk.js → 8935-80c206852a-lite.chunk.js} +1 -1
  119. package/dist/scripts/8944-7a5e723a61-lite.chunk.js +1 -0
  120. package/dist/scripts/{9016-17e09819a6-lite.chunk.js → 9016-3db57b934d-lite.chunk.js} +1 -1
  121. package/dist/scripts/9118-8fdb0f7c56-lite.chunk.js +1 -0
  122. package/dist/scripts/9226-0afd5cae01-lite.chunk.js +1 -0
  123. package/dist/scripts/9242-0fbe6b67eb-lite.chunk.js +1 -0
  124. package/dist/scripts/9273-73add4829e-lite.chunk.js +1 -0
  125. package/dist/scripts/{9428-f581bbe764-lite.chunk.js → 9428-9af52fa200-lite.chunk.js} +1 -1
  126. package/dist/scripts/{9478-1978074e73-lite.chunk.js → 9478-6f19948322-lite.chunk.js} +2 -2
  127. package/dist/scripts/9484-2a3aa518fd-lite.chunk.js +2 -0
  128. package/dist/scripts/9522-f6a3bf5aa5-lite.chunk.js +1 -0
  129. package/dist/scripts/{9714-1d934660c4-lite.chunk.js → 9714-f8d16adc4e-lite.chunk.js} +1 -1
  130. package/dist/scripts/9798-908e0cf61a-lite.chunk.js +1 -0
  131. package/dist/scripts/9869-b6523c4972-lite.chunk.js +2 -0
  132. package/dist/scripts/{9894-b782130bb3-lite.chunk.js → 9894-1e493082b6-lite.chunk.js} +1 -1
  133. package/dist/scripts/{9931-bc6b18ba05-lite.chunk.js → 9931-15653656f5-lite.chunk.js} +1 -1
  134. package/dist/scripts/9931-15653656f5-lite.chunk.js.LICENSE.txt +1 -0
  135. package/dist/scripts/bundle-3e683090e2.min.js +2 -0
  136. package/jest.config.js +11 -11
  137. package/package.json +61 -61
  138. package/typings/libs/CVEvents.d.ts +12 -12
  139. package/typings/libs/CVLanguages.d.ts +24 -24
  140. package/typings/libs/cloneDeep.d.ts +4 -4
  141. package/typings/libs/cookiesjs.d.ts +25 -25
  142. package/typings/libs/draft-convert.d.ts +3 -3
  143. package/typings/libs/google-api.d.ts +93 -93
  144. package/typings/libs/intersection-observer.d.ts +82 -82
  145. package/typings/libs/microsoft-teams.d.ts +2 -2
  146. package/typings/libs/react-table-config.d.ts +138 -138
  147. package/typings/libs/trackjs.d.ts +2 -2
  148. package/typings/libs/videojs-contrib-quality-levels.d.ts +28 -28
  149. package/typings/utils/imports.d.ts +13 -13
  150. package/dist/scripts/1316-b38150f6e9-lite.chunk.js +0 -1
  151. package/dist/scripts/1366-86d2d6169c-lite.chunk.js +0 -2
  152. package/dist/scripts/1517-ac0287af9c-lite.chunk.js +0 -1
  153. package/dist/scripts/1672-3d34ddb1af-lite.chunk.js +0 -2
  154. package/dist/scripts/1818-69888ad56d-lite.chunk.js +0 -1
  155. package/dist/scripts/209-2d74e00709-lite.chunk.js +0 -1
  156. package/dist/scripts/2118-a281da36fd-lite.chunk.js +0 -2
  157. package/dist/scripts/2208-86652ae9e7-lite.chunk.js +0 -1
  158. package/dist/scripts/2235-6a520c3864-lite.chunk.js +0 -1
  159. package/dist/scripts/2564-ec9dcdc626-lite.chunk.js +0 -1
  160. package/dist/scripts/2608-bccac5c3b7-lite.chunk.js +0 -1
  161. package/dist/scripts/275-a52bc95dae-lite.chunk.js +0 -1
  162. package/dist/scripts/287-023c6d13b7-lite.chunk.js +0 -1
  163. package/dist/scripts/3091-9c582fd07c-lite.chunk.js +0 -1
  164. package/dist/scripts/3216-03ee78aa99-lite.chunk.js +0 -1
  165. package/dist/scripts/3378-38ffdcffee-lite.chunk.js +0 -1
  166. package/dist/scripts/3446-65529fdeac-lite.chunk.js +0 -1
  167. package/dist/scripts/3514-909af9cb44-lite.chunk.js +0 -1
  168. package/dist/scripts/3654-8d09c0e9d3-lite.chunk.js +0 -1
  169. package/dist/scripts/3667-7648deb2cb-lite.chunk.js +0 -2
  170. package/dist/scripts/3728-e97050e0c0-lite.chunk.js +0 -1
  171. package/dist/scripts/3789-80c07aba3d-lite.chunk.js +0 -2
  172. package/dist/scripts/3836-9f7cda412f-lite.chunk.js +0 -1
  173. package/dist/scripts/3966-e4ad0f453d-lite.chunk.js +0 -1
  174. package/dist/scripts/4145-f829e64de7-lite.chunk.js +0 -1
  175. package/dist/scripts/420-79e5bd7cf0-lite.chunk.js +0 -1
  176. package/dist/scripts/4373-eb074d6218-lite.chunk.js +0 -1
  177. package/dist/scripts/4380-17b9432c8a-lite.chunk.js +0 -1
  178. package/dist/scripts/4393-6219a4557e-lite.chunk.js +0 -1
  179. package/dist/scripts/4441-1d0c9eae9c-lite.chunk.js +0 -2
  180. package/dist/scripts/4612-0dc639cb3d-lite.chunk.js +0 -1
  181. package/dist/scripts/4617-98ff25d23d-lite.chunk.js +0 -1
  182. package/dist/scripts/4632-83f6987cd0-lite.chunk.js +0 -1
  183. package/dist/scripts/4657-3b0462b31a-lite.chunk.js +0 -2
  184. package/dist/scripts/4942-9db184d708-lite.chunk.js +0 -2
  185. package/dist/scripts/5041-01dd46392d-lite.chunk.js +0 -1
  186. package/dist/scripts/5143-3089605968-lite.chunk.js +0 -1
  187. package/dist/scripts/519-bb930f9c4b-lite.chunk.js +0 -1
  188. package/dist/scripts/5268-be0eb0d561-lite.chunk.js +0 -2
  189. package/dist/scripts/5606-d48ee92b02-lite.chunk.js +0 -1
  190. package/dist/scripts/5776-6f7dc4fafd-lite.chunk.js +0 -1
  191. package/dist/scripts/5877-2d606d0ce2-lite.chunk.js +0 -1
  192. package/dist/scripts/5986-ca99840de4-lite.chunk.js +0 -1
  193. package/dist/scripts/615-cabc7e1d22-lite.chunk.js +0 -1
  194. package/dist/scripts/6330-1a2cb669fa-lite.chunk.js +0 -1
  195. package/dist/scripts/637-264acfd7e8-lite.chunk.js +0 -2
  196. package/dist/scripts/6957-f69a655009-lite.chunk.js +0 -1
  197. package/dist/scripts/7052-6f2b57ccae-lite.chunk.js +0 -2
  198. package/dist/scripts/7178-768d338857-lite.chunk.js +0 -1
  199. package/dist/scripts/7221-a09f624297-lite.chunk.js +0 -2
  200. package/dist/scripts/7293-0fa4387eda-lite.chunk.js +0 -1
  201. package/dist/scripts/7332-435573d5d7-lite.chunk.js +0 -1
  202. package/dist/scripts/754-ab93865a0a-lite.chunk.js +0 -1
  203. package/dist/scripts/7564-cd98a82dea-lite.chunk.js +0 -1
  204. package/dist/scripts/7818-0ea0fb6a00-lite.chunk.js +0 -1
  205. package/dist/scripts/8046-304249b9e5-lite.chunk.js +0 -1
  206. package/dist/scripts/823-cb0629ec55-lite.chunk.js +0 -1
  207. package/dist/scripts/8323-e22b13446b-lite.chunk.js +0 -2
  208. package/dist/scripts/8556-5ee493d87f-lite.chunk.js +0 -1
  209. package/dist/scripts/8564-5f8e4689d0-lite.chunk.js +0 -1
  210. package/dist/scripts/8944-458e677ed3-lite.chunk.js +0 -1
  211. package/dist/scripts/9118-47902b0e20-lite.chunk.js +0 -1
  212. package/dist/scripts/9226-594281feff-lite.chunk.js +0 -1
  213. package/dist/scripts/9242-299be495ad-lite.chunk.js +0 -1
  214. package/dist/scripts/9273-50b5ba5e78-lite.chunk.js +0 -1
  215. package/dist/scripts/9338-7a528773b5-lite.chunk.js +0 -1
  216. package/dist/scripts/9484-1544749279-lite.chunk.js +0 -2
  217. package/dist/scripts/9744-585b42dc19-lite.chunk.js +0 -1
  218. package/dist/scripts/9798-cf0181fd79-lite.chunk.js +0 -1
  219. package/dist/scripts/bundle-cf5e5a8090.min.js +0 -2
  220. /package/dist/css/{5776-lite-ab01f5dc3b.chunk.css → 2743-lite-ab01f5dc3b.chunk.css} +0 -0
  221. /package/dist/css/{3514-lite-a288188c68.chunk.css → 3865-lite-a288188c68.chunk.css} +0 -0
  222. /package/dist/css/{1818-lite-08c053955f.chunk.css → 6609-lite-08c053955f.chunk.css} +0 -0
  223. /package/dist/scripts/{1106-7b506a61e7-lite.chunk.js → 1106-ed3d349c9b-lite.chunk.js} +0 -0
  224. /package/dist/scripts/{1285-f732f9569b-lite.chunk.js → 1285-2d3299c556-lite.chunk.js} +0 -0
  225. /package/dist/scripts/{1291-8eb0ac1f29-lite.chunk.js → 1291-4d8cd6a795-lite.chunk.js} +0 -0
  226. /package/dist/scripts/{1354-33c5905ae6-lite.chunk.js.LICENSE.txt → 1354-699ae85dcd-lite.chunk.js.LICENSE.txt} +0 -0
  227. /package/dist/scripts/{1366-86d2d6169c-lite.chunk.js.LICENSE.txt → 1366-e5b46ac15b-lite.chunk.js.LICENSE.txt} +0 -0
  228. /package/dist/scripts/{1475-fcb616c7b8-lite.chunk.js → 1475-d68c3145ce-lite.chunk.js} +0 -0
  229. /package/dist/scripts/{1518-7967c2115a-lite.chunk.js → 1518-eaabe78385-lite.chunk.js} +0 -0
  230. /package/dist/scripts/{1628-0e620e37c4-lite.chunk.js → 1628-389ea3acdb-lite.chunk.js} +0 -0
  231. /package/dist/scripts/{1672-3d34ddb1af-lite.chunk.js.LICENSE.txt → 1672-4ff30fe0d9-lite.chunk.js.LICENSE.txt} +0 -0
  232. /package/dist/scripts/{1726-ecd2a445bd-lite.chunk.js → 1726-ef1b2d68d0-lite.chunk.js} +0 -0
  233. /package/dist/scripts/{1781-d0fee9044d-lite.chunk.js → 1781-a04e438477-lite.chunk.js} +0 -0
  234. /package/dist/scripts/{1820-588830f999-lite.chunk.js → 1820-273a02b871-lite.chunk.js} +0 -0
  235. /package/dist/scripts/{1837-61e05c29a8-lite.chunk.js → 1837-18430c9f8d-lite.chunk.js} +0 -0
  236. /package/dist/scripts/{1913-fe05e9ae04-lite.chunk.js → 1913-196e6dbf6e-lite.chunk.js} +0 -0
  237. /package/dist/scripts/{1924-8c219e2149-lite.chunk.js → 1924-0fee4f841d-lite.chunk.js} +0 -0
  238. /package/dist/scripts/{1943-659bf677ff-lite.chunk.js → 1943-4d4923f098-lite.chunk.js} +0 -0
  239. /package/dist/scripts/{1958-31860bbfea-lite.chunk.js → 1958-4137ef8be6-lite.chunk.js} +0 -0
  240. /package/dist/scripts/{2095-3ffa3b4eb5-lite.chunk.js → 2095-eaf40acb79-lite.chunk.js} +0 -0
  241. /package/dist/scripts/{2118-a281da36fd-lite.chunk.js.LICENSE.txt → 2118-4e769f5020-lite.chunk.js.LICENSE.txt} +0 -0
  242. /package/dist/scripts/{2175-3ba2cb9a03-lite.chunk.js → 2175-2c35335520-lite.chunk.js} +0 -0
  243. /package/dist/scripts/{2199-d9ca47840a-lite.chunk.js → 2199-dd6a7387b4-lite.chunk.js} +0 -0
  244. /package/dist/scripts/{2229-6ab6090fb5-lite.chunk.js → 2229-0f33fab6f5-lite.chunk.js} +0 -0
  245. /package/dist/scripts/{2269-7a1c771947-lite.chunk.js → 2269-48415bbc64-lite.chunk.js} +0 -0
  246. /package/dist/scripts/{227-57b908ce0e-lite.chunk.js → 227-d59419c173-lite.chunk.js} +0 -0
  247. /package/dist/scripts/{2279-e86f59d46b-lite.chunk.js → 2279-dd750d4c32-lite.chunk.js} +0 -0
  248. /package/dist/scripts/{2318-8e6a642d06-lite.chunk.js → 2318-106cc66f74-lite.chunk.js} +0 -0
  249. /package/dist/scripts/{2452-f96e548d17-lite.chunk.js → 2452-446607a894-lite.chunk.js} +0 -0
  250. /package/dist/scripts/{2469-cdd2ba267e-lite.chunk.js → 2469-8970fbd70d-lite.chunk.js} +0 -0
  251. /package/dist/scripts/{2561-60104685db-lite.chunk.js → 2561-ba35cc85d6-lite.chunk.js} +0 -0
  252. /package/dist/scripts/{2566-c38b03672e-lite.chunk.js → 2566-6b4f850e8a-lite.chunk.js} +0 -0
  253. /package/dist/scripts/{2665-9ddd5ce079-lite.chunk.js → 2665-8c39b6792c-lite.chunk.js} +0 -0
  254. /package/dist/scripts/{2678-b53d60e821-lite.chunk.js.LICENSE.txt → 2678-fee97a31e2-lite.chunk.js.LICENSE.txt} +0 -0
  255. /package/dist/scripts/{276-11cc4ff717-lite.chunk.js → 276-4d83c09431-lite.chunk.js} +0 -0
  256. /package/dist/scripts/{2958-6bdeb684a6-lite.chunk.js → 2958-f06c9a7126-lite.chunk.js} +0 -0
  257. /package/dist/scripts/{2966-4e5b3e14e1-lite.chunk.js → 2966-31eb6f5195-lite.chunk.js} +0 -0
  258. /package/dist/scripts/{3012-e9472f7b1b-lite.chunk.js → 3012-cc96ee5265-lite.chunk.js} +0 -0
  259. /package/dist/scripts/{3020-f2ded2aebe-lite.chunk.js → 3020-1f43870f76-lite.chunk.js} +0 -0
  260. /package/dist/scripts/{3108-d4198b8381-lite.chunk.js → 3108-ae911e3d71-lite.chunk.js} +0 -0
  261. /package/dist/scripts/{3154-e2b4102e06-lite.chunk.js → 3154-f88bbfdad6-lite.chunk.js} +0 -0
  262. /package/dist/scripts/{3171-ca6a42c306-lite.chunk.js → 3171-663aa64cae-lite.chunk.js} +0 -0
  263. /package/dist/scripts/{3200-22b854d2bd-lite.chunk.js → 3200-12312af47d-lite.chunk.js} +0 -0
  264. /package/dist/scripts/{3237-35a98ed3a1-lite.chunk.js → 3237-4d6fd8d721-lite.chunk.js} +0 -0
  265. /package/dist/scripts/{3285-dd1d715265-lite.chunk.js → 3285-61a4ad0d69-lite.chunk.js} +0 -0
  266. /package/dist/scripts/{3371-d3fdc435c3-lite.chunk.js → 3371-bb9a674c07-lite.chunk.js} +0 -0
  267. /package/dist/scripts/{3468-ca8c4d21a3-lite.chunk.js → 3468-4d7076a979-lite.chunk.js} +0 -0
  268. /package/dist/scripts/{3533-96f9230c25-lite.chunk.js → 3533-882dcc1188-lite.chunk.js} +0 -0
  269. /package/dist/scripts/{355-5da55f761c-lite.chunk.js → 355-3eb0659bd4-lite.chunk.js} +0 -0
  270. /package/dist/scripts/{3602-c5f7a74c8b-lite.chunk.js.LICENSE.txt → 3602-85a8cf7466-lite.chunk.js.LICENSE.txt} +0 -0
  271. /package/dist/scripts/{3645-2683fa5003-lite.chunk.js.LICENSE.txt → 3645-e68fabc894-lite.chunk.js.LICENSE.txt} +0 -0
  272. /package/dist/scripts/{3667-7648deb2cb-lite.chunk.js.LICENSE.txt → 3667-9c94c5f35d-lite.chunk.js.LICENSE.txt} +0 -0
  273. /package/dist/scripts/{3727-6c63240ea2-lite.chunk.js → 3727-ed2637034f-lite.chunk.js} +0 -0
  274. /package/dist/scripts/{3729-fb0ebdda2b-lite.chunk.js → 3729-e71f0dc214-lite.chunk.js} +0 -0
  275. /package/dist/scripts/{3754-978fa5935c-lite.chunk.js → 3754-09e32bdce9-lite.chunk.js} +0 -0
  276. /package/dist/scripts/{3755-3aa08e75c5-lite.chunk.js → 3755-6ed23bfa7a-lite.chunk.js} +0 -0
  277. /package/dist/scripts/{3789-80c07aba3d-lite.chunk.js.LICENSE.txt → 3789-c93bdc1db3-lite.chunk.js.LICENSE.txt} +0 -0
  278. /package/dist/scripts/{389-7ff8189cc3-lite.chunk.js → 389-e7037a0807-lite.chunk.js} +0 -0
  279. /package/dist/scripts/{3962-e5b5657359-lite.chunk.js → 3962-3dcedae047-lite.chunk.js} +0 -0
  280. /package/dist/scripts/{4067-7dea084485-lite.chunk.js → 4067-dba280680e-lite.chunk.js} +0 -0
  281. /package/dist/scripts/{414-712655c265-lite.chunk.js → 414-50eeedf502-lite.chunk.js} +0 -0
  282. /package/dist/scripts/{4182-6a6ad037b3-lite.chunk.js → 4182-e9700be806-lite.chunk.js} +0 -0
  283. /package/dist/scripts/{4326-87a92d2b1e-lite.chunk.js → 4326-ae498b2f69-lite.chunk.js} +0 -0
  284. /package/dist/scripts/{4417-63dce95be2-lite.chunk.js → 4417-1ef8363302-lite.chunk.js} +0 -0
  285. /package/dist/scripts/{4423-795c5de532-lite.chunk.js → 4423-925d216a4a-lite.chunk.js} +0 -0
  286. /package/dist/scripts/{4436-fc7c6e1737-lite.chunk.js → 4436-b92639529d-lite.chunk.js} +0 -0
  287. /package/dist/scripts/{4441-1d0c9eae9c-lite.chunk.js.LICENSE.txt → 4441-110900a9aa-lite.chunk.js.LICENSE.txt} +0 -0
  288. /package/dist/scripts/{4537-71467ff1a4-lite.chunk.js → 4537-442debaca7-lite.chunk.js} +0 -0
  289. /package/dist/scripts/{4541-517258115e-lite.chunk.js → 4541-c08f765eab-lite.chunk.js} +0 -0
  290. /package/dist/scripts/{4657-3b0462b31a-lite.chunk.js.LICENSE.txt → 4657-fcd6ff63dd-lite.chunk.js.LICENSE.txt} +0 -0
  291. /package/dist/scripts/{4676-adc55dfa15-lite.chunk.js.LICENSE.txt → 4676-3931770101-lite.chunk.js.LICENSE.txt} +0 -0
  292. /package/dist/scripts/{4705-3aa7b071ec-lite.chunk.js → 4705-4f3442b228-lite.chunk.js} +0 -0
  293. /package/dist/scripts/{4770-cd71bd05c5-lite.chunk.js → 4770-4333593211-lite.chunk.js} +0 -0
  294. /package/dist/scripts/{482-7c9d6c3584-lite.chunk.js → 482-8139ae4723-lite.chunk.js} +0 -0
  295. /package/dist/scripts/{4893-bbe7c87782-lite.chunk.js → 4893-92b530b072-lite.chunk.js} +0 -0
  296. /package/dist/scripts/{4895-14b8a26949-lite.chunk.js → 4895-3ee62dc779-lite.chunk.js} +0 -0
  297. /package/dist/scripts/{4942-9db184d708-lite.chunk.js.LICENSE.txt → 4942-8b3935e911-lite.chunk.js.LICENSE.txt} +0 -0
  298. /package/dist/scripts/{5009-93cd88833d-lite.chunk.js.LICENSE.txt → 5009-82cfb5a6d6-lite.chunk.js.LICENSE.txt} +0 -0
  299. /package/dist/scripts/{5018-d2c1af9240-lite.chunk.js → 5018-c6dd4cd7f2-lite.chunk.js} +0 -0
  300. /package/dist/scripts/{510-e35583dee7-lite.chunk.js → 510-5efffa403b-lite.chunk.js} +0 -0
  301. /package/dist/scripts/{5134-6d70bcc26e-lite.chunk.js → 5134-5a2efd579d-lite.chunk.js} +0 -0
  302. /package/dist/scripts/{5151-06852b21e0-lite.chunk.js → 5151-ee57671548-lite.chunk.js} +0 -0
  303. /package/dist/scripts/{5171-9397f19578-lite.chunk.js → 5171-53fc8f18ba-lite.chunk.js} +0 -0
  304. /package/dist/scripts/{5229-13ee2bf768-lite.chunk.js → 5229-19d83a56ff-lite.chunk.js} +0 -0
  305. /package/dist/scripts/{5268-be0eb0d561-lite.chunk.js.LICENSE.txt → 5268-6c93736375-lite.chunk.js.LICENSE.txt} +0 -0
  306. /package/dist/scripts/{528-2ab7c7a75c-lite.chunk.js → 528-9a6deb93d3-lite.chunk.js} +0 -0
  307. /package/dist/scripts/{5291-ca756f9f8a-lite.chunk.js → 5291-ce0561c6ba-lite.chunk.js} +0 -0
  308. /package/dist/scripts/{5313-53738e308f-lite.chunk.js → 5313-5f0d1a3b15-lite.chunk.js} +0 -0
  309. /package/dist/scripts/{5385-a2451e3eec-lite.chunk.js → 5385-f53e603625-lite.chunk.js} +0 -0
  310. /package/dist/scripts/{5406-161aca5797-lite.chunk.js → 5406-c4ff467b8d-lite.chunk.js} +0 -0
  311. /package/dist/scripts/{5509-9e9e7bc4a9-lite.chunk.js → 5509-19bf214a28-lite.chunk.js} +0 -0
  312. /package/dist/scripts/{5512-a653aa2fd8-lite.chunk.js → 5512-8141838d56-lite.chunk.js} +0 -0
  313. /package/dist/scripts/{5555-e108aa8893-lite.chunk.js → 5555-8d88a7961c-lite.chunk.js} +0 -0
  314. /package/dist/scripts/{5611-52b5b25aee-lite.chunk.js → 5611-9f7c9d2e21-lite.chunk.js} +0 -0
  315. /package/dist/scripts/{5622-7b29606856-lite.chunk.js.LICENSE.txt → 5622-9fd84985bd-lite.chunk.js.LICENSE.txt} +0 -0
  316. /package/dist/scripts/{5659-7f669b538e-lite.chunk.js → 5659-59c90b98fd-lite.chunk.js} +0 -0
  317. /package/dist/scripts/{5765-bffdda2690-lite.chunk.js → 5765-5d8261f251-lite.chunk.js} +0 -0
  318. /package/dist/scripts/{5823-2e5bd3a90c-lite.chunk.js → 5823-ef0046a1a8-lite.chunk.js} +0 -0
  319. /package/dist/scripts/{5914-7d6e71c500-lite.chunk.js → 5914-4eb166f0c9-lite.chunk.js} +0 -0
  320. /package/dist/scripts/{5974-66df879b08-lite.chunk.js → 5974-8af9af8fae-lite.chunk.js} +0 -0
  321. /package/dist/scripts/{6057-607500eca5-lite.chunk.js → 6057-08d3eee069-lite.chunk.js} +0 -0
  322. /package/dist/scripts/{6154-b2f0db4086-lite.chunk.js → 6154-7ddc6a32ca-lite.chunk.js} +0 -0
  323. /package/dist/scripts/{6159-dd02247da8-lite.chunk.js → 6159-1475ec9c41-lite.chunk.js} +0 -0
  324. /package/dist/scripts/{6274-723129c5c6-lite.chunk.js → 6274-f3769a7518-lite.chunk.js} +0 -0
  325. /package/dist/scripts/{6285-0899c78c8c-lite.chunk.js → 6285-873cf09c3c-lite.chunk.js} +0 -0
  326. /package/dist/scripts/{6370-0212dd65f8-lite.chunk.js → 6370-2954db4d1c-lite.chunk.js} +0 -0
  327. /package/dist/scripts/{6407-44cd69b87c-lite.chunk.js → 6407-10afafed70-lite.chunk.js} +0 -0
  328. /package/dist/scripts/{637-264acfd7e8-lite.chunk.js.LICENSE.txt → 6433-1c5d1c7ee1-lite.chunk.js.LICENSE.txt} +0 -0
  329. /package/dist/scripts/{6450-6e367c2ef3-lite.chunk.js → 6450-87b22756f6-lite.chunk.js} +0 -0
  330. /package/dist/scripts/{6465-3b025df7ce-lite.chunk.js → 6465-7a63bc80b6-lite.chunk.js} +0 -0
  331. /package/dist/scripts/{6480-e5afc3e0f1-lite.chunk.js → 6480-83ef346f22-lite.chunk.js} +0 -0
  332. /package/dist/scripts/{6493-8957a82163-lite.chunk.js → 6493-b14b6be4f8-lite.chunk.js} +0 -0
  333. /package/dist/scripts/{6604-968eb39831-lite.chunk.js → 6604-19f0427fcc-lite.chunk.js} +0 -0
  334. /package/dist/scripts/{6702-d8752ffa1d-lite.chunk.js → 6702-7f040268d0-lite.chunk.js} +0 -0
  335. /package/dist/scripts/{6788-e7ccd0d5a6-lite.chunk.js → 6788-c8082ba442-lite.chunk.js} +0 -0
  336. /package/dist/scripts/{6817-13f25cce44-lite.chunk.js → 6817-110040da46-lite.chunk.js} +0 -0
  337. /package/dist/scripts/{6821-dd1c07bb4f-lite.chunk.js → 6821-64e989e2a3-lite.chunk.js} +0 -0
  338. /package/dist/scripts/{6822-22379e0863-lite.chunk.js → 6822-35fc1ff6f9-lite.chunk.js} +0 -0
  339. /package/dist/scripts/{6863-8cd402d9eb-lite.chunk.js → 6863-553198afff-lite.chunk.js} +0 -0
  340. /package/dist/scripts/{6866-6824b66ebf-lite.chunk.js → 6866-cb9b8d69cc-lite.chunk.js} +0 -0
  341. /package/dist/scripts/{6873-0a519bdd63-lite.chunk.js → 6873-b03c28b9d2-lite.chunk.js} +0 -0
  342. /package/dist/scripts/{689-f8a0b3579b-lite.chunk.js → 689-1c6a46496d-lite.chunk.js} +0 -0
  343. /package/dist/scripts/{6896-75b32c41e8-lite.chunk.js.LICENSE.txt → 6896-57a08030e2-lite.chunk.js.LICENSE.txt} +0 -0
  344. /package/dist/scripts/{6913-f2a9eea63b-lite.chunk.js → 6913-ff7af757fe-lite.chunk.js} +0 -0
  345. /package/dist/scripts/{6930-ee13531375-lite.chunk.js → 6930-9f739d475b-lite.chunk.js} +0 -0
  346. /package/dist/scripts/{7017-35c73244a6-lite.chunk.js.LICENSE.txt → 7017-ad460892cd-lite.chunk.js.LICENSE.txt} +0 -0
  347. /package/dist/scripts/{7030-7a8f86bff3-lite.chunk.js.LICENSE.txt → 7030-3d96a322d1-lite.chunk.js.LICENSE.txt} +0 -0
  348. /package/dist/scripts/{7045-9f5b1a325d-lite.chunk.js → 7045-2cb6237287-lite.chunk.js} +0 -0
  349. /package/dist/scripts/{7052-6f2b57ccae-lite.chunk.js.LICENSE.txt → 7052-6a2c889fad-lite.chunk.js.LICENSE.txt} +0 -0
  350. /package/dist/scripts/{7056-9a2e82c180-lite.chunk.js → 7056-6d3a7715c8-lite.chunk.js} +0 -0
  351. /package/dist/scripts/{7108-77bb6e5ecf-lite.chunk.js → 7108-4200867623-lite.chunk.js} +0 -0
  352. /package/dist/scripts/{7112-2f2e97d06b-lite.chunk.js.LICENSE.txt → 7112-4ac30d206c-lite.chunk.js.LICENSE.txt} +0 -0
  353. /package/dist/scripts/{7115-5db1073a16-lite.chunk.js → 7115-c73692fe3a-lite.chunk.js} +0 -0
  354. /package/dist/scripts/{7128-e0bcf26d2b-lite.chunk.js → 7128-87b101d7b7-lite.chunk.js} +0 -0
  355. /package/dist/scripts/{714-eaa48dfe1c-lite.chunk.js → 714-676e0b469a-lite.chunk.js} +0 -0
  356. /package/dist/scripts/{7172-d26b777727-lite.chunk.js → 7172-7dadcbf10c-lite.chunk.js} +0 -0
  357. /package/dist/scripts/{7221-a09f624297-lite.chunk.js.LICENSE.txt → 7221-93267ee8ca-lite.chunk.js.LICENSE.txt} +0 -0
  358. /package/dist/scripts/{7286-b3d20d94b0-lite.chunk.js → 7286-d0a18c7fc3-lite.chunk.js} +0 -0
  359. /package/dist/scripts/{7338-a11845d2a6-lite.chunk.js → 7338-e0306c666f-lite.chunk.js} +0 -0
  360. /package/dist/scripts/{7385-7c2bd72866-lite.chunk.js → 7385-f7e1626f26-lite.chunk.js} +0 -0
  361. /package/dist/scripts/{7409-04a3ff62e6-lite.chunk.js → 7409-899153bb90-lite.chunk.js} +0 -0
  362. /package/dist/scripts/{7422-164d07dc57-lite.chunk.js.LICENSE.txt → 7422-91954804ee-lite.chunk.js.LICENSE.txt} +0 -0
  363. /package/dist/scripts/{7432-85087e632c-lite.chunk.js → 7432-337ec5be0e-lite.chunk.js} +0 -0
  364. /package/dist/scripts/{7484-ea19d74c69-lite.chunk.js → 7484-ae53159046-lite.chunk.js} +0 -0
  365. /package/dist/scripts/{7706-1f9e23a067-lite.chunk.js → 7706-b577679244-lite.chunk.js} +0 -0
  366. /package/dist/scripts/{7767-606d7f700d-lite.chunk.js → 7767-5532313978-lite.chunk.js} +0 -0
  367. /package/dist/scripts/{7855-eaae706a6d-lite.chunk.js → 7855-4598a122c5-lite.chunk.js} +0 -0
  368. /package/dist/scripts/{7888-db27bfa50b-lite.chunk.js → 7888-82662e960a-lite.chunk.js} +0 -0
  369. /package/dist/scripts/{7925-f5bfc42b6b-lite.chunk.js → 7925-c8cd8aace8-lite.chunk.js} +0 -0
  370. /package/dist/scripts/{8025-2ea56fd143-lite.chunk.js → 8025-1982900b56-lite.chunk.js} +0 -0
  371. /package/dist/scripts/{8056-cedbf283d0-lite.chunk.js → 8056-795d736c97-lite.chunk.js} +0 -0
  372. /package/dist/scripts/{811-e36c29027f-lite.chunk.js → 811-f5a65fdd67-lite.chunk.js} +0 -0
  373. /package/dist/scripts/{817-297e0f95e8-lite.chunk.js → 817-d3fd0193a5-lite.chunk.js} +0 -0
  374. /package/dist/scripts/{8252-413339e753-lite.chunk.js → 8252-4e4c95417c-lite.chunk.js} +0 -0
  375. /package/dist/scripts/{8323-e22b13446b-lite.chunk.js.LICENSE.txt → 8323-077cca4d3c-lite.chunk.js.LICENSE.txt} +0 -0
  376. /package/dist/scripts/{8383-008c38045a-lite.chunk.js → 8383-8532439503-lite.chunk.js} +0 -0
  377. /package/dist/scripts/{8419-79cd038e70-lite.chunk.js → 8419-85c64f5ba5-lite.chunk.js} +0 -0
  378. /package/dist/scripts/{8621-29990b5bbe-lite.chunk.js → 8621-8cabf96744-lite.chunk.js} +0 -0
  379. /package/dist/scripts/{8681-7d0092afe1-lite.chunk.js.LICENSE.txt → 8681-8bea9c38e4-lite.chunk.js.LICENSE.txt} +0 -0
  380. /package/dist/scripts/{872-2d75e2e33f-lite.chunk.js → 872-dde4e48d7d-lite.chunk.js} +0 -0
  381. /package/dist/scripts/{8763-c745ed1ebb-lite.chunk.js → 8763-8fc868e00e-lite.chunk.js} +0 -0
  382. /package/dist/scripts/{8820-6ce2522615-lite.chunk.js → 8820-a5c21e7c23-lite.chunk.js} +0 -0
  383. /package/dist/scripts/{8830-a30a1fab45-lite.chunk.js → 8830-16c2fd1319-lite.chunk.js} +0 -0
  384. /package/dist/scripts/{8905-65f92f2dec-lite.chunk.js → 8905-039126dc2f-lite.chunk.js} +0 -0
  385. /package/dist/scripts/{8935-0d9c59e8b3-lite.chunk.js.LICENSE.txt → 8935-80c206852a-lite.chunk.js.LICENSE.txt} +0 -0
  386. /package/dist/scripts/{8955-93725cfefc-lite.chunk.js → 8955-62d7a85840-lite.chunk.js} +0 -0
  387. /package/dist/scripts/{9005-124f6fd09b-lite.chunk.js → 9005-fa68ac465b-lite.chunk.js} +0 -0
  388. /package/dist/scripts/{9038-af17e380bd-lite.chunk.js → 9038-6a301580ce-lite.chunk.js} +0 -0
  389. /package/dist/scripts/{9060-a48603af79-lite.chunk.js → 9060-aea36d49b0-lite.chunk.js} +0 -0
  390. /package/dist/scripts/{9151-049f79d533-lite.chunk.js → 9151-7da7f5dff4-lite.chunk.js} +0 -0
  391. /package/dist/scripts/{9264-ce6ee405f0-lite.chunk.js → 9264-5901a0f52d-lite.chunk.js} +0 -0
  392. /package/dist/scripts/{9325-8200a8eca7-lite.chunk.js → 9325-e487dde158-lite.chunk.js} +0 -0
  393. /package/dist/scripts/{9428-f581bbe764-lite.chunk.js.LICENSE.txt → 9428-9af52fa200-lite.chunk.js.LICENSE.txt} +0 -0
  394. /package/dist/scripts/{9455-fb7fbd114e-lite.chunk.js → 9455-283f477332-lite.chunk.js} +0 -0
  395. /package/dist/scripts/{9478-1978074e73-lite.chunk.js.LICENSE.txt → 9478-6f19948322-lite.chunk.js.LICENSE.txt} +0 -0
  396. /package/dist/scripts/{9484-1544749279-lite.chunk.js.LICENSE.txt → 9484-2a3aa518fd-lite.chunk.js.LICENSE.txt} +0 -0
  397. /package/dist/scripts/{9674-cd38b69de3-lite.chunk.js → 9674-25ccc9ee52-lite.chunk.js} +0 -0
  398. /package/dist/scripts/{9843-137761f2e1-lite.chunk.js → 9843-deb50808e7-lite.chunk.js} +0 -0
  399. /package/dist/scripts/{9894-b782130bb3-lite.chunk.js.LICENSE.txt → 9869-b6523c4972-lite.chunk.js.LICENSE.txt} +0 -0
  400. /package/dist/scripts/{9880-c7ad9079c0-lite.chunk.js → 9880-6705cdddfd-lite.chunk.js} +0 -0
  401. /package/dist/scripts/{9931-bc6b18ba05-lite.chunk.js.LICENSE.txt → 9894-1e493082b6-lite.chunk.js.LICENSE.txt} +0 -0
  402. /package/dist/scripts/{9899-f0463a5a59-lite.chunk.js → 9899-ac45bca2d6-lite.chunk.js} +0 -0
  403. /package/dist/scripts/{bundle-cf5e5a8090.min.js.LICENSE.txt → bundle-3e683090e2.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),u=t(83914),s=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(u.x,{svgName:l.vn.ChevronLeft,size:u.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(s,{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(s,{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:()=>w});var n=t(32735),c=t(82602),r=t(23481),i=t(36848),o=t(83345),l=t(76177),u=t(99742),s=t(14070),d=t(97291),m=t(19577);const v={status:"NXBdA"};var p;function f(e){return f="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},f(e)}function b(e,a,t){return(a=function(e){var a=function(e,a){if("object"!==f(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===f(a)?a:String(a)}(a))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",y="settings.localCacheItem",g=r.T.encloseNamespace(y),k=(b(p={},m._.Inactive,"offline"),b(p,m._.Active,"online"),b(p,m._.Updating,"updating"),p);function E(e,a){return a===m._.Active?g("justNow"):e&&e!==h?(0,c.WU)(e):g("never")}function w(e){var a=e.localCache,t=e.canManage,c=e.minimal,r=a.status,p=a.deviceName,f=a.deviceId,b=a.lastSeen,h=r===m._.Inactive?u.W.LocalCache.OFFLINE:u.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:h,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:g("lastSeen",{time:E(b,r)}),spanHackClassName:""},n.createElement(o.x,{namespace:y,phrase:k[r]})))),!c&&(t?n.createElement(i.F,{appLink:{application:d.O.SETTINGS,action:s.e.Settings.LOCAL_CACHE,args:[f]},className:"btn btn-link text-info mb-1"},n.createElement(o.x,{namespace:y,phrase:"canManage"})):n.createElement("div",{className:"btn text-muted text-muted mb-1"},n.createElement(o.x,{namespace:y,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,expiryTime:r.f.SHORT}}}},82602:(e,a,t)=>{t.d(a,{WU:()=>u});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 u=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,2 @@
1
+ /*! For license information please see 3789-c93bdc1db3-lite.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3789],{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 i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==r(e)||null===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)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}n.d(t,{n:()=>o});var o=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.listeners={}}var t,n;return t=e,n=[{key:"subscribe",value:function(e,t){this.registerListener(e,t)}},{key:"subscribeOnce",value:function(e,t){this.registerListener(e,t,1)}},{key:"unsubscribe",value:function(e,t){this.deregisterListener(e,t)}},{key:"trigger",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.triggerCallbacks(e,n)}},{key:"registerListener",value:function(e,t,n){var r;if("string"!=typeof e)throw new Error("Event name must be a string");if("function"!=typeof t)throw new Error("Event callback must be a function");if(n&&"number"!=typeof n)throw new Error("Execution limit must be a number or undefined");this.listeners[e]=null!==(r=this.listeners[e])&&void 0!==r?r:[],this.listeners[e].push({callback:t,executionLimit:n})}},{key:"deregisterListener",value:function(e,t){var n;if("string"!=typeof e)throw new Error("Event name must be a string");if(t&&"function"!=typeof t)throw new Error("Event callback must be a function");if(t){var r=null===(n=this.listeners[e])||void 0===n?void 0:n.findIndex((function(e){return e.callback===t}));"number"==typeof r&&-1!==r&&(this.listeners[e].splice(r,1),0===this.listeners[e].length&&delete this.listeners[e])}else this.listeners[e]=[]}},{key:"triggerCallbacks",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(this.listeners[e]){var o=[];this.listeners[e].forEach((function(e){var t,n;"number"==typeof e.executionLimit&&(e.executionCount=null!==(n=e.executionCount)&&void 0!==n?n:0,e.executionCount++,e.executionCount===e.executionLimit&&o.push(e.callback)),(t=e.callback).apply.apply(t,[null].concat(r))})),o.length&&o.forEach((function(n){return t.deregisterListener(e,n)}))}}}],n&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}())},26733:(e,t,n)=>{n.d(t,{s:()=>P,R:()=>O});var r=n(32735),i=n(39202),o=n(97395),a=n(49985),s=n(65858),u=n(36848),c=n(78276),l=n(76177),f=n(71063),h=n(54610),p=n(4594),y=n(1164),d=n(79967),v=n(67453);const b={imageStyle:"I9E5O",item:"tqUFn",background:"s1dNr",thumbnailContainer:"EDiGi",teacherPack:"_tdVE",text:"g5NWS",hoverState:"xRYhX",atomGuide:"X39wU",studentActivity:"X9pMl",additionalMaterials:"qRVUo",userUploaded:"_18JaV",imageTypeResource:"KYtZL"};var g={width:200,resizeType:h.Nq.Cover};function m(e,t){var n,r,i;if("thumbnail"in t&&(null===(n=t.thumbnail)||void 0===n?void 0:n.url))return v.j.createUrl(null===(r=t.thumbnail)||void 0===r?void 0:r.url,Object.assign({},g));var a=o._.safeUrlConcat(e,"/v1/previews");return"metadata"in t?t.metadata.type===y.L.Pdf?v.j.createResourceImage(a,t.url,g):t.metadata.type===y.L.Image?v.j.createUrl(t.url,{size:h.h2.Medium,resizeType:h.Nq.Cover}):(null===(i=t.pdf)||void 0===i?void 0:i.url)?v.j.createResourceImage(a,t.pdf.url,g):(t.metadata.type,y.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===y.L.Pdf?h.__.Pdf:e.metadata.type===y.L.Image?h.__.Thumbnails:(null===(t=e.pdf)||void 0===t?void 0:t.url)?h.__.Pdf:(e.metadata.type,y.L.Zip,h.__.Thumbnails):h.__.Link}function P(e){var t,n,i,o,a,u,f,h=null,p=0;"metadata"in e.data&&(h=e.data.metadata,p=null!==(i=null===(n=null===(t=e.data.thumbnail)||void 0===t?void 0:t.metadata)||void 0===n?void 0:n.rotation)&&void 0!==i?i:0);var d="".concat(null!==(a=null===(o=e.theme)||void 0===o?void 0:o.containerClass)&&void 0!==a?a:""," pt-3 px-3 rounded-3 d-flex flex-column align-items-center")+" justify-content-end ".concat(function(e){switch(e){case"atom-guide":return b.atomGuide;case"student-activity":return b.studentActivity;case"teacher-pack":return b.teacherPack;case"additional-materials":return b.additionalMaterials;default:return b.userUploaded}}(null==h?void 0:h.resourceType)," ").concat(b.background," ").concat(e.applyHoverState?b.hoverState:""," ");return r.createElement("div",{className:d},!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===(u=e.theme)||void 0===u?void 0:u.thumbnailContainerClass)&&void 0!==f?f:""," w-75 overflow-hidden ").concat(b.thumbnailContainer," ").concat(b.imageStyle)},r.createElement(c.Z,{data:m(e.imageCdnUrl,e.data),imageType:w(e.data),imageStyle:{transform:"rotate(".concat(p,"deg)")},alt:e.data.name,analyticsOptions:{location:s.LZ.SlidingListItem},errorFallbackImageSrc:e.imageErrorFallbackUrl,imageClassName:(null==h?void 0:h.type)===y.L.Image?"".concat(b.imageTypeResource," ").concat(b.imageStyle):"",preload:e.preloadImage,preventLoad:!e.preloadImage})))}P.defaultProps={preloadImage:!0,actionBehaviour:"normal"};var O=r.memo((function(e){var t,n,o,c,l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,[]),h=(t=e.data,n=e.actionBehaviour,c=(0,d.k)(),"public"===n||!c.xs&&!c.sm&&"resource"===t.type&&"metadata"in t&&(t.metadata.type===y.L.Image||(t.metadata.type===y.L.Pdf?!!t.url:!!(null===(o=t.pdf)||void 0===o?void 0:o.url)))),v=Object.assign(Object.assign({},e.analyticsData),e.data),g=Object.assign(Object.assign({},e.analyticsOptions),{actionType:s.Vw.Click,entity:e.data.typeId===p.E.Resource?s.py.Resource:s.py.Link});function m(){a.k.logUserAction(v,g)}var w,O=!!e.data.url;return l.applyHoverState=h||O,r.createElement("div",{className:"pt-1 px-1 flex-shrink-0 ".concat(b.item," ").concat(f.M.RESOURCE_ITEM_SELECTOR)},(w="d-block no-decoration","link"===e.data.type?r.createElement("a",{href:e.data.url,target:"_blank",className:w,onClick:m},r.createElement(P,Object.assign({},l))):h?"public"===e.actionBehaviour?r.createElement("div",{className:"".concat(w," cursor-pointer d-inline"),onClick:function(){m(),i.C$.trigger(e.getAppLink(e.data))}},r.createElement(P,Object.assign({},l))):r.createElement(u.F,{appLink:e.getAppLink(e.data),className:w,analyticsData:v,analyticsOptions:g},r.createElement(P,Object.assign({},l))):O?r.createElement("a",{href:e.data.url,className:w,onClick:m},r.createElement(P,Object.assign({},l))):r.createElement("div",{className:w},r.createElement(P,Object.assign({},l)))))}))},36:(e,t,n)=>{n.r(t),n.d(t,{ClickViewPlayer:()=>Tn});var r=n(32735),i=n(51482),o=(n(16852),n(93861));function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==a(e)||null===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)}(r.key),"symbol"===a(i)?i:String(i)),r)}var i}function u(){return u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},u.apply(this,arguments)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(f,e);var t,n,r,i,o=(r=f,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=l(r);if(i){var n=l(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function f(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(e=o.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=f,(n=[{key:"buildCSSClass",value:function(){return"cv-create-clip-button"}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){u(l(f.prototype),"handleClick",this).call(this,null)}}])&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(o.Z.getComponent("Button"));function h(e){return h="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},h(e)}function p(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,(void 0,i=function(e,t){if("object"!==h(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===h(i)?i:String(i)),r)}var i}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}f.prototype.controlText_="Create Clip",o.Z.registerComponent("CreateClipButton",f);var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=d(r);if(i){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=a,(n=[{key:"onReady",value:function(){var e,t=this.player.getChild("collapserator"),n=null===(e=null==t?void 0:t.children())||void 0===e?void 0:e.findIndex((function(e){return"CustomControlSpacer"===e.name()}));n&&-1!==n&&t.addChild("CreateClipButton",{clickHandler:this.options.onClick},n+1)}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));function b(e){return b="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},b(e)}function g(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,(void 0,i=function(e,t){if("object"!==b(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===b(i)?i:String(i)),r)}var i}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}o.Z.registerPlugin("createClipButtonPlugin",v);var P=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=w(r);if(i){var n=w(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"handlePictureInPictureEnabledChange",value:function(){this.enable()}}])&&g(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getComponent("PictureInPictureToggle"));function O(e){return O="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},O(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,(void 0,i=function(e,t){if("object"!==O(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==O(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===O(i)?i:String(i)),r)}var i}function k(){return k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=E(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}},k.apply(this,arguments)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}o.Z.registerComponent("PictureInPictureToggle",P);var C=o.Z.getComponent("PlayToggle"),T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=E(r);if(i){var n=E(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).pictureInPictureEnabled=!1,n.options=t,n.bindFunctions(),n}return t=a,(n=[{key:"bindFunctions",value:function(){this.requestPictureInPicture=this.requestPictureInPicture.bind(this),this.exitPictureInPicture=this.exitPictureInPicture.bind(this),this.onPlayerResize=this.onPlayerResize.bind(this),this.playerRequestPictureInPictureFn=this.player.requestPictureInPicture,this.playerExitPictureInPictureFn=this.player.exitPictureInPicture,this.player.requestPictureInPicture=this.requestPictureInPicture,this.player.exitPictureInPicture=this.exitPictureInPicture}},{key:"enablePictureInPicture",value:function(){var e=this;if(this.player.options_.fluid&&!this.pictureInPictureEnabled){var t=this.getToggleParentComponent();if(t){this.pictureInPictureEnabled=!0;var n=t.children().findIndex((function(e){var t;return"fullscreentoggle"===(null===(t=e.name())||void 0===t?void 0:t.toLowerCase())}));-1===n&&(n=t.children().length-1),t.addChild("pictureInPictureToggle",{},n);var r=t.getChild("pictureInPictureToggle");null==r||r.enable(),this.player.on("playerresize",this.onPlayerResize),this.player.on("dispose",(function(){var t;null===(t=e.player)||void 0===t||t.off("playerresize",e.onPlayerResize)}))}}}},{key:"disablePictureInPicture",value:function(){if(this.pictureInPictureEnabled){this.pictureInPictureEnabled=!1;var e=this.getToggleParentComponent(),t=null==e?void 0:e.getChild("pictureInPictureToggle");t&&e.removeChild(t),this.player.off("playerresize",this.onPlayerResize)}}},{key:"togglePictureInPicture",value:function(e){if(e!==this.player.isInPictureInPicture()){var t=e?"enterpictureinpicture":"leavepictureinpicture";this.player.isInPictureInPicture(e),this.player.trigger(t),e?this.addPipStyles():this.removePipStyles()}}},{key:"onPlayerResize",value:function(){if(!this.player.isInPictureInPicture()){var e=this.player.el().getBoundingClientRect();0!==e.width&&(e.width<800?this.disablePictureInPicture():this.enablePictureInPicture())}}},{key:"addPipStyles",value:function(){this.player.addClass("cv-picture-in-picture"),this.playToggle=new C(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,k(E(a.prototype),"dispose",this).call(this)}}])&&S(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("pictureInPicture",T);var x=n(23035),_=n(42892),I=n(73758);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 M(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,(void 0,i=function(e,t){if("object"!==R(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==R(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===R(i)?i:String(i)),r)}var i}function L(){return L="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}},L.apply(this,arguments)}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}function N(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},B(e)}var F=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=B(r);if(i){var n=B(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===R(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return N(e)}(this,e)});function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=a.call(this,e,t)).hasBuffered=!1,n.hasPlayed=!1,n.eventsService=I.n,n.pointOfInterest=t.pointOfInterest,n.onMouseOver=n.onMouseOver.bind(N(n)),n.onMouseLeave=n.onMouseLeave.bind(N(n)),n.onGlancePointOfInterestMouseEnter=n.onGlancePointOfInterestMouseEnter.bind(N(n)),n.onGlancePointOfInterestMouseLeave=n.onGlancePointOfInterestMouseLeave.bind(N(n)),n.initialize(),n}return t=s,(n=[{key:"initialize",value:function(){this.setPosition(),this.bindListeners()}},{key:"buildCSSClass",value:function(){return"cv-point-of-interest-indicator ".concat(L(B(s.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return L(B(s.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"bindListeners",value:function(){this.on("mouseover",this.onMouseOver),this.on("mouseleave",this.onMouseLeave),this.eventsService.subscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.subscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"dispose",value:function(){this.eventsService.unsubscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.unsubscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"getPointOfInterestTime",value:function(){return this.pointOfInterest.startTime}},{key:"setPosition",value:function(){var e=this.player().duration();this.el_.style.left=this.getPointOfInterestTime()/e*100+"%"}},{key:"updateBuffered",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasBuffered){this.hasBuffered=t;var n="cv-point-of-interest-indicator-buffered";this.hasBuffered?this.addClass(n):this.removeClass(n)}}},{key:"updatePlaybackProgress",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasPlayed){this.hasPlayed=t;var n="cv-point-of-interest-indicator-played";t?this.addClass(n):this.removeClass(n)}}},{key:"toggleVisibility",value:function(e){var t="cv-point-of-interest-indicator-hidden";e?this.removeClass(t):this.addClass(t)}},{key:"onMouseOver",value:function(){this.setTimeTooltipText(),this.eventsService.trigger("player:poi:mouseover",this.pointOfInterest)}},{key:"onMouseLeave",value:function(){this.clearTimeTooltipText(),this.eventsService.trigger("player:poi:mouseleave")}},{key:"onGlancePointOfInterestMouseEnter",value:function(e){e.id===this.pointOfInterest.id&&(this.addClass("cv-point-of-interest-indicator-highlight"),this.setTimeTooltipTime(),this.setTimeTooltipText(),this.positionMouseTimeDisplay(),this.showMouseTimeDisplay())}},{key:"onGlancePointOfInterestMouseLeave",value:function(){this.removeClass("cv-point-of-interest-indicator-highlight"),this.hideMouseTimeDisplay()}},{key:"setTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText(this.pointOfInterest.description)}},{key:"clearTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText()}},{key:"setTimeTooltipTime",value:function(){var e=this.getTimeTooltip();null==e||e.updateTime(this.getPointOfInterestTime())}},{key:"positionMouseTimeDisplay",value:function(){var e,t,n=null===(e=this.getSeekBar())||void 0===e?void 0:e.el();if(n){var r=o.Z.dom.findPosition(n),i=this.getPointOfInterestTime()/this.player().duration();null===(t=this.getMouseTimeDisplay())||void 0===t||t.update(r,i)}}},{key:"showMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.forceShow()}},{key:"hideMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.removeForceShow()}},{key:"getSeekBar",value:function(){var e;return null===(e=this.player().controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar")}},{key:"getMouseTimeDisplay",value:function(){var e;return null===(e=this.getSeekBar())||void 0===e?void 0:e.getChild("MouseTimeDisplay")}},{key:"getTimeTooltip",value:function(){var e;return null===(e=this.getMouseTimeDisplay())||void 0===e?void 0:e.getChild("TimeTooltip")}}])&&M(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("Component"));function V(e){return V="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},V(e)}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==V(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==V(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===V(i)?i:String(i)),r)}var i}function U(){return U="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=z(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},U.apply(this,arguments)}function Z(e,t){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Z(e,t)}function z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},z(e)}var G=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Z(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=z(r);if(i){var n=z(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===V(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=a.call(this,e,t)).pointsOfInterestVisible=t.pointsOfInterestVisible,n.toggle(n.pointsOfInterestVisible),n}return t=s,(n=[{key:"handleToggle",value:function(){this.toggle(!this.pointsOfInterestVisible)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){o.Z.dom.addClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!0,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"toggleOff",value:function(){o.Z.dom.removeClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!1,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,t,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=o.Z.dom.createEl("div",{className:"custom-toggle toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=U(z(s.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Points of Interest</span>\n <span class="cv-toggle-container"></span>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&A(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("MenuItem"));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 H(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,(void 0,i=function(e,t){if("object"!==q(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==q(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===q(i)?i:String(i)),r)}var i}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W(e,t)}function Y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $(e){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$(e)}o.Z.registerComponent("PointsOfInterestMenuItem",G);var Q=o.Z.getPlugin("plugin"),X="cvplayer-points-of-interest",J=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=$(r);if(i){var n=$(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===q(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Y(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e)).pointOfInterestIndicators=[],n.enabled=!0,n.pointsOfInterest=null==t?void 0:t.pointsOfInterest,n.initialize=n.initialize.bind(Y(n)),n.updateBuffered=n.updateBuffered.bind(Y(n)),n.updatePlaybackProgress=n.updatePlaybackProgress.bind(Y(n)),n.player.one("loadedmetadata",(function(){return n.player.ready(n.initialize)})),n}return t=a,(n=[{key:"initialize",value:function(){this.pointsOfInterest&&(_.S.hasLocalStorage()&&"false"===_.S.get(X)&&(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){_.S.set(X,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 F(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:G,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updateBuffered((0,x.b)(e.player))}))}},{key:"updatePlaybackProgress",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updatePlaybackProgress(e.player.currentTime())}))}}])&&H(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Q);o.Z.registerPlugin("pointsOfInterestPlugin",J),n(93262);var K=n(65858),ee=n(95569),te=function(){var e,t;return null!==(t=null===(e=window.crypto)||void 0===e?void 0:e.randomUUID())&&void 0!==t?t:Math.random().toString()};function ne(e){var t="function"==typeof Map?new Map:void 0;return ne=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return re(e,arguments,ae(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),oe(n,e)},ne(e)}function re(e,t,n){return re=ie()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&oe(i,n.prototype),i},re.apply(null,arguments)}function ie(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function oe(e,t){return oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oe(e,t)}function ae(e){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ae(e)}function se(e){return se="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},se(e)}function ue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ce(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,(void 0,i=function(e,t){if("object"!==se(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==se(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===se(i)?i:String(i)),r)}var i}function le(e,t,n){return t&&ce(e.prototype,t),n&&ce(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var fe=function(){function e(){ue(this,e),this.callbacks=[],this.predicates=[],this.controller=new AbortController,this.signal=this.controller.signal,this.trigger=this.trigger.bind(this),this.on=this.on.bind(this),this.one=this.one.bind(this),this.off=this.off.bind(this),this.dispose=this.dispose.bind(this),this.isDisposed=this.isDisposed.bind(this)}return le(e,[{key:"trigger",value:function(e){var t=this;this.callbacks.forEach((function(n,r){var i=t.predicates[r];i&&!i(e)||n(e)}))}},{key:"on",value:function(e){var t=this;this.isDisposed()&&console.warn("This EventChannel instance been disposed - this is a no-op");var n=this.callbacks.length;this.callbacks[n]=e,this.predicates[n]=function(){return!0};var r=function(){t.off(e)};return{off:r,filter:function(e){return t.predicates[n]=e,r}}}},{key:"one",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0};return this.isDisposed()?he.reject(new Error("This EventChannel instance has been disposed")):new he((function(r,i){e=t.on((function(n){t.signal.removeEventListener("abort",o),e(),r(n)})).filter(n);var o=function(){e(),i(new Error("Aborted while waiting for message"))};t.signal.addEventListener("abort",o,{once:!0})}),(function(){e()}))}},{key:"off",value:function(e){var t=this.callbacks.indexOf(e);-1!==t&&(this.callbacks.splice(t,1),this.predicates.splice(t,1))}},{key:"dispose",value:function(){this.callbacks.length=0,this.predicates.length=0,this.controller.abort()}},{key:"isDisposed",value:function(){return this.signal.aborted}}]),e}(),he=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oe(e,t)}(i,e);var t,n,r=(t=i,n=ie(),function(){var e,r=ae(t);if(n){var i=ae(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return function(e,t){if(t&&("object"===se(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function i(e,t){var n;return ue(this,i),(n=r.call(this,e)).onTimeout=t,n.bindFunctions(),n}return le(i,[{key:"bindFunctions",value:function(){this.timeout=this.timeout.bind(this)}},{key:"timeout",value:function(e){var t=this;return new Promise((function(n,r){t.then(n).catch(r).finally((function(){return clearTimeout(i)}));var i=setTimeout((function(){var e;null===(e=t.onTimeout)||void 0===e||e.call(t),r(new Error("Promise timed out"))}),e)}))}}],[{key:"reject",value:function(e){return new i((function(t,n){return n(e)}))}}]),i}(ne(Promise)),pe=function(){function e(){ue(this,e),this.channels={},this.trigger=this.trigger.bind(this),this.on=this.on.bind(this),this.one=this.one.bind(this),this.off=this.off.bind(this),this.dispose=this.dispose.bind(this),this.getChannel=this.getChannel.bind(this)}return le(e,[{key:"trigger",value:function(e,t){this.getChannel(e).trigger(t)}},{key:"on",value:function(e,t){return this.getChannel(e).on(t)}},{key:"one",value:function(e,t){return this.getChannel(e).one(t)}},{key:"off",value:function(e,t){this.getChannel(e).off(t)}},{key:"dispose",value:function(){this.trigger("dispose",ye.void),Object.values(this.channels).forEach((function(e){return e.dispose()})),this.channels={}}},{key:"getChannel",value:function(e){return this.channels[e]||(this.channels[e]=new fe),this.channels[e]}}]),e}(),ye={void:void 0};function de(e){return de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},de(e)}function ve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==de(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==de(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===de(i)?i:String(i)),r)}var i}var be=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bindFunctions()}var t,n;return t=e,(n=[{key:"bindFunctions",value:function(){this.schedule=this.schedule.bind(this),this.every=this.every.bind(this),this.trigger=this.trigger.bind(this),this.start=this.start.bind(this),this.stop=this.stop.bind(this)}},{key:"schedule",value:function(e){return this.task=e,this}},{key:"every",value:function(e){return this.intervalInMilliseconds=e,this}},{key:"trigger",value:function(){var e;return null===(e=this.task)||void 0===e||e.call(this,this),this}},{key:"start",value:function(){var e=this;return this.intervalId||(this.intervalId=setInterval((function(){return e.trigger()}),this.intervalInMilliseconds)),this}},{key:"stop",value:function(){return this.intervalId&&(clearInterval(this.intervalId),this.intervalId=void 0),this}}])&&ve(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();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,(void 0,i=function(e,t){if("object"!==ge(e)||null===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)}(r.key),"symbol"===ge(i)?i:String(i)),r)}var i}var we,Pe={reconnectIntervalInMilliseconds:3e3,heartbeatEnabled:!1,heartbeatIntervalInMillseconds:1e4,heartbeatMessage:""},Oe=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pe;!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({},Pe),r),this.webSocket=this.connect(),this.heartbeat=(new be).schedule((function(){return n.send(n.options.heartbeatMessage)})).every(this.options.heartbeatIntervalInMillseconds)}var t,n;return t=e,(n=[{key:"bindFunctions",value:function(){this.cleanup=this.cleanup.bind(this),this.handleOpen=this.handleOpen.bind(this),this.handleMessage=this.handleMessage.bind(this),this.handleClose=this.handleClose.bind(this),this.handleError=this.handleError.bind(this),this.connect=this.connect.bind(this),this.send=this.send.bind(this),this.dipose=this.dipose.bind(this)}},{key:"cleanup",value:function(){this.heartbeat.stop(),this.webSocket.removeEventListener("error",this.handleError),this.webSocket.removeEventListener("message",this.handleMessage),this.webSocket.removeEventListener("open",this.handleOpen),this.webSocket.removeEventListener("close",this.handleClose)}},{key:"handleOpen",value:function(e){var t;null===(t=this.onOpen)||void 0===t||t.call(this,e),this.options.heartbeatEnabled&&this.heartbeat.start()}},{key:"handleMessage",value:function(e){var t;null===(t=this.onMessage)||void 0===t||t.call(this,e)}},{key:"handleClose",value:function(e){var t,n=this;null===(t=this.onClose)||void 0===t||t.call(this,e),this.cleanup(),setTimeout((function(){n.webSocket=n.connect()}),this.options.reconnectIntervalInMilliseconds)}},{key:"handleError",value:function(e){var t;null===(t=this.onError)||void 0===t||t.call(this,e),this.handleClose()}},{key:"connect",value:function(){var e=new WebSocket(this.url);return e.addEventListener("open",this.handleOpen),e.addEventListener("message",this.handleMessage),e.addEventListener("close",this.handleClose),e.addEventListener("error",this.handleError),e}},{key:"send",value:function(e){this.webSocket.send(e)}},{key:"dipose",value:function(){this.cleanup(),this.webSocket.close()}}])&&me(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Se(e){return Se="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},Se(e)}function ke(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,(void 0,i=function(e,t){if("object"!==Se(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Se(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===Se(i)?i:String(i)),r)}var i}!function(e){e.AppleTv="apple-tv",e.Vivi="vivi"}(we||(we={}));var je=function(){function e(t,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._timerStartedAt=0,this._lastModified={},this.position=0,this.duration=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=this.withDebouncedSetters(),this.withTimestampedSetters()}var t,n;return t=e,(n=[{key:"position",get:function(){return this._position+this.getTimerDurationInSeconds()},set:function(e){this._position=e,this.restartTimer()}},{key:"playing",get:function(){return this._playing},set:function(e){this._playing=e,e?this.restartTimer():(this._position+=this.getTimerDurationInSeconds(),this.stopTimer())}},{key:"restartTimer",value:function(){this._timerStartedAt=Date.now()}},{key:"stopTimer",value:function(){this._timerStartedAt=0}},{key:"getTimerDurationInSeconds",value:function(){return this._timerStartedAt?(Date.now()-this._timerStartedAt)/1e3:0}},{key:"withDebouncedSetters",value:function(){var e=this;return new Proxy(this,{set:function(t,n,r,i){var o=e._lastModified[n.toString()];return!!(o&&Date.now()<o+2e3)||Reflect.set(t,n,r,i)}})}},{key:"withTimestampedSetters",value:function(){var e=this;return new Proxy(this,{set:function(t,n,r,i){return e._lastModified[n.toString()]=Date.now(),Reflect.set(t,n,r,i)}})}}])&&ke(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ee(e){return Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ee(e)}function Ce(){Ce=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",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=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 _(r||[]);return i(a,"_invoke",{value:E(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function b(){}function g(){}function m(){}var w={};c(w,a,(function(){return this}));var P=Object.getPrototypeOf,O=P&&P(P(I([])));O&&O!==n&&r.call(O,a)&&(w=O);var S=m.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Ee(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.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 E(t,n,r){var i=h;return function(o,a){if(i===y)throw new Error("Generator is already running");if(i===d){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?d:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=d,r.method="throw",r.arg=c.arg)}}}function C(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,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Ee(t)+" is not iterable")}return g.prototype=m,i(S,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:g,configurable:!0}),g.displayName=c(m,u,"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,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},k(j.prototype),c(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),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Te(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,(void 0,i=function(e,t){if("object"!==Ee(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Ee(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===Ee(i)?i:String(i)),r)}var i}function xe(){return xe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ie(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},xe.apply(this,arguments)}function _e(e,t){return _e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_e(e,t)}function Ie(e){return Ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ie(e)}var Re=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Me=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_e(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ie(r);if(i){var n=Ie(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this)).client=e,n.localState=new je(t.title,t.device),n.bindFunctions(),n.initialize(),n}return t=a,(n=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.dispose=this.dispose.bind(this),this.handleClientConnected=this.handleClientConnected.bind(this),this.handleDisconnectMessage=this.handleDisconnectMessage.bind(this),this.handleAllVideoMessages=this.handleAllVideoMessages.bind(this),this.handleUpdateMessage=this.handleUpdateMessage.bind(this),this.handleVolumeMessage=this.handleVolumeMessage.bind(this),this.handlePlayingMessage=this.handlePlayingMessage.bind(this),this.handlePausedMessage=this.handlePausedMessage.bind(this),this.handleFinishedMessage=this.handleFinishedMessage.bind(this),this.handleNewChapterMessage=this.handleNewChapterMessage.bind(this),this.handleStoppedMessage=this.handleStoppedMessage.bind(this),this.loadSource=this.loadSource.bind(this),this.play=this.play.bind(this),this.pause=this.pause.bind(this),this.seek=this.seek.bind(this),this.setVolume=this.setVolume.bind(this),this.isPlaying=this.isPlaying.bind(this),this.getPosition=this.getPosition.bind(this),this.getDuration=this.getDuration.bind(this),this.getVolume=this.getVolume.bind(this)}},{key:"initialize",value:function(){var e=this;this.client.on("dispose",this.dispose),this.client.on("connected",this.handleClientConnected),this.client.on("message",this.handleDisconnectMessage).filter((function(t){return t.source===e.getDevice().id&&"disconnect"===t.message.type})),this.client.on("message",this.handleAllVideoMessages).filter((function(t){return t.source===e.getDevice().id&&"video_event"===t.message.type}))}},{key:"dispose",value:function(){this.client.off("dispose",this.dispose),this.client.off("connected",this.handleClientConnected),this.client.off("message",this.handleDisconnectMessage),this.client.off("message",this.handleAllVideoMessages),this.client.stop(this.getDevice().id).catch(ee.ZT),xe(Ie(a.prototype),"dispose",this).call(this)}},{key:"handleClientConnected",value:function(){return Re(this,void 0,void 0,Ce().mark((function e(){return Ce().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={update:this.handleUpdateMessage,volume:this.handleVolumeMessage,playing:this.handlePlayingMessage,paused:this.handlePausedMessage,finished:this.handleFinishedMessage,new_chapter:this.handleNewChapterMessage,stopped:this.handleStoppedMessage}[e.message.payload.event];t&&t(this.localState.debounced,e.message.payload.params||{})}},{key:"handleUpdateMessage",value:function(e,t){e.duration!==t.duration&&(e.duration=t.duration,this.trigger("durationchange",ye.void)),e.position!==t.position&&(e.position=t.position,this.trigger("positionchange",ye.void)),e.subtitles!==t.subtitles&&(e.subtitles=t.subtitles,this.trigger("subtitleschange",ye.void))}},{key:"handleVolumeMessage",value:function(e,t){e.volume!==t.level&&(e.volume=t.level,e.mute=0===t.level,this.trigger("volumechange",ye.void))}},{key:"handlePlayingMessage",value:function(e){!0!==e.playing&&(e.playing=!0,e.playbackFinished=!1,this.trigger("playingchange",ye.void))}},{key:"handlePausedMessage",value:function(e){!1!==e.playing&&(e.playing=!1,this.trigger("playingchange",ye.void))}},{key:"handleFinishedMessage",value:function(e){!0!==e.playbackFinished&&(e.playing=!1,e.playbackFinished=!0,this.trigger("playingchange",ye.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",ye.void))}},{key:"handleStoppedMessage",value:function(){this.dispose()}},{key:"loadSource",value:function(e,t){return Re(this,void 0,void 0,Ce().mark((function n(){var r,i;return Ce().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",ye.void),i>0&&this.client.seek(r,i),n.next=20;break;case 17:n.prev=17,n.t0=n.catch(2),this.trigger("error",n.t0);case 20:case"end":return n.stop()}}),n,this,[[2,17]])})))}},{key:"play",value:function(){this.localState.ready&&!0!==this.localState.playing&&(this.localState.playing=!0,this.client.play(this.getDevice().id),this.trigger("playingchange",ye.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",ye.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",ye.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",ye.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",ye.void))}},{key:"setSubtitles",value:function(e){return Re(this,void 0,void 0,Ce().mark((function t(){var n;return Ce().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",ye.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}}])&&Te(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(pe);function Le(e){return Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Le(e)}function De(){De=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",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=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 _(r||[]);return i(a,"_invoke",{value:E(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function b(){}function g(){}function m(){}var w={};c(w,a,(function(){return this}));var P=Object.getPrototypeOf,O=P&&P(P(I([])));O&&O!==n&&r.call(O,a)&&(w=O);var S=m.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Le(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){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.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 E(t,n,r){var i=h;return function(o,a){if(i===y)throw new Error("Generator is already running");if(i===d){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?d:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=d,r.method="throw",r.arg=c.arg)}}}function C(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,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function I(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(Le(t)+" is not iterable")}return g.prototype=m,i(S,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:g,configurable:!0}),g.displayName=c(m,u,"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,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},k(j.prototype),c(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),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Ne(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,(void 0,i=function(e,t){if("object"!==Le(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Le(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===Le(i)?i:String(i)),r)}var i}function Be(){return Be="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=Ve(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}},Be.apply(this,arguments)}function Fe(e,t){return Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fe(e,t)}function Ve(e){return Ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ve(e)}var Ae=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Ue=1e4,Ze=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fe(e,t)}(s,e);var t,n,r,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ve(i);if(o){var n=Ve(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Le(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this)).options=e,t.accessToken="",t.devices=[],t.devicesFingerprint="",t.deviceDiscovery=new be,t.bindFunctions(),t.initialize(),t}return t=s,r=[{key:"createAckId",value:function(){return te()}},{key:"calculateFingerprint",value:function(e){return e.map((function(e){return e.id})).sort().join(",")}}],(n=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.beginDeviceDiscovery=this.beginDeviceDiscovery.bind(this),this.dispose=this.dispose.bind(this),this.sendMessage=this.sendMessage.bind(this),this.sendMessageDebounced=(0,ee.Ds)(this.sendMessage,500,!0),this.getDevices=this.getDevices.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 Oe(this.options.url.toString()),this.webSocket.onMessage=function(t){return e.trigger("message",JSON.parse(t.data))},this.webSocket.onOpen=function(){return Ae(e,void 0,void 0,De().mark((function e(){return De().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",ye.void),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),this.trigger("error",e.t0);case 13:case"end":return e.stop()}}),e,this,[[0,10]])})))}}},{key:"beginDeviceDiscovery",value:function(){var e=this;this.deviceDiscovery.every(1e4).schedule((function(){return Ae(e,void 0,void 0,De().mark((function e(){var t,n;return De().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.getRoomList();case 3:if(t=e.sent,(n=s.calculateFingerprint(t))!==this.devicesFingerprint){e.next=7;break}return e.abrupt("return");case 7:this.devices=t.map((function(e){return{id:e.id,name:e.name,type:we.Vivi,available:!0}})),this.devicesFingerprint=n,this.trigger("deviceschange",ye.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(),Be(Ve(s.prototype),"dispose",this).call(this)}},{key:"sendMessage",value:function(e){var t;null===(t=this.webSocket)||void 0===t||t.send(JSON.stringify(e))}},{key:"canCastToDevice",value:function(e){return e===we.Vivi}},{key:"getDevices",value:function(){return this.devices}},{key:"startCastSession",value:function(e){return new Me(this,e)}},{key:"authenticateWithVivi",value:function(){return Ae(this,void 0,void 0,De().mark((function e(){return De().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(Ue).catch((function(){throw new Error("Failed to authenticate with Vivi")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getRoomList",value:function(){return Ae(this,void 0,void 0,De().mark((function e(){var t;return De().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(Ue).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 Ae(this,void 0,void 0,De().mark((function t(){return De().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(Ue).catch((function(){throw new Error("Failed to join room")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"query",value:function(e){return Ae(this,void 0,void 0,De().mark((function t(){var n;return De().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=s.createAckId(),this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:n,name:"query"}}),t.next=4,this.one("message",(function(e){return e.message.ack_id===n})).timeout(Ue).catch((function(){throw new Error("Failed to fetch query")}));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"loadQueue",value:function(e){var t=e.roomId,n=e.title,r=e.videoSource,i=e.subtitleSource;return Ae(this,void 0,void 0,De().mark((function e(){return De().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:t,message:{type:"message_with_ack",ack_id:s.createAckId(),name:"queue_load",payload:{urls:[{title:n,url:r,suburl:i}]}}}),e.next=3,this.one("message",(function(e){var n;return e.source===t&&"ready"===(null===(n=e.message.payload)||void 0===n?void 0:n.event)})).timeout(Ue).catch((function(){throw new Error("Failed to load media")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"play",value:function(e){return Ae(this,void 0,void 0,De().mark((function t(){return De().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(Ue).catch((function(){throw new Error("Failed to play video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"pause",value:function(e){return Ae(this,void 0,void 0,De().mark((function t(){return De().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(Ue).catch((function(){throw new Error("Failed to pause video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"stop",value:function(e){return Ae(this,void 0,void 0,De().mark((function t(){return De().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(Ue).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 Ae(this,void 0,void 0,De().mark((function n(){return De().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(Ue).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 Ae(this,void 0,void 0,De().mark((function n(){return De().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(Ue).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 Ae(this,void 0,void 0,De().mark((function n(){return De().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(Ue).catch((function(){throw new Error("Failed to set mute")}));case 3:case"end":return n.stop()}}),n,this)})))}},{key:"setSubtitles",value:function(e,t){return Ae(this,void 0,void 0,De().mark((function n(){var r;return De().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=s.createAckId(),this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:r,name:"set_subtitles",payload:{subtitles:t}}}),n.next=4,this.one("message",(function(t){return t.source===e&&t.message.ack_id===r})).timeout(Ue).catch((function(){throw new Error("Failed to set subtitles")}));case 4:case"end":return n.stop()}}),n,this)})))}}])&&Ne(t.prototype,n),r&&Ne(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(pe);function ze(e){return ze="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},ze(e)}function Ge(e){return function(e){if(Array.isArray(e))return qe(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 qe(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)?qe(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 qe(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 He(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,(void 0,i=function(e,t){if("object"!==ze(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==ze(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===ze(i)?i:String(i)),r)}var i}function We(){return We="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=$e(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}},We.apply(this,arguments)}function Ye(e,t){return Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ye(e,t)}function $e(e){return $e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$e(e)}var Qe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ye(e,t)}(s,e);var t,n,r,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=$e(i);if(o){var n=$e(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===ze(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this)).instanceId=e,t.clients=[],t.bindFunctions(),t}return t=s,r=[{key:"getOrCreateInstance",value:function(e){if(!e)throw new Error("instanceId is required");return this.instances[e]||(this.instances[e]=new s(e)),this.instances[e]}},{key:"disposeAndRemoveInstance",value:function(e){e.dispose(),delete this.instances[e.instanceId]}},{key:"isActive",value:function(){return Object.keys(this.instances).length>0}}],(n=[{key:"bindFunctions",value:function(){this.addClient=this.addClient.bind(this),this.hasInstanceOfClient=this.hasInstanceOfClient.bind(this),this.startCastSession=this.startCastSession.bind(this),this.gatherAndPublishDevices=this.gatherAndPublishDevices.bind(this),this.dispose=this.dispose.bind(this)}},{key:"addClient",value:function(e){var t=this;e.on("deviceschange",this.gatherAndPublishDevices),e.on("error",(function(e){return t.trigger("error",e)})),this.clients.push(e)}},{key:"hasInstanceOfClient",value:function(e){return this.clients.some((function(t){return t instanceof e}))}},{key:"startCastSession",value:function(e){var t=this;if(this.castSession){if(this.castSession.getDevice().id===e.device.id)return void console.info("A session with device ".concat(e.device.id," already exists - this is a no-op"));this.castSession.dispose()}var n=this.clients.find((function(t){return t.canCastToDevice(e.device.type)}));n&&(this.castSession=n.startCastSession(e),this.castSession.on("error",(function(e){t.castSession.dispose(),t.trigger("error",e)})),this.castSession.on("dispose",(function(){t.castSession=void 0,t.trigger("castsessionchange",void 0)})),this.trigger("castsessionchange",this.castSession))}},{key:"getCastSession",value:function(){return this.castSession}},{key:"gatherAndPublishDevices",value:function(){var e=this.clients.map((function(e){return e.getDevices()})).reduce((function(e,t){return[].concat(Ge(e),Ge(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=[],We($e(s.prototype),"dispose",this).call(this)}}])&&He(t.prototype,n),r&&He(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(pe);Qe.instances={};var Xe=n(30050),Je=n(98115);function Ke(e){return Ke="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},Ke(e)}function et(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,(void 0,i=function(e,t){if("object"!==Ke(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Ke(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===Ke(i)?i:String(i)),r)}var i}function tt(){return tt="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=it(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}},tt.apply(this,arguments)}function nt(e,t){return nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nt(e,t)}function rt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function it(e){return it=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},it(e)}var ot=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=it(r);if(i){var n=it(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ke(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return rt(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).isVisible=n.isVisible.bind(rt(n)),n}return t=a,(n=[{key:"createEl",value:function(){return tt(it(a.prototype),"createEl",this).call(this,"li",{className:"vjs-menu-item cv-device-menu-item",innerHTML:'\n <span class="cv-device-icon '.concat({vivi:"cv-vivi-icon","apple-tv":"cv-apple-icon"}[this.options_.type],'"></span>\n <span class="vjs-menu-item-text">').concat(this.options_.label,"</span>\n ")})}},{key:"handleClick",value:function(){this.options_.onClick()}},{key:"show",value:function(){tt(it(a.prototype),"show",this).call(this)}},{key:"hide",value:function(){tt(it(a.prototype),"hide",this).call(this)}},{key:"isVisible",value:function(){return!tt(it(a.prototype),"hasClass",this).call(this,"vjs-hidden")}}])&&et(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getComponent("MenuItem"));function at(e){return at="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},at(e)}function st(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,(void 0,i=function(e,t){if("object"!==at(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==at(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===at(i)?i:String(i)),r)}var i}function ut(){return ut="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=lt(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}},ut.apply(this,arguments)}function ct(e,t){return ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ct(e,t)}function lt(e){return lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},lt(e)}var ft=o.Z.getComponent("MenuButton"),ht=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ct(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=lt(r);if(i){var n=lt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===at(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).alwaysCollapsed=!1,n.isCollapsed=!1,n.isCollabsible=!0,n.searchText="",n.devices=[],n.castSession=void 0,n.bindFunctions(),n.bindEventListeners(),n}return t=a,n=[{key:"bindFunctions",value:function(){this.bindEventListeners=this.bindEventListeners.bind(this),this.setDevices=this.setDevices.bind(this),this.setCastSession=this.setCastSession.bind(this),this.setSearchText=this.setSearchText.bind(this),this.getDeviceMenuItems=this.getDeviceMenuItems.bind(this),this.render=this.render.bind(this),this.removeMenuItems=this.removeMenuItems.bind(this),this.addMenuItemsForDevices=this.addMenuItemsForDevices.bind(this),this.shouldShowSearchInput=this.shouldShowSearchInput.bind(this),this.toggleSearchInput=this.toggleSearchInput.bind(this),this.toggleDeviceMenuItems=this.toggleDeviceMenuItems.bind(this),this.toggleEmptyStatePlaceholder=this.toggleEmptyStatePlaceholder.bind(this)}},{key:"bindEventListeners",value:function(){var e=this,t=this.$("button"),n=function(t){e.menu.handleBlur(t)};t.addEventListener("blur",n),this.one("dispose",(function(){t.removeEventListener("blur",n)}))}},{key:"createEl",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=ft.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-devices-button ".concat(ut(lt(a.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=this,t=[];return this.headingItem=new Xe.Z(this.player_,{label:this.localize("Select a device"),selectable:!1}),this.searchInputItem=new Je.Z(this.player_,{menuButton:this,search:function(t){return e.setSearchText(t)},className:"cv-devices-search-input"}),this.emptyPlaceholder=new Je.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;ut(lt(a.prototype),"pressButton",this).call(this),this.shouldShowSearchInput()&&(null===(e=this.searchInputItem)||void 0===e||e.focus())}},{key:"setDevices",value:function(e){this.devices=e,this.render()}},{key:"setCastSession",value:function(e){this.castSession=e,this.render()}},{key:"setSearchText",value:function(e){this.searchText=e,this.render()}},{key:"getDeviceMenuItems",value:function(){return this.menu.children_.filter((function(e){return e instanceof ot}))}},{key:"render",value:function(){var e=this.getDeviceMenuItems();this.removeMenuItems(e),this.addMenuItemsForDevices(this.devices),this.toggleSearchInput(),this.toggleDeviceMenuItems(),this.toggleEmptyStatePlaceholder()}},{key:"removeMenuItems",value:function(e){var t=this;e.forEach((function(e){return t.menu.removeChild(e)}))}},{key:"addMenuItemsForDevices",value:function(e){var t=this;e.forEach((function(e){var n=new ot(t.player(),{id:e.id,label:e.name,selected:!1,multiSelectable:!1,selectable:e.available,available:e.available,type:e.type,onClick:function(){t.options_.onDeviceMenuItemClick(n,e)}});t.menu.addItem(n)}))}},{key:"shouldShowSearchInput",value:function(){return this.getDeviceMenuItems().length>=20}},{key:"toggleSearchInput",value:function(){this.shouldShowSearchInput()?(this.headingItem.hide(),this.searchInputItem.show(),this.menu.addClass("vertical-fill")):(this.headingItem.show(),this.searchInputItem.hide(),this.menu.removeClass("vertical-fill"))}},{key:"toggleDeviceMenuItems",value:function(){var e=this,t=this.getDeviceMenuItems(),n=this.shouldShowSearchInput(),r=this.searchText.toLowerCase();t.forEach((function(t){var i,o=e.devices.find((function(e){return e.id===t.options_.id}));if(o){var a=o.available,s=!n||-1!==o.name.toLowerCase().indexOf(r),u=o.id===(null===(i=e.castSession)||void 0===i?void 0:i.getDevice().id);a?t.enable():t.disable(),s?t.show():t.hide(),u?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(){ut(lt(a.prototype),"handleClick",this).call(this,null),this.options_.onClick()}}],n&&st(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(ft);ht.prototype.controlText_="Devices",o.Z.registerComponent("DevicesButton",ht);var pt=n(10463);function yt(e){return yt="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},yt(e)}function dt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==yt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==yt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===yt(i)?i:String(i)),r)}var i}function vt(){return vt="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=gt(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}},vt.apply(this,arguments)}function bt(e,t){return bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bt(e,t)}function gt(e){return gt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gt(e)}var mt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=gt(r);if(i){var n=gt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===yt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,null,e)}return t=a,(n=[{key:"createEl",value:function(){return vt(gt(a.prototype),"createEl",this).call(this,"div",{className:"cv-devices-tech"})}},{key:"setPoster",value:function(e){this.poster=e,this.update()}},{key:"setDevice",value:function(e){this.device=e,this.update()}},{key:"update",value:function(){var e,t,n,r,i=this;this.el_.innerHTML='\n <div class="cv-devices-content">\n <p>'.concat(this.localize("Currently playing on"),'</p>\n <h2><span class="cv-device-icon ').concat({vivi:"cv-vivi-icon","apple-tv":"cv-apple-icon"}[null!==(t=null===(e=this.device)||void 0===e?void 0:e.type)&&void 0!==t?t:we.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(){}}])&&dt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getComponent("Component"));function wt(e){return wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wt(e)}function Pt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==wt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==wt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===wt(i)?i:String(i)),r)}var i}function Ot(){return Ot="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=kt(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}},Ot.apply(this,arguments)}function St(e,t){return St=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},St(e,t)}function kt(e){return kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},kt(e)}var jt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&St(e,t)}(u,e);var t,n,r,i,a,s=(i=u,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=kt(i);if(a){var n=kt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===wt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function u(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(n=s.call(this,e,t)).featuresVolumeControl=!0,n.featuresPlaybackRate=!1,n.movingMediaElementInDOM=!1,n.featuresFullscreenResize=!0,n.featuresTimeupdateEvents=!0,n.featuresProgressEvents=!1,n.featuresNativeTextTracks=!1,n.featuresNativeAudioTracks=!1,n.featuresNativeVideoTracks=!1,n.featuresMuteControl=!0,n.featuresSourceset=!1,n.videojsPlayer=(0,o.Z)(n.options_.playerId),n.bindFunctions(),n.bindEventListeners(),n.ready((function(){n.setSource(n.options_.source)})),n.triggerReady(),n}return t=u,r=[{key:"canPlayType",value:function(){return""}},{key:"canPlaySource",value:function(e,t){var n;return!!Qe.getOrCreateInstance(null!==(n=null==t?void 0:t.instanceId)&&void 0!==n?n:"").getCastSession()}},{key:"isSupported",value:function(){return Qe.isActive()}}],(n=[{key:"bindFunctions",value:function(){this.bindEventListeners=this.bindEventListeners.bind(this),this.onTextTrackChanged=this.onTextTrackChanged.bind(this),this.getSelectedTextTrack=this.getSelectedTextTrack.bind(this),this.setSelectedTextTrack=this.setSelectedTextTrack.bind(this),this.showUI=this.showUI.bind(this),this.hideUI=this.hideUI.bind(this),this.dispose=this.dispose.bind(this),this.setSource=this.setSource.bind(this),this.getCastSession=this.getCastSession.bind(this)}},{key:"bindEventListeners",value:function(){var e=this,t=this.getCastSession();t&&(this.textTracks().on("change",this.onTextTrackChanged),this.videojsPlayer.one("ended",(function(){t.dispose()})),t.on("durationchange",(function(){e.trigger("durationchange")})),t.on("dispose",(function(){e.trigger("ended"),e.hideUI()})),t.on("playingchange",(function(){t.isPlaying()?(e.trigger("play"),e.trigger("playing")):e.trigger("pause")})),t.on("volumechange",(function(){e.trigger("volumechange")})),t.on("sourceloaded",(function(){e.trigger("loadeddata")})),t.on("subtitleschange",(function(){e.setSelectedTextTrack(t.getSubtitles())})))}},{key:"onTextTrackChanged",value:function(){var e,t=this.getSelectedTextTrack();null===(e=this.getCastSession())||void 0===e||e.setSubtitles(null==t?void 0:t.src)}},{key:"getSelectedTextTrack",value:function(){return pt.O.findTrackByPredicate(this.videojsPlayer.player_,(function(e){return"showing"===e.mode&&!!e.src}))}},{key:"setSelectedTextTrack",value:function(e){pt.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(),Ot(kt(u.prototype),"cleanupAutoTextTracks",this).call(this),Ot(kt(u.prototype),"dispose",this).call(this)}},{key:"createEl",value:function(){var e=this;return this.ui=this.ui||new mt({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 Ot(kt(u.prototype),"addRemoteTextTrack",this).call(this,e,!0)}},{key:"getCastSession",value:function(){var e;return Qe.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:0}},{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(){}}])&&Pt(t.prototype,n),r&&Pt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(o.Z.getComponent("Tech"));function Et(e){return Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Et(e)}function 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,(void 0,i=function(e,t){if("object"!==Et(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Et(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===Et(i)?i:String(i)),r)}var i}function Tt(){return Tt="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=_t(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}},Tt.apply(this,arguments)}function xt(e,t){return xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xt(e,t)}function _t(e){return _t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_t(e)}o.Z.registerTech("devices",jt);var It=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_t(r);if(i){var n=_t(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Et(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n,r,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).options=t,n.instanceId=null!==(i=null===(r=n.player.options_.devices)||void 0===r?void 0:r.instanceId)&&void 0!==i?i:"",n.bindFunctions(),n.initialize(),n}return t=a,(n=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.onReady=this.onReady.bind(this),this.onDevicesChanged=this.onDevicesChanged.bind(this),this.onCastSessionChanged=this.onCastSessionChanged.bind(this),this.onDevicesError=this.onDevicesError.bind(this),this.reloadTech=this.reloadTech.bind(this),this.getSessionManager=this.getSessionManager.bind(this),this.dispose=this.dispose.bind(this)}},{key:"initialize",value:function(){this.player.ready(this.onReady)}},{key:"onReady",value:function(){var e=this,t=this.player.getChild("collapserator"),n=null==t?void 0:t.children().findIndex((function(e){return"CustomControlSpacer"===e.name()})),r=this.getSessionManager();if(t&&n&&-1!==n&&r){r.on("deviceschange",this.onDevicesChanged),r.on("castsessionchange",this.onCastSessionChanged),r.on("error",this.onDevicesError);var i={onClick:function(){if(e.options.viviApi&&e.options.fetchViviAccessToken&&!r.hasInstanceOfClient(Ze)){var t=new Ze({url:e.options.viviApi,fetchAccessToken:e.options.fetchViviAccessToken});r.addClient(t)}},onDeviceMenuItemClick:function(t,n){var i;r.startCastSession({device:n,title:e.options.title}),null===(i=e.options.analyticsService)||void 0===i||i.logUserAction({device:n},{actionType:K.Vw.Play,workflowPhase:K.eu.Complete,descriptor:K.UX.CastToDevice})}};this.devicesButton=t.addChild("DevicesButton",i,n+1)}}},{key:"onDevicesChanged",value:function(e){var t;null===(t=this.devicesButton)||void 0===t||t.setDevices(e)}},{key:"onCastSessionChanged",value:function(e){var t;null===(t=this.devicesButton)||void 0===t||t.setCastSession(e),this.reloadTech(),e?(this.player.addClass("cv-device-casting"),this.player.isFullscreen()&&this.player.exitFullscreen()):this.player.removeClass("cv-device-casting")}},{key:"onDevicesError",value:function(e){this.player.error(e.message),this.player.pause()}},{key:"reloadTech",value:function(){var e=this.player,t=e.currentSources(),n=e.volume(),r=e.muted(),i=e.duration(),o=e.currentTime(),a=e.paused();e.src(t),e.one("playing",(function(){e.volume(n),e.muted(r),e.duration(i),e.currentTime(o),a?e.pause():e.play()}))}},{key:"getSessionManager",value:function(){if(this.instanceId)return Qe.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),Qe.disposeAndRemoveInstance(e),Tt(_t(a.prototype),"dispose",this).call(this))}}])&&Ct(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));function Rt(e){return Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rt(e)}function Mt(){Mt=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",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=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 _(r||[]);return i(a,"_invoke",{value:E(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function b(){}function g(){}function m(){}var w={};c(w,a,(function(){return this}));var P=Object.getPrototypeOf,O=P&&P(P(I([])));O&&O!==n&&r.call(O,a)&&(w=O);var S=m.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Rt(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){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.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 E(t,n,r){var i=h;return function(o,a){if(i===y)throw new Error("Generator is already running");if(i===d){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?d:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=d,r.method="throw",r.arg=c.arg)}}}function C(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,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function I(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(Rt(t)+" is not iterable")}return g.prototype=m,i(S,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:g,configurable:!0}),g.displayName=c(m,u,"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,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},k(j.prototype),c(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),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Lt(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 Dt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==Rt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Rt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===Rt(i)?i:String(i)),r)}var i}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=Ft(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,t){return Bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bt(e,t)}function Ft(e){return Ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ft(e)}o.Z.registerPlugin("devicesPlugin",It);var Vt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ft(r);if(i){var n=Ft(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Rt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,e,t)}return t=a,(n=[{key:"getPlayerOptions",value:function(){var e,t=Nt(Ft(a.prototype),"getPlayerOptions",this).call(this);return t.enableDevices?Object.assign(Object.assign({},t),{techOrder:["devices"].concat((e=t.techOrder,function(e){if(Array.isArray(e))return Lt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Lt(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)?Lt(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),devices:{instanceId:te()}}):t}},{key:"configurePlugins",value:function(){var e;try{this.options.onClickCreateClip&&this.player.createClipButtonPlugin({onClick:this.options.onClickCreateClip}),this.options.onRequestPictureInPicture&&this.player.pictureInPicture({onRequestPictureInPicture:this.options.onRequestPictureInPicture}),(null===(e=this.options.pointsOfInterest)||void 0===e?void 0:e.length)&&this.player.pointsOfInterestPlugin({pointsOfInterest:this.options.pointsOfInterest})}catch(e){console.log("failed to register plugins",e)}}},{key:"setNextVideo",value:function(e,t,n){this.player.nextVideoPlugin&&this.player.nextVideoPlugin().setNextVideo(e,t,n)}},{key:"enablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.enablePictureInPicture()}},{key:"disablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.disablePictureInPicture()}},{key:"togglePictureInPicture",value:function(e){var t=this.player.pictureInPicture();t&&t.togglePictureInPicture(e)}},{key:"additionalSetup",value:function(e){var t,n,r,i,o=this,s=Object.create(null,{additionalSetup:{get:function(){return Nt(Ft(a.prototype),"additionalSetup",o)}}});return t=this,n=void 0,r=void 0,i=Mt().mark((function t(){var n;return Mt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s.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!==(n=e.additionalData)){t.next=6;break}throw Error("Invalid clip data");case 6:this.player.clipPlugin({startTime:n.startTime,endTime:n.endTime});case 7:case"end":return t.stop()}}),t,this)})),new(r||(r=Promise))((function(e,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,s)}u((i=i.apply(t,n||[])).next())}))}},{key:"setupAnalyticsDependentPlugins",value:function(e){Nt(Ft(a.prototype),"setupAnalyticsDependentPlugins",this).call(this,e),this.options.enableDevices&&this.player.devicesPlugin({viviApi:this.options.viviApi,fetchViviAccessToken:this.options.fetchViviAccessToken,title:e.title,analyticsService:this.analyticsService})}},{key:"setActivityStatus",value:function(e,t){this.player.activityStatusPlugin().setActivityStatus(e,t)}}])&&Dt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(i.r),At=n(63816),Ut=n(14735);function Zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zt(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=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(n,i)||function(e,t){if(e){if("string"==typeof e)return Zt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zt(e,t):void 0}}(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],u=a[1];function c(){var t=e.player.duration()-e.player.currentTime();u(t),t>o.current&&(o.current=t)}if(r.useEffect((function(){return e.player.on("timeupdate",c),function(){e.player.off("timeupdate",c)}}),[]),!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 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 qt(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,(void 0,i=function(e,t){if("object"!==Gt(e)||null===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)}(r.key),"symbol"===Gt(i)?i:String(i)),r)}var i}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=Yt(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,t){return Wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wt(e,t)}function Yt(e){return Yt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Yt(e)}o.Z.registerComponent("UpNext",(0,Ut.Z)((function(e,t){return r.createElement(zt,Object.assign({player:e},t))})));var $t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wt(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Yt(r);if(i){var n=Yt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Gt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=a.call(this,e,t)).playNext=e.nextVideoPlugin().getShouldPlayNext(),n.toggle(n.playNext),n}return t=s,(n=[{key:"handleToggle",value:function(){this.toggle(!this.playNext)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){this.playNext=!0,o.Z.dom.addClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{key:"toggleOff",value:function(){this.playNext=!1,o.Z.dom.removeClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,t,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=o.Z.dom.createEl("div",{className:"custom-toggle toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=Ht(Yt(s.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Play next video</span>\n <span class="cv-toggle-container"></span>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&qt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("MenuItem"));function Qt(e){return Qt="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},Qt(e)}function Xt(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,(void 0,i=function(e,t){if("object"!==Qt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Qt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===Qt(i)?i:String(i)),r)}var i}function Jt(){return Jt="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=tn(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}},Jt.apply(this,arguments)}function Kt(e,t){return Kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Kt(e,t)}function en(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tn(e){return tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tn(e)}o.Z.registerComponent("NextVideoMenuItem",$t);var nn="cv-persisttest",rn="cv-play-next-video",on=o.Z.getPlugin("plugin"),an=(o.Z.getComponent("MenuItem"),o.Z.getComponent("NextVideoMenuItem")),sn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kt(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=tn(r);if(i){var n=tn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Qt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return en(e)}(this,e)});function a(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).setShouldPlayNext=t.setShouldPlayNext.bind(en(t)),t.getShouldPlayNext=t.getShouldPlayNext.bind(en(t)),t.getChapterTrack=t.getChapterTrack.bind(en(t)),t.onTimeUpdate=t.onTimeUpdate.bind(en(t)),t.hasLocalStorage=t.testHasLocalStorage(),t.shouldPlayNextVideo=!1,t.hasLocalStorage){var n=window.localStorage.getItem(rn);t.shouldPlayNextVideo="true"===n}return e.ready((function(){t.initialize()})),t}return t=a,(n=[{key:"initialize",value:function(){this.player.isDisposed()||this.bindListeners()}},{key:"getChapterTrack",value:function(){return pt.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:an,name:"NextVideoMenuItem"})}},{key:"getShouldPlayNext",value:function(){return this.shouldPlayNextVideo}},{key:"setShouldPlayNext",value:function(e,t){this.shouldPlayNextVideo=e,this.hasLocalStorage&&t&&window.localStorage.setItem(rn,e.toString())}},{key:"bindListeners",value:function(){this.player.on("timeupdate",this.onTimeUpdate)}},{key:"dispose",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.hideUpNext(),Jt(tn(a.prototype),"dispose",this).call(this)}},{key:"onTimeUpdate",value:function(){var e,t;if(!this.player.pictureInPicture||!this.player.isInPictureInPicture())if(this.getShouldPlayNext()){if(this.player.ended())return this.callback(),void this.hideUpNext();if(!(this.player.duration()<=0||this.upNextRendered&&this.player.currentTime()>this.upNextTimepoint)){var n=this.getChapterTrack(),r=(null===(e=null==n?void 0:n.activeCues)||void 0===e?void 0:e.length)&&n.activeCues[0];"credits"===(null===(t=null==r?void 0:r.text)||void 0===t?void 0:t.toLowerCase())||this.player.currentTime()>=this.player.duration()-5?this.showUpNext():this.hideUpNext()}}else this.hideUpNext()}},{key:"showUpNext",value:function(){var e=this;this.upNextRendered||(this.upNextRendered=!0,this.upNextTimepoint=this.player.currentTime(),this.player.addChild("UpNext",{nextVideo:this.nextVideo,onPlayNext:this.callback,onCancel:function(){e.hideUpNext(),e.setShouldPlayNext(!1)}}))}},{key:"hideUpNext",value:function(){if(this.upNextRendered){this.upNextRendered=!1,this.upNextTimepoint=null;var e=this.player.getChild("UpNext");e&&(this.player.removeChild(e),e.dispose())}}},{key:"testHasLocalStorage",value:function(){try{return window.localStorage.setItem(nn,"persistPlayNext"),window.localStorage.removeItem(nn),!0}catch(e){return!1}}}])&&Xt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(on);o.Z.registerPlugin("nextVideoPlugin",sn);var un=n(26733);function cn(e){return cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cn(e)}function ln(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,(void 0,i=function(e,t){if("object"!==cn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==cn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===cn(i)?i:String(i)),r)}var i}function fn(e,t){return fn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fn(e,t)}function hn(e){return hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hn(e)}function pn(e){return r.createElement("div",{className:"cv-resource-item"},r.createElement(un.s,{data:e.resource,imageCdnUrl:e.imageCdnUrl}))}var yn=(0,Ut.Z)((function(e,t){return r.createElement(pn,Object.assign({},t))})),dn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fn(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=hn(r);if(i){var n=hn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===cn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),n=a.call(this,e,t);var r=new yn(e,{resource:t.resource,imageCdnUrl:t.imageCdnUrl});return n.addChild(r),n}return t=s,(n=[{key:"createEl",value:function(){return o.Z.dom.createEl("div")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.options_.downloadResource(this.options_.resource)}}])&&ln(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("ClickableComponent"));function vn(e){return vn="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},vn(e)}function bn(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,(void 0,i=function(e,t){if("object"!==vn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==vn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===vn(i)?i:String(i)),r)}var i}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=wn(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,t){return mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},mn(e,t)}function wn(e){return wn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wn(e)}var Pn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mn(e,t)}(s,e);var t,n,r,i,a=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=wn(r);if(i){var n=wn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===vn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(e=a.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=s,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(gn(wn(s.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-resources-button ".concat(gn(wn(s.prototype),"buildCSSClass",this).call(this))}},{key:"update",value:function(){gn(wn(s.prototype),"update",this).call(this)}},{key:"createMenu",value:function(){return this.options_.title="Resources",gn(wn(s.prototype),"createMenu",this).call(this)}},{key:"createItems",value:function(){var e=this,t=[];return this.options_.resources.forEach((function(n){var r=new dn(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(){gn(wn(s.prototype),"handleClick",this).call(this,null)}}])&&bn(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Z.getComponent("MenuButton"));function On(e){return On="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},On(e)}function Sn(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,(void 0,i=function(e,t){if("object"!==On(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==On(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===On(i)?i:String(i)),r)}var i}function kn(e,t){return kn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kn(e,t)}function jn(e){return jn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jn(e)}Pn.prototype.controlText_="Resources",o.Z.registerComponent("ResourcesButton",Pn);var En=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kn(e,t)}(a,e);var t,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=jn(r);if(i){var n=jn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===On(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=a,(n=[{key:"onReady",value:function(){if(this.options.resources.length){var e=this.player.getChild("collapserator");e.addChild("ResourcesButton",{resources:this.options.resources,imageCdnUrl:this.options.imageCdnUrl},e.children_.length-3)}}}])&&Sn(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("resourcesPlugin",En);var Cn=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 Tn(e){var t=e.className,n=void 0===t?"":t,i=e.playerApi,o=e.onReady,a=e.onDispose,s=Cn(e,["className","playerApi","onReady","onDispose"]),u=r.useRef();return r.useEffect((function(){if(u){var e=new Vt(u.current,Object.assign(Object.assign({},s),{playerApi:i}));return o&&e.ready((function(){o((0,At.G)(e))})),a&&e.one("dispose",a),function(){null==e||e.dispose()}}}),[e.viewKey]),r.createElement("div",{ref:u,className:n})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3836,5041],{86877:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(23481);function o(e){return o="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},o(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,(void 0,i=function(e,t){if("object"!==o(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===o(i)?i:String(i)),r)}var i}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(f,e);var t,n,u,l,s=(u=f,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=c(u);if(l){var n=c(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),s.call(this,e)}return t=f,(n=[{key:"name",get:function(){return"FileTypeError"}},{key:"lang",get:function(){return"upload.fileType"}},{key:"dialogOptions",get:function(){return{title:r.T.getPhrase(this.lang,"heading"),text:r.T.getPhrase(this.lang,"body"),buttons:[{text:r.T.getPhrase(this.lang,"okay"),className:"btn btn-dark",success:!0},{text:r.T.getPhrase(this.lang,"close"),className:"btn btn-link",close:!0}]}}}])&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(n(47663).S)},25041:(e,t,n)=>{n.r(t),n.d(t,{BaseVideoUploadService:()=>X,LearningResourceUploadService:()=>te,SubtitleUploadService:()=>ee,UploadType:()=>K});var r,o=n(48088),i=n(39479),a=n(46865),c=n(79976),u=n(37433),l=n(54149),s=n(71365),f=n(23481),p=n(70794),d=n(81886),y=n(49985),h=n(65858),g=n(29555);!function(e){e[e.Permanent=0]="Permanent",e[e.Temporary=1]="Temporary"}(r||(r={}));var v=n(86877),b=n(6339),m=n(52003),O=n(60735),S=n(53301),w=n(47663);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 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,(void 0,o=function(e,t){if("object"!==P(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==P(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===P(o)?o:String(o)),r)}var o}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},U(e,t)}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}var E="upload.internetConnectivityError",T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=j(r);if(o){var n=j(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===P(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,f.T.getPhrase(E,"title"))}return t=a,(n=[{key:"name",get:function(){return"InternetConnectivityError"}},{key:"dialogOptions",get:function(){return{title:f.T.getPhrase(E,"heading"),text:f.T.getPhrase(E,"body"),buttons:[{text:f.T.getPhrase(E,"okay"),className:"btn",success:!0}]}}}])&&k(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(w.S),R=n(44331);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 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,(void 0,o=function(e,t){if("object"!==_(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==_(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===_(o)?o:String(o)),r)}var o}function L(e,t){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},L(e,t)}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}var x,A,D=[],F=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L(e,t)}(l,e);var t,n,r,a,c,u=(a=l,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=C(a);if(c){var n=C(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return 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)}(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),u.call(this,e)}return t=l,n=[{key:"name",get:function(){return"DropzoneWrapper"}},{key:"initialize",value:function(e){var t=this.options.loggingEnabled,n=o.Radio.channel(e.channelName),r=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",init:function(){var e=this;t&&(i.each(D,(function(t){e.on(t,(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=n[0]instanceof File?n[0].name:n[0];console.info(t,o,n)}))})),this.on("uploadprogress",(function(e,t,o){var i=o/e.size*100;n.trigger("progress",r.getId(e),i,o)})),this.on("success",(function(e){var t=e.upload.chunks,r=i.last(t),o=r.xhr;o||(o=r.file.xhr);var a=JSON.parse(o.response);e.cvUpload.fileId=a.id,n.trigger("upload:success",e,a)})),this.on("error",(function(e,t,n){n&&0===n.status?d.Q.Ry.throw(new T):"canceled"!==e.status&&d.Q.Ry.throw(new R.n(f.T.getPhrase("upload.services","uploadError",{fileName:e.name,message:t.message})))})))},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()}}],r=[{key:"isValidFile",value:function(e,t){return S.isValidFile(e,t)}}],n&&I(t.prototype,n),r&&I(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(d.Q.t6);function V(e){return V="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},V(e)}function N(e,t,n){return(t=Q(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B(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,Q(r.key),r)}}function M(e,t,n){return t&&B(e.prototype,t),n&&B(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q(e){var t=function(e,t){if("object"!==V(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==V(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===V(t)?t:String(t)}function q(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&&Y(e,t)}function Y(e,t){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Y(e,t)}function W(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Z(e);if(t){var o=Z(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===V(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function Z(e){return Z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Z(e)}var K,H=function(e){q(n,e);var t=W(n);function n(){var e;return z(this,n),(e=t.call(this,{dataProvider:s.u.getInstance(u.R.Ajax),cache:s.u.getInstance(a.p.Fifo),alertService:s.u.getInstance(c.P.ALERT)})).incrementingUploadId=0,e}return M(n,[{key:"name",get:function(){return"UploadDataService"}},{key:"channelName",get:function(){return"private:upload:data:service"}},{key:"requestUploads",value:function(e,t,n,r,o){var a=this,c=this.chain();i.each(t,(function(t){a.incrementingUploadId++,c.create({resource:e,eventPrefix:"request:upload:".concat(a.incrementingUploadId),data:a.getFileUploadRequest(t,n),callback:function(e){r(t,e)},errorHandler:a.alertService.error("Something went wrong while we were uploading your video. Please try again.")})})),c.func((function(){o()})).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(u.R.Ajax).releaseInstance(a.p.Fifo)}}]),n}(l.B);!function(e){e[e.Video=0]="Video",e[e.LearningResource=1]="LearningResource",e[e.Subtitle=2]="Subtitle"}(K||(K={}));var J=(N(x={},K.Video,"video/*"),N(x,K.LearningResource,b.l.RESOURCES),N(x,K.Subtitle,b.l.SUBTITLES),x),G=(N(A={},K.Video,m.Q4.VIDEO_UPLOAD),N(A,K.LearningResource,m.Q4.RESOURCE_UPLOAD),N(A,K.Subtitle,m.Q4.SUBTITLE_UPLOAD),A),$=function(e){q(n,e);var t=W(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return z(this,n),t.call(this,Object.assign({uploadUrl:"/api/upload"},e))}return M(n,[{key:"initialize",value:function(){this.uploadDataService=new H,this.progressViewModel=p.r.get("upload:progress:".concat(this.uploadType)),this.bindListeners()}},{key:"channelName",get:function(){return G[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 F({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,"upload:success",this.onSuccess)}},{key:"onProgress",value:function(e,t,n){var r=this.collection.get(e);r&&(r.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,r=this.getCollection();if(r.length){r.each((function(e){t+=e.get("totalUploaded")||0,n+=e.get("file").size||0}));var o=t/n*100,i=o>=100,a=function(){e.progressViewModel.set({progress:i?100:o,done:i})};i?window.setTimeout(a,2e3):a()}else this.progressViewModel.set({progress:0})}},{key:"isValidFile",value:function(e){return F.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 v.Z(f.T.getPhrase(this.lang,"invalidFileType"))):this.requestUploads(e,t)}},{key:"requestUploads",value:function(e,t){var n=this,r=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 r=e.name;n.uploadType===K.Video&&(r=r.replace(/\.[^/.]+$/,"")),i.add(Object.assign({id:n.uploader.getId(e),file:e,name:r},n.getAdditionalFileInfo(e,t)),{at:i.length-1})}),(function(){t&&y.k.logUserAction({uploadCount:e.length},t),o.Radio.channel(n.channelName).trigger(g.S.FILES_ADDED,e,r)}))}},{key:"addFile",value:function(e,t){this.addFiles([e],t)}},{key:"cancelUpload",value:function(e){var t=this,n=this.getCollection(),r=n.get(e);if(r){var i=r.get("file");this.uploader.removeFile(i),n.remove(r),this.uploadDataService.cancelUpload(i.cvUpload.uploadId,i.cvUpload.ingestUrl,(function(){y.k.logUserAction(r.toJSON(),{entity:h.py.Video,actionType:h.Vw.Upload,workflowPhase:h.eu.Discard,descriptor:h.yh.Single,location:h.LZ.MyUploads}),o.Radio.channel(t.channelName).trigger(g.S.UPLOAD_CANCELLED)})),this.setOverallProgress()}}},{key:"onSuccess",value:function(e,t){var n=this.uploader.getId(e),r=this.getCollection().get(n);r.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}),o.Radio.channel(this.channelName).trigger(g.S.UPLOAD_COMPLETE,r)}},{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:"getAcceptedFiles",value:function(){return J[this.uploadType]}},{key:"getAdditionalFileInfo",value:function(e,t){return{}}}]),n}(d.Q.t6),X=function(e){q(n,e);var t=W(n);function n(){return z(this,n),t.apply(this,arguments)}return M(n,[{key:"uploadType",get:function(){return K.Video}},{key:"name",get:function(){return O.D.VideoUpload}},{key:"fileLifestyle",get:function(){return r.Temporary}}]),n}($),ee=function(e){q(n,e);var t=W(n);function n(){return z(this,n),t.apply(this,arguments)}return M(n,[{key:"uploadType",get:function(){return K.Subtitle}},{key:"name",get:function(){return O.D.SubtitleUpload}},{key:"fileLifestyle",get:function(){return r.Permanent}}]),n}($),te=function(e){q(n,e);var t=W(n);function n(){return z(this,n),t.apply(this,arguments)}return M(n,[{key:"uploadType",get:function(){return K.LearningResource}},{key:"name",get:function(){return O.D.ResourceUpload}},{key:"fileLifestyle",get:function(){return r.Permanent}}]),n}($)},6339:(e,t,n)=>{n.d(t,{l:()=>p,v:()=>d});var r=n(39479),o=["pdf"],i=["doc","docx","dotx","dot","rtf","docm","odt"],a=["csv","txt"],c=["xls","xlt","xlsx"],u=["jpg","tif","png","bmp","gif","jpeg"],l=["zip","rar"],s=["ppt","pot","pps","pptx"],f=["srt"],p={IMAGES:".".concat(u.join(",.")),RESOURCES:".".concat([].concat(i,c,s,o,a,u,l).join(",.")),SUBTITLES:".".concat(f.join(",."))},d={getResourceType:function(e){var t=e.toLowerCase();return r.contains(i,t)?"document":r.contains(c,t)?"excel":r.contains(s,t)?"powerpoint":r.contains(o,t)?"pdf":r.contains(a,t)?"text":r.contains(u,t)?"image":r.contains(l,t)?"archive":r.contains(f,t)?"subtitle":""}}},3836:(e,t,n)=>{n.r(t),n.d(t,{VideoUploadService:()=>U});var r,o=n(48088),i=n(79976),a=n(60139),c=n(71365),u=n(23481),l=n(29555),s=n(25041);!function(e){e[e.Upload=1]="Upload",e[e.Tv=2]="Tv"}(r||(r={}));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),g=n(97291),v=n(57322),b=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 r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==m(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===m(o)?o:String(o)),r)}var o}function S(){return S="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 o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},S.apply(this,arguments)}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}function P(e){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},P(e)}var k=u.T.encloseNamespace("upload.services"),U=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&w(e,t)}(j,e);var t,n,u,s,U=(u=j,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=P(u);if(s){var n=P(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function j(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,j),U.call(this,e)}return t=j,(n=[{key:"initialize",value:function(){S(P(j.prototype),"initialize",this).call(this),this.videoUploadDataService=c.u.getInstance(v.O.VideoUpload,this),this.pendingItemsService=c.u.getInstance(v.K.PendingItems,this),this.userDataService=c.u.getInstance(v.O.FlightUser,this),this.alertService=c.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:k("startUploadAlertHeading"),message:1===e.length?k("startUploadSingleAlertBody",{videoName:e[0].name}):k("startUploadMultipleAlertBody",{uploadCount:e.length})},n=y.O.getCurrentContext().appLink;!!b.Y.getMyVideosAppLinks().find((function(e){return n.application===e.application&&n.action===e.action}))||(t.appLinkText=k("startUploadAlertAppLinkText",{smartCount:e.length}),t.appLink={application:g.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}))||o.Radio.channel(this.channelName).trigger(l.S.UNLOCK_NAV)}},{key:"getUpload",value:function(e){var t=this.uploader.getId(e);return this.getCollection().get(t)}},{key:"completeUpload",value:function(e,t){var n=this;e.set("sending",!0),this.userDataService.getCurrentUser((function(o){n.userDataService.getCustomerSettings(o.customerId,(function(i){n.userDataService.getWorkspace((function(a){n.videoUploadDataService.completeVideoUpload({id:e.get("id"),userId:o.id,customerId:o.customerId,libraryId:a.id,categoryId:e.get("categoryId")||null,pendingProcessOrigin:r.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,t){var n=this;S(P(j.prototype),"onSuccess",this).call(this,e,t);var r=this.getUpload(e);r.get("editingMetadata")?this.listenToOnce(r,"change:editingMetadata",(function(){n.completeUpload(r,t)})):this.completeUpload(r,t)}},{key:"getAdditionalFileInfo",value:function(e,t){var n=y.O.getCurrentRoute().appLink;return n.application!==g.O.MY_VIDEOS||n.action!==h.e.MyVideos.MY_VIDEOS_FOLDER?{}:{categoryId:+n.args[0]}}}])&&O(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),j}(s.BaseVideoUploadService)}}]);