From 1111712d2c3c5dbf5c37a34951b790d7abc7ad92 Mon Sep 17 00:00:00 2001 From: ner Date: Sat, 26 Oct 2024 15:11:23 +0300 Subject: [PATCH] fix: toloka auth --- api/index.ts | 4 +- api/parsers/tlk/index.ts | 121 ++++ api/parsers/toloka.ts | 82 --- api/parsers/{pirate-bay.ts => tpb/index.ts} | 51 +- api/parsers/yts/index.ts | 5 +- app/api/torrents/route.ts | 7 +- .../components/TableHeadSortable/index.tsx | 5 +- env.example | 3 + hooks/useSession.ts | 2 +- package-lock.json | 552 ++++++++++++++---- package.json | 7 +- public/sw.js | 2 +- types.d.ts | 2 +- 13 files changed, 613 insertions(+), 230 deletions(-) create mode 100644 api/parsers/tlk/index.ts delete mode 100644 api/parsers/toloka.ts rename api/parsers/{pirate-bay.ts => tpb/index.ts} (52%) diff --git a/api/index.ts b/api/index.ts index 8e2cda1..a4f7114 100644 --- a/api/index.ts +++ b/api/index.ts @@ -5,7 +5,7 @@ import { cookies } from 'next/headers'; import { createUniqueRandomGenerator } from '@/lib/utils'; import mapMoviesSeriesResponseToShows, { mapMovieSeriesToShow } from './dto/Show'; -import toloka from './parsers/toloka'; +import tlk from './parsers/tlk'; import http from './Http'; const session = () => cookies().get('session')?.value; @@ -235,4 +235,4 @@ export const credits = async ({ }); }; -export const fetchTLKMagnet = async (url: string) => toloka.magnet(url); +export const fetchTLKMagnet = async (url: string) => tlk.magnet(url); diff --git a/api/parsers/tlk/index.ts b/api/parsers/tlk/index.ts new file mode 100644 index 0000000..1c8d0ce --- /dev/null +++ b/api/parsers/tlk/index.ts @@ -0,0 +1,121 @@ +import axios, { AxiosInstance } from 'axios'; +import parseTorrent from 'parse-torrent'; +import torrentTitle from 'parse-torrent-title'; +import { load } from 'cheerio'; + +import { CookieJar } from 'tough-cookie'; +import { wrapper } from 'axios-cookiejar-support'; + +import { Sort } from '../index'; + +export class Toloka { + private client: AxiosInstance; + private host: string; + private sort = { + [Sort.size]: 7, + [Sort.seeds]: 10 + }; + + private magnets: Record = {}; + + cookieJar = new CookieJar(); + + constructor() { + this.host = process.env.TOLOKA_HOST || 'https://toloka.to'; + + this.client = wrapper( + axios.create({ + jar: this.cookieJar, + baseURL: this.host, + withCredentials: true + }) + ); + } + + async isAuthorized(data: string) { + return !load(data)('[href="/login.php"]').length; + } + + async auth() { + const data = new FormData(); + + data.append('username', process.env.TOLOKA_USERNAME as string); + data.append('password', process.env.TOLOKA_PASSWORD as string); + data.append('autologin', 'on'); + data.append('ssl', 'on'); + data.append('login', 'Вхід'); + + await this.client.post('/login.php', data, { + headers: { 'Content-Type': 'multipart/form-data' } + }); + } + + async search({ query, sort = Sort.size }: { query: string; sort?: Sort }): Promise { + const fetchPage = () => this.client.get(`/tracker.php?o=${this.sort[sort]}&nm=${query}`); + + const parseTorrents = (data: string) => { + const $ = load(data); + const rows = $('.prow1, .prow2'); + + return rows + .map((_, row) => { + const originalTitle = $(row).find('td:nth-child(3)').text(); + const size = $(row).find('td:nth-child(7)').text(); + const seeders = $(row).find('td:nth-child(10)').text(); + const download = $(row).find('td:nth-child(6) a').attr('href'); + + const { year, source, codec, container, title, season, episode, resolution } = torrentTitle.parse( + originalTitle || '' + ); + + return { + year: year?.toString(), + source, + codec, + container, + originalTitle, + title: `${title}${season && episode ? ` [S${season}:E${episode}]` : ''}`, + id: originalTitle || '', + size, + seeders: parseInt(seeders || '0'), + quality: resolution, + magnet: '', + download + }; + }) + .get(); + }; + + let page = await fetchPage(); + + if (await this.isAuthorized(page.data)) return parseTorrents(page.data); + + await this.auth(); + + page = await fetchPage(); + + return parseTorrents(page.data); + } + + async magnet(url: string): Promise { + if (this.magnets[url]) return this.magnets[url]; + + const { data } = await this.client.get(`/${url}`, { + responseType: 'arraybuffer' + }); + + const torrent = await parseTorrent(data); + + const magnet = `magnet:?xt=urn:btih:${torrent.infoHash}&dn=${encodeURIComponent( + torrent.name as string + )}&tr=${torrent.announce?.join('&tr=')}`; + + this.magnets[url] = magnet; + + return magnet; + } +} + +const parser = new Toloka(); + +export default parser; diff --git a/api/parsers/toloka.ts b/api/parsers/toloka.ts deleted file mode 100644 index d6d1348..0000000 --- a/api/parsers/toloka.ts +++ /dev/null @@ -1,82 +0,0 @@ -import axios, { AxiosInstance } from 'axios'; -import { parse } from 'node-html-parser'; -import parseTorrent from 'parse-torrent'; -import torrentTitle from 'parse-torrent-title'; - -import { Sort } from './index'; - -export class Toloka { - private client: AxiosInstance; - private sort = { - [Sort.size]: 7, - [Sort.seeds]: 10 - }; - - private magnets: Record = {}; - - constructor(private host: string = process.env.TOLOKA_HOST || 'https://toloka.to') { - this.host = host; - this.client = axios.create({ - baseURL: this.host, - headers: { Cookie: 'toloka_sid=e9693224d00c5b60af50c2596d1b880d; toloka_ssl=1' } - }); - } - - async search({ query, sort = Sort.size }: { query: string; sort?: Sort }): Promise { - return this.client.get(`/tracker.php?o=${this.sort[sort]}&nm=${query}`).then(({ data }) => { - const html = parse(data); - const rows = html?.querySelectorAll('.prow1, .prow2'); - - console.log(data); - - return rows?.length - ? (rows?.map((row) => { - const originalTitle = row.querySelector('td:nth-child(3)')?.innerText; - const size = row.querySelector('td:nth-child(7)')?.innerText; - const seeders = row.querySelector('td:nth-child(10)')?.innerText; - const download = row.querySelector('td:nth-child(6) a')?.getAttribute('href'); - - const { year, source, codec, container, title, season, episode, resolution } = torrentTitle.parse( - originalTitle || '' - ); - - return { - year, - source, - codec, - container, - originalTitle, - title: `${title}${season && episode ? ` [S${season}:E${episode}]` : ''}`, - id: originalTitle, - size, - seeders: parseInt(seeders || '0'), - quality: resolution, - magnet: '', - download - }; - }) as Torrent[]) - : data; - }); - } - - async magnet(url: string): Promise { - if (this.magnets[url]) return this.magnets[url]; - const { data } = await this.client.get(`/${url}`, { - responseType: 'arraybuffer' - }); - - const torrent = await parseTorrent(data); - - const magnet = `magnet:?xt=urn:btih:${torrent.infoHash}&dn=${encodeURIComponent( - torrent.name as string - )}&tr=${torrent.announce?.join('&tr=')}`; - - this.magnets[url] = magnet; - - return magnet; - } -} - -const parser = new Toloka(); - -export default parser; diff --git a/api/parsers/pirate-bay.ts b/api/parsers/tpb/index.ts similarity index 52% rename from api/parsers/pirate-bay.ts rename to api/parsers/tpb/index.ts index d80a511..d7bd681 100644 --- a/api/parsers/pirate-bay.ts +++ b/api/parsers/tpb/index.ts @@ -1,18 +1,20 @@ import axios, { AxiosInstance } from 'axios'; -import { parse } from 'node-html-parser'; +import { load } from 'cheerio'; import torrentTitle from 'parse-torrent-title'; -import { Sort } from './index'; +import { Sort } from '../index'; export class PirateBay { private client: AxiosInstance; + private host: string; private sort = { [Sort.size]: 5, [Sort.seeds]: 7 }; - constructor(private host: string = process.env.PIRATE_BAY_HOST || 'https://thepiratebay10.org') { - this.host = host; + constructor() { + this.host = process.env.PIRATE_BAY_HOST || 'https://thepiratebay10.info'; + this.client = axios.create({ baseURL: this.host }); @@ -30,23 +32,28 @@ export class PirateBay { sort?: Sort; }): Promise { return this.client.post(`/search/${query}/${page}/${this.sort[sort]}/${category}`, null).then(({ data }) => { - const html = parse(data); - const table = html?.getElementById('searchResult'); - const rows = table?.querySelectorAll('tr:not(.header)'); + const $ = load(data); + const table = $('#searchResult'); + const rows = table.find('tr:not(.header)'); - const titles = rows?.map((row) => row.querySelector('td:nth-child(2) a')?.innerText).filter(Boolean); - const seeders = rows?.map((row) => row.querySelector('td:nth-child(6)')?.innerText); + const titles = rows + .map((_, row) => $(row).find('td:nth-child(2) a').text()) + .get() + .filter(Boolean); + const seeders = rows.map((_, row) => $(row).find('td:nth-child(6)').text()).get(); - const sizes = rows?.reduce((sizes, row) => { - const size = row.querySelector('td:nth-child(5)')?.innerText; + const sizes = rows + .map((_, row) => { + const size = $(row).find('td:nth-child(5)').text(); + return size ? size.replace(' ', ' ').replace('Size ', '') : null; + }) + .get() + .filter(Boolean); - if (!size) return sizes; - - sizes.push(size.replace(' ', ' ').replace('Size ', '')); - return sizes; - }, [] as string[]); - - const magnets = table?.querySelectorAll('a[href^="magnet:"]').map((link) => link.getAttribute('href')); + const magnets = table + .find('a[href^="magnet:"]') + .map((_, link) => $(link).attr('href')) + .get(); return titles.map((originalTitle, index) => { const { title, resolution, source, codec, container, season, episode, year } = torrentTitle.parse( @@ -54,7 +61,7 @@ export class PirateBay { ); return { - year, + year: year?.toString(), source, codec, container, @@ -62,11 +69,11 @@ export class PirateBay { title: `${title} ${season && episode ? `[S${season}:E${episode}]` : ''}`, id: title, size: sizes[index], - seeders: parseInt(seeders[index]!), + seeders: parseInt(seeders[index] || '0', 10), quality: resolution, - magnet: magnets[index]! + magnet: magnets[index] || '' }; - }) as Torrent[]; + }); }); } } diff --git a/api/parsers/yts/index.ts b/api/parsers/yts/index.ts index 1b7c1ac..6cf37cd 100644 --- a/api/parsers/yts/index.ts +++ b/api/parsers/yts/index.ts @@ -6,8 +6,11 @@ import { YTSResponse } from './models'; export class YTS { private client: AxiosInstance; + private host: string; + + constructor() { + this.host = process.env.YTS_HOST || 'https://yts.mx/api/v2/list_movies.json'; - constructor(private host: string = process.env.YTS_HOST || 'https://yts.mx/api/v2/list_movies.json') { this.client = axios.create({ baseURL: this.host }); diff --git a/app/api/torrents/route.ts b/app/api/torrents/route.ts index 59ef646..0f4b9db 100644 --- a/app/api/torrents/route.ts +++ b/app/api/torrents/route.ts @@ -1,17 +1,18 @@ import { NextRequest, NextResponse } from 'next/server'; import { Sort } from '@/api/parsers'; -import pirateBay from '@/api/parsers/pirate-bay'; -import toloka from '@/api/parsers/toloka'; +import tlk from '@/api/parsers/tlk'; +import tpb from '@/api/parsers/tpb'; import yts from '@/api/parsers/yts'; export async function GET({ nextUrl: { searchParams } }: NextRequest) { const key = searchParams.get('key') as keyof typeof providers; + const imdbID = searchParams.get('imdbID') as string; const query = searchParams.get('query') as string; const sort = searchParams.get('sort') as Sort; - const providers = { yts: yts, tpb: pirateBay, tlk: toloka }; + const providers = { yts, tpb, tlk }; try { return NextResponse.json(await providers[key].search({ imdbID, query, sort })); diff --git a/components/Preview/components/Torrents/components/TableHeadSortable/index.tsx b/components/Preview/components/Torrents/components/TableHeadSortable/index.tsx index ddd069e..56b65e9 100644 --- a/components/Preview/components/Torrents/components/TableHeadSortable/index.tsx +++ b/components/Preview/components/Torrents/components/TableHeadSortable/index.tsx @@ -1,5 +1,5 @@ import { FC } from 'react'; -import { ArrowDownIcon, ArrowUpIcon } from 'lucide-react'; +import { ArrowDownIcon } from 'lucide-react'; import { Sort } from '@/api/parsers'; import { TableHead } from '@/components/ui/table'; @@ -21,8 +21,7 @@ const TableHeadSortable: FC = ({ title, sort, value, sortable, className,
{title} - {sortable && - (sort === value ? : )} + {sortable && sort === value && }
); diff --git a/env.example b/env.example index db08ac6..b8dee0f 100644 --- a/env.example +++ b/env.example @@ -1,4 +1,7 @@ MOVIE_DB_TOKEN=YOUR_TOKEN PIRATE_BAY_HOST=https://thepiratebay10.org YTS_HOST=https://yts.mx/api/v2/list_movies.json +TOLOKA_HOST=https://toloka.to +TOLOKA_USERNAME=your_toloka_username +TOLOKA_PASSWORD=your_toloka_password NEXT_PUBLIC_TORRENT_PROXY=http://localhost:8090 \ No newline at end of file diff --git a/hooks/useSession.ts b/hooks/useSession.ts index 8ee37c8..7bc1e60 100644 --- a/hooks/useSession.ts +++ b/hooks/useSession.ts @@ -1,6 +1,6 @@ +import { useCallback } from 'react'; import { atom, useAtomValue, useSetAtom } from 'jotai'; import Cookies from 'js-cookie'; -import { useCallback } from 'react'; const sessionAtom = atom(Cookies.get('session') as string); diff --git a/package-lock.json b/package-lock.json index e6b653c..7ab7e0f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,8 +15,11 @@ "@radix-ui/react-tabs": "^1.0.4", "@radix-ui/react-toast": "^1.2.2", "@tanstack/react-query": "^5.59.15", + "@types/cheerio": "^0.22.35", "@vidstack/react": "^1.12.11", - "axios": "^1.4.0", + "axios": "^1.7.7", + "axios-cookiejar-support": "^5.0.3", + "cheerio": "^1.0.0", "class-variance-authority": "^0.7.0", "clsx": "^2.0.0", "jotai": "^2.2.2", @@ -30,6 +33,7 @@ "react-dom": "^18.3.1", "react-modal-promise": "^1.0.2", "react-virtuoso": "^4.10.1", + "tough-cookie": "^5.0.0", "typescript": "5.1.6" }, "devDependencies": { @@ -46,7 +50,6 @@ "eslint-plugin-simple-import-sort": "^10.0.0", "eslint-plugin-tailwindcss": "^3.17.4", "husky": "^9.1.6", - "node-html-parser": "^6.1.5", "parse-torrent-title": "^1.4.0", "postcss": "^8.4.27", "prettier": "^3.0.0", @@ -4299,6 +4302,15 @@ "node": ">=0.2.6" } }, + "node_modules/@types/cheerio": { + "version": "0.22.35", + "resolved": "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.35.tgz", + "integrity": "sha512-yD57BchKRvTV+JD53UZ6PD8KWY5g5rvvMLRnZR3EQBCZXiDT/HR+pKpMzFGlWNhFrXlo7VPZXtKvIEwZkAWOIA==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -4765,6 +4777,18 @@ "node": ">=0.4.0" } }, + "node_modules/agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "license": "MIT", + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -5091,15 +5115,35 @@ } }, "node_modules/axios": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.5.tgz", - "integrity": "sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } }, + "node_modules/axios-cookiejar-support": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/axios-cookiejar-support/-/axios-cookiejar-support-5.0.3.tgz", + "integrity": "sha512-nYbMJ9ZVbV4CMgLOritOvC95oshEO6yTFFRucdhg98OtxjieGl5G12V2r/JZ9/ReFOWjRO+xQjXLQ/FzoXt6Zw==", + "license": "MIT", + "dependencies": { + "http-cookie-agent": "^6.0.6" + }, + "engines": { + "node": ">=18.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/3846masa" + }, + "peerDependencies": { + "axios": ">=0.20.0", + "tough-cookie": ">=4.0.0" + } + }, "node_modules/axobject-query": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz", @@ -5241,8 +5285,7 @@ "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "dev": true + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" }, "node_modules/bplist-parser": { "version": "0.2.0", @@ -5415,6 +5458,67 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/cheerio": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0.tgz", + "integrity": "sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==", + "license": "MIT", + "dependencies": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.1.0", + "encoding-sniffer": "^0.2.0", + "htmlparser2": "^9.1.0", + "parse5": "^7.1.2", + "parse5-htmlparser2-tree-adapter": "^7.0.0", + "parse5-parser-stream": "^7.1.2", + "undici": "^6.19.5", + "whatwg-mimetype": "^4.0.0" + }, + "engines": { + "node": ">=18.17" + }, + "funding": { + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + } + }, + "node_modules/cheerio-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/cheerio/node_modules/htmlparser2": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.1.0.tgz", + "integrity": "sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==", + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.1.0", + "entities": "^4.5.0" + } + }, "node_modules/chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -5631,7 +5735,6 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", - "dev": true, "dependencies": { "boolbase": "^1.0.0", "css-what": "^6.1.0", @@ -5647,7 +5750,6 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", - "dev": true, "engines": { "node": ">= 6" }, @@ -5938,7 +6040,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, "dependencies": { "domelementtype": "^2.3.0", "domhandler": "^5.0.2", @@ -5952,7 +6053,6 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, "funding": [ { "type": "github", @@ -5964,7 +6064,6 @@ "version": "5.0.3", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, "dependencies": { "domelementtype": "^2.3.0" }, @@ -5979,7 +6078,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", - "dev": true, "dependencies": { "dom-serializer": "^2.0.0", "domelementtype": "^2.3.0", @@ -6036,6 +6134,19 @@ "node": ">= 4" } }, + "node_modules/encoding-sniffer": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.0.tgz", + "integrity": "sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==", + "license": "MIT", + "dependencies": { + "iconv-lite": "^0.6.3", + "whatwg-encoding": "^3.1.1" + }, + "funding": { + "url": "https://github.com/fb55/encoding-sniffer?sponsor=1" + } + }, "node_modules/enhanced-resolve": { "version": "5.17.1", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", @@ -6053,7 +6164,6 @@ "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, "engines": { "node": ">=0.12" }, @@ -7375,15 +7485,6 @@ "node": ">= 0.4" } }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -7410,6 +7511,30 @@ "entities": "^4.4.0" } }, + "node_modules/http-cookie-agent": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/http-cookie-agent/-/http-cookie-agent-6.0.6.tgz", + "integrity": "sha512-XkwhYUWo0yhiHBWqLmAe2kIBymVY70ewi9sKmy6YBHpNU3BCH4nipKrtY5/effAxj0qneQ9ziZG5TXgaKLfYgg==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.1" + }, + "engines": { + "node": ">=18.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/3846masa" + }, + "peerDependencies": { + "tough-cookie": "^4.0.0 || ^5.0.0", + "undici": "^5.11.0 || ^6.0.0" + }, + "peerDependenciesMeta": { + "undici": { + "optional": true + } + } + }, "node_modules/human-signals": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", @@ -7435,6 +7560,18 @@ "url": "https://github.com/sponsors/typicode" } }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/idb": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/idb/-/idb-7.1.1.tgz", @@ -8326,18 +8463,6 @@ "loose-envify": "cli.js" } }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/lucide-react": { "version": "0.453.0", "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.453.0.tgz", @@ -8668,16 +8793,6 @@ "url": "https://opencollective.com/node-fetch" } }, - "node_modules/node-html-parser": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/node-html-parser/-/node-html-parser-6.1.5.tgz", - "integrity": "sha512-fAaM511feX++/Chnhe475a0NHD8M7AxDInsqQpz6x63GRF7xYNdS8Vo5dKsIVPgsOvG7eioRRTZQnWBrhDHBSg==", - "dev": true, - "dependencies": { - "css-select": "^5.1.0", - "he": "1.2.0" - } - }, "node_modules/node-releases": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", @@ -8732,7 +8847,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "dev": true, "dependencies": { "boolbase": "^1.0.0" }, @@ -9033,6 +9147,43 @@ "node": ">=8" } }, + "node_modules/parse5": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.0.tgz", + "integrity": "sha512-ZkDsAOcxsUMZ4Lz5fVciOehNcJ+Gb8gTzcA4yl3wnc273BAybYWrQ+Ks/OjCjSEpjvQkDSeZbybK9qj2VHHdGA==", + "license": "MIT", + "dependencies": { + "entities": "^4.5.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz", + "integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==", + "license": "MIT", + "dependencies": { + "domhandler": "^5.0.3", + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-parser-stream": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz", + "integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==", + "license": "MIT", + "dependencies": { + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -9963,6 +10114,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, "node_modules/scheduler": { "version": "0.23.2", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", @@ -9990,13 +10147,11 @@ } }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -10701,6 +10856,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/tldts": { + "version": "6.1.55", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.55.tgz", + "integrity": "sha512-HxQR/9roQ07Pwc8RyyrJMAxRz5/ssoF3qIPPUiIo3zUt6yMdmYZjM2OZIFMiZ3jHyz9jrGHEHuQZrUhoc1LkDw==", + "license": "MIT", + "dependencies": { + "tldts-core": "^6.1.55" + }, + "bin": { + "tldts": "bin/cli.js" + } + }, + "node_modules/tldts-core": { + "version": "6.1.55", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.55.tgz", + "integrity": "sha512-BL+BuKHHaOpntE5BGI6naXjULU6aRlgaYdfDHR3T/hdbNTWkWUZ9yuc11wGnwgpvRwlyUiIK+QohYK3olaVU6Q==", + "license": "MIT" + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -10721,6 +10894,18 @@ "node": ">=6" } }, + "node_modules/tough-cookie": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.0.0.tgz", + "integrity": "sha512-FRKsF7cz96xIIeMZ82ehjC3xW2E+O2+v11udrDYewUbszngYhsGa8z6YUMMzO9QJZzzyd0nGGXnML/TReX6W8Q==", + "license": "BSD-3-Clause", + "dependencies": { + "tldts": "^6.1.32" + }, + "engines": { + "node": ">=16" + } + }, "node_modules/tr46": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", @@ -10894,6 +11079,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/undici": { + "version": "6.20.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.20.1.tgz", + "integrity": "sha512-AjQF1QsmqfJys+LXfGTNum+qw4S88CojRInG/6t31W/1fk6G59s92bnAvGz5Cmur+kQv2SURXEvvudLmbrE8QA==", + "license": "MIT", + "engines": { + "node": ">=18.17" + } + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", @@ -11223,6 +11417,27 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/whatwg-encoding": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "license": "MIT", + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-mimetype": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/whatwg-url": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", @@ -11716,12 +11931,6 @@ } } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/yaml": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", @@ -14106,6 +14315,14 @@ "uint8-util": "^2.2.5" } }, + "@types/cheerio": { + "version": "0.22.35", + "resolved": "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.35.tgz", + "integrity": "sha512-yD57BchKRvTV+JD53UZ6PD8KWY5g5rvvMLRnZR3EQBCZXiDT/HR+pKpMzFGlWNhFrXlo7VPZXtKvIEwZkAWOIA==", + "requires": { + "@types/node": "*" + } + }, "@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -14474,6 +14691,14 @@ "acorn": "^8.11.0" } }, + "agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "requires": { + "debug": "^4.3.4" + } + }, "ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -14701,15 +14926,23 @@ "dev": true }, "axios": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.5.tgz", - "integrity": "sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", "requires": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } }, + "axios-cookiejar-support": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/axios-cookiejar-support/-/axios-cookiejar-support-5.0.3.tgz", + "integrity": "sha512-nYbMJ9ZVbV4CMgLOritOvC95oshEO6yTFFRucdhg98OtxjieGl5G12V2r/JZ9/ReFOWjRO+xQjXLQ/FzoXt6Zw==", + "requires": { + "http-cookie-agent": "^6.0.6" + } + }, "axobject-query": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz", @@ -14807,8 +15040,7 @@ "boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "dev": true + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" }, "bplist-parser": { "version": "0.2.0", @@ -14909,6 +15141,50 @@ "supports-color": "^7.1.0" } }, + "cheerio": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0.tgz", + "integrity": "sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==", + "requires": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.1.0", + "encoding-sniffer": "^0.2.0", + "htmlparser2": "^9.1.0", + "parse5": "^7.1.2", + "parse5-htmlparser2-tree-adapter": "^7.0.0", + "parse5-parser-stream": "^7.1.2", + "undici": "^6.19.5", + "whatwg-mimetype": "^4.0.0" + }, + "dependencies": { + "htmlparser2": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.1.0.tgz", + "integrity": "sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==", + "requires": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.1.0", + "entities": "^4.5.0" + } + } + } + }, + "cheerio-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "requires": { + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + } + }, "chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -15067,7 +15343,6 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", - "dev": true, "requires": { "boolbase": "^1.0.0", "css-what": "^6.1.0", @@ -15079,8 +15354,7 @@ "css-what": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", - "dev": true + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==" }, "cssesc": { "version": "3.0.0", @@ -15281,7 +15555,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, "requires": { "domelementtype": "^2.3.0", "domhandler": "^5.0.2", @@ -15291,14 +15564,12 @@ "domelementtype": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==" }, "domhandler": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, "requires": { "domelementtype": "^2.3.0" } @@ -15307,7 +15578,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", - "dev": true, "requires": { "dom-serializer": "^2.0.0", "domelementtype": "^2.3.0", @@ -15349,6 +15619,15 @@ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" }, + "encoding-sniffer": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.0.tgz", + "integrity": "sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==", + "requires": { + "iconv-lite": "^0.6.3", + "whatwg-encoding": "^3.1.1" + } + }, "enhanced-resolve": { "version": "5.17.1", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", @@ -15361,8 +15640,7 @@ "entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==" }, "es-abstract": { "version": "1.22.1", @@ -16304,12 +16582,6 @@ "function-bind": "^1.1.2" } }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, "html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -16327,6 +16599,14 @@ "entities": "^4.4.0" } }, + "http-cookie-agent": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/http-cookie-agent/-/http-cookie-agent-6.0.6.tgz", + "integrity": "sha512-XkwhYUWo0yhiHBWqLmAe2kIBymVY70ewi9sKmy6YBHpNU3BCH4nipKrtY5/effAxj0qneQ9ziZG5TXgaKLfYgg==", + "requires": { + "agent-base": "^7.1.1" + } + }, "human-signals": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", @@ -16339,6 +16619,14 @@ "integrity": "sha512-sqbjZKK7kf44hfdE94EoX8MZNk0n7HeW37O4YrVGCF4wzgQjp+akPAkfUK5LZ6KuR/6sqeAVuXHji+RzQgOn5A==", "dev": true }, + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + }, "idb": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/idb/-/idb-7.1.1.tgz", @@ -16943,15 +17231,6 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, "lucide-react": { "version": "0.453.0", "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.453.0.tgz", @@ -17148,16 +17427,6 @@ "formdata-polyfill": "^4.0.10" } }, - "node-html-parser": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/node-html-parser/-/node-html-parser-6.1.5.tgz", - "integrity": "sha512-fAaM511feX++/Chnhe475a0NHD8M7AxDInsqQpz6x63GRF7xYNdS8Vo5dKsIVPgsOvG7eioRRTZQnWBrhDHBSg==", - "dev": true, - "requires": { - "css-select": "^5.1.0", - "he": "1.2.0" - } - }, "node-releases": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", @@ -17196,7 +17465,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "dev": true, "requires": { "boolbase": "^1.0.0" } @@ -17392,6 +17660,31 @@ "integrity": "sha512-/G0rQNeAUmNwB3QtyBJtNDAr1Q95Gg3wgwQ3dbYEkX8tOdkw5XmUS03O3+QqAV5hDNRVMatBG2fIoz+H/UMseQ==", "dev": true }, + "parse5": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.0.tgz", + "integrity": "sha512-ZkDsAOcxsUMZ4Lz5fVciOehNcJ+Gb8gTzcA4yl3wnc273BAybYWrQ+Ks/OjCjSEpjvQkDSeZbybK9qj2VHHdGA==", + "requires": { + "entities": "^4.5.0" + } + }, + "parse5-htmlparser2-tree-adapter": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz", + "integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==", + "requires": { + "domhandler": "^5.0.3", + "parse5": "^7.0.0" + } + }, + "parse5-parser-stream": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz", + "integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==", + "requires": { + "parse5": "^7.0.0" + } + }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -17976,6 +18269,11 @@ "is-regex": "^1.1.4" } }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, "scheduler": { "version": "0.23.2", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", @@ -17995,13 +18293,10 @@ } }, "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true }, "serialize-javascript": { "version": "6.0.2", @@ -18472,6 +18767,19 @@ "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", "dev": true }, + "tldts": { + "version": "6.1.55", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.55.tgz", + "integrity": "sha512-HxQR/9roQ07Pwc8RyyrJMAxRz5/ssoF3qIPPUiIo3zUt6yMdmYZjM2OZIFMiZ3jHyz9jrGHEHuQZrUhoc1LkDw==", + "requires": { + "tldts-core": "^6.1.55" + } + }, + "tldts-core": { + "version": "6.1.55", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.55.tgz", + "integrity": "sha512-BL+BuKHHaOpntE5BGI6naXjULU6aRlgaYdfDHR3T/hdbNTWkWUZ9yuc11wGnwgpvRwlyUiIK+QohYK3olaVU6Q==" + }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -18485,6 +18793,14 @@ "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==" }, + "tough-cookie": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.0.0.tgz", + "integrity": "sha512-FRKsF7cz96xIIeMZ82ehjC3xW2E+O2+v11udrDYewUbszngYhsGa8z6YUMMzO9QJZzzyd0nGGXnML/TReX6W8Q==", + "requires": { + "tldts": "^6.1.32" + } + }, "tr46": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", @@ -18615,6 +18931,11 @@ "which-boxed-primitive": "^1.0.2" } }, + "undici": { + "version": "6.20.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.20.1.tgz", + "integrity": "sha512-AjQF1QsmqfJys+LXfGTNum+qw4S88CojRInG/6t31W/1fk6G59s92bnAvGz5Cmur+kQv2SURXEvvudLmbrE8QA==" + }, "unicode-canonical-property-names-ecmascript": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", @@ -18816,6 +19137,19 @@ "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", "peer": true }, + "whatwg-encoding": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "requires": { + "iconv-lite": "0.6.3" + } + }, + "whatwg-mimetype": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==" + }, "whatwg-url": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", @@ -19197,12 +19531,6 @@ "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", "requires": {} }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "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 3faebcd..e5ad096 100644 --- a/package.json +++ b/package.json @@ -17,8 +17,11 @@ "@radix-ui/react-tabs": "^1.0.4", "@radix-ui/react-toast": "^1.2.2", "@tanstack/react-query": "^5.59.15", + "@types/cheerio": "^0.22.35", "@vidstack/react": "^1.12.11", - "axios": "^1.4.0", + "axios": "^1.7.7", + "axios-cookiejar-support": "^5.0.3", + "cheerio": "^1.0.0", "class-variance-authority": "^0.7.0", "clsx": "^2.0.0", "jotai": "^2.2.2", @@ -32,6 +35,7 @@ "react-dom": "^18.3.1", "react-modal-promise": "^1.0.2", "react-virtuoso": "^4.10.1", + "tough-cookie": "^5.0.0", "typescript": "5.1.6" }, "devDependencies": { @@ -48,7 +52,6 @@ "eslint-plugin-simple-import-sort": "^10.0.0", "eslint-plugin-tailwindcss": "^3.17.4", "husky": "^9.1.6", - "node-html-parser": "^6.1.5", "parse-torrent-title": "^1.4.0", "postcss": "^8.4.27", "prettier": "^3.0.0", diff --git a/public/sw.js b/public/sw.js index a8605b7..a3359a7 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 r=e=>n(e,t),o={module:{uri:t},exports:c,require:r};s[t]=Promise.all(a.map((e=>o[e]||r(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:"cc820509a568f1ed0928f084d3dab4e3"},{url:"/_next/static/Rmq9ZmYTV4UXCDEjS1N3T/_buildManifest.js",revision:"2ec694eb52ae4f523f265a46bae4d768"},{url:"/_next/static/Rmq9ZmYTV4UXCDEjS1N3T/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/_next/static/chunks/152.e619d8b05424829e.js",revision:"e619d8b05424829e"},{url:"/_next/static/chunks/23-e95fe3862375276d.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{url:"/_next/static/chunks/26.286553a5ff2812fc.js",revision:"286553a5ff2812fc"},{url:"/_next/static/chunks/276.c3c1130f2adade69.js",revision:"c3c1130f2adade69"},{url:"/_next/static/chunks/311-94835cadacd3eb37.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{url:"/_next/static/chunks/344.05938a041227e582.js",revision:"05938a041227e582"},{url:"/_next/static/chunks/37-f6e2aef0dac1a9f4.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{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:"Rmq9ZmYTV4UXCDEjS1N3T"},{url:"/_next/static/chunks/673.362c29137dd3e968.js",revision:"362c29137dd3e968"},{url:"/_next/static/chunks/693-2767062d917b3456.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{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-9f7dee59febd35c3.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{url:"/_next/static/chunks/app/(site)/favorites/page-597921ef02c719df.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{url:"/_next/static/chunks/app/(site)/loading-96645736797edde7.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{url:"/_next/static/chunks/app/(site)/page-892fa4f5465ef740.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{url:"/_next/static/chunks/app/(site)/popular/page-b702f4ec7f04f753.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{url:"/_next/static/chunks/app/(site)/similar/page-8d6944eecd2e9c66.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{url:"/_next/static/chunks/app/(site)/starring/page-24a06769f34865b3.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{url:"/_next/static/chunks/app/(site)/top/page-bccc8c4d6b946176.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{url:"/_next/static/chunks/app/(site)/watch-list/page-e3f529e210a2a8e9.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{url:"/_next/static/chunks/app/_not-found/page-aa0c8e90320336c2.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{url:"/_next/static/chunks/app/layout-6b9a018d3f0990aa.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{url:"/_next/static/chunks/c8bcbd21.63daf74955ffea8b.js",revision:"63daf74955ffea8b"},{url:"/_next/static/chunks/fd9d1056-bdf7d185613ab264.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{url:"/_next/static/chunks/framework-f66176bb897dc684.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{url:"/_next/static/chunks/main-65cc2be174f92f9a.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{url:"/_next/static/chunks/main-app-51cdaff1a81e6b49.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{url:"/_next/static/chunks/pages/_app-6a626577ffa902a4.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{url:"/_next/static/chunks/pages/_error-1be831200e60c5c0.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{url:"/_next/static/chunks/polyfills-42372ed130431b0a.js",revision:"846118c33b2c0e922d7b3a7676f81f6f"},{url:"/_next/static/chunks/webpack-522f7df141f474e5.js",revision:"Rmq9ZmYTV4UXCDEjS1N3T"},{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 n=(n,i)=>(n=new URL(n+".js",i).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=(i,t)=>{const a=e||("document"in self?document.currentScript.src:"")||location.href;if(s[a])return;let c={};const r=e=>n(e,a),o={module:{uri:a},exports:c,require:r};s[a]=Promise.all(i.map((e=>o[e]||r(e)))).then((e=>(t(...e),c)))}}define(["./workbox-4754cb34"],(function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/_next/app-build-manifest.json",revision:"9ca4cf4934614ee2884f54c0a4ae74f9"},{url:"/_next/static/chunks/106-e4df334a8b6054b2.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{url:"/_next/static/chunks/152.e619d8b05424829e.js",revision:"e619d8b05424829e"},{url:"/_next/static/chunks/23-e95fe3862375276d.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{url:"/_next/static/chunks/26.286553a5ff2812fc.js",revision:"286553a5ff2812fc"},{url:"/_next/static/chunks/276.c3c1130f2adade69.js",revision:"c3c1130f2adade69"},{url:"/_next/static/chunks/311-d98f807f8da8ea75.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{url:"/_next/static/chunks/344.05938a041227e582.js",revision:"05938a041227e582"},{url:"/_next/static/chunks/37-f6e2aef0dac1a9f4.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{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:"vcsU5PL_nCIbZtw1TiXgA"},{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-9f7dee59febd35c3.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{url:"/_next/static/chunks/app/(site)/favorites/page-2ad2720a689c7bf7.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{url:"/_next/static/chunks/app/(site)/loading-96645736797edde7.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{url:"/_next/static/chunks/app/(site)/page-550186c61d98ee57.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{url:"/_next/static/chunks/app/(site)/popular/page-0c29524eddadf350.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{url:"/_next/static/chunks/app/(site)/similar/page-1126cc975a9ba802.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{url:"/_next/static/chunks/app/(site)/starring/page-0fbb653750c18be1.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{url:"/_next/static/chunks/app/(site)/top/page-75f0b7e736133ad6.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{url:"/_next/static/chunks/app/(site)/watch-list/page-38ccba9f9dff3e6c.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{url:"/_next/static/chunks/app/_not-found/page-aa0c8e90320336c2.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{url:"/_next/static/chunks/app/layout-74481e5fe3b4935f.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{url:"/_next/static/chunks/c8bcbd21.63daf74955ffea8b.js",revision:"63daf74955ffea8b"},{url:"/_next/static/chunks/fd9d1056-bdf7d185613ab264.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{url:"/_next/static/chunks/framework-f66176bb897dc684.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{url:"/_next/static/chunks/main-65cc2be174f92f9a.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{url:"/_next/static/chunks/main-app-51cdaff1a81e6b49.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{url:"/_next/static/chunks/pages/_app-6a626577ffa902a4.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{url:"/_next/static/chunks/pages/_error-1be831200e60c5c0.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{url:"/_next/static/chunks/polyfills-42372ed130431b0a.js",revision:"846118c33b2c0e922d7b3a7676f81f6f"},{url:"/_next/static/chunks/webpack-522f7df141f474e5.js",revision:"vcsU5PL_nCIbZtw1TiXgA"},{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:"/_next/static/vcsU5PL_nCIbZtw1TiXgA/_buildManifest.js",revision:"2ec694eb52ae4f523f265a46bae4d768"},{url:"/_next/static/vcsU5PL_nCIbZtw1TiXgA/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{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: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")})); diff --git a/types.d.ts b/types.d.ts index ef95b8a..6c70e74 100644 --- a/types.d.ts +++ b/types.d.ts @@ -124,7 +124,7 @@ interface Torrent { title: string; originalTitle?: string; seeders: number; - size: string; + size?: string; magnet: string; quality?: string; source?: string;