@mux/mux-player 1.11.4 → 1.12.0
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/dist/index.cjs.js +433 -374
- package/dist/index.mjs +250 -239
- package/dist/mux-player.js +489 -430
- package/dist/mux-player.mjs +489 -430
- package/dist/themes/2023/index.cjs.js +1819 -0
- package/dist/themes/2023/index.js +1821 -0
- package/dist/themes/2023/index.mjs +1797 -0
- package/dist/themes/classic/index.cjs.js +1740 -0
- package/dist/themes/classic/index.js +1742 -0
- package/dist/themes/classic/index.mjs +1718 -0
- package/dist/themes/microvideo/index.cjs.js +1370 -0
- package/dist/themes/microvideo/index.js +1372 -0
- package/dist/themes/microvideo/index.mjs +1351 -0
- package/dist/themes/minimal/index.cjs.js +1273 -0
- package/dist/themes/minimal/index.js +1275 -0
- package/dist/themes/minimal/index.mjs +1254 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +3 -2
- package/dist/types/themes/2023/index.d.ts +5 -0
- package/dist/types/themes/classic/index.d.ts +5 -0
- package/dist/types/video-api.d.ts +4 -0
- package/dist/types-ts3.4/index.d.ts +3 -2
- package/dist/types-ts3.4/themes/2023/index.d.ts +5 -0
- package/dist/types-ts3.4/themes/classic/index.d.ts +5 -0
- package/dist/types-ts3.4/themes/microvideo/index.d.ts +1 -0
- package/dist/types-ts3.4/themes/minimal/index.d.ts +1 -0
- package/dist/types-ts3.4/video-api.d.ts +4 -0
- package/package.json +52 -17
- /package/{themes/microvideo.js → dist/types/themes/microvideo/index.d.ts} +0 -0
- /package/{themes/minimal.js → dist/types/themes/minimal/index.d.ts} +0 -0
|
@@ -0,0 +1,1797 @@
|
|
|
1
|
+
var __accessCheck = (obj, member, msg) => {
|
|
2
|
+
if (!member.has(obj))
|
|
3
|
+
throw TypeError("Cannot " + msg);
|
|
4
|
+
};
|
|
5
|
+
var __privateGet = (obj, member, getter) => {
|
|
6
|
+
__accessCheck(obj, member, "read from private field");
|
|
7
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
8
|
+
};
|
|
9
|
+
var __privateAdd = (obj, member, value) => {
|
|
10
|
+
if (member.has(obj))
|
|
11
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
12
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
13
|
+
};
|
|
14
|
+
var __privateSet = (obj, member, value, setter) => {
|
|
15
|
+
__accessCheck(obj, member, "write to private field");
|
|
16
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
17
|
+
return value;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// src/themes/2023/2023.html
|
|
21
|
+
var __default = `<template id="media-theme-2023">
|
|
22
|
+
<style>
|
|
23
|
+
@keyframes pre-play-hide {
|
|
24
|
+
0% {
|
|
25
|
+
transform: scale(1);
|
|
26
|
+
opacity: 1;
|
|
27
|
+
}
|
|
28
|
+
30% {
|
|
29
|
+
transform: scale(0.7);
|
|
30
|
+
}
|
|
31
|
+
100% {
|
|
32
|
+
transform: scale(1.5);
|
|
33
|
+
opacity: 0;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:host {
|
|
38
|
+
--_primary-color: var(--media-primary-color, #fff);
|
|
39
|
+
--_secondary-color: var(--media-secondary-color, transparent);
|
|
40
|
+
--_accent-color: var(--media-accent-color, #fa50b5);
|
|
41
|
+
|
|
42
|
+
--media-icon-color: var(--_primary-color);
|
|
43
|
+
--media-control-background: var(--_secondary-color);
|
|
44
|
+
--media-control-hover-background: var(--_accent-color);
|
|
45
|
+
--media-time-buffered-color: rgba(255, 255, 255, 0.4);
|
|
46
|
+
--media-range-track-background: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)),
|
|
47
|
+
linear-gradient(rgba(20, 20, 30, 0.7), rgba(20, 20, 30, 0.7));
|
|
48
|
+
--media-preview-thumbnail-border: 0;
|
|
49
|
+
--media-preview-thumbnail-border-radius: 2px 2px 0 0;
|
|
50
|
+
--media-preview-time-border-radius: 0 0 2px 2px;
|
|
51
|
+
--media-preview-time-margin: 0 0 8px;
|
|
52
|
+
--media-preview-time-text-shadow: none;
|
|
53
|
+
--media-control-height: 14px;
|
|
54
|
+
--media-control-padding: 6px;
|
|
55
|
+
|
|
56
|
+
color: var(--_primary-color);
|
|
57
|
+
display: inline-block;
|
|
58
|
+
width: 100%;
|
|
59
|
+
height: 100%;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:host([audio]) {
|
|
63
|
+
--media-preview-time-border-radius: 3px;
|
|
64
|
+
--media-preview-time-margin: 0 0 5px;
|
|
65
|
+
--media-preview-time-text-shadow: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host([audio]) ::slotted([slot='media']) {
|
|
69
|
+
height: 0px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:host([audio]) media-loading-indicator,
|
|
73
|
+
:host([audio]) ::slotted([slot='poster']) {
|
|
74
|
+
display: none;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:host([audio]) media-controller {
|
|
78
|
+
background: transparent;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:host([audio]) media-controller::part(vertical-layer) {
|
|
82
|
+
background: transparent;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:host([audio]) media-control-bar {
|
|
86
|
+
width: 100%;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:host(:not([audio])) media-captions-selectmenu::part(listbox) {
|
|
90
|
+
z-index: 10;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:host(:not([audio])) media-captions-selectmenu::part(indicator) {
|
|
94
|
+
fill: red;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/*
|
|
98
|
+
* 0.433s is the transition duration for VTT Regions.
|
|
99
|
+
* Borrowed here, so the captions don't move too fast.
|
|
100
|
+
*/
|
|
101
|
+
media-controller ::slotted([slot='media']) {
|
|
102
|
+
--media-webkit-text-track-transition: transform 0.433s ease-out 0.3s;
|
|
103
|
+
}
|
|
104
|
+
media-controller:is([mediapaused], :not([userinactive])) ::slotted([slot='media']) {
|
|
105
|
+
--media-webkit-text-track-transform: translateY(-50px);
|
|
106
|
+
--media-webkit-text-track-transition: transform 0.15s ease;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
media-time-range {
|
|
110
|
+
--media-range-bar-color: var(--_accent-color);
|
|
111
|
+
--media-time-range-buffered-color: #fff;
|
|
112
|
+
--media-range-track-color: rgba(255, 255, 255, 0.4);
|
|
113
|
+
--media-range-track-background: transparent;
|
|
114
|
+
--media-range-thumb-background: radial-gradient(
|
|
115
|
+
circle,
|
|
116
|
+
#000 0%,
|
|
117
|
+
#000 25%,
|
|
118
|
+
var(--_accent-color) 25%,
|
|
119
|
+
var(--_accent-color)
|
|
120
|
+
);
|
|
121
|
+
--media-range-thumb-width: 0;
|
|
122
|
+
--media-range-thumb-height: 0;
|
|
123
|
+
--media-range-thumb-transition: all 0.3s;
|
|
124
|
+
--media-range-thumb-opacity: 1;
|
|
125
|
+
--media-preview-thumbnail-background: var(--_primary-color);
|
|
126
|
+
--media-preview-thumbnail-border: 5px solid var(--_primary-color);
|
|
127
|
+
--media-preview-thumbnail-border-radius: 5px 5px 0 0;
|
|
128
|
+
--media-preview-time-background: var(--_primary-color);
|
|
129
|
+
--media-preview-time-border-radius: 0 0 5px 5px;
|
|
130
|
+
--media-preview-time-margin: 0 0 10px;
|
|
131
|
+
--media-preview-time-padding: 2px 0 6px;
|
|
132
|
+
--media-text-color: #000;
|
|
133
|
+
--media-preview-thumbnail-max-width: 150px;
|
|
134
|
+
--media-range-track-pointer-border-right: 2px solid #000;
|
|
135
|
+
--media-control-hover-background: transparent;
|
|
136
|
+
color: var(--_accent-color);
|
|
137
|
+
padding: 0 6px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
:host([audio]) media-time-range {
|
|
141
|
+
--media-preview-time-border-radius: 5px;
|
|
142
|
+
--media-preview-time-padding: 5px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
media-time-range:hover {
|
|
146
|
+
--media-range-thumb-width: 12px;
|
|
147
|
+
--media-range-thumb-height: 12px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
media-time-range::part(preview-box)::after {
|
|
151
|
+
position: absolute;
|
|
152
|
+
content: '';
|
|
153
|
+
width: 0;
|
|
154
|
+
height: 0;
|
|
155
|
+
border-style: solid;
|
|
156
|
+
border-width: 10px 8.5px 0 8.5px;
|
|
157
|
+
border-color: var(--_primary-color) transparent transparent transparent;
|
|
158
|
+
top: 100%;
|
|
159
|
+
left: 50%;
|
|
160
|
+
transform: translate(-50%, -10px);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
media-captions-selectmenu {
|
|
164
|
+
--media-listbox-background: var(--_primary-color);
|
|
165
|
+
--media-listbox-selected-background: rgba(0, 0, 0, 0.15);
|
|
166
|
+
--media-listbox-hover-background: rgba(0, 0, 0, 0.15);
|
|
167
|
+
--media-listbox-hover-outline: white solid 1px;
|
|
168
|
+
--media-text-color: #000;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
:host(:not([audio])) media-time-range {
|
|
172
|
+
--media-range-padding: 0;
|
|
173
|
+
background: transparent;
|
|
174
|
+
z-index: 10;
|
|
175
|
+
height: 10px;
|
|
176
|
+
bottom: -3px;
|
|
177
|
+
width: 100%;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
media-control-bar :is([role='button'], [role='switch'], button) {
|
|
181
|
+
line-height: 0;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
media-control-bar :is([part*='button'], [part*='range'], [part*='display']) {
|
|
185
|
+
border-radius: 3px;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.spacer {
|
|
189
|
+
flex-grow: 1;
|
|
190
|
+
background-color: var(--media-control-background, rgba(20, 20, 30, 0.7));
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
media-control-bar[slot='top-chrome'] {
|
|
194
|
+
min-height: 42px;
|
|
195
|
+
pointer-events: none;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
:host([title]:not([audio])) media-control-bar[slot='top-chrome']::before {
|
|
199
|
+
content: '';
|
|
200
|
+
position: absolute;
|
|
201
|
+
width: 100%;
|
|
202
|
+
padding-bottom: min(100px, 25%);
|
|
203
|
+
background: linear-gradient(#000, transparent);
|
|
204
|
+
opacity: 0.8;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
:host(:not([audio])) media-control-bar[part='bottom']::before {
|
|
208
|
+
content: '';
|
|
209
|
+
position: absolute;
|
|
210
|
+
width: 100%;
|
|
211
|
+
bottom: 0;
|
|
212
|
+
left: 0;
|
|
213
|
+
padding-bottom: min(100px, 25%);
|
|
214
|
+
background: linear-gradient(transparent, #000);
|
|
215
|
+
opacity: 0.8;
|
|
216
|
+
z-index: 1;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
media-control-bar[part='bottom'] > * {
|
|
220
|
+
z-index: 2;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
media-control-bar[part='bottom'] {
|
|
224
|
+
padding: 6px 6px;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
media-control-bar[slot='top-chrome'] > * {
|
|
228
|
+
--media-control-background: transparent;
|
|
229
|
+
--media-control-hover-background: transparent;
|
|
230
|
+
position: relative;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
media-controller::part(vertical-layer) {
|
|
234
|
+
transition: background-color 1s;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
media-controller:is([mediapaused], :not([userinactive]))::part(vertical-layer) {
|
|
238
|
+
background-color: var(--controls-backdrop-color, var(--controls, transparent));
|
|
239
|
+
transition: background-color 0.25s;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.center-controls {
|
|
243
|
+
--media-button-icon-width: 100%;
|
|
244
|
+
--media-button-icon-height: auto;
|
|
245
|
+
pointer-events: none;
|
|
246
|
+
width: 100%;
|
|
247
|
+
display: flex;
|
|
248
|
+
flex-flow: row;
|
|
249
|
+
align-items: center;
|
|
250
|
+
justify-content: center;
|
|
251
|
+
filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25));
|
|
252
|
+
paint-order: stroke;
|
|
253
|
+
stroke: rgba(102, 102, 102, 1);
|
|
254
|
+
stroke-width: 0.3px;
|
|
255
|
+
text-shadow: 0 0 2px rgb(0 0 0 / 0.25), 0 0 6px rgb(0 0 0 / 0.25);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.center-controls media-play-button {
|
|
259
|
+
--media-control-background: transparent;
|
|
260
|
+
--media-control-hover-background: transparent;
|
|
261
|
+
--media-control-padding: 0;
|
|
262
|
+
width: 40px;
|
|
263
|
+
transform-origin: center center;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
[breakpointsm] .center-controls media-play-button {
|
|
267
|
+
width: 90px;
|
|
268
|
+
height: 90px;
|
|
269
|
+
border-radius: 50%;
|
|
270
|
+
transition: background 0.4s;
|
|
271
|
+
padding: 24px;
|
|
272
|
+
--media-control-background: #000;
|
|
273
|
+
--media-control-hover-background: var(--_accent-color);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.center-controls media-seek-backward-button,
|
|
277
|
+
.center-controls media-seek-forward-button {
|
|
278
|
+
--media-control-background: transparent;
|
|
279
|
+
--media-control-hover-background: transparent;
|
|
280
|
+
padding: 0;
|
|
281
|
+
margin: 0 20px;
|
|
282
|
+
width: max(33px, min(8%, 40px));
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
[breakpointsm]:not([audio]) .center-controls.pre-playback {
|
|
286
|
+
display: grid;
|
|
287
|
+
align-items: initial;
|
|
288
|
+
justify-content: initial;
|
|
289
|
+
height: 100%;
|
|
290
|
+
overflow: hidden;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
[breakpointsm]:not([audio]) .center-controls.pre-playback media-play-button {
|
|
294
|
+
place-self: var(--_pre-playback-place, center);
|
|
295
|
+
grid-area: 1 / 1;
|
|
296
|
+
margin: 16px;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/* Show and hide controls or pre-playback state */
|
|
300
|
+
|
|
301
|
+
[breakpointsm]:is([mediahasplayed], :not([mediapaused])):not([audio])
|
|
302
|
+
.center-controls.pre-playback
|
|
303
|
+
media-play-button {
|
|
304
|
+
animation: 0.3s linear forwards pre-play-hide;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.autoplay-unmute {
|
|
308
|
+
--media-control-hover-background: transparent;
|
|
309
|
+
width: 100%;
|
|
310
|
+
display: flex;
|
|
311
|
+
align-items: center;
|
|
312
|
+
justify-content: center;
|
|
313
|
+
filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25));
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.autoplay-unmute-btn {
|
|
317
|
+
--media-control-height: 16px;
|
|
318
|
+
border-radius: 8px;
|
|
319
|
+
background: #000;
|
|
320
|
+
color: var(--_primary-color);
|
|
321
|
+
display: flex;
|
|
322
|
+
align-items: center;
|
|
323
|
+
padding: 8px 16px;
|
|
324
|
+
font-size: 18px;
|
|
325
|
+
font-weight: 500;
|
|
326
|
+
cursor: pointer;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.autoplay-unmute-btn:hover {
|
|
330
|
+
background: var(--_accent-color);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
[breakpointsm] .autoplay-unmute-btn {
|
|
334
|
+
--media-control-height: 30px;
|
|
335
|
+
padding: 14px 24px;
|
|
336
|
+
font-size: 26px;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.autoplay-unmute-btn svg {
|
|
340
|
+
margin: 0 6px 0 0;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
[breakpointsm] .autoplay-unmute-btn svg {
|
|
344
|
+
margin: 0 10px 0 0;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
media-controller:not([audio]):not([mediahasplayed]) *:is(media-control-bar, media-time-range) {
|
|
348
|
+
display: none;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
media-loading-indicator {
|
|
352
|
+
--media-loading-icon-width: 100%;
|
|
353
|
+
--media-button-icon-height: auto;
|
|
354
|
+
display: var(--media-control-display, var(--media-loading-indicator-display, flex));
|
|
355
|
+
pointer-events: none;
|
|
356
|
+
position: absolute;
|
|
357
|
+
width: min(15%, 150px);
|
|
358
|
+
flex-flow: row;
|
|
359
|
+
align-items: center;
|
|
360
|
+
justify-content: center;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/* Intentionally don't target the div for transition but the children
|
|
364
|
+
of the div. Prevents messing with media-chrome's autohide feature. */
|
|
365
|
+
media-loading-indicator + div * {
|
|
366
|
+
transition: opacity 0.15s;
|
|
367
|
+
opacity: 1;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
media-loading-indicator[media-loading]:not([media-paused]) ~ div > * {
|
|
371
|
+
opacity: 0;
|
|
372
|
+
transition-delay: 400ms;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
media-volume-range {
|
|
376
|
+
width: min(100%, 100px);
|
|
377
|
+
--media-range-thumb-width: 12px;
|
|
378
|
+
--media-range-thumb-height: 12px;
|
|
379
|
+
--media-range-thumb-background: radial-gradient(
|
|
380
|
+
circle,
|
|
381
|
+
#000 0%,
|
|
382
|
+
#000 25%,
|
|
383
|
+
var(--_primary-color) 25%,
|
|
384
|
+
var(--_primary-color)
|
|
385
|
+
);
|
|
386
|
+
--media-control-hover-background: none;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
media-time-display {
|
|
390
|
+
white-space: nowrap;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/* Hide unavailable controls */
|
|
394
|
+
media-volume-range[media-volume-unavailable] {
|
|
395
|
+
--volume-range: none;
|
|
396
|
+
}
|
|
397
|
+
media-airplay-button[media-airplay-unavailable] {
|
|
398
|
+
--airplay-button: none;
|
|
399
|
+
}
|
|
400
|
+
media-fullscreen-button[media-fullscreen-unavailable] {
|
|
401
|
+
--fullscreen-button: none;
|
|
402
|
+
}
|
|
403
|
+
media-cast-button[media-cast-unavailable] {
|
|
404
|
+
--cast-button: none;
|
|
405
|
+
}
|
|
406
|
+
media-pip-button[media-pip-unavailable] {
|
|
407
|
+
--pip-button: none;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/* Generic style for explicitly disabled controls */
|
|
411
|
+
media-control-bar[part='bottom'] [disabled],
|
|
412
|
+
media-control-bar[part='bottom'] [aria-disabled='true'] {
|
|
413
|
+
opacity: 60%;
|
|
414
|
+
cursor: not-allowed;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
media-text-display {
|
|
418
|
+
--media-font-size: 16px;
|
|
419
|
+
--media-control-padding: 14px;
|
|
420
|
+
font-weight: 500;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
media-play-button.animated *:is(g, path) {
|
|
424
|
+
transition: all 0.3s;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
media-play-button.animated[mediapaused] .pause-icon-pt1 {
|
|
428
|
+
opacity: 0;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
media-play-button.animated[mediapaused] .pause-icon-pt2 {
|
|
432
|
+
transform-origin: center center;
|
|
433
|
+
transform: scaleY(0);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
media-play-button.animated[mediapaused] .play-icon {
|
|
437
|
+
clip-path: inset(0 0 0 0);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
media-play-button.animated:not([mediapaused]) .play-icon {
|
|
441
|
+
clip-path: inset(0 0 0 100%);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
media-seek-forward-button,
|
|
445
|
+
media-seek-backward-button {
|
|
446
|
+
--media-font-weight: 400;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.mute-icon {
|
|
450
|
+
display: inline-block;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.mute-icon :is(path, g) {
|
|
454
|
+
transition: opacity 0.5s;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.muted {
|
|
458
|
+
opacity: 0;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
media-mute-button[mediavolumelevel='low'] :is(.volume-medium, .volume-high),
|
|
462
|
+
media-mute-button[mediavolumelevel='medium'] :is(.volume-high) {
|
|
463
|
+
opacity: 0;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
media-mute-button[mediavolumelevel='off'] .unmuted {
|
|
467
|
+
opacity: 0;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
media-mute-button[mediavolumelevel='off'] .muted {
|
|
471
|
+
opacity: 1;
|
|
472
|
+
}
|
|
473
|
+
</style>
|
|
474
|
+
|
|
475
|
+
<template partial="TitleDisplay">
|
|
476
|
+
<template if="title">
|
|
477
|
+
<media-text-display part="top title display" class="title-display">{{title}}</media-text-display>
|
|
478
|
+
</template>
|
|
479
|
+
</template>
|
|
480
|
+
|
|
481
|
+
<template partial="PlayButton">
|
|
482
|
+
<media-play-button
|
|
483
|
+
part="{{section ?? 'bottom'}} play button"
|
|
484
|
+
disabled="{{disabled}}"
|
|
485
|
+
aria-disabled="{{disabled}}"
|
|
486
|
+
class="animated"
|
|
487
|
+
>
|
|
488
|
+
<svg aria-hidden="true" viewBox="0 0 18 14" slot="icon">
|
|
489
|
+
<g class="play-icon">
|
|
490
|
+
<path
|
|
491
|
+
d="M15.5987 6.2911L3.45577 0.110898C2.83667 -0.204202 2.06287 0.189698 2.06287 0.819798V13.1802C2.06287 13.8103 2.83667 14.2042 3.45577 13.8891L15.5987 7.7089C16.2178 7.3938 16.2178 6.6061 15.5987 6.2911Z"
|
|
492
|
+
/>
|
|
493
|
+
</g>
|
|
494
|
+
<g class="pause-icon">
|
|
495
|
+
<path
|
|
496
|
+
class="pause-icon-pt1"
|
|
497
|
+
d="M5.90709 0H2.96889C2.46857 0 2.06299 0.405585 2.06299 0.9059V13.0941C2.06299 13.5944 2.46857 14 2.96889 14H5.90709C6.4074 14 6.81299 13.5944 6.81299 13.0941V0.9059C6.81299 0.405585 6.4074 0 5.90709 0Z"
|
|
498
|
+
/>
|
|
499
|
+
<path
|
|
500
|
+
class="pause-icon-pt2"
|
|
501
|
+
d="M15.1571 0H12.2189C11.7186 0 11.313 0.405585 11.313 0.9059V13.0941C11.313 13.5944 11.7186 14 12.2189 14H15.1571C15.6574 14 16.063 13.5944 16.063 13.0941V0.9059C16.063 0.405585 15.6574 0 15.1571 0Z"
|
|
502
|
+
/>
|
|
503
|
+
</g>
|
|
504
|
+
</svg>
|
|
505
|
+
</media-play-button>
|
|
506
|
+
</template>
|
|
507
|
+
|
|
508
|
+
<template partial="PrePlayButton">
|
|
509
|
+
<media-play-button part="{{section}} play button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
510
|
+
<svg aria-hidden="true" viewBox="0 0 18 14" slot="icon">
|
|
511
|
+
<g>
|
|
512
|
+
<path
|
|
513
|
+
d="M15.5987 6.2911L3.45577 0.110898C2.83667 -0.204202 2.06287 0.189698 2.06287 0.819798V13.1802C2.06287 13.8103 2.83667 14.2042 3.45577 13.8891L15.5987 7.7089C16.2178 7.3938 16.2178 6.6061 15.5987 6.2911Z"
|
|
514
|
+
/>
|
|
515
|
+
</g>
|
|
516
|
+
</svg>
|
|
517
|
+
</media-play-button>
|
|
518
|
+
</template>
|
|
519
|
+
|
|
520
|
+
<template partial="SeekBackwardButton">
|
|
521
|
+
<media-seek-backward-button
|
|
522
|
+
seekoffset="{{backwardseekoffset}}"
|
|
523
|
+
part="{{section ?? 'bottom'}} seek-backward button"
|
|
524
|
+
disabled="{{disabled}}"
|
|
525
|
+
aria-disabled="{{disabled}}"
|
|
526
|
+
>
|
|
527
|
+
<svg viewBox="0 0 22 14" aria-hidden="true" slot="icon">
|
|
528
|
+
<path
|
|
529
|
+
d="M3.65 2.07888L0.0864 6.7279C-0.0288 6.87812 -0.0288 7.12188 0.0864 7.2721L3.65 11.9211C3.7792 12.0896 4 11.9703 4 11.7321V2.26787C4 2.02968 3.7792 1.9104 3.65 2.07888Z"
|
|
530
|
+
/>
|
|
531
|
+
<text transform="translate(6 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'">
|
|
532
|
+
{{backwardseekoffset}}
|
|
533
|
+
</text>
|
|
534
|
+
</svg>
|
|
535
|
+
</media-seek-backward-button>
|
|
536
|
+
</template>
|
|
537
|
+
|
|
538
|
+
<template partial="SeekForwardButton">
|
|
539
|
+
<media-seek-forward-button
|
|
540
|
+
seekoffset="{{forwardseekoffset}}"
|
|
541
|
+
part="{{section ?? 'bottom'}} seek-forward button"
|
|
542
|
+
disabled="{{disabled}}"
|
|
543
|
+
aria-disabled="{{disabled}}"
|
|
544
|
+
>
|
|
545
|
+
<svg viewBox="0 0 22 14" aria-hidden="true" slot="icon">
|
|
546
|
+
<g>
|
|
547
|
+
<text transform="translate(0 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'">
|
|
548
|
+
{{forwardseekoffset}}
|
|
549
|
+
</text>
|
|
550
|
+
<path
|
|
551
|
+
d="M18.35 11.9211L21.9136 7.2721C22.0288 7.12188 22.0288 6.87812 21.9136 6.7279L18.35 2.07888C18.2208 1.91041 18 2.02968 18 2.26787V11.7321C18 11.9703 18.2208 12.0896 18.35 11.9211Z"
|
|
552
|
+
/>
|
|
553
|
+
</g>
|
|
554
|
+
</svg>
|
|
555
|
+
</media-seek-forward-button>
|
|
556
|
+
</template>
|
|
557
|
+
|
|
558
|
+
<template partial="MuteButton">
|
|
559
|
+
<media-mute-button part="bottom mute button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
560
|
+
<svg viewBox="0 0 18 14" slot="icon" class="mute-icon" aria-hidden="true">
|
|
561
|
+
<g class="unmuted">
|
|
562
|
+
<path
|
|
563
|
+
d="M6.76786 1.21233L3.98606 3.98924H1.19937C0.593146 3.98924 0.101743 4.51375 0.101743 5.1607V6.96412L0 6.99998L0.101743 7.03583V8.83926C0.101743 9.48633 0.593146 10.0108 1.19937 10.0108H3.98606L6.76773 12.7877C7.23561 13.2547 8 12.9007 8 12.2171V1.78301C8 1.09925 7.23574 0.745258 6.76786 1.21233Z"
|
|
564
|
+
/>
|
|
565
|
+
<path
|
|
566
|
+
class="volume-low"
|
|
567
|
+
d="M10 3.54781C10.7452 4.55141 11.1393 5.74511 11.1393 6.99991C11.1393 8.25471 10.7453 9.44791 10 10.4515L10.7988 11.0496C11.6734 9.87201 12.1356 8.47161 12.1356 6.99991C12.1356 5.52821 11.6735 4.12731 10.7988 2.94971L10 3.54781Z"
|
|
568
|
+
/>
|
|
569
|
+
<path
|
|
570
|
+
class="volume-medium"
|
|
571
|
+
d="M12.3778 2.40086C13.2709 3.76756 13.7428 5.35806 13.7428 7.00026C13.7428 8.64246 13.2709 10.233 12.3778 11.5992L13.2106 12.1484C14.2107 10.6185 14.739 8.83796 14.739 7.00016C14.739 5.16236 14.2107 3.38236 13.2106 1.85156L12.3778 2.40086Z"
|
|
572
|
+
/>
|
|
573
|
+
<path
|
|
574
|
+
class="volume-high"
|
|
575
|
+
d="M15.5981 0.75L14.7478 1.2719C15.7937 2.9919 16.3468 4.9723 16.3468 7C16.3468 9.0277 15.7937 11.0082 14.7478 12.7281L15.5981 13.25C16.7398 11.3722 17.343 9.211 17.343 7C17.343 4.789 16.7398 2.6268 15.5981 0.75Z"
|
|
576
|
+
/>
|
|
577
|
+
</g>
|
|
578
|
+
<g class="muted">
|
|
579
|
+
<path
|
|
580
|
+
fill-rule="evenodd"
|
|
581
|
+
clip-rule="evenodd"
|
|
582
|
+
d="M4.39976 4.98924H1.19937C1.19429 4.98924 1.17777 4.98961 1.15296 5.01609C1.1271 5.04369 1.10174 5.09245 1.10174 5.1607V8.83926C1.10174 8.90761 1.12714 8.95641 1.15299 8.984C1.17779 9.01047 1.1943 9.01084 1.19937 9.01084H4.39977L7 11.6066V2.39357L4.39976 4.98924ZM7.47434 1.92006C7.4743 1.9201 7.47439 1.92002 7.47434 1.92006V1.92006ZM6.76773 12.7877L3.98606 10.0108H1.19937C0.593146 10.0108 0.101743 9.48633 0.101743 8.83926V7.03583L0 6.99998L0.101743 6.96412V5.1607C0.101743 4.51375 0.593146 3.98924 1.19937 3.98924H3.98606L6.76786 1.21233C7.23574 0.745258 8 1.09925 8 1.78301V12.2171C8 12.9007 7.23561 13.2547 6.76773 12.7877Z"
|
|
583
|
+
/>
|
|
584
|
+
<path
|
|
585
|
+
fill-rule="evenodd"
|
|
586
|
+
clip-rule="evenodd"
|
|
587
|
+
d="M15.2677 9.30323C15.463 9.49849 15.7796 9.49849 15.9749 9.30323C16.1701 9.10796 16.1701 8.79138 15.9749 8.59612L14.2071 6.82841L15.9749 5.06066C16.1702 4.8654 16.1702 4.54882 15.9749 4.35355C15.7796 4.15829 15.4631 4.15829 15.2678 4.35355L13.5 6.1213L11.7322 4.35348C11.537 4.15822 11.2204 4.15822 11.0251 4.35348C10.8298 4.54874 10.8298 4.86532 11.0251 5.06058L12.7929 6.82841L11.0251 8.59619C10.8299 8.79146 10.8299 9.10804 11.0251 9.3033C11.2204 9.49856 11.537 9.49856 11.7323 9.3033L13.5 7.53552L15.2677 9.30323Z"
|
|
588
|
+
/>
|
|
589
|
+
</g>
|
|
590
|
+
</svg>
|
|
591
|
+
</media-mute-button>
|
|
592
|
+
</template>
|
|
593
|
+
|
|
594
|
+
<template partial="PipButton">
|
|
595
|
+
<media-pip-button part="bottom pip button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
596
|
+
<svg viewBox="0 0 18 14" aria-hidden="true" slot="icon">
|
|
597
|
+
<path
|
|
598
|
+
d="M15.9891 0H2.011C0.9004 0 0 0.9003 0 2.0109V11.989C0 13.0996 0.9004 14 2.011 14H15.9891C17.0997 14 18 13.0997 18 11.9891V2.0109C18 0.9003 17.0997 0 15.9891 0ZM17 11.9891C17 12.5465 16.5465 13 15.9891 13H2.011C1.4536 13 1.0001 12.5465 1.0001 11.9891V2.0109C1.0001 1.4535 1.4536 0.9999 2.011 0.9999H15.9891C16.5465 0.9999 17 1.4535 17 2.0109V11.9891Z"
|
|
599
|
+
fill="white"
|
|
600
|
+
/>
|
|
601
|
+
<path
|
|
602
|
+
d="M15.356 5.67822H8.19523C8.03253 5.67822 7.90063 5.81012 7.90063 5.97282V11.3836C7.90063 11.5463 8.03253 11.6782 8.19523 11.6782H15.356C15.5187 11.6782 15.6506 11.5463 15.6506 11.3836V5.97282C15.6506 5.81012 15.5187 5.67822 15.356 5.67822Z"
|
|
603
|
+
/>
|
|
604
|
+
</svg>
|
|
605
|
+
</media-pip-button>
|
|
606
|
+
</template>
|
|
607
|
+
|
|
608
|
+
<template partial="CaptionsMenuButton">
|
|
609
|
+
<media-captions-selectmenu part="bottom captions selectmenu" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
610
|
+
<media-captions-button
|
|
611
|
+
slot="button"
|
|
612
|
+
part="bottom captions button"
|
|
613
|
+
disabled="{{disabled}}"
|
|
614
|
+
aria-disabled="{{disabled}}"
|
|
615
|
+
>
|
|
616
|
+
<svg aria-hidden="true" viewBox="0 0 18 14" slot="on">
|
|
617
|
+
<path
|
|
618
|
+
d="M15.989 0H2.011C0.9004 0 0 0.9003 0 2.0109V11.9891C0 13.0997 0.9004 14 2.011 14H15.989C17.0997 14 18 13.0997 18 11.9891V2.0109C18 0.9003 17.0997 0 15.989 0ZM4.2292 8.7639C4.5954 9.1902 5.0935 9.4031 5.7233 9.4031C6.1852 9.4031 6.5544 9.301 6.8302 9.0969C7.1061 8.8933 7.2863 8.614 7.3702 8.26H8.4322C8.3062 8.884 8.0093 9.3733 7.5411 9.7273C7.0733 10.0813 6.4703 10.2581 5.732 10.2581C5.108 10.2581 4.5699 10.1219 4.1168 9.8489C3.6637 9.5759 3.3141 9.1946 3.0685 8.7058C2.8224 8.2165 2.6994 7.6511 2.6994 7.009C2.6994 6.3611 2.8224 5.7927 3.0685 5.3034C3.3141 4.8146 3.6637 4.4323 4.1168 4.1559C4.5699 3.88 5.108 3.7418 5.732 3.7418C6.4703 3.7418 7.0733 3.922 7.5411 4.2818C8.0094 4.6422 8.3062 5.1461 8.4322 5.794H7.3702C7.2862 5.4283 7.106 5.1368 6.8302 4.921C6.5544 4.7052 6.1852 4.5968 5.7233 4.5968C5.0934 4.5968 4.5954 4.8116 4.2292 5.2404C3.8635 5.6696 3.6804 6.259 3.6804 7.009C3.6804 7.7531 3.8635 8.3381 4.2292 8.7639ZM11.0974 8.7639C11.4636 9.1902 11.9617 9.4031 12.5915 9.4031C13.0534 9.4031 13.4226 9.301 13.6984 9.0969C13.9743 8.8933 14.1545 8.614 14.2384 8.26H15.3004C15.1744 8.884 14.8775 9.3733 14.4093 9.7273C13.9415 10.0813 13.3385 10.2581 12.6002 10.2581C11.9762 10.2581 11.4381 10.1219 10.985 9.8489C10.5319 9.5759 10.1823 9.1946 9.9367 8.7058C9.6906 8.2165 9.5676 7.6511 9.5676 7.009C9.5676 6.3611 9.6906 5.7927 9.9367 5.3034C10.1823 4.8146 10.5319 4.4323 10.985 4.1559C11.4381 3.88 11.9762 3.7418 12.6002 3.7418C13.3385 3.7418 13.9415 3.922 14.4093 4.2818C14.8776 4.6422 15.1744 5.1461 15.3004 5.794H14.2384C14.1544 5.4283 13.9742 5.1368 13.6984 4.921C13.4226 4.7052 13.0534 4.5968 12.5915 4.5968C11.9616 4.5968 11.4636 4.8116 11.0974 5.2404C10.7317 5.6696 10.5486 6.259 10.5486 7.009C10.5486 7.7531 10.7317 8.3381 11.0974 8.7639Z"
|
|
619
|
+
/>
|
|
620
|
+
</svg>
|
|
621
|
+
<svg aria-hidden="true" viewBox="0 0 18 14" slot="off">
|
|
622
|
+
<path
|
|
623
|
+
d="M5.73219 10.258C5.10819 10.258 4.57009 10.1218 4.11699 9.8488C3.66389 9.5758 3.31429 9.1945 3.06869 8.7057C2.82259 8.2164 2.69958 7.651 2.69958 7.0089C2.69958 6.361 2.82259 5.7926 3.06869 5.3033C3.31429 4.8145 3.66389 4.4322 4.11699 4.1558C4.57009 3.8799 5.10819 3.7417 5.73219 3.7417C6.47049 3.7417 7.07348 3.9219 7.54128 4.2817C8.00958 4.6421 8.30638 5.146 8.43238 5.7939H7.37039C7.28639 5.4282 7.10618 5.1367 6.83039 4.9209C6.55459 4.7051 6.18538 4.5967 5.72348 4.5967C5.09358 4.5967 4.59559 4.8115 4.22939 5.2403C3.86369 5.6695 3.68058 6.2589 3.68058 7.0089C3.68058 7.753 3.86369 8.338 4.22939 8.7638C4.59559 9.1901 5.09368 9.403 5.72348 9.403C6.18538 9.403 6.55459 9.3009 6.83039 9.0968C7.10629 8.8932 7.28649 8.6139 7.37039 8.2599H8.43238C8.30638 8.8839 8.00948 9.3732 7.54128 9.7272C7.07348 10.0812 6.47049 10.258 5.73219 10.258Z"
|
|
624
|
+
/>
|
|
625
|
+
<path
|
|
626
|
+
d="M12.6003 10.258C11.9763 10.258 11.4382 10.1218 10.9851 9.8488C10.532 9.5758 10.1824 9.1945 9.93685 8.7057C9.69075 8.2164 9.56775 7.651 9.56775 7.0089C9.56775 6.361 9.69075 5.7926 9.93685 5.3033C10.1824 4.8145 10.532 4.4322 10.9851 4.1558C11.4382 3.8799 11.9763 3.7417 12.6003 3.7417C13.3386 3.7417 13.9416 3.9219 14.4094 4.2817C14.8777 4.6421 15.1745 5.146 15.3005 5.7939H14.2385C14.1545 5.4282 13.9743 5.1367 13.6985 4.9209C13.4227 4.7051 13.0535 4.5967 12.5916 4.5967C11.9617 4.5967 11.4637 4.8115 11.0975 5.2403C10.7318 5.6695 10.5487 6.2589 10.5487 7.0089C10.5487 7.753 10.7318 8.338 11.0975 8.7638C11.4637 9.1901 11.9618 9.403 12.5916 9.403C13.0535 9.403 13.4227 9.3009 13.6985 9.0968C13.9744 8.8932 14.1546 8.6139 14.2385 8.2599H15.3005C15.1745 8.8839 14.8776 9.3732 14.4094 9.7272C13.9416 10.0812 13.3386 10.258 12.6003 10.258Z"
|
|
627
|
+
/>
|
|
628
|
+
<path
|
|
629
|
+
d="M15.9891 1C16.5465 1 17 1.4535 17 2.011V11.9891C17 12.5465 16.5465 13 15.9891 13H2.0109C1.4535 13 1 12.5465 1 11.9891V2.0109C1 1.4535 1.4535 0.9999 2.0109 0.9999L15.9891 1ZM15.9891 0H2.0109C0.9003 0 0 0.9003 0 2.0109V11.9891C0 13.0997 0.9003 14 2.0109 14H15.9891C17.0997 14 18 13.0997 18 11.9891V2.0109C18 0.9003 17.0997 0 15.9891 0Z"
|
|
630
|
+
/>
|
|
631
|
+
</svg>
|
|
632
|
+
</media-captions-button>
|
|
633
|
+
</media-captions-selectmenu>
|
|
634
|
+
</template>
|
|
635
|
+
|
|
636
|
+
<template partial="AirplayButton">
|
|
637
|
+
<media-airplay-button part="bottom airplay button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
638
|
+
<svg viewBox="0 0 18 14" aria-hidden="true" slot="airplay">
|
|
639
|
+
<path
|
|
640
|
+
d="M16.1383 0H1.8618C0.8335 0 0 0.8335 0 1.8617V10.1382C0 11.1664 0.8335 12 1.8618 12H3.076C3.1204 11.9433 3.1503 11.8785 3.2012 11.826L4.004 11H1.8618C1.3866 11 1 10.6134 1 10.1382V1.8617C1 1.3865 1.3866 0.9999 1.8618 0.9999H16.1383C16.6135 0.9999 17.0001 1.3865 17.0001 1.8617V10.1382C17.0001 10.6134 16.6135 11 16.1383 11H13.9961L14.7989 11.826C14.8499 11.8785 14.8798 11.9432 14.9241 12H16.1383C17.1665 12 18.0001 11.1664 18.0001 10.1382V1.8617C18 0.8335 17.1665 0 16.1383 0Z"
|
|
641
|
+
/>
|
|
642
|
+
<path
|
|
643
|
+
d="M9.55061 8.21903C9.39981 8.06383 9.20001 7.98633 9.00011 7.98633C8.80021 7.98633 8.60031 8.06383 8.44951 8.21903L4.09771 12.697C3.62471 13.1838 3.96961 13.9998 4.64831 13.9998H13.3518C14.0304 13.9998 14.3754 13.1838 13.9023 12.697L9.55061 8.21903Z"
|
|
644
|
+
/>
|
|
645
|
+
</svg>
|
|
646
|
+
</media-airplay-button>
|
|
647
|
+
</template>
|
|
648
|
+
|
|
649
|
+
<template partial="FullscreenButton">
|
|
650
|
+
<media-fullscreen-button part="bottom fullscreen button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
651
|
+
<svg viewBox="0 0 18 14" aria-hidden="true" slot="enter">
|
|
652
|
+
<path
|
|
653
|
+
d="M1.00745 4.39539L1.01445 1.98789C1.01605 1.43049 1.47085 0.978289 2.02835 0.979989L6.39375 0.992589L6.39665 -0.007411L2.03125 -0.020011C0.920646 -0.023211 0.0176463 0.874489 0.0144463 1.98509L0.00744629 4.39539H1.00745Z"
|
|
654
|
+
/>
|
|
655
|
+
<path
|
|
656
|
+
d="M17.0144 2.03431L17.0076 4.39541H18.0076L18.0144 2.03721C18.0176 0.926712 17.1199 0.0237125 16.0093 0.0205125L11.6439 0.0078125L11.641 1.00781L16.0064 1.02041C16.5638 1.02201 17.016 1.47681 17.0144 2.03431Z"
|
|
657
|
+
/>
|
|
658
|
+
<path
|
|
659
|
+
d="M16.9925 9.60498L16.9855 12.0124C16.9839 12.5698 16.5291 13.022 15.9717 13.0204L11.6063 13.0078L11.6034 14.0078L15.9688 14.0204C17.0794 14.0236 17.9823 13.1259 17.9855 12.0153L17.9925 9.60498H16.9925Z"
|
|
660
|
+
/>
|
|
661
|
+
<path
|
|
662
|
+
d="M0.985626 11.9661L0.992426 9.60498H-0.0074737L-0.0142737 11.9632C-0.0174737 13.0738 0.880226 13.9767 1.99083 13.98L6.35623 13.9926L6.35913 12.9926L1.99373 12.98C1.43633 12.9784 0.983926 12.5236 0.985626 11.9661Z"
|
|
663
|
+
/>
|
|
664
|
+
</svg>
|
|
665
|
+
<svg viewBox="0 0 18 14" aria-hidden="true" slot="exit">
|
|
666
|
+
<path
|
|
667
|
+
d="M5.39655 -0.0200195L5.38955 2.38748C5.38795 2.94488 4.93315 3.39708 4.37565 3.39538L0.0103463 3.38278L0.00744629 4.38278L4.37285 4.39538C5.48345 4.39858 6.38635 3.50088 6.38965 2.39028L6.39665 -0.0200195H5.39655Z"
|
|
668
|
+
/>
|
|
669
|
+
<path
|
|
670
|
+
d="M12.6411 2.36891L12.6479 0.0078125H11.6479L11.6411 2.36601C11.6379 3.47651 12.5356 4.37951 13.6462 4.38271L18.0116 4.39531L18.0145 3.39531L13.6491 3.38271C13.0917 3.38111 12.6395 2.92641 12.6411 2.36891Z"
|
|
671
|
+
/>
|
|
672
|
+
<path
|
|
673
|
+
d="M12.6034 14.0204L12.6104 11.613C12.612 11.0556 13.0668 10.6034 13.6242 10.605L17.9896 10.6176L17.9925 9.61759L13.6271 9.60499C12.5165 9.60179 11.6136 10.4995 11.6104 11.6101L11.6034 14.0204H12.6034Z"
|
|
674
|
+
/>
|
|
675
|
+
<path
|
|
676
|
+
d="M5.359 11.6315L5.3522 13.9926H6.3522L6.359 11.6344C6.3622 10.5238 5.4645 9.62088 4.3539 9.61758L-0.0115043 9.60498L-0.0144043 10.605L4.351 10.6176C4.9084 10.6192 5.3607 11.074 5.359 11.6315Z"
|
|
677
|
+
/>
|
|
678
|
+
</svg>
|
|
679
|
+
</media-fullscreen-button>
|
|
680
|
+
</template>
|
|
681
|
+
|
|
682
|
+
<template partial="CastButton">
|
|
683
|
+
<media-cast-button part="bottom cast button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
684
|
+
<svg viewBox="0 0 18 14" aria-hidden="true" slot="enter">
|
|
685
|
+
<path
|
|
686
|
+
d="M16.0072 0H2.0291C0.9185 0 0.0181 0.9003 0.0181 2.011V5.5009C0.357 5.5016 0.6895 5.5275 1.0181 5.5669V2.011C1.0181 1.4536 1.4716 1 2.029 1H16.0072C16.5646 1 17.0181 1.4536 17.0181 2.011V11.9891C17.0181 12.5465 16.5646 13 16.0072 13H8.4358C8.4746 13.3286 8.4999 13.6611 8.4999 13.9999H16.0071C17.1177 13.9999 18.018 13.0996 18.018 11.989V2.011C18.0181 0.9003 17.1178 0 16.0072 0ZM0 6.4999V7.4999C3.584 7.4999 6.5 10.4159 6.5 13.9999H7.5C7.5 9.8642 4.1357 6.4999 0 6.4999ZM0 8.7499V9.7499C2.3433 9.7499 4.25 11.6566 4.25 13.9999H5.25C5.25 11.1049 2.895 8.7499 0 8.7499ZM0.0181 11V14H3.0181C3.0181 12.3431 1.675 11 0.0181 11Z"
|
|
687
|
+
/>
|
|
688
|
+
</svg>
|
|
689
|
+
<svg viewBox="0 0 18 14" aria-hidden="true" slot="exist">
|
|
690
|
+
<path
|
|
691
|
+
d="M15.9891 0H2.01103C0.900434 0 3.35947e-05 0.9003 3.35947e-05 2.011V5.5009C0.338934 5.5016 0.671434 5.5275 1.00003 5.5669V2.011C1.00003 1.4536 1.45353 1 2.01093 1H15.9891C16.5465 1 17 1.4536 17 2.011V11.9891C17 12.5465 16.5465 13 15.9891 13H8.41773C8.45653 13.3286 8.48183 13.6611 8.48183 13.9999H15.989C17.0996 13.9999 17.9999 13.0996 17.9999 11.989V2.011C18 0.9003 17.0997 0 15.9891 0ZM-0.0180664 6.4999V7.4999C3.56593 7.4999 6.48193 10.4159 6.48193 13.9999H7.48193C7.48193 9.8642 4.11763 6.4999 -0.0180664 6.4999ZM-0.0180664 8.7499V9.7499C2.32523 9.7499 4.23193 11.6566 4.23193 13.9999H5.23193C5.23193 11.1049 2.87693 8.7499 -0.0180664 8.7499ZM3.35947e-05 11V14H3.00003C3.00003 12.3431 1.65693 11 3.35947e-05 11Z"
|
|
692
|
+
/>
|
|
693
|
+
<path d="M2.15002 5.634C5.18352 6.4207 7.57252 8.8151 8.35282 11.8499H15.8501V2.1499H2.15002V5.634Z" />
|
|
694
|
+
</svg>
|
|
695
|
+
</media-cast-button>
|
|
696
|
+
</template>
|
|
697
|
+
|
|
698
|
+
<template partial="LiveButton">
|
|
699
|
+
<media-live-button part="{{section ?? 'top'}} live button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
700
|
+
<span slot="text">Live</span>
|
|
701
|
+
</media-live-button>
|
|
702
|
+
</template>
|
|
703
|
+
|
|
704
|
+
<template partial="PlaybackRateButton">
|
|
705
|
+
<media-playback-rate-button
|
|
706
|
+
rates="{{playbackrates}}"
|
|
707
|
+
part="bottom playback-rate button"
|
|
708
|
+
disabled="{{disabled}}"
|
|
709
|
+
aria-disabled="{{disabled}}"
|
|
710
|
+
>
|
|
711
|
+
</media-playback-rate-button>
|
|
712
|
+
</template>
|
|
713
|
+
|
|
714
|
+
<template partial="VolumeRange">
|
|
715
|
+
<media-volume-range
|
|
716
|
+
part="bottom volume range"
|
|
717
|
+
disabled="{{disabled}}"
|
|
718
|
+
aria-disabled="{{disabled}}"
|
|
719
|
+
></media-volume-range>
|
|
720
|
+
</template>
|
|
721
|
+
|
|
722
|
+
<template partial="TimeDisplay">
|
|
723
|
+
<media-time-display
|
|
724
|
+
remaining="{{defaultshowremainingtime}}"
|
|
725
|
+
showduration="{{!hideduration}}"
|
|
726
|
+
part="bottom time display"
|
|
727
|
+
disabled="{{disabled}}"
|
|
728
|
+
aria-disabled="{{disabled}}"
|
|
729
|
+
></media-time-display>
|
|
730
|
+
</template>
|
|
731
|
+
|
|
732
|
+
<template partial="TimeRange">
|
|
733
|
+
<media-time-range part="bottom time range" disabled="{{disabled}}" aria-disabled="{{disabled}}"></media-time-range>
|
|
734
|
+
</template>
|
|
735
|
+
|
|
736
|
+
<media-controller
|
|
737
|
+
defaultstreamtype="{{defaultstreamtype ?? 'on-demand'}}"
|
|
738
|
+
breakpoints="sm:470"
|
|
739
|
+
gesturesdisabled="{{disabled}}"
|
|
740
|
+
hotkeys="{{hotkeys}}"
|
|
741
|
+
nohotkeys="{{nohotkeys}}"
|
|
742
|
+
novolumepref="{{novolumepref}}"
|
|
743
|
+
audio="{{audio}}"
|
|
744
|
+
noautoseektolive="{{noautoseektolive}}"
|
|
745
|
+
defaultsubtitles="{{defaultsubtitles}}"
|
|
746
|
+
exportparts="layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer"
|
|
747
|
+
style="--_pre-playback-place:{{preplaybackplace ?? 'center'}}"
|
|
748
|
+
id="test"
|
|
749
|
+
>
|
|
750
|
+
<slot name="media" slot="media"></slot>
|
|
751
|
+
<slot name="poster" slot="poster"></slot>
|
|
752
|
+
|
|
753
|
+
<media-loading-indicator slot="centered-chrome" no-auto-hide></media-loading-indicator>
|
|
754
|
+
|
|
755
|
+
<template if="!audio">
|
|
756
|
+
<!-- Pre-playback UI -->
|
|
757
|
+
<div slot="centered-chrome" class="center-controls pre-playback">
|
|
758
|
+
<template if="streamtype == 'on-demand'">
|
|
759
|
+
<template if="!breakpointsm"> {{>SeekBackwardButton section="center"}} </template>
|
|
760
|
+
<template if="!breakpointsm"> {{>PlayButton section="center"}} </template>
|
|
761
|
+
<template if="breakpointsm"> {{>PrePlayButton section="center"}} </template>
|
|
762
|
+
<template if="!breakpointsm"> {{>SeekForwardButton section="center"}} </template>
|
|
763
|
+
</template>
|
|
764
|
+
|
|
765
|
+
<template if="streamtype == 'live'">
|
|
766
|
+
<template if="!breakpointsm">
|
|
767
|
+
<template if="targetlivewindow > 0"> {{>SeekBackwardButton section="center"}} </template>
|
|
768
|
+
</template>
|
|
769
|
+
<template if="!breakpointsm"> {{>PlayButton section="center"}} </template>
|
|
770
|
+
<template if="breakpointsm"> {{>PrePlayButton section="center"}} </template>
|
|
771
|
+
<template if="!breakpointsm">
|
|
772
|
+
<template if="targetlivewindow > 0"> {{>SeekForwardButton section="center"}} </template>
|
|
773
|
+
</template>
|
|
774
|
+
</template>
|
|
775
|
+
</div>
|
|
776
|
+
|
|
777
|
+
<!-- Auotplay centered unmute button -->
|
|
778
|
+
<!--
|
|
779
|
+
todo: figure out how show this with available state variables
|
|
780
|
+
needs to show when:
|
|
781
|
+
- autoplay is enabled
|
|
782
|
+
- playback has been successful
|
|
783
|
+
- audio is muted
|
|
784
|
+
- in place / instead of the pre-plaback play button
|
|
785
|
+
- not to show again after user has interacted with this button
|
|
786
|
+
- OR user has interacted with the mute button in the control bar
|
|
787
|
+
-->
|
|
788
|
+
<!--
|
|
789
|
+
There should be a >MuteButton to the left of the "Unmute" text, but a templating bug
|
|
790
|
+
makes it appear even if commented out in the markup, add it back when code is un-commented
|
|
791
|
+
-->
|
|
792
|
+
<!-- <div slot="centered-chrome" class="autoplay-unmute">
|
|
793
|
+
<div role="button" class="autoplay-unmute-btn">Unmute</div>
|
|
794
|
+
</div> -->
|
|
795
|
+
|
|
796
|
+
<template if="streamtype == 'on-demand'">
|
|
797
|
+
<template if="breakpointsm">
|
|
798
|
+
<media-control-bar slot="top-chrome">{{>TitleDisplay}} </media-control-bar>
|
|
799
|
+
</template>
|
|
800
|
+
{{>TimeRange}}
|
|
801
|
+
<media-control-bar part="bottom">
|
|
802
|
+
<template if="breakpointsm">
|
|
803
|
+
{{>PlayButton}} {{>SeekBackwardButton}} {{>SeekForwardButton}} {{>TimeDisplay}}
|
|
804
|
+
</template>
|
|
805
|
+
{{>MuteButton}} {{>VolumeRange}}
|
|
806
|
+
<div class="spacer"></div>
|
|
807
|
+
<template if="breakpointsm"> {{>PlaybackRateButton}} </template>
|
|
808
|
+
{{>CaptionsMenuButton}} {{>AirplayButton}} {{>CastButton}}
|
|
809
|
+
<template if="breakpointsm"> {{>PipButton}} </template>
|
|
810
|
+
{{>FullscreenButton}}
|
|
811
|
+
</media-control-bar>
|
|
812
|
+
</template>
|
|
813
|
+
|
|
814
|
+
<template if="streamtype == 'live'">
|
|
815
|
+
<media-control-bar slot="top-chrome">
|
|
816
|
+
{{>LiveButton}}
|
|
817
|
+
<template if="breakpointsm"> {{>TitleDisplay}} </template>
|
|
818
|
+
</media-control-bar>
|
|
819
|
+
<template if="targetlivewindow > 0">{{>TimeRange}}</template>
|
|
820
|
+
<media-control-bar part="bottom">
|
|
821
|
+
<template if="breakpointsm">
|
|
822
|
+
{{>PlayButton}}
|
|
823
|
+
<template if="targetlivewindow > 0"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template>
|
|
824
|
+
</template>
|
|
825
|
+
{{>MuteButton}}
|
|
826
|
+
<div class="spacer"></div>
|
|
827
|
+
{{>CaptionsMenuButton}} {{>AirplayButton}} {{>CastButton}}
|
|
828
|
+
<template if="breakpointsm">{{>PipButton}}</template>
|
|
829
|
+
{{>FullscreenButton}}
|
|
830
|
+
</media-control-bar>
|
|
831
|
+
</template>
|
|
832
|
+
</template>
|
|
833
|
+
|
|
834
|
+
<template if="audio">
|
|
835
|
+
<template if="streamtype == 'on-demand'">
|
|
836
|
+
<template if="title">
|
|
837
|
+
<media-control-bar>{{>TitleDisplay}}</media-control-bar>
|
|
838
|
+
</template>
|
|
839
|
+
<media-control-bar part="bottom">
|
|
840
|
+
{{>PlayButton}}
|
|
841
|
+
<template if="breakpointsm"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template>
|
|
842
|
+
{{>MuteButton}}
|
|
843
|
+
<template if="breakpointsm">{{>VolumeRange}}</template>
|
|
844
|
+
{{>TimeDisplay}} {{>TimeRange}}
|
|
845
|
+
<div class="spacer"></div>
|
|
846
|
+
<template if="breakpointsm">{{>PlaybackRateButton}}</template>
|
|
847
|
+
{{>AirplayButton}} {{>CastButton}}
|
|
848
|
+
</media-control-bar>
|
|
849
|
+
</template>
|
|
850
|
+
|
|
851
|
+
<template if="streamtype == 'live'">
|
|
852
|
+
<template if="title">
|
|
853
|
+
<media-control-bar>{{>TitleDisplay}}</media-control-bar>
|
|
854
|
+
</template>
|
|
855
|
+
<media-control-bar part="bottom">
|
|
856
|
+
<template if="breakpointsm">
|
|
857
|
+
{{>PlayButton}} {{>LiveButton section="bottom"}} {{>MuteButton}} {{>VolumeRange}}
|
|
858
|
+
<template if="targetlivewindow > 0"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template>
|
|
859
|
+
</template>
|
|
860
|
+
<template if="targetlivewindow > 0"> {{>TimeDisplay}} {{>TimeRange}} </template>
|
|
861
|
+
<div class="spacer"></div>
|
|
862
|
+
{{>AirplayButton}} {{>CastButton}}
|
|
863
|
+
</media-control-bar>
|
|
864
|
+
</template>
|
|
865
|
+
</template>
|
|
866
|
+
|
|
867
|
+
<slot></slot>
|
|
868
|
+
</media-controller>
|
|
869
|
+
</template>
|
|
870
|
+
`;
|
|
871
|
+
|
|
872
|
+
// src/polyfills/index.ts
|
|
873
|
+
var EventTarget = class {
|
|
874
|
+
addEventListener() {
|
|
875
|
+
}
|
|
876
|
+
removeEventListener() {
|
|
877
|
+
}
|
|
878
|
+
dispatchEvent(_event) {
|
|
879
|
+
return true;
|
|
880
|
+
}
|
|
881
|
+
};
|
|
882
|
+
if (typeof DocumentFragment === "undefined") {
|
|
883
|
+
class DocumentFragment3 extends EventTarget {
|
|
884
|
+
}
|
|
885
|
+
globalThis.DocumentFragment = DocumentFragment3;
|
|
886
|
+
}
|
|
887
|
+
var HTMLElement = class extends EventTarget {
|
|
888
|
+
};
|
|
889
|
+
var HTMLVideoElement = class extends EventTarget {
|
|
890
|
+
};
|
|
891
|
+
var customElements = {
|
|
892
|
+
get(_name) {
|
|
893
|
+
return void 0;
|
|
894
|
+
},
|
|
895
|
+
define(_name, _constructor, _options) {
|
|
896
|
+
},
|
|
897
|
+
upgrade(_root) {
|
|
898
|
+
},
|
|
899
|
+
whenDefined(_name) {
|
|
900
|
+
return Promise.resolve(HTMLElement);
|
|
901
|
+
}
|
|
902
|
+
};
|
|
903
|
+
var _detail;
|
|
904
|
+
var CustomEvent = class {
|
|
905
|
+
constructor(typeArg, eventInitDict = {}) {
|
|
906
|
+
__privateAdd(this, _detail, void 0);
|
|
907
|
+
__privateSet(this, _detail, eventInitDict == null ? void 0 : eventInitDict.detail);
|
|
908
|
+
}
|
|
909
|
+
get detail() {
|
|
910
|
+
return __privateGet(this, _detail);
|
|
911
|
+
}
|
|
912
|
+
initCustomEvent() {
|
|
913
|
+
}
|
|
914
|
+
};
|
|
915
|
+
_detail = new WeakMap();
|
|
916
|
+
function createElement(_tagName, _options) {
|
|
917
|
+
return new HTMLElement();
|
|
918
|
+
}
|
|
919
|
+
var globalThisShim = {
|
|
920
|
+
document: {
|
|
921
|
+
createElement
|
|
922
|
+
},
|
|
923
|
+
DocumentFragment,
|
|
924
|
+
customElements,
|
|
925
|
+
CustomEvent,
|
|
926
|
+
EventTarget,
|
|
927
|
+
HTMLElement,
|
|
928
|
+
HTMLVideoElement
|
|
929
|
+
};
|
|
930
|
+
var isServer = typeof window === "undefined" || typeof globalThis.customElements === "undefined";
|
|
931
|
+
var internalGlobalThis = isServer ? globalThisShim : globalThis;
|
|
932
|
+
var internalDocument = isServer ? globalThisShim.document : globalThis.document;
|
|
933
|
+
|
|
934
|
+
// ../../node_modules/media-chrome/dist/utils/server-safe-globals.js
|
|
935
|
+
var EventTarget2 = class {
|
|
936
|
+
addEventListener() {
|
|
937
|
+
}
|
|
938
|
+
removeEventListener() {
|
|
939
|
+
}
|
|
940
|
+
dispatchEvent() {
|
|
941
|
+
return true;
|
|
942
|
+
}
|
|
943
|
+
};
|
|
944
|
+
var ResizeObserver = class {
|
|
945
|
+
observe() {
|
|
946
|
+
}
|
|
947
|
+
};
|
|
948
|
+
var documentShim = {
|
|
949
|
+
createElement: function() {
|
|
950
|
+
return new globalThisShim2.HTMLElement();
|
|
951
|
+
},
|
|
952
|
+
addEventListener() {
|
|
953
|
+
},
|
|
954
|
+
removeEventListener() {
|
|
955
|
+
}
|
|
956
|
+
};
|
|
957
|
+
var globalThisShim2 = {
|
|
958
|
+
ResizeObserver,
|
|
959
|
+
document: documentShim,
|
|
960
|
+
HTMLElement: class HTMLElement2 extends EventTarget2 {
|
|
961
|
+
},
|
|
962
|
+
DocumentFragment: class DocumentFragment2 extends EventTarget2 {
|
|
963
|
+
},
|
|
964
|
+
customElements: {
|
|
965
|
+
get: function() {
|
|
966
|
+
},
|
|
967
|
+
define: function() {
|
|
968
|
+
},
|
|
969
|
+
whenDefined: function() {
|
|
970
|
+
}
|
|
971
|
+
},
|
|
972
|
+
CustomEvent: function CustomEvent2() {
|
|
973
|
+
},
|
|
974
|
+
getComputedStyle: function() {
|
|
975
|
+
}
|
|
976
|
+
};
|
|
977
|
+
var isServer2 = typeof window === "undefined" || typeof window.customElements === "undefined";
|
|
978
|
+
var isShimmed = Object.keys(globalThisShim2).every((key) => key in globalThis);
|
|
979
|
+
var GlobalThis = isServer2 && !isShimmed ? globalThisShim2 : globalThis;
|
|
980
|
+
var Document = isServer2 && !isShimmed ? documentShim : globalThis.document;
|
|
981
|
+
|
|
982
|
+
// ../../node_modules/media-chrome/dist/utils/template-parts.js
|
|
983
|
+
var __defProp = Object.defineProperty;
|
|
984
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
985
|
+
var __publicField = (obj, key, value) => {
|
|
986
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
987
|
+
return value;
|
|
988
|
+
};
|
|
989
|
+
var __accessCheck2 = (obj, member, msg) => {
|
|
990
|
+
if (!member.has(obj))
|
|
991
|
+
throw TypeError("Cannot " + msg);
|
|
992
|
+
};
|
|
993
|
+
var __privateGet2 = (obj, member, getter) => {
|
|
994
|
+
__accessCheck2(obj, member, "read from private field");
|
|
995
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
996
|
+
};
|
|
997
|
+
var __privateAdd2 = (obj, member, value) => {
|
|
998
|
+
if (member.has(obj))
|
|
999
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
1000
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
1001
|
+
};
|
|
1002
|
+
var __privateSet2 = (obj, member, value, setter) => {
|
|
1003
|
+
__accessCheck2(obj, member, "write to private field");
|
|
1004
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
1005
|
+
return value;
|
|
1006
|
+
};
|
|
1007
|
+
var _parts;
|
|
1008
|
+
var _processor;
|
|
1009
|
+
var _items;
|
|
1010
|
+
var _value;
|
|
1011
|
+
var _element;
|
|
1012
|
+
var _attributeName;
|
|
1013
|
+
var _namespaceURI;
|
|
1014
|
+
var _list;
|
|
1015
|
+
var list_get;
|
|
1016
|
+
var _parentNode;
|
|
1017
|
+
var _nodes;
|
|
1018
|
+
var ELEMENT = 1;
|
|
1019
|
+
var STRING = 0;
|
|
1020
|
+
var PART = 1;
|
|
1021
|
+
var defaultProcessor = {
|
|
1022
|
+
processCallback(instance, parts, state) {
|
|
1023
|
+
if (!state)
|
|
1024
|
+
return;
|
|
1025
|
+
for (const [expression, part] of parts) {
|
|
1026
|
+
if (expression in state) {
|
|
1027
|
+
const value = state[expression];
|
|
1028
|
+
if (typeof value === "boolean" && part instanceof AttrPart && typeof part.element[part.attributeName] === "boolean") {
|
|
1029
|
+
part.booleanValue = value;
|
|
1030
|
+
} else if (typeof value === "function" && part instanceof AttrPart) {
|
|
1031
|
+
part.element[part.attributeName] = value;
|
|
1032
|
+
} else {
|
|
1033
|
+
part.value = value;
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
};
|
|
1039
|
+
var TemplateInstance = class extends GlobalThis.DocumentFragment {
|
|
1040
|
+
constructor(template2, state, processor2 = defaultProcessor) {
|
|
1041
|
+
var _a2;
|
|
1042
|
+
super();
|
|
1043
|
+
__privateAdd2(this, _parts, void 0);
|
|
1044
|
+
__privateAdd2(this, _processor, void 0);
|
|
1045
|
+
this.append(template2.content.cloneNode(true));
|
|
1046
|
+
__privateSet2(this, _parts, parse(this));
|
|
1047
|
+
__privateSet2(this, _processor, processor2);
|
|
1048
|
+
(_a2 = processor2.createCallback) == null ? void 0 : _a2.call(processor2, this, __privateGet2(this, _parts), state);
|
|
1049
|
+
processor2.processCallback(this, __privateGet2(this, _parts), state);
|
|
1050
|
+
}
|
|
1051
|
+
update(state) {
|
|
1052
|
+
__privateGet2(this, _processor).processCallback(this, __privateGet2(this, _parts), state);
|
|
1053
|
+
}
|
|
1054
|
+
};
|
|
1055
|
+
_parts = /* @__PURE__ */ new WeakMap();
|
|
1056
|
+
_processor = /* @__PURE__ */ new WeakMap();
|
|
1057
|
+
var parse = (element, parts = []) => {
|
|
1058
|
+
let type, value;
|
|
1059
|
+
for (let attr of element.attributes || []) {
|
|
1060
|
+
if (attr.value.includes("{{")) {
|
|
1061
|
+
const list = new AttrPartList();
|
|
1062
|
+
for ([type, value] of tokenize(attr.value)) {
|
|
1063
|
+
if (!type)
|
|
1064
|
+
list.append(value);
|
|
1065
|
+
else {
|
|
1066
|
+
const part = new AttrPart(element, attr.name, attr.namespaceURI);
|
|
1067
|
+
list.append(part);
|
|
1068
|
+
parts.push([value, part]);
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
attr.value = list.toString();
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
for (let node of element.childNodes) {
|
|
1075
|
+
if (node.nodeType === ELEMENT && !(node instanceof HTMLTemplateElement)) {
|
|
1076
|
+
parse(node, parts);
|
|
1077
|
+
} else {
|
|
1078
|
+
if (node.nodeType === ELEMENT || node.data.includes("{{")) {
|
|
1079
|
+
const items = [];
|
|
1080
|
+
if (node.data) {
|
|
1081
|
+
for ([type, value] of tokenize(node.data))
|
|
1082
|
+
if (!type)
|
|
1083
|
+
items.push(new Text(value));
|
|
1084
|
+
else {
|
|
1085
|
+
const part = new ChildNodePart(element);
|
|
1086
|
+
items.push(part);
|
|
1087
|
+
parts.push([value, part]);
|
|
1088
|
+
}
|
|
1089
|
+
} else if (node instanceof HTMLTemplateElement) {
|
|
1090
|
+
const part = new InnerTemplatePart(element, node);
|
|
1091
|
+
items.push(part);
|
|
1092
|
+
parts.push([part.expression, part]);
|
|
1093
|
+
}
|
|
1094
|
+
node.replaceWith(
|
|
1095
|
+
...items.flatMap((part) => part.replacementNodes || [part])
|
|
1096
|
+
);
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
return parts;
|
|
1101
|
+
};
|
|
1102
|
+
var mem = {};
|
|
1103
|
+
var tokenize = (text) => {
|
|
1104
|
+
let value = "", open = 0, tokens = mem[text], i = 0, c;
|
|
1105
|
+
if (tokens)
|
|
1106
|
+
return tokens;
|
|
1107
|
+
else
|
|
1108
|
+
tokens = [];
|
|
1109
|
+
for (; c = text[i]; i++) {
|
|
1110
|
+
if (c === "{" && text[i + 1] === "{" && text[i - 1] !== "\\" && text[i + 2] && ++open == 1) {
|
|
1111
|
+
if (value)
|
|
1112
|
+
tokens.push([STRING, value]);
|
|
1113
|
+
value = "";
|
|
1114
|
+
i++;
|
|
1115
|
+
} else if (c === "}" && text[i + 1] === "}" && text[i - 1] !== "\\" && !--open) {
|
|
1116
|
+
tokens.push([PART, value.trim()]);
|
|
1117
|
+
value = "";
|
|
1118
|
+
i++;
|
|
1119
|
+
} else
|
|
1120
|
+
value += c || "";
|
|
1121
|
+
}
|
|
1122
|
+
if (value)
|
|
1123
|
+
tokens.push([STRING, (open > 0 ? "{{" : "") + value]);
|
|
1124
|
+
return mem[text] = tokens;
|
|
1125
|
+
};
|
|
1126
|
+
var FRAGMENT = 11;
|
|
1127
|
+
var Part = class {
|
|
1128
|
+
get value() {
|
|
1129
|
+
return "";
|
|
1130
|
+
}
|
|
1131
|
+
set value(val) {
|
|
1132
|
+
}
|
|
1133
|
+
toString() {
|
|
1134
|
+
return this.value;
|
|
1135
|
+
}
|
|
1136
|
+
};
|
|
1137
|
+
var attrPartToList = /* @__PURE__ */ new WeakMap();
|
|
1138
|
+
var AttrPartList = class {
|
|
1139
|
+
constructor() {
|
|
1140
|
+
__privateAdd2(this, _items, []);
|
|
1141
|
+
}
|
|
1142
|
+
[Symbol.iterator]() {
|
|
1143
|
+
return __privateGet2(this, _items).values();
|
|
1144
|
+
}
|
|
1145
|
+
get length() {
|
|
1146
|
+
return __privateGet2(this, _items).length;
|
|
1147
|
+
}
|
|
1148
|
+
item(index) {
|
|
1149
|
+
return __privateGet2(this, _items)[index];
|
|
1150
|
+
}
|
|
1151
|
+
append(...items) {
|
|
1152
|
+
for (const item of items) {
|
|
1153
|
+
if (item instanceof AttrPart) {
|
|
1154
|
+
attrPartToList.set(item, this);
|
|
1155
|
+
}
|
|
1156
|
+
__privateGet2(this, _items).push(item);
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
toString() {
|
|
1160
|
+
return __privateGet2(this, _items).join("");
|
|
1161
|
+
}
|
|
1162
|
+
};
|
|
1163
|
+
_items = /* @__PURE__ */ new WeakMap();
|
|
1164
|
+
var AttrPart = class extends Part {
|
|
1165
|
+
constructor(element, attributeName, namespaceURI) {
|
|
1166
|
+
super();
|
|
1167
|
+
__privateAdd2(this, _list);
|
|
1168
|
+
__privateAdd2(this, _value, "");
|
|
1169
|
+
__privateAdd2(this, _element, void 0);
|
|
1170
|
+
__privateAdd2(this, _attributeName, void 0);
|
|
1171
|
+
__privateAdd2(this, _namespaceURI, void 0);
|
|
1172
|
+
__privateSet2(this, _element, element);
|
|
1173
|
+
__privateSet2(this, _attributeName, attributeName);
|
|
1174
|
+
__privateSet2(this, _namespaceURI, namespaceURI);
|
|
1175
|
+
}
|
|
1176
|
+
get attributeName() {
|
|
1177
|
+
return __privateGet2(this, _attributeName);
|
|
1178
|
+
}
|
|
1179
|
+
get attributeNamespace() {
|
|
1180
|
+
return __privateGet2(this, _namespaceURI);
|
|
1181
|
+
}
|
|
1182
|
+
get element() {
|
|
1183
|
+
return __privateGet2(this, _element);
|
|
1184
|
+
}
|
|
1185
|
+
get value() {
|
|
1186
|
+
return __privateGet2(this, _value);
|
|
1187
|
+
}
|
|
1188
|
+
set value(newValue) {
|
|
1189
|
+
if (__privateGet2(this, _value) === newValue)
|
|
1190
|
+
return;
|
|
1191
|
+
__privateSet2(this, _value, newValue);
|
|
1192
|
+
if (!__privateGet2(this, _list, list_get) || __privateGet2(this, _list, list_get).length === 1) {
|
|
1193
|
+
if (newValue == null) {
|
|
1194
|
+
__privateGet2(this, _element).removeAttributeNS(
|
|
1195
|
+
__privateGet2(this, _namespaceURI),
|
|
1196
|
+
__privateGet2(this, _attributeName)
|
|
1197
|
+
);
|
|
1198
|
+
} else {
|
|
1199
|
+
__privateGet2(this, _element).setAttributeNS(
|
|
1200
|
+
__privateGet2(this, _namespaceURI),
|
|
1201
|
+
__privateGet2(this, _attributeName),
|
|
1202
|
+
newValue
|
|
1203
|
+
);
|
|
1204
|
+
}
|
|
1205
|
+
} else {
|
|
1206
|
+
__privateGet2(this, _element).setAttributeNS(
|
|
1207
|
+
__privateGet2(this, _namespaceURI),
|
|
1208
|
+
__privateGet2(this, _attributeName),
|
|
1209
|
+
__privateGet2(this, _list, list_get)
|
|
1210
|
+
);
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
get booleanValue() {
|
|
1214
|
+
return __privateGet2(this, _element).hasAttributeNS(
|
|
1215
|
+
__privateGet2(this, _namespaceURI),
|
|
1216
|
+
__privateGet2(this, _attributeName)
|
|
1217
|
+
);
|
|
1218
|
+
}
|
|
1219
|
+
set booleanValue(value) {
|
|
1220
|
+
if (!__privateGet2(this, _list, list_get) || __privateGet2(this, _list, list_get).length === 1)
|
|
1221
|
+
this.value = value ? "" : null;
|
|
1222
|
+
else
|
|
1223
|
+
throw new DOMException("Value is not fully templatized");
|
|
1224
|
+
}
|
|
1225
|
+
};
|
|
1226
|
+
_value = /* @__PURE__ */ new WeakMap();
|
|
1227
|
+
_element = /* @__PURE__ */ new WeakMap();
|
|
1228
|
+
_attributeName = /* @__PURE__ */ new WeakMap();
|
|
1229
|
+
_namespaceURI = /* @__PURE__ */ new WeakMap();
|
|
1230
|
+
_list = /* @__PURE__ */ new WeakSet();
|
|
1231
|
+
list_get = function() {
|
|
1232
|
+
return attrPartToList.get(this);
|
|
1233
|
+
};
|
|
1234
|
+
var ChildNodePart = class extends Part {
|
|
1235
|
+
constructor(parentNode, nodes) {
|
|
1236
|
+
super();
|
|
1237
|
+
__privateAdd2(this, _parentNode, void 0);
|
|
1238
|
+
__privateAdd2(this, _nodes, void 0);
|
|
1239
|
+
__privateSet2(this, _parentNode, parentNode);
|
|
1240
|
+
__privateSet2(this, _nodes, nodes ? [...nodes] : [new Text()]);
|
|
1241
|
+
}
|
|
1242
|
+
get replacementNodes() {
|
|
1243
|
+
return __privateGet2(this, _nodes);
|
|
1244
|
+
}
|
|
1245
|
+
get parentNode() {
|
|
1246
|
+
return __privateGet2(this, _parentNode);
|
|
1247
|
+
}
|
|
1248
|
+
get nextSibling() {
|
|
1249
|
+
return __privateGet2(this, _nodes)[__privateGet2(this, _nodes).length - 1].nextSibling;
|
|
1250
|
+
}
|
|
1251
|
+
get previousSibling() {
|
|
1252
|
+
return __privateGet2(this, _nodes)[0].previousSibling;
|
|
1253
|
+
}
|
|
1254
|
+
get value() {
|
|
1255
|
+
return __privateGet2(this, _nodes).map((node) => node.textContent).join("");
|
|
1256
|
+
}
|
|
1257
|
+
set value(newValue) {
|
|
1258
|
+
this.replace(newValue);
|
|
1259
|
+
}
|
|
1260
|
+
replace(...nodes) {
|
|
1261
|
+
const normalisedNodes = nodes.flat().flatMap(
|
|
1262
|
+
(node) => node == null ? [new Text()] : node.forEach ? [...node] : node.nodeType === FRAGMENT ? [...node.childNodes] : node.nodeType ? [node] : [new Text(node)]
|
|
1263
|
+
);
|
|
1264
|
+
if (!normalisedNodes.length)
|
|
1265
|
+
normalisedNodes.push(new Text());
|
|
1266
|
+
__privateSet2(this, _nodes, swapdom(
|
|
1267
|
+
__privateGet2(this, _nodes)[0].parentNode,
|
|
1268
|
+
__privateGet2(this, _nodes),
|
|
1269
|
+
normalisedNodes,
|
|
1270
|
+
this.nextSibling
|
|
1271
|
+
));
|
|
1272
|
+
}
|
|
1273
|
+
};
|
|
1274
|
+
_parentNode = /* @__PURE__ */ new WeakMap();
|
|
1275
|
+
_nodes = /* @__PURE__ */ new WeakMap();
|
|
1276
|
+
var InnerTemplatePart = class extends ChildNodePart {
|
|
1277
|
+
constructor(parentNode, template2) {
|
|
1278
|
+
let directive = template2.getAttribute("directive") || template2.getAttribute("type");
|
|
1279
|
+
let expression = template2.getAttribute("expression") || template2.getAttribute(directive) || "";
|
|
1280
|
+
if (expression.startsWith("{{"))
|
|
1281
|
+
expression = expression.trim().slice(2, -2).trim();
|
|
1282
|
+
super(parentNode);
|
|
1283
|
+
__publicField(this, "directive");
|
|
1284
|
+
this.expression = expression;
|
|
1285
|
+
this.template = template2;
|
|
1286
|
+
this.directive = directive;
|
|
1287
|
+
}
|
|
1288
|
+
};
|
|
1289
|
+
function swapdom(parent, a, b, end = null) {
|
|
1290
|
+
let i = 0, cur, next, bi, n = b.length, m = a.length;
|
|
1291
|
+
while (i < n && i < m && a[i] == b[i])
|
|
1292
|
+
i++;
|
|
1293
|
+
while (i < n && i < m && b[n - 1] == a[m - 1])
|
|
1294
|
+
end = b[--m, --n];
|
|
1295
|
+
if (i == m)
|
|
1296
|
+
while (i < n)
|
|
1297
|
+
parent.insertBefore(b[i++], end);
|
|
1298
|
+
if (i == n)
|
|
1299
|
+
while (i < m)
|
|
1300
|
+
parent.removeChild(a[i++]);
|
|
1301
|
+
else {
|
|
1302
|
+
cur = a[i];
|
|
1303
|
+
while (i < n) {
|
|
1304
|
+
bi = b[i++], next = cur ? cur.nextSibling : end;
|
|
1305
|
+
if (cur == bi)
|
|
1306
|
+
cur = next;
|
|
1307
|
+
else if (i < n && b[i] == next)
|
|
1308
|
+
parent.replaceChild(bi, cur), cur = next;
|
|
1309
|
+
else
|
|
1310
|
+
parent.insertBefore(bi, cur);
|
|
1311
|
+
}
|
|
1312
|
+
while (cur != end)
|
|
1313
|
+
next = cur.nextSibling, parent.removeChild(cur), cur = next;
|
|
1314
|
+
}
|
|
1315
|
+
return b;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
// ../../node_modules/media-chrome/dist/utils/utils.js
|
|
1319
|
+
function camelCase(name) {
|
|
1320
|
+
return name.replace(/[-_]([a-z])/g, ($0, $1) => $1.toUpperCase());
|
|
1321
|
+
}
|
|
1322
|
+
function isNumericString(str) {
|
|
1323
|
+
if (typeof str != "string")
|
|
1324
|
+
return false;
|
|
1325
|
+
return !isNaN(str) && !isNaN(parseFloat(str));
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
// ../../node_modules/media-chrome/dist/utils/template-processor.js
|
|
1329
|
+
var pipeModifiers = {
|
|
1330
|
+
string: (value) => String(value)
|
|
1331
|
+
};
|
|
1332
|
+
var PartialTemplate = class {
|
|
1333
|
+
constructor(template2) {
|
|
1334
|
+
this.template = template2;
|
|
1335
|
+
this.state = void 0;
|
|
1336
|
+
}
|
|
1337
|
+
};
|
|
1338
|
+
var templates = /* @__PURE__ */ new WeakMap();
|
|
1339
|
+
var templateInstances = /* @__PURE__ */ new WeakMap();
|
|
1340
|
+
var Directives = {
|
|
1341
|
+
partial: (part, state) => {
|
|
1342
|
+
state[part.expression] = new PartialTemplate(part.template);
|
|
1343
|
+
},
|
|
1344
|
+
if: (part, state) => {
|
|
1345
|
+
var _a2;
|
|
1346
|
+
if (evaluateExpression(part.expression, state)) {
|
|
1347
|
+
if (templates.get(part) !== part.template) {
|
|
1348
|
+
templates.set(part, part.template);
|
|
1349
|
+
const tpl = new TemplateInstance(part.template, state, processor);
|
|
1350
|
+
part.replace(tpl);
|
|
1351
|
+
templateInstances.set(part, tpl);
|
|
1352
|
+
} else {
|
|
1353
|
+
(_a2 = templateInstances.get(part)) == null ? void 0 : _a2.update(state);
|
|
1354
|
+
}
|
|
1355
|
+
} else {
|
|
1356
|
+
part.replace("");
|
|
1357
|
+
templates.delete(part);
|
|
1358
|
+
templateInstances.delete(part);
|
|
1359
|
+
}
|
|
1360
|
+
}
|
|
1361
|
+
};
|
|
1362
|
+
var DirectiveNames = Object.keys(Directives);
|
|
1363
|
+
var processor = {
|
|
1364
|
+
processCallback(instance, parts, state) {
|
|
1365
|
+
var _a2, _b2;
|
|
1366
|
+
if (!state)
|
|
1367
|
+
return;
|
|
1368
|
+
for (const [expression, part] of parts) {
|
|
1369
|
+
if (part instanceof InnerTemplatePart) {
|
|
1370
|
+
if (!part.directive) {
|
|
1371
|
+
const directive = DirectiveNames.find((n) => part.template.hasAttribute(n));
|
|
1372
|
+
if (directive) {
|
|
1373
|
+
part.directive = directive;
|
|
1374
|
+
part.expression = part.template.getAttribute(directive);
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
(_a2 = Directives[part.directive]) == null ? void 0 : _a2.call(Directives, part, state);
|
|
1378
|
+
continue;
|
|
1379
|
+
}
|
|
1380
|
+
let value = evaluateExpression(expression, state);
|
|
1381
|
+
if (value instanceof PartialTemplate) {
|
|
1382
|
+
if (templates.get(part) !== value.template) {
|
|
1383
|
+
templates.set(part, value.template);
|
|
1384
|
+
value = new TemplateInstance(
|
|
1385
|
+
value.template,
|
|
1386
|
+
value.state,
|
|
1387
|
+
processor
|
|
1388
|
+
);
|
|
1389
|
+
part.value = value;
|
|
1390
|
+
templateInstances.set(part, value);
|
|
1391
|
+
} else {
|
|
1392
|
+
(_b2 = templateInstances.get(part)) == null ? void 0 : _b2.update(value.state);
|
|
1393
|
+
}
|
|
1394
|
+
continue;
|
|
1395
|
+
}
|
|
1396
|
+
if (value) {
|
|
1397
|
+
if (part instanceof AttrPart) {
|
|
1398
|
+
if (part.attributeName.startsWith("aria-")) {
|
|
1399
|
+
value = String(value);
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
if (part instanceof AttrPart) {
|
|
1403
|
+
if (typeof value === "boolean") {
|
|
1404
|
+
part.booleanValue = value;
|
|
1405
|
+
} else if (typeof value === "function") {
|
|
1406
|
+
part.element[part.attributeName] = value;
|
|
1407
|
+
} else {
|
|
1408
|
+
part.value = value;
|
|
1409
|
+
}
|
|
1410
|
+
} else {
|
|
1411
|
+
part.value = value;
|
|
1412
|
+
templates.delete(part);
|
|
1413
|
+
templateInstances.delete(part);
|
|
1414
|
+
}
|
|
1415
|
+
} else {
|
|
1416
|
+
if (part instanceof AttrPart) {
|
|
1417
|
+
part.value = void 0;
|
|
1418
|
+
} else {
|
|
1419
|
+
part.value = void 0;
|
|
1420
|
+
templates.delete(part);
|
|
1421
|
+
templateInstances.delete(part);
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
};
|
|
1427
|
+
var operators = {
|
|
1428
|
+
"!": (a) => !a,
|
|
1429
|
+
"!!": (a) => !!a,
|
|
1430
|
+
"==": (a, b) => a == b,
|
|
1431
|
+
"!=": (a, b) => a != b,
|
|
1432
|
+
">": (a, b) => a > b,
|
|
1433
|
+
">=": (a, b) => a >= b,
|
|
1434
|
+
"<": (a, b) => a < b,
|
|
1435
|
+
"<=": (a, b) => a <= b,
|
|
1436
|
+
"??": (a, b) => a != null ? a : b,
|
|
1437
|
+
"|": (a, b) => {
|
|
1438
|
+
var _a2;
|
|
1439
|
+
return (_a2 = pipeModifiers[b]) == null ? void 0 : _a2.call(pipeModifiers, a);
|
|
1440
|
+
}
|
|
1441
|
+
};
|
|
1442
|
+
function tokenizeExpression(expr) {
|
|
1443
|
+
return tokenize2(expr, {
|
|
1444
|
+
boolean: /true|false/,
|
|
1445
|
+
number: /-?\d+\.?\d*/,
|
|
1446
|
+
string: /(["'])((?:\\.|[^\\])*?)\1/,
|
|
1447
|
+
operator: /[!=><][=!]?|\?\?|\|/,
|
|
1448
|
+
ws: /\s+/,
|
|
1449
|
+
param: /[$a-z_][$\w]*/i
|
|
1450
|
+
}).filter(({ type }) => type !== "ws");
|
|
1451
|
+
}
|
|
1452
|
+
function evaluateExpression(expr, state = {}) {
|
|
1453
|
+
var _a2, _b2, _c, _d, _e, _f, _g;
|
|
1454
|
+
const tokens = tokenizeExpression(expr);
|
|
1455
|
+
if (tokens.length === 0 || tokens.some(({ type }) => !type)) {
|
|
1456
|
+
return invalidExpression(expr);
|
|
1457
|
+
}
|
|
1458
|
+
if (((_a2 = tokens[0]) == null ? void 0 : _a2.token) === ">") {
|
|
1459
|
+
const partial = state[(_b2 = tokens[1]) == null ? void 0 : _b2.token];
|
|
1460
|
+
if (!partial) {
|
|
1461
|
+
return invalidExpression(expr);
|
|
1462
|
+
}
|
|
1463
|
+
const partialState = { ...state };
|
|
1464
|
+
partial.state = partialState;
|
|
1465
|
+
const args = tokens.slice(2);
|
|
1466
|
+
for (let i = 0; i < args.length; i += 3) {
|
|
1467
|
+
const name = (_c = args[i]) == null ? void 0 : _c.token;
|
|
1468
|
+
const operator = (_d = args[i + 1]) == null ? void 0 : _d.token;
|
|
1469
|
+
const value = (_e = args[i + 2]) == null ? void 0 : _e.token;
|
|
1470
|
+
if (name && operator === "=") {
|
|
1471
|
+
partialState[name] = getParamValue(value, state);
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
return partial;
|
|
1475
|
+
}
|
|
1476
|
+
if (tokens.length === 1) {
|
|
1477
|
+
if (!isValidParam(tokens[0])) {
|
|
1478
|
+
return invalidExpression(expr);
|
|
1479
|
+
}
|
|
1480
|
+
return getParamValue(tokens[0].token, state);
|
|
1481
|
+
}
|
|
1482
|
+
if (tokens.length === 2) {
|
|
1483
|
+
const operator = (_f = tokens[0]) == null ? void 0 : _f.token;
|
|
1484
|
+
const run = operators[operator];
|
|
1485
|
+
if (!run || !isValidParam(tokens[1])) {
|
|
1486
|
+
return invalidExpression(expr);
|
|
1487
|
+
}
|
|
1488
|
+
const a = getParamValue(tokens[1].token, state);
|
|
1489
|
+
return run(a);
|
|
1490
|
+
}
|
|
1491
|
+
if (tokens.length === 3) {
|
|
1492
|
+
const operator = (_g = tokens[1]) == null ? void 0 : _g.token;
|
|
1493
|
+
const run = operators[operator];
|
|
1494
|
+
if (!run || !isValidParam(tokens[0]) || !isValidParam(tokens[2])) {
|
|
1495
|
+
return invalidExpression(expr);
|
|
1496
|
+
}
|
|
1497
|
+
const a = getParamValue(tokens[0].token, state);
|
|
1498
|
+
if (operator === "|") {
|
|
1499
|
+
return run(a, tokens[2].token);
|
|
1500
|
+
}
|
|
1501
|
+
const b = getParamValue(tokens[2].token, state);
|
|
1502
|
+
return run(a, b);
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
function invalidExpression(expr) {
|
|
1506
|
+
console.warn(`Warning: invalid expression \`${expr}\``);
|
|
1507
|
+
return false;
|
|
1508
|
+
}
|
|
1509
|
+
function isValidParam({ type }) {
|
|
1510
|
+
return ["number", "boolean", "string", "param"].includes(type);
|
|
1511
|
+
}
|
|
1512
|
+
function getParamValue(raw, state) {
|
|
1513
|
+
const firstChar = raw[0];
|
|
1514
|
+
const lastChar = raw.slice(-1);
|
|
1515
|
+
if (raw === "true" || raw === "false") {
|
|
1516
|
+
return raw === "true";
|
|
1517
|
+
}
|
|
1518
|
+
if (firstChar === lastChar && [`'`, `"`].includes(firstChar)) {
|
|
1519
|
+
return raw.slice(1, -1);
|
|
1520
|
+
}
|
|
1521
|
+
if (isNumericString(raw)) {
|
|
1522
|
+
return parseFloat(raw);
|
|
1523
|
+
}
|
|
1524
|
+
return state[raw];
|
|
1525
|
+
}
|
|
1526
|
+
function tokenize2(str, parsers) {
|
|
1527
|
+
let len, match, token, tokens = [];
|
|
1528
|
+
while (str) {
|
|
1529
|
+
token = null;
|
|
1530
|
+
len = str.length;
|
|
1531
|
+
for (let key in parsers) {
|
|
1532
|
+
match = parsers[key].exec(str);
|
|
1533
|
+
if (match && match.index < len) {
|
|
1534
|
+
token = {
|
|
1535
|
+
token: match[0],
|
|
1536
|
+
type: key,
|
|
1537
|
+
matches: match.slice(1)
|
|
1538
|
+
};
|
|
1539
|
+
len = match.index;
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
if (len) {
|
|
1543
|
+
tokens.push({
|
|
1544
|
+
token: str.substr(0, len),
|
|
1545
|
+
type: void 0
|
|
1546
|
+
});
|
|
1547
|
+
}
|
|
1548
|
+
if (token) {
|
|
1549
|
+
tokens.push(token);
|
|
1550
|
+
}
|
|
1551
|
+
str = str.substr(len + (token ? token.token.length : 0));
|
|
1552
|
+
}
|
|
1553
|
+
return tokens;
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
// ../../node_modules/media-chrome/dist/media-theme-element.js
|
|
1557
|
+
var __defProp2 = Object.defineProperty;
|
|
1558
|
+
var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1559
|
+
var __publicField2 = (obj, key, value) => {
|
|
1560
|
+
__defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1561
|
+
return value;
|
|
1562
|
+
};
|
|
1563
|
+
var __accessCheck3 = (obj, member, msg) => {
|
|
1564
|
+
if (!member.has(obj))
|
|
1565
|
+
throw TypeError("Cannot " + msg);
|
|
1566
|
+
};
|
|
1567
|
+
var __privateGet3 = (obj, member, getter) => {
|
|
1568
|
+
__accessCheck3(obj, member, "read from private field");
|
|
1569
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
1570
|
+
};
|
|
1571
|
+
var __privateAdd3 = (obj, member, value) => {
|
|
1572
|
+
if (member.has(obj))
|
|
1573
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
1574
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
1575
|
+
};
|
|
1576
|
+
var __privateSet3 = (obj, member, value, setter) => {
|
|
1577
|
+
__accessCheck3(obj, member, "write to private field");
|
|
1578
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
1579
|
+
return value;
|
|
1580
|
+
};
|
|
1581
|
+
var __privateMethod = (obj, member, method) => {
|
|
1582
|
+
__accessCheck3(obj, member, "access private method");
|
|
1583
|
+
return method;
|
|
1584
|
+
};
|
|
1585
|
+
var _template;
|
|
1586
|
+
var _prevTemplate;
|
|
1587
|
+
var _prevTemplateId;
|
|
1588
|
+
var _upgradeProperty;
|
|
1589
|
+
var upgradeProperty_fn;
|
|
1590
|
+
var _updateTemplate;
|
|
1591
|
+
var updateTemplate_fn;
|
|
1592
|
+
var observedMediaAttributes = {
|
|
1593
|
+
mediatargetlivewindow: "targetlivewindow",
|
|
1594
|
+
mediastreamtype: "streamtype"
|
|
1595
|
+
};
|
|
1596
|
+
var prependTemplate = Document.createElement("template");
|
|
1597
|
+
prependTemplate.innerHTML = `
|
|
1598
|
+
<style>
|
|
1599
|
+
:host {
|
|
1600
|
+
display: inline-block;
|
|
1601
|
+
line-height: 0;
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
media-controller {
|
|
1605
|
+
width: 100%;
|
|
1606
|
+
height: 100%;
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
media-controller:not([mediasubtitleslist]) media-captions-selectmenu,
|
|
1610
|
+
media-captions-button:not([mediasubtitleslist]),
|
|
1611
|
+
media-rendition-selectmenu[mediarenditionunavailable],
|
|
1612
|
+
media-volume-range[mediavolumeunavailable],
|
|
1613
|
+
media-airplay-button[mediaairplayunavailable],
|
|
1614
|
+
media-fullscreen-button[mediafullscreenunavailable],
|
|
1615
|
+
media-cast-button[mediacastunavailable],
|
|
1616
|
+
media-pip-button[mediapipunavailable] {
|
|
1617
|
+
display: none;
|
|
1618
|
+
}
|
|
1619
|
+
</style>
|
|
1620
|
+
`;
|
|
1621
|
+
var MediaThemeElement = class extends GlobalThis.HTMLElement {
|
|
1622
|
+
constructor() {
|
|
1623
|
+
super();
|
|
1624
|
+
__privateAdd3(this, _upgradeProperty);
|
|
1625
|
+
__privateAdd3(this, _updateTemplate);
|
|
1626
|
+
__publicField2(this, "renderRoot");
|
|
1627
|
+
__publicField2(this, "renderer");
|
|
1628
|
+
__privateAdd3(this, _template, void 0);
|
|
1629
|
+
__privateAdd3(this, _prevTemplate, void 0);
|
|
1630
|
+
__privateAdd3(this, _prevTemplateId, void 0);
|
|
1631
|
+
if (this.shadowRoot) {
|
|
1632
|
+
this.renderRoot = this.shadowRoot;
|
|
1633
|
+
} else {
|
|
1634
|
+
this.renderRoot = this.attachShadow({ mode: "open" });
|
|
1635
|
+
this.createRenderer();
|
|
1636
|
+
}
|
|
1637
|
+
const observer = new MutationObserver((mutationList) => {
|
|
1638
|
+
if (mutationList.some((mutation) => {
|
|
1639
|
+
const target = mutation.target;
|
|
1640
|
+
if (target === this)
|
|
1641
|
+
return true;
|
|
1642
|
+
if (target.localName !== "media-controller")
|
|
1643
|
+
return false;
|
|
1644
|
+
if (observedMediaAttributes[mutation.attributeName])
|
|
1645
|
+
return true;
|
|
1646
|
+
if (mutation.attributeName.startsWith("breakpoint"))
|
|
1647
|
+
return true;
|
|
1648
|
+
return false;
|
|
1649
|
+
})) {
|
|
1650
|
+
this.render();
|
|
1651
|
+
}
|
|
1652
|
+
});
|
|
1653
|
+
observer.observe(this, { attributes: true });
|
|
1654
|
+
observer.observe(this.renderRoot, {
|
|
1655
|
+
attributes: true,
|
|
1656
|
+
subtree: true
|
|
1657
|
+
});
|
|
1658
|
+
__privateMethod(this, _upgradeProperty, upgradeProperty_fn).call(this, "template");
|
|
1659
|
+
}
|
|
1660
|
+
get mediaController() {
|
|
1661
|
+
return this.renderRoot.querySelector("media-controller");
|
|
1662
|
+
}
|
|
1663
|
+
get template() {
|
|
1664
|
+
var _a2;
|
|
1665
|
+
return (_a2 = __privateGet3(this, _template)) != null ? _a2 : this.constructor.template;
|
|
1666
|
+
}
|
|
1667
|
+
set template(element) {
|
|
1668
|
+
__privateSet3(this, _prevTemplateId, null);
|
|
1669
|
+
__privateSet3(this, _template, element);
|
|
1670
|
+
this.createRenderer();
|
|
1671
|
+
}
|
|
1672
|
+
get props() {
|
|
1673
|
+
var _a2, _b2, _c;
|
|
1674
|
+
const observedAttributes = [
|
|
1675
|
+
...Array.from((_b2 = (_a2 = this.mediaController) == null ? void 0 : _a2.attributes) != null ? _b2 : []).filter(({ name }) => {
|
|
1676
|
+
return observedMediaAttributes[name] || name.startsWith("breakpoint");
|
|
1677
|
+
}),
|
|
1678
|
+
...Array.from(this.attributes)
|
|
1679
|
+
];
|
|
1680
|
+
const props = {};
|
|
1681
|
+
for (let attr of observedAttributes) {
|
|
1682
|
+
const name = (_c = observedMediaAttributes[attr.name]) != null ? _c : camelCase(attr.name);
|
|
1683
|
+
let { value } = attr;
|
|
1684
|
+
if (value != null) {
|
|
1685
|
+
if (isNumericString(value)) {
|
|
1686
|
+
value = parseFloat(value);
|
|
1687
|
+
}
|
|
1688
|
+
props[name] = value === "" ? true : value;
|
|
1689
|
+
} else {
|
|
1690
|
+
props[name] = false;
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
return props;
|
|
1694
|
+
}
|
|
1695
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
1696
|
+
if (attrName === "template" && oldValue != newValue) {
|
|
1697
|
+
__privateMethod(this, _updateTemplate, updateTemplate_fn).call(this);
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
connectedCallback() {
|
|
1701
|
+
__privateMethod(this, _updateTemplate, updateTemplate_fn).call(this);
|
|
1702
|
+
}
|
|
1703
|
+
createRenderer() {
|
|
1704
|
+
if (this.template && this.template !== __privateGet3(this, _prevTemplate)) {
|
|
1705
|
+
__privateSet3(this, _prevTemplate, this.template);
|
|
1706
|
+
this.renderer = new TemplateInstance(
|
|
1707
|
+
this.template,
|
|
1708
|
+
this.props,
|
|
1709
|
+
this.constructor.processor
|
|
1710
|
+
);
|
|
1711
|
+
this.renderRoot.textContent = "";
|
|
1712
|
+
this.renderRoot.append(
|
|
1713
|
+
prependTemplate.content.cloneNode(true),
|
|
1714
|
+
this.renderer
|
|
1715
|
+
);
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
render() {
|
|
1719
|
+
var _a2;
|
|
1720
|
+
(_a2 = this.renderer) == null ? void 0 : _a2.update(this.props);
|
|
1721
|
+
}
|
|
1722
|
+
};
|
|
1723
|
+
_template = /* @__PURE__ */ new WeakMap();
|
|
1724
|
+
_prevTemplate = /* @__PURE__ */ new WeakMap();
|
|
1725
|
+
_prevTemplateId = /* @__PURE__ */ new WeakMap();
|
|
1726
|
+
_upgradeProperty = /* @__PURE__ */ new WeakSet();
|
|
1727
|
+
upgradeProperty_fn = function(prop) {
|
|
1728
|
+
if (Object.prototype.hasOwnProperty.call(this, prop)) {
|
|
1729
|
+
const value = this[prop];
|
|
1730
|
+
delete this[prop];
|
|
1731
|
+
this[prop] = value;
|
|
1732
|
+
}
|
|
1733
|
+
};
|
|
1734
|
+
_updateTemplate = /* @__PURE__ */ new WeakSet();
|
|
1735
|
+
updateTemplate_fn = function() {
|
|
1736
|
+
var _a2;
|
|
1737
|
+
const templateId = this.getAttribute("template");
|
|
1738
|
+
if (!templateId || templateId === __privateGet3(this, _prevTemplateId))
|
|
1739
|
+
return;
|
|
1740
|
+
const rootNode = this.getRootNode();
|
|
1741
|
+
const template2 = (_a2 = rootNode == null ? void 0 : rootNode.getElementById) == null ? void 0 : _a2.call(rootNode, templateId);
|
|
1742
|
+
if (template2) {
|
|
1743
|
+
__privateSet3(this, _prevTemplateId, templateId);
|
|
1744
|
+
__privateSet3(this, _template, template2);
|
|
1745
|
+
this.createRenderer();
|
|
1746
|
+
return;
|
|
1747
|
+
}
|
|
1748
|
+
if (isValidUrl(templateId)) {
|
|
1749
|
+
__privateSet3(this, _prevTemplateId, templateId);
|
|
1750
|
+
request(templateId).then((data) => {
|
|
1751
|
+
const template22 = Document.createElement("template");
|
|
1752
|
+
template22.innerHTML = data;
|
|
1753
|
+
__privateSet3(this, _template, template22);
|
|
1754
|
+
this.createRenderer();
|
|
1755
|
+
}).catch(console.error);
|
|
1756
|
+
}
|
|
1757
|
+
};
|
|
1758
|
+
__publicField2(MediaThemeElement, "template");
|
|
1759
|
+
__publicField2(MediaThemeElement, "observedAttributes", ["template"]);
|
|
1760
|
+
__publicField2(MediaThemeElement, "processor", processor);
|
|
1761
|
+
function isValidUrl(url) {
|
|
1762
|
+
if (!/^(\/|\.\/|https?:\/\/)/.test(url))
|
|
1763
|
+
return false;
|
|
1764
|
+
const base = /^https?:\/\//.test(url) ? void 0 : location.origin;
|
|
1765
|
+
try {
|
|
1766
|
+
new URL(url, base);
|
|
1767
|
+
} catch (e) {
|
|
1768
|
+
return false;
|
|
1769
|
+
}
|
|
1770
|
+
return true;
|
|
1771
|
+
}
|
|
1772
|
+
async function request(resource) {
|
|
1773
|
+
const response = await fetch(resource);
|
|
1774
|
+
if (response.status !== 200) {
|
|
1775
|
+
throw new Error(`Failed to load resource: the server responded with a status of ${response.status}`);
|
|
1776
|
+
}
|
|
1777
|
+
return response.text();
|
|
1778
|
+
}
|
|
1779
|
+
if (!GlobalThis.customElements.get("media-theme")) {
|
|
1780
|
+
GlobalThis.customElements.define("media-theme", MediaThemeElement);
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
// src/themes/2023/index.ts
|
|
1784
|
+
var template = internalDocument.createElement("template");
|
|
1785
|
+
if ("innerHTML" in template)
|
|
1786
|
+
template.innerHTML = __default;
|
|
1787
|
+
var _a, _b;
|
|
1788
|
+
var MediaTheme2023 = class extends MediaThemeElement {
|
|
1789
|
+
};
|
|
1790
|
+
MediaTheme2023.template = (_b = (_a = template.content) == null ? void 0 : _a.children) == null ? void 0 : _b[0];
|
|
1791
|
+
if (!internalGlobalThis.customElements.get("media-theme-2023")) {
|
|
1792
|
+
internalGlobalThis.customElements.define("media-theme-2023", MediaTheme2023);
|
|
1793
|
+
}
|
|
1794
|
+
var __default2 = MediaTheme2023;
|
|
1795
|
+
export {
|
|
1796
|
+
__default2 as default
|
|
1797
|
+
};
|