@clickview/lite 0.31.0 → 0.31.1

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 (211) hide show
  1. package/dist/bundles.json +1 -1
  2. package/dist/languages/en-gb.json +4218 -0
  3. package/dist/languages/en-us.json +4218 -0
  4. package/dist/languages/en.json +1 -1
  5. package/dist/scripts/{1200-9a411abf42-lite.chunk.js → 1200-bec7db5b08-lite.chunk.js} +1 -1
  6. package/dist/scripts/{1366-d52572015e-lite.chunk.js → 1366-97fd1ee802-lite.chunk.js} +1 -1
  7. package/dist/scripts/{1592-dcc4772f16-lite.chunk.js → 1592-68884d6d6c-lite.chunk.js} +1 -1
  8. package/dist/scripts/{162-16df777e96-lite.chunk.js → 162-e4b981a0ac-lite.chunk.js} +2 -2
  9. package/dist/scripts/{1977-7cc7e5343b-lite.chunk.js → 1977-5abe20f323-lite.chunk.js} +2 -2
  10. package/dist/scripts/{2066-db515814ad-lite.chunk.js → 2066-035a4e9ee9-lite.chunk.js} +1 -1
  11. package/dist/scripts/{2118-8b6fa7abde-lite.chunk.js → 2118-e4f8b7b15b-lite.chunk.js} +1 -1
  12. package/dist/scripts/{3645-dd57bf267e-lite.chunk.js → 3645-1cb04952b3-lite.chunk.js} +1 -1
  13. package/dist/scripts/{3667-9a2a4c64b5-lite.chunk.js → 3667-286f44bcc9-lite.chunk.js} +1 -1
  14. package/dist/scripts/{4617-67b3036cbe-lite.chunk.js → 4617-b2272ef83d-lite.chunk.js} +1 -1
  15. package/dist/scripts/{4676-bb8b7e034f-lite.chunk.js → 4676-63c3c6916c-lite.chunk.js} +1 -1
  16. package/dist/scripts/{4901-dbbd888771-lite.chunk.js → 4901-8082b8c806-lite.chunk.js} +1 -1
  17. package/dist/scripts/{4942-41d01acc50-lite.chunk.js → 4942-e1855d3e14-lite.chunk.js} +1 -1
  18. package/dist/scripts/{5268-c0ad8047b8-lite.chunk.js → 5268-7044ddf2c8-lite.chunk.js} +1 -1
  19. package/dist/scripts/{5622-df1c9f72f5-lite.chunk.js → 5622-2e03de5953-lite.chunk.js} +1 -1
  20. package/dist/scripts/{6801-afab3dd733-lite.chunk.js → 6801-aa9f8c265b-lite.chunk.js} +1 -1
  21. package/dist/scripts/{6896-467ac6697c-lite.chunk.js → 6896-2890da233e-lite.chunk.js} +1 -1
  22. package/dist/scripts/{7017-14feec9dd1-lite.chunk.js → 7017-cdf324e732-lite.chunk.js} +1 -1
  23. package/dist/scripts/{7052-baf4150fb1-lite.chunk.js → 7052-69903b989d-lite.chunk.js} +1 -1
  24. package/dist/scripts/{7072-c3785ca37e-lite.chunk.js → 7072-9f3b5575a2-lite.chunk.js} +1 -1
  25. package/dist/scripts/{7221-aed0b2fd5c-lite.chunk.js → 7221-c8f716fead-lite.chunk.js} +1 -1
  26. package/dist/scripts/7318-7aa5593557-lite.chunk.js +2 -0
  27. package/dist/scripts/{7950-5ea68fae3f-lite.chunk.js → 7950-6be639d990-lite.chunk.js} +1 -1
  28. package/dist/scripts/{8323-ebde7e14b0-lite.chunk.js → 8323-7392e64015-lite.chunk.js} +1 -1
  29. package/dist/scripts/{8367-9dfee373b1-lite.chunk.js → 8367-53976b1002-lite.chunk.js} +1 -1
  30. package/dist/scripts/{8681-57707d9f89-lite.chunk.js → 8681-9e4cc2dbc7-lite.chunk.js} +1 -1
  31. package/dist/scripts/{9428-c2ec53b44d-lite.chunk.js → 9428-1f28bc6429-lite.chunk.js} +1 -1
  32. package/dist/scripts/{9478-76af6fb48c-lite.chunk.js → 9478-9b51791ecb-lite.chunk.js} +1 -1
  33. package/dist/scripts/{9484-d9aef28b8a-lite.chunk.js → 9484-cf98c2c51d-lite.chunk.js} +1 -1
  34. package/dist/scripts/{9522-fdc269fa55-lite.chunk.js → 9522-3c117f4efe-lite.chunk.js} +1 -1
  35. package/dist/scripts/bundle-090e4ef8d6.min.js +2 -0
  36. package/jest.config.js +11 -11
  37. package/package.json +61 -61
  38. package/typings/libs/CVEvents.d.ts +12 -12
  39. package/typings/libs/CVLanguages.d.ts +24 -24
  40. package/typings/libs/backbone.validation.d.ts +99 -99
  41. package/typings/libs/cloneDeep.d.ts +4 -4
  42. package/typings/libs/cookiesjs.d.ts +25 -25
  43. package/typings/libs/draft-convert.d.ts +3 -3
  44. package/typings/libs/google-api.d.ts +93 -93
  45. package/typings/libs/intersection-observer.d.ts +82 -82
  46. package/typings/libs/microsoft-teams.d.ts +2 -2
  47. package/typings/libs/react-table-config.d.ts +138 -138
  48. package/typings/libs/trackjs.d.ts +2 -2
  49. package/typings/libs/videojs-contrib-quality-levels.d.ts +28 -28
  50. package/typings/utils/imports.d.ts +13 -13
  51. package/dist/scripts/7318-bee88ab659-lite.chunk.js +0 -2
  52. package/dist/scripts/bundle-307c4a7106.min.js +0 -2
  53. /package/dist/scripts/{1090-6357a8481e-lite.chunk.js → 1090-ab8f0bb780-lite.chunk.js} +0 -0
  54. /package/dist/scripts/{1200-9a411abf42-lite.chunk.js.LICENSE.txt → 1200-bec7db5b08-lite.chunk.js.LICENSE.txt} +0 -0
  55. /package/dist/scripts/{1285-7afa47b773-lite.chunk.js → 1285-808ddb5840-lite.chunk.js} +0 -0
  56. /package/dist/scripts/{1291-afca7b0cd0-lite.chunk.js → 1291-71d52440ec-lite.chunk.js} +0 -0
  57. /package/dist/scripts/{1341-1d121961bb-lite.chunk.js → 1341-4d2b44ea1d-lite.chunk.js} +0 -0
  58. /package/dist/scripts/{1366-d52572015e-lite.chunk.js.LICENSE.txt → 1366-97fd1ee802-lite.chunk.js.LICENSE.txt} +0 -0
  59. /package/dist/scripts/{147-f32522149a-lite.chunk.js → 147-82593463bf-lite.chunk.js} +0 -0
  60. /package/dist/scripts/{1475-820fef70f4-lite.chunk.js → 1475-b95463b549-lite.chunk.js} +0 -0
  61. /package/dist/scripts/{1517-5b862f657e-lite.chunk.js → 1517-c7b2628bf5-lite.chunk.js} +0 -0
  62. /package/dist/scripts/{1518-277693df55-lite.chunk.js → 1518-3c154650f6-lite.chunk.js} +0 -0
  63. /package/dist/scripts/{1536-85717afe85-lite.chunk.js → 1536-46e6a18e52-lite.chunk.js} +0 -0
  64. /package/dist/scripts/{156-dde8ca94d7-lite.chunk.js → 156-1752870661-lite.chunk.js} +0 -0
  65. /package/dist/scripts/{1592-dcc4772f16-lite.chunk.js.LICENSE.txt → 1592-68884d6d6c-lite.chunk.js.LICENSE.txt} +0 -0
  66. /package/dist/scripts/{162-16df777e96-lite.chunk.js.LICENSE.txt → 162-e4b981a0ac-lite.chunk.js.LICENSE.txt} +0 -0
  67. /package/dist/scripts/{1655-e5d6dfb27a-lite.chunk.js → 1655-80e664abd2-lite.chunk.js} +0 -0
  68. /package/dist/scripts/{1766-164756da7c-lite.chunk.js → 1766-984f175880-lite.chunk.js} +0 -0
  69. /package/dist/scripts/{1794-2ce2b767a9-lite.chunk.js → 1794-c90de6e8b5-lite.chunk.js} +0 -0
  70. /package/dist/scripts/{1820-521c94621b-lite.chunk.js → 1820-7e316e771c-lite.chunk.js} +0 -0
  71. /package/dist/scripts/{1863-4b2cc1922c-lite.chunk.js → 1863-193dd09637-lite.chunk.js} +0 -0
  72. /package/dist/scripts/{1891-f871c22b2f-lite.chunk.js → 1891-c6c9089212-lite.chunk.js} +0 -0
  73. /package/dist/scripts/{1924-2a21fe2738-lite.chunk.js → 1924-3da4250730-lite.chunk.js} +0 -0
  74. /package/dist/scripts/{1977-7cc7e5343b-lite.chunk.js.LICENSE.txt → 1977-5abe20f323-lite.chunk.js.LICENSE.txt} +0 -0
  75. /package/dist/scripts/{2066-db515814ad-lite.chunk.js.LICENSE.txt → 2066-035a4e9ee9-lite.chunk.js.LICENSE.txt} +0 -0
  76. /package/dist/scripts/{2095-fffbd264d1-lite.chunk.js → 2095-0f43115eb1-lite.chunk.js} +0 -0
  77. /package/dist/scripts/{2118-8b6fa7abde-lite.chunk.js.LICENSE.txt → 2118-e4f8b7b15b-lite.chunk.js.LICENSE.txt} +0 -0
  78. /package/dist/scripts/{2229-bc14b074ed-lite.chunk.js → 2229-2f18b946ae-lite.chunk.js} +0 -0
  79. /package/dist/scripts/{2269-aafae0c3da-lite.chunk.js → 2269-28704b094a-lite.chunk.js} +0 -0
  80. /package/dist/scripts/{227-7c680a98a4-lite.chunk.js → 227-09e6fb95db-lite.chunk.js} +0 -0
  81. /package/dist/scripts/{2279-91adb10745-lite.chunk.js → 2279-634b7aa366-lite.chunk.js} +0 -0
  82. /package/dist/scripts/{2452-bbbcc9cfc4-lite.chunk.js → 2452-c3bbdacb87-lite.chunk.js} +0 -0
  83. /package/dist/scripts/{2477-f408e61006-lite.chunk.js → 2477-8af0dd9a48-lite.chunk.js} +0 -0
  84. /package/dist/scripts/{2608-bf3f792d3d-lite.chunk.js → 2608-e01d98709d-lite.chunk.js} +0 -0
  85. /package/dist/scripts/{2701-093bcc66ac-lite.chunk.js → 2701-e11c235912-lite.chunk.js} +0 -0
  86. /package/dist/scripts/{275-f95c8de900-lite.chunk.js → 275-02cb3cbc61-lite.chunk.js} +0 -0
  87. /package/dist/scripts/{2956-4b8e0a4c58-lite.chunk.js → 2956-11016d6da1-lite.chunk.js} +0 -0
  88. /package/dist/scripts/{2966-a88d11d626-lite.chunk.js → 2966-fbcd8659a7-lite.chunk.js} +0 -0
  89. /package/dist/scripts/{3007-4a6a008485-lite.chunk.js → 3007-9507eed4ed-lite.chunk.js} +0 -0
  90. /package/dist/scripts/{3012-5ffcff3af0-lite.chunk.js → 3012-4f960076c8-lite.chunk.js} +0 -0
  91. /package/dist/scripts/{3020-9f0d773484-lite.chunk.js → 3020-cf93b2862e-lite.chunk.js} +0 -0
  92. /package/dist/scripts/{3108-7f0dde546a-lite.chunk.js → 3108-59f96004c1-lite.chunk.js} +0 -0
  93. /package/dist/scripts/{3171-88406511bb-lite.chunk.js → 3171-2f782ced16-lite.chunk.js} +0 -0
  94. /package/dist/scripts/{3216-ecf04b612f-lite.chunk.js → 3216-43bdb234b7-lite.chunk.js} +0 -0
  95. /package/dist/scripts/{3285-72f1592710-lite.chunk.js → 3285-591f1481e2-lite.chunk.js} +0 -0
  96. /package/dist/scripts/{3468-5c42c3f485-lite.chunk.js → 3468-4d6fd53bf9-lite.chunk.js} +0 -0
  97. /package/dist/scripts/{3533-ad26b0a09c-lite.chunk.js → 3533-faab1d1e13-lite.chunk.js} +0 -0
  98. /package/dist/scripts/{355-f578d9beb2-lite.chunk.js → 355-9d84132a7e-lite.chunk.js} +0 -0
  99. /package/dist/scripts/{3645-dd57bf267e-lite.chunk.js.LICENSE.txt → 3645-1cb04952b3-lite.chunk.js.LICENSE.txt} +0 -0
  100. /package/dist/scripts/{3667-9a2a4c64b5-lite.chunk.js.LICENSE.txt → 3667-286f44bcc9-lite.chunk.js.LICENSE.txt} +0 -0
  101. /package/dist/scripts/{3754-6d17b49de7-lite.chunk.js → 3754-8f2e909218-lite.chunk.js} +0 -0
  102. /package/dist/scripts/{3787-f1b980ca08-lite.chunk.js → 3787-76a04b7060-lite.chunk.js} +0 -0
  103. /package/dist/scripts/{383-439553ff8f-lite.chunk.js → 383-be043be921-lite.chunk.js} +0 -0
  104. /package/dist/scripts/{3836-0924c271f0-lite.chunk.js → 3836-9829ebb938-lite.chunk.js} +0 -0
  105. /package/dist/scripts/{3848-64b1dab37f-lite.chunk.js → 3848-a8f23fe5d2-lite.chunk.js} +0 -0
  106. /package/dist/scripts/{3849-815facaf40-lite.chunk.js → 3849-7291db19ee-lite.chunk.js} +0 -0
  107. /package/dist/scripts/{389-5ff8e9b829-lite.chunk.js → 389-1c741de6f0-lite.chunk.js} +0 -0
  108. /package/dist/scripts/{3966-61770122fe-lite.chunk.js → 3966-5a706a9450-lite.chunk.js} +0 -0
  109. /package/dist/scripts/{4052-a88bdbbcf1-lite.chunk.js → 4052-92609e6d25-lite.chunk.js} +0 -0
  110. /package/dist/scripts/{414-baf33cb9d0-lite.chunk.js → 414-553dbd2774-lite.chunk.js} +0 -0
  111. /package/dist/scripts/{4145-52b65d2e94-lite.chunk.js → 4145-7d354920a2-lite.chunk.js} +0 -0
  112. /package/dist/scripts/{4182-f84b364819-lite.chunk.js → 4182-e168bebe60-lite.chunk.js} +0 -0
  113. /package/dist/scripts/{4229-c1df7ea14b-lite.chunk.js → 4229-43454055df-lite.chunk.js} +0 -0
  114. /package/dist/scripts/{4290-e921ae9e76-lite.chunk.js → 4290-6356cbba4b-lite.chunk.js} +0 -0
  115. /package/dist/scripts/{4326-ec9ca09585-lite.chunk.js → 4326-9a04c1675b-lite.chunk.js} +0 -0
  116. /package/dist/scripts/{4417-baddebbdf6-lite.chunk.js → 4417-8ae222cad6-lite.chunk.js} +0 -0
  117. /package/dist/scripts/{4436-575256cade-lite.chunk.js → 4436-813f2de728-lite.chunk.js} +0 -0
  118. /package/dist/scripts/{4484-bd2cf7b458-lite.chunk.js → 4484-65672447cd-lite.chunk.js} +0 -0
  119. /package/dist/scripts/{4541-169300086f-lite.chunk.js → 4541-59de215916-lite.chunk.js} +0 -0
  120. /package/dist/scripts/{4632-98c863e6c1-lite.chunk.js → 4632-6b1fc03e10-lite.chunk.js} +0 -0
  121. /package/dist/scripts/{4676-bb8b7e034f-lite.chunk.js.LICENSE.txt → 4676-63c3c6916c-lite.chunk.js.LICENSE.txt} +0 -0
  122. /package/dist/scripts/{4690-7add6db107-lite.chunk.js → 4690-ddb6f8e33d-lite.chunk.js} +0 -0
  123. /package/dist/scripts/{4763-42f4ee27a6-lite.chunk.js → 4763-7c2c7a86e0-lite.chunk.js} +0 -0
  124. /package/dist/scripts/{482-91567ba9a5-lite.chunk.js → 482-af25a29b0b-lite.chunk.js} +0 -0
  125. /package/dist/scripts/{4893-c8fbae6c8d-lite.chunk.js → 4893-8e3089e4e0-lite.chunk.js} +0 -0
  126. /package/dist/scripts/{4901-dbbd888771-lite.chunk.js.LICENSE.txt → 4901-8082b8c806-lite.chunk.js.LICENSE.txt} +0 -0
  127. /package/dist/scripts/{4942-41d01acc50-lite.chunk.js.LICENSE.txt → 4942-e1855d3e14-lite.chunk.js.LICENSE.txt} +0 -0
  128. /package/dist/scripts/{5041-858ca41ef8-lite.chunk.js → 5041-f44af0519b-lite.chunk.js} +0 -0
  129. /package/dist/scripts/{5268-c0ad8047b8-lite.chunk.js.LICENSE.txt → 5268-7044ddf2c8-lite.chunk.js.LICENSE.txt} +0 -0
  130. /package/dist/scripts/{5385-902a17aca1-lite.chunk.js → 5385-fe599acaba-lite.chunk.js} +0 -0
  131. /package/dist/scripts/{5395-cc691d41a1-lite.chunk.js → 5395-34cf703caa-lite.chunk.js} +0 -0
  132. /package/dist/scripts/{5595-ec7a1d94d6-lite.chunk.js → 5595-26ed2f284d-lite.chunk.js} +0 -0
  133. /package/dist/scripts/{5622-df1c9f72f5-lite.chunk.js.LICENSE.txt → 5622-2e03de5953-lite.chunk.js.LICENSE.txt} +0 -0
  134. /package/dist/scripts/{5756-7e5a76b657-lite.chunk.js → 5756-29a508f73a-lite.chunk.js} +0 -0
  135. /package/dist/scripts/{5914-8fbc9ac553-lite.chunk.js → 5914-cfa6c18819-lite.chunk.js} +0 -0
  136. /package/dist/scripts/{5974-5de4c745e3-lite.chunk.js → 5974-1581f6f7f6-lite.chunk.js} +0 -0
  137. /package/dist/scripts/{6057-7472925513-lite.chunk.js → 6057-04eb525941-lite.chunk.js} +0 -0
  138. /package/dist/scripts/{6154-531092aec6-lite.chunk.js → 6154-ffb893a889-lite.chunk.js} +0 -0
  139. /package/dist/scripts/{6158-e5522a2a15-lite.chunk.js → 6158-0d65ceba28-lite.chunk.js} +0 -0
  140. /package/dist/scripts/{6254-67c2d529b5-lite.chunk.js → 6254-1268090b9d-lite.chunk.js} +0 -0
  141. /package/dist/scripts/{6263-cbad229bfe-lite.chunk.js → 6263-9c75a88d29-lite.chunk.js} +0 -0
  142. /package/dist/scripts/{6274-e6a04ae100-lite.chunk.js → 6274-45d001b699-lite.chunk.js} +0 -0
  143. /package/dist/scripts/{6302-6506ee47b5-lite.chunk.js → 6302-4436120348-lite.chunk.js} +0 -0
  144. /package/dist/scripts/{6368-d27d7ddad7-lite.chunk.js → 6368-a2e4a426ab-lite.chunk.js} +0 -0
  145. /package/dist/scripts/{6370-9d45b8efc0-lite.chunk.js → 6370-656f9c3e95-lite.chunk.js} +0 -0
  146. /package/dist/scripts/{6450-3d380d7fb6-lite.chunk.js → 6450-2c3a1e7763-lite.chunk.js} +0 -0
  147. /package/dist/scripts/{6465-61c304878d-lite.chunk.js → 6465-a18bb45727-lite.chunk.js} +0 -0
  148. /package/dist/scripts/{6480-0f993f9e8d-lite.chunk.js → 6480-d55c2f6f97-lite.chunk.js} +0 -0
  149. /package/dist/scripts/{6493-e8829f4043-lite.chunk.js → 6493-9b29994c11-lite.chunk.js} +0 -0
  150. /package/dist/scripts/{6604-afa7ada95d-lite.chunk.js → 6604-f78bf0630f-lite.chunk.js} +0 -0
  151. /package/dist/scripts/{6689-f8f1fe1624-lite.chunk.js → 6689-19a76c14e6-lite.chunk.js} +0 -0
  152. /package/dist/scripts/{6821-f7d1d7ef07-lite.chunk.js → 6821-cc3095a218-lite.chunk.js} +0 -0
  153. /package/dist/scripts/{6822-3c052e82fe-lite.chunk.js → 6822-88521d238b-lite.chunk.js} +0 -0
  154. /package/dist/scripts/{6873-032b4915f9-lite.chunk.js → 6873-985ec69710-lite.chunk.js} +0 -0
  155. /package/dist/scripts/{689-872cae611f-lite.chunk.js → 689-3c6e57d812-lite.chunk.js} +0 -0
  156. /package/dist/scripts/{6896-467ac6697c-lite.chunk.js.LICENSE.txt → 6896-2890da233e-lite.chunk.js.LICENSE.txt} +0 -0
  157. /package/dist/scripts/{6932-c7817af4d6-lite.chunk.js → 6932-4fceb404ed-lite.chunk.js} +0 -0
  158. /package/dist/scripts/{7017-14feec9dd1-lite.chunk.js.LICENSE.txt → 7017-cdf324e732-lite.chunk.js.LICENSE.txt} +0 -0
  159. /package/dist/scripts/{7045-70afbf80c3-lite.chunk.js → 7045-f578d0a23f-lite.chunk.js} +0 -0
  160. /package/dist/scripts/{7052-baf4150fb1-lite.chunk.js.LICENSE.txt → 7052-69903b989d-lite.chunk.js.LICENSE.txt} +0 -0
  161. /package/dist/scripts/{7056-db7a72ae7a-lite.chunk.js → 7056-31c38a89dd-lite.chunk.js} +0 -0
  162. /package/dist/scripts/{7072-c3785ca37e-lite.chunk.js.LICENSE.txt → 7072-9f3b5575a2-lite.chunk.js.LICENSE.txt} +0 -0
  163. /package/dist/scripts/{7108-2acfc76a8d-lite.chunk.js → 7108-5a736ac3bd-lite.chunk.js} +0 -0
  164. /package/dist/scripts/{7115-1dc32e54d7-lite.chunk.js → 7115-cb3e6b9f0e-lite.chunk.js} +0 -0
  165. /package/dist/scripts/{7117-f7821bddb5-lite.chunk.js → 7117-31061aa201-lite.chunk.js} +0 -0
  166. /package/dist/scripts/{7128-e83c5ba823-lite.chunk.js → 7128-bb325140b2-lite.chunk.js} +0 -0
  167. /package/dist/scripts/{714-2bf8567e2a-lite.chunk.js → 714-302bba8f82-lite.chunk.js} +0 -0
  168. /package/dist/scripts/{7172-6c0b0b571e-lite.chunk.js → 7172-e2add93436-lite.chunk.js} +0 -0
  169. /package/dist/scripts/{7203-89126e42d2-lite.chunk.js → 7203-4cd51b60a5-lite.chunk.js} +0 -0
  170. /package/dist/scripts/{7221-aed0b2fd5c-lite.chunk.js.LICENSE.txt → 7221-c8f716fead-lite.chunk.js.LICENSE.txt} +0 -0
  171. /package/dist/scripts/{7286-2500bc1b4d-lite.chunk.js → 7286-1379008638-lite.chunk.js} +0 -0
  172. /package/dist/scripts/{7318-bee88ab659-lite.chunk.js.LICENSE.txt → 7318-7aa5593557-lite.chunk.js.LICENSE.txt} +0 -0
  173. /package/dist/scripts/{7341-e37e1b4702-lite.chunk.js → 7341-eb1bad3d02-lite.chunk.js} +0 -0
  174. /package/dist/scripts/{7506-461f96e632-lite.chunk.js → 7506-3eaf344940-lite.chunk.js} +0 -0
  175. /package/dist/scripts/{7708-a3f51335bb-lite.chunk.js → 7708-168b28b4b9-lite.chunk.js} +0 -0
  176. /package/dist/scripts/{7767-dec6177ee8-lite.chunk.js → 7767-6dd2c2f5d5-lite.chunk.js} +0 -0
  177. /package/dist/scripts/{7855-cb798dcf71-lite.chunk.js → 7855-d0b3720477-lite.chunk.js} +0 -0
  178. /package/dist/scripts/{7925-271289a49d-lite.chunk.js → 7925-d30e261c55-lite.chunk.js} +0 -0
  179. /package/dist/scripts/{7939-2241334bbc-lite.chunk.js → 7939-069695c2b5-lite.chunk.js} +0 -0
  180. /package/dist/scripts/{7950-5ea68fae3f-lite.chunk.js.LICENSE.txt → 7950-6be639d990-lite.chunk.js.LICENSE.txt} +0 -0
  181. /package/dist/scripts/{7952-f487a842d1-lite.chunk.js → 7952-e47c1e49a3-lite.chunk.js} +0 -0
  182. /package/dist/scripts/{8025-aa024b643c-lite.chunk.js → 8025-1a3d147ab1-lite.chunk.js} +0 -0
  183. /package/dist/scripts/{8035-ae1f82dc2b-lite.chunk.js → 8035-cfc9101b02-lite.chunk.js} +0 -0
  184. /package/dist/scripts/{8038-d08d354f1d-lite.chunk.js → 8038-64097776ae-lite.chunk.js} +0 -0
  185. /package/dist/scripts/{8046-2f286c23d8-lite.chunk.js → 8046-c100682365-lite.chunk.js} +0 -0
  186. /package/dist/scripts/{8056-02148dac14-lite.chunk.js → 8056-42c5b638a1-lite.chunk.js} +0 -0
  187. /package/dist/scripts/{823-95520826e7-lite.chunk.js → 823-394819b6e2-lite.chunk.js} +0 -0
  188. /package/dist/scripts/{8252-0b0bc1f57d-lite.chunk.js → 8252-0e7545a270-lite.chunk.js} +0 -0
  189. /package/dist/scripts/{8292-ab603bf688-lite.chunk.js → 8292-5474c9d05b-lite.chunk.js} +0 -0
  190. /package/dist/scripts/{8323-ebde7e14b0-lite.chunk.js.LICENSE.txt → 8323-7392e64015-lite.chunk.js.LICENSE.txt} +0 -0
  191. /package/dist/scripts/{8419-f49f8ac6fb-lite.chunk.js → 8419-1d91b60d17-lite.chunk.js} +0 -0
  192. /package/dist/scripts/{8466-d5ef6547c1-lite.chunk.js → 8466-bfb6296286-lite.chunk.js} +0 -0
  193. /package/dist/scripts/{8500-2c7416d260-lite.chunk.js → 8500-5a8c54adfb-lite.chunk.js} +0 -0
  194. /package/dist/scripts/{8516-eba25d7732-lite.chunk.js → 8516-2dd2445007-lite.chunk.js} +0 -0
  195. /package/dist/scripts/{8564-7754f107a5-lite.chunk.js → 8564-fa63bdf9ff-lite.chunk.js} +0 -0
  196. /package/dist/scripts/{8681-57707d9f89-lite.chunk.js.LICENSE.txt → 8681-9e4cc2dbc7-lite.chunk.js.LICENSE.txt} +0 -0
  197. /package/dist/scripts/{8759-bf94a35e60-lite.chunk.js → 8759-bebac8e7eb-lite.chunk.js} +0 -0
  198. /package/dist/scripts/{8884-dbdbc50014-lite.chunk.js → 8884-e1b68fb19e-lite.chunk.js} +0 -0
  199. /package/dist/scripts/{8955-25ba847cda-lite.chunk.js → 8955-d96a8d96dd-lite.chunk.js} +0 -0
  200. /package/dist/scripts/{9060-39ba0d65a3-lite.chunk.js → 9060-055dda4160-lite.chunk.js} +0 -0
  201. /package/dist/scripts/{9133-886ce0448d-lite.chunk.js → 9133-9e8afb36ee-lite.chunk.js} +0 -0
  202. /package/dist/scripts/{9242-d2e9f4c647-lite.chunk.js → 9242-e54f9cc9bc-lite.chunk.js} +0 -0
  203. /package/dist/scripts/{9428-c2ec53b44d-lite.chunk.js.LICENSE.txt → 9428-1f28bc6429-lite.chunk.js.LICENSE.txt} +0 -0
  204. /package/dist/scripts/{9455-0ff9a13476-lite.chunk.js → 9455-fe8ba71803-lite.chunk.js} +0 -0
  205. /package/dist/scripts/{9478-76af6fb48c-lite.chunk.js.LICENSE.txt → 9478-9b51791ecb-lite.chunk.js.LICENSE.txt} +0 -0
  206. /package/dist/scripts/{9484-d9aef28b8a-lite.chunk.js.LICENSE.txt → 9484-cf98c2c51d-lite.chunk.js.LICENSE.txt} +0 -0
  207. /package/dist/scripts/{949-c7c36f2fb1-lite.chunk.js → 949-4e8c0b0874-lite.chunk.js} +0 -0
  208. /package/dist/scripts/{9522-fdc269fa55-lite.chunk.js.LICENSE.txt → 9522-3c117f4efe-lite.chunk.js.LICENSE.txt} +0 -0
  209. /package/dist/scripts/{9714-43eeb20c56-lite.chunk.js → 9714-8f65a1e3d4-lite.chunk.js} +0 -0
  210. /package/dist/scripts/{9961-d95b268b23-lite.chunk.js → 9961-ffb664f963-lite.chunk.js} +0 -0
  211. /package/dist/scripts/{bundle-307c4a7106.min.js.LICENSE.txt → bundle-090e4ef8d6.min.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
- /*! For license information please see 4901-dbbd888771-lite.chunk.js.LICENSE.txt */
1
+ /*! For license information please see 4901-8082b8c806-lite.chunk.js.LICENSE.txt */
2
2
  "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[4901],{73758:(t,e,n)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}n.d(e,{n:()=>o});var o=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.listeners={}}var e,n;return e=t,n=[{key:"subscribe",value:function(t,e){this.registerListener(t,e)}},{key:"subscribeOnce",value:function(t,e){this.registerListener(t,e,1)}},{key:"unsubscribe",value:function(t,e){this.deregisterListener(t,e)}},{key:"trigger",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.triggerCallbacks(t,n)}},{key:"registerListener",value:function(t,e,n){var r;if("string"!=typeof t)throw new Error("Event name must be a string");if("function"!=typeof e)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[t]=null!==(r=this.listeners[t])&&void 0!==r?r:[],this.listeners[t].push({callback:e,executionLimit:n})}},{key:"deregisterListener",value:function(t,e){var n;if("string"!=typeof t)throw new Error("Event name must be a string");if(e&&"function"!=typeof e)throw new Error("Event callback must be a function");if(e){var r=null===(n=this.listeners[t])||void 0===n?void 0:n.findIndex((function(t){return t.callback===e}));"number"==typeof r&&-1!==r&&(this.listeners[t].splice(r,1),0===this.listeners[t].length&&delete this.listeners[t])}else this.listeners[t]=[]}},{key:"triggerCallbacks",value:function(t){for(var e=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[t]){var o=[];this.listeners[t].forEach((function(t){var e,n;"number"==typeof t.executionLimit&&(t.executionCount=null!==(n=t.executionCount)&&void 0!==n?n:0,t.executionCount++,t.executionCount===t.executionLimit&&o.push(t.callback)),(e=t.callback).apply.apply(e,[null].concat(r))})),o.length&&o.forEach((function(n){return e.deregisterListener(t,n)}))}}}],n&&i(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}())},26733:(t,e,n)=>{n.d(e,{s:()=>O,R:()=>P});var r=n(1024),i=n.n(r),o=n(55460),a=n(97395),s=n(49985),u=n(65858),c=n(36848),l=n(78276),f=n(36532),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(t,e){var n,r,i;if("thumbnail"in e&&(null===(n=e.thumbnail)||void 0===n?void 0:n.url))return v.j.createUrl(null===(r=e.thumbnail)||void 0===r?void 0:r.url,Object.assign({},g));var o=a._.safeUrlConcat(t,"/v1/previews");return"metadata"in e?e.metadata.type===y.L.Pdf?v.j.createResourceImage(o,e.url,g):e.metadata.type===y.L.Image?v.j.createUrl(e.url,{size:h.h2.Medium,resizeType:h.Nq.Cover}):(null===(i=e.pdf)||void 0===i?void 0:i.url)?v.j.createResourceImage(o,e.pdf.url,g):(e.metadata.type,y.L.Zip,"/images/zip-resource.png"):v.j.createResourceImage(o,e.url,Object.assign({},g))}function w(t){var e;return"metadata"in t?t.metadata.type===y.L.Pdf?h.__.Pdf:t.metadata.type===y.L.Image?h.__.Thumbnails:(null===(e=t.pdf)||void 0===e?void 0:e.url)?h.__.Pdf:(t.metadata.type,y.L.Zip,h.__.Thumbnails):h.__.Link}function O(t){var e,n,r,o,a,s,c,h=null,p=0;"metadata"in t.data&&(h=t.data.metadata,p=null!==(r=null===(n=null===(e=t.data.thumbnail)||void 0===e?void 0:e.metadata)||void 0===n?void 0:n.rotation)&&void 0!==r?r:0);var d="".concat(null!==(a=null===(o=t.theme)||void 0===o?void 0:o.containerClass)&&void 0!==a?a:""," pt-3 px-3 rounded-lg d-flex flex-column align-items-center")+" justify-content-end ".concat(function(t){switch(t){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(t.applyHoverState?b.hoverState:""," ");return i().createElement("div",{className:d},!t.hideHeading&&i().createElement(f.u,{title:t.data.name},i().createElement("h3",{className:"text-center text-break h5 mb-3 ".concat(b.text)},i().createElement("span",{className:"clamp-1"},t.data.name))),i().createElement("div",{className:"".concat(null!==(c=null===(s=t.theme)||void 0===s?void 0:s.thumbnailContainerClass)&&void 0!==c?c:""," w-75 overflow-hidden ").concat(b.thumbnailContainer," ").concat(b.imageStyle)},i().createElement(l.Z,{data:m(t.imageCdnUrl,t.data),imageType:w(t.data),imageStyle:{transform:"rotate(".concat(p,"deg)")},alt:t.data.name,analyticsOptions:{location:u.LocationContext.SlidingListItem},errorFallbackImageSrc:t.imageErrorFallbackUrl,imageClassName:(null==h?void 0:h.type)===y.L.Image?"".concat(b.imageTypeResource," ").concat(b.imageStyle):"",preload:t.preloadImage,preventLoad:!t.preloadImage})))}O.defaultProps={preloadImage:!0,actionBehaviour:"normal"};var P=i().memo((function(t){var e,n,r,a,l=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}(t,[]),f=(e=t.data,n=t.actionBehaviour,a=(0,d.k)(),"public"===n||!a.xs&&!a.sm&&"resource"===e.type&&"metadata"in e&&(e.metadata.type===y.L.Image||(e.metadata.type===y.L.Pdf?!!e.url:!!(null===(r=e.pdf)||void 0===r?void 0:r.url)))),h=Object.assign(Object.assign({},t.analyticsData),t.data),v=Object.assign(Object.assign({},t.analyticsOptions),{actionType:u.UserAction.Click,entity:t.data.typeId===p.E.Resource?u.EntityType.Resource:u.EntityType.Link});function g(){s.k.logUserAction(h,v)}var m,w=!!t.data.url;return l.applyHoverState=f||w,i().createElement("div",{className:"pt-1 px-1 flex-shrink-0 ".concat(b.item," resource-item")},(m="d-block no-decoration","link"===t.data.type?i().createElement("a",{href:t.data.url,target:"_blank",className:m,onClick:g},i().createElement(O,Object.assign({},l))):f?"public"===t.actionBehaviour?i().createElement("div",{className:"".concat(m," cursor-pointer d-inline"),onClick:function(){g(),o.AppLinkHelper.trigger(t.getAppLink(t.data))}},i().createElement(O,Object.assign({},l))):i().createElement(c.F,{appLink:t.getAppLink(t.data),className:m,analyticsData:h,analyticsOptions:v},i().createElement(O,Object.assign({},l))):w?i().createElement("a",{href:t.data.url,className:m,onClick:g},i().createElement(O,Object.assign({},l))):i().createElement("div",{className:m},i().createElement(O,Object.assign({},l)))))}))},64915:(t,e,n)=>{n.r(e),n.d(e,{ClickViewPlayer:()=>Sn});var r=n(1024),i=n.n(r),o=n(2200),a=(n(16852),n(93861));function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==s(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===s(i)?i:String(i)),r)}var i}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},c.apply(this,arguments)}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(a,t);var e,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(t){return!1}}(),function(){var t,e=f(r);if(i){var n=f(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.apply(this,arguments)).alwaysCollapsed=!1,t.isCollapsed=!1,t.isCollabsible=!0,t}return e=a,(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(){c(f(a.prototype),"handleClick",this).call(this,null)}}])&&u(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(a.Z.getComponent("Button"));function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==p(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===p(i)?i:String(i)),r)}var i}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}h.prototype.controlText_="Create Clip",a.Z.registerComponent("CreateClipButton",h);var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(a,t);var e,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(t){return!1}}(),function(){var t,e=v(r);if(i){var n=v(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===p(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).options=e,t.ready((function(){return n.onReady()})),n}return e=a,(n=[{key:"onReady",value:function(){var t,e=this.player.getChild("collapserator"),n=null===(t=null==e?void 0:e.children())||void 0===t?void 0:t.findIndex((function(t){return"CustomControlSpacer"===t.name()}));n&&-1!==n&&e.addChild("CreateClipButton",{clickHandler:this.options.onClick},n+1)}}])&&y(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(a.Z.getPlugin("plugin"));function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function m(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==g(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===g(i)?i:String(i)),r)}var i}function w(){return w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=P(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},w.apply(this,arguments)}function O(t,e){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},O(t,e)}function P(t){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},P(t)}a.Z.registerPlugin("createClipButtonPlugin",b);var S=a.Z.getComponent("PlayToggle"),k=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&O(t,e)}(a,t);var e,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(t){return!1}}(),function(){var t,e=P(r);if(i){var n=P(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===g(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).pictureInPictureEnabled=!1,n.options=e,n.bindFunctions(),n}return e=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 t=this;if(this.player.options_.fluid&&!this.pictureInPictureEnabled){var e=this.getToggleParentComponent();if(e){this.pictureInPictureEnabled=!0;var n=e.children().findIndex((function(t){var e;return"fullscreentoggle"===(null===(e=t.name())||void 0===e?void 0:e.toLowerCase())}));-1===n&&(n=e.children().length-1),e.addChild("pictureInPictureToggle",{},n);var r=e.getChild("pictureInPictureToggle");null==r||r.enable(),this.player.on("playerresize",this.onPlayerResize),this.player.on("dispose",(function(){var e;null===(e=t.player)||void 0===e||e.off("playerresize",t.onPlayerResize)}))}}}},{key:"disablePictureInPicture",value:function(){if(this.pictureInPictureEnabled){this.pictureInPictureEnabled=!1;var t=this.getToggleParentComponent(),e=null==t?void 0:t.getChild("pictureInPictureToggle");e&&t.removeChild(e),this.player.off("playerresize",this.onPlayerResize)}}},{key:"togglePictureInPicture",value:function(t){if(t!==this.player.isInPictureInPicture()){var e=t?"enterpictureinpicture":"leavepictureinpicture";this.player.isInPictureInPicture(t),this.player.trigger(e),t?this.addPipStyles():this.removePipStyles()}}},{key:"onPlayerResize",value:function(){if(!this.player.isInPictureInPicture()){var t=this.player.el().getBoundingClientRect();0!==t.width&&(t.width<800?this.disablePictureInPicture():this.enablePictureInPicture())}}},{key:"addPipStyles",value:function(){this.player.addClass("cv-picture-in-picture"),this.playToggle=new S(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 t;this.pictureInPictureEnabled&&(this.togglePictureInPicture(!0),"function"==typeof(null===(t=this.options)||void 0===t?void 0:t.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,w(P(a.prototype),"dispose",this).call(this)}}])&&m(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(a.Z.getPlugin("plugin"));a.Z.registerPlugin("pictureInPicture",k);var j=n(23035),E=n(42892),x=n(73758);function T(t){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},T(t)}function C(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==T(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==T(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===T(i)?i:String(i)),r)}var i}function I(){return I="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=L(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},I.apply(this,arguments)}function _(t,e){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_(t,e)}function R(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function L(t){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},L(t)}var D=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_(t,e)}(s,t);var e,n,r,i,o=(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(t){return!1}}(),function(){var t,e=L(r);if(i){var n=L(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===T(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return R(t)}(this,t)});function s(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(n=o.call(this,t,e)).hasBuffered=!1,n.hasPlayed=!1,n.eventsService=x.n,n.pointOfInterest=e.pointOfInterest,n.onMouseOver=n.onMouseOver.bind(R(n)),n.onMouseLeave=n.onMouseLeave.bind(R(n)),n.onGlancePointOfInterestMouseEnter=n.onGlancePointOfInterestMouseEnter.bind(R(n)),n.onGlancePointOfInterestMouseLeave=n.onGlancePointOfInterestMouseLeave.bind(R(n)),n.initialize(),n}return e=s,(n=[{key:"initialize",value:function(){this.setPosition(),this.bindListeners()}},{key:"buildCSSClass",value:function(){return"cv-point-of-interest-indicator ".concat(I(L(s.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return I(L(s.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{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 t=this.player().duration();this.el_.style.left=this.getPointOfInterestTime()/t*100+"%"}},{key:"updateBuffered",value:function(t){var e=this.getPointOfInterestTime()<=t;if(e!==this.hasBuffered){this.hasBuffered=e;var n="cv-point-of-interest-indicator-buffered";this.hasBuffered?this.addClass(n):this.removeClass(n)}}},{key:"updatePlaybackProgress",value:function(t){var e=this.getPointOfInterestTime()<=t;if(e!==this.hasPlayed){this.hasPlayed=e;var n="cv-point-of-interest-indicator-played";e?this.addClass(n):this.removeClass(n)}}},{key:"toggleVisibility",value:function(t){var e="cv-point-of-interest-indicator-hidden";t?this.removeClass(e):this.addClass(e)}},{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(t){t.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 t;null===(t=this.getTimeTooltip())||void 0===t||t.setCustomChapterText(this.pointOfInterest.description)}},{key:"clearTimeTooltipText",value:function(){var t;null===(t=this.getTimeTooltip())||void 0===t||t.setCustomChapterText()}},{key:"setTimeTooltipTime",value:function(){var t=this.getTimeTooltip();null==t||t.updateTime(this.getPointOfInterestTime())}},{key:"positionMouseTimeDisplay",value:function(){var t,e,n=null===(t=this.getSeekBar())||void 0===t?void 0:t.el();if(n){var r=a.Z.dom.findPosition(n),i=this.getPointOfInterestTime()/this.player().duration();null===(e=this.getMouseTimeDisplay())||void 0===e||e.update(r,i)}}},{key:"showMouseTimeDisplay",value:function(){var t;null===(t=this.getMouseTimeDisplay())||void 0===t||t.forceShow()}},{key:"hideMouseTimeDisplay",value:function(){var t;null===(t=this.getMouseTimeDisplay())||void 0===t||t.removeForceShow()}},{key:"getSeekBar",value:function(){var t;return null===(t=this.player().controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar")}},{key:"getMouseTimeDisplay",value:function(){var t;return null===(t=this.getSeekBar())||void 0===t?void 0:t.getChild("MouseTimeDisplay")}},{key:"getTimeTooltip",value:function(){var t;return null===(t=this.getMouseTimeDisplay())||void 0===t?void 0:t.getChild("TimeTooltip")}}])&&C(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(a.Z.getComponent("Component"));function M(t){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},M(t)}function N(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==M(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==M(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===M(i)?i:String(i)),r)}var i}function B(){return B="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=A(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},B.apply(this,arguments)}function V(t,e){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},V(t,e)}function A(t){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},A(t)}var F=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&V(t,e)}(s,t);var e,n,r,i,o=(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(t){return!1}}(),function(){var t,e=A(r);if(i){var n=A(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===M(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function s(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(n=o.call(this,t,e)).pointsOfInterestVisible=e.pointsOfInterestVisible,n.toggle(n.pointsOfInterestVisible),n}return e=s,(n=[{key:"handleToggle",value:function(){this.toggle(!this.pointsOfInterestVisible)}},{key:"toggle",value:function(t){t?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){a.Z.dom.addClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!0,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"toggleOff",value:function(){a.Z.dom.removeClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!1,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"handleClick",value:function(t){t.stopImmediatePropagation()}},{key:"createEl",value:function(t,e,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=a.Z.dom.createEl("div",{className:"custom-toggle toggle-option float-right",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=B(A(s.prototype),"createEl",this).call(this,t,{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}}])&&N(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(a.Z.getComponent("MenuItem"));function Z(t){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Z(t)}function U(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Z(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Z(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Z(i)?i:String(i)),r)}var i}function z(t,e){return z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},z(t,e)}function G(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function q(t){return q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},q(t)}a.Z.registerComponent("PointsOfInterestMenuItem",F);var H=a.Z.getPlugin("plugin"),W="cvplayer-points-of-interest",Y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&z(t,e)}(a,t);var e,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(t){return!1}}(),function(){var t,e=q(r);if(i){var n=q(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Z(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return G(t)}(this,t)});function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t)).pointOfInterestIndicators=[],n.enabled=!0,n.pointsOfInterest=null==e?void 0:e.pointsOfInterest,n.initialize=n.initialize.bind(G(n)),n.updateBuffered=n.updateBuffered.bind(G(n)),n.updatePlaybackProgress=n.updatePlaybackProgress.bind(G(n)),n.player.one("loadedmetadata",(function(){return n.player.ready(n.initialize)})),n}return e=a,(n=[{key:"initialize",value:function(){this.pointsOfInterest&&(E.S.hasLocalStorage()&&"false"===E.S.get(W)&&(this.enabled=!1),this.setupTrack(),this.createPointOfInterestIndicators(),this.addMenuItem(),this.bindListeners())}},{key:"bindListeners",value:function(){var t=this;this.player.on("progress",this.updateBuffered),this.player.on("timeupdate",this.updatePlaybackProgress),this.player.on("dispose",(function(){var e,n;null===(e=t.player)||void 0===e||e.off("progress",t.updateBuffered),null===(n=t.player)||void 0===n||n.off("timeupdate",t.updatePlaybackProgress)}))}},{key:"togglePointsOfInterest",value:function(t){E.S.set(W,t.toString()),this.pointOfInterestIndicators.forEach((function(e){return e.toggleVisibility(t)}))}},{key:"setupTrack",value:function(){var t=this.player.addTextTrack("metadata","pointsofinterest");this.pointsOfInterest.forEach((function(e){t.addCue({startTime:e.startTime,endTime:e.endTime,text:e.description})})),t.trigger({type:"loadeddata",target:t})}},{key:"createPointOfInterestIndicators",value:function(){var t,e=this,n=null===(t=this.player.controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar");this.pointsOfInterest.forEach((function(t){var r=new D(e.player,{pointOfInterest:t});e.pointOfInterestIndicators.push(r),n.addChild(r)}))}},{key:"addMenuItem",value:function(){var t;(null===(t=this.player.getChild("collapserator"))||void 0===t?void 0:t.getChild("cogButton")).addItem({index:0,ctor:F,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var t=this;this.pointOfInterestIndicators.forEach((function(e){return e.updateBuffered((0,j.b)(t.player))}))}},{key:"updatePlaybackProgress",value:function(){var t=this;this.pointOfInterestIndicators.forEach((function(e){return e.updatePlaybackProgress(t.player.currentTime())}))}}])&&U(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(H);a.Z.registerPlugin("pointsOfInterestPlugin",Y),n(93262);var $=n(95569),Q=function(){var t,e;return null!==(e=null===(t=window.crypto)||void 0===t?void 0:t.randomUUID())&&void 0!==e?e:Math.random().toString()};function J(t){var e="function"==typeof Map?new Map:void 0;return J=function(t){if(null===t||!function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return X(t,arguments,et(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),tt(n,t)},J(t)}function X(t,e,n){return X=K()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&tt(i,n.prototype),i},X.apply(null,arguments)}function K(){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(t){return!1}}function tt(t,e){return tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},tt(t,e)}function et(t){return et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},et(t)}function nt(t){return nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nt(t)}function rt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function it(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==nt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==nt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===nt(i)?i:String(i)),r)}var i}function ot(t,e,n){return e&&it(t.prototype,e),n&&it(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var at=function(){function t(){rt(this,t),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 ot(t,[{key:"trigger",value:function(t){var e=this;this.callbacks.forEach((function(n,r){var i=e.predicates[r];i&&!i(t)||n(t)}))}},{key:"on",value:function(t){var e=this;this.isDisposed()&&console.warn("This EventChannel instance been disposed - this is a no-op");var n=this.callbacks.length;this.callbacks[n]=t,this.predicates[n]=function(){return!0};var r=function(){e.off(t)};return{off:r,filter:function(t){return e.predicates[n]=t,r}}}},{key:"one",value:function(){var t,e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0};return this.isDisposed()?st.reject(new Error("This EventChannel instance has been disposed")):new st((function(r,i){t=e.on((function(n){e.signal.removeEventListener("abort",o),t(),r(n)})).filter(n);var o=function(){t(),i(new Error("Aborted while waiting for message"))};e.signal.addEventListener("abort",o,{once:!0})}),(function(){t()}))}},{key:"off",value:function(t){var e=this.callbacks.indexOf(t);-1!==e&&(this.callbacks.splice(e,1),this.predicates.splice(e,1))}},{key:"dispose",value:function(){this.callbacks.length=0,this.predicates.length=0,this.controller.abort()}},{key:"isDisposed",value:function(){return this.signal.aborted}}]),t}(),st=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tt(t,e)}(i,t);var e,n,r=(e=i,n=K(),function(){var t,r=et(e);if(n){var i=et(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return function(t,e){if(e&&("object"===nt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function i(t,e){var n;return rt(this,i),(n=r.call(this,t)).onTimeout=e,n.bindFunctions(),n}return ot(i,[{key:"bindFunctions",value:function(){this.timeout=this.timeout.bind(this)}},{key:"timeout",value:function(t){var e=this;return new Promise((function(n,r){e.then(n).catch(r).finally((function(){return clearTimeout(i)}));var i=setTimeout((function(){var t;null===(t=e.onTimeout)||void 0===t||t.call(e),r(new Error("Promise timed out"))}),t)}))}}],[{key:"reject",value:function(t){return new i((function(e,n){return n(t)}))}}]),i}(J(Promise)),ut=function(){function t(){rt(this,t),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 ot(t,[{key:"trigger",value:function(t,e){this.getChannel(t).trigger(e)}},{key:"on",value:function(t,e){return this.getChannel(t).on(e)}},{key:"one",value:function(t,e){return this.getChannel(t).one(e)}},{key:"off",value:function(t,e){this.getChannel(t).off(e)}},{key:"dispose",value:function(){this.trigger("dispose",ct.void),Object.values(this.channels).forEach((function(t){return t.dispose()})),this.channels={}}},{key:"getChannel",value:function(t){return this.channels[t]||(this.channels[t]=new at),this.channels[t]}}]),t}(),ct={void:void 0};function lt(t){return lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lt(t)}function ft(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==lt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==lt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===lt(i)?i:String(i)),r)}var i}var ht=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.bindFunctions()}var e,n;return e=t,(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(t){return this.task=t,this}},{key:"every",value:function(t){return this.intervalInMilliseconds=t,this}},{key:"trigger",value:function(){var t;return null===(t=this.task)||void 0===t||t.call(this,this),this}},{key:"start",value:function(){var t=this;return this.intervalId||(this.intervalId=setInterval((function(){return t.trigger()}),this.intervalInMilliseconds)),this}},{key:"stop",value:function(){return this.intervalId&&(clearInterval(this.intervalId),this.intervalId=void 0),this}}])&&ft(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function pt(t){return pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pt(t)}function yt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==pt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==pt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===pt(i)?i:String(i)),r)}var i}var dt,vt={reconnectIntervalInMilliseconds:3e3,heartbeatEnabled:!1,heartbeatIntervalInMillseconds:1e4,heartbeatMessage:""},bt=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vt;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.bindFunctions(),this.url=e,this.options=Object.assign(Object.assign({},vt),r),this.webSocket=this.connect(),this.heartbeat=(new ht).schedule((function(){return n.send(n.options.heartbeatMessage)})).every(this.options.heartbeatIntervalInMillseconds)}var e,n;return e=t,(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(t){var e;null===(e=this.onOpen)||void 0===e||e.call(this,t),this.options.heartbeatEnabled&&this.heartbeat.start()}},{key:"handleMessage",value:function(t){var e;null===(e=this.onMessage)||void 0===e||e.call(this,t)}},{key:"handleClose",value:function(t){var e,n=this;null===(e=this.onClose)||void 0===e||e.call(this,t),this.cleanup(),setTimeout((function(){n.webSocket=n.connect()}),this.options.reconnectIntervalInMilliseconds)}},{key:"handleError",value:function(t){var e;null===(e=this.onError)||void 0===e||e.call(this,t),this.handleClose()}},{key:"connect",value:function(){var t=new WebSocket(this.url);return t.addEventListener("open",this.handleOpen),t.addEventListener("message",this.handleMessage),t.addEventListener("close",this.handleClose),t.addEventListener("error",this.handleError),t}},{key:"send",value:function(t){this.webSocket.send(t)}},{key:"dipose",value:function(){this.cleanup(),this.webSocket.close()}}])&&yt(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function gt(t){return gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gt(t)}function mt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==gt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==gt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===gt(i)?i:String(i)),r)}var i}!function(t){t.AppleTv="apple-tv",t.Vivi="vivi"}(dt||(dt={}));var wt=function(){function t(e,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),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=e,this.device=n,this.ready=!1,this.debounced=this.withDebouncedSetters(),this.withTimestampedSetters()}var e,n;return e=t,(n=[{key:"withDebouncedSetters",value:function(){var t=this;return new Proxy(this,{set:function(e,n,r,i){var o=t.lastModified[n.toString()];return!!(o&&Date.now()<o+2e3)||Reflect.set(e,n,r,i)}})}},{key:"withTimestampedSetters",value:function(){var t=this;return new Proxy(this,{set:function(e,n,r,i){return t.lastModified[n.toString()]=Date.now(),Reflect.set(e,n,r,i)}})}}])&&mt(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ot(t){return Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ot(t)}function Pt(){Pt=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof b?e:b,a=Object.create(o.prototype),s=new I(r||[]);return i(a,"_invoke",{value:E(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.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 O=Object.getPrototypeOf,P=O&&O(O(_([])));P&&P!==n&&r.call(P,a)&&(w=P);var S=m.prototype=b.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Ot(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function E(e,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:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=x(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(e,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 x(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,x(e,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,e.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[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function _(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(Ot(e)+" 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"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(j.prototype),c(j.prototype,s,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=_,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!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(t,e){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"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:_(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function St(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Ot(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Ot(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Ot(i)?i:String(i)),r)}var i}function kt(){return kt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Et(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},kt.apply(this,arguments)}function jt(t,e){return jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jt(t,e)}function Et(t){return Et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Et(t)}var xt=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},Tt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jt(t,e)}(a,t);var e,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(t){return!1}}(),function(){var t,e=Et(r);if(i){var n=Et(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Ot(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this)).client=t,n.queryDeviceState=new ht,n.localState=new wt(e.title,e.device),n.bindFunctions(),n.initialize(),n}return e=a,(n=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.dispose=this.dispose.bind(this),this.handleDisconnect=this.handleDisconnect.bind(this),this.reconcileRemoteState=this.reconcileRemoteState.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 t=this;this.client.on("dispose",this.dispose),this.client.on("message",this.handleDisconnect).filter((function(e){return e.source===t.getDevice().id&&"disconnect"===e.message.type})),this.queryDeviceState.every(1e3).schedule((function(){return t.reconcileRemoteState()}))}},{key:"dispose",value:function(){this.client.off("dispose",this.dispose),this.client.off("message",this.handleDisconnect),this.queryDeviceState.stop(),this.client.stop(this.getDevice().id).catch($.ZT),kt(Et(a.prototype),"dispose",this).call(this)}},{key:"handleDisconnect",value:function(){return xt(this,void 0,void 0,Pt().mark((function t(){return Pt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.client.joinRoom(this.getDevice().id);case 3:t.next=9;break;case 5:t.prev=5,t.t0=t.catch(0),this.trigger("error",t.t0),this.dispose();case 9:case"end":return t.stop()}}),t,this,[[0,5]])})))}},{key:"reconcileRemoteState",value:function(){return xt(this,void 0,void 0,Pt().mark((function t(){var e,n,r,i,o,a;return Pt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.query(this.getDevice().id);case 2:if(e=t.sent,n=this.localState.debounced,r=e.message.payload.play_state,i=e.message.payload.urls,o=i.find((function(t){return t.url===n.videoSource})),a=i.indexOf(o),o&&a===r.chapter){t.next=12;break}return console.info("The device is no longer playing the source we loaded - disposing the session"),this.dispose(),t.abrupt("return");case 12:n.subtitleSource!==o.suburl&&(n.subtitleSource=o.suburl,this.trigger("subtitleschange",ct.void)),n.subtitles!==r.subtitles&&(n.subtitles=r.subtitles,this.trigger("subtitleschange",ct.void)),n.volume!==r.volume&&(n.volume=r.volume,this.trigger("volumechange",ct.void)),n.mute!==r.mute&&(n.mute=r.mute,this.trigger("volumechange",ct.void)),n.duration!==r.duration&&(n.duration=r.duration,this.trigger("durationchange",ct.void)),n.playing!==r.playing&&(n.playing=r.playing,this.trigger("playingchange",ct.void)),n.position!==r.position&&(n.position=r.position,this.trigger("positionchange",ct.void));case 19:case"end":return t.stop()}}),t,this)})))}},{key:"loadSource",value:function(t,e){return xt(this,void 0,void 0,Pt().mark((function n(){return Pt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.localState.videoSource!==t||this.localState.subtitleSource!==e){n.next=2;break}return n.abrupt("return");case 2:return n.prev=2,this.localState.videoSource=t,this.localState.subtitleSource=e,this.localState.ready=!1,this.queryDeviceState.stop(),n.next=9,this.client.joinRoom(this.getDevice().id);case 9:return n.next=11,this.client.loadQueue({roomId:this.getDevice().id,title:this.getTitle(),videoSource:t,subtitleSource:e});case 11:this.client.seek(this.getDevice().id,this.localState.position),this.localState.ready=!0,this.queryDeviceState.start(),this.trigger("sourceloaded",ct.void),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",ct.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",ct.void))}},{key:"seek",value:function(t){this.localState.ready&&this.localState.position!==t&&(this.localState.position=t,this.client.seek(this.getDevice().id,t),this.trigger("positionchange",ct.void))}},{key:"setVolume",value:function(t){this.localState.ready&&this.localState.volume!==t&&(this.localState.volume=t,this.client.setVolume(this.getDevice().id,t),this.trigger("volumechange",ct.void))}},{key:"setMuted",value:function(t){this.localState.ready&&this.localState.mute!==t&&(this.localState.mute=t,this.client.setMuted(this.getDevice().id,t),this.trigger("volumechange",ct.void))}},{key:"setSubtitles",value:function(t){return xt(this,void 0,void 0,Pt().mark((function e(){var n;return Pt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.localState.ready){e.next=2;break}return e.abrupt("return");case 2:if(!t){e.next=5;break}return e.next=5,this.loadSource(this.localState.videoSource,t);case 5:n=!!t,this.localState.subtitles!==n&&(this.localState.subtitles=n,this.client.setSubtitles(this.getDevice().id,n),this.trigger("subtitleschange",ct.void));case 7:case"end":return e.stop()}}),e,this)})))}},{key:"isPlaying",value:function(){return this.localState.playing}},{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}}])&&St(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(ut);function Ct(t){return Ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ct(t)}function It(){It=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof b?e:b,a=Object.create(o.prototype),s=new I(r||[]);return i(a,"_invoke",{value:E(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.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 O=Object.getPrototypeOf,P=O&&O(O(_([])));P&&P!==n&&r.call(P,a)&&(w=P);var S=m.prototype=b.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Ct(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function E(e,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:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=x(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(e,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 x(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,x(e,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,e.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[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function _(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(Ct(e)+" 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"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(j.prototype),c(j.prototype,s,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=_,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!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(t,e){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"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:_(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function _t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Ct(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Ct(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Ct(i)?i:String(i)),r)}var i}function Rt(){return Rt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Dt(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Rt.apply(this,arguments)}function Lt(t,e){return Lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lt(t,e)}function Dt(t){return Dt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Dt(t)}var Mt=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},Nt=1e4,Bt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lt(t,e)}(s,t);var e,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(t){return!1}}(),function(){var t,e=Dt(i);if(o){var n=Dt(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Ct(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function s(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(e=a.call(this)).options=t,e.accessToken="",e.devices=[],e.deviceDiscovery=new ht,e.bindFunctions(),e.initialize(),e}return e=s,r=[{key:"createAckId",value:function(){return Q()}}],(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,$.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 t=this;this.webSocket=new bt(this.options.url.toString()),this.webSocket.onMessage=function(e){return t.trigger("message",JSON.parse(e.data))},this.webSocket.onOpen=function(){return Mt(t,void 0,void 0,It().mark((function t(){return It().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.options.fetchAccessToken();case 3:return this.accessToken=t.sent,t.next=6,this.authenticateWithVivi();case 6:this.beginDeviceDiscovery(),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),this.trigger("error",t.t0);case 12:case"end":return t.stop()}}),t,this,[[0,9]])})))}}},{key:"beginDeviceDiscovery",value:function(){var t=this;this.deviceDiscovery.every(1e4).schedule((function(){return Mt(t,void 0,void 0,It().mark((function t(){var e;return It().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRoomList();case 2:if((e=t.sent).map((function(t){return t.id})).sort().join(",")!==this.devices.map((function(t){return t.id})).sort().join(",")){t.next=5;break}return t.abrupt("return");case 5:this.devices=e.map((function(t){return{id:t.id,name:t.name,type:dt.Vivi,available:!0}})),this.trigger("deviceschange",ct.void);case 7:case"end":return t.stop()}}),t,this)})))})).trigger().start()}},{key:"dispose",value:function(){var t;this.deviceDiscovery.stop(),null===(t=this.webSocket)||void 0===t||t.dipose(),Rt(Dt(s.prototype),"dispose",this).call(this)}},{key:"sendMessage",value:function(t){var e;null===(e=this.webSocket)||void 0===e||e.send(JSON.stringify(t))}},{key:"canCastToDevice",value:function(t){return t===dt.Vivi}},{key:"getDevices",value:function(){return this.devices}},{key:"startCastSession",value:function(t){return new Tt(this,t)}},{key:"authenticateWithVivi",value:function(){return Mt(this,void 0,void 0,It().mark((function t(){return It().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:"relay",message:{token:this.accessToken,type:"identify_video_api"}}),t.next=3,this.one("message",(function(t){return"video_api_identified"===t.message.type})).timeout(Nt).catch((function(){throw new Error("Failed to authenticate with Vivi")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"getRoomList",value:function(){return Mt(this,void 0,void 0,It().mark((function t(){var e;return It().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:"relay",message:{type:"video_api_rooms"}}),t.next=3,this.one("message",(function(t){return"video_api_rooms"===t.message.type})).timeout(Nt).catch((function(){throw new Error("Failed to fetch rooms")}));case 3:return e=t.sent,t.abrupt("return",e.message.rooms||[]);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"joinRoom",value:function(t){return Mt(this,void 0,void 0,It().mark((function e(){return It().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:"relay",message:{destination_type:"box",new_destination:t,token:this.accessToken,type:"connect"}}),e.next=3,this.one("message",(function(e){return e.source===t&&"connect"===e.message.type||"error"===e.message.type&&"already_connected"===e.message.error_type||void 0})).timeout(Nt).catch((function(){throw new Error("Failed to join room")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"query",value:function(t){return Mt(this,void 0,void 0,It().mark((function e(){var n;return It().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.createAckId(),this.sendMessage({destination:t,message:{type:"message_with_ack",ack_id:n,name:"query"}}),e.next=4,this.one("message",(function(t){return t.message.ack_id===n})).timeout(Nt).catch((function(){throw new Error("Failed to fetch query")}));case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)})))}},{key:"loadQueue",value:function(t){var e=t.roomId,n=t.title,r=t.videoSource,i=t.subtitleSource;return Mt(this,void 0,void 0,It().mark((function t(){return It().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:s.createAckId(),name:"queue_load",payload:{urls:[{title:n,url:r,suburl:i}]}}}),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(Nt).catch((function(){throw new Error("Failed to load media")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"play",value:function(t){return Mt(this,void 0,void 0,It().mark((function e(){return It().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:t,message:{type:"message",name:"video_play",payload:{}}}),e.next=3,this.one("message",(function(e){var n;return e.source===t&&"playing"===(null===(n=e.message.payload)||void 0===n?void 0:n.event)})).timeout(Nt).catch((function(){throw new Error("Failed to play video")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"pause",value:function(t){return Mt(this,void 0,void 0,It().mark((function e(){return It().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:t,message:{type:"message",name:"video_pause"}}),e.next=3,this.one("message",(function(e){var n;return e.source===t&&"paused"===(null===(n=e.message.payload)||void 0===n?void 0:n.event)})).timeout(Nt).catch((function(){throw new Error("Failed to pause video")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"stop",value:function(t){return Mt(this,void 0,void 0,It().mark((function e(){return It().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:t,message:{type:"message",name:"video_stop"}}),e.next=3,this.one("message",(function(e){var n;return e.source===t&&"stopped"===(null===(n=e.message.payload)||void 0===n?void 0:n.event)})).timeout(Nt).catch((function(){throw new Error("Failed to stop video")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"seek",value:function(t,e){return Mt(this,void 0,void 0,It().mark((function n(){return It().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.sendMessageDebounced({destination:t,message:{type:"message",name:"video_seek",payload:{position:e}}})){n.next=4;break}return n.next=4,this.one("message",(function(e){var n;return e.source===t&&"playing"===(null===(n=e.message.payload)||void 0===n?void 0:n.event)})).timeout(Nt).catch((function(){throw new Error("Failed to seek video")}));case 4:case"end":return n.stop()}}),n,this)})))}},{key:"setVolume",value:function(t,e){return Mt(this,void 0,void 0,It().mark((function n(){return It().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.sendMessageDebounced({destination:t,message:{type:"message",name:"set_volume",payload:{volume:e}}})){n.next=4;break}return n.next=4,this.one("message",(function(e){var n;return e.source===t&&"volume"===(null===(n=e.message.payload)||void 0===n?void 0:n.event)})).timeout(Nt).catch((function(){throw new Error("Failed to set volume")}));case 4:case"end":return n.stop()}}),n,this)})))}},{key:"setMuted",value:function(t,e){return Mt(this,void 0,void 0,It().mark((function n(){return It().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return this.sendMessage({destination:t,message:{type:"message",name:"set_mute",payload:{mute:e}}}),n.next=3,this.one("message",(function(e){var n;return e.source===t&&"mute"===(null===(n=e.message.payload)||void 0===n?void 0:n.event)})).timeout(Nt).catch((function(){throw new Error("Failed to set mute")}));case 3:case"end":return n.stop()}}),n,this)})))}},{key:"setSubtitles",value:function(t,e){return Mt(this,void 0,void 0,It().mark((function n(){var r;return It().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=s.createAckId(),this.sendMessage({destination:t,message:{type:"message_with_ack",ack_id:r,name:"set_subtitles",payload:{subtitles:e}}}),n.next=4,this.one("message",(function(e){return e.source===t&&e.message.ack_id===r})).timeout(Nt).catch((function(){throw new Error("Failed to set subtitles")}));case 4:case"end":return n.stop()}}),n,this)})))}}])&&_t(e.prototype,n),r&&_t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),s}(ut);function Vt(t){return Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vt(t)}function At(t){return function(t){if(Array.isArray(t))return Ft(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ft(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ft(t,e):void 0}}(t)||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 Ft(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Zt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Vt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Vt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Vt(i)?i:String(i)),r)}var i}function Ut(){return Ut="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Gt(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Ut.apply(this,arguments)}function zt(t,e){return zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zt(t,e)}function Gt(t){return Gt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Gt(t)}var qt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zt(t,e)}(s,t);var e,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(t){return!1}}(),function(){var t,e=Gt(i);if(o){var n=Gt(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Vt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function s(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this)).clients=[],t.bindFunctions(),t}return e=s,r=[{key:"getOrCreateInstance",value:function(t){if(!t)throw new Error("instanceId is required");return this.instances[t]||(this.instances[t]=new s),this.instances[t]}},{key:"disposeAndRemoveInstance",value:function(t){this.getOrCreateInstance(t).dispose(),delete this.instances[t]}},{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(t){var e=this;t.on("deviceschange",this.gatherAndPublishDevices),t.on("error",(function(t){return e.trigger("error",t)})),this.clients.push(t)}},{key:"hasInstanceOfClient",value:function(t){return this.clients.some((function(e){return e instanceof t}))}},{key:"startCastSession",value:function(t){var e=this;if(this.castSession){if(this.castSession.getDevice().id===t.device.id)return void console.info("A session with device ".concat(t.device.id," already exists - this is a no-op"));this.castSession.dispose()}var n=this.clients.find((function(e){return e.canCastToDevice(t.device.type)}));n&&(this.castSession=n.startCastSession(t),this.castSession.on("error",(function(t){e.castSession.dispose(),e.trigger("error",t)})),this.castSession.on("dispose",(function(){e.castSession=void 0,e.trigger("castsessionchange",void 0)})),this.trigger("castsessionchange",this.castSession))}},{key:"getCastSession",value:function(){return this.castSession}},{key:"gatherAndPublishDevices",value:function(){var t=this.clients.map((function(t){return t.getDevices()})).reduce((function(t,e){return[].concat(At(t),At(e))}),[]);this.trigger("deviceschange",t)}},{key:"dispose",value:function(){var t;null===(t=this.castSession)||void 0===t||t.dispose(),this.clients.forEach((function(t){return t.dispose()})),this.castSession=void 0,this.clients=[],Ut(Gt(s.prototype),"dispose",this).call(this)}}])&&Zt(e.prototype,n),r&&Zt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),s}(ut);qt.instances={};var Ht=n(30050),Wt=n(98115);function Yt(t){return Yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yt(t)}function $t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Yt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Yt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Yt(i)?i:String(i)),r)}var i}function Qt(){return Qt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Kt(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Qt.apply(this,arguments)}function Jt(t,e){return Jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jt(t,e)}function Xt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Kt(t){return Kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Kt(t)}var te=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jt(t,e)}(a,t);var e,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(t){return!1}}(),function(){var t,e=Kt(r);if(i){var n=Kt(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Yt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Xt(t)}(this,t)});function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).isVisible=n.isVisible.bind(Xt(n)),n}return e=a,(n=[{key:"createEl",value:function(){return Qt(Kt(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(){Qt(Kt(a.prototype),"show",this).call(this)}},{key:"hide",value:function(){Qt(Kt(a.prototype),"hide",this).call(this)}},{key:"isVisible",value:function(){return!Qt(Kt(a.prototype),"hasClass",this).call(this,"vjs-hidden")}}])&&$t(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(a.Z.getComponent("MenuItem"));function ee(t){return ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ee(t)}function ne(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==ee(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==ee(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===ee(i)?i:String(i)),r)}var i}function re(){return re="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=oe(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},re.apply(this,arguments)}function ie(t,e){return ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ie(t,e)}function oe(t){return oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},oe(t)}var ae=a.Z.getComponent("MenuButton"),se=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ie(t,e)}(a,t);var e,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(t){return!1}}(),function(){var t,e=oe(r);if(i){var n=oe(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===ee(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).alwaysCollapsed=!1,n.isCollapsed=!1,n.isCollabsible=!0,n.searchText="",n.devices=[],n.castSession=void 0,n.bindFunctions(),n.bindEventListeners(),n}return e=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 t=this,e=this.$("button"),n=function(e){t.menu.handleBlur(e)};e.addEventListener("blur",n),this.one("dispose",(function(){e.removeEventListener("blur",n)}))}},{key:"createEl",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=ae.prototype.createEl).apply.apply(t,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-devices-button ".concat(re(oe(a.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var t=this,e=[];return this.headingItem=new Ht.Z(this.player_,{label:this.localize("Select a device"),selectable:!1}),this.searchInputItem=new Wt.Z(this.player_,{menuButton:this,search:function(e){return t.setSearchText(e)},className:"cv-devices-search-input"}),this.emptyPlaceholder=new Wt.C(this.player_,{label:"No devices found",selected:!1,selectable:!1,multiSelectable:!1}),this.headingItem.show(),this.searchInputItem.hide(),this.emptyPlaceholder.show(),e.push(this.headingItem,this.searchInputItem,this.emptyPlaceholder),e}},{key:"pressButton",value:function(){var t;re(oe(a.prototype),"pressButton",this).call(this),this.shouldShowSearchInput()&&(null===(t=this.searchInputItem)||void 0===t||t.focus())}},{key:"setDevices",value:function(t){this.devices=t,this.render()}},{key:"setCastSession",value:function(t){this.castSession=t,this.render()}},{key:"setSearchText",value:function(t){this.searchText=t,this.render()}},{key:"getDeviceMenuItems",value:function(){return this.menu.children_.filter((function(t){return t instanceof te}))}},{key:"render",value:function(){var t=this.getDeviceMenuItems();this.removeMenuItems(t),this.addMenuItemsForDevices(this.devices),this.toggleSearchInput(),this.toggleDeviceMenuItems(),this.toggleEmptyStatePlaceholder()}},{key:"removeMenuItems",value:function(t){var e=this;t.forEach((function(t){return e.menu.removeChild(t)}))}},{key:"addMenuItemsForDevices",value:function(t){var e=this;t.forEach((function(t){var n=new te(e.player(),{id:t.id,label:t.name,selected:!1,multiSelectable:!1,selectable:t.available,available:t.available,type:t.type,onClick:function(){e.options_.onDeviceMenuItemClick(n,t)}});e.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 t=this,e=this.getDeviceMenuItems(),n=this.shouldShowSearchInput(),r=this.searchText.toLowerCase();e.forEach((function(e){var i,o=t.devices.find((function(t){return t.id===e.options_.id}));if(o){var a=o.available,s=!n||-1!==o.name.toLowerCase().indexOf(r),u=o.id===(null===(i=t.castSession)||void 0===i?void 0:i.getDevice().id);a?e.enable():e.disable(),s?e.show():e.hide(),u?e.selected(!0):e.selected(!1)}}))}},{key:"toggleEmptyStatePlaceholder",value:function(){var t=this.getDeviceMenuItems();t.filter((function(t){return t.isVisible()})).length?this.emptyPlaceholder.hide():this.emptyPlaceholder.show(),t.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 t,e;return null!==(e=null===(t=this.castSession)||void 0===t?void 0:t.getDevice().name)&&void 0!==e?e:" "}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){this.handleClick()}},{key:"handleClick",value:function(){re(oe(a.prototype),"handleClick",this).call(this,null),this.options_.onClick()}}],n&&ne(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(ae);se.prototype.controlText_="Devices",a.Z.registerComponent("DevicesButton",se);var ue=n(10463);function ce(t){return ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ce(t)}function le(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==ce(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==ce(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===ce(i)?i:String(i)),r)}var i}function fe(){return fe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=pe(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},fe.apply(this,arguments)}function he(t,e){return he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},he(t,e)}function pe(t){return pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},pe(t)}var ye=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&he(t,e)}(a,t);var e,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(t){return!1}}(),function(){var t,e=pe(r);if(i){var n=pe(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===ce(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,null,t)}return e=a,(n=[{key:"createEl",value:function(){return fe(pe(a.prototype),"createEl",this).call(this,"div",{className:"cv-devices-tech"})}},{key:"setPoster",value:function(t){this.poster=t,this.update()}},{key:"setDeviceName",value:function(t){this.deviceName=t,this.update()}},{key:"update",value:function(){var t=this;this.el_.innerHTML='\n <div class="cv-devices-content">\n <p>'.concat(this.localize("Currently playing on"),"</p>\n <h2>").concat(this.deviceName||"",'</h2>\n </div>\n <div class="cv-devices-background" style="background-image: url(').concat(this.poster,')"></div>\n ');var e=document.createElement("button"),n=function(e){e.stopPropagation(),t.options_.onStopCasting()};e.onclick=n,e.ontouchstart=n,e.className="stop-casting-button",e.innerHTML=this.localize("Stop casting"),this.el_.querySelector(".cv-devices-content").appendChild(e)}},{key:"play",value:function(){}}])&&le(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(a.Z.getComponent("Component"));function de(t){return de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},de(t)}function ve(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==de(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==de(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===de(i)?i:String(i)),r)}var i}function be(){return be="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=me(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},be.apply(this,arguments)}function ge(t,e){return ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ge(t,e)}function me(t){return me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},me(t)}var we=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ge(t,e)}(u,t);var e,n,r,i,o,s=(i=u,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(t){return!1}}(),function(){var t,e=me(i);if(o){var n=me(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===de(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(n=s.call(this,t,e)).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.canControlPlaybackRate=!1,n.videojsPlayer=(0,a.Z)(n.options_.playerId),n.bindFunctions(),n.bindEventListeners(),n.setSource(n.options_.source),n.triggerReady(),n}return e=u,r=[{key:"canPlayType",value:function(){return""}},{key:"canPlaySource",value:function(t,e){var n;return!!qt.getOrCreateInstance(null!==(n=null==e?void 0:e.instanceId)&&void 0!==n?n:"").getCastSession()}},{key:"isSupported",value:function(){return qt.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 t=this,e=this.getCastSession();e&&(this.textTracks().on("change",this.onTextTrackChanged),this.videojsPlayer.one("ended",(function(){e.dispose()})),e.on("durationchange",(function(){t.trigger("durationchange")})),e.on("dispose",(function(){t.trigger("ended"),t.hideUI()})),e.on("playingchange",(function(){e.isPlaying()?(t.trigger("play"),t.trigger("playing")):t.trigger("pause")})),e.on("volumechange",(function(){t.trigger("volumechange")})),e.on("sourceloaded",(function(){t.trigger("loadeddata");var n=t.getSelectedTextTrack();n&&e.setSubtitles(n.src)})),e.on("subtitleschange",(function(){t.setSelectedTextTrack(e.getSubtitles())})))}},{key:"onTextTrackChanged",value:function(){var t,e=this.getSelectedTextTrack();null===(t=this.getCastSession())||void 0===t||t.setSubtitles(null==e?void 0:e.src)}},{key:"getSelectedTextTrack",value:function(){return ue.O.getCurrentTextTrack(this.videojsPlayer)}},{key:"setSelectedTextTrack",value:function(t){ue.O.forEachTrack(this.videojsPlayer,(function(e){e.src===t?e.mode="showing":e.mode="hidden"}))}},{key:"showUI",value:function(t){this.ui&&(this.ui.setPoster(this.options_.poster),this.ui.setDeviceName(t),this.ui.show())}},{key:"hideUI",value:function(){var t;null===(t=this.ui)||void 0===t||t.hide()}},{key:"dispose",value:function(){this.textTracks().off("change",this.onTextTrackChanged),be(me(u.prototype),"dispose",this).call(this)}},{key:"createEl",value:function(){var t=this;return this.ui=this.ui||new ye({onStopCasting:function(){var e;null===(e=t.getCastSession())||void 0===e||e.dispose()}}),this.ui.el()}},{key:"setSource",value:function(t){var e=this.getCastSession();e&&(this.showUI(e.getDevice().name),this.triggerReady(),this.trigger("loadstart"),e.loadSource(t.src))}},{key:"addRemoteTextTrack",value:function(t){return be(me(u.prototype),"addRemoteTextTrack",this).call(this,t,!0)}},{key:"getCastSession",value:function(){var t;return qt.getOrCreateInstance(null!==(t=this.options_.instanceId)&&void 0!==t?t:"").getCastSession()}},{key:"play",value:function(){var t;null===(t=this.getCastSession())||void 0===t||t.play()}},{key:"pause",value:function(){var t;null===(t=this.getCastSession())||void 0===t||t.pause()}},{key:"paused",value:function(){var t;return!1===(null===(t=this.getCastSession())||void 0===t?void 0:t.isPlaying())}},{key:"ended",value:function(){return void 0===this.getCastSession()}},{key:"setCurrentTime",value:function(t){var e;null===(e=this.getCastSession())||void 0===e||e.seek(null!=t?t:0)}},{key:"currentTime",value:function(){var t,e;return null!==(e=null===(t=this.getCastSession())||void 0===t?void 0:t.getPosition())&&void 0!==e?e:0}},{key:"duration",value:function(){var t,e;return null!==(e=null===(t=this.getCastSession())||void 0===t?void 0:t.getDuration())&&void 0!==e?e:0}},{key:"volume",value:function(){var t,e;return null!==(e=null===(t=this.getCastSession())||void 0===t?void 0:t.getVolume())&&void 0!==e?e:1}},{key:"setVolume",value:function(t){var e;null===(e=this.getCastSession())||void 0===e||e.setVolume(t)}},{key:"muted",value:function(){var t,e;return null!==(e=null===(t=this.getCastSession())||void 0===t?void 0:t.getMuted())&&void 0!==e&&e}},{key:"setMuted",value:function(t){var e;null===(e=this.getCastSession())||void 0===e||e.setMuted(t)}},{key:"buffered",value:function(){}},{key:"seekable",value:function(){return a.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(){}}])&&ve(e.prototype,n),r&&ve(e,r),Object.defineProperty(e,"prototype",{writable:!1}),u}(a.Z.getComponent("Tech"));function Oe(t){return Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(t)}function Pe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Oe(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Oe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Oe(i)?i:String(i)),r)}var i}function Se(){return Se="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=je(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Se.apply(this,arguments)}function ke(t,e){return ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ke(t,e)}function je(t){return je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},je(t)}a.Z.registerTech("devices",we);var Ee=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ke(t,e)}(a,t);var e,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(t){return!1}}(),function(){var t,e=je(r);if(i){var n=je(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Oe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(t,e){var n,r,i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).options=e,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 e=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 t=this,e=this.player.getChild("collapserator"),n=null==e?void 0:e.children().findIndex((function(t){return"CustomControlSpacer"===t.name()})),r=this.getSessionManager();if(e&&n&&-1!==n&&r){r.on("deviceschange",this.onDevicesChanged),r.on("castsessionchange",this.onCastSessionChanged),r.on("error",this.onDevicesError);var i={onClick:function(){if(t.options.viviApi&&t.options.fetchViviAccessToken&&!r.hasInstanceOfClient(Bt)){var e=new Bt({url:t.options.viviApi,fetchAccessToken:t.options.fetchViviAccessToken});r.addClient(e)}},onDeviceMenuItemClick:function(e,n){r.startCastSession({device:n,title:t.options.title})}};this.devicesButton=e.addChild("DevicesButton",i,n+1)}}},{key:"onDevicesChanged",value:function(t){var e;null===(e=this.devicesButton)||void 0===e||e.setDevices(t)}},{key:"onCastSessionChanged",value:function(t){var e;null===(e=this.devicesButton)||void 0===e||e.setCastSession(t),this.reloadTech()}},{key:"onDevicesError",value:function(t){this.player.error(t.message),this.player.pause()}},{key:"reloadTech",value:function(){var t=this.player,e=t.currentSources(),n=t.currentTime(),r=t.paused(),i=t.muted(),o=t.volume();t.src(e),t.one("playing",(function(){t.volume(o),t.muted(i),t.currentTime(n),r?t.pause():t.play()}))}},{key:"getSessionManager",value:function(){if(this.instanceId)return qt.getOrCreateInstance(this.instanceId)}},{key:"dispose",value:function(){this.instanceId&&qt.disposeAndRemoveInstance(this.instanceId),Se(je(a.prototype),"dispose",this).call(this)}}])&&Pe(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(a.Z.getPlugin("plugin"));function xe(t){return xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xe(t)}function Te(){Te=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof b?e:b,a=Object.create(o.prototype),s=new I(r||[]);return i(a,"_invoke",{value:E(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.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 O=Object.getPrototypeOf,P=O&&O(O(_([])));P&&P!==n&&r.call(P,a)&&(w=P);var S=m.prototype=b.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==xe(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function E(e,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:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=x(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(e,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 x(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,x(e,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,e.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[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function _(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(xe(e)+" 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"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(j.prototype),c(j.prototype,s,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=_,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!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(t,e){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"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:_(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function Ce(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ie(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==xe(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==xe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===xe(i)?i:String(i)),r)}var i}function _e(){return _e="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Le(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},_e.apply(this,arguments)}function Re(t,e){return Re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Re(t,e)}function Le(t){return Le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Le(t)}a.Z.registerPlugin("devicesPlugin",Ee);var De=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Re(t,e)}(a,t);var e,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(t){return!1}}(),function(){var t,e=Le(r);if(i){var n=Le(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===xe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,t,e)}return e=a,(n=[{key:"getPlayerOptions",value:function(){var t,e=_e(Le(a.prototype),"getPlayerOptions",this).call(this);return e.enableDevices?Object.assign(Object.assign({},e),{techOrder:["devices"].concat((t=e.techOrder,function(t){if(Array.isArray(t))return Ce(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ce(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ce(t,e):void 0}}(t)||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:Q()}}):e}},{key:"configurePlugins",value:function(){var t;try{this.options.onClickCreateClip&&this.player.createClipButtonPlugin({onClick:this.options.onClickCreateClip}),this.options.onRequestPictureInPicture&&this.player.pictureInPicture({onRequestPictureInPicture:this.options.onRequestPictureInPicture}),(null===(t=this.options.pointsOfInterest)||void 0===t?void 0:t.length)&&this.player.pointsOfInterestPlugin({pointsOfInterest:this.options.pointsOfInterest})}catch(t){console.log("failed to register plugins",t)}}},{key:"setNextVideo",value:function(t,e,n){this.player.nextVideoPlugin&&this.player.nextVideoPlugin().setNextVideo(t,e,n)}},{key:"enablePictureInPicture",value:function(){var t=this.player.pictureInPicture();t&&t.enablePictureInPicture()}},{key:"disablePictureInPicture",value:function(){var t=this.player.pictureInPicture();t&&t.disablePictureInPicture()}},{key:"togglePictureInPicture",value:function(t){var e=this.player.pictureInPicture();e&&e.togglePictureInPicture(t)}},{key:"additionalSetup",value:function(t){var e,n,r,i,o=this,s=Object.create(null,{additionalSetup:{get:function(){return _e(Le(a.prototype),"additionalSetup",o)}}});return e=this,n=void 0,r=void 0,i=Te().mark((function e(){var n;return Te().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s.additionalSetup.call(this,t),this.options.showResources&&t.resources&&this.player.resourcesPlugin&&this.player.resourcesPlugin({resources:t.resources.list,imageCdnUrl:this.options.imageCdnUrl}),"MasterClip"!==t.mediaType){e.next=7;break}if(null!==(n=t.additionalData)){e.next=6;break}throw Error("Invalid clip data");case 6:this.player.clipPlugin({startTime:n.startTime,endTime:n.endTime});case 7:this.options.enableDevices&&this.player.devicesPlugin({viviApi:this.options.viviApi,fetchViviAccessToken:this.options.fetchViviAccessToken,title:t.title});case 8:case"end":return e.stop()}}),e,this)})),new(r||(r=Promise))((function(t,o){function a(t){try{u(i.next(t))}catch(t){o(t)}}function s(t){try{u(i.throw(t))}catch(t){o(t)}}function u(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r((function(t){t(n)}))).then(a,s)}u((i=i.apply(e,n||[])).next())}))}},{key:"setActivityStatus",value:function(t,e){this.player.activityStatusPlugin().setActivityStatus(t,e)}}])&&Ie(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.r),Me=n(63816),Ne=n(14735);function Be(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ve(t){var e,n,i,o=r.useRef(t.player.duration()-t.player.currentTime()),a=(n=r.useState(o.current),i=2,function(t){if(Array.isArray(t))return t}(n)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(n,i)||function(t,e){if(t){if("string"==typeof t)return Be(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Be(t,e):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 e=t.player.duration()-t.player.currentTime();u(e),e>o.current&&(o.current=e)}if(r.useEffect((function(){return t.player.on("timeupdate",c),function(){t.player.off("timeupdate",c)}}),[]),!t.nextVideo||!t.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:t.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:t.onPlayNext,style:{backgroundImage:"url(".concat(null===(e=t.nextVideo)||void 0===e?void 0:e.thumbnailUrl,")")}}),r.createElement("div",{className:"cv-up-next-title"},t.nextVideo.name)))}function Ae(t){return Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ae(t)}function Fe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Ae(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Ae(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Ae(i)?i:String(i)),r)}var i}function Ze(){return Ze="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ze(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Ze.apply(this,arguments)}function Ue(t,e){return Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ue(t,e)}function ze(t){return ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ze(t)}a.Z.registerComponent("UpNext",(0,Ne.Z)((function(t,e){return r.createElement(Ve,Object.assign({player:t},e))})));var Ge=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ue(t,e)}(s,t);var e,n,r,i,o=(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(t){return!1}}(),function(){var t,e=ze(r);if(i){var n=ze(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Ae(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function s(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(n=o.call(this,t,e)).playNext=t.nextVideoPlugin().getShouldPlayNext(),n.toggle(n.playNext),n}return e=s,(n=[{key:"handleToggle",value:function(){this.toggle(!this.playNext)}},{key:"toggle",value:function(t){t?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){this.playNext=!0,a.Z.dom.addClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{key:"toggleOff",value:function(){this.playNext=!1,a.Z.dom.removeClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{key:"handleClick",value:function(t){t.stopImmediatePropagation()}},{key:"createEl",value:function(t,e,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=a.Z.dom.createEl("div",{className:"custom-toggle toggle-option float-right",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=Ze(ze(s.prototype),"createEl",this).call(this,t,{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}}])&&Fe(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(a.Z.getComponent("MenuItem"));function qe(t){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qe(t)}function He(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==qe(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==qe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===qe(i)?i:String(i)),r)}var i}function We(){return We="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Qe(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},We.apply(this,arguments)}function Ye(t,e){return Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ye(t,e)}function $e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qe(t){return Qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qe(t)}a.Z.registerComponent("NextVideoMenuItem",Ge);var Je="cv-persisttest",Xe="cv-play-next-video",Ke=a.Z.getPlugin("plugin"),tn=(a.Z.getComponent("MenuItem"),a.Z.getComponent("NextVideoMenuItem")),en=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ye(t,e)}(a,t);var e,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(t){return!1}}(),function(){var t,e=Qe(r);if(i){var n=Qe(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===qe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return $e(t)}(this,t)});function a(t){var e;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(e=o.call(this,t)).setShouldPlayNext=e.setShouldPlayNext.bind($e(e)),e.getShouldPlayNext=e.getShouldPlayNext.bind($e(e)),e.setChapterTrack=e.setChapterTrack.bind($e(e)),e.onTimeUpdate=e.onTimeUpdate.bind($e(e)),e.hasLocalStorage=e.testHasLocalStorage(),e.shouldPlayNextVideo=!1,e.hasLocalStorage){var n=window.localStorage.getItem(Xe);e.shouldPlayNextVideo="true"===n}return t.ready((function(){e.initialize()})),e}return e=a,(n=[{key:"initialize",value:function(){this.player.isDisposed()||(ue.O.useTrack(this.player,"chapters",null,this.setChapterTrack),this.bindListeners())}},{key:"setNextVideo",value:function(t,e,n){var r;this.nextVideo=t,this.callback=n,e&&this.setShouldPlayNext(!0),(null===(r=this.player.getChild("collapserator"))||void 0===r?void 0:r.getChild("cogButton")).addItem({index:0,ctor:tn,name:"NextVideoMenuItem"})}},{key:"getShouldPlayNext",value:function(){return this.shouldPlayNextVideo}},{key:"setShouldPlayNext",value:function(t,e){this.shouldPlayNextVideo=t,this.hasLocalStorage&&e&&window.localStorage.setItem(Xe,t.toString())}},{key:"setChapterTrack",value:function(t){this.chapterTrack=t}},{key:"bindListeners",value:function(){this.player.on("timeupdate",this.onTimeUpdate)}},{key:"dispose",value:function(){this.player.off("timeupdate",this.onTimeUpdate),We(Qe(a.prototype),"dispose",this).call(this)}},{key:"onTimeUpdate",value:function(){var t,e,n,r;if(!this.player.pictureInPicture||!this.player.isInPictureInPicture())if(this.getShouldPlayNext()){if(this.player.ended())return this.callback(),void this.hideUpNext();this.upNextRendered&&this.player.currentTime()>this.upNextTimepoint||("credits"===(null===(r=null===(n=(null===(e=null===(t=this.chapterTrack)||void 0===t?void 0:t.activeCues)||void 0===e?void 0:e.length)&&this.chapterTrack.activeCues[0])||void 0===n?void 0:n.text)||void 0===r?void 0:r.toLowerCase())||this.player.currentTime()>=this.player.duration()-5?this.showUpNext():this.hideUpNext())}else this.hideUpNext()}},{key:"showUpNext",value:function(){var t=this;this.upNextRendered||(this.upNextRendered=!0,this.upNextTimepoint=this.player.currentTime(),this.player.addChild("UpNext",{nextVideo:this.nextVideo,onPlayNext:this.callback,onCancel:function(){t.hideUpNext(),t.setShouldPlayNext(!1)}}))}},{key:"hideUpNext",value:function(){if(this.upNextRendered){this.upNextRendered=!1,this.upNextTimepoint=null;var t=this.player.getChild("UpNext");t&&this.player.removeChild(t)}}},{key:"testHasLocalStorage",value:function(){try{return window.localStorage.setItem(Je,"persistPlayNext"),window.localStorage.removeItem(Je),!0}catch(t){return!1}}}])&&He(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(Ke);a.Z.registerPlugin("nextVideoPlugin",en);var nn=n(26733);function rn(t){return rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rn(t)}function on(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==rn(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==rn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===rn(i)?i:String(i)),r)}var i}function an(t,e){return an=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},an(t,e)}function sn(t){return sn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},sn(t)}function un(t){return i().createElement("div",{className:"cv-resource-item"},i().createElement(nn.s,{data:t.resource,imageCdnUrl:t.imageCdnUrl}))}var cn=(0,Ne.Z)((function(t,e){return i().createElement(un,Object.assign({},e))})),ln=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&an(t,e)}(s,t);var e,n,r,i,o=(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(t){return!1}}(),function(){var t,e=sn(r);if(i){var n=sn(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===rn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function s(t,e){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),n=o.call(this,t,e);var r=new cn(t,{resource:e.resource,imageCdnUrl:e.imageCdnUrl});return n.addChild(r),n}return e=s,(n=[{key:"createEl",value:function(){return a.Z.dom.createEl("div")}},{key:"handleClick",value:function(t){t.stopImmediatePropagation(),this.options_.downloadResource(this.options_.resource)}}])&&on(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(a.Z.getComponent("ClickableComponent"));function fn(t){return fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fn(t)}function hn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==fn(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==fn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===fn(i)?i:String(i)),r)}var i}function pn(){return pn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=dn(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},pn.apply(this,arguments)}function yn(t,e){return yn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},yn(t,e)}function dn(t){return dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},dn(t)}var vn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yn(t,e)}(s,t);var e,n,r,i,o=(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(t){return!1}}(),function(){var t,e=dn(r);if(i){var n=dn(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===fn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function s(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(t=o.apply(this,arguments)).alwaysCollapsed=!1,t.isCollapsed=!1,t.isCollabsible=!0,t}return e=s,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(pn(dn(s.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-resources-button ".concat(pn(dn(s.prototype),"buildCSSClass",this).call(this))}},{key:"update",value:function(){pn(dn(s.prototype),"update",this).call(this)}},{key:"createMenu",value:function(){return this.options_.title="Resources",pn(dn(s.prototype),"createMenu",this).call(this)}},{key:"createItems",value:function(){var t=this,e=[];return this.options_.resources.forEach((function(n){var r=new ln(t.player(),{resource:n,imageCdnUrl:t.options_.imageCdnUrl,downloadResource:function(e){return t.downloadResource(e)}});e.push(r)})),e}},{key:"downloadResource",value:function(t){this.getDownloadIframe().src=t.url}},{key:"getDownloadIframe",value:function(){return this.downloadIframe||(this.downloadIframe=a.Z.dom.createEl("iframe"),this.downloadIframe.style.display="none",a.Z.dom.appendContent(a.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(){pn(dn(s.prototype),"handleClick",this).call(this,null)}}])&&hn(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(a.Z.getComponent("MenuButton"));function bn(t){return bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bn(t)}function gn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==bn(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==bn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===bn(i)?i:String(i)),r)}var i}function mn(t,e){return mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},mn(t,e)}function wn(t){return wn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},wn(t)}vn.prototype.controlText_="Resources",a.Z.registerComponent("ResourcesButton",vn);var On=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mn(t,e)}(a,t);var e,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(t){return!1}}(),function(){var t,e=wn(r);if(i){var n=wn(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===bn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).options=e,t.ready((function(){return n.onReady()})),n}return e=a,(n=[{key:"onReady",value:function(){if(this.options.resources.length){var t=this.player.getChild("collapserator");t.addChild("ResourcesButton",{resources:this.options.resources,imageCdnUrl:this.options.imageCdnUrl},t.children_.length-3)}}}])&&gn(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(a.Z.getPlugin("plugin"));a.Z.registerPlugin("resourcesPlugin",On);var Pn=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function Sn(t){var e=t.className,n=void 0===e?"":e,r=t.playerApi,o=t.onReady,a=t.onDispose,s=Pn(t,["className","playerApi","onReady","onDispose"]),u=i().useRef();return i().useEffect((function(){if(u){var t=new De(u.current,Object.assign(Object.assign({},s),{playerApi:r}));return o&&t.ready((function(){o((0,Me.G)(t))})),a&&t.one("dispose",a),function(){null==t||t.dispose()}}}),[t.viewKey]),i().createElement("div",{ref:u,className:n})}}}]);
@@ -1,2 +1,2 @@
1
- /*! For license information please see 4942-41d01acc50-lite.chunk.js.LICENSE.txt */
1
+ /*! For license information please see 4942-e1855d3e14-lite.chunk.js.LICENSE.txt */
2
2
  "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[4942],{12617:(e,t,r)=>{r.d(t,{E:()=>u});var n=r(99940),o=r(97395),a=r(62803),i=r(5960),c=r(4594),l=r(78417),u={videos:function(e,t){var r=a.v.VIDEO_COLLECTION,n=a.v.CLIP_COLLECTION,u=a.v.INTERACTIVE,s="videos[".concat(r,"]{libraries.typeid:").concat(c.E.WorkspaceCollection,"}"),d="clips[".concat(n,"]"),f="interactives[".concat(u,"]{status:[").concat(i.X.Published,",").concat(i.X.Draft,"]}"),h={query:"(".concat(s,"|").concat(d,"|").concat(f,"){orderbydesc:id}"),permissionFilterOption:l.r.StripMetadata};return t&&(h.cursor=t),{url:o._.urlBuilder("{gateway}/v1/objects/".concat(e,"/members"),h),key:"my:videos:".concat(e,":").concat(t)}},workspaceWithCategories:function(){return{url:o._.urlBuilder("/api/domain/v2/me/libraries",{type:["workspace"],maxCategoryDepth:5}),key:"workspace:folders",normalize:!1}},exchangeWithCategories:function(){return{url:o._.urlBuilder("/api/domain/v2/me/libraries",{type:["exchange"],maxCategoryDepth:5}),key:"exchange:folders",normalize:!1}},addFolder:function(e){var t="/api/domain/v2/collections/".concat(e.collectionId,"/categories");return e.parentCategoryId&&(t=o._.urlBuilder(t,{parentCategoryId:e.parentCategoryId})),{url:t,key:"add:folder",type:n.k.POST,data:{name:e.name},invalidationKeys:["workspace","folder"]}},deleteFolder:function(e){return{url:"{gateway}/v1/objects/".concat(e),key:"delete:folder",type:n.k.DELETE,invalidationKeys:["workspace","folder"]}},moveFolder:function(e){return{url:"/api/domain/v2/objects/move",key:"move:folder",type:n.k.POST,data:{assocType:"has",newCollectionId:e.newFolderId,oldCollectionId:e.oldFolderId,objectIds:[e.moveFolderId]},invalidationKeys:["workspace","folder"]}},updateFolder:function(e,t){return{url:"{gateway}/v1/objects/".concat(e),key:"rename:folder",type:n.k.PUT,data:{name:t},invalidationKeys:["workspace","folder"]}},videoFolders:function(e,t){return{url:"/api/domain/v2/objects/".concat(e,"/categories?query=libraries{id:").concat(t,"}"),key:"video:folders:".concat(e)}},moveVideo:function(e){return{url:"/api/domain/v2/objects/move",key:"move:folder",type:n.k.POST,data:{assocType:"has",newCollectionId:e.newFolderId,oldCollectionId:e.oldFolderId,objectIds:[e.videoId]},invalidationKeys:["video"]}}}},54485:(e,t,r)=>{r.d(t,{b:()=>l});var n=r(1024),o=r.n(n),a=r(23481),i=r(11462),c=a.T.encloseNamespace("myVideos.hooks");function l(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return o().useMemo((function(){return(null==e?void 0:e.length)?{children:e.map((function(e){return Object.assign(Object.assign({},e),{data:Object.assign(Object.assign({},e.data),{name:t?c("myVideos"):e.data.name})})})).map(i.d.convertNestedObjectToTree)}:null}),[e])}},43482:(e,t,r)=>{r.r(t),r.d(t,{MoveFolderView:()=>P});var n=r(1024),o=r.n(n),a=r(23481),i=r(81886),c=r(20354),l=r(28400),u=r(82644),s=r(9111),d=r(98064),f=r(69883),h=r(11462),p=r(14070),y=r(97291),v=r(12617),m=r(54485),g=r(54976),w=r.n(g),b=r(92802),E=r(5173),k=r(38365),I=r(13876),L=r(55367),x=a.T.encloseNamespace("myVideos.moveFolder"),O=E.Ry().shape({folder:E.Ry().required()});function C(e){var t=(0,b.u6)(),r=o().useMemo((function(){return h.d.getParent(e.folders,e.folderId)}),[e.folders,e.folderId]);return o().createElement(b.l0,null,o().createElement(k.W,{label:x("parentFolder"),name:"folder"},(function(){var n;return o().createElement(w(),{autoHeight:!0,autoHeightMax:300,className:"border rounded-lg"},o().createElement(L.m,{tree:e.folders,onSelect:function(e){e&&t.setFieldValue("folder",e)},selectedIds:(null===(n=t.values.folder)||void 0===n?void 0:n.id)?[t.values.folder.id]:void 0,selectedLinkClassName:"bg-light",openDepth:1,isDisabled:function(e){return e.id===r.id},isClickDisabled:function(t){return t.id===e.folderId}}))})),o().createElement(I.u,null,o().createElement(I.u.Cancel,{onClick:e.onClickCancel}),o().createElement(I.u.Submit,{variant:"dark",showSpinner:e.showSpinner,text:x("moveFolder")})))}function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function S(){S=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var a=t&&t.prototype instanceof m?t:m,i=Object.create(a.prototype),c=new T(n||[]);return o(i,"_invoke",{value:O(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var f="suspendedStart",h="suspendedYield",p="executing",y="completed",v={};function m(){}function g(){}function w(){}var b={};u(b,i,(function(){return this}));var E=Object.getPrototypeOf,k=E&&E(E(P([])));k&&k!==r&&n.call(k,i)&&(b=k);var I=w.prototype=m.prototype=Object.create(b);function L(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function r(o,a,i,c){var l=d(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==j(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function O(t,r,n){var o=f;return function(a,i){if(o===p)throw new Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:e,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===v)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=d(t,r,n);if("normal"===u.type){if(o=n.done?y:h,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var a=d(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,v;var i=a.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function F(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(F,this),this.reset(!0)}function P(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(j(t)+" is not iterable")}return g.prototype=w,o(I,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=u(w,l,"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,w):(e.__proto__=w,u(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},L(x.prototype),u(x.prototype,c,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new x(s(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},L(I),u(I,l,"Generator"),u(I,i,(function(){return this})),u(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=P,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=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 r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},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 r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var _=function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function c(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}l((n=n.apply(e,t||[])).next())}))},T=a.T.encloseNamespace("myVideos.moveFolder");function P(e){var t,r,n=(t=o().useState(!1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,r)||function(e,t){if(e){if("string"==typeof e)return F(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?F(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=n[0],g=n[1],w=c.a.useGetFetchAsync(),b=(0,f.Z)(),E=c.a.useBasicFetch(d.D.folder(e.id)),k=c.a.useBasicFetch(v.E.workspaceWithCategories()),I=(0,m.b)(k.data),L=E.hasCompleted&&k.hasCompleted;return o().createElement(s.G,{title:T("title"),closePopup:e.closePopup,showLoadingSpinner:!L},L&&o().createElement(u.n,{initialValues:{folder:null},validationSchema:O,onSubmit:function(t){return _(this,void 0,void 0,S().mark((function r(){var n;return S().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return g(!0),n=h.d.getParent(I,e.id),r.prev=2,r.next=5,w(v.E.moveFolder({moveFolderId:E.data.id,newFolderId:t.folder.id,oldFolderId:n.id}));case 5:b.success(T("success")),e.closePopup(),i.Q.AppLinkHelper.trigger({application:y.O.MY_VIDEOS,action:p.e.MyVideos.MY_VIDEOS_FOLDER,args:[E.data.id,l.m.slugify(E.data.name)]}),r.next=14;break;case 10:r.prev=10,r.t0=r.catch(2),b.error(T("error")),e.closePopup();case 14:case"end":return r.stop()}}),r,null,[[2,10]])})))},validateOnMount:!0},o().createElement(C,{folderId:e.id,onClickCancel:e.closePopup,folders:I,showSpinner:a})))}}}]);
@@ -1,2 +1,2 @@
1
- /*! For license information please see 5268-c0ad8047b8-lite.chunk.js.LICENSE.txt */
1
+ /*! For license information please see 5268-7044ddf2c8-lite.chunk.js.LICENSE.txt */
2
2
  "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[5268],{12617:(e,t,r)=>{r.d(t,{E:()=>u});var n=r(99940),o=r(97395),a=r(62803),i=r(5960),c=r(4594),l=r(78417),u={videos:function(e,t){var r=a.v.VIDEO_COLLECTION,n=a.v.CLIP_COLLECTION,u=a.v.INTERACTIVE,s="videos[".concat(r,"]{libraries.typeid:").concat(c.E.WorkspaceCollection,"}"),d="clips[".concat(n,"]"),f="interactives[".concat(u,"]{status:[").concat(i.X.Published,",").concat(i.X.Draft,"]}"),h={query:"(".concat(s,"|").concat(d,"|").concat(f,"){orderbydesc:id}"),permissionFilterOption:l.r.StripMetadata};return t&&(h.cursor=t),{url:o._.urlBuilder("{gateway}/v1/objects/".concat(e,"/members"),h),key:"my:videos:".concat(e,":").concat(t)}},workspaceWithCategories:function(){return{url:o._.urlBuilder("/api/domain/v2/me/libraries",{type:["workspace"],maxCategoryDepth:5}),key:"workspace:folders",normalize:!1}},exchangeWithCategories:function(){return{url:o._.urlBuilder("/api/domain/v2/me/libraries",{type:["exchange"],maxCategoryDepth:5}),key:"exchange:folders",normalize:!1}},addFolder:function(e){var t="/api/domain/v2/collections/".concat(e.collectionId,"/categories");return e.parentCategoryId&&(t=o._.urlBuilder(t,{parentCategoryId:e.parentCategoryId})),{url:t,key:"add:folder",type:n.k.POST,data:{name:e.name},invalidationKeys:["workspace","folder"]}},deleteFolder:function(e){return{url:"{gateway}/v1/objects/".concat(e),key:"delete:folder",type:n.k.DELETE,invalidationKeys:["workspace","folder"]}},moveFolder:function(e){return{url:"/api/domain/v2/objects/move",key:"move:folder",type:n.k.POST,data:{assocType:"has",newCollectionId:e.newFolderId,oldCollectionId:e.oldFolderId,objectIds:[e.moveFolderId]},invalidationKeys:["workspace","folder"]}},updateFolder:function(e,t){return{url:"{gateway}/v1/objects/".concat(e),key:"rename:folder",type:n.k.PUT,data:{name:t},invalidationKeys:["workspace","folder"]}},videoFolders:function(e,t){return{url:"/api/domain/v2/objects/".concat(e,"/categories?query=libraries{id:").concat(t,"}"),key:"video:folders:".concat(e)}},moveVideo:function(e){return{url:"/api/domain/v2/objects/move",key:"move:folder",type:n.k.POST,data:{assocType:"has",newCollectionId:e.newFolderId,oldCollectionId:e.oldFolderId,objectIds:[e.videoId]},invalidationKeys:["video"]}}}},54485:(e,t,r)=>{r.d(t,{b:()=>l});var n=r(1024),o=r.n(n),a=r(23481),i=r(11462),c=a.T.encloseNamespace("myVideos.hooks");function l(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return o().useMemo((function(){return(null==e?void 0:e.length)?{children:e.map((function(e){return Object.assign(Object.assign({},e),{data:Object.assign(Object.assign({},e.data),{name:t?c("myVideos"):e.data.name})})})).map(i.d.convertNestedObjectToTree)}:null}),[e])}},82540:(e,t,r)=>{r.r(t),r.d(t,{AddFolderView:()=>N});var n=r(1024),o=r.n(n),a=r(23481),i=r(81886),c=r(20354),l=r(28400),u=r(82644),s=r(9111),d=r(31949),f=r(69883),h=r(11462),p=r(14070),y=r(97291),v=r(12617),m=r(54485),g=r(54976),w=r.n(g),b=r(92802),E=r(5173),k=r(38365),x=r(13876),L=r(55367),O=a.T.encloseNamespace("myVideos.addFolder"),I=E.Ry().shape({name:E.Z_().required((function(){return O("nameRequired")})).max(255,(function(){return O("maxNameLength")})),folder:E.Ry().required()});function C(e){var t=(0,b.u6)();return o().createElement(b.l0,null,o().createElement(k.W,{label:O("name"),type:"text",name:"name",id:"name",placeholder:O("placeholder"),autoFocus:!0,value:t.values.name,required:!0}),o().createElement(k.W,{label:O("parentFolder"),name:"folder"},(function(){var r;return o().createElement(w(),{autoHeight:!0,autoHeightMax:300,className:"border rounded-lg"},o().createElement(L.m,{tree:e.folders,onSelect:function(e){return t.setFieldValue("folder",e)},selectedIds:(null===(r=t.values.folder)||void 0===r?void 0:r.id)?[t.values.folder.id]:void 0,selectedLinkClassName:"bg-light",openDepth:1}))})),o().createElement(x.u,null,o().createElement(x.u.Cancel,{onClick:e.onClickCancel}),o().createElement(x.u.Submit,{variant:"dark",showSpinner:e.showSpinner})))}function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function S(){S=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var a=t&&t.prototype instanceof m?t:m,i=Object.create(a.prototype),c=new T(n||[]);return o(i,"_invoke",{value:I(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var f="suspendedStart",h="suspendedYield",p="executing",y="completed",v={};function m(){}function g(){}function w(){}var b={};u(b,i,(function(){return this}));var E=Object.getPrototypeOf,k=E&&E(E(N([])));k&&k!==r&&n.call(k,i)&&(b=k);var x=w.prototype=m.prototype=Object.create(b);function L(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,a,i,c){var l=d(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==j(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function I(t,r,n){var o=f;return function(a,i){if(o===p)throw new Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:e,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===v)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=d(t,r,n);if("normal"===u.type){if(o=n.done?y:h,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var a=d(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,v;var i=a.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function F(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(F,this),this.reset(!0)}function N(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(j(t)+" is not iterable")}return g.prototype=w,o(x,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=u(w,l,"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,w):(e.__proto__=w,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},L(O.prototype),u(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new O(s(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},L(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=N,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=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 r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},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 r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var _=function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function c(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}l((n=n.apply(e,t||[])).next())}))},T=a.T.encloseNamespace("myVideos.addFolder");function N(e){var t,r,n=(t=o().useState(!1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,r)||function(e,t){if(e){if("string"==typeof e)return F(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?F(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=n[0],g=n[1],w=c.a.useGetFetchAsync(),b=(0,f.Z)(),E=c.a.useBasicFetch(d.N.workspace()),k=c.a.useBasicFetch(v.E.workspaceWithCategories()),x=(0,m.b)(k.data),L=o().useMemo((function(){return h.d.find(x,e.parentFolderId)}),[x,e.parentFolderId]),O=E.hasCompleted&&k.hasCompleted;return o().createElement(s.G,{title:T("title"),closePopup:e.closePopup,showLoadingSpinner:!O},O&&o().createElement(u.n,{initialValues:{name:"",folder:L},validationSchema:I,onSubmit:function(t){return _(this,void 0,void 0,S().mark((function r(){var n;return S().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return g(!0),r.prev=1,r.next=4,w(v.E.addFolder({collectionId:E.data.id,name:t.name,parentCategoryId:t.folder.id===E.data.id?void 0:t.folder.id}));case 4:n=r.sent,b.success(T("success")),e.closePopup(),i.Q.AppLinkHelper.trigger({application:y.O.MY_VIDEOS,action:p.e.MyVideos.MY_VIDEOS_FOLDER,args:[n.id,l.m.slugify(n.name)]}),r.next=14;break;case 10:r.prev=10,r.t0=r.catch(1),b.error(T("error")),e.closePopup();case 14:case"end":return r.stop()}}),r,null,[[1,10]])})))},validateOnMount:!0},o().createElement(C,{onClickCancel:e.closePopup,folders:x,showSpinner:a})))}}}]);
@@ -1,2 +1,2 @@
1
- /*! For license information please see 5622-df1c9f72f5-lite.chunk.js.LICENSE.txt */
1
+ /*! For license information please see 5622-2e03de5953-lite.chunk.js.LICENSE.txt */
2
2
  "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[5622],{17749:(t,e,r)=>{r.d(e,{g:()=>o});var n=r(99940),o={getLibraryReviewPeriod:function(){return{url:"{gateway}/v1/library-reviews",key:"coming:soon:settings",normalize:!1}},setLibraryReviewPeriod:function(t){return{url:"{gateway}/v1/library-reviews",key:"update:coming:soon:settings",invalidationKeys:"coming:soon:settings",type:n.k.POST,data:{reviewPeriod:t},normalize:!1}},deleteLibraryReviewPeriod:function(){return{url:"{gateway}/v1/library-reviews",key:"delete:coming:soon:settings",invalidationKeys:"coming:soon:settings",type:n.k.DELETE,normalize:!1}}}},55622:(t,e,r)=>{r.r(e),r.d(e,{TurnOffContentReviewView:()=>b});var n=r(1024),o=r.n(n),i=r(55460),a=r(23481),c=r(20354),u=r(9111),l=r(13876),s=r(83345),f=r(69883),h=r(21491),y=r(17749);function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function v(){v=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof w?e:w,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:S(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",y="suspendedYield",d="executing",g="completed",m={};function w(){}function b(){}function E(){}var L={};l(L,a,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(A([])));x&&x!==r&&n.call(x,a)&&(L=x);var O=E.prototype=w.prototype=Object.create(L);function j(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==p(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=h;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?g:y,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=g,n.method="throw",n.arg=l.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(p(e)+" is not iterable")}return b.prototype=E,o(O,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:b,configurable:!0}),b.displayName=l(E,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,l(t,u,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},j(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(O),l(O,u,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=A,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var g=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function c(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,c)}u((n=n.apply(t,e||[])).next())}))},m="settings.turnOffContentReview",w=a.T.encloseNamespace(m);function b(t){var e,r,n=(e=o().useState(!1),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(t,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=n[0],p=n[1],b=c.a.useGetFetchAsync(),E=(0,f.Z)();return o().createElement(u.G,{title:w("title"),closePopup:t.closePopup},o().createElement("p",null,o().createElement(s.x,{namespace:m,phrase:"message"})),o().createElement(l.u,null,o().createElement(l.u.Cancel,{onClick:t.closePopup}),o().createElement(l.u.Submit,{variant:"dark",text:w("submit"),onClick:function(){return g(this,void 0,void 0,v().mark((function t(){var e,r;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return p(!0),t.prev=1,e=b(y.g.deleteLibraryReviewPeriod()),r=b(h.I.approveAll()),t.next=6,Promise.all([e,r]);case 6:E.success(w("success")),i.LocationUtils.Reload(),t.next=14;break;case 10:t.prev=10,t.t0=t.catch(1),E.error(w("error")),p(!1);case 14:case"end":return t.stop()}}),t,null,[[1,10]])})))},showSpinner:a})))}},21491:(t,e,r)=>{r.d(e,{I:()=>a});var n=r(99940),o=r(97395),i=r(62803),a={getRestrictions:function(t){return{key:"restrictions:".concat(t),url:o._.urlBuilder("{gateway}/v1/objects/restrictions",{id:t})}},addRestriction:function(t){return{type:n.k.POST,key:"restrictions:".concat(t.objectTypeId,":").concat(t.objectId,":add"),url:"{gateway}/v1/restrictions",data:[t],invalidationKeys:["restrictions"]}},deleteRestrictions:function(t){return{url:o._.urlBuilder("{gateway}/v1/restrictions",{objectId:t}),key:"restrictions:delete",type:n.k.DELETE,invalidationKeys:["restrictions"]}},getRestrictedObjects:function(t,e){var r={type:t,"query.video":i.v.VIDEO_COLLECTION,"query.interactive":i.v.INTERACTIVE,"query.clip":i.v.CLIP_COLLECTION};return e&&(r.cursor=e),{url:o._.urlBuilder("{gateway}/v1/restrictions/objects",r),key:"restrictions:objects:".concat(t.sort().join(","),":").concat(e)}},approveAll:function(){return{url:"{gateway}/v1/library-reviews/restrictions",key:"restrictions:approve:all",type:n.k.DELETE}}}}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[6801],{86801:(t,e,n)=>{"use strict";n.r(e),n.d(e,{NotificationsView:()=>T});var i=n(71365),o=n(23481),r=n(81886),a=n(41546),s=n(18314),c=n(50723),l=n(60735),u=n(83905),f=n(39479),p=n(49985),y=n(65858),h=n(35454),v=n.n(h);function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function g(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,d(i.key),i)}}function d(t){var e=function(t,e){if("object"!==b(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==b(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===b(e)?e:String(e)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function k(t){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},k(t)}var w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&m(t,e)}(a,t);var e,n,i,o,r=(i=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(t){return!1}}(),function(){var t,e=k(i);if(o){var n=k(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===b(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,t)}return e=a,(n=[{key:"defaults",get:function(){return{cursors:{},cursorParamName:"cursor"}}},{key:"name",get:function(){return"PaginationComponent"}},{key:"template",get:function(){return v()}},{key:"lang",get:function(){return"shared._pagination"}},{key:"appLinks",get:function(){var t={};if(!this.options.cursors)return{};if(this.options.cursors.previous){var e=this.options.cursors.previous,n=this.buildCursor(this.options.cursors.previous);+e<=1&&!0!==this.options.allowFirstPageCursor&&delete n.params.cursor,t[".previous-applink"]=n}return this.options.cursors.next&&(t[".next-applink"]=this.buildCursor(this.options.cursors.next)),t}},{key:"events",value:function(){return{"click .previous-applink":"onClickPrevious","click .next-applink":"onClickNext"}}},{key:"buildCursor",value:function(t){return{application:this.options.appLink.application,action:this.options.appLink.action,args:this.options.appLink.args,params:f.extend({},this.options.appLink.params,(e={},n=this.options.cursorParamName,i=t,(n=d(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e))};var e,n,i}},{key:"onClickPrevious",value:function(){this.logAction("previous")}},{key:"onClickNext",value:function(){this.logAction("next")}},{key:"logAction",value:function(t){var e=p.k.mergeOptions(this.options.analyticsOptions,{location:y.LocationContext.Pagination,entity:y.EntityType.Pagination,actionType:y.UserAction.Navigate}),n={id:this.options.collectionId,page:t};p.k.logUserAction(n,e)}},{key:"viewOptions",value:function(){return{cursors:this.options.cursors}}},{key:"onBeforeRender",value:function(){return!!this.options.cursors}}])&&g(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.Q.Component),O=n(65220),P=n(72264),C=n(89224),j=n.n(C),x=n(43454),S=n.n(x),_=n(58081);function E(t){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},E(t)}function I(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==E(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==E(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===E(o)?o:String(o)),i)}var o}function N(t,e){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},N(t,e)}function R(t){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},R(t)}var T=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&N(t,e)}(h,t);var e,n,f,p,y=(f=h,p=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(t){return!1}}(),function(){var t,e=R(f);if(p){var n=R(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===E(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function h(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),y.call(this,t)}return e=h,(n=[{key:"name",get:function(){return"NotificationsView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"notifications.notifications"}},{key:"template",get:function(){return S()}},{key:"regions",value:function(){return{notifications:{replaceElement:!0,el:".list-region",partialLoading:{component:u.k.ComponentCollection,options:{collectionLength:5,childOptions:{template:j(),className:"px-1 py-2",viewOptions:{styles:_.Z}}}}},pagination:{replaceElement:!0,el:".pagination-region"}}}},{key:"initialize",value:function(){this.notificationService=i.u.getInstance(l.D.Notification,this),this.appVariables=i.u.getInstance(s.C.NOTIFICATIONS,this)}},{key:"onData",value:function(t){this.collection=t,this.render()}},{key:"getCollectionIdentifier",value:function(){return this.collectionIdentifier?this.collectionIdentifier:this.collectionIdentifier=new O.J(Object.assign({collectionPrefix:c.j.NOTIFICATIONS},this.options.params))}},{key:"renderNotificationList",value:function(){var t=new a.Z({collection:this.collection,childType:a.z.Default,liteUrl:this.config instanceof r.Q.Model?this.config.get("liteUrl"):this.config.liteUrl,libraryEditorUrl:this.config instanceof r.Q.Model?this.config.get("libraryEditorUrl"):this.config.libraryEditorUrl,hasLite:this.options.hasLite});this.showChildView("notifications",t)}},{key:"renderPagination",value:function(){if(this.collection.length){var t=this.notificationService.getNotificationsCursors(this.getCollectionIdentifier()),e=new w({cursors:t,appLink:Object.assign(Object.assign({},this.appVariables.appLinks.notifications),{args:[],params:this.getCollectionIdentifier().toParams()})});this.showChildView("pagination",e)}}},{key:"requiredResources",get:function(){return{config:P.p.config}}},{key:"viewOptions",value:function(){var t,e;return{containerClass:null!==(e=null===(t=this.appVariables)||void 0===t?void 0:t.notificationsViewClassNames)&&void 0!==e?e:""}}},{key:"onBeforeRender",value:function(){var t=this;return this.collection||this.notificationService.getNotifications(this.options.params,this.getCollectionIdentifier(),(function(e){return t.onData(e)})),!!this.collection}},{key:"onRender",value:function(){this.renderNotificationList(),this.renderPagination()}}])&&I(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),h}(r.Q.View)},43454:(t,e,n)=>{var i=n(32227);t.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,i,o){t.propertyIsEnumerable;var r,a=t.escapeExpression;return'<div class="'+a(t.lambda(null!=(r=null!=e?e.options:e)?r.containerClass:r,e))+'">\n <h1 class="header border-bottom pb-2 m-0">'+a((n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"notifications",{name:"lang",hash:{},data:o}))+'</h1>\n <div class="list-region"></div>\n <div class="pagination-region"></div>\n</div>'},useData:!0})},35454:(t,e,n)=>{var i=n(32227);t.exports=(i.default||i).template({1:function(t,e,n,i,o){return"disabled"},compiler:[8,">= 4.3.0"],main:function(t,e,n,i,o){t.propertyIsEnumerable;var r,a=null!=e?e:t.nullContext||{},s=t.hooks.helperMissing,c=t.escapeExpression;return'<div class="p-3">\n <a class="btn previous-applink btn-outline-dark '+(null!=(r=n.unless.call(a,null!=(r=null!=(r=null!=e?e.options:e)?r.cursors:r)?r.previous:r,{name:"unless",hash:{},fn:t.program(1,o,0),inverse:t.noop,data:o}))?r:"")+'">'+c((n.lang||e&&e.lang||s).call(a,"previous",{name:"lang",hash:{},data:o}))+'</a>\n <a class="btn next-applink btn-outline-dark '+(null!=(r=n.unless.call(a,null!=(r=null!=(r=null!=e?e.options:e)?r.cursors:r)?r.next:r,{name:"unless",hash:{},fn:t.program(1,o,0),inverse:t.noop,data:o}))?r:"")+'">'+c((n.lang||e&&e.lang||s).call(a,"next",{name:"lang",hash:{},data:o}))+"</a>\n</div>"},useData:!0})}}]);
1
+ (self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[6801],{86801:(t,e,n)=>{"use strict";n.r(e),n.d(e,{NotificationsView:()=>T});var i=n(71365),o=n(23481),r=n(81886),a=n(41546),s=n(18314),c=n(50723),l=n(60735),u=n(83905),f=n(39479),p=n(49985),y=n(65858),h=n(35454),v=n.n(h);function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function g(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,d(i.key),i)}}function d(t){var e=function(t,e){if("object"!==b(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==b(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===b(e)?e:String(e)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function k(t){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},k(t)}var w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&m(t,e)}(a,t);var e,n,i,o,r=(i=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(t){return!1}}(),function(){var t,e=k(i);if(o){var n=k(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===b(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,t)}return e=a,(n=[{key:"defaults",get:function(){return{cursors:{},cursorParamName:"cursor"}}},{key:"name",get:function(){return"PaginationComponent"}},{key:"template",get:function(){return v()}},{key:"lang",get:function(){return"shared._pagination"}},{key:"appLinks",get:function(){var t={};if(!this.options.cursors)return{};if(this.options.cursors.previous){var e=this.options.cursors.previous,n=this.buildCursor(this.options.cursors.previous);+e<=1&&!0!==this.options.allowFirstPageCursor&&delete n.params.cursor,t[".previous-applink"]=n}return this.options.cursors.next&&(t[".next-applink"]=this.buildCursor(this.options.cursors.next)),t}},{key:"events",value:function(){return{"click .previous-applink":"onClickPrevious","click .next-applink":"onClickNext"}}},{key:"buildCursor",value:function(t){return{application:this.options.appLink.application,action:this.options.appLink.action,args:this.options.appLink.args,params:f.extend({},this.options.appLink.params,(e={},n=this.options.cursorParamName,i=t,(n=d(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e))};var e,n,i}},{key:"onClickPrevious",value:function(){this.logAction("previous")}},{key:"onClickNext",value:function(){this.logAction("next")}},{key:"logAction",value:function(t){var e=p.k.mergeOptions(this.options.analyticsOptions,{location:y.LocationContext.Pagination,entity:y.EntityType.Pagination,actionType:y.UserAction.Navigate}),n={id:this.options.collectionId,page:t};p.k.logUserAction(n,e)}},{key:"viewOptions",value:function(){return{cursors:this.options.cursors}}},{key:"onBeforeRender",value:function(){return!!this.options.cursors}}])&&g(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.Q.Component),O=n(65220),P=n(72264),C=n(89224),j=n.n(C),x=n(43454),S=n.n(x),_=n(58081);function E(t){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},E(t)}function I(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==E(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==E(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===E(o)?o:String(o)),i)}var o}function N(t,e){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},N(t,e)}function R(t){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},R(t)}var T=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&N(t,e)}(h,t);var e,n,f,p,y=(f=h,p=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(t){return!1}}(),function(){var t,e=R(f);if(p){var n=R(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===E(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function h(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),y.call(this,t)}return e=h,(n=[{key:"name",get:function(){return"NotificationsView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"notifications.notifications"}},{key:"template",get:function(){return S()}},{key:"regions",value:function(){return{notifications:{replaceElement:!0,el:".list-region",partialLoading:{component:u.k.ComponentCollection,options:{collectionLength:5,childOptions:{template:j(),className:"px-1 py-2",viewOptions:{styles:_.Z}}}}},pagination:{replaceElement:!0,el:".pagination-region"}}}},{key:"initialize",value:function(){this.notificationService=i.u.getInstance(l.D.Notification,this),this.appVariables=i.u.getInstance(s.C.NOTIFICATIONS,this)}},{key:"onData",value:function(t){this.collection=t,this.render()}},{key:"getCollectionIdentifier",value:function(){return this.collectionIdentifier?this.collectionIdentifier:this.collectionIdentifier=new O.J(Object.assign({collectionPrefix:c.j.NOTIFICATIONS},this.options.params))}},{key:"renderNotificationList",value:function(){var t=new a.Z({collection:this.collection,childType:a.z.Default,liteUrl:this.config instanceof r.Q.Model?this.config.get("liteUrl"):this.config.liteUrl,libraryEditorUrl:this.config instanceof r.Q.Model?this.config.get("libraryEditorUrl"):this.config.libraryEditorUrl,hasLite:this.options.hasLite});this.showChildView("notifications",t)}},{key:"renderPagination",value:function(){if(this.collection.length){var t=this.notificationService.getNotificationsCursors(this.getCollectionIdentifier()),e=new w({cursors:t,appLink:Object.assign(Object.assign({},this.appVariables.appLinks.notifications),{args:[],params:this.getCollectionIdentifier().toParams()})});this.showChildView("pagination",e)}}},{key:"requiredResources",get:function(){return{config:P.p.config}}},{key:"viewOptions",value:function(){var t,e;return{containerClass:null!==(e=null===(t=this.appVariables)||void 0===t?void 0:t.notificationsViewClassNames)&&void 0!==e?e:""}}},{key:"onBeforeRender",value:function(){var t=this;return this.collection||this.notificationService.getNotifications(this.options.params,this.getCollectionIdentifier(),(function(e){return t.onData(e)})),!!this.collection}},{key:"onRender",value:function(){this.renderNotificationList(),this.renderPagination()}}])&&I(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),h}(r.Q.View)},43454:(t,e,n)=>{var i=n(32227);t.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,i,o){t.propertyIsEnumerable;var r,a=t.escapeExpression;return'<div class="'+a(t.lambda(null!=(r=null!=e?e.options:e)?r.containerClass:r,e))+'">\r\n <h1 class="header border-bottom pb-2 m-0">'+a((n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"notifications",{name:"lang",hash:{},data:o}))+'</h1>\r\n <div class="list-region"></div>\r\n <div class="pagination-region"></div>\r\n</div>'},useData:!0})},35454:(t,e,n)=>{var i=n(32227);t.exports=(i.default||i).template({1:function(t,e,n,i,o){return"disabled"},compiler:[8,">= 4.3.0"],main:function(t,e,n,i,o){t.propertyIsEnumerable;var r,a=null!=e?e:t.nullContext||{},s=t.hooks.helperMissing,c=t.escapeExpression;return'<div class="p-3">\r\n <a class="btn previous-applink btn-outline-dark '+(null!=(r=n.unless.call(a,null!=(r=null!=(r=null!=e?e.options:e)?r.cursors:r)?r.previous:r,{name:"unless",hash:{},fn:t.program(1,o,0),inverse:t.noop,data:o}))?r:"")+'">'+c((n.lang||e&&e.lang||s).call(a,"previous",{name:"lang",hash:{},data:o}))+'</a>\r\n <a class="btn next-applink btn-outline-dark '+(null!=(r=n.unless.call(a,null!=(r=null!=(r=null!=e?e.options:e)?r.cursors:r)?r.next:r,{name:"unless",hash:{},fn:t.program(1,o,0),inverse:t.noop,data:o}))?r:"")+'">'+c((n.lang||e&&e.lang||s).call(a,"next",{name:"lang",hash:{},data:o}))+"</a>\r\n</div>"},useData:!0})}}]);