classicy 0.5.9 → 0.5.18

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 (223) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +32 -197
  3. package/dist/Preview-B06KD3T-.mjs +86 -0
  4. package/dist/classocy.css +1 -0
  5. package/dist/classocy.es.js +33767 -0
  6. package/dist/classocy.umd.js +3773 -0
  7. package/dist/dash.all.min-DImUSJ65.mjs +18804 -0
  8. package/dist/hls-D6RfXIgo.mjs +21708 -0
  9. package/dist/index-QIA8HMdL.mjs +15813 -0
  10. package/dist/index.d.ts +2 -0
  11. package/{SystemFolder → dist/lib/components/SystemFolder}/ControlPanels/AppManager/ClassicyAppManager.d.ts +4 -4
  12. package/{SystemFolder → dist/lib/components/SystemFolder}/ControlPanels/AppManager/ClassicyAppManagerContext.d.ts +1 -1
  13. package/dist/lib/components/SystemFolder/ControlPanels/AppManager/index.d.ts +2 -0
  14. package/{SystemFolder → dist/lib/components/SystemFolder}/ControlPanels/AppearanceManager/ClassicyAppearance.d.ts +2 -2
  15. package/{SystemFolder → dist/lib/components/SystemFolder}/ControlPanels/AppearanceManager/ClassicyAppearanceManager.d.ts +1 -1
  16. package/dist/lib/components/SystemFolder/ControlPanels/AppearanceManager/index.d.ts +4 -0
  17. package/dist/lib/components/SystemFolder/ControlPanels/ClassicyControlPanels.d.ts +1 -0
  18. package/{SystemFolder → dist/lib/components/SystemFolder}/ControlPanels/DateAndTimeManager/ClassicyDateAndTimeManager.d.ts +2 -2
  19. package/dist/lib/components/SystemFolder/ControlPanels/DateAndTimeManager/index.d.ts +1 -0
  20. package/dist/lib/components/SystemFolder/ControlPanels/SoundManager/ClassicySoundManager.d.ts +2 -0
  21. package/{SystemFolder → dist/lib/components/SystemFolder}/ControlPanels/SoundManager/ClassicySoundManagerContext.d.ts +2 -2
  22. package/dist/lib/components/SystemFolder/ControlPanels/SoundManager/index.d.ts +3 -0
  23. package/dist/lib/components/SystemFolder/ControlPanels/index.d.ts +5 -0
  24. package/dist/lib/components/SystemFolder/Finder/Finder.d.ts +1 -0
  25. package/dist/lib/components/SystemFolder/Finder/FinderContext.d.ts +2 -0
  26. package/dist/lib/components/SystemFolder/Finder/index.d.ts +2 -0
  27. package/{SystemFolder → dist/lib/components/SystemFolder}/QuickTime/MoviePlayer/MoviePlayerContext.d.ts +1 -1
  28. package/{SystemFolder → dist/lib/components/SystemFolder}/QuickTime/PictureViewer/PictureViewerContext.d.ts +2 -2
  29. package/{SystemFolder/QuickTime → dist/lib/components/SystemFolder/QuickTimeApp}/MoviePlayer/MoviePlayer.d.ts +1 -1
  30. package/dist/lib/components/SystemFolder/QuickTimeApp/MoviePlayer/MoviePlayerContext.d.ts +15 -0
  31. package/dist/lib/components/SystemFolder/QuickTimeApp/MoviePlayer/index.d.ts +2 -0
  32. package/{SystemFolder/QuickTime → dist/lib/components/SystemFolder/QuickTimeApp}/PictureViewer/PictureViewer.d.ts +1 -1
  33. package/dist/lib/components/SystemFolder/QuickTimeApp/PictureViewer/PictureViewerContext.d.ts +9 -0
  34. package/dist/lib/components/SystemFolder/QuickTimeApp/PictureViewer/index.d.ts +2 -0
  35. package/dist/lib/components/SystemFolder/QuickTimeApp/index.d.ts +2 -0
  36. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/AboutWindow/ClassicyAboutWindow.d.ts +3 -4
  37. package/dist/lib/components/SystemFolder/SystemResources/AboutWindow/index.d.ts +1 -0
  38. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/App/ClassicyApp.d.ts +1 -1
  39. package/dist/lib/components/SystemFolder/SystemResources/App/index.d.ts +2 -0
  40. package/dist/lib/components/SystemFolder/SystemResources/Boot/ClassicyBoot.d.ts +2 -0
  41. package/dist/lib/components/SystemFolder/SystemResources/Boot/index.d.ts +1 -0
  42. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/Button/ClassicyButton.d.ts +1 -2
  43. package/dist/lib/components/SystemFolder/SystemResources/Button/index.d.ts +1 -0
  44. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/Checkbox/ClassicyCheckbox.d.ts +1 -2
  45. package/dist/lib/components/SystemFolder/SystemResources/Checkbox/index.d.ts +1 -0
  46. package/dist/lib/components/SystemFolder/SystemResources/ContextualMenu/ClassicyContextualMenu.d.ts +9 -0
  47. package/dist/lib/components/SystemFolder/SystemResources/ContextualMenu/index.d.ts +1 -0
  48. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/ControlGroup/ClassicyControlGroup.d.ts +1 -2
  49. package/dist/lib/components/SystemFolder/SystemResources/ControlGroup/index.d.ts +1 -0
  50. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/ControlLabel/ClassicyControlLabel.d.ts +1 -2
  51. package/dist/lib/components/SystemFolder/SystemResources/ControlLabel/index.d.ts +1 -0
  52. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/DatePicker/ClassicyDatePicker.d.ts +1 -2
  53. package/dist/lib/components/SystemFolder/SystemResources/DatePicker/index.d.ts +2 -0
  54. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/Desktop/ClassicyDesktop.d.ts +1 -3
  55. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/Desktop/ClassicyDesktopIcon.d.ts +1 -2
  56. package/dist/lib/components/SystemFolder/SystemResources/Desktop/ClassicyDesktopIconContext.d.ts +4 -0
  57. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/Desktop/ClassicyDesktopManager.d.ts +3 -3
  58. package/dist/lib/components/SystemFolder/SystemResources/Desktop/ClassicyDesktopWindowManagerContext.d.ts +2 -0
  59. package/dist/lib/components/SystemFolder/SystemResources/Desktop/MenuBar/ClassicyDesktopMenuBar.d.ts +2 -0
  60. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/Desktop/MenuBar/Widgets/Sound/ClassicyDesktopMenuWidgetSound.d.ts +1 -3
  61. package/dist/lib/components/SystemFolder/SystemResources/Desktop/MenuBar/Widgets/Sound/index.d.ts +1 -0
  62. package/dist/lib/components/SystemFolder/SystemResources/Desktop/MenuBar/Widgets/Time/ClassicyDesktopMenuWidgetTime.d.ts +2 -0
  63. package/dist/lib/components/SystemFolder/SystemResources/Desktop/MenuBar/Widgets/Time/index.d.ts +1 -0
  64. package/dist/lib/components/SystemFolder/SystemResources/Desktop/MenuBar/Widgets/index.d.ts +2 -0
  65. package/dist/lib/components/SystemFolder/SystemResources/Desktop/MenuBar/index.d.ts +2 -0
  66. package/dist/lib/components/SystemFolder/SystemResources/Desktop/index.d.ts +6 -0
  67. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/Disclosure/ClassicyDisclosure.d.ts +1 -2
  68. package/dist/lib/components/SystemFolder/SystemResources/Disclosure/index.d.ts +1 -0
  69. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/File/ClassicyFileBrowser.d.ts +2 -2
  70. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/File/ClassicyFileBrowserUtils.d.ts +1 -1
  71. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/File/ClassicyFileBrowserViewIcons.d.ts +2 -2
  72. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/File/ClassicyFileBrowserViewTable.d.ts +2 -3
  73. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/File/ClassicyFileSystem.d.ts +1 -1
  74. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/File/DefaultClassicyFileSystem.d.ts +1 -1
  75. package/dist/lib/components/SystemFolder/SystemResources/File/index.d.ts +7 -0
  76. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/Icon/ClassicyIcon.d.ts +1 -2
  77. package/dist/lib/components/SystemFolder/SystemResources/Icon/index.d.ts +1 -0
  78. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/Input/ClassicyInput.d.ts +1 -2
  79. package/dist/lib/components/SystemFolder/SystemResources/Input/index.d.ts +1 -0
  80. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/Menu/ClassicyMenu.d.ts +1 -2
  81. package/dist/lib/components/SystemFolder/SystemResources/Menu/index.d.ts +1 -0
  82. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/PopUpMenu/ClassicyPopUpMenu.d.ts +1 -2
  83. package/dist/lib/components/SystemFolder/SystemResources/PopUpMenu/index.d.ts +1 -0
  84. package/dist/lib/components/SystemFolder/SystemResources/ProgressBar/ClassicyProgressBar.d.ts +0 -0
  85. package/dist/lib/components/SystemFolder/SystemResources/ProgressBar/index.d.ts +1 -0
  86. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/QuickTime/QuickTimeMovieEmbed.d.ts +1 -2
  87. package/dist/lib/components/SystemFolder/SystemResources/QuickTime/index.d.ts +2 -0
  88. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/RadioInput/ClassicyRadioInput.d.ts +1 -2
  89. package/dist/lib/components/SystemFolder/SystemResources/RadioInput/index.d.ts +1 -0
  90. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/RichTextEditor/ClassicyRichTextEditor.d.ts +1 -2
  91. package/dist/lib/components/SystemFolder/SystemResources/RichTextEditor/index.d.ts +1 -0
  92. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/Tabs/ClassicyTabs.d.ts +1 -2
  93. package/dist/lib/components/SystemFolder/SystemResources/Tabs/index.d.ts +1 -0
  94. package/dist/lib/components/SystemFolder/SystemResources/TextEditor/ClassicyTextEditor.d.ts +0 -0
  95. package/dist/lib/components/SystemFolder/SystemResources/TextEditor/index.d.ts +1 -0
  96. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/TimePicker/ClassicyTimePicker.d.ts +1 -2
  97. package/dist/lib/components/SystemFolder/SystemResources/TimePicker/index.d.ts +1 -0
  98. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/Window/ClassicyWindow.d.ts +2 -3
  99. package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/Window/ClassicyWindowContext.d.ts +1 -1
  100. package/dist/lib/components/SystemFolder/SystemResources/Window/index.d.ts +2 -0
  101. package/dist/lib/components/SystemFolder/SystemResources/index.d.ts +24 -0
  102. package/dist/lib/components/SystemFolder/index.d.ts +3 -0
  103. package/dist/lib/components/index.d.ts +1 -0
  104. package/dist/lib/index.d.ts +1 -0
  105. package/dist/lib/storybook-utils.d.ts +4 -0
  106. package/dist/mixin-W-X7UVn9.mjs +780 -0
  107. package/dist/react-6cTPiRGz.mjs +285 -0
  108. package/dist/react-BwkETl1n.mjs +520 -0
  109. package/dist/react-BxlQMOfz.mjs +418 -0
  110. package/dist/react-COAP-MIW.mjs +376 -0
  111. package/dist/react-CkLX6aCd.mjs +372 -0
  112. package/dist/react-CpEfuIRC.mjs +458 -0
  113. package/dist/react-ad5TEs09.mjs +237 -0
  114. package/dist/react-fDIY1ne4.mjs +3100 -0
  115. package/package.json +36 -75
  116. package/173.index.js +0 -2
  117. package/173.index.js.LICENSE.txt +0 -25
  118. package/262.index.js +0 -2
  119. package/262.index.js.LICENSE.txt +0 -11
  120. package/303.index.js +0 -2
  121. package/303.index.js.LICENSE.txt +0 -1
  122. package/340.index.js +0 -2
  123. package/340.index.js.LICENSE.txt +0 -11
  124. package/353.index.js +0 -1
  125. package/394.index.js +0 -1
  126. package/395.index.js +0 -2
  127. package/395.index.js.LICENSE.txt +0 -11
  128. package/3c6dd90084fa516904c8.svg +0 -35
  129. package/42.index.js +0 -2
  130. package/42.index.js.LICENSE.txt +0 -11
  131. package/446.index.js +0 -2
  132. package/446.index.js.LICENSE.txt +0 -11
  133. package/723.index.js +0 -73
  134. package/723.index.js.LICENSE.txt +0 -7
  135. package/771.index.js +0 -2
  136. package/771.index.js.LICENSE.txt +0 -11
  137. package/85.index.js +0 -2
  138. package/85.index.js.LICENSE.txt +0 -11
  139. package/SystemFolder/ControlPanels/ClassicyControlPanels.d.ts +0 -2
  140. package/SystemFolder/ControlPanels/SoundManager/ClassicySoundManager.d.ts +0 -3
  141. package/SystemFolder/Finder/Finder.d.ts +0 -2
  142. package/SystemFolder/Finder/FinderContext.d.ts +0 -2
  143. package/SystemFolder/SystemResources/Boot/ClassicyBoot.d.ts +0 -3
  144. package/SystemFolder/SystemResources/ContextualMenu/ClassicyContextualMenu.d.ts +0 -11
  145. package/SystemFolder/SystemResources/Desktop/ClassicyDesktopIconContext.d.ts +0 -4
  146. package/SystemFolder/SystemResources/Desktop/ClassicyDesktopWindowManagerContext.d.ts +0 -3
  147. package/SystemFolder/SystemResources/Desktop/MenuBar/ClassicyDesktopMenuBar.d.ts +0 -4
  148. package/SystemFolder/SystemResources/Desktop/MenuBar/Widgets/Time/ClassicyDesktopMenuWidgetTime.d.ts +0 -4
  149. package/SystemFolder/SystemResources/ProgressBar/ClassicyProgressBar.d.ts +0 -1
  150. package/SystemFolder/SystemResources/TextEditor/ClassicyTextEditor.d.ts +0 -1
  151. package/assets/img/icons/control-panels/appearance-manager/app.png +0 -0
  152. package/assets/img/icons/control-panels/appearance-manager/platinum.png +0 -0
  153. package/assets/img/icons/control-panels/date-time-manager/date-time-manager.png +0 -0
  154. package/assets/img/icons/control-panels/sound-manager/app.png +0 -0
  155. package/assets/img/icons/control-panels/sound-manager/sound-33.png +0 -0
  156. package/assets/img/icons/control-panels/sound-manager/sound-66.png +0 -0
  157. package/assets/img/icons/control-panels/sound-manager/sound-off.png +0 -0
  158. package/assets/img/icons/control-panels/sound-manager/sound-on.png +0 -0
  159. package/assets/img/icons/system/apple.png +0 -0
  160. package/assets/img/icons/system/drives/disk.png +0 -0
  161. package/assets/img/icons/system/files/file.png +0 -0
  162. package/assets/img/icons/system/folders/directory.png +0 -0
  163. package/assets/img/icons/system/mac.png +0 -0
  164. package/assets/img/icons/system/macos.png +0 -0
  165. package/assets/img/icons/system/quicktime/cc.png +0 -0
  166. package/assets/img/icons/system/quicktime/movie.png +0 -0
  167. package/assets/img/icons/system/quicktime/player.png +0 -0
  168. package/assets/img/wallpapers/azul_dark.png +0 -0
  169. package/assets/img/wallpapers/azul_extra_light.png +0 -0
  170. package/assets/img/wallpapers/azul_light.png +0 -0
  171. package/assets/img/wallpapers/bondi.png +0 -0
  172. package/assets/img/wallpapers/bondi_dark.png +0 -0
  173. package/assets/img/wallpapers/bondi_extra_dark.png +0 -0
  174. package/assets/img/wallpapers/bondi_light.png +0 -0
  175. package/assets/img/wallpapers/bondi_medium.png +0 -0
  176. package/assets/img/wallpapers/bossanova_bondi.png +0 -0
  177. package/assets/img/wallpapers/bossanova_poppy.png +0 -0
  178. package/assets/img/wallpapers/bossanova_poppy_2.png +0 -0
  179. package/assets/img/wallpapers/bubbles_bondi.png +0 -0
  180. package/assets/img/wallpapers/bubbles_poppy.png +0 -0
  181. package/assets/img/wallpapers/candy_bar.png +0 -0
  182. package/assets/img/wallpapers/candy_bar_azul.png +0 -0
  183. package/assets/img/wallpapers/candy_bar_pistachio.png +0 -0
  184. package/assets/img/wallpapers/candy_bar_sunny.png +0 -0
  185. package/assets/img/wallpapers/default.png +0 -0
  186. package/assets/img/wallpapers/diagonals_bondi.png +0 -0
  187. package/assets/img/wallpapers/diagonals_bondi_dark.png +0 -0
  188. package/assets/img/wallpapers/diagonals_poppy.png +0 -0
  189. package/assets/img/wallpapers/flat_peanuts.png +0 -0
  190. package/assets/img/wallpapers/flat_peanuts_poppy.png +0 -0
  191. package/assets/img/wallpapers/french_blue_dark.png +0 -0
  192. package/assets/img/wallpapers/french_blue_light.png +0 -0
  193. package/assets/img/wallpapers/macos.png +0 -0
  194. package/assets/img/wallpapers/peanuts_azul.png +0 -0
  195. package/assets/img/wallpapers/peanuts_pistachio.png +0 -0
  196. package/assets/img/wallpapers/pistachio_dark.png +0 -0
  197. package/assets/img/wallpapers/pistachio_light.png +0 -0
  198. package/assets/img/wallpapers/pistachio_medium.png +0 -0
  199. package/assets/img/wallpapers/poppy.png +0 -0
  200. package/assets/img/wallpapers/poppy_dark.png +0 -0
  201. package/assets/img/wallpapers/poppy_light.png +0 -0
  202. package/assets/img/wallpapers/poppy_medium.png +0 -0
  203. package/assets/img/wallpapers/rio_azul.png +0 -0
  204. package/assets/img/wallpapers/rio_pistachio.png +0 -0
  205. package/assets/img/wallpapers/ripple_azul.png +0 -0
  206. package/assets/img/wallpapers/ripple_bondi.png +0 -0
  207. package/assets/img/wallpapers/ripple_poppy.png +0 -0
  208. package/assets/img/wallpapers/sunny.png +0 -0
  209. package/assets/img/wallpapers/sunny_dark.png +0 -0
  210. package/assets/img/wallpapers/sunny_light.png +0 -0
  211. package/assets/img/wallpapers/waves_azul.png +0 -0
  212. package/assets/img/wallpapers/waves_bondi.png +0 -0
  213. package/assets/img/wallpapers/waves_sunny.png +0 -0
  214. package/e7dead02eb942a2c597f.svg +0 -49
  215. package/index.d.ts +0 -57
  216. package/index.js +0 -2
  217. package/index.js.LICENSE.txt +0 -86
  218. /package/{SystemFolder → dist/lib/components/SystemFolder}/ControlPanels/AppearanceManager/ClassicyColors.d.ts +0 -0
  219. /package/{SystemFolder → dist/lib/components/SystemFolder}/ControlPanels/AppearanceManager/ClassicySize.d.ts +0 -0
  220. /package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/App/ClassicyAppUtils.d.ts +0 -0
  221. /package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/DatePicker/ClassicyDatePickerUtils.d.ts +0 -0
  222. /package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/File/ClassicyFileSystemModel.d.ts +0 -0
  223. /package/{SystemFolder → dist/lib/components/SystemFolder}/SystemResources/QuickTime/QuickTimeUtils.d.ts +0 -0
@@ -0,0 +1,3100 @@
1
+ var rt = Object.defineProperty;
2
+ var Re = (r) => {
3
+ throw TypeError(r);
4
+ };
5
+ var nt = (r, t, e) => t in r ? rt(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
6
+ var fe = (r, t, e) => nt(r, typeof t != "symbol" ? t + "" : t, e), Me = (r, t, e) => t.has(r) || Re("Cannot " + e);
7
+ var _ = (r, t, e) => (Me(r, t, "read from private field"), e ? e.call(r) : t.get(r)), L = (r, t, e) => t.has(r) ? Re("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e), P = (r, t, e, n) => (Me(r, t, "write to private field"), n ? n.call(r, e) : t.set(r, e), e), Le = (r, t, e) => (Me(r, t, "access private method"), e);
8
+ import it from "react";
9
+ /*! @vimeo/player v2.29.0 | (c) 2025 Vimeo | MIT License | https://github.com/vimeo/player.js */
10
+ function je(r, t) {
11
+ var e = Object.keys(r);
12
+ if (Object.getOwnPropertySymbols) {
13
+ var n = Object.getOwnPropertySymbols(r);
14
+ t && (n = n.filter(function(i) {
15
+ return Object.getOwnPropertyDescriptor(r, i).enumerable;
16
+ })), e.push.apply(e, n);
17
+ }
18
+ return e;
19
+ }
20
+ function Ie(r) {
21
+ for (var t = 1; t < arguments.length; t++) {
22
+ var e = arguments[t] != null ? arguments[t] : {};
23
+ t % 2 ? je(Object(e), !0).forEach(function(n) {
24
+ ge(r, n, e[n]);
25
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(e)) : je(Object(e)).forEach(function(n) {
26
+ Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(e, n));
27
+ });
28
+ }
29
+ return r;
30
+ }
31
+ function I() {
32
+ I = function() {
33
+ return r;
34
+ };
35
+ var r = {}, t = Object.prototype, e = t.hasOwnProperty, n = Object.defineProperty || function(c, l, d) {
36
+ c[l] = d.value;
37
+ }, i = typeof Symbol == "function" ? Symbol : {}, a = i.iterator || "@@iterator", o = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag";
38
+ function h(c, l, d) {
39
+ return Object.defineProperty(c, l, {
40
+ value: d,
41
+ enumerable: !0,
42
+ configurable: !0,
43
+ writable: !0
44
+ }), c[l];
45
+ }
46
+ try {
47
+ h({}, "");
48
+ } catch {
49
+ h = function(l, d, S) {
50
+ return l[d] = S;
51
+ };
52
+ }
53
+ function s(c, l, d, S) {
54
+ var k = l && l.prototype instanceof M ? l : M, O = Object.create(k.prototype), R = new D(S || []);
55
+ return n(O, "_invoke", {
56
+ value: v(c, d, R)
57
+ }), O;
58
+ }
59
+ function g(c, l, d) {
60
+ try {
61
+ return {
62
+ type: "normal",
63
+ arg: c.call(l, d)
64
+ };
65
+ } catch (S) {
66
+ return {
67
+ type: "throw",
68
+ arg: S
69
+ };
70
+ }
71
+ }
72
+ r.wrap = s;
73
+ var y = {};
74
+ function M() {
75
+ }
76
+ function T() {
77
+ }
78
+ function w() {
79
+ }
80
+ var N = {};
81
+ h(N, a, function() {
82
+ return this;
83
+ });
84
+ var A = Object.getPrototypeOf, j = A && A(A(x([])));
85
+ j && j !== t && e.call(j, a) && (N = j);
86
+ var m = w.prototype = M.prototype = Object.create(N);
87
+ function p(c) {
88
+ ["next", "throw", "return"].forEach(function(l) {
89
+ h(c, l, function(d) {
90
+ return this._invoke(l, d);
91
+ });
92
+ });
93
+ }
94
+ function f(c, l) {
95
+ function d(k, O, R, V) {
96
+ var $ = g(c[k], c, O);
97
+ if ($.type !== "throw") {
98
+ var ne = $.arg, ce = ne.value;
99
+ return ce && typeof ce == "object" && e.call(ce, "__await") ? l.resolve(ce.__await).then(function(Y) {
100
+ d("next", Y, R, V);
101
+ }, function(Y) {
102
+ d("throw", Y, R, V);
103
+ }) : l.resolve(ce).then(function(Y) {
104
+ ne.value = Y, R(ne);
105
+ }, function(Y) {
106
+ return d("throw", Y, R, V);
107
+ });
108
+ }
109
+ V($.arg);
110
+ }
111
+ var S;
112
+ n(this, "_invoke", {
113
+ value: function(k, O) {
114
+ function R() {
115
+ return new l(function(V, $) {
116
+ d(k, O, V, $);
117
+ });
118
+ }
119
+ return S = S ? S.then(R, R) : R();
120
+ }
121
+ });
122
+ }
123
+ function v(c, l, d) {
124
+ var S = "suspendedStart";
125
+ return function(k, O) {
126
+ if (S === "executing") throw new Error("Generator is already running");
127
+ if (S === "completed") {
128
+ if (k === "throw") throw O;
129
+ return Te();
130
+ }
131
+ for (d.method = k, d.arg = O; ; ) {
132
+ var R = d.delegate;
133
+ if (R) {
134
+ var V = E(R, d);
135
+ if (V) {
136
+ if (V === y) continue;
137
+ return V;
138
+ }
139
+ }
140
+ if (d.method === "next") d.sent = d._sent = d.arg;
141
+ else if (d.method === "throw") {
142
+ if (S === "suspendedStart") throw S = "completed", d.arg;
143
+ d.dispatchException(d.arg);
144
+ } else d.method === "return" && d.abrupt("return", d.arg);
145
+ S = "executing";
146
+ var $ = g(c, l, d);
147
+ if ($.type === "normal") {
148
+ if (S = d.done ? "completed" : "suspendedYield", $.arg === y) continue;
149
+ return {
150
+ value: $.arg,
151
+ done: d.done
152
+ };
153
+ }
154
+ $.type === "throw" && (S = "completed", d.method = "throw", d.arg = $.arg);
155
+ }
156
+ };
157
+ }
158
+ function E(c, l) {
159
+ var d = l.method, S = c.iterator[d];
160
+ if (S === void 0) return l.delegate = null, d === "throw" && c.iterator.return && (l.method = "return", l.arg = void 0, E(c, l), l.method === "throw") || d !== "return" && (l.method = "throw", l.arg = new TypeError("The iterator does not provide a '" + d + "' method")), y;
161
+ var k = g(S, c.iterator, l.arg);
162
+ if (k.type === "throw") return l.method = "throw", l.arg = k.arg, l.delegate = null, y;
163
+ var O = k.arg;
164
+ return O ? O.done ? (l[c.resultName] = O.value, l.next = c.nextLoc, l.method !== "return" && (l.method = "next", l.arg = void 0), l.delegate = null, y) : O : (l.method = "throw", l.arg = new TypeError("iterator result is not an object"), l.delegate = null, y);
165
+ }
166
+ function C(c) {
167
+ var l = {
168
+ tryLoc: c[0]
169
+ };
170
+ 1 in c && (l.catchLoc = c[1]), 2 in c && (l.finallyLoc = c[2], l.afterLoc = c[3]), this.tryEntries.push(l);
171
+ }
172
+ function b(c) {
173
+ var l = c.completion || {};
174
+ l.type = "normal", delete l.arg, c.completion = l;
175
+ }
176
+ function D(c) {
177
+ this.tryEntries = [{
178
+ tryLoc: "root"
179
+ }], c.forEach(C, this), this.reset(!0);
180
+ }
181
+ function x(c) {
182
+ if (c) {
183
+ var l = c[a];
184
+ if (l) return l.call(c);
185
+ if (typeof c.next == "function") return c;
186
+ if (!isNaN(c.length)) {
187
+ var d = -1, S = function k() {
188
+ for (; ++d < c.length; ) if (e.call(c, d)) return k.value = c[d], k.done = !1, k;
189
+ return k.value = void 0, k.done = !0, k;
190
+ };
191
+ return S.next = S;
192
+ }
193
+ }
194
+ return {
195
+ next: Te
196
+ };
197
+ }
198
+ function Te() {
199
+ return {
200
+ value: void 0,
201
+ done: !0
202
+ };
203
+ }
204
+ return T.prototype = w, n(m, "constructor", {
205
+ value: w,
206
+ configurable: !0
207
+ }), n(w, "constructor", {
208
+ value: T,
209
+ configurable: !0
210
+ }), T.displayName = h(w, u, "GeneratorFunction"), r.isGeneratorFunction = function(c) {
211
+ var l = typeof c == "function" && c.constructor;
212
+ return !!l && (l === T || (l.displayName || l.name) === "GeneratorFunction");
213
+ }, r.mark = function(c) {
214
+ return Object.setPrototypeOf ? Object.setPrototypeOf(c, w) : (c.__proto__ = w, h(c, u, "GeneratorFunction")), c.prototype = Object.create(m), c;
215
+ }, r.awrap = function(c) {
216
+ return {
217
+ __await: c
218
+ };
219
+ }, p(f.prototype), h(f.prototype, o, function() {
220
+ return this;
221
+ }), r.AsyncIterator = f, r.async = function(c, l, d, S, k) {
222
+ k === void 0 && (k = Promise);
223
+ var O = new f(s(c, l, d, S), k);
224
+ return r.isGeneratorFunction(l) ? O : O.next().then(function(R) {
225
+ return R.done ? R.value : O.next();
226
+ });
227
+ }, p(m), h(m, u, "Generator"), h(m, a, function() {
228
+ return this;
229
+ }), h(m, "toString", function() {
230
+ return "[object Generator]";
231
+ }), r.keys = function(c) {
232
+ var l = Object(c), d = [];
233
+ for (var S in l) d.push(S);
234
+ return d.reverse(), function k() {
235
+ for (; d.length; ) {
236
+ var O = d.pop();
237
+ if (O in l) return k.value = O, k.done = !1, k;
238
+ }
239
+ return k.done = !0, k;
240
+ };
241
+ }, r.values = x, D.prototype = {
242
+ constructor: D,
243
+ reset: function(c) {
244
+ 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(b), !c) for (var l in this) l.charAt(0) === "t" && e.call(this, l) && !isNaN(+l.slice(1)) && (this[l] = void 0);
245
+ },
246
+ stop: function() {
247
+ this.done = !0;
248
+ var c = this.tryEntries[0].completion;
249
+ if (c.type === "throw") throw c.arg;
250
+ return this.rval;
251
+ },
252
+ dispatchException: function(c) {
253
+ if (this.done) throw c;
254
+ var l = this;
255
+ function d($, ne) {
256
+ return O.type = "throw", O.arg = c, l.next = $, ne && (l.method = "next", l.arg = void 0), !!ne;
257
+ }
258
+ for (var S = this.tryEntries.length - 1; S >= 0; --S) {
259
+ var k = this.tryEntries[S], O = k.completion;
260
+ if (k.tryLoc === "root") return d("end");
261
+ if (k.tryLoc <= this.prev) {
262
+ var R = e.call(k, "catchLoc"), V = e.call(k, "finallyLoc");
263
+ if (R && V) {
264
+ if (this.prev < k.catchLoc) return d(k.catchLoc, !0);
265
+ if (this.prev < k.finallyLoc) return d(k.finallyLoc);
266
+ } else if (R) {
267
+ if (this.prev < k.catchLoc) return d(k.catchLoc, !0);
268
+ } else {
269
+ if (!V) throw new Error("try statement without catch or finally");
270
+ if (this.prev < k.finallyLoc) return d(k.finallyLoc);
271
+ }
272
+ }
273
+ }
274
+ },
275
+ abrupt: function(c, l) {
276
+ for (var d = this.tryEntries.length - 1; d >= 0; --d) {
277
+ var S = this.tryEntries[d];
278
+ if (S.tryLoc <= this.prev && e.call(S, "finallyLoc") && this.prev < S.finallyLoc) {
279
+ var k = S;
280
+ break;
281
+ }
282
+ }
283
+ k && (c === "break" || c === "continue") && k.tryLoc <= l && l <= k.finallyLoc && (k = null);
284
+ var O = k ? k.completion : {};
285
+ return O.type = c, O.arg = l, k ? (this.method = "next", this.next = k.finallyLoc, y) : this.complete(O);
286
+ },
287
+ complete: function(c, l) {
288
+ if (c.type === "throw") throw c.arg;
289
+ return c.type === "break" || c.type === "continue" ? this.next = c.arg : c.type === "return" ? (this.rval = this.arg = c.arg, this.method = "return", this.next = "end") : c.type === "normal" && l && (this.next = l), y;
290
+ },
291
+ finish: function(c) {
292
+ for (var l = this.tryEntries.length - 1; l >= 0; --l) {
293
+ var d = this.tryEntries[l];
294
+ if (d.finallyLoc === c) return this.complete(d.completion, d.afterLoc), b(d), y;
295
+ }
296
+ },
297
+ catch: function(c) {
298
+ for (var l = this.tryEntries.length - 1; l >= 0; --l) {
299
+ var d = this.tryEntries[l];
300
+ if (d.tryLoc === c) {
301
+ var S = d.completion;
302
+ if (S.type === "throw") {
303
+ var k = S.arg;
304
+ b(d);
305
+ }
306
+ return k;
307
+ }
308
+ }
309
+ throw new Error("illegal catch attempt");
310
+ },
311
+ delegateYield: function(c, l, d) {
312
+ return this.delegate = {
313
+ iterator: x(c),
314
+ resultName: l,
315
+ nextLoc: d
316
+ }, this.method === "next" && (this.arg = void 0), y;
317
+ }
318
+ }, r;
319
+ }
320
+ function Fe(r, t, e, n, i, a, o) {
321
+ try {
322
+ var u = r[a](o), h = u.value;
323
+ } catch (s) {
324
+ e(s);
325
+ return;
326
+ }
327
+ u.done ? t(h) : Promise.resolve(h).then(n, i);
328
+ }
329
+ function X(r) {
330
+ return function() {
331
+ var t = this, e = arguments;
332
+ return new Promise(function(n, i) {
333
+ var a = r.apply(t, e);
334
+ function o(h) {
335
+ Fe(a, n, i, o, u, "next", h);
336
+ }
337
+ function u(h) {
338
+ Fe(a, n, i, o, u, "throw", h);
339
+ }
340
+ o(void 0);
341
+ });
342
+ };
343
+ }
344
+ function Be(r, t) {
345
+ if (!(r instanceof t))
346
+ throw new TypeError("Cannot call a class as a function");
347
+ }
348
+ function at(r, t) {
349
+ for (var e = 0; e < t.length; e++) {
350
+ var n = t[e];
351
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, Qe(n.key), n);
352
+ }
353
+ }
354
+ function Ge(r, t, e) {
355
+ return t && at(r.prototype, t), Object.defineProperty(r, "prototype", {
356
+ writable: !1
357
+ }), r;
358
+ }
359
+ function ge(r, t, e) {
360
+ return t = Qe(t), t in r ? Object.defineProperty(r, t, {
361
+ value: e,
362
+ enumerable: !0,
363
+ configurable: !0,
364
+ writable: !0
365
+ }) : r[t] = e, r;
366
+ }
367
+ function ot(r, t) {
368
+ if (typeof t != "function" && t !== null)
369
+ throw new TypeError("Super expression must either be null or a function");
370
+ r.prototype = Object.create(t && t.prototype, {
371
+ constructor: {
372
+ value: r,
373
+ writable: !0,
374
+ configurable: !0
375
+ }
376
+ }), Object.defineProperty(r, "prototype", {
377
+ writable: !1
378
+ }), t && ve(r, t);
379
+ }
380
+ function pe(r) {
381
+ return pe = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
382
+ return e.__proto__ || Object.getPrototypeOf(e);
383
+ }, pe(r);
384
+ }
385
+ function ve(r, t) {
386
+ return ve = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) {
387
+ return n.__proto__ = i, n;
388
+ }, ve(r, t);
389
+ }
390
+ function Ue() {
391
+ if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
392
+ if (typeof Proxy == "function") return !0;
393
+ try {
394
+ return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
395
+ })), !0;
396
+ } catch {
397
+ return !1;
398
+ }
399
+ }
400
+ function ye(r, t, e) {
401
+ return Ue() ? ye = Reflect.construct.bind() : ye = function(i, a, o) {
402
+ var u = [null];
403
+ u.push.apply(u, a);
404
+ var h = Function.bind.apply(i, u), s = new h();
405
+ return o && ve(s, o.prototype), s;
406
+ }, ye.apply(null, arguments);
407
+ }
408
+ function ut(r) {
409
+ return Function.toString.call(r).indexOf("[native code]") !== -1;
410
+ }
411
+ function _e(r) {
412
+ var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
413
+ return _e = function(n) {
414
+ if (n === null || !ut(n)) return n;
415
+ if (typeof n != "function")
416
+ throw new TypeError("Super expression must either be null or a function");
417
+ if (typeof t < "u") {
418
+ if (t.has(n)) return t.get(n);
419
+ t.set(n, i);
420
+ }
421
+ function i() {
422
+ return ye(n, arguments, pe(this).constructor);
423
+ }
424
+ return i.prototype = Object.create(n.prototype, {
425
+ constructor: {
426
+ value: i,
427
+ enumerable: !1,
428
+ writable: !0,
429
+ configurable: !0
430
+ }
431
+ }), ve(i, n);
432
+ }, _e(r);
433
+ }
434
+ function we(r) {
435
+ if (r === void 0)
436
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
437
+ return r;
438
+ }
439
+ function st(r, t) {
440
+ if (t && (typeof t == "object" || typeof t == "function"))
441
+ return t;
442
+ if (t !== void 0)
443
+ throw new TypeError("Derived constructors may only return object or undefined");
444
+ return we(r);
445
+ }
446
+ function lt(r) {
447
+ var t = Ue();
448
+ return function() {
449
+ var n = pe(r), i;
450
+ if (t) {
451
+ var a = pe(this).constructor;
452
+ i = Reflect.construct(n, arguments, a);
453
+ } else
454
+ i = n.apply(this, arguments);
455
+ return st(this, i);
456
+ };
457
+ }
458
+ function ct(r, t) {
459
+ if (typeof r != "object" || r === null) return r;
460
+ var e = r[Symbol.toPrimitive];
461
+ if (e !== void 0) {
462
+ var n = e.call(r, t);
463
+ if (typeof n != "object") return n;
464
+ throw new TypeError("@@toPrimitive must return a primitive value.");
465
+ }
466
+ return String(r);
467
+ }
468
+ function Qe(r) {
469
+ var t = ct(r, "string");
470
+ return typeof t == "symbol" ? t : String(t);
471
+ }
472
+ var Ye = typeof global < "u" && {}.toString.call(global) === "[object global]";
473
+ function qe(r, t) {
474
+ return r.indexOf(t.toLowerCase()) === 0 ? r : "".concat(t.toLowerCase()).concat(r.substr(0, 1).toUpperCase()).concat(r.substr(1));
475
+ }
476
+ function ft(r) {
477
+ return !!(r && r.nodeType === 1 && "nodeName" in r && r.ownerDocument && r.ownerDocument.defaultView);
478
+ }
479
+ function ht(r) {
480
+ return !isNaN(parseFloat(r)) && isFinite(r) && Math.floor(r) == r;
481
+ }
482
+ function re(r) {
483
+ return /^(https?:)?\/\/((((player|www)\.)?vimeo\.com)|((player\.)?[a-zA-Z0-9-]+\.(videoji\.(hk|cn)|vimeo\.work)))(?=$|\/)/.test(r);
484
+ }
485
+ function Je(r) {
486
+ var t = /^https:\/\/player\.((vimeo\.com)|([a-zA-Z0-9-]+\.(videoji\.(hk|cn)|vimeo\.work)))\/video\/\d+/;
487
+ return t.test(r);
488
+ }
489
+ function dt(r) {
490
+ for (var t = (r || "").match(/^(?:https?:)?(?:\/\/)?([^/?]+)/), e = (t && t[1] || "").replace("player.", ""), n = [".videoji.hk", ".vimeo.work", ".videoji.cn"], i = 0, a = n; i < a.length; i++) {
491
+ var o = a[i];
492
+ if (e.endsWith(o))
493
+ return e;
494
+ }
495
+ return "vimeo.com";
496
+ }
497
+ function Xe() {
498
+ var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = r.id, e = r.url, n = t || e;
499
+ if (!n)
500
+ 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.");
501
+ if (ht(n))
502
+ return "https://vimeo.com/".concat(n);
503
+ if (re(n))
504
+ return n.replace("http:", "https:");
505
+ throw t ? new TypeError("“".concat(t, "” is not a valid video id.")) : new TypeError("“".concat(n, "” is not a vimeo.com url."));
506
+ }
507
+ var De = function(t, e, n) {
508
+ var i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "addEventListener", a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : "removeEventListener", o = typeof e == "string" ? [e] : e;
509
+ return o.forEach(function(u) {
510
+ t[i](u, n);
511
+ }), {
512
+ cancel: function() {
513
+ return o.forEach(function(h) {
514
+ return t[a](h, n);
515
+ });
516
+ }
517
+ };
518
+ }, pt = typeof Array.prototype.indexOf < "u", vt = typeof window < "u" && typeof window.postMessage < "u";
519
+ if (!Ye && (!pt || !vt))
520
+ throw new Error("Sorry, the Vimeo Player API is not available in this browser.");
521
+ var ae = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
522
+ function mt(r, t) {
523
+ return t = { exports: {} }, r(t, t.exports), t.exports;
524
+ }
525
+ /*!
526
+ * weakmap-polyfill v2.0.4 - ECMAScript6 WeakMap polyfill
527
+ * https://github.com/polygonplanet/weakmap-polyfill
528
+ * Copyright (c) 2015-2021 polygonplanet <polygon.planet.aqua@gmail.com>
529
+ * @license MIT
530
+ */
531
+ (function(r) {
532
+ if (r.WeakMap)
533
+ return;
534
+ var t = Object.prototype.hasOwnProperty, e = Object.defineProperty && (function() {
535
+ try {
536
+ return Object.defineProperty({}, "x", {
537
+ value: 1
538
+ }).x === 1;
539
+ } catch {
540
+ }
541
+ })(), n = function(a, o, u) {
542
+ e ? Object.defineProperty(a, o, {
543
+ configurable: !0,
544
+ writable: !0,
545
+ value: u
546
+ }) : a[o] = u;
547
+ };
548
+ r.WeakMap = (function() {
549
+ function a() {
550
+ if (this === void 0)
551
+ throw new TypeError("Constructor WeakMap requires 'new'");
552
+ if (n(this, "_id", u("_WeakMap")), arguments.length > 0)
553
+ throw new TypeError("WeakMap iterable is not supported");
554
+ }
555
+ n(a.prototype, "delete", function(s) {
556
+ if (o(this, "delete"), !i(s))
557
+ return !1;
558
+ var g = s[this._id];
559
+ return g && g[0] === s ? (delete s[this._id], !0) : !1;
560
+ }), n(a.prototype, "get", function(s) {
561
+ if (o(this, "get"), !!i(s)) {
562
+ var g = s[this._id];
563
+ if (g && g[0] === s)
564
+ return g[1];
565
+ }
566
+ }), n(a.prototype, "has", function(s) {
567
+ if (o(this, "has"), !i(s))
568
+ return !1;
569
+ var g = s[this._id];
570
+ return !!(g && g[0] === s);
571
+ }), n(a.prototype, "set", function(s, g) {
572
+ if (o(this, "set"), !i(s))
573
+ throw new TypeError("Invalid value used as weak map key");
574
+ var y = s[this._id];
575
+ return y && y[0] === s ? (y[1] = g, this) : (n(s, this._id, [s, g]), this);
576
+ });
577
+ function o(s, g) {
578
+ if (!i(s) || !t.call(s, "_id"))
579
+ throw new TypeError(g + " method called on incompatible receiver " + typeof s);
580
+ }
581
+ function u(s) {
582
+ return s + "_" + h() + "." + h();
583
+ }
584
+ function h() {
585
+ return Math.random().toString().substring(2);
586
+ }
587
+ return n(a, "_polyfill", !0), a;
588
+ })();
589
+ function i(a) {
590
+ return Object(a) === a;
591
+ }
592
+ })(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : ae);
593
+ var W = mt(function(r) {
594
+ /*! Native Promise Only
595
+ v0.8.1 (c) Kyle Simpson
596
+ MIT License: http://getify.mit-license.org
597
+ */
598
+ (function(e, n, i) {
599
+ n[e] = n[e] || i(), r.exports && (r.exports = n[e]);
600
+ })("Promise", ae, function() {
601
+ var e, n, i, a = Object.prototype.toString, o = typeof setImmediate < "u" ? function(p) {
602
+ return setImmediate(p);
603
+ } : setTimeout;
604
+ try {
605
+ Object.defineProperty({}, "x", {}), e = function(p, f, v, E) {
606
+ return Object.defineProperty(p, f, {
607
+ value: v,
608
+ writable: !0,
609
+ configurable: E !== !1
610
+ });
611
+ };
612
+ } catch {
613
+ e = function(f, v, E) {
614
+ return f[v] = E, f;
615
+ };
616
+ }
617
+ i = /* @__PURE__ */ (function() {
618
+ var p, f, v;
619
+ function E(C, b) {
620
+ this.fn = C, this.self = b, this.next = void 0;
621
+ }
622
+ return {
623
+ add: function(b, D) {
624
+ v = new E(b, D), f ? f.next = v : p = v, f = v, v = void 0;
625
+ },
626
+ drain: function() {
627
+ var b = p;
628
+ for (p = f = n = void 0; b; )
629
+ b.fn.call(b.self), b = b.next;
630
+ }
631
+ };
632
+ })();
633
+ function u(m, p) {
634
+ i.add(m, p), n || (n = o(i.drain));
635
+ }
636
+ function h(m) {
637
+ var p, f = typeof m;
638
+ return m != null && (f == "object" || f == "function") && (p = m.then), typeof p == "function" ? p : !1;
639
+ }
640
+ function s() {
641
+ for (var m = 0; m < this.chain.length; m++)
642
+ g(this, this.state === 1 ? this.chain[m].success : this.chain[m].failure, this.chain[m]);
643
+ this.chain.length = 0;
644
+ }
645
+ function g(m, p, f) {
646
+ var v, E;
647
+ try {
648
+ p === !1 ? f.reject(m.msg) : (p === !0 ? v = m.msg : v = p.call(void 0, m.msg), v === f.promise ? f.reject(TypeError("Promise-chain cycle")) : (E = h(v)) ? E.call(v, f.resolve, f.reject) : f.resolve(v));
649
+ } catch (C) {
650
+ f.reject(C);
651
+ }
652
+ }
653
+ function y(m) {
654
+ var p, f = this;
655
+ if (!f.triggered) {
656
+ f.triggered = !0, f.def && (f = f.def);
657
+ try {
658
+ (p = h(m)) ? u(function() {
659
+ var v = new w(f);
660
+ try {
661
+ p.call(m, function() {
662
+ y.apply(v, arguments);
663
+ }, function() {
664
+ M.apply(v, arguments);
665
+ });
666
+ } catch (E) {
667
+ M.call(v, E);
668
+ }
669
+ }) : (f.msg = m, f.state = 1, f.chain.length > 0 && u(s, f));
670
+ } catch (v) {
671
+ M.call(new w(f), v);
672
+ }
673
+ }
674
+ }
675
+ function M(m) {
676
+ var p = this;
677
+ p.triggered || (p.triggered = !0, p.def && (p = p.def), p.msg = m, p.state = 2, p.chain.length > 0 && u(s, p));
678
+ }
679
+ function T(m, p, f, v) {
680
+ for (var E = 0; E < p.length; E++)
681
+ (function(b) {
682
+ m.resolve(p[b]).then(function(x) {
683
+ f(b, x);
684
+ }, v);
685
+ })(E);
686
+ }
687
+ function w(m) {
688
+ this.def = m, this.triggered = !1;
689
+ }
690
+ function N(m) {
691
+ this.promise = m, this.state = 0, this.triggered = !1, this.chain = [], this.msg = void 0;
692
+ }
693
+ function A(m) {
694
+ if (typeof m != "function")
695
+ throw TypeError("Not a function");
696
+ if (this.__NPO__ !== 0)
697
+ throw TypeError("Not a promise");
698
+ this.__NPO__ = 1;
699
+ var p = new N(this);
700
+ this.then = function(v, E) {
701
+ var C = {
702
+ success: typeof v == "function" ? v : !0,
703
+ failure: typeof E == "function" ? E : !1
704
+ };
705
+ return C.promise = new this.constructor(function(D, x) {
706
+ if (typeof D != "function" || typeof x != "function")
707
+ throw TypeError("Not a function");
708
+ C.resolve = D, C.reject = x;
709
+ }), p.chain.push(C), p.state !== 0 && u(s, p), C.promise;
710
+ }, this.catch = function(v) {
711
+ return this.then(void 0, v);
712
+ };
713
+ try {
714
+ m.call(void 0, function(v) {
715
+ y.call(p, v);
716
+ }, function(v) {
717
+ M.call(p, v);
718
+ });
719
+ } catch (f) {
720
+ M.call(p, f);
721
+ }
722
+ }
723
+ var j = e(
724
+ {},
725
+ "constructor",
726
+ A,
727
+ /*configurable=*/
728
+ !1
729
+ );
730
+ return A.prototype = j, e(
731
+ j,
732
+ "__NPO__",
733
+ 0,
734
+ /*configurable=*/
735
+ !1
736
+ ), e(A, "resolve", function(p) {
737
+ var f = this;
738
+ return p && typeof p == "object" && p.__NPO__ === 1 ? p : new f(function(E, C) {
739
+ if (typeof E != "function" || typeof C != "function")
740
+ throw TypeError("Not a function");
741
+ E(p);
742
+ });
743
+ }), e(A, "reject", function(p) {
744
+ return new this(function(v, E) {
745
+ if (typeof v != "function" || typeof E != "function")
746
+ throw TypeError("Not a function");
747
+ E(p);
748
+ });
749
+ }), e(A, "all", function(p) {
750
+ var f = this;
751
+ return a.call(p) != "[object Array]" ? f.reject(TypeError("Not an array")) : p.length === 0 ? f.resolve([]) : new f(function(E, C) {
752
+ if (typeof E != "function" || typeof C != "function")
753
+ throw TypeError("Not a function");
754
+ var b = p.length, D = Array(b), x = 0;
755
+ T(f, p, function(c, l) {
756
+ D[c] = l, ++x === b && E(D);
757
+ }, C);
758
+ });
759
+ }), e(A, "race", function(p) {
760
+ var f = this;
761
+ return a.call(p) != "[object Array]" ? f.reject(TypeError("Not an array")) : new f(function(E, C) {
762
+ if (typeof E != "function" || typeof C != "function")
763
+ throw TypeError("Not a function");
764
+ T(f, p, function(D, x) {
765
+ E(x);
766
+ }, C);
767
+ });
768
+ }), A;
769
+ });
770
+ }), z = /* @__PURE__ */ new WeakMap();
771
+ function he(r, t, e) {
772
+ var n = z.get(r.element) || {};
773
+ t in n || (n[t] = []), n[t].push(e), z.set(r.element, n);
774
+ }
775
+ function be(r, t) {
776
+ var e = z.get(r.element) || {};
777
+ return e[t] || [];
778
+ }
779
+ function ke(r, t, e) {
780
+ var n = z.get(r.element) || {};
781
+ if (!n[t])
782
+ return !0;
783
+ if (!e)
784
+ return n[t] = [], z.set(r.element, n), !0;
785
+ var i = n[t].indexOf(e);
786
+ return i !== -1 && n[t].splice(i, 1), z.set(r.element, n), n[t] && n[t].length === 0;
787
+ }
788
+ function gt(r, t) {
789
+ var e = be(r, t);
790
+ if (e.length < 1)
791
+ return !1;
792
+ var n = e.shift();
793
+ return ke(r, t, n), n;
794
+ }
795
+ function yt(r, t) {
796
+ var e = z.get(r);
797
+ z.set(t, e), z.delete(r);
798
+ }
799
+ function Pe(r) {
800
+ if (typeof r == "string")
801
+ try {
802
+ r = JSON.parse(r);
803
+ } catch (t) {
804
+ return console.warn(t), {};
805
+ }
806
+ return r;
807
+ }
808
+ function J(r, t, e) {
809
+ if (!(!r.element.contentWindow || !r.element.contentWindow.postMessage)) {
810
+ var n = {
811
+ method: t
812
+ };
813
+ e !== void 0 && (n.value = e);
814
+ var i = parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/, "$1"));
815
+ i >= 8 && i < 10 && (n = JSON.stringify(n)), r.element.contentWindow.postMessage(n, r.origin);
816
+ }
817
+ }
818
+ function wt(r, t) {
819
+ t = Pe(t);
820
+ var e = [], n;
821
+ if (t.event) {
822
+ if (t.event === "error") {
823
+ var i = be(r, t.data.method);
824
+ i.forEach(function(o) {
825
+ var u = new Error(t.data.message);
826
+ u.name = t.data.name, o.reject(u), ke(r, t.data.method, o);
827
+ });
828
+ }
829
+ e = be(r, "event:".concat(t.event)), n = t.data;
830
+ } else if (t.method) {
831
+ var a = gt(r, t.method);
832
+ a && (e.push(a), n = t.value);
833
+ }
834
+ e.forEach(function(o) {
835
+ try {
836
+ if (typeof o == "function") {
837
+ o.call(r, n);
838
+ return;
839
+ }
840
+ o.resolve(n);
841
+ } catch {
842
+ }
843
+ });
844
+ }
845
+ var bt = ["airplay", "audio_tracks", "audiotrack", "autopause", "autoplay", "background", "byline", "cc", "chapter_id", "chapters", "chromecast", "color", "colors", "controls", "dnt", "end_time", "fullscreen", "height", "id", "initial_quality", "interactive_params", "keyboard", "loop", "maxheight", "max_quality", "maxwidth", "min_quality", "muted", "play_button_position", "playsinline", "portrait", "preload", "progress_bar", "quality", "quality_selector", "responsive", "skipping_forward", "speed", "start_time", "texttrack", "thumbnail_id", "title", "transcript", "transparent", "unmute_button", "url", "vimeo_logo", "volume", "watch_full_video", "width"];
846
+ function Ke(r) {
847
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
848
+ return bt.reduce(function(e, n) {
849
+ var i = r.getAttribute("data-vimeo-".concat(n));
850
+ return (i || i === "") && (e[n] = i === "" ? 1 : i), e;
851
+ }, t);
852
+ }
853
+ function Ae(r, t) {
854
+ var e = r.html;
855
+ if (!t)
856
+ throw new TypeError("An element must be provided");
857
+ if (t.getAttribute("data-vimeo-initialized") !== null)
858
+ return t.querySelector("iframe");
859
+ var n = document.createElement("div");
860
+ return n.innerHTML = e, t.appendChild(n.firstChild), t.setAttribute("data-vimeo-initialized", "true"), t.querySelector("iframe");
861
+ }
862
+ function Ze(r) {
863
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, e = arguments.length > 2 ? arguments[2] : void 0;
864
+ return new Promise(function(n, i) {
865
+ if (!re(r))
866
+ throw new TypeError("“".concat(r, "” is not a vimeo.com url."));
867
+ var a = dt(r), o = "https://".concat(a, "/api/oembed.json?url=").concat(encodeURIComponent(r));
868
+ for (var u in t)
869
+ t.hasOwnProperty(u) && (o += "&".concat(u, "=").concat(encodeURIComponent(t[u])));
870
+ var h = "XDomainRequest" in window ? new XDomainRequest() : new XMLHttpRequest();
871
+ h.open("GET", o, !0), h.onload = function() {
872
+ if (h.status === 404) {
873
+ i(new Error("“".concat(r, "” was not found.")));
874
+ return;
875
+ }
876
+ if (h.status === 403) {
877
+ i(new Error("“".concat(r, "” is not embeddable.")));
878
+ return;
879
+ }
880
+ try {
881
+ var s = JSON.parse(h.responseText);
882
+ if (s.domain_status_code === 403) {
883
+ Ae(s, e), i(new Error("“".concat(r, "” is not embeddable.")));
884
+ return;
885
+ }
886
+ n(s);
887
+ } catch (g) {
888
+ i(g);
889
+ }
890
+ }, h.onerror = function() {
891
+ var s = h.status ? " (".concat(h.status, ")") : "";
892
+ i(new Error("There was an error fetching the embed code from Vimeo".concat(s, ".")));
893
+ }, h.send();
894
+ });
895
+ }
896
+ function kt() {
897
+ var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document, t = [].slice.call(r.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")), e = function(i) {
898
+ "console" in window && console.error && console.error("There was an error creating an embed: ".concat(i));
899
+ };
900
+ t.forEach(function(n) {
901
+ try {
902
+ if (n.getAttribute("data-vimeo-defer") !== null)
903
+ return;
904
+ var i = Ke(n), a = Xe(i);
905
+ Ze(a, i, n).then(function(o) {
906
+ return Ae(o, n);
907
+ }).catch(e);
908
+ } catch (o) {
909
+ e(o);
910
+ }
911
+ });
912
+ }
913
+ function Et() {
914
+ var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document;
915
+ if (!window.VimeoPlayerResizeEmbeds_) {
916
+ window.VimeoPlayerResizeEmbeds_ = !0;
917
+ var t = function(n) {
918
+ if (re(n.origin) && !(!n.data || n.data.event !== "spacechange")) {
919
+ for (var i = r.querySelectorAll("iframe"), a = 0; a < i.length; a++)
920
+ if (i[a].contentWindow === n.source) {
921
+ var o = i[a].parentElement;
922
+ o.style.paddingBottom = "".concat(n.data.data[0].bottom, "px");
923
+ break;
924
+ }
925
+ }
926
+ };
927
+ window.addEventListener("message", t);
928
+ }
929
+ }
930
+ function Pt() {
931
+ var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document;
932
+ if (!window.VimeoSeoMetadataAppended) {
933
+ window.VimeoSeoMetadataAppended = !0;
934
+ var t = function(n) {
935
+ if (re(n.origin)) {
936
+ var i = Pe(n.data);
937
+ if (!(!i || i.event !== "ready"))
938
+ for (var a = r.querySelectorAll("iframe"), o = 0; o < a.length; o++) {
939
+ var u = a[o], h = u.contentWindow === n.source;
940
+ if (Je(u.src) && h) {
941
+ var s = new Ne(u);
942
+ s.callMethod("appendVideoMetadata", window.location.href);
943
+ }
944
+ }
945
+ }
946
+ };
947
+ window.addEventListener("message", t);
948
+ }
949
+ }
950
+ function Tt() {
951
+ var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document;
952
+ if (!window.VimeoCheckedUrlTimeParam) {
953
+ window.VimeoCheckedUrlTimeParam = !0;
954
+ var t = function(i) {
955
+ "console" in window && console.error && console.error("There was an error getting video Id: ".concat(i));
956
+ }, e = function(i) {
957
+ if (re(i.origin)) {
958
+ var a = Pe(i.data);
959
+ if (!(!a || a.event !== "ready"))
960
+ for (var o = r.querySelectorAll("iframe"), u = function() {
961
+ var g = o[h], y = g.contentWindow === i.source;
962
+ if (Je(g.src) && y) {
963
+ var M = new Ne(g);
964
+ M.getVideoId().then(function(T) {
965
+ var w = new RegExp("[?&]vimeo_t_".concat(T, "=([^&#]*)")).exec(window.location.href);
966
+ if (w && w[1]) {
967
+ var N = decodeURI(w[1]);
968
+ M.setCurrentTime(N);
969
+ }
970
+ }).catch(t);
971
+ }
972
+ }, h = 0; h < o.length; h++)
973
+ u();
974
+ }
975
+ };
976
+ window.addEventListener("message", e);
977
+ }
978
+ }
979
+ function Mt() {
980
+ var r = (function() {
981
+ for (var n, i = [
982
+ ["requestFullscreen", "exitFullscreen", "fullscreenElement", "fullscreenEnabled", "fullscreenchange", "fullscreenerror"],
983
+ // New WebKit
984
+ ["webkitRequestFullscreen", "webkitExitFullscreen", "webkitFullscreenElement", "webkitFullscreenEnabled", "webkitfullscreenchange", "webkitfullscreenerror"],
985
+ // Old WebKit
986
+ ["webkitRequestFullScreen", "webkitCancelFullScreen", "webkitCurrentFullScreenElement", "webkitCancelFullScreen", "webkitfullscreenchange", "webkitfullscreenerror"],
987
+ ["mozRequestFullScreen", "mozCancelFullScreen", "mozFullScreenElement", "mozFullScreenEnabled", "mozfullscreenchange", "mozfullscreenerror"],
988
+ ["msRequestFullscreen", "msExitFullscreen", "msFullscreenElement", "msFullscreenEnabled", "MSFullscreenChange", "MSFullscreenError"]
989
+ ], a = 0, o = i.length, u = {}; a < o; a++)
990
+ if (n = i[a], n && n[1] in document) {
991
+ for (a = 0; a < n.length; a++)
992
+ u[i[0][a]] = n[a];
993
+ return u;
994
+ }
995
+ return !1;
996
+ })(), t = {
997
+ fullscreenchange: r.fullscreenchange,
998
+ fullscreenerror: r.fullscreenerror
999
+ }, e = {
1000
+ request: function(i) {
1001
+ return new Promise(function(a, o) {
1002
+ var u = function s() {
1003
+ e.off("fullscreenchange", s), a();
1004
+ };
1005
+ e.on("fullscreenchange", u), i = i || document.documentElement;
1006
+ var h = i[r.requestFullscreen]();
1007
+ h instanceof Promise && h.then(u).catch(o);
1008
+ });
1009
+ },
1010
+ exit: function() {
1011
+ return new Promise(function(i, a) {
1012
+ if (!e.isFullscreen) {
1013
+ i();
1014
+ return;
1015
+ }
1016
+ var o = function h() {
1017
+ e.off("fullscreenchange", h), i();
1018
+ };
1019
+ e.on("fullscreenchange", o);
1020
+ var u = document[r.exitFullscreen]();
1021
+ u instanceof Promise && u.then(o).catch(a);
1022
+ });
1023
+ },
1024
+ on: function(i, a) {
1025
+ var o = t[i];
1026
+ o && document.addEventListener(o, a);
1027
+ },
1028
+ off: function(i, a) {
1029
+ var o = t[i];
1030
+ o && document.removeEventListener(o, a);
1031
+ }
1032
+ };
1033
+ return Object.defineProperties(e, {
1034
+ isFullscreen: {
1035
+ get: function() {
1036
+ return !!document[r.fullscreenElement];
1037
+ }
1038
+ },
1039
+ element: {
1040
+ enumerable: !0,
1041
+ get: function() {
1042
+ return document[r.fullscreenElement];
1043
+ }
1044
+ },
1045
+ isEnabled: {
1046
+ enumerable: !0,
1047
+ get: function() {
1048
+ return !!document[r.fullscreenEnabled];
1049
+ }
1050
+ }
1051
+ }), e;
1052
+ }
1053
+ var St = {
1054
+ role: "viewer",
1055
+ autoPlayMuted: !0,
1056
+ allowedDrift: 0.3,
1057
+ maxAllowedDrift: 1,
1058
+ minCheckInterval: 0.1,
1059
+ maxRateAdjustment: 0.2,
1060
+ maxTimeToCatchUp: 1
1061
+ }, Ct = /* @__PURE__ */ (function(r) {
1062
+ ot(e, r);
1063
+ var t = lt(e);
1064
+ function e(n, i) {
1065
+ var a, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, u = arguments.length > 3 ? arguments[3] : void 0;
1066
+ return Be(this, e), a = t.call(this), ge(we(a), "logger", void 0), ge(we(a), "speedAdjustment", 0), ge(we(a), "adjustSpeed", /* @__PURE__ */ (function() {
1067
+ var h = X(/* @__PURE__ */ I().mark(function s(g, y) {
1068
+ var M;
1069
+ return I().wrap(function(w) {
1070
+ for (; ; ) switch (w.prev = w.next) {
1071
+ case 0:
1072
+ if (a.speedAdjustment !== y) {
1073
+ w.next = 2;
1074
+ break;
1075
+ }
1076
+ return w.abrupt("return");
1077
+ case 2:
1078
+ return w.next = 4, g.getPlaybackRate();
1079
+ case 4:
1080
+ return w.t0 = w.sent, w.t1 = a.speedAdjustment, w.t2 = w.t0 - w.t1, w.t3 = y, M = w.t2 + w.t3, a.log("New playbackRate: ".concat(M)), w.next = 12, g.setPlaybackRate(M);
1081
+ case 12:
1082
+ a.speedAdjustment = y;
1083
+ case 13:
1084
+ case "end":
1085
+ return w.stop();
1086
+ }
1087
+ }, s);
1088
+ }));
1089
+ return function(s, g) {
1090
+ return h.apply(this, arguments);
1091
+ };
1092
+ })()), a.logger = u, a.init(i, n, Ie(Ie({}, St), o)), a;
1093
+ }
1094
+ return Ge(e, [{
1095
+ key: "disconnect",
1096
+ value: function() {
1097
+ this.dispatchEvent(new Event("disconnect"));
1098
+ }
1099
+ /**
1100
+ * @param {TimingObject} timingObject
1101
+ * @param {PlayerControls} player
1102
+ * @param {TimingSrcConnectorOptions} options
1103
+ * @return {Promise<void>}
1104
+ */
1105
+ }, {
1106
+ key: "init",
1107
+ value: (function() {
1108
+ var n = X(/* @__PURE__ */ I().mark(function a(o, u, h) {
1109
+ var s = this, g, y, M;
1110
+ return I().wrap(function(w) {
1111
+ for (; ; ) switch (w.prev = w.next) {
1112
+ case 0:
1113
+ return w.next = 2, this.waitForTOReadyState(o, "open");
1114
+ case 2:
1115
+ if (h.role !== "viewer") {
1116
+ w.next = 10;
1117
+ break;
1118
+ }
1119
+ return w.next = 5, this.updatePlayer(o, u, h);
1120
+ case 5:
1121
+ g = De(o, "change", function() {
1122
+ return s.updatePlayer(o, u, h);
1123
+ }), y = this.maintainPlaybackPosition(o, u, h), this.addEventListener("disconnect", function() {
1124
+ y.cancel(), g.cancel();
1125
+ }), w.next = 14;
1126
+ break;
1127
+ case 10:
1128
+ return w.next = 12, this.updateTimingObject(o, u);
1129
+ case 12:
1130
+ M = De(u, ["seeked", "play", "pause", "ratechange"], function() {
1131
+ return s.updateTimingObject(o, u);
1132
+ }, "on", "off"), this.addEventListener("disconnect", function() {
1133
+ return M.cancel();
1134
+ });
1135
+ case 14:
1136
+ case "end":
1137
+ return w.stop();
1138
+ }
1139
+ }, a, this);
1140
+ }));
1141
+ function i(a, o, u) {
1142
+ return n.apply(this, arguments);
1143
+ }
1144
+ return i;
1145
+ })()
1146
+ /**
1147
+ * Sets the TimingObject's state to reflect that of the player
1148
+ *
1149
+ * @param {TimingObject} timingObject
1150
+ * @param {PlayerControls} player
1151
+ * @return {Promise<void>}
1152
+ */
1153
+ }, {
1154
+ key: "updateTimingObject",
1155
+ value: (function() {
1156
+ var n = X(/* @__PURE__ */ I().mark(function a(o, u) {
1157
+ return I().wrap(function(s) {
1158
+ for (; ; ) switch (s.prev = s.next) {
1159
+ case 0:
1160
+ return s.t0 = o, s.next = 3, u.getCurrentTime();
1161
+ case 3:
1162
+ return s.t1 = s.sent, s.next = 6, u.getPaused();
1163
+ case 6:
1164
+ if (!s.sent) {
1165
+ s.next = 10;
1166
+ break;
1167
+ }
1168
+ s.t2 = 0, s.next = 13;
1169
+ break;
1170
+ case 10:
1171
+ return s.next = 12, u.getPlaybackRate();
1172
+ case 12:
1173
+ s.t2 = s.sent;
1174
+ case 13:
1175
+ s.t3 = s.t2, s.t4 = {
1176
+ position: s.t1,
1177
+ velocity: s.t3
1178
+ }, s.t0.update.call(s.t0, s.t4);
1179
+ case 16:
1180
+ case "end":
1181
+ return s.stop();
1182
+ }
1183
+ }, a);
1184
+ }));
1185
+ function i(a, o) {
1186
+ return n.apply(this, arguments);
1187
+ }
1188
+ return i;
1189
+ })()
1190
+ /**
1191
+ * Sets the player's timing state to reflect that of the TimingObject
1192
+ *
1193
+ * @param {TimingObject} timingObject
1194
+ * @param {PlayerControls} player
1195
+ * @param {TimingSrcConnectorOptions} options
1196
+ * @return {Promise<void>}
1197
+ */
1198
+ }, {
1199
+ key: "updatePlayer",
1200
+ value: (function() {
1201
+ var n = X(/* @__PURE__ */ I().mark(function a(o, u, h) {
1202
+ var s, g, y;
1203
+ return I().wrap(function(T) {
1204
+ for (; ; ) switch (T.prev = T.next) {
1205
+ case 0:
1206
+ if (s = o.query(), g = s.position, y = s.velocity, typeof g == "number" && u.setCurrentTime(g), typeof y != "number") {
1207
+ T.next = 25;
1208
+ break;
1209
+ }
1210
+ if (y !== 0) {
1211
+ T.next = 11;
1212
+ break;
1213
+ }
1214
+ return T.next = 6, u.getPaused();
1215
+ case 6:
1216
+ if (T.t0 = T.sent, T.t0 !== !1) {
1217
+ T.next = 9;
1218
+ break;
1219
+ }
1220
+ u.pause();
1221
+ case 9:
1222
+ T.next = 25;
1223
+ break;
1224
+ case 11:
1225
+ if (!(y > 0)) {
1226
+ T.next = 25;
1227
+ break;
1228
+ }
1229
+ return T.next = 14, u.getPaused();
1230
+ case 14:
1231
+ if (T.t1 = T.sent, T.t1 !== !0) {
1232
+ T.next = 19;
1233
+ break;
1234
+ }
1235
+ return T.next = 18, u.play().catch(/* @__PURE__ */ (function() {
1236
+ var w = X(/* @__PURE__ */ I().mark(function N(A) {
1237
+ return I().wrap(function(m) {
1238
+ for (; ; ) switch (m.prev = m.next) {
1239
+ case 0:
1240
+ if (!(A.name === "NotAllowedError" && h.autoPlayMuted)) {
1241
+ m.next = 5;
1242
+ break;
1243
+ }
1244
+ return m.next = 3, u.setMuted(!0);
1245
+ case 3:
1246
+ return m.next = 5, u.play().catch(function(p) {
1247
+ return console.error("Couldn't play the video from TimingSrcConnector. Error:", p);
1248
+ });
1249
+ case 5:
1250
+ case "end":
1251
+ return m.stop();
1252
+ }
1253
+ }, N);
1254
+ }));
1255
+ return function(N) {
1256
+ return w.apply(this, arguments);
1257
+ };
1258
+ })());
1259
+ case 18:
1260
+ this.updatePlayer(o, u, h);
1261
+ case 19:
1262
+ return T.next = 21, u.getPlaybackRate();
1263
+ case 21:
1264
+ if (T.t2 = T.sent, T.t3 = y, T.t2 === T.t3) {
1265
+ T.next = 25;
1266
+ break;
1267
+ }
1268
+ u.setPlaybackRate(y);
1269
+ case 25:
1270
+ case "end":
1271
+ return T.stop();
1272
+ }
1273
+ }, a, this);
1274
+ }));
1275
+ function i(a, o, u) {
1276
+ return n.apply(this, arguments);
1277
+ }
1278
+ return i;
1279
+ })()
1280
+ /**
1281
+ * Since video players do not play with 100% time precision, we need to closely monitor
1282
+ * our player to be sure it remains in sync with the TimingObject.
1283
+ *
1284
+ * If out of sync, we use the current conditions and the options provided to determine
1285
+ * whether to re-sync via setting currentTime or adjusting the playbackRate
1286
+ *
1287
+ * @param {TimingObject} timingObject
1288
+ * @param {PlayerControls} player
1289
+ * @param {TimingSrcConnectorOptions} options
1290
+ * @return {{cancel: (function(): void)}}
1291
+ */
1292
+ }, {
1293
+ key: "maintainPlaybackPosition",
1294
+ value: function(i, a, o) {
1295
+ var u = this, h = o.allowedDrift, s = o.maxAllowedDrift, g = o.minCheckInterval, y = o.maxRateAdjustment, M = o.maxTimeToCatchUp, T = Math.min(M, Math.max(g, s)) * 1e3, w = /* @__PURE__ */ (function() {
1296
+ var A = X(/* @__PURE__ */ I().mark(function j() {
1297
+ var m, p, f, v, E;
1298
+ return I().wrap(function(b) {
1299
+ for (; ; ) switch (b.prev = b.next) {
1300
+ case 0:
1301
+ if (b.t0 = i.query().velocity === 0, b.t0) {
1302
+ b.next = 6;
1303
+ break;
1304
+ }
1305
+ return b.next = 4, a.getPaused();
1306
+ case 4:
1307
+ b.t1 = b.sent, b.t0 = b.t1 === !0;
1308
+ case 6:
1309
+ if (!b.t0) {
1310
+ b.next = 8;
1311
+ break;
1312
+ }
1313
+ return b.abrupt("return");
1314
+ case 8:
1315
+ return b.t2 = i.query().position, b.next = 11, a.getCurrentTime();
1316
+ case 11:
1317
+ if (b.t3 = b.sent, m = b.t2 - b.t3, p = Math.abs(m), u.log("Drift: ".concat(m)), !(p > s)) {
1318
+ b.next = 22;
1319
+ break;
1320
+ }
1321
+ return b.next = 18, u.adjustSpeed(a, 0);
1322
+ case 18:
1323
+ a.setCurrentTime(i.query().position), u.log("Resync by currentTime"), b.next = 29;
1324
+ break;
1325
+ case 22:
1326
+ if (!(p > h)) {
1327
+ b.next = 29;
1328
+ break;
1329
+ }
1330
+ return f = p / M, v = y, E = f < v ? (v - f) / 2 : v, b.next = 28, u.adjustSpeed(a, E * Math.sign(m));
1331
+ case 28:
1332
+ u.log("Resync by playbackRate");
1333
+ case 29:
1334
+ case "end":
1335
+ return b.stop();
1336
+ }
1337
+ }, j);
1338
+ }));
1339
+ return function() {
1340
+ return A.apply(this, arguments);
1341
+ };
1342
+ })(), N = setInterval(function() {
1343
+ return w();
1344
+ }, T);
1345
+ return {
1346
+ cancel: function() {
1347
+ return clearInterval(N);
1348
+ }
1349
+ };
1350
+ }
1351
+ /**
1352
+ * @param {string} msg
1353
+ */
1354
+ }, {
1355
+ key: "log",
1356
+ value: function(i) {
1357
+ var a;
1358
+ (a = this.logger) === null || a === void 0 || a.call(this, "TimingSrcConnector: ".concat(i));
1359
+ }
1360
+ }, {
1361
+ key: "waitForTOReadyState",
1362
+ value: (
1363
+ /**
1364
+ * @param {TimingObject} timingObject
1365
+ * @param {TConnectionState} state
1366
+ * @return {Promise<void>}
1367
+ */
1368
+ function(i, a) {
1369
+ return new Promise(function(o) {
1370
+ var u = function h() {
1371
+ i.readyState === a ? o() : i.addEventListener("readystatechange", h, {
1372
+ once: !0
1373
+ });
1374
+ };
1375
+ u();
1376
+ });
1377
+ }
1378
+ )
1379
+ }]), e;
1380
+ })(/* @__PURE__ */ _e(EventTarget)), ie = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), F = {}, Ne = /* @__PURE__ */ (function() {
1381
+ function r(t) {
1382
+ var e = this, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1383
+ if (Be(this, r), 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]), typeof document < "u" && typeof t == "string" && (t = document.getElementById(t)), !ft(t))
1384
+ throw new TypeError("You must pass either a valid element or a valid id.");
1385
+ if (t.nodeName !== "IFRAME") {
1386
+ var i = t.querySelector("iframe");
1387
+ i && (t = i);
1388
+ }
1389
+ if (t.nodeName === "IFRAME" && !re(t.getAttribute("src") || ""))
1390
+ throw new Error("The player element passed isn’t a Vimeo embed.");
1391
+ if (ie.has(t))
1392
+ return ie.get(t);
1393
+ this._window = t.ownerDocument.defaultView, this.element = t, this.origin = "*";
1394
+ var a = new W(function(u, h) {
1395
+ if (e._onMessage = function(y) {
1396
+ if (!(!re(y.origin) || e.element.contentWindow !== y.source)) {
1397
+ e.origin === "*" && (e.origin = y.origin);
1398
+ var M = Pe(y.data), T = M && M.event === "error", w = T && M.data && M.data.method === "ready";
1399
+ if (w) {
1400
+ var N = new Error(M.data.message);
1401
+ N.name = M.data.name, h(N);
1402
+ return;
1403
+ }
1404
+ var A = M && M.event === "ready", j = M && M.method === "ping";
1405
+ if (A || j) {
1406
+ e.element.setAttribute("data-ready", "true"), u();
1407
+ return;
1408
+ }
1409
+ wt(e, M);
1410
+ }
1411
+ }, e._window.addEventListener("message", e._onMessage), e.element.nodeName !== "IFRAME") {
1412
+ var s = Ke(t, n), g = Xe(s);
1413
+ Ze(g, s, t).then(function(y) {
1414
+ var M = Ae(y, t);
1415
+ return e.element = M, e._originalElement = t, yt(t, M), ie.set(e.element, e), y;
1416
+ }).catch(h);
1417
+ }
1418
+ });
1419
+ if (Se.set(this, a), ie.set(this.element, this), this.element.nodeName === "IFRAME" && J(this, "ping"), F.isEnabled) {
1420
+ var o = function() {
1421
+ return F.exit();
1422
+ };
1423
+ this.fullscreenchangeHandler = function() {
1424
+ F.isFullscreen ? he(e, "event:exitFullscreen", o) : ke(e, "event:exitFullscreen", o), e.ready().then(function() {
1425
+ J(e, "fullscreenchange", F.isFullscreen);
1426
+ });
1427
+ }, F.on("fullscreenchange", this.fullscreenchangeHandler);
1428
+ }
1429
+ return this;
1430
+ }
1431
+ return Ge(r, [{
1432
+ key: "callMethod",
1433
+ value: function(e) {
1434
+ for (var n = this, i = arguments.length, a = new Array(i > 1 ? i - 1 : 0), o = 1; o < i; o++)
1435
+ a[o - 1] = arguments[o];
1436
+ if (e == null)
1437
+ throw new TypeError("You must pass a method name.");
1438
+ return new W(function(u, h) {
1439
+ return n.ready().then(function() {
1440
+ he(n, e, {
1441
+ resolve: u,
1442
+ reject: h
1443
+ }), J(n, e, a);
1444
+ }).catch(h);
1445
+ });
1446
+ }
1447
+ /**
1448
+ * Get a promise for the value of a player property.
1449
+ *
1450
+ * @param {string} name The property name
1451
+ * @return {Promise}
1452
+ */
1453
+ }, {
1454
+ key: "get",
1455
+ value: function(e) {
1456
+ var n = this;
1457
+ return new W(function(i, a) {
1458
+ return e = qe(e, "get"), n.ready().then(function() {
1459
+ he(n, e, {
1460
+ resolve: i,
1461
+ reject: a
1462
+ }), J(n, e);
1463
+ }).catch(a);
1464
+ });
1465
+ }
1466
+ /**
1467
+ * Get a promise for setting the value of a player property.
1468
+ *
1469
+ * @param {string} name The API method to call.
1470
+ * @param {mixed} value The value to set.
1471
+ * @return {Promise}
1472
+ */
1473
+ }, {
1474
+ key: "set",
1475
+ value: function(e, n) {
1476
+ var i = this;
1477
+ return new W(function(a, o) {
1478
+ if (e = qe(e, "set"), n == null)
1479
+ throw new TypeError("There must be a value to set.");
1480
+ return i.ready().then(function() {
1481
+ he(i, e, {
1482
+ resolve: a,
1483
+ reject: o
1484
+ }), J(i, e, n);
1485
+ }).catch(o);
1486
+ });
1487
+ }
1488
+ /**
1489
+ * Add an event listener for the specified event. Will call the
1490
+ * callback with a single parameter, `data`, that contains the data for
1491
+ * that event.
1492
+ *
1493
+ * @param {string} eventName The name of the event.
1494
+ * @param {function(*)} callback The function to call when the event fires.
1495
+ * @return {void}
1496
+ */
1497
+ }, {
1498
+ key: "on",
1499
+ value: function(e, n) {
1500
+ if (!e)
1501
+ throw new TypeError("You must pass an event name.");
1502
+ if (!n)
1503
+ throw new TypeError("You must pass a callback function.");
1504
+ if (typeof n != "function")
1505
+ throw new TypeError("The callback must be a function.");
1506
+ var i = be(this, "event:".concat(e));
1507
+ i.length === 0 && this.callMethod("addEventListener", e).catch(function() {
1508
+ }), he(this, "event:".concat(e), n);
1509
+ }
1510
+ /**
1511
+ * Remove an event listener for the specified event. Will remove all
1512
+ * listeners for that event if a `callback` isn’t passed, or only that
1513
+ * specific callback if it is passed.
1514
+ *
1515
+ * @param {string} eventName The name of the event.
1516
+ * @param {function} [callback] The specific callback to remove.
1517
+ * @return {void}
1518
+ */
1519
+ }, {
1520
+ key: "off",
1521
+ value: function(e, n) {
1522
+ if (!e)
1523
+ throw new TypeError("You must pass an event name.");
1524
+ if (n && typeof n != "function")
1525
+ throw new TypeError("The callback must be a function.");
1526
+ var i = ke(this, "event:".concat(e), n);
1527
+ i && this.callMethod("removeEventListener", e).catch(function(a) {
1528
+ });
1529
+ }
1530
+ /**
1531
+ * A promise to load a new video.
1532
+ *
1533
+ * @promise LoadVideoPromise
1534
+ * @fulfill {number} The video with this id or url successfully loaded.
1535
+ * @reject {TypeError} The id was not a number.
1536
+ */
1537
+ /**
1538
+ * Load a new video into this embed. The promise will be resolved if
1539
+ * the video is successfully loaded, or it will be rejected if it could
1540
+ * not be loaded.
1541
+ *
1542
+ * @param {number|string|object} options The id of the video, the url of the video, or an object with embed options.
1543
+ * @return {LoadVideoPromise}
1544
+ */
1545
+ }, {
1546
+ key: "loadVideo",
1547
+ value: function(e) {
1548
+ return this.callMethod("loadVideo", e);
1549
+ }
1550
+ /**
1551
+ * A promise to perform an action when the Player is ready.
1552
+ *
1553
+ * @todo document errors
1554
+ * @promise LoadVideoPromise
1555
+ * @fulfill {void}
1556
+ */
1557
+ /**
1558
+ * Trigger a function when the player iframe has initialized. You do not
1559
+ * need to wait for `ready` to trigger to begin adding event listeners
1560
+ * or calling other methods.
1561
+ *
1562
+ * @return {ReadyPromise}
1563
+ */
1564
+ }, {
1565
+ key: "ready",
1566
+ value: function() {
1567
+ var e = Se.get(this) || new W(function(n, i) {
1568
+ i(new Error("Unknown player. Probably unloaded."));
1569
+ });
1570
+ return W.resolve(e);
1571
+ }
1572
+ /**
1573
+ * A promise to add a cue point to the player.
1574
+ *
1575
+ * @promise AddCuePointPromise
1576
+ * @fulfill {string} The id of the cue point to use for removeCuePoint.
1577
+ * @reject {RangeError} the time was less than 0 or greater than the
1578
+ * video’s duration.
1579
+ * @reject {UnsupportedError} Cue points are not supported with the current
1580
+ * player or browser.
1581
+ */
1582
+ /**
1583
+ * Add a cue point to the player.
1584
+ *
1585
+ * @param {number} time The time for the cue point.
1586
+ * @param {object} [data] Arbitrary data to be returned with the cue point.
1587
+ * @return {AddCuePointPromise}
1588
+ */
1589
+ }, {
1590
+ key: "addCuePoint",
1591
+ value: function(e) {
1592
+ var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1593
+ return this.callMethod("addCuePoint", {
1594
+ time: e,
1595
+ data: n
1596
+ });
1597
+ }
1598
+ /**
1599
+ * A promise to remove a cue point from the player.
1600
+ *
1601
+ * @promise AddCuePointPromise
1602
+ * @fulfill {string} The id of the cue point that was removed.
1603
+ * @reject {InvalidCuePoint} The cue point with the specified id was not
1604
+ * found.
1605
+ * @reject {UnsupportedError} Cue points are not supported with the current
1606
+ * player or browser.
1607
+ */
1608
+ /**
1609
+ * Remove a cue point from the video.
1610
+ *
1611
+ * @param {string} id The id of the cue point to remove.
1612
+ * @return {RemoveCuePointPromise}
1613
+ */
1614
+ }, {
1615
+ key: "removeCuePoint",
1616
+ value: function(e) {
1617
+ return this.callMethod("removeCuePoint", e);
1618
+ }
1619
+ /**
1620
+ * A representation of a text track on a video.
1621
+ *
1622
+ * @typedef {Object} VimeoTextTrack
1623
+ * @property {string} language The ISO language code.
1624
+ * @property {string} kind The kind of track it is (captions or subtitles).
1625
+ * @property {string} label The human‐readable label for the track.
1626
+ */
1627
+ /**
1628
+ * A promise to enable a text track.
1629
+ *
1630
+ * @promise EnableTextTrackPromise
1631
+ * @fulfill {VimeoTextTrack} The text track that was enabled.
1632
+ * @reject {InvalidTrackLanguageError} No track was available with the
1633
+ * specified language.
1634
+ * @reject {InvalidTrackError} No track was available with the specified
1635
+ * language and kind.
1636
+ */
1637
+ /**
1638
+ * Enable the text track with the specified language, and optionally the
1639
+ * specified kind (captions or subtitles).
1640
+ *
1641
+ * When set via the API, the track language will not change the viewer’s
1642
+ * stored preference.
1643
+ *
1644
+ * @param {string} language The two‐letter language code.
1645
+ * @param {string} [kind] The kind of track to enable (captions or subtitles).
1646
+ * @return {EnableTextTrackPromise}
1647
+ */
1648
+ }, {
1649
+ key: "enableTextTrack",
1650
+ value: function(e, n) {
1651
+ if (!e)
1652
+ throw new TypeError("You must pass a language.");
1653
+ return this.callMethod("enableTextTrack", {
1654
+ language: e,
1655
+ kind: n
1656
+ });
1657
+ }
1658
+ /**
1659
+ * A promise to disable the active text track.
1660
+ *
1661
+ * @promise DisableTextTrackPromise
1662
+ * @fulfill {void} The track was disabled.
1663
+ */
1664
+ /**
1665
+ * Disable the currently-active text track.
1666
+ *
1667
+ * @return {DisableTextTrackPromise}
1668
+ */
1669
+ }, {
1670
+ key: "disableTextTrack",
1671
+ value: function() {
1672
+ return this.callMethod("disableTextTrack");
1673
+ }
1674
+ /**
1675
+ * A promise to pause the video.
1676
+ *
1677
+ * @promise PausePromise
1678
+ * @fulfill {void} The video was paused.
1679
+ */
1680
+ /**
1681
+ * Pause the video if it’s playing.
1682
+ *
1683
+ * @return {PausePromise}
1684
+ */
1685
+ }, {
1686
+ key: "pause",
1687
+ value: function() {
1688
+ return this.callMethod("pause");
1689
+ }
1690
+ /**
1691
+ * A promise to play the video.
1692
+ *
1693
+ * @promise PlayPromise
1694
+ * @fulfill {void} The video was played.
1695
+ */
1696
+ /**
1697
+ * Play the video if it’s paused. **Note:** on iOS and some other
1698
+ * mobile devices, you cannot programmatically trigger play. Once the
1699
+ * viewer has tapped on the play button in the player, however, you
1700
+ * will be able to use this function.
1701
+ *
1702
+ * @return {PlayPromise}
1703
+ */
1704
+ }, {
1705
+ key: "play",
1706
+ value: function() {
1707
+ return this.callMethod("play");
1708
+ }
1709
+ /**
1710
+ * Request that the player enters fullscreen.
1711
+ * @return {Promise}
1712
+ */
1713
+ }, {
1714
+ key: "requestFullscreen",
1715
+ value: function() {
1716
+ return F.isEnabled ? F.request(this.element) : this.callMethod("requestFullscreen");
1717
+ }
1718
+ /**
1719
+ * Request that the player exits fullscreen.
1720
+ * @return {Promise}
1721
+ */
1722
+ }, {
1723
+ key: "exitFullscreen",
1724
+ value: function() {
1725
+ return F.isEnabled ? F.exit() : this.callMethod("exitFullscreen");
1726
+ }
1727
+ /**
1728
+ * Returns true if the player is currently fullscreen.
1729
+ * @return {Promise}
1730
+ */
1731
+ }, {
1732
+ key: "getFullscreen",
1733
+ value: function() {
1734
+ return F.isEnabled ? W.resolve(F.isFullscreen) : this.get("fullscreen");
1735
+ }
1736
+ /**
1737
+ * Request that the player enters picture-in-picture.
1738
+ * @return {Promise}
1739
+ */
1740
+ }, {
1741
+ key: "requestPictureInPicture",
1742
+ value: function() {
1743
+ return this.callMethod("requestPictureInPicture");
1744
+ }
1745
+ /**
1746
+ * Request that the player exits picture-in-picture.
1747
+ * @return {Promise}
1748
+ */
1749
+ }, {
1750
+ key: "exitPictureInPicture",
1751
+ value: function() {
1752
+ return this.callMethod("exitPictureInPicture");
1753
+ }
1754
+ /**
1755
+ * Returns true if the player is currently picture-in-picture.
1756
+ * @return {Promise}
1757
+ */
1758
+ }, {
1759
+ key: "getPictureInPicture",
1760
+ value: function() {
1761
+ return this.get("pictureInPicture");
1762
+ }
1763
+ /**
1764
+ * A promise to prompt the viewer to initiate remote playback.
1765
+ *
1766
+ * @promise RemotePlaybackPromptPromise
1767
+ * @fulfill {void}
1768
+ * @reject {NotFoundError} No remote playback device is available.
1769
+ */
1770
+ /**
1771
+ * Request to prompt the user to initiate remote playback.
1772
+ *
1773
+ * @return {RemotePlaybackPromptPromise}
1774
+ */
1775
+ }, {
1776
+ key: "remotePlaybackPrompt",
1777
+ value: function() {
1778
+ return this.callMethod("remotePlaybackPrompt");
1779
+ }
1780
+ /**
1781
+ * A promise to unload the video.
1782
+ *
1783
+ * @promise UnloadPromise
1784
+ * @fulfill {void} The video was unloaded.
1785
+ */
1786
+ /**
1787
+ * Return the player to its initial state.
1788
+ *
1789
+ * @return {UnloadPromise}
1790
+ */
1791
+ }, {
1792
+ key: "unload",
1793
+ value: function() {
1794
+ return this.callMethod("unload");
1795
+ }
1796
+ /**
1797
+ * Cleanup the player and remove it from the DOM
1798
+ *
1799
+ * It won't be usable and a new one should be constructed
1800
+ * in order to do any operations.
1801
+ *
1802
+ * @return {Promise}
1803
+ */
1804
+ }, {
1805
+ key: "destroy",
1806
+ value: function() {
1807
+ var e = this;
1808
+ return new W(function(n) {
1809
+ if (Se.delete(e), ie.delete(e.element), e._originalElement && (ie.delete(e._originalElement), e._originalElement.removeAttribute("data-vimeo-initialized")), e.element && e.element.nodeName === "IFRAME" && 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 && e.element.nodeName === "DIV" && e.element.parentNode) {
1810
+ e.element.removeAttribute("data-vimeo-initialized");
1811
+ var i = e.element.querySelector("iframe");
1812
+ i && i.parentNode && (i.parentNode.parentNode && e._originalElement && e._originalElement !== i.parentNode ? i.parentNode.parentNode.removeChild(i.parentNode) : i.parentNode.removeChild(i));
1813
+ }
1814
+ e._window.removeEventListener("message", e._onMessage), F.isEnabled && F.off("fullscreenchange", e.fullscreenchangeHandler), n();
1815
+ });
1816
+ }
1817
+ /**
1818
+ * A promise to get the autopause behavior of the video.
1819
+ *
1820
+ * @promise GetAutopausePromise
1821
+ * @fulfill {boolean} Whether autopause is turned on or off.
1822
+ * @reject {UnsupportedError} Autopause is not supported with the current
1823
+ * player or browser.
1824
+ */
1825
+ /**
1826
+ * Get the autopause behavior for this player.
1827
+ *
1828
+ * @return {GetAutopausePromise}
1829
+ */
1830
+ }, {
1831
+ key: "getAutopause",
1832
+ value: function() {
1833
+ return this.get("autopause");
1834
+ }
1835
+ /**
1836
+ * A promise to set the autopause behavior of the video.
1837
+ *
1838
+ * @promise SetAutopausePromise
1839
+ * @fulfill {boolean} Whether autopause is turned on or off.
1840
+ * @reject {UnsupportedError} Autopause is not supported with the current
1841
+ * player or browser.
1842
+ */
1843
+ /**
1844
+ * Enable or disable the autopause behavior of this player.
1845
+ *
1846
+ * By default, when another video is played in the same browser, this
1847
+ * player will automatically pause. Unless you have a specific reason
1848
+ * for doing so, we recommend that you leave autopause set to the
1849
+ * default (`true`).
1850
+ *
1851
+ * @param {boolean} autopause
1852
+ * @return {SetAutopausePromise}
1853
+ */
1854
+ }, {
1855
+ key: "setAutopause",
1856
+ value: function(e) {
1857
+ return this.set("autopause", e);
1858
+ }
1859
+ /**
1860
+ * A promise to get the buffered property of the video.
1861
+ *
1862
+ * @promise GetBufferedPromise
1863
+ * @fulfill {Array} Buffered Timeranges converted to an Array.
1864
+ */
1865
+ /**
1866
+ * Get the buffered property of the video.
1867
+ *
1868
+ * @return {GetBufferedPromise}
1869
+ */
1870
+ }, {
1871
+ key: "getBuffered",
1872
+ value: function() {
1873
+ return this.get("buffered");
1874
+ }
1875
+ /**
1876
+ * @typedef {Object} CameraProperties
1877
+ * @prop {number} props.yaw - Number between 0 and 360.
1878
+ * @prop {number} props.pitch - Number between -90 and 90.
1879
+ * @prop {number} props.roll - Number between -180 and 180.
1880
+ * @prop {number} props.fov - The field of view in degrees.
1881
+ */
1882
+ /**
1883
+ * A promise to get the camera properties of the player.
1884
+ *
1885
+ * @promise GetCameraPromise
1886
+ * @fulfill {CameraProperties} The camera properties.
1887
+ */
1888
+ /**
1889
+ * For 360° videos get the camera properties for this player.
1890
+ *
1891
+ * @return {GetCameraPromise}
1892
+ */
1893
+ }, {
1894
+ key: "getCameraProps",
1895
+ value: function() {
1896
+ return this.get("cameraProps");
1897
+ }
1898
+ /**
1899
+ * A promise to set the camera properties of the player.
1900
+ *
1901
+ * @promise SetCameraPromise
1902
+ * @fulfill {Object} The camera was successfully set.
1903
+ * @reject {RangeError} The range was out of bounds.
1904
+ */
1905
+ /**
1906
+ * For 360° videos set the camera properties for this player.
1907
+ *
1908
+ * @param {CameraProperties} camera The camera properties
1909
+ * @return {SetCameraPromise}
1910
+ */
1911
+ }, {
1912
+ key: "setCameraProps",
1913
+ value: function(e) {
1914
+ return this.set("cameraProps", e);
1915
+ }
1916
+ /**
1917
+ * A representation of a chapter.
1918
+ *
1919
+ * @typedef {Object} VimeoChapter
1920
+ * @property {number} startTime The start time of the chapter.
1921
+ * @property {object} title The title of the chapter.
1922
+ * @property {number} index The place in the order of Chapters. Starts at 1.
1923
+ */
1924
+ /**
1925
+ * A promise to get chapters for the video.
1926
+ *
1927
+ * @promise GetChaptersPromise
1928
+ * @fulfill {VimeoChapter[]} The chapters for the video.
1929
+ */
1930
+ /**
1931
+ * Get an array of all the chapters for the video.
1932
+ *
1933
+ * @return {GetChaptersPromise}
1934
+ */
1935
+ }, {
1936
+ key: "getChapters",
1937
+ value: function() {
1938
+ return this.get("chapters");
1939
+ }
1940
+ /**
1941
+ * A promise to get the currently active chapter.
1942
+ *
1943
+ * @promise GetCurrentChaptersPromise
1944
+ * @fulfill {VimeoChapter|undefined} The current chapter for the video.
1945
+ */
1946
+ /**
1947
+ * Get the currently active chapter for the video.
1948
+ *
1949
+ * @return {GetCurrentChaptersPromise}
1950
+ */
1951
+ }, {
1952
+ key: "getCurrentChapter",
1953
+ value: function() {
1954
+ return this.get("currentChapter");
1955
+ }
1956
+ /**
1957
+ * A promise to get the accent color of the player.
1958
+ *
1959
+ * @promise GetColorPromise
1960
+ * @fulfill {string} The hex color of the player.
1961
+ */
1962
+ /**
1963
+ * Get the accent color for this player. Note this is deprecated in place of `getColorTwo`.
1964
+ *
1965
+ * @return {GetColorPromise}
1966
+ */
1967
+ }, {
1968
+ key: "getColor",
1969
+ value: function() {
1970
+ return this.get("color");
1971
+ }
1972
+ /**
1973
+ * A promise to get all colors for the player in an array.
1974
+ *
1975
+ * @promise GetColorsPromise
1976
+ * @fulfill {string[]} The hex colors of the player.
1977
+ */
1978
+ /**
1979
+ * Get all the colors for this player in an array: [colorOne, colorTwo, colorThree, colorFour]
1980
+ *
1981
+ * @return {GetColorPromise}
1982
+ */
1983
+ }, {
1984
+ key: "getColors",
1985
+ value: function() {
1986
+ return W.all([this.get("colorOne"), this.get("colorTwo"), this.get("colorThree"), this.get("colorFour")]);
1987
+ }
1988
+ /**
1989
+ * A promise to set the accent color of the player.
1990
+ *
1991
+ * @promise SetColorPromise
1992
+ * @fulfill {string} The color was successfully set.
1993
+ * @reject {TypeError} The string was not a valid hex or rgb color.
1994
+ * @reject {ContrastError} The color was set, but the contrast is
1995
+ * outside of the acceptable range.
1996
+ * @reject {EmbedSettingsError} The owner of the player has chosen to
1997
+ * use a specific color.
1998
+ */
1999
+ /**
2000
+ * Set the accent color of this player to a hex or rgb string. Setting the
2001
+ * color may fail if the owner of the video has set their embed
2002
+ * preferences to force a specific color.
2003
+ * Note this is deprecated in place of `setColorTwo`.
2004
+ *
2005
+ * @param {string} color The hex or rgb color string to set.
2006
+ * @return {SetColorPromise}
2007
+ */
2008
+ }, {
2009
+ key: "setColor",
2010
+ value: function(e) {
2011
+ return this.set("color", e);
2012
+ }
2013
+ /**
2014
+ * A promise to set all colors for the player.
2015
+ *
2016
+ * @promise SetColorsPromise
2017
+ * @fulfill {string[]} The colors were successfully set.
2018
+ * @reject {TypeError} The string was not a valid hex or rgb color.
2019
+ * @reject {ContrastError} The color was set, but the contrast is
2020
+ * outside of the acceptable range.
2021
+ * @reject {EmbedSettingsError} The owner of the player has chosen to
2022
+ * use a specific color.
2023
+ */
2024
+ /**
2025
+ * Set the colors of this player to a hex or rgb string. Setting the
2026
+ * color may fail if the owner of the video has set their embed
2027
+ * preferences to force a specific color.
2028
+ * The colors should be passed in as an array: [colorOne, colorTwo, colorThree, colorFour].
2029
+ * If a color should not be set, the index in the array can be left as null.
2030
+ *
2031
+ * @param {string[]} colors Array of the hex or rgb color strings to set.
2032
+ * @return {SetColorsPromise}
2033
+ */
2034
+ }, {
2035
+ key: "setColors",
2036
+ value: function(e) {
2037
+ if (!Array.isArray(e))
2038
+ return new W(function(a, o) {
2039
+ return o(new TypeError("Argument must be an array."));
2040
+ });
2041
+ var n = new W(function(a) {
2042
+ return a(null);
2043
+ }), i = [e[0] ? this.set("colorOne", e[0]) : n, e[1] ? this.set("colorTwo", e[1]) : n, e[2] ? this.set("colorThree", e[2]) : n, e[3] ? this.set("colorFour", e[3]) : n];
2044
+ return W.all(i);
2045
+ }
2046
+ /**
2047
+ * A representation of a cue point.
2048
+ *
2049
+ * @typedef {Object} VimeoCuePoint
2050
+ * @property {number} time The time of the cue point.
2051
+ * @property {object} data The data passed when adding the cue point.
2052
+ * @property {string} id The unique id for use with removeCuePoint.
2053
+ */
2054
+ /**
2055
+ * A promise to get the cue points of a video.
2056
+ *
2057
+ * @promise GetCuePointsPromise
2058
+ * @fulfill {VimeoCuePoint[]} The cue points added to the video.
2059
+ * @reject {UnsupportedError} Cue points are not supported with the current
2060
+ * player or browser.
2061
+ */
2062
+ /**
2063
+ * Get an array of the cue points added to the video.
2064
+ *
2065
+ * @return {GetCuePointsPromise}
2066
+ */
2067
+ }, {
2068
+ key: "getCuePoints",
2069
+ value: function() {
2070
+ return this.get("cuePoints");
2071
+ }
2072
+ /**
2073
+ * A promise to get the current time of the video.
2074
+ *
2075
+ * @promise GetCurrentTimePromise
2076
+ * @fulfill {number} The current time in seconds.
2077
+ */
2078
+ /**
2079
+ * Get the current playback position in seconds.
2080
+ *
2081
+ * @return {GetCurrentTimePromise}
2082
+ */
2083
+ }, {
2084
+ key: "getCurrentTime",
2085
+ value: function() {
2086
+ return this.get("currentTime");
2087
+ }
2088
+ /**
2089
+ * A promise to set the current time of the video.
2090
+ *
2091
+ * @promise SetCurrentTimePromise
2092
+ * @fulfill {number} The actual current time that was set.
2093
+ * @reject {RangeError} the time was less than 0 or greater than the
2094
+ * video’s duration.
2095
+ */
2096
+ /**
2097
+ * Set the current playback position in seconds. If the player was
2098
+ * paused, it will remain paused. Likewise, if the player was playing,
2099
+ * it will resume playing once the video has buffered.
2100
+ *
2101
+ * You can provide an accurate time and the player will attempt to seek
2102
+ * to as close to that time as possible. The exact time will be the
2103
+ * fulfilled value of the promise.
2104
+ *
2105
+ * @param {number} currentTime
2106
+ * @return {SetCurrentTimePromise}
2107
+ */
2108
+ }, {
2109
+ key: "setCurrentTime",
2110
+ value: function(e) {
2111
+ return this.set("currentTime", e);
2112
+ }
2113
+ /**
2114
+ * A promise to get the duration of the video.
2115
+ *
2116
+ * @promise GetDurationPromise
2117
+ * @fulfill {number} The duration in seconds.
2118
+ */
2119
+ /**
2120
+ * Get the duration of the video in seconds. It will be rounded to the
2121
+ * nearest second before playback begins, and to the nearest thousandth
2122
+ * of a second after playback begins.
2123
+ *
2124
+ * @return {GetDurationPromise}
2125
+ */
2126
+ }, {
2127
+ key: "getDuration",
2128
+ value: function() {
2129
+ return this.get("duration");
2130
+ }
2131
+ /**
2132
+ * A promise to get the ended state of the video.
2133
+ *
2134
+ * @promise GetEndedPromise
2135
+ * @fulfill {boolean} Whether or not the video has ended.
2136
+ */
2137
+ /**
2138
+ * Get the ended state of the video. The video has ended if
2139
+ * `currentTime === duration`.
2140
+ *
2141
+ * @return {GetEndedPromise}
2142
+ */
2143
+ }, {
2144
+ key: "getEnded",
2145
+ value: function() {
2146
+ return this.get("ended");
2147
+ }
2148
+ /**
2149
+ * A promise to get the loop state of the player.
2150
+ *
2151
+ * @promise GetLoopPromise
2152
+ * @fulfill {boolean} Whether or not the player is set to loop.
2153
+ */
2154
+ /**
2155
+ * Get the loop state of the player.
2156
+ *
2157
+ * @return {GetLoopPromise}
2158
+ */
2159
+ }, {
2160
+ key: "getLoop",
2161
+ value: function() {
2162
+ return this.get("loop");
2163
+ }
2164
+ /**
2165
+ * A promise to set the loop state of the player.
2166
+ *
2167
+ * @promise SetLoopPromise
2168
+ * @fulfill {boolean} The loop state that was set.
2169
+ */
2170
+ /**
2171
+ * Set the loop state of the player. When set to `true`, the player
2172
+ * will start over immediately once playback ends.
2173
+ *
2174
+ * @param {boolean} loop
2175
+ * @return {SetLoopPromise}
2176
+ */
2177
+ }, {
2178
+ key: "setLoop",
2179
+ value: function(e) {
2180
+ return this.set("loop", e);
2181
+ }
2182
+ /**
2183
+ * A promise to set the muted state of the player.
2184
+ *
2185
+ * @promise SetMutedPromise
2186
+ * @fulfill {boolean} The muted state that was set.
2187
+ */
2188
+ /**
2189
+ * Set the muted state of the player. When set to `true`, the player
2190
+ * volume will be muted.
2191
+ *
2192
+ * @param {boolean} muted
2193
+ * @return {SetMutedPromise}
2194
+ */
2195
+ }, {
2196
+ key: "setMuted",
2197
+ value: function(e) {
2198
+ return this.set("muted", e);
2199
+ }
2200
+ /**
2201
+ * A promise to get the muted state of the player.
2202
+ *
2203
+ * @promise GetMutedPromise
2204
+ * @fulfill {boolean} Whether or not the player is muted.
2205
+ */
2206
+ /**
2207
+ * Get the muted state of the player.
2208
+ *
2209
+ * @return {GetMutedPromise}
2210
+ */
2211
+ }, {
2212
+ key: "getMuted",
2213
+ value: function() {
2214
+ return this.get("muted");
2215
+ }
2216
+ /**
2217
+ * A promise to get the paused state of the player.
2218
+ *
2219
+ * @promise GetLoopPromise
2220
+ * @fulfill {boolean} Whether or not the video is paused.
2221
+ */
2222
+ /**
2223
+ * Get the paused state of the player.
2224
+ *
2225
+ * @return {GetLoopPromise}
2226
+ */
2227
+ }, {
2228
+ key: "getPaused",
2229
+ value: function() {
2230
+ return this.get("paused");
2231
+ }
2232
+ /**
2233
+ * A promise to get the playback rate of the player.
2234
+ *
2235
+ * @promise GetPlaybackRatePromise
2236
+ * @fulfill {number} The playback rate of the player on a scale from 0 to 2.
2237
+ */
2238
+ /**
2239
+ * Get the playback rate of the player on a scale from `0` to `2`.
2240
+ *
2241
+ * @return {GetPlaybackRatePromise}
2242
+ */
2243
+ }, {
2244
+ key: "getPlaybackRate",
2245
+ value: function() {
2246
+ return this.get("playbackRate");
2247
+ }
2248
+ /**
2249
+ * A promise to set the playbackrate of the player.
2250
+ *
2251
+ * @promise SetPlaybackRatePromise
2252
+ * @fulfill {number} The playback rate was set.
2253
+ * @reject {RangeError} The playback rate was less than 0 or greater than 2.
2254
+ */
2255
+ /**
2256
+ * Set the playback rate of the player on a scale from `0` to `2`. When set
2257
+ * via the API, the playback rate will not be synchronized to other
2258
+ * players or stored as the viewer's preference.
2259
+ *
2260
+ * @param {number} playbackRate
2261
+ * @return {SetPlaybackRatePromise}
2262
+ */
2263
+ }, {
2264
+ key: "setPlaybackRate",
2265
+ value: function(e) {
2266
+ return this.set("playbackRate", e);
2267
+ }
2268
+ /**
2269
+ * A promise to get the played property of the video.
2270
+ *
2271
+ * @promise GetPlayedPromise
2272
+ * @fulfill {Array} Played Timeranges converted to an Array.
2273
+ */
2274
+ /**
2275
+ * Get the played property of the video.
2276
+ *
2277
+ * @return {GetPlayedPromise}
2278
+ */
2279
+ }, {
2280
+ key: "getPlayed",
2281
+ value: function() {
2282
+ return this.get("played");
2283
+ }
2284
+ /**
2285
+ * A promise to get the qualities available of the current video.
2286
+ *
2287
+ * @promise GetQualitiesPromise
2288
+ * @fulfill {Array} The qualities of the video.
2289
+ */
2290
+ /**
2291
+ * Get the qualities of the current video.
2292
+ *
2293
+ * @return {GetQualitiesPromise}
2294
+ */
2295
+ }, {
2296
+ key: "getQualities",
2297
+ value: function() {
2298
+ return this.get("qualities");
2299
+ }
2300
+ /**
2301
+ * A promise to get the current set quality of the video.
2302
+ *
2303
+ * @promise GetQualityPromise
2304
+ * @fulfill {string} The current set quality.
2305
+ */
2306
+ /**
2307
+ * Get the current set quality of the video.
2308
+ *
2309
+ * @return {GetQualityPromise}
2310
+ */
2311
+ }, {
2312
+ key: "getQuality",
2313
+ value: function() {
2314
+ return this.get("quality");
2315
+ }
2316
+ /**
2317
+ * A promise to set the video quality.
2318
+ *
2319
+ * @promise SetQualityPromise
2320
+ * @fulfill {number} The quality was set.
2321
+ * @reject {RangeError} The quality is not available.
2322
+ */
2323
+ /**
2324
+ * Set a video quality.
2325
+ *
2326
+ * @param {string} quality
2327
+ * @return {SetQualityPromise}
2328
+ */
2329
+ }, {
2330
+ key: "setQuality",
2331
+ value: function(e) {
2332
+ return this.set("quality", e);
2333
+ }
2334
+ /**
2335
+ * A promise to get the remote playback availability.
2336
+ *
2337
+ * @promise RemotePlaybackAvailabilityPromise
2338
+ * @fulfill {boolean} Whether remote playback is available.
2339
+ */
2340
+ /**
2341
+ * Get the availability of remote playback.
2342
+ *
2343
+ * @return {RemotePlaybackAvailabilityPromise}
2344
+ */
2345
+ }, {
2346
+ key: "getRemotePlaybackAvailability",
2347
+ value: function() {
2348
+ return this.get("remotePlaybackAvailability");
2349
+ }
2350
+ /**
2351
+ * A promise to get the current remote playback state.
2352
+ *
2353
+ * @promise RemotePlaybackStatePromise
2354
+ * @fulfill {string} The state of the remote playback: connecting, connected, or disconnected.
2355
+ */
2356
+ /**
2357
+ * Get the current remote playback state.
2358
+ *
2359
+ * @return {RemotePlaybackStatePromise}
2360
+ */
2361
+ }, {
2362
+ key: "getRemotePlaybackState",
2363
+ value: function() {
2364
+ return this.get("remotePlaybackState");
2365
+ }
2366
+ /**
2367
+ * A promise to get the seekable property of the video.
2368
+ *
2369
+ * @promise GetSeekablePromise
2370
+ * @fulfill {Array} Seekable Timeranges converted to an Array.
2371
+ */
2372
+ /**
2373
+ * Get the seekable property of the video.
2374
+ *
2375
+ * @return {GetSeekablePromise}
2376
+ */
2377
+ }, {
2378
+ key: "getSeekable",
2379
+ value: function() {
2380
+ return this.get("seekable");
2381
+ }
2382
+ /**
2383
+ * A promise to get the seeking property of the player.
2384
+ *
2385
+ * @promise GetSeekingPromise
2386
+ * @fulfill {boolean} Whether or not the player is currently seeking.
2387
+ */
2388
+ /**
2389
+ * Get if the player is currently seeking.
2390
+ *
2391
+ * @return {GetSeekingPromise}
2392
+ */
2393
+ }, {
2394
+ key: "getSeeking",
2395
+ value: function() {
2396
+ return this.get("seeking");
2397
+ }
2398
+ /**
2399
+ * A promise to get the text tracks of a video.
2400
+ *
2401
+ * @promise GetTextTracksPromise
2402
+ * @fulfill {VimeoTextTrack[]} The text tracks associated with the video.
2403
+ */
2404
+ /**
2405
+ * Get an array of the text tracks that exist for the video.
2406
+ *
2407
+ * @return {GetTextTracksPromise}
2408
+ */
2409
+ }, {
2410
+ key: "getTextTracks",
2411
+ value: function() {
2412
+ return this.get("textTracks");
2413
+ }
2414
+ /**
2415
+ * A promise to get the embed code for the video.
2416
+ *
2417
+ * @promise GetVideoEmbedCodePromise
2418
+ * @fulfill {string} The `<iframe>` embed code for the video.
2419
+ */
2420
+ /**
2421
+ * Get the `<iframe>` embed code for the video.
2422
+ *
2423
+ * @return {GetVideoEmbedCodePromise}
2424
+ */
2425
+ }, {
2426
+ key: "getVideoEmbedCode",
2427
+ value: function() {
2428
+ return this.get("videoEmbedCode");
2429
+ }
2430
+ /**
2431
+ * A promise to get the id of the video.
2432
+ *
2433
+ * @promise GetVideoIdPromise
2434
+ * @fulfill {number} The id of the video.
2435
+ */
2436
+ /**
2437
+ * Get the id of the video.
2438
+ *
2439
+ * @return {GetVideoIdPromise}
2440
+ */
2441
+ }, {
2442
+ key: "getVideoId",
2443
+ value: function() {
2444
+ return this.get("videoId");
2445
+ }
2446
+ /**
2447
+ * A promise to get the title of the video.
2448
+ *
2449
+ * @promise GetVideoTitlePromise
2450
+ * @fulfill {number} The title of the video.
2451
+ */
2452
+ /**
2453
+ * Get the title of the video.
2454
+ *
2455
+ * @return {GetVideoTitlePromise}
2456
+ */
2457
+ }, {
2458
+ key: "getVideoTitle",
2459
+ value: function() {
2460
+ return this.get("videoTitle");
2461
+ }
2462
+ /**
2463
+ * A promise to get the native width of the video.
2464
+ *
2465
+ * @promise GetVideoWidthPromise
2466
+ * @fulfill {number} The native width of the video.
2467
+ */
2468
+ /**
2469
+ * Get the native width of the currently‐playing video. The width of
2470
+ * the highest‐resolution available will be used before playback begins.
2471
+ *
2472
+ * @return {GetVideoWidthPromise}
2473
+ */
2474
+ }, {
2475
+ key: "getVideoWidth",
2476
+ value: function() {
2477
+ return this.get("videoWidth");
2478
+ }
2479
+ /**
2480
+ * A promise to get the native height of the video.
2481
+ *
2482
+ * @promise GetVideoHeightPromise
2483
+ * @fulfill {number} The native height of the video.
2484
+ */
2485
+ /**
2486
+ * Get the native height of the currently‐playing video. The height of
2487
+ * the highest‐resolution available will be used before playback begins.
2488
+ *
2489
+ * @return {GetVideoHeightPromise}
2490
+ */
2491
+ }, {
2492
+ key: "getVideoHeight",
2493
+ value: function() {
2494
+ return this.get("videoHeight");
2495
+ }
2496
+ /**
2497
+ * A promise to get the vimeo.com url for the video.
2498
+ *
2499
+ * @promise GetVideoUrlPromise
2500
+ * @fulfill {number} The vimeo.com url for the video.
2501
+ * @reject {PrivacyError} The url isn’t available because of the video’s privacy setting.
2502
+ */
2503
+ /**
2504
+ * Get the vimeo.com url for the video.
2505
+ *
2506
+ * @return {GetVideoUrlPromise}
2507
+ */
2508
+ }, {
2509
+ key: "getVideoUrl",
2510
+ value: function() {
2511
+ return this.get("videoUrl");
2512
+ }
2513
+ /**
2514
+ * A promise to get the volume level of the player.
2515
+ *
2516
+ * @promise GetVolumePromise
2517
+ * @fulfill {number} The volume level of the player on a scale from 0 to 1.
2518
+ */
2519
+ /**
2520
+ * Get the current volume level of the player on a scale from `0` to `1`.
2521
+ *
2522
+ * Most mobile devices do not support an independent volume from the
2523
+ * system volume. In those cases, this method will always return `1`.
2524
+ *
2525
+ * @return {GetVolumePromise}
2526
+ */
2527
+ }, {
2528
+ key: "getVolume",
2529
+ value: function() {
2530
+ return this.get("volume");
2531
+ }
2532
+ /**
2533
+ * A promise to set the volume level of the player.
2534
+ *
2535
+ * @promise SetVolumePromise
2536
+ * @fulfill {number} The volume was set.
2537
+ * @reject {RangeError} The volume was less than 0 or greater than 1.
2538
+ */
2539
+ /**
2540
+ * Set the volume of the player on a scale from `0` to `1`. When set
2541
+ * via the API, the volume level will not be synchronized to other
2542
+ * players or stored as the viewer’s preference.
2543
+ *
2544
+ * Most mobile devices do not support setting the volume. An error will
2545
+ * *not* be triggered in that situation.
2546
+ *
2547
+ * @param {number} volume
2548
+ * @return {SetVolumePromise}
2549
+ */
2550
+ }, {
2551
+ key: "setVolume",
2552
+ value: function(e) {
2553
+ return this.set("volume", e);
2554
+ }
2555
+ /** @typedef {import('./lib/timing-object.types').TimingObject} TimingObject */
2556
+ /** @typedef {import('./lib/timing-src-connector.types').TimingSrcConnectorOptions} TimingSrcConnectorOptions */
2557
+ /** @typedef {import('./lib/timing-src-connector').TimingSrcConnector} TimingSrcConnector */
2558
+ /**
2559
+ * Connects a TimingObject to the video player (https://webtiming.github.io/timingobject/)
2560
+ *
2561
+ * @param {TimingObject} timingObject
2562
+ * @param {TimingSrcConnectorOptions} options
2563
+ *
2564
+ * @return {Promise<TimingSrcConnector>}
2565
+ */
2566
+ }, {
2567
+ key: "setTimingSrc",
2568
+ value: (function() {
2569
+ var t = X(/* @__PURE__ */ I().mark(function n(i, a) {
2570
+ var o = this, u;
2571
+ return I().wrap(function(s) {
2572
+ for (; ; ) switch (s.prev = s.next) {
2573
+ case 0:
2574
+ if (i) {
2575
+ s.next = 2;
2576
+ break;
2577
+ }
2578
+ throw new TypeError("A Timing Object must be provided.");
2579
+ case 2:
2580
+ return s.next = 4, this.ready();
2581
+ case 4:
2582
+ return u = new Ct(this, i, a), J(this, "notifyTimingObjectConnect"), u.addEventListener("disconnect", function() {
2583
+ return J(o, "notifyTimingObjectDisconnect");
2584
+ }), s.abrupt("return", u);
2585
+ case 8:
2586
+ case "end":
2587
+ return s.stop();
2588
+ }
2589
+ }, n, this);
2590
+ }));
2591
+ function e(n, i) {
2592
+ return t.apply(this, arguments);
2593
+ }
2594
+ return e;
2595
+ })()
2596
+ }]), r;
2597
+ })();
2598
+ Ye || (F = Mt(), kt(), Et(), Pt(), Tt());
2599
+ const Ot = "https://player.vimeo.com/video", _t = "https://vimeo.com/event", At = /vimeo\.com\/(video\/|event\/)?(\d+)(?:\/([\w-]+))?/;
2600
+ function Ve(r, t = {}) {
2601
+ const e = {
2602
+ src: Nt(r, t),
2603
+ frameborder: 0,
2604
+ width: "100%",
2605
+ height: "100%",
2606
+ allow: "accelerometer; fullscreen; autoplay; encrypted-media; gyroscope; picture-in-picture"
2607
+ };
2608
+ return t.config && (e["data-config"] = JSON.stringify(t.config)), /*html*/
2609
+ `
2610
+ <style>
2611
+ :host {
2612
+ display: inline-block;
2613
+ min-width: 300px;
2614
+ min-height: 150px;
2615
+ position: relative;
2616
+ }
2617
+ iframe {
2618
+ position: absolute;
2619
+ top: 0;
2620
+ left: 0;
2621
+ }
2622
+ :host(:not([controls])) {
2623
+ pointer-events: none;
2624
+ }
2625
+ </style>
2626
+ <iframe${Rt(e)}></iframe>
2627
+ `;
2628
+ }
2629
+ function Nt(r, t) {
2630
+ if (!r.src) return;
2631
+ let e = new URL(r.src);
2632
+ const n = r.src.match(At), i = n && n[1], a = n && n[2], o = e.searchParams.get("h") || void 0, u = {
2633
+ // ?controls=true is enabled by default in the iframe
2634
+ controls: r.controls === "" ? null : 0,
2635
+ autoplay: r.autoplay,
2636
+ loop: r.loop,
2637
+ muted: r.muted,
2638
+ playsinline: r.playsinline,
2639
+ preload: r.preload ?? "metadata",
2640
+ transparent: !1,
2641
+ autopause: r.autopause,
2642
+ h: o,
2643
+ // This param is required when the video is Unlisted.
2644
+ ...t.config
2645
+ };
2646
+ return i === "event/" ? `${_t}/${a}/embed?${$e(u)}` : `${Ot}/${a}?${$e(u)}`;
2647
+ }
2648
+ var oe, ue, me, H, B, G, q, K, Z, U, ee, Q, se, le, te, Ee, et;
2649
+ class de extends (globalThis.HTMLElement ?? class {
2650
+ }) {
2651
+ constructor() {
2652
+ super();
2653
+ L(this, Ee);
2654
+ fe(this, "loadComplete", new xe());
2655
+ L(this, oe);
2656
+ L(this, ue);
2657
+ L(this, me);
2658
+ L(this, H, 0);
2659
+ L(this, B, NaN);
2660
+ L(this, G, !1);
2661
+ L(this, q, !this.autoplay);
2662
+ L(this, K, 1);
2663
+ L(this, Z, 0);
2664
+ L(this, U, 0);
2665
+ L(this, ee, !1);
2666
+ L(this, Q, 1);
2667
+ L(this, se, NaN);
2668
+ L(this, le, NaN);
2669
+ L(this, te, null);
2670
+ Le(this, Ee, et).call(this, "config");
2671
+ }
2672
+ requestFullscreen() {
2673
+ var e, n;
2674
+ return (n = (e = this.api) == null ? void 0 : e.requestFullscreen) == null ? void 0 : n.call(e);
2675
+ }
2676
+ exitFullscreen() {
2677
+ var e, n;
2678
+ return (n = (e = this.api) == null ? void 0 : e.exitFullscreen) == null ? void 0 : n.call(e);
2679
+ }
2680
+ requestPictureInPicture() {
2681
+ var e, n;
2682
+ return (n = (e = this.api) == null ? void 0 : e.requestPictureInPicture) == null ? void 0 : n.call(e);
2683
+ }
2684
+ exitPictureInPicture() {
2685
+ var e, n;
2686
+ return (n = (e = this.api) == null ? void 0 : e.exitPictureInPicture) == null ? void 0 : n.call(e);
2687
+ }
2688
+ get config() {
2689
+ return _(this, te);
2690
+ }
2691
+ set config(e) {
2692
+ P(this, te, e);
2693
+ }
2694
+ async load() {
2695
+ var e;
2696
+ if (_(this, oe)) return;
2697
+ const n = !_(this, ue);
2698
+ _(this, ue) && (this.loadComplete = new xe()), P(this, ue, !0), await P(this, oe, Promise.resolve()), P(this, oe, null), P(this, H, 0), P(this, B, NaN), P(this, G, !1), P(this, q, !this.autoplay), P(this, K, 1), P(this, Z, 0), P(this, U, 0), P(this, ee, !1), P(this, Q, 1), P(this, U, 0), P(this, se, NaN), P(this, le, NaN), this.dispatchEvent(new Event("emptied"));
2699
+ let i = this.api;
2700
+ if (this.api = null, !this.src)
2701
+ return;
2702
+ this.dispatchEvent(new Event("loadstart"));
2703
+ const a = {
2704
+ autoplay: this.autoplay,
2705
+ controls: this.controls,
2706
+ loop: this.loop,
2707
+ muted: this.defaultMuted,
2708
+ playsinline: this.playsInline,
2709
+ preload: this.preload ?? "metadata",
2710
+ transparent: !1,
2711
+ autopause: this.hasAttribute("autopause"),
2712
+ ..._(this, te)
2713
+ }, o = async () => {
2714
+ P(this, U, 1), this.dispatchEvent(new Event("loadedmetadata")), this.api && (P(this, G, await this.api.getMuted()), P(this, Q, await this.api.getVolume()), this.dispatchEvent(new Event("volumechange")), P(this, B, await this.api.getDuration()), this.dispatchEvent(new Event("durationchange"))), this.dispatchEvent(new Event("loadcomplete")), this.loadComplete.resolve();
2715
+ };
2716
+ if (_(this, me)) {
2717
+ this.api = i, await this.api.loadVideo({
2718
+ ...a,
2719
+ url: this.src
2720
+ }), await o(), await this.loadComplete;
2721
+ return;
2722
+ }
2723
+ P(this, me, !0);
2724
+ let u = (e = this.shadowRoot) == null ? void 0 : e.querySelector("iframe");
2725
+ n && u && P(this, te, JSON.parse(u.getAttribute("data-config") || "{}")), this.shadowRoot || (this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = Ve(jt(this.attributes), this), u = this.shadowRoot.querySelector("iframe")), this.api = new Ne(u);
2726
+ const h = document.createElement("video");
2727
+ this.textTracks = h.textTracks, this.api.getTextTracks().then((g) => {
2728
+ g.forEach((y) => {
2729
+ h.addTextTrack(y.kind, y.label, y.language);
2730
+ });
2731
+ }), this.textTracks.addEventListener("change", () => {
2732
+ const g = Array.from(this.textTracks).find((y) => y.mode === "showing");
2733
+ g ? this.api.enableTextTrack(g.language, g.kind) : this.api.disableTextTrack();
2734
+ });
2735
+ const s = () => {
2736
+ this.api.off("loaded", s), o();
2737
+ };
2738
+ this.api.on("loaded", s), this.api.on("bufferstart", () => {
2739
+ _(this, q) && (P(this, q, !1), this.dispatchEvent(new Event("play"))), this.dispatchEvent(new Event("waiting"));
2740
+ }), this.api.on("play", () => {
2741
+ _(this, q) && (P(this, q, !1), this.dispatchEvent(new Event("play")));
2742
+ }), this.api.on("playing", () => {
2743
+ P(this, U, 3), P(this, q, !1), this.dispatchEvent(new Event("playing"));
2744
+ }), this.api.on("seeking", () => {
2745
+ P(this, ee, !0), this.dispatchEvent(new Event("seeking"));
2746
+ }), this.api.on("seeked", () => {
2747
+ P(this, ee, !1), this.dispatchEvent(new Event("seeked"));
2748
+ }), this.api.on("pause", () => {
2749
+ P(this, q, !0), this.dispatchEvent(new Event("pause"));
2750
+ }), this.api.on("ended", () => {
2751
+ P(this, q, !0), this.dispatchEvent(new Event("ended"));
2752
+ }), this.api.on("ratechange", ({ playbackRate: g }) => {
2753
+ P(this, K, g), this.dispatchEvent(new Event("ratechange"));
2754
+ }), this.api.on("volumechange", async ({ volume: g }) => {
2755
+ P(this, Q, g), this.api && P(this, G, await this.api.getMuted()), this.dispatchEvent(new Event("volumechange"));
2756
+ }), this.api.on("durationchange", ({ duration: g }) => {
2757
+ P(this, B, g), this.dispatchEvent(new Event("durationchange"));
2758
+ }), this.api.on("timeupdate", ({ seconds: g }) => {
2759
+ P(this, H, g), this.dispatchEvent(new Event("timeupdate"));
2760
+ }), this.api.on("progress", ({ seconds: g }) => {
2761
+ P(this, Z, g), this.dispatchEvent(new Event("progress"));
2762
+ }), this.api.on("resize", ({ videoWidth: g, videoHeight: y }) => {
2763
+ P(this, se, g), P(this, le, y), this.dispatchEvent(new Event("resize"));
2764
+ }), await this.loadComplete;
2765
+ }
2766
+ async attributeChangedCallback(e, n, i) {
2767
+ if (n !== i) {
2768
+ switch (e) {
2769
+ case "autoplay":
2770
+ case "controls":
2771
+ case "src": {
2772
+ this.load();
2773
+ return;
2774
+ }
2775
+ }
2776
+ switch (await this.loadComplete, e) {
2777
+ case "loop": {
2778
+ this.api.setLoop(this.loop);
2779
+ break;
2780
+ }
2781
+ }
2782
+ }
2783
+ }
2784
+ async play() {
2785
+ var e;
2786
+ P(this, q, !1), this.dispatchEvent(new Event("play")), await this.loadComplete;
2787
+ try {
2788
+ await ((e = this.api) == null ? void 0 : e.play());
2789
+ } catch (n) {
2790
+ throw P(this, q, !0), this.dispatchEvent(new Event("pause")), n;
2791
+ }
2792
+ }
2793
+ async pause() {
2794
+ var e;
2795
+ return await this.loadComplete, (e = this.api) == null ? void 0 : e.pause();
2796
+ }
2797
+ get ended() {
2798
+ return _(this, H) >= _(this, B);
2799
+ }
2800
+ get seeking() {
2801
+ return _(this, ee);
2802
+ }
2803
+ get readyState() {
2804
+ return _(this, U);
2805
+ }
2806
+ get videoWidth() {
2807
+ return _(this, se);
2808
+ }
2809
+ get videoHeight() {
2810
+ return _(this, le);
2811
+ }
2812
+ get src() {
2813
+ return this.getAttribute("src");
2814
+ }
2815
+ set src(e) {
2816
+ this.src != e && this.setAttribute("src", e);
2817
+ }
2818
+ get paused() {
2819
+ return _(this, q);
2820
+ }
2821
+ get duration() {
2822
+ return _(this, B);
2823
+ }
2824
+ get autoplay() {
2825
+ return this.hasAttribute("autoplay");
2826
+ }
2827
+ set autoplay(e) {
2828
+ this.autoplay != e && this.toggleAttribute("autoplay", !!e);
2829
+ }
2830
+ get buffered() {
2831
+ return _(this, Z) > 0 ? We(0, _(this, Z)) : We();
2832
+ }
2833
+ get controls() {
2834
+ return this.hasAttribute("controls");
2835
+ }
2836
+ set controls(e) {
2837
+ this.controls != e && this.toggleAttribute("controls", !!e);
2838
+ }
2839
+ get currentTime() {
2840
+ return _(this, H);
2841
+ }
2842
+ set currentTime(e) {
2843
+ this.currentTime != e && (P(this, H, e), this.loadComplete.then(() => {
2844
+ var n;
2845
+ (n = this.api) == null || n.setCurrentTime(e).catch(() => {
2846
+ });
2847
+ }));
2848
+ }
2849
+ get defaultMuted() {
2850
+ return this.hasAttribute("muted");
2851
+ }
2852
+ set defaultMuted(e) {
2853
+ this.defaultMuted != e && this.toggleAttribute("muted", !!e);
2854
+ }
2855
+ get loop() {
2856
+ return this.hasAttribute("loop");
2857
+ }
2858
+ set loop(e) {
2859
+ this.loop != e && this.toggleAttribute("loop", !!e);
2860
+ }
2861
+ get muted() {
2862
+ return _(this, G);
2863
+ }
2864
+ set muted(e) {
2865
+ this.muted != e && (P(this, G, e), this.loadComplete.then(() => {
2866
+ var n;
2867
+ (n = this.api) == null || n.setMuted(e).catch(() => {
2868
+ });
2869
+ }));
2870
+ }
2871
+ get playbackRate() {
2872
+ return _(this, K);
2873
+ }
2874
+ set playbackRate(e) {
2875
+ this.playbackRate != e && (P(this, K, e), this.loadComplete.then(() => {
2876
+ var n;
2877
+ (n = this.api) == null || n.setPlaybackRate(e).catch(() => {
2878
+ });
2879
+ }));
2880
+ }
2881
+ get playsInline() {
2882
+ return this.hasAttribute("playsinline");
2883
+ }
2884
+ set playsInline(e) {
2885
+ this.playsInline != e && this.toggleAttribute("playsinline", !!e);
2886
+ }
2887
+ get poster() {
2888
+ return this.getAttribute("poster");
2889
+ }
2890
+ set poster(e) {
2891
+ this.poster != e && this.setAttribute("poster", `${e}`);
2892
+ }
2893
+ get volume() {
2894
+ return _(this, Q);
2895
+ }
2896
+ set volume(e) {
2897
+ this.volume != e && (P(this, Q, e), this.loadComplete.then(() => {
2898
+ var n;
2899
+ (n = this.api) == null || n.setVolume(e).catch(() => {
2900
+ });
2901
+ }));
2902
+ }
2903
+ }
2904
+ oe = new WeakMap(), ue = new WeakMap(), me = new WeakMap(), H = new WeakMap(), B = new WeakMap(), G = new WeakMap(), q = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), U = new WeakMap(), ee = new WeakMap(), Q = new WeakMap(), se = new WeakMap(), le = new WeakMap(), te = new WeakMap(), Ee = new WeakSet(), // This is a pattern to update property values that are set before
2905
+ // the custom element is upgraded.
2906
+ // https://web.dev/custom-elements-best-practices/#make-properties-lazy
2907
+ et = function(e) {
2908
+ if (Object.prototype.hasOwnProperty.call(this, e)) {
2909
+ const n = this[e];
2910
+ delete this[e], this[e] = n;
2911
+ }
2912
+ }, fe(de, "getTemplateHTML", Ve), fe(de, "shadowRootOptions", { mode: "open" }), fe(de, "observedAttributes", [
2913
+ "autoplay",
2914
+ "controls",
2915
+ "crossorigin",
2916
+ "loop",
2917
+ "muted",
2918
+ "playsinline",
2919
+ "poster",
2920
+ "preload",
2921
+ "src"
2922
+ ]);
2923
+ function Rt(r) {
2924
+ let t = "";
2925
+ for (const e in r) {
2926
+ const n = r[e];
2927
+ n === "" ? t += ` ${Ce(e)}` : t += ` ${Ce(e)}="${Ce(`${n}`)}"`;
2928
+ }
2929
+ return t;
2930
+ }
2931
+ function Ce(r) {
2932
+ return r.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/`/g, "&#x60;");
2933
+ }
2934
+ function $e(r) {
2935
+ return String(new URLSearchParams(Lt(r)));
2936
+ }
2937
+ function Lt(r) {
2938
+ let t = {};
2939
+ for (let e in r) {
2940
+ let n = r[e];
2941
+ n === !0 || n === "" ? t[e] = 1 : n === !1 ? t[e] = 0 : n != null && (t[e] = n);
2942
+ }
2943
+ return t;
2944
+ }
2945
+ function jt(r) {
2946
+ let t = {};
2947
+ for (let e of r)
2948
+ t[e.name] = e.value;
2949
+ return t;
2950
+ }
2951
+ class xe extends Promise {
2952
+ constructor(t = () => {
2953
+ }) {
2954
+ let e, n;
2955
+ super((i, a) => {
2956
+ t(i, a), e = i, n = a;
2957
+ }), this.resolve = e, this.reject = n;
2958
+ }
2959
+ }
2960
+ function We(r, t) {
2961
+ return Array.isArray(r) ? Oe(r) : r == null || t == null || r === 0 && t === 0 ? Oe([[0, 0]]) : Oe([[r, t]]);
2962
+ }
2963
+ function Oe(r) {
2964
+ return Object.defineProperties(r, {
2965
+ start: {
2966
+ value: (t) => r[t][0]
2967
+ },
2968
+ end: {
2969
+ value: (t) => r[t][1]
2970
+ }
2971
+ }), r;
2972
+ }
2973
+ globalThis.customElements && !globalThis.customElements.get("vimeo-video") && globalThis.customElements.define("vimeo-video", de);
2974
+ var It = de, Ft = /* @__PURE__ */ new Set([
2975
+ "style",
2976
+ "children",
2977
+ "ref",
2978
+ "key",
2979
+ "suppressContentEditableWarning",
2980
+ "suppressHydrationWarning",
2981
+ "dangerouslySetInnerHTML"
2982
+ ]), qt = {
2983
+ className: "class",
2984
+ htmlFor: "for"
2985
+ };
2986
+ function tt(r) {
2987
+ return r.toLowerCase();
2988
+ }
2989
+ function ze(r) {
2990
+ if (typeof r == "boolean") return r ? "" : void 0;
2991
+ if (typeof r != "function" && !(typeof r == "object" && r !== null))
2992
+ return r;
2993
+ }
2994
+ function Dt({
2995
+ react: r,
2996
+ tagName: t,
2997
+ elementClass: e,
2998
+ events: n,
2999
+ displayName: i,
3000
+ defaultProps: a,
3001
+ toAttributeName: o = tt,
3002
+ toAttributeValue: u = ze
3003
+ }) {
3004
+ const h = Number.parseInt(r.version) >= 19, s = r.forwardRef((g, y) => {
3005
+ var M, T;
3006
+ const w = r.useRef(null), N = r.useRef(/* @__PURE__ */ new Map()), A = {}, j = {}, m = {}, p = {};
3007
+ for (const [f, v] of Object.entries(g)) {
3008
+ if (Ft.has(f)) {
3009
+ m[f] = v;
3010
+ continue;
3011
+ }
3012
+ const E = o(qt[f] ?? f);
3013
+ if (e.prototype && f in e.prototype && !(f in (((M = globalThis.HTMLElement) == null ? void 0 : M.prototype) ?? {})) && !((T = e.observedAttributes) != null && T.some((b) => b === E))) {
3014
+ p[f] = v;
3015
+ continue;
3016
+ }
3017
+ if (f.startsWith("on")) {
3018
+ A[f] = v;
3019
+ continue;
3020
+ }
3021
+ const C = u(v);
3022
+ if (E && C != null && (j[E] = String(C), h || (m[E] = C)), E && h) {
3023
+ const b = ze(v);
3024
+ C !== b ? m[E] = C : m[E] = v;
3025
+ }
3026
+ }
3027
+ if (typeof window < "u") {
3028
+ for (const f in A) {
3029
+ const v = A[f], E = f.endsWith("Capture"), C = ((n == null ? void 0 : n[f]) ?? f.slice(2).toLowerCase()).slice(
3030
+ 0,
3031
+ E ? -7 : void 0
3032
+ );
3033
+ r.useLayoutEffect(() => {
3034
+ const b = w == null ? void 0 : w.current;
3035
+ if (!(!b || typeof v != "function"))
3036
+ return b.addEventListener(C, v, E), () => {
3037
+ b.removeEventListener(C, v, E);
3038
+ };
3039
+ }, [w == null ? void 0 : w.current, v]);
3040
+ }
3041
+ r.useLayoutEffect(() => {
3042
+ if (w.current === null) return;
3043
+ const f = /* @__PURE__ */ new Map();
3044
+ for (const v in p)
3045
+ He(w.current, v, p[v]), N.current.delete(v), f.set(v, p[v]);
3046
+ for (const [v, E] of N.current)
3047
+ He(w.current, v, void 0);
3048
+ N.current = f;
3049
+ });
3050
+ }
3051
+ if (typeof window > "u" && (e != null && e.getTemplateHTML) && (e != null && e.shadowRootOptions)) {
3052
+ const { mode: f, delegatesFocus: v } = e.shadowRootOptions, E = r.createElement("template", {
3053
+ shadowrootmode: f,
3054
+ shadowrootdelegatesfocus: v,
3055
+ dangerouslySetInnerHTML: {
3056
+ __html: e.getTemplateHTML(j, g)
3057
+ },
3058
+ key: "ce-la-react-ssr-template-shadow-root"
3059
+ });
3060
+ m.children = [E, m.children];
3061
+ }
3062
+ return r.createElement(t, {
3063
+ ...a,
3064
+ ...m,
3065
+ ref: r.useCallback(
3066
+ (f) => {
3067
+ w.current = f, typeof y == "function" ? y(f) : y !== null && (y.current = f);
3068
+ },
3069
+ [y]
3070
+ )
3071
+ }, m.children);
3072
+ });
3073
+ return s.displayName = i ?? e.name, s;
3074
+ }
3075
+ function He(r, t, e) {
3076
+ var n;
3077
+ r[t] = e, e == null && t in (((n = globalThis.HTMLElement) == null ? void 0 : n.prototype) ?? {}) && r.removeAttribute(t);
3078
+ }
3079
+ var xt = Dt({
3080
+ react: it,
3081
+ tagName: "vimeo-video",
3082
+ elementClass: It,
3083
+ toAttributeName(r) {
3084
+ return r === "muted" ? "" : r === "defaultMuted" ? "muted" : tt(r);
3085
+ }
3086
+ });
3087
+ /*! Bundled license information:
3088
+
3089
+ ce-la-react/dist/ce-la-react.js:
3090
+ (**
3091
+ * @license
3092
+ * Copyright 2018 Google LLC
3093
+ * SPDX-License-Identifier: BSD-3-Clause
3094
+ *
3095
+ * Modified version of `@lit/react` for vanilla custom elements with support for SSR.
3096
+ *)
3097
+ */
3098
+ export {
3099
+ xt as default
3100
+ };