diff --git a/api/index.ts b/api/index.ts index 6e136de..cd22cbf 100644 --- a/api/index.ts +++ b/api/index.ts @@ -3,7 +3,6 @@ import { cookies } from 'next/headers'; import mapMoviesSeriesResponseToShows from './dto/Show'; -import tlk from './parsers/tlk'; import http from './clients/theMovieDb'; export const session = () => cookies().get('session')?.value; @@ -74,5 +73,3 @@ export const usersShows = async ({ }) .then((response) => mapMoviesSeriesResponseToShows(response, showType)); }; - -export const fetchTLKMagnet = async (url: string) => tlk.magnet(url); diff --git a/api/parsers/tlk/index.ts b/api/parsers/tlk/index.ts index 1c8d0ce..a673a06 100644 --- a/api/parsers/tlk/index.ts +++ b/api/parsers/tlk/index.ts @@ -1,8 +1,9 @@ import axios, { AxiosInstance } from 'axios'; -import parseTorrent from 'parse-torrent'; import torrentTitle from 'parse-torrent-title'; import { load } from 'cheerio'; +import parseTorrent, { Instance } from 'parse-torrent'; + import { CookieJar } from 'tough-cookie'; import { wrapper } from 'axios-cookiejar-support'; @@ -16,9 +17,9 @@ export class Toloka { [Sort.seeds]: 10 }; - private magnets: Record = {}; + private cookieJar = new CookieJar(); - cookieJar = new CookieJar(); + private magnets: Record = {}; constructor() { this.host = process.env.TOLOKA_HOST || 'https://toloka.to'; @@ -32,11 +33,11 @@ export class Toloka { ); } - async isAuthorized(data: string) { + private async isAuthorized(data: string) { return !load(data)('[href="/login.php"]').length; } - async auth() { + private async auth() { const data = new FormData(); data.append('username', process.env.TOLOKA_USERNAME as string); @@ -97,22 +98,32 @@ export class Toloka { return parseTorrents(page.data); } - async magnet(url: string): Promise { + async magnet(url: string) { if (this.magnets[url]) return this.magnets[url]; - const { data } = await this.client.get(`/${url}`, { - responseType: 'arraybuffer' - }); + const fetchTorrent = async () => { + const { data: buffer } = await this.client.get(`/${url}`, { + responseType: 'arraybuffer' + }); - const torrent = await parseTorrent(data); + return parseTorrent(buffer); + }; - const magnet = `magnet:?xt=urn:btih:${torrent.infoHash}&dn=${encodeURIComponent( - torrent.name as string - )}&tr=${torrent.announce?.join('&tr=')}`; + let torrent: Instance; + + try { + torrent = (await fetchTorrent()) as Instance; + } catch (_) { + await this.auth(); + + torrent = (await fetchTorrent()) as Instance; + } + + const magnet = `magnet:?xt=urn:btih:${torrent.infoHash}&dn=${encodeURIComponent(torrent.name?.toString() || '')}`; this.magnets[url] = magnet; - return magnet; + return this.magnets[url]; } } diff --git a/app/api/magnet/route.ts b/app/api/magnet/route.ts new file mode 100644 index 0000000..2b26927 --- /dev/null +++ b/app/api/magnet/route.ts @@ -0,0 +1,13 @@ +import { NextRequest, NextResponse } from 'next/server'; + +import tlk from '@/api/parsers/tlk'; + +export async function GET({ nextUrl: { searchParams } }: NextRequest) { + const url = searchParams.get('url') as string; + + try { + return NextResponse.json(await tlk.magnet(url)); + } catch (error) { + return NextResponse.error(); + } +} diff --git a/app/layout.tsx b/app/layout.tsx index 671f131..1096433 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,6 +1,6 @@ import React, { ReactNode } from 'react'; import type { Metadata, Viewport } from 'next'; -import { Poppins } from 'next/font/google'; +import { Jost } from 'next/font/google'; import { cookies } from 'next/headers'; import Header from '@/components/Header'; @@ -20,7 +20,7 @@ export const viewport: Viewport = { width: 'device-width' }; -const font = Poppins({ subsets: ['latin'], weight: ['400', '500'] }); +const font = Jost({ subsets: ['latin', 'cyrillic'], weight: ['400'] }); const RootLayout = ({ children }: { children: ReactNode }) => { const theme = cookies().get('theme')?.value as Theme; diff --git a/components/Header/index.tsx b/components/Header/index.tsx index ed702f2..3ae682e 100644 --- a/components/Header/index.tsx +++ b/components/Header/index.tsx @@ -23,7 +23,9 @@ const Header: FC = ({ className }) => (
- Movie advisor + + Movie advisor +
diff --git a/components/Preview/components/Actions/index.tsx b/components/Preview/components/Actions/index.tsx index e28d68c..fc05180 100644 --- a/components/Preview/components/Actions/index.tsx +++ b/components/Preview/components/Actions/index.tsx @@ -50,7 +50,7 @@ const Actions = ({ onClose, show, className }: Props) => { - + + )} + - )} - - - {supportedForCast && ( + + {supportedForCast && ( + + )} + + {!magnet && ( )} - +
); }; diff --git a/components/Preview/components/Torrents/components/TorrentsTable/components/Actions/useMagnet.ts b/components/Preview/components/Torrents/components/TorrentsTable/components/Actions/useMagnet.ts index 394c1ca..cc6fb67 100644 --- a/components/Preview/components/Torrents/components/TorrentsTable/components/Actions/useMagnet.ts +++ b/components/Preview/components/Torrents/components/TorrentsTable/components/Actions/useMagnet.ts @@ -1,9 +1,20 @@ import { useMutation } from '@tanstack/react-query'; -import { fetchTLKMagnet } from '@/api'; +const useMagnet = (torrent: Torrent) => { + return useMutation({ + retry: 4, + mutationFn: async () => { + try { + const response = await fetch(`/api/magnet?url=${torrent.download}`); -const useMagnet = () => { - return useMutation({ mutationFn: fetchTLKMagnet }); + if (!response.ok) return Promise.reject(); + + return response.json(); + } catch (error) { + return Promise.reject(error); + } + } + }); }; export default useMagnet; diff --git a/components/Preview/components/Torrents/components/TorrentsTable/index.tsx b/components/Preview/components/Torrents/components/TorrentsTable/index.tsx index 9577d69..416c44c 100644 --- a/components/Preview/components/Torrents/components/TorrentsTable/index.tsx +++ b/components/Preview/components/Torrents/components/TorrentsTable/index.tsx @@ -48,7 +48,7 @@ const TorrentsTable: FC = ({ title, torrents, backdrop, sort, sortable, p const yearView = torrent.year && year.toString() != torrent.year && `[${torrent.year}]`; return ( - + diff --git a/components/Preview/components/Torrents/constants.ts b/components/Preview/components/Torrents/constants.ts index 84cd182..36bd234 100644 --- a/components/Preview/components/Torrents/constants.ts +++ b/components/Preview/components/Torrents/constants.ts @@ -1,5 +1,7 @@ import { Sort } from '@/api/parsers'; +export const STREAM_URL = `${process.env.NEXT_PUBLIC_TORRENT_PROXY}/stream?link=`; + type Options = { query: string; sort: Sort; imdbID: string }; const queryFn = ({ query, sort, imdbID, key }: Options & { key: keyof typeof providers }) => diff --git a/components/Preview/components/Torrents/hooks/useMagnetHosts.ts b/components/Preview/components/Torrents/hooks/useMagnetHosts.ts index cd01f28..7f4d532 100644 --- a/components/Preview/components/Torrents/hooks/useMagnetHosts.ts +++ b/components/Preview/components/Torrents/hooks/useMagnetHosts.ts @@ -4,7 +4,7 @@ import { atomWithStorage } from 'jotai/utils'; import showHostManagerModal from '@/components/Preview/components/Torrents/components/HostManager'; -const magnetPrefixAtom = atomWithStorage('magnet-prefix', 'http://{host}:65220/playuri?uri=', undefined, { +const magnetPrefixAtom = atomWithStorage('magnet-prefix', 'http://{host}:9090/magnet?magnet=', undefined, { unstable_getOnInit: true }); diff --git a/components/ui/nav.tsx b/components/ui/nav.tsx index 23de985..39b0fd5 100644 --- a/components/ui/nav.tsx +++ b/components/ui/nav.tsx @@ -46,7 +46,7 @@ function Nav({ tabs, active, className, children, onChange }: Nav key={title} ref={isActive ? currentRef : undefined} onClick={() => onChange?.(tab)} - className={cn('z-10 px-2.5 py-0.5 font-normal cursor-pointer', { + className={cn('z-10 px-2.5 py-0.5 font-normal text-[15px] leading-[20px] cursor-pointer', { 'cursor-default text-secondary': isActive, 'mix-blend-difference text-white': !transitionEnded })} diff --git a/package-lock.json b/package-lock.json index 7ab7e0f..7a1692d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,6 @@ "name": "movie-advisor", "version": "0.1.0", "dependencies": { - "@next/bundle-analyzer": "^15.0.1", "@radix-ui/react-dialog": "^1.1.1", "@radix-ui/react-dropdown-menu": "^2.1.2", "@radix-ui/react-slot": "^1.0.2", @@ -17,6 +16,7 @@ "@tanstack/react-query": "^5.59.15", "@types/cheerio": "^0.22.35", "@vidstack/react": "^1.12.11", + "addic7ed-api": "^2.0.1", "axios": "^1.7.7", "axios-cookiejar-support": "^5.0.3", "cheerio": "^1.0.0", @@ -33,6 +33,7 @@ "react-dom": "^18.3.1", "react-modal-promise": "^1.0.2", "react-virtuoso": "^4.10.1", + "torrent-parser": "^1.2.0", "tough-cookie": "^5.0.0", "typescript": "5.1.6" }, @@ -1687,15 +1688,6 @@ "node": ">=6.9.0" } }, - "node_modules/@discoveryjs/json-ext": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", - "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", - "license": "MIT", - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -1917,15 +1909,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@next/bundle-analyzer": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/@next/bundle-analyzer/-/bundle-analyzer-15.0.1.tgz", - "integrity": "sha512-i/nCRBGBEkESPDpXJc+6SPLFDItnvTTJSaxiOvuNqHmQjQognRl3BANkKb3nWYy0V5rgzygxu++X349Z4dhs4Q==", - "license": "MIT", - "dependencies": { - "webpack-bundle-analyzer": "4.10.1" - } - }, "node_modules/@next/env": { "version": "14.2.13", "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.13.tgz", @@ -2183,12 +2166,6 @@ "url": "https://opencollective.com/unts" } }, - "node_modules/@polka/url": { - "version": "1.0.0-next.28", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.28.tgz", - "integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==", - "license": "MIT" - }, "node_modules/@radix-ui/primitive": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.1.tgz", @@ -4765,16 +4742,15 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/acorn-walk": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", - "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "node_modules/addic7ed-api": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/addic7ed-api/-/addic7ed-api-2.0.1.tgz", + "integrity": "sha512-TWwEvC3Tm8nrOjr+sOWuJ+yfNpCulVtsCn8N5ea9U+PlJC7LdpE4pPE6bRlJO0aRJ6mXwQFb1rrPt+GKDtTnSw==", "license": "MIT", "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" + "iconv-lite": "^0.6.3", + "langs": "^2.0.0", + "node-fetch": "^3.3.0" } }, "node_modules/agent-base": { @@ -5235,16 +5211,10 @@ } }, "node_modules/bencode": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/bencode/-/bencode-4.0.0.tgz", - "integrity": "sha512-AERXw18df0pF3ziGOCyUjqKZBVNH8HV3lBxnx5w0qtgMIk4a1wb9BkcCQbkp9Zstfrn/dzRwl7MmUHHocX3sRQ==", - "license": "MIT", - "dependencies": { - "uint8-util": "^2.2.2" - }, - "engines": { - "node": ">=12.20.0" - } + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/bencode/-/bencode-0.11.0.tgz", + "integrity": "sha512-x6qfVFALg1uFnGXrFYtiSE429Mdt+CTLnSIQVl+ZWAFae8QE+LICbD00S2JFl8tOPVU493U9Auxf1e26Pnhxng==", + "license": "MIT" }, "node_modules/bep53-range": { "version": "2.0.0", @@ -5789,12 +5759,6 @@ "node": ">= 12" } }, - "node_modules/debounce": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", - "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==", - "license": "MIT" - }, "node_modules/debug": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", @@ -6087,12 +6051,6 @@ "url": "https://github.com/fb55/domutils?sponsor=1" } }, - "node_modules/duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", - "license": "MIT" - }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -6302,6 +6260,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, "engines": { "node": ">=10" }, @@ -7385,21 +7344,6 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, - "node_modules/gzip-size": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", - "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", - "license": "MIT", - "dependencies": { - "duplexer": "^0.1.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -7485,12 +7429,6 @@ "node": ">= 0.4" } }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "license": "MIT" - }, "node_modules/htmlparser2": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", @@ -7935,15 +7873,6 @@ "node": ">=8" } }, - "node_modules/is-plain-object": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -8325,6 +8254,12 @@ "node": ">=4.0" } }, + "node_modules/langs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/langs/-/langs-2.0.0.tgz", + "integrity": "sha512-v4pxOBEQVN1WBTfB1crhTtxzNLZU9HPWgadlwzWKISJtt6Ku/CnpBrwVy+jFv8StjxsPfwPFzO0CMwdZLJ0/BA==", + "license": "MIT" + }, "node_modules/language-subtag-registry": { "version": "0.3.22", "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", @@ -8634,15 +8569,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/mrmime": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", - "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -9018,15 +8944,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/opener": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", - "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", - "license": "(WTFPL OR MIT)", - "bin": { - "opener": "bin/opener-bin.js" - } - }, "node_modules/optionator": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", @@ -9147,6 +9064,18 @@ "node": ">=8" } }, + "node_modules/parse-torrent/node_modules/bencode": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/bencode/-/bencode-4.0.0.tgz", + "integrity": "sha512-AERXw18df0pF3ziGOCyUjqKZBVNH8HV3lBxnx5w0qtgMIk4a1wb9BkcCQbkp9Zstfrn/dzRwl7MmUHHocX3sRQ==", + "license": "MIT", + "dependencies": { + "uint8-util": "^2.2.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, "node_modules/parse5": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.0.tgz", @@ -10221,20 +10150,6 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "node_modules/sirv": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", - "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", - "license": "MIT", - "dependencies": { - "@polka/url": "^1.0.0-next.24", - "mrmime": "^2.0.0", - "totalist": "^3.0.0" - }, - "engines": { - "node": ">= 10" - } - }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -10885,13 +10800,17 @@ "node": ">=8.0" } }, - "node_modules/totalist": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", - "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", - "license": "MIT", - "engines": { - "node": ">=6" + "node_modules/torrent-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/torrent-parser/-/torrent-parser-1.2.0.tgz", + "integrity": "sha512-H/veK6VzAxV+PViQK94Kz8WPfLn8XiV9QqzK+1KhAF/QUVXeVXrKmk/Zh3SVeeSh8W5RcqZJEaobZwm00EiTKA==", + "license": "ISC", + "dependencies": { + "bencode": "^0.11.0", + "lodash": "^4.17.4" + }, + "bin": { + "torrent-parser": "bin/torrent-parser.js" } }, "node_modules/tough-cookie": { @@ -11328,42 +11247,6 @@ } } }, - "node_modules/webpack-bundle-analyzer": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.1.tgz", - "integrity": "sha512-s3P7pgexgT/HTUSYgxJyn28A+99mmLq4HsJepMPzu0R8ImJc52QNqaFYW1Z2z2uIb1/J3eYgaAWVpaC+v/1aAQ==", - "license": "MIT", - "dependencies": { - "@discoveryjs/json-ext": "0.5.7", - "acorn": "^8.0.4", - "acorn-walk": "^8.0.0", - "commander": "^7.2.0", - "debounce": "^1.2.1", - "escape-string-regexp": "^4.0.0", - "gzip-size": "^6.0.0", - "html-escaper": "^2.0.2", - "is-plain-object": "^5.0.0", - "opener": "^1.5.2", - "picocolors": "^1.0.0", - "sirv": "^2.0.3", - "ws": "^7.3.1" - }, - "bin": { - "webpack-bundle-analyzer": "lib/bin/analyzer.js" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "license": "MIT", - "engines": { - "node": ">= 10" - } - }, "node_modules/webpack-sources": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", @@ -11910,27 +11793,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, - "node_modules/ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", - "license": "MIT", - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/yaml": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", @@ -12969,11 +12831,6 @@ "@babel/helper-validator-identifier": "^7.25.9" } }, - "@discoveryjs/json-ext": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", - "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==" - }, "@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -13139,14 +12996,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "@next/bundle-analyzer": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/@next/bundle-analyzer/-/bundle-analyzer-15.0.1.tgz", - "integrity": "sha512-i/nCRBGBEkESPDpXJc+6SPLFDItnvTTJSaxiOvuNqHmQjQognRl3BANkKb3nWYy0V5rgzygxu++X349Z4dhs4Q==", - "requires": { - "webpack-bundle-analyzer": "4.10.1" - } - }, "@next/env": { "version": "14.2.13", "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.13.tgz", @@ -13292,11 +13141,6 @@ "tslib": "^2.6.0" } }, - "@polka/url": { - "version": "1.0.0-next.28", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.28.tgz", - "integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==" - }, "@radix-ui/primitive": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.1.tgz", @@ -14683,12 +14527,14 @@ "dev": true, "requires": {} }, - "acorn-walk": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", - "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "addic7ed-api": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/addic7ed-api/-/addic7ed-api-2.0.1.tgz", + "integrity": "sha512-TWwEvC3Tm8nrOjr+sOWuJ+yfNpCulVtsCn8N5ea9U+PlJC7LdpE4pPE6bRlJO0aRJ6mXwQFb1rrPt+GKDtTnSw==", "requires": { - "acorn": "^8.11.0" + "iconv-lite": "^0.6.3", + "langs": "^2.0.0", + "node-fetch": "^3.3.0" } }, "agent-base": { @@ -15008,12 +14854,9 @@ "integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==" }, "bencode": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/bencode/-/bencode-4.0.0.tgz", - "integrity": "sha512-AERXw18df0pF3ziGOCyUjqKZBVNH8HV3lBxnx5w0qtgMIk4a1wb9BkcCQbkp9Zstfrn/dzRwl7MmUHHocX3sRQ==", - "requires": { - "uint8-util": "^2.2.2" - } + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/bencode/-/bencode-0.11.0.tgz", + "integrity": "sha512-x6qfVFALg1uFnGXrFYtiSE429Mdt+CTLnSIQVl+ZWAFae8QE+LICbD00S2JFl8tOPVU493U9Auxf1e26Pnhxng==" }, "bep53-range": { "version": "2.0.0", @@ -15378,11 +15221,6 @@ "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==" }, - "debounce": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", - "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==" - }, "debug": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", @@ -15584,11 +15422,6 @@ "domhandler": "^5.0.3" } }, - "duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==" - }, "eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -15753,7 +15586,8 @@ "escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true }, "eslint": { "version": "8.45.0", @@ -16522,14 +16356,6 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, - "gzip-size": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", - "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", - "requires": { - "duplexer": "^0.1.2" - } - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -16582,11 +16408,6 @@ "function-bind": "^1.1.2" } }, - "html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==" - }, "htmlparser2": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", @@ -16866,11 +16687,6 @@ "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true }, - "is-plain-object": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" - }, "is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -17128,6 +16944,11 @@ "object.values": "^1.1.6" } }, + "langs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/langs/-/langs-2.0.0.tgz", + "integrity": "sha512-v4pxOBEQVN1WBTfB1crhTtxzNLZU9HPWgadlwzWKISJtt6Ku/CnpBrwVy+jFv8StjxsPfwPFzO0CMwdZLJ0/BA==" + }, "language-subtag-registry": { "version": "0.3.22", "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", @@ -17338,11 +17159,6 @@ "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true }, - "mrmime": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", - "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==" - }, "ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -17585,11 +17401,6 @@ "is-wsl": "^2.2.0" } }, - "opener": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", - "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==" - }, "optionator": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", @@ -17652,6 +17463,16 @@ "magnet-uri": "^7.0.5", "queue-microtask": "^1.2.3", "uint8-util": "^2.2.5" + }, + "dependencies": { + "bencode": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/bencode/-/bencode-4.0.0.tgz", + "integrity": "sha512-AERXw18df0pF3ziGOCyUjqKZBVNH8HV3lBxnx5w0qtgMIk4a1wb9BkcCQbkp9Zstfrn/dzRwl7MmUHHocX3sRQ==", + "requires": { + "uint8-util": "^2.2.2" + } + } } }, "parse-torrent-title": { @@ -18347,16 +18168,6 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "sirv": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", - "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", - "requires": { - "@polka/url": "^1.0.0-next.24", - "mrmime": "^2.0.0", - "totalist": "^3.0.0" - } - }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -18788,10 +18599,14 @@ "is-number": "^7.0.0" } }, - "totalist": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", - "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==" + "torrent-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/torrent-parser/-/torrent-parser-1.2.0.tgz", + "integrity": "sha512-H/veK6VzAxV+PViQK94Kz8WPfLn8XiV9QqzK+1KhAF/QUVXeVXrKmk/Zh3SVeeSh8W5RcqZJEaobZwm00EiTKA==", + "requires": { + "bencode": "^0.11.0", + "lodash": "^4.17.4" + } }, "tough-cookie": { "version": "5.0.0", @@ -19104,33 +18919,6 @@ } } }, - "webpack-bundle-analyzer": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.1.tgz", - "integrity": "sha512-s3P7pgexgT/HTUSYgxJyn28A+99mmLq4HsJepMPzu0R8ImJc52QNqaFYW1Z2z2uIb1/J3eYgaAWVpaC+v/1aAQ==", - "requires": { - "@discoveryjs/json-ext": "0.5.7", - "acorn": "^8.0.4", - "acorn-walk": "^8.0.0", - "commander": "^7.2.0", - "debounce": "^1.2.1", - "escape-string-regexp": "^4.0.0", - "gzip-size": "^6.0.0", - "html-escaper": "^2.0.2", - "is-plain-object": "^5.0.0", - "opener": "^1.5.2", - "picocolors": "^1.0.0", - "sirv": "^2.0.3", - "ws": "^7.3.1" - }, - "dependencies": { - "commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==" - } - } - }, "webpack-sources": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", @@ -19525,12 +19313,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, - "ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", - "requires": {} - }, "yaml": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", diff --git a/package.json b/package.json index e5ad096..064e20b 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "prepare": "husky" }, "dependencies": { - "@next/bundle-analyzer": "^15.0.1", "@radix-ui/react-dialog": "^1.1.1", "@radix-ui/react-dropdown-menu": "^2.1.2", "@radix-ui/react-slot": "^1.0.2", @@ -35,6 +34,7 @@ "react-dom": "^18.3.1", "react-modal-promise": "^1.0.2", "react-virtuoso": "^4.10.1", + "torrent-parser": "^1.2.0", "tough-cookie": "^5.0.0", "typescript": "5.1.6" }, diff --git a/public/sw.js b/public/sw.js index c7869c8..b2c614c 100644 --- a/public/sw.js +++ b/public/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const n=(n,a)=>(n=new URL(n+".js",a).href,s[n]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=s,document.head.appendChild(e)}else e=n,importScripts(n),s()})).then((()=>{let e=s[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e})));self.define=(a,i)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let c={};const d=e=>n(e,t),r={module:{uri:t},exports:c,require:d};s[t]=Promise.all(a.map((e=>r[e]||d(e)))).then((e=>(i(...e),c)))}}define(["./workbox-4754cb34"],(function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/_next/app-build-manifest.json",revision:"dcb899daa80bc934a3ecade6253ee1ed"},{url:"/_next/static/Gudd5VBBSvZZ12qeh1ETn/_buildManifest.js",revision:"2ec694eb52ae4f523f265a46bae4d768"},{url:"/_next/static/Gudd5VBBSvZZ12qeh1ETn/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/_next/static/chunks/106-e4df334a8b6054b2.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/141-78e4a62a9eb9ec3f.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/152.e619d8b05424829e.js",revision:"e619d8b05424829e"},{url:"/_next/static/chunks/23-e95fe3862375276d.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/26.286553a5ff2812fc.js",revision:"286553a5ff2812fc"},{url:"/_next/static/chunks/276.c3c1130f2adade69.js",revision:"c3c1130f2adade69"},{url:"/_next/static/chunks/344.05938a041227e582.js",revision:"05938a041227e582"},{url:"/_next/static/chunks/37-f6e2aef0dac1a9f4.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/383.78d47f7582340f53.js",revision:"78d47f7582340f53"},{url:"/_next/static/chunks/460.ac20021c7496f1d6.js",revision:"ac20021c7496f1d6"},{url:"/_next/static/chunks/497.a16beaad36f500fe.js",revision:"a16beaad36f500fe"},{url:"/_next/static/chunks/61.e269d4a699fba0b6.js",revision:"e269d4a699fba0b6"},{url:"/_next/static/chunks/621-fa4d2ff1cf645813.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/673.362c29137dd3e968.js",revision:"362c29137dd3e968"},{url:"/_next/static/chunks/695.156d21364de6e419.js",revision:"156d21364de6e419"},{url:"/_next/static/chunks/755.5cd959eac5682527.js",revision:"5cd959eac5682527"},{url:"/_next/static/chunks/792.b51012549074b93f.js",revision:"b51012549074b93f"},{url:"/_next/static/chunks/810.6105e84414768b0d.js",revision:"6105e84414768b0d"},{url:"/_next/static/chunks/922.9ce4bf0553cfb724.js",revision:"9ce4bf0553cfb724"},{url:"/_next/static/chunks/957-cf3bd689bca85766.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/app/(site)/favorites/page-d86c7d4a1199f6f8.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/app/(site)/loading-96645736797edde7.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/app/(site)/page-b499ead7e2cdc81d.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/app/(site)/popular/page-93e45ee4639153d3.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/app/(site)/similar/page-ac3a3684c680a706.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/app/(site)/starring/page-094a3d3ffd1a9d9a.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/app/(site)/top/page-4f8983666984d5a3.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/app/(site)/watch-list/page-435498eb058fe335.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/app/_not-found/page-aa0c8e90320336c2.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/app/layout-173f4f7aa920ea6a.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/c8bcbd21.63daf74955ffea8b.js",revision:"63daf74955ffea8b"},{url:"/_next/static/chunks/fd9d1056-bdf7d185613ab264.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/framework-f66176bb897dc684.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/main-96338ebd2bd5e4cc.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/main-app-51cdaff1a81e6b49.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/pages/_app-6a626577ffa902a4.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/pages/_error-1be831200e60c5c0.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/chunks/polyfills-42372ed130431b0a.js",revision:"846118c33b2c0e922d7b3a7676f81f6f"},{url:"/_next/static/chunks/webpack-30179fe338029346.js",revision:"Gudd5VBBSvZZ12qeh1ETn"},{url:"/_next/static/css/0d5f6452b2682b9b.css",revision:"0d5f6452b2682b9b"},{url:"/_next/static/css/af880b2e4df9cb52.css",revision:"af880b2e4df9cb52"},{url:"/_next/static/media/46c21389e888bf13-s.woff2",revision:"272930c09ba14c81bb294be1fe18b049"},{url:"/_next/static/media/8888a3826f4a3af4-s.p.woff2",revision:"792477d09826b11d1e5a611162c9797a"},{url:"/_next/static/media/eafabf029ad39a43-s.p.woff2",revision:"43751174b6b810eb169101a20d8c26f8"},{url:"/_next/static/media/f5767adec246cdc1-s.woff2",revision:"7a1c6501aa2b3327c1cf556362a851cb"},{url:"/apple-touch-icon.png",revision:"6ed7ad78b222698b2872b5a7f104fe08"},{url:"/favicon-48x48.png",revision:"d2db6eb5ce8ce1da63114250c9652da7"},{url:"/favicon.ico",revision:"d7c46eb2b2574863f72315ed861b1c99"},{url:"/favicon.svg",revision:"15b76ab693bd3a8320d8f8778332d396"},{url:"/manifest.json",revision:"5707bda32aaccb2ce142908f0baf8a1b"},{url:"/web-app-manifest-192x192.png",revision:"5d8538e4362b4ddbd7ff195fb24c25dc"},{url:"/web-app-manifest-512x512.png",revision:"e0a092cab607727cbe6f61adb0b1e6cf"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:s,event:n,state:a})=>s&&"opaqueredirect"===s.type?new Response(s.body,{status:200,statusText:"OK",headers:s.headers}):s}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp3|wav|ogg)$/i,new e.CacheFirst({cacheName:"static-audio-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp4)$/i,new e.CacheFirst({cacheName:"static-video-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;const s=e.pathname;return!s.startsWith("/api/auth/")&&!!s.startsWith("/api/")}),new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;return!e.pathname.startsWith("/api/")}),new e.NetworkFirst({cacheName:"others",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>!(self.origin===e.origin)),new e.NetworkFirst({cacheName:"cross-origin",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:3600})]}),"GET")})); +if(!self.define){let e,s={};const a=(a,i)=>(a=new URL(a+".js",i).href,s[a]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=a,e.onload=s,document.head.appendChild(e)}else e=a,importScripts(a),s()})).then((()=>{let e=s[a];if(!e)throw new Error(`Module ${a} didn’t register its module`);return e})));self.define=(i,n)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let c={};const r=e=>a(e,t),d={module:{uri:t},exports:c,require:r};s[t]=Promise.all(i.map((e=>d[e]||r(e)))).then((e=>(n(...e),c)))}}define(["./workbox-4754cb34"],(function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/_next/app-build-manifest.json",revision:"66340b5db798bcae1a642885e64cd821"},{url:"/_next/static/chunks/139-b4e6a1746bb8b121.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/152.3bffe565de0b275e.js",revision:"3bffe565de0b275e"},{url:"/_next/static/chunks/209-017fd57ea964c1ad.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/23-e95fe3862375276d.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/26.286553a5ff2812fc.js",revision:"286553a5ff2812fc"},{url:"/_next/static/chunks/276.c3c1130f2adade69.js",revision:"c3c1130f2adade69"},{url:"/_next/static/chunks/305-b973937e3a05106a.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/344.05938a041227e582.js",revision:"05938a041227e582"},{url:"/_next/static/chunks/383.78d47f7582340f53.js",revision:"78d47f7582340f53"},{url:"/_next/static/chunks/460.ac20021c7496f1d6.js",revision:"ac20021c7496f1d6"},{url:"/_next/static/chunks/497.a16beaad36f500fe.js",revision:"a16beaad36f500fe"},{url:"/_next/static/chunks/61.e269d4a699fba0b6.js",revision:"e269d4a699fba0b6"},{url:"/_next/static/chunks/621-fa4d2ff1cf645813.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/673.362c29137dd3e968.js",revision:"362c29137dd3e968"},{url:"/_next/static/chunks/695.156d21364de6e419.js",revision:"156d21364de6e419"},{url:"/_next/static/chunks/755.5cd959eac5682527.js",revision:"5cd959eac5682527"},{url:"/_next/static/chunks/792.b51012549074b93f.js",revision:"b51012549074b93f"},{url:"/_next/static/chunks/810.6105e84414768b0d.js",revision:"6105e84414768b0d"},{url:"/_next/static/chunks/922.9ce4bf0553cfb724.js",revision:"9ce4bf0553cfb724"},{url:"/_next/static/chunks/931-be9a8cfc748a35be.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/app/(site)/favorites/page-49ed09441e28f9f8.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/app/(site)/loading-96645736797edde7.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/app/(site)/page-e6a63cfd3bebb325.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/app/(site)/popular/page-050c2f1a9ec0177c.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/app/(site)/similar/page-6bce557a9fe61889.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/app/(site)/starring/page-d3c2aba0a8ddf3f7.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/app/(site)/top/page-c81e4ef7f6bae95d.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/app/(site)/watch-list/page-f98db390fd077a72.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/app/_not-found/page-aa0c8e90320336c2.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/app/layout-7a6507735703bbe8.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/c8bcbd21.63daf74955ffea8b.js",revision:"63daf74955ffea8b"},{url:"/_next/static/chunks/fd9d1056-bdf7d185613ab264.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/framework-f66176bb897dc684.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/main-6d2460f512032b99.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/main-app-51cdaff1a81e6b49.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/pages/_app-6a626577ffa902a4.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/pages/_error-1be831200e60c5c0.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/chunks/polyfills-42372ed130431b0a.js",revision:"846118c33b2c0e922d7b3a7676f81f6f"},{url:"/_next/static/chunks/webpack-d508fdfc653a9115.js",revision:"kviqPM4M8-k6Bb4da0rI9"},{url:"/_next/static/css/0d5f6452b2682b9b.css",revision:"0d5f6452b2682b9b"},{url:"/_next/static/css/30fc28b4ca88767d.css",revision:"30fc28b4ca88767d"},{url:"/_next/static/kviqPM4M8-k6Bb4da0rI9/_buildManifest.js",revision:"2ec694eb52ae4f523f265a46bae4d768"},{url:"/_next/static/kviqPM4M8-k6Bb4da0rI9/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/_next/static/media/a9b1453781eac9e6-s.p.woff2",revision:"c754cf60aba699077f00948285bf54b5"},{url:"/_next/static/media/dd843ebd3ff03195-s.p.woff2",revision:"333341dc4117f45b7fcee6b5223a56db"},{url:"/_next/static/media/e9ecf55e71a874cd-s.woff2",revision:"62348655e2d5baed97a39f0590491d09"},{url:"/apple-touch-icon.png",revision:"6ed7ad78b222698b2872b5a7f104fe08"},{url:"/favicon-48x48.png",revision:"d2db6eb5ce8ce1da63114250c9652da7"},{url:"/favicon.ico",revision:"d7c46eb2b2574863f72315ed861b1c99"},{url:"/favicon.svg",revision:"15b76ab693bd3a8320d8f8778332d396"},{url:"/manifest.json",revision:"5707bda32aaccb2ce142908f0baf8a1b"},{url:"/web-app-manifest-192x192.png",revision:"5d8538e4362b4ddbd7ff195fb24c25dc"},{url:"/web-app-manifest-512x512.png",revision:"e0a092cab607727cbe6f61adb0b1e6cf"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:s,event:a,state:i})=>s&&"opaqueredirect"===s.type?new Response(s.body,{status:200,statusText:"OK",headers:s.headers}):s}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp3|wav|ogg)$/i,new e.CacheFirst({cacheName:"static-audio-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp4)$/i,new e.CacheFirst({cacheName:"static-video-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;const s=e.pathname;return!s.startsWith("/api/auth/")&&!!s.startsWith("/api/")}),new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;return!e.pathname.startsWith("/api/")}),new e.NetworkFirst({cacheName:"others",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>!(self.origin===e.origin)),new e.NetworkFirst({cacheName:"cross-origin",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:3600})]}),"GET")}));