@aigamo/hydrangean-diva 0.0.1-alpha.68 → 0.0.1-alpha.69
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 +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +365 -356
- package/dist/index.es.js.map +1 -1
- package/dist/src/features/common/helpers/commandBarHeight.d.ts +1 -0
- package/dist/src/features/common/helpers/commandBarSpacerHeight.d.ts +1 -0
- package/dist/src/features/common/helpers/headerHeight.d.ts +1 -0
- package/package.json +4 -4
package/dist/index.es.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Fragment as e, jsx as t, jsxs as n } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { createContext as r, memo as i, useCallback as a, useContext as o, useEffect as s, useLayoutEffect as c, useMemo as l,
|
|
3
|
-
import
|
|
4
|
-
import { action as f, computed as p, makeObservable as m, observable as h, reaction as
|
|
5
|
-
import { useLocalStorageState as
|
|
6
|
-
import { pull as
|
|
7
|
-
import { NostalgicDiva as
|
|
8
|
-
import { EuiBottomBar as
|
|
2
|
+
import { createContext as r, memo as i, useCallback as a, useContext as o, useEffect as s, useLayoutEffect as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
3
|
+
import ee from "ajv";
|
|
4
|
+
import { action as f, computed as p, makeObservable as m, observable as h, reaction as te } from "mobx";
|
|
5
|
+
import { useLocalStorageState as ne } from "@aigamo/route-sphere";
|
|
6
|
+
import { pull as re } from "lodash-es";
|
|
7
|
+
import { NostalgicDiva as ie, NostalgicDivaProvider as ae, findVideoService as oe, nullPlayerController as se, useNostalgicDiva as g } from "@aigamo/nostalgic-diva";
|
|
8
|
+
import { EuiBottomBar as ce, EuiButton as _, EuiButtonEmpty as v, EuiButtonIcon as y, EuiCheckbox as b, EuiConfirmModal as le, EuiContextMenu as x, EuiEmptyPrompt as ue, EuiFieldText as S, EuiFlexGroup as C, EuiFlexItem as w, EuiForm as de, EuiFormRow as T, EuiHideFor as E, EuiIcon as D, EuiLink as fe, EuiModal as pe, EuiModalBody as me, EuiModalFooter as he, EuiModalHeader as ge, EuiModalHeaderTitle as _e, EuiPageTemplate as O, EuiPopover as k, EuiRange as ve, EuiShowFor as ye, EuiSpacer as be, EuiTable as xe, EuiTableHeader as Se, EuiTableHeaderCell as A, EuiTableHeaderCellCheckbox as Ce, EuiTableHeaderMobile as we, EuiTableRow as Te, EuiTableRowCell as j, EuiTableRowCellCheckbox as Ee, useEuiTheme as M, useGeneratedHtmlId as De } from "@elastic/eui";
|
|
9
9
|
import { observer as N } from "mobx-react-lite";
|
|
10
|
-
import { AddRegular as P, ArrowDownloadRegular as
|
|
10
|
+
import { AddRegular as P, ArrowDownloadRegular as Oe, ArrowRepeat1Filled as ke, ArrowRepeatAllFilled as Ae, ArrowRepeatAllOffFilled as je, ArrowShuffleFilled as Me, ArrowShuffleOffFilled as Ne, ArrowUploadRegular as Pe, DeleteRegular as Fe, DismissRegular as F, MoreHorizontalFilled as I, NavigationPlayRegular as Ie, NextFilled as Le, OpenRegular as Re, PauseFilled as ze, PlayFilled as Be, PlayRegular as L, PreviousFilled as Ve, RenameRegular as He, SkipBack10Regular as Ue, SkipForward30Regular as We, Speaker2Regular as Ge, TopSpeedRegular as Ke } from "@fluentui/react-icons";
|
|
11
11
|
import R from "ez-modal-react";
|
|
12
|
-
import { ReactSortable as
|
|
13
|
-
import { useRouter as
|
|
12
|
+
import { ReactSortable as qe } from "react-sortablejs";
|
|
13
|
+
import { useRouter as Je } from "@tanstack/react-router";
|
|
14
14
|
//#region src/features/common/helpers/bottomBarHeight.ts
|
|
15
|
-
var
|
|
15
|
+
var Ye = 81, z = new Map(Object.entries({
|
|
16
16
|
Audio: "",
|
|
17
17
|
Dailymotion: "https://www.dailymotion.com/favicon.ico",
|
|
18
18
|
Niconico: "https://www.nicovideo.jp/favicon.ico",
|
|
@@ -20,15 +20,15 @@ var Je = 81, z = new Map(Object.entries({
|
|
|
20
20
|
Twitch: "https://www.twitch.tv/favicon.ico",
|
|
21
21
|
Vimeo: "https://vimeo.com/favicon.ico",
|
|
22
22
|
YouTube: "https://www.youtube.com/favicon.ico"
|
|
23
|
-
})),
|
|
23
|
+
})), Xe = ({ components: n = [], children: r }) => /* @__PURE__ */ t(e, { children: n.reduceRight((e, n) => /* @__PURE__ */ t(n, { children: e }), r) }), B = {
|
|
24
24
|
playQueue: "PlayQueueStore",
|
|
25
25
|
bottomBar: "BottomBarStore",
|
|
26
26
|
playlistList: "PlaylistListStore",
|
|
27
27
|
playlist: (e) => `PlaylistStore/${e}`
|
|
28
|
-
},
|
|
29
|
-
function
|
|
28
|
+
}, Ze = r(void 0), V = () => o(Ze), Qe = new ee({ coerceTypes: !0 });
|
|
29
|
+
function $e(e, t) {
|
|
30
30
|
let n;
|
|
31
|
-
if (n =
|
|
31
|
+
if (n = Qe.getSchema(t), n === void 0 && (Qe.addSchema(e, t), n = Qe.getSchema(t)), n === void 0 || n.schema !== e) throw Error(`Invalid schema. Expected: '${JSON.stringify(e)}', but got '${JSON.stringify(n?.schema)}'.`);
|
|
32
32
|
return n;
|
|
33
33
|
}
|
|
34
34
|
//#endregion
|
|
@@ -46,7 +46,7 @@ function U(e, t, n, r) {
|
|
|
46
46
|
}
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region src/features/media-player.bottom-bar/stores/BottomBarStore.ts
|
|
49
|
-
var
|
|
49
|
+
var et = {
|
|
50
50
|
type: "object",
|
|
51
51
|
properties: {
|
|
52
52
|
repeat: {
|
|
@@ -59,7 +59,7 @@ var $e = {
|
|
|
59
59
|
nullable: !0
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
},
|
|
62
|
+
}, tt = class {
|
|
63
63
|
bottomBar;
|
|
64
64
|
constructor(e) {
|
|
65
65
|
this.bottomBar = e, m(this);
|
|
@@ -74,10 +74,10 @@ var $e = {
|
|
|
74
74
|
this.bottomBar.repeat = e.repeat ?? H.Off, this.bottomBar.shuffle = e.shuffle ?? !1;
|
|
75
75
|
}
|
|
76
76
|
validateState(e) {
|
|
77
|
-
return
|
|
77
|
+
return $e(et, "BottomBarLocalStorageState")(e);
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
-
U([p.struct],
|
|
80
|
+
U([p.struct], tt.prototype, "state", null);
|
|
81
81
|
var W = class {
|
|
82
82
|
player;
|
|
83
83
|
playQueue;
|
|
@@ -85,7 +85,7 @@ var W = class {
|
|
|
85
85
|
repeat = H.Off;
|
|
86
86
|
shuffle = !1;
|
|
87
87
|
constructor(e, t) {
|
|
88
|
-
this.player = e, this.playQueue = t, m(this), this.localStorageState = new
|
|
88
|
+
this.player = e, this.playQueue = t, m(this), this.localStorageState = new tt(this);
|
|
89
89
|
}
|
|
90
90
|
get controller() {
|
|
91
91
|
return this.player.controller;
|
|
@@ -181,13 +181,13 @@ var W = class {
|
|
|
181
181
|
U([h], W.prototype, "repeat", void 0), U([h], W.prototype, "shuffle", void 0), U([p], W.prototype, "controller", null), U([p], W.prototype, "playing", null), U([p], W.prototype, "percent", null), U([p], W.prototype, "canSeek", null), U([p], W.prototype, "currentItem", null), U([p], W.prototype, "canToggleRepeat", null), U([p], W.prototype, "canToggleShuffle", null), U([p], W.prototype, "canPlay", null), U([p], W.prototype, "canPause", null), U([p], W.prototype, "canPrevious", null), U([p], W.prototype, "canNext", null), U([p], W.prototype, "canSkipBack10", null), U([p], W.prototype, "canSkipForward30", null), U([p], W.prototype, "canRemoveFromPlayQueue", null), U([f.bound], W.prototype, "setPercent", null), U([f.bound], W.prototype, "setSeeking", null), U([f.bound], W.prototype, "toggleRepeat", null), U([f.bound], W.prototype, "toggleShuffle", null), U([f.bound], W.prototype, "play", null), U([f.bound], W.prototype, "pause", null), U([f.bound], W.prototype, "previous", null), U([f.bound], W.prototype, "next", null), U([f.bound], W.prototype, "skipBack10", null), U([f.bound], W.prototype, "skipForward30", null), U([f.bound], W.prototype, "removeFromPlayQueue", null);
|
|
182
182
|
//#endregion
|
|
183
183
|
//#region src/features/media-player.play-queue.abstractions/contexts/PlayQueueContext.ts
|
|
184
|
-
var
|
|
185
|
-
let n =
|
|
186
|
-
return
|
|
184
|
+
var nt = r(void 0), G = () => o(nt), rt = r(void 0), it = () => o(rt), at = ({ children: e }) => {
|
|
185
|
+
let n = it(), r = G(), [i] = d(() => new W(n, r));
|
|
186
|
+
return ne(B.bottomBar, i.localStorageState), /* @__PURE__ */ t(Ze.Provider, {
|
|
187
187
|
value: i,
|
|
188
188
|
children: e
|
|
189
189
|
});
|
|
190
|
-
},
|
|
190
|
+
}, ot = r(void 0), st = () => o(ot), K = class {
|
|
191
191
|
player;
|
|
192
192
|
playQueue;
|
|
193
193
|
bottomBar;
|
|
@@ -241,13 +241,13 @@ var tt = r(void 0), G = () => o(tt), nt = r(void 0), rt = () => o(nt), it = ({ c
|
|
|
241
241
|
U([p], K.prototype, "interacted", null), U([p], K.prototype, "controller", null), U([p], K.prototype, "currentItem", null), U([f.bound], K.prototype, "onLoaded", null), U([f.bound], K.prototype, "onPlay", null), U([f.bound], K.prototype, "onPause", null), U([f.bound], K.prototype, "onEnded", null), U([f.bound], K.prototype, "onTimeUpdate", null), U([f.bound], K.prototype, "onControllerChange", null);
|
|
242
242
|
//#endregion
|
|
243
243
|
//#region src/features/media-player.mini-player/components/MiniPlayerProvider.tsx
|
|
244
|
-
var
|
|
245
|
-
let n =
|
|
246
|
-
return /* @__PURE__ */ t(
|
|
244
|
+
var ct = ({ children: e }) => {
|
|
245
|
+
let n = it(), r = G(), i = V(), [a] = d(() => new K(n, r, i));
|
|
246
|
+
return /* @__PURE__ */ t(ot.Provider, {
|
|
247
247
|
value: a,
|
|
248
248
|
children: e
|
|
249
249
|
});
|
|
250
|
-
},
|
|
250
|
+
}, lt = {
|
|
251
251
|
type: "object",
|
|
252
252
|
properties: {
|
|
253
253
|
url: { type: "string" },
|
|
@@ -261,7 +261,7 @@ var st = ({ children: e }) => {
|
|
|
261
261
|
"videoId",
|
|
262
262
|
"title"
|
|
263
263
|
]
|
|
264
|
-
},
|
|
264
|
+
}, ut = {
|
|
265
265
|
type: "object",
|
|
266
266
|
properties: {
|
|
267
267
|
version: {
|
|
@@ -280,7 +280,7 @@ var st = ({ children: e }) => {
|
|
|
280
280
|
items: {
|
|
281
281
|
type: "array",
|
|
282
282
|
nullable: !0,
|
|
283
|
-
items:
|
|
283
|
+
items: lt
|
|
284
284
|
},
|
|
285
285
|
currentIndex: {
|
|
286
286
|
type: "integer",
|
|
@@ -378,7 +378,7 @@ var st = ({ children: e }) => {
|
|
|
378
378
|
U([h], q.prototype, "isSelected", void 0), U([p], q.prototype, "isCurrent", null), U([p], q.prototype, "index", null), U([p], q.prototype, "isFirst", null), U([p], q.prototype, "isLast", null), U([p], q.prototype, "canMoveToTop", null), U([p], q.prototype, "canMoveToBottom", null), U([p], q.prototype, "canRemoveToTop", null), U([p], q.prototype, "canRemoveOthers", null), U([f.bound], q.prototype, "unselect", null), U([f.bound], q.prototype, "select", null), U([f.bound], q.prototype, "toggleSelected", null), U([f.bound], q.prototype, "play", null), U([f.bound], q.prototype, "remove", null), U([f.bound], q.prototype, "playFirst", null), U([f.bound], q.prototype, "playNext", null), U([f.bound], q.prototype, "addToPlayQueue", null), U([f.bound], q.prototype, "moveToTop", null), U([f.bound], q.prototype, "moveToBottom", null), U([f.bound], q.prototype, "removeToTop", null), U([f.bound], q.prototype, "removeOthers", null);
|
|
379
379
|
//#endregion
|
|
380
380
|
//#region src/features/media-player.play-queue/stores/PlayQueueStore.ts
|
|
381
|
-
var
|
|
381
|
+
var dt = class {
|
|
382
382
|
playQueue;
|
|
383
383
|
constructor(e) {
|
|
384
384
|
this.playQueue = e, m(this);
|
|
@@ -394,17 +394,17 @@ var ut = class {
|
|
|
394
394
|
this.playQueue.items = e.items?.map((e) => this.playQueue.createItemFromDto(e)) ?? [], this.playQueue.currentIndex = e.currentIndex;
|
|
395
395
|
}
|
|
396
396
|
validateState(e) {
|
|
397
|
-
return
|
|
397
|
+
return $e(ut, "PlayQueueDto")(e);
|
|
398
398
|
}
|
|
399
399
|
};
|
|
400
|
-
U([p.struct],
|
|
400
|
+
U([p.struct], dt.prototype, "state", null);
|
|
401
401
|
var J = class {
|
|
402
402
|
interacted = !1;
|
|
403
403
|
localStorageState;
|
|
404
404
|
items = [];
|
|
405
405
|
currentId;
|
|
406
406
|
constructor() {
|
|
407
|
-
m(this), this.localStorageState = new
|
|
407
|
+
m(this), this.localStorageState = new dt(this);
|
|
408
408
|
}
|
|
409
409
|
createItemFromDto(e) {
|
|
410
410
|
return q.fromDto(this, {
|
|
@@ -529,9 +529,9 @@ var J = class {
|
|
|
529
529
|
}
|
|
530
530
|
async removeItems(e) {
|
|
531
531
|
let { currentItem: t } = this;
|
|
532
|
-
|
|
532
|
+
re(this.items, ...e.filter((e) => e !== t));
|
|
533
533
|
let { currentIndex: n, isLastItem: r } = this;
|
|
534
|
-
|
|
534
|
+
re(this.items, e.find((e) => e === t)), this.currentItem !== t && (this.interact(), r ? await this.goToFirst() : this.currentIndex = n);
|
|
535
535
|
}
|
|
536
536
|
async removeSelectedItems() {
|
|
537
537
|
await this.removeItems(this.selectedItemsOrAllItems), this.unselectAll();
|
|
@@ -558,18 +558,18 @@ var J = class {
|
|
|
558
558
|
U([h], J.prototype, "interacted", void 0), U([h], J.prototype, "items", void 0), U([h], J.prototype, "currentId", void 0), U([p], J.prototype, "isEmpty", null), U([p], J.prototype, "canClear", null), U([p], J.prototype, "currentItem", null), U([p], J.prototype, "canPlay", null), U([p], J.prototype, "canPause", null), U([p], J.prototype, "hasMultipleItems", null), U([p], J.prototype, "currentIndex", null), U([p], J.prototype, "hasPreviousItem", null), U([p], J.prototype, "hasNextItem", null), U([p], J.prototype, "isLastItem", null), U([p], J.prototype, "selectedItems", null), U([p], J.prototype, "allItemsSelected", null), U([p], J.prototype, "hasSelectedItems", null), U([p], J.prototype, "selectedItemsOrAllItems", null), U([p], J.prototype, "canAddSelectedItems", null), U([p], J.prototype, "canPlaySelectedItemsNext", null), U([p], J.prototype, "canRemoveSelectedItems", null), U([f.bound], J.prototype, "setItems", null), U([f.bound], J.prototype, "interact", null), U([f.bound], J.prototype, "clear", null), U([f.bound], J.prototype, "unselectAll", null), U([f.bound], J.prototype, "selectAll", null), U([f.bound], J.prototype, "setCurrentItem", null), U([f.bound], J.prototype, "setNextItems", null), U([f.bound], J.prototype, "clearAndSetItems", null), U([f.bound], J.prototype, "playNext", null), U([f.bound], J.prototype, "playSelectedItemsNext", null), U([f.bound], J.prototype, "addItems", null), U([f.bound], J.prototype, "addSelectedItems", null), U([f.bound], J.prototype, "playFirst", null), U([f.bound], J.prototype, "moveItem", null), U([f.bound], J.prototype, "goToFirst", null), U([f.bound], J.prototype, "removeItems", null), U([f.bound], J.prototype, "removeSelectedItems", null), U([f.bound], J.prototype, "removeOtherItems", null), U([f.bound], J.prototype, "removeItemsAbove", null), U([f.bound], J.prototype, "previous", null), U([f.bound], J.prototype, "next", null), U([f.bound], J.prototype, "addItemFromDto", null);
|
|
559
559
|
//#endregion
|
|
560
560
|
//#region src/features/media-player.play-queue/components/PlayQueueProvider.tsx
|
|
561
|
-
var
|
|
562
|
-
let [n] =
|
|
563
|
-
|
|
564
|
-
let r =
|
|
565
|
-
return s(() =>
|
|
561
|
+
var ft = ({ children: e }) => {
|
|
562
|
+
let [n] = d(() => new J());
|
|
563
|
+
ne(B.playQueue, n.localStorageState);
|
|
564
|
+
let r = g();
|
|
565
|
+
return s(() => te(() => n.currentItem, async (e, t) => {
|
|
566
566
|
e === void 0 || t === void 0 || e.type === t.type && e.videoId === t.videoId && await r.setCurrentTime(0);
|
|
567
|
-
}), [n, r]), /* @__PURE__ */ t(
|
|
567
|
+
}), [n, r]), /* @__PURE__ */ t(nt.Provider, {
|
|
568
568
|
value: n,
|
|
569
569
|
children: e
|
|
570
570
|
});
|
|
571
571
|
}, Y = class {
|
|
572
|
-
controller =
|
|
572
|
+
controller = se;
|
|
573
573
|
playing = !1;
|
|
574
574
|
percent = 0;
|
|
575
575
|
seeking = !1;
|
|
@@ -604,13 +604,13 @@ var dt = ({ children: e }) => {
|
|
|
604
604
|
U([h], Y.prototype, "controller", void 0), U([h], Y.prototype, "playing", void 0), U([h], Y.prototype, "percent", void 0), U([h], Y.prototype, "seeking", void 0), U([f.bound], Y.prototype, "setPlaying", null), U([f.bound], Y.prototype, "setPercent", null), U([f.bound], Y.prototype, "setSeeking", null), U([f.bound], Y.prototype, "onControllerChange", null), U([f.bound], Y.prototype, "onPlay", null), U([f.bound], Y.prototype, "onPause", null), U([f.bound], Y.prototype, "onEnded", null), U([f.bound], Y.prototype, "onTimeUpdate", null);
|
|
605
605
|
//#endregion
|
|
606
606
|
//#region src/features/media-player.player/components/PlayerProvider.tsx
|
|
607
|
-
var
|
|
608
|
-
let [n] =
|
|
609
|
-
return /* @__PURE__ */ t(
|
|
607
|
+
var pt = ({ children: e }) => {
|
|
608
|
+
let [n] = d(() => new Y());
|
|
609
|
+
return /* @__PURE__ */ t(rt.Provider, {
|
|
610
610
|
value: n,
|
|
611
611
|
children: e
|
|
612
612
|
});
|
|
613
|
-
},
|
|
613
|
+
}, mt = r(void 0), ht = () => o(mt), X = class {
|
|
614
614
|
playlistList;
|
|
615
615
|
id;
|
|
616
616
|
name;
|
|
@@ -627,7 +627,7 @@ var ft = ({ children: e }) => {
|
|
|
627
627
|
U([h], X.prototype, "id", void 0), U([h], X.prototype, "name", void 0), U([f.bound], X.prototype, "rename", null), U([f.bound], X.prototype, "remove", null);
|
|
628
628
|
//#endregion
|
|
629
629
|
//#region src/features/media-player.playlists/stores/PlaylistListStore.ts
|
|
630
|
-
var
|
|
630
|
+
var gt = class {
|
|
631
631
|
playlistList;
|
|
632
632
|
constructor(e) {
|
|
633
633
|
this.playlistList = e, m(this);
|
|
@@ -645,12 +645,12 @@ var ht = class {
|
|
|
645
645
|
return !0;
|
|
646
646
|
}
|
|
647
647
|
};
|
|
648
|
-
U([p.struct],
|
|
648
|
+
U([p.struct], gt.prototype, "state", null);
|
|
649
649
|
var Z = class {
|
|
650
650
|
localStorageState;
|
|
651
651
|
items = [];
|
|
652
652
|
constructor() {
|
|
653
|
-
m(this), this.localStorageState = new
|
|
653
|
+
m(this), this.localStorageState = new gt(this);
|
|
654
654
|
}
|
|
655
655
|
createItem(e) {
|
|
656
656
|
return new X(this, crypto.randomUUID(), e);
|
|
@@ -662,130 +662,130 @@ var Z = class {
|
|
|
662
662
|
this.items.push(e);
|
|
663
663
|
}
|
|
664
664
|
async removeItem(e) {
|
|
665
|
-
|
|
665
|
+
re(this.items, e);
|
|
666
666
|
}
|
|
667
667
|
};
|
|
668
668
|
U([h], Z.prototype, "items", void 0), U([f.bound], Z.prototype, "setItems", null), U([f.bound], Z.prototype, "addItem", null), U([f.bound], Z.prototype, "removeItem", null);
|
|
669
669
|
//#endregion
|
|
670
670
|
//#region src/features/media-player.playlists/components/PlaylistListProvider.tsx
|
|
671
|
-
var
|
|
672
|
-
let [n] =
|
|
673
|
-
return
|
|
671
|
+
var _t = ({ children: e }) => {
|
|
672
|
+
let [n] = d(() => new Z());
|
|
673
|
+
return ne(B.playlistList, n.localStorageState), /* @__PURE__ */ t(mt.Provider, {
|
|
674
674
|
value: n,
|
|
675
675
|
children: e
|
|
676
676
|
});
|
|
677
|
-
},
|
|
677
|
+
}, vt = ({ children: e, nostalgicDivaProps: n }) => /* @__PURE__ */ t(ae, {
|
|
678
678
|
...n,
|
|
679
|
-
children: /* @__PURE__ */ t(
|
|
679
|
+
children: /* @__PURE__ */ t(Xe, {
|
|
680
680
|
components: [
|
|
681
|
+
pt,
|
|
681
682
|
ft,
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
gt
|
|
683
|
+
at,
|
|
684
|
+
ct,
|
|
685
|
+
_t
|
|
686
686
|
],
|
|
687
687
|
children: e
|
|
688
688
|
})
|
|
689
|
-
}),
|
|
689
|
+
}), yt = {
|
|
690
690
|
width: 400,
|
|
691
691
|
height: 225
|
|
692
|
-
},
|
|
692
|
+
}, bt = N(({ children: e }) => /* @__PURE__ */ n(O, {
|
|
693
693
|
panelled: !0,
|
|
694
694
|
style: { minBlockSize: "max(460px, 100vh - 81px)" },
|
|
695
|
-
children: [e, !G().isEmpty && /* @__PURE__ */ t(
|
|
696
|
-
})),
|
|
695
|
+
children: [e, !G().isEmpty && /* @__PURE__ */ t(be, { style: { blockSize: yt.height } })]
|
|
696
|
+
})), xt = N(() => {
|
|
697
697
|
let e = V();
|
|
698
|
-
return /* @__PURE__ */ t(
|
|
698
|
+
return /* @__PURE__ */ t(y, {
|
|
699
699
|
title: `Shuffle: ${e.shuffle ? "On" : "Off"}`,
|
|
700
700
|
"aria-label": `Shuffle: ${e.shuffle ? "On" : "Off"}`,
|
|
701
|
-
iconType: e.shuffle ?
|
|
701
|
+
iconType: e.shuffle ? Me : Ne,
|
|
702
702
|
size: "s",
|
|
703
703
|
iconSize: "l",
|
|
704
704
|
onClick: e.toggleShuffle,
|
|
705
705
|
disabled: !e.canToggleShuffle
|
|
706
706
|
});
|
|
707
|
-
}),
|
|
707
|
+
}), St = N(() => {
|
|
708
708
|
let e = V();
|
|
709
|
-
return /* @__PURE__ */ t(
|
|
709
|
+
return /* @__PURE__ */ t(y, {
|
|
710
710
|
title: "Previous",
|
|
711
711
|
"aria-label": "Previous",
|
|
712
|
-
iconType:
|
|
712
|
+
iconType: Ve,
|
|
713
713
|
size: "s",
|
|
714
714
|
iconSize: "l",
|
|
715
715
|
onClick: e.previous,
|
|
716
716
|
disabled: !e.canPrevious
|
|
717
717
|
});
|
|
718
|
-
}),
|
|
718
|
+
}), Ct = N(() => {
|
|
719
719
|
let e = V();
|
|
720
|
-
return /* @__PURE__ */ t(
|
|
720
|
+
return /* @__PURE__ */ t(y, {
|
|
721
721
|
title: "Skip back 10 seconds",
|
|
722
722
|
"aria-label": "Skip back 10 seconds",
|
|
723
|
-
iconType:
|
|
723
|
+
iconType: Ue,
|
|
724
724
|
size: "s",
|
|
725
725
|
iconSize: "l",
|
|
726
726
|
onClick: e.skipBack10,
|
|
727
727
|
disabled: !e.canSkipBack10
|
|
728
728
|
});
|
|
729
|
-
}),
|
|
729
|
+
}), wt = N(() => {
|
|
730
730
|
let e = V();
|
|
731
|
-
return /* @__PURE__ */ t(
|
|
731
|
+
return /* @__PURE__ */ t(y, {
|
|
732
732
|
title: "Pause",
|
|
733
733
|
"aria-label": "Pause",
|
|
734
|
-
iconType:
|
|
734
|
+
iconType: ze,
|
|
735
735
|
size: "s",
|
|
736
736
|
iconSize: "l",
|
|
737
737
|
onClick: e.pause,
|
|
738
738
|
disabled: !e.canPause
|
|
739
739
|
});
|
|
740
|
-
}),
|
|
740
|
+
}), Tt = N(() => {
|
|
741
741
|
let e = V();
|
|
742
|
-
return /* @__PURE__ */ t(
|
|
742
|
+
return /* @__PURE__ */ t(y, {
|
|
743
743
|
title: "Play",
|
|
744
744
|
"aria-label": "Play",
|
|
745
|
-
iconType:
|
|
745
|
+
iconType: Be,
|
|
746
746
|
size: "s",
|
|
747
747
|
iconSize: "l",
|
|
748
748
|
onClick: e.play,
|
|
749
749
|
disabled: !e.canPlay
|
|
750
750
|
});
|
|
751
|
-
}),
|
|
751
|
+
}), Et = N(() => {
|
|
752
752
|
let e = V();
|
|
753
|
-
return /* @__PURE__ */ t(
|
|
753
|
+
return /* @__PURE__ */ t(y, {
|
|
754
754
|
title: "Skip forward 30 seconds",
|
|
755
755
|
"aria-label": "Skip forward 30 seconds",
|
|
756
|
-
iconType:
|
|
756
|
+
iconType: We,
|
|
757
757
|
size: "s",
|
|
758
758
|
iconSize: "l",
|
|
759
759
|
onClick: e.skipForward30,
|
|
760
760
|
disabled: !e.canSkipForward30
|
|
761
761
|
});
|
|
762
|
-
}),
|
|
762
|
+
}), Dt = N(() => {
|
|
763
763
|
let e = V();
|
|
764
|
-
return /* @__PURE__ */ t(
|
|
764
|
+
return /* @__PURE__ */ t(y, {
|
|
765
765
|
title: "Next",
|
|
766
766
|
"aria-label": "Next",
|
|
767
|
-
iconType:
|
|
767
|
+
iconType: Le,
|
|
768
768
|
size: "s",
|
|
769
769
|
iconSize: "l",
|
|
770
770
|
onClick: e.next,
|
|
771
771
|
disabled: !e.canNext
|
|
772
772
|
});
|
|
773
|
-
}),
|
|
774
|
-
[H.Off]:
|
|
775
|
-
[H.All]:
|
|
776
|
-
[H.One]:
|
|
777
|
-
},
|
|
773
|
+
}), Ot = {
|
|
774
|
+
[H.Off]: je,
|
|
775
|
+
[H.All]: Ae,
|
|
776
|
+
[H.One]: ke
|
|
777
|
+
}, kt = N(() => {
|
|
778
778
|
let e = V();
|
|
779
|
-
return /* @__PURE__ */ t(
|
|
779
|
+
return /* @__PURE__ */ t(y, {
|
|
780
780
|
title: `Repeat: ${e.repeat === H.All ? "All" : e.repeat === H.One ? "One" : "Off"}`,
|
|
781
781
|
"aria-label": `Repeat: ${e.repeat === H.All ? "All" : e.repeat === H.One ? "One" : "Off"}`,
|
|
782
|
-
iconType:
|
|
782
|
+
iconType: Ot[e.repeat],
|
|
783
783
|
size: "s",
|
|
784
784
|
iconSize: "l",
|
|
785
785
|
onClick: e.toggleRepeat,
|
|
786
786
|
disabled: !e.canToggleRepeat
|
|
787
787
|
});
|
|
788
|
-
}),
|
|
788
|
+
}), At = N(() => {
|
|
789
789
|
let e = V();
|
|
790
790
|
return /* @__PURE__ */ n(C, {
|
|
791
791
|
responsive: !1,
|
|
@@ -795,26 +795,26 @@ var gt = ({ children: e }) => {
|
|
|
795
795
|
children: [
|
|
796
796
|
/* @__PURE__ */ t(E, {
|
|
797
797
|
sizes: ["xs"],
|
|
798
|
-
children: /* @__PURE__ */ t(
|
|
798
|
+
children: /* @__PURE__ */ t(xt, {})
|
|
799
799
|
}),
|
|
800
|
-
/* @__PURE__ */ t(
|
|
800
|
+
/* @__PURE__ */ t(St, {}),
|
|
801
801
|
/* @__PURE__ */ t(E, {
|
|
802
802
|
sizes: ["xs"],
|
|
803
|
-
children: /* @__PURE__ */ t(
|
|
803
|
+
children: /* @__PURE__ */ t(Ct, {})
|
|
804
804
|
}),
|
|
805
|
-
e.playing ? /* @__PURE__ */ t(
|
|
805
|
+
e.playing ? /* @__PURE__ */ t(wt, {}) : /* @__PURE__ */ t(Tt, {}),
|
|
806
806
|
/* @__PURE__ */ t(E, {
|
|
807
807
|
sizes: ["xs"],
|
|
808
|
-
children: /* @__PURE__ */ t(
|
|
808
|
+
children: /* @__PURE__ */ t(Et, {})
|
|
809
809
|
}),
|
|
810
|
-
/* @__PURE__ */ t(
|
|
810
|
+
/* @__PURE__ */ t(Dt, {}),
|
|
811
811
|
/* @__PURE__ */ t(E, {
|
|
812
812
|
sizes: ["xs"],
|
|
813
|
-
children: /* @__PURE__ */ t(
|
|
813
|
+
children: /* @__PURE__ */ t(kt, {})
|
|
814
814
|
})
|
|
815
815
|
]
|
|
816
816
|
});
|
|
817
|
-
}),
|
|
817
|
+
}), jt = i(({ item: e, closePopover: n }) => {
|
|
818
818
|
let r = a(({ name: e, icon: t, onClick: r }) => ({
|
|
819
819
|
name: e,
|
|
820
820
|
icon: t,
|
|
@@ -822,14 +822,14 @@ var gt = ({ children: e }) => {
|
|
|
822
822
|
n(), r(e);
|
|
823
823
|
}
|
|
824
824
|
}), [n]);
|
|
825
|
-
return /* @__PURE__ */ t(
|
|
825
|
+
return /* @__PURE__ */ t(x, {
|
|
826
826
|
initialPanelId: 0,
|
|
827
827
|
panels: l(() => [{
|
|
828
828
|
id: 0,
|
|
829
829
|
items: [
|
|
830
830
|
r({
|
|
831
831
|
name: "Open in new tab",
|
|
832
|
-
icon: /* @__PURE__ */ t(D, { type:
|
|
832
|
+
icon: /* @__PURE__ */ t(D, { type: Re }),
|
|
833
833
|
onClick: async () => {
|
|
834
834
|
window.open(e.dto.url, "_blank");
|
|
835
835
|
}
|
|
@@ -851,10 +851,10 @@ var gt = ({ children: e }) => {
|
|
|
851
851
|
]
|
|
852
852
|
}], [r, e])
|
|
853
853
|
});
|
|
854
|
-
}),
|
|
855
|
-
let [n, r] =
|
|
854
|
+
}), Mt = i(({ item: e }) => {
|
|
855
|
+
let [n, r] = d(!1), i = a(() => r(!n), [n]), o = a(() => r(!1), []);
|
|
856
856
|
return /* @__PURE__ */ t(k, {
|
|
857
|
-
button: /* @__PURE__ */ t(
|
|
857
|
+
button: /* @__PURE__ */ t(v, {
|
|
858
858
|
iconType: z.get(e.type),
|
|
859
859
|
size: "s",
|
|
860
860
|
onClick: i,
|
|
@@ -864,37 +864,37 @@ var gt = ({ children: e }) => {
|
|
|
864
864
|
closePopover: o,
|
|
865
865
|
panelPaddingSize: "none",
|
|
866
866
|
anchorPosition: "upLeft",
|
|
867
|
-
children: /* @__PURE__ */ t(
|
|
867
|
+
children: /* @__PURE__ */ t(jt, {
|
|
868
868
|
item: e,
|
|
869
869
|
closePopover: o
|
|
870
870
|
})
|
|
871
871
|
});
|
|
872
|
-
}),
|
|
872
|
+
}), Nt = N(() => {
|
|
873
873
|
let e = V();
|
|
874
874
|
return /* @__PURE__ */ t(C, {
|
|
875
875
|
responsive: !1,
|
|
876
876
|
gutterSize: "s",
|
|
877
877
|
justifyContent: "flexStart",
|
|
878
878
|
alignItems: "center",
|
|
879
|
-
children: e.currentItem && /* @__PURE__ */ t(
|
|
879
|
+
children: e.currentItem && /* @__PURE__ */ t(Mt, { item: e.currentItem })
|
|
880
880
|
});
|
|
881
|
-
}),
|
|
881
|
+
}), Pt = N(() => /* @__PURE__ */ t(y, {
|
|
882
882
|
title: "Mute",
|
|
883
883
|
"aria-label": "Mute",
|
|
884
|
-
iconType:
|
|
884
|
+
iconType: Ge,
|
|
885
885
|
size: "s",
|
|
886
886
|
iconSize: "l",
|
|
887
887
|
disabled: !V().controller.supports("setMuted")
|
|
888
|
-
})),
|
|
889
|
-
let o = V(), [s, l] =
|
|
888
|
+
})), Ft = N(({ button: e, isOpen: r, closePopover: i }) => {
|
|
889
|
+
let o = V(), [s, l] = d("0"), u = g();
|
|
890
890
|
c(() => {
|
|
891
|
-
r &&
|
|
891
|
+
r && u.getVolume().then((e) => {
|
|
892
892
|
e !== void 0 && l(Math.floor(e * 100).toString());
|
|
893
893
|
});
|
|
894
|
-
}, [r,
|
|
895
|
-
let
|
|
896
|
-
l(e.currentTarget.value), await
|
|
897
|
-
}, [
|
|
894
|
+
}, [r, u]);
|
|
895
|
+
let ee = a(async (e) => {
|
|
896
|
+
l(e.currentTarget.value), await u.setVolume(Number(e.currentTarget.value) / 100);
|
|
897
|
+
}, [u]);
|
|
898
898
|
return /* @__PURE__ */ t(k, {
|
|
899
899
|
button: e,
|
|
900
900
|
isOpen: r,
|
|
@@ -905,24 +905,24 @@ var gt = ({ children: e }) => {
|
|
|
905
905
|
gutterSize: "s",
|
|
906
906
|
justifyContent: "center",
|
|
907
907
|
alignItems: "center",
|
|
908
|
-
children: [/* @__PURE__ */ t(
|
|
908
|
+
children: [/* @__PURE__ */ t(Pt, {}), /* @__PURE__ */ t(ve, {
|
|
909
909
|
min: 0,
|
|
910
910
|
max: 100,
|
|
911
911
|
step: 1,
|
|
912
912
|
value: s,
|
|
913
|
-
onChange:
|
|
913
|
+
onChange: ee,
|
|
914
914
|
css: { blockSize: 32 },
|
|
915
915
|
disabled: !o.controller.supports("setVolume")
|
|
916
916
|
})]
|
|
917
917
|
}) })
|
|
918
918
|
});
|
|
919
|
-
}),
|
|
920
|
-
let e = V(), [n, r] =
|
|
921
|
-
return /* @__PURE__ */ t(
|
|
922
|
-
button: /* @__PURE__ */ t(
|
|
919
|
+
}), It = N(() => {
|
|
920
|
+
let e = V(), [n, r] = d(!1);
|
|
921
|
+
return /* @__PURE__ */ t(Ft, {
|
|
922
|
+
button: /* @__PURE__ */ t(y, {
|
|
923
923
|
title: "Volume",
|
|
924
924
|
"aria-label": "Volume",
|
|
925
|
-
iconType:
|
|
925
|
+
iconType: Ge,
|
|
926
926
|
size: "s",
|
|
927
927
|
iconSize: "l",
|
|
928
928
|
onClick: () => r(!n),
|
|
@@ -931,15 +931,15 @@ var gt = ({ children: e }) => {
|
|
|
931
931
|
isOpen: n,
|
|
932
932
|
closePopover: () => r(!1)
|
|
933
933
|
});
|
|
934
|
-
}),
|
|
934
|
+
}), Lt = ({ onClickPlayQueueButton: e }) => /* @__PURE__ */ t(y, {
|
|
935
935
|
title: "Play queue",
|
|
936
936
|
"aria-label": "Play queue",
|
|
937
|
-
iconType:
|
|
937
|
+
iconType: Ie,
|
|
938
938
|
size: "s",
|
|
939
939
|
iconSize: "l",
|
|
940
940
|
onClick: e
|
|
941
|
-
}),
|
|
942
|
-
let n = V(), r =
|
|
941
|
+
}), Rt = N(({ closePopover: e }) => {
|
|
942
|
+
let n = V(), r = g(), [i, o] = d(), s = a(async () => {
|
|
943
943
|
await n.controller.getPlaybackRate().then((e) => o(e));
|
|
944
944
|
}, [n]), c = a(({ name: t, icon: n, onClick: r, disabled: i, className: a }) => ({
|
|
945
945
|
name: t,
|
|
@@ -950,40 +950,40 @@ var gt = ({ children: e }) => {
|
|
|
950
950
|
disabled: i,
|
|
951
951
|
className: a
|
|
952
952
|
}), [e]);
|
|
953
|
-
return /* @__PURE__ */ t(
|
|
953
|
+
return /* @__PURE__ */ t(x, {
|
|
954
954
|
initialPanelId: 0,
|
|
955
955
|
panels: l(() => [{
|
|
956
956
|
id: 0,
|
|
957
957
|
items: [
|
|
958
958
|
{
|
|
959
959
|
name: "Speed",
|
|
960
|
-
icon: /* @__PURE__ */ t(D, { type:
|
|
960
|
+
icon: /* @__PURE__ */ t(D, { type: Ke }),
|
|
961
961
|
panel: 1,
|
|
962
962
|
onClick: s,
|
|
963
963
|
disabled: !n.controller.supports("getPlaybackRate")
|
|
964
964
|
},
|
|
965
965
|
c({
|
|
966
966
|
name: "Skip back 10 seconds",
|
|
967
|
-
icon: /* @__PURE__ */ t(D, { type:
|
|
967
|
+
icon: /* @__PURE__ */ t(D, { type: Ue }),
|
|
968
968
|
onClick: n.skipBack10,
|
|
969
969
|
disabled: !n.canSkipBack10
|
|
970
970
|
}),
|
|
971
971
|
c({
|
|
972
972
|
name: "Skip forward 30 seconds",
|
|
973
|
-
icon: /* @__PURE__ */ t(D, { type:
|
|
973
|
+
icon: /* @__PURE__ */ t(D, { type: We }),
|
|
974
974
|
onClick: n.skipForward30,
|
|
975
975
|
disabled: !n.canSkipForward30
|
|
976
976
|
}),
|
|
977
977
|
c({
|
|
978
978
|
name: `Shuffle: ${n.shuffle ? "On" : "Off"}`,
|
|
979
|
-
icon: /* @__PURE__ */ t(D, { type: n.shuffle ?
|
|
979
|
+
icon: /* @__PURE__ */ t(D, { type: n.shuffle ? Me : Ne }),
|
|
980
980
|
onClick: n.toggleShuffle,
|
|
981
981
|
disabled: !n.canToggleShuffle,
|
|
982
982
|
className: "eui-showFor--xs--flex"
|
|
983
983
|
}),
|
|
984
984
|
c({
|
|
985
985
|
name: `Repeat: ${n.repeat === H.All ? "All" : n.repeat === H.One ? "One" : "Off"}`,
|
|
986
|
-
icon: /* @__PURE__ */ t(D, { type:
|
|
986
|
+
icon: /* @__PURE__ */ t(D, { type: Ot[n.repeat] }),
|
|
987
987
|
onClick: n.toggleRepeat,
|
|
988
988
|
disabled: !n.canToggleRepeat,
|
|
989
989
|
className: "eui-showFor--xs--flex"
|
|
@@ -1022,17 +1022,17 @@ var gt = ({ children: e }) => {
|
|
|
1022
1022
|
i
|
|
1023
1023
|
])
|
|
1024
1024
|
});
|
|
1025
|
-
}),
|
|
1025
|
+
}), zt = i(({ button: e, isOpen: n, closePopover: r }) => /* @__PURE__ */ t(k, {
|
|
1026
1026
|
button: e,
|
|
1027
1027
|
isOpen: n,
|
|
1028
1028
|
closePopover: r,
|
|
1029
1029
|
panelPaddingSize: "none",
|
|
1030
1030
|
anchorPosition: "upRight",
|
|
1031
|
-
children: /* @__PURE__ */ t(
|
|
1032
|
-
})),
|
|
1033
|
-
let [e, n] =
|
|
1034
|
-
return /* @__PURE__ */ t(
|
|
1035
|
-
button: /* @__PURE__ */ t(
|
|
1031
|
+
children: /* @__PURE__ */ t(Rt, { closePopover: r })
|
|
1032
|
+
})), Bt = i(() => {
|
|
1033
|
+
let [e, n] = d(!1);
|
|
1034
|
+
return /* @__PURE__ */ t(zt, {
|
|
1035
|
+
button: /* @__PURE__ */ t(y, {
|
|
1036
1036
|
title: "More options",
|
|
1037
1037
|
"aria-label": "More options",
|
|
1038
1038
|
iconType: I,
|
|
@@ -1043,18 +1043,18 @@ var gt = ({ children: e }) => {
|
|
|
1043
1043
|
isOpen: e,
|
|
1044
1044
|
closePopover: () => n(!1)
|
|
1045
1045
|
});
|
|
1046
|
-
}),
|
|
1046
|
+
}), Vt = i(({ onClickPlayQueueButton: e }) => /* @__PURE__ */ n(C, {
|
|
1047
1047
|
responsive: !1,
|
|
1048
1048
|
gutterSize: "s",
|
|
1049
1049
|
justifyContent: "flexEnd",
|
|
1050
1050
|
alignItems: "center",
|
|
1051
1051
|
children: [
|
|
1052
|
-
/* @__PURE__ */ t(
|
|
1053
|
-
e && /* @__PURE__ */ t(
|
|
1054
|
-
/* @__PURE__ */ t(
|
|
1052
|
+
/* @__PURE__ */ t(It, {}),
|
|
1053
|
+
e && /* @__PURE__ */ t(Lt, { onClickPlayQueueButton: e }),
|
|
1054
|
+
/* @__PURE__ */ t(Bt, {})
|
|
1055
1055
|
]
|
|
1056
|
-
})),
|
|
1057
|
-
let e = V(), n =
|
|
1056
|
+
})), Ht = N(() => {
|
|
1057
|
+
let e = V(), n = g(), r = a((t) => {
|
|
1058
1058
|
let n = Number(t.currentTarget.value) / 100;
|
|
1059
1059
|
e.setPercent(n);
|
|
1060
1060
|
}, [e]), i = a((t) => {
|
|
@@ -1067,7 +1067,7 @@ var gt = ({ children: e }) => {
|
|
|
1067
1067
|
i !== void 0 && await n.setCurrentTime(i * r);
|
|
1068
1068
|
}
|
|
1069
1069
|
}, [e, n]);
|
|
1070
|
-
return /* @__PURE__ */ t(
|
|
1070
|
+
return /* @__PURE__ */ t(ve, {
|
|
1071
1071
|
min: 0,
|
|
1072
1072
|
max: 100,
|
|
1073
1073
|
step: 1e-7,
|
|
@@ -1080,31 +1080,31 @@ var gt = ({ children: e }) => {
|
|
|
1080
1080
|
css: { blockSize: 32 },
|
|
1081
1081
|
disabled: !e.canSeek
|
|
1082
1082
|
});
|
|
1083
|
-
}),
|
|
1083
|
+
}), Ut = N(({ onClickPlayQueueButton: e }) => /* @__PURE__ */ t(ce, {
|
|
1084
1084
|
paddingSize: "s",
|
|
1085
1085
|
children: /* @__PURE__ */ n(C, {
|
|
1086
1086
|
direction: "column",
|
|
1087
1087
|
gutterSize: "none",
|
|
1088
|
-
children: [/* @__PURE__ */ t(w, { children: /* @__PURE__ */ t(
|
|
1088
|
+
children: [/* @__PURE__ */ t(w, { children: /* @__PURE__ */ t(Ht, {}) }), /* @__PURE__ */ t(w, { children: /* @__PURE__ */ n(C, {
|
|
1089
1089
|
responsive: !1,
|
|
1090
1090
|
children: [
|
|
1091
1091
|
/* @__PURE__ */ t(w, {
|
|
1092
1092
|
css: { width: "calc(100% / 3)" },
|
|
1093
|
-
children: /* @__PURE__ */ t(
|
|
1093
|
+
children: /* @__PURE__ */ t(Nt, {})
|
|
1094
1094
|
}),
|
|
1095
1095
|
/* @__PURE__ */ t(w, {
|
|
1096
1096
|
css: { width: "calc(100% / 3)" },
|
|
1097
|
-
children: /* @__PURE__ */ t(
|
|
1097
|
+
children: /* @__PURE__ */ t(At, {})
|
|
1098
1098
|
}),
|
|
1099
1099
|
/* @__PURE__ */ t(w, {
|
|
1100
1100
|
css: { width: "calc(100% / 3)" },
|
|
1101
|
-
children: /* @__PURE__ */ t(
|
|
1101
|
+
children: /* @__PURE__ */ t(Vt, { onClickPlayQueueButton: e })
|
|
1102
1102
|
})
|
|
1103
1103
|
]
|
|
1104
1104
|
}) })]
|
|
1105
1105
|
})
|
|
1106
|
-
})),
|
|
1107
|
-
let e =
|
|
1106
|
+
})), Wt = N(() => {
|
|
1107
|
+
let e = st(), n = l(() => ({
|
|
1108
1108
|
onLoaded: e.onLoaded,
|
|
1109
1109
|
onPlay: e.onPlay,
|
|
1110
1110
|
onPause: e.onPause,
|
|
@@ -1116,8 +1116,8 @@ var gt = ({ children: e }) => {
|
|
|
1116
1116
|
position: "fixed",
|
|
1117
1117
|
right: 0,
|
|
1118
1118
|
bottom: 81,
|
|
1119
|
-
width:
|
|
1120
|
-
height:
|
|
1119
|
+
width: yt.width,
|
|
1120
|
+
height: yt.height,
|
|
1121
1121
|
zIndex: 998,
|
|
1122
1122
|
backgroundColor: "rgb(39, 39, 39)",
|
|
1123
1123
|
display: "flex",
|
|
@@ -1128,7 +1128,7 @@ var gt = ({ children: e }) => {
|
|
|
1128
1128
|
flexGrow: 1,
|
|
1129
1129
|
backgroundColor: "black"
|
|
1130
1130
|
},
|
|
1131
|
-
children: e.currentItem && /* @__PURE__ */ t(
|
|
1131
|
+
children: e.currentItem && /* @__PURE__ */ t(ie, {
|
|
1132
1132
|
src: e.currentItem.url,
|
|
1133
1133
|
options: n,
|
|
1134
1134
|
onControllerChange: e.onControllerChange
|
|
@@ -1138,26 +1138,26 @@ var gt = ({ children: e }) => {
|
|
|
1138
1138
|
});
|
|
1139
1139
|
//#endregion
|
|
1140
1140
|
//#region src/features/media-player.play-queue/helpers/isNoembedResult.ts
|
|
1141
|
-
function
|
|
1141
|
+
function Gt(e) {
|
|
1142
1142
|
return typeof e == "object" && !!e && "title" in e && typeof e.title == "string";
|
|
1143
1143
|
}
|
|
1144
1144
|
//#endregion
|
|
1145
1145
|
//#region src/features/media-player.play-queue/components/AddVideoModal.tsx
|
|
1146
|
-
var
|
|
1147
|
-
let i =
|
|
1148
|
-
return /* @__PURE__ */ n(
|
|
1146
|
+
var Kt = R.create(({ remove: e, resolve: r }) => {
|
|
1147
|
+
let i = De({ prefix: "modalForm" }), [a, o] = d(""), [s, c] = d(""), [l, u] = d(!1);
|
|
1148
|
+
return /* @__PURE__ */ n(pe, {
|
|
1149
1149
|
onClose: e,
|
|
1150
1150
|
initialFocus: "[name=url]",
|
|
1151
1151
|
children: [
|
|
1152
|
-
/* @__PURE__ */ t(
|
|
1153
|
-
/* @__PURE__ */ t(
|
|
1152
|
+
/* @__PURE__ */ t(ge, { children: /* @__PURE__ */ t(_e, { children: "Add video" }) }),
|
|
1153
|
+
/* @__PURE__ */ t(me, { children: /* @__PURE__ */ n(de, {
|
|
1154
1154
|
id: i,
|
|
1155
1155
|
component: "form",
|
|
1156
1156
|
onSubmit: async (t) => {
|
|
1157
1157
|
t.preventDefault();
|
|
1158
1158
|
try {
|
|
1159
|
-
|
|
1160
|
-
let t =
|
|
1159
|
+
u(!0);
|
|
1160
|
+
let t = oe(a);
|
|
1161
1161
|
if (t === void 0) return;
|
|
1162
1162
|
let n = t.extractVideoId(a);
|
|
1163
1163
|
if (n === void 0) return;
|
|
@@ -1166,32 +1166,32 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1166
1166
|
url: a,
|
|
1167
1167
|
type: t.type,
|
|
1168
1168
|
videoId: n,
|
|
1169
|
-
title: s || (
|
|
1169
|
+
title: s || (Gt(i) ? i.title : n)
|
|
1170
1170
|
}), e();
|
|
1171
1171
|
} finally {
|
|
1172
|
-
|
|
1172
|
+
u(!1);
|
|
1173
1173
|
}
|
|
1174
1174
|
},
|
|
1175
1175
|
children: [/* @__PURE__ */ t(T, {
|
|
1176
1176
|
label: "URL",
|
|
1177
|
-
children: /* @__PURE__ */ t(
|
|
1177
|
+
children: /* @__PURE__ */ t(S, {
|
|
1178
1178
|
name: "url",
|
|
1179
1179
|
value: a,
|
|
1180
1180
|
onChange: (e) => o(e.target.value)
|
|
1181
1181
|
})
|
|
1182
1182
|
}), /* @__PURE__ */ t(T, {
|
|
1183
1183
|
label: "Title",
|
|
1184
|
-
children: /* @__PURE__ */ t(
|
|
1184
|
+
children: /* @__PURE__ */ t(S, {
|
|
1185
1185
|
name: "title",
|
|
1186
1186
|
value: s,
|
|
1187
1187
|
onChange: (e) => c(e.target.value)
|
|
1188
1188
|
})
|
|
1189
1189
|
})]
|
|
1190
1190
|
}) }),
|
|
1191
|
-
/* @__PURE__ */ n(
|
|
1191
|
+
/* @__PURE__ */ n(he, { children: [/* @__PURE__ */ t(v, {
|
|
1192
1192
|
onClick: e,
|
|
1193
1193
|
children: "Cancel"
|
|
1194
|
-
}), /* @__PURE__ */ t(
|
|
1194
|
+
}), /* @__PURE__ */ t(_, {
|
|
1195
1195
|
type: "submit",
|
|
1196
1196
|
form: i,
|
|
1197
1197
|
fill: !0,
|
|
@@ -1201,17 +1201,17 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1201
1201
|
})] })
|
|
1202
1202
|
]
|
|
1203
1203
|
});
|
|
1204
|
-
}),
|
|
1205
|
-
onClick: () => R.show(
|
|
1204
|
+
}), qt = i(({ onFulfilled: e }) => /* @__PURE__ */ t(_, {
|
|
1205
|
+
onClick: () => R.show(Kt).then(e),
|
|
1206
1206
|
iconType: P,
|
|
1207
1207
|
color: "primary",
|
|
1208
1208
|
children: "Add video"
|
|
1209
|
-
})),
|
|
1209
|
+
})), Jt = N(({ playQueue: e }) => /* @__PURE__ */ t(_, {
|
|
1210
1210
|
iconType: P,
|
|
1211
1211
|
onClick: e.addSelectedItems,
|
|
1212
1212
|
disabled: !e.canAddSelectedItems,
|
|
1213
1213
|
children: "Add to play queue"
|
|
1214
|
-
})),
|
|
1214
|
+
})), Yt = N(({ playQueue: e, closePopover: n }) => {
|
|
1215
1215
|
let r = a(({ name: e, icon: t, disabled: r, onClick: i }) => ({
|
|
1216
1216
|
name: e,
|
|
1217
1217
|
icon: t,
|
|
@@ -1220,7 +1220,7 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1220
1220
|
n(), i(e);
|
|
1221
1221
|
}
|
|
1222
1222
|
}), [n]);
|
|
1223
|
-
return /* @__PURE__ */ t(
|
|
1223
|
+
return /* @__PURE__ */ t(x, {
|
|
1224
1224
|
initialPanelId: 0,
|
|
1225
1225
|
panels: l(() => [{
|
|
1226
1226
|
id: 0,
|
|
@@ -1245,17 +1245,17 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1245
1245
|
}),
|
|
1246
1246
|
r({
|
|
1247
1247
|
name: "Clear",
|
|
1248
|
-
icon: /* @__PURE__ */ t(D, { type:
|
|
1248
|
+
icon: /* @__PURE__ */ t(D, { type: Fe }),
|
|
1249
1249
|
onClick: e.clear,
|
|
1250
1250
|
disabled: !e.canClear
|
|
1251
1251
|
})
|
|
1252
1252
|
]
|
|
1253
1253
|
}], [r, e])
|
|
1254
1254
|
});
|
|
1255
|
-
}),
|
|
1256
|
-
let [n, r] =
|
|
1255
|
+
}), Xt = i(({ playQueue: e }) => {
|
|
1256
|
+
let [n, r] = d(!1), i = a(() => r(!n), [n]), o = a(() => r(!1), []);
|
|
1257
1257
|
return /* @__PURE__ */ t(k, {
|
|
1258
|
-
button: /* @__PURE__ */ t(
|
|
1258
|
+
button: /* @__PURE__ */ t(y, {
|
|
1259
1259
|
display: "base",
|
|
1260
1260
|
size: "m",
|
|
1261
1261
|
iconType: I,
|
|
@@ -1265,12 +1265,12 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1265
1265
|
closePopover: o,
|
|
1266
1266
|
panelPaddingSize: "none",
|
|
1267
1267
|
anchorPosition: "downLeft",
|
|
1268
|
-
children: /* @__PURE__ */ t(
|
|
1268
|
+
children: /* @__PURE__ */ t(Yt, {
|
|
1269
1269
|
playQueue: e,
|
|
1270
1270
|
closePopover: o
|
|
1271
1271
|
})
|
|
1272
1272
|
});
|
|
1273
|
-
}),
|
|
1273
|
+
}), Zt = N(({ playQueue: e }) => {
|
|
1274
1274
|
let { euiTheme: r } = M();
|
|
1275
1275
|
return /* @__PURE__ */ n(C, {
|
|
1276
1276
|
alignItems: "center",
|
|
@@ -1288,7 +1288,7 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1288
1288
|
children: [
|
|
1289
1289
|
/* @__PURE__ */ t(w, {
|
|
1290
1290
|
grow: !1,
|
|
1291
|
-
children: /* @__PURE__ */ t(
|
|
1291
|
+
children: /* @__PURE__ */ t(_, {
|
|
1292
1292
|
disabled: !e.canPlaySelectedItemsNext,
|
|
1293
1293
|
onClick: e.playSelectedItemsNext,
|
|
1294
1294
|
children: "Play next"
|
|
@@ -1296,11 +1296,11 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1296
1296
|
}),
|
|
1297
1297
|
/* @__PURE__ */ t(w, {
|
|
1298
1298
|
grow: !1,
|
|
1299
|
-
children: /* @__PURE__ */ t(
|
|
1299
|
+
children: /* @__PURE__ */ t(Jt, { playQueue: e })
|
|
1300
1300
|
}),
|
|
1301
1301
|
/* @__PURE__ */ t(w, {
|
|
1302
1302
|
grow: !1,
|
|
1303
|
-
children: /* @__PURE__ */ t(
|
|
1303
|
+
children: /* @__PURE__ */ t(_, {
|
|
1304
1304
|
iconType: F,
|
|
1305
1305
|
onClick: e.removeSelectedItems,
|
|
1306
1306
|
disabled: !e.canRemoveSelectedItems,
|
|
@@ -1309,8 +1309,8 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1309
1309
|
}),
|
|
1310
1310
|
/* @__PURE__ */ t(w, {
|
|
1311
1311
|
grow: !1,
|
|
1312
|
-
children: /* @__PURE__ */ t(
|
|
1313
|
-
iconType:
|
|
1312
|
+
children: /* @__PURE__ */ t(_, {
|
|
1313
|
+
iconType: Fe,
|
|
1314
1314
|
onClick: e.clear,
|
|
1315
1315
|
disabled: !e.canClear,
|
|
1316
1316
|
children: "Clear"
|
|
@@ -1318,26 +1318,26 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1318
1318
|
})
|
|
1319
1319
|
]
|
|
1320
1320
|
}),
|
|
1321
|
-
/* @__PURE__ */ t(
|
|
1321
|
+
/* @__PURE__ */ t(ye, {
|
|
1322
1322
|
sizes: ["xs"],
|
|
1323
|
-
children: /* @__PURE__ */ t(
|
|
1323
|
+
children: /* @__PURE__ */ t(Xt, { playQueue: e })
|
|
1324
1324
|
}),
|
|
1325
1325
|
/* @__PURE__ */ t(w, { grow: !0 }),
|
|
1326
1326
|
/* @__PURE__ */ t(w, {
|
|
1327
1327
|
grow: !1,
|
|
1328
|
-
children: /* @__PURE__ */ t(
|
|
1328
|
+
children: /* @__PURE__ */ t(qt, { onFulfilled: e.addItemFromDto })
|
|
1329
1329
|
})
|
|
1330
1330
|
]
|
|
1331
1331
|
});
|
|
1332
|
-
}),
|
|
1332
|
+
}), Qt = N(({ playQueue: r }) => {
|
|
1333
1333
|
let { euiTheme: i } = M();
|
|
1334
|
-
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(
|
|
1334
|
+
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(we, { children: /* @__PURE__ */ t(C, {
|
|
1335
1335
|
responsive: !1,
|
|
1336
1336
|
justifyContent: "spaceBetween",
|
|
1337
1337
|
alignItems: "baseline",
|
|
1338
1338
|
children: /* @__PURE__ */ t(w, {
|
|
1339
1339
|
grow: !1,
|
|
1340
|
-
children: /* @__PURE__ */ t(
|
|
1340
|
+
children: /* @__PURE__ */ t(b, {
|
|
1341
1341
|
id: "",
|
|
1342
1342
|
checked: r.allItemsSelected,
|
|
1343
1343
|
onChange: (e) => {
|
|
@@ -1345,7 +1345,7 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1345
1345
|
}
|
|
1346
1346
|
})
|
|
1347
1347
|
})
|
|
1348
|
-
}) }), /* @__PURE__ */ n(
|
|
1348
|
+
}) }), /* @__PURE__ */ n(Se, {
|
|
1349
1349
|
style: {
|
|
1350
1350
|
position: "sticky",
|
|
1351
1351
|
top: 112,
|
|
@@ -1353,7 +1353,7 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1353
1353
|
background: i.colors.backgroundBasePlain
|
|
1354
1354
|
},
|
|
1355
1355
|
children: [
|
|
1356
|
-
/* @__PURE__ */ t(
|
|
1356
|
+
/* @__PURE__ */ t(Ce, { children: /* @__PURE__ */ t(b, {
|
|
1357
1357
|
id: "",
|
|
1358
1358
|
checked: r.allItemsSelected,
|
|
1359
1359
|
onChange: (e) => {
|
|
@@ -1365,7 +1365,7 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1365
1365
|
/* @__PURE__ */ t(A, {})
|
|
1366
1366
|
]
|
|
1367
1367
|
})] });
|
|
1368
|
-
}),
|
|
1368
|
+
}), $t = N(({ item: e, closePopover: n }) => {
|
|
1369
1369
|
let r = a(({ name: e, icon: t, disabled: r, onClick: i, className: a }) => ({
|
|
1370
1370
|
name: e,
|
|
1371
1371
|
icon: t,
|
|
@@ -1375,7 +1375,7 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1375
1375
|
},
|
|
1376
1376
|
className: a
|
|
1377
1377
|
}), [n]);
|
|
1378
|
-
return /* @__PURE__ */ t(
|
|
1378
|
+
return /* @__PURE__ */ t(x, {
|
|
1379
1379
|
initialPanelId: 0,
|
|
1380
1380
|
panels: l(() => [{
|
|
1381
1381
|
id: 0,
|
|
@@ -1404,13 +1404,13 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1404
1404
|
{ isSeparator: !0 },
|
|
1405
1405
|
r({
|
|
1406
1406
|
name: "Move to the top",
|
|
1407
|
-
icon: /* @__PURE__ */ t(D, { type:
|
|
1407
|
+
icon: /* @__PURE__ */ t(D, { type: Pe }),
|
|
1408
1408
|
onClick: e.moveToTop,
|
|
1409
1409
|
disabled: !e.canMoveToTop
|
|
1410
1410
|
}),
|
|
1411
1411
|
r({
|
|
1412
1412
|
name: "Move to the bottom",
|
|
1413
|
-
icon: /* @__PURE__ */ t(D, { type:
|
|
1413
|
+
icon: /* @__PURE__ */ t(D, { type: Oe }),
|
|
1414
1414
|
onClick: e.moveToBottom,
|
|
1415
1415
|
disabled: !e.canMoveToBottom
|
|
1416
1416
|
}),
|
|
@@ -1436,10 +1436,10 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1436
1436
|
]
|
|
1437
1437
|
}], [r, e])
|
|
1438
1438
|
});
|
|
1439
|
-
}),
|
|
1440
|
-
let [n, r] =
|
|
1439
|
+
}), en = i(({ item: e }) => {
|
|
1440
|
+
let [n, r] = d(!1), i = a(() => r(!n), [n]), o = a(() => r(!1), []);
|
|
1441
1441
|
return /* @__PURE__ */ t(k, {
|
|
1442
|
-
button: /* @__PURE__ */ t(
|
|
1442
|
+
button: /* @__PURE__ */ t(y, {
|
|
1443
1443
|
title: "More options",
|
|
1444
1444
|
"aria-label": "More options",
|
|
1445
1445
|
iconType: I,
|
|
@@ -1451,78 +1451,87 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1451
1451
|
closePopover: o,
|
|
1452
1452
|
panelPaddingSize: "none",
|
|
1453
1453
|
anchorPosition: "leftCenter",
|
|
1454
|
-
children: /* @__PURE__ */ t(
|
|
1454
|
+
children: /* @__PURE__ */ t($t, {
|
|
1455
1455
|
item: e,
|
|
1456
1456
|
closePopover: o
|
|
1457
1457
|
})
|
|
1458
1458
|
});
|
|
1459
|
-
}),
|
|
1460
|
-
let r =
|
|
1459
|
+
}), tn = N(({ item: e }) => {
|
|
1460
|
+
let r = g();
|
|
1461
1461
|
return /* @__PURE__ */ n(j, {
|
|
1462
1462
|
textOnly: !1,
|
|
1463
1463
|
hasActions: !0,
|
|
1464
1464
|
align: "right",
|
|
1465
1465
|
children: [/* @__PURE__ */ n(E, {
|
|
1466
1466
|
sizes: ["xs"],
|
|
1467
|
-
children: [/* @__PURE__ */ t(
|
|
1467
|
+
children: [/* @__PURE__ */ t(_, {
|
|
1468
1468
|
iconType: L,
|
|
1469
1469
|
size: "s",
|
|
1470
1470
|
onClick: async () => {
|
|
1471
1471
|
e.isCurrent ? await r.setCurrentTime(0) : await e.play();
|
|
1472
1472
|
},
|
|
1473
1473
|
children: "Play"
|
|
1474
|
-
}), /* @__PURE__ */ t(
|
|
1474
|
+
}), /* @__PURE__ */ t(_, {
|
|
1475
1475
|
iconType: F,
|
|
1476
1476
|
size: "s",
|
|
1477
1477
|
onClick: e.remove,
|
|
1478
1478
|
children: "Remove"
|
|
1479
1479
|
})]
|
|
1480
|
-
}), /* @__PURE__ */ t(
|
|
1480
|
+
}), /* @__PURE__ */ t(en, { item: e })]
|
|
1481
1481
|
});
|
|
1482
|
-
}),
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
children: /* @__PURE__ */ t(
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1482
|
+
}), nn = N(({ item: e }) => {
|
|
1483
|
+
let r = u(null), { isCurrent: i } = e;
|
|
1484
|
+
return s(() => {
|
|
1485
|
+
i && r.current?.closest("tr")?.scrollIntoView({
|
|
1486
|
+
behavior: "smooth",
|
|
1487
|
+
block: "center"
|
|
1488
|
+
});
|
|
1489
|
+
}, [i]), /* @__PURE__ */ n(Te, {
|
|
1490
|
+
isSelected: e.isCurrent,
|
|
1491
|
+
hasSelection: !0,
|
|
1492
|
+
hasActions: !0,
|
|
1493
|
+
children: [
|
|
1494
|
+
/* @__PURE__ */ t(Ee, { children: /* @__PURE__ */ t(b, {
|
|
1495
|
+
id: e.id.toString(),
|
|
1496
|
+
checked: e.isSelected,
|
|
1497
|
+
onChange: e.toggleSelected
|
|
1498
|
+
}) }),
|
|
1499
|
+
/* @__PURE__ */ t(j, {
|
|
1500
|
+
textOnly: !1,
|
|
1501
|
+
children: /* @__PURE__ */ t("img", {
|
|
1502
|
+
ref: r,
|
|
1503
|
+
src: z.get(e.type),
|
|
1504
|
+
width: 16,
|
|
1505
|
+
height: 16,
|
|
1506
|
+
alt: e.type
|
|
1507
|
+
})
|
|
1508
|
+
}),
|
|
1509
|
+
/* @__PURE__ */ t(j, {
|
|
1510
|
+
mobileOptions: {
|
|
1511
|
+
header: !1,
|
|
1512
|
+
enlarge: !0,
|
|
1513
|
+
width: "100%"
|
|
1514
|
+
},
|
|
1515
|
+
children: /* @__PURE__ */ t(fe, {
|
|
1516
|
+
href: e.url,
|
|
1517
|
+
target: "_blank",
|
|
1518
|
+
external: !0,
|
|
1519
|
+
children: e.title
|
|
1520
|
+
})
|
|
1521
|
+
}),
|
|
1522
|
+
/* @__PURE__ */ t(tn, { item: e })
|
|
1523
|
+
]
|
|
1524
|
+
});
|
|
1525
|
+
}), rn = N(({ playQueue: e }) => /* @__PURE__ */ t(qe, {
|
|
1517
1526
|
tag: "tbody",
|
|
1518
1527
|
list: e.items,
|
|
1519
1528
|
setList: (t) => e.setItems(t),
|
|
1520
|
-
children: e.items.map((e) => /* @__PURE__ */ t(
|
|
1521
|
-
})),
|
|
1529
|
+
children: e.items.map((e) => /* @__PURE__ */ t(nn, { item: e }, e.id))
|
|
1530
|
+
})), an = N(({ playQueue: e }) => /* @__PURE__ */ n(xe, { children: [/* @__PURE__ */ t(Qt, { playQueue: e }), /* @__PURE__ */ t(rn, { playQueue: e })] })), on = N(({ playQueue: e }) => {
|
|
1522
1531
|
let { euiTheme: r } = M();
|
|
1523
1532
|
return /* @__PURE__ */ n(O.Section, { children: [
|
|
1524
|
-
/* @__PURE__ */ t(
|
|
1525
|
-
/* @__PURE__ */ t(
|
|
1533
|
+
/* @__PURE__ */ t(Zt, { playQueue: e }),
|
|
1534
|
+
/* @__PURE__ */ t(be, {
|
|
1526
1535
|
size: "l",
|
|
1527
1536
|
style: {
|
|
1528
1537
|
position: "sticky",
|
|
@@ -1531,14 +1540,14 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1531
1540
|
background: r.colors.backgroundBasePlain
|
|
1532
1541
|
}
|
|
1533
1542
|
}),
|
|
1534
|
-
e.isEmpty ? /* @__PURE__ */ t(
|
|
1543
|
+
e.isEmpty ? /* @__PURE__ */ t(ue, {
|
|
1535
1544
|
title: /* @__PURE__ */ t("h2", { children: "We couldn't find any videos" }),
|
|
1536
1545
|
body: /* @__PURE__ */ t("p", { children: "Your video library doesn't contain any video content." }),
|
|
1537
|
-
actions: /* @__PURE__ */ t(
|
|
1538
|
-
}) : /* @__PURE__ */ t(
|
|
1546
|
+
actions: /* @__PURE__ */ t(qt, { onFulfilled: e.addItemFromDto })
|
|
1547
|
+
}) : /* @__PURE__ */ t(an, { playQueue: e })
|
|
1539
1548
|
] });
|
|
1540
|
-
}),
|
|
1541
|
-
let i =
|
|
1549
|
+
}), sn = ({ breadcrumbs: e, tabs: n, ...r }) => {
|
|
1550
|
+
let i = Je();
|
|
1542
1551
|
return /* @__PURE__ */ t(O.Header, {
|
|
1543
1552
|
...r,
|
|
1544
1553
|
breadcrumbs: e?.map(({ linkProps: e, ...t }) => ({
|
|
@@ -1556,15 +1565,15 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1556
1565
|
}
|
|
1557
1566
|
}))
|
|
1558
1567
|
});
|
|
1559
|
-
},
|
|
1568
|
+
}, cn = () => {
|
|
1560
1569
|
let r = G();
|
|
1561
|
-
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(
|
|
1570
|
+
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(sn, {
|
|
1562
1571
|
pageTitle: "Play queue",
|
|
1563
1572
|
rightSideItems: []
|
|
1564
|
-
}), /* @__PURE__ */ t(
|
|
1565
|
-
},
|
|
1566
|
-
let [o, s] =
|
|
1567
|
-
return /* @__PURE__ */ t(
|
|
1573
|
+
}), /* @__PURE__ */ t(on, { playQueue: r })] });
|
|
1574
|
+
}, ln = R.create(({ remove: e, resolve: r, playlistListItem: i }) => {
|
|
1575
|
+
let [o, s] = d(!1);
|
|
1576
|
+
return /* @__PURE__ */ t(le, {
|
|
1568
1577
|
title: "Delete playlist permanently?",
|
|
1569
1578
|
onCancel: e,
|
|
1570
1579
|
onConfirm: a(async () => {
|
|
@@ -1584,12 +1593,12 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1584
1593
|
"', you won't be able to recover it."
|
|
1585
1594
|
] })
|
|
1586
1595
|
});
|
|
1587
|
-
}),
|
|
1596
|
+
}), un = N(({ playlist: e }) => /* @__PURE__ */ t(_, {
|
|
1588
1597
|
iconType: P,
|
|
1589
1598
|
onClick: e.addSelectedItems,
|
|
1590
1599
|
disabled: !e.canAddSelectedItems,
|
|
1591
1600
|
children: "Add to play queue"
|
|
1592
|
-
})),
|
|
1601
|
+
})), dn = N(({ playlist: e, closePopover: n }) => {
|
|
1593
1602
|
let r = a(({ name: e, icon: t, disabled: r, onClick: i }) => ({
|
|
1594
1603
|
name: e,
|
|
1595
1604
|
icon: t,
|
|
@@ -1598,7 +1607,7 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1598
1607
|
n(), i(e);
|
|
1599
1608
|
}
|
|
1600
1609
|
}), [n]);
|
|
1601
|
-
return /* @__PURE__ */ t(
|
|
1610
|
+
return /* @__PURE__ */ t(x, {
|
|
1602
1611
|
initialPanelId: 0,
|
|
1603
1612
|
panels: l(() => [{
|
|
1604
1613
|
id: 0,
|
|
@@ -1624,10 +1633,10 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1624
1633
|
]
|
|
1625
1634
|
}], [r, e])
|
|
1626
1635
|
});
|
|
1627
|
-
}),
|
|
1628
|
-
let [n, r] =
|
|
1636
|
+
}), fn = i(({ playlist: e }) => {
|
|
1637
|
+
let [n, r] = d(!1), i = a(() => r(!n), [n]), o = a(() => r(!1), []);
|
|
1629
1638
|
return /* @__PURE__ */ t(k, {
|
|
1630
|
-
button: /* @__PURE__ */ t(
|
|
1639
|
+
button: /* @__PURE__ */ t(y, {
|
|
1631
1640
|
display: "base",
|
|
1632
1641
|
size: "m",
|
|
1633
1642
|
iconType: I,
|
|
@@ -1637,12 +1646,12 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1637
1646
|
closePopover: o,
|
|
1638
1647
|
panelPaddingSize: "none",
|
|
1639
1648
|
anchorPosition: "downLeft",
|
|
1640
|
-
children: /* @__PURE__ */ t(
|
|
1649
|
+
children: /* @__PURE__ */ t(dn, {
|
|
1641
1650
|
playlist: e,
|
|
1642
1651
|
closePopover: o
|
|
1643
1652
|
})
|
|
1644
1653
|
});
|
|
1645
|
-
}),
|
|
1654
|
+
}), pn = N(({ playlist: e }) => {
|
|
1646
1655
|
let { euiTheme: r } = M();
|
|
1647
1656
|
return /* @__PURE__ */ n(C, {
|
|
1648
1657
|
alignItems: "center",
|
|
@@ -1660,7 +1669,7 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1660
1669
|
children: [
|
|
1661
1670
|
/* @__PURE__ */ t(w, {
|
|
1662
1671
|
grow: !1,
|
|
1663
|
-
children: /* @__PURE__ */ t(
|
|
1672
|
+
children: /* @__PURE__ */ t(_, {
|
|
1664
1673
|
disabled: !e.canPlaySelectedItemsNext,
|
|
1665
1674
|
onClick: e.playSelectedItemsNext,
|
|
1666
1675
|
children: "Play next"
|
|
@@ -1668,11 +1677,11 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1668
1677
|
}),
|
|
1669
1678
|
/* @__PURE__ */ t(w, {
|
|
1670
1679
|
grow: !1,
|
|
1671
|
-
children: /* @__PURE__ */ t(
|
|
1680
|
+
children: /* @__PURE__ */ t(un, { playlist: e })
|
|
1672
1681
|
}),
|
|
1673
1682
|
/* @__PURE__ */ t(w, {
|
|
1674
1683
|
grow: !1,
|
|
1675
|
-
children: /* @__PURE__ */ t(
|
|
1684
|
+
children: /* @__PURE__ */ t(_, {
|
|
1676
1685
|
iconType: F,
|
|
1677
1686
|
onClick: e.removeSelectedItems,
|
|
1678
1687
|
disabled: !e.canRemoveSelectedItems,
|
|
@@ -1681,24 +1690,24 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1681
1690
|
})
|
|
1682
1691
|
]
|
|
1683
1692
|
}),
|
|
1684
|
-
/* @__PURE__ */ t(
|
|
1693
|
+
/* @__PURE__ */ t(ye, {
|
|
1685
1694
|
sizes: ["xs"],
|
|
1686
|
-
children: /* @__PURE__ */ t(
|
|
1695
|
+
children: /* @__PURE__ */ t(fn, { playlist: e })
|
|
1687
1696
|
}),
|
|
1688
1697
|
/* @__PURE__ */ t(w, { grow: !0 }),
|
|
1689
1698
|
/* @__PURE__ */ t(w, {
|
|
1690
1699
|
grow: !1,
|
|
1691
|
-
children: /* @__PURE__ */ t(
|
|
1700
|
+
children: /* @__PURE__ */ t(qt, { onFulfilled: e.addItemFromDto })
|
|
1692
1701
|
})
|
|
1693
1702
|
]
|
|
1694
1703
|
});
|
|
1695
|
-
}),
|
|
1704
|
+
}), mn = N(({ playlist: r }) => /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(we, { children: /* @__PURE__ */ t(C, {
|
|
1696
1705
|
responsive: !1,
|
|
1697
1706
|
justifyContent: "spaceBetween",
|
|
1698
1707
|
alignItems: "baseline",
|
|
1699
1708
|
children: /* @__PURE__ */ t(w, {
|
|
1700
1709
|
grow: !1,
|
|
1701
|
-
children: /* @__PURE__ */ t(
|
|
1710
|
+
children: /* @__PURE__ */ t(b, {
|
|
1702
1711
|
id: "",
|
|
1703
1712
|
checked: r.allItemsSelected,
|
|
1704
1713
|
onChange: (e) => {
|
|
@@ -1706,8 +1715,8 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1706
1715
|
}
|
|
1707
1716
|
})
|
|
1708
1717
|
})
|
|
1709
|
-
}) }), /* @__PURE__ */ n(
|
|
1710
|
-
/* @__PURE__ */ t(
|
|
1718
|
+
}) }), /* @__PURE__ */ n(Se, { children: [
|
|
1719
|
+
/* @__PURE__ */ t(Ce, { children: /* @__PURE__ */ t(b, {
|
|
1711
1720
|
id: "",
|
|
1712
1721
|
checked: r.allItemsSelected,
|
|
1713
1722
|
onChange: (e) => {
|
|
@@ -1717,7 +1726,7 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1717
1726
|
/* @__PURE__ */ t(A, { width: 24 }),
|
|
1718
1727
|
/* @__PURE__ */ t(A, { children: "Title" }),
|
|
1719
1728
|
/* @__PURE__ */ t(A, {})
|
|
1720
|
-
] })] })),
|
|
1729
|
+
] })] })), hn = i(({ item: e, closePopover: n }) => {
|
|
1721
1730
|
let r = a(({ name: e, icon: t, disabled: r, onClick: i, className: a }) => ({
|
|
1722
1731
|
name: e,
|
|
1723
1732
|
icon: t,
|
|
@@ -1727,7 +1736,7 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1727
1736
|
},
|
|
1728
1737
|
className: a
|
|
1729
1738
|
}), [n]);
|
|
1730
|
-
return /* @__PURE__ */ t(
|
|
1739
|
+
return /* @__PURE__ */ t(x, {
|
|
1731
1740
|
initialPanelId: 0,
|
|
1732
1741
|
panels: l(() => [{
|
|
1733
1742
|
id: 0,
|
|
@@ -1756,13 +1765,13 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1756
1765
|
{ isSeparator: !0 },
|
|
1757
1766
|
r({
|
|
1758
1767
|
name: "Move to the top",
|
|
1759
|
-
icon: /* @__PURE__ */ t(D, { type:
|
|
1768
|
+
icon: /* @__PURE__ */ t(D, { type: Pe }),
|
|
1760
1769
|
onClick: e.moveToTop,
|
|
1761
1770
|
disabled: !e.canMoveToTop
|
|
1762
1771
|
}),
|
|
1763
1772
|
r({
|
|
1764
1773
|
name: "Move to the bottom",
|
|
1765
|
-
icon: /* @__PURE__ */ t(D, { type:
|
|
1774
|
+
icon: /* @__PURE__ */ t(D, { type: Oe }),
|
|
1766
1775
|
onClick: e.moveToBottom,
|
|
1767
1776
|
disabled: !e.canMoveToBottom
|
|
1768
1777
|
}),
|
|
@@ -1788,10 +1797,10 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1788
1797
|
]
|
|
1789
1798
|
}], [r, e])
|
|
1790
1799
|
});
|
|
1791
|
-
}),
|
|
1792
|
-
let [n, r] =
|
|
1800
|
+
}), gn = i(({ item: e }) => {
|
|
1801
|
+
let [n, r] = d(!1), i = a(() => r(!n), [n]), o = a(() => r(!1), []);
|
|
1793
1802
|
return /* @__PURE__ */ t(k, {
|
|
1794
|
-
button: /* @__PURE__ */ t(
|
|
1803
|
+
button: /* @__PURE__ */ t(y, {
|
|
1795
1804
|
title: "More options",
|
|
1796
1805
|
"aria-label": "More options",
|
|
1797
1806
|
iconType: I,
|
|
@@ -1803,35 +1812,35 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1803
1812
|
closePopover: o,
|
|
1804
1813
|
panelPaddingSize: "none",
|
|
1805
1814
|
anchorPosition: "leftCenter",
|
|
1806
|
-
children: /* @__PURE__ */ t(
|
|
1815
|
+
children: /* @__PURE__ */ t(hn, {
|
|
1807
1816
|
item: e,
|
|
1808
1817
|
closePopover: o
|
|
1809
1818
|
})
|
|
1810
1819
|
});
|
|
1811
|
-
}),
|
|
1820
|
+
}), _n = N(({ item: e }) => /* @__PURE__ */ n(j, {
|
|
1812
1821
|
textOnly: !1,
|
|
1813
1822
|
hasActions: !0,
|
|
1814
1823
|
align: "right",
|
|
1815
1824
|
children: [/* @__PURE__ */ n(E, {
|
|
1816
1825
|
sizes: ["xs"],
|
|
1817
|
-
children: [/* @__PURE__ */ t(
|
|
1826
|
+
children: [/* @__PURE__ */ t(_, {
|
|
1818
1827
|
iconType: L,
|
|
1819
1828
|
size: "s",
|
|
1820
1829
|
onClick: e.play,
|
|
1821
1830
|
children: "Play"
|
|
1822
|
-
}), /* @__PURE__ */ t(
|
|
1831
|
+
}), /* @__PURE__ */ t(_, {
|
|
1823
1832
|
iconType: F,
|
|
1824
1833
|
size: "s",
|
|
1825
1834
|
onClick: e.remove,
|
|
1826
1835
|
children: "Remove"
|
|
1827
1836
|
})]
|
|
1828
|
-
}), /* @__PURE__ */ t(
|
|
1829
|
-
})),
|
|
1837
|
+
}), /* @__PURE__ */ t(gn, { item: e })]
|
|
1838
|
+
})), vn = N(({ item: e }) => /* @__PURE__ */ n(Te, {
|
|
1830
1839
|
isSelected: e.isCurrent,
|
|
1831
1840
|
hasSelection: !0,
|
|
1832
1841
|
hasActions: !0,
|
|
1833
1842
|
children: [
|
|
1834
|
-
/* @__PURE__ */ t(
|
|
1843
|
+
/* @__PURE__ */ t(Ee, { children: /* @__PURE__ */ t(b, {
|
|
1835
1844
|
id: e.id.toString(),
|
|
1836
1845
|
checked: e.isSelected,
|
|
1837
1846
|
onChange: e.toggleSelected
|
|
@@ -1851,25 +1860,25 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1851
1860
|
enlarge: !0,
|
|
1852
1861
|
width: "100%"
|
|
1853
1862
|
},
|
|
1854
|
-
children: /* @__PURE__ */ t(
|
|
1863
|
+
children: /* @__PURE__ */ t(fe, {
|
|
1855
1864
|
href: e.url,
|
|
1856
1865
|
target: "_blank",
|
|
1857
1866
|
external: !0,
|
|
1858
1867
|
children: e.title
|
|
1859
1868
|
})
|
|
1860
1869
|
}),
|
|
1861
|
-
/* @__PURE__ */ t(
|
|
1870
|
+
/* @__PURE__ */ t(_n, { item: e })
|
|
1862
1871
|
]
|
|
1863
|
-
})),
|
|
1872
|
+
})), yn = N(({ playlist: e }) => /* @__PURE__ */ t(qe, {
|
|
1864
1873
|
tag: "tbody",
|
|
1865
1874
|
list: e.items,
|
|
1866
1875
|
setList: (t) => e.setItems(t),
|
|
1867
|
-
children: e.items.map((e) => /* @__PURE__ */ t(
|
|
1868
|
-
})),
|
|
1876
|
+
children: e.items.map((e) => /* @__PURE__ */ t(vn, { item: e }, e.id))
|
|
1877
|
+
})), bn = N(({ playlist: e }) => /* @__PURE__ */ n(xe, { children: [/* @__PURE__ */ t(mn, { playlist: e }), /* @__PURE__ */ t(yn, { playlist: e })] })), xn = N(({ playlist: r }) => {
|
|
1869
1878
|
let { euiTheme: i } = M();
|
|
1870
1879
|
return /* @__PURE__ */ n(O.Section, { children: [
|
|
1871
|
-
/* @__PURE__ */ t(
|
|
1872
|
-
/* @__PURE__ */ t(
|
|
1880
|
+
/* @__PURE__ */ t(pn, { playlist: r }),
|
|
1881
|
+
/* @__PURE__ */ t(be, {
|
|
1873
1882
|
size: "l",
|
|
1874
1883
|
style: {
|
|
1875
1884
|
position: "sticky",
|
|
@@ -1878,16 +1887,16 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1878
1887
|
background: i.colors.backgroundBasePlain
|
|
1879
1888
|
}
|
|
1880
1889
|
}),
|
|
1881
|
-
r.isEmpty ? /* @__PURE__ */ t(e, {}) : /* @__PURE__ */ t(
|
|
1890
|
+
r.isEmpty ? /* @__PURE__ */ t(e, {}) : /* @__PURE__ */ t(bn, { playlist: r })
|
|
1882
1891
|
] });
|
|
1883
|
-
}),
|
|
1884
|
-
let a =
|
|
1885
|
-
return /* @__PURE__ */ n(
|
|
1892
|
+
}), Sn = R.create(({ remove: e, resolve: r, playlistListItem: i }) => {
|
|
1893
|
+
let a = De({ prefix: "modalForm" }), [o, s] = d(i.name), [c, l] = d(!1);
|
|
1894
|
+
return /* @__PURE__ */ n(pe, {
|
|
1886
1895
|
onClose: e,
|
|
1887
1896
|
initialFocus: "[name=name]",
|
|
1888
1897
|
children: [
|
|
1889
|
-
/* @__PURE__ */ t(
|
|
1890
|
-
/* @__PURE__ */ t(
|
|
1898
|
+
/* @__PURE__ */ t(ge, { children: /* @__PURE__ */ t(_e, { children: "Rename playlist" }) }),
|
|
1899
|
+
/* @__PURE__ */ t(me, { children: /* @__PURE__ */ t(de, {
|
|
1891
1900
|
id: a,
|
|
1892
1901
|
component: "form",
|
|
1893
1902
|
onSubmit: async (t) => {
|
|
@@ -1900,17 +1909,17 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
1900
1909
|
},
|
|
1901
1910
|
children: /* @__PURE__ */ t(T, {
|
|
1902
1911
|
label: "Name",
|
|
1903
|
-
children: /* @__PURE__ */ t(
|
|
1912
|
+
children: /* @__PURE__ */ t(S, {
|
|
1904
1913
|
name: "name",
|
|
1905
1914
|
value: o,
|
|
1906
1915
|
onChange: (e) => s(e.target.value)
|
|
1907
1916
|
})
|
|
1908
1917
|
})
|
|
1909
1918
|
}) }),
|
|
1910
|
-
/* @__PURE__ */ n(
|
|
1919
|
+
/* @__PURE__ */ n(he, { children: [/* @__PURE__ */ t(v, {
|
|
1911
1920
|
onClick: e,
|
|
1912
1921
|
children: "Cancel"
|
|
1913
|
-
}), /* @__PURE__ */ t(
|
|
1922
|
+
}), /* @__PURE__ */ t(_, {
|
|
1914
1923
|
type: "submit",
|
|
1915
1924
|
form: a,
|
|
1916
1925
|
fill: !0,
|
|
@@ -2009,7 +2018,7 @@ var Gt = R.create(({ remove: e, resolve: r }) => {
|
|
|
2009
2018
|
U([h], Q.prototype, "isSelected", void 0), U([p], Q.prototype, "isCurrent", null), U([p], Q.prototype, "index", null), U([p], Q.prototype, "isFirst", null), U([p], Q.prototype, "isLast", null), U([p], Q.prototype, "canMoveToTop", null), U([p], Q.prototype, "canMoveToBottom", null), U([p], Q.prototype, "canRemoveToTop", null), U([p], Q.prototype, "canRemoveOthers", null), U([f.bound], Q.prototype, "unselect", null), U([f.bound], Q.prototype, "select", null), U([f.bound], Q.prototype, "toggleSelected", null), U([f.bound], Q.prototype, "play", null), U([f.bound], Q.prototype, "remove", null), U([f.bound], Q.prototype, "playFirst", null), U([f.bound], Q.prototype, "playNext", null), U([f.bound], Q.prototype, "addToPlayQueue", null), U([f.bound], Q.prototype, "moveToTop", null), U([f.bound], Q.prototype, "moveToBottom", null), U([f.bound], Q.prototype, "removeToTop", null), U([f.bound], Q.prototype, "removeOthers", null);
|
|
2010
2019
|
//#endregion
|
|
2011
2020
|
//#region src/features/media-player.playlists/stores/PlaylistStore.ts
|
|
2012
|
-
var
|
|
2021
|
+
var Cn = {
|
|
2013
2022
|
type: "object",
|
|
2014
2023
|
properties: {
|
|
2015
2024
|
version: {
|
|
@@ -2019,10 +2028,10 @@ var Sn = {
|
|
|
2019
2028
|
items: {
|
|
2020
2029
|
type: "array",
|
|
2021
2030
|
nullable: !0,
|
|
2022
|
-
items:
|
|
2031
|
+
items: lt
|
|
2023
2032
|
}
|
|
2024
2033
|
}
|
|
2025
|
-
},
|
|
2034
|
+
}, wn = class {
|
|
2026
2035
|
playlist;
|
|
2027
2036
|
constructor(e) {
|
|
2028
2037
|
this.playlist = e, m(this);
|
|
@@ -2037,16 +2046,16 @@ var Sn = {
|
|
|
2037
2046
|
this.playlist.items = e.items?.map((e) => this.playlist.createItemFromDto(e)) ?? [];
|
|
2038
2047
|
}
|
|
2039
2048
|
validateState(e) {
|
|
2040
|
-
return
|
|
2049
|
+
return $e(Cn, "PlaylistLocalStorageState")(e);
|
|
2041
2050
|
}
|
|
2042
2051
|
};
|
|
2043
|
-
U([p.struct],
|
|
2052
|
+
U([p.struct], wn.prototype, "state", null);
|
|
2044
2053
|
var $ = class {
|
|
2045
2054
|
playQueue;
|
|
2046
2055
|
localStorageState;
|
|
2047
2056
|
items = [];
|
|
2048
2057
|
constructor(e) {
|
|
2049
|
-
this.playQueue = e, m(this), this.localStorageState = new
|
|
2058
|
+
this.playQueue = e, m(this), this.localStorageState = new wn(this);
|
|
2050
2059
|
}
|
|
2051
2060
|
createItemFromDto(e) {
|
|
2052
2061
|
return Q.fromDto(this.playQueue, this, {
|
|
@@ -2106,7 +2115,7 @@ var $ = class {
|
|
|
2106
2115
|
this.items.splice(t, 0, n);
|
|
2107
2116
|
}
|
|
2108
2117
|
async removeItems(e) {
|
|
2109
|
-
|
|
2118
|
+
re(this.items, ...e);
|
|
2110
2119
|
}
|
|
2111
2120
|
async removeSelectedItems() {
|
|
2112
2121
|
await this.removeItems(this.selectedItemsOrAllItems), this.unselectAll();
|
|
@@ -2130,57 +2139,57 @@ var $ = class {
|
|
|
2130
2139
|
U([h], $.prototype, "items", void 0), U([p], $.prototype, "isEmpty", null), U([p], $.prototype, "hasMultipleItems", null), U([p], $.prototype, "selectedItems", null), U([p], $.prototype, "allItemsSelected", null), U([p], $.prototype, "hasSelectedItems", null), U([p], $.prototype, "selectedItemsOrAllItems", null), U([p], $.prototype, "canAddSelectedItems", null), U([p], $.prototype, "canPlaySelectedItemsNext", null), U([p], $.prototype, "canRemoveSelectedItems", null), U([f.bound], $.prototype, "setItems", null), U([f.bound], $.prototype, "unselectAll", null), U([f.bound], $.prototype, "selectAll", null), U([f.bound], $.prototype, "playSelectedItemsNext", null), U([f.bound], $.prototype, "addSelectedItems", null), U([f.bound], $.prototype, "addItems", null), U([f.bound], $.prototype, "moveItem", null), U([f.bound], $.prototype, "removeItems", null), U([f.bound], $.prototype, "removeSelectedItems", null), U([f.bound], $.prototype, "removeOtherItems", null), U([f.bound], $.prototype, "removeItemsAbove", null), U([f.bound], $.prototype, "addItemFromDto", null), U([f.bound], $.prototype, "playAll", null);
|
|
2131
2140
|
//#endregion
|
|
2132
2141
|
//#region src/features/media-player.playlists/pages/PlaylistDetailsPage.tsx
|
|
2133
|
-
var
|
|
2142
|
+
var Tn = ({ onClick: e }) => /* @__PURE__ */ t(_, {
|
|
2134
2143
|
onClick: e,
|
|
2135
2144
|
iconType: L,
|
|
2136
2145
|
fill: !0,
|
|
2137
2146
|
children: "Play all"
|
|
2138
|
-
}),
|
|
2139
|
-
onClick: () => R.show(
|
|
2140
|
-
iconType:
|
|
2147
|
+
}), En = ({ playlistListItem: e, onFulfilled: n }) => /* @__PURE__ */ t(_, {
|
|
2148
|
+
onClick: () => R.show(Sn, { playlistListItem: e }).then(n),
|
|
2149
|
+
iconType: He,
|
|
2141
2150
|
children: "Rename"
|
|
2142
|
-
}),
|
|
2143
|
-
onClick: () => R.show(
|
|
2144
|
-
iconType:
|
|
2151
|
+
}), Dn = ({ playlistListItem: e, onFulfilled: n }) => /* @__PURE__ */ t(_, {
|
|
2152
|
+
onClick: () => R.show(ln, { playlistListItem: e }).then(n),
|
|
2153
|
+
iconType: Fe,
|
|
2145
2154
|
children: "Delete"
|
|
2146
|
-
}),
|
|
2147
|
-
let i = B.playlist(r.id), o = G(), [s] =
|
|
2148
|
-
|
|
2149
|
-
let c =
|
|
2155
|
+
}), On = N(({ playlistListItem: r }) => {
|
|
2156
|
+
let i = B.playlist(r.id), o = G(), [s] = d(() => new $(o));
|
|
2157
|
+
ne(i, s.localStorageState);
|
|
2158
|
+
let c = Je(), l = a(async (e) => {
|
|
2150
2159
|
await r.rename(e);
|
|
2151
|
-
}, [r]),
|
|
2160
|
+
}, [r]), u = a(async () => {
|
|
2152
2161
|
await c.navigate({ to: "/playlists" }), window.localStorage.removeItem(i), await r.remove();
|
|
2153
2162
|
}, [
|
|
2154
2163
|
r,
|
|
2155
2164
|
c,
|
|
2156
2165
|
i
|
|
2157
2166
|
]);
|
|
2158
|
-
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(
|
|
2167
|
+
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(sn, {
|
|
2159
2168
|
pageTitle: r.name,
|
|
2160
2169
|
breadcrumbs: [{
|
|
2161
2170
|
text: "Playlists",
|
|
2162
2171
|
linkProps: { to: "/playlists" }
|
|
2163
2172
|
}, { text: r.name }],
|
|
2164
2173
|
rightSideItems: [
|
|
2165
|
-
/* @__PURE__ */ t(
|
|
2166
|
-
/* @__PURE__ */ t(
|
|
2174
|
+
/* @__PURE__ */ t(Tn, { onClick: s.playAll }),
|
|
2175
|
+
/* @__PURE__ */ t(En, {
|
|
2167
2176
|
playlistListItem: r,
|
|
2168
2177
|
onFulfilled: l
|
|
2169
2178
|
}),
|
|
2170
|
-
/* @__PURE__ */ t(
|
|
2179
|
+
/* @__PURE__ */ t(Dn, {
|
|
2171
2180
|
playlistListItem: r,
|
|
2172
|
-
onFulfilled:
|
|
2181
|
+
onFulfilled: u
|
|
2173
2182
|
})
|
|
2174
2183
|
]
|
|
2175
|
-
}), /* @__PURE__ */ t(
|
|
2176
|
-
}),
|
|
2177
|
-
let i =
|
|
2178
|
-
return /* @__PURE__ */ n(
|
|
2184
|
+
}), /* @__PURE__ */ t(xn, { playlist: s })] });
|
|
2185
|
+
}), kn = R.create(({ remove: e, resolve: r }) => {
|
|
2186
|
+
let i = De({ prefix: "modalForm" }), [a, o] = d(""), [s, c] = d(!1);
|
|
2187
|
+
return /* @__PURE__ */ n(pe, {
|
|
2179
2188
|
onClose: e,
|
|
2180
2189
|
initialFocus: "[name=name]",
|
|
2181
2190
|
children: [
|
|
2182
|
-
/* @__PURE__ */ t(
|
|
2183
|
-
/* @__PURE__ */ t(
|
|
2191
|
+
/* @__PURE__ */ t(ge, { children: /* @__PURE__ */ t(_e, { children: "Create playlist" }) }),
|
|
2192
|
+
/* @__PURE__ */ t(me, { children: /* @__PURE__ */ t(de, {
|
|
2184
2193
|
id: i,
|
|
2185
2194
|
component: "form",
|
|
2186
2195
|
onSubmit: async (t) => {
|
|
@@ -2193,17 +2202,17 @@ var wn = ({ onClick: e }) => /* @__PURE__ */ t(v, {
|
|
|
2193
2202
|
},
|
|
2194
2203
|
children: /* @__PURE__ */ t(T, {
|
|
2195
2204
|
label: "Name",
|
|
2196
|
-
children: /* @__PURE__ */ t(
|
|
2205
|
+
children: /* @__PURE__ */ t(S, {
|
|
2197
2206
|
name: "name",
|
|
2198
2207
|
value: a,
|
|
2199
2208
|
onChange: (e) => o(e.target.value)
|
|
2200
2209
|
})
|
|
2201
2210
|
})
|
|
2202
2211
|
}) }),
|
|
2203
|
-
/* @__PURE__ */ n(
|
|
2212
|
+
/* @__PURE__ */ n(he, { children: [/* @__PURE__ */ t(v, {
|
|
2204
2213
|
onClick: e,
|
|
2205
2214
|
children: "Cancel"
|
|
2206
|
-
}), /* @__PURE__ */ t(
|
|
2215
|
+
}), /* @__PURE__ */ t(_, {
|
|
2207
2216
|
type: "submit",
|
|
2208
2217
|
form: i,
|
|
2209
2218
|
fill: !0,
|
|
@@ -2213,51 +2222,51 @@ var wn = ({ onClick: e }) => /* @__PURE__ */ t(v, {
|
|
|
2213
2222
|
})] })
|
|
2214
2223
|
]
|
|
2215
2224
|
});
|
|
2216
|
-
}),
|
|
2217
|
-
onClick: () => R.show(
|
|
2225
|
+
}), An = ({ children: e, onFulfilled: n }) => /* @__PURE__ */ t(_, {
|
|
2226
|
+
onClick: () => R.show(kn).then(n),
|
|
2218
2227
|
iconType: P,
|
|
2219
2228
|
fill: !0,
|
|
2220
2229
|
children: e
|
|
2221
|
-
}),
|
|
2222
|
-
let r =
|
|
2230
|
+
}), jn = ({ linkProps: e, ...n }) => {
|
|
2231
|
+
let r = Je(), i = async (t) => {
|
|
2223
2232
|
t.preventDefault(), await r.navigate(e);
|
|
2224
2233
|
};
|
|
2225
|
-
return /* @__PURE__ */ t(
|
|
2234
|
+
return /* @__PURE__ */ t(fe, {
|
|
2226
2235
|
...n,
|
|
2227
2236
|
href: r.buildLocation(e).href,
|
|
2228
2237
|
onClick: i
|
|
2229
2238
|
});
|
|
2230
|
-
},
|
|
2239
|
+
}, Mn = N(({ playlistList: e }) => /* @__PURE__ */ t(Se, { children: /* @__PURE__ */ t(A, { children: "Name" }) })), Nn = N(({ item: e }) => /* @__PURE__ */ t(Te, { children: /* @__PURE__ */ t(j, { children: /* @__PURE__ */ t(jn, {
|
|
2231
2240
|
linkProps: {
|
|
2232
2241
|
to: "/playlists/$playlistId",
|
|
2233
2242
|
params: { playlistId: e.id }
|
|
2234
2243
|
},
|
|
2235
2244
|
children: e.name
|
|
2236
|
-
}) }) }, e.id)),
|
|
2245
|
+
}) }) }, e.id)), Pn = N(({ playlistList: e }) => /* @__PURE__ */ t(qe, {
|
|
2237
2246
|
tag: "tbody",
|
|
2238
2247
|
list: e.items,
|
|
2239
2248
|
setList: (t) => e.setItems(t),
|
|
2240
|
-
children: e.items.map((e) => /* @__PURE__ */ t(
|
|
2241
|
-
})),
|
|
2249
|
+
children: e.items.map((e) => /* @__PURE__ */ t(Nn, { item: e }, e.id))
|
|
2250
|
+
})), Fn = N(({ playlistList: e }) => /* @__PURE__ */ n(xe, { children: [/* @__PURE__ */ t(Mn, { playlistList: e }), /* @__PURE__ */ t(Pn, { playlistList: e })] })), In = () => /* @__PURE__ */ t(sn, {
|
|
2242
2251
|
pageTitle: "Playlists",
|
|
2243
2252
|
breadcrumbs: [{ text: "Playlists" }]
|
|
2244
|
-
}),
|
|
2253
|
+
}), Ln = N(({ playlistList: e }) => {
|
|
2245
2254
|
let r = a(async (t) => {
|
|
2246
2255
|
await e.addItem(e.createItem(t));
|
|
2247
2256
|
}, [e]);
|
|
2248
2257
|
return /* @__PURE__ */ n(O.Section, { children: [
|
|
2249
|
-
/* @__PURE__ */ t(
|
|
2258
|
+
/* @__PURE__ */ t(An, {
|
|
2250
2259
|
onFulfilled: r,
|
|
2251
2260
|
children: "New playlist"
|
|
2252
2261
|
}),
|
|
2253
|
-
/* @__PURE__ */ t(
|
|
2254
|
-
/* @__PURE__ */ t(
|
|
2262
|
+
/* @__PURE__ */ t(be, { size: "l" }),
|
|
2263
|
+
/* @__PURE__ */ t(Fn, { playlistList: e })
|
|
2255
2264
|
] });
|
|
2256
|
-
}),
|
|
2257
|
-
let r =
|
|
2258
|
-
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(
|
|
2265
|
+
}), Rn = i(() => {
|
|
2266
|
+
let r = ht();
|
|
2267
|
+
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(In, {}), /* @__PURE__ */ t(Ln, { playlistList: r })] });
|
|
2259
2268
|
});
|
|
2260
2269
|
//#endregion
|
|
2261
|
-
export {
|
|
2270
|
+
export { Ut as BottomBar, vt as HydrangeanDivaProvider, bt as MediaPlayerLayout, Wt as MiniPlayer, nt as PlayQueueContext, cn as PlayQueuePage, on as PlayQueueSection, On as PlaylistDetailsPage, mt as PlaylistListContext, Rn as PlaylistListPage, H as RepeatMode, Ye as bottomBarHeight, G as usePlayQueue, ht as usePlaylistList, z as videoServiceIcons };
|
|
2262
2271
|
|
|
2263
2272
|
//# sourceMappingURL=index.es.js.map
|