@banou/ftube 0.0.0-stage → 0.0.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.
Files changed (91) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +44 -2
  3. package/__yt_engine__/engine.html +9 -0
  4. package/app.webmanifest +31 -0
  5. package/assets/account-BL8Hv7lS.js +157 -0
  6. package/assets/account-By94iboj.js +1 -0
  7. package/assets/account-DfiXzypA-YE6OyKjK.js +1 -0
  8. package/assets/account-generation-BP_-Qyck-BOth6YQ_.js +1 -0
  9. package/assets/agent-source-E4g0cDzU.js +1 -0
  10. package/assets/api-1NDCtwel-CAaxX8P1.js +3 -0
  11. package/assets/binary-encoding-By5K7InN.js +1 -0
  12. package/assets/build-CNn3bm6X.js +1 -0
  13. package/assets/busy-C1JPjoZ_-CJ0641jK.js +1 -0
  14. package/assets/cards-Csel8naI.js +2334 -0
  15. package/assets/channel-B5f9YTIf.js +1160 -0
  16. package/assets/client-version-D9kIz6Gz.js +1 -0
  17. package/assets/comments-CJp9O808.js +612 -0
  18. package/assets/dislikes-DH5jCVEY.js +1 -0
  19. package/assets/dist-7VpLCl1k.js +1 -0
  20. package/assets/dist-BOrL1gYg.js +2 -0
  21. package/assets/downloads-CMXDjA_E.js +191 -0
  22. package/assets/egress.worker-DopXr5uP.js +104 -0
  23. package/assets/engine-B_kFyW7L.js +2 -0
  24. package/assets/feed-channels-Dg2mvF5x.js +251 -0
  25. package/assets/feed-groups-CnyR4sOO.js +160 -0
  26. package/assets/feed-history-BDAGG9N5.js +368 -0
  27. package/assets/feed-playlists-DcGR2AL6.js +167 -0
  28. package/assets/feed-subscriptions-Sm3tKz4P.js +165 -0
  29. package/assets/feed-you-lxbqknXX.js +110 -0
  30. package/assets/formats-CDwXfKnr.js +1 -0
  31. package/assets/frame-BrGNSf3s.js +2 -0
  32. package/assets/fs-CjRTQ7Nu.js +1 -0
  33. package/assets/fs-CwRtKje1-CBsYhX2-.js +1 -0
  34. package/assets/fullscreen-view-BLgosU84.js +269 -0
  35. package/assets/group-C00s0aT7.js +183 -0
  36. package/assets/groups-button-CvVnqwlu.js +25 -0
  37. package/assets/hashtag-CCIhITaL.js +115 -0
  38. package/assets/icons-DKsqNLSs.js +1 -0
  39. package/assets/index-A5dHbptn.css +1 -0
  40. package/assets/index-DwsYJ-bu.js +1328 -0
  41. package/assets/lib-h0P14ZFl.js +70 -0
  42. package/assets/linkify-B6hdFhsL.js +1 -0
  43. package/assets/packages-C3w3tSjj-BCtDk0vj.js +1 -0
  44. package/assets/party-CUcxsJDF.js +180 -0
  45. package/assets/playlist-DF7wsidw.js +521 -0
  46. package/assets/playlist-card-Btoc7D8f.js +91 -0
  47. package/assets/playlist-panel-D97BwT1f.js +199 -0
  48. package/assets/post-CQ9mfVos.js +39 -0
  49. package/assets/post-card-ZUQixO1G.js +76 -0
  50. package/assets/privacy-hkbqXFeB.js +46 -0
  51. package/assets/protobuf-BXZ2dCCc.js +1 -0
  52. package/assets/read-more-BhddUSlS.js +20 -0
  53. package/assets/rich-text-07paR5O3.js +25 -0
  54. package/assets/roboto-cyrillic-ext-BCp_3N7R.woff2 +0 -0
  55. package/assets/roboto-cyrillic-fOt7epNf.woff2 +0 -0
  56. package/assets/roboto-greek-DlT9XTxE.woff2 +0 -0
  57. package/assets/roboto-greek-ext-Bgw4czJT.woff2 +0 -0
  58. package/assets/roboto-latin-ccAYIvAh.woff2 +0 -0
  59. package/assets/roboto-latin-ext-DYIxWhlt.woff2 +0 -0
  60. package/assets/roboto-math-4a3xuzGk.woff2 +0 -0
  61. package/assets/roboto-symbols-B7iHSfaG.woff2 +0 -0
  62. package/assets/roboto-vietnamese-_f1XEJpo.woff2 +0 -0
  63. package/assets/rooms-B-AvBY-c-FNDqRDHE.js +1 -0
  64. package/assets/rooms-B91zuirR.js +1 -0
  65. package/assets/save-menu-DF1WKqSE.js +462 -0
  66. package/assets/search-Cx5IpDtZ.js +1026 -0
  67. package/assets/settings-kESE_uBm.js +99 -0
  68. package/assets/shaka-BwT9pJcV.js +36 -0
  69. package/assets/share-dialog-Cp0BJ6bg.js +156 -0
  70. package/assets/shorts-BxDB7m0c.js +686 -0
  71. package/assets/shorts-grid-Bgbkl5dP.js +11 -0
  72. package/assets/sign-in-Bx3zmj-m.js +97 -0
  73. package/assets/signed-out-prompt-CEAx65kq.js +79 -0
  74. package/assets/signin-DkI8Ogzz.js +18 -0
  75. package/assets/social-bXt3vmd4.js +1 -0
  76. package/assets/video-card-compact-r-K4XyDb.js +190 -0
  77. package/assets/watch-CkxSP1IA.js +1802 -0
  78. package/assets/web-BNanCsH5.js +43 -0
  79. package/favicon.ico +0 -0
  80. package/favicon.svg +5 -0
  81. package/icons/icon-192.png +0 -0
  82. package/icons/icon-512.png +0 -0
  83. package/index-Bj-Q3X8Q.js +4120 -0
  84. package/index.html +32 -0
  85. package/package.json +45 -4
  86. package/store/background.webp +0 -0
  87. package/store/channel.webp +0 -0
  88. package/store/cover.webp +0 -0
  89. package/store/phone.webp +0 -0
  90. package/store/search.webp +0 -0
  91. package/store/watch.webp +0 -0
@@ -0,0 +1,521 @@
1
+ import{w as e}from"./dist-BOrL1gYg.js";import{$ as t,C as n,Dt as r,M as i,S as a,en as o,ln as s,n as c,on as l,sn as u,tn as d}from"./icons-DKsqNLSs.js";import{C as f,O as p,T as ee,a as m,c as h,d as g,g as _,k as te,o as ne,ot as v,s as y,t as b,y as x}from"./sign-in-Bx3zmj-m.js";import{A as S,I as C,Y as w,Z as T,j as re,k as E}from"./cards-Csel8naI.js";import{n as ie}from"../index-Bj-Q3X8Q.js";import{t as D}from"./rich-text-07paR5O3.js";import{n as ae,t as oe}from"./video-card-compact-r-K4XyDb.js";import{t as O}from"./linkify-B6hdFhsL.js";import{n as se}from"./playlist-panel-D97BwT1f.js";u();var ce=_(`
2
+ query PlaylistView($id: ID!, $cursor: String) {
3
+ playlist(id: $id, cursor: $cursor) {
4
+ playlist {
5
+ id
6
+ title
7
+ description
8
+ thumbnail
9
+ videoCountText
10
+ viewCountText
11
+ updatedText
12
+ privacy
13
+ isEditable
14
+ channel { id name avatar }
15
+ }
16
+ items {
17
+ setVideoId
18
+ index
19
+ video {
20
+ id
21
+ title
22
+ thumbnail
23
+ thumbnailSrcset
24
+ durationSeconds
25
+ isMusic
26
+ viewCount
27
+ viewCountIcon
28
+ publishedText
29
+ metaDelimiter
30
+ isLive
31
+ isMembersOnly
32
+ channel { id name isVerified isVerifiedArtist }
33
+ }
34
+ }
35
+ cursor
36
+ }
37
+ }
38
+ `),le=_(`
39
+ mutation RemoveFromPlaylist($playlistId: ID!, $setVideoIds: [ID!]!) {
40
+ removeFromPlaylist(playlistId: $playlistId, setVideoIds: $setVideoIds) {
41
+ id
42
+ }
43
+ }
44
+ `),k=8,A=e=>e.setVideoId??`${e.index??``}:${e.video.id}`,j=v`
45
+ padding: 2.4rem 1.6rem;
46
+
47
+ .layout {
48
+ display: grid;
49
+ grid-template-columns: 36rem minmax(0, 1fr);
50
+ gap: 2.4rem;
51
+ /* Without this the side column stretches to the height of the whole list
52
+ and its sticky offset never has any room to take effect. */
53
+ align-items: start;
54
+ }
55
+
56
+ .side {
57
+ position: sticky;
58
+ /* Under the fixed header rather than at the viewport top. */
59
+ top: calc(var(--header-height) + 2.4rem);
60
+ min-width: 0;
61
+ padding: 2.4rem;
62
+ border-radius: 1.2rem;
63
+ background: var(--bg-subtle);
64
+ overflow: hidden;
65
+ isolation: isolate;
66
+ }
67
+
68
+ /* Dark cover-tinted hero surface in both themes so text, links and buttons
69
+ keep AA+ contrast regardless of page theme or cover brightness. */
70
+ .side.ambient {
71
+ background: #1a1a1a;
72
+ --text-primary: #ffffff;
73
+ --text-secondary: rgba(255, 255, 255, 0.78);
74
+ --text-tertiary: rgba(255, 255, 255, 0.65);
75
+ --accent: #8acbff;
76
+ --bg-inverse: #ffffff;
77
+ --bg-inverse-hover: rgba(255, 255, 255, 0.85);
78
+ --text-inverse: #0f0f0f;
79
+ --bg-chip: rgba(255, 255, 255, 0.16);
80
+ --bg-chip-hover: rgba(255, 255, 255, 0.26);
81
+ --bg-hover: rgba(255, 255, 255, 0.16);
82
+ }
83
+
84
+ .ambient-backdrop {
85
+ position: absolute;
86
+ inset: 0;
87
+ z-index: 0;
88
+ overflow: hidden;
89
+ pointer-events: none;
90
+ }
91
+
92
+ .ambient-backdrop img {
93
+ display: block;
94
+ width: 100%;
95
+ height: 100%;
96
+ object-fit: cover;
97
+ filter: blur(40px) saturate(1.4);
98
+ transform: scale(1.25);
99
+ }
100
+
101
+ .ambient-backdrop::after {
102
+ content: '';
103
+ position: absolute;
104
+ inset: 0;
105
+ background: linear-gradient(
106
+ 180deg,
107
+ rgba(15, 15, 15, 0.4) 0%,
108
+ rgba(15, 15, 15, 0.72) 45%,
109
+ rgba(15, 15, 15, 0.88) 100%
110
+ );
111
+ }
112
+
113
+ .side-content {
114
+ position: relative;
115
+ z-index: 1;
116
+ }
117
+
118
+ .cover {
119
+ position: relative;
120
+ aspect-ratio: 16 / 9;
121
+ border-radius: 1.2rem;
122
+ overflow: hidden;
123
+ background: var(--bg-elevated);
124
+ }
125
+
126
+ .side.ambient .cover {
127
+ box-shadow: 0 0.4rem 2.4rem rgba(0, 0, 0, 0.28);
128
+ }
129
+
130
+ .cover img {
131
+ display: block;
132
+ width: 100%;
133
+ height: 100%;
134
+ object-fit: cover;
135
+ }
136
+
137
+ .cover-fallback {
138
+ display: flex;
139
+ align-items: center;
140
+ justify-content: center;
141
+ width: 100%;
142
+ height: 100%;
143
+ color: var(--text-tertiary);
144
+ }
145
+
146
+ .heading {
147
+ margin: 1.6rem 0 0;
148
+ font-size: 2.4rem;
149
+ font-weight: 700;
150
+ line-height: 3rem;
151
+ color: var(--text-primary);
152
+ overflow-wrap: anywhere;
153
+ }
154
+
155
+ .owner {
156
+ display: flex;
157
+ align-items: center;
158
+ gap: 0.8rem;
159
+ width: fit-content;
160
+ max-width: 100%;
161
+ margin-top: 1.2rem;
162
+ font-size: 1.4rem;
163
+ font-weight: 500;
164
+ color: var(--text-primary);
165
+ }
166
+
167
+ .owner-name {
168
+ min-width: 0;
169
+ overflow: hidden;
170
+ text-overflow: ellipsis;
171
+ white-space: nowrap;
172
+ }
173
+
174
+ .avatar {
175
+ flex: none;
176
+ width: 2.4rem;
177
+ height: 2.4rem;
178
+ border-radius: 50%;
179
+ overflow: hidden;
180
+ background: var(--bg-chip);
181
+ }
182
+
183
+ .avatar img {
184
+ display: block;
185
+ width: 100%;
186
+ height: 100%;
187
+ object-fit: cover;
188
+ }
189
+
190
+ .avatar.fallback {
191
+ display: flex;
192
+ align-items: center;
193
+ justify-content: center;
194
+ font-size: 1.2rem;
195
+ }
196
+
197
+ .stats {
198
+ margin-top: 0.4rem;
199
+ font-size: 1.2rem;
200
+ line-height: 1.8rem;
201
+ color: var(--text-secondary);
202
+ }
203
+
204
+ .description-wrap {
205
+ margin-top: 1.2rem;
206
+ }
207
+
208
+ .description {
209
+ font-size: 1.2rem;
210
+ line-height: 1.8rem;
211
+ color: var(--text-secondary);
212
+ white-space: pre-wrap;
213
+ overflow-wrap: anywhere;
214
+ }
215
+
216
+ .description.clamped {
217
+ display: -webkit-box;
218
+ -webkit-line-clamp: 3;
219
+ -webkit-box-orient: vertical;
220
+ max-height: 5.4rem;
221
+ overflow: hidden;
222
+ }
223
+
224
+ .description-toggle {
225
+ display: inline-block;
226
+ margin-top: 0.4rem;
227
+ padding: 0;
228
+ border: none;
229
+ background: transparent;
230
+ color: var(--text-primary);
231
+ font-size: 1.2rem;
232
+ font-weight: 500;
233
+ line-height: 1.8rem;
234
+ cursor: pointer;
235
+ }
236
+
237
+ .description-toggle:hover {
238
+ text-decoration: underline;
239
+ }
240
+
241
+ .actions {
242
+ display: flex;
243
+ flex-wrap: wrap;
244
+ align-items: center;
245
+ gap: 0.8rem;
246
+ margin-top: 1.6rem;
247
+ }
248
+
249
+ .pill {
250
+ display: flex;
251
+ align-items: center;
252
+ gap: 0.8rem;
253
+ height: 3.6rem;
254
+ padding: 0 1.6rem;
255
+ border: none;
256
+ border-radius: 1.8rem;
257
+ background: var(--bg-inverse);
258
+ color: var(--text-inverse);
259
+ font-size: 1.4rem;
260
+ font-weight: 500;
261
+ white-space: nowrap;
262
+ cursor: pointer;
263
+ transition: background 0.15s ease;
264
+ }
265
+
266
+ .pill:hover {
267
+ background: var(--bg-inverse-hover);
268
+ }
269
+
270
+ .pill.secondary {
271
+ background: var(--bg-chip);
272
+ color: var(--text-primary);
273
+ }
274
+
275
+ .pill.secondary:hover {
276
+ background: var(--bg-chip-hover);
277
+ }
278
+
279
+ .round {
280
+ flex: none;
281
+ width: 3.6rem;
282
+ height: 3.6rem;
283
+ display: flex;
284
+ align-items: center;
285
+ justify-content: center;
286
+ border: none;
287
+ border-radius: 50%;
288
+ background: var(--bg-chip);
289
+ color: var(--text-primary);
290
+ cursor: pointer;
291
+ transition: background 0.15s ease;
292
+ }
293
+
294
+ .round:hover {
295
+ background: var(--bg-chip-hover);
296
+ }
297
+
298
+ .side-skeleton {
299
+ animation: playlist-side-pulse 1.6s ease-in-out infinite;
300
+ }
301
+
302
+ .side-skeleton .cover {
303
+ background: var(--bg-chip);
304
+ }
305
+
306
+ .skel-bar,
307
+ .skel-avatar,
308
+ .skel-pill,
309
+ .skel-round {
310
+ background: var(--bg-chip);
311
+ }
312
+
313
+ .skel-bar {
314
+ height: 1.4rem;
315
+ border-radius: 0.4rem;
316
+ }
317
+
318
+ .skel-title {
319
+ margin-top: 1.6rem;
320
+ width: 78%;
321
+ height: 3rem;
322
+ border-radius: 0.6rem;
323
+ }
324
+
325
+ .skel-owner {
326
+ display: flex;
327
+ align-items: center;
328
+ gap: 0.8rem;
329
+ margin-top: 1.2rem;
330
+ }
331
+
332
+ .skel-avatar {
333
+ flex: none;
334
+ width: 2.4rem;
335
+ height: 2.4rem;
336
+ border-radius: 50%;
337
+ }
338
+
339
+ .skel-owner-name {
340
+ width: 12rem;
341
+ }
342
+
343
+ .skel-stats {
344
+ margin-top: 0.4rem;
345
+ width: 56%;
346
+ height: 1.8rem;
347
+ }
348
+
349
+ .skel-desc {
350
+ display: flex;
351
+ flex-direction: column;
352
+ gap: 0.6rem;
353
+ margin-top: 1.2rem;
354
+ }
355
+
356
+ .skel-desc-short {
357
+ width: 68%;
358
+ }
359
+
360
+ .skel-actions {
361
+ display: flex;
362
+ align-items: center;
363
+ gap: 0.8rem;
364
+ margin-top: 1.6rem;
365
+ }
366
+
367
+ .skel-pill {
368
+ width: 10.6rem;
369
+ height: 3.6rem;
370
+ border-radius: 1.8rem;
371
+ }
372
+
373
+ .skel-round {
374
+ flex: none;
375
+ width: 3.6rem;
376
+ height: 3.6rem;
377
+ border-radius: 50%;
378
+ }
379
+
380
+ @keyframes playlist-side-pulse {
381
+ 0%,
382
+ 100% {
383
+ opacity: 1;
384
+ }
385
+
386
+ 50% {
387
+ opacity: 0.55;
388
+ }
389
+ }
390
+
391
+ .rows {
392
+ display: flex;
393
+ flex-direction: column;
394
+ gap: 0.8rem;
395
+ }
396
+
397
+ .row,
398
+ .row-skeleton {
399
+ display: flex;
400
+ align-items: center;
401
+ gap: 0.8rem;
402
+ padding: 0.4rem;
403
+ border-radius: 0.8rem;
404
+ }
405
+
406
+ .row {
407
+ transition: background 0.15s ease;
408
+ }
409
+
410
+ .row:hover {
411
+ background: var(--bg-hover);
412
+ }
413
+
414
+ .row.playing {
415
+ background: var(--bg-selected);
416
+ }
417
+
418
+ .number {
419
+ flex: none;
420
+ width: 2.4rem;
421
+ text-align: center;
422
+ font-size: 1.2rem;
423
+ color: var(--text-tertiary);
424
+ }
425
+
426
+ .card {
427
+ flex: 1;
428
+ min-width: 0;
429
+ }
430
+
431
+ /* youtube.com's playlist rows keep their ⋮ up without a hover, where the other compact rows show it on hover */
432
+ .card .more {
433
+ opacity: 1;
434
+ }
435
+
436
+ .remove {
437
+ flex: none;
438
+ width: 2.4rem;
439
+ height: 2.4rem;
440
+ display: flex;
441
+ align-items: center;
442
+ justify-content: center;
443
+ border: none;
444
+ border-radius: 50%;
445
+ background: transparent;
446
+ color: var(--text-primary);
447
+ cursor: pointer;
448
+ opacity: 0;
449
+ transition: background 0.15s ease, opacity 0.15s ease;
450
+ }
451
+
452
+ .row:hover .remove,
453
+ .remove:focus-visible {
454
+ opacity: 1;
455
+ }
456
+
457
+ .remove:hover {
458
+ background: var(--bg-hover);
459
+ }
460
+
461
+ .remove:disabled {
462
+ cursor: default;
463
+ }
464
+
465
+ .notice {
466
+ padding: 2.4rem 0;
467
+ font-size: 1.4rem;
468
+ color: var(--text-secondary);
469
+ text-align: center;
470
+ }
471
+
472
+ .prompt {
473
+ max-width: 56rem;
474
+ margin: 4.8rem auto 0;
475
+ padding: 2.4rem;
476
+ border-radius: 1.2rem;
477
+ background: var(--bg-subtle);
478
+ text-align: center;
479
+ }
480
+
481
+ .prompt h2 {
482
+ margin: 0;
483
+ font-size: 2rem;
484
+ font-weight: 700;
485
+ color: var(--text-primary);
486
+ }
487
+
488
+ .sign-in {
489
+ display: inline-flex;
490
+ align-items: center;
491
+ gap: 0.8rem;
492
+ height: 3.6rem;
493
+ margin-top: 1.6rem;
494
+ padding: 0 1.5rem;
495
+ border: 1px solid var(--border-strong);
496
+ border-radius: 1.8rem;
497
+ background: transparent;
498
+ color: var(--accent);
499
+ font-size: 1.4rem;
500
+ font-weight: 500;
501
+ cursor: pointer;
502
+ transition: background 0.15s ease, border-color 0.15s ease;
503
+ }
504
+
505
+ .sign-in:hover {
506
+ background: var(--accent-hover);
507
+ border-color: transparent;
508
+ }
509
+
510
+ @media (max-width: 1000px) {
511
+ .layout {
512
+ grid-template-columns: minmax(0, 1fr);
513
+ }
514
+
515
+ /* Relative rather than static so the absolute ambient backdrop stays clipped inside .side. */
516
+ .side {
517
+ position: relative;
518
+ top: auto;
519
+ }
520
+ }
521
+ `,M=({description:e})=>{let t=s(()=>O(e),[e]),[n,r]=l(!1),[i,a]=l(!1),c=d(null);return o(()=>{let e=c.current;if(n||!e)return;let t=()=>a(e.scrollHeight>e.clientHeight+1);t(),document.fonts.ready.then(t);let r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[n,e]),t.length===0?null:h(`div`,{className:`description-wrap`,children:[y(`div`,{ref:c,className:n?`description`:`description clamped`,children:y(D,{runs:t})}),n||i?y(`button`,{type:`button`,className:`description-toggle`,"aria-expanded":n,onClick:()=>r(e=>!e),children:n?`Show less`:`...more`}):void 0]})},N=()=>h(`div`,{className:`side-skeleton`,"aria-hidden":`true`,children:[y(`div`,{className:`cover`}),y(`div`,{className:`skel-bar skel-title`}),h(`div`,{className:`skel-owner`,children:[y(`div`,{className:`skel-avatar`}),y(`div`,{className:`skel-bar skel-owner-name`})]}),y(`div`,{className:`skel-bar skel-stats`}),h(`div`,{className:`skel-desc`,children:[y(`div`,{className:`skel-bar`}),y(`div`,{className:`skel-bar`}),y(`div`,{className:`skel-bar skel-desc-short`})]}),h(`div`,{className:`skel-actions`,children:[y(`div`,{className:`skel-pill`}),y(`div`,{className:`skel-pill`}),y(`div`,{className:`skel-round`})]})]}),P=()=>{let o=new URLSearchParams(ee()),s=o.get(`list`)??``,u=o.get(`index`),d=u!==null&&/^\d+$/.test(u)?Number(u):void 0,[,_]=f(),[v,D]=l({id:s,pages:[]}),O=v.id===s?v.pages:[],P=s===`WL`||s===`LL`,{ready:F,signedIn:I}=g(),L=P&&F&&!I,[{data:R,error:z,fetching:B},V]=te({query:ce,variables:{id:s,cursor:O[O.length-1]?.cursor},pause:s.length===0||P&&(!F||!I)}),[,H]=p(le),[U,ue]=l(()=>new Set),[W,G]=l([]),K=z?.graphQLErrors.find(t=>t.message.startsWith(e)),q=R?.playlist,{items:de,cursor:fe}=re({pages:q?[...O,q]:O,key:A}),J=q?.playlist??O[0]?.playlist;ie(J?.title??`Playlist`);let Y=!J&&!z&&(B||!R),X=!!J?.thumbnail,Z=de.filter(e=>!e.setVideoId||!U.has(e.setVideoId)),Q=Z[0],pe=()=>{!q?.cursor||B||z||D({id:s,pages:O[O.length-1]===q?O:[...O,q]})},me=e=>{W.includes(e)||(G(t=>[...t,e]),H({playlistId:s,setVideoIds:[e]}).then(t=>{if(G(t=>t.filter(t=>t!==e)),t.error){m(T(t.error));return}ue(t=>new Set(t).add(e)),m(`Removed from playlist`)}))},he=()=>{let e=navigator.clipboard;if(!e){m(`Could not copy the link`);return}e.writeText(`${location.origin}${C(s)}`).then(()=>m(`Link copied to clipboard`),()=>m(`Could not copy the link`))},ge=()=>{let e=Z[Math.floor(Math.random()*Z.length)];e&&(se(!0),_(E(e.video.id,{list:s,index:e.index??void 0})))};if(s.length===0)return y(`main`,{css:j,children:y(`div`,{className:`prompt`,children:y(`h2`,{children:`No playlist selected`})})});if(L)return y(`main`,{css:j,children:h(`div`,{className:`prompt`,children:[h(`h2`,{children:[`Sign in to see `,s===`WL`?`Watch later`:`Liked videos`]}),h(`button`,{type:`button`,className:`sign-in`,onClick:b,children:[y(r,{size:24,strokeWidth:1.5}),`Sign in`]})]})});let $=[J?.videoCountText,J?.viewCountText,J?.updatedText].filter(e=>e!=null&&e!==``).join(` • `);return y(`main`,{css:j,children:h(`div`,{className:`layout`,children:[h(`aside`,{className:X?`side ambient`:`side`,children:[J?.thumbnail?y(`div`,{className:`ambient-backdrop`,"aria-hidden":`true`,children:y(`img`,{src:J.thumbnail,alt:``})}):void 0,y(`div`,{className:`side-content`,children:Y?y(N,{}):h(ne,{children:[y(`div`,{className:`cover`,children:J?.thumbnail?y(`img`,{src:J.thumbnail,alt:``}):y(`span`,{className:`cover-fallback`,children:y(t,{size:48,strokeWidth:1.5})})}),y(`h1`,{className:`heading`,children:J?.title??`Playlist`}),J?.channel?h(x,{href:`/channel/${J.channel.id}`,className:`owner`,children:[y(`span`,{className:J.channel.avatar?`avatar`:`avatar fallback`,children:J.channel.avatar?y(`img`,{src:J.channel.avatar,alt:``,loading:`lazy`}):J.channel.name.slice(0,1).toUpperCase()}),y(`span`,{className:`owner-name`,children:J.channel.name})]}):void 0,$?y(`div`,{className:`stats`,children:$}):void 0,J?.description?y(M,{description:J.description},s):void 0,h(`div`,{className:`actions`,children:[Q?h(x,{href:E(Q.video.id,{list:s,index:Q.index??void 0}),className:`pill`,children:[y(i,{size:20,strokeWidth:1.5,fill:`currentColor`}),`Play all`]}):void 0,Z.length>1?h(`button`,{type:`button`,className:`pill secondary`,onClick:ge,children:[y(a,{size:20,strokeWidth:1.5}),`Shuffle`]}):void 0,y(`button`,{type:`button`,className:`round`,"aria-label":`Share`,title:`Share`,onClick:he,children:y(n,{size:20,strokeWidth:1.5})})]})]})})]}),h(`div`,{children:[K?y(`p`,{className:`notice`,children:K.message.slice(e.length)}):void 0,h(`div`,{className:`rows`,children:[Z.map((e,t)=>{let n=e.index??t+1,r=e.setVideoId;return h(`div`,{className:n===d?`row playing`:`row`,"aria-current":n===d?`true`:void 0,children:[y(`span`,{className:`number`,"aria-hidden":`true`,children:t+1}),y(`div`,{className:`card`,children:y(oe,{video:e.video,context:{list:s,index:n}})}),J?.isEditable===!0&&r?y(`button`,{type:`button`,className:`remove`,"aria-label":`Remove ${e.video.title} from this playlist`,disabled:W.includes(r),onClick:()=>me(r),children:y(c,{size:16,strokeWidth:1.5})}):void 0]},A(e))}),(Y||B)&&Z.length===0?Array.from({length:k},(e,t)=>h(`div`,{className:`row-skeleton`,"aria-hidden":`true`,children:[y(`span`,{className:`number`}),y(`div`,{className:`card`,children:y(ae,{})})]},t)):void 0]}),R&&!B&&!z&&Z.length===0?y(`div`,{className:`prompt`,children:y(`h2`,{children:`Nothing in this playlist`})}):void 0,B&&Z.length>0?y(`p`,{className:`notice`,children:`Loading more…`}):void 0,z&&!K&&!B?y(w,{error:z,reexecute:V}):void 0,y(S,{onVisible:pe,disabled:B||!!z||!fe})]})]})})};export{P as default};
@@ -0,0 +1,91 @@
1
+ import{$ as e}from"./icons-DKsqNLSs.js";import{c as t,ot as n,s as r,y as i}from"./sign-in-Bx3zmj-m.js";import{I as a,R as o,in as s}from"./cards-Csel8naI.js";var c=n`
2
+ display: flex;
3
+ flex-direction: column;
4
+ min-width: 0;
5
+
6
+ .cover-stack {
7
+ position: relative;
8
+ padding-top: 0.6rem;
9
+ }
10
+
11
+ .cover-stack::before {
12
+ content: '';
13
+ position: absolute;
14
+ top: 0;
15
+ left: 1.2rem;
16
+ right: 1.2rem;
17
+ height: 1.4rem;
18
+ border-radius: 0.8rem 0.8rem 0 0;
19
+ background: var(--bg-chip-hover);
20
+ opacity: 0.55;
21
+ }
22
+
23
+ .cover {
24
+ position: relative;
25
+ aspect-ratio: 16 / 9;
26
+ border-radius: 1.2rem;
27
+ overflow: hidden;
28
+ background: var(--bg-elevated);
29
+ }
30
+
31
+ .cover img {
32
+ display: block;
33
+ width: 100%;
34
+ height: 100%;
35
+ object-fit: cover;
36
+ }
37
+
38
+ .cover-fallback {
39
+ display: flex;
40
+ align-items: center;
41
+ justify-content: center;
42
+ width: 100%;
43
+ height: 100%;
44
+ color: var(--text-tertiary);
45
+ }
46
+
47
+ .count {
48
+ position: absolute;
49
+ right: 0.6rem;
50
+ bottom: 0.6rem;
51
+ display: flex;
52
+ align-items: center;
53
+ gap: 0.4rem;
54
+ padding: 0.1rem 0.4rem;
55
+ border-radius: 0.4rem;
56
+ background: var(--bg-badge);
57
+ color: var(--text-on-media);
58
+ font-size: 1.2rem;
59
+ font-weight: 500;
60
+ line-height: 1.8rem;
61
+ }
62
+
63
+ .card-title {
64
+ margin: 1.2rem 0 0;
65
+ font-size: 1.6rem;
66
+ font-weight: 500;
67
+ line-height: 2.2rem;
68
+ color: var(--text-primary);
69
+ display: -webkit-box;
70
+ -webkit-line-clamp: 2;
71
+ -webkit-box-orient: vertical;
72
+ overflow: hidden;
73
+ }
74
+
75
+ .card-meta {
76
+ display: flex;
77
+ align-items: center;
78
+ gap: 0.4rem;
79
+ margin-top: 0.4rem;
80
+ font-size: 1.4rem;
81
+ color: var(--text-secondary);
82
+ }
83
+
84
+ .card-meta svg {
85
+ flex: none;
86
+ }
87
+
88
+ &:hover .card-meta {
89
+ color: var(--text-primary);
90
+ }
91
+ `,l=({id:n,title:l,thumbnail:u,videoCountText:d,updatedText:f,privacy:p,channelName:m,fallbackIcon:h})=>{let g=o(p),_=[m,f].filter(e=>e!=null&&e!==``);return t(i,{href:a(n),css:c,className:`card`,children:[r(`div`,{className:`cover-stack`,children:t(`div`,{className:`cover`,children:[u?r(s,{src:u}):r(`span`,{className:`cover-fallback`,children:r(h||e,{size:40,strokeWidth:1.5})}),d?t(`span`,{className:`count`,children:[r(e,{size:14,strokeWidth:1.5}),d]}):void 0]})}),r(`h3`,{className:`card-title`,children:l}),t(`div`,{className:`card-meta`,children:[g?r(g,{size:14,strokeWidth:1.5}):void 0,r(`span`,{children:_.length>0?_.join(` • `):`View full playlist`})]})]})};export{l as t};