j1-template 2023.9.1 → 2023.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (740) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/themes/j1/layouts/content_generator_collection.html +1 -1
  3. data/_includes/themes/j1/layouts/content_generator_news_panel_posts.html +1 -1
  4. data/_includes/themes/j1/layouts/content_generator_page.html +1 -1
  5. data/_includes/themes/j1/layouts/content_generator_post.html +1 -1
  6. data/_includes/themes/j1/layouts/content_generator_raw.html +1 -1
  7. data/_includes/themes/j1/layouts/layout_metadata_generator.html +1 -1
  8. data/_includes/themes/j1/layouts/layout_module_generator.html +1 -1
  9. data/_includes/themes/j1/layouts/layout_resource_generator.html +1 -1
  10. data/_includes/themes/j1/modules/attics/generator.html +1 -1
  11. data/_includes/themes/j1/modules/navigator/generator.html +1 -1
  12. data/_includes/themes/j1/modules/searcher/generator.html +1 -1
  13. data/_includes/themes/j1/modules/searcher/procedures/topsearch.proc +1 -1
  14. data/_includes/themes/j1/procedures/blocks/footer/boxes/about_box.proc +1 -1
  15. data/_includes/themes/j1/procedures/blocks/footer/boxes/contacts_box.proc +1 -1
  16. data/_includes/themes/j1/procedures/blocks/footer/boxes/issue.proc +1 -1
  17. data/_includes/themes/j1/procedures/blocks/footer/boxes/legal_statements.proc +1 -1
  18. data/_includes/themes/j1/procedures/blocks/footer/boxes/links_box.proc +1 -1
  19. data/_includes/themes/j1/procedures/blocks/footer/boxes/news_box.proc +1 -1
  20. data/_includes/themes/j1/procedures/blocks/footer/boxes/social_media_icons.proc +1 -1
  21. data/_includes/themes/j1/procedures/blocks/get_wave.proc +1 -1
  22. data/_includes/themes/j1/procedures/collections/create_collection_article_preview.proc +1 -1
  23. data/_includes/themes/j1/procedures/collections/pager.proc +1 -1
  24. data/_includes/themes/j1/procedures/global/attributes_loader.proc +1 -1
  25. data/_includes/themes/j1/procedures/global/collect_frontmatter_options.proc +1 -1
  26. data/_includes/themes/j1/procedures/global/collect_page_options.proc +1 -1
  27. data/_includes/themes/j1/procedures/global/create_bs_button.proc +1 -1
  28. data/_includes/themes/j1/procedures/global/create_word_cloud.proc +1 -1
  29. data/_includes/themes/j1/procedures/global/date-german.proc +1 -1
  30. data/_includes/themes/j1/procedures/global/get_category.proc +1 -1
  31. data/_includes/themes/j1/procedures/global/get_category_item.proc +1 -1
  32. data/_includes/themes/j1/procedures/global/get_documents_dir.proc +1 -1
  33. data/_includes/themes/j1/procedures/global/get_page_path.proc +1 -1
  34. data/_includes/themes/j1/procedures/global/get_page_url.proc +1 -1
  35. data/_includes/themes/j1/procedures/global/select_color.proc +1 -1
  36. data/_includes/themes/j1/procedures/global/select_font_size.proc +1 -1
  37. data/_includes/themes/j1/procedures/global/select_icon_size.proc +1 -1
  38. data/_includes/themes/j1/procedures/global/select_location.proc +1 -1
  39. data/_includes/themes/j1/procedures/global/set_base_vars_folders.proc +1 -1
  40. data/_includes/themes/j1/procedures/global/set_env_entry_document.proc +1 -1
  41. data/_includes/themes/j1/procedures/global/set_image_block.proc +1 -1
  42. data/_includes/themes/j1/procedures/global/setup.proc +1 -1
  43. data/_includes/themes/j1/procedures/layouts/content_writer.proc +1 -1
  44. data/_includes/themes/j1/procedures/layouts/default_writer.proc +1 -1
  45. data/_includes/themes/j1/procedures/layouts/module_writer.proc +1 -1
  46. data/_includes/themes/j1/procedures/layouts/resource_writer.proc +1 -1
  47. data/_includes/themes/j1/procedures/posts/collate_calendar.proc +1 -1
  48. data/_includes/themes/j1/procedures/posts/collate_list.proc +1 -1
  49. data/_includes/themes/j1/procedures/posts/collate_timeline.proc +1 -1
  50. data/_includes/themes/j1/procedures/posts/create_ad_block.proc +1 -1
  51. data/_includes/themes/j1/procedures/posts/create_series_header.proc +1 -1
  52. data/_includes/themes/j1/procedures/posts/pager.proc +1 -1
  53. data/_layouts/_home.html +1 -1
  54. data/_layouts/autopage_category.html +1 -1
  55. data/_layouts/autopage_collection.html +1 -1
  56. data/_layouts/autopage_collections_tags.html +1 -1
  57. data/_layouts/autopage_tags.html +1 -1
  58. data/_layouts/collection.html +1 -1
  59. data/_layouts/compress.html +1 -1
  60. data/_layouts/default.html +1 -1
  61. data/_layouts/home.html +1 -1
  62. data/_layouts/news_panel_posts.html +1 -1
  63. data/_layouts/page.html +1 -1
  64. data/_layouts/post.html +1 -1
  65. data/_layouts/raw.html +1 -1
  66. data/apps/public/cc/cc.yml +1 -1
  67. data/assets/data/authclient.html +2 -2
  68. data/assets/data/banner.html +5 -5
  69. data/assets/data/carousel.json +1 -1
  70. data/assets/data/cookieconsent.html +2 -2
  71. data/assets/data/fab.html +2 -2
  72. data/assets/data/footer.html +2 -2
  73. data/assets/data/galeries.html +240 -0
  74. data/assets/data/gallery_customizer.html +2 -2
  75. data/assets/data/iso-639-language-codes-flags.json +1 -1
  76. data/assets/data/iso-639-language-codes.json +1 -1
  77. data/assets/data/j1_config.json +1 -1
  78. data/assets/data/masonry.html +99 -86
  79. data/assets/data/masterslider.html +2 -2
  80. data/assets/data/mdi_icons.json +1 -1
  81. data/assets/data/mdil_icons.json +1 -1
  82. data/assets/data/menu.html +2 -2
  83. data/assets/data/mmenu.html +2 -2
  84. data/assets/data/mmenu_sidebar.html +2 -2
  85. data/assets/data/mmenu_toc.html +2 -2
  86. data/assets/data/panel.html +2 -2
  87. data/assets/data/particles.yml +1 -1
  88. data/assets/data/private.json +1 -1
  89. data/assets/data/quicklinks.html +2 -2
  90. data/assets/data/rtext_resizer.html +2 -2
  91. data/assets/data/slick.html +2 -2
  92. data/assets/data/speak2me.html +11 -9
  93. data/assets/data/themes.bootswatch.json +1 -1
  94. data/assets/data/themes.json +1 -1
  95. data/assets/data/translator.html +2 -2
  96. data/assets/error_pages/HTTP204.html +1 -1
  97. data/assets/error_pages/HTTP400.html +1 -1
  98. data/assets/error_pages/HTTP401.html +1 -1
  99. data/assets/error_pages/HTTP403.html +1 -1
  100. data/assets/error_pages/HTTP404.html +1 -1
  101. data/assets/error_pages/HTTP444.html +1 -1
  102. data/assets/error_pages/HTTP445.html +1 -1
  103. data/assets/error_pages/HTTP446.html +1 -1
  104. data/assets/error_pages/HTTP447.html +1 -1
  105. data/assets/error_pages/HTTP448.html +1 -1
  106. data/assets/error_pages/HTTP500.html +1 -1
  107. data/assets/error_pages/HTTP501.html +1 -1
  108. data/assets/error_pages/HTTP502.html +1 -1
  109. data/assets/error_pages/HTTP503.html +1 -1
  110. data/assets/themes/j1/adapter/js/advertising.js +2 -2
  111. data/assets/themes/j1/adapter/js/algolia.js +2 -2
  112. data/assets/themes/j1/adapter/js/analytics.js +2 -2
  113. data/assets/themes/j1/adapter/js/asciidoctor.js +2 -2
  114. data/assets/themes/j1/adapter/js/attic.js +2 -2
  115. data/assets/themes/j1/adapter/js/bmd.js +2 -2
  116. data/assets/themes/j1/adapter/js/carousel.js +2 -2
  117. data/assets/themes/j1/adapter/js/clipboard.js +2 -2
  118. data/assets/themes/j1/adapter/js/comments.js +2 -2
  119. data/assets/themes/j1/adapter/js/cookieConsent.js +1 -1
  120. data/assets/themes/j1/adapter/js/customFunctions.js +2 -2
  121. data/assets/themes/j1/adapter/js/customModule.js +2 -2
  122. data/assets/themes/j1/adapter/js/dropdowns.js +2 -2
  123. data/assets/themes/j1/adapter/js/fab.js +2 -2
  124. data/assets/themes/j1/adapter/js/framer.js +2 -2
  125. data/assets/themes/j1/adapter/js/gallery.js +325 -0
  126. data/assets/themes/j1/adapter/js/iconPicker.js +2 -2
  127. data/assets/themes/j1/adapter/js/j1.js +2 -2
  128. data/assets/themes/j1/adapter/js/lazyLoader.js +2 -2
  129. data/assets/themes/j1/adapter/js/{justifiedGallery.js → lightGallery.js} +54 -48
  130. data/assets/themes/j1/adapter/js/lightbox.js +2 -2
  131. data/assets/themes/j1/adapter/js/logger.js +2 -2
  132. data/assets/themes/j1/adapter/js/lunr.js +2 -2
  133. data/assets/themes/j1/adapter/js/masonry.js +80 -13
  134. data/assets/themes/j1/adapter/js/masterslider.js +2 -2
  135. data/assets/themes/j1/adapter/js/mmenu.js +2 -2
  136. data/assets/themes/j1/adapter/js/navigator.js +7 -4
  137. data/assets/themes/j1/adapter/js/particles.js +2 -2
  138. data/assets/themes/j1/adapter/js/rangeSlider.js +2 -2
  139. data/assets/themes/j1/adapter/js/rouge.js +2 -2
  140. data/assets/themes/j1/adapter/js/rtable.js +2 -2
  141. data/assets/themes/j1/adapter/js/rtextResizer.js +2 -2
  142. data/assets/themes/j1/adapter/js/scroller.js +2 -2
  143. data/assets/themes/j1/adapter/js/slick.js +1 -1
  144. data/assets/themes/j1/adapter/js/speak2me.js +183 -48
  145. data/assets/themes/j1/adapter/js/themeToggler.js +2 -2
  146. data/assets/themes/j1/adapter/js/themer.js +2 -2
  147. data/assets/themes/j1/adapter/js/toccer.js +2 -2
  148. data/assets/themes/j1/adapter/js/translator.js +1 -1
  149. data/assets/themes/j1/adapter/js/waves.js +2 -2
  150. data/assets/themes/j1/core/country-flags/css/theme/uno.css +1 -1
  151. data/assets/themes/j1/core/country-flags/css/theme/uno.min.css +1 -1
  152. data/assets/themes/j1/core/css/animate.css +2 -2
  153. data/assets/themes/j1/core/css/icon-fonts/fontawesome.css +2 -2
  154. data/assets/themes/j1/core/css/icon-fonts/iconify.css +5 -5
  155. data/assets/themes/j1/core/css/icon-fonts/mdi.css +9 -9
  156. data/assets/themes/j1/core/css/icon-fonts/mdib.css +7 -7
  157. data/assets/themes/j1/core/css/icon-fonts/mdil.css +10 -10
  158. data/assets/themes/j1/core/css/themes/bootstrap/bootstrap.css +1 -1
  159. data/assets/themes/j1/core/css/themes/unodark/bootstrap.css +30 -30
  160. data/assets/themes/j1/core/css/themes/unolight/bootstrap.css +107 -100
  161. data/assets/themes/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
  162. data/assets/themes/j1/core/css/vendor.css +10 -10
  163. data/assets/themes/j1/core/js/template.js +240 -83
  164. data/assets/themes/j1/core/js/template.min.js +6 -6
  165. data/assets/themes/j1/core/js/template.min.js.map +1 -1
  166. data/assets/themes/j1/modules/backstretch/js/backstretch.js +1 -1
  167. data/assets/themes/j1/modules/backstretch/js/backstretch.min.js +1 -1
  168. data/assets/themes/j1/modules/bmd/js/bmd.js +1 -1
  169. data/assets/themes/j1/modules/bmd/js/bmd.min.js +1 -1
  170. data/assets/themes/j1/modules/bootstrap/js/bootstrap.js +2118 -2696
  171. data/assets/themes/j1/modules/bootstrap/js/bootstrap.js.map +1 -0
  172. data/assets/themes/j1/modules/bootstrap/js/bootstrap.min.js +3 -3
  173. data/assets/themes/j1/modules/bootstrap/js/bootstrap.min.js.map +1 -1
  174. data/assets/themes/j1/modules/carousel/css/carousel.css +1 -1
  175. data/assets/themes/j1/modules/carousel/css/carousel.min.css +1 -1
  176. data/assets/themes/j1/modules/carousel/css/carousel_transitions.css +1 -1
  177. data/assets/themes/j1/modules/carousel/css/carousel_transitions.min.css +1 -1
  178. data/assets/themes/j1/modules/carousel/css/theme/uno.css +1 -1
  179. data/assets/themes/j1/modules/carousel/css/theme/uno.min.css +1 -1
  180. data/assets/themes/j1/modules/clipboard/css/theme/uno.css +1 -1
  181. data/assets/themes/j1/modules/clipboard/css/theme/uno.min.css +1 -1
  182. data/assets/themes/j1/modules/dropdowns/css/theme/uno/dropdowns.css +1 -1
  183. data/assets/themes/j1/modules/dropdowns/css/theme/uno/dropdowns.min.css +1 -1
  184. data/assets/themes/j1/modules/dropdowns/js/cash.js +1 -1
  185. data/assets/themes/j1/modules/dropdowns/js/cash.min.js +1 -1
  186. data/assets/themes/j1/modules/dropdowns/js/dropdowns.js +1 -1
  187. data/assets/themes/j1/modules/dropdowns/js/dropdowns.min.js +1 -1
  188. data/assets/themes/j1/modules/fab/js/cash.js +1 -1
  189. data/assets/themes/j1/modules/fab/js/cash.min.js +1 -1
  190. data/assets/themes/j1/modules/fab/js/fab.js +1 -1
  191. data/assets/themes/j1/modules/fab/js/fab.min.js +1 -1
  192. data/assets/themes/j1/modules/iconPicker/css/universal-icon-picker.css +1 -1
  193. data/assets/themes/j1/modules/iconPicker/css/universal-icon-picker.min.css +1 -1
  194. data/assets/themes/j1/modules/iconPicker/js/universal-icon-picker.js +1 -1
  195. data/assets/themes/j1/modules/iconPicker/js/universal-icon-picker.min.js +1 -1
  196. data/assets/themes/j1/modules/iframeResizer/js/client/iframeResizer.contentWindow.min.js +0 -1
  197. data/assets/themes/j1/modules/iframeResizer/js/resizer.min.js +0 -1
  198. data/assets/themes/j1/modules/jquery/js/extensions/hasClass.js +1 -1
  199. data/assets/themes/j1/modules/jquery/js/extensions/hasClass.min.js +1 -1
  200. data/assets/themes/j1/modules/jquery/js/extensions/removeClass.js +1 -1
  201. data/assets/themes/j1/modules/jquery/js/extensions/removeClass.min.js +1 -1
  202. data/assets/themes/j1/modules/justifiedGallery/css/theme/uno.css +1 -1
  203. data/assets/themes/j1/modules/justifiedGallery/css/theme/uno.min.css +1 -1
  204. data/assets/themes/j1/modules/lightGallery/css/lg-transitions.css +984 -0
  205. data/assets/themes/j1/modules/lightGallery/css/lg-transitions.min.css +26 -0
  206. data/assets/themes/j1/modules/lightGallery/css/lightgallery-bundle.css +1627 -0
  207. data/assets/themes/j1/modules/lightGallery/css/lightgallery-bundle.min.css +25 -0
  208. data/assets/themes/j1/modules/lightGallery/css/plugins/lg-autoplay.css +67 -0
  209. data/assets/themes/j1/modules/lightGallery/css/plugins/lg-comments.css +157 -0
  210. data/assets/themes/j1/modules/lightGallery/css/plugins/lg-fullscreen.css +32 -0
  211. data/assets/themes/j1/modules/lightGallery/css/plugins/lg-medium-zoom.css +40 -0
  212. data/assets/themes/j1/modules/lightGallery/css/plugins/lg-pager.css +115 -0
  213. data/assets/themes/j1/modules/lightGallery/css/plugins/lg-rotate.css +74 -0
  214. data/assets/themes/j1/modules/lightGallery/css/plugins/lg-share.css +168 -0
  215. data/assets/themes/j1/modules/lightGallery/css/plugins/lg-thumbnail.css +133 -0
  216. data/assets/themes/j1/modules/lightGallery/css/plugins/lg-video.css +169 -0
  217. data/assets/themes/j1/modules/lightGallery/css/plugins/lg-zoom.css +141 -0
  218. data/assets/themes/j1/modules/lightGallery/css/themes/uno/uno.css +109 -0
  219. data/assets/themes/j1/modules/lightGallery/css/themes/uno/uno.min.css +19 -0
  220. data/assets/themes/j1/modules/lightGallery/{css/fonts → fonts}/lg.svg +35 -28
  221. data/assets/themes/j1/modules/lightGallery/fonts/lg.ttf +0 -0
  222. data/assets/themes/j1/modules/lightGallery/fonts/lg.woff +0 -0
  223. data/assets/themes/j1/modules/lightGallery/fonts/lg.woff2 +0 -0
  224. data/assets/themes/j1/modules/lightGallery/img/loading.gif +0 -0
  225. data/assets/themes/j1/modules/lightGallery/js/lightgallery.js +2759 -0
  226. data/assets/themes/j1/modules/lightGallery/js/lightgallery.min.js +25 -0
  227. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-autoplay.js +275 -0
  228. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-autoplay.min.js +26 -0
  229. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-comment.js +230 -0
  230. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-comment.min.js +26 -0
  231. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-fullscreen.js +160 -0
  232. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-fullscreen.min.js +26 -0
  233. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-hash.js +223 -0
  234. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-hash.min.js +27 -0
  235. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-medium-zoom.js +157 -0
  236. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-medium-zoom.min.js +26 -0
  237. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-pager.js +164 -0
  238. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-pager.min.js +26 -0
  239. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-rotate.js +299 -0
  240. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-rotate.min.js +26 -0
  241. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-share.js +244 -0
  242. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-share.min.js +27 -0
  243. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-thumbnail.js +509 -0
  244. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-thumbnail.min.js +26 -0
  245. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-video.js +585 -0
  246. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-video.min.js +27 -0
  247. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-vimeo-thumbnail.js +207 -0
  248. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-vimeo-thumbnail.min.js +26 -0
  249. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-zoom.js +999 -0
  250. data/assets/themes/j1/modules/lightGallery/js/plugins/lg-zoom.min.js +26 -0
  251. data/assets/themes/j1/modules/lightbox/css/lightbox.css +1 -1
  252. data/assets/themes/j1/modules/lightbox/css/lightbox.min.css +1 -1
  253. data/assets/themes/j1/modules/lightbox/css/theme/uno.css +1 -1
  254. data/assets/themes/j1/modules/lightbox/css/theme/uno.min.css +1 -1
  255. data/assets/themes/j1/modules/lightbox/js/lightbox.js +1 -1
  256. data/assets/themes/j1/modules/lightbox/js/lightbox.min.js +1 -1
  257. data/assets/themes/j1/modules/lunr/js/j1.js +1 -1
  258. data/assets/themes/j1/modules/lunr/js/j1.min.js +1 -1
  259. data/assets/themes/j1/modules/masonry/js/utils/images_loaded.js +439 -0
  260. data/assets/themes/j1/modules/masonry/js/utils/images_loaded.min.js +12 -0
  261. data/assets/themes/j1/modules/masterslider/css/theme/uno.css +1 -1
  262. data/assets/themes/j1/modules/masterslider/css/theme/uno.min.css +1 -1
  263. data/assets/themes/j1/modules/mmenuLight/css/theme/uno/mmenu.css +1 -1
  264. data/assets/themes/j1/modules/mmenuLight/css/theme/uno/mmenu.min.css +1 -1
  265. data/assets/themes/j1/modules/mmenuLight/js/mmenu.js +1 -1
  266. data/assets/themes/j1/modules/mmenuLight/js/mmenu.min.js +1 -1
  267. data/assets/themes/j1/modules/mmenuLight/js/mmenu.polyfills.js +118 -0
  268. data/assets/themes/j1/modules/particles/skies/cavern1.png +0 -0
  269. data/assets/themes/j1/modules/particles/skies/cavern2.png +0 -0
  270. data/assets/themes/j1/modules/particles/skies/chrome.png +0 -0
  271. data/assets/themes/j1/modules/particles/skies/deep-space.jpg +0 -0
  272. data/assets/themes/j1/modules/particles/skies/deepblue.png +0 -0
  273. data/assets/themes/j1/modules/particles/skies/fire.png +0 -0
  274. data/assets/themes/j1/modules/particles/skies/fog.png +0 -0
  275. data/assets/themes/j1/modules/particles/skies/sky1.png +0 -0
  276. data/assets/themes/j1/modules/particles/skies/sky2.png +0 -0
  277. data/assets/themes/j1/modules/particles/skies/sky3.png +0 -0
  278. data/assets/themes/j1/modules/particles/skies/sky4.png +0 -0
  279. data/assets/themes/j1/modules/particles/skies/sky5.png +0 -0
  280. data/assets/themes/j1/modules/particles/skies/space1.png +0 -0
  281. data/assets/themes/j1/modules/particles/skies/space2.png +0 -0
  282. data/assets/themes/j1/modules/particles/skies/space3.png +0 -0
  283. data/assets/themes/j1/modules/particles/skies/starfield.png +0 -0
  284. data/assets/themes/j1/modules/particles/skies/sunorbit.png +0 -0
  285. data/assets/themes/j1/modules/particles/skies/sunset.png +0 -0
  286. data/assets/themes/j1/modules/particles/skies/toxic.png +0 -0
  287. data/assets/themes/j1/modules/particles/skies/underwater1.png +0 -0
  288. data/assets/themes/j1/modules/particles/skies/underwater2.png +0 -0
  289. data/assets/themes/j1/modules/particles/skies/underwater3.png +0 -0
  290. data/assets/themes/j1/modules/particles/skies/wtf.png +0 -0
  291. data/assets/themes/j1/modules/particles/sprites/slime.png +0 -0
  292. data/assets/themes/j1/modules/particles/sprites/slimeeyes.png +0 -0
  293. data/assets/themes/j1/modules/particles/sprites/snake.png +0 -0
  294. data/assets/themes/j1/modules/particles/sprites/snowflakes.png +0 -0
  295. data/assets/themes/j1/modules/particles/sprites/snowflakes_large.png +0 -0
  296. data/assets/themes/j1/modules/popper/js/popper.min.js +0 -1
  297. data/assets/themes/j1/modules/rangeSlider/css/theme/uno/nouislider.css +1 -1
  298. data/assets/themes/j1/modules/rangeSlider/css/theme/uno/nouislider.min.css +1 -1
  299. data/assets/themes/j1/modules/rouge/css/base16/theme.css +1 -1
  300. data/assets/themes/j1/modules/rouge/css/base16/theme.min.css +1 -1
  301. data/assets/themes/j1/modules/rouge/css/base16.dark/theme.css +1 -1
  302. data/assets/themes/j1/modules/rouge/css/base16.dark/theme.min.css +1 -1
  303. data/assets/themes/j1/modules/rouge/css/base16.light/theme.css +1 -1
  304. data/assets/themes/j1/modules/rouge/css/base16.light/theme.min.css +1 -1
  305. data/assets/themes/j1/modules/rouge/css/base16.monokai/theme.css +1 -1
  306. data/assets/themes/j1/modules/rouge/css/base16.monokai/theme.min.css +1 -1
  307. data/assets/themes/j1/modules/rouge/css/base16.monokai.dark/theme.css +1 -1
  308. data/assets/themes/j1/modules/rouge/css/base16.monokai.dark/theme.min.css +1 -1
  309. data/assets/themes/j1/modules/rouge/css/base16.monokai.light/theme.css +1 -1
  310. data/assets/themes/j1/modules/rouge/css/base16.monokai.light/theme.min.css +1 -1
  311. data/assets/themes/j1/modules/rouge/css/base16.solarized/theme.css +1 -1
  312. data/assets/themes/j1/modules/rouge/css/base16.solarized/theme.min.css +1 -1
  313. data/assets/themes/j1/modules/rouge/css/base16.solarized.dark/theme.css +1 -1
  314. data/assets/themes/j1/modules/rouge/css/base16.solarized.dark/theme.min.css +1 -1
  315. data/assets/themes/j1/modules/rouge/css/base16.solarized.light/theme.css +1 -1
  316. data/assets/themes/j1/modules/rouge/css/base16.solarized.light/theme.min.css +1 -1
  317. data/assets/themes/j1/modules/rouge/css/colorful/theme.css +1 -1
  318. data/assets/themes/j1/modules/rouge/css/colorful/theme.min.css +1 -1
  319. data/assets/themes/j1/modules/rouge/css/github/theme.css +1 -1
  320. data/assets/themes/j1/modules/rouge/css/github/theme.min.css +1 -1
  321. data/assets/themes/j1/modules/rouge/css/gruvbox/theme.css +1 -1
  322. data/assets/themes/j1/modules/rouge/css/gruvbox/theme.min.css +1 -1
  323. data/assets/themes/j1/modules/rouge/css/gruvbox.dark/theme.css +1 -1
  324. data/assets/themes/j1/modules/rouge/css/gruvbox.dark/theme.min.css +1 -1
  325. data/assets/themes/j1/modules/rouge/css/gruvbox.light/theme.css +1 -1
  326. data/assets/themes/j1/modules/rouge/css/gruvbox.light/theme.min.css +1 -1
  327. data/assets/themes/j1/modules/rouge/css/igorpro/theme.css +1 -1
  328. data/assets/themes/j1/modules/rouge/css/igorpro/theme.min.css +1 -1
  329. data/assets/themes/j1/modules/rouge/css/molokai/theme.css +1 -1
  330. data/assets/themes/j1/modules/rouge/css/molokai/theme.min.css +1 -1
  331. data/assets/themes/j1/modules/rouge/css/monokai/theme.css +1 -1
  332. data/assets/themes/j1/modules/rouge/css/monokai/theme.min.css +1 -1
  333. data/assets/themes/j1/modules/rouge/css/monokai.sublime/theme.css +1 -1
  334. data/assets/themes/j1/modules/rouge/css/monokai.sublime/theme.min.css +1 -1
  335. data/assets/themes/j1/modules/rouge/css/pastie/theme.css +1 -1
  336. data/assets/themes/j1/modules/rouge/css/pastie/theme.min.css +1 -1
  337. data/assets/themes/j1/modules/rouge/css/thankful_eyes/theme.css +1 -1
  338. data/assets/themes/j1/modules/rouge/css/thankful_eyes/theme.min.css +1 -1
  339. data/assets/themes/j1/modules/rouge/css/themes.txt +1 -1
  340. data/assets/themes/j1/modules/rouge/css/tulip/theme.css +1 -1
  341. data/assets/themes/j1/modules/rouge/css/tulip/theme.min.css +1 -1
  342. data/assets/themes/j1/modules/rouge/css/uno.dark/theme.css +1 -1
  343. data/assets/themes/j1/modules/rouge/css/uno.dark/theme.min.css +1 -1
  344. data/assets/themes/j1/modules/rouge/css/uno.light/theme.css +1 -1
  345. data/assets/themes/j1/modules/rouge/css/uno.light/theme.min.css +1 -1
  346. data/assets/themes/j1/modules/rouge/js/select.js +1 -1
  347. data/assets/themes/j1/modules/rtable/css/theme/uno/rtable.css +1 -1
  348. data/assets/themes/j1/modules/rtable/css/theme/uno/rtable.min.css +1 -1
  349. data/assets/themes/j1/modules/rtable/js/rtable.js +1 -1
  350. data/assets/themes/j1/modules/rtable/js/rtable.min.js +1 -1
  351. data/assets/themes/j1/modules/scroller/css/theme/uno.css +1 -1
  352. data/assets/themes/j1/modules/scroller/css/theme/uno.min.css +1 -1
  353. data/assets/themes/j1/modules/scroller/js/scroller.min.js +1 -1
  354. data/assets/themes/j1/modules/slick/lightbox/css/theme/uno.css +1 -1
  355. data/assets/themes/j1/modules/slick/lightbox/css/theme/uno.min.css +1 -1
  356. data/assets/themes/j1/modules/slick/lightbox/js/slick-lightbox.min.js +0 -1
  357. data/assets/themes/j1/modules/slick/slider/css/theme/uno.css +1 -1
  358. data/assets/themes/j1/modules/slick/slider/css/theme/uno.min.css +1 -1
  359. data/assets/themes/j1/modules/spinner/css/spin.css +1 -1
  360. data/assets/themes/j1/modules/spinner/css/spin.min.css +1 -1
  361. data/assets/themes/j1/modules/spinner/js/spin.js +1 -1
  362. data/assets/themes/j1/modules/spinner/js/spin.min.js +1 -1
  363. data/assets/themes/j1/modules/themeSwitcher/js/switcher.js +1 -1
  364. data/assets/themes/j1/modules/themeSwitcher/js/switcher.min.js +1 -1
  365. data/assets/themes/j1/modules/translator/css/translator.css +1 -1
  366. data/assets/themes/j1/modules/translator/css/translator.min.css +1 -1
  367. data/assets/themes/j1/modules/videojs/css/themes/city.css +74 -74
  368. data/assets/themes/j1/modules/videojs/css/themes/city.min.css +3 -4
  369. data/assets/themes/j1/modules/videojs/css/themes/fantasy.css +3 -3
  370. data/assets/themes/j1/modules/videojs/css/themes/fantasy.min.css +3 -4
  371. data/assets/themes/j1/modules/videojs/css/themes/forest.css +4 -3
  372. data/assets/themes/j1/modules/videojs/css/themes/forest.min.css +3 -4
  373. data/assets/themes/j1/modules/videojs/css/themes/sea.css +2 -2
  374. data/assets/themes/j1/modules/videojs/css/themes/sea.min.css +3 -4
  375. data/assets/themes/j1/modules/videojs/css/themes/uno.css +151 -0
  376. data/assets/themes/j1/modules/videojs/css/themes/uno.min.css +17 -0
  377. data/assets/themes/j1/modules/videojs/css/video-js.css +12 -0
  378. data/assets/themes/j1/modules/videojs/css/video-js.min.css +12 -0
  379. data/assets/themes/j1/modules/videojs/js/plugins/dm/LICENSE +19 -0
  380. data/assets/themes/j1/modules/videojs/js/plugins/dm/README.md +94 -0
  381. data/assets/themes/j1/modules/videojs/js/plugins/dm/api/README.md +7 -0
  382. data/assets/themes/j1/modules/videojs/js/plugins/dm/api/dailymotion.min.js +29 -0
  383. data/assets/themes/j1/modules/videojs/js/plugins/dm/api/dailymotion.player.min.js +80 -0
  384. data/assets/themes/j1/modules/videojs/js/plugins/dm/dailymotion.js +603 -0
  385. data/assets/themes/j1/modules/videojs/js/plugins/dm/dailymotion.min.js +16 -0
  386. data/assets/themes/j1/modules/videojs/js/plugins/dm/examples/dailymotion-controls.html +18 -0
  387. data/assets/themes/j1/modules/videojs/js/plugins/dm/examples/dailymotion-javascript.html +27 -0
  388. data/assets/themes/j1/modules/videojs/js/plugins/dm/examples/dailymotion-playlist.html +19 -0
  389. data/assets/themes/j1/modules/videojs/js/plugins/dm/examples/global-parameters.html +28 -0
  390. data/assets/themes/j1/modules/videojs/js/plugins/dm/examples/simple.html +20 -0
  391. data/assets/themes/j1/modules/videojs/js/plugins/dm/examples/switch.html +37 -0
  392. data/assets/themes/j1/modules/videojs/js/plugins/vm/LICENSE +21 -0
  393. data/assets/themes/j1/modules/videojs/js/plugins/vm/README.md +15 -0
  394. data/assets/themes/j1/modules/videojs/js/plugins/vm/api/README.md +1818 -0
  395. data/assets/themes/j1/modules/videojs/js/plugins/vm/api/player.min.js +23 -0
  396. data/assets/themes/j1/modules/videojs/js/plugins/vm/api/vimeo.js +3562 -0
  397. data/assets/themes/j1/modules/videojs/js/plugins/vm/api/vimeo.min.js +35 -0
  398. data/assets/themes/j1/modules/videojs/js/plugins/vm/examples/index.html +33 -0
  399. data/assets/themes/j1/modules/videojs/js/plugins/vm/examples/player/index.html +37 -0
  400. data/assets/themes/j1/modules/videojs/js/plugins/vm/vimeo.js +521 -0
  401. data/assets/themes/j1/modules/videojs/js/plugins/vm/vimeo.min.js +15 -0
  402. data/assets/themes/j1/modules/videojs/js/plugins/wt/api/Readme.txt +20 -0
  403. data/assets/themes/j1/modules/videojs/js/plugins/wt/api/WistiaPlayer.ts +1617 -0
  404. data/assets/themes/j1/modules/videojs/js/plugins/wt/api/wistia.min.js +2 -0
  405. data/assets/themes/j1/modules/videojs/js/plugins/wt/wistia.js +383 -0
  406. data/assets/themes/j1/modules/videojs/js/plugins/wt/wistia.min.js +18 -0
  407. data/assets/themes/j1/modules/videojs/js/plugins/yt/README.md +115 -0
  408. data/assets/themes/j1/modules/videojs/js/plugins/yt/api/youtube.min.js +20 -0
  409. data/assets/themes/j1/modules/videojs/js/plugins/yt/examples/global-parameters.html +32 -0
  410. data/assets/themes/j1/modules/videojs/js/plugins/yt/examples/simple.html +20 -0
  411. data/assets/themes/j1/modules/videojs/js/plugins/yt/examples/switch.html +37 -0
  412. data/assets/themes/j1/modules/videojs/js/plugins/yt/examples/youtube-controls.html +18 -0
  413. data/assets/themes/j1/modules/videojs/js/plugins/yt/examples/youtube-javascript.html +27 -0
  414. data/assets/themes/j1/modules/videojs/js/plugins/yt/examples/youtube-list.html +19 -0
  415. data/assets/themes/j1/modules/videojs/js/plugins/yt/examples/youtube-playlist.html +19 -0
  416. data/assets/themes/j1/modules/videojs/js/plugins/yt/youtube.js +832 -0
  417. data/assets/themes/j1/modules/videojs/js/plugins/yt/youtube.min.js +16 -0
  418. data/assets/themes/j1/modules/videojs/js/video.js +40610 -32915
  419. data/assets/themes/j1/modules/videojs/js/video.min.js +33 -20
  420. data/lib/j1/version.rb +1 -1
  421. data/lib/j1_app/j1_auth_manager/auth_manager.rb +1 -1
  422. data/lib/j1_app/j1_auth_manager/warden_omniauth.rb +1 -1
  423. data/lib/j1_app/omniauth/strategies/github.rb +1 -1
  424. data/lib/starter_web/Gemfile +3 -3
  425. data/lib/starter_web/README.md +5 -5
  426. data/lib/starter_web/_config.yml +2 -2
  427. data/lib/starter_web/_data/_defaults/categories.yml +1 -1
  428. data/lib/starter_web/_data/_defaults/colors.yml +1 -1
  429. data/lib/starter_web/_data/_defaults/font_sizes.yml +1 -1
  430. data/lib/starter_web/_data/_defaults/j1_config.yml +1 -1
  431. data/lib/starter_web/_data/_defaults/private.yml +1 -1
  432. data/lib/starter_web/_data/_defaults/resources.yml +1 -1
  433. data/lib/starter_web/_data/apps/defaults/justifiedGalleryCustomizer.yml +1 -1
  434. data/lib/starter_web/_data/apps/justifiedGalleryCustomizer.yml +1 -1
  435. data/lib/starter_web/_data/asciidoc2pdf/themes/j1-theme.yml +1 -1
  436. data/lib/starter_web/_data/blocks/banner.yml +1 -1
  437. data/lib/starter_web/_data/blocks/defaults/banner.yml +1 -1
  438. data/lib/starter_web/_data/blocks/defaults/footer.yml +1 -1
  439. data/lib/starter_web/_data/blocks/defaults/panel.yml +1 -1
  440. data/lib/starter_web/_data/blocks/footer.yml +2 -2
  441. data/lib/starter_web/_data/blocks/panel.yml +1 -1
  442. data/lib/starter_web/_data/categories.yml +1 -1
  443. data/lib/starter_web/_data/colors.yml +1 -1
  444. data/lib/starter_web/_data/font_sizes.yml +1 -1
  445. data/lib/starter_web/_data/j1_config.yml +1 -1
  446. data/lib/starter_web/_data/layouts/collection.yml +1 -1
  447. data/lib/starter_web/_data/layouts/default.yml +1 -1
  448. data/lib/starter_web/_data/layouts/home.yml +1 -1
  449. data/lib/starter_web/_data/layouts/news_panel_posts.yml +1 -1
  450. data/lib/starter_web/_data/layouts/page.yml +1 -1
  451. data/lib/starter_web/_data/layouts/post.yml +1 -1
  452. data/lib/starter_web/_data/layouts/raw.yml +1 -1
  453. data/lib/starter_web/_data/modules/advertising.yml +2 -2
  454. data/lib/starter_web/_data/modules/analytics.yml +1 -1
  455. data/lib/starter_web/_data/modules/attics.yml +1 -1
  456. data/lib/starter_web/_data/modules/authentication.yml +1 -1
  457. data/lib/starter_web/_data/modules/blog_navigator.yml +1 -1
  458. data/lib/starter_web/_data/modules/carousel.yml +1 -1
  459. data/lib/starter_web/_data/modules/comments.yml +1 -1
  460. data/lib/starter_web/_data/modules/cookieconsent.yml +1 -1
  461. data/lib/starter_web/_data/modules/cookies.yml +1 -1
  462. data/lib/starter_web/_data/modules/defaults/advertising.yml +1 -1
  463. data/lib/starter_web/_data/modules/defaults/analytics.yml +1 -1
  464. data/lib/starter_web/_data/modules/defaults/attics.yml +1 -1
  465. data/lib/starter_web/_data/modules/defaults/authentication.yml +1 -1
  466. data/lib/starter_web/_data/modules/defaults/blog_navigator.yml +1 -1
  467. data/lib/starter_web/_data/modules/defaults/carousel.yml +1 -1
  468. data/lib/starter_web/_data/modules/defaults/comments.yml +1 -1
  469. data/lib/starter_web/_data/modules/defaults/cookieconsent.yml +1 -1
  470. data/lib/starter_web/_data/modules/defaults/cookies.yml +1 -1
  471. data/lib/starter_web/_data/modules/defaults/dropdowns.yml +1 -1
  472. data/lib/starter_web/_data/modules/defaults/fab.yml +1 -1
  473. data/lib/starter_web/_data/modules/defaults/framer.yml +1 -1
  474. data/lib/starter_web/_data/modules/defaults/{justifiedGallery.yml → gallery.yml} +18 -28
  475. data/lib/starter_web/_data/modules/defaults/iconPicker.yml +1 -1
  476. data/lib/starter_web/_data/modules/defaults/lazyLoader.yml +1 -1
  477. data/lib/starter_web/_data/modules/defaults/lightGallery.yml +8 -6
  478. data/lib/starter_web/_data/modules/defaults/lightbox.yml +1 -1
  479. data/lib/starter_web/_data/modules/defaults/log4javascript.yml +1 -1
  480. data/lib/starter_web/_data/modules/defaults/log4r.yml +1 -1
  481. data/lib/starter_web/_data/modules/defaults/lunr.yml +1 -1
  482. data/lib/starter_web/_data/modules/defaults/masonry.yml +53 -13
  483. data/lib/starter_web/_data/modules/defaults/masterslider.yml +1 -1
  484. data/lib/starter_web/_data/modules/defaults/navigator.yml +1 -1
  485. data/lib/starter_web/_data/modules/defaults/particles.yml +1 -1
  486. data/lib/starter_web/_data/modules/defaults/rangeSlider.yml +1 -1
  487. data/lib/starter_web/_data/modules/defaults/rtable.yml +1 -1
  488. data/lib/starter_web/_data/modules/defaults/scroller.yml +1 -1
  489. data/lib/starter_web/_data/modules/defaults/slick.yml +1 -1
  490. data/lib/starter_web/_data/modules/defaults/speak2me.yml +8 -5
  491. data/lib/starter_web/_data/modules/defaults/theme_toggler.yml +1 -1
  492. data/lib/starter_web/_data/modules/defaults/themer.yml +1 -1
  493. data/lib/starter_web/_data/modules/defaults/toccer.yml +1 -1
  494. data/lib/starter_web/_data/modules/defaults/translator.yml +1 -1
  495. data/lib/starter_web/_data/modules/defaults/waves.yml +1 -1
  496. data/lib/starter_web/_data/modules/dropdowns.yml +1 -1
  497. data/lib/starter_web/_data/modules/fab.yml +1 -1
  498. data/lib/starter_web/_data/modules/framer.yml +1 -1
  499. data/lib/starter_web/_data/modules/gallery.yml +874 -0
  500. data/lib/starter_web/_data/modules/iconPicker.yml +1 -1
  501. data/lib/starter_web/_data/modules/lazyLoader.yml +1 -1
  502. data/lib/starter_web/_data/modules/lightGallery.yml +8 -5
  503. data/lib/starter_web/_data/modules/lightbox.yml +1 -1
  504. data/lib/starter_web/_data/modules/log4javascript.yml +1 -1
  505. data/lib/starter_web/_data/modules/log4r.yml +1 -1
  506. data/lib/starter_web/_data/modules/lunr.yml +1 -1
  507. data/lib/starter_web/_data/modules/masonry.yml +401 -87
  508. data/lib/starter_web/_data/modules/masterslider.yml +1 -1
  509. data/lib/starter_web/_data/modules/navigator.yml +1 -1
  510. data/lib/starter_web/_data/modules/navigator_menu.yml +18 -4
  511. data/lib/starter_web/_data/modules/nbinteract.yml +1 -1
  512. data/lib/starter_web/_data/modules/particles.yml +1 -1
  513. data/lib/starter_web/_data/modules/rangeSlider.yml +1 -1
  514. data/lib/starter_web/_data/modules/rtable.yml +1 -1
  515. data/lib/starter_web/_data/modules/scroller.yml +1 -1
  516. data/lib/starter_web/_data/modules/slick.yml +1 -1
  517. data/lib/starter_web/_data/modules/speak2me.yml +1 -1
  518. data/lib/starter_web/_data/modules/theme_toggler.yml +1 -1
  519. data/lib/starter_web/_data/modules/themer.yml +1 -1
  520. data/lib/starter_web/_data/modules/toccer.yml +1 -1
  521. data/lib/starter_web/_data/modules/translator.yml +1 -1
  522. data/lib/starter_web/_data/modules/waves.yml +1 -1
  523. data/lib/starter_web/_data/plugins/defaults/feed.yml +1 -1
  524. data/lib/starter_web/_data/plugins/defaults/paginator.yml +1 -1
  525. data/lib/starter_web/_data/plugins/defaults/seo-tags.yml +1 -1
  526. data/lib/starter_web/_data/plugins/defaults/sitemap.yml +1 -1
  527. data/lib/starter_web/_data/plugins/feed.yml +1 -1
  528. data/lib/starter_web/_data/plugins/paginator.yml +1 -1
  529. data/lib/starter_web/_data/plugins/seo-tags.yml +1 -1
  530. data/lib/starter_web/_data/plugins/sitemap.yml +1 -1
  531. data/lib/starter_web/_data/private.yml +1 -1
  532. data/lib/starter_web/_data/resources.yml +190 -118
  533. data/lib/starter_web/_data/templates/feed.xml +2 -2
  534. data/lib/starter_web/_data/templates/robots.txt +1 -1
  535. data/lib/starter_web/_data/templates/seo-tags.html +1 -1
  536. data/lib/starter_web/_data/templates/sitemap.xml +1 -1
  537. data/lib/starter_web/_data/utilities/defaults/util_srv.yml +1 -1
  538. data/lib/starter_web/_data/utilities/util_srv.yml +1 -1
  539. data/lib/starter_web/_includes/custom/static/bs5_accordion.html +1 -1
  540. data/lib/starter_web/_includes/custom/templates/bs5_accordion.html +1 -1
  541. data/lib/starter_web/_includes/custom/templates/collection_panel.html +1 -1
  542. data/lib/starter_web/_includes/custom/templates/custom_header.html +1 -1
  543. data/lib/starter_web/_includes/custom/templates/people_panel.html +1 -1
  544. data/lib/starter_web/_includes/google/static/google_ad__your-slot-id.html +1 -1
  545. data/lib/starter_web/_includes/google/templates/google_ads.html +1 -1
  546. data/lib/starter_web/_plugins/asciidoctor/admonition-block-answer.rb +3 -2
  547. data/lib/starter_web/_plugins/asciidoctor/admonition-block-question.rb +7 -6
  548. data/lib/starter_web/_plugins/asciidoctor/banner.rb +8 -5
  549. data/lib/starter_web/_plugins/asciidoctor/callout.rb +10 -8
  550. data/lib/starter_web/_plugins/asciidoctor/carousel-block.rb +14 -8
  551. data/lib/starter_web/_plugins/asciidoctor/conum.rb +3 -1
  552. data/lib/starter_web/_plugins/asciidoctor/dailymotion-block.rb +83 -0
  553. data/lib/starter_web/_plugins/asciidoctor/fab-icon-inline.rb +8 -5
  554. data/lib/starter_web/_plugins/asciidoctor/fas-icon-inline.rb +8 -5
  555. data/lib/starter_web/_plugins/asciidoctor/flag-icon-inline.rb +8 -5
  556. data/lib/starter_web/_plugins/asciidoctor/gallery-block.rb +50 -44
  557. data/lib/starter_web/_plugins/asciidoctor/gist-block.rb +56 -52
  558. data/lib/starter_web/_plugins/asciidoctor/google-ad-block.rb +52 -47
  559. data/lib/starter_web/_plugins/asciidoctor/iconify-icon-inline.rb +8 -5
  560. data/lib/starter_web/_plugins/asciidoctor/lightbox-block.rb +88 -82
  561. data/lib/starter_web/_plugins/asciidoctor/lorem_inline.rb +5 -4
  562. data/lib/starter_web/_plugins/asciidoctor/masonry-block.rb +13 -7
  563. data/lib/starter_web/_plugins/asciidoctor/masterslider-block.rb +54 -48
  564. data/lib/starter_web/_plugins/asciidoctor/mdi-icon-inline.rb +2 -1
  565. data/lib/starter_web/_plugins/asciidoctor/mdib-icon-inline.rb +2 -1
  566. data/lib/starter_web/_plugins/asciidoctor/mdil-icon-inline.rb +2 -1
  567. data/lib/starter_web/_plugins/asciidoctor/panel.rb +9 -5
  568. data/lib/starter_web/_plugins/asciidoctor/placeholder-inline.rb +4 -3
  569. data/lib/starter_web/_plugins/asciidoctor/range-slider-block.rb +49 -44
  570. data/lib/starter_web/_plugins/asciidoctor/shout-block.rb +6 -7
  571. data/lib/starter_web/_plugins/asciidoctor/slick-block.rb +12 -6
  572. data/lib/starter_web/_plugins/asciidoctor/textbook-block.rb +9 -5
  573. data/lib/starter_web/_plugins/asciidoctor/twitter-emoji-inline.rb +4 -1
  574. data/lib/starter_web/_plugins/asciidoctor/video-block.rb +65 -0
  575. data/lib/starter_web/_plugins/asciidoctor/videojs-block.rb +82 -0
  576. data/lib/starter_web/_plugins/asciidoctor/vimeo-block.rb +82 -0
  577. data/lib/starter_web/_plugins/asciidoctor/wistia-block.rb +87 -0
  578. data/lib/starter_web/_plugins/asciidoctor/youtube-block.rb +95 -0
  579. data/lib/starter_web/_plugins/filter/debug.rb +1 -1
  580. data/lib/starter_web/_plugins/filter/encodeBase64.rb +1 -1
  581. data/lib/starter_web/_plugins/filter/encryptAES.rb +1 -1
  582. data/lib/starter_web/_plugins/filter/filters.rb +1 -1
  583. data/lib/starter_web/_plugins/filter/liquify.rb +1 -1
  584. data/lib/starter_web/_plugins/filter/minifyJS.rb +1 -1
  585. data/lib/starter_web/_plugins/filter/minifyJSON.rb +1 -1
  586. data/lib/starter_web/_plugins/filter/prettify.rb +1 -1
  587. data/lib/starter_web/_plugins/filter/xml_prettify.rb +1 -1
  588. data/lib/starter_web/_plugins/helper/symlink_watcher.rb +1 -1
  589. data/lib/starter_web/_plugins/i18n/date.rb +1 -1
  590. data/lib/starter_web/_plugins/index/lunr.rb +2 -2
  591. data/lib/starter_web/_plugins/seo/j1-feed.rb +1 -1
  592. data/lib/starter_web/_plugins/seo/j1-seo-tags.rb +1 -1
  593. data/lib/starter_web/_plugins/seo/j1-sitemap.rb +1 -1
  594. data/lib/starter_web/assets/images/icons/videojs/videojs-logo.png +0 -0
  595. data/lib/starter_web/assets/images/icons/videojs/videojs-poster.png +0 -0
  596. data/lib/starter_web/assets/videos/gallery/_video_james_carpool_caraoke_poster.jpg +0 -0
  597. data/lib/starter_web/assets/videos/gallery/html5/video1-poster.jpg +0 -0
  598. data/lib/starter_web/assets/videos/gallery/html5/video1.subtitles.vtt +39 -0
  599. data/lib/starter_web/assets/videos/gallery/html5/video2-poster.jpg +0 -0
  600. data/lib/starter_web/assets/videos/gallery/html5/303/237video2-poster.jpg +0 -0
  601. data/lib/starter_web/assets/videos/gallery/video1-poster.1920..jpg +0 -0
  602. data/lib/starter_web/assets/videos/gallery/video_adele_last_carpool_caraoke_poster.1920.jpg +0 -0
  603. data/lib/starter_web/assets/videos/gallery/video_adele_last_carpool_caraoke_poster.jpg +0 -0
  604. data/lib/starter_web/assets/videos/gallery/video_gaga-poster.jpg +0 -0
  605. data/lib/starter_web/assets/videos/gallery/video_james_carpool_caraoke_poster.jpg +0 -0
  606. data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1.adoc.erb +1 -1
  607. data/lib/starter_web/config.ru +1 -1
  608. data/lib/starter_web/dot.gitattributes +1 -1
  609. data/lib/starter_web/dot.nojekyll +1 -1
  610. data/lib/starter_web/package.json +1 -1
  611. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/111_about_the_converter.asciidoc +5 -0
  612. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/112_getting_started.asciidoc +3 -0
  613. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/113_themes.asciidoc +1 -0
  614. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/documentation.adoc +11 -7
  615. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/documents/100_chapter.asciidoc +27 -11
  616. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/documents/200_chapter.asciidoc +3 -0
  617. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +12 -7
  618. data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +14 -7
  619. data/lib/starter_web/pages/public/features/general.adoc +12 -1
  620. data/lib/starter_web/pages/public/features/template.adoc +37 -38
  621. data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_all_books.adoc +4 -3
  622. data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_biography.adoc +2 -3
  623. data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_fantasy.adoc +2 -2
  624. data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_romance.adoc +2 -2
  625. data/lib/starter_web/pages/public/learn/bookshelf/jekyll_collections.adoc +6 -5
  626. data/lib/starter_web/pages/public/learn/roundtrip/_includes/attributes.asciidoc +1 -0
  627. data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/themes_rouge.asciidoc +4 -0
  628. data/lib/starter_web/pages/public/learn/roundtrip/asciidoc_extensions.adoc +6 -5
  629. data/lib/starter_web/pages/public/learn/roundtrip/bootstrap_themes.adoc +2 -0
  630. data/lib/starter_web/pages/public/learn/roundtrip/highlghter_rouge.adoc +7 -2
  631. data/lib/starter_web/pages/public/learn/roundtrip/icon_fonts.adoc +7 -2
  632. data/lib/starter_web/pages/public/learn/roundtrip/lunr_search.adoc +12 -3
  633. data/lib/starter_web/pages/public/learn/roundtrip/modal_extentions.adoc +4 -2
  634. data/lib/starter_web/pages/public/learn/roundtrip/present_images.adoc +84 -93
  635. data/lib/starter_web/pages/public/learn/roundtrip/present_videos.adoc +264 -64
  636. data/lib/starter_web/pages/public/learn/roundtrip/responsive_tables.adoc +5 -2
  637. data/lib/starter_web/pages/public/learn/roundtrip/typography.adoc +1 -0
  638. data/lib/starter_web/pages/public/learn/where_to_go.adoc +2 -1
  639. data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +3 -1
  640. data/lib/starter_web/pages/public/legal/en/200_impress.adoc +3 -1
  641. data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +2 -39
  642. data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +2 -2
  643. data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +3 -2
  644. data/lib/starter_web/pages/public/plans/plans.adoc +14 -5
  645. data/lib/starter_web/pages/public/tools/previewer/_includes/attributes.asciidoc +69 -0
  646. data/lib/starter_web/pages/public/tools/previewer/_includes/documents/readme +0 -0
  647. data/lib/starter_web/pages/public/tools/previewer/preview_bootstrap_theme.adoc +3093 -3104
  648. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  649. data/lib/starter_web/utilsrv/package.json +1 -1
  650. data/lib/starter_web/utilsrv/server.js +1 -1
  651. metadata +170 -94
  652. data/assets/data/galleries.json +0 -156
  653. data/assets/themes/j1/adapter/js/justifiedGalleryCustomizer.js +0 -360
  654. data/assets/themes/j1/modules/backstretch/js/v2.1.16/backstretch.js +0 -1694
  655. data/assets/themes/j1/modules/backstretch/js/v2.1.16/backstretch.min.js +0 -19
  656. data/assets/themes/j1/modules/iframeResizer/js/client/iframeResizer.contentWindow.map +0 -1
  657. data/assets/themes/j1/modules/iframeResizer/js/resizer.map +0 -1
  658. data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/css/justifiedGallery.css +0 -110
  659. data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/css/justifiedGallery.min.css +0 -110
  660. data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/css/theme/uno.css +0 -23
  661. data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/js/justifiedGallery.3.7.0.js +0 -1229
  662. data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/js/justifiedGallery.js +0 -1229
  663. data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/js/justifiedGallery.min.js +0 -8
  664. data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/less/.csslintrc +0 -20
  665. data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/less/justifiedGallery.less +0 -113
  666. data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/css/justifiedGallery.css +0 -110
  667. data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/css/justifiedGallery.min.css +0 -110
  668. data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/js/justifiedGallery.js +0 -1245
  669. data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/js/justifiedGallery.min.js +0 -7
  670. data/assets/themes/j1/modules/justifiedGallery/css/_archived/justifiedGallery.css +0 -110
  671. data/assets/themes/j1/modules/justifiedGallery/css/_archived/justifiedGallery.min.css +0 -110
  672. data/assets/themes/j1/modules/lightGallery/css/core/lg-fb-comment-box.css +0 -58
  673. data/assets/themes/j1/modules/lightGallery/css/core/lg-fb-comment-box.min.css +0 -5
  674. data/assets/themes/j1/modules/lightGallery/css/core/lg-transitions.css +0 -778
  675. data/assets/themes/j1/modules/lightGallery/css/core/lg-transitions.min.css +0 -5
  676. data/assets/themes/j1/modules/lightGallery/css/core/lightgallery.css +0 -981
  677. data/assets/themes/j1/modules/lightGallery/css/core/lightgallery.min.css +0 -5
  678. data/assets/themes/j1/modules/lightGallery/css/fonts/lg.eot +0 -0
  679. data/assets/themes/j1/modules/lightGallery/css/fonts/lg.ttf +0 -0
  680. data/assets/themes/j1/modules/lightGallery/css/fonts/lg.woff +0 -0
  681. data/assets/themes/j1/modules/lightGallery/css/themes/uno.css +0 -262
  682. data/assets/themes/j1/modules/lightGallery/css/themes/uno.min.css +0 -15
  683. data/assets/themes/j1/modules/lightGallery/js/core/j1/lightgallery.js +0 -1375
  684. data/assets/themes/j1/modules/lightGallery/js/core/j1/lightgallery.min.js +0 -5
  685. data/assets/themes/j1/modules/lightGallery/js/core/lightgallery.js +0 -1362
  686. data/assets/themes/j1/modules/lightGallery/js/core/lightgallery.min.js +0 -4
  687. data/assets/themes/j1/modules/lightGallery/js/modules/lg-autoplay.js +0 -206
  688. data/assets/themes/j1/modules/lightGallery/js/modules/lg-autoplay.min.js +0 -5
  689. data/assets/themes/j1/modules/lightGallery/js/modules/lg-fullscreen.js +0 -126
  690. data/assets/themes/j1/modules/lightGallery/js/modules/lg-fullscreen.min.js +0 -5
  691. data/assets/themes/j1/modules/lightGallery/js/modules/lg-hash.js +0 -101
  692. data/assets/themes/j1/modules/lightGallery/js/modules/lg-hash.min.js +0 -5
  693. data/assets/themes/j1/modules/lightGallery/js/modules/lg-pager.js +0 -105
  694. data/assets/themes/j1/modules/lightGallery/js/modules/lg-pager.min.js +0 -5
  695. data/assets/themes/j1/modules/lightGallery/js/modules/lg-share.js +0 -107
  696. data/assets/themes/j1/modules/lightGallery/js/modules/lg-share.min.js +0 -5
  697. data/assets/themes/j1/modules/lightGallery/js/modules/lg-thumbnail.js +0 -486
  698. data/assets/themes/j1/modules/lightGallery/js/modules/lg-thumbnail.min.js +0 -7
  699. data/assets/themes/j1/modules/lightGallery/js/modules/lg-zoom.js +0 -527
  700. data/assets/themes/j1/modules/lightGallery/js/modules/lg-zoom.min.js +0 -5
  701. data/assets/themes/j1/modules/msDropdown/js/msDropdown.min.js.map +0 -1
  702. data/assets/themes/j1/modules/popper/js/popper.min.js.map +0 -1
  703. data/assets/themes/j1/modules/rangeSlider/js/15.5.1/nouislider.js +0 -2337
  704. data/assets/themes/j1/modules/rangeSlider/js/15.5.1/nouislider.min.js +0 -1
  705. data/assets/themes/j1/modules/rangeSlider/js/9.1.0/nouislider.js +0 -2534
  706. data/assets/themes/j1/modules/slick/lightbox/js/slick-lightbox.min.js.map +0 -1
  707. data/assets/themes/j1/modules/themeSwitcher/js/_unsued/switcher.1.js +0 -454
  708. data/assets/themes/j1/modules/vimeo/froogaloop/js/froogaloop2.js +0 -4
  709. data/assets/themes/j1/modules/vimeo/froogaloop/js/froogaloop2.min.js +0 -4
  710. data/assets/themes/j1/modules/vimeo/player/js/player.js +0 -2138
  711. data/assets/themes/j1/modules/vimeo/player/js/player.js.map +0 -1
  712. data/assets/themes/j1/modules/vimeo/player/js/player.min.js +0 -2
  713. data/assets/themes/j1/modules/vimeo/player/js/player.min.js.map +0 -1
  714. data/lib/starter_web/_data/modules/justifiedGallery.yml +0 -556
  715. data/lib/starter_web/assets/videos/gallery/vk/hai.jpg +0 -0
  716. data/lib/starter_web/assets/videos/gallery/vk/otter.jpg +0 -0
  717. /data/assets/themes/j1/modules/backstretch/{LICENSE-MIT → LICENSE} +0 -0
  718. /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/animation-w.png +0 -0
  719. /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/customize-w.png +0 -0
  720. /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/dynamic-w.png +0 -0
  721. /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/facebook-icon.svg +0 -0
  722. /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/googleplus-icon.svg +0 -0
  723. /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/html5-w.png +0 -0
  724. /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/linked-in.png +0 -0
  725. /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/module-w.png +0 -0
  726. /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/play-button.png +0 -0
  727. /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/responsive-w.png +0 -0
  728. /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/thumb-w.png +0 -0
  729. /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/touch-w.png +0 -0
  730. /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/twitter-icon.svg +0 -0
  731. /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/twitter.png +0 -0
  732. /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/video1-w.png +0 -0
  733. /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/zoom-w.png +0 -0
  734. /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/zoom.png +0 -0
  735. /data/assets/themes/j1/modules/lightGallery/{css/img → images}/loading.gif +0 -0
  736. /data/assets/themes/j1/modules/lightGallery/{css/img → img}/video-play.png +0 -0
  737. /data/assets/themes/j1/modules/lightGallery/{css/img → img}/vimeo-play.png +0 -0
  738. /data/assets/themes/j1/modules/lightGallery/{css/img → img}/youtube-play.png +0 -0
  739. /data/assets/themes/j1/modules/lightGallery/js/{modules → plugins}/j1/j1-video.js +0 -0
  740. /data/assets/themes/j1/modules/lightGallery/js/{modules → plugins}/j1/j1-video.min.js +0 -0
@@ -0,0 +1,3562 @@
1
+ /*
2
+ # -----------------------------------------------------------------------------
3
+ # ~/assets/themes/j1/modules/videojs/js/vimeo/api/vimeo.js
4
+ # Vimeo Player API (modified version)
5
+ #
6
+ # Product/Info:
7
+ # https://jekyll.one
8
+ # https://github.com/vimeo/player.js
9
+ #
10
+ # Copyright (C) Vimeo 2023
11
+ # Copyright (C) 2023 Juergen Adams
12
+ #
13
+ # J1 Theme is licensed under MIT License.
14
+ # See: https://github.com/jekyll-one/J1 Theme/blob/master/LICENSE
15
+ # -----------------------------------------------------------------------------
16
+ # NOTE:
17
+ # Namespace changed from "Vimeo" to "VM" to not conflict with the
18
+ # namespace used by the VideoJS plugin which is "Vimeo" as well.
19
+ # -----------------------------------------------------------------------------
20
+ */
21
+
22
+ /*! @vimeo/player v2.20.1 | (c) 2023 Vimeo | MIT License | https://github.com/vimeo/player.js */
23
+ (function (global, factory) {
24
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
25
+ typeof define === 'function' && define.amd ? define(factory) :
26
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.VM = global.VM || {}, global.VM.Player = factory()));
27
+ }(this, (function () { 'use strict';
28
+
29
+ function ownKeys(object, enumerableOnly) {
30
+ var keys = Object.keys(object);
31
+ if (Object.getOwnPropertySymbols) {
32
+ var symbols = Object.getOwnPropertySymbols(object);
33
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
34
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
35
+ })), keys.push.apply(keys, symbols);
36
+ }
37
+ return keys;
38
+ }
39
+ function _objectSpread2(target) {
40
+ for (var i = 1; i < arguments.length; i++) {
41
+ var source = null != arguments[i] ? arguments[i] : {};
42
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
43
+ _defineProperty(target, key, source[key]);
44
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
45
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
46
+ });
47
+ }
48
+ return target;
49
+ }
50
+ function _regeneratorRuntime() {
51
+ _regeneratorRuntime = function () {
52
+ return exports;
53
+ };
54
+ var exports = {},
55
+ Op = Object.prototype,
56
+ hasOwn = Op.hasOwnProperty,
57
+ defineProperty = Object.defineProperty || function (obj, key, desc) {
58
+ obj[key] = desc.value;
59
+ },
60
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
61
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
62
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
63
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
64
+ function define(obj, key, value) {
65
+ return Object.defineProperty(obj, key, {
66
+ value: value,
67
+ enumerable: !0,
68
+ configurable: !0,
69
+ writable: !0
70
+ }), obj[key];
71
+ }
72
+ try {
73
+ define({}, "");
74
+ } catch (err) {
75
+ define = function (obj, key, value) {
76
+ return obj[key] = value;
77
+ };
78
+ }
79
+ function wrap(innerFn, outerFn, self, tryLocsList) {
80
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
81
+ generator = Object.create(protoGenerator.prototype),
82
+ context = new Context(tryLocsList || []);
83
+ return defineProperty(generator, "_invoke", {
84
+ value: makeInvokeMethod(innerFn, self, context)
85
+ }), generator;
86
+ }
87
+ function tryCatch(fn, obj, arg) {
88
+ try {
89
+ return {
90
+ type: "normal",
91
+ arg: fn.call(obj, arg)
92
+ };
93
+ } catch (err) {
94
+ return {
95
+ type: "throw",
96
+ arg: err
97
+ };
98
+ }
99
+ }
100
+ exports.wrap = wrap;
101
+ var ContinueSentinel = {};
102
+ function Generator() {}
103
+ function GeneratorFunction() {}
104
+ function GeneratorFunctionPrototype() {}
105
+ var IteratorPrototype = {};
106
+ define(IteratorPrototype, iteratorSymbol, function () {
107
+ return this;
108
+ });
109
+ var getProto = Object.getPrototypeOf,
110
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
111
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
112
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
113
+ function defineIteratorMethods(prototype) {
114
+ ["next", "throw", "return"].forEach(function (method) {
115
+ define(prototype, method, function (arg) {
116
+ return this._invoke(method, arg);
117
+ });
118
+ });
119
+ }
120
+ function AsyncIterator(generator, PromiseImpl) {
121
+ function invoke(method, arg, resolve, reject) {
122
+ var record = tryCatch(generator[method], generator, arg);
123
+ if ("throw" !== record.type) {
124
+ var result = record.arg,
125
+ value = result.value;
126
+ return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
127
+ invoke("next", value, resolve, reject);
128
+ }, function (err) {
129
+ invoke("throw", err, resolve, reject);
130
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
131
+ result.value = unwrapped, resolve(result);
132
+ }, function (error) {
133
+ return invoke("throw", error, resolve, reject);
134
+ });
135
+ }
136
+ reject(record.arg);
137
+ }
138
+ var previousPromise;
139
+ defineProperty(this, "_invoke", {
140
+ value: function (method, arg) {
141
+ function callInvokeWithMethodAndArg() {
142
+ return new PromiseImpl(function (resolve, reject) {
143
+ invoke(method, arg, resolve, reject);
144
+ });
145
+ }
146
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
147
+ }
148
+ });
149
+ }
150
+ function makeInvokeMethod(innerFn, self, context) {
151
+ var state = "suspendedStart";
152
+ return function (method, arg) {
153
+ if ("executing" === state) throw new Error("Generator is already running");
154
+ if ("completed" === state) {
155
+ if ("throw" === method) throw arg;
156
+ return doneResult();
157
+ }
158
+ for (context.method = method, context.arg = arg;;) {
159
+ var delegate = context.delegate;
160
+ if (delegate) {
161
+ var delegateResult = maybeInvokeDelegate(delegate, context);
162
+ if (delegateResult) {
163
+ if (delegateResult === ContinueSentinel) continue;
164
+ return delegateResult;
165
+ }
166
+ }
167
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
168
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
169
+ context.dispatchException(context.arg);
170
+ } else "return" === context.method && context.abrupt("return", context.arg);
171
+ state = "executing";
172
+ var record = tryCatch(innerFn, self, context);
173
+ if ("normal" === record.type) {
174
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
175
+ return {
176
+ value: record.arg,
177
+ done: context.done
178
+ };
179
+ }
180
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
181
+ }
182
+ };
183
+ }
184
+ function maybeInvokeDelegate(delegate, context) {
185
+ var methodName = context.method,
186
+ method = delegate.iterator[methodName];
187
+ if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
188
+ var record = tryCatch(method, delegate.iterator, context.arg);
189
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
190
+ var info = record.arg;
191
+ return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
192
+ }
193
+ function pushTryEntry(locs) {
194
+ var entry = {
195
+ tryLoc: locs[0]
196
+ };
197
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
198
+ }
199
+ function resetTryEntry(entry) {
200
+ var record = entry.completion || {};
201
+ record.type = "normal", delete record.arg, entry.completion = record;
202
+ }
203
+ function Context(tryLocsList) {
204
+ this.tryEntries = [{
205
+ tryLoc: "root"
206
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
207
+ }
208
+ function values(iterable) {
209
+ if (iterable) {
210
+ var iteratorMethod = iterable[iteratorSymbol];
211
+ if (iteratorMethod) return iteratorMethod.call(iterable);
212
+ if ("function" == typeof iterable.next) return iterable;
213
+ if (!isNaN(iterable.length)) {
214
+ var i = -1,
215
+ next = function next() {
216
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
217
+ return next.value = undefined, next.done = !0, next;
218
+ };
219
+ return next.next = next;
220
+ }
221
+ }
222
+ return {
223
+ next: doneResult
224
+ };
225
+ }
226
+ function doneResult() {
227
+ return {
228
+ value: undefined,
229
+ done: !0
230
+ };
231
+ }
232
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
233
+ value: GeneratorFunctionPrototype,
234
+ configurable: !0
235
+ }), defineProperty(GeneratorFunctionPrototype, "constructor", {
236
+ value: GeneratorFunction,
237
+ configurable: !0
238
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
239
+ var ctor = "function" == typeof genFun && genFun.constructor;
240
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
241
+ }, exports.mark = function (genFun) {
242
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
243
+ }, exports.awrap = function (arg) {
244
+ return {
245
+ __await: arg
246
+ };
247
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
248
+ return this;
249
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
250
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
251
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
252
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
253
+ return result.done ? result.value : iter.next();
254
+ });
255
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
256
+ return this;
257
+ }), define(Gp, "toString", function () {
258
+ return "[object Generator]";
259
+ }), exports.keys = function (val) {
260
+ var object = Object(val),
261
+ keys = [];
262
+ for (var key in object) keys.push(key);
263
+ return keys.reverse(), function next() {
264
+ for (; keys.length;) {
265
+ var key = keys.pop();
266
+ if (key in object) return next.value = key, next.done = !1, next;
267
+ }
268
+ return next.done = !0, next;
269
+ };
270
+ }, exports.values = values, Context.prototype = {
271
+ constructor: Context,
272
+ reset: function (skipTempReset) {
273
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
274
+ },
275
+ stop: function () {
276
+ this.done = !0;
277
+ var rootRecord = this.tryEntries[0].completion;
278
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
279
+ return this.rval;
280
+ },
281
+ dispatchException: function (exception) {
282
+ if (this.done) throw exception;
283
+ var context = this;
284
+ function handle(loc, caught) {
285
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
286
+ }
287
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
288
+ var entry = this.tryEntries[i],
289
+ record = entry.completion;
290
+ if ("root" === entry.tryLoc) return handle("end");
291
+ if (entry.tryLoc <= this.prev) {
292
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
293
+ hasFinally = hasOwn.call(entry, "finallyLoc");
294
+ if (hasCatch && hasFinally) {
295
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
296
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
297
+ } else if (hasCatch) {
298
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
299
+ } else {
300
+ if (!hasFinally) throw new Error("try statement without catch or finally");
301
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
302
+ }
303
+ }
304
+ }
305
+ },
306
+ abrupt: function (type, arg) {
307
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
308
+ var entry = this.tryEntries[i];
309
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
310
+ var finallyEntry = entry;
311
+ break;
312
+ }
313
+ }
314
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
315
+ var record = finallyEntry ? finallyEntry.completion : {};
316
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
317
+ },
318
+ complete: function (record, afterLoc) {
319
+ if ("throw" === record.type) throw record.arg;
320
+ return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
321
+ },
322
+ finish: function (finallyLoc) {
323
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
324
+ var entry = this.tryEntries[i];
325
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
326
+ }
327
+ },
328
+ catch: function (tryLoc) {
329
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
330
+ var entry = this.tryEntries[i];
331
+ if (entry.tryLoc === tryLoc) {
332
+ var record = entry.completion;
333
+ if ("throw" === record.type) {
334
+ var thrown = record.arg;
335
+ resetTryEntry(entry);
336
+ }
337
+ return thrown;
338
+ }
339
+ }
340
+ throw new Error("illegal catch attempt");
341
+ },
342
+ delegateYield: function (iterable, resultName, nextLoc) {
343
+ return this.delegate = {
344
+ iterator: values(iterable),
345
+ resultName: resultName,
346
+ nextLoc: nextLoc
347
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
348
+ }
349
+ }, exports;
350
+ }
351
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
352
+ try {
353
+ var info = gen[key](arg);
354
+ var value = info.value;
355
+ } catch (error) {
356
+ reject(error);
357
+ return;
358
+ }
359
+ if (info.done) {
360
+ resolve(value);
361
+ } else {
362
+ Promise.resolve(value).then(_next, _throw);
363
+ }
364
+ }
365
+ function _asyncToGenerator(fn) {
366
+ return function () {
367
+ var self = this,
368
+ args = arguments;
369
+ return new Promise(function (resolve, reject) {
370
+ var gen = fn.apply(self, args);
371
+ function _next(value) {
372
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
373
+ }
374
+ function _throw(err) {
375
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
376
+ }
377
+ _next(undefined);
378
+ });
379
+ };
380
+ }
381
+ function _classCallCheck(instance, Constructor) {
382
+ if (!(instance instanceof Constructor)) {
383
+ throw new TypeError("Cannot call a class as a function");
384
+ }
385
+ }
386
+ function _defineProperties(target, props) {
387
+ for (var i = 0; i < props.length; i++) {
388
+ var descriptor = props[i];
389
+ descriptor.enumerable = descriptor.enumerable || false;
390
+ descriptor.configurable = true;
391
+ if ("value" in descriptor) descriptor.writable = true;
392
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
393
+ }
394
+ }
395
+ function _createClass(Constructor, protoProps, staticProps) {
396
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
397
+ if (staticProps) _defineProperties(Constructor, staticProps);
398
+ Object.defineProperty(Constructor, "prototype", {
399
+ writable: false
400
+ });
401
+ return Constructor;
402
+ }
403
+ function _defineProperty(obj, key, value) {
404
+ key = _toPropertyKey(key);
405
+ if (key in obj) {
406
+ Object.defineProperty(obj, key, {
407
+ value: value,
408
+ enumerable: true,
409
+ configurable: true,
410
+ writable: true
411
+ });
412
+ } else {
413
+ obj[key] = value;
414
+ }
415
+ return obj;
416
+ }
417
+ function _inherits(subClass, superClass) {
418
+ if (typeof superClass !== "function" && superClass !== null) {
419
+ throw new TypeError("Super expression must either be null or a function");
420
+ }
421
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
422
+ constructor: {
423
+ value: subClass,
424
+ writable: true,
425
+ configurable: true
426
+ }
427
+ });
428
+ Object.defineProperty(subClass, "prototype", {
429
+ writable: false
430
+ });
431
+ if (superClass) _setPrototypeOf(subClass, superClass);
432
+ }
433
+ function _getPrototypeOf(o) {
434
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
435
+ return o.__proto__ || Object.getPrototypeOf(o);
436
+ };
437
+ return _getPrototypeOf(o);
438
+ }
439
+ function _setPrototypeOf(o, p) {
440
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
441
+ o.__proto__ = p;
442
+ return o;
443
+ };
444
+ return _setPrototypeOf(o, p);
445
+ }
446
+ function _isNativeReflectConstruct() {
447
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
448
+ if (Reflect.construct.sham) return false;
449
+ if (typeof Proxy === "function") return true;
450
+ try {
451
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
452
+ return true;
453
+ } catch (e) {
454
+ return false;
455
+ }
456
+ }
457
+ function _construct(Parent, args, Class) {
458
+ if (_isNativeReflectConstruct()) {
459
+ _construct = Reflect.construct.bind();
460
+ } else {
461
+ _construct = function _construct(Parent, args, Class) {
462
+ var a = [null];
463
+ a.push.apply(a, args);
464
+ var Constructor = Function.bind.apply(Parent, a);
465
+ var instance = new Constructor();
466
+ if (Class) _setPrototypeOf(instance, Class.prototype);
467
+ return instance;
468
+ };
469
+ }
470
+ return _construct.apply(null, arguments);
471
+ }
472
+ function _isNativeFunction(fn) {
473
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
474
+ }
475
+ function _wrapNativeSuper(Class) {
476
+ var _cache = typeof Map === "function" ? new Map() : undefined;
477
+ _wrapNativeSuper = function _wrapNativeSuper(Class) {
478
+ if (Class === null || !_isNativeFunction(Class)) return Class;
479
+ if (typeof Class !== "function") {
480
+ throw new TypeError("Super expression must either be null or a function");
481
+ }
482
+ if (typeof _cache !== "undefined") {
483
+ if (_cache.has(Class)) return _cache.get(Class);
484
+ _cache.set(Class, Wrapper);
485
+ }
486
+ function Wrapper() {
487
+ return _construct(Class, arguments, _getPrototypeOf(this).constructor);
488
+ }
489
+ Wrapper.prototype = Object.create(Class.prototype, {
490
+ constructor: {
491
+ value: Wrapper,
492
+ enumerable: false,
493
+ writable: true,
494
+ configurable: true
495
+ }
496
+ });
497
+ return _setPrototypeOf(Wrapper, Class);
498
+ };
499
+ return _wrapNativeSuper(Class);
500
+ }
501
+ function _assertThisInitialized(self) {
502
+ if (self === void 0) {
503
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
504
+ }
505
+ return self;
506
+ }
507
+ function _possibleConstructorReturn(self, call) {
508
+ if (call && (typeof call === "object" || typeof call === "function")) {
509
+ return call;
510
+ } else if (call !== void 0) {
511
+ throw new TypeError("Derived constructors may only return object or undefined");
512
+ }
513
+ return _assertThisInitialized(self);
514
+ }
515
+ function _createSuper(Derived) {
516
+ var hasNativeReflectConstruct = _isNativeReflectConstruct();
517
+ return function _createSuperInternal() {
518
+ var Super = _getPrototypeOf(Derived),
519
+ result;
520
+ if (hasNativeReflectConstruct) {
521
+ var NewTarget = _getPrototypeOf(this).constructor;
522
+ result = Reflect.construct(Super, arguments, NewTarget);
523
+ } else {
524
+ result = Super.apply(this, arguments);
525
+ }
526
+ return _possibleConstructorReturn(this, result);
527
+ };
528
+ }
529
+ function _toPrimitive(input, hint) {
530
+ if (typeof input !== "object" || input === null) return input;
531
+ var prim = input[Symbol.toPrimitive];
532
+ if (prim !== undefined) {
533
+ var res = prim.call(input, hint || "default");
534
+ if (typeof res !== "object") return res;
535
+ throw new TypeError("@@toPrimitive must return a primitive value.");
536
+ }
537
+ return (hint === "string" ? String : Number)(input);
538
+ }
539
+ function _toPropertyKey(arg) {
540
+ var key = _toPrimitive(arg, "string");
541
+ return typeof key === "symbol" ? key : String(key);
542
+ }
543
+
544
+ /**
545
+ * @module lib/functions
546
+ */
547
+
548
+ /**
549
+ * Check to see this is a node environment.
550
+ * @type {Boolean}
551
+ */
552
+ /* global global */
553
+ var isNode = typeof global !== 'undefined' && {}.toString.call(global) === '[object global]';
554
+
555
+ /**
556
+ * Get the name of the method for a given getter or setter.
557
+ *
558
+ * @param {string} prop The name of the property.
559
+ * @param {string} type Either “get” or “set”.
560
+ * @return {string}
561
+ */
562
+ function getMethodName(prop, type) {
563
+ if (prop.indexOf(type.toLowerCase()) === 0) {
564
+ return prop;
565
+ }
566
+ return "".concat(type.toLowerCase()).concat(prop.substr(0, 1).toUpperCase()).concat(prop.substr(1));
567
+ }
568
+
569
+ /**
570
+ * Check to see if the object is a DOM Element.
571
+ *
572
+ * @param {*} element The object to check.
573
+ * @return {boolean}
574
+ */
575
+ function isDomElement(element) {
576
+ return Boolean(element && element.nodeType === 1 && 'nodeName' in element && element.ownerDocument && element.ownerDocument.defaultView);
577
+ }
578
+
579
+ /**
580
+ * Check to see whether the value is a number.
581
+ *
582
+ * @see http://dl.dropboxusercontent.com/u/35146/js/tests/isNumber.html
583
+ * @param {*} value The value to check.
584
+ * @param {boolean} integer Check if the value is an integer.
585
+ * @return {boolean}
586
+ */
587
+ function isInteger(value) {
588
+ // eslint-disable-next-line eqeqeq
589
+ return !isNaN(parseFloat(value)) && isFinite(value) && Math.floor(value) == value;
590
+ }
591
+
592
+ /**
593
+ * Check to see if the URL is a Vimeo url.
594
+ *
595
+ * @param {string} url The url string.
596
+ * @return {boolean}
597
+ */
598
+ function isVimeoUrl(url) {
599
+ return /^(https?:)?\/\/((player|www)\.)?vimeo\.com(?=$|\/)/.test(url);
600
+ }
601
+
602
+ /**
603
+ * Check to see if the URL is for a Vimeo embed.
604
+ *
605
+ * @param {string} url The url string.
606
+ * @return {boolean}
607
+ */
608
+ function isVimeoEmbed(url) {
609
+ var expr = /^https:\/\/player\.vimeo\.com\/video\/\d+/;
610
+ return expr.test(url);
611
+ }
612
+
613
+ /**
614
+ * Get the Vimeo URL from an element.
615
+ * The element must have either a data-vimeo-id or data-vimeo-url attribute.
616
+ *
617
+ * @param {object} oEmbedParameters The oEmbed parameters.
618
+ * @return {string}
619
+ */
620
+ function getVimeoUrl() {
621
+ var oEmbedParameters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
622
+ var id = oEmbedParameters.id;
623
+ var url = oEmbedParameters.url;
624
+ var idOrUrl = id || url;
625
+ if (!idOrUrl) {
626
+ throw new Error('An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.');
627
+ }
628
+ if (isInteger(idOrUrl)) {
629
+ return "https://vimeo.com/".concat(idOrUrl);
630
+ }
631
+ if (isVimeoUrl(idOrUrl)) {
632
+ return idOrUrl.replace('http:', 'https:');
633
+ }
634
+ if (id) {
635
+ throw new TypeError("\u201C".concat(id, "\u201D is not a valid video id."));
636
+ }
637
+ throw new TypeError("\u201C".concat(idOrUrl, "\u201D is not a vimeo.com url."));
638
+ }
639
+
640
+ /* eslint-disable max-params */
641
+ /**
642
+ * A utility method for attaching and detaching event handlers
643
+ *
644
+ * @param {EventTarget} target
645
+ * @param {string | string[]} eventName
646
+ * @param {function} callback
647
+ * @param {'addEventListener' | 'on'} onName
648
+ * @param {'removeEventListener' | 'off'} offName
649
+ * @return {{cancel: (function(): void)}}
650
+ */
651
+ var subscribe = function subscribe(target, eventName, callback) {
652
+ var onName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'addEventListener';
653
+ var offName = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'removeEventListener';
654
+ var eventNames = typeof eventName === 'string' ? [eventName] : eventName;
655
+ eventNames.forEach(function (evName) {
656
+ target[onName](evName, callback);
657
+ });
658
+ return {
659
+ cancel: function cancel() {
660
+ return eventNames.forEach(function (evName) {
661
+ return target[offName](evName, callback);
662
+ });
663
+ }
664
+ };
665
+ };
666
+
667
+ var arrayIndexOfSupport = typeof Array.prototype.indexOf !== 'undefined';
668
+ var postMessageSupport = typeof window !== 'undefined' && typeof window.postMessage !== 'undefined';
669
+ if (!isNode && (!arrayIndexOfSupport || !postMessageSupport)) {
670
+ throw new Error('Sorry, the Vimeo Player API is not available in this browser.');
671
+ }
672
+
673
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
674
+
675
+ function createCommonjsModule(fn, module) {
676
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
677
+ }
678
+
679
+ /*!
680
+ * weakmap-polyfill v2.0.4 - ECMAScript6 WeakMap polyfill
681
+ * https://github.com/polygonplanet/weakmap-polyfill
682
+ * Copyright (c) 2015-2021 polygonplanet <polygon.planet.aqua@gmail.com>
683
+ * @license MIT
684
+ */
685
+
686
+ (function (self) {
687
+
688
+ if (self.WeakMap) {
689
+ return;
690
+ }
691
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
692
+ var hasDefine = Object.defineProperty && function () {
693
+ try {
694
+ // Avoid IE8's broken Object.defineProperty
695
+ return Object.defineProperty({}, 'x', {
696
+ value: 1
697
+ }).x === 1;
698
+ } catch (e) {}
699
+ }();
700
+ var defineProperty = function (object, name, value) {
701
+ if (hasDefine) {
702
+ Object.defineProperty(object, name, {
703
+ configurable: true,
704
+ writable: true,
705
+ value: value
706
+ });
707
+ } else {
708
+ object[name] = value;
709
+ }
710
+ };
711
+ self.WeakMap = function () {
712
+ // ECMA-262 23.3 WeakMap Objects
713
+ function WeakMap() {
714
+ if (this === void 0) {
715
+ throw new TypeError("Constructor WeakMap requires 'new'");
716
+ }
717
+ defineProperty(this, '_id', genId('_WeakMap'));
718
+
719
+ // ECMA-262 23.3.1.1 WeakMap([iterable])
720
+ if (arguments.length > 0) {
721
+ // Currently, WeakMap `iterable` argument is not supported
722
+ throw new TypeError('WeakMap iterable is not supported');
723
+ }
724
+ }
725
+
726
+ // ECMA-262 23.3.3.2 WeakMap.prototype.delete(key)
727
+ defineProperty(WeakMap.prototype, 'delete', function (key) {
728
+ checkInstance(this, 'delete');
729
+ if (!isObject(key)) {
730
+ return false;
731
+ }
732
+ var entry = key[this._id];
733
+ if (entry && entry[0] === key) {
734
+ delete key[this._id];
735
+ return true;
736
+ }
737
+ return false;
738
+ });
739
+
740
+ // ECMA-262 23.3.3.3 WeakMap.prototype.get(key)
741
+ defineProperty(WeakMap.prototype, 'get', function (key) {
742
+ checkInstance(this, 'get');
743
+ if (!isObject(key)) {
744
+ return void 0;
745
+ }
746
+ var entry = key[this._id];
747
+ if (entry && entry[0] === key) {
748
+ return entry[1];
749
+ }
750
+ return void 0;
751
+ });
752
+
753
+ // ECMA-262 23.3.3.4 WeakMap.prototype.has(key)
754
+ defineProperty(WeakMap.prototype, 'has', function (key) {
755
+ checkInstance(this, 'has');
756
+ if (!isObject(key)) {
757
+ return false;
758
+ }
759
+ var entry = key[this._id];
760
+ if (entry && entry[0] === key) {
761
+ return true;
762
+ }
763
+ return false;
764
+ });
765
+
766
+ // ECMA-262 23.3.3.5 WeakMap.prototype.set(key, value)
767
+ defineProperty(WeakMap.prototype, 'set', function (key, value) {
768
+ checkInstance(this, 'set');
769
+ if (!isObject(key)) {
770
+ throw new TypeError('Invalid value used as weak map key');
771
+ }
772
+ var entry = key[this._id];
773
+ if (entry && entry[0] === key) {
774
+ entry[1] = value;
775
+ return this;
776
+ }
777
+ defineProperty(key, this._id, [key, value]);
778
+ return this;
779
+ });
780
+ function checkInstance(x, methodName) {
781
+ if (!isObject(x) || !hasOwnProperty.call(x, '_id')) {
782
+ throw new TypeError(methodName + ' method called on incompatible receiver ' + typeof x);
783
+ }
784
+ }
785
+ function genId(prefix) {
786
+ return prefix + '_' + rand() + '.' + rand();
787
+ }
788
+ function rand() {
789
+ return Math.random().toString().substring(2);
790
+ }
791
+ defineProperty(WeakMap, '_polyfill', true);
792
+ return WeakMap;
793
+ }();
794
+ function isObject(x) {
795
+ return Object(x) === x;
796
+ }
797
+ })(typeof globalThis !== 'undefined' ? globalThis : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof commonjsGlobal !== 'undefined' ? commonjsGlobal : commonjsGlobal);
798
+
799
+ var npo_src = createCommonjsModule(function (module) {
800
+ /*! Native Promise Only
801
+ v0.8.1 (c) Kyle Simpson
802
+ MIT License: http://getify.mit-license.org
803
+ */
804
+
805
+ (function UMD(name, context, definition) {
806
+ // special form of UMD for polyfilling across evironments
807
+ context[name] = context[name] || definition();
808
+ if ( module.exports) {
809
+ module.exports = context[name];
810
+ }
811
+ })("Promise", typeof commonjsGlobal != "undefined" ? commonjsGlobal : commonjsGlobal, function DEF() {
812
+
813
+ var builtInProp,
814
+ cycle,
815
+ scheduling_queue,
816
+ ToString = Object.prototype.toString,
817
+ timer = typeof setImmediate != "undefined" ? function timer(fn) {
818
+ return setImmediate(fn);
819
+ } : setTimeout;
820
+
821
+ // dammit, IE8.
822
+ try {
823
+ Object.defineProperty({}, "x", {});
824
+ builtInProp = function builtInProp(obj, name, val, config) {
825
+ return Object.defineProperty(obj, name, {
826
+ value: val,
827
+ writable: true,
828
+ configurable: config !== false
829
+ });
830
+ };
831
+ } catch (err) {
832
+ builtInProp = function builtInProp(obj, name, val) {
833
+ obj[name] = val;
834
+ return obj;
835
+ };
836
+ }
837
+
838
+ // Note: using a queue instead of array for efficiency
839
+ scheduling_queue = function Queue() {
840
+ var first, last, item;
841
+ function Item(fn, self) {
842
+ this.fn = fn;
843
+ this.self = self;
844
+ this.next = void 0;
845
+ }
846
+ return {
847
+ add: function add(fn, self) {
848
+ item = new Item(fn, self);
849
+ if (last) {
850
+ last.next = item;
851
+ } else {
852
+ first = item;
853
+ }
854
+ last = item;
855
+ item = void 0;
856
+ },
857
+ drain: function drain() {
858
+ var f = first;
859
+ first = last = cycle = void 0;
860
+ while (f) {
861
+ f.fn.call(f.self);
862
+ f = f.next;
863
+ }
864
+ }
865
+ };
866
+ }();
867
+ function schedule(fn, self) {
868
+ scheduling_queue.add(fn, self);
869
+ if (!cycle) {
870
+ cycle = timer(scheduling_queue.drain);
871
+ }
872
+ }
873
+
874
+ // promise duck typing
875
+ function isThenable(o) {
876
+ var _then,
877
+ o_type = typeof o;
878
+ if (o != null && (o_type == "object" || o_type == "function")) {
879
+ _then = o.then;
880
+ }
881
+ return typeof _then == "function" ? _then : false;
882
+ }
883
+ function notify() {
884
+ for (var i = 0; i < this.chain.length; i++) {
885
+ notifyIsolated(this, this.state === 1 ? this.chain[i].success : this.chain[i].failure, this.chain[i]);
886
+ }
887
+ this.chain.length = 0;
888
+ }
889
+
890
+ // NOTE: This is a separate function to isolate
891
+ // the `try..catch` so that other code can be
892
+ // optimized better
893
+ function notifyIsolated(self, cb, chain) {
894
+ var ret, _then;
895
+ try {
896
+ if (cb === false) {
897
+ chain.reject(self.msg);
898
+ } else {
899
+ if (cb === true) {
900
+ ret = self.msg;
901
+ } else {
902
+ ret = cb.call(void 0, self.msg);
903
+ }
904
+ if (ret === chain.promise) {
905
+ chain.reject(TypeError("Promise-chain cycle"));
906
+ } else if (_then = isThenable(ret)) {
907
+ _then.call(ret, chain.resolve, chain.reject);
908
+ } else {
909
+ chain.resolve(ret);
910
+ }
911
+ }
912
+ } catch (err) {
913
+ chain.reject(err);
914
+ }
915
+ }
916
+ function resolve(msg) {
917
+ var _then,
918
+ self = this;
919
+
920
+ // already triggered?
921
+ if (self.triggered) {
922
+ return;
923
+ }
924
+ self.triggered = true;
925
+
926
+ // unwrap
927
+ if (self.def) {
928
+ self = self.def;
929
+ }
930
+ try {
931
+ if (_then = isThenable(msg)) {
932
+ schedule(function () {
933
+ var def_wrapper = new MakeDefWrapper(self);
934
+ try {
935
+ _then.call(msg, function $resolve$() {
936
+ resolve.apply(def_wrapper, arguments);
937
+ }, function $reject$() {
938
+ reject.apply(def_wrapper, arguments);
939
+ });
940
+ } catch (err) {
941
+ reject.call(def_wrapper, err);
942
+ }
943
+ });
944
+ } else {
945
+ self.msg = msg;
946
+ self.state = 1;
947
+ if (self.chain.length > 0) {
948
+ schedule(notify, self);
949
+ }
950
+ }
951
+ } catch (err) {
952
+ reject.call(new MakeDefWrapper(self), err);
953
+ }
954
+ }
955
+ function reject(msg) {
956
+ var self = this;
957
+
958
+ // already triggered?
959
+ if (self.triggered) {
960
+ return;
961
+ }
962
+ self.triggered = true;
963
+
964
+ // unwrap
965
+ if (self.def) {
966
+ self = self.def;
967
+ }
968
+ self.msg = msg;
969
+ self.state = 2;
970
+ if (self.chain.length > 0) {
971
+ schedule(notify, self);
972
+ }
973
+ }
974
+ function iteratePromises(Constructor, arr, resolver, rejecter) {
975
+ for (var idx = 0; idx < arr.length; idx++) {
976
+ (function IIFE(idx) {
977
+ Constructor.resolve(arr[idx]).then(function $resolver$(msg) {
978
+ resolver(idx, msg);
979
+ }, rejecter);
980
+ })(idx);
981
+ }
982
+ }
983
+ function MakeDefWrapper(self) {
984
+ this.def = self;
985
+ this.triggered = false;
986
+ }
987
+ function MakeDef(self) {
988
+ this.promise = self;
989
+ this.state = 0;
990
+ this.triggered = false;
991
+ this.chain = [];
992
+ this.msg = void 0;
993
+ }
994
+ function Promise(executor) {
995
+ if (typeof executor != "function") {
996
+ throw TypeError("Not a function");
997
+ }
998
+ if (this.__NPO__ !== 0) {
999
+ throw TypeError("Not a promise");
1000
+ }
1001
+
1002
+ // instance shadowing the inherited "brand"
1003
+ // to signal an already "initialized" promise
1004
+ this.__NPO__ = 1;
1005
+ var def = new MakeDef(this);
1006
+ this["then"] = function then(success, failure) {
1007
+ var o = {
1008
+ success: typeof success == "function" ? success : true,
1009
+ failure: typeof failure == "function" ? failure : false
1010
+ };
1011
+ // Note: `then(..)` itself can be borrowed to be used against
1012
+ // a different promise constructor for making the chained promise,
1013
+ // by substituting a different `this` binding.
1014
+ o.promise = new this.constructor(function extractChain(resolve, reject) {
1015
+ if (typeof resolve != "function" || typeof reject != "function") {
1016
+ throw TypeError("Not a function");
1017
+ }
1018
+ o.resolve = resolve;
1019
+ o.reject = reject;
1020
+ });
1021
+ def.chain.push(o);
1022
+ if (def.state !== 0) {
1023
+ schedule(notify, def);
1024
+ }
1025
+ return o.promise;
1026
+ };
1027
+ this["catch"] = function $catch$(failure) {
1028
+ return this.then(void 0, failure);
1029
+ };
1030
+ try {
1031
+ executor.call(void 0, function publicResolve(msg) {
1032
+ resolve.call(def, msg);
1033
+ }, function publicReject(msg) {
1034
+ reject.call(def, msg);
1035
+ });
1036
+ } catch (err) {
1037
+ reject.call(def, err);
1038
+ }
1039
+ }
1040
+ var PromisePrototype = builtInProp({}, "constructor", Promise, /*configurable=*/false);
1041
+
1042
+ // Note: Android 4 cannot use `Object.defineProperty(..)` here
1043
+ Promise.prototype = PromisePrototype;
1044
+
1045
+ // built-in "brand" to signal an "uninitialized" promise
1046
+ builtInProp(PromisePrototype, "__NPO__", 0, /*configurable=*/false);
1047
+ builtInProp(Promise, "resolve", function Promise$resolve(msg) {
1048
+ var Constructor = this;
1049
+
1050
+ // spec mandated checks
1051
+ // note: best "isPromise" check that's practical for now
1052
+ if (msg && typeof msg == "object" && msg.__NPO__ === 1) {
1053
+ return msg;
1054
+ }
1055
+ return new Constructor(function executor(resolve, reject) {
1056
+ if (typeof resolve != "function" || typeof reject != "function") {
1057
+ throw TypeError("Not a function");
1058
+ }
1059
+ resolve(msg);
1060
+ });
1061
+ });
1062
+ builtInProp(Promise, "reject", function Promise$reject(msg) {
1063
+ return new this(function executor(resolve, reject) {
1064
+ if (typeof resolve != "function" || typeof reject != "function") {
1065
+ throw TypeError("Not a function");
1066
+ }
1067
+ reject(msg);
1068
+ });
1069
+ });
1070
+ builtInProp(Promise, "all", function Promise$all(arr) {
1071
+ var Constructor = this;
1072
+
1073
+ // spec mandated checks
1074
+ if (ToString.call(arr) != "[object Array]") {
1075
+ return Constructor.reject(TypeError("Not an array"));
1076
+ }
1077
+ if (arr.length === 0) {
1078
+ return Constructor.resolve([]);
1079
+ }
1080
+ return new Constructor(function executor(resolve, reject) {
1081
+ if (typeof resolve != "function" || typeof reject != "function") {
1082
+ throw TypeError("Not a function");
1083
+ }
1084
+ var len = arr.length,
1085
+ msgs = Array(len),
1086
+ count = 0;
1087
+ iteratePromises(Constructor, arr, function resolver(idx, msg) {
1088
+ msgs[idx] = msg;
1089
+ if (++count === len) {
1090
+ resolve(msgs);
1091
+ }
1092
+ }, reject);
1093
+ });
1094
+ });
1095
+ builtInProp(Promise, "race", function Promise$race(arr) {
1096
+ var Constructor = this;
1097
+
1098
+ // spec mandated checks
1099
+ if (ToString.call(arr) != "[object Array]") {
1100
+ return Constructor.reject(TypeError("Not an array"));
1101
+ }
1102
+ return new Constructor(function executor(resolve, reject) {
1103
+ if (typeof resolve != "function" || typeof reject != "function") {
1104
+ throw TypeError("Not a function");
1105
+ }
1106
+ iteratePromises(Constructor, arr, function resolver(idx, msg) {
1107
+ resolve(msg);
1108
+ }, reject);
1109
+ });
1110
+ });
1111
+ return Promise;
1112
+ });
1113
+ });
1114
+
1115
+ /**
1116
+ * @module lib/callbacks
1117
+ */
1118
+
1119
+ var callbackMap = new WeakMap();
1120
+
1121
+ /**
1122
+ * Store a callback for a method or event for a player.
1123
+ *
1124
+ * @param {Player} player The player object.
1125
+ * @param {string} name The method or event name.
1126
+ * @param {(function(this:Player, *): void|{resolve: function, reject: function})} callback
1127
+ * The callback to call or an object with resolve and reject functions for a promise.
1128
+ * @return {void}
1129
+ */
1130
+ function storeCallback(player, name, callback) {
1131
+ var playerCallbacks = callbackMap.get(player.element) || {};
1132
+ if (!(name in playerCallbacks)) {
1133
+ playerCallbacks[name] = [];
1134
+ }
1135
+ playerCallbacks[name].push(callback);
1136
+ callbackMap.set(player.element, playerCallbacks);
1137
+ }
1138
+
1139
+ /**
1140
+ * Get the callbacks for a player and event or method.
1141
+ *
1142
+ * @param {Player} player The player object.
1143
+ * @param {string} name The method or event name
1144
+ * @return {function[]}
1145
+ */
1146
+ function getCallbacks(player, name) {
1147
+ var playerCallbacks = callbackMap.get(player.element) || {};
1148
+ return playerCallbacks[name] || [];
1149
+ }
1150
+
1151
+ /**
1152
+ * Remove a stored callback for a method or event for a player.
1153
+ *
1154
+ * @param {Player} player The player object.
1155
+ * @param {string} name The method or event name
1156
+ * @param {function} [callback] The specific callback to remove.
1157
+ * @return {boolean} Was this the last callback?
1158
+ */
1159
+ function removeCallback(player, name, callback) {
1160
+ var playerCallbacks = callbackMap.get(player.element) || {};
1161
+ if (!playerCallbacks[name]) {
1162
+ return true;
1163
+ }
1164
+
1165
+ // If no callback is passed, remove all callbacks for the event
1166
+ if (!callback) {
1167
+ playerCallbacks[name] = [];
1168
+ callbackMap.set(player.element, playerCallbacks);
1169
+ return true;
1170
+ }
1171
+ var index = playerCallbacks[name].indexOf(callback);
1172
+ if (index !== -1) {
1173
+ playerCallbacks[name].splice(index, 1);
1174
+ }
1175
+ callbackMap.set(player.element, playerCallbacks);
1176
+ return playerCallbacks[name] && playerCallbacks[name].length === 0;
1177
+ }
1178
+
1179
+ /**
1180
+ * Return the first stored callback for a player and event or method.
1181
+ *
1182
+ * @param {Player} player The player object.
1183
+ * @param {string} name The method or event name.
1184
+ * @return {function} The callback, or false if there were none
1185
+ */
1186
+ function shiftCallbacks(player, name) {
1187
+ var playerCallbacks = getCallbacks(player, name);
1188
+ if (playerCallbacks.length < 1) {
1189
+ return false;
1190
+ }
1191
+ var callback = playerCallbacks.shift();
1192
+ removeCallback(player, name, callback);
1193
+ return callback;
1194
+ }
1195
+
1196
+ /**
1197
+ * Move callbacks associated with an element to another element.
1198
+ *
1199
+ * @param {HTMLElement} oldElement The old element.
1200
+ * @param {HTMLElement} newElement The new element.
1201
+ * @return {void}
1202
+ */
1203
+ function swapCallbacks(oldElement, newElement) {
1204
+ var playerCallbacks = callbackMap.get(oldElement);
1205
+ callbackMap.set(newElement, playerCallbacks);
1206
+ callbackMap.delete(oldElement);
1207
+ }
1208
+
1209
+ /**
1210
+ * @module lib/postmessage
1211
+ */
1212
+
1213
+ /**
1214
+ * Parse a message received from postMessage.
1215
+ *
1216
+ * @param {*} data The data received from postMessage.
1217
+ * @return {object}
1218
+ */
1219
+ function parseMessageData(data) {
1220
+ if (typeof data === 'string') {
1221
+ try {
1222
+ data = JSON.parse(data);
1223
+ } catch (error) {
1224
+ // If the message cannot be parsed, throw the error as a warning
1225
+ console.warn(error);
1226
+ return {};
1227
+ }
1228
+ }
1229
+ return data;
1230
+ }
1231
+
1232
+ /**
1233
+ * Post a message to the specified target.
1234
+ *
1235
+ * @param {Player} player The player object to use.
1236
+ * @param {string} method The API method to call.
1237
+ * @param {object} params The parameters to send to the player.
1238
+ * @return {void}
1239
+ */
1240
+ function postMessage(player, method, params) {
1241
+ if (!player.element.contentWindow || !player.element.contentWindow.postMessage) {
1242
+ return;
1243
+ }
1244
+ var message = {
1245
+ method: method
1246
+ };
1247
+ if (params !== undefined) {
1248
+ message.value = params;
1249
+ }
1250
+
1251
+ // IE 8 and 9 do not support passing messages, so stringify them
1252
+ var ieVersion = parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/, '$1'));
1253
+ if (ieVersion >= 8 && ieVersion < 10) {
1254
+ message = JSON.stringify(message);
1255
+ }
1256
+ player.element.contentWindow.postMessage(message, player.origin);
1257
+ }
1258
+
1259
+ /**
1260
+ * Parse the data received from a message event.
1261
+ *
1262
+ * @param {Player} player The player that received the message.
1263
+ * @param {(Object|string)} data The message data. Strings will be parsed into JSON.
1264
+ * @return {void}
1265
+ */
1266
+ function processData(player, data) {
1267
+ data = parseMessageData(data);
1268
+ var callbacks = [];
1269
+ var param;
1270
+ if (data.event) {
1271
+ if (data.event === 'error') {
1272
+ var promises = getCallbacks(player, data.data.method);
1273
+ promises.forEach(function (promise) {
1274
+ var error = new Error(data.data.message);
1275
+ error.name = data.data.name;
1276
+ promise.reject(error);
1277
+ removeCallback(player, data.data.method, promise);
1278
+ });
1279
+ }
1280
+ callbacks = getCallbacks(player, "event:".concat(data.event));
1281
+ param = data.data;
1282
+ } else if (data.method) {
1283
+ var callback = shiftCallbacks(player, data.method);
1284
+ if (callback) {
1285
+ callbacks.push(callback);
1286
+ param = data.value;
1287
+ }
1288
+ }
1289
+ callbacks.forEach(function (callback) {
1290
+ try {
1291
+ if (typeof callback === 'function') {
1292
+ callback.call(player, param);
1293
+ return;
1294
+ }
1295
+ callback.resolve(param);
1296
+ } catch (e) {
1297
+ // empty
1298
+ }
1299
+ });
1300
+ }
1301
+
1302
+ /**
1303
+ * @module lib/embed
1304
+ */
1305
+ var oEmbedParameters = ['autopause', 'autoplay', 'background', 'byline', 'color', 'colors', 'controls', 'dnt', 'height', 'id', 'interactive_params', 'keyboard', 'loop', 'maxheight', 'maxwidth', 'muted', 'playsinline', 'portrait', 'responsive', 'speed', 'texttrack', 'title', 'transparent', 'url', 'width'];
1306
+
1307
+ /**
1308
+ * Get the 'data-vimeo'-prefixed attributes from an element as an object.
1309
+ *
1310
+ * @param {HTMLElement} element The element.
1311
+ * @param {Object} [defaults={}] The default values to use.
1312
+ * @return {Object<string, string>}
1313
+ */
1314
+ function getOEmbedParameters(element) {
1315
+ var defaults = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1316
+ return oEmbedParameters.reduce(function (params, param) {
1317
+ var value = element.getAttribute("data-vimeo-".concat(param));
1318
+ if (value || value === '') {
1319
+ params[param] = value === '' ? 1 : value;
1320
+ }
1321
+ return params;
1322
+ }, defaults);
1323
+ }
1324
+
1325
+ /**
1326
+ * Create an embed from oEmbed data inside an element.
1327
+ *
1328
+ * @param {object} data The oEmbed data.
1329
+ * @param {HTMLElement} element The element to put the iframe in.
1330
+ * @return {HTMLIFrameElement} The iframe embed.
1331
+ */
1332
+ function createEmbed(_ref, element) {
1333
+ var html = _ref.html;
1334
+ if (!element) {
1335
+ throw new TypeError('An element must be provided');
1336
+ }
1337
+ if (element.getAttribute('data-vimeo-initialized') !== null) {
1338
+ return element.querySelector('iframe');
1339
+ }
1340
+ var div = document.createElement('div');
1341
+ div.innerHTML = html;
1342
+ element.appendChild(div.firstChild);
1343
+ element.setAttribute('data-vimeo-initialized', 'true');
1344
+ return element.querySelector('iframe');
1345
+ }
1346
+
1347
+ /**
1348
+ * Make an oEmbed call for the specified URL.
1349
+ *
1350
+ * @param {string} videoUrl The vimeo.com url for the video.
1351
+ * @param {Object} [params] Parameters to pass to oEmbed.
1352
+ * @param {HTMLElement} element The element.
1353
+ * @return {Promise}
1354
+ */
1355
+ function getOEmbedData(videoUrl) {
1356
+ var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1357
+ var element = arguments.length > 2 ? arguments[2] : undefined;
1358
+ return new Promise(function (resolve, reject) {
1359
+ if (!isVimeoUrl(videoUrl)) {
1360
+ throw new TypeError("\u201C".concat(videoUrl, "\u201D is not a vimeo.com url."));
1361
+ }
1362
+ var url = "https://vimeo.com/api/oembed.json?url=".concat(encodeURIComponent(videoUrl));
1363
+ for (var param in params) {
1364
+ if (params.hasOwnProperty(param)) {
1365
+ url += "&".concat(param, "=").concat(encodeURIComponent(params[param]));
1366
+ }
1367
+ }
1368
+ var xhr = 'XDomainRequest' in window ? new XDomainRequest() : new XMLHttpRequest();
1369
+ xhr.open('GET', url, true);
1370
+ xhr.onload = function () {
1371
+ if (xhr.status === 404) {
1372
+ reject(new Error("\u201C".concat(videoUrl, "\u201D was not found.")));
1373
+ return;
1374
+ }
1375
+ if (xhr.status === 403) {
1376
+ reject(new Error("\u201C".concat(videoUrl, "\u201D is not embeddable.")));
1377
+ return;
1378
+ }
1379
+ try {
1380
+ var json = JSON.parse(xhr.responseText);
1381
+ // Check api response for 403 on oembed
1382
+ if (json.domain_status_code === 403) {
1383
+ // We still want to create the embed to give users visual feedback
1384
+ createEmbed(json, element);
1385
+ reject(new Error("\u201C".concat(videoUrl, "\u201D is not embeddable.")));
1386
+ return;
1387
+ }
1388
+ resolve(json);
1389
+ } catch (error) {
1390
+ reject(error);
1391
+ }
1392
+ };
1393
+ xhr.onerror = function () {
1394
+ var status = xhr.status ? " (".concat(xhr.status, ")") : '';
1395
+ reject(new Error("There was an error fetching the embed code from Vimeo".concat(status, ".")));
1396
+ };
1397
+ xhr.send();
1398
+ });
1399
+ }
1400
+
1401
+ /**
1402
+ * Initialize all embeds within a specific element
1403
+ *
1404
+ * @param {HTMLElement} [parent=document] The parent element.
1405
+ * @return {void}
1406
+ */
1407
+ function initializeEmbeds() {
1408
+ var parent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;
1409
+ var elements = [].slice.call(parent.querySelectorAll('[data-vimeo-id], [data-vimeo-url]'));
1410
+ var handleError = function handleError(error) {
1411
+ if ('console' in window && console.error) {
1412
+ console.error("There was an error creating an embed: ".concat(error));
1413
+ }
1414
+ };
1415
+ elements.forEach(function (element) {
1416
+ try {
1417
+ // Skip any that have data-vimeo-defer
1418
+ if (element.getAttribute('data-vimeo-defer') !== null) {
1419
+ return;
1420
+ }
1421
+ var params = getOEmbedParameters(element);
1422
+ var url = getVimeoUrl(params);
1423
+ getOEmbedData(url, params, element).then(function (data) {
1424
+ return createEmbed(data, element);
1425
+ }).catch(handleError);
1426
+ } catch (error) {
1427
+ handleError(error);
1428
+ }
1429
+ });
1430
+ }
1431
+
1432
+ /**
1433
+ * Resize embeds when messaged by the player.
1434
+ *
1435
+ * @param {HTMLElement} [parent=document] The parent element.
1436
+ * @return {void}
1437
+ */
1438
+ function resizeEmbeds() {
1439
+ var parent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;
1440
+ // Prevent execution if users include the player.js script multiple times.
1441
+ if (window.VimeoPlayerResizeEmbeds_) {
1442
+ return;
1443
+ }
1444
+ window.VimeoPlayerResizeEmbeds_ = true;
1445
+ var onMessage = function onMessage(event) {
1446
+ if (!isVimeoUrl(event.origin)) {
1447
+ return;
1448
+ }
1449
+
1450
+ // 'spacechange' is fired only on embeds with cards
1451
+ if (!event.data || event.data.event !== 'spacechange') {
1452
+ return;
1453
+ }
1454
+ var iframes = parent.querySelectorAll('iframe');
1455
+ for (var i = 0; i < iframes.length; i++) {
1456
+ if (iframes[i].contentWindow !== event.source) {
1457
+ continue;
1458
+ }
1459
+
1460
+ // Change padding-bottom of the enclosing div to accommodate
1461
+ // card carousel without distorting aspect ratio
1462
+ var space = iframes[i].parentElement;
1463
+ space.style.paddingBottom = "".concat(event.data.data[0].bottom, "px");
1464
+ break;
1465
+ }
1466
+ };
1467
+ window.addEventListener('message', onMessage);
1468
+ }
1469
+
1470
+ /**
1471
+ * Add chapters to existing metadata for Google SEO
1472
+ *
1473
+ * @param {HTMLElement} [parent=document] The parent element.
1474
+ * @return {void}
1475
+ */
1476
+ function initAppendVideoMetadata() {
1477
+ var parent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;
1478
+ // Prevent execution if users include the player.js script multiple times.
1479
+ if (window.VimeoSeoMetadataAppended) {
1480
+ return;
1481
+ }
1482
+ window.VimeoSeoMetadataAppended = true;
1483
+ var onMessage = function onMessage(event) {
1484
+ if (!isVimeoUrl(event.origin)) {
1485
+ return;
1486
+ }
1487
+ var data = parseMessageData(event.data);
1488
+ if (!data || data.event !== 'ready') {
1489
+ return;
1490
+ }
1491
+ var iframes = parent.querySelectorAll('iframe');
1492
+ for (var i = 0; i < iframes.length; i++) {
1493
+ var iframe = iframes[i];
1494
+
1495
+ // Initiate appendVideoMetadata if iframe is a Vimeo embed
1496
+ var isValidMessageSource = iframe.contentWindow === event.source;
1497
+ if (isVimeoEmbed(iframe.src) && isValidMessageSource) {
1498
+ var player = new Player(iframe);
1499
+ player.callMethod('appendVideoMetadata', window.location.href);
1500
+ }
1501
+ }
1502
+ };
1503
+ window.addEventListener('message', onMessage);
1504
+ }
1505
+
1506
+ /**
1507
+ * Seek to time indicated by vimeo_t query parameter if present in URL
1508
+ *
1509
+ * @param {HTMLElement} [parent=document] The parent element.
1510
+ * @return {void}
1511
+ */
1512
+ function checkUrlTimeParam() {
1513
+ var parent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;
1514
+ // Prevent execution if users include the player.js script multiple times.
1515
+ if (window.VimeoCheckedUrlTimeParam) {
1516
+ return;
1517
+ }
1518
+ window.VimeoCheckedUrlTimeParam = true;
1519
+ var handleError = function handleError(error) {
1520
+ if ('console' in window && console.error) {
1521
+ console.error("There was an error getting video Id: ".concat(error));
1522
+ }
1523
+ };
1524
+ var onMessage = function onMessage(event) {
1525
+ if (!isVimeoUrl(event.origin)) {
1526
+ return;
1527
+ }
1528
+ var data = parseMessageData(event.data);
1529
+ if (!data || data.event !== 'ready') {
1530
+ return;
1531
+ }
1532
+ var iframes = parent.querySelectorAll('iframe');
1533
+ var _loop = function _loop() {
1534
+ var iframe = iframes[i];
1535
+ var isValidMessageSource = iframe.contentWindow === event.source;
1536
+ if (isVimeoEmbed(iframe.src) && isValidMessageSource) {
1537
+ var player = new Player(iframe);
1538
+ player.getVideoId().then(function (videoId) {
1539
+ var matches = new RegExp("[?&]vimeo_t_".concat(videoId, "=([^&#]*)")).exec(window.location.href);
1540
+ if (matches && matches[1]) {
1541
+ var sec = decodeURI(matches[1]);
1542
+ player.setCurrentTime(sec);
1543
+ }
1544
+ return;
1545
+ }).catch(handleError);
1546
+ }
1547
+ };
1548
+ for (var i = 0; i < iframes.length; i++) {
1549
+ _loop();
1550
+ }
1551
+ };
1552
+ window.addEventListener('message', onMessage);
1553
+ }
1554
+
1555
+ /* MIT License
1556
+
1557
+ Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
1558
+
1559
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1560
+
1561
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
1562
+
1563
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1564
+ Terms */
1565
+
1566
+ function initializeScreenfull() {
1567
+ var fn = function () {
1568
+ var val;
1569
+ var fnMap = [['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror'],
1570
+ // New WebKit
1571
+ ['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror'],
1572
+ // Old WebKit
1573
+ ['webkitRequestFullScreen', 'webkitCancelFullScreen', 'webkitCurrentFullScreenElement', 'webkitCancelFullScreen', 'webkitfullscreenchange', 'webkitfullscreenerror'], ['mozRequestFullScreen', 'mozCancelFullScreen', 'mozFullScreenElement', 'mozFullScreenEnabled', 'mozfullscreenchange', 'mozfullscreenerror'], ['msRequestFullscreen', 'msExitFullscreen', 'msFullscreenElement', 'msFullscreenEnabled', 'MSFullscreenChange', 'MSFullscreenError']];
1574
+ var i = 0;
1575
+ var l = fnMap.length;
1576
+ var ret = {};
1577
+ for (; i < l; i++) {
1578
+ val = fnMap[i];
1579
+ if (val && val[1] in document) {
1580
+ for (i = 0; i < val.length; i++) {
1581
+ ret[fnMap[0][i]] = val[i];
1582
+ }
1583
+ return ret;
1584
+ }
1585
+ }
1586
+ return false;
1587
+ }();
1588
+ var eventNameMap = {
1589
+ fullscreenchange: fn.fullscreenchange,
1590
+ fullscreenerror: fn.fullscreenerror
1591
+ };
1592
+ var screenfull = {
1593
+ request: function request(element) {
1594
+ return new Promise(function (resolve, reject) {
1595
+ var onFullScreenEntered = function onFullScreenEntered() {
1596
+ screenfull.off('fullscreenchange', onFullScreenEntered);
1597
+ resolve();
1598
+ };
1599
+ screenfull.on('fullscreenchange', onFullScreenEntered);
1600
+ element = element || document.documentElement;
1601
+ var returnPromise = element[fn.requestFullscreen]();
1602
+ if (returnPromise instanceof Promise) {
1603
+ returnPromise.then(onFullScreenEntered).catch(reject);
1604
+ }
1605
+ });
1606
+ },
1607
+ exit: function exit() {
1608
+ return new Promise(function (resolve, reject) {
1609
+ if (!screenfull.isFullscreen) {
1610
+ resolve();
1611
+ return;
1612
+ }
1613
+ var onFullScreenExit = function onFullScreenExit() {
1614
+ screenfull.off('fullscreenchange', onFullScreenExit);
1615
+ resolve();
1616
+ };
1617
+ screenfull.on('fullscreenchange', onFullScreenExit);
1618
+ var returnPromise = document[fn.exitFullscreen]();
1619
+ if (returnPromise instanceof Promise) {
1620
+ returnPromise.then(onFullScreenExit).catch(reject);
1621
+ }
1622
+ });
1623
+ },
1624
+ on: function on(event, callback) {
1625
+ var eventName = eventNameMap[event];
1626
+ if (eventName) {
1627
+ document.addEventListener(eventName, callback);
1628
+ }
1629
+ },
1630
+ off: function off(event, callback) {
1631
+ var eventName = eventNameMap[event];
1632
+ if (eventName) {
1633
+ document.removeEventListener(eventName, callback);
1634
+ }
1635
+ }
1636
+ };
1637
+ Object.defineProperties(screenfull, {
1638
+ isFullscreen: {
1639
+ get: function get() {
1640
+ return Boolean(document[fn.fullscreenElement]);
1641
+ }
1642
+ },
1643
+ element: {
1644
+ enumerable: true,
1645
+ get: function get() {
1646
+ return document[fn.fullscreenElement];
1647
+ }
1648
+ },
1649
+ isEnabled: {
1650
+ enumerable: true,
1651
+ get: function get() {
1652
+ // Coerce to boolean in case of old WebKit
1653
+ return Boolean(document[fn.fullscreenEnabled]);
1654
+ }
1655
+ }
1656
+ });
1657
+ return screenfull;
1658
+ }
1659
+
1660
+ /** @typedef {import('./timing-src-connector.types').PlayerControls} PlayerControls */
1661
+ /** @typedef {import('./timing-object.types').TimingObject} TimingObject */
1662
+ /** @typedef {import('./timing-src-connector.types').TimingSrcConnectorOptions} TimingSrcConnectorOptions */
1663
+ /** @typedef {(msg: string) => any} Logger */
1664
+ /** @typedef {import('timing-object.types').TConnectionState} TConnectionState */
1665
+
1666
+ /**
1667
+ * @type {TimingSrcConnectorOptions}
1668
+ *
1669
+ * For details on these properties and their effects, see the typescript definition referenced above.
1670
+ */
1671
+ var defaultOptions = {
1672
+ role: 'viewer',
1673
+ autoPlayMuted: true,
1674
+ allowedDrift: 0.3,
1675
+ maxAllowedDrift: 1,
1676
+ minCheckInterval: 0.1,
1677
+ maxRateAdjustment: 0.2,
1678
+ maxTimeToCatchUp: 1
1679
+ };
1680
+
1681
+ /**
1682
+ * There's a proposed W3C spec for the Timing Object which would introduce a new set of APIs that would simplify time-synchronization tasks for browser applications.
1683
+ *
1684
+ * Proposed spec: https://webtiming.github.io/timingobject/
1685
+ * V3 Spec: https://timingsrc.readthedocs.io/en/latest/
1686
+ * Demuxed talk: https://www.youtube.com/watch?v=cZSjDaGDmX8
1687
+ *
1688
+ * This class makes it easy to connect Vimeo.Player to a provided TimingObject via Vimeo.Player.setTimingSrc(myTimingObject, options) and the synchronization will be handled automatically.
1689
+ *
1690
+ * There are 5 general responsibilities in TimingSrcConnector:
1691
+ *
1692
+ * 1. `updatePlayer()` which sets the player's currentTime, playbackRate and pause/play state based on current state of the TimingObject.
1693
+ * 2. `updateTimingObject()` which sets the TimingObject's position and velocity from the player's state.
1694
+ * 3. `playerUpdater` which listens for change events on the TimingObject and will respond by calling updatePlayer.
1695
+ * 4. `timingObjectUpdater` which listens to the player events of seeked, play and pause and will respond by calling `updateTimingObject()`.
1696
+ * 5. `maintainPlaybackPosition` this is code that constantly monitors the player to make sure it's always in sync with the TimingObject. This is needed because videos will generally not play with precise time accuracy and there will be some drift which becomes more noticeable over longer periods (as noted in the timing-object spec). More details on this method below.
1697
+ */
1698
+ var TimingSrcConnector = /*#__PURE__*/function (_EventTarget) {
1699
+ _inherits(TimingSrcConnector, _EventTarget);
1700
+ var _super = _createSuper(TimingSrcConnector);
1701
+ /**
1702
+ * @param {PlayerControls} player
1703
+ * @param {TimingObject} timingObject
1704
+ * @param {TimingSrcConnectorOptions} options
1705
+ * @param {Logger} logger
1706
+ */
1707
+ function TimingSrcConnector(_player, timingObject) {
1708
+ var _this;
1709
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1710
+ var logger = arguments.length > 3 ? arguments[3] : undefined;
1711
+ _classCallCheck(this, TimingSrcConnector);
1712
+ _this = _super.call(this);
1713
+ _defineProperty(_assertThisInitialized(_this), "logger", void 0);
1714
+ _defineProperty(_assertThisInitialized(_this), "speedAdjustment", 0);
1715
+ /**
1716
+ * @param {PlayerControls} player
1717
+ * @param {number} newAdjustment
1718
+ * @return {Promise<void>}
1719
+ */
1720
+ _defineProperty(_assertThisInitialized(_this), "adjustSpeed", /*#__PURE__*/function () {
1721
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(player, newAdjustment) {
1722
+ var newPlaybackRate;
1723
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1724
+ while (1) switch (_context.prev = _context.next) {
1725
+ case 0:
1726
+ if (!(_this.speedAdjustment === newAdjustment)) {
1727
+ _context.next = 2;
1728
+ break;
1729
+ }
1730
+ return _context.abrupt("return");
1731
+ case 2:
1732
+ _context.next = 4;
1733
+ return player.getPlaybackRate();
1734
+ case 4:
1735
+ _context.t0 = _context.sent;
1736
+ _context.t1 = _this.speedAdjustment;
1737
+ _context.t2 = _context.t0 - _context.t1;
1738
+ _context.t3 = newAdjustment;
1739
+ newPlaybackRate = _context.t2 + _context.t3;
1740
+ _this.log("New playbackRate: ".concat(newPlaybackRate));
1741
+ _context.next = 12;
1742
+ return player.setPlaybackRate(newPlaybackRate);
1743
+ case 12:
1744
+ _this.speedAdjustment = newAdjustment;
1745
+ case 13:
1746
+ case "end":
1747
+ return _context.stop();
1748
+ }
1749
+ }, _callee);
1750
+ }));
1751
+ return function (_x, _x2) {
1752
+ return _ref.apply(this, arguments);
1753
+ };
1754
+ }());
1755
+ _this.logger = logger;
1756
+ _this.init(timingObject, _player, _objectSpread2(_objectSpread2({}, defaultOptions), options));
1757
+ return _this;
1758
+ }
1759
+ _createClass(TimingSrcConnector, [{
1760
+ key: "disconnect",
1761
+ value: function disconnect() {
1762
+ this.dispatchEvent(new Event('disconnect'));
1763
+ }
1764
+
1765
+ /**
1766
+ * @param {TimingObject} timingObject
1767
+ * @param {PlayerControls} player
1768
+ * @param {TimingSrcConnectorOptions} options
1769
+ * @return {Promise<void>}
1770
+ */
1771
+ }, {
1772
+ key: "init",
1773
+ value: function () {
1774
+ var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(timingObject, player, options) {
1775
+ var _this2 = this;
1776
+ var playerUpdater, positionSync, timingObjectUpdater;
1777
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1778
+ while (1) switch (_context2.prev = _context2.next) {
1779
+ case 0:
1780
+ _context2.next = 2;
1781
+ return this.waitForTOReadyState(timingObject, 'open');
1782
+ case 2:
1783
+ if (!(options.role === 'viewer')) {
1784
+ _context2.next = 10;
1785
+ break;
1786
+ }
1787
+ _context2.next = 5;
1788
+ return this.updatePlayer(timingObject, player, options);
1789
+ case 5:
1790
+ playerUpdater = subscribe(timingObject, 'change', function () {
1791
+ return _this2.updatePlayer(timingObject, player, options);
1792
+ });
1793
+ positionSync = this.maintainPlaybackPosition(timingObject, player, options);
1794
+ this.addEventListener('disconnect', function () {
1795
+ positionSync.cancel();
1796
+ playerUpdater.cancel();
1797
+ });
1798
+ _context2.next = 14;
1799
+ break;
1800
+ case 10:
1801
+ _context2.next = 12;
1802
+ return this.updateTimingObject(timingObject, player);
1803
+ case 12:
1804
+ timingObjectUpdater = subscribe(player, ['seeked', 'play', 'pause', 'ratechange'], function () {
1805
+ return _this2.updateTimingObject(timingObject, player);
1806
+ }, 'on', 'off');
1807
+ this.addEventListener('disconnect', function () {
1808
+ return timingObjectUpdater.cancel();
1809
+ });
1810
+ case 14:
1811
+ case "end":
1812
+ return _context2.stop();
1813
+ }
1814
+ }, _callee2, this);
1815
+ }));
1816
+ function init(_x3, _x4, _x5) {
1817
+ return _init.apply(this, arguments);
1818
+ }
1819
+ return init;
1820
+ }()
1821
+ /**
1822
+ * Sets the TimingObject's state to reflect that of the player
1823
+ *
1824
+ * @param {TimingObject} timingObject
1825
+ * @param {PlayerControls} player
1826
+ * @return {Promise<void>}
1827
+ */
1828
+ }, {
1829
+ key: "updateTimingObject",
1830
+ value: function () {
1831
+ var _updateTimingObject = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(timingObject, player) {
1832
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1833
+ while (1) switch (_context3.prev = _context3.next) {
1834
+ case 0:
1835
+ _context3.t0 = timingObject;
1836
+ _context3.next = 3;
1837
+ return player.getCurrentTime();
1838
+ case 3:
1839
+ _context3.t1 = _context3.sent;
1840
+ _context3.next = 6;
1841
+ return player.getPaused();
1842
+ case 6:
1843
+ if (!_context3.sent) {
1844
+ _context3.next = 10;
1845
+ break;
1846
+ }
1847
+ _context3.t2 = 0;
1848
+ _context3.next = 13;
1849
+ break;
1850
+ case 10:
1851
+ _context3.next = 12;
1852
+ return player.getPlaybackRate();
1853
+ case 12:
1854
+ _context3.t2 = _context3.sent;
1855
+ case 13:
1856
+ _context3.t3 = _context3.t2;
1857
+ _context3.t4 = {
1858
+ position: _context3.t1,
1859
+ velocity: _context3.t3
1860
+ };
1861
+ _context3.t0.update.call(_context3.t0, _context3.t4);
1862
+ case 16:
1863
+ case "end":
1864
+ return _context3.stop();
1865
+ }
1866
+ }, _callee3);
1867
+ }));
1868
+ function updateTimingObject(_x6, _x7) {
1869
+ return _updateTimingObject.apply(this, arguments);
1870
+ }
1871
+ return updateTimingObject;
1872
+ }()
1873
+ /**
1874
+ * Sets the player's timing state to reflect that of the TimingObject
1875
+ *
1876
+ * @param {TimingObject} timingObject
1877
+ * @param {PlayerControls} player
1878
+ * @param {TimingSrcConnectorOptions} options
1879
+ * @return {Promise<void>}
1880
+ */
1881
+ }, {
1882
+ key: "updatePlayer",
1883
+ value: function () {
1884
+ var _updatePlayer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(timingObject, player, options) {
1885
+ var _timingObject$query, position, velocity;
1886
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
1887
+ while (1) switch (_context5.prev = _context5.next) {
1888
+ case 0:
1889
+ _timingObject$query = timingObject.query(), position = _timingObject$query.position, velocity = _timingObject$query.velocity;
1890
+ if (typeof position === 'number') {
1891
+ player.setCurrentTime(position);
1892
+ }
1893
+ if (!(typeof velocity === 'number')) {
1894
+ _context5.next = 25;
1895
+ break;
1896
+ }
1897
+ if (!(velocity === 0)) {
1898
+ _context5.next = 11;
1899
+ break;
1900
+ }
1901
+ _context5.next = 6;
1902
+ return player.getPaused();
1903
+ case 6:
1904
+ _context5.t0 = _context5.sent;
1905
+ if (!(_context5.t0 === false)) {
1906
+ _context5.next = 9;
1907
+ break;
1908
+ }
1909
+ player.pause();
1910
+ case 9:
1911
+ _context5.next = 25;
1912
+ break;
1913
+ case 11:
1914
+ if (!(velocity > 0)) {
1915
+ _context5.next = 25;
1916
+ break;
1917
+ }
1918
+ _context5.next = 14;
1919
+ return player.getPaused();
1920
+ case 14:
1921
+ _context5.t1 = _context5.sent;
1922
+ if (!(_context5.t1 === true)) {
1923
+ _context5.next = 19;
1924
+ break;
1925
+ }
1926
+ _context5.next = 18;
1927
+ return player.play().catch( /*#__PURE__*/function () {
1928
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(err) {
1929
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1930
+ while (1) switch (_context4.prev = _context4.next) {
1931
+ case 0:
1932
+ if (!(err.name === 'NotAllowedError' && options.autoPlayMuted)) {
1933
+ _context4.next = 5;
1934
+ break;
1935
+ }
1936
+ _context4.next = 3;
1937
+ return player.setMuted(true);
1938
+ case 3:
1939
+ _context4.next = 5;
1940
+ return player.play().catch(function (err2) {
1941
+ return console.error('Couldn\'t play the video from TimingSrcConnector. Error:', err2);
1942
+ });
1943
+ case 5:
1944
+ case "end":
1945
+ return _context4.stop();
1946
+ }
1947
+ }, _callee4);
1948
+ }));
1949
+ return function (_x11) {
1950
+ return _ref2.apply(this, arguments);
1951
+ };
1952
+ }());
1953
+ case 18:
1954
+ this.updatePlayer(timingObject, player, options);
1955
+ case 19:
1956
+ _context5.next = 21;
1957
+ return player.getPlaybackRate();
1958
+ case 21:
1959
+ _context5.t2 = _context5.sent;
1960
+ _context5.t3 = velocity;
1961
+ if (!(_context5.t2 !== _context5.t3)) {
1962
+ _context5.next = 25;
1963
+ break;
1964
+ }
1965
+ player.setPlaybackRate(velocity);
1966
+ case 25:
1967
+ case "end":
1968
+ return _context5.stop();
1969
+ }
1970
+ }, _callee5, this);
1971
+ }));
1972
+ function updatePlayer(_x8, _x9, _x10) {
1973
+ return _updatePlayer.apply(this, arguments);
1974
+ }
1975
+ return updatePlayer;
1976
+ }()
1977
+ /**
1978
+ * Since video players do not play with 100% time precision, we need to closely monitor
1979
+ * our player to be sure it remains in sync with the TimingObject.
1980
+ *
1981
+ * If out of sync, we use the current conditions and the options provided to determine
1982
+ * whether to re-sync via setting currentTime or adjusting the playbackRate
1983
+ *
1984
+ * @param {TimingObject} timingObject
1985
+ * @param {PlayerControls} player
1986
+ * @param {TimingSrcConnectorOptions} options
1987
+ * @return {{cancel: (function(): void)}}
1988
+ */
1989
+ }, {
1990
+ key: "maintainPlaybackPosition",
1991
+ value: function maintainPlaybackPosition(timingObject, player, options) {
1992
+ var _this3 = this;
1993
+ var allowedDrift = options.allowedDrift,
1994
+ maxAllowedDrift = options.maxAllowedDrift,
1995
+ minCheckInterval = options.minCheckInterval,
1996
+ maxRateAdjustment = options.maxRateAdjustment,
1997
+ maxTimeToCatchUp = options.maxTimeToCatchUp;
1998
+ var syncInterval = Math.min(maxTimeToCatchUp, Math.max(minCheckInterval, maxAllowedDrift)) * 1000;
1999
+ var check = /*#__PURE__*/function () {
2000
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
2001
+ var diff, diffAbs, min, max, adjustment;
2002
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
2003
+ while (1) switch (_context6.prev = _context6.next) {
2004
+ case 0:
2005
+ _context6.t0 = timingObject.query().velocity === 0;
2006
+ if (_context6.t0) {
2007
+ _context6.next = 6;
2008
+ break;
2009
+ }
2010
+ _context6.next = 4;
2011
+ return player.getPaused();
2012
+ case 4:
2013
+ _context6.t1 = _context6.sent;
2014
+ _context6.t0 = _context6.t1 === true;
2015
+ case 6:
2016
+ if (!_context6.t0) {
2017
+ _context6.next = 8;
2018
+ break;
2019
+ }
2020
+ return _context6.abrupt("return");
2021
+ case 8:
2022
+ _context6.t2 = timingObject.query().position;
2023
+ _context6.next = 11;
2024
+ return player.getCurrentTime();
2025
+ case 11:
2026
+ _context6.t3 = _context6.sent;
2027
+ diff = _context6.t2 - _context6.t3;
2028
+ diffAbs = Math.abs(diff);
2029
+ _this3.log("Drift: ".concat(diff));
2030
+ if (!(diffAbs > maxAllowedDrift)) {
2031
+ _context6.next = 22;
2032
+ break;
2033
+ }
2034
+ _context6.next = 18;
2035
+ return _this3.adjustSpeed(player, 0);
2036
+ case 18:
2037
+ player.setCurrentTime(timingObject.query().position);
2038
+ _this3.log('Resync by currentTime');
2039
+ _context6.next = 29;
2040
+ break;
2041
+ case 22:
2042
+ if (!(diffAbs > allowedDrift)) {
2043
+ _context6.next = 29;
2044
+ break;
2045
+ }
2046
+ min = diffAbs / maxTimeToCatchUp;
2047
+ max = maxRateAdjustment;
2048
+ adjustment = min < max ? (max - min) / 2 : max;
2049
+ _context6.next = 28;
2050
+ return _this3.adjustSpeed(player, adjustment * Math.sign(diff));
2051
+ case 28:
2052
+ _this3.log('Resync by playbackRate');
2053
+ case 29:
2054
+ case "end":
2055
+ return _context6.stop();
2056
+ }
2057
+ }, _callee6);
2058
+ }));
2059
+ return function check() {
2060
+ return _ref3.apply(this, arguments);
2061
+ };
2062
+ }();
2063
+ var interval = setInterval(function () {
2064
+ return check();
2065
+ }, syncInterval);
2066
+ return {
2067
+ cancel: function cancel() {
2068
+ return clearInterval(interval);
2069
+ }
2070
+ };
2071
+ }
2072
+
2073
+ /**
2074
+ * @param {string} msg
2075
+ */
2076
+ }, {
2077
+ key: "log",
2078
+ value: function log(msg) {
2079
+ var _this$logger;
2080
+ (_this$logger = this.logger) === null || _this$logger === void 0 ? void 0 : _this$logger.call(this, "TimingSrcConnector: ".concat(msg));
2081
+ }
2082
+ }, {
2083
+ key: "waitForTOReadyState",
2084
+ value:
2085
+ /**
2086
+ * @param {TimingObject} timingObject
2087
+ * @param {TConnectionState} state
2088
+ * @return {Promise<void>}
2089
+ */
2090
+ function waitForTOReadyState(timingObject, state) {
2091
+ return new Promise(function (resolve) {
2092
+ var check = function check() {
2093
+ if (timingObject.readyState === state) {
2094
+ resolve();
2095
+ } else {
2096
+ timingObject.addEventListener('readystatechange', check, {
2097
+ once: true
2098
+ });
2099
+ }
2100
+ };
2101
+ check();
2102
+ });
2103
+ }
2104
+ }]);
2105
+ return TimingSrcConnector;
2106
+ }( /*#__PURE__*/_wrapNativeSuper(EventTarget));
2107
+
2108
+ var playerMap = new WeakMap();
2109
+ var readyMap = new WeakMap();
2110
+ var screenfull = {};
2111
+ var Player = /*#__PURE__*/function () {
2112
+ /**
2113
+ * Create a Player.
2114
+ *
2115
+ * @param {(HTMLIFrameElement|HTMLElement|string|jQuery)} element A reference to the Vimeo
2116
+ * player iframe, and id, or a jQuery object.
2117
+ * @param {object} [options] oEmbed parameters to use when creating an embed in the element.
2118
+ * @return {Player}
2119
+ */
2120
+ function Player(element) {
2121
+ var _this = this;
2122
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2123
+ _classCallCheck(this, Player);
2124
+ /* global jQuery */
2125
+ if (window.jQuery && element instanceof jQuery) {
2126
+ if (element.length > 1 && window.console && console.warn) {
2127
+ console.warn('A jQuery object with multiple elements was passed, using the first element.');
2128
+ }
2129
+ element = element[0];
2130
+ }
2131
+
2132
+ // Find an element by ID
2133
+ if (typeof document !== 'undefined' && typeof element === 'string') {
2134
+ element = document.getElementById(element);
2135
+ }
2136
+
2137
+ // Not an element!
2138
+ if (!isDomElement(element)) {
2139
+ throw new TypeError('You must pass either a valid element or a valid id.');
2140
+ }
2141
+
2142
+ // Already initialized an embed in this div, so grab the iframe
2143
+ if (element.nodeName !== 'IFRAME') {
2144
+ var iframe = element.querySelector('iframe');
2145
+ if (iframe) {
2146
+ element = iframe;
2147
+ }
2148
+ }
2149
+
2150
+ // iframe url is not a Vimeo url
2151
+ if (element.nodeName === 'IFRAME' && !isVimeoUrl(element.getAttribute('src') || '')) {
2152
+ throw new Error('The player element passed isn’t a Vimeo embed.');
2153
+ }
2154
+
2155
+ // If there is already a player object in the map, return that
2156
+ if (playerMap.has(element)) {
2157
+ return playerMap.get(element);
2158
+ }
2159
+ this._window = element.ownerDocument.defaultView;
2160
+ this.element = element;
2161
+ this.origin = '*';
2162
+ var readyPromise = new npo_src(function (resolve, reject) {
2163
+ _this._onMessage = function (event) {
2164
+ if (!isVimeoUrl(event.origin) || _this.element.contentWindow !== event.source) {
2165
+ return;
2166
+ }
2167
+ if (_this.origin === '*') {
2168
+ _this.origin = event.origin;
2169
+ }
2170
+ var data = parseMessageData(event.data);
2171
+ var isError = data && data.event === 'error';
2172
+ var isReadyError = isError && data.data && data.data.method === 'ready';
2173
+ if (isReadyError) {
2174
+ var error = new Error(data.data.message);
2175
+ error.name = data.data.name;
2176
+ reject(error);
2177
+ return;
2178
+ }
2179
+ var isReadyEvent = data && data.event === 'ready';
2180
+ var isPingResponse = data && data.method === 'ping';
2181
+ if (isReadyEvent || isPingResponse) {
2182
+ _this.element.setAttribute('data-ready', 'true');
2183
+ resolve();
2184
+ return;
2185
+ }
2186
+ processData(_this, data);
2187
+ };
2188
+ _this._window.addEventListener('message', _this._onMessage);
2189
+ if (_this.element.nodeName !== 'IFRAME') {
2190
+ var params = getOEmbedParameters(element, options);
2191
+ var url = getVimeoUrl(params);
2192
+ getOEmbedData(url, params, element).then(function (data) {
2193
+ var iframe = createEmbed(data, element);
2194
+ // Overwrite element with the new iframe,
2195
+ // but store reference to the original element
2196
+ _this.element = iframe;
2197
+ _this._originalElement = element;
2198
+ swapCallbacks(element, iframe);
2199
+ playerMap.set(_this.element, _this);
2200
+ return data;
2201
+ }).catch(reject);
2202
+ }
2203
+ });
2204
+
2205
+ // Store a copy of this Player in the map
2206
+ readyMap.set(this, readyPromise);
2207
+ playerMap.set(this.element, this);
2208
+
2209
+ // Send a ping to the iframe so the ready promise will be resolved if
2210
+ // the player is already ready.
2211
+ if (this.element.nodeName === 'IFRAME') {
2212
+ postMessage(this, 'ping');
2213
+ }
2214
+ if (screenfull.isEnabled) {
2215
+ var exitFullscreen = function exitFullscreen() {
2216
+ return screenfull.exit();
2217
+ };
2218
+ this.fullscreenchangeHandler = function () {
2219
+ if (screenfull.isFullscreen) {
2220
+ storeCallback(_this, 'event:exitFullscreen', exitFullscreen);
2221
+ } else {
2222
+ removeCallback(_this, 'event:exitFullscreen', exitFullscreen);
2223
+ }
2224
+ // eslint-disable-next-line
2225
+ _this.ready().then(function () {
2226
+ postMessage(_this, 'fullscreenchange', screenfull.isFullscreen);
2227
+ });
2228
+ };
2229
+ screenfull.on('fullscreenchange', this.fullscreenchangeHandler);
2230
+ }
2231
+ return this;
2232
+ }
2233
+
2234
+ /**
2235
+ * Get a promise for a method.
2236
+ *
2237
+ * @param {string} name The API method to call.
2238
+ * @param {Object} [args={}] Arguments to send via postMessage.
2239
+ * @return {Promise}
2240
+ */
2241
+ _createClass(Player, [{
2242
+ key: "callMethod",
2243
+ value: function callMethod(name) {
2244
+ var _this2 = this;
2245
+ var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2246
+ return new npo_src(function (resolve, reject) {
2247
+ // We are storing the resolve/reject handlers to call later, so we
2248
+ // can’t return here.
2249
+ // eslint-disable-next-line promise/always-return
2250
+ return _this2.ready().then(function () {
2251
+ storeCallback(_this2, name, {
2252
+ resolve: resolve,
2253
+ reject: reject
2254
+ });
2255
+ postMessage(_this2, name, args);
2256
+ }).catch(reject);
2257
+ });
2258
+ }
2259
+
2260
+ /**
2261
+ * Get a promise for the value of a player property.
2262
+ *
2263
+ * @param {string} name The property name
2264
+ * @return {Promise}
2265
+ */
2266
+ }, {
2267
+ key: "get",
2268
+ value: function get(name) {
2269
+ var _this3 = this;
2270
+ return new npo_src(function (resolve, reject) {
2271
+ name = getMethodName(name, 'get');
2272
+
2273
+ // We are storing the resolve/reject handlers to call later, so we
2274
+ // can’t return here.
2275
+ // eslint-disable-next-line promise/always-return
2276
+ return _this3.ready().then(function () {
2277
+ storeCallback(_this3, name, {
2278
+ resolve: resolve,
2279
+ reject: reject
2280
+ });
2281
+ postMessage(_this3, name);
2282
+ }).catch(reject);
2283
+ });
2284
+ }
2285
+
2286
+ /**
2287
+ * Get a promise for setting the value of a player property.
2288
+ *
2289
+ * @param {string} name The API method to call.
2290
+ * @param {mixed} value The value to set.
2291
+ * @return {Promise}
2292
+ */
2293
+ }, {
2294
+ key: "set",
2295
+ value: function set(name, value) {
2296
+ var _this4 = this;
2297
+ return new npo_src(function (resolve, reject) {
2298
+ name = getMethodName(name, 'set');
2299
+ if (value === undefined || value === null) {
2300
+ throw new TypeError('There must be a value to set.');
2301
+ }
2302
+
2303
+ // We are storing the resolve/reject handlers to call later, so we
2304
+ // can’t return here.
2305
+ // eslint-disable-next-line promise/always-return
2306
+ return _this4.ready().then(function () {
2307
+ storeCallback(_this4, name, {
2308
+ resolve: resolve,
2309
+ reject: reject
2310
+ });
2311
+ postMessage(_this4, name, value);
2312
+ }).catch(reject);
2313
+ });
2314
+ }
2315
+
2316
+ /**
2317
+ * Add an event listener for the specified event. Will call the
2318
+ * callback with a single parameter, `data`, that contains the data for
2319
+ * that event.
2320
+ *
2321
+ * @param {string} eventName The name of the event.
2322
+ * @param {function(*)} callback The function to call when the event fires.
2323
+ * @return {void}
2324
+ */
2325
+ }, {
2326
+ key: "on",
2327
+ value: function on(eventName, callback) {
2328
+ if (!eventName) {
2329
+ throw new TypeError('You must pass an event name.');
2330
+ }
2331
+ if (!callback) {
2332
+ throw new TypeError('You must pass a callback function.');
2333
+ }
2334
+ if (typeof callback !== 'function') {
2335
+ throw new TypeError('The callback must be a function.');
2336
+ }
2337
+ var callbacks = getCallbacks(this, "event:".concat(eventName));
2338
+ if (callbacks.length === 0) {
2339
+ this.callMethod('addEventListener', eventName).catch(function () {
2340
+ // Ignore the error. There will be an error event fired that
2341
+ // will trigger the error callback if they are listening.
2342
+ });
2343
+ }
2344
+ storeCallback(this, "event:".concat(eventName), callback);
2345
+ }
2346
+
2347
+ /**
2348
+ * Remove an event listener for the specified event. Will remove all
2349
+ * listeners for that event if a `callback` isn’t passed, or only that
2350
+ * specific callback if it is passed.
2351
+ *
2352
+ * @param {string} eventName The name of the event.
2353
+ * @param {function} [callback] The specific callback to remove.
2354
+ * @return {void}
2355
+ */
2356
+ }, {
2357
+ key: "off",
2358
+ value: function off(eventName, callback) {
2359
+ if (!eventName) {
2360
+ throw new TypeError('You must pass an event name.');
2361
+ }
2362
+ if (callback && typeof callback !== 'function') {
2363
+ throw new TypeError('The callback must be a function.');
2364
+ }
2365
+ var lastCallback = removeCallback(this, "event:".concat(eventName), callback);
2366
+
2367
+ // If there are no callbacks left, remove the listener
2368
+ if (lastCallback) {
2369
+ this.callMethod('removeEventListener', eventName).catch(function (e) {
2370
+ // Ignore the error. There will be an error event fired that
2371
+ // will trigger the error callback if they are listening.
2372
+ });
2373
+ }
2374
+ }
2375
+
2376
+ /**
2377
+ * A promise to load a new video.
2378
+ *
2379
+ * @promise LoadVideoPromise
2380
+ * @fulfill {number} The video with this id or url successfully loaded.
2381
+ * @reject {TypeError} The id was not a number.
2382
+ */
2383
+ /**
2384
+ * Load a new video into this embed. The promise will be resolved if
2385
+ * the video is successfully loaded, or it will be rejected if it could
2386
+ * not be loaded.
2387
+ *
2388
+ * @param {number|string|object} options The id of the video, the url of the video, or an object with embed options.
2389
+ * @return {LoadVideoPromise}
2390
+ */
2391
+ }, {
2392
+ key: "loadVideo",
2393
+ value: function loadVideo(options) {
2394
+ return this.callMethod('loadVideo', options);
2395
+ }
2396
+
2397
+ /**
2398
+ * A promise to perform an action when the Player is ready.
2399
+ *
2400
+ * @todo document errors
2401
+ * @promise LoadVideoPromise
2402
+ * @fulfill {void}
2403
+ */
2404
+ /**
2405
+ * Trigger a function when the player iframe has initialized. You do not
2406
+ * need to wait for `ready` to trigger to begin adding event listeners
2407
+ * or calling other methods.
2408
+ *
2409
+ * @return {ReadyPromise}
2410
+ */
2411
+ }, {
2412
+ key: "ready",
2413
+ value: function ready() {
2414
+ var readyPromise = readyMap.get(this) || new npo_src(function (resolve, reject) {
2415
+ reject(new Error('Unknown player. Probably unloaded.'));
2416
+ });
2417
+ return npo_src.resolve(readyPromise);
2418
+ }
2419
+
2420
+ /**
2421
+ * A promise to add a cue point to the player.
2422
+ *
2423
+ * @promise AddCuePointPromise
2424
+ * @fulfill {string} The id of the cue point to use for removeCuePoint.
2425
+ * @reject {RangeError} the time was less than 0 or greater than the
2426
+ * video’s duration.
2427
+ * @reject {UnsupportedError} Cue points are not supported with the current
2428
+ * player or browser.
2429
+ */
2430
+ /**
2431
+ * Add a cue point to the player.
2432
+ *
2433
+ * @param {number} time The time for the cue point.
2434
+ * @param {object} [data] Arbitrary data to be returned with the cue point.
2435
+ * @return {AddCuePointPromise}
2436
+ */
2437
+ }, {
2438
+ key: "addCuePoint",
2439
+ value: function addCuePoint(time) {
2440
+ var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2441
+ return this.callMethod('addCuePoint', {
2442
+ time: time,
2443
+ data: data
2444
+ });
2445
+ }
2446
+
2447
+ /**
2448
+ * A promise to remove a cue point from the player.
2449
+ *
2450
+ * @promise AddCuePointPromise
2451
+ * @fulfill {string} The id of the cue point that was removed.
2452
+ * @reject {InvalidCuePoint} The cue point with the specified id was not
2453
+ * found.
2454
+ * @reject {UnsupportedError} Cue points are not supported with the current
2455
+ * player or browser.
2456
+ */
2457
+ /**
2458
+ * Remove a cue point from the video.
2459
+ *
2460
+ * @param {string} id The id of the cue point to remove.
2461
+ * @return {RemoveCuePointPromise}
2462
+ */
2463
+ }, {
2464
+ key: "removeCuePoint",
2465
+ value: function removeCuePoint(id) {
2466
+ return this.callMethod('removeCuePoint', id);
2467
+ }
2468
+
2469
+ /**
2470
+ * A representation of a text track on a video.
2471
+ *
2472
+ * @typedef {Object} VimeoTextTrack
2473
+ * @property {string} language The ISO language code.
2474
+ * @property {string} kind The kind of track it is (captions or subtitles).
2475
+ * @property {string} label The human‐readable label for the track.
2476
+ */
2477
+ /**
2478
+ * A promise to enable a text track.
2479
+ *
2480
+ * @promise EnableTextTrackPromise
2481
+ * @fulfill {VimeoTextTrack} The text track that was enabled.
2482
+ * @reject {InvalidTrackLanguageError} No track was available with the
2483
+ * specified language.
2484
+ * @reject {InvalidTrackError} No track was available with the specified
2485
+ * language and kind.
2486
+ */
2487
+ /**
2488
+ * Enable the text track with the specified language, and optionally the
2489
+ * specified kind (captions or subtitles).
2490
+ *
2491
+ * When set via the API, the track language will not change the viewer’s
2492
+ * stored preference.
2493
+ *
2494
+ * @param {string} language The two‐letter language code.
2495
+ * @param {string} [kind] The kind of track to enable (captions or subtitles).
2496
+ * @return {EnableTextTrackPromise}
2497
+ */
2498
+ }, {
2499
+ key: "enableTextTrack",
2500
+ value: function enableTextTrack(language, kind) {
2501
+ if (!language) {
2502
+ throw new TypeError('You must pass a language.');
2503
+ }
2504
+ return this.callMethod('enableTextTrack', {
2505
+ language: language,
2506
+ kind: kind
2507
+ });
2508
+ }
2509
+
2510
+ /**
2511
+ * A promise to disable the active text track.
2512
+ *
2513
+ * @promise DisableTextTrackPromise
2514
+ * @fulfill {void} The track was disabled.
2515
+ */
2516
+ /**
2517
+ * Disable the currently-active text track.
2518
+ *
2519
+ * @return {DisableTextTrackPromise}
2520
+ */
2521
+ }, {
2522
+ key: "disableTextTrack",
2523
+ value: function disableTextTrack() {
2524
+ return this.callMethod('disableTextTrack');
2525
+ }
2526
+
2527
+ /**
2528
+ * A promise to pause the video.
2529
+ *
2530
+ * @promise PausePromise
2531
+ * @fulfill {void} The video was paused.
2532
+ */
2533
+ /**
2534
+ * Pause the video if it’s playing.
2535
+ *
2536
+ * @return {PausePromise}
2537
+ */
2538
+ }, {
2539
+ key: "pause",
2540
+ value: function pause() {
2541
+ return this.callMethod('pause');
2542
+ }
2543
+
2544
+ /**
2545
+ * A promise to play the video.
2546
+ *
2547
+ * @promise PlayPromise
2548
+ * @fulfill {void} The video was played.
2549
+ */
2550
+ /**
2551
+ * Play the video if it’s paused. **Note:** on iOS and some other
2552
+ * mobile devices, you cannot programmatically trigger play. Once the
2553
+ * viewer has tapped on the play button in the player, however, you
2554
+ * will be able to use this function.
2555
+ *
2556
+ * @return {PlayPromise}
2557
+ */
2558
+ }, {
2559
+ key: "play",
2560
+ value: function play() {
2561
+ return this.callMethod('play');
2562
+ }
2563
+
2564
+ /**
2565
+ * Request that the player enters fullscreen.
2566
+ * @return {Promise}
2567
+ */
2568
+ }, {
2569
+ key: "requestFullscreen",
2570
+ value: function requestFullscreen() {
2571
+ if (screenfull.isEnabled) {
2572
+ return screenfull.request(this.element);
2573
+ }
2574
+ return this.callMethod('requestFullscreen');
2575
+ }
2576
+
2577
+ /**
2578
+ * Request that the player exits fullscreen.
2579
+ * @return {Promise}
2580
+ */
2581
+ }, {
2582
+ key: "exitFullscreen",
2583
+ value: function exitFullscreen() {
2584
+ if (screenfull.isEnabled) {
2585
+ return screenfull.exit();
2586
+ }
2587
+ return this.callMethod('exitFullscreen');
2588
+ }
2589
+
2590
+ /**
2591
+ * Returns true if the player is currently fullscreen.
2592
+ * @return {Promise}
2593
+ */
2594
+ }, {
2595
+ key: "getFullscreen",
2596
+ value: function getFullscreen() {
2597
+ if (screenfull.isEnabled) {
2598
+ return npo_src.resolve(screenfull.isFullscreen);
2599
+ }
2600
+ return this.get('fullscreen');
2601
+ }
2602
+
2603
+ /**
2604
+ * Request that the player enters picture-in-picture.
2605
+ * @return {Promise}
2606
+ */
2607
+ }, {
2608
+ key: "requestPictureInPicture",
2609
+ value: function requestPictureInPicture() {
2610
+ return this.callMethod('requestPictureInPicture');
2611
+ }
2612
+
2613
+ /**
2614
+ * Request that the player exits picture-in-picture.
2615
+ * @return {Promise}
2616
+ */
2617
+ }, {
2618
+ key: "exitPictureInPicture",
2619
+ value: function exitPictureInPicture() {
2620
+ return this.callMethod('exitPictureInPicture');
2621
+ }
2622
+
2623
+ /**
2624
+ * Returns true if the player is currently picture-in-picture.
2625
+ * @return {Promise}
2626
+ */
2627
+ }, {
2628
+ key: "getPictureInPicture",
2629
+ value: function getPictureInPicture() {
2630
+ return this.get('pictureInPicture');
2631
+ }
2632
+
2633
+ /**
2634
+ * A promise to prompt the viewer to initiate remote playback.
2635
+ *
2636
+ * @promise RemotePlaybackPromptPromise
2637
+ * @fulfill {void}
2638
+ * @reject {NotFoundError} No remote playback device is available.
2639
+ */
2640
+ /**
2641
+ * Request to prompt the user to initiate remote playback.
2642
+ *
2643
+ * @return {RemotePlaybackPromptPromise}
2644
+ */
2645
+ }, {
2646
+ key: "remotePlaybackPrompt",
2647
+ value: function remotePlaybackPrompt() {
2648
+ return this.callMethod('remotePlaybackPrompt');
2649
+ }
2650
+
2651
+ /**
2652
+ * A promise to unload the video.
2653
+ *
2654
+ * @promise UnloadPromise
2655
+ * @fulfill {void} The video was unloaded.
2656
+ */
2657
+ /**
2658
+ * Return the player to its initial state.
2659
+ *
2660
+ * @return {UnloadPromise}
2661
+ */
2662
+ }, {
2663
+ key: "unload",
2664
+ value: function unload() {
2665
+ return this.callMethod('unload');
2666
+ }
2667
+
2668
+ /**
2669
+ * Cleanup the player and remove it from the DOM
2670
+ *
2671
+ * It won't be usable and a new one should be constructed
2672
+ * in order to do any operations.
2673
+ *
2674
+ * @return {Promise}
2675
+ */
2676
+ }, {
2677
+ key: "destroy",
2678
+ value: function destroy() {
2679
+ var _this5 = this;
2680
+ return new npo_src(function (resolve) {
2681
+ readyMap.delete(_this5);
2682
+ playerMap.delete(_this5.element);
2683
+ if (_this5._originalElement) {
2684
+ playerMap.delete(_this5._originalElement);
2685
+ _this5._originalElement.removeAttribute('data-vimeo-initialized');
2686
+ }
2687
+ if (_this5.element && _this5.element.nodeName === 'IFRAME' && _this5.element.parentNode) {
2688
+ // If we've added an additional wrapper div, remove that from the DOM.
2689
+ // If not, just remove the iframe element.
2690
+ if (_this5.element.parentNode.parentNode && _this5._originalElement && _this5._originalElement !== _this5.element.parentNode) {
2691
+ _this5.element.parentNode.parentNode.removeChild(_this5.element.parentNode);
2692
+ } else {
2693
+ _this5.element.parentNode.removeChild(_this5.element);
2694
+ }
2695
+ }
2696
+
2697
+ // If the clip is private there is a case where the element stays the
2698
+ // div element. Destroy should reset the div and remove the iframe child.
2699
+ if (_this5.element && _this5.element.nodeName === 'DIV' && _this5.element.parentNode) {
2700
+ _this5.element.removeAttribute('data-vimeo-initialized');
2701
+ var iframe = _this5.element.querySelector('iframe');
2702
+ if (iframe && iframe.parentNode) {
2703
+ // If we've added an additional wrapper div, remove that from the DOM.
2704
+ // If not, just remove the iframe element.
2705
+ if (iframe.parentNode.parentNode && _this5._originalElement && _this5._originalElement !== iframe.parentNode) {
2706
+ iframe.parentNode.parentNode.removeChild(iframe.parentNode);
2707
+ } else {
2708
+ iframe.parentNode.removeChild(iframe);
2709
+ }
2710
+ }
2711
+ }
2712
+ _this5._window.removeEventListener('message', _this5._onMessage);
2713
+ if (screenfull.isEnabled) {
2714
+ screenfull.off('fullscreenchange', _this5.fullscreenchangeHandler);
2715
+ }
2716
+ resolve();
2717
+ });
2718
+ }
2719
+
2720
+ /**
2721
+ * A promise to get the autopause behavior of the video.
2722
+ *
2723
+ * @promise GetAutopausePromise
2724
+ * @fulfill {boolean} Whether autopause is turned on or off.
2725
+ * @reject {UnsupportedError} Autopause is not supported with the current
2726
+ * player or browser.
2727
+ */
2728
+ /**
2729
+ * Get the autopause behavior for this player.
2730
+ *
2731
+ * @return {GetAutopausePromise}
2732
+ */
2733
+ }, {
2734
+ key: "getAutopause",
2735
+ value: function getAutopause() {
2736
+ return this.get('autopause');
2737
+ }
2738
+
2739
+ /**
2740
+ * A promise to set the autopause behavior of the video.
2741
+ *
2742
+ * @promise SetAutopausePromise
2743
+ * @fulfill {boolean} Whether autopause is turned on or off.
2744
+ * @reject {UnsupportedError} Autopause is not supported with the current
2745
+ * player or browser.
2746
+ */
2747
+ /**
2748
+ * Enable or disable the autopause behavior of this player.
2749
+ *
2750
+ * By default, when another video is played in the same browser, this
2751
+ * player will automatically pause. Unless you have a specific reason
2752
+ * for doing so, we recommend that you leave autopause set to the
2753
+ * default (`true`).
2754
+ *
2755
+ * @param {boolean} autopause
2756
+ * @return {SetAutopausePromise}
2757
+ */
2758
+ }, {
2759
+ key: "setAutopause",
2760
+ value: function setAutopause(autopause) {
2761
+ return this.set('autopause', autopause);
2762
+ }
2763
+
2764
+ /**
2765
+ * A promise to get the buffered property of the video.
2766
+ *
2767
+ * @promise GetBufferedPromise
2768
+ * @fulfill {Array} Buffered Timeranges converted to an Array.
2769
+ */
2770
+ /**
2771
+ * Get the buffered property of the video.
2772
+ *
2773
+ * @return {GetBufferedPromise}
2774
+ */
2775
+ }, {
2776
+ key: "getBuffered",
2777
+ value: function getBuffered() {
2778
+ return this.get('buffered');
2779
+ }
2780
+
2781
+ /**
2782
+ * @typedef {Object} CameraProperties
2783
+ * @prop {number} props.yaw - Number between 0 and 360.
2784
+ * @prop {number} props.pitch - Number between -90 and 90.
2785
+ * @prop {number} props.roll - Number between -180 and 180.
2786
+ * @prop {number} props.fov - The field of view in degrees.
2787
+ */
2788
+ /**
2789
+ * A promise to get the camera properties of the player.
2790
+ *
2791
+ * @promise GetCameraPromise
2792
+ * @fulfill {CameraProperties} The camera properties.
2793
+ */
2794
+ /**
2795
+ * For 360° videos get the camera properties for this player.
2796
+ *
2797
+ * @return {GetCameraPromise}
2798
+ */
2799
+ }, {
2800
+ key: "getCameraProps",
2801
+ value: function getCameraProps() {
2802
+ return this.get('cameraProps');
2803
+ }
2804
+
2805
+ /**
2806
+ * A promise to set the camera properties of the player.
2807
+ *
2808
+ * @promise SetCameraPromise
2809
+ * @fulfill {Object} The camera was successfully set.
2810
+ * @reject {RangeError} The range was out of bounds.
2811
+ */
2812
+ /**
2813
+ * For 360° videos set the camera properties for this player.
2814
+ *
2815
+ * @param {CameraProperties} camera The camera properties
2816
+ * @return {SetCameraPromise}
2817
+ */
2818
+ }, {
2819
+ key: "setCameraProps",
2820
+ value: function setCameraProps(camera) {
2821
+ return this.set('cameraProps', camera);
2822
+ }
2823
+
2824
+ /**
2825
+ * A representation of a chapter.
2826
+ *
2827
+ * @typedef {Object} VimeoChapter
2828
+ * @property {number} startTime The start time of the chapter.
2829
+ * @property {object} title The title of the chapter.
2830
+ * @property {number} index The place in the order of Chapters. Starts at 1.
2831
+ */
2832
+ /**
2833
+ * A promise to get chapters for the video.
2834
+ *
2835
+ * @promise GetChaptersPromise
2836
+ * @fulfill {VimeoChapter[]} The chapters for the video.
2837
+ */
2838
+ /**
2839
+ * Get an array of all the chapters for the video.
2840
+ *
2841
+ * @return {GetChaptersPromise}
2842
+ */
2843
+ }, {
2844
+ key: "getChapters",
2845
+ value: function getChapters() {
2846
+ return this.get('chapters');
2847
+ }
2848
+
2849
+ /**
2850
+ * A promise to get the currently active chapter.
2851
+ *
2852
+ * @promise GetCurrentChaptersPromise
2853
+ * @fulfill {VimeoChapter|undefined} The current chapter for the video.
2854
+ */
2855
+ /**
2856
+ * Get the currently active chapter for the video.
2857
+ *
2858
+ * @return {GetCurrentChaptersPromise}
2859
+ */
2860
+ }, {
2861
+ key: "getCurrentChapter",
2862
+ value: function getCurrentChapter() {
2863
+ return this.get('currentChapter');
2864
+ }
2865
+
2866
+ /**
2867
+ * A promise to get the accent color of the player.
2868
+ *
2869
+ * @promise GetColorPromise
2870
+ * @fulfill {string} The hex color of the player.
2871
+ */
2872
+ /**
2873
+ * Get the accent color for this player. Note this is deprecated in place of `getColorTwo`.
2874
+ *
2875
+ * @return {GetColorPromise}
2876
+ */
2877
+ }, {
2878
+ key: "getColor",
2879
+ value: function getColor() {
2880
+ return this.get('color');
2881
+ }
2882
+
2883
+ /**
2884
+ * A promise to get all colors for the player in an array.
2885
+ *
2886
+ * @promise GetColorsPromise
2887
+ * @fulfill {string[]} The hex colors of the player.
2888
+ */
2889
+ /**
2890
+ * Get all the colors for this player in an array: [colorOne, colorTwo, colorThree, colorFour]
2891
+ *
2892
+ * @return {GetColorPromise}
2893
+ */
2894
+ }, {
2895
+ key: "getColors",
2896
+ value: function getColors() {
2897
+ return npo_src.all([this.get('colorOne'), this.get('colorTwo'), this.get('colorThree'), this.get('colorFour')]);
2898
+ }
2899
+
2900
+ /**
2901
+ * A promise to set the accent color of the player.
2902
+ *
2903
+ * @promise SetColorPromise
2904
+ * @fulfill {string} The color was successfully set.
2905
+ * @reject {TypeError} The string was not a valid hex or rgb color.
2906
+ * @reject {ContrastError} The color was set, but the contrast is
2907
+ * outside of the acceptable range.
2908
+ * @reject {EmbedSettingsError} The owner of the player has chosen to
2909
+ * use a specific color.
2910
+ */
2911
+ /**
2912
+ * Set the accent color of this player to a hex or rgb string. Setting the
2913
+ * color may fail if the owner of the video has set their embed
2914
+ * preferences to force a specific color.
2915
+ * Note this is deprecated in place of `setColorTwo`.
2916
+ *
2917
+ * @param {string} color The hex or rgb color string to set.
2918
+ * @return {SetColorPromise}
2919
+ */
2920
+ }, {
2921
+ key: "setColor",
2922
+ value: function setColor(color) {
2923
+ return this.set('color', color);
2924
+ }
2925
+
2926
+ /**
2927
+ * A promise to set all colors for the player.
2928
+ *
2929
+ * @promise SetColorsPromise
2930
+ * @fulfill {string[]} The colors were successfully set.
2931
+ * @reject {TypeError} The string was not a valid hex or rgb color.
2932
+ * @reject {ContrastError} The color was set, but the contrast is
2933
+ * outside of the acceptable range.
2934
+ * @reject {EmbedSettingsError} The owner of the player has chosen to
2935
+ * use a specific color.
2936
+ */
2937
+ /**
2938
+ * Set the colors of this player to a hex or rgb string. Setting the
2939
+ * color may fail if the owner of the video has set their embed
2940
+ * preferences to force a specific color.
2941
+ * The colors should be passed in as an array: [colorOne, colorTwo, colorThree, colorFour].
2942
+ * If a color should not be set, the index in the array can be left as null.
2943
+ *
2944
+ * @param {string[]} colors Array of the hex or rgb color strings to set.
2945
+ * @return {SetColorsPromise}
2946
+ */
2947
+ }, {
2948
+ key: "setColors",
2949
+ value: function setColors(colors) {
2950
+ if (!Array.isArray(colors)) {
2951
+ return new npo_src(function (resolve, reject) {
2952
+ return reject(new TypeError('Argument must be an array.'));
2953
+ });
2954
+ }
2955
+ var nullPromise = new npo_src(function (resolve) {
2956
+ return resolve(null);
2957
+ });
2958
+ var colorPromises = [colors[0] ? this.set('colorOne', colors[0]) : nullPromise, colors[1] ? this.set('colorTwo', colors[1]) : nullPromise, colors[2] ? this.set('colorThree', colors[2]) : nullPromise, colors[3] ? this.set('colorFour', colors[3]) : nullPromise];
2959
+ return npo_src.all(colorPromises);
2960
+ }
2961
+
2962
+ /**
2963
+ * A representation of a cue point.
2964
+ *
2965
+ * @typedef {Object} VimeoCuePoint
2966
+ * @property {number} time The time of the cue point.
2967
+ * @property {object} data The data passed when adding the cue point.
2968
+ * @property {string} id The unique id for use with removeCuePoint.
2969
+ */
2970
+ /**
2971
+ * A promise to get the cue points of a video.
2972
+ *
2973
+ * @promise GetCuePointsPromise
2974
+ * @fulfill {VimeoCuePoint[]} The cue points added to the video.
2975
+ * @reject {UnsupportedError} Cue points are not supported with the current
2976
+ * player or browser.
2977
+ */
2978
+ /**
2979
+ * Get an array of the cue points added to the video.
2980
+ *
2981
+ * @return {GetCuePointsPromise}
2982
+ */
2983
+ }, {
2984
+ key: "getCuePoints",
2985
+ value: function getCuePoints() {
2986
+ return this.get('cuePoints');
2987
+ }
2988
+
2989
+ /**
2990
+ * A promise to get the current time of the video.
2991
+ *
2992
+ * @promise GetCurrentTimePromise
2993
+ * @fulfill {number} The current time in seconds.
2994
+ */
2995
+ /**
2996
+ * Get the current playback position in seconds.
2997
+ *
2998
+ * @return {GetCurrentTimePromise}
2999
+ */
3000
+ }, {
3001
+ key: "getCurrentTime",
3002
+ value: function getCurrentTime() {
3003
+ return this.get('currentTime');
3004
+ }
3005
+
3006
+ /**
3007
+ * A promise to set the current time of the video.
3008
+ *
3009
+ * @promise SetCurrentTimePromise
3010
+ * @fulfill {number} The actual current time that was set.
3011
+ * @reject {RangeError} the time was less than 0 or greater than the
3012
+ * video’s duration.
3013
+ */
3014
+ /**
3015
+ * Set the current playback position in seconds. If the player was
3016
+ * paused, it will remain paused. Likewise, if the player was playing,
3017
+ * it will resume playing once the video has buffered.
3018
+ *
3019
+ * You can provide an accurate time and the player will attempt to seek
3020
+ * to as close to that time as possible. The exact time will be the
3021
+ * fulfilled value of the promise.
3022
+ *
3023
+ * @param {number} currentTime
3024
+ * @return {SetCurrentTimePromise}
3025
+ */
3026
+ }, {
3027
+ key: "setCurrentTime",
3028
+ value: function setCurrentTime(currentTime) {
3029
+ return this.set('currentTime', currentTime);
3030
+ }
3031
+
3032
+ /**
3033
+ * A promise to get the duration of the video.
3034
+ *
3035
+ * @promise GetDurationPromise
3036
+ * @fulfill {number} The duration in seconds.
3037
+ */
3038
+ /**
3039
+ * Get the duration of the video in seconds. It will be rounded to the
3040
+ * nearest second before playback begins, and to the nearest thousandth
3041
+ * of a second after playback begins.
3042
+ *
3043
+ * @return {GetDurationPromise}
3044
+ */
3045
+ }, {
3046
+ key: "getDuration",
3047
+ value: function getDuration() {
3048
+ return this.get('duration');
3049
+ }
3050
+
3051
+ /**
3052
+ * A promise to get the ended state of the video.
3053
+ *
3054
+ * @promise GetEndedPromise
3055
+ * @fulfill {boolean} Whether or not the video has ended.
3056
+ */
3057
+ /**
3058
+ * Get the ended state of the video. The video has ended if
3059
+ * `currentTime === duration`.
3060
+ *
3061
+ * @return {GetEndedPromise}
3062
+ */
3063
+ }, {
3064
+ key: "getEnded",
3065
+ value: function getEnded() {
3066
+ return this.get('ended');
3067
+ }
3068
+
3069
+ /**
3070
+ * A promise to get the loop state of the player.
3071
+ *
3072
+ * @promise GetLoopPromise
3073
+ * @fulfill {boolean} Whether or not the player is set to loop.
3074
+ */
3075
+ /**
3076
+ * Get the loop state of the player.
3077
+ *
3078
+ * @return {GetLoopPromise}
3079
+ */
3080
+ }, {
3081
+ key: "getLoop",
3082
+ value: function getLoop() {
3083
+ return this.get('loop');
3084
+ }
3085
+
3086
+ /**
3087
+ * A promise to set the loop state of the player.
3088
+ *
3089
+ * @promise SetLoopPromise
3090
+ * @fulfill {boolean} The loop state that was set.
3091
+ */
3092
+ /**
3093
+ * Set the loop state of the player. When set to `true`, the player
3094
+ * will start over immediately once playback ends.
3095
+ *
3096
+ * @param {boolean} loop
3097
+ * @return {SetLoopPromise}
3098
+ */
3099
+ }, {
3100
+ key: "setLoop",
3101
+ value: function setLoop(loop) {
3102
+ return this.set('loop', loop);
3103
+ }
3104
+
3105
+ /**
3106
+ * A promise to set the muted state of the player.
3107
+ *
3108
+ * @promise SetMutedPromise
3109
+ * @fulfill {boolean} The muted state that was set.
3110
+ */
3111
+ /**
3112
+ * Set the muted state of the player. When set to `true`, the player
3113
+ * volume will be muted.
3114
+ *
3115
+ * @param {boolean} muted
3116
+ * @return {SetMutedPromise}
3117
+ */
3118
+ }, {
3119
+ key: "setMuted",
3120
+ value: function setMuted(muted) {
3121
+ return this.set('muted', muted);
3122
+ }
3123
+
3124
+ /**
3125
+ * A promise to get the muted state of the player.
3126
+ *
3127
+ * @promise GetMutedPromise
3128
+ * @fulfill {boolean} Whether or not the player is muted.
3129
+ */
3130
+ /**
3131
+ * Get the muted state of the player.
3132
+ *
3133
+ * @return {GetMutedPromise}
3134
+ */
3135
+ }, {
3136
+ key: "getMuted",
3137
+ value: function getMuted() {
3138
+ return this.get('muted');
3139
+ }
3140
+
3141
+ /**
3142
+ * A promise to get the paused state of the player.
3143
+ *
3144
+ * @promise GetLoopPromise
3145
+ * @fulfill {boolean} Whether or not the video is paused.
3146
+ */
3147
+ /**
3148
+ * Get the paused state of the player.
3149
+ *
3150
+ * @return {GetLoopPromise}
3151
+ */
3152
+ }, {
3153
+ key: "getPaused",
3154
+ value: function getPaused() {
3155
+ return this.get('paused');
3156
+ }
3157
+
3158
+ /**
3159
+ * A promise to get the playback rate of the player.
3160
+ *
3161
+ * @promise GetPlaybackRatePromise
3162
+ * @fulfill {number} The playback rate of the player on a scale from 0 to 2.
3163
+ */
3164
+ /**
3165
+ * Get the playback rate of the player on a scale from `0` to `2`.
3166
+ *
3167
+ * @return {GetPlaybackRatePromise}
3168
+ */
3169
+ }, {
3170
+ key: "getPlaybackRate",
3171
+ value: function getPlaybackRate() {
3172
+ return this.get('playbackRate');
3173
+ }
3174
+
3175
+ /**
3176
+ * A promise to set the playbackrate of the player.
3177
+ *
3178
+ * @promise SetPlaybackRatePromise
3179
+ * @fulfill {number} The playback rate was set.
3180
+ * @reject {RangeError} The playback rate was less than 0 or greater than 2.
3181
+ */
3182
+ /**
3183
+ * Set the playback rate of the player on a scale from `0` to `2`. When set
3184
+ * via the API, the playback rate will not be synchronized to other
3185
+ * players or stored as the viewer's preference.
3186
+ *
3187
+ * @param {number} playbackRate
3188
+ * @return {SetPlaybackRatePromise}
3189
+ */
3190
+ }, {
3191
+ key: "setPlaybackRate",
3192
+ value: function setPlaybackRate(playbackRate) {
3193
+ return this.set('playbackRate', playbackRate);
3194
+ }
3195
+
3196
+ /**
3197
+ * A promise to get the played property of the video.
3198
+ *
3199
+ * @promise GetPlayedPromise
3200
+ * @fulfill {Array} Played Timeranges converted to an Array.
3201
+ */
3202
+ /**
3203
+ * Get the played property of the video.
3204
+ *
3205
+ * @return {GetPlayedPromise}
3206
+ */
3207
+ }, {
3208
+ key: "getPlayed",
3209
+ value: function getPlayed() {
3210
+ return this.get('played');
3211
+ }
3212
+
3213
+ /**
3214
+ * A promise to get the qualities available of the current video.
3215
+ *
3216
+ * @promise GetQualitiesPromise
3217
+ * @fulfill {Array} The qualities of the video.
3218
+ */
3219
+ /**
3220
+ * Get the qualities of the current video.
3221
+ *
3222
+ * @return {GetQualitiesPromise}
3223
+ */
3224
+ }, {
3225
+ key: "getQualities",
3226
+ value: function getQualities() {
3227
+ return this.get('qualities');
3228
+ }
3229
+
3230
+ /**
3231
+ * A promise to get the current set quality of the video.
3232
+ *
3233
+ * @promise GetQualityPromise
3234
+ * @fulfill {string} The current set quality.
3235
+ */
3236
+ /**
3237
+ * Get the current set quality of the video.
3238
+ *
3239
+ * @return {GetQualityPromise}
3240
+ */
3241
+ }, {
3242
+ key: "getQuality",
3243
+ value: function getQuality() {
3244
+ return this.get('quality');
3245
+ }
3246
+
3247
+ /**
3248
+ * A promise to set the video quality.
3249
+ *
3250
+ * @promise SetQualityPromise
3251
+ * @fulfill {number} The quality was set.
3252
+ * @reject {RangeError} The quality is not available.
3253
+ */
3254
+ /**
3255
+ * Set a video quality.
3256
+ *
3257
+ * @param {string} quality
3258
+ * @return {SetQualityPromise}
3259
+ */
3260
+ }, {
3261
+ key: "setQuality",
3262
+ value: function setQuality(quality) {
3263
+ return this.set('quality', quality);
3264
+ }
3265
+
3266
+ /**
3267
+ * A promise to get the remote playback availability.
3268
+ *
3269
+ * @promise RemotePlaybackAvailabilityPromise
3270
+ * @fulfill {boolean} Whether remote playback is available.
3271
+ */
3272
+ /**
3273
+ * Get the availability of remote playback.
3274
+ *
3275
+ * @return {RemotePlaybackAvailabilityPromise}
3276
+ */
3277
+ }, {
3278
+ key: "getRemotePlaybackAvailability",
3279
+ value: function getRemotePlaybackAvailability() {
3280
+ return this.get('remotePlaybackAvailability');
3281
+ }
3282
+
3283
+ /**
3284
+ * A promise to get the current remote playback state.
3285
+ *
3286
+ * @promise RemotePlaybackStatePromise
3287
+ * @fulfill {string} The state of the remote playback: connecting, connected, or disconnected.
3288
+ */
3289
+ /**
3290
+ * Get the current remote playback state.
3291
+ *
3292
+ * @return {RemotePlaybackStatePromise}
3293
+ */
3294
+ }, {
3295
+ key: "getRemotePlaybackState",
3296
+ value: function getRemotePlaybackState() {
3297
+ return this.get('remotePlaybackState');
3298
+ }
3299
+
3300
+ /**
3301
+ * A promise to get the seekable property of the video.
3302
+ *
3303
+ * @promise GetSeekablePromise
3304
+ * @fulfill {Array} Seekable Timeranges converted to an Array.
3305
+ */
3306
+ /**
3307
+ * Get the seekable property of the video.
3308
+ *
3309
+ * @return {GetSeekablePromise}
3310
+ */
3311
+ }, {
3312
+ key: "getSeekable",
3313
+ value: function getSeekable() {
3314
+ return this.get('seekable');
3315
+ }
3316
+
3317
+ /**
3318
+ * A promise to get the seeking property of the player.
3319
+ *
3320
+ * @promise GetSeekingPromise
3321
+ * @fulfill {boolean} Whether or not the player is currently seeking.
3322
+ */
3323
+ /**
3324
+ * Get if the player is currently seeking.
3325
+ *
3326
+ * @return {GetSeekingPromise}
3327
+ */
3328
+ }, {
3329
+ key: "getSeeking",
3330
+ value: function getSeeking() {
3331
+ return this.get('seeking');
3332
+ }
3333
+
3334
+ /**
3335
+ * A promise to get the text tracks of a video.
3336
+ *
3337
+ * @promise GetTextTracksPromise
3338
+ * @fulfill {VimeoTextTrack[]} The text tracks associated with the video.
3339
+ */
3340
+ /**
3341
+ * Get an array of the text tracks that exist for the video.
3342
+ *
3343
+ * @return {GetTextTracksPromise}
3344
+ */
3345
+ }, {
3346
+ key: "getTextTracks",
3347
+ value: function getTextTracks() {
3348
+ return this.get('textTracks');
3349
+ }
3350
+
3351
+ /**
3352
+ * A promise to get the embed code for the video.
3353
+ *
3354
+ * @promise GetVideoEmbedCodePromise
3355
+ * @fulfill {string} The `<iframe>` embed code for the video.
3356
+ */
3357
+ /**
3358
+ * Get the `<iframe>` embed code for the video.
3359
+ *
3360
+ * @return {GetVideoEmbedCodePromise}
3361
+ */
3362
+ }, {
3363
+ key: "getVideoEmbedCode",
3364
+ value: function getVideoEmbedCode() {
3365
+ return this.get('videoEmbedCode');
3366
+ }
3367
+
3368
+ /**
3369
+ * A promise to get the id of the video.
3370
+ *
3371
+ * @promise GetVideoIdPromise
3372
+ * @fulfill {number} The id of the video.
3373
+ */
3374
+ /**
3375
+ * Get the id of the video.
3376
+ *
3377
+ * @return {GetVideoIdPromise}
3378
+ */
3379
+ }, {
3380
+ key: "getVideoId",
3381
+ value: function getVideoId() {
3382
+ return this.get('videoId');
3383
+ }
3384
+
3385
+ /**
3386
+ * A promise to get the title of the video.
3387
+ *
3388
+ * @promise GetVideoTitlePromise
3389
+ * @fulfill {number} The title of the video.
3390
+ */
3391
+ /**
3392
+ * Get the title of the video.
3393
+ *
3394
+ * @return {GetVideoTitlePromise}
3395
+ */
3396
+ }, {
3397
+ key: "getVideoTitle",
3398
+ value: function getVideoTitle() {
3399
+ return this.get('videoTitle');
3400
+ }
3401
+
3402
+ /**
3403
+ * A promise to get the native width of the video.
3404
+ *
3405
+ * @promise GetVideoWidthPromise
3406
+ * @fulfill {number} The native width of the video.
3407
+ */
3408
+ /**
3409
+ * Get the native width of the currently‐playing video. The width of
3410
+ * the highest‐resolution available will be used before playback begins.
3411
+ *
3412
+ * @return {GetVideoWidthPromise}
3413
+ */
3414
+ }, {
3415
+ key: "getVideoWidth",
3416
+ value: function getVideoWidth() {
3417
+ return this.get('videoWidth');
3418
+ }
3419
+
3420
+ /**
3421
+ * A promise to get the native height of the video.
3422
+ *
3423
+ * @promise GetVideoHeightPromise
3424
+ * @fulfill {number} The native height of the video.
3425
+ */
3426
+ /**
3427
+ * Get the native height of the currently‐playing video. The height of
3428
+ * the highest‐resolution available will be used before playback begins.
3429
+ *
3430
+ * @return {GetVideoHeightPromise}
3431
+ */
3432
+ }, {
3433
+ key: "getVideoHeight",
3434
+ value: function getVideoHeight() {
3435
+ return this.get('videoHeight');
3436
+ }
3437
+
3438
+ /**
3439
+ * A promise to get the vimeo.com url for the video.
3440
+ *
3441
+ * @promise GetVideoUrlPromise
3442
+ * @fulfill {number} The vimeo.com url for the video.
3443
+ * @reject {PrivacyError} The url isn’t available because of the video’s privacy setting.
3444
+ */
3445
+ /**
3446
+ * Get the vimeo.com url for the video.
3447
+ *
3448
+ * @return {GetVideoUrlPromise}
3449
+ */
3450
+ }, {
3451
+ key: "getVideoUrl",
3452
+ value: function getVideoUrl() {
3453
+ return this.get('videoUrl');
3454
+ }
3455
+
3456
+ /**
3457
+ * A promise to get the volume level of the player.
3458
+ *
3459
+ * @promise GetVolumePromise
3460
+ * @fulfill {number} The volume level of the player on a scale from 0 to 1.
3461
+ */
3462
+ /**
3463
+ * Get the current volume level of the player on a scale from `0` to `1`.
3464
+ *
3465
+ * Most mobile devices do not support an independent volume from the
3466
+ * system volume. In those cases, this method will always return `1`.
3467
+ *
3468
+ * @return {GetVolumePromise}
3469
+ */
3470
+ }, {
3471
+ key: "getVolume",
3472
+ value: function getVolume() {
3473
+ return this.get('volume');
3474
+ }
3475
+
3476
+ /**
3477
+ * A promise to set the volume level of the player.
3478
+ *
3479
+ * @promise SetVolumePromise
3480
+ * @fulfill {number} The volume was set.
3481
+ * @reject {RangeError} The volume was less than 0 or greater than 1.
3482
+ */
3483
+ /**
3484
+ * Set the volume of the player on a scale from `0` to `1`. When set
3485
+ * via the API, the volume level will not be synchronized to other
3486
+ * players or stored as the viewer’s preference.
3487
+ *
3488
+ * Most mobile devices do not support setting the volume. An error will
3489
+ * *not* be triggered in that situation.
3490
+ *
3491
+ * @param {number} volume
3492
+ * @return {SetVolumePromise}
3493
+ */
3494
+ }, {
3495
+ key: "setVolume",
3496
+ value: function setVolume(volume) {
3497
+ return this.set('volume', volume);
3498
+ }
3499
+
3500
+ /** @typedef {import('./lib/timing-object.types').TimingObject} TimingObject */
3501
+ /** @typedef {import('./lib/timing-src-connector.types').TimingSrcConnectorOptions} TimingSrcConnectorOptions */
3502
+ /** @typedef {import('./lib/timing-src-connector').TimingSrcConnector} TimingSrcConnector */
3503
+
3504
+ /**
3505
+ * Connects a TimingObject to the video player (https://webtiming.github.io/timingobject/)
3506
+ *
3507
+ * @param {TimingObject} timingObject
3508
+ * @param {TimingSrcConnectorOptions} options
3509
+ *
3510
+ * @return {Promise<TimingSrcConnector>}
3511
+ */
3512
+ }, {
3513
+ key: "setTimingSrc",
3514
+ value: function () {
3515
+ var _setTimingSrc = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(timingObject, options) {
3516
+ var _this6 = this;
3517
+ var connector;
3518
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
3519
+ while (1) switch (_context.prev = _context.next) {
3520
+ case 0:
3521
+ if (timingObject) {
3522
+ _context.next = 2;
3523
+ break;
3524
+ }
3525
+ throw new TypeError('A Timing Object must be provided.');
3526
+ case 2:
3527
+ _context.next = 4;
3528
+ return this.ready();
3529
+ case 4:
3530
+ connector = new TimingSrcConnector(this, timingObject, options);
3531
+ postMessage(this, 'notifyTimingObjectConnect');
3532
+ connector.addEventListener('disconnect', function () {
3533
+ return postMessage(_this6, 'notifyTimingObjectDisconnect');
3534
+ });
3535
+ return _context.abrupt("return", connector);
3536
+ case 8:
3537
+ case "end":
3538
+ return _context.stop();
3539
+ }
3540
+ }, _callee, this);
3541
+ }));
3542
+ function setTimingSrc(_x, _x2) {
3543
+ return _setTimingSrc.apply(this, arguments);
3544
+ }
3545
+ return setTimingSrc;
3546
+ }()
3547
+ }]);
3548
+ return Player;
3549
+ }();
3550
+
3551
+ // Setup embed only if this is not a node environment
3552
+ if (!isNode) {
3553
+ screenfull = initializeScreenfull();
3554
+ initializeEmbeds();
3555
+ resizeEmbeds();
3556
+ initAppendVideoMetadata();
3557
+ checkUrlTimeParam();
3558
+ }
3559
+
3560
+ return Player;
3561
+
3562
+ })));