home-atom 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -0
- package/bin/home-atom.js +135 -0
- package/dist/client/.vite/manifest.json +184 -0
- package/dist/client/_next/static/chunks/app-top-nav-Dh0jEt8u.js +1 -0
- package/dist/client/_next/static/chunks/chevron-left-Dn3noAqV.js +1 -0
- package/dist/client/_next/static/chunks/framework-BQUlGUOV.js +9 -0
- package/dist/client/_next/static/chunks/hls-CgexCc5Z.js +40 -0
- package/dist/client/_next/static/chunks/house-DQz6VeTk.js +1 -0
- package/dist/client/_next/static/chunks/index-hn3AiVww.js +33 -0
- package/dist/client/_next/static/chunks/layout-segment-context-DRM8YCgm.js +1 -0
- package/dist/client/_next/static/chunks/manage-profiles-modal-Doi6QM4e.js +1 -0
- package/dist/client/_next/static/chunks/navigation-errors-C_V42-00.js +1 -0
- package/dist/client/_next/static/chunks/netflix-browser-L_Vb9wXK.js +2 -0
- package/dist/client/_next/static/chunks/playback-activity-Dug3BRYr.js +1 -0
- package/dist/client/_next/static/chunks/playback-activity-track-switcher-CbO6kl8K.js +1 -0
- package/dist/client/_next/static/chunks/rolldown-runtime-QTnfLwEv.js +1 -0
- package/dist/client/_next/static/chunks/spotify-app-f93K4FG_.js +1 -0
- package/dist/client/_next/static/chunks/step-forward-CV8I5pPb.js +1 -0
- package/dist/client/_next/static/chunks/storefront-C_nmcuvH.js +1 -0
- package/dist/client/_next/static/chunks/streamed-icons-DwsKSgMb.js +1 -0
- package/dist/client/_next/static/css/index.BGXy8e6j.css +1 -0
- package/dist/client/_next/static/css/layout.AKSLtSR6.css +1 -0
- package/dist/client/_next/static/css/layout.D8T68cCD.css +1 -0
- package/dist/client/_next/static/css/manage-profiles-modal.BAVyxRRR.css +1 -0
- package/dist/client/_next/static/e1ce9af7-d770-43d6-845a-511443f19971/_buildManifest.js +1 -0
- package/dist/client/_next/static/e1ce9af7-d770-43d6-845a-511443f19971/_ssgManifest.js +1 -0
- package/dist/client/_next/static/media/roboto-cyrillic-ext-wght-normal.BCp_3N7R.woff2 +0 -0
- package/dist/client/_next/static/media/roboto-cyrillic-wght-normal.fOt7epNf.woff2 +0 -0
- package/dist/client/_next/static/media/roboto-greek-ext-wght-normal.Bgw4czJT.woff2 +0 -0
- package/dist/client/_next/static/media/roboto-greek-wght-normal.DlT9XTxE.woff2 +0 -0
- package/dist/client/_next/static/media/roboto-latin-ext-wght-normal.DYIxWhlt.woff2 +0 -0
- package/dist/client/_next/static/media/roboto-latin-wght-normal.ccAYIvAh.woff2 +0 -0
- package/dist/client/_next/static/media/roboto-math-wght-normal.4a3xuzGk.woff2 +0 -0
- package/dist/client/_next/static/media/roboto-symbols-wght-normal.B7iHSfaG.woff2 +0 -0
- package/dist/client/_next/static/media/roboto-vietnamese-wght-normal._f1XEJpo.woff2 +0 -0
- package/dist/client/icons/home.ico +0 -0
- package/dist/client/icons/keyboard.ico +0 -0
- package/dist/client/icons/netflix.ico +0 -0
- package/dist/client/icons/remote-screen.ico +0 -0
- package/dist/client/icons/spotify.ico +0 -0
- package/dist/client/vinext-client-entry-manifest.json +3 -0
- package/dist/server/BUILD_ID +1 -0
- package/dist/server/__vite_rsc_assets_manifest.js +162 -0
- package/dist/server/_next/static/app-page-cache-DcrtN14Y.js +1 -0
- package/dist/server/_next/static/app-page-cache-render-DoCquoNb.js +1 -0
- package/dist/server/_next/static/app-prerender-endpoints-rDLH8gfm.js +1 -0
- package/dist/server/_next/static/app-route-handler-dispatch-Be2YIqVp.js +1 -0
- package/dist/server/_next/static/app-static-generation-BX8cz43B.js +1 -0
- package/dist/server/_next/static/app-top-nav-aGPkB57A.js +1 -0
- package/dist/server/_next/static/automation-UGP78ei5.js +172 -0
- package/dist/server/_next/static/automation-tAN_1u1H.js +118 -0
- package/dist/server/_next/static/base-path-Cmiu3HvG.js +1 -0
- package/dist/server/_next/static/cache-headers-BQ-QuzWN.js +1 -0
- package/dist/server/_next/static/catalog-BS93IoWO.js +1 -0
- package/dist/server/_next/static/css/index.BGXy8e6j.css +1 -0
- package/dist/server/_next/static/css/layout.AKSLtSR6.css +1 -0
- package/dist/server/_next/static/css/layout.D8T68cCD.css +1 -0
- package/dist/server/_next/static/database-BNnYfHmT.js +114 -0
- package/dist/server/_next/static/db-BE1J0NNS.js +98 -0
- package/dist/server/_next/static/downloader-DgnjNL5T.js +21 -0
- package/dist/server/_next/static/framework~index-B2E_Di_-.js +18 -0
- package/dist/server/_next/static/framework~index~layout~layout~page~page~page~layout~page~app-page-cache-render~app-page-cac~nvd6h53m-ydvR7YSg.js +1 -0
- package/dist/server/_next/static/http-B2HyuWoI.js +1 -0
- package/dist/server/_next/static/input-platform-C0756QEt.js +1 -0
- package/dist/server/_next/static/instrumentation-BV3gg-L-.js +1 -0
- package/dist/server/_next/static/isr-decision-D1zHgPSI.js +1 -0
- package/dist/server/_next/static/layout-ClEWbCcj.js +1 -0
- package/dist/server/_next/static/layout-Ds3pFa6r.js +1 -0
- package/dist/server/_next/static/media/roboto-cyrillic-ext-wght-normal.BCp_3N7R.woff2 +0 -0
- package/dist/server/_next/static/media/roboto-cyrillic-wght-normal.fOt7epNf.woff2 +0 -0
- package/dist/server/_next/static/media/roboto-greek-ext-wght-normal.Bgw4czJT.woff2 +0 -0
- package/dist/server/_next/static/media/roboto-greek-wght-normal.DlT9XTxE.woff2 +0 -0
- package/dist/server/_next/static/media/roboto-latin-ext-wght-normal.DYIxWhlt.woff2 +0 -0
- package/dist/server/_next/static/media/roboto-latin-wght-normal.ccAYIvAh.woff2 +0 -0
- package/dist/server/_next/static/media/roboto-math-wght-normal.4a3xuzGk.woff2 +0 -0
- package/dist/server/_next/static/media/roboto-symbols-wght-normal.B7iHSfaG.woff2 +0 -0
- package/dist/server/_next/static/media/roboto-vietnamese-wght-normal._f1XEJpo.woff2 +0 -0
- package/dist/server/_next/static/netflix-page-BRbORN1F.js +1 -0
- package/dist/server/_next/static/page-C457kN_n.js +1 -0
- package/dist/server/_next/static/page-Cs-erYTy.js +1 -0
- package/dist/server/_next/static/page-DlBGATQp.js +1 -0
- package/dist/server/_next/static/page-DlRXyzSQ.js +1 -0
- package/dist/server/_next/static/providers-B3YELr_F.js +108 -0
- package/dist/server/_next/static/providers-CMBIwNGs.js +1 -0
- package/dist/server/_next/static/request-context-C1ZJzkex.js +1 -0
- package/dist/server/_next/static/request-profile-B1yGQ0l6.js +1 -0
- package/dist/server/_next/static/rolldown-runtime-DaDcL9Zw.js +1 -0
- package/dist/server/_next/static/route-96DdgJBs.js +1 -0
- package/dist/server/_next/static/route-B0WNLJZp.js +1 -0
- package/dist/server/_next/static/route-BBmE0xf12.js +1 -0
- package/dist/server/_next/static/route-BPcAdbz_.js +1 -0
- package/dist/server/_next/static/route-BWk9YK7r.js +1 -0
- package/dist/server/_next/static/route-BdG5ojMj2.js +1 -0
- package/dist/server/_next/static/route-BovNctFc.js +1 -0
- package/dist/server/_next/static/route-C2LuSjoh.js +1 -0
- package/dist/server/_next/static/route-C74RA7va.js +1 -0
- package/dist/server/_next/static/route-CCUsQ7AG.js +1 -0
- package/dist/server/_next/static/route-CHJzaQu2.js +73 -0
- package/dist/server/_next/static/route-CN6VdJwN.js +1 -0
- package/dist/server/_next/static/route-CNNiXZoM2.js +1 -0
- package/dist/server/_next/static/route-CVPPmUto.js +1 -0
- package/dist/server/_next/static/route-CeVsDcbj2.js +1 -0
- package/dist/server/_next/static/route-Cim7D4XQ.js +1 -0
- package/dist/server/_next/static/route-CjUCKwSj2.js +1 -0
- package/dist/server/_next/static/route-CkH7Cg-p.js +1 -0
- package/dist/server/_next/static/route-Cn40NftM.js +1 -0
- package/dist/server/_next/static/route-DAyF4BHS.js +1 -0
- package/dist/server/_next/static/route-DWAMZHLa.js +1 -0
- package/dist/server/_next/static/route-DXTJyFWD.js +1 -0
- package/dist/server/_next/static/route-D_G2SOlz.js +1 -0
- package/dist/server/_next/static/route-Dbs39TkC.js +1 -0
- package/dist/server/_next/static/route-DiT9UYUd.js +1 -0
- package/dist/server/_next/static/route-DslPFTAK.js +1 -0
- package/dist/server/_next/static/route-UWQN8uYr.js +1 -0
- package/dist/server/_next/static/route-ipFkK3iA.js +1 -0
- package/dist/server/_next/static/route-jMq6H_yh.js +1 -0
- package/dist/server/_next/static/route-mzLdjDCs2.js +1 -0
- package/dist/server/_next/static/route-vD15s2A8.js +1 -0
- package/dist/server/_next/static/route-xtz48fti.js +1 -0
- package/dist/server/_next/static/route-zazqen-A2.js +1 -0
- package/dist/server/_next/static/seed-cache-oCd9Lfdw.js +1 -0
- package/dist/server/_next/static/server-CS40XqUP.js +1 -0
- package/dist/server/_next/static/storage-D1zF0J_t.js +288 -0
- package/dist/server/_next/static/streamer-B1PRR-dj.js +2 -0
- package/dist/server/_next/static/subtitles-DYBlMnha.js +2 -0
- package/dist/server/_next/static/title-progress-CQBrSxvN.js +1 -0
- package/dist/server/_next/static/unified-request-context-CgIMz2dD.js +1 -0
- package/dist/server/index.js +17 -0
- package/dist/server/prerendered-routes/404.html +2 -0
- package/dist/server/prerendered-routes/index.html +2 -0
- package/dist/server/prerendered-routes/index.rsc +13 -0
- package/dist/server/ssr/__vite_rsc_assets_manifest.js +162 -0
- package/dist/server/ssr/_next/static/app-elements-Psr6bSdJ.js +1 -0
- package/dist/server/ssr/_next/static/app-prefetch-fetch-queue-Dm_lGOGz.js +1 -0
- package/dist/server/ssr/_next/static/app-router-context-QPmikWPX.js +1 -0
- package/dist/server/ssr/_next/static/app-router-scroll-C0MNOLz-.js +1 -0
- package/dist/server/ssr/_next/static/app-top-nav-a5vUAoEs.js +1 -0
- package/dist/server/ssr/_next/static/base-path-DtcGyvwb.js +1 -0
- package/dist/server/ssr/_next/static/chevron-left-CkBJG8E2.js +1 -0
- package/dist/server/ssr/_next/static/css/refresh-cw.BAVyxRRR.css +1 -0
- package/dist/server/ssr/_next/static/default-global-error-B62cHCkh.js +31 -0
- package/dist/server/ssr/_next/static/error-boundary-C28whqLB.js +1 -0
- package/dist/server/ssr/_next/static/hls-CgexCc5Z.js +40 -0
- package/dist/server/ssr/_next/static/house-l1u9dUbj.js +1 -0
- package/dist/server/ssr/_next/static/layout-segment-context-DK0O-NeY.js +1 -0
- package/dist/server/ssr/_next/static/minimize-C9JLgte-.js +1 -0
- package/dist/server/ssr/_next/static/navigation-BCDRWdBm.js +1 -0
- package/dist/server/ssr/_next/static/navigation-context-state-BnWorqxb.js +1 -0
- package/dist/server/ssr/_next/static/navigation-errors-BRIEcp79.js +1 -0
- package/dist/server/ssr/_next/static/navigation-server-CCLiCOcy.js +1 -0
- package/dist/server/ssr/_next/static/netflix-browser-CMAehdwi.js +2 -0
- package/dist/server/ssr/_next/static/pin-BQre-tQY.js +1 -0
- package/dist/server/ssr/_next/static/playback-activity-D5TYX2Ae.js +1 -0
- package/dist/server/ssr/_next/static/refresh-cw-CWdWHjqY.js +1 -0
- package/dist/server/ssr/_next/static/rolldown-runtime-DSjMdhoD.js +1 -0
- package/dist/server/ssr/_next/static/slot-CE_M6qTT.js +1 -0
- package/dist/server/ssr/_next/static/spotify-app-CE-RaTjZ.js +1 -0
- package/dist/server/ssr/_next/static/storefront-C5NNzPMa.js +1 -0
- package/dist/server/ssr/_next/static/streamed-icons-D2p1hUS_.js +1 -0
- package/dist/server/ssr/_next/static/url-safety-CnwxMXYX.js +1 -0
- package/dist/server/ssr/index.js +3 -0
- package/dist/server/ssr/vinext-client-assets.js +1 -0
- package/dist/server/ssr/vinext-server.json +1 -0
- package/dist/server/vinext-client-assets.js +1 -0
- package/dist/server/vinext-externals.json +5 -0
- package/dist/server/vinext-prerender-paths.json +7 -0
- package/dist/server/vinext-prerender.json +219 -0
- package/dist/server/vinext-server.json +1 -0
- package/package.json +66 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import{a as e}from"./storage-D1zF0J_t.js";import t from"node:path";import{mkdirSync as n}from"node:fs";function r(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function i(e,t,n=!0){return typeof e==`string`&&e.length<=t&&(!n||e.trim().length>0)}function a(e){if(!(!r(e)||!i(e.from,100)||!i(e.to,100)||!i(e.accent,100)||!i(e.glyph,20)))return{from:e.from,to:e.to,accent:e.accent,glyph:e.glyph}}function o(e,t){if(e!=null)return i(e,t)?e:null}function s(e){if(!r(e))return null;if(e.kind===`track`&&r(e.track)){let t=e.track,n=o(t.imageUrl,8192),r=o(t.provider,200),s=a(t.palette);return!i(t.id,256)||!i(t.title,500)||!i(t.artist,500)||!i(t.album,500)||typeof t.durationSec!=`number`||!Number.isFinite(t.durationSec)||t.durationSec<0||t.durationSec>86400||n===null||r===null?null:{kind:`track`,track:{id:t.id,title:t.title,artist:t.artist,album:t.album,durationSec:t.durationSec,...n?{imageUrl:n}:{},...r?{provider:r}:{},...s?{palette:s}:{}}}}if(e.kind===`playlist`&&r(e.playlist)){let t=e.playlist,n=o(t.imageUrl,8192),r=o(t.provider,200),s=a(t.palette);return!i(t.id,256)||!i(t.title,500)||!i(t.description,2e3,!1)||!i(t.curator,500)||typeof t.trackCount!=`number`||!Number.isSafeInteger(t.trackCount)||t.trackCount<0||t.trackCount>1e5||n===null||r===null?null:{kind:`playlist`,playlist:{id:t.id,title:t.title,description:t.description,curator:t.curator,trackCount:t.trackCount,...n?{imageUrl:n}:{},...r?{provider:r}:{},...s?{palette:s}:{}}}}return null}var c=process.env.HOME_ATOM_SPOTIFY_DATA_DIR?.trim(),l=c?t.resolve(c):t.join(process.cwd(),`data`),u=t.join(l,`music`);n(u,{recursive:!0});function d(e,t=``){return typeof e==`string`?e:t}function f(e){return typeof e==`string`?e:null}function p(e,t=0){return typeof e==`number`?e:t}function m(e){return{id:d(e.id),name:d(e.name),homeUrl:d(e.home_url),syncStatus:d(e.sync_status,`idle`),lastSyncedAt:f(e.last_synced_at),itemCount:p(e.item_count),error:f(e.last_error)}}function h(t){return e(t).prepare(`SELECT p.*,
|
|
2
|
+
(SELECT COUNT(*) FROM spotify_homepage_items h
|
|
3
|
+
WHERE h.provider_id = p.id)
|
|
4
|
+
AS item_count
|
|
5
|
+
FROM spotify_providers p
|
|
6
|
+
ORDER BY CASE p.id
|
|
7
|
+
WHEN 'zing-mp3' THEN 0
|
|
8
|
+
WHEN 'tiktok' THEN 1
|
|
9
|
+
WHEN 'youtube' THEN 2
|
|
10
|
+
WHEN 'nhac-cua-tui' THEN 3
|
|
11
|
+
ELSE 4
|
|
12
|
+
END`).all().map(m)}function g(t,n){let r=e(n).prepare(`SELECT p.*,
|
|
13
|
+
(SELECT COUNT(*) FROM spotify_homepage_items h
|
|
14
|
+
WHERE h.provider_id = p.id)
|
|
15
|
+
AS item_count
|
|
16
|
+
FROM spotify_providers p
|
|
17
|
+
WHERE p.id = ?`).get(t);return r?m(r):null}function _(t,n){let r=new Date().toISOString();return e(n).prepare(`UPDATE spotify_providers
|
|
18
|
+
SET sync_status = 'syncing', last_error = NULL, updated_at = ?
|
|
19
|
+
WHERE id = ? AND sync_status != 'syncing'`).run(r,t).changes>0}function v(t,n,r){let i=e(r),a=new Date().toISOString(),o=i.prepare(`
|
|
20
|
+
INSERT INTO spotify_homepage_items (
|
|
21
|
+
provider_id, external_id, kind, title, subtitle, image_url, source_url,
|
|
22
|
+
position, payload_json, synced_at
|
|
23
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
24
|
+
`);i.exec(`BEGIN IMMEDIATE`);try{i.prepare(`DELETE FROM spotify_homepage_items WHERE provider_id = ?`).run(t);for(let e of n)o.run(t,e.externalId,e.kind,e.title,e.subtitle??``,e.imageUrl??null,e.sourceUrl??null,e.position,e.payload===void 0?null:JSON.stringify(e.payload),a);i.prepare(`UPDATE spotify_providers
|
|
25
|
+
SET sync_status = 'completed', last_synced_at = ?, last_error = NULL,
|
|
26
|
+
updated_at = ?
|
|
27
|
+
WHERE id = ?`).run(a,a,t),i.exec(`COMMIT`)}catch(e){throw i.exec(`ROLLBACK`),e}}function y(t,n,r){let i=new Date().toISOString();e(r).prepare(`UPDATE spotify_providers
|
|
28
|
+
SET sync_status = 'error', last_error = ?, updated_at = ?
|
|
29
|
+
WHERE id = ?`).run(n,i,t)}function b(e,t){let n=d(e.id),r=t?`?profileId=${encodeURIComponent(t)}`:``;return{id:n,title:d(e.title),artist:d(e.artist,`Unknown artist`),album:d(e.album,`Imported music`),durationSec:p(e.duration_sec),imageUrl:f(e.image_url),audioUrl:`/api/spotify/tracks/${encodeURIComponent(n)}/audio${r}`,provider:d(e.provider_id),sourceUrl:d(e.source_url)}}function x(t){return e(t).prepare(`SELECT * FROM spotify_tracks
|
|
30
|
+
WHERE download_status = 'completed' AND audio_path IS NOT NULL
|
|
31
|
+
ORDER BY created_at DESC`).all().map(e=>b(e,t))}function S(t,n){let r=e(n).prepare(`SELECT * FROM spotify_tracks WHERE id = ?`).get(t);return r?b(r,n):null}function C(t,n){let r=e(n).prepare(`SELECT id, audio_path, audio_mime, audio_bytes, download_status
|
|
32
|
+
FROM spotify_tracks WHERE id = ?`).get(t);return r?{id:d(r.id),audioPath:f(r.audio_path),audioMime:d(r.audio_mime,`audio/mpeg`),audioBytes:p(r.audio_bytes),downloadStatus:d(r.download_status)}:null}function w(t,n){let r=e(n).prepare(`SELECT * FROM spotify_tracks WHERE source_url = ?`).get(t);return r?{track:b(r,n),status:d(r.download_status),audioPath:f(r.audio_path),bytes:p(r.audio_bytes)}:null}function T(t,n,r){let i=e(r).prepare(`SELECT * FROM spotify_tracks
|
|
33
|
+
WHERE provider_id = ? AND external_id = ?`).get(t,n);return i?{track:b(i,r),status:d(i.download_status),audioPath:f(i.audio_path),bytes:p(i.audio_bytes)}:null}function E(t,n){let r=e(n),i=new Date().toISOString();r.prepare(`INSERT INTO spotify_tracks (
|
|
34
|
+
id, provider_id, external_id, source_url, title, artist, album,
|
|
35
|
+
duration_sec, image_url, download_status, created_at, updated_at
|
|
36
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, 'fetching', ?, ?)
|
|
37
|
+
ON CONFLICT(id) DO UPDATE SET
|
|
38
|
+
provider_id = excluded.provider_id,
|
|
39
|
+
external_id = excluded.external_id,
|
|
40
|
+
source_url = excluded.source_url,
|
|
41
|
+
title = excluded.title,
|
|
42
|
+
artist = excluded.artist,
|
|
43
|
+
album = excluded.album,
|
|
44
|
+
duration_sec = excluded.duration_sec,
|
|
45
|
+
image_url = COALESCE(excluded.image_url, spotify_tracks.image_url),
|
|
46
|
+
download_status = CASE
|
|
47
|
+
WHEN spotify_tracks.audio_path IS NULL THEN 'fetching'
|
|
48
|
+
ELSE spotify_tracks.download_status
|
|
49
|
+
END,
|
|
50
|
+
updated_at = excluded.updated_at`).run(t.id,t.provider,t.externalId,t.sourceUrl,t.title,t.artist,t.album,t.durationSec,t.imageUrl??null,i,i);let a=r.prepare(`SELECT * FROM spotify_tracks WHERE id = ?`).get(t.id);if(!a)throw Error(`The imported track could not be stored.`);return b(a,n)}function D(t,n){let r=d(t.id),i=e(n).prepare(`SELECT pt.track_id, t.download_status, t.audio_path
|
|
51
|
+
FROM spotify_music_playlist_tracks pt
|
|
52
|
+
JOIN spotify_tracks t ON t.id = pt.track_id
|
|
53
|
+
WHERE pt.playlist_id = ?
|
|
54
|
+
ORDER BY pt.position`).all(r),a=i.filter(e=>d(e.download_status)===`completed`&&!!f(e.audio_path));return{id:r,title:d(t.title,`Imported playlist`),description:d(t.description),curator:d(t.curator,`Spotify Atom`),imageUrl:f(t.image_url),provider:d(t.provider_id),sourceUrl:d(t.source_url),trackIds:a.map(e=>d(e.track_id)),totalTracks:i.length,availableTracks:a.length,createdAt:d(t.created_at),updatedAt:d(t.updated_at)}}function O(t){return e(t).prepare(`SELECT * FROM spotify_music_playlists ORDER BY created_at DESC`).all().map(e=>D(e,t))}function k(t,n){let r=e(n).prepare(`SELECT * FROM spotify_music_playlists WHERE id = ?`).get(t);return r?D(r,n):null}function A(t,n=10){let r=Math.max(1,Math.min(10,Math.floor(n))),i=e(t).prepare(`SELECT item_json, played_at_ms
|
|
55
|
+
FROM spotify_recently_played
|
|
56
|
+
ORDER BY played_at_ms DESC, rowid DESC
|
|
57
|
+
LIMIT ?`).all(r),a=[];for(let e of i)try{let t=s(JSON.parse(d(e.item_json)));t&&a.push({...t,playedAt:p(e.played_at_ms)})}catch{}return a}function j(t,n,r=Date.now()){let i=s(t);if(!i)throw Error(`Recently played item is invalid.`);if(!Number.isSafeInteger(r)||r<0)throw Error(`Recently played timestamp is invalid.`);let a=i.kind===`track`?i.track:i.playlist;return e(n).prepare(`INSERT INTO spotify_recently_played (
|
|
58
|
+
kind, item_id, item_json, played_at_ms
|
|
59
|
+
) VALUES (?, ?, ?, ?)
|
|
60
|
+
ON CONFLICT(kind, item_id) DO UPDATE SET
|
|
61
|
+
item_json = excluded.item_json,
|
|
62
|
+
played_at_ms = excluded.played_at_ms`).run(i.kind,a.id,JSON.stringify(i),r),{...i,playedAt:r}}function M(t,n){let r=e(n),i=new Date().toISOString(),a=r.prepare(`INSERT INTO spotify_music_playlist_tracks (
|
|
63
|
+
playlist_id, track_id, position
|
|
64
|
+
)
|
|
65
|
+
VALUES (?, ?, ?)`);r.exec(`BEGIN IMMEDIATE`);try{r.prepare(`INSERT INTO spotify_music_playlists (
|
|
66
|
+
id, provider_id, external_id, source_url, title, description,
|
|
67
|
+
curator, image_url, created_at, updated_at
|
|
68
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
69
|
+
ON CONFLICT(id) DO UPDATE SET
|
|
70
|
+
provider_id = excluded.provider_id,
|
|
71
|
+
external_id = excluded.external_id,
|
|
72
|
+
source_url = excluded.source_url,
|
|
73
|
+
title = excluded.title,
|
|
74
|
+
description = excluded.description,
|
|
75
|
+
curator = excluded.curator,
|
|
76
|
+
image_url = COALESCE(
|
|
77
|
+
excluded.image_url,
|
|
78
|
+
spotify_music_playlists.image_url
|
|
79
|
+
),
|
|
80
|
+
updated_at = excluded.updated_at`).run(t.id,t.provider,t.externalId,t.sourceUrl,t.title,t.description,t.curator,t.imageUrl??null,i,i),r.prepare(`DELETE FROM spotify_music_playlist_tracks WHERE playlist_id = ?`).run(t.id),t.tracks.forEach((e,r)=>{E(e,n),a.run(t.id,e.id,r)}),r.exec(`COMMIT`)}catch(e){throw r.exec(`ROLLBACK`),e}let o=k(t.id,n);if(!o)throw Error(`The imported playlist could not be stored.`);return o}function N(t,n){e(n).prepare(`UPDATE spotify_tracks
|
|
81
|
+
SET download_status = 'downloading', updated_at = ?
|
|
82
|
+
WHERE id = ?`).run(new Date().toISOString(),t)}function P(t,n,r,i,a){if(e(a).prepare(`UPDATE spotify_tracks
|
|
83
|
+
SET audio_path = ?, audio_mime = ?, audio_bytes = ?,
|
|
84
|
+
download_status = 'completed', updated_at = ?
|
|
85
|
+
WHERE id = ?`).run(n,r,i,new Date().toISOString(),t).changes!==1)throw Error(`The completed track could not be updated.`)}function F(t,n){e(n).prepare(`UPDATE spotify_tracks SET download_status = 'failed', updated_at = ?
|
|
86
|
+
WHERE id = ?`).run(new Date().toISOString(),t)}function I(e,t){let n=f(e.track_id);return{id:d(e.id),sourceUrl:d(e.source_url),status:d(e.status),progress:p(e.progress),bytesDownloaded:p(e.bytes_downloaded),totalBytes:typeof e.total_bytes==`number`?e.total_bytes:null,error:f(e.error),createdAt:d(e.created_at),updatedAt:d(e.updated_at),track:n?S(n,t):null}}function L(t=100,n){return e(n).prepare(`SELECT * FROM spotify_downloads ORDER BY created_at DESC LIMIT ?`).all(t).map(e=>I(e,n))}function R(t,n){let r=e(n).prepare(`SELECT * FROM spotify_downloads WHERE id = ?`).get(t);return r?I(r,n):null}function z(t,n){let r=e(n).prepare(`SELECT * FROM spotify_downloads
|
|
87
|
+
WHERE source_url = ? AND status IN ('queued', 'fetching', 'downloading')
|
|
88
|
+
ORDER BY created_at DESC LIMIT 1`).get(t);return r?I(r,n):null}function B(t,n){let r=e(n).prepare(`SELECT * FROM spotify_downloads
|
|
89
|
+
WHERE track_id = ? AND status IN ('queued', 'fetching', 'downloading')
|
|
90
|
+
ORDER BY created_at DESC LIMIT 1`).get(t);return r?I(r,n):null}function V(t,n){let r=e(n).prepare(`SELECT * FROM spotify_downloads
|
|
91
|
+
WHERE track_id = ? AND status = 'completed'
|
|
92
|
+
ORDER BY created_at DESC LIMIT 1`).get(t);return r?I(r,n):null}function H(t,n,r,i=`queued`,a=null,o=0,s){let c=new Date().toISOString(),l=i===`completed`?100:0;e(s).prepare(`INSERT INTO spotify_downloads (
|
|
93
|
+
id, source_url, provider_id, track_id, status, progress,
|
|
94
|
+
bytes_downloaded, total_bytes, created_at, updated_at
|
|
95
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(t,n,r,a,i,l,o,i===`completed`?o:null,c,c);let u=R(t,s);if(!u)throw Error(`The download job could not be created.`);return u}function U(t,n,r){let i=e(r).prepare(`SELECT * FROM spotify_downloads WHERE id = ?`).get(t);if(!i)return null;let a=n.status??d(i.status),o=n.trackId??f(i.track_id),s=Math.max(0,Math.min(100,n.progress??p(i.progress))),c=n.bytesDownloaded??p(i.bytes_downloaded),l=n.totalBytes===void 0?typeof i.total_bytes==`number`?i.total_bytes:null:n.totalBytes,u=n.error===void 0?f(i.error):n.error;return e(r).prepare(`UPDATE spotify_downloads
|
|
96
|
+
SET track_id = ?, status = ?, progress = ?, bytes_downloaded = ?,
|
|
97
|
+
total_bytes = ?, error = ?, updated_at = ?
|
|
98
|
+
WHERE id = ?`).run(o,a,s,c,l,u,new Date().toISOString(),t),R(t,r)}export{U as C,s as E,_ as S,E as T,h as _,y as a,N as b,B as c,w as d,R as f,O as g,L as h,H as i,V as l,C as m,v as n,F as o,g as p,P as r,z as s,u as t,T as u,A as v,M as w,j as x,x as y};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{C as e,c as t,s as n}from"./database-BNnYfHmT.js";import{i as r,n as i,u as a}from"./providers-B3YELr_F.js";import o from"node:path";import{createWriteStream as s,existsSync as c,mkdirSync as l,writeFileSync as u}from"node:fs";import{tmpdir as d}from"node:os";import{spawn as f}from"node:child_process";import{createHash as p}from"node:crypto";import{Readable as m,Transform as h}from"node:stream";import{createServer as g}from"node:http";import{pipeline as _}from"node:stream/promises";var v=new Set,y=process.env.NETFLIX_ATOM_DATA_DIR||o.join(process.cwd(),[`da`,`ta`].join(``));function b(e){return p(`sha256`).update(e).digest(`hex`).slice(0,24)}function x(e){let t=[...e.matchAll(/data-link=["']([^"']+)["']/g),...e.matchAll(/(?:file|source)\s*:\s*["'](https?:\/\/[^"']+)["']/g)].map(e=>e[1].replace(/\\\//g,`/`)),n=e.match(/const\s+_0xS\s*=\s*["']([^"']+)["']/)?.[1],r=e.match(/JSON\.parse\(atob\(["']([A-Za-z0-9+/=]+)["']\)\)/)?.[1];if(!n||!r)return[...new Set(t)];try{let e=JSON.parse(Buffer.from(r,`base64`).toString(`utf8`));for(let r of Object.values(e)){if(!Array.isArray(r))continue;let e=r.join(``).split(``).reverse().join(``).replace(n,``),i=Buffer.from(e,`base64`).toString(`utf8`);i&&t.push(i)}}catch{}return[...new Set(t)]}function S(e){return x(e)[0]||``}function C(){return[process.env.CHROME_PATH,`/Applications/Google Chrome.app/Contents/MacOS/Google Chrome`,`/usr/bin/google-chrome`,`/usr/bin/chromium`,`/usr/bin/chromium-browser`].filter(Boolean).find(c)}async function w(e,t,n){let r=C();if(!r)throw Error(`Google Chrome or Chromium is required to decode this provider's protected playlist.`);let a=await i(e),s=a.match(/[,;]([\w$]+)=\{async\s+["']decryptM3U8["']\s*\(/)?.[1],c=a.match(/\},([\w$]+)=\{async\s+["']getStreamURL["']\s*\(/);if(!s||!c)throw Error(`The provider changed its player format. Please try again later.`);let u=a.replace(c[0],`};window.__netflixAtomDecryptor=${s};const ${c[1]}={async 'getStreamURL'(`);return new Promise((e,i)=>{let a=!1,s,c=(t,n)=>{a||(a=!0,s?.kill(`SIGTERM`),p.closeAllConnections?.(),p.close(),t?i(t):e(n||``))},p=g(async(e,r)=>{if(e.url===`/`){r.setHeader(`content-type`,`text/html; charset=utf-8`),r.end(`<!doctype html><html><body>
|
|
2
|
+
<script>
|
|
3
|
+
window.videoHash = ${JSON.stringify(n)};
|
|
4
|
+
window.streamURL = "";
|
|
5
|
+
window.devtoolsDetector = { launch(){}, addListener(){} };
|
|
6
|
+
<\/script>
|
|
7
|
+
<script src="https://ssl.p.jwpcdn.com/player/v/8.38.2/jwplayer.js"><\/script>
|
|
8
|
+
<script src="/player.js"><\/script>
|
|
9
|
+
<script>
|
|
10
|
+
addEventListener("load", async () => {
|
|
11
|
+
try {
|
|
12
|
+
const encrypted = await fetch("/encrypted").then((item) => item.text());
|
|
13
|
+
const value = await window.__netflixAtomDecryptor.decryptM3U8(encrypted);
|
|
14
|
+
await fetch("/result", { method: "POST", body: value || "NULL" });
|
|
15
|
+
} catch (error) {
|
|
16
|
+
await fetch("/result", { method: "POST", body: "ERROR " + error.message });
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
<\/script>
|
|
20
|
+
</body></html>`);return}if(e.url===`/player.js`){r.setHeader(`content-type`,`application/javascript`),r.end(u);return}if(e.url===`/encrypted`){r.setHeader(`content-type`,`text/plain`),r.end(t);return}if(e.url===`/result`&&e.method===`POST`){let t=[];for await(let n of e)t.push(Buffer.from(n));let n=Buffer.concat(t).toString(`utf8`);r.end(`ok`),n===`NULL`||n.startsWith(`ERROR `)?c(Error(n.startsWith(`ERROR `)?`The provider playlist could not be decoded: ${n.slice(6)}`:`The provider playlist could not be decoded.`)):c(void 0,n);return}r.statusCode=404,r.end()});p.listen(0,`127.0.0.1`,()=>{let e=p.address();if(!e||typeof e==`string`){c(Error(`Could not start the local playlist decoder.`));return}let t=o.join(d(),`netflix-atom-chrome-${process.pid}-${Date.now()}`);l(t,{recursive:!0}),s=f(r,[`--headless=new`,`--disable-gpu`,`--no-sandbox`,`--mute-audio`,`--user-data-dir=${t}`,`http://127.0.0.1:${e.port}/`],{stdio:`ignore`}),s.once(`error`,e=>c(e))}),setTimeout(()=>c(Error(`The provider playlist decoder timed out.`)),45e3).unref()})}async function T(e,t,n){if(!e.includes(`/player/assets/scripts.php`))return null;let i=new URL(t).pathname.match(/\/(?:video|embed)\/([a-zA-Z0-9_-]{16,})(?:\/|$)/)?.[1]||e.match(/FirePlayer\(\s*["']([^"']+)["']/)?.[1];if(!i)return null;let a=new URL(`/player/index.php`,t);a.searchParams.set(`data`,i),a.searchParams.set(`do`,`getVideo`);let o=await fetch(a,{method:`POST`,headers:{...r(t,a.toString()),"content-type":`application/x-www-form-urlencoded; charset=UTF-8`,"x-requested-with":`XMLHttpRequest`},body:new URLSearchParams({hash:i,r:n}),signal:AbortSignal.timeout(3e4)});if(!o.ok)throw Error(`The FirePlayer API returned HTTP ${o.status}.`);let s;try{s=JSON.parse(await o.text())}catch{throw Error(`The FirePlayer API returned an invalid response.`)}let c=[...new Set([s.videoSource,s.securedLink].filter(e=>!!e))];if(!c.length)throw Error(`The FirePlayer API did not expose a media source.`);let l;for(let e of c){let n=new URL(e,t).toString();if(/\.(?:mp4|mkv|webm)(?:$|\?)/i.test(n))return{kind:`file`,url:n,referer:t};try{let e=await fetch(n,{headers:r(t,n),signal:AbortSignal.timeout(3e4)});if(!e.ok)throw Error(`The FirePlayer playlist returned HTTP ${e.status}.`);let i=await e.text();if(!i.trimStart().startsWith(`#EXTM3U`))throw Error(`The FirePlayer media source is not a valid HLS playlist.`);return{kind:`hls`,playlist:i,baseUrl:n,referer:t}}catch(e){l=e instanceof Error?e:Error(`The FirePlayer playlist could not be loaded.`)}}throw l??Error(`The FirePlayer playlist could not be loaded.`)}async function E(e,t){let n=new URL(e,t).toString(),o=new URL(n).searchParams.get(`link`);if(o&&(n=new URL(o,n).toString()),n=new URL(n,t).toString(),/\.(?:mp4|mkv|webm)(?:$|\?)/i.test(n))return{kind:`file`,url:n,referer:t};if(/\.(?:m3u8|txt)(?:$|\?)/i.test(n)&&!n.includes(`/embed`)){let e=await fetch(n,{headers:r(t,n),signal:AbortSignal.timeout(3e4)});if(!e.ok)throw Error(`The media playlist returned HTTP ${e.status}.`);return{kind:`hls`,playlist:await e.text(),baseUrl:n,referer:t}}let s=await i(n,t),c=a(s),l=await T(s,n,t);if(l)return l;let u=c(`#player[data-obf]`).attr(`data-obf`);if(!u){let e=c(`iframe[src]`).first().attr(`src`)||s.match(/https?:\/\/[^"' ]+\.(?:m3u8|mp4)(?:\?[^"' ]*)?/i)?.[0];if(e&&e!==n)return D(new URL(e,n).toString());throw Error(`The embedded provider player did not expose a media source.`)}let d=JSON.parse(Buffer.from(u,`base64`).toString(`utf8`)),f=new URL(`/${d.sUb}?d=1`,n).toString(),p=await fetch(f,{headers:r(n,f),signal:AbortSignal.timeout(3e4)});if(!p.ok)throw Error(`The encrypted playlist returned HTTP ${p.status}.`);let m=await p.text();if(m.trimStart().startsWith(`#EXTM3U`)&&!m.includes(`#ENC-AESGCM`))return{kind:`hls`,playlist:m,baseUrl:f,referer:n};let h=c(`script[src]`).map((e,t)=>c(t).attr(`src`)||``).get().find(e=>{try{return new URL(e,n).pathname.endsWith(`/player.js`)}catch{return!1}});return{kind:`hls`,playlist:await w(new URL(h||`/player.js`,n).toString(),m,d.hD),baseUrl:f,referer:n}}async function D(e,t){let n=t??await i(e),r=a(n),o=x(n),s=r(`iframe[src]`).first().attr(`src`)||r(`video source[src]`).first().attr(`src`);if(s&&o.push(s),!o.length)throw Error(`No playable source was found on the movie page.`);let c;for(let t of[...new Set(o)])try{return await E(t,e)}catch(e){c=e instanceof Error?e:Error(`The provider media source could not be loaded.`)}throw c??Error(`The provider media source could not be loaded.`)}async function O(t,n,i,a,c,l){let u=await fetch(n,{headers:r(i,n),signal:AbortSignal.timeout(3e4)});if(!u.ok||!u.body)throw Error(`The movie file returned HTTP ${u.status}.`);let d=new URL(n).pathname.match(/\.(mp4|webm|mkv)$/i)?.[1]||`mp4`,f=o.join(a,`movie.${d}`),p=Number(u.headers.get(`content-length`)||0),g=0,v=0,y=new h({transform(n,r,i){if(g+=n.length,p){let n=Math.min(99,Math.round(g/p*100));n>=v+2&&(v=n,e(t,{status:`downloading`,progress:n},c))}i(null,n)}});return await _(m.fromWeb(u.body),y,s(f)),{path:`${l}/movie.${d}`,kind:`file`}}async function k(e,t,n){if(!e.includes(`#EXT-X-STREAM-INF`))return{playlist:e,baseUrl:t};let i=e.split(/\r?\n/),a=[];i.forEach((e,n)=>{if(!e.startsWith(`#EXT-X-STREAM-INF`))return;let r=Number(e.match(/BANDWIDTH=(\d+)/)?.[1]||0),o=i.slice(n+1).find(e=>e&&!e.startsWith(`#`));o&&a.push({bandwidth:r,url:new URL(o,t).toString()})});let o=a.sort((e,t)=>t.bandwidth-e.bandwidth)[0];if(!o)throw Error(`The HLS master playlist has no variants.`);let s=await fetch(o.url,{headers:r(n,o.url),signal:AbortSignal.timeout(3e4)});if(!s.ok)throw Error(`The HLS variant returned HTTP ${s.status}.`);return{playlist:await s.text(),baseUrl:o.url}}async function A(e,t){let n;for(let i=1;i<=3;i+=1)try{let n=await fetch(e,{headers:r(t,e),signal:AbortSignal.timeout(3e4)});if(!n.ok)throw Error(`Media segment returned HTTP ${n.status}.`);return Buffer.from(await n.arrayBuffer())}catch(e){n=e instanceof Error?e:Error(`Media segment download failed.`),i<3&&await new Promise(e=>setTimeout(e,i*500))}throw n??Error(`Media segment download failed.`)}async function j(t,n,r,i,a,s,d){let{playlist:f,baseUrl:p}=await k(n,r,i),m=f.split(/\r?\n/),h=m.map((e,t)=>({line:e.trim(),index:t})).filter(e=>e.line&&!e.line.startsWith(`#`));if(!h.length)throw Error(`The HLS playlist contains no media segments.`);let g=o.join(a,`segments`);l(g,{recursive:!0});let _=[...m],v=0,y=0,b=Array.from({length:Math.min(6,h.length)},async()=>{for(;y<h.length;){let n=h[y++],r=new URL(n.line,p).toString(),a=`${String(n.index).padStart(6,`0`)}.ts`;_[n.index]=`segments/${a}`;let l=o.join(g,a);c(l)||u(l,await A(r,i)),v+=1,(v%5==0||v===h.length)&&e(t,{status:`downloading`,progress:Math.min(99,Math.round(v/h.length*100))},s)}});return await Promise.all(b),u(o.join(a,`index.m3u8`),_.join(`
|
|
21
|
+
`)),{path:`${d}/index.m3u8`,kind:`hls`}}async function M(n,r){let i=t(n,r);if(!i?.watch_url)throw Error(`This movie has no watch page.`);let a=b(r),s=b(n),c=o.join(y,`movies`,a,s),u=`/api/netflix/media/${a}/${s}`;l(c,{recursive:!0}),e(n,{status:`downloading`,progress:1,error:null},r);let d=await D(i.watch_url),f=d.kind===`file`?await O(n,d.url,d.referer,c,r,u):await j(n,d.playlist,d.baseUrl,d.referer,c,r,u);e(n,{status:`ready`,progress:100,playbackPath:f.path,playbackKind:f.kind,error:null},r)}function N(t,r){let i=r??n().id,a=`${i}:${t}`;v.has(a)||(v.add(a),M(t,i).catch(n=>{e(t,{status:`failed`,progress:0,error:n instanceof Error?n.message:`Movie download failed.`},i)}).finally(()=>v.delete(a)))}function P(e,t){let n=o.resolve(y,`movies`,e),r=o.resolve(n,t);return!r.startsWith(`${n}${o.sep}`)&&r!==n?null:c(r)?r:null}export{D as i,P as n,N as r,S as t};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t}from"./framework~index~layout~layout~page~page~page~layout~page~app-page-cache-render~app-page-cac~nvd6h53m-ydvR7YSg.js";import*as n from"node:async_hooks";var r=e((e=>{var n=t();function r(){}var i={d:{f:r,r:function(){throw Error(`Invalid form element. requestFormReset must be passed a form that was rendered by React.`)},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null};if(!n.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)throw Error(`The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.`);function a(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=a(n,t.crossOrigin),o=typeof t.integrity==`string`?t.integrity:void 0,s=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:o,fetchPriority:s}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:o,fetchPriority:s,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=a(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=a(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=a(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.version=`19.2.8`})),i=e(((e,t)=>{t.exports=r()})),a=e((e=>{globalThis.AsyncLocalStorage=n.AsyncLocalStorage;var r=i(),a=t();function o(){}var s=Symbol.for(`react.element`),c=Symbol.for(`react.transitional.element`),l=Symbol.for(`react.fragment`),u=Symbol.for(`react.context`),d=Symbol.for(`react.forward_ref`),f=Symbol.for(`react.suspense`),p=Symbol.for(`react.suspense_list`),m=Symbol.for(`react.memo`),h=Symbol.for(`react.lazy`),ee=Symbol.for(`react.memo_cache_sentinel`),g=Symbol.iterator;function te(e){return typeof e!=`object`||!e?null:(e=g&&e[g]||e[`@@iterator`],typeof e==`function`?e:null)}var _=Symbol.asyncIterator;function v(e){setTimeout(function(){throw e})}var ne=Promise,re=typeof queueMicrotask==`function`?queueMicrotask:function(e){ne.resolve(null).then(e).catch(v)},y=null,b=0;function ie(e,t){if(t.byteLength!==0)if(2048<t.byteLength)0<b&&(e.enqueue(new Uint8Array(y.buffer,0,b)),y=new Uint8Array(2048),b=0),e.enqueue(t);else{var n=y.length-b;n<t.byteLength&&(n===0?e.enqueue(y):(y.set(t.subarray(0,n),b),e.enqueue(y),t=t.subarray(n)),y=new Uint8Array(2048),b=0),y.set(t,b),b+=t.byteLength}return!0}var ae=new TextEncoder;function x(e){return ae.encode(e)}function oe(e){return e.byteLength}function se(e,t){typeof e.error==`function`?e.error(t):e.close()}var S=Symbol.for(`react.client.reference`),ce=Symbol.for(`react.server.reference`);function C(e,t,n){return Object.defineProperties(e,{$$typeof:{value:S},$$id:{value:t},$$async:{value:n}})}var le=Function.prototype.bind,ue=Array.prototype.slice;function de(){var e=le.apply(this,arguments);if(this.$$typeof===ce){var t=ue.call(arguments,1),n={value:ce},r={value:this.$$id};return t={value:this.$$bound?this.$$bound.concat(t):t},Object.defineProperties(e,{$$typeof:n,$$id:r,$$bound:t,bind:{value:de,configurable:!0}})}return e}var fe={value:function(){return`function () { [omitted code] }`},configurable:!0,writable:!0},pe=Promise.prototype,me={get:function(e,t){switch(t){case`$$typeof`:return e.$$typeof;case`$$id`:return e.$$id;case`$$async`:return e.$$async;case`name`:return e.name;case`displayName`:return;case`defaultProps`:return;case`_debugInfo`:return;case`toJSON`:return;case Symbol.toPrimitive:return Object.prototype[Symbol.toPrimitive];case Symbol.toStringTag:return Object.prototype[Symbol.toStringTag];case`Provider`:throw Error(`Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider.`);case`then`:throw Error(`Cannot await or return from a thenable. You cannot await a client module from a server component.`)}throw Error(`Cannot access `+(String(e.name)+`.`+String(t))+` on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.`)},set:function(){throw Error(`Cannot assign to a client module from a server module.`)}};function he(e,t){switch(t){case`$$typeof`:return e.$$typeof;case`$$id`:return e.$$id;case`$$async`:return e.$$async;case`name`:return e.name;case`defaultProps`:return;case`_debugInfo`:return;case`toJSON`:return;case Symbol.toPrimitive:return Object.prototype[Symbol.toPrimitive];case Symbol.toStringTag:return Object.prototype[Symbol.toStringTag];case`__esModule`:var n=e.$$id;return e.default=C(function(){throw Error(`Attempted to call the default export of `+n+` from the server but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.`)},e.$$id+`#`,e.$$async),!0;case`then`:if(e.then)return e.then;if(e.$$async)return;var r=C({},e.$$id,!0),i=new Proxy(r,ge);return e.status=`fulfilled`,e.value=i,e.then=C(function(e){return Promise.resolve(e(i))},e.$$id+`#then`,!1)}if(typeof t==`symbol`)throw Error(`Cannot read Symbol exports. Only named exports are supported on a client module imported on the server.`);return r=e[t],r||=(r=C(function(){throw Error(`Attempted to call `+String(t)+`() from the server but `+String(t)+` is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.`)},e.$$id+`#`+t,e.$$async),Object.defineProperty(r,"name",{value:t}),e[t]=new Proxy(r,me)),r}var ge={get:function(e,t){return he(e,t)},getOwnPropertyDescriptor:function(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return n||(n={value:he(e,t),writable:!1,configurable:!1,enumerable:!1},Object.defineProperty(e,t,n)),n},getPrototypeOf:function(){return pe},set:function(){throw Error(`Cannot assign to a client module from a server module.`)}},_e=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,w=_e.d;_e.d={f:w.f,r:w.r,D:ve,C:ye,L:be,m:xe,X:Ce,S:Se,M:we};function ve(e){if(typeof e==`string`&&e){var t=N();if(t){var n=t.hints,r=`D|`+e;n.has(r)||(n.add(r),P(t,`D`,e))}else w.D(e)}}function ye(e,t){if(typeof e==`string`){var n=N();if(n){var r=n.hints,i=`C|`+(t??`null`)+`|`+e;r.has(i)||(r.add(i),typeof t==`string`?P(n,`C`,[e,t]):P(n,`C`,e))}else w.C(e,t)}}function be(e,t,n){if(typeof e==`string`){var r=N();if(r){var i=r.hints,a=`L`;if(t===`image`&&n){var o=n.imageSrcSet,s=n.imageSizes,c=``;typeof o==`string`&&o!==``?(c+=`[`+o+`]`,typeof s==`string`&&(c+=`[`+s+`]`)):c+=`[][]`+e,a+=`[image]`+c}else a+=`[`+t+`]`+e;i.has(a)||(i.add(a),(n=Te(n))?P(r,`L`,[e,t,n]):P(r,`L`,[e,t]))}else w.L(e,t,n)}}function xe(e,t){if(typeof e==`string`){var n=N();if(n){var r=n.hints,i=`m|`+e;return r.has(i)?void 0:(r.add(i),(t=Te(t))?P(n,`m`,[e,t]):P(n,`m`,e))}w.m(e,t)}}function Se(e,t,n){if(typeof e==`string`){var r=N();if(r){var i=r.hints,a=`S|`+e;return i.has(a)?void 0:(i.add(a),(n=Te(n))?P(r,`S`,[e,typeof t==`string`?t:0,n]):typeof t==`string`?P(r,`S`,[e,t]):P(r,`S`,e))}w.S(e,t,n)}}function Ce(e,t){if(typeof e==`string`){var n=N();if(n){var r=n.hints,i=`X|`+e;return r.has(i)?void 0:(r.add(i),(t=Te(t))?P(n,`X`,[e,t]):P(n,`X`,e))}w.X(e,t)}}function we(e,t){if(typeof e==`string`){var n=N();if(n){var r=n.hints,i=`M|`+e;return r.has(i)?void 0:(r.add(i),(t=Te(t))?P(n,`M`,[e,t]):P(n,`M`,e))}w.M(e,t)}}function Te(e){if(e==null)return null;var t=!1,n={},r;for(r in e)e[r]!=null&&(t=!0,n[r]=e[r]);return t?n:null}function Ee(e,t,n){switch(t){case`img`:t=n.src;var r=n.srcSet;if(!(n.loading===`lazy`||!t&&!r||typeof t!=`string`&&t!=null||typeof r!=`string`&&r!=null||n.fetchPriority===`low`||e&3)&&(typeof t!=`string`||t[4]!==`:`||t[0]!==`d`&&t[0]!==`D`||t[1]!==`a`&&t[1]!==`A`||t[2]!==`t`&&t[2]!==`T`||t[3]!==`a`&&t[3]!==`A`)&&(typeof r!=`string`||r[4]!==`:`||r[0]!==`d`&&r[0]!==`D`||r[1]!==`a`&&r[1]!==`A`||r[2]!==`t`&&r[2]!==`T`||r[3]!==`a`&&r[3]!==`A`)){var i=typeof n.sizes==`string`?n.sizes:void 0,a=n.crossOrigin;be(t||``,`image`,{imageSrcSet:r,imageSizes:i,crossOrigin:typeof a==`string`?a===`use-credentials`?a:``:void 0,integrity:n.integrity,type:n.type,fetchPriority:n.fetchPriority,referrerPolicy:n.referrerPolicy})}return e;case`link`:if(t=n.rel,r=n.href,!(e&1||n.itemProp!=null||typeof t!=`string`||typeof r!=`string`||r===``))switch(t){case`preload`:be(r,n.as,{crossOrigin:n.crossOrigin,integrity:n.integrity,nonce:n.nonce,type:n.type,fetchPriority:n.fetchPriority,referrerPolicy:n.referrerPolicy,imageSrcSet:n.imageSrcSet,imageSizes:n.imageSizes,media:n.media});break;case`modulepreload`:xe(r,{as:n.as,crossOrigin:n.crossOrigin,integrity:n.integrity,nonce:n.nonce});break;case`stylesheet`:be(r,`stylesheet`,{crossOrigin:n.crossOrigin,integrity:n.integrity,nonce:n.nonce,type:n.type,fetchPriority:n.fetchPriority,referrerPolicy:n.referrerPolicy,media:n.media})}return e;case`picture`:return e|2;case`noscript`:return e|1;default:return e}}var De=typeof AsyncLocalStorage==`function`,Oe=De?new AsyncLocalStorage:null,ke=Symbol.for(`react.temporary.reference`),Ae={get:function(e,t){switch(t){case`$$typeof`:return e.$$typeof;case`name`:return;case`displayName`:return;case`defaultProps`:return;case`_debugInfo`:return;case`toJSON`:return;case Symbol.toPrimitive:return Object.prototype[Symbol.toPrimitive];case Symbol.toStringTag:return Object.prototype[Symbol.toStringTag];case`Provider`:throw Error(`Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider.`);case`then`:return}throw Error(`Cannot access `+String(t)+` on the server. You cannot dot into a temporary client reference from a server component. You can only pass the value through to the client.`)},set:function(){throw Error(`Cannot assign to a temporary client reference from a server module.`)}};function je(e,t){var n=Object.defineProperties(function(){throw Error(`Attempted to call a temporary Client Reference from the server but it is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.`)},{$$typeof:{value:ke}});return n=new Proxy(n,Ae),e.set(n,t),n}var Me=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`.");function Ne(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(o,o),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw t.reason;default:switch(typeof t.status==`string`?t.then(o,o):(e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})),t.status){case`fulfilled`:return t.value;case`rejected`:throw t.reason}throw Pe=t,Me}}var Pe=null;function Fe(){if(Pe===null)throw Error(`Expected a suspended thenable. This is a bug in React. Please file an issue.`);var e=Pe;return Pe=null,e}var Ie=null,Le=0,T=null;function Re(){var e=T||[];return T=null,e}var ze={readContext:Ve,use:Ue,useCallback:function(e){return e},useContext:Ve,useEffect:E,useImperativeHandle:E,useLayoutEffect:E,useInsertionEffect:E,useMemo:function(e){return e()},useReducer:E,useRef:E,useState:E,useDebugValue:function(){},useDeferredValue:E,useTransition:E,useSyncExternalStore:E,useId:He,useHostTransitionStatus:E,useFormState:E,useActionState:E,useOptimistic:E,useMemoCache:function(e){for(var t=Array(e),n=0;n<e;n++)t[n]=ee;return t},useCacheRefresh:function(){return Be}};ze.useEffectEvent=E;function E(){throw Error(`This Hook is not supported in Server Components.`)}function Be(){throw Error(`Refreshing the cache is not supported in Server Components.`)}function Ve(){throw Error(`Cannot read a Client Context from a Server Component.`)}function He(){if(Ie===null)throw Error(`useId can only be used while React is rendering`);var e=Ie.identifierCount++;return`_`+Ie.identifierPrefix+`S_`+e.toString(32)+`_`}function Ue(e){if(typeof e==`object`&&e||typeof e==`function`){if(typeof e.then==`function`){var t=Le;return Le+=1,T===null&&(T=[]),Ne(T,e,t)}e.$$typeof===u&&Ve()}throw e.$$typeof===S?e.value!=null&&e.value.$$typeof===u?Error(`Cannot read a Client Context from a Server Component.`):Error(`Cannot use() an already resolved Client Reference.`):Error(`An unsupported type was passed to use(): `+String(e))}var We={getCacheForType:function(e){var t=(t=N())?t.cache:new Map,n=t.get(e);return n===void 0&&(n=e(),t.set(e,n)),n},cacheSignal:function(){var e=N();return e?e.cacheController.signal:null}},D=a.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;if(!D)throw Error(`The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.`);var O=Array.isArray,k=Object.getPrototypeOf;function Ge(e){return e=Object.prototype.toString.call(e),e.slice(8,e.length-1)}function Ke(e){switch(typeof e){case`string`:return JSON.stringify(10>=e.length?e:e.slice(0,10)+`...`);case`object`:return O(e)?`[...]`:e!==null&&e.$$typeof===Je?`client`:(e=Ge(e),e===`Object`?`{...}`:e);case`function`:return e.$$typeof===Je?`client`:(e=e.displayName||e.name)?`function `+e:`function`;default:return String(e)}}function qe(e){if(typeof e==`string`)return e;switch(e){case f:return`Suspense`;case p:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case d:return qe(e.render);case m:return qe(e.type);case h:var t=e._payload;e=e._init;try{return qe(e(t))}catch{}}return``}var Je=Symbol.for(`react.client.reference`);function A(e,t){var n=Ge(e);if(n!==`Object`&&n!==`Array`)return n;n=-1;var r=0;if(O(e)){for(var i=`[`,a=0;a<e.length;a++){0<a&&(i+=`, `);var o=e[a];o=typeof o==`object`&&o?A(o):Ke(o),``+a===t?(n=i.length,r=o.length,i+=o):i=10>o.length&&40>i.length+o.length?i+o:i+`...`}i+=`]`}else if(e.$$typeof===c)i=`<`+qe(e.type)+`/>`;else{if(e.$$typeof===Je)return`client`;for(i=`{`,a=Object.keys(e),o=0;o<a.length;o++){0<o&&(i+=`, `);var s=a[o],l=JSON.stringify(s);i+=(`"`+s+`"`===l?s:l)+`: `,l=e[s],l=typeof l==`object`&&l?A(l):Ke(l),s===t?(n=i.length,r=l.length,i+=l):i=10>l.length&&40>i.length+l.length?i+l:i+`...`}i+=`}`}return t===void 0?i:-1<n&&0<r?(e=` `.repeat(n)+`^`.repeat(r),`
|
|
2
|
+
`+i+`
|
|
3
|
+
`+e):`
|
|
4
|
+
`+i}var Ye=Object.prototype.hasOwnProperty,Xe=Object.prototype,j=JSON.stringify;function Ze(e){console.error(e)}function Qe(e,t,n,r,i,a,s,c,l){if(D.A!==null&&D.A!==We)throw Error(`Currently React only supports one RSC renderer at a time.`);D.A=We;var u=new Set,d=[],f=new Set;this.type=e,this.status=10,this.flushScheduled=!1,this.destination=this.fatalError=null,this.bundlerConfig=n,this.cache=new Map,this.cacheController=new AbortController,this.pendingChunks=this.nextChunkId=0,this.hints=f,this.abortableTasks=u,this.pingedTasks=d,this.completedImportChunks=[],this.completedHintChunks=[],this.completedRegularChunks=[],this.completedErrorChunks=[],this.writtenSymbols=new Map,this.writtenClientReferences=new Map,this.writtenServerReferences=new Map,this.writtenObjects=new WeakMap,this.temporaryReferences=l,this.identifierPrefix=c||``,this.identifierCount=1,this.taintCleanupQueue=[],this.onError=r===void 0?Ze:r,this.onPostpone=i===void 0?o:i,this.onAllReady=a,this.onFatalError=s,e=I(this,t,null,!1,0,u),d.push(e)}var M=null;function N(){if(M)return M;if(De){var e=Oe.getStore();if(e)return e}return null}function $e(e,t,n){var r=I(e,n,t.keyPath,t.implicitSlot,t.formatContext,e.abortableTasks);switch(n.status){case`fulfilled`:return r.model=n.value,ut(e,r),r.id;case`rejected`:return W(e,r,n.reason),r.id;default:if(e.status===12)return e.abortableTasks.delete(r),e.type===21?(G(r),K(r,e)):(t=e.fatalError,wt(r),Tt(r,e,t)),r.id;typeof n.status!=`string`&&(n.status=`pending`,n.then(function(e){n.status===`pending`&&(n.status=`fulfilled`,n.value=e)},function(e){n.status===`pending`&&(n.status=`rejected`,n.reason=e)}))}return n.then(function(t){r.model=t,ut(e,r)},function(t){r.status===0&&(W(e,r,t),J(e))}),r.id}function et(e,t,n){function r(t){if(c.status===0)if(t.done)c.status=1,t=c.id.toString(16)+`:C
|
|
5
|
+
`,e.completedRegularChunks.push(x(t)),e.abortableTasks.delete(c),e.cacheController.signal.removeEventListener(`abort`,a),J(e),Dt(e);else try{c.model=t.value,e.pendingChunks++,St(e,c),J(e),s.read().then(r,i)}catch(e){i(e)}}function i(t){c.status===0&&(e.cacheController.signal.removeEventListener(`abort`,a),W(e,c,t),J(e),s.cancel(t).then(i,i))}function a(){if(c.status===0){var t=e.cacheController.signal;t.removeEventListener(`abort`,a),t=t.reason,e.type===21?(e.abortableTasks.delete(c),G(c),K(c,e)):(W(e,c,t),J(e)),s.cancel(t).then(i,i)}}var o=n.supportsBYOB;if(o===void 0)try{n.getReader({mode:`byob`}).releaseLock(),o=!0}catch{o=!1}var s=n.getReader(),c=I(e,t.model,t.keyPath,t.implicitSlot,t.formatContext,e.abortableTasks);return e.pendingChunks++,t=c.id.toString(16)+`:`+(o?`r`:`R`)+`
|
|
6
|
+
`,e.completedRegularChunks.push(x(t)),e.cacheController.signal.addEventListener(`abort`,a),s.read().then(r,i),L(c.id)}function tt(e,t,n,r){function i(t){if(c.status===0)if(t.done){if(c.status=1,t.value===void 0)var n=c.id.toString(16)+`:C
|
|
7
|
+
`;else try{var o=z(e,t.value,0);n=c.id.toString(16)+`:C`+j(L(o))+`
|
|
8
|
+
`}catch(e){a(e);return}e.completedRegularChunks.push(x(n)),e.abortableTasks.delete(c),e.cacheController.signal.removeEventListener(`abort`,s),J(e),Dt(e)}else try{c.model=t.value,e.pendingChunks++,St(e,c),J(e),r.next().then(i,a)}catch(e){a(e)}}function a(t){c.status===0&&(e.cacheController.signal.removeEventListener(`abort`,s),W(e,c,t),J(e),typeof r.throw==`function`&&r.throw(t).then(o,o))}function s(){if(c.status===0){var t=e.cacheController.signal;t.removeEventListener(`abort`,s);var n=t.reason;e.type===21?(e.abortableTasks.delete(c),G(c),K(c,e)):(W(e,c,t.reason),J(e)),typeof r.throw==`function`&&r.throw(n).then(o,o)}}n=n===r;var c=I(e,t.model,t.keyPath,t.implicitSlot,t.formatContext,e.abortableTasks);return e.pendingChunks++,t=c.id.toString(16)+`:`+(n?`x`:`X`)+`
|
|
9
|
+
`,e.completedRegularChunks.push(x(t)),e.cacheController.signal.addEventListener(`abort`,s),r.next().then(i,a),L(c.id)}function P(e,t,n){n=j(n),t=x(`:H`+t+n+`
|
|
10
|
+
`),e.completedHintChunks.push(t),J(e)}function nt(e){if(e.status===`fulfilled`)return e.value;throw e.status===`rejected`?e.reason:e}function rt(e,t,n){switch(n.status){case`fulfilled`:return n.value;case`rejected`:break;default:typeof n.status!=`string`&&(n.status=`pending`,n.then(function(e){n.status===`pending`&&(n.status=`fulfilled`,n.value=e)},function(e){n.status===`pending`&&(n.status=`rejected`,n.reason=e)}))}return{$$typeof:h,_payload:n,_init:nt}}function it(){}function at(e,t,n,r){if(typeof r!=`object`||!r||r.$$typeof===S)return r;if(typeof r.then==`function`)return rt(e,t,r);var i=te(r);return i?(e={},e[Symbol.iterator]=function(){return i.call(r)},e):typeof r[_]!=`function`||typeof ReadableStream==`function`&&r instanceof ReadableStream?r:(e={},e[_]=function(){return r[_]()},e)}function ot(e,t,n,r,i){var a=t.thenableState;if(t.thenableState=null,Le=0,T=a,i=r(i,void 0),e.status===12)throw typeof i==`object`&&i&&typeof i.then==`function`&&i.$$typeof!==S&&i.then(it,it),null;return i=at(e,t,r,i),r=t.keyPath,a=t.implicitSlot,n===null?r===null&&(t.implicitSlot=!0):t.keyPath=r===null?n:r+`,`+n,e=mt(e,t,bt,``,i),t.keyPath=r,t.implicitSlot=a,e}function st(e,t,n){return t.keyPath===null?n:(e=[c,l,t.keyPath,{children:n}],t.implicitSlot?[e]:e)}var F=0;function ct(e,t){return t=I(e,t.model,t.keyPath,t.implicitSlot,t.formatContext,e.abortableTasks),ut(e,t),R(t.id)}function lt(e,t,n,r,i,a){if(i!=null)throw Error(`Refs cannot be used in Server Components, nor passed to Client Components.`);if(typeof n==`function`&&n.$$typeof!==S&&n.$$typeof!==ke)return ot(e,t,r,n,a);if(n===l&&r===null)return n=t.implicitSlot,t.keyPath===null&&(t.implicitSlot=!0),a=mt(e,t,bt,``,a.children),t.implicitSlot=n,a;if(typeof n==`object`&&n&&n.$$typeof!==S)switch(n.$$typeof){case h:var o=n._init;if(n=o(n._payload),e.status===12)throw null;return lt(e,t,n,r,i,a);case d:return ot(e,t,r,n.render,a);case m:return lt(e,t,n.type,r,i,a)}else typeof n==`string`&&(i=t.formatContext,o=Ee(i,n,a),i!==o&&a.children!=null&&z(e,a.children,o));return e=r,r=t.keyPath,e===null?e=r:r!==null&&(e=r+`,`+e),a=[c,n,e,a],t=t.implicitSlot&&e!==null?[a]:a,t}function ut(e,t){var n=e.pingedTasks;n.push(t),n.length===1&&(e.flushScheduled=e.destination!==null,e.type===21||e.status===10?re(function(){return Ct(e)}):setTimeout(function(){return Ct(e)},0))}function I(e,t,n,r,i,a){e.pendingChunks++;var o=e.nextChunkId++;typeof t!=`object`||!t||n!==null||r||e.writtenObjects.set(t,L(o));var s={id:o,status:0,model:t,keyPath:n,implicitSlot:r,formatContext:i,ping:function(){return ut(e,s)},toJSON:function(t,n){F+=t.length;var r=s.keyPath,i=s.implicitSlot;try{var a=mt(e,s,this,t,n)}catch(l){if(t=s.model,t=typeof t==`object`&&!!t&&(t.$$typeof===c||t.$$typeof===h),e.status===12)s.status=3,e.type===21?(r=e.nextChunkId++,r=t?R(r):L(r),a=r):(r=e.fatalError,a=t?R(r):L(r));else if(n=l===Me?Fe():l,typeof n==`object`&&n&&typeof n.then==`function`){a=I(e,s.model,s.keyPath,s.implicitSlot,s.formatContext,e.abortableTasks);var o=a.ping;n.then(o,o),a.thenableState=Re(),s.keyPath=r,s.implicitSlot=i,a=t?R(a.id):L(a.id)}else s.keyPath=r,s.implicitSlot=i,e.pendingChunks++,r=e.nextChunkId++,i=H(e,n,s),gt(e,r,i),a=t?R(r):L(r)}return a},thenableState:null};return a.add(s),s}function L(e){return`$`+e.toString(16)}function R(e){return`$L`+e.toString(16)}function dt(e,t,n){return e=j(n),t=t.toString(16)+`:`+e+`
|
|
11
|
+
`,x(t)}function ft(e,t,n,r){var i=r.$$async?r.$$id+`#async`:r.$$id,a=e.writtenClientReferences,o=a.get(i);if(o!==void 0)return t[0]===c&&n===`1`?R(o):L(o);try{var s=e.bundlerConfig,l=r.$$id;o=``;var u=s[l];if(u)o=u.name;else{var d=l.lastIndexOf(`#`);if(d!==-1&&(o=l.slice(d+1),u=s[l.slice(0,d)]),!u)throw Error(`Could not find the module "`+l+`" in the React Client Manifest. This is probably a bug in the React Server Components bundler.`)}if(!0===u.async&&!0===r.$$async)throw Error(`The module "`+l+`" is marked as an async ESM module but was loaded as a CJS proxy. This is probably a bug in the React Server Components bundler.`);var f=!0===u.async||!0===r.$$async?[u.id,u.chunks,o,1]:[u.id,u.chunks,o];e.pendingChunks++;var p=e.nextChunkId++,m=j(f),h=x(p.toString(16)+`:I`+m+`
|
|
12
|
+
`);return e.completedImportChunks.push(h),a.set(i,p),t[0]===c&&n===`1`?R(p):L(p)}catch(r){return e.pendingChunks++,t=e.nextChunkId++,n=H(e,r,null),gt(e,t,n),L(t)}}function z(e,t,n){return t=I(e,t,null,!1,n,e.abortableTasks),xt(e,t),t.id}function B(e,t,n){e.pendingChunks++;var r=e.nextChunkId++;return U(e,r,t,n,!1),L(r)}function pt(e,t){function n(t){if(o.status===0)if(t.done)e.cacheController.signal.removeEventListener(`abort`,i),ut(e,o);else return a.push(t.value),s.read().then(n).catch(r)}function r(t){o.status===0&&(e.cacheController.signal.removeEventListener(`abort`,i),W(e,o,t),J(e),s.cancel(t).then(r,r))}function i(){if(o.status===0){var t=e.cacheController.signal;t.removeEventListener(`abort`,i),t=t.reason,e.type===21?(e.abortableTasks.delete(o),G(o),K(o,e)):(W(e,o,t),J(e)),s.cancel(t).then(r,r)}}var a=[t.type],o=I(e,a,null,!1,0,e.abortableTasks),s=t.stream().getReader();return e.cacheController.signal.addEventListener(`abort`,i),s.read().then(n).catch(r),`$B`+o.id.toString(16)}var V=!1;function mt(e,t,n,r,i){if(t.model=i,i===c)return`$`;if(i===null)return null;if(typeof i==`object`){switch(i.$$typeof){case c:var a=null,o=e.writtenObjects;if(t.keyPath===null&&!t.implicitSlot){var u=o.get(i);if(u!==void 0)if(V===i)V=null;else return u;else r.indexOf(`:`)===-1&&(n=o.get(n),n!==void 0&&(a=n+`:`+r,o.set(i,a)))}return 3200<F?ct(e,t):(r=i.props,n=r.ref,e=lt(e,t,i.type,i.key,n===void 0?null:n,r),typeof e==`object`&&e&&a!==null&&(o.has(e)||o.set(e,a)),e);case h:if(3200<F)return ct(e,t);if(t.thenableState=null,r=i._init,i=r(i._payload),e.status===12)throw null;return mt(e,t,bt,``,i);case s:throw Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
|
|
13
|
+
- Multiple copies of the "react" package is used.
|
|
14
|
+
- A library pre-bundled an old copy of "react" or "react/jsx-runtime".
|
|
15
|
+
- A compiler tries to "inline" JSX instead of using the runtime.`)}if(i.$$typeof===S)return ft(e,n,r,i);if(e.temporaryReferences!==void 0&&(a=e.temporaryReferences.get(i),a!==void 0))return`$T`+a;if(a=e.writtenObjects,o=a.get(i),typeof i.then==`function`){if(o!==void 0){if(t.keyPath!==null||t.implicitSlot)return`$@`+$e(e,t,i).toString(16);if(V===i)V=null;else return o}return e=`$@`+$e(e,t,i).toString(16),a.set(i,e),e}if(o!==void 0)if(V===i){if(o!==L(t.id))return o;V=null}else return o;else if(r.indexOf(`:`)===-1&&(o=a.get(n),o!==void 0)){if(u=r,O(n)&&n[0]===c)switch(r){case`1`:u=`type`;break;case`2`:u=`key`;break;case`3`:u=`props`;break;case`4`:u=`_owner`}a.set(i,o+`:`+u)}if(O(i))return st(e,t,i);if(i instanceof Map)return i=Array.from(i),`$Q`+z(e,i,0).toString(16);if(i instanceof Set)return i=Array.from(i),`$W`+z(e,i,0).toString(16);if(typeof FormData==`function`&&i instanceof FormData)return i=Array.from(i.entries()),`$K`+z(e,i,0).toString(16);if(i instanceof Error)return`$Z`;if(i instanceof ArrayBuffer)return B(e,`A`,new Uint8Array(i));if(i instanceof Int8Array)return B(e,`O`,i);if(i instanceof Uint8Array)return B(e,`o`,i);if(i instanceof Uint8ClampedArray)return B(e,`U`,i);if(i instanceof Int16Array)return B(e,`S`,i);if(i instanceof Uint16Array)return B(e,`s`,i);if(i instanceof Int32Array)return B(e,`L`,i);if(i instanceof Uint32Array)return B(e,`l`,i);if(i instanceof Float32Array)return B(e,`G`,i);if(i instanceof Float64Array)return B(e,`g`,i);if(i instanceof BigInt64Array)return B(e,`M`,i);if(i instanceof BigUint64Array)return B(e,`m`,i);if(i instanceof DataView)return B(e,`V`,i);if(typeof Blob==`function`&&i instanceof Blob)return pt(e,i);if(a=te(i))return r=a.call(i),r===i?(i=Array.from(r),`$i`+z(e,i,0).toString(16)):st(e,t,Array.from(r));if(typeof ReadableStream==`function`&&i instanceof ReadableStream)return et(e,t,i);if(a=i[_],typeof a==`function`)return t.keyPath===null?(r=a.call(i),e=tt(e,t,i,r)):(e=[c,l,t.keyPath,{children:i}],e=t.implicitSlot?[e]:e),e;if(i instanceof Date)return`$D`+i.toJSON();if(e=k(i),e!==Xe&&(e===null||k(e)!==null))throw Error(`Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported.`+A(n,r));return i}if(typeof i==`string`)return F+=i.length,i[i.length-1]===`Z`&&n[r]instanceof Date?`$D`+i:1024<=i.length&&oe!==null?(e.pendingChunks++,t=e.nextChunkId++,vt(e,t,i,!1),L(t)):(e=i[0]===`$`?`$`+i:i,e);if(typeof i==`boolean`)return i;if(typeof i==`number`)return Number.isFinite(i)?i===0&&1/i==-1/0?`$-0`:i:i===1/0?`$Infinity`:i===-1/0?`$-Infinity`:`$NaN`;if(i===void 0)return`$undefined`;if(typeof i==`function`){if(i.$$typeof===S)return ft(e,n,r,i);if(i.$$typeof===ce)return t=e.writtenServerReferences,r=t.get(i),r===void 0?(r=i.$$bound,r=r===null?null:Promise.resolve(r),e=z(e,{id:i.$$id,bound:r},0),t.set(i,e),e=`$h`+e.toString(16)):e=`$h`+r.toString(16),e;if(e.temporaryReferences!==void 0&&(e=e.temporaryReferences.get(i),e!==void 0))return`$T`+e;throw i.$$typeof===ke?Error(`Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server.`):/^on[A-Z]/.test(r)?Error(`Event handlers cannot be passed to Client Component props.`+A(n,r)+`
|
|
16
|
+
If you need interactivity, consider converting part of this to a Client Component.`):Error(`Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server". Or maybe you meant to call this function rather than return it.`+A(n,r))}if(typeof i==`symbol`){if(t=e.writtenSymbols,a=t.get(i),a!==void 0)return L(a);if(a=i.description,Symbol.for(a)!==i)throw Error(`Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for(`+(i.description+`) cannot be found among global symbols.`)+A(n,r));return e.pendingChunks++,r=e.nextChunkId++,n=dt(e,r,`$S`+a),e.completedImportChunks.push(n),t.set(i,r),L(r)}if(typeof i==`bigint`)return`$n`+i.toString(10);throw Error(`Type `+typeof i+` is not supported in Client Component props.`+A(n,r))}function H(e,t){var n=M;M=null;try{var r=e.onError,i=De?Oe.run(void 0,r,t):r(t)}finally{M=n}if(i!=null&&typeof i!=`string`)throw Error(`onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "`+typeof i+`" instead`);return i||``}function ht(e,t){var n=e.onFatalError;n(t),e.destination===null?(e.status=13,e.fatalError=t):(e.status=14,se(e.destination,t)),e.cacheController.abort(Error(`The render was aborted due to a fatal error.`,{cause:t}))}function gt(e,t,n){n={digest:n},t=t.toString(16)+`:E`+j(n)+`
|
|
17
|
+
`,t=x(t),e.completedErrorChunks.push(t)}function _t(e,t,n){t=t.toString(16)+`:`+n+`
|
|
18
|
+
`,t=x(t),e.completedRegularChunks.push(t)}function U(e,t,n,r,i){i?e.pendingDebugChunks++:e.pendingChunks++,i=new Uint8Array(r.buffer,r.byteOffset,r.byteLength),r=2048<r.byteLength?i.slice():i,i=r.byteLength,t=t.toString(16)+`:`+n+i.toString(16)+`,`,t=x(t),e.completedRegularChunks.push(t,r)}function vt(e,t,n,r){if(oe===null)throw Error(`Existence of byteLengthOfChunk should have already been checked. This is a bug in React.`);r?e.pendingDebugChunks++:e.pendingChunks++,n=x(n),r=n.byteLength,t=t.toString(16)+`:T`+r.toString(16)+`,`,t=x(t),e.completedRegularChunks.push(t,n)}function yt(e,t,n){var r=t.id;typeof n==`string`&&oe!==null?vt(e,r,n,!1):n instanceof ArrayBuffer?U(e,r,`A`,new Uint8Array(n),!1):n instanceof Int8Array?U(e,r,`O`,n,!1):n instanceof Uint8Array?U(e,r,`o`,n,!1):n instanceof Uint8ClampedArray?U(e,r,`U`,n,!1):n instanceof Int16Array?U(e,r,`S`,n,!1):n instanceof Uint16Array?U(e,r,`s`,n,!1):n instanceof Int32Array?U(e,r,`L`,n,!1):n instanceof Uint32Array?U(e,r,`l`,n,!1):n instanceof Float32Array?U(e,r,`G`,n,!1):n instanceof Float64Array?U(e,r,`g`,n,!1):n instanceof BigInt64Array?U(e,r,`M`,n,!1):n instanceof BigUint64Array?U(e,r,`m`,n,!1):n instanceof DataView?U(e,r,`V`,n,!1):(n=j(n,t.toJSON),_t(e,t.id,n))}function W(e,t,n){t.status=4,n=H(e,n,t),gt(e,t.id,n),e.abortableTasks.delete(t),Dt(e)}var bt={};function xt(e,t){if(t.status===0){t.status=5;var n=F;try{V=t.model;var r=mt(e,t,bt,``,t.model);if(V=r,t.keyPath=null,t.implicitSlot=!1,typeof r==`object`&&r)e.writtenObjects.set(r,L(t.id)),yt(e,t,r);else{var i=j(r);_t(e,t.id,i)}t.status=1,e.abortableTasks.delete(t),Dt(e)}catch(n){if(e.status===12)if(e.abortableTasks.delete(t),t.status=0,e.type===21)G(t),K(t,e);else{var a=e.fatalError;wt(t),Tt(t,e,a)}else{var o=n===Me?Fe():n;if(typeof o==`object`&&o&&typeof o.then==`function`){t.status=0,t.thenableState=Re();var s=t.ping;o.then(s,s)}else W(e,t,o)}}finally{F=n}}}function St(e,t){var n=F;try{yt(e,t,t.model)}finally{F=n}}function Ct(e){var t=D.H;D.H=ze;var n=M;Ie=M=e;try{var r=e.pingedTasks;e.pingedTasks=[];for(var i=0;i<r.length;i++)xt(e,r[i]);q(e)}catch(t){H(e,t,null),ht(e,t)}finally{D.H=t,Ie=null,M=n}}function wt(e){e.status===0&&(e.status=3)}function Tt(e,t,n){e.status===3&&(n=L(n),e=dt(t,e.id,n),t.completedErrorChunks.push(e))}function G(e){e.status===0&&(e.status=3)}function K(e,t){e.status===3&&t.pendingChunks--}function q(e){var t=e.destination;if(t!==null){y=new Uint8Array(2048),b=0;try{for(var n=e.completedImportChunks,r=0;r<n.length;r++)e.pendingChunks--,ie(t,n[r]);n.splice(0,r);var i=e.completedHintChunks;for(r=0;r<i.length;r++)ie(t,i[r]);i.splice(0,r);var a=e.completedRegularChunks;for(r=0;r<a.length;r++)e.pendingChunks--,ie(t,a[r]);a.splice(0,r);var o=e.completedErrorChunks;for(r=0;r<o.length;r++)e.pendingChunks--,ie(t,o[r]);o.splice(0,r)}finally{e.flushScheduled=!1,y&&0<b&&(t.enqueue(new Uint8Array(y.buffer,0,b)),y=null,b=0)}}e.pendingChunks===0&&(12>e.status&&e.cacheController.abort(Error(`This render completed successfully. All cacheSignals are now aborted to allow clean up of any unused resources.`)),e.destination!==null&&(e.status=14,e.destination.close(),e.destination=null))}function Et(e){e.flushScheduled=e.destination!==null,re(De?function(){Oe.run(e,Ct,e)}:function(){return Ct(e)}),setTimeout(function(){e.status===10&&(e.status=11)},0)}function J(e){!1===e.flushScheduled&&e.pingedTasks.length===0&&e.destination!==null&&(e.flushScheduled=!0,setTimeout(function(){e.flushScheduled=!1,q(e)},0))}function Dt(e){e.abortableTasks.size===0&&(e=e.onAllReady,e())}function Ot(e,t){if(e.status===13)e.status=14,se(t,e.fatalError);else if(e.status!==14&&e.destination===null){e.destination=t;try{q(e)}catch(t){H(e,t,null),ht(e,t)}}}function kt(e,t){try{t.forEach(function(t){return K(t,e)});var n=e.onAllReady;n(),q(e)}catch(t){H(e,t,null),ht(e,t)}}function At(e,t,n){try{t.forEach(function(t){return Tt(t,e,n)});var r=e.onAllReady;r(),q(e)}catch(t){H(e,t,null),ht(e,t)}}function Y(e,t){if(!(11<e.status))try{e.status=12,e.cacheController.abort(t);var n=e.abortableTasks;if(0<n.size)if(e.type===21)n.forEach(function(t){return G(t,e)}),setTimeout(function(){return kt(e,n)},0);else{var r=t===void 0?Error(`The render was aborted by the server without a reason.`):typeof t==`object`&&t&&typeof t.then==`function`?Error(`The render was aborted by the server with a promise.`):t,i=H(e,r,null),a=e.nextChunkId++;e.fatalError=a,e.pendingChunks++,gt(e,a,i,r,!1,null),n.forEach(function(t){return wt(t,e,a)}),setTimeout(function(){return At(e,n,a)},0)}else{var o=e.onAllReady;o(),q(e)}}catch(t){H(e,t,null),ht(e,t)}}function jt(e,t){var n=``,r=e[t];if(r)n=r.name;else{var i=t.lastIndexOf(`#`);if(i!==-1&&(n=t.slice(i+1),r=e[t.slice(0,i)]),!r)throw Error(`Could not find the module "`+t+`" in the React Server Manifest. This is probably a bug in the React Server Components bundler.`)}return r.async?[r.id,r.chunks,n,1]:[r.id,r.chunks,n]}var Mt=new Map;function Nt(e){var t=__vite_rsc_require__(e);return typeof t.then!=`function`||t.status===`fulfilled`?null:(t.then(function(e){t.status=`fulfilled`,t.value=e},function(e){t.status=`rejected`,t.reason=e}),t)}function Pt(){}function Ft(e){for(var t=e[1],n=[],r=0;r<t.length;){var i=t[r++];t[r++];var a=Mt.get(i);if(a===void 0){a=__webpack_chunk_load__(i),n.push(a);var o=Mt.set.bind(Mt,i,null);a.then(o,Pt),Mt.set(i,a)}else a!==null&&n.push(a)}return e.length===4?n.length===0?Nt(e[0]):Promise.all(n).then(function(){return Nt(e[0])}):0<n.length?Promise.all(n):null}function It(e){var t=__vite_rsc_require__(e[0]);if(e.length===4&&typeof t.then==`function`)if(t.status===`fulfilled`)t=t.value;else throw t.reason;if(e[2]===`*`)return t;if(e[2]===``)return t.__esModule?t.default:t;if(Ye.call(t,e[2]))return t[e[2]]}function Lt(e,t,n){e.data.append(t,n),n=e.keys,n===null?(e.keys=Array.from(e.data.keys()),e.keyPointer=0):n.push(t)}var Rt=Symbol();function X(e,t,n){this.status=e,this.value=t,this.reason=n}X.prototype=Object.create(Promise.prototype),X.prototype.then=function(e,t){switch(this.status){case`resolved_model`:Xt(this)}switch(this.status){case`fulfilled`:if(typeof e==`function`){for(var n=this.value,r=0,i=new Set;n instanceof X;){if(r++,n===this||i.has(n)||1e3<r){typeof t==`function`&&t(Error(`Cannot have cyclic thenables.`));return}if(i.add(n),n.status===`fulfilled`)n=n.value;else break}e(this.value)}break;case`pending`:case`blocked`:typeof e==`function`&&(this.value===null&&(this.value=[]),this.value.push(e)),typeof t==`function`&&(this.reason===null&&(this.reason=[]),this.reason.push(t));break;default:typeof t==`function`&&t(this.reason)}};var zt=Object.prototype,Bt=Array.prototype;function Vt(e,t,n,r){for(var i=0;i<t.length;i++){var a=t[i];typeof a==`function`?a(n):$t(e,a,n,r.reason)}}function Ht(e,t,n){for(var r=0;r<t.length;r++){var i=t[r];typeof i==`function`?i(n):tn(e,i.handler,n)}}function Ut(e,t,n){if(t.status!==`pending`&&t.status!==`blocked`)t.reason.error(n);else{var r=t.reason;t.status=`rejected`,t.reason=n,r!==null&&Ht(e,r,n)}}function Wt(e,t,n){var r={};return new X(`resolved_model`,t,(r.id=n,r[Rt]=e,r))}function Gt(e,t,n,r){if(t.status!==`pending`)t=t.reason,n[0]===`C`?t.close(n===`C`?`"$undefined"`:n.slice(1)):t.enqueueModel(n);else{var i=t.value,a=t.reason;if(t.status=`resolved_model`,t.value=n,n={},t.reason=(n.id=r,n[Rt]=e,n),i!==null)switch(Xt(t),t.status){case`fulfilled`:Vt(e,i,t.value,t);break;case`blocked`:case`pending`:if(t.value)for(e=0;e<i.length;e++)t.value.push(i[e]);else t.value=i;if(t.reason){if(a)for(i=0;i<a.length;i++)t.reason.push(a[i])}else t.reason=a;break;case`rejected`:a&&Ht(e,a,t.reason)}}}function Kt(e,t,n){var r={};return new X(`resolved_model`,(n?`{"done":true,"value":`:`{"done":false,"value":`)+t+`}`,(r.id=-1,r[Rt]=e,r))}function qt(e,t,n,r){Gt(e,t,(r?`{"done":true,"value":`:`{"done":false,"value":`)+n+`}`,-1)}function Jt(e,t,n,r){function i(t){var n=s.reason,r=s;r.status=`rejected`,r.value=null,r.reason=t,n!==null&&Ht(e,n,t),tn(e,l,t)}var a=t.id;if(typeof a!=`string`||r===`then`)return null;var o=t.$$promise;if(o!==void 0)return o.status===`fulfilled`?(o=o.value,r===`__proto__`?null:n[r]=o):(Q?(a=Q,a.deps++):a=Q={chunk:null,value:null,reason:null,deps:1,errored:!1},o.then(en.bind(null,e,a,n,r),tn.bind(null,e,a)),null);var s=new X(`blocked`,null,null);t.$$promise=s;var c=jt(e._bundlerConfig,a);if(o=t.bound,a=Ft(c))o instanceof X&&(a=Promise.all([a,o]));else if(o instanceof X)a=Promise.resolve(o);else return o=It(c),a=s,a.status=`fulfilled`,a.value=o;if(Q){var l=Q;l.deps++}else l=Q={chunk:null,value:null,reason:null,deps:1,errored:!1};return a.then(function(){var a=It(c);if(t.bound){var o=t.bound.value;if(o=O(o)?o.slice(0):[],1e3<o.length){i(Error(`Server Function has too many bound arguments. Received `+o.length+` but the limit is 1000.`));return}o.unshift(null),a=a.bind.apply(a,o)}o=s.value;var u=s;u.status=`fulfilled`,u.value=a,u.reason=null,o!==null&&Vt(e,o,a,u),en(e,l,n,r,a)},i),null}function Yt(e,t,n,r,i,a){if(typeof r==`string`)return fn(e,t,n,r,i,a);if(typeof r==`object`&&r)if(i!==void 0&&e._temporaryReferences!==void 0&&e._temporaryReferences.set(r,i),O(r)){if(a===null){var o={count:0,fork:!1};e._rootArrayContexts.set(r,o)}else o=a;for(1<r.length&&(o.fork=!0),Z(o,r.length+1,e),t=0;t<r.length;t++)r[t]=Yt(e,r,``+t,r[t],i===void 0?void 0:i+`:`+t,o)}else for(o in r)Ye.call(r,o)&&(o===`__proto__`?delete r[o]:(t=i!==void 0&&o.indexOf(`:`)===-1?i+`:`+o:void 0,t=Yt(e,r,o,r[o],t,null),t===void 0?delete r[o]:r[o]=t));return r}function Z(e,t,n){if((e.count+=t)>n._arraySizeLimit&&e.fork)throw Error(`Maximum array nesting exceeded. Large nested arrays can be dangerous. Try adding intermediate objects.`)}var Q=null;function Xt(e){var t=Q;Q=null;var n=e.reason,r=n[Rt];n=n.id,n=n===-1?void 0:n.toString(16);var i=e.value;e.status=`blocked`,e.value=null,e.reason=null;try{var a=JSON.parse(i);i={count:0,fork:!1};var o=Yt(r,{"":a},``,a,n,i),s=e.value;if(s!==null)for(e.value=null,e.reason=null,a=0;a<s.length;a++){var c=s[a];typeof c==`function`?c(o):$t(r,c,o,i)}if(Q!==null){if(Q.errored)throw Q.reason;if(0<Q.deps){Q.value=o,Q.reason=i,Q.chunk=e;return}}e.status=`fulfilled`,e.value=o,e.reason=i}catch(t){e.status=`rejected`,e.reason=t}finally{Q=t}}function Zt(e,t){e._closed=!0,e._closedReason=t,e._chunks.forEach(function(n){n.status===`pending`?Ut(e,n,t):n.status===`fulfilled`&&n.reason!==null&&(n=n.reason,typeof n.error==`function`&&n.error(t))})}function Qt(e,t){var n=e._chunks,r=n.get(t);return r||(r=e._formData.data.get(e._prefix+t),r=typeof r==`string`?Wt(e,r,t):e._closed?new X(`rejected`,null,e._closedReason):new X(`pending`,null,null),n.set(t,r)),r}function $t(e,t,n,r){var i=t.handler,a=t.parentObject,o=t.key,s=t.map,c=t.path;try{for(var l=0,u=e._rootArrayContexts,d=1;d<c.length;d++){var f=c[d];if(typeof n!=`object`||!n||k(n)!==zt&&k(n)!==Bt||!Ye.call(n,f))throw Error(`Invalid reference.`);if(n=n[f],O(n))l=0,r=u.get(n)||r;else if(r=null,typeof n==`string`)l=n.length;else if(typeof n==`bigint`){var p=Math.abs(Number(n));l=p===0?1:Math.floor(Math.log10(p))+1}else l=ArrayBuffer.isView(n)?n.byteLength:0}var m=s(e,n,a,o),h=t.arrayRoot;h!==null&&(r===null?0<l&&Z(h,l,e):(r.fork&&(h.fork=!0),Z(h,r.count,e)))}catch(t){tn(e,i,t);return}en(e,i,a,o,m)}function en(e,t,n,r,i){r!==`__proto__`&&(n[r]=i),r===``&&t.value===null&&(t.value=i),t.deps--,t.deps===0&&(n=t.chunk,n!==null&&n.status===`blocked`&&(r=n.value,n.status=`fulfilled`,n.value=t.value,n.reason=t.reason,r!==null&&Vt(e,r,t.value,n)))}function tn(e,t,n){t.errored||(t.errored=!0,t.value=null,t.reason=n,t=t.chunk,t!==null&&t.status===`blocked`&&Ut(e,t,n))}function nn(e,t,n,r,i,a){t=t.split(`:`);var o=parseInt(t[0],16),s=Qt(e,o);switch(s.status){case`resolved_model`:Xt(s)}switch(s.status){case`fulfilled`:if(o=s.value,s=s.reason,s!==null&&`error`in s)throw Error(`Expected an initialized chunk but got an initialized stream chunk instead. This payload may have been submitted by an older version of React.`);for(var c=0,l=e._rootArrayContexts,u=1;u<t.length;u++){if(c=t[u],typeof o!=`object`||!o||k(o)!==zt&&k(o)!==Bt||!Ye.call(o,c))throw Error(`Invalid reference.`);o=o[c],O(o)?(c=0,s=l.get(o)||s):(s=null,typeof o==`string`?c=o.length:typeof o==`bigint`?(c=Math.abs(Number(o)),c=c===0?1:Math.floor(Math.log10(c))+1):c=ArrayBuffer.isView(o)?o.byteLength:0)}return n=a(e,o,n,r),i!==null&&(s===null?0<c&&Z(i,c,e):(s.fork&&(i.fork=!0),Z(i,s.count,e))),n;case`blocked`:return Q?(e=Q,e.deps++):e=Q={chunk:null,value:null,reason:null,deps:1,errored:!1},i={handler:e,parentObject:n,key:r,map:a,path:t,arrayRoot:i},s.value===null?s.value=[i]:s.value.push(i),s.reason===null?s.reason=[i]:s.reason.push(i),null;case`pending`:throw Error(`Invalid forward reference.`);default:return Q?(Q.errored=!0,Q.value=null,Q.reason=s.reason):Q={chunk:null,value:null,reason:s.reason,deps:0,errored:!0},null}}function rn(e,t){if(!O(t))throw Error(`Invalid Map initializer.`);if(!0===t.$$consumed)throw Error(`Already initialized Map.`);return t.$$consumed=!0,new Map(t)}function an(e,t){if(!O(t))throw Error(`Invalid Set initializer.`);if(!0===t.$$consumed)throw Error(`Already initialized Set.`);return t.$$consumed=!0,new Set(t)}function on(e,t){if(!O(t))throw Error(`Invalid Iterator initializer.`);if(!0===t.$$consumed)throw Error(`Already initialized Iterator.`);return t.$$consumed=!0,t[Symbol.iterator]()}function sn(e,t,n,r){return r===`then`&&typeof t==`function`?null:t}function $(e,t,n,r,i,a,o){function s(t){if(!l.errored){l.errored=!0,l.value=null,l.reason=t;var n=l.chunk;n!==null&&n.status===`blocked`&&Ut(e,n,t)}}t=parseInt(t.slice(2),16);var c=e._prefix+t;if(r=e._chunks,r.has(t))throw Error(`Already initialized typed array.`);if(r.set(t,new X(`rejected`,null,Error(`Already initialized typed array.`))),t=e._formData.data.get(c).arrayBuffer(),Q){var l=Q;l.deps++}else l=Q={chunk:null,value:null,reason:null,deps:1,errored:!1};return t.then(function(t){try{o!==null&&Z(o,t.byteLength,e);var r=n===ArrayBuffer?t:new n(t);c!==`__proto__`&&(i[a]=r),a===``&&l.value===null&&(l.value=r)}catch(e){s(e);return}l.deps--,l.deps===0&&(t=l.chunk,t!==null&&t.status===`blocked`&&(r=t.value,t.status=`fulfilled`,t.value=l.value,t.reason=null,r!==null&&Vt(e,r,l.value,t)))},s),null}function cn(e,t,n,r){var i=e._chunks;for(n=new X(`fulfilled`,n,r),i.set(t,n),e=e._formData.data.getAll(e._prefix+t),t=0;t<e.length;t++)i=e[t],typeof i==`string`&&(i[0]===`C`?r.close(i===`C`?`"$undefined"`:i.slice(1)):r.enqueueModel(i))}function ln(e,t,n){function r(e){n!==`bytes`||ArrayBuffer.isView(e)?i.enqueue(e):c.error(Error(`Invalid data for bytes stream.`))}if(t=parseInt(t.slice(2),16),e._chunks.has(t))throw Error(`Already initialized stream.`);var i=null,a=!1,o=new ReadableStream({type:n,start:function(e){i=e}}),s=null,c={enqueueModel:function(t){if(s===null){var n=Wt(e,t,-1);Xt(n),n.status===`fulfilled`?r(n.value):(n.then(r,c.error),s=n)}else{n=s;var i=new X(`pending`,null,null);i.then(r,c.error),s=i,n.then(function(){s===i&&(s=null),Gt(e,i,t,-1)})}},close:function(){if(!a)if(a=!0,s===null)i.close();else{var e=s;s=null,e.then(function(){return i.close()})}},error:function(e){if(!a)if(a=!0,s===null)i.error(e);else{var t=s;s=null,t.then(function(){return i.error(e)})}}};return cn(e,t,o,c),o}function un(e){this.next=e}un.prototype={},un.prototype[_]=function(){return this};function dn(e,t,n){if(t=parseInt(t.slice(2),16),e._chunks.has(t))throw Error(`Already initialized stream.`);var r=[],i=!1,a=0,o={};return o=(o[_]=function(){var e=0;return new un(function(t){if(t!==void 0)throw Error(`Values cannot be passed to next() of AsyncIterables passed to Client Components.`);if(e===r.length){if(i)return new X(`fulfilled`,{done:!0,value:void 0},null);r[e]=new X(`pending`,null,null)}return r[e++]})},o),n=n?o[_]():o,cn(e,t,n,{enqueueModel:function(t){a===r.length?r[a]=Kt(e,t,!1):qt(e,r[a],t,!1),a++},close:function(t){if(!i)for(i=!0,a===r.length?r[a]=Kt(e,t,!0):qt(e,r[a],t,!0),a++;a<r.length;)qt(e,r[a++],`"$undefined"`,!0)},error:function(t){if(!i)for(i=!0,a===r.length&&(r[a]=new X(`pending`,null,null));a<r.length;)Ut(e,r[a++],t)}}),n}function fn(e,t,n,r,i,a){if(r[0]===`$`){switch(r[1]){case`$`:return a!==null&&Z(a,r.length-1,e),r.slice(1);case`@`:return t=parseInt(r.slice(2),16),Qt(e,t);case`h`:return a=r.slice(2),nn(e,a,t,n,null,Jt);case`T`:if(i===void 0||e._temporaryReferences===void 0)throw Error(`Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server.`);return je(e._temporaryReferences,i);case`Q`:return a=r.slice(2),nn(e,a,t,n,null,rn);case`W`:return a=r.slice(2),nn(e,a,t,n,null,an);case`K`:for(n=r.slice(2),t=e._prefix+`_`,n=t+n+`_`,a=new FormData,e=e._formData;r=e.keys,r===null&&(r=e.keys=Array.from(e.data.keys()),e.keyPointer=0),r=r[e.keyPointer],r!==void 0;)if(r.startsWith(n)){i=e.data.getAll(r);for(var o=r.slice(n.length),s=0;s<i.length;s++)a.append(o,i[s]);e.data.delete(r),e.keyPointer++}else if(r.startsWith(t))break;else e.keyPointer++;return a;case`i`:return a=r.slice(2),nn(e,a,t,n,null,on);case`I`:return 1/0;case`-`:return r===`$-0`?-0:-1/0;case`N`:return NaN;case`u`:return;case`D`:return new Date(Date.parse(r.slice(2)));case`n`:if(t=r.slice(2),300<t.length)throw Error(`BigInt is too large. Received `+t.length+` digits but the limit is 300.`);return a!==null&&Z(a,t.length,e),BigInt(t);case`A`:return $(e,r,ArrayBuffer,1,t,n,a);case`O`:return $(e,r,Int8Array,1,t,n,a);case`o`:return $(e,r,Uint8Array,1,t,n,a);case`U`:return $(e,r,Uint8ClampedArray,1,t,n,a);case`S`:return $(e,r,Int16Array,2,t,n,a);case`s`:return $(e,r,Uint16Array,2,t,n,a);case`L`:return $(e,r,Int32Array,4,t,n,a);case`l`:return $(e,r,Uint32Array,4,t,n,a);case`G`:return $(e,r,Float32Array,4,t,n,a);case`g`:return $(e,r,Float64Array,8,t,n,a);case`M`:return $(e,r,BigInt64Array,8,t,n,a);case`m`:return $(e,r,BigUint64Array,8,t,n,a);case`V`:return $(e,r,DataView,1,t,n,a);case`B`:return t=parseInt(r.slice(2),16),e._formData.data.get(e._prefix+t);case`R`:return ln(e,r,void 0);case`r`:return ln(e,r,`bytes`);case`X`:return dn(e,r,!1);case`x`:return dn(e,r,!0)}return r=r.slice(1),nn(e,r,t,n,a,sn)}return a!==null&&Z(a,r.length,e),r}function pn(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:new FormData,i=4<arguments.length&&arguments[4]!==void 0?arguments[4]:1e6;return{_bundlerConfig:e,_prefix:t,_formData:{data:r,keyPointer:-1,keys:null},_chunks:new Map,_closed:!1,_closedReason:null,_temporaryReferences:n,_rootArrayContexts:new WeakMap,_arraySizeLimit:i}}function mn(e){Zt(e,Error(`Connection closed.`))}function hn(e,t){var n=t.id;if(typeof n!=`string`)return null;var r=jt(e,n);return e=Ft(r),t=t.bound,t instanceof Promise?Promise.all([t,e]).then(function(e){e=e[0];var t=It(r);if(1e3<e.length)throw Error(`Server Function has too many bound arguments. Received `+e.length+` but the limit is 1000.`);return t.bind.apply(t,[null].concat(e))}):e?Promise.resolve(e).then(function(){return It(r)}):Promise.resolve(It(r))}function gn(e,t,n,r){if(e=pn(t,n,void 0,e,r),mn(e),e=Qt(e,0),e.then(function(){}),e.status!==`fulfilled`)throw e.reason;return e.value}e.createClientModuleProxy=function(e){return e=C({},e,!1),new Proxy(e,ge)},e.createTemporaryReferenceSet=function(){return new WeakMap},e.decodeAction=function(e,t){var n=new FormData,r=null;if(e.forEach(function(e,t){t.startsWith(`$ACTION_`)?(t.startsWith(`$ACTION_REF_`)||t.startsWith(`$ACTION_ID_`))&&(r=t):n.append(t,e)}),r===null)return null;var i=r,a=null;if(i.startsWith(`$ACTION_REF_`))i=`$ACTION_`+i.slice(12)+`:`,e=gn(e,t,i),a=hn(t,e);else if(i.startsWith(`$ACTION_ID_`))e=i.slice(11),a=hn(t,{id:e,bound:null});else throw Error(`Cannot handle action key. This is a bug in React.`);return a.then(function(e){return e.bind(null,n)})},e.decodeFormState=function(e,t,n){var r=t.get(`$ACTION_KEY`);if(typeof r!=`string`)return Promise.resolve(null);var i=null;if(t.forEach(function(e,t){t.startsWith(`$ACTION_REF_`)&&(i=t)}),i===null)return Promise.resolve(null);var a=`$ACTION_`+i.slice(12)+`:`;t=gn(t,n,a);var o=t.id;return Promise.resolve(t.bound).then(function(t){return t===null?null:[e,r,o,t.length-1]})},e.decodeReply=function(e,t,n){if(typeof e==`string`){var r=new FormData;r.append(`0`,e),e=r}return e=pn(t,``,n?n.temporaryReferences:void 0,e,n?n.arraySizeLimit:void 0),t=Qt(e,0),mn(e),t},e.decodeReplyFromAsyncIterable=function(e,t,n){function r(e){if(e.done)mn(s);else{e=e.value;var t=e[0];if(e=e[1],typeof e==`string`){Lt(s._formData,t,e);var n=s._prefix;if(t.startsWith(n)){var o=s._chunks;t=+t.slice(n.length),(o=o.get(t))&&Gt(s,o,e,t)}}else Lt(s._formData,t,e);a.next().then(r,i)}}function i(e){Zt(s,e),typeof a.throw==`function`&&a.throw(e).then(o,o)}var a=e[_](),s=pn(t,``,n?n.temporaryReferences:void 0,void 0,n?n.arraySizeLimit:void 0);return a.next().then(r,i),Qt(s,0)},e.prerender=function(e,t,n){return new Promise(function(r,i){var a=new Qe(21,e,t,n?n.onError:void 0,n?n.onPostpone:void 0,function(){r({prelude:new ReadableStream({type:`bytes`,pull:function(e){Ot(a,e)},cancel:function(e){a.destination=null,Y(a,e)}},{highWaterMark:0})})},i,n?n.identifierPrefix:void 0,n?n.temporaryReferences:void 0);if(n&&n.signal){var o=n.signal;if(o.aborted)Y(a,o.reason);else{var s=function(){Y(a,o.reason),o.removeEventListener(`abort`,s)};o.addEventListener(`abort`,s)}}Et(a)})},e.registerClientReference=function(e,t,n){return C(e,t+`#`+n,!1)},e.registerServerReference=function(e,t,n){return Object.defineProperties(e,{$$typeof:{value:ce},$$id:{value:n===null?t:t+`#`+n,configurable:!0},$$bound:{value:null,configurable:!0},bind:{value:de,configurable:!0},toString:fe})},e.renderToReadableStream=function(e,t,n){var r=new Qe(20,e,t,n?n.onError:void 0,n?n.onPostpone:void 0,o,o,n?n.identifierPrefix:void 0,n?n.temporaryReferences:void 0);if(n&&n.signal){var i=n.signal;if(i.aborted)Y(r,i.reason);else{var a=function(){Y(r,i.reason),i.removeEventListener(`abort`,a)};i.addEventListener(`abort`,a)}}return new ReadableStream({type:`bytes`,start:function(){Et(r)},pull:function(e){Ot(r,e)},cancel:function(e){r.destination=null,Y(r,e)}},{highWaterMark:0})}})),o=e((e=>{var t=a();e.renderToReadableStream=t.renderToReadableStream,e.decodeReply=t.decodeReply,e.decodeReplyFromAsyncIterable=t.decodeReplyFromAsyncIterable,e.decodeAction=t.decodeAction,e.decodeFormState=t.decodeFormState,e.registerServerReference=t.registerServerReference,e.registerClientReference=t.registerClientReference,e.createClientModuleProxy=t.createClientModuleProxy,e.createTemporaryReferenceSet=t.createTemporaryReferenceSet})),s=e((e=>{var t=i(),n=Object.prototype.hasOwnProperty;function r(e){var t=__vite_rsc_require__(e[0]);if(e.length===4&&typeof t.then==`function`)if(t.status===`fulfilled`)t=t.value;else throw t.reason;if(e[2]===`*`)return t;if(e[2]===``)return t.__esModule?t.default:t;if(n.call(t,e[2]))return t[e[2]]}t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;var a=Symbol.for(`react.transitional.element`),o=Symbol.for(`react.lazy`);Array.isArray,Function.prototype.bind,Array.prototype.slice;function s(e,t,n){this.status=e,this.value=t,this.reason=n}s.prototype=Object.create(Promise.prototype),s.prototype.then=function(e,t){switch(this.status){case`resolved_model`:p(this);break;case`resolved_module`:m(this)}switch(this.status){case`fulfilled`:typeof e==`function`&&e(this.value);break;case`pending`:case`blocked`:typeof e==`function`&&(this.value===null&&(this.value=[]),this.value.push(e)),typeof t==`function`&&(this.reason===null&&(this.reason=[]),this.reason.push(t));break;case`halted`:break;default:typeof t==`function`&&t(this.reason)}};function c(e,t,n){for(var r=0;r<e.length;r++){var i=e[r];typeof i==`function`?i(t):h(i,t,n)}}function l(e,t){for(var n=0;n<e.length;n++){var r=e[n];typeof r==`function`?r(t):ee(r,t)}}function u(e,t){var n=t.handler.chunk;if(n===null)return null;if(n===e)return t.handler;if(t=n.value,t!==null)for(n=0;n<t.length;n++){var r=t[n];if(typeof r!=`function`&&(r=u(e,r),r!==null))return r}return null}function d(e,t,n){t.status!==`pending`&&t.status!==`blocked`?t.reason.error(n):(e=t.reason,t.status=`rejected`,t.reason=n,e!==null&&l(e,n))}var f=null;function p(e){var t=f;f=null;var n=e.value,r=e.reason;e.status=`blocked`,e.value=null,e.reason=null;try{var i=JSON.parse(n,r._fromJSON),a=e.value;if(a!==null)for(e.value=null,e.reason=null,n=0;n<a.length;n++){var o=a[n];typeof o==`function`?o(i):h(o,i,e)}if(f!==null){if(f.errored)throw f.reason;if(0<f.deps){f.value=i,f.chunk=e;return}}e.status=`fulfilled`,e.value=i}catch(t){e.status=`rejected`,e.reason=t}finally{f=t}}function m(e){try{var t=r(e.value);e.status=`fulfilled`,e.value=t}catch(t){e.status=`rejected`,e.reason=t}}function h(e,t){var r=e.response,i=e.handler,s=e.parentObject,l=e.key,d=e.map,f=e.path;try{for(var h=1;h<f.length;h++){for(;typeof t==`object`&&t&&t.$$typeof===o;){var g=t._payload;if(g===i.chunk)t=i.value;else{switch(g.status){case`resolved_model`:p(g);break;case`resolved_module`:m(g)}switch(g.status){case`fulfilled`:t=g.value;continue;case`blocked`:var te=u(g,e);if(te!==null){t=te.value;continue}case`pending`:f.splice(0,h-1),g.value===null?g.value=[e]:g.value.push(e),g.reason===null?g.reason=[e]:g.reason.push(e);return;case`halted`:return;default:ee(e,g.reason);return}}}var _=f[h];if(typeof t==`object`&&t&&n.call(t,_))t=t[_];else throw Error(`Invalid reference.`)}for(;typeof t==`object`&&t&&t.$$typeof===o;){var v=t._payload;if(v===i.chunk)t=i.value;else{switch(v.status){case`resolved_model`:p(v);break;case`resolved_module`:m(v)}switch(v.status){case`fulfilled`:t=v.value;continue}break}}var ne=d(r,t,s,l);if(l!==`__proto__`&&(s[l]=ne),l===``&&i.value===null&&(i.value=ne),s[0]===a&&typeof i.value==`object`&&i.value!==null&&i.value.$$typeof===a){var re=i.value;switch(l){case`3`:re.props=ne}}}catch(t){ee(e,t);return}i.deps--,i.deps===0&&(e=i.chunk,e!==null&&e.status===`blocked`&&(t=e.value,e.status=`fulfilled`,e.value=i.value,e.reason=i.reason,t!==null&&c(t,i.value,e)))}function ee(e,t){var n=e.handler;e=e.response,n.errored||(n.errored=!0,n.value=null,n.reason=t,n=n.chunk,n!==null&&n.status===`blocked`&&d(e,n,t))}})),c=e(((e,t)=>{t.exports=s()})),l=e((e=>{e.prerender=a().prerender}));export{c as n,o as r,l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DaDcL9Zw.js";var t=e((e=>{var t={H:null,A:null};function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var r=Array.isArray;function i(){}var a=Symbol.for(`react.transitional.element`),o=Symbol.for(`react.portal`),s=Symbol.for(`react.fragment`),c=Symbol.for(`react.strict_mode`),l=Symbol.for(`react.profiler`),u=Symbol.for(`react.forward_ref`),d=Symbol.for(`react.suspense`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g=Object.prototype.hasOwnProperty,_=Object.assign;function v(e,t,n){var r=n.ref;return{$$typeof:a,type:e,key:t,ref:r===void 0?null:r,props:n}}function y(e,t){return v(e.type,t,e.props)}function b(e){return typeof e==`object`&&!!e&&e.$$typeof===a}function x(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var S=/\/+/g;function C(e,t){return typeof e==`object`&&e&&e.key!=null?x(``+e.key):t.toString(36)}function w(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(i,i):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function T(e,t,i,s,c){var l=typeof e;(l===`undefined`||l===`boolean`)&&(e=null);var u=!1;if(e===null)u=!0;else switch(l){case`bigint`:case`string`:case`number`:u=!0;break;case`object`:switch(e.$$typeof){case a:case o:u=!0;break;case p:return u=e._init,T(u(e._payload),t,i,s,c)}}if(u)return c=c(e),u=s===``?`.`+C(e,0):s,r(c)?(i=``,u!=null&&(i=u.replace(S,`$&/`)+`/`),T(c,t,i,``,function(e){return e})):c!=null&&(b(c)&&(c=y(c,i+(c.key==null||e&&e.key===c.key?``:(``+c.key).replace(S,`$&/`)+`/`)+u)),t.push(c)),1;u=0;var d=s===``?`.`:s+`:`;if(r(e))for(var f=0;f<e.length;f++)s=e[f],l=d+C(s,f),u+=T(s,t,i,l,c);else if(f=h(e),typeof f==`function`)for(e=f.call(e),f=0;!(s=e.next()).done;)s=s.value,l=d+C(s,f++),u+=T(s,t,i,l,c);else if(l===`object`){if(typeof e.then==`function`)return T(w(e),t,i,s,c);throw t=String(e),Error(n(31,t===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:t))}return u}function E(e,t,n){if(e==null)return e;var r=[],i=0;return T(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function D(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}function O(){return new WeakMap}function k(){return{s:0,v:void 0,o:null,p:null}}e.Children={map:E,forEach:function(e,t,n){E(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return E(e,function(){t++}),t},toArray:function(e){return E(e,function(e){return e})||[]},only:function(e){if(!b(e))throw Error(n(143));return e}},e.Fragment=s,e.Profiler=l,e.StrictMode=c,e.Suspense=d,e.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=t,e.cache=function(e){return function(){var n=t.A;if(!n)return e.apply(null,arguments);var r=n.getCacheForType(O);n=r.get(e),n===void 0&&(n=k(),r.set(e,n)),r=0;for(var i=arguments.length;r<i;r++){var a=arguments[r];if(typeof a==`function`||typeof a==`object`&&a){var o=n.o;o===null&&(n.o=o=new WeakMap),n=o.get(a),n===void 0&&(n=k(),o.set(a,n))}else o=n.p,o===null&&(n.p=o=new Map),n=o.get(a),n===void 0&&(n=k(),o.set(a,n))}if(n.s===1)return n.v;if(n.s===2)throw n.v;try{var s=e.apply(null,arguments);return r=n,r.s=1,r.v=s}catch(e){throw s=n,s.s=2,s.v=e,e}}},e.cacheSignal=function(){var e=t.A;return e?e.cacheSignal():null},e.captureOwnerStack=function(){return null},e.cloneElement=function(e,t,r){if(e==null)throw Error(n(267,e));var i=_({},e.props),a=e.key;if(t!=null)for(o in t.key!==void 0&&(a=``+t.key),t)!g.call(t,o)||o===`key`||o===`__self`||o===`__source`||o===`ref`&&t.ref===void 0||(i[o]=t[o]);var o=arguments.length-2;if(o===1)i.children=r;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}return v(e.type,a,i)},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)g.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return v(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:u,render:e}},e.isValidElement=b,e.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:D}},e.memo=function(e,t){return{$$typeof:f,type:e,compare:t===void 0?null:t}},e.use=function(e){return t.H.use(e)},e.useCallback=function(e,n){return t.H.useCallback(e,n)},e.useDebugValue=function(){},e.useId=function(){return t.H.useId()},e.useMemo=function(e,n){return t.H.useMemo(e,n)},e.version=`19.2.8`})),n=e(((e,n)=>{n.exports=t()})),r=e((e=>{var t=n(),r=Symbol.for(`react.transitional.element`),i=Symbol.for(`react.fragment`);if(!t.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)throw Error(`The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.`);function a(e,t,n){var i=null;if(n!==void 0&&(i=``+n),t.key!==void 0&&(i=``+t.key),`key`in t)for(var a in n={},t)a!==`key`&&(n[a]=t[a]);else n=t;return t=n.ref,{$$typeof:r,type:e,key:i,ref:t===void 0?null:t,props:n}}e.Fragment=i,e.jsx=a,e.jsxs=a})),i=e(((e,t)=>{t.exports=r()}));export{n,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=8*1024*1024,t=new Set([`tiktok.com`,`m.tiktok.com`,`vm.tiktok.com`,`vt.tiktok.com`,`www.tiktok.com`]),n=class extends Error{constructor(e,t=502){super(e),this.status=t,this.name=`ProviderRequestError`}};function r(e){return e instanceof Error&&e.message.trim()?e.message:`An unexpected provider error occurred.`}function i(e,t={}){if(e.headers.get(`x-spotify-atom-request`)!==`1`)throw new n(`This request is not allowed.`,403);let r=e.headers.get(`sec-fetch-site`);if(r&&r!==`same-origin`&&r!==`none`)throw new n(`Cross-site requests are not allowed.`,403);let i=e.headers.get(`origin`);if(i){let t;try{t=new URL(i)}catch{throw new n(`This request has an invalid origin.`,403)}let r=e.headers.get(`x-forwarded-host`)?.split(`,`,1)[0].trim()||e.headers.get(`host`)||new URL(e.url).host;if(t.host!==r)throw new n(`Cross-origin requests are not allowed.`,403)}if(t.json&&e.headers.get(`content-type`)?.split(`;`,1)[0].trim().toLowerCase()!==`application/json`)throw new n(`Send this request as application/json.`,415)}function a(e,t){return e===t||e.endsWith(`.${t}`)}function o(e,n){let r=e.toLowerCase();switch(n){case`zing-mp3`:return a(r,`zingmp3.vn`);case`nhac-cua-tui`:return a(r,`nhaccuatui.com`)||a(r,`nct.vn`);case`tiktok`:return t.has(r);case`youtube`:return a(r,`youtube.com`)||a(r,`youtube-nocookie.com`)||r===`youtu.be`}}function s(e){let t;try{t=new URL(e.trim())}catch{throw new n(`Enter a valid music URL.`,400)}if(t.protocol!==`https:`&&t.protocol!==`http:`)throw new n(`Only HTTP or HTTPS music links are supported.`,400);let r;if(o(t.hostname,`zing-mp3`))r=`zing-mp3`;else if(o(t.hostname,`nhac-cua-tui`))r=`nhac-cua-tui`;else if(o(t.hostname,`tiktok`))r=`tiktok`;else if(o(t.hostname,`youtube`))r=`youtube`;else throw new n(`Only Zing MP3, NhacCuaTui, TikTok, and YouTube music links are supported.`,400);return t.protocol=`https:`,t.username=``,t.password=``,t.port=``,t.hash=``,{provider:r,url:t}}function c(e,t){if(e.protocol!==`https:`||e.username||e.password||e.port||!o(e.hostname,t))throw new n(`The provider redirected to an unsupported address.`,502)}async function l(e,t,r={}){let i=new URL(e);c(i,t);let a=new Headers(r.headers),o=(r.method??`GET`).toUpperCase(),s=r.body;a.has(`accept-language`)||a.set(`accept-language`,`vi-VN,vi;q=0.9,en;q=0.8`),a.has(`user-agent`)||a.set(`user-agent`,`Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36`);for(let e=0;e<=5;e+=1){let e=await fetch(i,{...r,body:s,method:o,redirect:`manual`,signal:r.signal??AbortSignal.timeout(3e4),headers:a});if([301,302,303,307,308].includes(e.status)){let r=e.headers.get(`location`);if(await e.body?.cancel().catch(()=>void 0),!r)throw new n(`The provider returned an invalid redirect.`);let l;try{l=new URL(r,i)}catch{throw new n(`The provider returned an invalid redirect.`)}c(l,t),l.origin!==i.origin&&(a.delete(`authorization`),a.delete(`cookie`),a.delete(`proxy-authorization`)),(e.status===303&&o!==`HEAD`||(e.status===301||e.status===302)&&o===`POST`)&&(o=`GET`,s=void 0,a.delete(`content-encoding`),a.delete(`content-language`),a.delete(`content-length`),a.delete(`content-location`),a.delete(`content-type`)),i=l;continue}return{response:e,url:i}}throw new n(`The provider redirected too many times.`)}async function u(t,r,i={}){let{response:a,url:o}=await l(t,r,i);if(!a.ok)throw await a.body?.cancel().catch(()=>void 0),new n(`The provider returned HTTP ${a.status}.`,a.status>=400&&a.status<500?400:502);let s=Number(a.headers.get(`content-length`));if(Number.isFinite(s)&&s>e)throw await a.body?.cancel().catch(()=>void 0),new n(`The provider page is too large to import.`,413);if(!a.body)return{text:``,url:o,headers:a.headers};let c=a.body.getReader(),u=new TextDecoder,d=[],f=0;for(;;){let{done:t,value:r}=await c.read();if(t)break;if(f+=r.byteLength,f>e)throw await c.cancel(),new n(`The provider page is too large to import.`,413);d.push(u.decode(r,{stream:!0}))}return d.push(u.decode()),{text:d.join(``),url:o,headers:a.headers}}export{u as a,l as i,i as n,s as o,r,n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){if(e.headers.get(`sec-fetch-site`)===`cross-site`)return!1;let t=e.headers.get(`origin`);if(!t)return!0;try{return new URL(t).origin===new URL(e.url).origin}catch{return!1}}function t(){return process.platform===`darwin`?`macos`:process.platform===`win32`?`windows`:`unsupported`}function n(e=t()){switch(e){case`macos`:return`macOS`;case`windows`:return`Windows`;default:return process.platform}}export{n,e as r,t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./request-context-C1ZJzkex.js";import t from"node:path";import"node:fs";var n=/\\/g,r=process.platform===`win32`,i=e=>e.startsWith(`\\\\?\\`)?e:e.replace(n,`/`),a=t.win32;function o(e){return(...t)=>i(e(...t))}var s={resolve:o(a.resolve),normalize:o(a.normalize),join:o(a.join),relative:o(a.relative),dirname:o(a.dirname),format:o(a.format),parse:e=>{let t=a.parse(e);return t.root=i(t.root),t.dir=i(t.dir),t},basename:a.basename,extname:a.extname,isAbsolute:a.isAbsolute,matchesGlob:a.matchesGlob,toNamespacedPath:a.toNamespacedPath,delimiter:a.delimiter,sep:`/`},c={...t.posix};c.posix=s.posix=c,c.win32=s.win32=s;var l=r?s:c,{basename:u,delimiter:d,dirname:f,extname:p,format:m,isAbsolute:h,join:g,matchesGlob:_,normalize:v,parse:y,relative:b,resolve:x,sep:S,toNamespacedPath:C}=l;function w(){return globalThis.__VINEXT_onRequestErrorHandler__??null}function T(t,n,r){let i=w();if(!i)return Promise.resolve();let a=(async()=>{try{await i(t,n,r)}catch(e){console.error(`[vinext] onRequestError handler threw:`,e instanceof Error?e.message:String(e))}})();return e()?.waitUntil(a),a}export{l as n,T as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,n as t,o as n,s as r}from"./cache-headers-BQ-QuzWN.js";function i(e){return{effectiveRevalidate:e.cacheControlMeta?.revalidate??e.revalidateSeconds,effectiveExpire:e.cacheControlMeta===void 0?void 0:e.cacheControlMeta.expire??e.expireSeconds}}function a(r,i,a,o){if(i===`app-route`){if(a===0)return t;if(a===1/0)return e}return n(r,a,o)}function o(e){if(e.cacheState===`MISS`)return{disposition:`MISS`,scheduleRegeneration:!1,cacheControl:``};let{effectiveRevalidate:t,effectiveExpire:n}=i(e);return e.cacheState===`HIT`?{disposition:`HIT`,scheduleRegeneration:!1,cacheControl:a(`HIT`,e.kind,t,n)}:{disposition:`STALE`,scheduleRegeneration:!0,cacheControl:a(`STALE`,e.kind,t,n)}}function s(n,i){return n===0?t:n===1/0?e:r(n,i)}export{o as n,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./framework~index~layout~layout~page~page~page~layout~page~app-page-cache-render~app-page-cac~nvd6h53m-ydvR7YSg.js";import{t as r}from"./app-top-nav-aGPkB57A.js";import i from"../../__vite_rsc_assets_manifest.js";var a=e(t()),o=((e,t,n,r)=>function(){return e.createElement(e.Fragment,null,[...t.css.map(t=>e.createElement(`link`,{key:`css:`+t,rel:`stylesheet`,...r?{precedence:r}:{},href:t,"data-rsc-css-href":t})),n&&e.createElement(n,{key:`remove-duplicate-css`})])})(a.default,i.serverResources[`app/netflix/layout.tsx`],void 0,`vite-rsc/importer-resources`),s=n(),c={title:`Netflix | Home Atom`,description:`Browse and play your local movie library.`,icons:{icon:[{url:`/icons/netflix.ico`,type:`image/x-icon`}]}};function l({children:e}){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r,{}),(0,s.jsx)(`div`,{className:`app-top-nav-offset`,children:e})]})}var u=d(l,`default`);function d(e,t){if(typeof e!=`function`)return e;function n(t){return a.createElement(a.Fragment,null,a.createElement(o),a.createElement(e,t))}return Object.defineProperty(n,"name",{value:t}),n}export{u as default,c as metadata};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./framework~index~layout~layout~page~page~page~layout~page~app-page-cache-render~app-page-cac~nvd6h53m-ydvR7YSg.js";import{t as r}from"./app-top-nav-aGPkB57A.js";import i from"../../__vite_rsc_assets_manifest.js";var a=e(t()),o=((e,t,n,r)=>function(){return e.createElement(e.Fragment,null,[...t.css.map(t=>e.createElement(`link`,{key:`css:`+t,rel:`stylesheet`,...r?{precedence:r}:{},href:t,"data-rsc-css-href":t})),n&&e.createElement(n,{key:`remove-duplicate-css`})])})(a.default,i.serverResources[`app/spotify/layout.tsx`],void 0,`vite-rsc/importer-resources`),s=n(),c={title:`Spotify | Home Atom`,description:`Play demo tracks and your downloaded local music library.`,icons:{icon:[{url:`/icons/spotify.ico`,type:`image/x-icon`}]}};function l({children:e}){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r,{}),(0,s.jsx)(`div`,{className:`app-top-nav-offset`,children:e})]})}var u=d(l,`default`);function d(e,t){if(typeof e!=`function`)return e;function n(t){return a.createElement(a.Fragment,null,a.createElement(o),a.createElement(e,t))}return Object.defineProperty(n,"name",{value:t}),n}export{u as default,c as metadata};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./framework~index~layout~layout~page~page~page~layout~page~app-page-cache-render~app-page-cac~nvd6h53m-ydvR7YSg.js";import{P as t}from"../../index.js";import{f as n,l as r,m as i,s as a,u as o}from"./database-BNnYfHmT.js";import{n as s,r as c}from"./catalog-BS93IoWO.js";var l=t(()=>{throw Error(`Unexpectedly client reference export 'NetflixBrowser' is called on server`)},`278c117307e7`,`NetflixBrowser`),u=e();function d({initialSearchOpen:e=!1,initialSearchQuery:t=``}){let d=a();return(0,u.jsx)(l,{featured:c,rows:s,initialImportedTitles:n(d.id),initialProviders:o(d.id),initialProfiles:i(),initialActiveProfile:d,initialProfileLibrary:r(d.id),initialSearchOpen:e,initialSearchQuery:t})}export{d as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./framework~index~layout~layout~page~page~page~layout~page~app-page-cache-render~app-page-cac~nvd6h53m-ydvR7YSg.js";import{P as t}from"../../index.js";var n=t(()=>{throw Error(`Unexpectedly client reference export 'Storefront' is called on server`)},`f1da2b17eb86`,`Storefront`),r=e();function i(){return(0,r.jsx)(n,{})}export{i as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./framework~index~layout~layout~page~page~page~layout~page~app-page-cache-render~app-page-cac~nvd6h53m-ydvR7YSg.js";import{t}from"./netflix-page-BRbORN1F.js";var n=e(),r=`force-dynamic`,i=`nodejs`;async function a({searchParams:e}){let{q:r}=await e;return(0,n.jsx)(t,{initialSearchOpen:!0,initialSearchQuery:Array.isArray(r)?r[0]??``:r??``})}export{a as default,r as dynamic,i as runtime};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./framework~index~layout~layout~page~page~page~layout~page~app-page-cache-render~app-page-cac~nvd6h53m-ydvR7YSg.js";import{P as t}from"../../index.js";import{m as n,s as r}from"./database-BNnYfHmT.js";var i=t(()=>{throw Error(`Unexpectedly client reference export 'SpotifyApp' is called on server`)},`6fda1fc439ba`,`SpotifyApp`),a=e(),o=`nodejs`,s=`force-dynamic`;function c(){return(0,a.jsx)(i,{initialProfiles:n(),initialActiveProfile:r()})}export{c as default,s as dynamic,o as runtime};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./framework~index~layout~layout~page~page~page~layout~page~app-page-cache-render~app-page-cac~nvd6h53m-ydvR7YSg.js";import{t}from"./netflix-page-BRbORN1F.js";var n=e(),r=`force-dynamic`,i=`nodejs`;function a(){return(0,n.jsx)(t,{})}export{a as default,r as dynamic,i as runtime};
|