@grizzshutsdown/simpleplayer 0.1.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.
@@ -0,0 +1,1749 @@
1
+ var Pi = Object.defineProperty;
2
+ var Ke = (m) => {
3
+ throw TypeError(m);
4
+ };
5
+ var Ei = (m, b, i) => b in m ? Pi(m, b, { enumerable: !0, configurable: !0, writable: !0, value: i }) : m[b] = i;
6
+ var Ge = (m, b, i) => Ei(m, typeof b != "symbol" ? b + "" : b, i), Ve = (m, b, i) => b.has(m) || Ke("Cannot " + i);
7
+ var t = (m, b, i) => (Ve(m, b, "read from private field"), i ? i.call(m) : b.get(m)), n = (m, b, i) => b.has(m) ? Ke("Cannot add the same private member more than once") : b instanceof WeakSet ? b.add(m) : b.set(m, i), o = (m, b, i, a) => (Ve(m, b, "write to private field"), a ? a.call(m, i) : b.set(m, i), i), e = (m, b, i) => (Ve(m, b, "access private method"), i);
8
+ const Je = "16 / 9", Ti = "360px 0px", Ci = `
9
+ :host {
10
+ --simple-player-aspect-ratio: ${Je};
11
+ --space: 4px;
12
+ --white: #fff;
13
+ --black: #000;
14
+ --white-rgb: 255 255 255;
15
+ --overlay-soft: rgb(0 0 0 / 0.42);
16
+ --overlay-blur: 0px;
17
+ --sp-glass-surface: rgb(255 255 255 / 0.04);
18
+ --sp-glass-opacity: 0.28;
19
+ --sp-control-glass-surface: rgb(255 255 255 / 0.12);
20
+ --sp-control-glass-opacity: 0.62;
21
+ --sp-control-hover-surface: rgb(255 255 255 / 0.14);
22
+ --sp-glass-filter: invert(1) grayscale(1);
23
+ --sp-shimmer-highlight: rgb(255 255 255 / 0.42);
24
+ --sp-control-tray-display: block;
25
+ --sp-enabled-controls-count: 3;
26
+ --sp-control-tray-width: 0px;
27
+ --sp-control-tray-expanded-width: calc((var(--sp-control-slot-size) * var(--sp-enabled-controls-count)) + (var(--sp-control-tray-padding) * 2));
28
+ --sp-control-tray-gap: 0px;
29
+ --sp-control-icon-size: 20px;
30
+ --sp-control-icon-render-size: 20px;
31
+ --sp-control-icon-opacity: 0.82;
32
+ --sp-control-icon-hidden-opacity: 0;
33
+ --sp-control-icon-hidden-transform: translateY(2px) scale(0.84);
34
+ --sp-control-icon-hover-opacity: 0.96;
35
+ --sp-control-icon-stroke-width: 1.6;
36
+ --sp-control-icon-delay-1: 30ms;
37
+ --sp-control-icon-delay-2: 55ms;
38
+ --sp-control-icon-delay-3: 80ms;
39
+ --sp-control-hover-opacity: 1;
40
+ --sp-control-slot-hover-surface: transparent;
41
+ --sp-control-tray-padding: 2px;
42
+ --sp-control-slot-size: calc(var(--sp-control-icon-size) + 4px);
43
+ --sp-touch-control-hover-offset: -9999px;
44
+ --sp-volume-level: 100%;
45
+
46
+ position: relative;
47
+ display: block;
48
+ width: 100%;
49
+ aspect-ratio: var(--simple-player-aspect-ratio);
50
+ isolation: isolate;
51
+ overflow: hidden;
52
+ contain: paint;
53
+ background: #1E1E1E;
54
+ }
55
+
56
+ .sp-video {
57
+ display: block;
58
+ width: 100%;
59
+ height: 100%;
60
+ border: 0;
61
+ object-fit: cover;
62
+ }
63
+
64
+ .sp-asset {
65
+ pointer-events: none;
66
+ opacity: 0;
67
+ transition: opacity 160ms ease;
68
+ user-select: none;
69
+ -webkit-user-select: none;
70
+ -webkit-user-drag: none;
71
+ -webkit-touch-callout: none;
72
+ }
73
+
74
+ .sp-player.has-visible-frame .sp-asset {
75
+ opacity: 1;
76
+ }
77
+
78
+ .sp-player {
79
+ position: absolute;
80
+ inset: 0;
81
+ display: block;
82
+ width: 100%;
83
+ height: 100%;
84
+ min-width: 100%;
85
+ min-height: 100%;
86
+ overflow: hidden;
87
+ --sp-progress-inset: 100%;
88
+ --sp-scrub-preview-left: 0px;
89
+ --sp-return-marker-left: 0px;
90
+ --sp-return-marker-base-opacity: 1;
91
+ --sp-return-marker-hole-left: -9999px;
92
+ user-select: none;
93
+ -webkit-user-select: none;
94
+ -webkit-touch-callout: none;
95
+ -webkit-tap-highlight-color: transparent;
96
+ }
97
+
98
+ .sp-player:fullscreen {
99
+ position: fixed;
100
+ inset: 0;
101
+ width: 100vw;
102
+ height: 100vh;
103
+ min-width: 100vw;
104
+ min-height: 100vh;
105
+ background: #1E1E1E;
106
+ }
107
+
108
+ .sp-player:-webkit-full-screen {
109
+ position: fixed;
110
+ inset: 0;
111
+ width: 100vw;
112
+ height: 100vh;
113
+ min-width: 100vw;
114
+ min-height: 100vh;
115
+ background: #1E1E1E;
116
+ }
117
+
118
+ .sp-overlay {
119
+ position: absolute;
120
+ inset: 0;
121
+ z-index: 2;
122
+ width: 100%;
123
+ height: 100%;
124
+ pointer-events: none;
125
+ background-color: var(--overlay-soft);
126
+ backdrop-filter: blur(var(--overlay-blur));
127
+ -webkit-backdrop-filter: blur(var(--overlay-blur));
128
+ opacity: 0;
129
+ transition: opacity 260ms ease;
130
+ transform: translateZ(0);
131
+ }
132
+
133
+ .sp-player.is-pointer-active .sp-overlay,
134
+ .sp-player.is-controls-visible .sp-overlay,
135
+ :host(:hover) .sp-overlay {
136
+ opacity: 1;
137
+ }
138
+
139
+ .sp-player.is-loading:not(.has-loaded-once).is-pointer-active .sp-overlay,
140
+ .sp-player.is-loading:not(.has-loaded-once).is-controls-visible .sp-overlay {
141
+ opacity: 0;
142
+ }
143
+
144
+ .sp-player.is-loading:not(.has-loaded-once) .sp-button {
145
+ opacity: 0;
146
+ pointer-events: none;
147
+ }
148
+
149
+ .sp-button {
150
+ position: absolute;
151
+ top: 50%;
152
+ left: 50%;
153
+ z-index: 3;
154
+ display: grid;
155
+ place-items: center;
156
+ width: 60px;
157
+ height: 60px;
158
+ padding: 0;
159
+ border: 0;
160
+ border-radius: 0;
161
+ color: var(--white);
162
+ background: transparent;
163
+ cursor: pointer;
164
+ opacity: 0;
165
+ pointer-events: none;
166
+ transform: translate(-50%, -50%) scale(0.96);
167
+ transition: opacity 260ms ease, transform 260ms cubic-bezier(0.23, 1, 0.32, 1);
168
+ -webkit-tap-highlight-color: transparent;
169
+ }
170
+
171
+ .sp-player.is-pointer-active .sp-button,
172
+ .sp-player.is-controls-visible .sp-button,
173
+ :host(:hover) .sp-button {
174
+ opacity: 1;
175
+ pointer-events: auto;
176
+ transform: translate(-50%, -50%) scale(1);
177
+ }
178
+
179
+ .sp-player.is-scrubbing .sp-button,
180
+ .sp-player.is-loading:not(.has-loaded-once).is-pointer-active .sp-button,
181
+ .sp-player.is-loading:not(.has-loaded-once).is-controls-visible .sp-button {
182
+ opacity: 0;
183
+ pointer-events: none;
184
+ }
185
+
186
+ .sp-button:focus {
187
+ outline: 0;
188
+ }
189
+
190
+ .sp-icon {
191
+ grid-area: 1 / 1;
192
+ position: relative;
193
+ z-index: 1;
194
+ display: block;
195
+ overflow: visible;
196
+ transition: opacity 160ms ease, transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
197
+ }
198
+
199
+ .sp-icon--play {
200
+ width: 54px;
201
+ height: 60px;
202
+ opacity: 1;
203
+ transform: translate(4px, 0) rotate(0deg) scale(1);
204
+ }
205
+
206
+ .sp-icon--pause {
207
+ width: 54px;
208
+ height: 60px;
209
+ opacity: 0;
210
+ transform: translate(0, 0) rotate(-70deg) scale(0.72);
211
+ }
212
+
213
+ .sp-player.is-playing .sp-icon--play {
214
+ opacity: 0;
215
+ transform: translate(4px, 0) rotate(70deg) scale(0.72);
216
+ }
217
+
218
+ .sp-player.is-playing .sp-icon--pause {
219
+ opacity: 1;
220
+ transform: translate(0, 0) rotate(0deg) scale(1);
221
+ }
222
+
223
+ .sp-progress-cluster {
224
+ position: absolute;
225
+ top: calc(100% - 28px);
226
+ left: 50%;
227
+ z-index: 4;
228
+ display: block;
229
+ width: calc(100% - (var(--space) * 8));
230
+ height: 28px;
231
+ --sp-progress-height: 4px;
232
+ transform: translateX(-50%);
233
+ transition:
234
+ top 360ms cubic-bezier(0.23, 1, 0.32, 1),
235
+ width 360ms cubic-bezier(0.23, 1, 0.32, 1),
236
+ height 360ms cubic-bezier(0.23, 1, 0.32, 1),
237
+ transform 360ms cubic-bezier(0.23, 1, 0.32, 1);
238
+ }
239
+
240
+ .sp-progress {
241
+ position: relative;
242
+ flex: 1 1 auto;
243
+ min-width: 0;
244
+ height: 28px;
245
+ cursor: pointer;
246
+ touch-action: none;
247
+ }
248
+
249
+ .sp-player.is-loading:not(.has-loaded-once) .sp-progress-cluster {
250
+ top: 50%;
251
+ left: 50%;
252
+ width: min(148px, calc(100% - (var(--space) * 12)));
253
+ height: 20px;
254
+ --sp-progress-height: 4px;
255
+ transform: translate(-50%, -50%);
256
+ }
257
+
258
+ .sp-progress-surface,
259
+ .sp-progress-fill {
260
+ position: absolute;
261
+ bottom: calc(var(--space) * 2);
262
+ left: 0;
263
+ height: var(--sp-progress-height);
264
+ border-radius: 3px;
265
+ transition: height 180ms ease, opacity 120ms ease;
266
+ }
267
+
268
+ .sp-progress-surface {
269
+ right: 0;
270
+ bottom: calc((var(--space) * 2) - 2px);
271
+ z-index: 0;
272
+ height: calc(var(--sp-progress-height) + 4px);
273
+ border-radius: 5px;
274
+ background: var(--sp-glass-surface);
275
+ opacity: var(--sp-glass-opacity);
276
+ overflow: hidden;
277
+ backdrop-filter: var(--sp-glass-filter);
278
+ -webkit-backdrop-filter: var(--sp-glass-filter);
279
+ transform: translateZ(0);
280
+ }
281
+
282
+ .sp-progress-surface::after {
283
+ content: '';
284
+ position: absolute;
285
+ inset: 0;
286
+ pointer-events: none;
287
+ opacity: 0;
288
+ border-radius: inherit;
289
+ background: linear-gradient(90deg, transparent 0%, var(--sp-shimmer-highlight) 46%, transparent 100%);
290
+ transform: translateX(-120%);
291
+ }
292
+
293
+ .sp-player.is-loading .sp-progress-surface::after {
294
+ opacity: 1;
295
+ animation: sp-progress-shimmer 1.35s ease-in-out infinite;
296
+ }
297
+
298
+ .sp-player.is-loading.has-loaded-once .sp-progress-surface {
299
+ opacity: 0.48;
300
+ }
301
+
302
+ .sp-player.is-loading:not(.has-loaded-once) .sp-progress-surface {
303
+ background: rgb(255 255 255 / 0.08);
304
+ opacity: 1;
305
+ backdrop-filter: none;
306
+ -webkit-backdrop-filter: none;
307
+ }
308
+
309
+ .sp-player.is-loading:not(.has-loaded-once) .sp-progress-fill,
310
+ .sp-player.is-progress-settling .sp-progress-fill {
311
+ opacity: 0;
312
+ }
313
+
314
+ .sp-progress-cluster:has(.sp-progress:hover),
315
+ .sp-player.is-scrubbing .sp-progress-cluster {
316
+ --sp-progress-height: 14px;
317
+ }
318
+
319
+ .sp-player.is-loading:not(.has-loaded-once) .sp-progress-cluster:has(.sp-progress:hover) {
320
+ --sp-progress-height: 4px;
321
+ }
322
+
323
+ .sp-control-tray {
324
+ position: absolute;
325
+ display: var(--sp-control-tray-display);
326
+ right: 0;
327
+ bottom: calc(((var(--space) * 2) - 2px) + var(--sp-progress-height) + 8px);
328
+ z-index: 3;
329
+ width: var(--sp-control-tray-expanded-width);
330
+ height: calc(var(--sp-control-slot-size) + (var(--sp-control-tray-padding) * 2));
331
+ opacity: 0;
332
+ pointer-events: none;
333
+ filter: blur(0.8px);
334
+ transform: translateY(4px) scale(0.96);
335
+ transform-origin: right bottom;
336
+ transition:
337
+ bottom 180ms ease,
338
+ width 360ms cubic-bezier(0.23, 1, 0.32, 1),
339
+ height 360ms cubic-bezier(0.23, 1, 0.32, 1),
340
+ opacity 220ms ease,
341
+ filter 260ms ease,
342
+ transform 300ms cubic-bezier(0.18, 0.9, 0.22, 1);
343
+ }
344
+
345
+ .sp-player.is-pointer-active .sp-control-tray,
346
+ .sp-player.is-controls-visible .sp-control-tray,
347
+ :host(:hover) .sp-control-tray {
348
+ opacity: 1;
349
+ pointer-events: auto;
350
+ filter: blur(0);
351
+ transform: translateY(0) scale(1);
352
+ }
353
+
354
+ .sp-control-tray::before {
355
+ content: '';
356
+ position: absolute;
357
+ inset: 0;
358
+ border-radius: 5px;
359
+ background: var(--sp-control-glass-surface);
360
+ opacity: var(--sp-control-glass-opacity);
361
+ overflow: hidden;
362
+ backdrop-filter: var(--sp-glass-filter);
363
+ -webkit-backdrop-filter: var(--sp-glass-filter);
364
+ box-shadow: inset 0 0 0 1px rgb(var(--white-rgb) / 0.08);
365
+ transform: translateZ(0);
366
+ transition: height 180ms ease, opacity 120ms ease;
367
+ }
368
+
369
+ .sp-control-tray-slots {
370
+ position: absolute;
371
+ inset: 0;
372
+ z-index: 1;
373
+ display: flex;
374
+ align-items: center;
375
+ gap: 0;
376
+ height: 100%;
377
+ box-sizing: border-box;
378
+ padding: var(--sp-control-tray-padding);
379
+ border-radius: 5px;
380
+ overflow: visible;
381
+ opacity: 1;
382
+ transition: height 180ms ease;
383
+ }
384
+
385
+ .sp-control-tray-slots::before {
386
+ content: '';
387
+ position: absolute;
388
+ top: var(--sp-control-tray-padding);
389
+ left: var(--sp-control-tray-padding);
390
+ z-index: 0;
391
+ width: var(--sp-control-slot-size);
392
+ height: var(--sp-control-slot-size);
393
+ border-radius: 3px;
394
+ background: var(--sp-control-hover-surface);
395
+ opacity: 0;
396
+ pointer-events: none;
397
+ transform: translateX(var(--sp-control-hover-offset, 0px));
398
+ transition:
399
+ opacity 120ms ease,
400
+ transform 240ms cubic-bezier(0.18, 0.9, 0.22, 1);
401
+ }
402
+
403
+ .sp-control-tray-slots:has(.sp-control-button:hover)::before {
404
+ opacity: var(--sp-control-hover-opacity);
405
+ transition:
406
+ opacity 80ms ease 120ms,
407
+ transform 160ms cubic-bezier(0.18, 0.9, 0.22, 1);
408
+ }
409
+
410
+ .sp-control-tray-slots:has(.sp-control-button.is-control-tap-active)::before {
411
+ opacity: var(--sp-control-hover-opacity);
412
+ transform: translateX(var(--sp-touch-control-hover-offset));
413
+ transition:
414
+ opacity 80ms ease,
415
+ transform 160ms cubic-bezier(0.18, 0.9, 0.22, 1);
416
+ }
417
+
418
+ .sp-control-tray-slots:not(:has(.sp-control-button:hover))::before {
419
+ transition:
420
+ opacity 100ms ease,
421
+ transform 0ms linear 100ms;
422
+ }
423
+
424
+ .sp-control-button {
425
+ position: relative;
426
+ z-index: 1;
427
+ display: grid;
428
+ place-items: center;
429
+ flex: 0 0 auto;
430
+ aspect-ratio: 1 / 1;
431
+ width: var(--sp-control-slot-size);
432
+ min-width: 0;
433
+ height: var(--sp-control-slot-size);
434
+ border: 0;
435
+ border-radius: 3px;
436
+ color: var(--white);
437
+ background: transparent;
438
+ padding: 0;
439
+ cursor: pointer;
440
+ transition: background-color 150ms ease, color 150ms ease;
441
+ }
442
+
443
+ .sp-control-button:focus {
444
+ outline: 0;
445
+ }
446
+
447
+ .sp-control-button:hover {
448
+ background: var(--sp-control-slot-hover-surface);
449
+ }
450
+
451
+ .sp-player:not(.has-volume-control) [data-sp-volume-control],
452
+ .sp-player:not(.has-picture-in-picture-control) [data-sp-picture-in-picture-control],
453
+ .sp-player:not(.has-fullscreen-control) [data-sp-fullscreen-control] {
454
+ display: none;
455
+ }
456
+
457
+ .sp-player.is-volume-unavailable [data-sp-volume-control] {
458
+ cursor: default;
459
+ pointer-events: none;
460
+ }
461
+
462
+ .sp-player.is-volume-unavailable .sp-volume-icon {
463
+ transition: none;
464
+ }
465
+
466
+ .sp-player.is-volume-unavailable .sp-control-tray-slots:has([data-sp-volume-control]:hover)::before,
467
+ .sp-player.is-volume-unavailable .sp-control-tray-slots:has([data-sp-volume-control].is-control-tap-active)::before {
468
+ opacity: 0;
469
+ }
470
+
471
+ .sp-control-button:hover .sp-control-icon {
472
+ opacity: var(--sp-control-icon-hover-opacity);
473
+ transform: translateY(0) scale(1);
474
+ }
475
+
476
+ .sp-control-button.is-control-tap-active .sp-control-icon {
477
+ opacity: var(--sp-control-icon-hover-opacity);
478
+ transform: translateY(0) scale(1);
479
+ }
480
+
481
+ .sp-control-icon {
482
+ display: block;
483
+ width: var(--sp-control-icon-render-size);
484
+ height: var(--sp-control-icon-render-size);
485
+ color: currentColor;
486
+ overflow: visible;
487
+ opacity: var(--sp-control-icon-hidden-opacity);
488
+ transform: var(--sp-control-icon-hidden-transform);
489
+ transition:
490
+ opacity 180ms ease,
491
+ transform 280ms cubic-bezier(0.18, 0.9, 0.22, 1);
492
+ transition-delay: 0ms;
493
+ }
494
+
495
+ .sp-control-icon [stroke] {
496
+ stroke-width: var(--sp-control-icon-stroke-width);
497
+ }
498
+
499
+ .sp-volume-icon,
500
+ .sp-player.is-volume-muted .sp-volume-icon--muted {
501
+ display: none;
502
+ }
503
+
504
+ .sp-player.is-volume-sound .sp-volume-icon--sound,
505
+ .sp-player.is-volume-muted .sp-volume-icon--muted {
506
+ display: block;
507
+ }
508
+
509
+ .sp-player.is-volume-icon-animating .sp-volume-icon {
510
+ animation: sp-volume-icon-swap 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
511
+ }
512
+
513
+ .sp-volume-popover {
514
+ position: absolute;
515
+ left: 0;
516
+ bottom: calc(var(--sp-control-slot-size) + var(--sp-control-tray-padding) + 4px);
517
+ z-index: -1;
518
+ display: grid;
519
+ place-items: center;
520
+ width: var(--sp-control-slot-size);
521
+ height: 76px;
522
+ border-radius: 5px;
523
+ opacity: 0;
524
+ pointer-events: none;
525
+ filter: blur(0.8px);
526
+ transform: translateY(8px) scale(0.98);
527
+ transform-origin: center bottom;
528
+ transition:
529
+ opacity 140ms ease,
530
+ filter 180ms ease,
531
+ transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
532
+ }
533
+
534
+ .sp-volume-slot::after {
535
+ content: '';
536
+ position: absolute;
537
+ right: 0;
538
+ bottom: 100%;
539
+ left: 0;
540
+ height: calc(var(--sp-control-tray-padding) + 4px);
541
+ z-index: 5;
542
+ pointer-events: auto;
543
+ }
544
+
545
+ .sp-volume-slot.is-volume-open .sp-volume-popover,
546
+ .sp-volume-popover.is-scrubbing-volume {
547
+ z-index: 4;
548
+ opacity: 1;
549
+ pointer-events: auto;
550
+ filter: blur(0);
551
+ transform: translateY(0) scale(1);
552
+ transition:
553
+ opacity 150ms ease,
554
+ filter 220ms ease,
555
+ transform 260ms cubic-bezier(0.18, 0.9, 0.22, 1);
556
+ }
557
+
558
+ .sp-player.is-volume-unavailable .sp-volume-slot.is-volume-open .sp-volume-popover,
559
+ .sp-player:not(.has-volume-slider-control) .sp-volume-slot.is-volume-open .sp-volume-popover,
560
+ .sp-player.is-volume-unavailable .sp-volume-popover.is-scrubbing-volume {
561
+ opacity: 0;
562
+ pointer-events: none;
563
+ }
564
+
565
+ .sp-volume-track {
566
+ position: relative;
567
+ z-index: 1;
568
+ width: var(--sp-control-slot-size);
569
+ height: 76px;
570
+ border-radius: 5px;
571
+ background: var(--sp-control-glass-surface);
572
+ overflow: hidden;
573
+ touch-action: none;
574
+ cursor: ns-resize;
575
+ backdrop-filter: var(--sp-glass-filter);
576
+ -webkit-backdrop-filter: var(--sp-glass-filter);
577
+ box-shadow: inset 0 0 0 1px rgb(var(--white-rgb) / 0.08);
578
+ transform: translateZ(0);
579
+ }
580
+
581
+ .sp-volume-fill {
582
+ position: absolute;
583
+ right: 2px;
584
+ bottom: 2px;
585
+ left: 2px;
586
+ height: max(0px, calc(var(--sp-volume-level) - 4px));
587
+ min-height: 0;
588
+ border-radius: 3px;
589
+ background: var(--white);
590
+ opacity: 1;
591
+ transition: height 220ms cubic-bezier(0.23, 1, 0.32, 1);
592
+ }
593
+
594
+ .sp-fullscreen-icon,
595
+ .sp-player.is-fullscreen .sp-fullscreen-icon--enter,
596
+ .sp-player:not(.is-fullscreen) .sp-fullscreen-icon--exit {
597
+ display: none;
598
+ }
599
+
600
+ .sp-player:not(.is-fullscreen) .sp-fullscreen-icon--enter,
601
+ .sp-player.is-fullscreen .sp-fullscreen-icon--exit {
602
+ display: block;
603
+ }
604
+
605
+ .sp-player.is-pointer-active .sp-control-icon,
606
+ .sp-player.is-controls-visible .sp-control-icon,
607
+ :host(:hover) .sp-control-icon {
608
+ opacity: var(--sp-control-icon-opacity);
609
+ transform: translateY(0) scale(1);
610
+ }
611
+
612
+ .sp-player.is-pointer-active .sp-control-button:nth-child(1) .sp-control-icon,
613
+ .sp-player.is-controls-visible .sp-control-button:nth-child(1) .sp-control-icon,
614
+ :host(:hover) .sp-control-button:nth-child(1) .sp-control-icon {
615
+ transition-delay: var(--sp-control-icon-delay-1);
616
+ }
617
+
618
+ .sp-player.is-pointer-active .sp-control-button:nth-child(2) .sp-control-icon,
619
+ .sp-player.is-controls-visible .sp-control-button:nth-child(2) .sp-control-icon,
620
+ :host(:hover) .sp-control-button:nth-child(2) .sp-control-icon {
621
+ transition-delay: var(--sp-control-icon-delay-2);
622
+ }
623
+
624
+ .sp-player.is-pointer-active .sp-control-button:nth-child(3) .sp-control-icon,
625
+ .sp-player.is-controls-visible .sp-control-button:nth-child(3) .sp-control-icon,
626
+ :host(:hover) .sp-control-button:nth-child(3) .sp-control-icon {
627
+ transition-delay: var(--sp-control-icon-delay-3);
628
+ }
629
+
630
+ .sp-player.is-loading:not(.has-loaded-once) .sp-control-tray,
631
+ .sp-player.is-progress-settling .sp-control-tray {
632
+ opacity: 0;
633
+ pointer-events: none;
634
+ filter: blur(0.8px);
635
+ transform: translateY(4px) scale(0.96);
636
+ }
637
+
638
+ .sp-player.has-controls-collision .sp-control-tray {
639
+ opacity: 0;
640
+ pointer-events: none;
641
+ filter: blur(1.4px);
642
+ transform: translateY(-2px) scale(0.985);
643
+ }
644
+
645
+ .sp-progress-fill {
646
+ display: block;
647
+ z-index: 1;
648
+ left: 2px;
649
+ right: 2px;
650
+ background: var(--white);
651
+ border-radius: 3px;
652
+ clip-path: inset(0 var(--sp-progress-inset) 0 0 round 3px);
653
+ -webkit-mask:
654
+ linear-gradient(var(--black) 0 0),
655
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2 14' preserveAspectRatio='none'%3E%3Crect width='2' height='14' rx='1' fill='black'/%3E%3C/svg%3E") var(--sp-return-marker-hole-left) 50% / 2px max(1px, calc(var(--sp-progress-height) - 3px)) no-repeat;
656
+ -webkit-mask-composite: xor;
657
+ mask:
658
+ linear-gradient(var(--black) 0 0),
659
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2 14' preserveAspectRatio='none'%3E%3Crect width='2' height='14' rx='1' fill='black'/%3E%3C/svg%3E") var(--sp-return-marker-hole-left) 50% / 2px max(1px, calc(var(--sp-progress-height) - 3px)) no-repeat;
660
+ mask-composite: exclude;
661
+ transform: translateZ(0);
662
+ will-change: clip-path;
663
+ }
664
+
665
+ .sp-progress-marker {
666
+ position: absolute;
667
+ bottom: calc((var(--space) * 2) + 1.5px);
668
+ left: clamp(1px, var(--sp-return-marker-left), calc(100% - 1px));
669
+ z-index: 2;
670
+ width: 2px;
671
+ height: max(1px, calc(var(--sp-progress-height) - 3px));
672
+ border-radius: 2px;
673
+ background: rgb(var(--white-rgb) / calc(var(--sp-return-marker-base-opacity) * 0.58));
674
+ opacity: 0;
675
+ overflow: hidden;
676
+ pointer-events: none;
677
+ transform: translateX(-50%) translateZ(0);
678
+ transition: height 180ms ease, opacity 120ms ease;
679
+ }
680
+
681
+ .sp-player.is-scrubbing.has-return-marker .sp-progress-marker {
682
+ opacity: 1;
683
+ }
684
+
685
+ .sp-time {
686
+ position: absolute;
687
+ bottom: calc(100% + var(--space));
688
+ left: var(--sp-scrub-preview-left);
689
+ z-index: 2;
690
+ display: block;
691
+ padding: 2px calc(var(--space) * 1.5);
692
+ color: var(--white);
693
+ background: transparent;
694
+ border-radius: 4px;
695
+ isolation: isolate;
696
+ overflow: hidden;
697
+ pointer-events: none;
698
+ opacity: 0;
699
+ transform: translateX(-50%) translateY(2px);
700
+ transition: transform 120ms ease;
701
+ white-space: nowrap;
702
+ font: 500 12px/1.35 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
703
+ }
704
+
705
+ .sp-time-surface {
706
+ position: absolute;
707
+ inset: 0;
708
+ z-index: 0;
709
+ border-radius: inherit;
710
+ background: var(--sp-glass-surface);
711
+ opacity: var(--sp-glass-opacity);
712
+ backdrop-filter: var(--sp-glass-filter);
713
+ -webkit-backdrop-filter: var(--sp-glass-filter);
714
+ transform: translateZ(0);
715
+ will-change: backdrop-filter, opacity;
716
+ }
717
+
718
+ .sp-time-text {
719
+ position: relative;
720
+ z-index: 1;
721
+ }
722
+
723
+ .sp-player.is-scrubbing .sp-time {
724
+ opacity: 1;
725
+ transform: translateX(-50%) translateY(0);
726
+ }
727
+
728
+ .sp-button:focus-visible,
729
+ .sp-progress:focus-visible,
730
+ .sp-control-button:focus-visible,
731
+ .sp-volume-track:focus-visible {
732
+ outline: 2px solid rgb(255 255 255 / 0.92);
733
+ outline-offset: 3px;
734
+ box-shadow: 0 0 0 5px rgb(0 0 0 / 0.32);
735
+ }
736
+
737
+ @media (max-width: 768px) and (hover: none) and (pointer: coarse) {
738
+ .sp-overlay,
739
+ .sp-button {
740
+ transition-duration: 340ms;
741
+ }
742
+
743
+ .sp-player.is-pointer-active .sp-overlay,
744
+ .sp-player.is-loading:not(.has-loaded-once).is-pointer-active .sp-overlay,
745
+ .sp-player.is-pointer-active .sp-button,
746
+ .sp-player.is-loading:not(.has-loaded-once).is-pointer-active .sp-button {
747
+ opacity: 0;
748
+ }
749
+
750
+ .sp-player.is-pointer-active .sp-button,
751
+ .sp-player.is-loading:not(.has-loaded-once).is-pointer-active .sp-button {
752
+ transform: translate(-50%, -50%) scale(0.96);
753
+ }
754
+
755
+ .sp-player.is-controls-visible .sp-overlay {
756
+ opacity: 1;
757
+ }
758
+
759
+ .sp-player.is-controls-visible .sp-button {
760
+ opacity: 1;
761
+ transform: translate(-50%, -50%) scale(1);
762
+ }
763
+
764
+ .sp-player.is-loading:not(.has-loaded-once).is-controls-visible .sp-overlay,
765
+ .sp-player.is-loading:not(.has-loaded-once).is-controls-visible .sp-button,
766
+ .sp-player.is-scrubbing .sp-button {
767
+ opacity: 0;
768
+ pointer-events: none;
769
+ }
770
+
771
+ .sp-progress-cluster:has(.sp-progress:hover) {
772
+ --sp-progress-height: 4px;
773
+ }
774
+
775
+ .sp-player.is-scrubbing .sp-progress-cluster {
776
+ --sp-progress-height: 14px;
777
+ }
778
+
779
+ :host(:hover) .sp-overlay,
780
+ :host(:hover) .sp-button,
781
+ :host(:hover) .sp-control-tray {
782
+ opacity: 0;
783
+ pointer-events: none;
784
+ }
785
+
786
+ :host(:hover) .sp-control-icon {
787
+ opacity: var(--sp-control-icon-hidden-opacity);
788
+ transform: var(--sp-control-icon-hidden-transform);
789
+ }
790
+
791
+ .sp-player.is-controls-visible .sp-overlay,
792
+ .sp-player.is-controls-visible .sp-button,
793
+ .sp-player.is-controls-visible .sp-control-tray {
794
+ opacity: 1;
795
+ }
796
+
797
+ .sp-player.is-controls-visible .sp-button,
798
+ .sp-player.is-controls-visible .sp-control-tray {
799
+ pointer-events: auto;
800
+ }
801
+
802
+ .sp-player.is-controls-visible .sp-control-icon {
803
+ opacity: var(--sp-control-icon-opacity);
804
+ transform: translateY(0) scale(1);
805
+ }
806
+
807
+ .sp-control-tray-slots:has(.sp-control-button:hover)::before {
808
+ opacity: 0;
809
+ }
810
+
811
+ .sp-control-button:hover .sp-control-icon {
812
+ opacity: var(--sp-control-icon-opacity);
813
+ transform: translateY(0) scale(1);
814
+ }
815
+
816
+ .sp-control-tray-slots:has(.sp-control-button.is-control-tap-active)::before {
817
+ opacity: var(--sp-control-hover-opacity);
818
+ }
819
+
820
+ .sp-control-button.is-control-tap-active .sp-control-icon {
821
+ opacity: var(--sp-control-icon-hover-opacity);
822
+ transform: translateY(0) scale(1);
823
+ }
824
+ }
825
+
826
+ @keyframes sp-progress-shimmer {
827
+ 0% {
828
+ transform: translateX(-120%);
829
+ }
830
+
831
+ 58%,
832
+ 100% {
833
+ transform: translateX(120%);
834
+ }
835
+ }
836
+
837
+ @keyframes sp-volume-icon-swap {
838
+ 0% {
839
+ filter: blur(0);
840
+ transform: translateY(0) scale(1);
841
+ }
842
+
843
+ 42% {
844
+ filter: blur(1.2px);
845
+ transform: translateY(0) scale(0.9);
846
+ }
847
+
848
+ 100% {
849
+ filter: blur(0);
850
+ transform: translateY(0) scale(1);
851
+ }
852
+ }
853
+ `, Qe = document.createElement("template");
854
+ Qe.innerHTML = `
855
+ <style>${Ci}</style>
856
+ <div class="sp-player is-loading" data-sp-player>
857
+ <video
858
+ class="sp-video sp-asset"
859
+ autoplay
860
+ muted
861
+ playsinline
862
+ loop
863
+ preload="none"
864
+ controlslist="nodownload nofullscreen noremoteplayback"
865
+ disableRemotePlayback
866
+ data-sp-video>
867
+ </video>
868
+ <span class="sp-overlay" aria-hidden="true"></span>
869
+ <button class="sp-button" type="button" aria-label="Play video" data-sp-button>
870
+ <svg class="sp-icon sp-icon--play" viewBox="0 0 18 20" aria-hidden="true">
871
+ <path d="M3 3.5L15 10L3 16.5Z" fill="currentColor" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>
872
+ </svg>
873
+ <svg class="sp-icon sp-icon--pause" viewBox="0 0 18 20" aria-hidden="true">
874
+ <rect x="3" y="3" width="5" height="14" rx="1.5" fill="currentColor"></rect>
875
+ <rect x="10" y="3" width="5" height="14" rx="1.5" fill="currentColor"></rect>
876
+ </svg>
877
+ </button>
878
+ <div class="sp-progress-cluster">
879
+ <div class="sp-progress" aria-label="Video progress" role="slider" tabindex="0" data-sp-progress-track>
880
+ <span class="sp-progress-surface" aria-hidden="true"></span>
881
+ <span class="sp-time" data-sp-time>
882
+ <span class="sp-time-surface" aria-hidden="true"></span>
883
+ <span class="sp-time-text" data-sp-time-text>0:00</span>
884
+ </span>
885
+ <span class="sp-progress-fill" data-sp-progress></span>
886
+ <span class="sp-progress-marker" aria-hidden="true"></span>
887
+ </div>
888
+ <span class="sp-control-tray" data-sp-control-tray>
889
+ <span class="sp-control-tray-slots" data-sp-control-tray-slots>
890
+ <button class="sp-control-button sp-volume-slot" type="button" aria-label="Toggle sound" data-sp-volume-control>
891
+ <svg class="sp-control-icon sp-volume-icon sp-volume-icon--sound" viewBox="0 0 20 20" aria-hidden="true">
892
+ <path d="M8 7.00002H5C3.8954 7.00002 3 7.89542 3 9.00002V11C3 12.1046 3.8954 13 5 13H8L12.5227 16.7689C13.1093 17.2578 14 16.8406 14 16.077V3.92302C14 3.15942 13.1094 2.74222 12.5227 3.23112L8 7.00002Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path>
893
+ <path d="M17.4141 8.58582C18.1951 9.36682 18.1951 10.6332 17.4141 11.4142" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path>
894
+ </svg>
895
+ <svg class="sp-control-icon sp-volume-icon sp-volume-icon--muted" viewBox="0 0 20 20" aria-hidden="true">
896
+ <path d="M3 17L17 3" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path>
897
+ <path d="M15 16.0773C14.9998 17.6883 13.1207 18.5686 11.8828 17.5372L9.8333 15.8303C9.38114 15.4538 9.35003 14.7702 9.76611 14.3541C10.132 13.9882 10.7165 13.9617 11.114 14.2929L13 15.8644V11.5354C13 11.2702 13.1054 11.0158 13.2929 10.8283C13.9229 10.1983 15 10.6445 15 11.5354V16.0773Z" fill="currentColor"></path>
898
+ <path d="M12 2.37218C13.2358 1.48685 15 2.36173 15 3.92296V4.87902L13 6.87902V4.13488L8.64062 7.76867C8.46092 7.91841 8.23392 8.00011 8 8.00011H5C4.44768 8.00011 4 8.4478 4 9.00011V11.0001C4.00009 11.5524 4.44774 12.0001 5 12.0001H7.87891L5.87891 14.0001H5C3.34317 14.0001 2.00009 12.6569 2 11.0001V9.00011C2 7.34323 3.34312 6.00011 5 6.00011H7.63672L11.8828 2.463L12 2.37218Z" fill="currentColor"></path>
899
+ </svg>
900
+ <span class="sp-volume-popover" data-sp-volume-popover>
901
+ <span class="sp-volume-track" role="slider" aria-label="Volume" aria-valuemin="0" aria-valuemax="100" tabindex="0" data-sp-volume-track>
902
+ <span class="sp-volume-fill" data-sp-volume-fill></span>
903
+ </span>
904
+ </span>
905
+ </button>
906
+ <button class="sp-control-button" type="button" aria-label="Picture in picture" data-sp-picture-in-picture-control>
907
+ <svg class="sp-control-icon" viewBox="0 0 20 20" aria-hidden="true">
908
+ <path d="m5.5,13c-1.381,0-2.5-1.119-2.5-2.5v-5c0-1.381,1.119-2.5,2.5-2.5h7c1.381,0,2.5,1.119,2.5,2.5v2.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></path>
909
+ <rect x="9" y="12" width="8" height="5" rx="1.5" ry="1.5" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></rect>
910
+ <line x1="8" y1="8" x2="6" y2="6" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></line>
911
+ <polygon points="9 6 9 9 6 9 9 6" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></polygon>
912
+ </svg>
913
+ </button>
914
+ <button class="sp-control-button" type="button" aria-label="Enter fullscreen" data-sp-fullscreen-control>
915
+ <svg class="sp-control-icon sp-fullscreen-icon sp-fullscreen-icon--enter" viewBox="0 0 20 20" aria-hidden="true">
916
+ <polyline points="12.5 16 16 16 16 12.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></polyline>
917
+ <line x1="16" y1="16" x2="12" y2="12" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></line>
918
+ <polyline points="7.5 4 4 4 4 7.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></polyline>
919
+ <line x1="4" y1="4" x2="8" y2="8" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></line>
920
+ </svg>
921
+ <svg class="sp-control-icon sp-fullscreen-icon sp-fullscreen-icon--exit" viewBox="0 0 20 20" aria-hidden="true">
922
+ <polyline points="16 12.5 12.5 12.5 12.5 16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></polyline>
923
+ <line x1="12" y1="12" x2="16" y2="16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></line>
924
+ <polyline points="4 7.5 7.5 7.5 7.5 4" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></polyline>
925
+ <line x1="8" y1="8" x2="4" y2="4" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></line>
926
+ </svg>
927
+ </button>
928
+ </span>
929
+ </span>
930
+ </div>
931
+ </div>
932
+ `;
933
+ var f, Wt, z, jt, R, c, r, q, d, $, Q, Zt, fs, y, _, E, tt, st, pt, dt, v, M, et, F, Tt, it, Ct, N, mt, Ot, At, k, C, Kt, rt, ft, bt, ot, bs, Gt, D, H, W, j, Z, Ft, vt, vs, Lt, gs, ys, gt, V, nt, St, g, O, Jt, Qt, Mt, U, at, w, yt, wt, xt, ts, Ns, Us, ss, Ys, Xs, ws, Vt, _s, Ws, js, Zs, Os, Ks, It, Gs, Js, s, Ss, Ms, Ie, os, ze, si, h, Vs, zt, B, Qs, ns, K, G, Is, as, $t, ei, Nt, ls, Re, De, Rt, Dt, xs, Ht, lt, ht, ks, te, Ps, zs, Es, se, He, hs, Rs, cs, Be, ii, Ts, ri, ct, Y, qe, oi, $e, Ut, L, ni, X, ai, Ne, Ue, li, Bt, Ye, x, J, Xe, hi, Yt, ut, ci, Ds, us, ui, pi, di, S, ps, ds, mi, Xt, fi, T, Et, bi, A, _e, Hs, _t, kt, Bs, We, vi, gi, yi, qt, Pt, wi, Cs, qs, je, $s, ee, ie, re, ms, Ze, es, Oe, As, Fs, oe, ne, ae, le, he, ce, ue, pe, de, me, fe, be, ve, ge, ye, we, xe, ke, Pe, Ee, Te, is, Ce, Ae, Fe, Le, Se, Me, I, xi;
934
+ class ti extends HTMLElement {
935
+ constructor() {
936
+ super();
937
+ n(this, s);
938
+ n(this, f);
939
+ n(this, Wt, []);
940
+ n(this, z, null);
941
+ n(this, jt, !1);
942
+ n(this, R, !1);
943
+ n(this, c);
944
+ n(this, r);
945
+ n(this, q);
946
+ n(this, d);
947
+ n(this, $);
948
+ n(this, Q);
949
+ n(this, Zt);
950
+ n(this, fs);
951
+ n(this, y);
952
+ n(this, _);
953
+ n(this, E);
954
+ n(this, tt);
955
+ n(this, st);
956
+ n(this, pt, []);
957
+ n(this, dt, 0);
958
+ n(this, v, !1);
959
+ n(this, M, !1);
960
+ n(this, et, !1);
961
+ n(this, F, 0);
962
+ n(this, Tt, 0);
963
+ n(this, it, 0);
964
+ n(this, Ct, !1);
965
+ n(this, N, !1);
966
+ n(this, mt, !1);
967
+ n(this, Ot, 0);
968
+ n(this, At, 0);
969
+ n(this, k, null);
970
+ n(this, C, null);
971
+ n(this, Kt, 0);
972
+ n(this, rt, 0);
973
+ n(this, ft, 0);
974
+ n(this, bt, 0);
975
+ n(this, ot, 0);
976
+ n(this, bs, 0);
977
+ n(this, Gt, 0);
978
+ n(this, D, !1);
979
+ n(this, H, !1);
980
+ n(this, W, !1);
981
+ n(this, j, !1);
982
+ n(this, Z, 0);
983
+ n(this, Ft, 0);
984
+ n(this, vt, !1);
985
+ n(this, vs, 0);
986
+ n(this, Lt, !0);
987
+ n(this, gs, 0);
988
+ n(this, ys, performance.now());
989
+ n(this, gt, 0);
990
+ n(this, V, null);
991
+ n(this, nt, null);
992
+ n(this, St, !1);
993
+ n(this, g, !0);
994
+ n(this, O, !1);
995
+ n(this, Jt, null);
996
+ n(this, Qt, null);
997
+ n(this, Mt, !1);
998
+ n(this, U, !1);
999
+ n(this, at, !1);
1000
+ n(this, w, null);
1001
+ n(this, yt, 0);
1002
+ n(this, wt, 0);
1003
+ n(this, xt, 0);
1004
+ n(this, ts, null);
1005
+ n(this, Ns, 4);
1006
+ n(this, Us, 3.5);
1007
+ n(this, ss, 6);
1008
+ n(this, Ys, 0.08);
1009
+ n(this, Xs, 240);
1010
+ n(this, ws, 1200);
1011
+ n(this, Vt, 1600);
1012
+ n(this, _s, 140);
1013
+ n(this, Ws, 380);
1014
+ n(this, js, 650);
1015
+ n(this, Zs, 2e3);
1016
+ n(this, Os, 3);
1017
+ n(this, Ks, 10);
1018
+ n(this, It, 0.18);
1019
+ n(this, Gs, 8);
1020
+ n(this, Js, 18);
1021
+ n(this, zt, (i) => {
1022
+ i.preventDefault();
1023
+ });
1024
+ n(this, Qs, () => {
1025
+ if (o(this, ft, 0), !(t(this, M) || t(this, v) || t(this, U))) {
1026
+ if (e(this, s, I).call(this)) {
1027
+ t(this, c).classList.remove("is-controls-visible");
1028
+ return;
1029
+ }
1030
+ t(this, O) || t(this, c).classList.remove("is-pointer-active");
1031
+ }
1032
+ });
1033
+ n(this, Rt, (i) => {
1034
+ e(this, s, $t).call(this, i) && e(this, s, Is).call(this, !0);
1035
+ });
1036
+ n(this, Dt, (i) => {
1037
+ e(this, s, $t).call(this, i) && e(this, s, Is).call(this, !0);
1038
+ });
1039
+ n(this, xs, (i) => {
1040
+ e(this, s, $t).call(this, i) && e(this, s, De).call(this);
1041
+ });
1042
+ n(this, Ht, () => {
1043
+ e(this, s, as).call(this);
1044
+ });
1045
+ n(this, lt, (i) => {
1046
+ e(this, s, $t).call(this, i) && (o(this, O, !0), t(this, c).classList.add("is-pointer-active"), e(this, s, B).call(this));
1047
+ });
1048
+ n(this, ht, () => {
1049
+ o(this, O, !1), e(this, s, ns).call(this, t(this, Vt));
1050
+ });
1051
+ n(this, ks, () => {
1052
+ e(this, s, I).call(this) ? t(this, c).classList.add("is-controls-visible") : t(this, c).classList.add("is-pointer-active"), e(this, s, B).call(this);
1053
+ });
1054
+ n(this, te, () => {
1055
+ e(this, s, ns).call(this, t(this, Vt));
1056
+ });
1057
+ n(this, Ps, (i) => {
1058
+ const a = i.currentTarget;
1059
+ if (e(this, s, Re).call(this, a)) {
1060
+ t(this, Q).style.removeProperty("--sp-control-hover-offset");
1061
+ return;
1062
+ }
1063
+ const l = Number(a?.dataset.spControlIndex ?? 0);
1064
+ t(this, Q).style.setProperty("--sp-control-hover-offset", `calc(var(--sp-control-slot-size) * ${l})`);
1065
+ });
1066
+ n(this, Es, () => {
1067
+ o(this, xt, 0), t(this, pt).forEach((i) => i.classList.remove("is-control-tap-active")), this.style.removeProperty("--sp-touch-control-hover-offset");
1068
+ });
1069
+ n(this, se, (i) => {
1070
+ if (!(i instanceof PointerEvent) || i.pointerType !== "touch") return;
1071
+ const a = i.currentTarget;
1072
+ if (!a || !e(this, s, Nt).call(this) || e(this, s, Re).call(this, a)) return;
1073
+ const l = Number(a.dataset.spControlIndex ?? 0);
1074
+ e(this, s, zs).call(this), t(this, pt).forEach((u) => u.classList.toggle("is-control-tap-active", u === a)), this.style.setProperty("--sp-touch-control-hover-offset", `calc(var(--sp-control-slot-size) * ${l})`), o(this, xt, window.setTimeout(t(this, Es), 280));
1075
+ });
1076
+ n(this, Ts, () => {
1077
+ if (t(this, ot) || t(this, c).classList.contains("is-progress-settling")) {
1078
+ if (e(this, s, Rs).call(this), t(this, vt)) {
1079
+ t(this, c).classList.remove("is-progress-settling");
1080
+ return;
1081
+ }
1082
+ o(this, vt, !0), o(this, vs, performance.now() + t(this, js)), e(this, s, X).call(this) || e(this, s, x).call(this), e(this, s, S).call(this), t(this, c).classList.remove("is-progress-settling"), e(this, s, T).call(this);
1083
+ }
1084
+ });
1085
+ n(this, L, () => {
1086
+ if (t(this, r).error) {
1087
+ e(this, s, Ut).call(this, !0, !0);
1088
+ return;
1089
+ }
1090
+ e(this, s, Ut).call(this, !t(this, R) || !t(this, H) || t(this, r).readyState < HTMLMediaElement.HAVE_FUTURE_DATA);
1091
+ });
1092
+ n(this, Bt, () => {
1093
+ if (t(this, r).error || t(this, r).readyState < HTMLMediaElement.HAVE_CURRENT_DATA || t(this, r).videoWidth <= 0 || t(this, r).videoHeight <= 0)
1094
+ return t(this, L).call(this), !1;
1095
+ if (!t(this, D))
1096
+ return e(this, s, li).call(this), t(this, L).call(this), !1;
1097
+ const i = e(this, s, Ue).call(this);
1098
+ return t(this, A).call(this), i;
1099
+ });
1100
+ n(this, A, () => {
1101
+ if (!this.volumeEnabled) {
1102
+ t(this, c).classList.remove("is-volume-unavailable", "is-volume-muted", "is-volume-sound", "is-volume-icon-animating"), t(this, y).disabled = !0, t(this, y).setAttribute("aria-disabled", "true");
1103
+ return;
1104
+ }
1105
+ o(this, g, e(this, s, bi).call(this));
1106
+ const i = !t(this, g) || t(this, r).muted || t(this, r).volume <= 0, a = t(this, g) && !t(this, r).muted ? t(this, r).volume : 0, l = Math.round(a * 100), u = i ? "muted" : "sound";
1107
+ t(this, ts) && t(this, ts) !== u && e(this, s, ii).call(this), o(this, ts, u), t(this, c).classList.toggle("is-volume-unavailable", !t(this, g)), t(this, c).classList.toggle("is-volume-muted", i), t(this, c).classList.toggle("is-volume-sound", !i), t(this, c).style.setProperty("--sp-volume-level", `${l}%`), t(this, y).disabled = !t(this, g), t(this, y).setAttribute("aria-disabled", `${!t(this, g)}`), t(this, y).setAttribute(
1108
+ "aria-label",
1109
+ t(this, g) ? i ? "Unmute video" : "Mute video" : "Video has no audio"
1110
+ ), t(this, E).setAttribute("aria-valuenow", `${l}`), t(this, E).setAttribute("aria-valuetext", `${l}%`);
1111
+ });
1112
+ n(this, kt, () => {
1113
+ const i = document.pictureInPictureElement === t(this, r), a = t(this, r), l = !!(this.pictureInPictureEnabled && document.pictureInPictureEnabled && a.requestPictureInPicture);
1114
+ t(this, c).classList.toggle("is-picture-in-picture", i), t(this, tt).disabled = !l, t(this, tt).setAttribute("aria-label", i ? "Exit picture in picture" : "Enter picture in picture");
1115
+ });
1116
+ n(this, qt, () => {
1117
+ const i = e(this, s, Bs).call(this), a = i === t(this, c) || i === this, l = e(this, s, We).call(this);
1118
+ return t(this, c).classList.toggle("is-fullscreen", a), t(this, st).disabled = !l, t(this, st).setAttribute("aria-label", a ? "Exit fullscreen" : "Enter fullscreen"), a;
1119
+ });
1120
+ n(this, Pt, () => {
1121
+ const i = t(this, qt).call(this);
1122
+ e(this, s, wi).call(this, i);
1123
+ });
1124
+ n(this, Cs, () => {
1125
+ !t(this, M) || t(this, v) || (e(this, s, J).call(this), e(this, s, B).call(this), e(this, s, Et).call(this), o(this, v, !0), t(this, c).classList.add("is-scrubbing"), o(this, F, e(this, s, ps).call(this, t(this, Ot), !0)), t(this, et) && t(this, r).pause(), t(this, r).currentTime = t(this, F), e(this, s, x).call(this, t(this, F)), e(this, s, S).call(this, t(this, F)), e(this, s, Xt).call(this), e(this, s, T).call(this));
1126
+ });
1127
+ n(this, ee, async () => {
1128
+ if (performance.now() < t(this, bs))
1129
+ return;
1130
+ const i = t(this, C) ? t(this, C) !== "playing" : t(this, r).paused || t(this, r).ended, a = !i || e(this, s, ni).call(this);
1131
+ e(this, s, G).call(this), a && (o(this, C, i ? "playing" : "paused"), e(this, s, T).call(this)), i ? (e(this, s, J).call(this), await e(this, s, ct).call(this), await t(this, r).play().catch(() => {
1132
+ o(this, C, null);
1133
+ })) : (e(this, s, hi).call(this), t(this, r).pause()), e(this, s, T).call(this), e(this, s, K).call(this);
1134
+ });
1135
+ n(this, ie, (i) => {
1136
+ if (!(i instanceof PointerEvent)) return;
1137
+ const a = t(this, q).getBoundingClientRect(), l = i.clientX >= a.left && i.clientX <= a.right && i.clientY >= a.top && i.clientY <= a.bottom, u = t(this, $).getBoundingClientRect(), p = i.clientX >= u.left && i.clientX <= u.right && i.clientY >= u.top && i.clientY <= u.bottom, P = t(this, d).getBoundingClientRect(), Ls = i.clientX >= P.left && i.clientX <= P.right && i.clientY >= P.top && i.clientY <= P.bottom, rs = e(this, s, G).call(this);
1138
+ rs && l && o(this, bs, performance.now() + 260), rs && (p || Ls) && o(this, Gt, performance.now() + 260), e(this, s, ct).call(this);
1139
+ });
1140
+ n(this, re, (i) => {
1141
+ i.stopPropagation();
1142
+ });
1143
+ n(this, es, () => {
1144
+ o(this, yt, 0), !(t(this, at) || t(this, U)) && t(this, y).classList.remove("is-volume-open");
1145
+ });
1146
+ n(this, As, () => {
1147
+ e(this, s, I).call(this) || !this.volumeSliderEnabled || !t(this, g) || (o(this, at, !0), e(this, s, Ze).call(this));
1148
+ });
1149
+ n(this, Fs, () => {
1150
+ e(this, s, I).call(this) || !this.volumeSliderEnabled || !t(this, g) || (o(this, at, !1), e(this, s, Oe).call(this));
1151
+ });
1152
+ n(this, oe, (i) => {
1153
+ !this.volumeEnabled || !t(this, g) || (i.preventDefault(), i.stopPropagation(), !(!e(this, s, Nt).call(this) || e(this, s, ls).call(this)) && (e(this, s, G).call(this), t(this, es).call(this), t(this, r).muted || t(this, r).volume <= 0 ? (t(this, r).volume <= 0 && (t(this, r).volume = 0.7), t(this, r).muted = !1) : t(this, r).muted = !0, t(this, A).call(this), e(this, s, K).call(this)));
1154
+ });
1155
+ n(this, ne, (i) => {
1156
+ i instanceof PointerEvent && (!this.volumeEnabled || !this.volumeSliderEnabled || !t(this, g) || e(this, s, I).call(this) || (i.preventDefault(), i.stopPropagation(), e(this, s, G).call(this), e(this, s, B).call(this), e(this, s, Ze).call(this), o(this, U, !0), o(this, w, i.pointerId), t(this, _).classList.add("is-scrubbing-volume"), t(this, E).setPointerCapture(i.pointerId), e(this, s, _e).call(this, i.clientY)));
1157
+ });
1158
+ n(this, ae, (i) => {
1159
+ i instanceof PointerEvent && t(this, U) && (t(this, w) !== null && i.pointerId !== t(this, w) || (i.preventDefault(), i.stopPropagation(), e(this, s, _e).call(this, i.clientY)));
1160
+ });
1161
+ n(this, le, (i) => {
1162
+ i instanceof PointerEvent && (t(this, w) !== null && i.pointerId !== t(this, w) || (i.stopPropagation(), e(this, s, _t).call(this, i.pointerId), e(this, s, K).call(this)));
1163
+ });
1164
+ n(this, he, (i) => {
1165
+ i instanceof PointerEvent && (t(this, w) !== null && i.pointerId !== t(this, w) || (i.stopPropagation(), e(this, s, _t).call(this, i.pointerId)));
1166
+ });
1167
+ n(this, ce, (i) => {
1168
+ if (!(i instanceof KeyboardEvent) || !this.volumeEnabled || !t(this, g) || !["ArrowUp", "ArrowDown", "Home", "End"].includes(i.key)) return;
1169
+ i.preventDefault(), i.stopPropagation();
1170
+ const a = i.shiftKey ? 0.1 : 0.05, l = i.key === "Home" ? 0 : i.key === "End" ? 1 : t(this, r).volume + (i.key === "ArrowUp" ? a : -a);
1171
+ t(this, r).volume = Math.min(1, Math.max(0, l)), t(this, r).muted = t(this, r).volume <= 0, t(this, A).call(this);
1172
+ });
1173
+ n(this, ue, async () => {
1174
+ const i = t(this, r);
1175
+ if (!(!this.pictureInPictureEnabled || !document.pictureInPictureEnabled || !i.requestPictureInPicture) && !(!e(this, s, Nt).call(this) || e(this, s, ls).call(this))) {
1176
+ e(this, s, G).call(this);
1177
+ try {
1178
+ await e(this, s, ct).call(this), document.pictureInPictureElement === t(this, r) ? await document.exitPictureInPicture() : await i.requestPictureInPicture();
1179
+ } catch {
1180
+ } finally {
1181
+ t(this, kt).call(this), e(this, s, K).call(this);
1182
+ }
1183
+ }
1184
+ });
1185
+ n(this, pe, async (i) => {
1186
+ if (e(this, s, We).call(this) && (i.preventDefault(), i.stopPropagation(), !(!e(this, s, Nt).call(this) || e(this, s, ls).call(this)))) {
1187
+ e(this, s, $t).call(this, i), e(this, s, G).call(this);
1188
+ try {
1189
+ const a = e(this, s, Bs).call(this);
1190
+ if (a === t(this, c) || a === this)
1191
+ await e(this, s, yi).call(this);
1192
+ else {
1193
+ await e(this, s, ct).call(this);
1194
+ const l = t(this, c);
1195
+ typeof l.requestFullscreen == "function" || typeof l.webkitRequestFullscreen == "function" || typeof l.mozRequestFullScreen == "function" || typeof l.msRequestFullscreen == "function" ? await e(this, s, vi).call(this) : e(this, s, gi).call(this);
1196
+ }
1197
+ } catch {
1198
+ } finally {
1199
+ t(this, qt).call(this), e(this, s, K).call(this);
1200
+ }
1201
+ }
1202
+ });
1203
+ n(this, de, (i) => {
1204
+ if (i instanceof PointerEvent) {
1205
+ if (i.preventDefault(), !e(this, s, Nt).call(this) || e(this, s, ls).call(this)) {
1206
+ e(this, s, G).call(this), e(this, s, I).call(this) && o(this, Gt, performance.now() + 260);
1207
+ return;
1208
+ }
1209
+ e(this, s, G).call(this), e(this, s, B).call(this), t(this, Ts).call(this), o(this, N, !1), o(this, mt, !1), e(this, s, pi).call(this, e(this, s, Yt).call(this)), o(this, M, !0), o(this, k, i.pointerId), o(this, Ot, i.clientX), o(this, et, !t(this, r).paused && !t(this, r).ended), t(this, d).setPointerCapture(i.pointerId), o(this, F, e(this, s, ps).call(this, i.clientX, !1)), e(this, s, Et).call(this), o(this, At, window.setTimeout(t(this, Cs), t(this, Xs)));
1210
+ }
1211
+ });
1212
+ n(this, me, (i) => {
1213
+ if (!(i instanceof KeyboardEvent) || !Number.isFinite(t(this, r).duration) || t(this, r).duration <= 0 || !["ArrowLeft", "ArrowRight", "Home", "End", "PageUp", "PageDown"].includes(i.key)) return;
1214
+ i.preventDefault(), i.stopPropagation(), t(this, ks).call(this);
1215
+ const a = e(this, s, Yt).call(this), l = i.shiftKey ? 10 : 5, u = Math.max(10, t(this, r).duration * 0.1), p = i.key === "Home" ? 0 : i.key === "End" ? t(this, r).duration : i.key === "PageUp" ? a + u : i.key === "PageDown" ? a - u : a + (i.key === "ArrowRight" ? l : -l);
1216
+ t(this, r).currentTime = Math.min(t(this, r).duration, Math.max(0, p)), e(this, s, x).call(this, t(this, r).currentTime), e(this, s, S).call(this, t(this, r).currentTime);
1217
+ });
1218
+ n(this, fe, (i) => {
1219
+ i instanceof PointerEvent && t(this, M) && (t(this, k) !== null && i.pointerId !== t(this, k) || (!t(this, v) && Math.abs(i.clientX - t(this, Ot)) >= t(this, Ns) && t(this, Cs).call(this), t(this, v) && o(this, F, e(this, s, ps).call(this, i.clientX))));
1220
+ });
1221
+ n(this, be, (i) => {
1222
+ i instanceof PointerEvent && (t(this, k) !== null && i.pointerId !== t(this, k) || e(this, s, je).call(this, i.clientX, i.pointerId, !0));
1223
+ });
1224
+ n(this, ve, (i) => {
1225
+ i instanceof PointerEvent && (t(this, k) !== null && i.pointerId !== t(this, k) || e(this, s, $s).call(this, i.pointerId));
1226
+ });
1227
+ n(this, ge, (i) => {
1228
+ if (i instanceof PointerEvent) {
1229
+ if (t(this, w) !== null && i.pointerId === t(this, w)) {
1230
+ e(this, s, _t).call(this, i.pointerId);
1231
+ return;
1232
+ }
1233
+ t(this, k) === null || i.pointerId !== t(this, k) || e(this, s, je).call(this, i.clientX, i.pointerId, !0);
1234
+ }
1235
+ });
1236
+ n(this, ye, (i) => {
1237
+ if (i instanceof PointerEvent) {
1238
+ if (t(this, w) !== null && i.pointerId === t(this, w)) {
1239
+ e(this, s, _t).call(this, i.pointerId);
1240
+ return;
1241
+ }
1242
+ t(this, k) === null || i.pointerId !== t(this, k) || e(this, s, $s).call(this, i.pointerId);
1243
+ }
1244
+ });
1245
+ n(this, we, () => {
1246
+ e(this, s, _t).call(this, t(this, w)), e(this, s, $s).call(this, t(this, k));
1247
+ });
1248
+ n(this, xe, () => {
1249
+ e(this, s, Bs).call(this) || e(this, s, as).call(this);
1250
+ });
1251
+ n(this, ke, () => {
1252
+ o(this, C, null), e(this, s, J).call(this), e(this, s, X).call(this) || e(this, s, x).call(this), e(this, s, T).call(this);
1253
+ });
1254
+ n(this, Pe, () => {
1255
+ o(this, C, null), e(this, s, X).call(this) || e(this, s, Xe).call(this), t(this, L).call(this), e(this, s, T).call(this);
1256
+ });
1257
+ n(this, Ee, () => {
1258
+ o(this, C, null), e(this, s, J).call(this), e(this, s, X).call(this) || e(this, s, x).call(this), e(this, s, T).call(this);
1259
+ });
1260
+ n(this, Te, () => {
1261
+ e(this, s, Ut).call(this, !0, !0);
1262
+ });
1263
+ n(this, is, () => {
1264
+ e(this, s, Ut).call(this, !0);
1265
+ });
1266
+ n(this, Ce, () => {
1267
+ e(this, s, J).call(this), o(this, g, !0), t(this, A).call(this), e(this, s, X).call(this) || e(this, s, x).call(this), t(this, L).call(this), e(this, s, S).call(this);
1268
+ });
1269
+ n(this, Ae, () => {
1270
+ const i = t(this, Bt).call(this);
1271
+ t(this, A).call(this), i && !e(this, s, X).call(this) && e(this, s, x).call(this), e(this, s, T).call(this);
1272
+ });
1273
+ n(this, Fe, () => {
1274
+ if (e(this, s, J).call(this), t(this, L).call(this), t(this, N) && (!t(this, mt) || t(this, r).readyState >= HTMLMediaElement.HAVE_FUTURE_DATA)) {
1275
+ e(this, s, Ne).call(this), e(this, s, T).call(this);
1276
+ return;
1277
+ }
1278
+ e(this, s, X).call(this) || e(this, s, x).call(this), e(this, s, S).call(this);
1279
+ });
1280
+ n(this, Le, () => {
1281
+ o(this, C, null), o(this, D, !1), o(this, H, !1), o(this, W, !1), o(this, j, !1), o(this, Z, t(this, Z) + 1), t(this, c).classList.remove("has-visible-frame"), e(this, s, Ut).call(this, !0, !0), e(this, s, T).call(this), e(this, s, ai).call(this);
1282
+ });
1283
+ n(this, Se, () => {
1284
+ t(this, A).call(this), e(this, s, S).call(this);
1285
+ });
1286
+ n(this, Me, () => {
1287
+ t(this, A).call(this);
1288
+ });
1289
+ o(this, f, this.attachShadow({ mode: "open" })), t(this, f).append(Qe.content.cloneNode(!0));
1290
+ }
1291
+ get src() {
1292
+ return this.getAttribute("src") ?? "";
1293
+ }
1294
+ set src(i) {
1295
+ e(this, s, Ss).call(this, "src", i);
1296
+ }
1297
+ get aspectRatio() {
1298
+ return this.getAttribute("aspect-ratio") || Je;
1299
+ }
1300
+ set aspectRatio(i) {
1301
+ e(this, s, Ss).call(this, "aspect-ratio", i);
1302
+ }
1303
+ get preloadMargin() {
1304
+ return this.getAttribute("preload-margin") || Ti;
1305
+ }
1306
+ set preloadMargin(i) {
1307
+ e(this, s, Ss).call(this, "preload-margin", i);
1308
+ }
1309
+ get autoplayEnabled() {
1310
+ return !this.hasAttribute("disable-autoplay") && !this.hasAttribute("no-autoplay");
1311
+ }
1312
+ set autoplayEnabled(i) {
1313
+ if (i) {
1314
+ this.removeAttribute("disable-autoplay"), this.removeAttribute("no-autoplay");
1315
+ return;
1316
+ }
1317
+ this.setAttribute("disable-autoplay", "");
1318
+ }
1319
+ get controlsEnabled() {
1320
+ return this.hasAttribute("controls");
1321
+ }
1322
+ set controlsEnabled(i) {
1323
+ if (i) {
1324
+ this.setAttribute("controls", "");
1325
+ return;
1326
+ }
1327
+ this.removeAttribute("controls");
1328
+ }
1329
+ get volumeEnabled() {
1330
+ return (this.hasAttribute("controls") || this.hasAttribute("enable-volume")) && !this.hasAttribute("disable-volume") && !this.hasAttribute("no-volume");
1331
+ }
1332
+ set volumeEnabled(i) {
1333
+ e(this, s, Ms).call(this, "volume", i);
1334
+ }
1335
+ get volumeSliderEnabled() {
1336
+ return !this.hasAttribute("disable-volume-slider") && !this.hasAttribute("no-volume-slider");
1337
+ }
1338
+ set volumeSliderEnabled(i) {
1339
+ if (i) {
1340
+ this.removeAttribute("disable-volume-slider"), this.removeAttribute("no-volume-slider");
1341
+ return;
1342
+ }
1343
+ this.setAttribute("disable-volume-slider", "");
1344
+ }
1345
+ get pictureInPictureEnabled() {
1346
+ return (this.hasAttribute("controls") || this.hasAttribute("enable-picture-in-picture")) && !this.hasAttribute("disable-picture-in-picture") && !this.hasAttribute("no-picture-in-picture");
1347
+ }
1348
+ set pictureInPictureEnabled(i) {
1349
+ e(this, s, Ms).call(this, "picture-in-picture", i);
1350
+ }
1351
+ get fullscreenEnabled() {
1352
+ return (this.hasAttribute("controls") || this.hasAttribute("enable-fullscreen")) && !this.hasAttribute("disable-fullscreen") && !this.hasAttribute("no-fullscreen");
1353
+ }
1354
+ set fullscreenEnabled(i) {
1355
+ e(this, s, Ms).call(this, "fullscreen", i);
1356
+ }
1357
+ connectedCallback() {
1358
+ o(this, c, t(this, f).querySelector("[data-sp-player]")), o(this, r, t(this, f).querySelector("[data-sp-video]")), o(this, q, t(this, f).querySelector("[data-sp-button]")), o(this, d, t(this, f).querySelector("[data-sp-progress-track]")), o(this, $, t(this, f).querySelector("[data-sp-control-tray]")), o(this, Q, t(this, f).querySelector("[data-sp-control-tray-slots]")), o(this, Zt, t(this, f).querySelector("[data-sp-time]")), o(this, fs, t(this, f).querySelector("[data-sp-time-text]")), o(this, y, t(this, f).querySelector("[data-sp-volume-control]")), o(this, _, t(this, f).querySelector("[data-sp-volume-popover]")), o(this, E, t(this, f).querySelector("[data-sp-volume-track]")), o(this, tt, t(this, f).querySelector("[data-sp-picture-in-picture-control]")), o(this, st, t(this, f).querySelector("[data-sp-fullscreen-control]")), o(this, pt, [t(this, y), t(this, tt), t(this, st)]), e(this, s, Ie).call(this), t(this, jt) || (e(this, s, si).call(this), o(this, jt, !0)), e(this, s, os).call(this), e(this, s, Vs).call(this), e(this, s, ze).call(this), t(this, L).call(this), t(this, A).call(this), t(this, kt).call(this), t(this, qt).call(this), e(this, s, T).call(this);
1359
+ }
1360
+ disconnectedCallback() {
1361
+ t(this, z)?.disconnect(), o(this, z, null), t(this, Wt).forEach((i) => i()), o(this, Wt, []), o(this, jt, !1), e(this, s, B).call(this), e(this, s, He).call(this), e(this, s, hs).call(this), e(this, s, Rs).call(this), e(this, s, Et).call(this), e(this, s, cs).call(this), e(this, s, ms).call(this), e(this, s, Be).call(this), e(this, s, zs).call(this), t(this, c).classList.remove("is-volume-icon-animating"), t(this, Q).style.removeProperty("--sp-control-hover-offset"), this.style.removeProperty("--sp-touch-control-hover-offset"), e(this, s, ds).call(this), o(this, U, !1), o(this, at, !1), o(this, O, !1), o(this, w, null), t(this, y).classList.remove("is-volume-open"), t(this, pt).forEach((i) => i.classList.remove("is-control-tap-active")), t(this, c).classList.remove("is-pointer-active"), e(this, s, Xt).call(this);
1362
+ }
1363
+ attributeChangedCallback(i, a, l) {
1364
+ if (a !== l) {
1365
+ if (i === "aspect-ratio") {
1366
+ e(this, s, Ie).call(this);
1367
+ return;
1368
+ }
1369
+ if (i === "preload-margin" && this.isConnected) {
1370
+ t(this, z)?.disconnect(), e(this, s, Vs).call(this);
1371
+ return;
1372
+ }
1373
+ if (i === "src" && this.isConnected) {
1374
+ e(this, s, xi).call(this), e(this, s, Vs).call(this);
1375
+ return;
1376
+ }
1377
+ if ((i === "disable-autoplay" || i === "no-autoplay") && this.isConnected) {
1378
+ e(this, s, os).call(this), t(this, A).call(this), e(this, s, T).call(this);
1379
+ return;
1380
+ }
1381
+ (i === "controls" || i.startsWith("enable-") || i.startsWith("disable-") || i.startsWith("no-")) && this.isConnected && (e(this, s, ze).call(this), t(this, A).call(this), t(this, kt).call(this), t(this, qt).call(this));
1382
+ }
1383
+ }
1384
+ }
1385
+ f = new WeakMap(), Wt = new WeakMap(), z = new WeakMap(), jt = new WeakMap(), R = new WeakMap(), c = new WeakMap(), r = new WeakMap(), q = new WeakMap(), d = new WeakMap(), $ = new WeakMap(), Q = new WeakMap(), Zt = new WeakMap(), fs = new WeakMap(), y = new WeakMap(), _ = new WeakMap(), E = new WeakMap(), tt = new WeakMap(), st = new WeakMap(), pt = new WeakMap(), dt = new WeakMap(), v = new WeakMap(), M = new WeakMap(), et = new WeakMap(), F = new WeakMap(), Tt = new WeakMap(), it = new WeakMap(), Ct = new WeakMap(), N = new WeakMap(), mt = new WeakMap(), Ot = new WeakMap(), At = new WeakMap(), k = new WeakMap(), C = new WeakMap(), Kt = new WeakMap(), rt = new WeakMap(), ft = new WeakMap(), bt = new WeakMap(), ot = new WeakMap(), bs = new WeakMap(), Gt = new WeakMap(), D = new WeakMap(), H = new WeakMap(), W = new WeakMap(), j = new WeakMap(), Z = new WeakMap(), Ft = new WeakMap(), vt = new WeakMap(), vs = new WeakMap(), Lt = new WeakMap(), gs = new WeakMap(), ys = new WeakMap(), gt = new WeakMap(), V = new WeakMap(), nt = new WeakMap(), St = new WeakMap(), g = new WeakMap(), O = new WeakMap(), Jt = new WeakMap(), Qt = new WeakMap(), Mt = new WeakMap(), U = new WeakMap(), at = new WeakMap(), w = new WeakMap(), yt = new WeakMap(), wt = new WeakMap(), xt = new WeakMap(), ts = new WeakMap(), Ns = new WeakMap(), Us = new WeakMap(), ss = new WeakMap(), Ys = new WeakMap(), Xs = new WeakMap(), ws = new WeakMap(), Vt = new WeakMap(), _s = new WeakMap(), Ws = new WeakMap(), js = new WeakMap(), Zs = new WeakMap(), Os = new WeakMap(), Ks = new WeakMap(), It = new WeakMap(), Gs = new WeakMap(), Js = new WeakMap(), s = new WeakSet(), Ss = function(i, a) {
1386
+ if (a === "") {
1387
+ this.removeAttribute(i);
1388
+ return;
1389
+ }
1390
+ this.setAttribute(i, a);
1391
+ }, Ms = function(i, a) {
1392
+ if (a) {
1393
+ this.setAttribute(`enable-${i}`, ""), this.removeAttribute(`disable-${i}`), this.removeAttribute(`no-${i}`);
1394
+ return;
1395
+ }
1396
+ this.removeAttribute(`enable-${i}`), this.setAttribute(`disable-${i}`, "");
1397
+ }, Ie = function() {
1398
+ this.style.setProperty("--simple-player-aspect-ratio", this.aspectRatio);
1399
+ }, os = function() {
1400
+ if (!t(this, r)) return;
1401
+ const i = this.autoplayEnabled;
1402
+ if (t(this, r).autoplay = i, i) {
1403
+ t(this, r).muted = !0, t(this, r).setAttribute("autoplay", ""), t(this, r).setAttribute("muted", "");
1404
+ return;
1405
+ }
1406
+ t(this, r).removeAttribute("autoplay"), t(this, R) || (t(this, r).muted = !1, t(this, r).removeAttribute("muted"));
1407
+ }, ze = function() {
1408
+ if (!t(this, c)) return;
1409
+ const i = [
1410
+ { button: t(this, y), enabled: this.volumeEnabled, className: "has-volume-control" },
1411
+ { button: t(this, tt), enabled: this.pictureInPictureEnabled, className: "has-picture-in-picture-control" },
1412
+ { button: t(this, st), enabled: this.fullscreenEnabled, className: "has-fullscreen-control" }
1413
+ ];
1414
+ let a = 0;
1415
+ for (const l of i)
1416
+ t(this, c).classList.toggle(l.className, l.enabled), l.button.hidden = !l.enabled, l.enabled ? (l.button.dataset.spControlIndex = `${a}`, a += 1) : delete l.button.dataset.spControlIndex;
1417
+ this.style.setProperty("--sp-enabled-controls-count", `${a}`), this.style.setProperty("--sp-control-tray-display", a > 0 ? "block" : "none"), t(this, c).classList.toggle("has-volume-slider-control", this.volumeEnabled && this.volumeSliderEnabled), (!this.volumeEnabled || !this.volumeSliderEnabled) && (t(this, es).call(this), e(this, s, Hs).call(this, t(this, w)), o(this, U, !1), o(this, at, !1), t(this, _).classList.remove("is-scrubbing-volume")), t(this, Q).style.removeProperty("--sp-control-hover-offset");
1418
+ }, si = function() {
1419
+ e(this, s, h).call(this, t(this, q), "click", t(this, ee)), e(this, s, h).call(this, this, "pointerenter", t(this, Rt)), e(this, s, h).call(this, this, "pointermove", t(this, Dt)), e(this, s, h).call(this, this, "pointerleave", t(this, Ht)), e(this, s, h).call(this, this, "mouseenter", t(this, Rt)), e(this, s, h).call(this, this, "mousemove", t(this, Dt)), e(this, s, h).call(this, this, "mouseleave", t(this, Ht)), e(this, s, h).call(this, t(this, c), "pointerenter", t(this, Rt)), e(this, s, h).call(this, t(this, c), "pointermove", t(this, Dt)), e(this, s, h).call(this, t(this, c), "pointerleave", t(this, Ht)), e(this, s, h).call(this, t(this, c), "mouseenter", t(this, Rt)), e(this, s, h).call(this, t(this, c), "mousemove", t(this, Dt)), e(this, s, h).call(this, t(this, c), "mouseleave", t(this, Ht)), e(this, s, h).call(this, t(this, q), "pointerenter", t(this, lt)), e(this, s, h).call(this, t(this, q), "pointerleave", t(this, ht)), e(this, s, h).call(this, t(this, q), "mouseenter", t(this, lt)), e(this, s, h).call(this, t(this, q), "mouseleave", t(this, ht)), e(this, s, h).call(this, t(this, d), "pointerenter", t(this, lt)), e(this, s, h).call(this, t(this, d), "pointerleave", t(this, ht)), e(this, s, h).call(this, t(this, d), "mouseenter", t(this, lt)), e(this, s, h).call(this, t(this, d), "mouseleave", t(this, ht)), e(this, s, h).call(this, t(this, $), "pointerenter", t(this, lt)), e(this, s, h).call(this, t(this, $), "pointerleave", t(this, ht)), e(this, s, h).call(this, t(this, $), "mouseenter", t(this, lt)), e(this, s, h).call(this, t(this, $), "mouseleave", t(this, ht)), e(this, s, h).call(this, t(this, f), "focusin", t(this, ks)), e(this, s, h).call(this, t(this, f), "focusout", t(this, te)), e(this, s, h).call(this, t(this, c), "pointerdown", t(this, ie)), e(this, s, h).call(this, t(this, c), "dragstart", t(this, zt)), e(this, s, h).call(this, t(this, c), "selectstart", t(this, zt)), e(this, s, h).call(this, t(this, r), "dragstart", t(this, zt)), e(this, s, h).call(this, t(this, r), "selectstart", t(this, zt)), e(this, s, h).call(this, t(this, d), "pointerdown", t(this, de)), e(this, s, h).call(this, t(this, d), "pointermove", t(this, fe)), e(this, s, h).call(this, t(this, d), "pointerup", t(this, be)), e(this, s, h).call(this, t(this, d), "pointercancel", t(this, ve)), e(this, s, h).call(this, t(this, d), "keydown", t(this, me)), e(this, s, h).call(this, t(this, y), "pointerenter", t(this, As)), e(this, s, h).call(this, t(this, y), "pointerleave", t(this, Fs)), e(this, s, h).call(this, t(this, y), "click", t(this, oe)), e(this, s, h).call(this, t(this, _), "pointerenter", t(this, As)), e(this, s, h).call(this, t(this, _), "pointerleave", t(this, Fs)), e(this, s, h).call(this, t(this, E), "pointerdown", t(this, ne)), e(this, s, h).call(this, t(this, E), "pointermove", t(this, ae)), e(this, s, h).call(this, t(this, E), "pointerup", t(this, le)), e(this, s, h).call(this, t(this, E), "pointercancel", t(this, he)), e(this, s, h).call(this, t(this, E), "click", t(this, re)), e(this, s, h).call(this, t(this, E), "keydown", t(this, ce)), e(this, s, h).call(this, t(this, tt), "click", t(this, ue)), e(this, s, h).call(this, t(this, st), "click", t(this, pe));
1420
+ for (const i of t(this, pt))
1421
+ e(this, s, h).call(this, i, "pointerenter", t(this, Ps)), e(this, s, h).call(this, i, "mouseenter", t(this, Ps)), e(this, s, h).call(this, i, "pointerdown", t(this, se));
1422
+ e(this, s, h).call(this, document, "pointerup", t(this, ge)), e(this, s, h).call(this, document, "pointercancel", t(this, ye)), e(this, s, h).call(this, document, "pointermove", t(this, xs)), e(this, s, h).call(this, document, "mousemove", t(this, xs)), e(this, s, h).call(this, document, "fullscreenchange", t(this, Pt)), e(this, s, h).call(this, document, "webkitfullscreenchange", t(this, Pt)), e(this, s, h).call(this, document, "mozfullscreenchange", t(this, Pt)), e(this, s, h).call(this, document, "MSFullscreenChange", t(this, Pt)), e(this, s, h).call(this, t(this, f), "fullscreenchange", t(this, Pt)), e(this, s, h).call(this, window, "blur", t(this, we)), e(this, s, h).call(this, window, "focus", t(this, xe)), e(this, s, h).call(this, t(this, r), "play", t(this, ke)), e(this, s, h).call(this, t(this, r), "pause", t(this, Pe)), e(this, s, h).call(this, t(this, r), "ended", t(this, Ee)), e(this, s, h).call(this, t(this, r), "loadstart", t(this, Te)), e(this, s, h).call(this, t(this, r), "waiting", t(this, is)), e(this, s, h).call(this, t(this, r), "stalled", t(this, is)), e(this, s, h).call(this, t(this, r), "seeking", t(this, is)), e(this, s, h).call(this, t(this, r), "loadeddata", t(this, Bt)), e(this, s, h).call(this, t(this, r), "loadedmetadata", t(this, Ce)), e(this, s, h).call(this, t(this, r), "canplay", t(this, Bt)), e(this, s, h).call(this, t(this, r), "canplaythrough", t(this, Bt)), e(this, s, h).call(this, t(this, r), "playing", t(this, Ae)), e(this, s, h).call(this, t(this, r), "seeked", t(this, Fe)), e(this, s, h).call(this, t(this, r), "error", t(this, Le)), e(this, s, h).call(this, t(this, r), "progress", t(this, L)), e(this, s, h).call(this, t(this, r), "suspend", t(this, L)), e(this, s, h).call(this, t(this, r), "timeupdate", t(this, Se)), e(this, s, h).call(this, t(this, r), "volumechange", t(this, Me)), e(this, s, h).call(this, t(this, r), "enterpictureinpicture", t(this, kt)), e(this, s, h).call(this, t(this, r), "leavepictureinpicture", t(this, kt));
1423
+ }, h = function(i, a, l) {
1424
+ i.addEventListener(a, l), t(this, Wt).push(() => i.removeEventListener(a, l));
1425
+ }, Vs = function() {
1426
+ if (!(!this.src || t(this, R))) {
1427
+ if (t(this, z)?.disconnect(), t(this, r).dataset.src = this.src, "IntersectionObserver" in window) {
1428
+ o(this, z, new IntersectionObserver((i, a) => {
1429
+ i.some((l) => l.isIntersecting) && (a.disconnect(), o(this, z, null), e(this, s, ct).call(this));
1430
+ }, { rootMargin: this.preloadMargin })), t(this, z).observe(t(this, c));
1431
+ return;
1432
+ }
1433
+ e(this, s, ct).call(this);
1434
+ }
1435
+ }, zt = new WeakMap(), B = function() {
1436
+ t(this, ft) && (window.clearTimeout(t(this, ft)), o(this, ft, 0));
1437
+ }, Qs = new WeakMap(), ns = function(i = e(this, s, I).call(this) ? t(this, ws) : t(this, Vt)) {
1438
+ e(this, s, B).call(this), o(this, ft, window.setTimeout(t(this, Qs), i));
1439
+ }, K = function() {
1440
+ e(this, s, I).call(this) && e(this, s, ns).call(this, t(this, ws));
1441
+ }, G = function() {
1442
+ if (!e(this, s, I).call(this)) return !1;
1443
+ const i = t(this, c).classList.contains("is-controls-visible");
1444
+ return t(this, c).classList.add("is-controls-visible"), e(this, s, K).call(this), !i;
1445
+ }, Is = function(i = !1) {
1446
+ !i && e(this, s, I).call(this) || (t(this, c).classList.add("is-pointer-active"), t(this, O) ? e(this, s, B).call(this) : e(this, s, ns).call(this, i ? t(this, Vt) : void 0));
1447
+ }, as = function() {
1448
+ o(this, O, !1), e(this, s, B).call(this), t(this, c).classList.remove("is-pointer-active");
1449
+ }, $t = function(i) {
1450
+ return i instanceof PointerEvent ? (o(this, Mt, i.pointerType === "touch"), t(this, Mt) ? !1 : (o(this, Jt, i.clientX), o(this, Qt, i.clientY), !0)) : i instanceof MouseEvent ? (o(this, Mt, !1), o(this, Jt, i.clientX), o(this, Qt, i.clientY), !0) : !1;
1451
+ }, ei = function(i, a) {
1452
+ if (i === null || a === null || i < 0 || a < 0 || i > window.innerWidth || a > window.innerHeight) return !1;
1453
+ const l = this.getBoundingClientRect();
1454
+ return l.width <= 0 || l.height <= 0 ? !1 : i >= l.left && i <= l.right && a >= l.top && a <= l.bottom;
1455
+ }, Nt = function() {
1456
+ return t(this, c).classList.contains("is-controls-visible") || t(this, c).classList.contains("is-pointer-active") || t(this, f).activeElement instanceof HTMLElement;
1457
+ }, ls = function() {
1458
+ return e(this, s, I).call(this) && performance.now() < t(this, Gt);
1459
+ }, Re = function(i) {
1460
+ return i instanceof HTMLButtonElement && (i.disabled || i === t(this, y) && (!this.volumeEnabled || !t(this, g)));
1461
+ }, De = function() {
1462
+ if (!t(this, Mt) && e(this, s, ei).call(this, t(this, Jt), t(this, Qt))) {
1463
+ e(this, s, Is).call(this, !0);
1464
+ return;
1465
+ }
1466
+ e(this, s, as).call(this);
1467
+ }, Rt = new WeakMap(), Dt = new WeakMap(), xs = new WeakMap(), Ht = new WeakMap(), lt = new WeakMap(), ht = new WeakMap(), ks = new WeakMap(), te = new WeakMap(), Ps = new WeakMap(), zs = function() {
1468
+ t(this, xt) && (window.clearTimeout(t(this, xt)), o(this, xt, 0));
1469
+ }, Es = new WeakMap(), se = new WeakMap(), He = function() {
1470
+ t(this, bt) && (window.clearTimeout(t(this, bt)), o(this, bt, 0));
1471
+ }, hs = function() {
1472
+ t(this, rt) && (window.clearTimeout(t(this, rt)), o(this, rt, 0));
1473
+ }, Rs = function() {
1474
+ t(this, ot) && (window.clearTimeout(t(this, ot)), o(this, ot, 0));
1475
+ }, cs = function() {
1476
+ t(this, Ft) && (window.clearTimeout(t(this, Ft)), o(this, Ft, 0));
1477
+ }, Be = function() {
1478
+ t(this, wt) && (window.clearTimeout(t(this, wt)), o(this, wt, 0));
1479
+ }, ii = function() {
1480
+ e(this, s, Be).call(this), t(this, c).classList.remove("is-volume-icon-animating"), t(this, y).offsetWidth, t(this, c).classList.add("is-volume-icon-animating"), o(this, wt, window.setTimeout(() => {
1481
+ o(this, wt, 0), t(this, c).classList.remove("is-volume-icon-animating");
1482
+ }, 240));
1483
+ }, Ts = new WeakMap(), ri = function() {
1484
+ t(this, vt) || t(this, ot) || (t(this, c).classList.add("is-progress-settling"), e(this, s, ut).call(this, 0), o(this, ot, window.setTimeout(t(this, Ts), t(this, Ws))));
1485
+ }, ct = async function() {
1486
+ if (t(this, R)) return;
1487
+ const i = t(this, r).dataset.src || this.src;
1488
+ i && (e(this, s, hs).call(this), e(this, s, cs).call(this), o(this, Kt, t(this, Kt) + 1), o(this, R, !0), o(this, D, !1), o(this, H, !1), o(this, W, !1), o(this, j, !1), o(this, Z, t(this, Z) + 1), t(this, c).classList.remove("has-visible-frame"), e(this, s, os).call(this), t(this, r).src = i, t(this, r).preload = "auto", t(this, r).load(), t(this, r).autoplay && t(this, r).muted && await t(this, r).play().catch(() => {
1489
+ }));
1490
+ }, Y = function(i) {
1491
+ if (!Number.isFinite(i) || i < 0) return "0:00";
1492
+ const a = Math.floor(i), l = a % 60, u = Math.floor(a / 60), p = u % 60, P = Math.floor(u / 60);
1493
+ return P > 0 ? `${P}:${String(p).padStart(2, "0")}:${String(l).padStart(2, "0")}` : `${p}:${String(l).padStart(2, "0")}`;
1494
+ }, qe = function() {
1495
+ return !t(this, r).loop || t(this, r).paused || !Number.isFinite(t(this, r).duration) || t(this, r).duration <= 0 ? !1 : t(this, r).currentTime < 0.28 || t(this, r).duration - t(this, r).currentTime < 0.28;
1496
+ }, oi = function(i = t(this, r).currentTime) {
1497
+ if (!Number.isFinite(i)) return 0;
1498
+ const a = Math.max(0, i);
1499
+ try {
1500
+ for (let l = 0; l < t(this, r).buffered.length; l += 1) {
1501
+ const u = t(this, r).buffered.start(l), p = t(this, r).buffered.end(l);
1502
+ if (a + t(this, It) >= u && a <= p + t(this, It))
1503
+ return Math.max(0, p - a);
1504
+ }
1505
+ } catch {
1506
+ return 0;
1507
+ }
1508
+ return 0;
1509
+ }, $e = function(i = t(this, Ks)) {
1510
+ if (!t(this, R) || t(this, r).error || !t(this, c).classList.contains("has-loaded-once") || !Number.isFinite(t(this, r).duration) || t(this, r).duration <= 0) return !1;
1511
+ const a = Math.max(0, t(this, r).duration - t(this, r).currentTime), l = Math.min(i, a);
1512
+ return l <= t(this, It) || e(this, s, oi).call(this) + t(this, It) >= l;
1513
+ }, Ut = function(i, a = !1) {
1514
+ e(this, s, He).call(this);
1515
+ const l = i && !e(this, s, qe).call(this) && !e(this, s, $e).call(this), p = i && !t(this, H) || l;
1516
+ if (o(this, Lt, p), !p) {
1517
+ t(this, c).classList.remove("is-loading");
1518
+ return;
1519
+ }
1520
+ if (a) {
1521
+ t(this, c).classList.add("is-loading");
1522
+ return;
1523
+ }
1524
+ o(this, bt, window.setTimeout(() => {
1525
+ if (o(this, bt, 0), !t(this, H) || !e(this, s, qe).call(this) && !e(this, s, $e).call(this)) {
1526
+ o(this, Lt, !0), t(this, c).classList.add("is-loading");
1527
+ return;
1528
+ }
1529
+ o(this, Lt, !1), t(this, c).classList.remove("is-loading");
1530
+ }, t(this, _s)));
1531
+ }, L = new WeakMap(), ni = function() {
1532
+ return t(this, R) && !t(this, r).error && t(this, D) && (t(this, r).readyState >= HTMLMediaElement.HAVE_FUTURE_DATA || t(this, r).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !t(this, c).classList.contains("is-loading"));
1533
+ }, X = function() {
1534
+ return t(this, M) || t(this, v) || t(this, N);
1535
+ }, ai = function() {
1536
+ t(this, Kt) >= t(this, Os) || t(this, rt) || o(this, rt, window.setTimeout(() => {
1537
+ o(this, rt, 0), e(this, s, cs).call(this), o(this, R, !1), o(this, D, !1), o(this, H, !1), o(this, W, !1), o(this, j, !1), o(this, Z, t(this, Z) + 1), t(this, c).classList.remove("has-visible-frame"), t(this, c).classList.contains("has-loaded-once") || e(this, s, ut).call(this, 0), t(this, r).removeAttribute("src"), t(this, r).load(), e(this, s, ct).call(this);
1538
+ }, t(this, Zs)));
1539
+ }, Ne = function() {
1540
+ return t(this, N) ? (o(this, N, !1), o(this, mt, !1), e(this, s, x).call(this), e(this, s, S).call(this), !0) : !1;
1541
+ }, Ue = function() {
1542
+ return e(this, s, hs).call(this), !t(this, c).classList.contains("has-loaded-once") && e(this, s, ri).call(this), t(this, c).classList.add("has-loaded-once"), t(this, c).classList.add("has-visible-frame"), t(this, L).call(this), o(this, C, null), t(this, N) ? (e(this, s, Ne).call(this), !0) : (e(this, s, X).call(this) || e(this, s, x).call(this), e(this, s, S).call(this), !0);
1543
+ }, li = function() {
1544
+ if (t(this, D) || t(this, W) || t(this, r).error) return;
1545
+ o(this, W, !0);
1546
+ const i = t(this, Z), a = () => {
1547
+ if (i === t(this, Z)) {
1548
+ if (e(this, s, cs).call(this), o(this, W, !1), o(this, D, !t(this, r).error && t(this, r).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && t(this, r).videoWidth > 0 && t(this, r).videoHeight > 0), t(this, D)) {
1549
+ if (t(this, j) || t(this, H)) return;
1550
+ o(this, j, !0), window.requestAnimationFrame(() => {
1551
+ window.requestAnimationFrame(() => {
1552
+ i === t(this, Z) && (o(this, j, !1), o(this, H, !0), e(this, s, Ue).call(this), e(this, s, T).call(this));
1553
+ });
1554
+ }), e(this, s, T).call(this);
1555
+ return;
1556
+ }
1557
+ t(this, L).call(this);
1558
+ }
1559
+ };
1560
+ if ("requestVideoFrameCallback" in t(this, r)) {
1561
+ t(this, r).requestVideoFrameCallback(a), o(this, Ft, window.setTimeout(a, 180));
1562
+ return;
1563
+ }
1564
+ window.requestAnimationFrame(a);
1565
+ }, Bt = new WeakMap(), Ye = function() {
1566
+ return !t(this, r).paused && (!t(this, r).ended || t(this, r).loop) && t(this, r).readyState >= HTMLMediaElement.HAVE_FUTURE_DATA;
1567
+ }, x = function(i = t(this, r).currentTime) {
1568
+ o(this, gs, Number.isFinite(i) ? Math.max(0, i) : 0), o(this, ys, performance.now());
1569
+ }, J = function() {
1570
+ o(this, V, null), o(this, nt, null);
1571
+ }, Xe = function() {
1572
+ if (!Number.isFinite(t(this, r).duration) || t(this, r).duration <= 0) {
1573
+ o(this, V, null);
1574
+ return;
1575
+ }
1576
+ const i = Number.isFinite(t(this, r).currentTime) ? Math.max(0, t(this, r).currentTime) : 0, a = Number.isFinite(t(this, gt)) ? t(this, gt) : i;
1577
+ o(this, V, Math.min(t(this, r).duration, Math.max(i, a))), e(this, s, x).call(this, t(this, V));
1578
+ }, hi = function() {
1579
+ if (!Number.isFinite(t(this, r).duration) || t(this, r).duration <= 0) {
1580
+ o(this, nt, null), e(this, s, Xe).call(this);
1581
+ return;
1582
+ }
1583
+ const i = t(this, c).style.getPropertyValue("--sp-progress-inset"), a = Number.parseFloat(i), l = Number.isFinite(a) ? Math.min(1, Math.max(0, 1 - a / 100)) : null, u = e(this, s, Yt).call(this), p = Math.min(1, Math.max(0, u / t(this, r).duration)), P = Math.max(l ?? 0, p);
1584
+ o(this, nt, P), o(this, V, P * t(this, r).duration), e(this, s, x).call(this, t(this, V)), e(this, s, ut).call(this, P), t(this, d).setAttribute("aria-valuenow", `${t(this, V)}`), t(this, d).setAttribute(
1585
+ "aria-valuetext",
1586
+ `${e(this, s, Y).call(this, t(this, V))} of ${e(this, s, Y).call(this, t(this, r).duration)}`
1587
+ );
1588
+ }, Yt = function() {
1589
+ if (!Number.isFinite(t(this, r).duration) || t(this, r).duration <= 0) return t(this, r).currentTime || 0;
1590
+ if (e(this, s, X).call(this)) return t(this, F);
1591
+ if (t(this, V) !== null) return t(this, V);
1592
+ if (!e(this, s, Ye).call(this)) return t(this, r).currentTime || 0;
1593
+ if (t(this, Lt) || !t(this, vt) || performance.now() < t(this, vs))
1594
+ return e(this, s, x).call(this), t(this, r).currentTime || 0;
1595
+ if (t(this, c).classList.contains("is-loading") && t(this, r).readyState < HTMLMediaElement.HAVE_FUTURE_DATA)
1596
+ return e(this, s, x).call(this), t(this, r).currentTime || 0;
1597
+ const i = (performance.now() - t(this, ys)) / 1e3, a = t(this, gs) + i, l = t(this, r).loop ? a % t(this, r).duration : Math.min(a, t(this, r).duration);
1598
+ return !t(this, r).loop && t(this, r).currentTime - l > 0.45 ? (e(this, s, x).call(this), t(this, r).currentTime) : l;
1599
+ }, ut = function(i) {
1600
+ const a = Math.min(1, Math.max(0, i)), l = (1 - a) * 100, { innerWidth: u } = e(this, s, Ds).call(this), p = 1 / u, P = t(this, v) && t(this, Ct) && t(this, it) + p < a;
1601
+ if (t(this, c).style.setProperty("--sp-progress-inset", `${l}%`), t(this, c).style.setProperty("--sp-return-marker-base-opacity", P ? "0" : "1"), P) {
1602
+ const Ls = e(this, s, us).call(this, t(this, it)), rs = Math.max(0, u - 2), ki = Math.min(rs, Math.max(0, Ls - 3));
1603
+ t(this, c).style.setProperty("--sp-return-marker-hole-left", `${ki}px`);
1604
+ } else
1605
+ t(this, c).style.setProperty("--sp-return-marker-hole-left", "-9999px");
1606
+ }, ci = function(i) {
1607
+ return !Number.isFinite(t(this, r).duration) || t(this, r).duration <= 0 ? 0 : Math.min(1, Math.max(0, i / t(this, r).duration));
1608
+ }, Ds = function(i = t(this, d).getBoundingClientRect()) {
1609
+ const a = Math.min(2, Math.max(0, i.width / 2)), l = Math.max(1, i.width - a * 2);
1610
+ return { rect: i, sideInset: a, innerWidth: l };
1611
+ }, us = function(i, a = t(this, d).getBoundingClientRect()) {
1612
+ const { sideInset: l, innerWidth: u } = e(this, s, Ds).call(this, a), p = Math.min(1, Math.max(0, i));
1613
+ return l + p * u;
1614
+ }, ui = function(i, a) {
1615
+ const { sideInset: l, innerWidth: u } = e(this, s, Ds).call(this, a);
1616
+ return Math.min(1, Math.max(0, (i - a.left - l) / u));
1617
+ }, pi = function(i) {
1618
+ o(this, Tt, Number.isFinite(i) ? Math.max(0, i) : 0), o(this, it, e(this, s, ci).call(this, t(this, Tt)));
1619
+ const a = t(this, d).getBoundingClientRect(), l = e(this, s, us).call(this, t(this, it), a), u = l >= t(this, ss) && l <= Math.max(t(this, ss), a.width - t(this, ss));
1620
+ o(this, Ct, t(this, Tt) > t(this, Ys) && u), t(this, c).classList.toggle("has-return-marker", t(this, Ct)), t(this, c).style.setProperty("--sp-return-marker-left", `${l}px`);
1621
+ }, di = function(i, a, l, u = t(this, v)) {
1622
+ const p = l * t(this, r).duration;
1623
+ if (!u || !t(this, Ct))
1624
+ return { percent: l, targetTime: p };
1625
+ const P = a.left + e(this, s, us).call(this, t(this, it), a);
1626
+ return Math.abs(i - P) <= t(this, Us) ? {
1627
+ percent: t(this, it),
1628
+ targetTime: t(this, Tt)
1629
+ } : { percent: l, targetTime: p };
1630
+ }, S = function(i = e(this, s, Yt).call(this)) {
1631
+ const a = Number.isFinite(t(this, r).duration) && t(this, r).duration > 0;
1632
+ if (a && t(this, nt) !== null) {
1633
+ const p = t(this, nt) * t(this, r).duration;
1634
+ o(this, gt, p), e(this, s, ut).call(this, t(this, nt)), t(this, d).setAttribute("aria-valuemin", "0"), t(this, d).setAttribute("aria-valuemax", `${t(this, r).duration}`), t(this, d).setAttribute("aria-valuenow", `${p}`), t(this, d).setAttribute(
1635
+ "aria-valuetext",
1636
+ `${e(this, s, Y).call(this, p)} of ${e(this, s, Y).call(this, t(this, r).duration)}`
1637
+ );
1638
+ return;
1639
+ }
1640
+ const l = a ? Math.min(t(this, r).duration, Math.max(0, i)) : i, u = a ? l / t(this, r).duration : 0;
1641
+ o(this, gt, Number.isFinite(l) ? Math.max(0, l) : 0), e(this, s, ut).call(this, u), t(this, d).setAttribute("aria-valuemin", "0"), t(this, d).setAttribute("aria-valuemax", a ? `${t(this, r).duration}` : "0"), t(this, d).setAttribute("aria-valuenow", a ? `${l}` : "0"), t(this, d).setAttribute(
1642
+ "aria-valuetext",
1643
+ a ? `${e(this, s, Y).call(this, l)} of ${e(this, s, Y).call(this, t(this, r).duration)}` : "Loading video"
1644
+ );
1645
+ }, ps = function(i, a = t(this, v)) {
1646
+ if (!Number.isFinite(t(this, r).duration) || t(this, r).duration <= 0) return t(this, r).currentTime;
1647
+ const l = t(this, d).getBoundingClientRect(), u = e(this, s, ui).call(this, i, l), p = e(this, s, di).call(this, i, l, u, a);
1648
+ return e(this, s, ut).call(this, p.percent), t(this, c).style.setProperty("--sp-scrub-preview-left", `${e(this, s, us).call(this, p.percent, l)}px`), t(this, fs).textContent = e(this, s, Y).call(this, p.targetTime), t(this, d).setAttribute("aria-valuenow", `${p.targetTime}`), t(this, d).setAttribute(
1649
+ "aria-valuetext",
1650
+ `${e(this, s, Y).call(this, p.targetTime)} of ${e(this, s, Y).call(this, t(this, r).duration)}`
1651
+ ), e(this, s, mi).call(this), p.targetTime;
1652
+ }, ds = function() {
1653
+ o(this, St, !1), t(this, c)?.classList.remove("has-controls-collision");
1654
+ }, mi = function() {
1655
+ if (!t(this, v) || !t(this, $) || !t(this, Zt)) {
1656
+ e(this, s, ds).call(this);
1657
+ return;
1658
+ }
1659
+ const i = t(this, $).getBoundingClientRect(), a = t(this, Zt).getBoundingClientRect(), l = i.width > 0 && i.height > 0, u = t(this, St) ? t(this, Js) : t(this, Gs), p = l && a.right >= i.left - u && a.left <= i.right + u && a.bottom >= i.top - u && a.top <= i.bottom + u;
1660
+ o(this, St, p), t(this, c).classList.toggle("has-controls-collision", t(this, St));
1661
+ }, Xt = function() {
1662
+ t(this, dt) && (window.cancelAnimationFrame(t(this, dt)), o(this, dt, 0));
1663
+ }, fi = function() {
1664
+ e(this, s, Xt).call(this), e(this, s, x).call(this);
1665
+ const i = () => {
1666
+ e(this, s, S).call(this, e(this, s, Yt).call(this)), e(this, s, Ye).call(this) && o(this, dt, window.requestAnimationFrame(i));
1667
+ };
1668
+ o(this, dt, window.requestAnimationFrame(i));
1669
+ }, T = function() {
1670
+ const i = !t(this, r).paused && (!t(this, r).ended || t(this, r).loop) || t(this, v) && t(this, et), a = t(this, C) ? t(this, C) === "playing" : i;
1671
+ if (t(this, c).classList.toggle("is-playing", a), t(this, q).setAttribute("aria-label", a ? "Pause video" : "Play video"), t(this, v)) {
1672
+ e(this, s, Xt).call(this);
1673
+ return;
1674
+ }
1675
+ i && t(this, c).classList.contains("has-loaded-once") && !t(this, c).classList.contains("is-progress-settling") ? e(this, s, fi).call(this) : (e(this, s, Xt).call(this), e(this, s, S).call(this));
1676
+ }, Et = function() {
1677
+ t(this, At) && (window.clearTimeout(t(this, At)), o(this, At, 0));
1678
+ }, bi = function() {
1679
+ const i = t(this, r);
1680
+ return i.audioTracks && typeof i.audioTracks.length == "number" ? i.audioTracks.length > 0 : typeof i.mozHasAudio == "boolean" ? i.mozHasAudio : typeof i.webkitAudioDecodedByteCount == "number" && t(this, r).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !t(this, r).muted && t(this, r).currentTime > 0.25 ? i.webkitAudioDecodedByteCount > 0 : t(this, g);
1681
+ }, A = new WeakMap(), _e = function(i) {
1682
+ if (!t(this, g)) return;
1683
+ const a = t(this, E).getBoundingClientRect(), l = Math.min(1, Math.max(0, 1 - (i - a.top) / a.height)), u = Math.round(l * 100) / 100;
1684
+ t(this, r).volume = u, t(this, r).muted = u <= 0, t(this, A).call(this);
1685
+ }, Hs = function(i) {
1686
+ i !== null && t(this, E).hasPointerCapture(i) && t(this, E).releasePointerCapture(i);
1687
+ }, _t = function(i) {
1688
+ o(this, U, !1), o(this, w, null), t(this, _).classList.remove("is-scrubbing-volume"), t(this, E).blur(), e(this, s, Hs).call(this, i), e(this, s, Oe).call(this, 260);
1689
+ }, kt = new WeakMap(), Bs = function() {
1690
+ const i = document;
1691
+ return t(this, f).fullscreenElement || i.fullscreenElement || i.webkitFullscreenElement || i.mozFullScreenElement || i.msFullscreenElement || null;
1692
+ }, We = function() {
1693
+ const i = document, a = t(this, c), l = t(this, r), p = !!((i.fullscreenEnabled ?? i.webkitFullscreenEnabled ?? i.mozFullScreenEnabled ?? i.msFullscreenEnabled ?? !1) && (a.requestFullscreen || a.webkitRequestFullscreen || a.mozRequestFullScreen || a.msRequestFullscreen)), P = !!(l.webkitSupportsFullscreen || l.webkitEnterFullscreen || l.webkitEnterFullScreen);
1694
+ return !!(this.fullscreenEnabled && (p || P));
1695
+ }, vi = function() {
1696
+ const i = t(this, c), a = i.requestFullscreen || i.webkitRequestFullscreen || i.mozRequestFullScreen || i.msRequestFullscreen;
1697
+ return Promise.resolve(a?.call(i));
1698
+ }, gi = function() {
1699
+ const i = t(this, r);
1700
+ (i.webkitEnterFullscreen || i.webkitEnterFullScreen)?.call(i);
1701
+ }, yi = function() {
1702
+ const i = document, a = i.exitFullscreen || i.webkitExitFullscreen || i.mozCancelFullScreen || i.msExitFullscreen;
1703
+ return Promise.resolve(a?.call(i));
1704
+ }, qt = new WeakMap(), Pt = new WeakMap(), wi = function(i) {
1705
+ e(this, s, B).call(this), e(this, s, ms).call(this), e(this, s, qs).call(this, t(this, k)), e(this, s, Hs).call(this, t(this, w)), e(this, s, Et).call(this), o(this, M, !1), o(this, v, !1), o(this, k, null), o(this, O, !1), o(this, at, !1), o(this, U, !1), o(this, w, null), e(this, s, zs).call(this), t(this, Es).call(this), t(this, Q).style.removeProperty("--sp-control-hover-offset"), t(this, y).classList.remove("is-volume-open"), t(this, _).classList.remove("is-scrubbing-volume"), t(this, c).classList.remove("is-scrubbing"), t(this, c).classList.remove("is-pointer-active");
1706
+ const a = t(this, f).activeElement;
1707
+ a instanceof HTMLElement && a.blur(), i ? e(this, s, De).call(this) : e(this, s, as).call(this);
1708
+ }, Cs = new WeakMap(), qs = function(i) {
1709
+ i !== null && t(this, d).hasPointerCapture(i) && t(this, d).releasePointerCapture(i);
1710
+ }, je = async function(i, a, l) {
1711
+ if (!t(this, M) && !t(this, v)) return;
1712
+ const u = t(this, v);
1713
+ e(this, s, Et).call(this), o(this, M, !1), o(this, v, !1), o(this, k, null), t(this, c).classList.remove("is-scrubbing"), e(this, s, ds).call(this), e(this, s, qs).call(this, a), l && i !== null && (e(this, s, J).call(this), o(this, F, e(this, s, ps).call(this, i, u)), o(this, N, !0), o(this, mt, t(this, et)), t(this, r).currentTime = t(this, F), e(this, s, x).call(this, t(this, F))), e(this, s, S).call(this, t(this, F)), u && t(this, et) && await t(this, r).play(), e(this, s, K).call(this);
1714
+ }, $s = function(i) {
1715
+ !t(this, M) && !t(this, v) || (e(this, s, Et).call(this), o(this, M, !1), o(this, v, !1), o(this, k, null), t(this, c).classList.remove("is-scrubbing"), e(this, s, ds).call(this), e(this, s, qs).call(this, i), e(this, s, x).call(this), e(this, s, S).call(this), t(this, et) && t(this, r).play(), e(this, s, K).call(this));
1716
+ }, ee = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), ms = function() {
1717
+ t(this, yt) && (window.clearTimeout(t(this, yt)), o(this, yt, 0));
1718
+ }, Ze = function() {
1719
+ !this.volumeEnabled || !this.volumeSliderEnabled || !t(this, g) || (e(this, s, ms).call(this), t(this, y).classList.add("is-volume-open"));
1720
+ }, es = new WeakMap(), Oe = function(i = 150) {
1721
+ e(this, s, ms).call(this), o(this, yt, window.setTimeout(t(this, es), i));
1722
+ }, As = new WeakMap(), Fs = new WeakMap(), oe = new WeakMap(), ne = new WeakMap(), ae = new WeakMap(), le = new WeakMap(), he = new WeakMap(), ce = new WeakMap(), ue = new WeakMap(), pe = new WeakMap(), de = new WeakMap(), me = new WeakMap(), fe = new WeakMap(), be = new WeakMap(), ve = new WeakMap(), ge = new WeakMap(), ye = new WeakMap(), we = new WeakMap(), xe = new WeakMap(), ke = new WeakMap(), Pe = new WeakMap(), Ee = new WeakMap(), Te = new WeakMap(), is = new WeakMap(), Ce = new WeakMap(), Ae = new WeakMap(), Fe = new WeakMap(), Le = new WeakMap(), Se = new WeakMap(), Me = new WeakMap(), I = function() {
1723
+ return window.matchMedia("(max-width: 768px)").matches && window.matchMedia("(hover: none), (pointer: coarse)").matches;
1724
+ }, xi = function() {
1725
+ t(this, r) && (t(this, z)?.disconnect(), o(this, z, null), e(this, s, hs).call(this), e(this, s, Rs).call(this), o(this, R, !1), o(this, Kt, 0), o(this, D, !1), o(this, H, !1), o(this, W, !1), o(this, j, !1), o(this, Z, t(this, Z) + 1), o(this, vt, !1), o(this, gt, 0), e(this, s, J).call(this), o(this, g, !0), o(this, N, !1), o(this, mt, !1), o(this, C, null), t(this, c).classList.remove("has-loaded-once", "has-visible-frame", "is-progress-settling"), t(this, r).dataset.src = this.src, t(this, r).pause(), t(this, r).removeAttribute("src"), t(this, r).preload = "none", e(this, s, os).call(this), t(this, r).load(), e(this, s, ut).call(this, 0), t(this, A).call(this), t(this, L).call(this), e(this, s, T).call(this));
1726
+ }, Ge(ti, "observedAttributes", [
1727
+ "src",
1728
+ "aspect-ratio",
1729
+ "preload-margin",
1730
+ "controls",
1731
+ "disable-autoplay",
1732
+ "enable-volume",
1733
+ "disable-volume",
1734
+ "disable-volume-slider",
1735
+ "enable-picture-in-picture",
1736
+ "disable-picture-in-picture",
1737
+ "enable-fullscreen",
1738
+ "disable-fullscreen",
1739
+ "no-autoplay",
1740
+ "no-volume",
1741
+ "no-volume-slider",
1742
+ "no-picture-in-picture",
1743
+ "no-fullscreen"
1744
+ ]);
1745
+ customElements.get("simple-player") || customElements.define("simple-player", ti);
1746
+ export {
1747
+ ti as SimplePlayer
1748
+ };
1749
+ //# sourceMappingURL=simple-player.js.map