@webitel/ui-sdk 26.2.69 → 26.2.71

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 (92) hide show
  1. package/dist/{errors-DCJKAXTz.js → errors-CTL-RV3B.js} +1 -1
  2. package/dist/{index-cVwBpL1P.js → index-CLhoKzki.js} +1 -1
  3. package/dist/{index-B71drQtj.js → index-x2Djqp3W.js} +4 -4
  4. package/dist/{install-BEn6vjFW.js → install-Cp4KnSCI.js} +1102 -1220
  5. package/dist/{isObject-DB0eH0MA.js → isObject-C_1aA257.js} +1 -1
  6. package/dist/prod-BoQuiIB3.js +973 -0
  7. package/dist/srt-parser-CsN7bp5E.js +26 -0
  8. package/dist/ssa-parser-BJOOPeQF.js +200 -0
  9. package/dist/ui-sdk.css +1 -1
  10. package/dist/ui-sdk.js +1 -1
  11. package/dist/ui-sdk.umd.cjs +464 -482
  12. package/dist/vidstack-Bq6c3Bam-CeA9TvJ4.js +425 -0
  13. package/dist/vidstack-D2pY00kU-hPWR401d.js +135 -0
  14. package/dist/vidstack-DDXt6fpN-DEjXPjHx.js +50 -0
  15. package/dist/vidstack-D_-9AA6_-Bh2Pn0IA.js +20 -0
  16. package/dist/{vidstack-Dm1xEU9Q-qSXq3AI-.js → vidstack-Dm1xEU9Q-CXHNvShT.js} +10 -11
  17. package/dist/vidstack-DqAw8m9J-BSNVCj3S.js +22 -0
  18. package/dist/vidstack-audio-C3of4Q-I.js +28 -0
  19. package/dist/vidstack-dash-BD3CNy0Z.js +392 -0
  20. package/dist/vidstack-google-cast-DXLqBW30.js +382 -0
  21. package/dist/vidstack-hls-C6Az6tgn.js +309 -0
  22. package/dist/vidstack-krOAtKMi-C50BTxmn.js +28 -0
  23. package/dist/vidstack-video-CtScgimr.js +163 -0
  24. package/dist/vidstack-vimeo-dFXp7_Vx.js +451 -0
  25. package/dist/vidstack-youtube-BF0J2izd.js +232 -0
  26. package/dist/{vuex.esm-bundler-tZVctzTj.js → vuex.esm-bundler-D5BkZi23.js} +1 -1
  27. package/dist/{wt-action-bar-ColV1kXE.js → wt-action-bar-BrFf9y4i.js} +1 -1
  28. package/dist/{wt-button-select-CfoSEYMj.js → wt-button-select-BQOYl5Z5.js} +1 -1
  29. package/dist/{wt-chat-emoji-Bgv9Viz-.js → wt-chat-emoji-D9rZ4xfn.js} +6 -11
  30. package/dist/{wt-confirm-dialog-bVhuyR-Q.js → wt-confirm-dialog-DdRFwuNQ.js} +1 -1
  31. package/dist/{wt-context-menu-Cd8pgBRV.js → wt-context-menu-Dx-K-ACK.js} +1 -1
  32. package/dist/{wt-copy-action-jjp1mO2h.js → wt-copy-action-BPMZsUtG.js} +1 -1
  33. package/dist/wt-datepicker-PK3BgSmp.js +5660 -0
  34. package/dist/wt-display-chip-items-CAO8OLhX.js +46 -0
  35. package/dist/{wt-dual-panel-DJsiR6RF.js → wt-dual-panel-CAh5CMKO.js} +1 -1
  36. package/dist/{wt-dummy-O94iGdZS.js → wt-dummy-DMXuDlcb.js} +1 -1
  37. package/dist/{wt-error-page-xgSWJ65z.js → wt-error-page-UoX8GV8V.js} +1 -1
  38. package/dist/{wt-expansion-panel-vzG02b62.js → wt-expansion-panel-G7G1803j.js} +1 -1
  39. package/dist/{wt-filters-panel-wrapper-h-UaAMuF.js → wt-filters-panel-wrapper-GI9X-SaD.js} +1 -1
  40. package/dist/wt-galleria-DtJgf7Db.js +322 -0
  41. package/dist/{wt-navigation-menu-Cu5Y9kua.js → wt-navigation-menu-CrDo7Vpq.js} +2 -5
  42. package/dist/wt-notifications-bar-CmUZpffK.js +79 -0
  43. package/dist/{wt-page-header-DlRrRzG7.js → wt-page-header-C7JiNmsy.js} +1 -1
  44. package/dist/{wt-pagination-CW46I4u2.js → wt-pagination-CaOk680t.js} +1 -1
  45. package/dist/{wt-player-3qh_Jzm2.js → wt-player-Cs2dAT3H.js} +1 -1
  46. package/dist/{wt-popover-BTG5bUP0.js → wt-popover-U7JE0uoX.js} +19 -22
  47. package/dist/{wt-search-bar-CTsNf7bp.js → wt-search-bar-f1yQguL2.js} +25 -28
  48. package/dist/{wt-selection-popup-DvaUvY4O.js → wt-selection-popup-CwjvQZ77.js} +1 -1
  49. package/dist/{wt-start-page-CcN7JC_u.js → wt-start-page-CMGnK33r.js} +7 -7
  50. package/dist/{wt-status-select-C8t0cgTg.js → wt-status-select-C5RigMIl.js} +1 -1
  51. package/dist/{wt-stepper-BLb42q2I.js → wt-stepper-1gbY9rv5.js} +1 -1
  52. package/dist/{wt-table-9gmsV0Y9.js → wt-table-D6d0dRYQ.js} +111 -114
  53. package/dist/{wt-table-actions-BB7AH7sR.js → wt-table-actions-BsjrniPP.js} +1 -1
  54. package/dist/{wt-table-column-select-B3lrCEaV.js → wt-table-column-select-JiD5kd7i.js} +28 -31
  55. package/dist/{wt-tabs-CCHi_E1a.js → wt-tabs-DpxPfuRj.js} +1 -1
  56. package/dist/{wt-tags-input-DLicKjv3.js → wt-tags-input-CJpT_4mw.js} +56 -57
  57. package/dist/{wt-timepicker-B9ONDzNQ.js → wt-timepicker-CtH8MdN-.js} +1 -1
  58. package/dist/{wt-tree-cQlvJmh5.js → wt-tree-C99Qwdwn.js} +4 -5
  59. package/dist/{wt-tree-table-B89YKiMf.js → wt-tree-table-3qAoEJ7m.js} +5 -5
  60. package/dist/{wt-type-extension-value-input-Da8FXLDs.js → wt-type-extension-value-input-CfiVBG5u.js} +214 -218
  61. package/dist/wt-vidstack-player-B8Ilx2ml.js +10229 -0
  62. package/package.json +5 -5
  63. package/src/modules/Userinfo/classes/ApplicationsAccess.ts +36 -3
  64. package/src/modules/Userinfo/scripts/utils.ts +2 -22
  65. package/src/modules/Userinfo/stores/accessStore.ts +20 -5
  66. package/src/modules/Userinfo/stores/userinfoStore.ts +1 -0
  67. package/src/modules/Userinfo/types/UserAccess.d.ts +11 -3
  68. package/types/modules/Userinfo/classes/ApplicationsAccess.d.ts +34 -243
  69. package/types/modules/Userinfo/scripts/utils.d.ts +1 -2
  70. package/types/modules/Userinfo/stores/accessStore.d.ts +1 -1
  71. package/types/modules/Userinfo/stores/userinfoStore.d.ts +21 -9
  72. package/dist/prod-DTLJXtPo.js +0 -994
  73. package/dist/srt-parser-CWqahKwO.js +0 -27
  74. package/dist/ssa-parser-BqjjKy4M.js +0 -209
  75. package/dist/vidstack-Bq6c3Bam-w5y-QQDX.js +0 -413
  76. package/dist/vidstack-D2pY00kU-BI5rYx7p.js +0 -138
  77. package/dist/vidstack-DDXt6fpN-QZPrP2dy.js +0 -60
  78. package/dist/vidstack-D_-9AA6_-Bo1xPN-G.js +0 -20
  79. package/dist/vidstack-DqAw8m9J-DL7LzrFt.js +0 -29
  80. package/dist/vidstack-audio-lX1O0fza.js +0 -32
  81. package/dist/vidstack-dash-BQkRGWe_.js +0 -403
  82. package/dist/vidstack-google-cast-C39n-PU1.js +0 -377
  83. package/dist/vidstack-hls-BCLhCuNJ.js +0 -324
  84. package/dist/vidstack-krOAtKMi-B4IZWKdc.js +0 -29
  85. package/dist/vidstack-video-BgayrEIC.js +0 -181
  86. package/dist/vidstack-vimeo-Lpe7iySs.js +0 -437
  87. package/dist/vidstack-youtube-Dmcz0xVm.js +0 -236
  88. package/dist/wt-datepicker-Cs3xDzVq.js +0 -5789
  89. package/dist/wt-display-chip-items-IqNMxa_X.js +0 -52
  90. package/dist/wt-galleria-cDjsiOcp.js +0 -324
  91. package/dist/wt-notifications-bar-KNH47kZ7.js +0 -80
  92. package/dist/wt-vidstack-player-BzFbIwCa.js +0 -10250
@@ -1,29 +0,0 @@
1
- const g = /(?:https:\/\/)?(?:player\.)?vimeo(?:\.com)?\/(?:video\/)?(\d+)(?:(?:\?hash=|\?h=|\/)(.*))?/, c = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
2
- function b(n) {
3
- const o = n.match(g);
4
- return { videoId: o == null ? void 0 : o[1], hash: o == null ? void 0 : o[2] };
5
- }
6
- async function w(n, o, r) {
7
- if (c.has(n)) return c.get(n);
8
- if (i.has(n)) return i.get(n);
9
- let t = `https://vimeo.com/api/oembed.json?url=https://player.vimeo.com/video/${n}`;
10
- r && (t = t.concat(`?h=${r}`));
11
- const s = window.fetch(t, {
12
- mode: "cors",
13
- signal: o.signal
14
- }).then((e) => e.json()).then((e) => {
15
- var l, p;
16
- const u = /vimeocdn.com\/video\/(.*)?_/, h = (p = (l = e == null ? void 0 : e.thumbnail_url) == null ? void 0 : l.match(u)) == null ? void 0 : p[1], f = h ? `https://i.vimeocdn.com/video/${h}_1920x1080.webp` : "", m = {
17
- title: (e == null ? void 0 : e.title) ?? "",
18
- duration: (e == null ? void 0 : e.duration) ?? 0,
19
- poster: f,
20
- pro: e.account_type !== "basic"
21
- };
22
- return c.set(n, m), m;
23
- }).finally(() => i.delete(n));
24
- return i.set(n, s), s;
25
- }
26
- export {
27
- w as getVimeoVideoInfo,
28
- b as resolveVimeoVideoId
29
- };
@@ -1,181 +0,0 @@
1
- var $ = Object.defineProperty;
2
- var b = (i) => {
3
- throw TypeError(i);
4
- };
5
- var N = (i, t, e) => t in i ? $(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
6
- var m = (i, t, e) => N(i, typeof t != "symbol" ? t + "" : t, e), E = (i, t, e) => t.has(i) || b("Cannot " + e);
7
- var s = (i, t, e) => (E(i, t, "read from private field"), e ? e.call(i) : t.get(i)), r = (i, t, e) => t.has(i) ? b("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, e), c = (i, t, e, n) => (E(i, t, "write to private field"), n ? n.call(i, e) : t.set(i, e), e), p = (i, t, e) => (E(i, t, "access private method"), e);
8
- import { s as U, t as V, u as A, v as q, o as C, l as F, D as Y, E as _, T as j, w as v } from "./wt-vidstack-player-BzFbIwCa.js";
9
- import { H as z, a as B } from "./vidstack-Bq6c3Bam-w5y-QQDX.js";
10
- var P, f, k, D, H;
11
- class G {
12
- constructor(t, e) {
13
- r(this, k);
14
- r(this, P);
15
- r(this, f);
16
- c(this, P, t), c(this, f, e), t.textTracks.onaddtrack = p(this, k, D).bind(this), C(p(this, k, H).bind(this));
17
- }
18
- }
19
- P = new WeakMap(), f = new WeakMap(), k = new WeakSet(), D = function(t) {
20
- const e = t.track;
21
- if (!e || J(s(this, P), e)) return;
22
- const n = new j({
23
- id: e.id,
24
- kind: e.kind,
25
- label: e.label ?? "",
26
- language: e.language,
27
- type: "vtt"
28
- });
29
- n[v.native] = { track: e }, n[v.readyState] = 2, n[v.nativeHLS] = !0;
30
- let a = 0;
31
- const I = (O) => {
32
- if (e.cues)
33
- for (let w = a; w < e.cues.length; w++)
34
- n.addCue(e.cues[w], O), a++;
35
- };
36
- I(t), e.oncuechange = I, s(this, f).textTracks.add(n, t), n.setMode(e.mode, t);
37
- }, H = function() {
38
- var t;
39
- s(this, P).textTracks.onaddtrack = null;
40
- for (const e of s(this, f).textTracks) {
41
- const n = (t = e[v.native]) == null ? void 0 : t.track;
42
- n != null && n.oncuechange && (n.oncuechange = null);
43
- }
44
- };
45
- function J(i, t) {
46
- return Array.from(i.children).find((e) => e.track === t);
47
- }
48
- var d, y, x, S, L, T;
49
- class K {
50
- constructor(t, e) {
51
- r(this, x);
52
- r(this, d);
53
- r(this, y);
54
- r(this, T, (t, e) => {
55
- s(this, y).notify("picture-in-picture-change", t, e);
56
- });
57
- c(this, d, t), c(this, y, e), new _(t).add("enterpictureinpicture", p(this, x, S).bind(this)).add("leavepictureinpicture", p(this, x, L).bind(this));
58
- }
59
- get active() {
60
- return document.pictureInPictureElement === s(this, d);
61
- }
62
- get supported() {
63
- return A(s(this, d));
64
- }
65
- async enter() {
66
- return s(this, d).requestPictureInPicture();
67
- }
68
- exit() {
69
- return document.exitPictureInPicture();
70
- }
71
- }
72
- d = new WeakMap(), y = new WeakMap(), x = new WeakSet(), S = function(t) {
73
- s(this, T).call(this, !0, t);
74
- }, L = function(t) {
75
- s(this, T).call(this, !1, t);
76
- }, T = new WeakMap();
77
- var l, g, o, M, R;
78
- class Q {
79
- constructor(t, e) {
80
- r(this, M);
81
- r(this, l);
82
- r(this, g);
83
- r(this, o, "inline");
84
- c(this, l, t), c(this, g, e), F(t, "webkitpresentationmodechanged", p(this, M, R).bind(this));
85
- }
86
- get mode() {
87
- return s(this, o);
88
- }
89
- get supported() {
90
- return V(s(this, l));
91
- }
92
- async setPresentationMode(t) {
93
- s(this, o) !== t && s(this, l).webkitSetPresentationMode(t);
94
- }
95
- }
96
- l = new WeakMap(), g = new WeakMap(), o = new WeakMap(), M = new WeakSet(), R = function(t) {
97
- var n;
98
- const e = s(this, o);
99
- c(this, o, s(this, l).webkitPresentationMode), (n = s(this, g).player) == null || n.dispatch(
100
- new Y("video-presentation-change", {
101
- detail: s(this, o),
102
- trigger: t
103
- })
104
- ), ["fullscreen", "picture-in-picture"].forEach((a) => {
105
- (s(this, o) === a || e === a) && s(this, g).notify(`${a}-change`, s(this, o) === a, t);
106
- });
107
- };
108
- var u;
109
- class W {
110
- constructor(t) {
111
- r(this, u);
112
- c(this, u, t);
113
- }
114
- get active() {
115
- return s(this, u).mode === "fullscreen";
116
- }
117
- get supported() {
118
- return s(this, u).supported;
119
- }
120
- async enter() {
121
- s(this, u).setPresentationMode("fullscreen");
122
- }
123
- async exit() {
124
- s(this, u).setPresentationMode("inline");
125
- }
126
- }
127
- u = new WeakMap();
128
- var h;
129
- class X {
130
- constructor(t) {
131
- r(this, h);
132
- c(this, h, t);
133
- }
134
- get active() {
135
- return s(this, h).mode === "picture-in-picture";
136
- }
137
- get supported() {
138
- return s(this, h).supported;
139
- }
140
- async enter() {
141
- s(this, h).setPresentationMode("picture-in-picture");
142
- }
143
- async exit() {
144
- s(this, h).setPresentationMode("inline");
145
- }
146
- }
147
- h = new WeakMap();
148
- class it extends z {
149
- constructor(e, n) {
150
- super(e, n);
151
- m(this, "$$PROVIDER_TYPE", "VIDEO");
152
- m(this, "airPlay");
153
- m(this, "fullscreen");
154
- m(this, "pictureInPicture");
155
- U(() => {
156
- if (this.airPlay = new B(e, n), V(e)) {
157
- const a = new Q(e, n);
158
- this.fullscreen = new W(a), this.pictureInPicture = new X(a);
159
- } else A(e) && (this.pictureInPicture = new K(e, n));
160
- }, this.scope);
161
- }
162
- get type() {
163
- return "video";
164
- }
165
- setup() {
166
- super.setup(), q(this.video) && new G(this.video, this.ctx), this.ctx.textRenderers.attachVideo(this.video), C(() => {
167
- this.ctx.textRenderers.attachVideo(null);
168
- }), this.type === "video" && this.ctx.notify("provider-setup", this);
169
- }
170
- /**
171
- * The native HTML `<video>` element.
172
- *
173
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement}
174
- */
175
- get video() {
176
- return this.media;
177
- }
178
- }
179
- export {
180
- it as VideoProvider
181
- };
@@ -1,437 +0,0 @@
1
- var ue = Object.defineProperty;
2
- var N = (r) => {
3
- throw TypeError(r);
4
- };
5
- var de = (r, c, e) => c in r ? ue(r, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[c] = e;
6
- var b = (r, c, e) => de(r, typeof c != "symbol" ? c + "" : c, e), S = (r, c, e) => c.has(r) || N("Cannot " + e);
7
- var t = (r, c, e) => (S(r, c, "read from private field"), e ? e.call(r) : c.get(r)), f = (r, c, e) => c.has(r) ? N("Cannot add the same private member more than once") : c instanceof WeakSet ? c.add(r) : c.set(r, e), u = (r, c, e, i) => (S(r, c, "write to private field"), i ? i.call(r, e) : c.set(r, e), e), o = (r, c, e) => (S(r, c, "access private method"), e);
8
- import { b as fe, n as U, K as C, y as pe, e as q, p as Q, f as ye, M as _, L as R, l as be, N as ke, T as ve, Q as K } from "./wt-vidstack-player-BzFbIwCa.js";
9
- import { R as me } from "./vidstack-DqAw8m9J-DL7LzrFt.js";
10
- import { E as we } from "./vidstack-DDXt6fpN-QZPrP2dy.js";
11
- import { resolveVimeoVideoId as Pe, getVimeoVideoInfo as Te } from "./vidstack-krOAtKMi-B4IZWKdc.js";
12
- const Ce = [
13
- "bufferend",
14
- "bufferstart",
15
- // 'cuechange',
16
- "durationchange",
17
- "ended",
18
- "enterpictureinpicture",
19
- "error",
20
- "fullscreenchange",
21
- "leavepictureinpicture",
22
- "loaded",
23
- // 'loadeddata',
24
- // 'loadedmetadata',
25
- // 'loadstart',
26
- "playProgress",
27
- "loadProgress",
28
- "pause",
29
- "play",
30
- "playbackratechange",
31
- // 'progress',
32
- "qualitychange",
33
- "seeked",
34
- "seeking",
35
- // 'texttrackchange',
36
- "timeupdate",
37
- "volumechange",
38
- "waiting"
39
- // 'adstarted',
40
- // 'adcompleted',
41
- // 'aderror',
42
- // 'adskipped',
43
- // 'adallcompleted',
44
- // 'adclicked',
45
- // 'chapterchange',
46
- // 'chromecastconnected',
47
- // 'remoteplaybackavailabilitychange',
48
- // 'remoteplaybackconnecting',
49
- // 'remoteplaybackconnect',
50
- // 'remoteplaybackdisconnect',
51
- // 'liveeventended',
52
- // 'liveeventstarted',
53
- // 'livestreamoffline',
54
- // 'livestreamonline',
55
- ];
56
- var a, y, k, w, g, V, v, $, M, P, m, E, s, W, Y, z, G, T, H, J, X, L, Z, ee, te, se, ie, x, ne, ae, oe, F, he, O, re, D, ce, le, l, j, B;
57
- class Re extends we {
58
- constructor(e, i) {
59
- super(e);
60
- f(this, s);
61
- b(this, "$$PROVIDER_TYPE", "VIMEO");
62
- b(this, "scope", fe());
63
- b(this, "fullscreen");
64
- f(this, a);
65
- f(this, y, U(""));
66
- f(this, k, U(!1));
67
- f(this, w, null);
68
- f(this, g, null);
69
- f(this, V, !1);
70
- f(this, v, new C(0, 0));
71
- f(this, $, new me(o(this, s, G).bind(this)));
72
- f(this, M, null);
73
- f(this, P, null);
74
- f(this, m, /* @__PURE__ */ new Map());
75
- f(this, E, null);
76
- /**
77
- * Whether tracking session data should be enabled on the embed, including cookies and analytics.
78
- * This is turned off by default to be GDPR-compliant.
79
- *
80
- * @defaultValue `false`
81
- */
82
- b(this, "cookies", !1);
83
- b(this, "title", !0);
84
- b(this, "byline", !0);
85
- b(this, "portrait", !0);
86
- b(this, "color", "00ADEF");
87
- // Embed will sometimes dispatch 0 at end of playback.
88
- f(this, T, !1);
89
- u(this, a, i);
90
- const n = this;
91
- this.fullscreen = {
92
- get active() {
93
- return t(n, V);
94
- },
95
- supported: !0,
96
- enter: () => o(this, s, l).call(this, "requestFullscreen"),
97
- exit: () => o(this, s, l).call(this, "exitFullscreen")
98
- };
99
- }
100
- get type() {
101
- return "vimeo";
102
- }
103
- get currentSrc() {
104
- return t(this, g);
105
- }
106
- get videoId() {
107
- return t(this, y).call(this);
108
- }
109
- get hash() {
110
- return t(this, w);
111
- }
112
- get isPro() {
113
- return t(this, k).call(this);
114
- }
115
- preconnect() {
116
- pe(this.getOrigin());
117
- }
118
- setup() {
119
- super.setup(), q(o(this, s, W).bind(this)), q(o(this, s, Y).bind(this)), q(o(this, s, z).bind(this)), t(this, a).notify("provider-setup", this);
120
- }
121
- destroy() {
122
- o(this, s, j).call(this), this.fullscreen = void 0;
123
- const e = "provider destroyed";
124
- for (const i of t(this, m).values())
125
- for (const { reject: n } of i) n(e);
126
- t(this, m).clear(), o(this, s, l).call(this, "destroy");
127
- }
128
- async play() {
129
- return o(this, s, l).call(this, "play");
130
- }
131
- async pause() {
132
- return o(this, s, l).call(this, "pause");
133
- }
134
- setMuted(e) {
135
- o(this, s, l).call(this, "setMuted", e);
136
- }
137
- setCurrentTime(e) {
138
- o(this, s, l).call(this, "seekTo", e), t(this, a).notify("seeking", e);
139
- }
140
- setVolume(e) {
141
- o(this, s, l).call(this, "setVolume", e), o(this, s, l).call(this, "setMuted", Q(t(this, a).$state.muted));
142
- }
143
- setPlaybackRate(e) {
144
- o(this, s, l).call(this, "setPlaybackRate", e);
145
- }
146
- async loadSource(e) {
147
- if (!ye(e.src)) {
148
- u(this, g, null), u(this, w, null), t(this, y).set("");
149
- return;
150
- }
151
- const { videoId: i, hash: n } = Pe(e.src);
152
- t(this, y).set(i ?? ""), u(this, w, n ?? null), u(this, g, e);
153
- }
154
- getOrigin() {
155
- return "https://player.vimeo.com";
156
- }
157
- buildParams() {
158
- const { keyDisabled: e } = t(this, a).$props, { playsInline: i, nativeControls: n } = t(this, a).$state, h = n();
159
- return {
160
- title: this.title,
161
- byline: this.byline,
162
- color: this.color,
163
- portrait: this.portrait,
164
- controls: h,
165
- h: this.hash,
166
- keyboard: h && !e(),
167
- transparent: !0,
168
- playsinline: i(),
169
- dnt: !this.cookies
170
- };
171
- }
172
- onMessage(e, i) {
173
- e.event ? o(this, s, ce).call(this, e.event, e.data, i) : e.method && o(this, s, Z).call(this, e.method, e.value, i);
174
- }
175
- onLoad() {
176
- }
177
- }
178
- a = new WeakMap(), y = new WeakMap(), k = new WeakMap(), w = new WeakMap(), g = new WeakMap(), V = new WeakMap(), v = new WeakMap(), $ = new WeakMap(), M = new WeakMap(), P = new WeakMap(), m = new WeakMap(), E = new WeakMap(), s = new WeakSet(), W = function() {
179
- o(this, s, j).call(this);
180
- const e = t(this, y).call(this);
181
- if (!e) {
182
- this.src.set("");
183
- return;
184
- }
185
- this.src.set(`${this.getOrigin()}/video/${e}`), t(this, a).notify("load-start");
186
- }, Y = function() {
187
- const e = t(this, y).call(this);
188
- if (!e) return;
189
- const i = _(), n = new AbortController();
190
- return u(this, E, i), Te(e, n, t(this, w)).then((h) => {
191
- i.resolve(h);
192
- }).catch((h) => {
193
- i.reject();
194
- }), () => {
195
- i.reject(), n.abort();
196
- };
197
- }, z = function() {
198
- const e = t(this, k).call(this), { $state: i, qualities: n } = t(this, a);
199
- if (i.canSetPlaybackRate.set(e), n[R.setReadonly](!e), e)
200
- return be(n, "change", () => {
201
- var d;
202
- if (n.auto) return;
203
- const h = (d = n.selected) == null ? void 0 : d.id;
204
- h && o(this, s, l).call(this, "setQuality", h);
205
- });
206
- }, G = function() {
207
- o(this, s, l).call(this, "getCurrentTime");
208
- }, T = new WeakMap(), H = function(e, i) {
209
- if (t(this, T) && e === 0) return;
210
- const { realCurrentTime: n, paused: h, bufferedEnd: d, seekableEnd: p, live: I } = t(this, a).$state;
211
- if (n() === e) return;
212
- const A = n();
213
- t(this, a).notify("time-change", e, i), Math.abs(A - e) > 1.5 && (t(this, a).notify("seeking", e, i), !h() && d() < e && t(this, a).notify("waiting", void 0, i)), !I() && p() - e < 0.01 && (t(this, a).notify("end", void 0, i), u(this, T, !0), setTimeout(() => {
214
- u(this, T, !1);
215
- }, 500));
216
- }, J = function(e, i) {
217
- t(this, a).notify("seeked", e, i);
218
- }, X = function(e) {
219
- var n;
220
- const i = t(this, y).call(this);
221
- (n = t(this, E)) == null || n.promise.then((h) => {
222
- if (!h) return;
223
- const { title: d, poster: p, duration: I, pro: A } = h;
224
- t(this, k).set(A), t(this, a).notify("title-change", d, e), t(this, a).notify("poster-change", p, e), t(this, a).notify("duration-change", I, e), o(this, s, L).call(this, I, e);
225
- }).catch(() => {
226
- i === t(this, y).call(this) && (o(this, s, l).call(this, "getVideoTitle"), o(this, s, l).call(this, "getDuration"));
227
- });
228
- }, L = function(e, i) {
229
- const { nativeControls: n } = t(this, a).$state, h = n();
230
- u(this, v, new C(0, e));
231
- const d = {
232
- buffered: new C(0, 0),
233
- seekable: t(this, v),
234
- duration: e
235
- };
236
- t(this, a).delegate.ready(d, i), h || o(this, s, l).call(this, "_hideOverlay"), o(this, s, l).call(this, "getQualities"), o(this, s, l).call(this, "getChapters");
237
- }, Z = function(e, i, n) {
238
- var h;
239
- switch (e) {
240
- case "getVideoTitle":
241
- const d = i;
242
- t(this, a).notify("title-change", d, n);
243
- break;
244
- case "getDuration":
245
- const p = i;
246
- t(this, a).$state.canPlay() ? t(this, a).notify("duration-change", p, n) : o(this, s, L).call(this, p, n);
247
- break;
248
- case "getCurrentTime":
249
- o(this, s, H).call(this, i, n);
250
- break;
251
- case "getBuffered":
252
- ke(i) && i.length && o(this, s, x).call(this, i[i.length - 1][1], n);
253
- break;
254
- case "setMuted":
255
- o(this, s, F).call(this, Q(t(this, a).$state.volume), i, n);
256
- break;
257
- // case 'getTextTracks':
258
- // this.#onTextTracksChange(data as VimeoTextTrack[], trigger);
259
- // break;
260
- case "getChapters":
261
- o(this, s, he).call(this, i);
262
- break;
263
- case "getQualities":
264
- o(this, s, re).call(this, i, n);
265
- break;
266
- }
267
- (h = o(this, s, B).call(this, e)) == null || h.resolve();
268
- }, ee = function() {
269
- for (const e of Ce)
270
- o(this, s, l).call(this, "addEventListener", e);
271
- }, te = function(e) {
272
- t(this, $).stop(), t(this, a).notify("pause", void 0, e);
273
- }, se = function(e) {
274
- t(this, $).start(), t(this, a).notify("play", void 0, e);
275
- }, ie = function(e) {
276
- const { paused: i } = t(this, a).$state;
277
- !i() && !t(this, T) && t(this, a).notify("playing", void 0, e);
278
- }, x = function(e, i) {
279
- const n = {
280
- buffered: new C(0, e),
281
- seekable: t(this, v)
282
- };
283
- t(this, a).notify("progress", n, i);
284
- }, ne = function(e) {
285
- t(this, a).notify("waiting", void 0, e);
286
- }, ae = function(e) {
287
- const { paused: i } = t(this, a).$state;
288
- i() || t(this, a).notify("playing", void 0, e);
289
- }, oe = function(e) {
290
- const { paused: i } = t(this, a).$state;
291
- i() && t(this, a).notify("play", void 0, e), t(this, a).notify("waiting", void 0, e);
292
- }, F = function(e, i, n) {
293
- const h = { volume: e, muted: i };
294
- t(this, a).notify("volume-change", h, n);
295
- }, // #onTextTrackChange(track: VimeoTextTrack, trigger: Event) {
296
- // const textTrack = this.#ctx.textTracks.toArray().find((t) => t.language === track.language);
297
- // if (textTrack) textTrack.mode = track.mode;
298
- // }
299
- // #onTextTracksChange(tracks: VimeoTextTrack[], trigger: Event) {
300
- // for (const init of tracks) {
301
- // const textTrack = new TextTrack({
302
- // ...init,
303
- // label: init.label.replace('auto-generated', 'auto'),
304
- // });
305
- // textTrack[TextTrackSymbol.readyState] = 2;
306
- // this.#ctx.textTracks.add(textTrack, trigger);
307
- // textTrack.setMode(init.mode, trigger);
308
- // }
309
- // }
310
- // #onCueChange(cue: VimeoTextCue, trigger: Event) {
311
- // const { textTracks, $state } = this.#ctx,
312
- // { currentTime } = $state,
313
- // track = textTracks.selected;
314
- // if (this.#currentCue) track?.removeCue(this.#currentCue, trigger);
315
- // this.#currentCue = new window.VTTCue(currentTime(), Number.MAX_SAFE_INTEGER, cue.text);
316
- // track?.addCue(this.#currentCue, trigger);
317
- // }
318
- he = function(e) {
319
- if (o(this, s, O).call(this), !e.length) return;
320
- const i = new ve({
321
- kind: "chapters",
322
- default: !0
323
- }), { seekableEnd: n } = t(this, a).$state;
324
- for (let h = 0; h < e.length; h++) {
325
- const d = e[h], p = e[h + 1];
326
- i.addCue(
327
- new window.VTTCue(
328
- d.startTime,
329
- (p == null ? void 0 : p.startTime) ?? n(),
330
- d.title
331
- )
332
- );
333
- }
334
- u(this, P, i), t(this, a).textTracks.add(i);
335
- }, O = function() {
336
- t(this, P) && (t(this, a).textTracks.remove(t(this, P)), u(this, P, null));
337
- }, re = function(e, i) {
338
- t(this, a).qualities[K.enableAuto] = e.some((n) => n.id === "auto") ? () => o(this, s, l).call(this, "setQuality", "auto") : void 0;
339
- for (const n of e) {
340
- if (n.id === "auto") continue;
341
- const h = +n.id.slice(0, -1);
342
- isNaN(h) || t(this, a).qualities[R.add](
343
- {
344
- id: n.id,
345
- width: h * (16 / 9),
346
- height: h,
347
- codec: "avc1,h.264",
348
- bitrate: -1
349
- },
350
- i
351
- );
352
- }
353
- o(this, s, D).call(this, e.find((n) => n.active), i);
354
- }, D = function({ id: e } = {}, i) {
355
- if (!e) return;
356
- const n = e === "auto", h = t(this, a).qualities.getById(e);
357
- n ? (t(this, a).qualities[K.setAuto](n, i), t(this, a).qualities[R.select](void 0, !0, i)) : t(this, a).qualities[R.select](h ?? void 0, !0, i);
358
- }, ce = function(e, i, n) {
359
- switch (e) {
360
- case "ready":
361
- o(this, s, ee).call(this);
362
- break;
363
- case "loaded":
364
- o(this, s, X).call(this, n);
365
- break;
366
- case "play":
367
- o(this, s, se).call(this, n);
368
- break;
369
- case "playProgress":
370
- o(this, s, ie).call(this, n);
371
- break;
372
- case "pause":
373
- o(this, s, te).call(this, n);
374
- break;
375
- case "loadProgress":
376
- o(this, s, x).call(this, i.seconds, n);
377
- break;
378
- case "waiting":
379
- o(this, s, oe).call(this, n);
380
- break;
381
- case "bufferstart":
382
- o(this, s, ne).call(this, n);
383
- break;
384
- case "bufferend":
385
- o(this, s, ae).call(this, n);
386
- break;
387
- case "volumechange":
388
- o(this, s, F).call(this, i.volume, Q(t(this, a).$state.muted), n);
389
- break;
390
- case "durationchange":
391
- u(this, v, new C(0, i.duration)), t(this, a).notify("duration-change", i.duration, n);
392
- break;
393
- case "playbackratechange":
394
- t(this, a).notify("rate-change", i.playbackRate, n);
395
- break;
396
- case "qualitychange":
397
- o(this, s, D).call(this, i, n);
398
- break;
399
- case "fullscreenchange":
400
- u(this, V, i.fullscreen), t(this, a).notify("fullscreen-change", i.fullscreen, n);
401
- break;
402
- case "enterpictureinpicture":
403
- t(this, a).notify("picture-in-picture-change", !0, n);
404
- break;
405
- case "leavepictureinpicture":
406
- t(this, a).notify("picture-in-picture-change", !1, n);
407
- break;
408
- case "ended":
409
- t(this, a).notify("end", void 0, n);
410
- break;
411
- case "error":
412
- o(this, s, le).call(this, i, n);
413
- break;
414
- case "seek":
415
- case "seeked":
416
- o(this, s, J).call(this, i.seconds, n);
417
- break;
418
- }
419
- }, le = function(e, i) {
420
- var d;
421
- const { message: n, method: h } = e;
422
- h === "setPlaybackRate" && t(this, k).set(!1), h && ((d = o(this, s, B).call(this, h)) == null || d.reject(n));
423
- }, l = async function(e, i) {
424
- let n = _(), h = t(this, m).get(e);
425
- return h || t(this, m).set(e, h = []), h.push(n), this.postMessage({
426
- method: e,
427
- value: i
428
- }), n.promise;
429
- }, j = function() {
430
- t(this, $).stop(), u(this, v, new C(0, 0)), u(this, E, null), u(this, M, null), t(this, k).set(!1), o(this, s, O).call(this);
431
- }, B = function(e) {
432
- var i;
433
- return (i = t(this, m).get(e)) == null ? void 0 : i.shift();
434
- };
435
- export {
436
- Re as VimeoProvider
437
- };