@moq/watch 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{broadcast-CSXy8QiX.js → broadcast-BFfLDq15.js} +34 -27
- package/{broadcast-CSXy8QiX.js.map → broadcast-BFfLDq15.js.map} +1 -1
- package/element.js +17 -17
- package/element.js.map +1 -1
- package/index.js +97 -97
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/support/element.js +6 -6
- package/support/element.js.map +1 -1
- package/ui/components/BufferControl.d.ts.map +1 -1
- package/ui/components/WatchStatusIndicator.d.ts.map +1 -1
- package/ui/context.d.ts +1 -1
- package/ui/context.d.ts.map +1 -1
- package/ui/index.js +743 -778
- package/ui/index.js.map +1 -1
- package/ui/components/LatencySlider.d.ts +0 -2
- package/ui/components/LatencySlider.d.ts.map +0 -1
package/ui/index.js
CHANGED
|
@@ -1,905 +1,867 @@
|
|
|
1
|
-
import { Button as
|
|
2
|
-
import { Signals as
|
|
3
|
-
const
|
|
4
|
-
equals:
|
|
1
|
+
import { Button as lt, Icon as V, Stats as Bt } from "@moq/ui-core";
|
|
2
|
+
import { Signals as It, Moq as Nt } from "@moq/hang";
|
|
3
|
+
const Ut = !1, Ft = (t, e) => t === e, Kt = /* @__PURE__ */ Symbol("solid-track"), rt = {
|
|
4
|
+
equals: Ft
|
|
5
5
|
};
|
|
6
|
-
let
|
|
7
|
-
const
|
|
6
|
+
let Et = Wt;
|
|
7
|
+
const F = 1, nt = 2, Pt = {
|
|
8
8
|
owned: null,
|
|
9
9
|
cleanups: null,
|
|
10
10
|
context: null,
|
|
11
11
|
owner: null
|
|
12
12
|
};
|
|
13
13
|
var g = null;
|
|
14
|
-
let
|
|
15
|
-
function
|
|
16
|
-
const
|
|
14
|
+
let ft = null, Dt = null, w = null, A = null, z = null, ct = 0;
|
|
15
|
+
function tt(t, e) {
|
|
16
|
+
const r = w, a = g, n = t.length === 0, o = e === void 0 ? a : e, s = n ? Pt : {
|
|
17
17
|
owned: null,
|
|
18
18
|
cleanups: null,
|
|
19
|
-
context:
|
|
20
|
-
owner:
|
|
21
|
-
}, i =
|
|
22
|
-
g =
|
|
19
|
+
context: o ? o.context : null,
|
|
20
|
+
owner: o
|
|
21
|
+
}, i = n ? t : () => t(() => R(() => X(s)));
|
|
22
|
+
g = s, w = null;
|
|
23
23
|
try {
|
|
24
|
-
return
|
|
24
|
+
return Y(i, !0);
|
|
25
25
|
} finally {
|
|
26
|
-
|
|
26
|
+
w = r, g = a;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
value:
|
|
29
|
+
function j(t, e) {
|
|
30
|
+
e = e ? Object.assign({}, rt, e) : rt;
|
|
31
|
+
const r = {
|
|
32
|
+
value: t,
|
|
33
33
|
observers: null,
|
|
34
34
|
observerSlots: null,
|
|
35
|
-
comparator:
|
|
36
|
-
},
|
|
37
|
-
return [
|
|
38
|
-
}
|
|
39
|
-
function
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
function
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
function
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
return
|
|
52
|
-
}
|
|
53
|
-
function
|
|
54
|
-
if (
|
|
55
|
-
const
|
|
56
|
-
|
|
35
|
+
comparator: e.equals || void 0
|
|
36
|
+
}, a = (n) => (typeof n == "function" && (n = n(r.value)), Tt(r, n));
|
|
37
|
+
return [jt.bind(r), a];
|
|
38
|
+
}
|
|
39
|
+
function T(t, e, r) {
|
|
40
|
+
const a = bt(t, e, !1, F);
|
|
41
|
+
Z(a);
|
|
42
|
+
}
|
|
43
|
+
function Mt(t, e, r) {
|
|
44
|
+
Et = Yt;
|
|
45
|
+
const a = bt(t, e, !1, F);
|
|
46
|
+
a.user = !0, z ? z.push(a) : Z(a);
|
|
47
|
+
}
|
|
48
|
+
function U(t, e, r) {
|
|
49
|
+
r = r ? Object.assign({}, rt, r) : rt;
|
|
50
|
+
const a = bt(t, e, !0, 0);
|
|
51
|
+
return a.observers = null, a.observerSlots = null, a.comparator = r.equals || void 0, Z(a), jt.bind(a);
|
|
52
|
+
}
|
|
53
|
+
function R(t) {
|
|
54
|
+
if (w === null) return t();
|
|
55
|
+
const e = w;
|
|
56
|
+
w = null;
|
|
57
57
|
try {
|
|
58
|
-
return
|
|
58
|
+
return t();
|
|
59
59
|
} finally {
|
|
60
|
-
|
|
60
|
+
w = e;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
|
|
63
|
+
function Ht(t) {
|
|
64
|
+
Mt(() => R(t));
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
return g === null || (g.cleanups === null ? g.cleanups = [
|
|
66
|
+
function ut(t) {
|
|
67
|
+
return g === null || (g.cleanups === null ? g.cleanups = [t] : g.cleanups.push(t)), t;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function Gt() {
|
|
70
70
|
return g;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
const
|
|
72
|
+
function Jt(t, e) {
|
|
73
|
+
const r = /* @__PURE__ */ Symbol("context");
|
|
74
74
|
return {
|
|
75
|
-
id:
|
|
76
|
-
Provider:
|
|
77
|
-
defaultValue:
|
|
75
|
+
id: r,
|
|
76
|
+
Provider: ee(r),
|
|
77
|
+
defaultValue: t
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
let
|
|
82
|
-
return g && g.context && (
|
|
80
|
+
function qt(t) {
|
|
81
|
+
let e;
|
|
82
|
+
return g && g.context && (e = g.context[t.id]) !== void 0 ? e : t.defaultValue;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
const
|
|
86
|
-
return
|
|
87
|
-
const
|
|
88
|
-
return Array.isArray(
|
|
89
|
-
},
|
|
84
|
+
function Qt(t) {
|
|
85
|
+
const e = U(t), r = U(() => ht(e()));
|
|
86
|
+
return r.toArray = () => {
|
|
87
|
+
const a = r();
|
|
88
|
+
return Array.isArray(a) ? a : a != null ? [a] : [];
|
|
89
|
+
}, r;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function jt() {
|
|
92
92
|
if (this.sources && this.state)
|
|
93
|
-
if (this.state ===
|
|
93
|
+
if (this.state === F) Z(this);
|
|
94
94
|
else {
|
|
95
|
-
const
|
|
96
|
-
|
|
95
|
+
const t = A;
|
|
96
|
+
A = null, Y(() => ot(this), !1), A = t;
|
|
97
97
|
}
|
|
98
|
-
if (
|
|
99
|
-
const
|
|
100
|
-
|
|
98
|
+
if (w) {
|
|
99
|
+
const t = this.observers ? this.observers.length : 0;
|
|
100
|
+
w.sources ? (w.sources.push(this), w.sourceSlots.push(t)) : (w.sources = [this], w.sourceSlots = [t]), this.observers ? (this.observers.push(w), this.observerSlots.push(w.sources.length - 1)) : (this.observers = [w], this.observerSlots = [w.sources.length - 1]);
|
|
101
101
|
}
|
|
102
102
|
return this.value;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
105
|
-
let
|
|
106
|
-
return (!
|
|
107
|
-
for (let
|
|
108
|
-
const
|
|
109
|
-
|
|
104
|
+
function Tt(t, e, r) {
|
|
105
|
+
let a = t.value;
|
|
106
|
+
return (!t.comparator || !t.comparator(a, e)) && (t.value = e, t.observers && t.observers.length && Y(() => {
|
|
107
|
+
for (let n = 0; n < t.observers.length; n += 1) {
|
|
108
|
+
const o = t.observers[n], s = ft && ft.running;
|
|
109
|
+
s && ft.disposed.has(o), (s ? !o.tState : !o.state) && (o.pure ? A.push(o) : z.push(o), o.observers && Ot(o)), s || (o.state = F);
|
|
110
110
|
}
|
|
111
|
-
if (
|
|
112
|
-
throw
|
|
113
|
-
}, !1)),
|
|
114
|
-
}
|
|
115
|
-
function
|
|
116
|
-
if (!
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
function
|
|
122
|
-
let
|
|
123
|
-
const
|
|
124
|
-
|
|
111
|
+
if (A.length > 1e6)
|
|
112
|
+
throw A = [], new Error();
|
|
113
|
+
}, !1)), e;
|
|
114
|
+
}
|
|
115
|
+
function Z(t) {
|
|
116
|
+
if (!t.fn) return;
|
|
117
|
+
X(t);
|
|
118
|
+
const e = ct;
|
|
119
|
+
Xt(t, t.value, e);
|
|
120
|
+
}
|
|
121
|
+
function Xt(t, e, r) {
|
|
122
|
+
let a;
|
|
123
|
+
const n = g, o = w;
|
|
124
|
+
w = g = t;
|
|
125
125
|
try {
|
|
126
|
-
|
|
127
|
-
} catch (
|
|
128
|
-
return
|
|
126
|
+
a = t.fn(e);
|
|
127
|
+
} catch (s) {
|
|
128
|
+
return t.pure && (t.state = F, t.owned && t.owned.forEach(X), t.owned = null), t.updatedAt = r + 1, Vt(s);
|
|
129
129
|
} finally {
|
|
130
|
-
|
|
130
|
+
w = o, g = n;
|
|
131
131
|
}
|
|
132
|
-
(!
|
|
132
|
+
(!t.updatedAt || t.updatedAt <= r) && (t.updatedAt != null && "observers" in t ? Tt(t, a) : t.value = a, t.updatedAt = r);
|
|
133
133
|
}
|
|
134
|
-
function
|
|
135
|
-
const
|
|
136
|
-
fn:
|
|
137
|
-
state:
|
|
134
|
+
function bt(t, e, r, a = F, n) {
|
|
135
|
+
const o = {
|
|
136
|
+
fn: t,
|
|
137
|
+
state: a,
|
|
138
138
|
updatedAt: null,
|
|
139
139
|
owned: null,
|
|
140
140
|
sources: null,
|
|
141
141
|
sourceSlots: null,
|
|
142
142
|
cleanups: null,
|
|
143
|
-
value:
|
|
143
|
+
value: e,
|
|
144
144
|
owner: g,
|
|
145
145
|
context: g ? g.context : null,
|
|
146
|
-
pure:
|
|
146
|
+
pure: r
|
|
147
147
|
};
|
|
148
|
-
return g === null || g !==
|
|
149
|
-
}
|
|
150
|
-
function
|
|
151
|
-
if (
|
|
152
|
-
if (
|
|
153
|
-
if (
|
|
154
|
-
const
|
|
155
|
-
for (; (
|
|
156
|
-
|
|
157
|
-
for (let
|
|
158
|
-
if (
|
|
159
|
-
|
|
160
|
-
else if (
|
|
161
|
-
const
|
|
162
|
-
|
|
148
|
+
return g === null || g !== Pt && (g.owned ? g.owned.push(o) : g.owned = [o]), o;
|
|
149
|
+
}
|
|
150
|
+
function at(t) {
|
|
151
|
+
if (t.state === 0) return;
|
|
152
|
+
if (t.state === nt) return ot(t);
|
|
153
|
+
if (t.suspense && R(t.suspense.inFallback)) return t.suspense.effects.push(t);
|
|
154
|
+
const e = [t];
|
|
155
|
+
for (; (t = t.owner) && (!t.updatedAt || t.updatedAt < ct); )
|
|
156
|
+
t.state && e.push(t);
|
|
157
|
+
for (let r = e.length - 1; r >= 0; r--)
|
|
158
|
+
if (t = e[r], t.state === F)
|
|
159
|
+
Z(t);
|
|
160
|
+
else if (t.state === nt) {
|
|
161
|
+
const a = A;
|
|
162
|
+
A = null, Y(() => ot(t, e[0]), !1), A = a;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
function
|
|
166
|
-
if (
|
|
167
|
-
let
|
|
168
|
-
|
|
165
|
+
function Y(t, e) {
|
|
166
|
+
if (A) return t();
|
|
167
|
+
let r = !1;
|
|
168
|
+
e || (A = []), z ? r = !0 : z = [], ct++;
|
|
169
169
|
try {
|
|
170
|
-
const
|
|
171
|
-
return
|
|
172
|
-
} catch (
|
|
173
|
-
|
|
170
|
+
const a = t();
|
|
171
|
+
return Zt(r), a;
|
|
172
|
+
} catch (a) {
|
|
173
|
+
r || (z = null), A = null, Vt(a);
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
function
|
|
177
|
-
if (
|
|
178
|
-
const
|
|
179
|
-
|
|
176
|
+
function Zt(t) {
|
|
177
|
+
if (A && (Wt(A), A = null), t) return;
|
|
178
|
+
const e = z;
|
|
179
|
+
z = null, e.length && Y(() => Et(e), !1);
|
|
180
180
|
}
|
|
181
|
-
function
|
|
182
|
-
for (let
|
|
181
|
+
function Wt(t) {
|
|
182
|
+
for (let e = 0; e < t.length; e++) at(t[e]);
|
|
183
183
|
}
|
|
184
|
-
function
|
|
185
|
-
let
|
|
186
|
-
for (
|
|
187
|
-
const
|
|
188
|
-
|
|
184
|
+
function Yt(t) {
|
|
185
|
+
let e, r = 0;
|
|
186
|
+
for (e = 0; e < t.length; e++) {
|
|
187
|
+
const a = t[e];
|
|
188
|
+
a.user ? t[r++] = a : at(a);
|
|
189
189
|
}
|
|
190
|
-
for (
|
|
191
|
-
}
|
|
192
|
-
function
|
|
193
|
-
|
|
194
|
-
for (let
|
|
195
|
-
const
|
|
196
|
-
if (
|
|
197
|
-
const
|
|
198
|
-
|
|
190
|
+
for (e = 0; e < r; e++) at(t[e]);
|
|
191
|
+
}
|
|
192
|
+
function ot(t, e) {
|
|
193
|
+
t.state = 0;
|
|
194
|
+
for (let r = 0; r < t.sources.length; r += 1) {
|
|
195
|
+
const a = t.sources[r];
|
|
196
|
+
if (a.sources) {
|
|
197
|
+
const n = a.state;
|
|
198
|
+
n === F ? a !== e && (!a.updatedAt || a.updatedAt < ct) && at(a) : n === nt && ot(a, e);
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
function
|
|
203
|
-
for (let
|
|
204
|
-
const
|
|
205
|
-
|
|
202
|
+
function Ot(t) {
|
|
203
|
+
for (let e = 0; e < t.observers.length; e += 1) {
|
|
204
|
+
const r = t.observers[e];
|
|
205
|
+
r.state || (r.state = nt, r.pure ? A.push(r) : z.push(r), r.observers && Ot(r));
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
function
|
|
209
|
-
let
|
|
210
|
-
if (
|
|
211
|
-
for (;
|
|
212
|
-
const
|
|
213
|
-
if (
|
|
214
|
-
const
|
|
215
|
-
|
|
208
|
+
function X(t) {
|
|
209
|
+
let e;
|
|
210
|
+
if (t.sources)
|
|
211
|
+
for (; t.sources.length; ) {
|
|
212
|
+
const r = t.sources.pop(), a = t.sourceSlots.pop(), n = r.observers;
|
|
213
|
+
if (n && n.length) {
|
|
214
|
+
const o = n.pop(), s = r.observerSlots.pop();
|
|
215
|
+
a < n.length && (o.sourceSlots[s] = a, n[a] = o, r.observerSlots[a] = s);
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
if (
|
|
219
|
-
for (
|
|
220
|
-
delete
|
|
218
|
+
if (t.tOwned) {
|
|
219
|
+
for (e = t.tOwned.length - 1; e >= 0; e--) X(t.tOwned[e]);
|
|
220
|
+
delete t.tOwned;
|
|
221
221
|
}
|
|
222
|
-
if (
|
|
223
|
-
for (
|
|
224
|
-
|
|
222
|
+
if (t.owned) {
|
|
223
|
+
for (e = t.owned.length - 1; e >= 0; e--) X(t.owned[e]);
|
|
224
|
+
t.owned = null;
|
|
225
225
|
}
|
|
226
|
-
if (
|
|
227
|
-
for (
|
|
228
|
-
|
|
226
|
+
if (t.cleanups) {
|
|
227
|
+
for (e = t.cleanups.length - 1; e >= 0; e--) t.cleanups[e]();
|
|
228
|
+
t.cleanups = null;
|
|
229
229
|
}
|
|
230
|
-
|
|
230
|
+
t.state = 0;
|
|
231
231
|
}
|
|
232
|
-
function
|
|
233
|
-
return
|
|
234
|
-
cause:
|
|
232
|
+
function te(t) {
|
|
233
|
+
return t instanceof Error ? t : new Error(typeof t == "string" ? t : "Unknown error", {
|
|
234
|
+
cause: t
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
|
-
function
|
|
238
|
-
throw
|
|
237
|
+
function Vt(t, e = g) {
|
|
238
|
+
throw te(t);
|
|
239
239
|
}
|
|
240
|
-
function
|
|
241
|
-
if (typeof
|
|
242
|
-
if (Array.isArray(
|
|
243
|
-
const
|
|
244
|
-
for (let
|
|
245
|
-
const
|
|
246
|
-
Array.isArray(
|
|
240
|
+
function ht(t) {
|
|
241
|
+
if (typeof t == "function" && !t.length) return ht(t());
|
|
242
|
+
if (Array.isArray(t)) {
|
|
243
|
+
const e = [];
|
|
244
|
+
for (let r = 0; r < t.length; r++) {
|
|
245
|
+
const a = ht(t[r]);
|
|
246
|
+
Array.isArray(a) ? e.push.apply(e, a) : e.push(a);
|
|
247
247
|
}
|
|
248
|
-
return
|
|
248
|
+
return e;
|
|
249
249
|
}
|
|
250
|
-
return
|
|
250
|
+
return t;
|
|
251
251
|
}
|
|
252
|
-
function
|
|
253
|
-
return function(
|
|
254
|
-
let
|
|
255
|
-
return
|
|
252
|
+
function ee(t, e) {
|
|
253
|
+
return function(a) {
|
|
254
|
+
let n;
|
|
255
|
+
return T(() => n = R(() => (g.context = {
|
|
256
256
|
...g.context,
|
|
257
|
-
[
|
|
258
|
-
},
|
|
257
|
+
[t]: a.value
|
|
258
|
+
}, Qt(() => a.children))), void 0), n;
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
|
-
const
|
|
262
|
-
function
|
|
263
|
-
for (let
|
|
261
|
+
const re = /* @__PURE__ */ Symbol("fallback");
|
|
262
|
+
function wt(t) {
|
|
263
|
+
for (let e = 0; e < t.length; e++) t[e]();
|
|
264
264
|
}
|
|
265
|
-
function
|
|
266
|
-
let
|
|
267
|
-
return
|
|
268
|
-
let c =
|
|
269
|
-
return c[
|
|
270
|
-
let
|
|
265
|
+
function ne(t, e, r = {}) {
|
|
266
|
+
let a = [], n = [], o = [], s = 0, i = e.length > 1 ? [] : null;
|
|
267
|
+
return ut(() => wt(o)), () => {
|
|
268
|
+
let c = t() || [], f = c.length, d, l;
|
|
269
|
+
return c[Kt], R(() => {
|
|
270
|
+
let $, _, h, E, P, b, v, m, q;
|
|
271
271
|
if (f === 0)
|
|
272
|
-
|
|
273
|
-
else if (
|
|
274
|
-
for (
|
|
275
|
-
|
|
276
|
-
|
|
272
|
+
s !== 0 && (wt(o), o = [], a = [], n = [], s = 0, i && (i = [])), r.fallback && (a = [re], n[0] = tt((B) => (o[0] = B, r.fallback())), s = 1);
|
|
273
|
+
else if (s === 0) {
|
|
274
|
+
for (n = new Array(f), l = 0; l < f; l++)
|
|
275
|
+
a[l] = c[l], n[l] = tt(M);
|
|
276
|
+
s = f;
|
|
277
277
|
} else {
|
|
278
|
-
for (
|
|
279
|
-
for (
|
|
280
|
-
|
|
281
|
-
for (
|
|
282
|
-
q = c[l], d =
|
|
283
|
-
for (d =
|
|
284
|
-
q =
|
|
285
|
-
for (l =
|
|
286
|
-
l in
|
|
287
|
-
|
|
278
|
+
for (h = new Array(f), E = new Array(f), i && (P = new Array(f)), b = 0, v = Math.min(s, f); b < v && a[b] === c[b]; b++) ;
|
|
279
|
+
for (v = s - 1, m = f - 1; v >= b && m >= b && a[v] === c[m]; v--, m--)
|
|
280
|
+
h[m] = n[v], E[m] = o[v], i && (P[m] = i[v]);
|
|
281
|
+
for ($ = /* @__PURE__ */ new Map(), _ = new Array(m + 1), l = m; l >= b; l--)
|
|
282
|
+
q = c[l], d = $.get(q), _[l] = d === void 0 ? -1 : d, $.set(q, l);
|
|
283
|
+
for (d = b; d <= v; d++)
|
|
284
|
+
q = a[d], l = $.get(q), l !== void 0 && l !== -1 ? (h[l] = n[d], E[l] = o[d], i && (P[l] = i[d]), l = _[l], $.set(q, l)) : o[d]();
|
|
285
|
+
for (l = b; l < f; l++)
|
|
286
|
+
l in h ? (n[l] = h[l], o[l] = E[l], i && (i[l] = P[l], i[l](l))) : n[l] = tt(M);
|
|
287
|
+
n = n.slice(0, s = f), a = c.slice(0);
|
|
288
288
|
}
|
|
289
|
-
return
|
|
289
|
+
return n;
|
|
290
290
|
});
|
|
291
|
-
function
|
|
292
|
-
if (
|
|
293
|
-
const [_,
|
|
294
|
-
return i[l] =
|
|
291
|
+
function M($) {
|
|
292
|
+
if (o[l] = $, i) {
|
|
293
|
+
const [_, h] = j(l);
|
|
294
|
+
return i[l] = h, e(c[l], _);
|
|
295
295
|
}
|
|
296
|
-
return
|
|
296
|
+
return e(c[l]);
|
|
297
297
|
}
|
|
298
298
|
};
|
|
299
299
|
}
|
|
300
|
-
function u(
|
|
301
|
-
return
|
|
300
|
+
function u(t, e) {
|
|
301
|
+
return R(() => t(e || {}));
|
|
302
302
|
}
|
|
303
|
-
const
|
|
304
|
-
function
|
|
305
|
-
const
|
|
306
|
-
fallback: () =>
|
|
303
|
+
const ae = (t) => `Stale read from <${t}>.`;
|
|
304
|
+
function gt(t) {
|
|
305
|
+
const e = "fallback" in t && {
|
|
306
|
+
fallback: () => t.fallback
|
|
307
307
|
};
|
|
308
|
-
return
|
|
308
|
+
return U(ne(() => t.each, t.children, e || void 0));
|
|
309
309
|
}
|
|
310
|
-
function
|
|
311
|
-
const
|
|
312
|
-
equals: (
|
|
310
|
+
function L(t) {
|
|
311
|
+
const e = t.keyed, r = U(() => t.when, void 0, void 0), a = e ? r : U(r, void 0, {
|
|
312
|
+
equals: (n, o) => !n == !o
|
|
313
313
|
});
|
|
314
|
-
return
|
|
315
|
-
const
|
|
316
|
-
if (
|
|
317
|
-
const
|
|
318
|
-
return typeof
|
|
319
|
-
if (!
|
|
320
|
-
return
|
|
321
|
-
})) :
|
|
322
|
-
}
|
|
323
|
-
return e.fallback;
|
|
324
|
-
}, void 0, void 0);
|
|
325
|
-
}
|
|
326
|
-
function lt(e) {
|
|
327
|
-
const t = Le(() => e.children), n = L(() => {
|
|
328
|
-
const o = t(), r = Array.isArray(o) ? o : [o];
|
|
329
|
-
let s = () => {
|
|
330
|
-
};
|
|
331
|
-
for (let a = 0; a < r.length; a++) {
|
|
332
|
-
const i = a, c = r[a], f = s, d = L(() => f() ? void 0 : c.when, void 0, void 0), l = c.keyed ? d : L(d, void 0, {
|
|
333
|
-
equals: (E, y) => !E == !y
|
|
334
|
-
});
|
|
335
|
-
s = () => f() || (l() ? [i, d, c] : void 0);
|
|
314
|
+
return U(() => {
|
|
315
|
+
const n = a();
|
|
316
|
+
if (n) {
|
|
317
|
+
const o = t.children;
|
|
318
|
+
return typeof o == "function" && o.length > 0 ? R(() => o(e ? n : () => {
|
|
319
|
+
if (!R(a)) throw ae("Show");
|
|
320
|
+
return r();
|
|
321
|
+
})) : o;
|
|
336
322
|
}
|
|
337
|
-
return
|
|
338
|
-
});
|
|
339
|
-
return L(() => {
|
|
340
|
-
const o = n()();
|
|
341
|
-
if (!o) return e.fallback;
|
|
342
|
-
const [r, s, a] = o, i = a.children;
|
|
343
|
-
return typeof i == "function" && i.length > 0 ? O(() => i(a.keyed ? s() : () => {
|
|
344
|
-
if (O(n)()?.[0] !== r) throw Be("Match");
|
|
345
|
-
return s();
|
|
346
|
-
})) : i;
|
|
323
|
+
return t.fallback;
|
|
347
324
|
}, void 0, void 0);
|
|
348
325
|
}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
for (; a < r || i < s; ) {
|
|
356
|
-
if (t[a] === n[i]) {
|
|
357
|
-
a++, i++;
|
|
326
|
+
const oe = (t) => U(() => t());
|
|
327
|
+
function ie(t, e, r) {
|
|
328
|
+
let a = r.length, n = e.length, o = a, s = 0, i = 0, c = e[n - 1].nextSibling, f = null;
|
|
329
|
+
for (; s < n || i < o; ) {
|
|
330
|
+
if (e[s] === r[i]) {
|
|
331
|
+
s++, i++;
|
|
358
332
|
continue;
|
|
359
333
|
}
|
|
360
|
-
for (;
|
|
361
|
-
|
|
362
|
-
if (
|
|
363
|
-
const d =
|
|
364
|
-
for (; i <
|
|
365
|
-
} else if (
|
|
366
|
-
for (;
|
|
367
|
-
(!f || !f.has(
|
|
368
|
-
else if (
|
|
369
|
-
const d =
|
|
370
|
-
|
|
334
|
+
for (; e[n - 1] === r[o - 1]; )
|
|
335
|
+
n--, o--;
|
|
336
|
+
if (n === s) {
|
|
337
|
+
const d = o < a ? i ? r[i - 1].nextSibling : r[o - i] : c;
|
|
338
|
+
for (; i < o; ) t.insertBefore(r[i++], d);
|
|
339
|
+
} else if (o === i)
|
|
340
|
+
for (; s < n; )
|
|
341
|
+
(!f || !f.has(e[s])) && e[s].remove(), s++;
|
|
342
|
+
else if (e[s] === r[o - 1] && r[i] === e[n - 1]) {
|
|
343
|
+
const d = e[--n].nextSibling;
|
|
344
|
+
t.insertBefore(r[i++], e[s++].nextSibling), t.insertBefore(r[--o], d), e[n] = r[o];
|
|
371
345
|
} else {
|
|
372
346
|
if (!f) {
|
|
373
347
|
f = /* @__PURE__ */ new Map();
|
|
374
348
|
let l = i;
|
|
375
|
-
for (; l <
|
|
349
|
+
for (; l < o; ) f.set(r[l], l++);
|
|
376
350
|
}
|
|
377
|
-
const d = f.get(
|
|
351
|
+
const d = f.get(e[s]);
|
|
378
352
|
if (d != null)
|
|
379
|
-
if (i < d && d <
|
|
380
|
-
let l =
|
|
381
|
-
for (; ++l <
|
|
382
|
-
|
|
383
|
-
if (
|
|
384
|
-
const _ =
|
|
385
|
-
for (; i < d; )
|
|
386
|
-
} else
|
|
387
|
-
} else
|
|
388
|
-
else
|
|
353
|
+
if (i < d && d < o) {
|
|
354
|
+
let l = s, M = 1, $;
|
|
355
|
+
for (; ++l < n && l < o && !(($ = f.get(e[l])) == null || $ !== d + M); )
|
|
356
|
+
M++;
|
|
357
|
+
if (M > d - i) {
|
|
358
|
+
const _ = e[s];
|
|
359
|
+
for (; i < d; ) t.insertBefore(r[i++], _);
|
|
360
|
+
} else t.replaceChild(r[i++], e[s++]);
|
|
361
|
+
} else s++;
|
|
362
|
+
else e[s++].remove();
|
|
389
363
|
}
|
|
390
364
|
}
|
|
391
365
|
}
|
|
392
|
-
const
|
|
393
|
-
function
|
|
394
|
-
let
|
|
395
|
-
const
|
|
366
|
+
const mt = "_$DX_DELEGATE";
|
|
367
|
+
function W(t, e, r, a) {
|
|
368
|
+
let n;
|
|
369
|
+
const o = () => {
|
|
396
370
|
const i = document.createElement("template");
|
|
397
|
-
return i.innerHTML =
|
|
398
|
-
},
|
|
399
|
-
return
|
|
400
|
-
}
|
|
401
|
-
function
|
|
402
|
-
const
|
|
403
|
-
for (let
|
|
404
|
-
const
|
|
405
|
-
|
|
371
|
+
return i.innerHTML = t, i.content.firstChild;
|
|
372
|
+
}, s = () => (n || (n = o())).cloneNode(!0);
|
|
373
|
+
return s.cloneNode = s, s;
|
|
374
|
+
}
|
|
375
|
+
function se(t, e = window.document) {
|
|
376
|
+
const r = e[mt] || (e[mt] = /* @__PURE__ */ new Set());
|
|
377
|
+
for (let a = 0, n = t.length; a < n; a++) {
|
|
378
|
+
const o = t[a];
|
|
379
|
+
r.has(o) || (r.add(o), e.addEventListener(o, ue));
|
|
406
380
|
}
|
|
407
381
|
}
|
|
408
|
-
function
|
|
409
|
-
|
|
410
|
-
}
|
|
411
|
-
function
|
|
412
|
-
|
|
413
|
-
}
|
|
414
|
-
function
|
|
415
|
-
if (!
|
|
416
|
-
const
|
|
417
|
-
if (typeof
|
|
418
|
-
typeof
|
|
419
|
-
let
|
|
420
|
-
for (
|
|
421
|
-
|
|
422
|
-
for (
|
|
423
|
-
|
|
424
|
-
return
|
|
382
|
+
function et(t, e, r) {
|
|
383
|
+
r == null ? t.removeAttribute(e) : t.setAttribute(e, r);
|
|
384
|
+
}
|
|
385
|
+
function pt(t, e) {
|
|
386
|
+
e == null ? t.removeAttribute("class") : t.className = e;
|
|
387
|
+
}
|
|
388
|
+
function yt(t, e, r) {
|
|
389
|
+
if (!e) return r ? et(t, "style") : e;
|
|
390
|
+
const a = t.style;
|
|
391
|
+
if (typeof e == "string") return a.cssText = e;
|
|
392
|
+
typeof r == "string" && (a.cssText = r = void 0), r || (r = {}), e || (e = {});
|
|
393
|
+
let n, o;
|
|
394
|
+
for (o in r)
|
|
395
|
+
e[o] == null && a.removeProperty(o), delete r[o];
|
|
396
|
+
for (o in e)
|
|
397
|
+
n = e[o], n !== r[o] && (a.setProperty(o, n), r[o] = n);
|
|
398
|
+
return r;
|
|
425
399
|
}
|
|
426
|
-
function
|
|
427
|
-
|
|
400
|
+
function le(t, e, r) {
|
|
401
|
+
r != null ? t.style.setProperty(e, r) : t.style.removeProperty(e);
|
|
428
402
|
}
|
|
429
|
-
function
|
|
430
|
-
return
|
|
403
|
+
function ce(t, e, r) {
|
|
404
|
+
return R(() => t(e, r));
|
|
431
405
|
}
|
|
432
|
-
function
|
|
433
|
-
if (
|
|
434
|
-
|
|
406
|
+
function p(t, e, r, a) {
|
|
407
|
+
if (r !== void 0 && !a && (a = []), typeof e != "function") return it(t, e, a, r);
|
|
408
|
+
T((n) => it(t, e(), n, r), a);
|
|
435
409
|
}
|
|
436
|
-
function
|
|
437
|
-
let
|
|
438
|
-
const
|
|
410
|
+
function ue(t) {
|
|
411
|
+
let e = t.target;
|
|
412
|
+
const r = `$$${t.type}`, a = t.target, n = t.currentTarget, o = (c) => Object.defineProperty(t, "target", {
|
|
439
413
|
configurable: !0,
|
|
440
414
|
value: c
|
|
441
|
-
}),
|
|
442
|
-
const c =
|
|
443
|
-
if (c && !
|
|
444
|
-
const f =
|
|
445
|
-
if (f !== void 0 ? c.call(
|
|
415
|
+
}), s = () => {
|
|
416
|
+
const c = e[r];
|
|
417
|
+
if (c && !e.disabled) {
|
|
418
|
+
const f = e[`${r}Data`];
|
|
419
|
+
if (f !== void 0 ? c.call(e, f, t) : c.call(e, t), t.cancelBubble) return;
|
|
446
420
|
}
|
|
447
|
-
return
|
|
421
|
+
return e.host && typeof e.host != "string" && !e.host._$host && e.contains(t.target) && o(e.host), !0;
|
|
448
422
|
}, i = () => {
|
|
449
|
-
for (;
|
|
423
|
+
for (; s() && (e = e._$host || e.parentNode || e.host); ) ;
|
|
450
424
|
};
|
|
451
|
-
if (Object.defineProperty(
|
|
425
|
+
if (Object.defineProperty(t, "currentTarget", {
|
|
452
426
|
configurable: !0,
|
|
453
427
|
get() {
|
|
454
|
-
return
|
|
428
|
+
return e || document;
|
|
455
429
|
}
|
|
456
|
-
}),
|
|
457
|
-
const c =
|
|
458
|
-
|
|
459
|
-
for (let f = 0; f < c.length - 2 && (
|
|
460
|
-
if (
|
|
461
|
-
|
|
430
|
+
}), t.composedPath) {
|
|
431
|
+
const c = t.composedPath();
|
|
432
|
+
o(c[0]);
|
|
433
|
+
for (let f = 0; f < c.length - 2 && (e = c[f], !!s()); f++) {
|
|
434
|
+
if (e._$host) {
|
|
435
|
+
e = e._$host, i();
|
|
462
436
|
break;
|
|
463
437
|
}
|
|
464
|
-
if (
|
|
438
|
+
if (e.parentNode === n)
|
|
465
439
|
break;
|
|
466
440
|
}
|
|
467
441
|
} else i();
|
|
468
|
-
|
|
469
|
-
}
|
|
470
|
-
function
|
|
471
|
-
for (; typeof
|
|
472
|
-
if (
|
|
473
|
-
const
|
|
474
|
-
if (
|
|
475
|
-
if (
|
|
476
|
-
return
|
|
477
|
-
if (
|
|
478
|
-
let i =
|
|
479
|
-
i && i.nodeType === 3 ? i.data !==
|
|
442
|
+
o(a);
|
|
443
|
+
}
|
|
444
|
+
function it(t, e, r, a, n) {
|
|
445
|
+
for (; typeof r == "function"; ) r = r();
|
|
446
|
+
if (e === r) return r;
|
|
447
|
+
const o = typeof e, s = a !== void 0;
|
|
448
|
+
if (t = s && r[0] && r[0].parentNode || t, o === "string" || o === "number") {
|
|
449
|
+
if (o === "number" && (e = e.toString(), e === r))
|
|
450
|
+
return r;
|
|
451
|
+
if (s) {
|
|
452
|
+
let i = r[0];
|
|
453
|
+
i && i.nodeType === 3 ? i.data !== e && (i.data = e) : i = document.createTextNode(e), r = H(t, r, a, i);
|
|
480
454
|
} else
|
|
481
|
-
|
|
482
|
-
} else if (
|
|
483
|
-
|
|
455
|
+
r !== "" && typeof r == "string" ? r = t.firstChild.data = e : r = t.textContent = e;
|
|
456
|
+
} else if (e == null || o === "boolean")
|
|
457
|
+
r = H(t, r, a);
|
|
484
458
|
else {
|
|
485
|
-
if (
|
|
486
|
-
return
|
|
487
|
-
let i =
|
|
459
|
+
if (o === "function")
|
|
460
|
+
return T(() => {
|
|
461
|
+
let i = e();
|
|
488
462
|
for (; typeof i == "function"; ) i = i();
|
|
489
|
-
|
|
490
|
-
}), () =>
|
|
491
|
-
if (Array.isArray(
|
|
492
|
-
const i = [], c =
|
|
493
|
-
if (
|
|
494
|
-
return
|
|
463
|
+
r = it(t, i, r, a);
|
|
464
|
+
}), () => r;
|
|
465
|
+
if (Array.isArray(e)) {
|
|
466
|
+
const i = [], c = r && Array.isArray(r);
|
|
467
|
+
if (_t(i, e, r, n))
|
|
468
|
+
return T(() => r = it(t, i, r, a, !0)), () => r;
|
|
495
469
|
if (i.length === 0) {
|
|
496
|
-
if (
|
|
497
|
-
} else c ?
|
|
498
|
-
|
|
499
|
-
} else if (
|
|
500
|
-
if (Array.isArray(
|
|
501
|
-
if (
|
|
502
|
-
|
|
503
|
-
} else
|
|
504
|
-
|
|
470
|
+
if (r = H(t, r, a), s) return r;
|
|
471
|
+
} else c ? r.length === 0 ? xt(t, i, a) : ie(t, r, i) : (r && H(t), xt(t, i));
|
|
472
|
+
r = i;
|
|
473
|
+
} else if (e.nodeType) {
|
|
474
|
+
if (Array.isArray(r)) {
|
|
475
|
+
if (s) return r = H(t, r, a, e);
|
|
476
|
+
H(t, r, null, e);
|
|
477
|
+
} else r == null || r === "" || !t.firstChild ? t.appendChild(e) : t.replaceChild(e, t.firstChild);
|
|
478
|
+
r = e;
|
|
505
479
|
}
|
|
506
480
|
}
|
|
507
|
-
return
|
|
481
|
+
return r;
|
|
508
482
|
}
|
|
509
|
-
function
|
|
510
|
-
let
|
|
511
|
-
for (let
|
|
512
|
-
let i =
|
|
483
|
+
function _t(t, e, r, a) {
|
|
484
|
+
let n = !1;
|
|
485
|
+
for (let o = 0, s = e.length; o < s; o++) {
|
|
486
|
+
let i = e[o], c = r && r[t.length], f;
|
|
513
487
|
if (!(i == null || i === !0 || i === !1)) if ((f = typeof i) == "object" && i.nodeType)
|
|
514
|
-
|
|
488
|
+
t.push(i);
|
|
515
489
|
else if (Array.isArray(i))
|
|
516
|
-
|
|
490
|
+
n = _t(t, i, c) || n;
|
|
517
491
|
else if (f === "function")
|
|
518
|
-
if (
|
|
492
|
+
if (a) {
|
|
519
493
|
for (; typeof i == "function"; ) i = i();
|
|
520
|
-
|
|
494
|
+
n = _t(t, Array.isArray(i) ? i : [i], Array.isArray(c) ? c : [c]) || n;
|
|
521
495
|
} else
|
|
522
|
-
|
|
496
|
+
t.push(i), n = !0;
|
|
523
497
|
else {
|
|
524
498
|
const d = String(i);
|
|
525
|
-
c && c.nodeType === 3 && c.data === d ?
|
|
499
|
+
c && c.nodeType === 3 && c.data === d ? t.push(c) : t.push(document.createTextNode(d));
|
|
526
500
|
}
|
|
527
501
|
}
|
|
528
|
-
return
|
|
502
|
+
return n;
|
|
529
503
|
}
|
|
530
|
-
function
|
|
531
|
-
for (let
|
|
532
|
-
}
|
|
533
|
-
function
|
|
534
|
-
if (
|
|
535
|
-
const
|
|
536
|
-
if (
|
|
537
|
-
let
|
|
538
|
-
for (let
|
|
539
|
-
const i =
|
|
540
|
-
if (
|
|
541
|
-
const c = i.parentNode ===
|
|
542
|
-
!
|
|
543
|
-
} else
|
|
504
|
+
function xt(t, e, r = null) {
|
|
505
|
+
for (let a = 0, n = e.length; a < n; a++) t.insertBefore(e[a], r);
|
|
506
|
+
}
|
|
507
|
+
function H(t, e, r, a) {
|
|
508
|
+
if (r === void 0) return t.textContent = "";
|
|
509
|
+
const n = a || document.createTextNode("");
|
|
510
|
+
if (e.length) {
|
|
511
|
+
let o = !1;
|
|
512
|
+
for (let s = e.length - 1; s >= 0; s--) {
|
|
513
|
+
const i = e[s];
|
|
514
|
+
if (n !== i) {
|
|
515
|
+
const c = i.parentNode === t;
|
|
516
|
+
!o && !s ? c ? t.replaceChild(n, i) : t.insertBefore(n, r) : c && i.remove();
|
|
517
|
+
} else o = !0;
|
|
544
518
|
}
|
|
545
|
-
} else
|
|
546
|
-
return [
|
|
519
|
+
} else t.insertBefore(n, r);
|
|
520
|
+
return [n];
|
|
547
521
|
}
|
|
548
|
-
function
|
|
549
|
-
return Object.keys(
|
|
550
|
-
const
|
|
551
|
-
return
|
|
522
|
+
function fe(t) {
|
|
523
|
+
return Object.keys(t).reduce((r, a) => {
|
|
524
|
+
const n = t[a];
|
|
525
|
+
return r[a] = Object.assign({}, n), zt(n.value) && !_e(n.value) && !Array.isArray(n.value) && (r[a].value = Object.assign({}, n.value)), Array.isArray(n.value) && (r[a].value = n.value.slice(0)), r;
|
|
552
526
|
}, {});
|
|
553
527
|
}
|
|
554
|
-
function
|
|
555
|
-
return
|
|
556
|
-
const
|
|
557
|
-
return
|
|
558
|
-
value:
|
|
559
|
-
},
|
|
528
|
+
function de(t) {
|
|
529
|
+
return t ? Object.keys(t).reduce((r, a) => {
|
|
530
|
+
const n = t[a];
|
|
531
|
+
return r[a] = zt(n) && "value" in n ? n : {
|
|
532
|
+
value: n
|
|
533
|
+
}, r[a].attribute || (r[a].attribute = pe(a)), r[a].parse = "parse" in r[a] ? r[a].parse : typeof r[a].value != "string", r;
|
|
560
534
|
}, {}) : {};
|
|
561
535
|
}
|
|
562
|
-
function
|
|
563
|
-
return Object.keys(
|
|
536
|
+
function he(t) {
|
|
537
|
+
return Object.keys(t).reduce((r, a) => (r[a] = t[a].value, r), {});
|
|
564
538
|
}
|
|
565
|
-
function
|
|
566
|
-
const
|
|
567
|
-
return Object.keys(
|
|
568
|
-
const
|
|
569
|
-
|
|
539
|
+
function ge(t, e) {
|
|
540
|
+
const r = fe(e);
|
|
541
|
+
return Object.keys(e).forEach((n) => {
|
|
542
|
+
const o = r[n], s = t.getAttribute(o.attribute), i = t[n];
|
|
543
|
+
s != null && (o.value = o.parse ? Lt(s) : s), i != null && (o.value = Array.isArray(i) ? i.slice(0) : i), o.reflect && kt(t, o.attribute, o.value, !!o.parse), Object.defineProperty(t, n, {
|
|
570
544
|
get() {
|
|
571
|
-
return
|
|
545
|
+
return o.value;
|
|
572
546
|
},
|
|
573
547
|
set(c) {
|
|
574
|
-
const f =
|
|
575
|
-
|
|
548
|
+
const f = o.value;
|
|
549
|
+
o.value = c, o.reflect && kt(this, o.attribute, o.value, !!o.parse);
|
|
576
550
|
for (let d = 0, l = this.__propertyChangedCallbacks.length; d < l; d++)
|
|
577
|
-
this.__propertyChangedCallbacks[d](
|
|
551
|
+
this.__propertyChangedCallbacks[d](n, c, f);
|
|
578
552
|
},
|
|
579
553
|
enumerable: !0,
|
|
580
554
|
configurable: !0
|
|
581
555
|
});
|
|
582
|
-
}),
|
|
556
|
+
}), r;
|
|
583
557
|
}
|
|
584
|
-
function
|
|
585
|
-
if (
|
|
558
|
+
function Lt(t) {
|
|
559
|
+
if (t)
|
|
586
560
|
try {
|
|
587
|
-
return JSON.parse(
|
|
561
|
+
return JSON.parse(t);
|
|
588
562
|
} catch {
|
|
589
|
-
return
|
|
563
|
+
return t;
|
|
590
564
|
}
|
|
591
565
|
}
|
|
592
|
-
function
|
|
593
|
-
if (
|
|
594
|
-
let
|
|
595
|
-
|
|
566
|
+
function kt(t, e, r, a) {
|
|
567
|
+
if (r == null || r === !1) return t.removeAttribute(e);
|
|
568
|
+
let n = a ? JSON.stringify(r) : r;
|
|
569
|
+
t.__updating[e] = !0, n === "true" && (n = ""), t.setAttribute(e, n), Promise.resolve().then(() => delete t.__updating[e]);
|
|
596
570
|
}
|
|
597
|
-
function
|
|
598
|
-
return
|
|
571
|
+
function pe(t) {
|
|
572
|
+
return t.replace(/\.?([A-Z]+)/g, (e, r) => "-" + r.toLowerCase()).replace("_", "-").replace(/^-/, "");
|
|
599
573
|
}
|
|
600
|
-
function
|
|
601
|
-
return
|
|
574
|
+
function zt(t) {
|
|
575
|
+
return t != null && (typeof t == "object" || typeof t == "function");
|
|
602
576
|
}
|
|
603
|
-
function
|
|
604
|
-
return Object.prototype.toString.call(
|
|
577
|
+
function _e(t) {
|
|
578
|
+
return Object.prototype.toString.call(t) === "[object Function]";
|
|
605
579
|
}
|
|
606
|
-
function
|
|
607
|
-
return typeof
|
|
580
|
+
function be(t) {
|
|
581
|
+
return typeof t == "function" && t.toString().indexOf("class") === 0;
|
|
608
582
|
}
|
|
609
|
-
let
|
|
610
|
-
function
|
|
611
|
-
const
|
|
612
|
-
return class extends
|
|
583
|
+
let dt;
|
|
584
|
+
function ve(t, e) {
|
|
585
|
+
const r = Object.keys(e);
|
|
586
|
+
return class extends t {
|
|
613
587
|
static get observedAttributes() {
|
|
614
|
-
return
|
|
588
|
+
return r.map((n) => e[n].attribute);
|
|
615
589
|
}
|
|
616
590
|
constructor() {
|
|
617
591
|
super(), this.__initialized = !1, this.__released = !1, this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props = {};
|
|
618
|
-
for (let
|
|
619
|
-
this[
|
|
592
|
+
for (let n of r)
|
|
593
|
+
this[n] = void 0;
|
|
620
594
|
}
|
|
621
595
|
connectedCallback() {
|
|
622
596
|
if (this.__initialized) return;
|
|
623
|
-
this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props =
|
|
624
|
-
const
|
|
597
|
+
this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props = ge(this, e);
|
|
598
|
+
const n = he(this.props), o = this.Component, s = dt;
|
|
625
599
|
try {
|
|
626
|
-
|
|
600
|
+
dt = this, this.__initialized = !0, be(o) ? new o(n, {
|
|
627
601
|
element: this
|
|
628
|
-
}) :
|
|
602
|
+
}) : o(n, {
|
|
629
603
|
element: this
|
|
630
604
|
});
|
|
631
605
|
} finally {
|
|
632
|
-
|
|
606
|
+
dt = s;
|
|
633
607
|
}
|
|
634
608
|
}
|
|
635
609
|
async disconnectedCallback() {
|
|
636
610
|
if (await Promise.resolve(), this.isConnected) return;
|
|
637
611
|
this.__propertyChangedCallbacks.length = 0;
|
|
638
|
-
let
|
|
639
|
-
for (;
|
|
612
|
+
let n = null;
|
|
613
|
+
for (; n = this.__releaseCallbacks.pop(); ) n(this);
|
|
640
614
|
delete this.__initialized, this.__released = !0;
|
|
641
615
|
}
|
|
642
|
-
attributeChangedCallback(
|
|
643
|
-
if (this.__initialized && !this.__updating[
|
|
644
|
-
if (
|
|
645
|
-
this[
|
|
616
|
+
attributeChangedCallback(n, o, s) {
|
|
617
|
+
if (this.__initialized && !this.__updating[n] && (n = this.lookupProp(n), n in e)) {
|
|
618
|
+
if (s == null && !this[n]) return;
|
|
619
|
+
this[n] = e[n].parse ? Lt(s) : s;
|
|
646
620
|
}
|
|
647
621
|
}
|
|
648
|
-
lookupProp(
|
|
649
|
-
if (
|
|
650
|
-
return
|
|
622
|
+
lookupProp(n) {
|
|
623
|
+
if (e)
|
|
624
|
+
return r.find((o) => n === o || n === e[o].attribute);
|
|
651
625
|
}
|
|
652
626
|
get renderRoot() {
|
|
653
627
|
return this.shadowRoot || this.attachShadow({
|
|
654
628
|
mode: "open"
|
|
655
629
|
});
|
|
656
630
|
}
|
|
657
|
-
addReleaseCallback(
|
|
658
|
-
this.__releaseCallbacks.push(
|
|
631
|
+
addReleaseCallback(n) {
|
|
632
|
+
this.__releaseCallbacks.push(n);
|
|
659
633
|
}
|
|
660
|
-
addPropertyChangedCallback(
|
|
661
|
-
this.__propertyChangedCallbacks.push(
|
|
634
|
+
addPropertyChangedCallback(n) {
|
|
635
|
+
this.__propertyChangedCallbacks.push(n);
|
|
662
636
|
}
|
|
663
637
|
};
|
|
664
638
|
}
|
|
665
|
-
function
|
|
639
|
+
function we(t, e = {}, r = {}) {
|
|
666
640
|
const {
|
|
667
|
-
BaseElement:
|
|
668
|
-
extension:
|
|
669
|
-
customElements:
|
|
670
|
-
} =
|
|
671
|
-
return (
|
|
672
|
-
let i =
|
|
673
|
-
return i ? (i.prototype.Component =
|
|
641
|
+
BaseElement: a = HTMLElement,
|
|
642
|
+
extension: n,
|
|
643
|
+
customElements: o = window.customElements
|
|
644
|
+
} = r;
|
|
645
|
+
return (s) => {
|
|
646
|
+
let i = o.get(t);
|
|
647
|
+
return i ? (i.prototype.Component = s, i) : (i = ve(a, de(e)), i.prototype.Component = s, i.prototype.registeredTag = t, o.define(t, i, n), i);
|
|
674
648
|
};
|
|
675
649
|
}
|
|
676
|
-
function
|
|
677
|
-
const
|
|
678
|
-
for (let
|
|
679
|
-
const [
|
|
680
|
-
Object.defineProperty(
|
|
681
|
-
get:
|
|
682
|
-
set(
|
|
683
|
-
|
|
650
|
+
function me(t) {
|
|
651
|
+
const e = Object.keys(t), r = {};
|
|
652
|
+
for (let a = 0; a < e.length; a++) {
|
|
653
|
+
const [n, o] = j(t[e[a]]);
|
|
654
|
+
Object.defineProperty(r, e[a], {
|
|
655
|
+
get: n,
|
|
656
|
+
set(s) {
|
|
657
|
+
o(() => s);
|
|
684
658
|
}
|
|
685
659
|
});
|
|
686
660
|
}
|
|
687
|
-
return
|
|
661
|
+
return r;
|
|
688
662
|
}
|
|
689
|
-
function
|
|
690
|
-
if (
|
|
691
|
-
let
|
|
692
|
-
for (;
|
|
693
|
-
|
|
694
|
-
return
|
|
695
|
-
}
|
|
696
|
-
function
|
|
697
|
-
return (
|
|
698
|
-
const { element:
|
|
699
|
-
return
|
|
700
|
-
const
|
|
701
|
-
|
|
702
|
-
|
|
663
|
+
function ye(t) {
|
|
664
|
+
if (t.assignedSlot && t.assignedSlot._$owner) return t.assignedSlot._$owner;
|
|
665
|
+
let e = t.parentNode;
|
|
666
|
+
for (; e && !e._$owner && !(e.assignedSlot && e.assignedSlot._$owner); )
|
|
667
|
+
e = e.parentNode;
|
|
668
|
+
return e && e.assignedSlot ? e.assignedSlot._$owner : t._$owner;
|
|
669
|
+
}
|
|
670
|
+
function xe(t) {
|
|
671
|
+
return (e, r) => {
|
|
672
|
+
const { element: a } = r;
|
|
673
|
+
return tt((n) => {
|
|
674
|
+
const o = me(e);
|
|
675
|
+
a.addPropertyChangedCallback((i, c) => o[i] = c), a.addReleaseCallback(() => {
|
|
676
|
+
a.renderRoot.textContent = "", n();
|
|
703
677
|
});
|
|
704
|
-
const
|
|
705
|
-
return
|
|
706
|
-
},
|
|
678
|
+
const s = t(o, r);
|
|
679
|
+
return p(a.renderRoot, s);
|
|
680
|
+
}, ye(a));
|
|
707
681
|
};
|
|
708
682
|
}
|
|
709
|
-
function
|
|
710
|
-
return arguments.length === 2 && (
|
|
711
|
-
}
|
|
712
|
-
function
|
|
713
|
-
const [
|
|
714
|
-
return
|
|
715
|
-
}
|
|
716
|
-
const
|
|
717
|
-
function
|
|
718
|
-
const [
|
|
719
|
-
|
|
720
|
-
},
|
|
721
|
-
document.fullscreenElement ? document.exitFullscreen() :
|
|
722
|
-
},
|
|
723
|
-
|
|
724
|
-
},
|
|
725
|
-
|
|
726
|
-
},
|
|
727
|
-
|
|
728
|
-
},
|
|
729
|
-
|
|
730
|
-
...
|
|
731
|
-
name:
|
|
683
|
+
function ke(t, e, r) {
|
|
684
|
+
return arguments.length === 2 && (r = e, e = {}), we(t, e)(xe(r));
|
|
685
|
+
}
|
|
686
|
+
function D(t) {
|
|
687
|
+
const [e, r] = j(t.peek(), { equals: !1 }), a = t.subscribe((n) => r(() => n));
|
|
688
|
+
return ut(() => a()), e;
|
|
689
|
+
}
|
|
690
|
+
const st = Jt();
|
|
691
|
+
function Ce(t) {
|
|
692
|
+
const [e, r] = j("no-url"), [a, n] = j(!1), o = D(t.moqWatch.audio.muted), [s, i] = j(0), c = D(t.moqWatch.video.stalled), f = D(t.moqWatch.jitter), [d, l] = j([]), M = D(t.moqWatch.video.source.track), [$, _] = j(!1), [h, E] = j(!!document.fullscreenElement), P = () => {
|
|
693
|
+
t.moqWatch.paused.set(!t.moqWatch.paused.get());
|
|
694
|
+
}, b = () => {
|
|
695
|
+
document.fullscreenElement ? document.exitFullscreen() : t.moqWatch.requestFullscreen();
|
|
696
|
+
}, v = (S) => {
|
|
697
|
+
t.moqWatch.audio.volume.set(S / 100);
|
|
698
|
+
}, m = () => {
|
|
699
|
+
t.moqWatch.audio.muted.update((S) => !S);
|
|
700
|
+
}, q = (S) => {
|
|
701
|
+
t.moqWatch.jitter.set(S);
|
|
702
|
+
}, B = (S) => {
|
|
703
|
+
t.moqWatch.video.source.target.update((N) => ({
|
|
704
|
+
...N,
|
|
705
|
+
name: S
|
|
732
706
|
}));
|
|
733
|
-
},
|
|
734
|
-
moqWatch:
|
|
735
|
-
watchStatus:
|
|
736
|
-
togglePlayback:
|
|
737
|
-
isPlaying:
|
|
738
|
-
setVolume:
|
|
739
|
-
isMuted:
|
|
740
|
-
currentVolume:
|
|
741
|
-
toggleMuted:
|
|
742
|
-
buffering:
|
|
743
|
-
jitter:
|
|
744
|
-
setJitter:
|
|
745
|
-
availableRenditions:
|
|
746
|
-
activeRendition:
|
|
747
|
-
setActiveRendition:
|
|
748
|
-
isStatsPanelVisible:
|
|
749
|
-
setIsStatsPanelVisible:
|
|
750
|
-
isFullscreen:
|
|
751
|
-
toggleFullscreen:
|
|
752
|
-
timestamp:
|
|
753
|
-
videoBuffered:
|
|
754
|
-
audioBuffered:
|
|
755
|
-
},
|
|
756
|
-
|
|
757
|
-
const
|
|
758
|
-
|
|
759
|
-
}),
|
|
760
|
-
const
|
|
761
|
-
|
|
762
|
-
}),
|
|
763
|
-
const
|
|
764
|
-
|
|
765
|
-
}),
|
|
766
|
-
const
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
d(k);
|
|
771
|
-
}), z.effect((h) => {
|
|
772
|
-
const k = h.get(W.jitter);
|
|
773
|
-
R(k);
|
|
774
|
-
}), z.effect((h) => {
|
|
775
|
-
const X = h.get(W.video.source.catalog)?.renditions ?? {}, Z = Object.entries(X).map(([Ue, ve]) => ({
|
|
776
|
-
name: Ue,
|
|
777
|
-
width: ve.codedWidth,
|
|
778
|
-
height: ve.codedHeight
|
|
707
|
+
}, y = D(t.moqWatch.video.timestamp), O = D(t.moqWatch.video.buffered), I = D(t.moqWatch.audio.buffered), x = {
|
|
708
|
+
moqWatch: t.moqWatch,
|
|
709
|
+
watchStatus: e,
|
|
710
|
+
togglePlayback: P,
|
|
711
|
+
isPlaying: a,
|
|
712
|
+
setVolume: v,
|
|
713
|
+
isMuted: o,
|
|
714
|
+
currentVolume: s,
|
|
715
|
+
toggleMuted: m,
|
|
716
|
+
buffering: c,
|
|
717
|
+
jitter: f,
|
|
718
|
+
setJitter: q,
|
|
719
|
+
availableRenditions: d,
|
|
720
|
+
activeRendition: M,
|
|
721
|
+
setActiveRendition: B,
|
|
722
|
+
isStatsPanelVisible: $,
|
|
723
|
+
setIsStatsPanelVisible: _,
|
|
724
|
+
isFullscreen: h,
|
|
725
|
+
toggleFullscreen: b,
|
|
726
|
+
timestamp: y,
|
|
727
|
+
videoBuffered: O,
|
|
728
|
+
audioBuffered: I
|
|
729
|
+
}, C = t.moqWatch, k = new It.Effect();
|
|
730
|
+
k.run((S) => {
|
|
731
|
+
const N = S.get(C.connection.url), J = S.get(C.connection.status), Q = S.get(C.broadcast.status);
|
|
732
|
+
N ? J === "disconnected" ? r("disconnected") : J === "connecting" ? r("connecting") : Q === "offline" ? r("offline") : Q === "loading" ? r("loading") : Q === "live" ? r("live") : J === "connected" && r("connected") : r("no-url");
|
|
733
|
+
}), k.run((S) => {
|
|
734
|
+
const N = S.get(C.paused);
|
|
735
|
+
n(!N);
|
|
736
|
+
}), k.run((S) => {
|
|
737
|
+
const N = S.get(C.audio.volume);
|
|
738
|
+
i(N * 100);
|
|
739
|
+
}), k.run((S) => {
|
|
740
|
+
const J = S.get(C.video.source.catalog)?.renditions ?? {}, Q = Object.entries(J).map(([Rt, vt]) => ({
|
|
741
|
+
name: Rt,
|
|
742
|
+
width: vt.codedWidth,
|
|
743
|
+
height: vt.codedHeight
|
|
779
744
|
}));
|
|
780
|
-
|
|
781
|
-
}), z.effect((h) => {
|
|
782
|
-
const k = h.get(W.video.source.track);
|
|
783
|
-
p(k);
|
|
745
|
+
l(Q);
|
|
784
746
|
});
|
|
785
|
-
const
|
|
786
|
-
|
|
747
|
+
const G = () => {
|
|
748
|
+
E(!!document.fullscreenElement);
|
|
787
749
|
};
|
|
788
|
-
return
|
|
789
|
-
value:
|
|
750
|
+
return k.event(document, "fullscreenchange", G), ut(() => k.close()), u(st.Provider, {
|
|
751
|
+
value: x,
|
|
790
752
|
get children() {
|
|
791
|
-
return
|
|
753
|
+
return t.children;
|
|
792
754
|
}
|
|
793
755
|
});
|
|
794
756
|
}
|
|
795
|
-
function
|
|
796
|
-
const
|
|
797
|
-
if (!
|
|
757
|
+
function K() {
|
|
758
|
+
const t = qt(st);
|
|
759
|
+
if (!t)
|
|
798
760
|
throw new Error("useWatchUIContext must be used within a WatchUIContextProvider");
|
|
799
|
-
return
|
|
761
|
+
return t;
|
|
800
762
|
}
|
|
801
|
-
var
|
|
802
|
-
function
|
|
803
|
-
const
|
|
804
|
-
return u(
|
|
763
|
+
var Se = /* @__PURE__ */ W('<div class="watch-ui__buffering flex--center"><div class=watch-ui__buffering-spinner>');
|
|
764
|
+
function $e() {
|
|
765
|
+
const t = K();
|
|
766
|
+
return u(L, {
|
|
805
767
|
get when() {
|
|
806
|
-
return
|
|
768
|
+
return t.buffering();
|
|
807
769
|
},
|
|
808
770
|
get children() {
|
|
809
|
-
return
|
|
771
|
+
return Se();
|
|
810
772
|
}
|
|
811
773
|
});
|
|
812
774
|
}
|
|
813
|
-
var
|
|
814
|
-
const
|
|
815
|
-
function
|
|
816
|
-
const
|
|
817
|
-
const
|
|
775
|
+
var Ae = /* @__PURE__ */ W('<div class=watch-ui__buffer><div role=slider tabindex=0 aria-label="Buffer jitter"><div class=watch-ui__buffer-playhead></div><div class="watch-ui__buffer-track watch-ui__buffer-track--video"><span class=watch-ui__buffer-track-label>Video</span></div><div class="watch-ui__buffer-track watch-ui__buffer-track--audio"><span class=watch-ui__buffer-track-label>Audio</span></div><div class=watch-ui__buffer-target-area><div class=watch-ui__buffer-target-line><span class=watch-ui__buffer-target-label>'), Ct = /* @__PURE__ */ W("<span class=watch-ui__buffer-overflow-label>s"), St = /* @__PURE__ */ W("<div class=watch-ui__buffer-range>");
|
|
776
|
+
const $t = 0, At = 100;
|
|
777
|
+
function Ee(t) {
|
|
778
|
+
const e = K(), r = () => t.max ?? 5e3, [a, n] = j(!1), o = (_, h, E) => {
|
|
779
|
+
const P = _.start - h, b = _.end - h, v = Math.max(0, P), m = Math.min(b, r()), q = v / r() * 100, B = Math.max(0.5, (m - v) / r() * 100), y = b > r(), O = y ? Nt.Time.Milli.toSecond(b - v).toFixed(1) : null;
|
|
818
780
|
return {
|
|
819
|
-
style: `left: ${q}%; width: ${
|
|
820
|
-
isOverflow:
|
|
821
|
-
overflowSec:
|
|
781
|
+
style: `left: ${q}%; width: ${B}%; background: ${E};`,
|
|
782
|
+
isOverflow: y,
|
|
783
|
+
overflowSec: O
|
|
822
784
|
};
|
|
823
|
-
},
|
|
785
|
+
}, s = (_, h) => h ? "#f87171" : _ > 0 ? "#facc15" : "#4ade80", i = U(() => e.jitter() / r() * 100);
|
|
824
786
|
let c;
|
|
825
787
|
const f = 48, d = (_) => {
|
|
826
788
|
if (!c) return;
|
|
827
|
-
const
|
|
828
|
-
|
|
789
|
+
const h = c.getBoundingClientRect(), E = h.width - f, b = Math.max(0, Math.min(_ - h.left - f, E)) / E * r(), v = Math.round(b / At) * At, m = Math.max($t, Math.min(r(), v));
|
|
790
|
+
e.setJitter(m);
|
|
829
791
|
}, l = (_) => {
|
|
830
|
-
|
|
831
|
-
},
|
|
832
|
-
|
|
833
|
-
},
|
|
834
|
-
|
|
792
|
+
n(!0), d(_.clientX), document.addEventListener("mousemove", M), document.addEventListener("mouseup", $);
|
|
793
|
+
}, M = (_) => {
|
|
794
|
+
a() && d(_.clientX);
|
|
795
|
+
}, $ = () => {
|
|
796
|
+
n(!1), document.removeEventListener("mousemove", M), document.removeEventListener("mouseup", $);
|
|
835
797
|
};
|
|
836
|
-
return
|
|
837
|
-
document.removeEventListener("mousemove",
|
|
798
|
+
return ut(() => {
|
|
799
|
+
document.removeEventListener("mousemove", M), document.removeEventListener("mouseup", $);
|
|
838
800
|
}), (() => {
|
|
839
|
-
var _ =
|
|
840
|
-
|
|
841
|
-
var
|
|
842
|
-
|
|
843
|
-
var
|
|
844
|
-
|
|
845
|
-
var
|
|
846
|
-
return typeof
|
|
801
|
+
var _ = Ae(), h = _.firstChild, E = h.firstChild, P = E.nextSibling;
|
|
802
|
+
P.firstChild;
|
|
803
|
+
var b = P.nextSibling;
|
|
804
|
+
b.firstChild;
|
|
805
|
+
var v = b.nextSibling, m = v.firstChild, q = m.firstChild;
|
|
806
|
+
h.$$mousedown = l;
|
|
807
|
+
var B = c;
|
|
808
|
+
return typeof B == "function" ? ce(B, h) : c = h, et(h, "aria-valuemin", $t), p(P, u(gt, {
|
|
847
809
|
get each() {
|
|
848
|
-
return
|
|
810
|
+
return e.videoBuffered();
|
|
849
811
|
},
|
|
850
|
-
children: (
|
|
851
|
-
const
|
|
852
|
-
const
|
|
853
|
-
return
|
|
812
|
+
children: (y, O) => {
|
|
813
|
+
const I = () => {
|
|
814
|
+
const x = e.timestamp();
|
|
815
|
+
return x === void 0 ? null : o(y, x, s(O(), e.buffering()));
|
|
854
816
|
};
|
|
855
|
-
return u(
|
|
817
|
+
return u(L, {
|
|
856
818
|
get when() {
|
|
857
|
-
return
|
|
819
|
+
return I();
|
|
858
820
|
},
|
|
859
|
-
children: (
|
|
860
|
-
var
|
|
861
|
-
return
|
|
821
|
+
children: (x) => (() => {
|
|
822
|
+
var C = St();
|
|
823
|
+
return p(C, u(L, {
|
|
862
824
|
get when() {
|
|
863
|
-
return
|
|
825
|
+
return x().isOverflow;
|
|
864
826
|
},
|
|
865
827
|
get children() {
|
|
866
|
-
var
|
|
867
|
-
return
|
|
828
|
+
var k = Ct(), G = k.firstChild;
|
|
829
|
+
return p(k, () => x().overflowSec, G), k;
|
|
868
830
|
}
|
|
869
|
-
})),
|
|
831
|
+
})), T((k) => yt(C, x().style, k)), C;
|
|
870
832
|
})()
|
|
871
833
|
});
|
|
872
834
|
}
|
|
873
|
-
}), null), b
|
|
835
|
+
}), null), p(b, u(gt, {
|
|
874
836
|
get each() {
|
|
875
|
-
return
|
|
837
|
+
return e.audioBuffered();
|
|
876
838
|
},
|
|
877
|
-
children: (
|
|
878
|
-
const
|
|
879
|
-
const
|
|
880
|
-
return
|
|
839
|
+
children: (y, O) => {
|
|
840
|
+
const I = () => {
|
|
841
|
+
const x = e.timestamp();
|
|
842
|
+
return x === void 0 ? null : o(y, x, s(O(), e.buffering()));
|
|
881
843
|
};
|
|
882
|
-
return u(
|
|
844
|
+
return u(L, {
|
|
883
845
|
get when() {
|
|
884
|
-
return
|
|
846
|
+
return I();
|
|
885
847
|
},
|
|
886
|
-
children: (
|
|
887
|
-
var
|
|
888
|
-
return
|
|
848
|
+
children: (x) => (() => {
|
|
849
|
+
var C = St();
|
|
850
|
+
return p(C, u(L, {
|
|
889
851
|
get when() {
|
|
890
|
-
return
|
|
852
|
+
return x().isOverflow;
|
|
891
853
|
},
|
|
892
854
|
get children() {
|
|
893
|
-
var
|
|
894
|
-
return
|
|
855
|
+
var k = Ct(), G = k.firstChild;
|
|
856
|
+
return p(k, () => x().overflowSec, G), k;
|
|
895
857
|
}
|
|
896
|
-
})),
|
|
858
|
+
})), T((k) => yt(C, x().style, k)), C;
|
|
897
859
|
})()
|
|
898
860
|
});
|
|
899
861
|
}
|
|
900
|
-
}), null),
|
|
901
|
-
var
|
|
902
|
-
return
|
|
862
|
+
}), null), p(q, () => `${Math.round(e.jitter())}ms`), T((y) => {
|
|
863
|
+
var O = `watch-ui__buffer-visualization ${a() ? "watch-ui__buffer-visualization--dragging" : ""}`, I = e.jitter(), x = r(), C = `${i()}%`;
|
|
864
|
+
return O !== y.e && pt(h, y.e = O), I !== y.t && et(h, "aria-valuenow", y.t = I), x !== y.a && et(h, "aria-valuemax", y.a = x), C !== y.o && le(m, "left", y.o = C), y;
|
|
903
865
|
}, {
|
|
904
866
|
e: void 0,
|
|
905
867
|
t: void 0,
|
|
@@ -908,213 +870,216 @@ function Vt(e) {
|
|
|
908
870
|
}), _;
|
|
909
871
|
})();
|
|
910
872
|
}
|
|
911
|
-
|
|
912
|
-
function
|
|
913
|
-
const
|
|
914
|
-
return u(
|
|
873
|
+
se(["mousedown"]);
|
|
874
|
+
function Pe() {
|
|
875
|
+
const t = K();
|
|
876
|
+
return u(lt, {
|
|
915
877
|
title: "Fullscreen",
|
|
916
878
|
onClick: () => {
|
|
917
|
-
|
|
879
|
+
t.toggleFullscreen();
|
|
918
880
|
},
|
|
919
881
|
get children() {
|
|
920
|
-
return u(
|
|
882
|
+
return u(L, {
|
|
921
883
|
get when() {
|
|
922
|
-
return
|
|
884
|
+
return t.isFullscreen();
|
|
923
885
|
},
|
|
924
886
|
get fallback() {
|
|
925
|
-
return u(
|
|
887
|
+
return u(V.FullscreenEnter, {});
|
|
926
888
|
},
|
|
927
889
|
get children() {
|
|
928
|
-
return u(
|
|
890
|
+
return u(V.FullscreenExit, {});
|
|
929
891
|
}
|
|
930
892
|
});
|
|
931
893
|
}
|
|
932
894
|
});
|
|
933
895
|
}
|
|
934
|
-
function
|
|
935
|
-
const
|
|
936
|
-
return u(
|
|
896
|
+
function Me() {
|
|
897
|
+
const t = K();
|
|
898
|
+
return u(lt, {
|
|
937
899
|
get title() {
|
|
938
|
-
return
|
|
900
|
+
return t.isPlaying() ? "Pause" : "Play";
|
|
939
901
|
},
|
|
940
902
|
class: "button--playback",
|
|
941
903
|
onClick: () => {
|
|
942
|
-
|
|
904
|
+
t.togglePlayback();
|
|
943
905
|
},
|
|
944
906
|
get children() {
|
|
945
|
-
return u(
|
|
907
|
+
return u(L, {
|
|
946
908
|
get when() {
|
|
947
|
-
return
|
|
909
|
+
return t.isPlaying();
|
|
948
910
|
},
|
|
949
911
|
get fallback() {
|
|
950
|
-
return u(
|
|
912
|
+
return u(V.Play, {});
|
|
951
913
|
},
|
|
952
914
|
get children() {
|
|
953
|
-
return u(
|
|
915
|
+
return u(V.Pause, {});
|
|
954
916
|
}
|
|
955
917
|
});
|
|
956
918
|
}
|
|
957
919
|
});
|
|
958
920
|
}
|
|
959
|
-
var
|
|
960
|
-
function
|
|
961
|
-
const
|
|
962
|
-
const
|
|
963
|
-
|
|
921
|
+
var qe = /* @__PURE__ */ W("<div class=watch-ui__quality-selector><label for=quality-select class=watch-ui__quality-label>Quality: </label><select id=quality-select class=watch-ui__quality-select><option value>Auto"), je = /* @__PURE__ */ W("<option>");
|
|
922
|
+
function Te() {
|
|
923
|
+
const t = K(), e = (r) => {
|
|
924
|
+
const a = r.currentTarget.value || void 0;
|
|
925
|
+
t.setActiveRendition(a);
|
|
964
926
|
};
|
|
965
927
|
return (() => {
|
|
966
|
-
var
|
|
967
|
-
return
|
|
928
|
+
var r = qe(), a = r.firstChild, n = a.nextSibling;
|
|
929
|
+
return n.firstChild, n.addEventListener("change", e), p(n, u(gt, {
|
|
968
930
|
get each() {
|
|
969
|
-
return
|
|
931
|
+
return t.availableRenditions() ?? [];
|
|
970
932
|
},
|
|
971
|
-
children: (
|
|
972
|
-
var
|
|
973
|
-
return
|
|
974
|
-
var i =
|
|
975
|
-
return () => i() ? ` (${
|
|
976
|
-
})(), null),
|
|
933
|
+
children: (o) => (() => {
|
|
934
|
+
var s = je();
|
|
935
|
+
return p(s, () => o.name, null), p(s, (() => {
|
|
936
|
+
var i = oe(() => !!(o.width && o.height));
|
|
937
|
+
return () => i() ? ` (${o.width}x${o.height})` : "";
|
|
938
|
+
})(), null), T(() => s.value = o.name), s;
|
|
977
939
|
})()
|
|
978
|
-
}), null),
|
|
940
|
+
}), null), T(() => n.value = t.activeRendition() ?? ""), r;
|
|
979
941
|
})();
|
|
980
942
|
}
|
|
981
|
-
function
|
|
982
|
-
const
|
|
983
|
-
return u(
|
|
943
|
+
function We() {
|
|
944
|
+
const t = K();
|
|
945
|
+
return u(lt, {
|
|
984
946
|
get title() {
|
|
985
|
-
return
|
|
947
|
+
return t.isStatsPanelVisible() ? "Hide stats" : "Show stats";
|
|
986
948
|
},
|
|
987
949
|
onClick: () => {
|
|
988
|
-
|
|
950
|
+
t.setIsStatsPanelVisible(!t.isStatsPanelVisible());
|
|
989
951
|
},
|
|
990
952
|
get children() {
|
|
991
|
-
return u(
|
|
953
|
+
return u(V.Stats, {});
|
|
992
954
|
}
|
|
993
955
|
});
|
|
994
956
|
}
|
|
995
|
-
var
|
|
996
|
-
const
|
|
997
|
-
function
|
|
998
|
-
const [
|
|
999
|
-
const
|
|
1000
|
-
|
|
957
|
+
var Oe = /* @__PURE__ */ W('<div class="watch-ui__volume-slider flex--center"><input type=range min=0 max=100><span class=watch-ui__volume-label>');
|
|
958
|
+
const Ve = (t, e) => e || t === 0 ? u(V.Mute, {}) : t > 0 && t <= 33 ? u(V.VolumeLow, {}) : t > 33 && t <= 66 ? u(V.VolumeMedium, {}) : u(V.VolumeHigh, {});
|
|
959
|
+
function Le() {
|
|
960
|
+
const [t, e] = j(0), r = K(), a = (n) => {
|
|
961
|
+
const o = n.currentTarget, s = parseFloat(o.value);
|
|
962
|
+
r.setVolume(s);
|
|
1001
963
|
};
|
|
1002
|
-
return
|
|
1003
|
-
const
|
|
1004
|
-
|
|
964
|
+
return Mt(() => {
|
|
965
|
+
const n = r.currentVolume() || 0;
|
|
966
|
+
e(Math.round(n));
|
|
1005
967
|
}), (() => {
|
|
1006
|
-
var
|
|
1007
|
-
return
|
|
968
|
+
var n = Oe(), o = n.firstChild, s = o.nextSibling;
|
|
969
|
+
return p(n, u(lt, {
|
|
1008
970
|
get title() {
|
|
1009
|
-
return
|
|
971
|
+
return r.isMuted() ? "Unmute" : "Mute";
|
|
1010
972
|
},
|
|
1011
|
-
onClick: () =>
|
|
973
|
+
onClick: () => r.toggleMuted(),
|
|
1012
974
|
get children() {
|
|
1013
|
-
return
|
|
975
|
+
return Ve(r.currentVolume(), r.isMuted());
|
|
1014
976
|
}
|
|
1015
|
-
}),
|
|
977
|
+
}), o), o.addEventListener("change", a), p(s, t), T(() => o.value = r.currentVolume()), n;
|
|
1016
978
|
})();
|
|
1017
979
|
}
|
|
1018
|
-
var
|
|
1019
|
-
|
|
1020
|
-
|
|
980
|
+
var ze = /* @__PURE__ */ W('<div class="watch-ui__status-indicator flex--center"><span></span><span>');
|
|
981
|
+
const Re = {
|
|
982
|
+
"no-url": {
|
|
983
|
+
variant: "error",
|
|
984
|
+
text: "No URL"
|
|
985
|
+
},
|
|
986
|
+
disconnected: {
|
|
987
|
+
variant: "error",
|
|
988
|
+
text: "Disconnected"
|
|
989
|
+
},
|
|
990
|
+
connecting: {
|
|
991
|
+
variant: "connecting",
|
|
992
|
+
text: "Connecting..."
|
|
993
|
+
},
|
|
994
|
+
offline: {
|
|
995
|
+
variant: "error",
|
|
996
|
+
text: "Offline"
|
|
997
|
+
},
|
|
998
|
+
loading: {
|
|
999
|
+
variant: "loading",
|
|
1000
|
+
text: "Loading..."
|
|
1001
|
+
},
|
|
1002
|
+
live: {
|
|
1003
|
+
variant: "live",
|
|
1004
|
+
text: "Live"
|
|
1005
|
+
},
|
|
1006
|
+
connected: {
|
|
1007
|
+
variant: "connected",
|
|
1008
|
+
text: "Connected"
|
|
1009
|
+
}
|
|
1010
|
+
}, Be = {
|
|
1011
|
+
variant: "error",
|
|
1012
|
+
text: "Unknown"
|
|
1013
|
+
};
|
|
1014
|
+
function Ie() {
|
|
1015
|
+
const t = K(), e = () => {
|
|
1016
|
+
const r = t.watchStatus();
|
|
1017
|
+
return Re[r] || Be;
|
|
1018
|
+
};
|
|
1021
1019
|
return (() => {
|
|
1022
|
-
var
|
|
1023
|
-
return
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
}), u(G, {
|
|
1031
|
-
get when() {
|
|
1032
|
-
return e.watchStatus() === "disconnected";
|
|
1033
|
-
},
|
|
1034
|
-
children: "🔴 Disconnected"
|
|
1035
|
-
}), u(G, {
|
|
1036
|
-
get when() {
|
|
1037
|
-
return e.watchStatus() === "connecting";
|
|
1038
|
-
},
|
|
1039
|
-
children: "🟡 Connecting..."
|
|
1040
|
-
}), u(G, {
|
|
1041
|
-
get when() {
|
|
1042
|
-
return e.watchStatus() === "offline";
|
|
1043
|
-
},
|
|
1044
|
-
children: "🔴 Offline"
|
|
1045
|
-
}), u(G, {
|
|
1046
|
-
get when() {
|
|
1047
|
-
return e.watchStatus() === "loading";
|
|
1048
|
-
},
|
|
1049
|
-
children: "🟡 Loading..."
|
|
1050
|
-
}), u(G, {
|
|
1051
|
-
get when() {
|
|
1052
|
-
return e.watchStatus() === "live";
|
|
1053
|
-
},
|
|
1054
|
-
children: "🟢 Live"
|
|
1055
|
-
}), u(G, {
|
|
1056
|
-
get when() {
|
|
1057
|
-
return e.watchStatus() === "connected";
|
|
1058
|
-
},
|
|
1059
|
-
children: "🟢 Connected"
|
|
1060
|
-
})];
|
|
1061
|
-
}
|
|
1062
|
-
})), t;
|
|
1020
|
+
var r = ze(), a = r.firstChild, n = a.nextSibling;
|
|
1021
|
+
return p(n, () => e().text), T((o) => {
|
|
1022
|
+
var s = `watch-ui__status-indicator-dot watch-ui__status-indicator-dot--${e().variant}`, i = `watch-ui__status-indicator-text watch-ui__status-indicator-text--${e().variant}`;
|
|
1023
|
+
return s !== o.e && pt(a, o.e = s), i !== o.t && pt(n, o.t = i), o;
|
|
1024
|
+
}, {
|
|
1025
|
+
e: void 0,
|
|
1026
|
+
t: void 0
|
|
1027
|
+
}), r;
|
|
1063
1028
|
})();
|
|
1064
1029
|
}
|
|
1065
|
-
var
|
|
1066
|
-
function
|
|
1030
|
+
var Ne = /* @__PURE__ */ W('<div class=watch-ui__controls><div class="watch-ui__playback-controls flex--align-center"></div><div class=watch-ui__latency-controls>');
|
|
1031
|
+
function Ue() {
|
|
1067
1032
|
return (() => {
|
|
1068
|
-
var
|
|
1069
|
-
return
|
|
1033
|
+
var t = Ne(), e = t.firstChild, r = e.nextSibling;
|
|
1034
|
+
return p(e, u(Me, {}), null), p(e, u(Le, {}), null), p(e, u(Ie, {}), null), p(e, u(We, {}), null), p(e, u(Pe, {}), null), p(r, u(Ee, {}), null), p(r, u(Te, {}), null), t;
|
|
1070
1035
|
})();
|
|
1071
1036
|
}
|
|
1072
|
-
const Ht = ':host{--color-white: #ffffff;--color-white-alpha-05: rgba(255, 255, 255, .05);--color-white-alpha-10: rgba(255, 255, 255, .1);--color-white-alpha-20: rgba(255, 255, 255, .2);--color-white-alpha-25: rgba(255, 255, 255, .25);--color-white-alpha-30: rgba(255, 255, 255, .3);--color-white-alpha-70: rgba(255, 255, 255, .7);--color-white-alpha-90: rgba(255, 255, 255, .9);--color-gray-100: #9ca3af;--color-blue-400: #00dfff;--color-blue-500: #52a1ff;--color-blue-900: #1b3243;--color-purple-400: #a855f7;--color-purple-500: #c27bff;--color-purple-900: #31144a;--color-green-400: #65ee2e;--color-green-900: #3d4928;--color-yellow-400: #facc15;--color-orange-300: rgb(253, 186, 116);--color-orange-400: #ff9900;--color-orange-500: #f97316;--color-orange-900: #4d301b;--color-amber-600: #d97706;--color-amber-600-alpha-20: rgba(217, 119, 6, .2);--color-amber-600-alpha-30: rgba(217, 119, 6, .3);--color-orange-400-alpha-20: rgba(255, 153, 0, .2);--color-orange-500-alpha-30: rgba(249, 115, 22, .3);--color-orange-500-alpha-40: rgba(249, 115, 22, .4);--color-orange-500-alpha-50: rgba(249, 115, 22, .5);--color-orange-500-alpha-60: rgba(249, 115, 22, .6);--color-orange-500-alpha-80: rgba(249, 115, 22, .8);--color-red-300: rgb(252, 165, 165);--color-red-400-alpha-25: rgba(248, 113, 113, .25);--color-red-500-alpha-25: rgba(239, 68, 68, .25);--color-red-500-alpha-45: rgba(239, 68, 68, .45);--color-red-500-alpha-60: rgba(239, 68, 68, .6);--color-red-600-alpha-25: rgba(220, 38, 38, .25);--color-red-900-alpha-35: rgba(127, 29, 29, .35);--color-red: #e60000;--color-black-alpha-8: rgba(0, 0, 0, .08);--color-black-alpha-10: rgba(0, 0, 0, .1);--color-black-alpha-60: rgba(0, 0, 0, .6);--color-black-alpha-85: rgba(0, 0, 0, .85);--color-black: #000000;--spacing-1: .0625rem;--spacing-2: .125rem;--spacing-4: .25rem;--spacing-8: .5rem;--spacing-12: .75rem;--spacing-16: 1rem;--spacing-24: 1.5rem;--spacing-48: 3rem;--border-radius-sm: .5rem;--border-radius-md: .75rem;--border-radius-lg: 1rem}:is(.flex--center){display:flex;justify-content:center;align-items:center}:is(.flex--align-center){align-items:center}:is(.flex--space-between){justify-content:space-between}.button{color:var(--color-white);cursor:pointer;background-color:var(--color-white-alpha-10);border:var(--spacing-1) solid var(--color-white-alpha-20);border-radius:50%;width:2.25rem;height:2.25rem;transform-origin:center;transition:transform .1s cubic-bezier(.4,0,.2,1)}.button:hover:not(:disabled){transform:scale(1.02);color:var(--color-white);background-color:var(--color-white-alpha-20);box-shadow:0 var(--spacing-2) var(--spacing-8) var(--color-black-alpha-10)}.button:active:not(:disabled){transform:scale(.98);box-shadow:0 var(--spacing-1) var(--spacing-4) var(--color-black-alpha-8)}.button:disabled{opacity:.5;cursor:default;color:var(--color-gray-100)}.stats{display:flex;align-items:center;justify-content:center;position:absolute;inset:0;pointer-events:none;z-index:2;width:100%;height:inherit;container-type:inline-size}.stats .stats__panel{position:absolute;display:flex;align-items:flex-start;justify-content:center;flex-direction:row;flex-wrap:wrap;gap:var(--spacing-12);max-width:240px;width:100%;background-color:var(--color-black-alpha-85);border:1px solid var(--color-white-alpha-25);border-radius:8px;padding:var(--spacing-12);pointer-events:auto;top:8px}@container (width > 480px) and (width <= 768px){.stats .stats__panel{max-width:360px;padding:var(--spacing-24)}}@container (width > 768px){.stats .stats__panel{max-width:600px;padding:var(--spacing-24)}}.stats .stats__panel .stats__item{display:flex;align-items:flex-start;justify-content:flex-start;flex-direction:row;height:auto;column-gap:var(--spacing-8);flex-basis:calc(50% - var(--spacing-12));flex-grow:1;flex-shrink:1}@container (width > 480px){.stats .stats__panel .stats__item{flex-basis:calc(25% - var(--spacing-12))}}.stats .stats__panel .stats__item .stats__icon-wrapper{display:none;padding:var(--spacing-8);border-radius:8px;width:fit-content;height:fit-content;flex-shrink:0}@container (width > 480px){.stats .stats__panel .stats__item .stats__icon-wrapper{width:24px;height:24px;display:flex;align-items:center;justify-content:center;flex-direction:row}}.stats .stats__panel .stats__item .stats__icon-wrapper svg{width:100%;height:100%}.stats .stats__panel .stats__item.stats__item--network .stats__icon-wrapper{background-color:var(--color-blue-900)}.stats .stats__panel .stats__item.stats__item--network,.stats .stats__panel .stats__item.stats__item--network .stats__item-data{color:var(--color-blue-400)}.stats .stats__panel .stats__item.stats__item--video .stats__icon-wrapper{background-color:var(--color-purple-900)}.stats .stats__panel .stats__item.stats__item--video,.stats .stats__panel .stats__item.stats__item--video .stats__item-data{color:var(--color-purple-400)}.stats .stats__panel .stats__item.stats__item--audio .stats__icon-wrapper{background-color:var(--color-green-900)}.stats .stats__panel .stats__item.stats__item--audio,.stats .stats__panel .stats__item.stats__item--audio .stats__item-data{color:var(--color-green-400)}.stats .stats__panel .stats__item.stats__item--buffer .stats__icon-wrapper{background-color:var(--color-orange-900)}.stats .stats__panel .stats__item.stats__item--buffer,.stats .stats__panel .stats__item.stats__item--buffer .stats__item-data{color:var(--color-orange-400)}.stats .stats__panel .stats__item .stats__item-detail{display:flex;align-items:flex-start;justify-content:space-evenly;flex-direction:column;gap:var(--spacing-4)}.stats .stats__panel .stats__item .stats__item-detail .stats__item-title{font-size:12px;font-weight:500;text-transform:capitalize;color:var(--color-gray-100);font-family:Segoe UI,Roboto,sans-serif;letter-spacing:1px;line-height:12px}.stats .stats__panel .stats__item .stats__item-detail .stats__item-data{font-size:16px;font-weight:700;font-family:Segoe UI,Roboto,sans-serif;white-space:pre-wrap;line-height:1.5}:root{--buffer-green: #4ade80;--buffer-yellow: #facc15;--buffer-red: #f87171}.watchVideoContainer{display:block;position:relative;width:100%;height:auto;border-radius:4px;margin:0 auto;pointer-events:none}.watchControlsContainer{display:flex;flex-direction:column}.button.button--playback{width:3rem;height:3rem;background:linear-gradient(to bottom right,var(--color-orange-400),var(--color-orange-500),var(--color-amber-600));box-shadow:0 0 var(--spacing-16) var(--color-orange-500-alpha-60);transition:box-shadow .15s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden}.button.button--playback:hover:not(:disabled){box-shadow:0 0 var(--spacing-24) var(--color-orange-500-alpha-80);transform:scale(1.02)}.button.button--playback:active:not(:disabled){transform:scale(.98)}.button.button--playback:before{content:"";position:absolute;inset:0;background:linear-gradient(to bottom right,var(--color-white-alpha-30),transparent);opacity:0;transition:opacity .15s cubic-bezier(.4,0,.2,1);pointer-events:none}.button.button--playback:hover:before{opacity:1}.button.button--playback:after{content:"";position:absolute;inset:0;background-color:var(--color-white-alpha-20);border-radius:50%;filter:blur(var(--spacing-24));pointer-events:none}.volumeSliderContainer{display:flex;align-items:center;gap:.25rem}.volumeLabel{display:inline-block;width:2em;text-align:right}@keyframes buffer-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.bufferingContainer{position:absolute;display:flex;justify-content:center;align-items:center;width:100%;height:100%;top:0;left:0;z-index:1;background-color:#0006;backdrop-filter:blur(2px);pointer-events:auto}.bufferingSpinner{width:40px;height:40px;border:4px solid rgba(255,255,255,.2);border-top:4px solid #fff;border-radius:50%;animation:buffer-spin 1s linear infinite}.latencySliderContainer{display:flex;align-items:center;gap:8px;padding:8px 12px;background:transparent;border-radius:8px;margin:8px 0}.latencyLabel{font-size:20px;font-weight:500;color:#fff;white-space:nowrap}.latencySlider{flex:1 1 0%;height:6px;border-radius:3px;background:transparent;cursor:pointer}.latencyValueDisplay{font-size:20px;min-width:60px;text-align:right;color:#fff}.playbackControlsRow{display:flex;place-content:center space-around;gap:8px;padding:.5rem 0}.lantencyControlsRow,.qualitySelectorContainer{display:flex;align-items:center;gap:8px;padding:8px 12px;background:transparent;border-radius:8px;margin:8px 0}.qualityLabel{font-size:20px;font-weight:500;color:#fff;white-space:nowrap}.qualitySelect{flex:0 1 auto;font-size:16px;padding:4px 8px;border-radius:4px;background:#ffffff1a;color:#fff;border:1px solid rgba(255,255,255,.2);cursor:pointer;transition:background .2s ease}.qualitySelect:hover{background:#ffffff26}.qualitySelect:focus{outline:2px solid rgba(255,255,255,.3);outline-offset:2px}.qualitySelect option{background:#1a1a1a;color:#fff}.buffer__container{display:flex;flex-direction:column;gap:8px;padding:8px 12px}.buffer__visualization{position:relative;width:100%;height:52px;background:#ffffff1a;border-radius:4px;cursor:pointer;user-select:none;padding-left:48px;box-sizing:border-box}.buffer__playhead{position:absolute;left:48px;top:0;bottom:0;width:2px;background:#fff;z-index:3}.buffer__track{position:absolute;left:48px;right:0;height:20px;display:flex;align-items:center}.buffer__track--video{top:4px}.buffer__track--audio{top:28px}.buffer__track-label{position:absolute;left:-46px;width:40px;font-size:10px;color:#fff9;text-align:right;padding-right:4px;pointer-events:none;box-sizing:border-box}.buffer__range{position:absolute;top:2px;height:calc(100% - 4px);border-radius:2px;min-width:2px;opacity:.85;display:flex;align-items:center;justify-content:flex-end;overflow:hidden}.buffer__overflow-label{font-size:9px;color:#000000b3;padding-right:4px;font-weight:500}.buffer__target-area{position:absolute;inset:0 0 0 48px;pointer-events:none}.buffer__target-line{position:absolute;top:0;bottom:0;width:3px;background:var(--color-orange-400, #fb923c);z-index:2;cursor:ew-resize;border-radius:1px;pointer-events:auto}.buffer__target-label{position:absolute;bottom:100%;left:50%;transform:translate(-50%);font-size:11px;font-weight:500;color:var(--color-orange-400, #fb923c);white-space:nowrap;margin-bottom:2px;opacity:0;transition:opacity .15s ease;pointer-events:none}.buffer__visualization:hover .buffer__target-label,.buffer__visualization--dragging .buffer__target-label{opacity:1}';
|
|
1073
|
-
var
|
|
1074
|
-
function
|
|
1075
|
-
return u(
|
|
1037
|
+
const Fe = ':host{--color-white: #ffffff;--color-white-alpha-05: rgba(255, 255, 255, .05);--color-white-alpha-10: rgba(255, 255, 255, .1);--color-white-alpha-15: rgba(255, 255, 255, .15);--color-white-alpha-20: rgba(255, 255, 255, .2);--color-white-alpha-25: rgba(255, 255, 255, .25);--color-white-alpha-30: rgba(255, 255, 255, .3);--color-white-alpha-70: rgba(255, 255, 255, .7);--color-white-alpha-90: rgba(255, 255, 255, .9);--color-gray-100: #9ca3af;--color-gray-950: #1a1a1a;--color-blue-400: #00dfff;--color-blue-500: #52a1ff;--color-blue-900: #1b3243;--color-purple-400: #a855f7;--color-purple-500: #c27bff;--color-purple-900: #31144a;--color-green-400: #65ee2e;--color-green-900: #3d4928;--color-yellow-400: #facc15;--color-orange-300: rgb(253, 186, 116);--color-orange-400: #ff9900;--color-orange-450: #fb923c;--color-orange-500: #f97316;--color-orange-900: #4d301b;--color-amber-600: #d97706;--color-amber-600-alpha-20: rgba(217, 119, 6, .2);--color-amber-600-alpha-30: rgba(217, 119, 6, .3);--color-orange-400-alpha-20: rgba(255, 153, 0, .2);--color-orange-500-alpha-30: rgba(249, 115, 22, .3);--color-orange-500-alpha-40: rgba(249, 115, 22, .4);--color-orange-500-alpha-50: rgba(249, 115, 22, .5);--color-orange-500-alpha-60: rgba(249, 115, 22, .6);--color-orange-500-alpha-80: rgba(249, 115, 22, .8);--color-red-300: rgb(252, 165, 165);--color-red-400-alpha-25: rgba(248, 113, 113, .25);--color-red-500-alpha-25: rgba(239, 68, 68, .25);--color-red-500-alpha-45: rgba(239, 68, 68, .45);--color-red-500-alpha-60: rgba(239, 68, 68, .6);--color-red-600-alpha-25: rgba(220, 38, 38, .25);--color-red-900-alpha-35: rgba(127, 29, 29, .35);--color-red: #e60000;--color-black-alpha-8: rgba(0, 0, 0, .08);--color-black-alpha-10: rgba(0, 0, 0, .1);--color-black-alpha-60: rgba(0, 0, 0, .6);--color-black-alpha-70: rgba(0, 0, 0, .7);--color-black-alpha-85: rgba(0, 0, 0, .85);--color-black: #000000;--spacing-1: .0625rem;--spacing-2: .125rem;--spacing-4: .25rem;--spacing-8: .5rem;--spacing-12: .75rem;--spacing-16: 1rem;--spacing-24: 1.5rem;--spacing-32: 2rem;--spacing-48: 3rem;--border-radius-sm: .5rem;--border-radius-md: .75rem;--border-radius-lg: 1rem}:is(.flex--center){display:flex;justify-content:center;align-items:center}:is(.flex--align-center){align-items:center}:is(.flex--space-between){justify-content:space-between}.button{color:var(--color-white);cursor:pointer;background-color:var(--color-white-alpha-10);border:var(--spacing-1) solid var(--color-white-alpha-20);border-radius:50%;width:2.25rem;height:2.25rem;transform-origin:center;transition:transform .1s cubic-bezier(.4,0,.2,1)}.button:hover:not(:disabled){transform:scale(1.02);color:var(--color-white);background-color:var(--color-white-alpha-20);box-shadow:0 var(--spacing-2) var(--spacing-8) var(--color-black-alpha-10)}.button:active:not(:disabled){transform:scale(.98);box-shadow:0 var(--spacing-1) var(--spacing-4) var(--color-black-alpha-8)}.button:disabled{opacity:.5;cursor:default;color:var(--color-gray-100)}.stats{display:flex;align-items:center;justify-content:center;position:absolute;inset:0;pointer-events:none;z-index:2;width:100%;height:inherit;container-type:inline-size}.stats .stats__panel{position:absolute;display:flex;align-items:flex-start;justify-content:center;flex-direction:row;flex-wrap:wrap;gap:var(--spacing-12);max-width:240px;width:100%;background-color:var(--color-black-alpha-85);border:1px solid var(--color-white-alpha-25);border-radius:8px;padding:var(--spacing-12);pointer-events:auto;top:8px}@container (width > 480px) and (width <= 768px){.stats .stats__panel{max-width:360px;padding:var(--spacing-24)}}@container (width > 768px){.stats .stats__panel{max-width:600px;padding:var(--spacing-24)}}.stats .stats__panel .stats__item{display:flex;align-items:flex-start;justify-content:flex-start;flex-direction:row;height:auto;column-gap:var(--spacing-8);flex-basis:calc(50% - var(--spacing-12));flex-grow:1;flex-shrink:1}@container (width > 480px){.stats .stats__panel .stats__item{flex-basis:calc(25% - var(--spacing-12))}}.stats .stats__panel .stats__item .stats__icon-wrapper{display:none;padding:var(--spacing-8);border-radius:8px;width:fit-content;height:fit-content;flex-shrink:0}@container (width > 480px){.stats .stats__panel .stats__item .stats__icon-wrapper{width:24px;height:24px;display:flex;align-items:center;justify-content:center;flex-direction:row}}.stats .stats__panel .stats__item .stats__icon-wrapper svg{width:100%;height:100%}.stats .stats__panel .stats__item.stats__item--network .stats__icon-wrapper{background-color:var(--color-blue-900)}.stats .stats__panel .stats__item.stats__item--network,.stats .stats__panel .stats__item.stats__item--network .stats__item-data{color:var(--color-blue-400)}.stats .stats__panel .stats__item.stats__item--video .stats__icon-wrapper{background-color:var(--color-purple-900)}.stats .stats__panel .stats__item.stats__item--video,.stats .stats__panel .stats__item.stats__item--video .stats__item-data{color:var(--color-purple-400)}.stats .stats__panel .stats__item.stats__item--audio .stats__icon-wrapper{background-color:var(--color-green-900)}.stats .stats__panel .stats__item.stats__item--audio,.stats .stats__panel .stats__item.stats__item--audio .stats__item-data{color:var(--color-green-400)}.stats .stats__panel .stats__item.stats__item--buffer .stats__icon-wrapper{background-color:var(--color-orange-900)}.stats .stats__panel .stats__item.stats__item--buffer,.stats .stats__panel .stats__item.stats__item--buffer .stats__item-data{color:var(--color-orange-400)}.stats .stats__panel .stats__item .stats__item-detail{display:flex;align-items:flex-start;justify-content:space-evenly;flex-direction:column;gap:var(--spacing-4)}.stats .stats__panel .stats__item .stats__item-detail .stats__item-title{font-size:12px;font-weight:500;text-transform:capitalize;color:var(--color-gray-100);font-family:Segoe UI,Roboto,sans-serif;letter-spacing:1px;line-height:12px}.stats .stats__panel .stats__item .stats__item-detail .stats__item-data{font-size:16px;font-weight:700;font-family:Segoe UI,Roboto,sans-serif;white-space:pre-wrap;line-height:1.5}.watch-ui__video-container{display:block;position:relative;width:100%;height:auto;border-radius:var(--spacing-4);margin:0 auto;pointer-events:none}.watch-ui__controls{display:flex;flex-direction:column;gap:var(--spacing-24)}.button.button--playback{width:3rem;height:3rem;background:linear-gradient(to bottom right,var(--color-orange-400),var(--color-orange-500),var(--color-amber-600));box-shadow:0 0 var(--spacing-16) var(--color-orange-500-alpha-60);transition:box-shadow .15s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden}.button.button--playback:hover:not(:disabled){box-shadow:0 0 var(--spacing-24) var(--color-orange-500-alpha-80);transform:scale(1.02)}.button.button--playback:active:not(:disabled){transform:scale(.98)}.button.button--playback:before{content:"";position:absolute;inset:0;background:linear-gradient(to bottom right,var(--color-white-alpha-30),transparent);opacity:0;transition:opacity .15s cubic-bezier(.4,0,.2,1);pointer-events:none}.button.button--playback:hover:before{opacity:1}.button.button--playback:after{content:"";position:absolute;inset:0;background-color:var(--color-white-alpha-20);border-radius:50%;filter:blur(var(--spacing-24));pointer-events:none}.watch-ui__playback-controls{display:flex;place-content:center space-around;gap:var(--spacing-8);padding:var(--spacing-8) 0}.watch-ui__latency-controls{display:flex;flex-direction:column;gap:var(--spacing-16)}.watch-ui__volume-slider{gap:var(--spacing-4)}.watch-ui__volume-label{width:var(--spacing-16);text-align:right}.watch-ui__quality-selector{display:flex;align-items:center;gap:var(--spacing-8);background:transparent;border-radius:var(--spacing-8)}.watch-ui__quality-label{font-size:1.25rem;font-weight:500;color:var(--color-white);white-space:nowrap}.watch-ui__quality-select{flex:0 1 auto;font-size:1rem;padding:var(--spacing-8);border-radius:var(--spacing-4);background:var(--color-white-alpha-10);color:var(--color-white);border:var(--spacing-1) solid var(--color-white-alpha-20);cursor:pointer;transition:background .2s ease}.watch-ui__quality-select:hover{background:var(--color-white-alpha-15)}.watch-ui__quality-select:focus{outline:var(--spacing-2) solid var(--color-white-alpha-30);outline-offset:var(--spacing-2)}.watch-ui__quality-select option{background:var(--color-gray-950);color:var(--color-white)}.watch-ui__buffer{width:100%}.watch-ui__buffer-visualization{position:relative;width:100%;height:3.75rem;background:var(--color-white-alpha-10);border-radius:var(--spacing-4);cursor:pointer;user-select:none;padding-left:var(--spacing-48);box-sizing:border-box}.watch-ui__buffer-playhead{position:absolute;left:var(--spacing-48);top:0;bottom:0;width:var(--spacing-2);background:var(--color-white);z-index:3}.watch-ui__buffer-track{display:flex;align-items:center;position:absolute;left:var(--spacing-48);right:0;height:var(--spacing-24)}.watch-ui__buffer-track--video{top:var(--spacing-4)}.watch-ui__buffer-track--audio{top:var(--spacing-32)}.watch-ui__buffer-track-label{position:absolute;left:-2.875rem;width:2.5rem;font-size:.625rem;color:var(--color-white-alpha-70);text-align:right;padding-right:var(--spacing-4);pointer-events:none;box-sizing:border-box}.watch-ui__buffer-range{position:absolute;display:flex;align-items:center;justify-content:flex-end;top:var(--spacing-2);height:calc(100% - var(--spacing-4));border-radius:var(--spacing-2);min-width:var(--spacing-2);opacity:.85;overflow:hidden}.watch-ui__buffer-overflow-label{font-size:.5625rem;font-weight:500;color:var(--color-black-alpha-70);padding-right:var(--spacing-4)}.watch-ui__buffer-target-area{position:absolute;top:0;bottom:0;left:var(--spacing-48);right:0;pointer-events:none}.watch-ui__buffer-target-line{position:absolute;top:0;bottom:0;width:.1875rem;background:var(--color-orange-400, var(--color-orange-450));z-index:2;cursor:ew-resize;border-radius:var(--spacing-1);pointer-events:auto}.watch-ui__buffer-target-label{position:absolute;bottom:100%;left:50%;transform:translate(-50%);font-size:.6875rem;font-weight:500;color:var(--color-orange-400, var(--color-orange-450));white-space:nowrap;margin-bottom:var(--spacing-2);opacity:0;transition:opacity .15s ease;pointer-events:none}.watch-ui__buffer-visualization:hover .watch-ui__buffer-target-label,.watch-ui__buffer-visualization--dragging .watch-ui__buffer-target-label{opacity:1}.watch-ui__buffering{position:absolute;width:100%;height:100%;top:0;left:0;z-index:1;background-color:var(--color-black-alpha-40);backdrop-filter:blur(var(--spacing-2));pointer-events:auto}.watch-ui__buffering-spinner{width:2.5rem;height:2.5rem;border:var(--spacing-4) solid var(--color-white-alpha-20);border-top:var(--spacing-4) solid var(--color-white);border-radius:50%;animation:buffer-spin 1s linear infinite}@keyframes buffer-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.watch-ui__status-indicator{gap:var(--spacing-12);backdrop-filter:blur(var(--spacing-16))}.watch-ui__status-indicator-dot{position:relative;width:.75rem;height:.75rem;border-radius:50%;flex-shrink:0;z-index:1}.watch-ui__status-indicator-dot:after{content:"";position:absolute;inset:0;border-radius:50%;background:currentcolor;transform:scale(1);opacity:.5;animation:status-pulse 1.5s ease-out infinite;z-index:-1}.watch-ui__status-indicator-dot:after{display:none}.watch-ui__status-indicator-dot--live:after,.watch-ui__status-indicator-dot--connected:after,.watch-ui__status-indicator-dot--loading:after,.watch-ui__status-indicator-dot--connecting:after{display:block}.watch-ui__status-indicator-dot--error{background:var(--color-gray-100);color:var(--color-gray-100)}.watch-ui__status-indicator-text--error{color:var(--color-gray-100)}.watch-ui__status-indicator-dot--connecting{background:var(--color-yellow-400);color:var(--color-yellow-400)}.watch-ui__status-indicator-text--connecting{color:var(--color-yellow-400)}.watch-ui__status-indicator-dot--loading{background:var(--color-yellow-400);color:var(--color-yellow-400)}.watch-ui__status-indicator-text--loading{color:var(--color-yellow-400)}.watch-ui__status-indicator-dot--live{background:var(--color-green-400);color:var(--color-green-400)}.watch-ui__status-indicator-text--live{color:var(--color-green-400)}.watch-ui__status-indicator-dot--connected{background:var(--color-blue-500);color:var(--color-blue-500)}.watch-ui__status-indicator-text--connected{color:var(--color-blue-500)}.watch-ui__status-indicator-text{font-size:1rem;letter-spacing:.1rem}@keyframes status-pulse{0%{transform:scale(1);opacity:.5}70%{opacity:.25}to{transform:scale(2.5);opacity:0}}';
|
|
1038
|
+
var Ke = /* @__PURE__ */ W("<style>"), De = /* @__PURE__ */ W("<div class=watch-ui__video-container><slot>");
|
|
1039
|
+
function He(t) {
|
|
1040
|
+
return u(Ce, {
|
|
1076
1041
|
get moqWatch() {
|
|
1077
|
-
return
|
|
1042
|
+
return t.watch;
|
|
1078
1043
|
},
|
|
1079
1044
|
get children() {
|
|
1080
1045
|
return [(() => {
|
|
1081
|
-
var
|
|
1082
|
-
return
|
|
1046
|
+
var e = Ke();
|
|
1047
|
+
return p(e, Fe), e;
|
|
1083
1048
|
})(), (() => {
|
|
1084
|
-
var
|
|
1085
|
-
return
|
|
1086
|
-
const
|
|
1087
|
-
return
|
|
1049
|
+
var e = De(), r = e.firstChild;
|
|
1050
|
+
return r._$owner = Gt(), p(e, () => {
|
|
1051
|
+
const a = qt(st);
|
|
1052
|
+
return a ? u(L, {
|
|
1088
1053
|
get when() {
|
|
1089
|
-
return
|
|
1054
|
+
return a.isStatsPanelVisible();
|
|
1090
1055
|
},
|
|
1091
1056
|
get children() {
|
|
1092
|
-
return u(
|
|
1093
|
-
context:
|
|
1094
|
-
getElement: (
|
|
1057
|
+
return u(Bt, {
|
|
1058
|
+
context: st,
|
|
1059
|
+
getElement: (n) => n?.moqWatch
|
|
1095
1060
|
});
|
|
1096
1061
|
}
|
|
1097
1062
|
}) : null;
|
|
1098
|
-
}, null),
|
|
1099
|
-
})(), u(
|
|
1063
|
+
}, null), p(e, u($e, {}), null), e;
|
|
1064
|
+
})(), u(Ue, {})];
|
|
1100
1065
|
}
|
|
1101
1066
|
});
|
|
1102
1067
|
}
|
|
1103
|
-
|
|
1104
|
-
element:
|
|
1068
|
+
ke("moq-watch-ui", (t, {
|
|
1069
|
+
element: e
|
|
1105
1070
|
}) => {
|
|
1106
|
-
const [
|
|
1107
|
-
return
|
|
1071
|
+
const [r, a] = j();
|
|
1072
|
+
return Ht(async () => {
|
|
1108
1073
|
await customElements.whenDefined("moq-watch");
|
|
1109
|
-
const
|
|
1110
|
-
|
|
1111
|
-
}), u(
|
|
1074
|
+
const n = e.querySelector("moq-watch");
|
|
1075
|
+
a(n || void 0);
|
|
1076
|
+
}), u(L, {
|
|
1112
1077
|
get when() {
|
|
1113
|
-
return
|
|
1078
|
+
return r();
|
|
1114
1079
|
},
|
|
1115
1080
|
keyed: !0,
|
|
1116
|
-
children: (
|
|
1117
|
-
watch:
|
|
1081
|
+
children: (n) => u(He, {
|
|
1082
|
+
watch: n
|
|
1118
1083
|
})
|
|
1119
1084
|
});
|
|
1120
1085
|
});
|