j1-template 2024.3.24 → 2024.3.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. checksums.yaml +4 -4
  2. data/assets/data/apps/amplitudehtml +1147 -0
  3. data/assets/data/apps/gallery.html +342 -0
  4. data/assets/data/{masonry.html → apps/masonry.html} +22 -9
  5. data/assets/data/apps/swiper.html +901 -0
  6. data/assets/data/masonry_app.html +521 -0
  7. data/assets/theme/j1/modules/lightGallery/css/theme/uno/uno.css +21 -13
  8. data/assets/theme/j1/modules/lightGallery/css/theme/uno/uno.min.css +1 -2
  9. data/assets/theme/j1/modules/lightGallery/js/lightgallery.js +14 -13
  10. data/assets/theme/j1/modules/lightGallery/js/lightgallery.min.js +1 -1
  11. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.js +265 -226
  12. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.min.js +1 -1
  13. data/assets/theme/j1/modules/videojs/css/themes/uno.css +12 -2
  14. data/assets/theme/j1/modules/videojs/css/videojs.css +2 -3
  15. data/assets/theme/j1/modules/videojs/css/videojs.min.css +1 -1
  16. data/assets/theme/j1/modules/videojs/plugins/controls/zoom/css/zoom.css +55 -55
  17. data/assets/theme/j1/modules/videojs/plugins/controls/zoom/css/zoom.min.css +2 -1
  18. data/assets/theme/j1/modules/videojs/plugins/controls/zoom/js/zoom.js +590 -382
  19. data/assets/theme/j1/modules/videojs/plugins/controls/zoom/js/zoom.min.js +1 -1
  20. data/assets/theme/j1/modules/videojs/plugins/j1_core/template.min.js +31 -0
  21. data/assets/theme/j1/modules/videojs/plugins/players/dm/!examples/{simple.html → index.html} +11 -10
  22. data/assets/theme/j1/modules/videojs/plugins/players/dm/js/dailymotion.0.js +647 -0
  23. data/assets/theme/j1/modules/videojs/plugins/players/dm/js/dailymotion.1.js +653 -0
  24. data/assets/theme/j1/modules/videojs/plugins/players/vm/!examples/{player → iframe_api}/index.html +3 -3
  25. data/assets/theme/j1/modules/videojs/plugins/players/vm/!examples/{index.html → videojs_api/index.html} +7 -3
  26. data/assets/theme/j1/modules/videojs/plugins/players/vm/api/js/v2.21.0/vimeo.js +3562 -0
  27. data/assets/theme/j1/modules/videojs/plugins/players/vm/api/js/v2.21.0/vimeo.min.js +36 -0
  28. data/assets/theme/j1/modules/videojs/plugins/players/vm/api/js/vimeo.js +451 -1849
  29. data/assets/theme/j1/modules/videojs/plugins/players/vm/api/js/vimeo.min.js +2 -14
  30. data/assets/theme/j1/modules/videojs/plugins/players/vm/js/LICENSE +21 -0
  31. data/assets/theme/j1/modules/videojs/plugins/players/vm/js/README.md +54 -0
  32. data/assets/theme/j1/modules/videojs/plugins/players/vm/js/old/vimeo.js +666 -0
  33. data/assets/theme/j1/modules/videojs/plugins/players/vm/js/old/vimeo.min.js +28 -0
  34. data/assets/theme/j1/modules/videojs/plugins/players/vm/js/vimeo.js +2318 -548
  35. data/assets/theme/j1/modules/videojs/plugins/players/vm/js/vimeo.min.js +12 -18
  36. data/assets/theme/j1/modules/videojs/plugins/players/yt/!examples/{simple.html → index.html} +15 -6
  37. data/assets/theme/j1/modules/videojs/plugins/players/yt/js/youtube.js +12 -5
  38. data/assets/theme/j1/modules/videojs/plugins/players/yt/js/youtube.min.js +1 -1
  39. data/lib/j1/version.rb +1 -1
  40. data/lib/starter_web/Gemfile +1 -1
  41. data/lib/starter_web/README.md +5 -5
  42. data/lib/starter_web/_config.yml +2 -2
  43. data/lib/starter_web/_data/blocks/banner.yml +1 -1
  44. data/lib/starter_web/_data/j1_config.yml +1 -1
  45. data/lib/starter_web/_data/layouts/home.yml +1 -1
  46. data/lib/starter_web/_data/modules/authentication.yml +1 -2
  47. data/lib/starter_web/_data/modules/defaults/masonry.yml +1 -1
  48. data/lib/starter_web/_data/modules/gallery.yml +35 -24
  49. data/lib/starter_web/_data/modules/log4javascript.yml +1 -1
  50. data/lib/starter_web/_data/modules/masonry.yml +30 -14
  51. data/lib/starter_web/_data/modules/navigator.yml +1 -1
  52. data/lib/starter_web/_data/modules/navigator_menu.yml +12 -8
  53. data/lib/starter_web/_data/templates/feed.xml +1 -1
  54. data/lib/starter_web/_plugins/asciidoctor/dailymotion-block.rb +206 -24
  55. data/lib/starter_web/_plugins/index/lunr.rb +1 -1
  56. data/lib/starter_web/assets/image/module/attic/1920x1280/admin-dashboard-bootstrap.jpg +0 -0
  57. data/lib/starter_web/assets/image/module/attic/1920x1280/alexander-redl.jpg +0 -0
  58. data/lib/starter_web/assets/image/module/attic/1920x1280/alexander-shatov.jpg +0 -0
  59. data/lib/starter_web/assets/image/module/attic/1920x1280/alexey-ruban.jpg +0 -0
  60. data/lib/starter_web/assets/image/module/attic/1920x1280/andrea-badino.jpg +0 -0
  61. data/lib/starter_web/assets/image/module/attic/1920x1280/bootstrap-modal.jpg +0 -0
  62. data/lib/starter_web/assets/image/module/attic/1920x1280/bp-miller.jpg +0 -0
  63. data/lib/starter_web/assets/image/module/attic/1920x1280/brad-neathery.jpg +0 -0
  64. data/lib/starter_web/assets/image/module/attic/1920x1280/brigitta-schneiter.jpg +0 -0
  65. data/lib/starter_web/assets/image/module/attic/1920x1280/build-with-gemini.jpg +0 -0
  66. data/lib/starter_web/assets/image/module/attic/1920x1280/clem-onojeghuo.jpg +0 -0
  67. data/lib/starter_web/assets/image/module/attic/1920x1280/eleni-afiontzi.jpg +0 -0
  68. data/lib/starter_web/assets/image/module/attic/1920x1280/fly-d.jpg +0 -0
  69. data/lib/starter_web/assets/image/module/attic/1920x1280/guillaume-bolduc.jpg +0 -0
  70. data/lib/starter_web/assets/image/module/attic/1920x1280/ideas-start-here-1920x1280.jpg +0 -0
  71. data/lib/starter_web/assets/image/module/attic/1920x1280/isaac-davis.jpg +0 -0
  72. data/lib/starter_web/assets/image/module/attic/1920x1280/j1-launch.jpg +0 -0
  73. data/lib/starter_web/assets/image/module/attic/1920x1280/j1-mockup.jpg +0 -0
  74. data/lib/starter_web/assets/image/module/attic/1920x1280/john-schnobrich-2.jpg +0 -0
  75. data/lib/starter_web/assets/image/module/attic/1920x1280/josep-martins.jpg +0 -0
  76. data/lib/starter_web/assets/image/module/attic/1920x1280/josh-liu.jpg +0 -0
  77. data/lib/starter_web/assets/image/module/attic/1920x1280/kelly-sikkemal.jpg +0 -0
  78. data/lib/starter_web/assets/image/module/attic/1920x1280/kira-auf-der-heide.jpg +0 -0
  79. data/lib/starter_web/assets/image/module/attic/1920x1280/kristopher-roller.jpg +0 -0
  80. data/lib/starter_web/assets/image/module/attic/1920x1280/markus-spiske.jpg +0 -0
  81. data/lib/starter_web/assets/image/module/attic/1920x1280/martin-sanchez.jpg +0 -0
  82. data/lib/starter_web/assets/image/module/attic/1920x1280/material_symbols.jpg +0 -0
  83. data/lib/starter_web/assets/image/module/attic/1920x1280/matthaeus.jpg +0 -0
  84. data/lib/starter_web/assets/image/module/attic/1920x1280/melanie-deziel.jpg +0 -0
  85. data/lib/starter_web/assets/image/module/attic/1920x1280/nasa.jpg +0 -0
  86. data/lib/starter_web/assets/image/module/attic/1920x1280/quino-al-2.jpg +0 -0
  87. data/lib/starter_web/assets/image/module/attic/1920x1280/stories-ink-tattoo-care.jpg +0 -0
  88. data/lib/starter_web/assets/image/module/attic/1920x1280/towfiqu-barbhuiya.jpg +0 -0
  89. data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1.adoc.erb +1 -1
  90. data/lib/starter_web/collections/posts/public/featured/_posts/2022-02-01-about-j1.adoc +2 -2
  91. data/lib/starter_web/collections/posts/public/featured/_posts/2023-10-18-url-types.adoc +2 -2
  92. data/lib/starter_web/config.ru +1 -1
  93. data/lib/starter_web/dot.gitattributes +1 -1
  94. data/lib/starter_web/index.html +8 -8
  95. data/lib/starter_web/package.json +1 -1
  96. data/lib/starter_web/pages/public/about/features.adoc +5 -5
  97. data/lib/starter_web/pages/public/about/reporting_issues.adoc +5 -5
  98. data/lib/starter_web/pages/public/about/site.adoc +14 -10
  99. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/000_intro.adoc +1 -1
  100. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/100_converter.adoc +1 -1
  101. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/200_themes.adoc +1 -1
  102. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/documentation.adoc +1 -1
  103. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +1 -1
  104. data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +1 -1
  105. data/lib/starter_web/pages/public/blog/navigator/archive/allview.html +1 -1
  106. data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +1 -1
  107. data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +1 -1
  108. data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +1 -1
  109. data/lib/starter_web/pages/public/blog/navigator/index.html +1 -1
  110. data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_biography.adoc +1 -1
  111. data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_fantasy.adoc +1 -1
  112. data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_romance.adoc +1 -1
  113. data/lib/starter_web/pages/public/learn/bookshelf/jekyll_collections.adoc +1 -1
  114. data/lib/starter_web/pages/public/learn/bookshelf/viewer_all_books.adoc +1 -1
  115. data/lib/starter_web/pages/public/learn/where_to_go.adoc +1 -1
  116. data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +3 -3
  117. data/lib/starter_web/pages/public/legal/en/200_impress.adoc +3 -3
  118. data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +3 -3
  119. data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +3 -3
  120. data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +1 -4
  121. data/lib/starter_web/pages/public/plans/plans.adoc +1 -1
  122. data/lib/starter_web/pages/public/tools/previewer/preview_bootstrap_theme.adoc +1 -1
  123. data/lib/starter_web/pages/public/tools/tester/videojs_macro_tester.adoc +116 -43
  124. data/lib/starter_web/pages/public/tour/_includes/documents/419_advanced_modals_demo.asciidoc +1 -1
  125. data/lib/starter_web/pages/public/tour/video_data.adoc +28 -22
  126. metadata +25 -49
  127. data/assets/theme/j1/modules/videojs/plugins/players/dm/!examples/dailymotion-controls.html +0 -18
  128. data/assets/theme/j1/modules/videojs/plugins/players/dm/!examples/dailymotion-javascript.html +0 -28
  129. data/assets/theme/j1/modules/videojs/plugins/players/dm/!examples/dailymotion-playlist.html +0 -19
  130. data/assets/theme/j1/modules/videojs/plugins/players/dm/!examples/global-parameters.html +0 -30
  131. data/assets/theme/j1/modules/videojs/plugins/players/dm/!examples/switch.html +0 -39
  132. data/assets/theme/j1/modules/videojs/plugins/players/yt/!examples/global-parameters.html +0 -34
  133. data/assets/theme/j1/modules/videojs/plugins/players/yt/!examples/switch.html +0 -39
  134. data/assets/theme/j1/modules/videojs/plugins/players/yt/!examples/youtube-controls.html +0 -20
  135. data/assets/theme/j1/modules/videojs/plugins/players/yt/!examples/youtube-javascript.html +0 -29
  136. data/assets/theme/j1/modules/videojs/plugins/players/yt/!examples/youtube-list.html +0 -21
  137. data/assets/theme/j1/modules/videojs/plugins/players/yt/!examples/youtube-playlist.html +0 -21
  138. data/lib/starter_web/assets/image/module/attic/1920x1280/j1-content-mockup-2.jpg +0 -0
  139. data/lib/starter_web/assets/image/module/attic/1920x1280/j1-content-mockup-3.jpg +0 -0
  140. data/lib/starter_web/assets/image/module/attic/1920x1280/j1-starter-mockup-1.jpg +0 -0
  141. data/lib/starter_web/assets/image/module/attic/admin-dashboard-bootstrap-1280x600.jpg +0 -0
  142. data/lib/starter_web/assets/image/module/attic/alice-donovan-rouse-2.jpg +0 -0
  143. data/lib/starter_web/assets/image/module/attic/building-blocks-1920x1280.jpg +0 -0
  144. data/lib/starter_web/assets/image/module/attic/christina-1920x1280.jpg +0 -0
  145. data/lib/starter_web/assets/image/module/attic/franck-1920x1280.jpg +0 -0
  146. data/lib/starter_web/assets/image/module/attic/giammarco-boscaro-1920x1280.jpg +0 -0
  147. data/lib/starter_web/assets/image/module/attic/jessica-ruscello-1920x1280.jpg +0 -0
  148. data/lib/starter_web/assets/image/module/attic/joanna-kosinska-1920x1280.jpg +0 -0
  149. data/lib/starter_web/assets/image/module/attic/leon-1920x1280.jpg +0 -0
  150. data/lib/starter_web/assets/image/module/attic/lianhao-1920x1280.jpg +0 -0
  151. data/lib/starter_web/assets/image/module/attic/library-1920x1280.jpg +0 -0
  152. data/lib/starter_web/assets/image/module/attic/markus-krisetya-1920x1280.jpg +0 -0
  153. data/lib/starter_web/assets/image/module/attic/markus-spiske-1920x1280.jpg +0 -0
  154. data/lib/starter_web/assets/image/module/attic/markus-spiske4-1920x1280.jpg +0 -0
  155. data/lib/starter_web/assets/image/module/attic/matthaeus-1920x1280.jpg +0 -0
  156. data/lib/starter_web/assets/image/module/attic/matthew-dockery-1920x1280.jpg +0 -0
  157. data/lib/starter_web/assets/image/module/attic/no-time-1920x1280.jpg +0 -0
  158. data/lib/starter_web/assets/image/module/attic/rirri-1920x1280.jpg +0 -0
  159. data/lib/starter_web/assets/image/module/attic/shubham-dhage-1920x1280.jpg +0 -0
  160. data/lib/starter_web/assets/image/module/attic/shutterstock_sponsor-1920x1280.jpg +0 -0
  161. data/lib/starter_web/assets/image/module/attic/sigmund-1920x1280.jpg +0 -0
  162. data/lib/starter_web/assets/image/module/attic/szabo-viktor-1920x1280.jpg +0 -0
  163. data/lib/starter_web/assets/image/module/attic/themes-1920x1280-bw.jpg +0 -0
  164. data/lib/starter_web/assets/image/module/attic/tldr-1920x800.jpg +0 -0
  165. data/lib/starter_web/assets/image/module/attic/vladislav-klapin-1920x1280.jpg +0 -0
  166. data/lib/starter_web/assets/image/module/attic/yellow-cactus-1920x1280.jpg +0 -0
  167. /data/assets/theme/j1/modules/videojs/plugins/players/vm/{LICENSE → js/old/LICENSE} +0 -0
  168. /data/assets/theme/j1/modules/videojs/plugins/players/vm/{README.md → js/old/README.md} +0 -0
@@ -19,18 +19,6 @@
19
19
  # -----------------------------------------------------------------------------
20
20
  */
21
21
 
22
- /*! @vimeo/player v2.21.0 | (c) 2024 Vimeo | MIT License | https://github.com/vimeo/player.js */
22
+ /*! @vimeo/player v2.10.0 | (c) 2019 Vimeo | MIT License | https://github.com/vimeo/player.js */
23
23
 
24
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).VM=e.VM||{},e.VM.Player=t())}(this,function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach(function(e){c(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function n(){n=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),u=new T(r||[]);return o(a,"_invoke",{value:function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=E(a,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=f(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,u)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d={};function h(){}function p(){}function v(){}var y={};l(y,a,function(){return this});var m=Object.getPrototypeOf,g=m&&m(m(j([])));g&&g!==t&&r.call(g,a)&&(y=g);var w=v.prototype=h.prototype=Object.create(y);function b(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function k(e,t){var n;o(this,"_invoke",{value:function(o,i){function a(){return new t(function(n,a){!function n(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==typeof s&&r.call(s,"__await")?t.resolve(s.__await).then(function(e){n("next",e,a,u)},function(e){n("throw",e,a,u)}):t.resolve(s).then(function(e){l.value=e,a(l)},function(e){return n("throw",e,a,u)})}u(c.arg)}(o,i,n,a)})}return n=n?n.then(a,a):a()}})}function E(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=f(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function j(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:p,configurable:!0}),p.displayName=l(v,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,c,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},b(k.prototype),l(k.prototype,u,function(){return this}),e.AsyncIterator=k,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new k(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},b(w),l(w,c,"Generator"),l(w,a,function(){return this}),l(w,"toString",function(){return"[object Generator]"}),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=j,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:j(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function r(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var a=e.apply(t,n);function u(e){r(a,o,i,u,c,"next",e)}function c(e){r(a,o,i,u,c,"throw",e)}u(void 0)})}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,y(r.key),r)}}function u(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t,n){return(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function d(e,t,n){return(d=f()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&s(o,n.prototype),o}).apply(null,arguments)}function h(e){var t="function"==typeof Map?new Map:void 0;return(h=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return d(e,arguments,l(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),s(r,e)})(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){var t=f();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}(this,n)}}function y(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var m="undefined"!=typeof global&&"[object global]"==={}.toString.call(global);function g(e,t){return 0===e.indexOf(t.toLowerCase())?e:"".concat(t.toLowerCase()).concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}function w(e){return/^(https?:)?\/\/((player|www)\.)?vimeo\.com(?=$|\/)/.test(e)}function b(e){return/^https:\/\/player\.vimeo\.com\/video\/\d+/.test(e)}function k(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,r=t.url,o=n||r;if(!o)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.");if(e=o,!isNaN(parseFloat(e))&&isFinite(e)&&Math.floor(e)==e)return"https://vimeo.com/".concat(o);if(w(o))return o.replace("http:","https:");if(n)throw new TypeError("“".concat(n,"” is not a valid video id."));throw new TypeError("“".concat(o,"” is not a vimeo.com url."))}var E=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"addEventListener",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"removeEventListener",i="string"==typeof t?[t]:t;return i.forEach(function(t){e[r](t,n)}),{cancel:function(){return i.forEach(function(t){return e[o](t,n)})}}},x=void 0!==Array.prototype.indexOf,P="undefined"!=typeof window&&void 0!==window.postMessage;if(!(m||x&&P))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};
25
- /*!
26
- * weakmap-polyfill v2.0.4 - ECMAScript6 WeakMap polyfill
27
- * https://github.com/polygonplanet/weakmap-polyfill
28
- * Copyright (c) 2015-2021 polygonplanet <polygon.planet.aqua@gmail.com>
29
- * @license MIT
30
- */
31
- !function(e){if(!e.WeakMap){var t=Object.prototype.hasOwnProperty,n=Object.defineProperty&&function(){try{return 1===Object.defineProperty({},"x",{value:1}).x}catch(e){}}(),r=function(e,t,r){n?Object.defineProperty(e,t,{configurable:!0,writable:!0,value:r}):e[t]=r};e.WeakMap=function(){function e(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(r(this,"_id","_WeakMap"+"_"+i()+"."+i()),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}function n(e,n){if(!o(e)||!t.call(e,"_id"))throw new TypeError(n+" method called on incompatible receiver "+typeof e)}function i(){return Math.random().toString().substring(2)}return r(e.prototype,"delete",function(e){if(n(this,"delete"),!o(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)&&(delete e[this._id],!0)}),r(e.prototype,"get",function(e){if(n(this,"get"),o(e)){var t=e[this._id];return t&&t[0]===e?t[1]:void 0}}),r(e.prototype,"has",function(e){if(n(this,"has"),!o(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)}),r(e.prototype,"set",function(e,t){if(n(this,"set"),!o(e))throw new TypeError("Invalid value used as weak map key");var i=e[this._id];return i&&i[0]===e?(i[1]=t,this):(r(e,this._id,[e,t]),this)}),r(e,"_polyfill",!0),e}()}function o(e){return Object(e)===e}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:T);var j,O=(function(e){
32
- /*! Native Promise Only
33
- v0.8.1 (c) Kyle Simpson
34
- MIT License: http://getify.mit-license.org
35
- */
36
- var t,n,r;r=function(){var e,t,n,r=Object.prototype.toString,o="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(t){e=function(e,t,n){return e[t]=n,e}}function i(e,r){n.add(e,r),t||(t=o(n.drain))}function a(e){var t,n=typeof e;return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function u(){for(var e=0;e<this.chain.length;e++)c(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function c(e,t,n){var r,o;try{!1===t?n.reject(e.msg):(r=!0===t?e.msg:t.call(void 0,e.msg))===n.promise?n.reject(TypeError("Promise-chain cycle")):(o=a(r))?o.call(r,n.resolve,n.reject):n.resolve(r)}catch(e){n.reject(e)}}function l(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&i(u,t))}function s(e,t,n,r){for(var o=0;o<t.length;o++)!function(o){e.resolve(t[o]).then(function(e){n(o,e)},r)}(o)}function f(e){this.def=e,this.triggered=!1}function d(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var t=new function(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}(this);this.then=function(e,n){var r={success:"function"!=typeof e||e,failure:"function"==typeof n&&n};return r.promise=new this.constructor(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");r.resolve=e,r.reject=t}),t.chain.push(r),0!==t.state&&i(u,t),r.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,function(e){(function e(t){var n,r=this;if(!r.triggered){r.triggered=!0,r.def&&(r=r.def);try{(n=a(t))?i(function(){var o=new f(r);try{n.call(t,function(){e.apply(o,arguments)},function(){l.apply(o,arguments)})}catch(e){l.call(o,e)}}):(r.msg=t,r.state=1,r.chain.length>0&&i(u,r))}catch(e){l.call(new f(r),e)}}}).call(t,e)},function(e){l.call(t,e)})}catch(e){l.call(t,e)}}n=function(){var e,n,r;return{add:function(t,o){r=new function(e,t){this.fn=e,this.self=t,this.next=void 0}(t,o),n?n.next=r:e=r,n=r,r=void 0},drain:function(){var r=e;for(e=n=t=void 0;r;)r.fn.call(r.self),r=r.next}}}();var h=e({},"constructor",d,!1);return d.prototype=h,e(h,"__NPO__",0,!1),e(d,"resolve",function(e){return e&&"object"==typeof e&&1===e.__NPO__?e:new this(function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");t(e)})}),e(d,"reject",function(e){return new this(function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");n(e)})}),e(d,"all",function(e){var t=this;return"[object Array]"!=r.call(e)?t.reject(TypeError("Not an array")):0===e.length?t.resolve([]):new t(function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");var o=e.length,i=Array(o),a=0;s(t,e,function(e,t){i[e]=t,++a===o&&n(i)},r)})}),e(d,"race",function(e){var t=this;return"[object Array]"!=r.call(e)?t.reject(TypeError("Not an array")):new t(function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");s(t,e,function(e,t){n(t)},r)})}),d},(n=T)[t="Promise"]=n[t]||r(),e.exports&&(e.exports=n[t])}(j={exports:{}},j.exports),j.exports),_=new WeakMap;function M(e,t,n){var r=_.get(e.element)||{};t in r||(r[t]=[]),r[t].push(n),_.set(e.element,r)}function S(e,t){return(_.get(e.element)||{})[t]||[]}function C(e,t,n){var r=_.get(e.element)||{};if(!r[t])return!0;if(!n)return r[t]=[],_.set(e.element,r),!0;var o=r[t].indexOf(n);return-1!==o&&r[t].splice(o,1),_.set(e.element,r),r[t]&&0===r[t].length}function F(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return console.warn(e),{}}return e}function N(e,t,n){if(e.element.contentWindow&&e.element.contentWindow.postMessage){var r={method:t};void 0!==n&&(r.value=n);var o=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1"));o>=8&&o<10&&(r=JSON.stringify(r)),e.element.contentWindow.postMessage(r,e.origin)}}function L(e,t){var n,r=[];if((t=F(t)).event){if("error"===t.event)S(e,t.data.method).forEach(function(n){var r=new Error(t.data.message);r.name=t.data.name,n.reject(r),C(e,t.data.method,n)});r=S(e,"event:".concat(t.event)),n=t.data}else if(t.method){var o=function(e,t){var n=S(e,t);if(n.length<1)return!1;var r=n.shift();return C(e,t,r),r}(e,t.method);o&&(r.push(o),n=t.value)}r.forEach(function(t){try{if("function"==typeof t)return void t.call(e,n);t.resolve(n)}catch(e){}})}var A=["airplay","audio_tracks","autopause","autoplay","background","byline","cc","chapters","chromecast","color","colors","controls","dnt","fullscreen","height","id","interactive_params","keyboard","loop","maxheight","maxwidth","muted","play_button_position","playsinline","portrait","progress_bar","quality_selector","responsive","speed","texttrack","title","transcript","transparent","url","vimeo_logo","volume","width"];function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return A.reduce(function(t,n){var r=e.getAttribute("data-vimeo-".concat(n));return(r||""===r)&&(t[n]=""===r?1:r),t},t)}function q(e,t){var n=e.html;if(!t)throw new TypeError("An element must be provided");if(null!==t.getAttribute("data-vimeo-initialized"))return t.querySelector("iframe");var r=document.createElement("div");return r.innerHTML=n,t.appendChild(r.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe")}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return new Promise(function(r,o){if(!w(e))throw new TypeError("“".concat(e,"” is not a vimeo.com url."));var i="https://vimeo.com/api/oembed.json?url=".concat(encodeURIComponent(e));for(var a in t)t.hasOwnProperty(a)&&(i+="&".concat(a,"=").concat(encodeURIComponent(t[a])));var u="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;u.open("GET",i,!0),u.onload=function(){if(404!==u.status)if(403!==u.status)try{var t=JSON.parse(u.responseText);if(403===t.domain_status_code)return q(t,n),void o(new Error("“".concat(e,"” is not embeddable.")));r(t)}catch(e){o(e)}else o(new Error("“".concat(e,"” is not embeddable.")));else o(new Error("“".concat(e,"” was not found.")))},u.onerror=function(){var e=u.status?" (".concat(u.status,")"):"";o(new Error("There was an error fetching the embed code from Vimeo".concat(e,".")))},u.send()})}var V={role:"viewer",autoPlayMuted:!0,allowedDrift:.3,maxAllowedDrift:1,minCheckInterval:.1,maxRateAdjustment:.2,maxTimeToCatchUp:1},D=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(a,h(EventTarget));var r=v(a);function a(e,u){var l,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},f=arguments.length>3?arguments[3]:void 0;return i(this,a),c(p(l=r.call(this)),"logger",void 0),c(p(l),"speedAdjustment",0),c(p(l),"adjustSpeed",function(){var e=o(n().mark(function e(t,r){var o;return n().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l.speedAdjustment!==r){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,t.getPlaybackRate();case 4:return e.t0=e.sent,e.t1=l.speedAdjustment,e.t2=e.t0-e.t1,e.t3=r,o=e.t2+e.t3,l.log("New playbackRate: ".concat(o)),e.next=12,t.setPlaybackRate(o);case 12:l.speedAdjustment=r;case 13:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()),l.logger=f,l.init(u,e,t(t({},V),s)),l}return u(a,[{key:"disconnect",value:function(){this.dispatchEvent(new Event("disconnect"))}},{key:"init",value:function(){var e=o(n().mark(function e(t,r,o){var i,a,u,c=this;return n().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.waitForTOReadyState(t,"open");case 2:if("viewer"!==o.role){e.next=10;break}return e.next=5,this.updatePlayer(t,r,o);case 5:i=E(t,"change",function(){return c.updatePlayer(t,r,o)}),a=this.maintainPlaybackPosition(t,r,o),this.addEventListener("disconnect",function(){a.cancel(),i.cancel()}),e.next=14;break;case 10:return e.next=12,this.updateTimingObject(t,r);case 12:u=E(r,["seeked","play","pause","ratechange"],function(){return c.updateTimingObject(t,r)},"on","off"),this.addEventListener("disconnect",function(){return u.cancel()});case 14:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"updateTimingObject",value:function(){var e=o(n().mark(function e(t,r){return n().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=t,e.next=3,r.getCurrentTime();case 3:return e.t1=e.sent,e.next=6,r.getPaused();case 6:if(!e.sent){e.next=10;break}e.t2=0,e.next=13;break;case 10:return e.next=12,r.getPlaybackRate();case 12:e.t2=e.sent;case 13:e.t3=e.t2,e.t4={position:e.t1,velocity:e.t3},e.t0.update.call(e.t0,e.t4);case 16:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()},{key:"updatePlayer",value:function(){var e=o(n().mark(function e(t,r,i){var a,u,c;return n().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.query(),u=a.position,c=a.velocity,"number"==typeof u&&r.setCurrentTime(u),"number"!=typeof c){e.next=25;break}if(0!==c){e.next=11;break}return e.next=6,r.getPaused();case 6:if(e.t0=e.sent,!1!==e.t0){e.next=9;break}r.pause();case 9:e.next=25;break;case 11:if(!(c>0)){e.next=25;break}return e.next=14,r.getPaused();case 14:if(e.t1=e.sent,!0!==e.t1){e.next=19;break}return e.next=18,r.play().catch(function(){var e=o(n().mark(function e(t){return n().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("NotAllowedError"!==t.name||!i.autoPlayMuted){e.next=5;break}return e.next=3,r.setMuted(!0);case 3:return e.next=5,r.play().catch(function(e){return console.error("Couldn't play the video from TimingSrcConnector. Error:",e)});case 5:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}());case 18:this.updatePlayer(t,r,i);case 19:return e.next=21,r.getPlaybackRate();case 21:if(e.t2=e.sent,e.t3=c,e.t2===e.t3){e.next=25;break}r.setPlaybackRate(c);case 25:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"maintainPlaybackPosition",value:function(e,t,r){var i=this,a=r.allowedDrift,u=r.maxAllowedDrift,c=r.minCheckInterval,l=r.maxRateAdjustment,s=r.maxTimeToCatchUp,f=1e3*Math.min(s,Math.max(c,u)),d=function(){var r=o(n().mark(function r(){var o,c,f,d,h;return n().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(n.t0=0===e.query().velocity,n.t0){n.next=6;break}return n.next=4,t.getPaused();case 4:n.t1=n.sent,n.t0=!0===n.t1;case 6:if(!n.t0){n.next=8;break}return n.abrupt("return");case 8:return n.t2=e.query().position,n.next=11,t.getCurrentTime();case 11:if(n.t3=n.sent,o=n.t2-n.t3,c=Math.abs(o),i.log("Drift: ".concat(o)),!(c>u)){n.next=22;break}return n.next=18,i.adjustSpeed(t,0);case 18:t.setCurrentTime(e.query().position),i.log("Resync by currentTime"),n.next=29;break;case 22:if(!(c>a)){n.next=29;break}return h=(f=c/s)<(d=l)?(d-f)/2:d,n.next=28,i.adjustSpeed(t,h*Math.sign(o));case 28:i.log("Resync by playbackRate");case 29:case"end":return n.stop()}},r)}));return function(){return r.apply(this,arguments)}}(),h=setInterval(function(){return d()},f);return{cancel:function(){return clearInterval(h)}}}},{key:"log",value:function(e){var t;null===(t=this.logger)||void 0===t||t.call(this,"TimingSrcConnector: ".concat(e))}},{key:"waitForTOReadyState",value:function(e,t){return new Promise(function(n){!function r(){e.readyState===t?n():e.addEventListener("readystatechange",r,{once:!0})}()})}}]),a}(),W=new WeakMap,z=new WeakMap,U={},G=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(i(this,e),window.jQuery&&t instanceof jQuery&&(t.length>1&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),t=t[0]),"undefined"!=typeof document&&"string"==typeof t&&(t=document.getElementById(t)),!function(e){return Boolean(e&&1===e.nodeType&&"nodeName"in e&&e.ownerDocument&&e.ownerDocument.defaultView)}(t))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"!==t.nodeName){var o=t.querySelector("iframe");o&&(t=o)}if("IFRAME"===t.nodeName&&!w(t.getAttribute("src")||""))throw new Error("The player element passed isn’t a Vimeo embed.");if(W.has(t))return W.get(t);this._window=t.ownerDocument.defaultView,this.element=t,this.origin="*";var a=new O(function(e,o){if(n._onMessage=function(t){if(w(t.origin)&&n.element.contentWindow===t.source){"*"===n.origin&&(n.origin=t.origin);var r=F(t.data);if(r&&"error"===r.event&&r.data&&"ready"===r.data.method){var i=new Error(r.data.message);return i.name=r.data.name,void o(i)}var a=r&&"ready"===r.event,u=r&&"ping"===r.method;if(a||u)return n.element.setAttribute("data-ready","true"),void e();L(n,r)}},n._window.addEventListener("message",n._onMessage),"IFRAME"!==n.element.nodeName){var i=R(t,r);I(k(i),i,t).then(function(e){var r,o,i,a=q(e,t);return n.element=a,n._originalElement=t,r=t,o=a,i=_.get(r),_.set(o,i),_.delete(r),W.set(n.element,n),e}).catch(o)}});if(z.set(this,a),W.set(this.element,this),"IFRAME"===this.element.nodeName&&N(this,"ping"),U.isEnabled){var u=function(){return U.exit()};this.fullscreenchangeHandler=function(){U.isFullscreen?M(n,"event:exitFullscreen",u):C(n,"event:exitFullscreen",u),n.ready().then(function(){N(n,"fullscreenchange",U.isFullscreen)})},U.on("fullscreenchange",this.fullscreenchangeHandler)}return this}return u(e,[{key:"callMethod",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new O(function(r,o){return t.ready().then(function(){M(t,e,{resolve:r,reject:o}),N(t,e,n)}).catch(o)})}},{key:"get",value:function(e){var t=this;return new O(function(n,r){return e=g(e,"get"),t.ready().then(function(){M(t,e,{resolve:n,reject:r}),N(t,e)}).catch(r)})}},{key:"set",value:function(e,t){var n=this;return new O(function(r,o){if(e=g(e,"set"),null==t)throw new TypeError("There must be a value to set.");return n.ready().then(function(){M(n,e,{resolve:r,reject:o}),N(n,e,t)}).catch(o)})}},{key:"on",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(!t)throw new TypeError("You must pass a callback function.");if("function"!=typeof t)throw new TypeError("The callback must be a function.");0===S(this,"event:".concat(e)).length&&this.callMethod("addEventListener",e).catch(function(){}),M(this,"event:".concat(e),t)}},{key:"off",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(t&&"function"!=typeof t)throw new TypeError("The callback must be a function.");C(this,"event:".concat(e),t)&&this.callMethod("removeEventListener",e).catch(function(e){})}},{key:"loadVideo",value:function(e){return this.callMethod("loadVideo",e)}},{key:"ready",value:function(){var e=z.get(this)||new O(function(e,t){t(new Error("Unknown player. Probably unloaded."))});return O.resolve(e)}},{key:"addCuePoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.callMethod("addCuePoint",{time:e,data:t})}},{key:"removeCuePoint",value:function(e){return this.callMethod("removeCuePoint",e)}},{key:"enableTextTrack",value:function(e,t){if(!e)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:e,kind:t})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"requestFullscreen",value:function(){return U.isEnabled?U.request(this.element):this.callMethod("requestFullscreen")}},{key:"exitFullscreen",value:function(){return U.isEnabled?U.exit():this.callMethod("exitFullscreen")}},{key:"getFullscreen",value:function(){return U.isEnabled?O.resolve(U.isFullscreen):this.get("fullscreen")}},{key:"requestPictureInPicture",value:function(){return this.callMethod("requestPictureInPicture")}},{key:"exitPictureInPicture",value:function(){return this.callMethod("exitPictureInPicture")}},{key:"getPictureInPicture",value:function(){return this.get("pictureInPicture")}},{key:"remotePlaybackPrompt",value:function(){return this.callMethod("remotePlaybackPrompt")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var e=this;return new O(function(t){if(z.delete(e),W.delete(e.element),e._originalElement&&(W.delete(e._originalElement),e._originalElement.removeAttribute("data-vimeo-initialized")),e.element&&"IFRAME"===e.element.nodeName&&e.element.parentNode&&(e.element.parentNode.parentNode&&e._originalElement&&e._originalElement!==e.element.parentNode?e.element.parentNode.parentNode.removeChild(e.element.parentNode):e.element.parentNode.removeChild(e.element)),e.element&&"DIV"===e.element.nodeName&&e.element.parentNode){e.element.removeAttribute("data-vimeo-initialized");var n=e.element.querySelector("iframe");n&&n.parentNode&&(n.parentNode.parentNode&&e._originalElement&&e._originalElement!==n.parentNode?n.parentNode.parentNode.removeChild(n.parentNode):n.parentNode.removeChild(n))}e._window.removeEventListener("message",e._onMessage),U.isEnabled&&U.off("fullscreenchange",e.fullscreenchangeHandler),t()})}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(e){return this.set("autopause",e)}},{key:"getBuffered",value:function(){return this.get("buffered")}},{key:"getCameraProps",value:function(){return this.get("cameraProps")}},{key:"setCameraProps",value:function(e){return this.set("cameraProps",e)}},{key:"getChapters",value:function(){return this.get("chapters")}},{key:"getCurrentChapter",value:function(){return this.get("currentChapter")}},{key:"getColor",value:function(){return this.get("color")}},{key:"getColors",value:function(){return O.all([this.get("colorOne"),this.get("colorTwo"),this.get("colorThree"),this.get("colorFour")])}},{key:"setColor",value:function(e){return this.set("color",e)}},{key:"setColors",value:function(e){if(!Array.isArray(e))return new O(function(e,t){return t(new TypeError("Argument must be an array."))});var t=new O(function(e){return e(null)}),n=[e[0]?this.set("colorOne",e[0]):t,e[1]?this.set("colorTwo",e[1]):t,e[2]?this.set("colorThree",e[2]):t,e[3]?this.set("colorFour",e[3]):t];return O.all(n)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(e){return this.set("currentTime",e)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(e){return this.set("loop",e)}},{key:"setMuted",value:function(e){return this.set("muted",e)}},{key:"getMuted",value:function(){return this.get("muted")}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(e){return this.set("playbackRate",e)}},{key:"getPlayed",value:function(){return this.get("played")}},{key:"getQualities",value:function(){return this.get("qualities")}},{key:"getQuality",value:function(){return this.get("quality")}},{key:"setQuality",value:function(e){return this.set("quality",e)}},{key:"getRemotePlaybackAvailability",value:function(){return this.get("remotePlaybackAvailability")}},{key:"getRemotePlaybackState",value:function(){return this.get("remotePlaybackState")}},{key:"getSeekable",value:function(){return this.get("seekable")}},{key:"getSeeking",value:function(){return this.get("seeking")}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(e){return this.set("volume",e)}},{key:"setTimingSrc",value:function(){var e=o(n().mark(function e(t,r){var o,i=this;return n().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw new TypeError("A Timing Object must be provided.");case 2:return e.next=4,this.ready();case 4:return o=new D(this,t,r),N(this,"notifyTimingObjectConnect"),o.addEventListener("disconnect",function(){return N(i,"notifyTimingObjectDisconnect")}),e.abrupt("return",o);case 8:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()}]),e}();return m||(U=function(){var e=function(){for(var e,t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n=0,r=t.length,o={};n<r;n++)if((e=t[n])&&e[1]in document){for(n=0;n<e.length;n++)o[t[0][n]]=e[n];return o}return!1}(),t={fullscreenchange:e.fullscreenchange,fullscreenerror:e.fullscreenerror},n={request:function(t){return new Promise(function(r,o){var i=function e(){n.off("fullscreenchange",e),r()};n.on("fullscreenchange",i);var a=(t=t||document.documentElement)[e.requestFullscreen]();a instanceof Promise&&a.then(i).catch(o)})},exit:function(){return new Promise(function(t,r){if(n.isFullscreen){var o=function e(){n.off("fullscreenchange",e),t()};n.on("fullscreenchange",o);var i=document[e.exitFullscreen]();i instanceof Promise&&i.then(o).catch(r)}else t()})},on:function(e,n){var r=t[e];r&&document.addEventListener(r,n)},off:function(e,n){var r=t[e];r&&document.removeEventListener(r,n)}};return Object.defineProperties(n,{isFullscreen:{get:function(){return Boolean(document[e.fullscreenElement])}},element:{enumerable:!0,get:function(){return document[e.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(document[e.fullscreenEnabled])}}}),n}(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=[].slice.call(e.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")),n=function(e){"console"in window&&console.error&&console.error("There was an error creating an embed: ".concat(e))};t.forEach(function(e){try{if(null!==e.getAttribute("data-vimeo-defer"))return;var t=R(e);I(k(t),t,e).then(function(t){return q(t,e)}).catch(n)}catch(e){n(e)}})}(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;window.VimeoPlayerResizeEmbeds_||(window.VimeoPlayerResizeEmbeds_=!0,window.addEventListener("message",function(t){if(w(t.origin)&&t.data&&"spacechange"===t.data.event)for(var n=e.querySelectorAll("iframe"),r=0;r<n.length;r++)if(n[r].contentWindow===t.source){n[r].parentElement.style.paddingBottom="".concat(t.data.data[0].bottom,"px");break}}))}(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;window.VimeoSeoMetadataAppended||(window.VimeoSeoMetadataAppended=!0,window.addEventListener("message",function(t){if(w(t.origin)){var n=F(t.data);if(n&&"ready"===n.event)for(var r=e.querySelectorAll("iframe"),o=0;o<r.length;o++){var i=r[o],a=i.contentWindow===t.source;b(i.src)&&a&&new G(i).callMethod("appendVideoMetadata",window.location.href)}}}))}(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;if(!window.VimeoCheckedUrlTimeParam){window.VimeoCheckedUrlTimeParam=!0;var t=function(e){"console"in window&&console.error&&console.error("There was an error getting video Id: ".concat(e))};window.addEventListener("message",function(n){if(w(n.origin)){var r=F(n.data);if(r&&"ready"===r.event)for(var o=e.querySelectorAll("iframe"),i=function(){var e=o[a],r=e.contentWindow===n.source;if(b(e.src)&&r){var i=new G(e);i.getVideoId().then(function(e){var t=new RegExp("[?&]vimeo_t_".concat(e,"=([^&#]*)")).exec(window.location.href);if(t&&t[1]){var n=decodeURI(t[1]);i.setCurrentTime(n)}}).catch(t)}},a=0;a<o.length;a++)i()}})}}()),G});
24
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e=e||self).Vimeo=e.Vimeo||{},e.Vimeo.Player=t())}(this,function(){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var e="undefined"!=typeof global&&"[object global]"==={}.toString.call(global);function i(e,t){return 0===e.indexOf(t.toLowerCase())?e:"".concat(t.toLowerCase()).concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}function s(e){return/^(https?:)?\/\/((player|www)\.)?vimeo\.com(?=$|\/)/.test(e)}function l(){var e,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=t.id,r=t.url,o=n||r;if(!o)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.");if(e=o,!isNaN(parseFloat(e))&&isFinite(e)&&Math.floor(e)==e)return"https://vimeo.com/".concat(o);if(s(o))return o.replace("http:","https:");if(n)throw new TypeError("“".concat(n,"” is not a valid video id."));throw new TypeError("“".concat(o,"” is not a vimeo.com url."))}var t=void 0!==Array.prototype.indexOf,n="undefined"!=typeof window&&void 0!==window.postMessage;if(!(e||t&&n))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var o="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};!function(e){if(!e.WeakMap){var n=Object.prototype.hasOwnProperty,o=function(e,t,n){Object.defineProperty?Object.defineProperty(e,t,{configurable:!0,writable:!0,value:n}):e[t]=n};e.WeakMap=function(){function e(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(o(this,"_id","_WeakMap"+"_"+t()+"."+t()),0<arguments.length)throw new TypeError("WeakMap iterable is not supported")}function r(e,t){if(!i(e)||!n.call(e,"_id"))throw new TypeError(t+" method called on incompatible receiver "+typeof e)}function t(){return Math.random().toString().substring(2)}return o(e.prototype,"delete",function(e){if(r(this,"delete"),!i(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)&&(delete e[this._id],!0)}),o(e.prototype,"get",function(e){if(r(this,"get"),i(e)){var t=e[this._id];return t&&t[0]===e?t[1]:void 0}}),o(e.prototype,"has",function(e){if(r(this,"has"),!i(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)}),o(e.prototype,"set",function(e,t){if(r(this,"set"),!i(e))throw new TypeError("Invalid value used as weak map key");var n=e[this._id];return n&&n[0]===e?n[1]=t:o(e,this._id,[e,t]),this}),o(e,"_polyfill",!0),e}()}function i(e){return Object(e)===e}}("undefined"!=typeof self?self:"undefined"!=typeof window?window:o);var a,f=(function(e){var t,n,r;r=function(){var t,a,n,e=Object.prototype.toString,r="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(e){t=function(e,t,n){return e[t]=n,e}}function i(e,t){n.add(e,t),a||(a=r(n.drain))}function u(e){var t,n=typeof e;return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function c(){for(var e=0;e<this.chain.length;e++)o(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function o(e,t,n){var r,o;try{!1===t?n.reject(e.msg):(r=!0===t?e.msg:t.call(void 0,e.msg))===n.promise?n.reject(TypeError("Promise-chain cycle")):(o=u(r))?o.call(r,n.resolve,n.reject):n.resolve(r)}catch(e){n.reject(e)}}function s(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,0<t.chain.length&&i(c,t))}function l(e,n,r,o){for(var t=0;t<n.length;t++)!function(t){e.resolve(n[t]).then(function(e){r(t,e)},o)}(t)}function f(e){this.def=e,this.triggered=!1}function d(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function h(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var r=new d(this);this.then=function(e,t){var n={success:"function"!=typeof e||e,failure:"function"==typeof t&&t};return n.promise=new this.constructor(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");n.resolve=e,n.reject=t}),r.chain.push(n),0!==r.state&&i(c,r),n.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,function(e){(function e(n){var r,o=this;if(!o.triggered){o.triggered=!0,o.def&&(o=o.def);try{(r=u(n))?i(function(){var t=new f(o);try{r.call(n,function(){e.apply(t,arguments)},function(){s.apply(t,arguments)})}catch(e){s.call(t,e)}}):(o.msg=n,o.state=1,0<o.chain.length&&i(c,o))}catch(e){s.call(new f(o),e)}}}).call(r,e)},function(e){s.call(r,e)})}catch(e){s.call(r,e)}}n=function(){var n,r,o;function i(e,t){this.fn=e,this.self=t,this.next=void 0}return{add:function(e,t){o=new i(e,t),r?r.next=o:n=o,r=o,o=void 0},drain:function(){var e=n;for(n=r=a=void 0;e;)e.fn.call(e.self),e=e.next}}}();var v=t({},"constructor",h,!1);return t(h.prototype=v,"__NPO__",0,!1),t(h,"resolve",function(n){return n&&"object"==typeof n&&1===n.__NPO__?n:new this(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");e(n)})}),t(h,"reject",function(n){return new this(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");t(n)})}),t(h,"all",function(t){var a=this;return"[object Array]"!=e.call(t)?a.reject(TypeError("Not an array")):0===t.length?a.resolve([]):new a(function(n,e){if("function"!=typeof n||"function"!=typeof e)throw TypeError("Not a function");var r=t.length,o=Array(r),i=0;l(a,t,function(e,t){o[e]=t,++i===r&&n(o)},e)})}),t(h,"race",function(t){var r=this;return"[object Array]"!=e.call(t)?r.reject(TypeError("Not an array")):new r(function(n,e){if("function"!=typeof n||"function"!=typeof e)throw TypeError("Not a function");l(r,t,function(e,t){n(t)},e)})}),h},(n=o)[t="Promise"]=n[t]||r(),e.exports&&(e.exports=n[t])}(a={exports:{}},a.exports),a.exports),d=new WeakMap;function u(e,t,n){var r=d.get(e.element)||{};t in r||(r[t]=[]),r[t].push(n),d.set(e.element,r)}function c(e,t){return(d.get(e.element)||{})[t]||[]}function h(e,t,n){var r=d.get(e.element)||{};if(!r[t])return!0;if(!n)return r[t]=[],d.set(e.element,r),!0;var o=r[t].indexOf(n);return-1!==o&&r[t].splice(o,1),d.set(e.element,r),r[t]&&0===r[t].length}var v=["autopause","autoplay","background","byline","color","controls","dnt","height","id","loop","maxheight","maxwidth","muted","playsinline","portrait","responsive","speed","texttrack","title","transparent","url","width"];function p(r){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return v.reduce(function(e,t){var n=r.getAttribute("data-vimeo-".concat(t));return(n||""===n)&&(e[t]=""===n?1:n),e},e)}function y(e,t){var n=e.html;if(!t)throw new TypeError("An element must be provided");if(null!==t.getAttribute("data-vimeo-initialized"))return t.querySelector("iframe");var r=document.createElement("div");return r.innerHTML=n,t.appendChild(r.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe")}function m(i){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},u=2<arguments.length?arguments[2]:void 0;return new Promise(function(t,n){if(!s(i))throw new TypeError("“".concat(i,"” is not a vimeo.com url."));var e="https://vimeo.com/api/oembed.json?url=".concat(encodeURIComponent(i));for(var r in a)a.hasOwnProperty(r)&&(e+="&".concat(r,"=").concat(encodeURIComponent(a[r])));var o="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;o.open("GET",e,!0),o.onload=function(){if(404!==o.status)if(403!==o.status)try{var e=JSON.parse(o.responseText);if(403===e.domain_status_code)return y(e,u),void n(new Error("“".concat(i,"” is not embeddable.")));t(e)}catch(e){n(e)}else n(new Error("“".concat(i,"” is not embeddable.")));else n(new Error("“".concat(i,"” was not found.")))},o.onerror=function(){var e=o.status?" (".concat(o.status,")"):"";n(new Error("There was an error fetching the embed code from Vimeo".concat(e,".")))},o.send()})}function g(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return console.warn(e),{}}return e}function w(e,t,n){if(e.element.contentWindow&&e.element.contentWindow.postMessage){var r={method:t};void 0!==n&&(r.value=n);var o=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1"));8<=o&&o<10&&(r=JSON.stringify(r)),e.element.contentWindow.postMessage(r,e.origin)}}function b(n,r){var t,e=[];if((r=g(r)).event){if("error"===r.event)c(n,r.data.method).forEach(function(e){var t=new Error(r.data.message);t.name=r.data.name,e.reject(t),h(n,r.data.method,e)});e=c(n,"event:".concat(r.event)),t=r.data}else if(r.method){var o=function(e,t){var n=c(e,t);if(n.length<1)return!1;var r=n.shift();return h(e,t,r),r}(n,r.method);o&&(e.push(o),t=r.value)}e.forEach(function(e){try{if("function"==typeof e)return void e.call(n,t);e.resolve(t)}catch(e){}})}var k=new WeakMap,E=new WeakMap,Player=function(){function Player(u){var e,c=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Player),window.jQuery&&u instanceof jQuery&&(1<u.length&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),u=u[0]),"undefined"!=typeof document&&"string"==typeof u&&(u=document.getElementById(u)),e=u,!Boolean(e&&1===e.nodeType&&"nodeName"in e&&e.ownerDocument&&e.ownerDocument.defaultView))throw new TypeError("You must pass either a valid element or a valid id.");var r=u.ownerDocument.defaultView;if("IFRAME"!==u.nodeName){var t=u.querySelector("iframe");t&&(u=t)}if("IFRAME"===u.nodeName&&!s(u.getAttribute("src")||""))throw new Error("The player element passed isn’t a Vimeo embed.");if(k.has(u))return k.get(u);this.element=u,this.origin="*";var o=new f(function(i,a){var e=function(e){if(s(e.origin)&&c.element.contentWindow===e.source){"*"===c.origin&&(c.origin=e.origin);var t=g(e.data);if(t&&"error"===t.event&&t.data&&"ready"===t.data.method){var n=new Error(t.data.message);return n.name=t.data.name,void a(n)}var r=t&&"ready"===t.event,o=t&&"ping"===t.method;if(r||o)return c.element.setAttribute("data-ready","true"),void i();b(c,t)}};if(r.addEventListener?r.addEventListener("message",e,!1):r.attachEvent&&r.attachEvent("onmessage",e),"IFRAME"!==c.element.nodeName){var t=p(u,n);m(l(t),t,u).then(function(e){var t,n,r,o=y(e,u);return c.element=o,c._originalElement=u,t=u,n=o,r=d.get(t),d.set(n,r),d.delete(t),k.set(c.element,c),e}).catch(a)}});return E.set(this,o),k.set(this.element,this),"IFRAME"===this.element.nodeName&&w(this,"ping"),this}var e,t,n;return e=Player,(t=[{key:"callMethod",value:function(n){var r=this,o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return new f(function(e,t){return r.ready().then(function(){u(r,n,{resolve:e,reject:t}),w(r,n,o)}).catch(t)})}},{key:"get",value:function(n){var r=this;return new f(function(e,t){return n=i(n,"get"),r.ready().then(function(){u(r,n,{resolve:e,reject:t}),w(r,n)}).catch(t)})}},{key:"set",value:function(n,r){var o=this;return new f(function(e,t){if(n=i(n,"set"),null==r)throw new TypeError("There must be a value to set.");return o.ready().then(function(){u(o,n,{resolve:e,reject:t}),w(o,n,r)}).catch(t)})}},{key:"on",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(!t)throw new TypeError("You must pass a callback function.");if("function"!=typeof t)throw new TypeError("The callback must be a function.");0===c(this,"event:".concat(e)).length&&this.callMethod("addEventListener",e).catch(function(){}),u(this,"event:".concat(e),t)}},{key:"off",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(t&&"function"!=typeof t)throw new TypeError("The callback must be a function.");h(this,"event:".concat(e),t)&&this.callMethod("removeEventListener",e).catch(function(e){})}},{key:"loadVideo",value:function(e){return this.callMethod("loadVideo",e)}},{key:"ready",value:function(){var e=E.get(this)||new f(function(e,t){t(new Error("Unknown player. Probably unloaded."))});return f.resolve(e)}},{key:"addCuePoint",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return this.callMethod("addCuePoint",{time:e,data:t})}},{key:"removeCuePoint",value:function(e){return this.callMethod("removeCuePoint",e)}},{key:"enableTextTrack",value:function(e,t){if(!e)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:e,kind:t})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var t=this;return new f(function(e){E.delete(t),k.delete(t.element),t._originalElement&&(k.delete(t._originalElement),t._originalElement.removeAttribute("data-vimeo-initialized")),t.element&&"IFRAME"===t.element.nodeName&&t.element.parentNode&&t.element.parentNode.removeChild(t.element),e()})}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(e){return this.set("autopause",e)}},{key:"getBuffered",value:function(){return this.get("buffered")}},{key:"getColor",value:function(){return this.get("color")}},{key:"setColor",value:function(e){return this.set("color",e)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(e){return this.set("currentTime",e)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(e){return this.set("loop",e)}},{key:"setMuted",value:function(e){return this.set("muted",e)}},{key:"getMuted",value:function(){return this.get("muted")}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(e){return this.set("playbackRate",e)}},{key:"getPlayed",value:function(){return this.get("played")}},{key:"getSeekable",value:function(){return this.get("seekable")}},{key:"getSeeking",value:function(){return this.get("seeking")}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(e){return this.set("volume",e)}}])&&r(e.prototype,t),n&&r(e,n),Player}();return e||(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:document,t=[].slice.call(e.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")),n=function(e){"console"in window&&console.error&&console.error("There was an error creating an embed: ".concat(e))};t.forEach(function(t){try{if(null!==t.getAttribute("data-vimeo-defer"))return;var e=p(t);m(l(e),e,t).then(function(e){return y(e,t)}).catch(n)}catch(e){n(e)}})}(),function(){var r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:document;if(!window.VimeoPlayerResizeEmbeds_){window.VimeoPlayerResizeEmbeds_=!0;var e=function(e){if(s(e.origin)&&e.data&&"spacechange"===e.data.event)for(var t=r.querySelectorAll("iframe"),n=0;n<t.length;n++)if(t[n].contentWindow===e.source){t[n].parentElement.style.paddingBottom="".concat(e.data.data[0].bottom,"px");break}};window.addEventListener?window.addEventListener("message",e,!1):window.attachEvent&&window.attachEvent("onmessage",e)}}()),Player});
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 Kevin Aguiar <kevin.aguiar@mobiliza.com.br> and videojs-vimeo contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,54 @@
1
+ # Videojs Vimeo plugin hard fork
2
+
3
+ ## videojs-vimeo official plugin fork for supporting videojs v7.6.6 onwards.
4
+
5
+ This project is a hard fork of the currently unmaintained official
6
+ videojs-vimeo plugin: https://github.com/videojs/videojs-vimeo
7
+
8
+ This fork has some significant changes in project structure:
9
+
10
+ - Build now uses rollup;
11
+ - Project linting now uses eslint + videojs styleguide;
12
+ - Project folder structure reworked;
13
+ - Lib version reseted relative to the official plugin.
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ npm i @devmobiliza/videojs-vimeo
19
+ // OR
20
+ yarn add @devmobiliza/videojs-vimeo
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ - CommonJS:
26
+
27
+ ```js
28
+ import videojs from 'video.js';
29
+ import '@devmobiliza/videojs-vimeo/dist/videojs-vimeo.cjs';
30
+ ```
31
+
32
+ - Module:
33
+
34
+ ```js
35
+ import videojs from 'video.js';
36
+ import '@devmobiliza/videojs-vimeo/dist/videojs-vimeo.esm';
37
+ ```
38
+
39
+ - Browser:
40
+
41
+ See [index.html](https://github.com/Mobiliza/videojs-vimeo/blob/master/index.html)
42
+
43
+ ## Events / Vimeo Options
44
+
45
+ Events, like `on('play')`, `one('play')` work as per the video.js
46
+ API: https://docs.videojs.com/
47
+
48
+ For setting the time of the player the `videojs.currentTime(TIME_SECONDS)`
49
+ function can be used.
50
+
51
+ Vimeo options are available here (must be used with the `vimeo` key in
52
+ the options object of the video.js):
53
+ https://vimeo.zendesk.com/hc/pt/articles/360001494447-Usando-os-par%C3%A2metros-do-player
54
+