@banou/stub 0.0.51 → 0.0.53
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/LICENSE +21 -0
- package/README.md +22 -27
- package/build/assets/{embed-CV2x4LBa.js → embed-DOZMBs0N.js} +2 -9
- package/build/assets/{index-qhMrnlXc.js → index-B8gPouDs.js} +253 -256
- package/build/assets/{lib-worker-fbrqP6pm.js → lib-worker-D7ltCEvc.js} +1 -1
- package/build/assets/{lib-worker-CvSIFpg3.js → lib-worker-DZgpvc1s.js} +1 -1
- package/build/assets/lib-worker-index-1ZMF_r_h.js +2450 -0
- package/build/assets/main-BszJRFw8.js +4507 -0
- package/build/assets/{worker-CpMTiYu3.js → worker-BJsKc37z.js} +1 -1
- package/build/assets/{worker-CrS-zxdF.js → worker-qLAlm6Pb.js} +1 -1
- package/build/embed.html +1 -1
- package/build/index.html +2 -2
- package/build/index.js +3896 -3619
- package/fkn.json +1 -1
- package/package.json +14 -3
- package/store/background.webp +0 -0
- package/store/cover.webp +0 -0
- package/store/home.webp +0 -0
- package/store/search.webp +0 -0
- package/store/season.webp +0 -0
- package/store/sources.webp +0 -0
- package/store/title.webp +0 -0
- package/build/assets/lib-worker-index-CQP5MZBp.js +0 -2453
- package/build/assets/main-CAdIiP_g.js +0 -4440
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Banou
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,36 +1,31 @@
|
|
|
1
1
|
# Stub
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
carries its requests to each site, installs the sources you add and holds the rooms for watch
|
|
8
|
-
parties, so stub has no server of its own.
|
|
3
|
+
Anime, shows and movies in one place. stub gathers the sites you would otherwise check one by one into
|
|
4
|
+
a single page per title, then plays and tracks it on your own accounts. It runs on the
|
|
5
|
+
[FKN platform](https://fkn.app), which carries its requests, installs the sources you add and holds the
|
|
6
|
+
rooms for watch parties, so stub has no server of its own.
|
|
9
7
|
|
|
10
8
|
- Live at [anime.fkn.app](https://anime.fkn.app), and inside FKN at
|
|
11
9
|
[fkn.app/app/npm:@banou/stub](https://fkn.app/app/npm:@banou/stub)
|
|
12
10
|
- Published on npm as [`@banou/stub`](https://www.npmjs.com/package/@banou/stub)
|
|
13
11
|
|
|
14
|
-
##
|
|
15
|
-
|
|
16
|
-
- **
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
and
|
|
23
|
-
- **
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- **
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
host's, and the party has a chat.
|
|
32
|
-
- **Search.** Search every source at once from the header, or narrow it on the search page by
|
|
33
|
-
category, format, status, season, year, genre and tag, shown as covers, cards or a list.
|
|
12
|
+
## Features
|
|
13
|
+
|
|
14
|
+
- **One page per title.** AniList, MyAnimeList, Kitsu, LiveChart, TMDB, TVmaze, IMDb, Trakt, Simkl,
|
|
15
|
+
TheTVDB and more are merged into one page: episodes, trailers, scores, related titles and every
|
|
16
|
+
place to watch it.
|
|
17
|
+
- **Search everything at once**, or browse a season by genre, tag, format, status and year, shown as
|
|
18
|
+
covers, cards or a list.
|
|
19
|
+
- **Watch on your own accounts.** Crunchyroll plays in stub's own player on your Crunchyroll account,
|
|
20
|
+
Netflix through the FKN browser extension, and your volume carries over from one episode to the next.
|
|
21
|
+
- **Movies get a page of their own**, with the runtime, the release date and one Play button.
|
|
22
|
+
- **Track as you watch.** One row updates AniList, MyAnimeList and stub's own list together; hover a
|
|
23
|
+
tracker to change just that one. A movie is a single Watched button.
|
|
24
|
+
- **Watch together.** Share a party link and every guest's player follows the host's, with a chat.
|
|
25
|
+
- **Your sources, your way.** Turn any built-in source off in Settings, or add community sources
|
|
26
|
+
published on npm, each running isolated from stub.
|
|
27
|
+
- **No API keys, no stub account, no analytics.** Your settings stay in your browser, and your list
|
|
28
|
+
can live in your FKN account, encrypted in your browser before it leaves.
|
|
34
29
|
|
|
35
30
|
## How it is built
|
|
36
31
|
|
|
@@ -104,7 +99,7 @@ MyAnimeList are kept by FKN, or by your browser with the FKN extension, never by
|
|
|
104
99
|
|
|
105
100
|
## License
|
|
106
101
|
|
|
107
|
-
MIT,
|
|
102
|
+
MIT, see [LICENSE](./LICENSE).
|
|
108
103
|
|
|
109
104
|
<!--
|
|
110
105
|
|
|
@@ -1416,13 +1416,6 @@ ${Iy}
|
|
|
1416
1416
|
}
|
|
1417
1417
|
}
|
|
1418
1418
|
|
|
1419
|
-
.login-note {
|
|
1420
|
-
max-width: 36rem;
|
|
1421
|
-
font-size: 1.2rem;
|
|
1422
|
-
text-align: center;
|
|
1423
|
-
color: rgba(255, 255, 255, 0.6);
|
|
1424
|
-
}
|
|
1425
|
-
|
|
1426
1419
|
/* @banou/media-player's own buffering spinner (overlay.tsx), same box and centre, so when the video
|
|
1427
1420
|
arrives still buffering the player's spinner takes over from this one without a jump */
|
|
1428
1421
|
.loading-spinner {
|
|
@@ -1434,7 +1427,7 @@ ${Iy}
|
|
|
1434
1427
|
border-top-color: #fff;
|
|
1435
1428
|
animation: ${Vx} 0.8s linear infinite;
|
|
1436
1429
|
}
|
|
1437
|
-
`,Ux=({url:e,title:t})=>{let[n,r]=M(`detecting`),[i,a]=M(null),[o,s]=M(null),[c,l]=M(!0),[u,d]=M(!1),[f,p]=M(),[m,v]=M(null),[y,b]=M(0),[x,S]=M(0),[w,T]=M(!1),[E,D]=M(!1),A=O(null),j=O(null),[ee,ne]=M(!1),N=O(!1),[I,re]=M(),[ie,ae]=M(),R=Lx(e,m),z=mx(o,m,i),se=O(0),de=O({generation:0,tail:Promise.resolve()}),pe=O(!0),me=k(()=>{let e=se.current+1;return se.current=e,de.current={generation:e,tail:Promise.resolve()},re(void 0),e},[]),he=k((e,t)=>{if(de.current.generation!==e)return Promise.reject(Error(`Crunchyroll track operation cancelled`));let n=de.current,r=n.tail.then(t);return n.tail=r.then(()=>{},()=>{}),r},[]);g(()=>()=>{pe.current=!1,se.current+=1},[]),g(()=>{let e=!1;return fe().then(t=>{e||r(t)}),()=>{e=!0}},[]),g(()=>{if(!i||n===`detecting`)return;let e=!1;return le({iframe:i,domains:C,cookies:ue(n),permissions:[{category:`evaluation`,reason:`Switch audio and subtitles, seek the video, show seek thumbnails and open picture in picture`}]}).then(t=>{e||s(t)}).catch(t=>{e||(console.error(`Failed to attach Crunchyroll frame`,t),p(t?.message||`Failed to load player`),l(!1))}),()=>{e=!0}},[i,n]),g(()=>{if(!o)return;let t=!1,r=()=>t;return l(!0),p(void 0),d(!1),v(null),me(),(async()=>{if(n===`cloud`){if(await o.goto(e,{waitUntil:`commit`}),t)return;let{isLoggedIn:n}=await fx(o,r);if(t)return;if(ce.record(`crunchyroll`,n?`signed-in`:`signed-out`),!n){l(!1),d(!0);return}if(await o.addStyleTag({content:Rx}),t)return;let i=await Bx(o,r);if(t)return;if(l(!1),!i)throw Error(`The episode did not load a player. It may be unavailable or require a different plan.`);v(i);return}if(await o.goto(e,{waitUntil:`commit`}),t||(await o.addStyleTag({content:Rx}),t))return;let{isLoggedIn:i}=await fx(o,r);if(t)return;if(ce.record(`crunchyroll`,i?`signed-in`:`signed-out`),!i){l(!1),d(!0);return}let a=await Bx(o,r);if(!t){if(l(!1),!a)throw Error(`The episode did not load a player. It may be unavailable or require a different plan.`);v(a)}})().catch(e=>{t||(console.error(`Failed to load Crunchyroll player`,e),p(e?.message||`Failed to load player`),l(!1))}),()=>{t=!0}},[o,e,y,n,me]),g(()=>{if(!o||!m)return;let e=me(),t=!1,n=()=>t||!pe.current||e!==se.current;return(async()=>{let t,r;for(let i=0;i<5&&!n();i+=1){try{if(r=await he(e,()=>$b(o,n)),t=void 0,n()||(re(r),r.audio&&r.subtitles))return}catch(e){t=e}await new Promise(e=>setTimeout(e,500))}if(!r&&t)throw t})().then(()=>{},e=>{n()||console.warn(`[cr] track discovery failed:`,e)}),()=>{t=!0}},[o,m,me,he]),g(()=>{if(!o||!m)return;let e=!1,t;return Ex(o).then(n=>{if(e)return n.dispose();t=n,ae(n)},t=>{e||console.warn(`[cr] seek thumbnails unavailable:`,t)}),()=>{e=!0,t?.dispose(),ae(void 0)}},[o,m]);let ge=se.current,_e=k((e,t)=>{if(!o||!m)return Promise.reject(Error(`Crunchyroll player is not ready`));let n=()=>!pe.current||ge!==se.current;return he(ge,async()=>{try{let r=await sx(o,m,e,t,n);if(n())throw Error(`Crunchyroll track operation cancelled`);re(r)}catch(e){if(!n())try{let e=await $b(o,n);n()||re(e)}catch{}throw e}})},[o,m,he,ge]),ve=P(()=>I?.subtitles&&{selection:{...I.subtitles,select:e=>_e(`subtitles`,e)}},[I?.subtitles,_e]),ye=P(()=>I?.audio&&{selection:{...I.audio,select:e=>_e(`audio`,e)}},[I?.audio,_e]),be=k(()=>{if(A.current!==null)return;let e=globalThis.open(h,`_blank`,`width=500,height=700`);if(!e){D(!0),l(!1);return}D(!1),T(!0),j.current=e;let t=setInterval(()=>{e.closed&&(clearInterval(t),A.current===t&&(A.current=null),j.current===e&&(j.current=null),T(!1),b(e=>e+1))},500);A.current=t},[]),xe=k(()=>{s(null),p(void 0),v(null),me(),d(!1),l(!0),S(e=>e+1)},[me]),Se=k(()=>{if(N.current)return;N.current=!0;let e=oe({url:h,domains:C,isSignedIn:te});D(!1),ne(!0),e.then(e=>{if(pe.current){if(e===`blocked`){D(!0);return}if(e===`unsupported`){p(`The Crunchyroll sign-in window could not be opened here.`);return}if(e===`authed`){xe();return}d(!1),l(!0),b(e=>e+1)}},e=>{pe.current&&(console.error(`Crunchyroll sign-in window failed`,e),p(e?.message||`The sign-in window failed`))}).finally(()=>{N.current=!1,pe.current&&ne(!1)})},[xe]);g(()=>()=>{A.current!==null&&(clearInterval(A.current),A.current=null)},[]),g(()=>{A.current!==null&&(clearInterval(A.current),A.current=null,T(!1)),D(!1)},[e]);let B=k(()=>{j.current!==null&&(j.current.close(),j.current=null),A.current!==null&&(clearInterval(A.current),A.current=null),D(!1),T(!1),xe()},[xe]),Ce=(c||f||E||u)&&_(`div`,{className:`overlay`,children:[u&&!f&&!E&&_(F,{children:[`You need to be logged in to Crunchyroll to watch this content.`,n===`extension`?L(`button`,{className:`login-button`,onClick:be,disabled:w,children:w?`Finish signing in the popup...`:`Open Crunchyroll Login Page`}):_(F,{children:[L(`button`,{className:`login-button`,onClick:Se,disabled:ee,children:ee?`Finish signing in the window...`:`Sign in to Crunchyroll`}),L(`span`,{className:`login-note`,children:`Sign-in happens in a window served through FKN, so your browser will not autofill saved passwords or offer passkeys there.`})]})]}),E&&!f&&_(F,{children:[`The login popup was blocked. Allow popups for this page and try again.`,L(`button`,{className:`login-button`,onClick:n===`extension`?be:Se,children:`Open Crunchyroll Login Page`})]}),f&&_(F,{children:[f,L(`button`,{className:`login-button`,onClick:B,children:`Retry`})]}),c&&!f&&!u&&L(`div`,{className:`loading-spinner`,role:`status`,"aria-label":`Loading`})]});return _(`div`,{css:Hx,children:[n!==`detecting`&&L(ux,{title:t,remote:m,frame:o,subtitles:ve,audioTracks:ye,thumbnails:ie,chapters:R,pictureInPicture:z,children:L(`iframe`,{ref:a,className:`cr-frame`,referrerPolicy:`no-referrer`,allow:`encrypted-media; autoplay; fullscreen;`},`${n}-${x}`)}),Ce]})},Wx=e=>e,Gx=Wx(({className:e,children:t})=>L(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:18,height:18,fill:`none`,"aria-hidden":`true`,className:e,children:t})),Kx=Wx(({className:e})=>L(Gx,{className:e,children:L(`path`,{fill:`currentColor`,d:`m14.051 10.723-7.985 4.964a1.98 1.98 0 0 1-2.758-.638A2.06 2.06 0 0 1 3 13.964V4.036C3 2.91 3.895 2 5 2c.377 0 .747.109 1.066.313l7.985 4.964a2.057 2.057 0 0 1 .627 2.808c-.16.257-.373.475-.627.637`})})),qx=Wx(({className:e})=>_(Gx,{className:e,children:[L(`rect`,{width:5,height:14,x:2,y:2,fill:`currentColor`,rx:1.75}),L(`rect`,{width:5,height:14,x:11,y:2,fill:`currentColor`,rx:1.75})]})),Jx=Wx(({className:e})=>_(Gx,{className:e,children:[L(`path`,{fill:`currentColor`,d:`M9 17a8 8 0 0 1-8-8h2a6 6 0 1 0 1.287-3.713l1.286 1.286A.25.25 0 0 1 5.396 7H1.25A.25.25 0 0 1 1 6.75V2.604a.25.25 0 0 1 .427-.177l1.438 1.438A8 8 0 1 1 9 17`}),L(`path`,{fill:`currentColor`,d:`m11.61 9.639-3.331 2.07a.826.826 0 0 1-1.15-.266.86.86 0 0 1-.129-.452V6.849C7 6.38 7.374 6 7.834 6c.158 0 .312.045.445.13l3.331 2.071a.858.858 0 0 1 0 1.438`})]})),Yx=Wx(({className:e})=>L(Gx,{className:e,children:L(`path`,{fill:`currentColor`,d:`M1 9c0 2.21.895 4.21 2.343 5.657l1.414-1.414a6 6 0 1 1 8.956-7.956l-1.286 1.286a.25.25 0 0 0 .177.427h4.146a.25.25 0 0 0 .25-.25V2.604a.25.25 0 0 0-.427-.177l-1.438 1.438A8 8 0 0 0 1 9`})})),Xx=Wx(({className:e})=>L(Gx,{className:e,children:L(`path`,{fill:`currentColor`,d:`M.714 6.008h3.072l4.071-3.857c.5-.376 1.143 0 1.143.601V15.28c0 .602-.643.903-1.143.602l-4.071-3.858H.714c-.428 0-.714-.3-.714-.752V6.76c0-.451.286-.752.714-.752M14.5 7.586l-1.768-1.768a1 1 0 1 0-1.414 1.414L13.085 9l-1.767 1.768a1 1 0 0 0 1.414 1.414l1.768-1.768 1.768 1.768a1 1 0 0 0 1.414-1.414L15.914 9l1.768-1.768a1 1 0 0 0-1.414-1.414z`})})),Zx=Wx(({className:e})=>L(Gx,{className:e,children:L(`path`,{fill:`currentColor`,d:`M.714 6.008h3.072l4.071-3.857c.5-.376 1.143 0 1.143.601V15.28c0 .602-.643.903-1.143.602l-4.071-3.858H.714c-.428 0-.714-.3-.714-.752V6.76c0-.451.286-.752.714-.752m10.568.59a.91.91 0 0 1 0-1.316.91.91 0 0 1 1.316 0c1.203 1.203 1.47 2.216 1.522 3.208q.012.255.011.51c0 1.16-.358 2.733-1.533 3.803a.7.7 0 0 1-.298.156c-.382.106-.873-.011-1.018-.156a.91.91 0 0 1 0-1.316c.57-.57.995-1.551.995-2.487 0-.944-.26-1.667-.995-2.402`})})),Qx=Wx(({className:e})=>_(Gx,{className:e,children:[L(`path`,{fill:`currentColor`,d:`M15.6 3.3c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4C15.4 5.9 16 7.4 16 9s-.6 3.1-1.8 4.3c-.4.4-.4 1 0 1.4.2.2.5.3.7.3.3 0 .5-.1.7-.3C17.1 13.2 18 11.2 18 9s-.9-4.2-2.4-5.7`}),L(`path`,{fill:`currentColor`,d:`M.714 6.008h3.072l4.071-3.857c.5-.376 1.143 0 1.143.601V15.28c0 .602-.643.903-1.143.602l-4.071-3.858H.714c-.428 0-.714-.3-.714-.752V6.76c0-.451.286-.752.714-.752m10.568.59a.91.91 0 0 1 0-1.316.91.91 0 0 1 1.316 0c1.203 1.203 1.47 2.216 1.522 3.208q.012.255.011.51c0 1.16-.358 2.733-1.533 3.803a.7.7 0 0 1-.298.156c-.382.106-.873-.011-1.018-.156a.91.91 0 0 1 0-1.316c.57-.57.995-1.551.995-2.487 0-.944-.26-1.667-.995-2.402`})]})),$x=Wx(({className:e})=>L(Gx,{className:e,children:L(`path`,{fill:`currentColor`,d:`M9.57 3.617A1 1 0 0 0 8.646 3H4c-.552 0-1 .449-1 1v4.646a.996.996 0 0 0 1.001 1 1 1 0 0 0 .706-.293l4.647-4.647a1 1 0 0 0 .216-1.089m4.812 4.812a1 1 0 0 0-1.089.217l-4.647 4.647a.998.998 0 0 0 .708 1.706H14c.552 0 1-.449 1-1V9.353a1 1 0 0 0-.618-.924`})})),eS=Wx(({className:e})=>L(Gx,{className:e,children:L(`path`,{fill:`currentColor`,d:`M7.883 1.93a.99.99 0 0 0-1.09.217L2.146 6.793A.998.998 0 0 0 2.853 8.5H7.5c.551 0 1-.449 1-1V2.854a1 1 0 0 0-.617-.924m7.263 7.57H10.5c-.551 0-1 .449-1 1v4.646a.996.996 0 0 0 1.001 1.001 1 1 0 0 0 .706-.293l4.646-4.646a.998.998 0 0 0-.707-1.707z`})})),tS=Wx(({className:e})=>_(Gx,{className:e,children:[L(`path`,{fill:`currentColor`,d:`M13 2a4 4 0 0 1 4 4v2.035A3.5 3.5 0 0 0 16.5 8H15V6.273C15 5.018 13.96 4 12.679 4H4.32C3.04 4 2 5.018 2 6.273v5.454C2 12.982 3.04 14 4.321 14H6v1.5q0 .255.035.5H4a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4z`}),L(`rect`,{width:10,height:7,x:8,y:10,fill:`currentColor`,rx:2}),L(`path`,{fill:`currentColor`,d:`M7.129 5.547a.6.6 0 0 0-.656.13L3.677 8.473A.6.6 0 0 0 4.102 9.5h2.796c.332 0 .602-.27.602-.602V6.103a.6.6 0 0 0-.371-.556`})]})),nS=Wx(({className:e})=>_(Gx,{className:e,children:[L(`path`,{fill:`currentColor`,d:`M13 2a4 4 0 0 1 4 4v2.036A3.5 3.5 0 0 0 16.5 8H15V6.273C15 5.018 13.96 4 12.679 4H4.32C3.04 4 2 5.018 2 6.273v5.454C2 12.982 3.04 14 4.321 14H6v1.5q0 .255.036.5H4a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4z`}),L(`rect`,{width:10,height:7,x:8,y:10,fill:`currentColor`,rx:2}),L(`path`,{fill:`currentColor`,d:`M4.871 10.454a.6.6 0 0 0 .656-.131l2.796-2.796A.6.6 0 0 0 7.898 6.5H5.102a.603.603 0 0 0-.602.602v2.795a.6.6 0 0 0 .371.556`})]})),rS=Wx(({className:e})=>L(Gx,{className:e,children:L(`path`,{fill:`currentColor`,d:`M15 2a3 3 0 0 1 3 3v8a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V5a3 3 0 0 1 3-3zM4 11a1 1 0 1 0 0 2h5a1 1 0 1 0 0-2zm8 0a1 1 0 1 0 0 2h2a1 1 0 1 0 0-2zM4 8a1 1 0 0 0 0 2h1a1 1 0 0 0 0-2zm4 0a1 1 0 0 0 0 2h3a1 1 0 1 0 0-2zm6 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2`})})),iS=Wx(({className:e})=>_(Gx,{className:e,children:[L(`rect`,{width:16,height:12,x:1,y:3,stroke:`currentColor`,strokeWidth:2,rx:3}),L(`rect`,{width:3,height:2,x:3,y:8,fill:`currentColor`,rx:1}),L(`rect`,{width:2,height:2,x:13,y:8,fill:`currentColor`,rx:1}),L(`rect`,{width:4,height:2,x:11,y:11,fill:`currentColor`,rx:1}),L(`rect`,{width:5,height:2,x:7,y:8,fill:`currentColor`,rx:1}),L(`rect`,{width:7,height:2,x:3,y:11,fill:`currentColor`,rx:1})]})),aS=Wx(({className:e})=>L(Gx,{className:e,children:_(`g`,{fill:`currentColor`,children:[L(`rect`,{width:2,height:5,x:8,y:.5,opacity:.5,rx:1,children:L(`animate`,{attributeName:`opacity`,begin:`0s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),L(`rect`,{width:2,height:5,x:12.243,y:2.257,opacity:.45,rx:1,transform:`rotate(45 13.243 4.757)`,children:L(`animate`,{attributeName:`opacity`,begin:`0.125s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),L(`rect`,{width:5,height:2,x:12.5,y:8,opacity:.4,rx:1,children:L(`animate`,{attributeName:`opacity`,begin:`0.25s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),L(`rect`,{width:5,height:2,x:10.743,y:12.243,opacity:.35,rx:1,transform:`rotate(45 13.243 13.243)`,children:L(`animate`,{attributeName:`opacity`,begin:`0.375s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),L(`rect`,{width:2,height:5,x:8,y:12.5,opacity:.3,rx:1,children:L(`animate`,{attributeName:`opacity`,begin:`0.5s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),L(`rect`,{width:2,height:5,x:3.757,y:10.743,opacity:.25,rx:1,transform:`rotate(45 4.757 13.243)`,children:L(`animate`,{attributeName:`opacity`,begin:`0.625s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),L(`rect`,{width:5,height:2,x:.5,y:8,opacity:.15,rx:1,children:L(`animate`,{attributeName:`opacity`,begin:`0.75s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),L(`rect`,{width:5,height:2,x:2.257,y:3.757,opacity:.1,rx:1,transform:`rotate(45 4.757 4.757)`,children:L(`animate`,{attributeName:`opacity`,begin:`0.875s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})})]})})),oS=Wx(({className:e})=>L(Gx,{className:e,children:L(`path`,{fill:`currentColor`,d:`M9 2a1 1 0 0 1 1 1v12a1 1 0 1 1-2 0V3a1 1 0 0 1 1-1zm4 3a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V6a1 1 0 0 1 1-1zM5 5a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V6a1 1 0 0 1 1-1zm8 4a1 1 0 0 1 1 1v1a1 1 0 1 1-2 0v-1a1 1 0 0 1 1-1zM5 9a1 1 0 0 1 1 1v1a1 1 0 1 1-2 0v-1a1 1 0 0 1 1-1z`})})),sS=Wx(({className:e})=>L(Gx,{className:e,children:L(`path`,{fill:`currentColor`,d:`M3 5a1 1 0 0 1 1-1h10a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1zm0 4a1 1 0 0 1 1-1h10a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1zm1 3a1 1 0 1 0 0 2h6a1 1 0 1 0 0-2H4z`})})),cS=Wx(({className:e})=>L(Gx,{className:e,children:L(`path`,{fill:`currentColor`,d:`M14.53 4.53a.75.75 0 0 0-1.06-1.06L7 9.94 4.53 7.47a.75.75 0 0 0-1.06 1.06l3 3a.75.75 0 0 0 1.06 0l7-7z`})}));v();var lS=10,$=e=>e,uS=$(Dh.Root),dS=$(bh),fS=$(Fh.Root),pS=$(yh.Popup),mS=$(yh.Title),hS=$(yh.Close),gS=$(Fh.Description),_S=$(Fg.Provider),vS=$(Fg.Root),yS=$(Fg.Trigger),bS=$(Fg.Popup),xS=$(ng.Root),SS=$(ng.Trigger),CS=$(ng.Popup),wS=$(Kh),TS=$(rg),ES=$(Wh),DS=$(Gh),OS=$(Ih),kS=$(qh),AS=$(bg.Value),jS=$(Cg.Root),MS=$(gg.Track),NS=$(gg.Fill),PS=$(gg.Buffer),FS=$(gg.Thumb),IS=$(gg.Value),LS=$(Rg.Root),RS=$(Hh),zS=$(Rh),BS=$(Wf),VS=({className:e,...t})=>L(`button`,{type:`button`,className:`media-button media-button--subtle media-button--icon${e?` ${e}`:``}`,...t}),HS=({selection:e,icon:t})=>{let[n,r]=M(!1),[i,a]=M(!1),[o,s]=M(!1);g(()=>s(!1),[e.selectedId]);let c=[...e.offLabel?[{id:null,label:e.offLabel}]:[],...e.options],l=t=>{if(t===e.selectedId){r(!1);return}s(!1),a(!0),Promise.resolve().then(()=>e.onSelect(t)).then(()=>r(!1)).catch(t=>{console.warn(`[player] ${e.label} selection failed:`,t),s(!0)}).finally(()=>a(!1))};return _(xS,{open:n,onOpenChange:e=>r(e),children:[L(SS,{render:L(VS,{className:`media-button--menu${o?` media-button--error`:``}`,"aria-label":e.label}),children:t}),L(CS,{className:`media-surface media-popover media-popover--menu`,children:_(`div`,{className:`stub-menu`,role:`menu`,"aria-label":e.label,children:[L(`div`,{className:`stub-menu__heading`,children:e.label}),c.map(t=>{let n=t.id===e.selectedId;return _(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":n,className:`stub-menu__item${n?` stub-menu__item--active`:``}`,disabled:i||`disabled`in t&&t.disabled,onClick:()=>l(t.id),children:[L(`span`,{className:`stub-menu__check`,children:n?L(cS,{className:`media-icon`}):null}),L(`span`,{className:`stub-menu__label`,children:t.label}),`description`in t&&t.description?L(`span`,{className:`stub-menu__description`,children:t.description}):null]},t.id??`__off__`)})]})})]})},US=()=>_(xS,{openOnHover:!0,delay:200,closeDelay:100,side:`top`,children:[L(SS,{render:_(ES,{className:`media-button--mute`,render:L(VS,{}),children:[L(Xx,{className:`media-icon media-icon--volume-off`}),L(Zx,{className:`media-icon media-icon--volume-low`}),L(Qx,{className:`media-icon media-icon--volume-high`})]})}),L(CS,{className:`media-surface media-popover media-popover--volume`,children:_(LS,{className:`media-slider`,orientation:`vertical`,thumbAlignment:`edge`,children:[L(MS,{className:`media-slider__track`,children:L(NS,{className:`media-slider__fill`})}),L(FS,{className:`media-slider__thumb media-slider__thumb--persistent`})]})})]}),WS=({capabilities:e,children:t,className:n,...r})=>_(BS,{className:`media-default-skin media-default-skin--video${n?` ${n}`:``}`,...r,children:[t,L(dS,{render:e=>L(`div`,{...e,className:`media-buffering-indicator`,children:L(`div`,{className:`media-surface`,children:L(aS,{className:`media-icon`})})})}),L(fS,{children:L(pS,{className:`media-error`,children:_(`div`,{className:`media-error__dialog media-surface`,children:[_(`div`,{className:`media-error__content`,children:[L(mS,{className:`media-error__title`,children:`Something went wrong.`}),L(gS,{className:`media-error__description`})]}),L(`div`,{className:`media-error__actions`,children:L(hS,{className:`media-button media-button--primary`,children:`OK`})})]})})}),L(uS,{className:`media-surface media-controls`,children:_(_S,{children:[_(`div`,{className:`media-button-group`,children:[_(vS,{side:`top`,children:[L(yS,{render:_(wS,{className:`media-button--play`,render:L(VS,{}),children:[L(Jx,{className:`media-icon media-icon--restart`}),L(Kx,{className:`media-icon media-icon--play`}),L(qx,{className:`media-icon media-icon--pause`})]})}),L(bS,{className:`media-surface media-tooltip`})]}),_(vS,{side:`top`,children:[L(yS,{render:L(TS,{seconds:-10,className:`media-button--seek`,render:L(VS,{}),children:_(`span`,{className:`media-icon__container`,children:[L(Yx,{className:`media-icon media-icon--seek media-icon--flipped`}),L(`span`,{className:`media-icon__label`,children:lS})]})})}),_(bS,{className:`media-surface media-tooltip`,children:[`Seek backward `,lS,` seconds`]})]}),_(vS,{side:`top`,children:[L(yS,{render:L(TS,{seconds:lS,className:`media-button--seek`,render:L(VS,{}),children:_(`span`,{className:`media-icon__container`,children:[L(Yx,{className:`media-icon media-icon--seek`}),L(`span`,{className:`media-icon__label`,children:lS})]})})}),_(bS,{className:`media-surface media-tooltip`,children:[`Seek forward `,lS,` seconds`]})]})]}),_(`div`,{className:`media-time-controls`,children:[L(AS,{type:`current`,className:`media-time`}),_(jS,{className:`media-slider`,children:[_(MS,{className:`media-slider__track`,children:[L(NS,{className:`media-slider__fill`}),L(PS,{className:`media-slider__buffer`})]}),L(FS,{className:`media-slider__thumb`}),L(`div`,{className:`media-surface media-thumbnail media-slider__preview`,children:L(IS,{type:`pointer`,className:`media-time media-thumbnail__time`})})]}),L(AS,{type:`duration`,className:`media-time`})]}),_(`div`,{className:`media-button-group`,children:[_(vS,{side:`top`,children:[L(yS,{render:L(kS,{className:`media-button--playback-rate`,render:L(VS,{})})}),L(bS,{className:`media-surface media-tooltip`,children:`Toggle playback rate`})]}),L(US,{}),e?.subtitles&&L(HS,{selection:e.subtitles,icon:e.subtitles.selectedId?L(rS,{className:`media-icon`}):L(iS,{className:`media-icon`})},`subtitles`),e?.audioTracks&&L(HS,{selection:e.audioTracks,icon:L(oS,{className:`media-icon`})},`audio`),e?.qualityLevels&&L(HS,{selection:e.qualityLevels,icon:L(sS,{className:`media-icon`})},`quality`),_(vS,{side:`top`,children:[L(yS,{render:_(DS,{className:`media-button--pip`,render:L(VS,{}),children:[L(tS,{className:`media-icon media-icon--pip-enter`}),L(nS,{className:`media-icon media-icon--pip-exit`})]})}),L(bS,{className:`media-surface media-tooltip`})]}),_(vS,{side:`top`,children:[L(yS,{render:_(OS,{className:`media-button--fullscreen`,render:L(VS,{}),children:[L($x,{className:`media-icon media-icon--fullscreen-enter`}),L(eS,{className:`media-icon media-icon--fullscreen-exit`})]})}),L(bS,{className:`media-surface media-tooltip`})]})]})]})}),L(`div`,{className:`media-overlay`}),L(RS,{keys:`Space`,action:`togglePaused`}),L(RS,{keys:`k`,action:`togglePaused`}),L(RS,{keys:`m`,action:`toggleMuted`}),L(RS,{keys:`f`,action:`toggleFullscreen`}),L(RS,{keys:`i`,action:`togglePictureInPicture`}),L(RS,{keys:`ArrowRight`,action:`seekStep`,value:5}),L(RS,{keys:`ArrowLeft`,action:`seekStep`,value:-5}),L(RS,{keys:`l`,action:`seekStep`,value:10}),L(RS,{keys:`j`,action:`seekStep`,value:-10}),L(RS,{keys:`ArrowUp`,action:`volumeStep`,value:.05}),L(RS,{keys:`ArrowDown`,action:`volumeStep`,value:-.05}),L(RS,{keys:`0-9`,action:`seekToPercent`}),L(RS,{keys:`Home`,action:`seekToPercent`,value:0}),L(RS,{keys:`End`,action:`seekToPercent`,value:100}),L(RS,{keys:`>`,action:`speedUp`}),L(RS,{keys:`<`,action:`speedDown`}),L(zS,{type:`tap`,action:`togglePaused`,pointer:`mouse`,region:`center`}),L(zS,{type:`tap`,action:`toggleControls`,pointer:`touch`}),L(zS,{type:`doubletap`,action:`seekStep`,value:-10,region:`left`}),L(zS,{type:`doubletap`,action:`toggleFullscreen`,region:`center`}),L(zS,{type:`doubletap`,action:`seekStep`,value:10,region:`right`})]});v();var{Provider:GS}=Kf({features:Xd}),KS=e=>`media`in e?e:{media:e},qS=({remote:e,frame:t,adapter:n})=>{let r=Dl();return g(()=>{if(!r||!e||!t)return;let i=n?n(e,t):e;if(!i)return;let a=KS(i),o=T(e);r(a.media);let s=pe(a.media);return()=>{s(),o(),r(null),a.dispose?.()}},[e,t,n,r]),null},JS=f`
|
|
1430
|
+
`,Ux=({url:e,title:t})=>{let[n,r]=M(`detecting`),[i,a]=M(null),[o,s]=M(null),[c,l]=M(!0),[u,d]=M(!1),[f,p]=M(),[m,v]=M(null),[y,b]=M(0),[x,S]=M(0),[w,T]=M(!1),[E,D]=M(!1),A=O(null),j=O(null),[ee,ne]=M(!1),N=O(!1),[I,re]=M(),[ie,ae]=M(),R=Lx(e,m),z=mx(o,m,i),se=O(0),de=O({generation:0,tail:Promise.resolve()}),pe=O(!0),me=k(()=>{let e=se.current+1;return se.current=e,de.current={generation:e,tail:Promise.resolve()},re(void 0),e},[]),he=k((e,t)=>{if(de.current.generation!==e)return Promise.reject(Error(`Crunchyroll track operation cancelled`));let n=de.current,r=n.tail.then(t);return n.tail=r.then(()=>{},()=>{}),r},[]);g(()=>()=>{pe.current=!1,se.current+=1},[]),g(()=>{let e=!1;return fe().then(t=>{e||r(t)}),()=>{e=!0}},[]),g(()=>{if(!i||n===`detecting`)return;let e=!1;return le({iframe:i,domains:C,cookies:ue(n),permissions:[{category:`evaluation`,reason:`Switch audio and subtitles, seek the video, show seek thumbnails and open picture in picture`}]}).then(t=>{e||s(t)}).catch(t=>{e||(console.error(`Failed to attach Crunchyroll frame`,t),p(t?.message||`Failed to load player`),l(!1))}),()=>{e=!0}},[i,n]),g(()=>{if(!o)return;let t=!1,r=()=>t;return l(!0),p(void 0),d(!1),v(null),me(),(async()=>{if(n===`cloud`){if(await o.goto(e,{waitUntil:`commit`}),t)return;let{isLoggedIn:n}=await fx(o,r);if(t)return;if(ce.record(`crunchyroll`,n?`signed-in`:`signed-out`),!n){l(!1),d(!0);return}if(await o.addStyleTag({content:Rx}),t)return;let i=await Bx(o,r);if(t)return;if(l(!1),!i)throw Error(`The episode did not load a player.`);v(i);return}if(await o.goto(e,{waitUntil:`commit`}),t||(await o.addStyleTag({content:Rx}),t))return;let{isLoggedIn:i}=await fx(o,r);if(t)return;if(ce.record(`crunchyroll`,i?`signed-in`:`signed-out`),!i){l(!1),d(!0);return}let a=await Bx(o,r);if(!t){if(l(!1),!a)throw Error(`The episode did not load a player.`);v(a)}})().catch(e=>{t||(console.error(`Failed to load Crunchyroll player`,e),p(e?.message||`Failed to load player`),l(!1))}),()=>{t=!0}},[o,e,y,n,me]),g(()=>{if(!o||!m)return;let e=me(),t=!1,n=()=>t||!pe.current||e!==se.current;return(async()=>{let t,r;for(let i=0;i<5&&!n();i+=1){try{if(r=await he(e,()=>$b(o,n)),t=void 0,n()||(re(r),r.audio&&r.subtitles))return}catch(e){t=e}await new Promise(e=>setTimeout(e,500))}if(!r&&t)throw t})().then(()=>{},e=>{n()||console.warn(`[cr] track discovery failed:`,e)}),()=>{t=!0}},[o,m,me,he]),g(()=>{if(!o||!m)return;let e=!1,t;return Ex(o).then(n=>{if(e)return n.dispose();t=n,ae(n)},t=>{e||console.warn(`[cr] seek thumbnails unavailable:`,t)}),()=>{e=!0,t?.dispose(),ae(void 0)}},[o,m]);let ge=se.current,_e=k((e,t)=>{if(!o||!m)return Promise.reject(Error(`Crunchyroll player is not ready`));let n=()=>!pe.current||ge!==se.current;return he(ge,async()=>{try{let r=await sx(o,m,e,t,n);if(n())throw Error(`Crunchyroll track operation cancelled`);re(r)}catch(e){if(!n())try{let e=await $b(o,n);n()||re(e)}catch{}throw e}})},[o,m,he,ge]),ve=P(()=>I?.subtitles&&{selection:{...I.subtitles,select:e=>_e(`subtitles`,e)}},[I?.subtitles,_e]),ye=P(()=>I?.audio&&{selection:{...I.audio,select:e=>_e(`audio`,e)}},[I?.audio,_e]),be=k(()=>{if(A.current!==null)return;let e=globalThis.open(h,`_blank`,`width=500,height=700`);if(!e){D(!0),l(!1);return}D(!1),T(!0),j.current=e;let t=setInterval(()=>{e.closed&&(clearInterval(t),A.current===t&&(A.current=null),j.current===e&&(j.current=null),T(!1),b(e=>e+1))},500);A.current=t},[]),xe=k(()=>{s(null),p(void 0),v(null),me(),d(!1),l(!0),S(e=>e+1)},[me]),Se=k(()=>{if(N.current)return;N.current=!0;let e=oe({url:h,domains:C,isSignedIn:te});D(!1),ne(!0),e.then(e=>{if(pe.current){if(e===`blocked`){D(!0);return}if(e===`unsupported`){p(`The Crunchyroll sign-in window could not be opened here.`);return}if(e===`authed`){xe();return}d(!1),l(!0),b(e=>e+1)}},e=>{pe.current&&(console.error(`Crunchyroll sign-in window failed`,e),p(e?.message||`The sign-in window failed`))}).finally(()=>{N.current=!1,pe.current&&ne(!1)})},[xe]);g(()=>()=>{A.current!==null&&(clearInterval(A.current),A.current=null)},[]),g(()=>{A.current!==null&&(clearInterval(A.current),A.current=null,T(!1)),D(!1)},[e]);let B=k(()=>{j.current!==null&&(j.current.close(),j.current=null),A.current!==null&&(clearInterval(A.current),A.current=null),D(!1),T(!1),xe()},[xe]),Ce=(c||f||E||u)&&_(`div`,{className:`overlay`,children:[u&&!f&&!E&&_(F,{children:[`Sign in to Crunchyroll to watch.`,n===`extension`?L(`button`,{className:`login-button`,onClick:be,disabled:w,children:w?`Finish signing in the popup...`:`Open Crunchyroll Login Page`}):L(`button`,{className:`login-button`,onClick:Se,disabled:ee,children:ee?`Finish signing in the window...`:`Sign in to Crunchyroll`})]}),E&&!f&&_(F,{children:[`The login popup was blocked. Allow popups for this page and try again.`,L(`button`,{className:`login-button`,onClick:n===`extension`?be:Se,children:`Open Crunchyroll Login Page`})]}),f&&_(F,{children:[f,L(`button`,{className:`login-button`,onClick:B,children:`Retry`})]}),c&&!f&&!u&&L(`div`,{className:`loading-spinner`,role:`status`,"aria-label":`Loading`})]});return _(`div`,{css:Hx,children:[n!==`detecting`&&L(ux,{title:t,remote:m,frame:o,subtitles:ve,audioTracks:ye,thumbnails:ie,chapters:R,pictureInPicture:z,children:L(`iframe`,{ref:a,className:`cr-frame`,referrerPolicy:`no-referrer`,allow:`encrypted-media; autoplay; fullscreen;`},`${n}-${x}`)}),Ce]})},Wx=e=>e,Gx=Wx(({className:e,children:t})=>L(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:18,height:18,fill:`none`,"aria-hidden":`true`,className:e,children:t})),Kx=Wx(({className:e})=>L(Gx,{className:e,children:L(`path`,{fill:`currentColor`,d:`m14.051 10.723-7.985 4.964a1.98 1.98 0 0 1-2.758-.638A2.06 2.06 0 0 1 3 13.964V4.036C3 2.91 3.895 2 5 2c.377 0 .747.109 1.066.313l7.985 4.964a2.057 2.057 0 0 1 .627 2.808c-.16.257-.373.475-.627.637`})})),qx=Wx(({className:e})=>_(Gx,{className:e,children:[L(`rect`,{width:5,height:14,x:2,y:2,fill:`currentColor`,rx:1.75}),L(`rect`,{width:5,height:14,x:11,y:2,fill:`currentColor`,rx:1.75})]})),Jx=Wx(({className:e})=>_(Gx,{className:e,children:[L(`path`,{fill:`currentColor`,d:`M9 17a8 8 0 0 1-8-8h2a6 6 0 1 0 1.287-3.713l1.286 1.286A.25.25 0 0 1 5.396 7H1.25A.25.25 0 0 1 1 6.75V2.604a.25.25 0 0 1 .427-.177l1.438 1.438A8 8 0 1 1 9 17`}),L(`path`,{fill:`currentColor`,d:`m11.61 9.639-3.331 2.07a.826.826 0 0 1-1.15-.266.86.86 0 0 1-.129-.452V6.849C7 6.38 7.374 6 7.834 6c.158 0 .312.045.445.13l3.331 2.071a.858.858 0 0 1 0 1.438`})]})),Yx=Wx(({className:e})=>L(Gx,{className:e,children:L(`path`,{fill:`currentColor`,d:`M1 9c0 2.21.895 4.21 2.343 5.657l1.414-1.414a6 6 0 1 1 8.956-7.956l-1.286 1.286a.25.25 0 0 0 .177.427h4.146a.25.25 0 0 0 .25-.25V2.604a.25.25 0 0 0-.427-.177l-1.438 1.438A8 8 0 0 0 1 9`})})),Xx=Wx(({className:e})=>L(Gx,{className:e,children:L(`path`,{fill:`currentColor`,d:`M.714 6.008h3.072l4.071-3.857c.5-.376 1.143 0 1.143.601V15.28c0 .602-.643.903-1.143.602l-4.071-3.858H.714c-.428 0-.714-.3-.714-.752V6.76c0-.451.286-.752.714-.752M14.5 7.586l-1.768-1.768a1 1 0 1 0-1.414 1.414L13.085 9l-1.767 1.768a1 1 0 0 0 1.414 1.414l1.768-1.768 1.768 1.768a1 1 0 0 0 1.414-1.414L15.914 9l1.768-1.768a1 1 0 0 0-1.414-1.414z`})})),Zx=Wx(({className:e})=>L(Gx,{className:e,children:L(`path`,{fill:`currentColor`,d:`M.714 6.008h3.072l4.071-3.857c.5-.376 1.143 0 1.143.601V15.28c0 .602-.643.903-1.143.602l-4.071-3.858H.714c-.428 0-.714-.3-.714-.752V6.76c0-.451.286-.752.714-.752m10.568.59a.91.91 0 0 1 0-1.316.91.91 0 0 1 1.316 0c1.203 1.203 1.47 2.216 1.522 3.208q.012.255.011.51c0 1.16-.358 2.733-1.533 3.803a.7.7 0 0 1-.298.156c-.382.106-.873-.011-1.018-.156a.91.91 0 0 1 0-1.316c.57-.57.995-1.551.995-2.487 0-.944-.26-1.667-.995-2.402`})})),Qx=Wx(({className:e})=>_(Gx,{className:e,children:[L(`path`,{fill:`currentColor`,d:`M15.6 3.3c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4C15.4 5.9 16 7.4 16 9s-.6 3.1-1.8 4.3c-.4.4-.4 1 0 1.4.2.2.5.3.7.3.3 0 .5-.1.7-.3C17.1 13.2 18 11.2 18 9s-.9-4.2-2.4-5.7`}),L(`path`,{fill:`currentColor`,d:`M.714 6.008h3.072l4.071-3.857c.5-.376 1.143 0 1.143.601V15.28c0 .602-.643.903-1.143.602l-4.071-3.858H.714c-.428 0-.714-.3-.714-.752V6.76c0-.451.286-.752.714-.752m10.568.59a.91.91 0 0 1 0-1.316.91.91 0 0 1 1.316 0c1.203 1.203 1.47 2.216 1.522 3.208q.012.255.011.51c0 1.16-.358 2.733-1.533 3.803a.7.7 0 0 1-.298.156c-.382.106-.873-.011-1.018-.156a.91.91 0 0 1 0-1.316c.57-.57.995-1.551.995-2.487 0-.944-.26-1.667-.995-2.402`})]})),$x=Wx(({className:e})=>L(Gx,{className:e,children:L(`path`,{fill:`currentColor`,d:`M9.57 3.617A1 1 0 0 0 8.646 3H4c-.552 0-1 .449-1 1v4.646a.996.996 0 0 0 1.001 1 1 1 0 0 0 .706-.293l4.647-4.647a1 1 0 0 0 .216-1.089m4.812 4.812a1 1 0 0 0-1.089.217l-4.647 4.647a.998.998 0 0 0 .708 1.706H14c.552 0 1-.449 1-1V9.353a1 1 0 0 0-.618-.924`})})),eS=Wx(({className:e})=>L(Gx,{className:e,children:L(`path`,{fill:`currentColor`,d:`M7.883 1.93a.99.99 0 0 0-1.09.217L2.146 6.793A.998.998 0 0 0 2.853 8.5H7.5c.551 0 1-.449 1-1V2.854a1 1 0 0 0-.617-.924m7.263 7.57H10.5c-.551 0-1 .449-1 1v4.646a.996.996 0 0 0 1.001 1.001 1 1 0 0 0 .706-.293l4.646-4.646a.998.998 0 0 0-.707-1.707z`})})),tS=Wx(({className:e})=>_(Gx,{className:e,children:[L(`path`,{fill:`currentColor`,d:`M13 2a4 4 0 0 1 4 4v2.035A3.5 3.5 0 0 0 16.5 8H15V6.273C15 5.018 13.96 4 12.679 4H4.32C3.04 4 2 5.018 2 6.273v5.454C2 12.982 3.04 14 4.321 14H6v1.5q0 .255.035.5H4a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4z`}),L(`rect`,{width:10,height:7,x:8,y:10,fill:`currentColor`,rx:2}),L(`path`,{fill:`currentColor`,d:`M7.129 5.547a.6.6 0 0 0-.656.13L3.677 8.473A.6.6 0 0 0 4.102 9.5h2.796c.332 0 .602-.27.602-.602V6.103a.6.6 0 0 0-.371-.556`})]})),nS=Wx(({className:e})=>_(Gx,{className:e,children:[L(`path`,{fill:`currentColor`,d:`M13 2a4 4 0 0 1 4 4v2.036A3.5 3.5 0 0 0 16.5 8H15V6.273C15 5.018 13.96 4 12.679 4H4.32C3.04 4 2 5.018 2 6.273v5.454C2 12.982 3.04 14 4.321 14H6v1.5q0 .255.036.5H4a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4z`}),L(`rect`,{width:10,height:7,x:8,y:10,fill:`currentColor`,rx:2}),L(`path`,{fill:`currentColor`,d:`M4.871 10.454a.6.6 0 0 0 .656-.131l2.796-2.796A.6.6 0 0 0 7.898 6.5H5.102a.603.603 0 0 0-.602.602v2.795a.6.6 0 0 0 .371.556`})]})),rS=Wx(({className:e})=>L(Gx,{className:e,children:L(`path`,{fill:`currentColor`,d:`M15 2a3 3 0 0 1 3 3v8a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V5a3 3 0 0 1 3-3zM4 11a1 1 0 1 0 0 2h5a1 1 0 1 0 0-2zm8 0a1 1 0 1 0 0 2h2a1 1 0 1 0 0-2zM4 8a1 1 0 0 0 0 2h1a1 1 0 0 0 0-2zm4 0a1 1 0 0 0 0 2h3a1 1 0 1 0 0-2zm6 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2`})})),iS=Wx(({className:e})=>_(Gx,{className:e,children:[L(`rect`,{width:16,height:12,x:1,y:3,stroke:`currentColor`,strokeWidth:2,rx:3}),L(`rect`,{width:3,height:2,x:3,y:8,fill:`currentColor`,rx:1}),L(`rect`,{width:2,height:2,x:13,y:8,fill:`currentColor`,rx:1}),L(`rect`,{width:4,height:2,x:11,y:11,fill:`currentColor`,rx:1}),L(`rect`,{width:5,height:2,x:7,y:8,fill:`currentColor`,rx:1}),L(`rect`,{width:7,height:2,x:3,y:11,fill:`currentColor`,rx:1})]})),aS=Wx(({className:e})=>L(Gx,{className:e,children:_(`g`,{fill:`currentColor`,children:[L(`rect`,{width:2,height:5,x:8,y:.5,opacity:.5,rx:1,children:L(`animate`,{attributeName:`opacity`,begin:`0s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),L(`rect`,{width:2,height:5,x:12.243,y:2.257,opacity:.45,rx:1,transform:`rotate(45 13.243 4.757)`,children:L(`animate`,{attributeName:`opacity`,begin:`0.125s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),L(`rect`,{width:5,height:2,x:12.5,y:8,opacity:.4,rx:1,children:L(`animate`,{attributeName:`opacity`,begin:`0.25s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),L(`rect`,{width:5,height:2,x:10.743,y:12.243,opacity:.35,rx:1,transform:`rotate(45 13.243 13.243)`,children:L(`animate`,{attributeName:`opacity`,begin:`0.375s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),L(`rect`,{width:2,height:5,x:8,y:12.5,opacity:.3,rx:1,children:L(`animate`,{attributeName:`opacity`,begin:`0.5s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),L(`rect`,{width:2,height:5,x:3.757,y:10.743,opacity:.25,rx:1,transform:`rotate(45 4.757 13.243)`,children:L(`animate`,{attributeName:`opacity`,begin:`0.625s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),L(`rect`,{width:5,height:2,x:.5,y:8,opacity:.15,rx:1,children:L(`animate`,{attributeName:`opacity`,begin:`0.75s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})}),L(`rect`,{width:5,height:2,x:2.257,y:3.757,opacity:.1,rx:1,transform:`rotate(45 4.757 4.757)`,children:L(`animate`,{attributeName:`opacity`,begin:`0.875s`,calcMode:`linear`,dur:`1s`,repeatCount:`indefinite`,values:`1;0`})})]})})),oS=Wx(({className:e})=>L(Gx,{className:e,children:L(`path`,{fill:`currentColor`,d:`M9 2a1 1 0 0 1 1 1v12a1 1 0 1 1-2 0V3a1 1 0 0 1 1-1zm4 3a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V6a1 1 0 0 1 1-1zM5 5a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V6a1 1 0 0 1 1-1zm8 4a1 1 0 0 1 1 1v1a1 1 0 1 1-2 0v-1a1 1 0 0 1 1-1zM5 9a1 1 0 0 1 1 1v1a1 1 0 1 1-2 0v-1a1 1 0 0 1 1-1z`})})),sS=Wx(({className:e})=>L(Gx,{className:e,children:L(`path`,{fill:`currentColor`,d:`M3 5a1 1 0 0 1 1-1h10a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1zm0 4a1 1 0 0 1 1-1h10a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1zm1 3a1 1 0 1 0 0 2h6a1 1 0 1 0 0-2H4z`})})),cS=Wx(({className:e})=>L(Gx,{className:e,children:L(`path`,{fill:`currentColor`,d:`M14.53 4.53a.75.75 0 0 0-1.06-1.06L7 9.94 4.53 7.47a.75.75 0 0 0-1.06 1.06l3 3a.75.75 0 0 0 1.06 0l7-7z`})}));v();var lS=10,$=e=>e,uS=$(Dh.Root),dS=$(bh),fS=$(Fh.Root),pS=$(yh.Popup),mS=$(yh.Title),hS=$(yh.Close),gS=$(Fh.Description),_S=$(Fg.Provider),vS=$(Fg.Root),yS=$(Fg.Trigger),bS=$(Fg.Popup),xS=$(ng.Root),SS=$(ng.Trigger),CS=$(ng.Popup),wS=$(Kh),TS=$(rg),ES=$(Wh),DS=$(Gh),OS=$(Ih),kS=$(qh),AS=$(bg.Value),jS=$(Cg.Root),MS=$(gg.Track),NS=$(gg.Fill),PS=$(gg.Buffer),FS=$(gg.Thumb),IS=$(gg.Value),LS=$(Rg.Root),RS=$(Hh),zS=$(Rh),BS=$(Wf),VS=({className:e,...t})=>L(`button`,{type:`button`,className:`media-button media-button--subtle media-button--icon${e?` ${e}`:``}`,...t}),HS=({selection:e,icon:t})=>{let[n,r]=M(!1),[i,a]=M(!1),[o,s]=M(!1);g(()=>s(!1),[e.selectedId]);let c=[...e.offLabel?[{id:null,label:e.offLabel}]:[],...e.options],l=t=>{if(t===e.selectedId){r(!1);return}s(!1),a(!0),Promise.resolve().then(()=>e.onSelect(t)).then(()=>r(!1)).catch(t=>{console.warn(`[player] ${e.label} selection failed:`,t),s(!0)}).finally(()=>a(!1))};return _(xS,{open:n,onOpenChange:e=>r(e),children:[L(SS,{render:L(VS,{className:`media-button--menu${o?` media-button--error`:``}`,"aria-label":e.label}),children:t}),L(CS,{className:`media-surface media-popover media-popover--menu`,children:_(`div`,{className:`stub-menu`,role:`menu`,"aria-label":e.label,children:[L(`div`,{className:`stub-menu__heading`,children:e.label}),c.map(t=>{let n=t.id===e.selectedId;return _(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":n,className:`stub-menu__item${n?` stub-menu__item--active`:``}`,disabled:i||`disabled`in t&&t.disabled,onClick:()=>l(t.id),children:[L(`span`,{className:`stub-menu__check`,children:n?L(cS,{className:`media-icon`}):null}),L(`span`,{className:`stub-menu__label`,children:t.label}),`description`in t&&t.description?L(`span`,{className:`stub-menu__description`,children:t.description}):null]},t.id??`__off__`)})]})})]})},US=()=>_(xS,{openOnHover:!0,delay:200,closeDelay:100,side:`top`,children:[L(SS,{render:_(ES,{className:`media-button--mute`,render:L(VS,{}),children:[L(Xx,{className:`media-icon media-icon--volume-off`}),L(Zx,{className:`media-icon media-icon--volume-low`}),L(Qx,{className:`media-icon media-icon--volume-high`})]})}),L(CS,{className:`media-surface media-popover media-popover--volume`,children:_(LS,{className:`media-slider`,orientation:`vertical`,thumbAlignment:`edge`,children:[L(MS,{className:`media-slider__track`,children:L(NS,{className:`media-slider__fill`})}),L(FS,{className:`media-slider__thumb media-slider__thumb--persistent`})]})})]}),WS=({capabilities:e,children:t,className:n,...r})=>_(BS,{className:`media-default-skin media-default-skin--video${n?` ${n}`:``}`,...r,children:[t,L(dS,{render:e=>L(`div`,{...e,className:`media-buffering-indicator`,children:L(`div`,{className:`media-surface`,children:L(aS,{className:`media-icon`})})})}),L(fS,{children:L(pS,{className:`media-error`,children:_(`div`,{className:`media-error__dialog media-surface`,children:[_(`div`,{className:`media-error__content`,children:[L(mS,{className:`media-error__title`,children:`Something went wrong.`}),L(gS,{className:`media-error__description`})]}),L(`div`,{className:`media-error__actions`,children:L(hS,{className:`media-button media-button--primary`,children:`OK`})})]})})}),L(uS,{className:`media-surface media-controls`,children:_(_S,{children:[_(`div`,{className:`media-button-group`,children:[_(vS,{side:`top`,children:[L(yS,{render:_(wS,{className:`media-button--play`,render:L(VS,{}),children:[L(Jx,{className:`media-icon media-icon--restart`}),L(Kx,{className:`media-icon media-icon--play`}),L(qx,{className:`media-icon media-icon--pause`})]})}),L(bS,{className:`media-surface media-tooltip`})]}),_(vS,{side:`top`,children:[L(yS,{render:L(TS,{seconds:-10,className:`media-button--seek`,render:L(VS,{}),children:_(`span`,{className:`media-icon__container`,children:[L(Yx,{className:`media-icon media-icon--seek media-icon--flipped`}),L(`span`,{className:`media-icon__label`,children:lS})]})})}),_(bS,{className:`media-surface media-tooltip`,children:[`Seek backward `,lS,` seconds`]})]}),_(vS,{side:`top`,children:[L(yS,{render:L(TS,{seconds:lS,className:`media-button--seek`,render:L(VS,{}),children:_(`span`,{className:`media-icon__container`,children:[L(Yx,{className:`media-icon media-icon--seek`}),L(`span`,{className:`media-icon__label`,children:lS})]})})}),_(bS,{className:`media-surface media-tooltip`,children:[`Seek forward `,lS,` seconds`]})]})]}),_(`div`,{className:`media-time-controls`,children:[L(AS,{type:`current`,className:`media-time`}),_(jS,{className:`media-slider`,children:[_(MS,{className:`media-slider__track`,children:[L(NS,{className:`media-slider__fill`}),L(PS,{className:`media-slider__buffer`})]}),L(FS,{className:`media-slider__thumb`}),L(`div`,{className:`media-surface media-thumbnail media-slider__preview`,children:L(IS,{type:`pointer`,className:`media-time media-thumbnail__time`})})]}),L(AS,{type:`duration`,className:`media-time`})]}),_(`div`,{className:`media-button-group`,children:[_(vS,{side:`top`,children:[L(yS,{render:L(kS,{className:`media-button--playback-rate`,render:L(VS,{})})}),L(bS,{className:`media-surface media-tooltip`,children:`Toggle playback rate`})]}),L(US,{}),e?.subtitles&&L(HS,{selection:e.subtitles,icon:e.subtitles.selectedId?L(rS,{className:`media-icon`}):L(iS,{className:`media-icon`})},`subtitles`),e?.audioTracks&&L(HS,{selection:e.audioTracks,icon:L(oS,{className:`media-icon`})},`audio`),e?.qualityLevels&&L(HS,{selection:e.qualityLevels,icon:L(sS,{className:`media-icon`})},`quality`),_(vS,{side:`top`,children:[L(yS,{render:_(DS,{className:`media-button--pip`,render:L(VS,{}),children:[L(tS,{className:`media-icon media-icon--pip-enter`}),L(nS,{className:`media-icon media-icon--pip-exit`})]})}),L(bS,{className:`media-surface media-tooltip`})]}),_(vS,{side:`top`,children:[L(yS,{render:_(OS,{className:`media-button--fullscreen`,render:L(VS,{}),children:[L($x,{className:`media-icon media-icon--fullscreen-enter`}),L(eS,{className:`media-icon media-icon--fullscreen-exit`})]})}),L(bS,{className:`media-surface media-tooltip`})]})]})]})}),L(`div`,{className:`media-overlay`}),L(RS,{keys:`Space`,action:`togglePaused`}),L(RS,{keys:`k`,action:`togglePaused`}),L(RS,{keys:`m`,action:`toggleMuted`}),L(RS,{keys:`f`,action:`toggleFullscreen`}),L(RS,{keys:`i`,action:`togglePictureInPicture`}),L(RS,{keys:`ArrowRight`,action:`seekStep`,value:5}),L(RS,{keys:`ArrowLeft`,action:`seekStep`,value:-5}),L(RS,{keys:`l`,action:`seekStep`,value:10}),L(RS,{keys:`j`,action:`seekStep`,value:-10}),L(RS,{keys:`ArrowUp`,action:`volumeStep`,value:.05}),L(RS,{keys:`ArrowDown`,action:`volumeStep`,value:-.05}),L(RS,{keys:`0-9`,action:`seekToPercent`}),L(RS,{keys:`Home`,action:`seekToPercent`,value:0}),L(RS,{keys:`End`,action:`seekToPercent`,value:100}),L(RS,{keys:`>`,action:`speedUp`}),L(RS,{keys:`<`,action:`speedDown`}),L(zS,{type:`tap`,action:`togglePaused`,pointer:`mouse`,region:`center`}),L(zS,{type:`tap`,action:`toggleControls`,pointer:`touch`}),L(zS,{type:`doubletap`,action:`seekStep`,value:-10,region:`left`}),L(zS,{type:`doubletap`,action:`toggleFullscreen`,region:`center`}),L(zS,{type:`doubletap`,action:`seekStep`,value:10,region:`right`})]});v();var{Provider:GS}=Kf({features:Xd}),KS=e=>`media`in e?e:{media:e},qS=({remote:e,frame:t,adapter:n})=>{let r=Dl();return g(()=>{if(!r||!e||!t)return;let i=n?n(e,t):e;if(!i)return;let a=KS(i),o=T(e);r(a.media);let s=pe(a.media);return()=>{s(),o(),r(null),a.dispose?.()}},[e,t,n,r]),null},JS=f`
|
|
1438
1431
|
position: absolute;
|
|
1439
1432
|
inset: 0;
|
|
1440
1433
|
border-radius: 0.8rem;
|
|
@@ -1606,4 +1599,4 @@ ${Iy}
|
|
|
1606
1599
|
background: #c11119;
|
|
1607
1600
|
}
|
|
1608
1601
|
}
|
|
1609
|
-
`,bC={cr:Ux,nf:({url:e})=>{let[t,n]=M(null),[r,i]=M(null),[a,o]=M(!0),[s,c]=M(!1),[l,u]=M(),[d,f]=M(null),[p,m]=M(0);g(()=>{if(!t)return;let e=!1;return(async()=>{for(let n=0;!e;n++)try{let n=await le({iframe:t,domains:pC,cookies:`native`});if(e)return;i(n);return}catch(t){if(e)return;if(!ae()){u(`Netflix playback currently needs the FKN browser extension.`),o(!1);return}if(n>=4){console.error(`Failed to attach Netflix frame`,t),u(t instanceof Error?t.message:`Failed to load player`),o(!1);return}await new Promise(e=>setTimeout(e,300*(n+1)))}})(),()=>{e=!0}},[t]),g(()=>{if(!r)return;let t=!1,n=()=>t;return o(!0),u(void 0),c(!1),f(null),(async()=>{if(await r.goto(e,{waitUntil:`load`}),await gC(()=>r.addStyleTag({content:hC})),t)return;o(!1);let i=await _C(r);if(t)return;if(!i){c(!0);return}let a=await vC(r,n);!t&&a&&f(a)})().catch(e=>{t||(console.error(`Failed to load Netflix player`,e),u(e?.message??`Failed to load player`),o(!1))}),()=>{t=!0}},[r,e,p]);let h=k(()=>{let e=globalThis.open(mC,`_blank`,`width=500,height=700`);if(!e)return;let t=setInterval(()=>{e.closed&&(clearInterval(t),m(e=>e+1))},500)},[]);return _(`div`,{css:yC,children:[L(fC,{remote:d,frame:r,children:L(`iframe`,{ref:n,className:`nf-frame`,referrerPolicy:`no-referrer`,allow:`encrypted-media; autoplay; fullscreen;`})}),(s||l||a)&&_(`div`,{className:`overlay`,children:[s&&_(F,{children:[`
|
|
1602
|
+
`,bC={cr:Ux,nf:({url:e})=>{let[t,n]=M(null),[r,i]=M(null),[a,o]=M(!0),[s,c]=M(!1),[l,u]=M(),[d,f]=M(null),[p,m]=M(0);g(()=>{if(!t)return;let e=!1;return(async()=>{for(let n=0;!e;n++)try{let n=await le({iframe:t,domains:pC,cookies:`native`});if(e)return;i(n);return}catch(t){if(e)return;if(!ae()){u(`Netflix playback currently needs the FKN browser extension.`),o(!1);return}if(n>=4){console.error(`Failed to attach Netflix frame`,t),u(t instanceof Error?t.message:`Failed to load player`),o(!1);return}await new Promise(e=>setTimeout(e,300*(n+1)))}})(),()=>{e=!0}},[t]),g(()=>{if(!r)return;let t=!1,n=()=>t;return o(!0),u(void 0),c(!1),f(null),(async()=>{if(await r.goto(e,{waitUntil:`load`}),await gC(()=>r.addStyleTag({content:hC})),t)return;o(!1);let i=await _C(r);if(t)return;if(!i){c(!0);return}let a=await vC(r,n);!t&&a&&f(a)})().catch(e=>{t||(console.error(`Failed to load Netflix player`,e),u(e?.message??`Failed to load player`),o(!1))}),()=>{t=!0}},[r,e,p]);let h=k(()=>{let e=globalThis.open(mC,`_blank`,`width=500,height=700`);if(!e)return;let t=setInterval(()=>{e.closed&&(clearInterval(t),m(e=>e+1))},500)},[]);return _(`div`,{css:yC,children:[L(fC,{remote:d,frame:r,children:L(`iframe`,{ref:n,className:`nf-frame`,referrerPolicy:`no-referrer`,allow:`encrypted-media; autoplay; fullscreen;`})}),(s||l||a)&&_(`div`,{className:`overlay`,children:[s&&_(F,{children:[`Sign in to Netflix to watch.`,L(`button`,{className:`login-button`,onClick:h,children:`Open Netflix Login Page`})]}),l&&!s&&l,a&&!l&&!s&&`Loading Netflix player...`]})]})}},xC=e=>bC[e];v();var SC=new URLSearchParams(globalThis.location.search),CC=SC.get(`mediaUri`),wC=SC.get(`episodeUri`),TC=SC.get(`sourceUri`),EC=SC.get(`url`),DC=TC?A(TC).origin:void 0,OC=DC?xC(DC):void 0;b(L(()=>{let[e,t]=M();return g(()=>ne(t),[]),!CC||!wC||!TC||!EC||!OC?L(`div`,{children:`Unsupported or missing parameters`}):L(OC,{url:EC,mediaUri:CC,episodeUri:wC,sourceUri:TC,title:e})},{}),document.getElementById(`app`));
|