veltrixcode commited on
Commit
537d106
·
verified ·
1 Parent(s): eaeb5bb

Upload 12 files

Browse files
Dockerfile CHANGED
@@ -1,17 +1,33 @@
1
- FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install system deps
6
- RUN apt-get update && apt-get install -y --no-install-recommends \
7
- libgl1 libglib2.0-0 && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
- COPY requirements.txt .
10
- RUN pip install --no-cache-dir -r requirements.txt
 
11
 
12
  COPY . .
13
 
14
- # HF Spaces uses port 7860
 
 
 
15
  EXPOSE 7860
16
 
17
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM node:22-alpine3.20
2
 
3
  WORKDIR /app
4
 
5
+ # Install Chromium and all required system dependencies for Puppeteer
6
+ RUN apk update && apk add --no-cache \
7
+ chromium \
8
+ nss \
9
+ freetype \
10
+ harfbuzz \
11
+ ca-certificates \
12
+ ttf-freefont \
13
+ font-noto \
14
+ font-noto-emoji \
15
+ fontconfig \
16
+ dbus \
17
+ udev \
18
+ curl \
19
+ && fc-cache -fv
20
 
21
+ COPY package*.json ./
22
+
23
+ RUN npm ci --omit=dev
24
 
25
  COPY . .
26
 
27
+ ENV PORT=7860
28
+ ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
29
+ ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
30
+
31
  EXPOSE 7860
32
 
33
+ CMD ["node", "index.js"]
controllers/canvasController.js ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { getCanvases } from '../services/spotifyCanvasService.js';
2
+ import { searchSpotifyGraphQL } from '../services/browserAuthService.js';
3
+
4
+ const normalizeText = (text) => {
5
+ if (!text) return '';
6
+ return text.toLowerCase()
7
+ .replace(/[^a-z0-9]/g, ' ')
8
+ .replace(/\s+/g, ' ')
9
+ .trim();
10
+ };
11
+
12
+ const findBestMatch = (candidates, name, artist, duration) => {
13
+ const targetName = normalizeText(name);
14
+ const targetArtist = normalizeText(artist);
15
+
16
+ let targetDurationMs = null;
17
+ if (duration !== undefined && duration !== null) {
18
+ const parsedDuration = parseFloat(duration);
19
+ if (!isNaN(parsedDuration)) {
20
+ targetDurationMs = parsedDuration < 3000 ? parsedDuration * 1000 : parsedDuration;
21
+ }
22
+ }
23
+
24
+ let bestMatch = null;
25
+ let bestScore = -1;
26
+
27
+ for (const track of candidates) {
28
+ let score = 0;
29
+ const trackName = normalizeText(track.name);
30
+
31
+ if (trackName === targetName) {
32
+ score += 40;
33
+ } else if (trackName.includes(targetName) || targetName.includes(trackName)) {
34
+ score += 20;
35
+ }
36
+
37
+ let artistMatch = false;
38
+ let exactArtistMatch = false;
39
+ for (const trackArtist of track.artists || []) {
40
+ const normTrackArtist = normalizeText(trackArtist.name);
41
+ if (normTrackArtist === targetArtist) {
42
+ exactArtistMatch = true;
43
+ artistMatch = true;
44
+ } else if (normTrackArtist.includes(targetArtist) || targetArtist.includes(normTrackArtist)) {
45
+ artistMatch = true;
46
+ }
47
+ }
48
+
49
+ if (exactArtistMatch) {
50
+ score += 40;
51
+ } else if (artistMatch) {
52
+ score += 20;
53
+ }
54
+
55
+ if (targetDurationMs !== null && track.duration_ms) {
56
+ const diffSec = Math.abs(track.duration_ms - targetDurationMs) / 1000;
57
+ if (diffSec <= 2) {
58
+ score += 30;
59
+ } else if (diffSec <= 5) {
60
+ score += 20;
61
+ } else if (diffSec <= 10) {
62
+ score += 10;
63
+ } else if (diffSec > 30) {
64
+ score -= 20;
65
+ }
66
+ }
67
+
68
+ if (score > bestScore) {
69
+ bestScore = score;
70
+ bestMatch = track;
71
+ }
72
+ }
73
+
74
+ return bestScore >= 20 ? bestMatch : null;
75
+ };
76
+
77
+ export const fetchCanvas = async (req, res) => {
78
+ const { trackId, name, song, track, artist, duration } = req.query;
79
+
80
+ // 1. Direct track ID lookup
81
+ if (trackId) {
82
+ const canvasData = await getCanvases(`spotify:track:${trackId}`);
83
+ if (!canvasData) {
84
+ return res.status(500).json({ error: 'Failed to fetch canvas data' });
85
+ }
86
+ return res.json(canvasData);
87
+ }
88
+
89
+ // 2. Search and match mode
90
+ const targetSongName = name || song || track;
91
+ if (!targetSongName) {
92
+ return res.status(400).json({ error: 'Missing trackId or name parameter' });
93
+ }
94
+
95
+ try {
96
+ // Build search query
97
+ const searchQuery = artist ? `${targetSongName} ${artist}` : targetSongName;
98
+
99
+ console.log(`Searching Spotify GraphQL for: "${searchQuery}"`);
100
+ const candidates = await searchSpotifyGraphQL(searchQuery, 20);
101
+
102
+ if (candidates.length === 0) {
103
+ return res.status(404).json({ error: 'No matching tracks found on Spotify' });
104
+ }
105
+
106
+ const matchedTrack = findBestMatch(candidates, targetSongName, artist, duration);
107
+ if (!matchedTrack) {
108
+ return res.status(404).json({ error: 'No track matching the name, artist, and duration criteria was found' });
109
+ }
110
+
111
+ console.log(`Matched track: "${matchedTrack.name}" (${matchedTrack.id})`);
112
+
113
+ const canvasData = await getCanvases(`spotify:track:${matchedTrack.id}`);
114
+ if (!canvasData) {
115
+ return res.status(500).json({ error: 'Failed to fetch canvas data for the matched track' });
116
+ }
117
+
118
+ res.json({
119
+ matchedTrack: {
120
+ id: matchedTrack.id,
121
+ name: matchedTrack.name,
122
+ artist: matchedTrack.artists?.map(a => a.name).join(', '),
123
+ durationMs: matchedTrack.duration_ms
124
+ },
125
+ ...canvasData
126
+ });
127
+ } catch (error) {
128
+ console.error('Fetch canvas error:', error.response?.data || error.message);
129
+ res.status(500).json({ error: 'An error occurred while fetching canvas data' });
130
+ }
131
+ };
cookies.txt ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Netscape HTTP Cookie File
2
+ # https://curl.haxx.se/rfc/cookie_spec.html
3
+ # This is a generated file! Do not edit.
4
+
5
+ .spotify.com TRUE / TRUE 1815306266 sp_t 08009459-8894-42a5-b83b-0de84f60ad51
6
+ .spotify.com TRUE / FALSE 1811081975 OptanonAlertBoxClosed 2026-05-23T14:19:35.394Z
7
+ .spotify.com TRUE / FALSE 1787321976 _gcl_au 1.1.1842046148.1779545976
8
+ .spotify.com TRUE / FALSE 1791470033 _fbp fb.1.1779545976729.679919829838386801
9
+ .spotify.com TRUE / FALSE 1813760376 _scid nncpLexJj06zv3MbYUrZy42M5aNOu4K4
10
+ .spotify.com TRUE / TRUE 1815230030 sp_adid 291f5252-ebf1-4fb6-a96b-0cac7385bfd1
11
+ .spotify.com TRUE / FALSE 1787322060 _gac_UA-5784146-31 1.1779546060.Cj0KCQjwoMXQBhDcARIsAH-eEts5XWaXt_MSMDjFoCbOFKAEi4IPRgNI9iRWPGbZ9Mk5Po8YSo1cMDAaAq4_EALw_wcB
12
+ .spotify.com TRUE / TRUE 1787817290 sp_gaid 0088fc4accded89d0e9abc70d0b18c9e1b06e45c9680471e3e9698
13
+ .spotify.com TRUE / TRUE 1783776746 sp_landing https%3A%2F%2Fopen.spotify.com%2Fplaylist%2F0KXnR5OWkPxsUSW695dEUm%3Fsi%3D0CdcYGDcTpO9BzMBKgf-mA
14
+ .spotify.com TRUE / FALSE 1783856671 _gid GA1.2.413093824.1783690371
15
+ .spotify.com TRUE / TRUE 1815226375 sp_dc AQC451bQrVq12dDqg0TwarZk0b4ZRumdTf7BJcIsLv42WlxZwQm3nB7ONppeXLpNrs2qVJpKxJibkgFRrrp2cPtn6_LzVB08r2tHZUR_NuhuK5I1C2IePag2VoU_h__WvxNzP00wg7gUFUYEeaV81JAnNGDlRZuFucyinsp09FFutpZt_mmjzk8--Wc2SNeupDqZAxL9ZkMdJ1uhZ0GW_XkmALvTa1kLbOajoUwWdr4D9gx9wqrFeZR77b7r717XmxtbsN0WXNoVPCA
16
+ .spotify.com TRUE / TRUE 1815226375 sp_key 294ce30d-0fee-476f-b66a-d9a4b472a9ba
17
+ .spotify.com TRUE / TRUE 1783779279 sp_m in-en
18
+ .spotify.com TRUE / FALSE 1817907287 _sctr 1%7C1783621800000
19
+ .spotify.com TRUE / TRUE 1788877887 sp_last_utm %7B%22utm_term%22%3A%22None%22%2C%22utm_campaign%22%3A%22na-uac-alwayson-Performance%2BAlwaysON%2BPremiumBusiness%2B2F1-Performance%2BSearch%2BPanIndia%2BPremium-performance-brand-india-apac-not-applicable-2025q1-na-google%22%2C%22utm_medium%22%3A%22display%22%2C%22utm_source%22%3A%22uac-brand-india-na%22%2C%22utm_content%22%3A%22None%22%7D
20
+ .spotify.com TRUE / FALSE 1791470028 _gcl_gs 2.1.k1$i1783693873$u193005167
21
+ .spotify.com TRUE / FALSE 1791470028 _gcl_aw GCL.1783694028.Cj0KCQjwsMLSBhD9ARIsAIpUTDrHXqpqU-Tnsv-ywxxQ-eBrbeade3i5sp1Ecp3OSwL4v2UsuNc09KcaArTpEALw_wcB
22
+ .spotify.com TRUE / FALSE 1791470028 _gcl_dc GCL.1783694028.Cj0KCQjwsMLSBhD9ARIsAIpUTDrHXqpqU-Tnsv-ywxxQ-eBrbeade3i5sp1Ecp3OSwL4v2UsuNc09KcaArTpEALw_wcB
23
+ .spotify.com TRUE / FALSE 1817908429 _scid_r qfcpLexJj06zv3MbYUrZy42M5aNOu4K4LDLmDA
24
+ .spotify.com TRUE / FALSE 1815230032 AMP_MKTG_5048e0c51e JTdCJTIydXRtX2NhbXBhaWduJTIyJTNBJTIybmEtdWFjLWFsd2F5c29uLVBlcmZvcm1hbmNlJTJCQWx3YXlzT04lMkJQcmVtaXVtQnVzaW5lc3MlMkIyRjEtUGVyZm9ybWFuY2UlMkJTZWFyY2glMkJQYW5JbmRpYSUyQlByZW1pdW0tcGVyZm9ybWFuY2UtYnJhbmQtaW5kaWEtYXBhYy1ub3QtYXBwbGljYWJsZS0yMDI1cTEtbmEtZ29vZ2xlJTIyJTJDJTIydXRtX2NvbnRlbnQlMjIlM0ElMjJOb25lJTIyJTJDJTIydXRtX21lZGl1bSUyMiUzQSUyMmRpc3BsYXklMjIlMkMlMjJ1dG1fc291cmNlJTIyJTNBJTIydWFjLWJyYW5kLWluZGlhLW5hJTIyJTJDJTIydXRtX3Rlcm0lMjIlM0ElMjJOb25lJTIyJTJDJTIycmVmZXJyZXIlMjIlM0ElMjJodHRwcyUzQSUyRiUyRnd3dy5nb29nbGUuY29tJTJGJTIyJTJDJTIycmVmZXJyaW5nX2RvbWFpbiUyMiUzQSUyMnd3dy5nb29nbGUuY29tJTIyJTJDJTIyZ2JyYWlkJTIyJTNBJTIyMEFBQUFBRGZ6RHMyQ3N6el9YRk9nWGRkWkZsd2JER3M4OSUyMiUyQyUyMmdjbGlkJTIyJTNBJTIyQ2owS0NRandzTUxTQmhEOUFSSXNBSXBVVERySFhxcHFVLVRuc3YteXd4eFEtZUJyYmVhZGUzaTVzcDFFY3AzT1N3TDR2MlVzdU5jMDlLY2FBclRwRUFMd193Y0IlMjIlN0Q=
25
+ .spotify.com TRUE / FALSE 1815230032 AMP_5048e0c51e JTdCJTIyZGV2aWNlSWQlMjIlM0ElMjI0ODkyOWZmNS02ZTZmLTRjOGItYmEzZC1lNmZmZTM2ZmM2ZmElMjIlMkMlMjJ1c2VySWQlMjIlM0ElMjIwMDg4ZmM0YWNjZGVkODlkMGU5YWJjNzBkMGIxOGM5ZTFiMDZlNDVjOTY4MDQ3MWUzZTk2OTglMjIlMkMlMjJzZXNzaW9uSWQlMjIlM0ExNzgzNjkyODg0Njc4JTJDJTIyb3B0T3V0JTIyJTNBZmFsc2UlMkMlMjJsYXN0RXZlbnRUaW1lJTIyJTNBMTc4MzY5NDAzMjI5NCUyQyUyMmxhc3RFdmVudElkJTIyJTNBMTQlMkMlMjJwYWdlQ291bnRlciUyMiUzQTMlMkMlMjJjb29raWVEb21haW4lMjIlM0ElMjIuc3BvdGlmeS5jb20lMjIlN0Q=
26
+ .spotify.com TRUE / FALSE 1818254148 _ga_S35RN5WNT2 GS2.1.s1783692884$o2$g1$t1783694147$j60$l0$h0
27
+ .spotify.com TRUE / FALSE 1818254562 _ga_ZWRF3NLZJZ GS2.1.s1783692846$o2$g1$t1783694561$j57$l0$h0
28
+ .spotify.com TRUE / FALSE 1815306270 OptanonConsent isGpcEnabled=0&datestamp=Sat+Jul+11+2026+17%3A14%3A30+GMT%2B0530+(India+Standard+Time)&version=202601.2.0&browserGpcFlag=0&isIABGlobal=false&hosts=&landingPath=NotLandingPage&groups=s00%3A1%2Cf00%3A1%2Cm00%3A1%2Ct00%3A1%2Ci00%3A1%2Cf11%3A1%2Cm02%3A1%2Ct02%3A1%2Cm03%3A1%2CID01%3A1&AwaitingReconsent=false&geolocation=IN%3BUP
29
+ .spotify.com TRUE / TRUE 1783772071 _cs_mk_ga 0.24175275791763395_1783770271243
30
+ .spotify.com TRUE / FALSE 1818330272 _ga_ZWG1NSHWD8 GS2.1.s1783770271$o5$g0$t1783770271$j60$l0$h0
31
+ .spotify.com TRUE / FALSE 1818330272 _ga GA1.2.520765516.1779545963
32
+ .spotify.com TRUE / FALSE 1818330272 _ga_BMC5VGR8YS GS2.2.s1783770271$o5$g0$t1783770271$j60$l0$h0
index.js ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import express from 'express';
2
+ import canvasRoutes from './routes/canvasRoutes.js';
3
+ import { initPersistentBrowser } from './services/browserAuthService.js';
4
+
5
+ const app = express();
6
+ const PORT = process.env.PORT || 7860;
7
+
8
+ app.use('/api/canvas', canvasRoutes);
9
+
10
+ app.listen(PORT, async function () {
11
+ console.log("Listening on PORT: ", PORT);
12
+ console.log(`Running on local: http://localhost:${PORT}`);
13
+ try {
14
+ await initPersistentBrowser();
15
+ console.log('Persistent browser initialized successfully.');
16
+ } catch (err) {
17
+ console.error('Failed to initialize persistent browser:', err.message);
18
+ }
19
+ });
package-lock.json ADDED
@@ -0,0 +1,1338 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "Spotify-Canvas-API",
3
+ "version": "2.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "Spotify-Canvas-API",
9
+ "version": "2.0.0",
10
+ "license": "MIT",
11
+ "dependencies": {
12
+ "axios": "^1.6.0",
13
+ "express": "latest",
14
+ "google-protobuf": "^3.11.4",
15
+ "otpauth": "latest",
16
+ "puppeteer-core": "^25.3.0"
17
+ }
18
+ },
19
+ "node_modules/@noble/hashes": {
20
+ "version": "2.2.0",
21
+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.2.0.tgz",
22
+ "integrity": "sha512-IYqDGiTXab6FniAgnSdZwgWbomxpy9FtYvLKs7wCUs2a8RkITG+DFGO1DM9cr+E3/RgADRpFjrKVaJ1z6sjtEg==",
23
+ "license": "MIT",
24
+ "engines": {
25
+ "node": ">= 20.19.0"
26
+ },
27
+ "funding": {
28
+ "url": "https://paulmillr.com/funding/"
29
+ }
30
+ },
31
+ "node_modules/@puppeteer/browsers": {
32
+ "version": "3.0.6",
33
+ "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-3.0.6.tgz",
34
+ "integrity": "sha512-B/gKoqlFkzhvzsI6jo9K1cZz9o5ypviVv/xu8CwA4grZzyVwN+XfkT+tu8T1zrauuEXv6VhS2oGX+6NL95WcKA==",
35
+ "license": "Apache-2.0",
36
+ "dependencies": {
37
+ "modern-tar": "^0.7.6",
38
+ "yargs": "^18.0.0"
39
+ },
40
+ "bin": {
41
+ "browsers": "lib/main-cli.js"
42
+ },
43
+ "engines": {
44
+ "node": ">=22.12.0"
45
+ },
46
+ "peerDependencies": {
47
+ "proxy-agent": ">=8.0.1",
48
+ "yauzl": "^2.10.0 || ^3.4.0"
49
+ },
50
+ "peerDependenciesMeta": {
51
+ "proxy-agent": {
52
+ "optional": true
53
+ },
54
+ "yauzl": {
55
+ "optional": true
56
+ }
57
+ }
58
+ },
59
+ "node_modules/accepts": {
60
+ "version": "2.0.0",
61
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",
62
+ "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",
63
+ "license": "MIT",
64
+ "dependencies": {
65
+ "mime-types": "^3.0.0",
66
+ "negotiator": "^1.0.0"
67
+ },
68
+ "engines": {
69
+ "node": ">= 0.6"
70
+ }
71
+ },
72
+ "node_modules/agent-base": {
73
+ "version": "6.0.2",
74
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
75
+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
76
+ "license": "MIT",
77
+ "dependencies": {
78
+ "debug": "4"
79
+ },
80
+ "engines": {
81
+ "node": ">= 6.0.0"
82
+ }
83
+ },
84
+ "node_modules/ansi-regex": {
85
+ "version": "6.2.2",
86
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz",
87
+ "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==",
88
+ "license": "MIT",
89
+ "engines": {
90
+ "node": ">=12"
91
+ },
92
+ "funding": {
93
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
94
+ }
95
+ },
96
+ "node_modules/ansi-styles": {
97
+ "version": "6.2.3",
98
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",
99
+ "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",
100
+ "license": "MIT",
101
+ "engines": {
102
+ "node": ">=12"
103
+ },
104
+ "funding": {
105
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
106
+ }
107
+ },
108
+ "node_modules/asynckit": {
109
+ "version": "0.4.0",
110
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
111
+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
112
+ "license": "MIT"
113
+ },
114
+ "node_modules/axios": {
115
+ "version": "1.18.1",
116
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.18.1.tgz",
117
+ "integrity": "sha512-3nTvFlvpn9Zu/RkHUqtc7/+al4UpRW5az71ap5zccp6e8RAYEzhMTecX8Dz1wWDYrPpUoB1HAQEGEAEvUr7S9g==",
118
+ "license": "MIT",
119
+ "dependencies": {
120
+ "follow-redirects": "^1.16.0",
121
+ "form-data": "^4.0.5",
122
+ "https-proxy-agent": "^5.0.1",
123
+ "proxy-from-env": "^2.1.0"
124
+ }
125
+ },
126
+ "node_modules/body-parser": {
127
+ "version": "2.3.0",
128
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.3.0.tgz",
129
+ "integrity": "sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==",
130
+ "license": "MIT",
131
+ "dependencies": {
132
+ "bytes": "^3.1.2",
133
+ "content-type": "^2.0.0",
134
+ "debug": "^4.4.3",
135
+ "http-errors": "^2.0.1",
136
+ "iconv-lite": "^0.7.2",
137
+ "on-finished": "^2.4.1",
138
+ "qs": "^6.15.2",
139
+ "raw-body": "^3.0.2",
140
+ "type-is": "^2.1.0"
141
+ },
142
+ "engines": {
143
+ "node": ">=18"
144
+ },
145
+ "funding": {
146
+ "type": "opencollective",
147
+ "url": "https://opencollective.com/express"
148
+ }
149
+ },
150
+ "node_modules/body-parser/node_modules/content-type": {
151
+ "version": "2.0.0",
152
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.0.0.tgz",
153
+ "integrity": "sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==",
154
+ "license": "MIT",
155
+ "engines": {
156
+ "node": ">=18"
157
+ },
158
+ "funding": {
159
+ "type": "opencollective",
160
+ "url": "https://opencollective.com/express"
161
+ }
162
+ },
163
+ "node_modules/bytes": {
164
+ "version": "3.1.2",
165
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
166
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
167
+ "license": "MIT",
168
+ "engines": {
169
+ "node": ">= 0.8"
170
+ }
171
+ },
172
+ "node_modules/call-bind-apply-helpers": {
173
+ "version": "1.0.2",
174
+ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
175
+ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
176
+ "license": "MIT",
177
+ "dependencies": {
178
+ "es-errors": "^1.3.0",
179
+ "function-bind": "^1.1.2"
180
+ },
181
+ "engines": {
182
+ "node": ">= 0.4"
183
+ }
184
+ },
185
+ "node_modules/call-bound": {
186
+ "version": "1.0.4",
187
+ "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
188
+ "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
189
+ "license": "MIT",
190
+ "dependencies": {
191
+ "call-bind-apply-helpers": "^1.0.2",
192
+ "get-intrinsic": "^1.3.0"
193
+ },
194
+ "engines": {
195
+ "node": ">= 0.4"
196
+ },
197
+ "funding": {
198
+ "url": "https://github.com/sponsors/ljharb"
199
+ }
200
+ },
201
+ "node_modules/chromium-bidi": {
202
+ "version": "16.0.1",
203
+ "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-16.0.1.tgz",
204
+ "integrity": "sha512-J63PGu/9PpeCwLIcKYyzWP6yaVL5pxuBc0shlYCYM8BaAkmlwiQboXO1iNbOgSDbVklEyYFfNEcHD8oOAWacUA==",
205
+ "license": "Apache-2.0",
206
+ "dependencies": {
207
+ "mitt": "^3.0.1",
208
+ "zod": "^3.24.1"
209
+ },
210
+ "engines": {
211
+ "node": ">=20.19.0 <22.0.0 || >=22.12.0"
212
+ },
213
+ "peerDependencies": {
214
+ "devtools-protocol": "*"
215
+ }
216
+ },
217
+ "node_modules/cliui": {
218
+ "version": "9.0.1",
219
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz",
220
+ "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==",
221
+ "license": "ISC",
222
+ "dependencies": {
223
+ "string-width": "^7.2.0",
224
+ "strip-ansi": "^7.1.0",
225
+ "wrap-ansi": "^9.0.0"
226
+ },
227
+ "engines": {
228
+ "node": ">=20"
229
+ }
230
+ },
231
+ "node_modules/combined-stream": {
232
+ "version": "1.0.8",
233
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
234
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
235
+ "license": "MIT",
236
+ "dependencies": {
237
+ "delayed-stream": "~1.0.0"
238
+ },
239
+ "engines": {
240
+ "node": ">= 0.8"
241
+ }
242
+ },
243
+ "node_modules/content-disposition": {
244
+ "version": "1.1.0",
245
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.1.0.tgz",
246
+ "integrity": "sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==",
247
+ "license": "MIT",
248
+ "engines": {
249
+ "node": ">=18"
250
+ },
251
+ "funding": {
252
+ "type": "opencollective",
253
+ "url": "https://opencollective.com/express"
254
+ }
255
+ },
256
+ "node_modules/content-type": {
257
+ "version": "1.0.5",
258
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
259
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
260
+ "license": "MIT",
261
+ "engines": {
262
+ "node": ">= 0.6"
263
+ }
264
+ },
265
+ "node_modules/cookie": {
266
+ "version": "0.7.2",
267
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
268
+ "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
269
+ "license": "MIT",
270
+ "engines": {
271
+ "node": ">= 0.6"
272
+ }
273
+ },
274
+ "node_modules/cookie-signature": {
275
+ "version": "1.2.2",
276
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz",
277
+ "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",
278
+ "license": "MIT",
279
+ "engines": {
280
+ "node": ">=6.6.0"
281
+ }
282
+ },
283
+ "node_modules/debug": {
284
+ "version": "4.4.3",
285
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
286
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
287
+ "license": "MIT",
288
+ "dependencies": {
289
+ "ms": "^2.1.3"
290
+ },
291
+ "engines": {
292
+ "node": ">=6.0"
293
+ },
294
+ "peerDependenciesMeta": {
295
+ "supports-color": {
296
+ "optional": true
297
+ }
298
+ }
299
+ },
300
+ "node_modules/delayed-stream": {
301
+ "version": "1.0.0",
302
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
303
+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
304
+ "license": "MIT",
305
+ "engines": {
306
+ "node": ">=0.4.0"
307
+ }
308
+ },
309
+ "node_modules/depd": {
310
+ "version": "2.0.0",
311
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
312
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
313
+ "license": "MIT",
314
+ "engines": {
315
+ "node": ">= 0.8"
316
+ }
317
+ },
318
+ "node_modules/devtools-protocol": {
319
+ "version": "0.0.1638949",
320
+ "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1638949.tgz",
321
+ "integrity": "sha512-mXwg4Fqnv0WR4iuAT/gYUmctNkjILwXFHyZ+m7Ty1dfr0ezZt2U3gnrrJTfRobJTHoXf+IbuFvFITzLrLFjwJA==",
322
+ "license": "BSD-3-Clause"
323
+ },
324
+ "node_modules/dunder-proto": {
325
+ "version": "1.0.1",
326
+ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
327
+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
328
+ "license": "MIT",
329
+ "dependencies": {
330
+ "call-bind-apply-helpers": "^1.0.1",
331
+ "es-errors": "^1.3.0",
332
+ "gopd": "^1.2.0"
333
+ },
334
+ "engines": {
335
+ "node": ">= 0.4"
336
+ }
337
+ },
338
+ "node_modules/ee-first": {
339
+ "version": "1.1.1",
340
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
341
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
342
+ "license": "MIT"
343
+ },
344
+ "node_modules/emoji-regex": {
345
+ "version": "10.6.0",
346
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz",
347
+ "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==",
348
+ "license": "MIT"
349
+ },
350
+ "node_modules/encodeurl": {
351
+ "version": "2.0.0",
352
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
353
+ "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
354
+ "license": "MIT",
355
+ "engines": {
356
+ "node": ">= 0.8"
357
+ }
358
+ },
359
+ "node_modules/es-define-property": {
360
+ "version": "1.0.1",
361
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
362
+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
363
+ "license": "MIT",
364
+ "engines": {
365
+ "node": ">= 0.4"
366
+ }
367
+ },
368
+ "node_modules/es-errors": {
369
+ "version": "1.3.0",
370
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
371
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
372
+ "license": "MIT",
373
+ "engines": {
374
+ "node": ">= 0.4"
375
+ }
376
+ },
377
+ "node_modules/es-object-atoms": {
378
+ "version": "1.1.2",
379
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz",
380
+ "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==",
381
+ "license": "MIT",
382
+ "dependencies": {
383
+ "es-errors": "^1.3.0"
384
+ },
385
+ "engines": {
386
+ "node": ">= 0.4"
387
+ }
388
+ },
389
+ "node_modules/es-set-tostringtag": {
390
+ "version": "2.1.0",
391
+ "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
392
+ "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
393
+ "license": "MIT",
394
+ "dependencies": {
395
+ "es-errors": "^1.3.0",
396
+ "get-intrinsic": "^1.2.6",
397
+ "has-tostringtag": "^1.0.2",
398
+ "hasown": "^2.0.2"
399
+ },
400
+ "engines": {
401
+ "node": ">= 0.4"
402
+ }
403
+ },
404
+ "node_modules/escalade": {
405
+ "version": "3.2.0",
406
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
407
+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
408
+ "license": "MIT",
409
+ "engines": {
410
+ "node": ">=6"
411
+ }
412
+ },
413
+ "node_modules/escape-html": {
414
+ "version": "1.0.3",
415
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
416
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
417
+ "license": "MIT"
418
+ },
419
+ "node_modules/etag": {
420
+ "version": "1.8.1",
421
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
422
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
423
+ "license": "MIT",
424
+ "engines": {
425
+ "node": ">= 0.6"
426
+ }
427
+ },
428
+ "node_modules/express": {
429
+ "version": "5.2.1",
430
+ "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",
431
+ "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
432
+ "license": "MIT",
433
+ "dependencies": {
434
+ "accepts": "^2.0.0",
435
+ "body-parser": "^2.2.1",
436
+ "content-disposition": "^1.0.0",
437
+ "content-type": "^1.0.5",
438
+ "cookie": "^0.7.1",
439
+ "cookie-signature": "^1.2.1",
440
+ "debug": "^4.4.0",
441
+ "depd": "^2.0.0",
442
+ "encodeurl": "^2.0.0",
443
+ "escape-html": "^1.0.3",
444
+ "etag": "^1.8.1",
445
+ "finalhandler": "^2.1.0",
446
+ "fresh": "^2.0.0",
447
+ "http-errors": "^2.0.0",
448
+ "merge-descriptors": "^2.0.0",
449
+ "mime-types": "^3.0.0",
450
+ "on-finished": "^2.4.1",
451
+ "once": "^1.4.0",
452
+ "parseurl": "^1.3.3",
453
+ "proxy-addr": "^2.0.7",
454
+ "qs": "^6.14.0",
455
+ "range-parser": "^1.2.1",
456
+ "router": "^2.2.0",
457
+ "send": "^1.1.0",
458
+ "serve-static": "^2.2.0",
459
+ "statuses": "^2.0.1",
460
+ "type-is": "^2.0.1",
461
+ "vary": "^1.1.2"
462
+ },
463
+ "engines": {
464
+ "node": ">= 18"
465
+ },
466
+ "funding": {
467
+ "type": "opencollective",
468
+ "url": "https://opencollective.com/express"
469
+ }
470
+ },
471
+ "node_modules/finalhandler": {
472
+ "version": "2.1.1",
473
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz",
474
+ "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==",
475
+ "license": "MIT",
476
+ "dependencies": {
477
+ "debug": "^4.4.0",
478
+ "encodeurl": "^2.0.0",
479
+ "escape-html": "^1.0.3",
480
+ "on-finished": "^2.4.1",
481
+ "parseurl": "^1.3.3",
482
+ "statuses": "^2.0.1"
483
+ },
484
+ "engines": {
485
+ "node": ">= 18.0.0"
486
+ },
487
+ "funding": {
488
+ "type": "opencollective",
489
+ "url": "https://opencollective.com/express"
490
+ }
491
+ },
492
+ "node_modules/follow-redirects": {
493
+ "version": "1.16.0",
494
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz",
495
+ "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==",
496
+ "funding": [
497
+ {
498
+ "type": "individual",
499
+ "url": "https://github.com/sponsors/RubenVerborgh"
500
+ }
501
+ ],
502
+ "license": "MIT",
503
+ "engines": {
504
+ "node": ">=4.0"
505
+ },
506
+ "peerDependenciesMeta": {
507
+ "debug": {
508
+ "optional": true
509
+ }
510
+ }
511
+ },
512
+ "node_modules/form-data": {
513
+ "version": "4.0.6",
514
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz",
515
+ "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==",
516
+ "license": "MIT",
517
+ "dependencies": {
518
+ "asynckit": "^0.4.0",
519
+ "combined-stream": "^1.0.8",
520
+ "es-set-tostringtag": "^2.1.0",
521
+ "hasown": "^2.0.4",
522
+ "mime-types": "^2.1.35"
523
+ },
524
+ "engines": {
525
+ "node": ">= 6"
526
+ }
527
+ },
528
+ "node_modules/form-data/node_modules/mime-db": {
529
+ "version": "1.52.0",
530
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
531
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
532
+ "license": "MIT",
533
+ "engines": {
534
+ "node": ">= 0.6"
535
+ }
536
+ },
537
+ "node_modules/form-data/node_modules/mime-types": {
538
+ "version": "2.1.35",
539
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
540
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
541
+ "license": "MIT",
542
+ "dependencies": {
543
+ "mime-db": "1.52.0"
544
+ },
545
+ "engines": {
546
+ "node": ">= 0.6"
547
+ }
548
+ },
549
+ "node_modules/forwarded": {
550
+ "version": "0.2.0",
551
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
552
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
553
+ "license": "MIT",
554
+ "engines": {
555
+ "node": ">= 0.6"
556
+ }
557
+ },
558
+ "node_modules/fresh": {
559
+ "version": "2.0.0",
560
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
561
+ "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",
562
+ "license": "MIT",
563
+ "engines": {
564
+ "node": ">= 0.8"
565
+ }
566
+ },
567
+ "node_modules/function-bind": {
568
+ "version": "1.1.2",
569
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
570
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
571
+ "license": "MIT",
572
+ "funding": {
573
+ "url": "https://github.com/sponsors/ljharb"
574
+ }
575
+ },
576
+ "node_modules/get-caller-file": {
577
+ "version": "2.0.5",
578
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
579
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
580
+ "license": "ISC",
581
+ "engines": {
582
+ "node": "6.* || 8.* || >= 10.*"
583
+ }
584
+ },
585
+ "node_modules/get-east-asian-width": {
586
+ "version": "1.6.0",
587
+ "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.6.0.tgz",
588
+ "integrity": "sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA==",
589
+ "license": "MIT",
590
+ "engines": {
591
+ "node": ">=18"
592
+ },
593
+ "funding": {
594
+ "url": "https://github.com/sponsors/sindresorhus"
595
+ }
596
+ },
597
+ "node_modules/get-intrinsic": {
598
+ "version": "1.3.0",
599
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
600
+ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
601
+ "license": "MIT",
602
+ "dependencies": {
603
+ "call-bind-apply-helpers": "^1.0.2",
604
+ "es-define-property": "^1.0.1",
605
+ "es-errors": "^1.3.0",
606
+ "es-object-atoms": "^1.1.1",
607
+ "function-bind": "^1.1.2",
608
+ "get-proto": "^1.0.1",
609
+ "gopd": "^1.2.0",
610
+ "has-symbols": "^1.1.0",
611
+ "hasown": "^2.0.2",
612
+ "math-intrinsics": "^1.1.0"
613
+ },
614
+ "engines": {
615
+ "node": ">= 0.4"
616
+ },
617
+ "funding": {
618
+ "url": "https://github.com/sponsors/ljharb"
619
+ }
620
+ },
621
+ "node_modules/get-proto": {
622
+ "version": "1.0.1",
623
+ "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
624
+ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
625
+ "license": "MIT",
626
+ "dependencies": {
627
+ "dunder-proto": "^1.0.1",
628
+ "es-object-atoms": "^1.0.0"
629
+ },
630
+ "engines": {
631
+ "node": ">= 0.4"
632
+ }
633
+ },
634
+ "node_modules/google-protobuf": {
635
+ "version": "3.21.4",
636
+ "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.4.tgz",
637
+ "integrity": "sha512-MnG7N936zcKTco4Jd2PX2U96Kf9PxygAPKBug+74LHzmHXmceN16MmRcdgZv+DGef/S9YvQAfRsNCn4cjf9yyQ==",
638
+ "license": "(BSD-3-Clause AND Apache-2.0)"
639
+ },
640
+ "node_modules/gopd": {
641
+ "version": "1.2.0",
642
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
643
+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
644
+ "license": "MIT",
645
+ "engines": {
646
+ "node": ">= 0.4"
647
+ },
648
+ "funding": {
649
+ "url": "https://github.com/sponsors/ljharb"
650
+ }
651
+ },
652
+ "node_modules/has-symbols": {
653
+ "version": "1.1.0",
654
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
655
+ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
656
+ "license": "MIT",
657
+ "engines": {
658
+ "node": ">= 0.4"
659
+ },
660
+ "funding": {
661
+ "url": "https://github.com/sponsors/ljharb"
662
+ }
663
+ },
664
+ "node_modules/has-tostringtag": {
665
+ "version": "1.0.2",
666
+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
667
+ "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
668
+ "license": "MIT",
669
+ "dependencies": {
670
+ "has-symbols": "^1.0.3"
671
+ },
672
+ "engines": {
673
+ "node": ">= 0.4"
674
+ },
675
+ "funding": {
676
+ "url": "https://github.com/sponsors/ljharb"
677
+ }
678
+ },
679
+ "node_modules/hasown": {
680
+ "version": "2.0.4",
681
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",
682
+ "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",
683
+ "license": "MIT",
684
+ "dependencies": {
685
+ "function-bind": "^1.1.2"
686
+ },
687
+ "engines": {
688
+ "node": ">= 0.4"
689
+ }
690
+ },
691
+ "node_modules/http-errors": {
692
+ "version": "2.0.1",
693
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
694
+ "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
695
+ "license": "MIT",
696
+ "dependencies": {
697
+ "depd": "~2.0.0",
698
+ "inherits": "~2.0.4",
699
+ "setprototypeof": "~1.2.0",
700
+ "statuses": "~2.0.2",
701
+ "toidentifier": "~1.0.1"
702
+ },
703
+ "engines": {
704
+ "node": ">= 0.8"
705
+ },
706
+ "funding": {
707
+ "type": "opencollective",
708
+ "url": "https://opencollective.com/express"
709
+ }
710
+ },
711
+ "node_modules/https-proxy-agent": {
712
+ "version": "5.0.1",
713
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
714
+ "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
715
+ "license": "MIT",
716
+ "dependencies": {
717
+ "agent-base": "6",
718
+ "debug": "4"
719
+ },
720
+ "engines": {
721
+ "node": ">= 6"
722
+ }
723
+ },
724
+ "node_modules/iconv-lite": {
725
+ "version": "0.7.3",
726
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.3.tgz",
727
+ "integrity": "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==",
728
+ "license": "MIT",
729
+ "dependencies": {
730
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
731
+ },
732
+ "engines": {
733
+ "node": ">=0.10.0"
734
+ },
735
+ "funding": {
736
+ "type": "opencollective",
737
+ "url": "https://opencollective.com/express"
738
+ }
739
+ },
740
+ "node_modules/inherits": {
741
+ "version": "2.0.4",
742
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
743
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
744
+ "license": "ISC"
745
+ },
746
+ "node_modules/ipaddr.js": {
747
+ "version": "1.9.1",
748
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
749
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
750
+ "license": "MIT",
751
+ "engines": {
752
+ "node": ">= 0.10"
753
+ }
754
+ },
755
+ "node_modules/is-promise": {
756
+ "version": "4.0.0",
757
+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
758
+ "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
759
+ "license": "MIT"
760
+ },
761
+ "node_modules/math-intrinsics": {
762
+ "version": "1.1.0",
763
+ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
764
+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
765
+ "license": "MIT",
766
+ "engines": {
767
+ "node": ">= 0.4"
768
+ }
769
+ },
770
+ "node_modules/media-typer": {
771
+ "version": "1.1.0",
772
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",
773
+ "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",
774
+ "license": "MIT",
775
+ "engines": {
776
+ "node": ">= 0.8"
777
+ }
778
+ },
779
+ "node_modules/merge-descriptors": {
780
+ "version": "2.0.0",
781
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz",
782
+ "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",
783
+ "license": "MIT",
784
+ "engines": {
785
+ "node": ">=18"
786
+ },
787
+ "funding": {
788
+ "url": "https://github.com/sponsors/sindresorhus"
789
+ }
790
+ },
791
+ "node_modules/mime-db": {
792
+ "version": "1.54.0",
793
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",
794
+ "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",
795
+ "license": "MIT",
796
+ "engines": {
797
+ "node": ">= 0.6"
798
+ }
799
+ },
800
+ "node_modules/mime-types": {
801
+ "version": "3.0.2",
802
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz",
803
+ "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",
804
+ "license": "MIT",
805
+ "dependencies": {
806
+ "mime-db": "^1.54.0"
807
+ },
808
+ "engines": {
809
+ "node": ">=18"
810
+ },
811
+ "funding": {
812
+ "type": "opencollective",
813
+ "url": "https://opencollective.com/express"
814
+ }
815
+ },
816
+ "node_modules/mitt": {
817
+ "version": "3.0.1",
818
+ "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz",
819
+ "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==",
820
+ "license": "MIT"
821
+ },
822
+ "node_modules/modern-tar": {
823
+ "version": "0.7.6",
824
+ "resolved": "https://registry.npmjs.org/modern-tar/-/modern-tar-0.7.6.tgz",
825
+ "integrity": "sha512-sweCIVXzx1aIGTCdzcMlSZt1h8k5Tmk08VNAuRk3IU28XamGiOH5ypi11g6De2CH7PhYqSSnGy2A/EFhbWnVKg==",
826
+ "license": "MIT",
827
+ "engines": {
828
+ "node": ">=18.0.0"
829
+ }
830
+ },
831
+ "node_modules/ms": {
832
+ "version": "2.1.3",
833
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
834
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
835
+ "license": "MIT"
836
+ },
837
+ "node_modules/negotiator": {
838
+ "version": "1.0.0",
839
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz",
840
+ "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",
841
+ "license": "MIT",
842
+ "engines": {
843
+ "node": ">= 0.6"
844
+ }
845
+ },
846
+ "node_modules/object-inspect": {
847
+ "version": "1.13.4",
848
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
849
+ "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
850
+ "license": "MIT",
851
+ "engines": {
852
+ "node": ">= 0.4"
853
+ },
854
+ "funding": {
855
+ "url": "https://github.com/sponsors/ljharb"
856
+ }
857
+ },
858
+ "node_modules/on-finished": {
859
+ "version": "2.4.1",
860
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
861
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
862
+ "license": "MIT",
863
+ "dependencies": {
864
+ "ee-first": "1.1.1"
865
+ },
866
+ "engines": {
867
+ "node": ">= 0.8"
868
+ }
869
+ },
870
+ "node_modules/once": {
871
+ "version": "1.4.0",
872
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
873
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
874
+ "license": "ISC",
875
+ "dependencies": {
876
+ "wrappy": "1"
877
+ }
878
+ },
879
+ "node_modules/otpauth": {
880
+ "version": "9.5.1",
881
+ "resolved": "https://registry.npmjs.org/otpauth/-/otpauth-9.5.1.tgz",
882
+ "integrity": "sha512-fJmDAHc8wImfqqqOXIlBvT1dEKrZK0Cmb2VEgScpNTolCz0PHh6ExUZGv4sLtOsWNaHCQlD+rRqaPgnoxFoZjQ==",
883
+ "license": "MIT",
884
+ "dependencies": {
885
+ "@noble/hashes": "2.2.0"
886
+ },
887
+ "funding": {
888
+ "url": "https://github.com/hectorm/otpauth?sponsor=1"
889
+ }
890
+ },
891
+ "node_modules/parseurl": {
892
+ "version": "1.3.3",
893
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
894
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
895
+ "license": "MIT",
896
+ "engines": {
897
+ "node": ">= 0.8"
898
+ }
899
+ },
900
+ "node_modules/path-to-regexp": {
901
+ "version": "8.4.2",
902
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.2.tgz",
903
+ "integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==",
904
+ "license": "MIT",
905
+ "funding": {
906
+ "type": "opencollective",
907
+ "url": "https://opencollective.com/express"
908
+ }
909
+ },
910
+ "node_modules/proxy-addr": {
911
+ "version": "2.0.7",
912
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
913
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
914
+ "license": "MIT",
915
+ "dependencies": {
916
+ "forwarded": "0.2.0",
917
+ "ipaddr.js": "1.9.1"
918
+ },
919
+ "engines": {
920
+ "node": ">= 0.10"
921
+ }
922
+ },
923
+ "node_modules/proxy-from-env": {
924
+ "version": "2.1.0",
925
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz",
926
+ "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==",
927
+ "license": "MIT",
928
+ "engines": {
929
+ "node": ">=10"
930
+ }
931
+ },
932
+ "node_modules/puppeteer-core": {
933
+ "version": "25.3.0",
934
+ "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-25.3.0.tgz",
935
+ "integrity": "sha512-fm+wpUr2oigH1PXZvwgATrM2tYWHMDG8ASzTEe9uukCye4X5Ldx1K5BTHPFKITrIWvQQAQ256d1NpbEveBcKjA==",
936
+ "license": "Apache-2.0",
937
+ "dependencies": {
938
+ "@puppeteer/browsers": "3.0.6",
939
+ "chromium-bidi": "16.0.1",
940
+ "devtools-protocol": "0.0.1638949",
941
+ "typed-query-selector": "^2.12.2",
942
+ "webdriver-bidi-protocol": "0.4.2",
943
+ "ws": "^8.21.0"
944
+ },
945
+ "engines": {
946
+ "node": ">=22.12.0"
947
+ }
948
+ },
949
+ "node_modules/qs": {
950
+ "version": "6.15.3",
951
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.3.tgz",
952
+ "integrity": "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==",
953
+ "license": "BSD-3-Clause",
954
+ "dependencies": {
955
+ "es-define-property": "^1.0.1",
956
+ "side-channel": "^1.1.1"
957
+ },
958
+ "engines": {
959
+ "node": ">=0.6"
960
+ },
961
+ "funding": {
962
+ "url": "https://github.com/sponsors/ljharb"
963
+ }
964
+ },
965
+ "node_modules/range-parser": {
966
+ "version": "1.3.0",
967
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.3.0.tgz",
968
+ "integrity": "sha512-hek2mFQpPuI4E1BBKrSto+BU3e3x4xuarsbiwr3+lf7p44juvFMV0XFWQAP3xUyqXA4RrXLIoaSUGbSt056ZMw==",
969
+ "license": "MIT",
970
+ "engines": {
971
+ "node": ">= 0.6"
972
+ },
973
+ "funding": {
974
+ "type": "opencollective",
975
+ "url": "https://opencollective.com/express"
976
+ }
977
+ },
978
+ "node_modules/raw-body": {
979
+ "version": "3.0.2",
980
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz",
981
+ "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==",
982
+ "license": "MIT",
983
+ "dependencies": {
984
+ "bytes": "~3.1.2",
985
+ "http-errors": "~2.0.1",
986
+ "iconv-lite": "~0.7.0",
987
+ "unpipe": "~1.0.0"
988
+ },
989
+ "engines": {
990
+ "node": ">= 0.10"
991
+ }
992
+ },
993
+ "node_modules/router": {
994
+ "version": "2.2.0",
995
+ "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz",
996
+ "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==",
997
+ "license": "MIT",
998
+ "dependencies": {
999
+ "debug": "^4.4.0",
1000
+ "depd": "^2.0.0",
1001
+ "is-promise": "^4.0.0",
1002
+ "parseurl": "^1.3.3",
1003
+ "path-to-regexp": "^8.0.0"
1004
+ },
1005
+ "engines": {
1006
+ "node": ">= 18"
1007
+ }
1008
+ },
1009
+ "node_modules/safer-buffer": {
1010
+ "version": "2.1.2",
1011
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
1012
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
1013
+ "license": "MIT"
1014
+ },
1015
+ "node_modules/send": {
1016
+ "version": "1.2.1",
1017
+ "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz",
1018
+ "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==",
1019
+ "license": "MIT",
1020
+ "dependencies": {
1021
+ "debug": "^4.4.3",
1022
+ "encodeurl": "^2.0.0",
1023
+ "escape-html": "^1.0.3",
1024
+ "etag": "^1.8.1",
1025
+ "fresh": "^2.0.0",
1026
+ "http-errors": "^2.0.1",
1027
+ "mime-types": "^3.0.2",
1028
+ "ms": "^2.1.3",
1029
+ "on-finished": "^2.4.1",
1030
+ "range-parser": "^1.2.1",
1031
+ "statuses": "^2.0.2"
1032
+ },
1033
+ "engines": {
1034
+ "node": ">= 18"
1035
+ },
1036
+ "funding": {
1037
+ "type": "opencollective",
1038
+ "url": "https://opencollective.com/express"
1039
+ }
1040
+ },
1041
+ "node_modules/serve-static": {
1042
+ "version": "2.2.1",
1043
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz",
1044
+ "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==",
1045
+ "license": "MIT",
1046
+ "dependencies": {
1047
+ "encodeurl": "^2.0.0",
1048
+ "escape-html": "^1.0.3",
1049
+ "parseurl": "^1.3.3",
1050
+ "send": "^1.2.0"
1051
+ },
1052
+ "engines": {
1053
+ "node": ">= 18"
1054
+ },
1055
+ "funding": {
1056
+ "type": "opencollective",
1057
+ "url": "https://opencollective.com/express"
1058
+ }
1059
+ },
1060
+ "node_modules/setprototypeof": {
1061
+ "version": "1.2.0",
1062
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
1063
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
1064
+ "license": "ISC"
1065
+ },
1066
+ "node_modules/side-channel": {
1067
+ "version": "1.1.1",
1068
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz",
1069
+ "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==",
1070
+ "license": "MIT",
1071
+ "dependencies": {
1072
+ "es-errors": "^1.3.0",
1073
+ "object-inspect": "^1.13.4",
1074
+ "side-channel-list": "^1.0.1",
1075
+ "side-channel-map": "^1.0.1",
1076
+ "side-channel-weakmap": "^1.0.2"
1077
+ },
1078
+ "engines": {
1079
+ "node": ">= 0.4"
1080
+ },
1081
+ "funding": {
1082
+ "url": "https://github.com/sponsors/ljharb"
1083
+ }
1084
+ },
1085
+ "node_modules/side-channel-list": {
1086
+ "version": "1.0.1",
1087
+ "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz",
1088
+ "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==",
1089
+ "license": "MIT",
1090
+ "dependencies": {
1091
+ "es-errors": "^1.3.0",
1092
+ "object-inspect": "^1.13.4"
1093
+ },
1094
+ "engines": {
1095
+ "node": ">= 0.4"
1096
+ },
1097
+ "funding": {
1098
+ "url": "https://github.com/sponsors/ljharb"
1099
+ }
1100
+ },
1101
+ "node_modules/side-channel-map": {
1102
+ "version": "1.0.1",
1103
+ "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
1104
+ "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
1105
+ "license": "MIT",
1106
+ "dependencies": {
1107
+ "call-bound": "^1.0.2",
1108
+ "es-errors": "^1.3.0",
1109
+ "get-intrinsic": "^1.2.5",
1110
+ "object-inspect": "^1.13.3"
1111
+ },
1112
+ "engines": {
1113
+ "node": ">= 0.4"
1114
+ },
1115
+ "funding": {
1116
+ "url": "https://github.com/sponsors/ljharb"
1117
+ }
1118
+ },
1119
+ "node_modules/side-channel-weakmap": {
1120
+ "version": "1.0.2",
1121
+ "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
1122
+ "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
1123
+ "license": "MIT",
1124
+ "dependencies": {
1125
+ "call-bound": "^1.0.2",
1126
+ "es-errors": "^1.3.0",
1127
+ "get-intrinsic": "^1.2.5",
1128
+ "object-inspect": "^1.13.3",
1129
+ "side-channel-map": "^1.0.1"
1130
+ },
1131
+ "engines": {
1132
+ "node": ">= 0.4"
1133
+ },
1134
+ "funding": {
1135
+ "url": "https://github.com/sponsors/ljharb"
1136
+ }
1137
+ },
1138
+ "node_modules/statuses": {
1139
+ "version": "2.0.2",
1140
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
1141
+ "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
1142
+ "license": "MIT",
1143
+ "engines": {
1144
+ "node": ">= 0.8"
1145
+ }
1146
+ },
1147
+ "node_modules/string-width": {
1148
+ "version": "7.2.0",
1149
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz",
1150
+ "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==",
1151
+ "license": "MIT",
1152
+ "dependencies": {
1153
+ "emoji-regex": "^10.3.0",
1154
+ "get-east-asian-width": "^1.0.0",
1155
+ "strip-ansi": "^7.1.0"
1156
+ },
1157
+ "engines": {
1158
+ "node": ">=18"
1159
+ },
1160
+ "funding": {
1161
+ "url": "https://github.com/sponsors/sindresorhus"
1162
+ }
1163
+ },
1164
+ "node_modules/strip-ansi": {
1165
+ "version": "7.2.0",
1166
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz",
1167
+ "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==",
1168
+ "license": "MIT",
1169
+ "dependencies": {
1170
+ "ansi-regex": "^6.2.2"
1171
+ },
1172
+ "engines": {
1173
+ "node": ">=12"
1174
+ },
1175
+ "funding": {
1176
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
1177
+ }
1178
+ },
1179
+ "node_modules/toidentifier": {
1180
+ "version": "1.0.1",
1181
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
1182
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
1183
+ "license": "MIT",
1184
+ "engines": {
1185
+ "node": ">=0.6"
1186
+ }
1187
+ },
1188
+ "node_modules/type-is": {
1189
+ "version": "2.1.0",
1190
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.1.0.tgz",
1191
+ "integrity": "sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==",
1192
+ "license": "MIT",
1193
+ "dependencies": {
1194
+ "content-type": "^2.0.0",
1195
+ "media-typer": "^1.1.0",
1196
+ "mime-types": "^3.0.0"
1197
+ },
1198
+ "engines": {
1199
+ "node": ">= 18"
1200
+ },
1201
+ "funding": {
1202
+ "type": "opencollective",
1203
+ "url": "https://opencollective.com/express"
1204
+ }
1205
+ },
1206
+ "node_modules/type-is/node_modules/content-type": {
1207
+ "version": "2.0.0",
1208
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.0.0.tgz",
1209
+ "integrity": "sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==",
1210
+ "license": "MIT",
1211
+ "engines": {
1212
+ "node": ">=18"
1213
+ },
1214
+ "funding": {
1215
+ "type": "opencollective",
1216
+ "url": "https://opencollective.com/express"
1217
+ }
1218
+ },
1219
+ "node_modules/typed-query-selector": {
1220
+ "version": "2.12.2",
1221
+ "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.2.tgz",
1222
+ "integrity": "sha512-EOPFbyIub4ngnEdqi2yOcNeDLaX/0jcE1JoAXQDDMIthap7FoN795lc/SHfIq2d416VufXpM8z/lD+WRm2gfOQ==",
1223
+ "license": "MIT"
1224
+ },
1225
+ "node_modules/unpipe": {
1226
+ "version": "1.0.0",
1227
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
1228
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
1229
+ "license": "MIT",
1230
+ "engines": {
1231
+ "node": ">= 0.8"
1232
+ }
1233
+ },
1234
+ "node_modules/vary": {
1235
+ "version": "1.1.2",
1236
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
1237
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
1238
+ "license": "MIT",
1239
+ "engines": {
1240
+ "node": ">= 0.8"
1241
+ }
1242
+ },
1243
+ "node_modules/webdriver-bidi-protocol": {
1244
+ "version": "0.4.2",
1245
+ "resolved": "https://registry.npmjs.org/webdriver-bidi-protocol/-/webdriver-bidi-protocol-0.4.2.tgz",
1246
+ "integrity": "sha512-VSV+fzfChirL3e7jay2yUC7B4HQCGtEWEg/MSSQbK+qWbqeGlRLlXTzPpYr3XGUvbpDHumWZBJxgesg4N7dbtA==",
1247
+ "license": "Apache-2.0"
1248
+ },
1249
+ "node_modules/wrap-ansi": {
1250
+ "version": "9.0.2",
1251
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz",
1252
+ "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==",
1253
+ "license": "MIT",
1254
+ "dependencies": {
1255
+ "ansi-styles": "^6.2.1",
1256
+ "string-width": "^7.0.0",
1257
+ "strip-ansi": "^7.1.0"
1258
+ },
1259
+ "engines": {
1260
+ "node": ">=18"
1261
+ },
1262
+ "funding": {
1263
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
1264
+ }
1265
+ },
1266
+ "node_modules/wrappy": {
1267
+ "version": "1.0.2",
1268
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
1269
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
1270
+ "license": "ISC"
1271
+ },
1272
+ "node_modules/ws": {
1273
+ "version": "8.21.0",
1274
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz",
1275
+ "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==",
1276
+ "license": "MIT",
1277
+ "engines": {
1278
+ "node": ">=10.0.0"
1279
+ },
1280
+ "peerDependencies": {
1281
+ "bufferutil": "^4.0.1",
1282
+ "utf-8-validate": ">=5.0.2"
1283
+ },
1284
+ "peerDependenciesMeta": {
1285
+ "bufferutil": {
1286
+ "optional": true
1287
+ },
1288
+ "utf-8-validate": {
1289
+ "optional": true
1290
+ }
1291
+ }
1292
+ },
1293
+ "node_modules/y18n": {
1294
+ "version": "5.0.8",
1295
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
1296
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
1297
+ "license": "ISC",
1298
+ "engines": {
1299
+ "node": ">=10"
1300
+ }
1301
+ },
1302
+ "node_modules/yargs": {
1303
+ "version": "18.0.0",
1304
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz",
1305
+ "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==",
1306
+ "license": "MIT",
1307
+ "dependencies": {
1308
+ "cliui": "^9.0.1",
1309
+ "escalade": "^3.1.1",
1310
+ "get-caller-file": "^2.0.5",
1311
+ "string-width": "^7.2.0",
1312
+ "y18n": "^5.0.5",
1313
+ "yargs-parser": "^22.0.0"
1314
+ },
1315
+ "engines": {
1316
+ "node": "^20.19.0 || ^22.12.0 || >=23"
1317
+ }
1318
+ },
1319
+ "node_modules/yargs-parser": {
1320
+ "version": "22.0.0",
1321
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz",
1322
+ "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==",
1323
+ "license": "ISC",
1324
+ "engines": {
1325
+ "node": "^20.19.0 || ^22.12.0 || >=23"
1326
+ }
1327
+ },
1328
+ "node_modules/zod": {
1329
+ "version": "3.25.76",
1330
+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
1331
+ "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
1332
+ "license": "MIT",
1333
+ "funding": {
1334
+ "url": "https://github.com/sponsors/colinhacks"
1335
+ }
1336
+ }
1337
+ }
1338
+ }
package.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "Spotify-Canvas-API",
3
+ "version": "2.0.0",
4
+ "description": "Unofficial API to fetch Spotify **Canvas video data** (the looping visual videos that appear behind songs on mobile).",
5
+ "type": "module",
6
+ "main": "index.js",
7
+ "keywords": [
8
+ "spotify",
9
+ "canvas",
10
+ "api"
11
+ ],
12
+ "author": "Paxsenix0",
13
+ "license": "MIT",
14
+ "dependencies": {
15
+ "axios": "^1.6.0",
16
+ "express": "latest",
17
+ "google-protobuf": "^3.11.4",
18
+ "otpauth": "latest",
19
+ "puppeteer-core": "^25.3.0"
20
+ }
21
+ }
proto/_canvas.proto ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // generate javascript interfaces:
2
+ // $ protoc --proto_path=api --js_out=import_style=commonjs,binary:api/ api/_canvas.proto
3
+
4
+ syntax = "proto3";
5
+
6
+ message CanvasRequest {
7
+ message Track {
8
+ string track_uri = 1; // spotify:track:5osCClSjGplWagDsJmyivf
9
+ }
10
+ repeated Track tracks = 1;
11
+ }
12
+
13
+ message CanvasResponse {
14
+ message Canvas {
15
+ string id = 1; // ef3bc2ac86ba4a39b2cddff19dca884a
16
+ string canvas_url = 2; // https://canvaz.scdn.co/upload/artist/6i1GVNJCyyssRwXmnaeEFH/video/ef3bc2ac86ba4a39b2cddff19dca884a.cnvs.mp4
17
+ string track_uri = 5; // spotify:track:5osCClSjGplWagDsJmyivf
18
+ message Artist {
19
+ string artist_uri = 1; // spotify:artist:3E61SnNA9oqKP7hI0K3vZv
20
+ string artist_name = 2; // CALVO
21
+ string artist_img_url = 3; // https://i.scdn.co/image/2d7b0ebe1e06c74f5c6b9a2384d746673051241d
22
+ }
23
+ Artist artist = 6;
24
+ string other_id = 9; // 957a9be5e5c1b9ef1ac1c96b7cebf396
25
+ string canvas_uri = 11; // spotify:canvas:1OuybAWK7XOQMG725ZtFwG
26
+ }
27
+ repeated Canvas canvases = 1;
28
+ }
proto/_canvas_pb.cjs ADDED
@@ -0,0 +1,1066 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // source: _canvas.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
6
+ * field starts with 'MSG_' and isn't a translatable message.
7
+ * @public
8
+ */
9
+ // GENERATED CODE -- DO NOT EDIT!
10
+
11
+ var jspb = require('google-protobuf');
12
+ var goog = jspb;
13
+ var global = Function('return this')();
14
+
15
+ goog.exportSymbol('proto.CanvasRequest', null, global);
16
+ goog.exportSymbol('proto.CanvasRequest.Track', null, global);
17
+ goog.exportSymbol('proto.CanvasResponse', null, global);
18
+ goog.exportSymbol('proto.CanvasResponse.Canvas', null, global);
19
+ goog.exportSymbol('proto.CanvasResponse.Canvas.Artist', null, global);
20
+ /**
21
+ * Generated by JsPbCodeGenerator.
22
+ * @param {Array=} opt_data Optional initial data array, typically from a
23
+ * server response, or constructed directly in Javascript. The array is used
24
+ * in place and becomes part of the constructed object. It is not cloned.
25
+ * If no data is provided, the constructed object will be empty, but still
26
+ * valid.
27
+ * @extends {jspb.Message}
28
+ * @constructor
29
+ */
30
+ proto.CanvasRequest = function(opt_data) {
31
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.CanvasRequest.repeatedFields_, null);
32
+ };
33
+ goog.inherits(proto.CanvasRequest, jspb.Message);
34
+ if (goog.DEBUG && !COMPILED) {
35
+ /**
36
+ * @public
37
+ * @override
38
+ */
39
+ proto.CanvasRequest.displayName = 'proto.CanvasRequest';
40
+ }
41
+ /**
42
+ * Generated by JsPbCodeGenerator.
43
+ * @param {Array=} opt_data Optional initial data array, typically from a
44
+ * server response, or constructed directly in Javascript. The array is used
45
+ * in place and becomes part of the constructed object. It is not cloned.
46
+ * If no data is provided, the constructed object will be empty, but still
47
+ * valid.
48
+ * @extends {jspb.Message}
49
+ * @constructor
50
+ */
51
+ proto.CanvasRequest.Track = function(opt_data) {
52
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
53
+ };
54
+ goog.inherits(proto.CanvasRequest.Track, jspb.Message);
55
+ if (goog.DEBUG && !COMPILED) {
56
+ /**
57
+ * @public
58
+ * @override
59
+ */
60
+ proto.CanvasRequest.Track.displayName = 'proto.CanvasRequest.Track';
61
+ }
62
+ /**
63
+ * Generated by JsPbCodeGenerator.
64
+ * @param {Array=} opt_data Optional initial data array, typically from a
65
+ * server response, or constructed directly in Javascript. The array is used
66
+ * in place and becomes part of the constructed object. It is not cloned.
67
+ * If no data is provided, the constructed object will be empty, but still
68
+ * valid.
69
+ * @extends {jspb.Message}
70
+ * @constructor
71
+ */
72
+ proto.CanvasResponse = function(opt_data) {
73
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.CanvasResponse.repeatedFields_, null);
74
+ };
75
+ goog.inherits(proto.CanvasResponse, jspb.Message);
76
+ if (goog.DEBUG && !COMPILED) {
77
+ /**
78
+ * @public
79
+ * @override
80
+ */
81
+ proto.CanvasResponse.displayName = 'proto.CanvasResponse';
82
+ }
83
+ /**
84
+ * Generated by JsPbCodeGenerator.
85
+ * @param {Array=} opt_data Optional initial data array, typically from a
86
+ * server response, or constructed directly in Javascript. The array is used
87
+ * in place and becomes part of the constructed object. It is not cloned.
88
+ * If no data is provided, the constructed object will be empty, but still
89
+ * valid.
90
+ * @extends {jspb.Message}
91
+ * @constructor
92
+ */
93
+ proto.CanvasResponse.Canvas = function(opt_data) {
94
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
95
+ };
96
+ goog.inherits(proto.CanvasResponse.Canvas, jspb.Message);
97
+ if (goog.DEBUG && !COMPILED) {
98
+ /**
99
+ * @public
100
+ * @override
101
+ */
102
+ proto.CanvasResponse.Canvas.displayName = 'proto.CanvasResponse.Canvas';
103
+ }
104
+ /**
105
+ * Generated by JsPbCodeGenerator.
106
+ * @param {Array=} opt_data Optional initial data array, typically from a
107
+ * server response, or constructed directly in Javascript. The array is used
108
+ * in place and becomes part of the constructed object. It is not cloned.
109
+ * If no data is provided, the constructed object will be empty, but still
110
+ * valid.
111
+ * @extends {jspb.Message}
112
+ * @constructor
113
+ */
114
+ proto.CanvasResponse.Canvas.Artist = function(opt_data) {
115
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
116
+ };
117
+ goog.inherits(proto.CanvasResponse.Canvas.Artist, jspb.Message);
118
+ if (goog.DEBUG && !COMPILED) {
119
+ /**
120
+ * @public
121
+ * @override
122
+ */
123
+ proto.CanvasResponse.Canvas.Artist.displayName = 'proto.CanvasResponse.Canvas.Artist';
124
+ }
125
+
126
+ /**
127
+ * List of repeated fields within this message type.
128
+ * @private {!Array<number>}
129
+ * @const
130
+ */
131
+ proto.CanvasRequest.repeatedFields_ = [1];
132
+
133
+
134
+
135
+ if (jspb.Message.GENERATE_TO_OBJECT) {
136
+ /**
137
+ * Creates an object representation of this proto.
138
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
139
+ * Optional fields that are not set will be set to undefined.
140
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
141
+ * For the list of reserved names please see:
142
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
143
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
144
+ * JSPB instance for transitional soy proto support:
145
+ * http://goto/soy-param-migration
146
+ * @return {!Object}
147
+ */
148
+ proto.CanvasRequest.prototype.toObject = function(opt_includeInstance) {
149
+ return proto.CanvasRequest.toObject(opt_includeInstance, this);
150
+ };
151
+
152
+
153
+ /**
154
+ * Static version of the {@see toObject} method.
155
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
156
+ * the JSPB instance for transitional soy proto support:
157
+ * http://goto/soy-param-migration
158
+ * @param {!proto.CanvasRequest} msg The msg instance to transform.
159
+ * @return {!Object}
160
+ * @suppress {unusedLocalVariables} f is only used for nested messages
161
+ */
162
+ proto.CanvasRequest.toObject = function(includeInstance, msg) {
163
+ var f, obj = {
164
+ tracksList: jspb.Message.toObjectList(msg.getTracksList(),
165
+ proto.CanvasRequest.Track.toObject, includeInstance)
166
+ };
167
+
168
+ if (includeInstance) {
169
+ obj.$jspbMessageInstance = msg;
170
+ }
171
+ return obj;
172
+ };
173
+ }
174
+
175
+
176
+ /**
177
+ * Deserializes binary data (in protobuf wire format).
178
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
179
+ * @return {!proto.CanvasRequest}
180
+ */
181
+ proto.CanvasRequest.deserializeBinary = function(bytes) {
182
+ var reader = new jspb.BinaryReader(bytes);
183
+ var msg = new proto.CanvasRequest;
184
+ return proto.CanvasRequest.deserializeBinaryFromReader(msg, reader);
185
+ };
186
+
187
+
188
+ /**
189
+ * Deserializes binary data (in protobuf wire format) from the
190
+ * given reader into the given message object.
191
+ * @param {!proto.CanvasRequest} msg The message object to deserialize into.
192
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
193
+ * @return {!proto.CanvasRequest}
194
+ */
195
+ proto.CanvasRequest.deserializeBinaryFromReader = function(msg, reader) {
196
+ while (reader.nextField()) {
197
+ if (reader.isEndGroup()) {
198
+ break;
199
+ }
200
+ var field = reader.getFieldNumber();
201
+ switch (field) {
202
+ case 1:
203
+ var value = new proto.CanvasRequest.Track;
204
+ reader.readMessage(value,proto.CanvasRequest.Track.deserializeBinaryFromReader);
205
+ msg.addTracks(value);
206
+ break;
207
+ default:
208
+ reader.skipField();
209
+ break;
210
+ }
211
+ }
212
+ return msg;
213
+ };
214
+
215
+
216
+ /**
217
+ * Serializes the message to binary data (in protobuf wire format).
218
+ * @return {!Uint8Array}
219
+ */
220
+ proto.CanvasRequest.prototype.serializeBinary = function() {
221
+ var writer = new jspb.BinaryWriter();
222
+ proto.CanvasRequest.serializeBinaryToWriter(this, writer);
223
+ return writer.getResultBuffer();
224
+ };
225
+
226
+
227
+ /**
228
+ * Serializes the given message to binary data (in protobuf wire
229
+ * format), writing to the given BinaryWriter.
230
+ * @param {!proto.CanvasRequest} message
231
+ * @param {!jspb.BinaryWriter} writer
232
+ * @suppress {unusedLocalVariables} f is only used for nested messages
233
+ */
234
+ proto.CanvasRequest.serializeBinaryToWriter = function(message, writer) {
235
+ var f = undefined;
236
+ f = message.getTracksList();
237
+ if (f.length > 0) {
238
+ writer.writeRepeatedMessage(
239
+ 1,
240
+ f,
241
+ proto.CanvasRequest.Track.serializeBinaryToWriter
242
+ );
243
+ }
244
+ };
245
+
246
+
247
+
248
+
249
+
250
+ if (jspb.Message.GENERATE_TO_OBJECT) {
251
+ /**
252
+ * Creates an object representation of this proto.
253
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
254
+ * Optional fields that are not set will be set to undefined.
255
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
256
+ * For the list of reserved names please see:
257
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
258
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
259
+ * JSPB instance for transitional soy proto support:
260
+ * http://goto/soy-param-migration
261
+ * @return {!Object}
262
+ */
263
+ proto.CanvasRequest.Track.prototype.toObject = function(opt_includeInstance) {
264
+ return proto.CanvasRequest.Track.toObject(opt_includeInstance, this);
265
+ };
266
+
267
+
268
+ /**
269
+ * Static version of the {@see toObject} method.
270
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
271
+ * the JSPB instance for transitional soy proto support:
272
+ * http://goto/soy-param-migration
273
+ * @param {!proto.CanvasRequest.Track} msg The msg instance to transform.
274
+ * @return {!Object}
275
+ * @suppress {unusedLocalVariables} f is only used for nested messages
276
+ */
277
+ proto.CanvasRequest.Track.toObject = function(includeInstance, msg) {
278
+ var f, obj = {
279
+ trackUri: jspb.Message.getFieldWithDefault(msg, 1, "")
280
+ };
281
+
282
+ if (includeInstance) {
283
+ obj.$jspbMessageInstance = msg;
284
+ }
285
+ return obj;
286
+ };
287
+ }
288
+
289
+
290
+ /**
291
+ * Deserializes binary data (in protobuf wire format).
292
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
293
+ * @return {!proto.CanvasRequest.Track}
294
+ */
295
+ proto.CanvasRequest.Track.deserializeBinary = function(bytes) {
296
+ var reader = new jspb.BinaryReader(bytes);
297
+ var msg = new proto.CanvasRequest.Track;
298
+ return proto.CanvasRequest.Track.deserializeBinaryFromReader(msg, reader);
299
+ };
300
+
301
+
302
+ /**
303
+ * Deserializes binary data (in protobuf wire format) from the
304
+ * given reader into the given message object.
305
+ * @param {!proto.CanvasRequest.Track} msg The message object to deserialize into.
306
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
307
+ * @return {!proto.CanvasRequest.Track}
308
+ */
309
+ proto.CanvasRequest.Track.deserializeBinaryFromReader = function(msg, reader) {
310
+ while (reader.nextField()) {
311
+ if (reader.isEndGroup()) {
312
+ break;
313
+ }
314
+ var field = reader.getFieldNumber();
315
+ switch (field) {
316
+ case 1:
317
+ var value = /** @type {string} */ (reader.readString());
318
+ msg.setTrackUri(value);
319
+ break;
320
+ default:
321
+ reader.skipField();
322
+ break;
323
+ }
324
+ }
325
+ return msg;
326
+ };
327
+
328
+
329
+ /**
330
+ * Serializes the message to binary data (in protobuf wire format).
331
+ * @return {!Uint8Array}
332
+ */
333
+ proto.CanvasRequest.Track.prototype.serializeBinary = function() {
334
+ var writer = new jspb.BinaryWriter();
335
+ proto.CanvasRequest.Track.serializeBinaryToWriter(this, writer);
336
+ return writer.getResultBuffer();
337
+ };
338
+
339
+
340
+ /**
341
+ * Serializes the given message to binary data (in protobuf wire
342
+ * format), writing to the given BinaryWriter.
343
+ * @param {!proto.CanvasRequest.Track} message
344
+ * @param {!jspb.BinaryWriter} writer
345
+ * @suppress {unusedLocalVariables} f is only used for nested messages
346
+ */
347
+ proto.CanvasRequest.Track.serializeBinaryToWriter = function(message, writer) {
348
+ var f = undefined;
349
+ f = message.getTrackUri();
350
+ if (f.length > 0) {
351
+ writer.writeString(
352
+ 1,
353
+ f
354
+ );
355
+ }
356
+ };
357
+
358
+
359
+ /**
360
+ * optional string track_uri = 1;
361
+ * @return {string}
362
+ */
363
+ proto.CanvasRequest.Track.prototype.getTrackUri = function() {
364
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
365
+ };
366
+
367
+
368
+ /**
369
+ * @param {string} value
370
+ * @return {!proto.CanvasRequest.Track} returns this
371
+ */
372
+ proto.CanvasRequest.Track.prototype.setTrackUri = function(value) {
373
+ return jspb.Message.setProto3StringField(this, 1, value);
374
+ };
375
+
376
+
377
+ /**
378
+ * repeated Track tracks = 1;
379
+ * @return {!Array<!proto.CanvasRequest.Track>}
380
+ */
381
+ proto.CanvasRequest.prototype.getTracksList = function() {
382
+ return /** @type{!Array<!proto.CanvasRequest.Track>} */ (
383
+ jspb.Message.getRepeatedWrapperField(this, proto.CanvasRequest.Track, 1));
384
+ };
385
+
386
+
387
+ /**
388
+ * @param {!Array<!proto.CanvasRequest.Track>} value
389
+ * @return {!proto.CanvasRequest} returns this
390
+ */
391
+ proto.CanvasRequest.prototype.setTracksList = function(value) {
392
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
393
+ };
394
+
395
+
396
+ /**
397
+ * @param {!proto.CanvasRequest.Track=} opt_value
398
+ * @param {number=} opt_index
399
+ * @return {!proto.CanvasRequest.Track}
400
+ */
401
+ proto.CanvasRequest.prototype.addTracks = function(opt_value, opt_index) {
402
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.CanvasRequest.Track, opt_index);
403
+ };
404
+
405
+
406
+ /**
407
+ * Clears the list making it empty but non-null.
408
+ * @return {!proto.CanvasRequest} returns this
409
+ */
410
+ proto.CanvasRequest.prototype.clearTracksList = function() {
411
+ return this.setTracksList([]);
412
+ };
413
+
414
+
415
+
416
+ /**
417
+ * List of repeated fields within this message type.
418
+ * @private {!Array<number>}
419
+ * @const
420
+ */
421
+ proto.CanvasResponse.repeatedFields_ = [1];
422
+
423
+
424
+
425
+ if (jspb.Message.GENERATE_TO_OBJECT) {
426
+ /**
427
+ * Creates an object representation of this proto.
428
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
429
+ * Optional fields that are not set will be set to undefined.
430
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
431
+ * For the list of reserved names please see:
432
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
433
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
434
+ * JSPB instance for transitional soy proto support:
435
+ * http://goto/soy-param-migration
436
+ * @return {!Object}
437
+ */
438
+ proto.CanvasResponse.prototype.toObject = function(opt_includeInstance) {
439
+ return proto.CanvasResponse.toObject(opt_includeInstance, this);
440
+ };
441
+
442
+
443
+ /**
444
+ * Static version of the {@see toObject} method.
445
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
446
+ * the JSPB instance for transitional soy proto support:
447
+ * http://goto/soy-param-migration
448
+ * @param {!proto.CanvasResponse} msg The msg instance to transform.
449
+ * @return {!Object}
450
+ * @suppress {unusedLocalVariables} f is only used for nested messages
451
+ */
452
+ proto.CanvasResponse.toObject = function(includeInstance, msg) {
453
+ var f, obj = {
454
+ canvasesList: jspb.Message.toObjectList(msg.getCanvasesList(),
455
+ proto.CanvasResponse.Canvas.toObject, includeInstance)
456
+ };
457
+
458
+ if (includeInstance) {
459
+ obj.$jspbMessageInstance = msg;
460
+ }
461
+ return obj;
462
+ };
463
+ }
464
+
465
+
466
+ /**
467
+ * Deserializes binary data (in protobuf wire format).
468
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
469
+ * @return {!proto.CanvasResponse}
470
+ */
471
+ proto.CanvasResponse.deserializeBinary = function(bytes) {
472
+ var reader = new jspb.BinaryReader(bytes);
473
+ var msg = new proto.CanvasResponse;
474
+ return proto.CanvasResponse.deserializeBinaryFromReader(msg, reader);
475
+ };
476
+
477
+
478
+ /**
479
+ * Deserializes binary data (in protobuf wire format) from the
480
+ * given reader into the given message object.
481
+ * @param {!proto.CanvasResponse} msg The message object to deserialize into.
482
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
483
+ * @return {!proto.CanvasResponse}
484
+ */
485
+ proto.CanvasResponse.deserializeBinaryFromReader = function(msg, reader) {
486
+ while (reader.nextField()) {
487
+ if (reader.isEndGroup()) {
488
+ break;
489
+ }
490
+ var field = reader.getFieldNumber();
491
+ switch (field) {
492
+ case 1:
493
+ var value = new proto.CanvasResponse.Canvas;
494
+ reader.readMessage(value,proto.CanvasResponse.Canvas.deserializeBinaryFromReader);
495
+ msg.addCanvases(value);
496
+ break;
497
+ default:
498
+ reader.skipField();
499
+ break;
500
+ }
501
+ }
502
+ return msg;
503
+ };
504
+
505
+
506
+ /**
507
+ * Serializes the message to binary data (in protobuf wire format).
508
+ * @return {!Uint8Array}
509
+ */
510
+ proto.CanvasResponse.prototype.serializeBinary = function() {
511
+ var writer = new jspb.BinaryWriter();
512
+ proto.CanvasResponse.serializeBinaryToWriter(this, writer);
513
+ return writer.getResultBuffer();
514
+ };
515
+
516
+
517
+ /**
518
+ * Serializes the given message to binary data (in protobuf wire
519
+ * format), writing to the given BinaryWriter.
520
+ * @param {!proto.CanvasResponse} message
521
+ * @param {!jspb.BinaryWriter} writer
522
+ * @suppress {unusedLocalVariables} f is only used for nested messages
523
+ */
524
+ proto.CanvasResponse.serializeBinaryToWriter = function(message, writer) {
525
+ var f = undefined;
526
+ f = message.getCanvasesList();
527
+ if (f.length > 0) {
528
+ writer.writeRepeatedMessage(
529
+ 1,
530
+ f,
531
+ proto.CanvasResponse.Canvas.serializeBinaryToWriter
532
+ );
533
+ }
534
+ };
535
+
536
+
537
+
538
+
539
+
540
+ if (jspb.Message.GENERATE_TO_OBJECT) {
541
+ /**
542
+ * Creates an object representation of this proto.
543
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
544
+ * Optional fields that are not set will be set to undefined.
545
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
546
+ * For the list of reserved names please see:
547
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
548
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
549
+ * JSPB instance for transitional soy proto support:
550
+ * http://goto/soy-param-migration
551
+ * @return {!Object}
552
+ */
553
+ proto.CanvasResponse.Canvas.prototype.toObject = function(opt_includeInstance) {
554
+ return proto.CanvasResponse.Canvas.toObject(opt_includeInstance, this);
555
+ };
556
+
557
+
558
+ /**
559
+ * Static version of the {@see toObject} method.
560
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
561
+ * the JSPB instance for transitional soy proto support:
562
+ * http://goto/soy-param-migration
563
+ * @param {!proto.CanvasResponse.Canvas} msg The msg instance to transform.
564
+ * @return {!Object}
565
+ * @suppress {unusedLocalVariables} f is only used for nested messages
566
+ */
567
+ proto.CanvasResponse.Canvas.toObject = function(includeInstance, msg) {
568
+ var f, obj = {
569
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
570
+ canvasUrl: jspb.Message.getFieldWithDefault(msg, 2, ""),
571
+ trackUri: jspb.Message.getFieldWithDefault(msg, 5, ""),
572
+ artist: (f = msg.getArtist()) && proto.CanvasResponse.Canvas.Artist.toObject(includeInstance, f),
573
+ otherId: jspb.Message.getFieldWithDefault(msg, 9, ""),
574
+ canvasUri: jspb.Message.getFieldWithDefault(msg, 11, "")
575
+ };
576
+
577
+ if (includeInstance) {
578
+ obj.$jspbMessageInstance = msg;
579
+ }
580
+ return obj;
581
+ };
582
+ }
583
+
584
+
585
+ /**
586
+ * Deserializes binary data (in protobuf wire format).
587
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
588
+ * @return {!proto.CanvasResponse.Canvas}
589
+ */
590
+ proto.CanvasResponse.Canvas.deserializeBinary = function(bytes) {
591
+ var reader = new jspb.BinaryReader(bytes);
592
+ var msg = new proto.CanvasResponse.Canvas;
593
+ return proto.CanvasResponse.Canvas.deserializeBinaryFromReader(msg, reader);
594
+ };
595
+
596
+
597
+ /**
598
+ * Deserializes binary data (in protobuf wire format) from the
599
+ * given reader into the given message object.
600
+ * @param {!proto.CanvasResponse.Canvas} msg The message object to deserialize into.
601
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
602
+ * @return {!proto.CanvasResponse.Canvas}
603
+ */
604
+ proto.CanvasResponse.Canvas.deserializeBinaryFromReader = function(msg, reader) {
605
+ while (reader.nextField()) {
606
+ if (reader.isEndGroup()) {
607
+ break;
608
+ }
609
+ var field = reader.getFieldNumber();
610
+ switch (field) {
611
+ case 1:
612
+ var value = /** @type {string} */ (reader.readString());
613
+ msg.setId(value);
614
+ break;
615
+ case 2:
616
+ var value = /** @type {string} */ (reader.readString());
617
+ msg.setCanvasUrl(value);
618
+ break;
619
+ case 5:
620
+ var value = /** @type {string} */ (reader.readString());
621
+ msg.setTrackUri(value);
622
+ break;
623
+ case 6:
624
+ var value = new proto.CanvasResponse.Canvas.Artist;
625
+ reader.readMessage(value,proto.CanvasResponse.Canvas.Artist.deserializeBinaryFromReader);
626
+ msg.setArtist(value);
627
+ break;
628
+ case 9:
629
+ var value = /** @type {string} */ (reader.readString());
630
+ msg.setOtherId(value);
631
+ break;
632
+ case 11:
633
+ var value = /** @type {string} */ (reader.readString());
634
+ msg.setCanvasUri(value);
635
+ break;
636
+ default:
637
+ reader.skipField();
638
+ break;
639
+ }
640
+ }
641
+ return msg;
642
+ };
643
+
644
+
645
+ /**
646
+ * Serializes the message to binary data (in protobuf wire format).
647
+ * @return {!Uint8Array}
648
+ */
649
+ proto.CanvasResponse.Canvas.prototype.serializeBinary = function() {
650
+ var writer = new jspb.BinaryWriter();
651
+ proto.CanvasResponse.Canvas.serializeBinaryToWriter(this, writer);
652
+ return writer.getResultBuffer();
653
+ };
654
+
655
+
656
+ /**
657
+ * Serializes the given message to binary data (in protobuf wire
658
+ * format), writing to the given BinaryWriter.
659
+ * @param {!proto.CanvasResponse.Canvas} message
660
+ * @param {!jspb.BinaryWriter} writer
661
+ * @suppress {unusedLocalVariables} f is only used for nested messages
662
+ */
663
+ proto.CanvasResponse.Canvas.serializeBinaryToWriter = function(message, writer) {
664
+ var f = undefined;
665
+ f = message.getId();
666
+ if (f.length > 0) {
667
+ writer.writeString(
668
+ 1,
669
+ f
670
+ );
671
+ }
672
+ f = message.getCanvasUrl();
673
+ if (f.length > 0) {
674
+ writer.writeString(
675
+ 2,
676
+ f
677
+ );
678
+ }
679
+ f = message.getTrackUri();
680
+ if (f.length > 0) {
681
+ writer.writeString(
682
+ 5,
683
+ f
684
+ );
685
+ }
686
+ f = message.getArtist();
687
+ if (f != null) {
688
+ writer.writeMessage(
689
+ 6,
690
+ f,
691
+ proto.CanvasResponse.Canvas.Artist.serializeBinaryToWriter
692
+ );
693
+ }
694
+ f = message.getOtherId();
695
+ if (f.length > 0) {
696
+ writer.writeString(
697
+ 9,
698
+ f
699
+ );
700
+ }
701
+ f = message.getCanvasUri();
702
+ if (f.length > 0) {
703
+ writer.writeString(
704
+ 11,
705
+ f
706
+ );
707
+ }
708
+ };
709
+
710
+
711
+
712
+
713
+
714
+ if (jspb.Message.GENERATE_TO_OBJECT) {
715
+ /**
716
+ * Creates an object representation of this proto.
717
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
718
+ * Optional fields that are not set will be set to undefined.
719
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
720
+ * For the list of reserved names please see:
721
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
722
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
723
+ * JSPB instance for transitional soy proto support:
724
+ * http://goto/soy-param-migration
725
+ * @return {!Object}
726
+ */
727
+ proto.CanvasResponse.Canvas.Artist.prototype.toObject = function(opt_includeInstance) {
728
+ return proto.CanvasResponse.Canvas.Artist.toObject(opt_includeInstance, this);
729
+ };
730
+
731
+
732
+ /**
733
+ * Static version of the {@see toObject} method.
734
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
735
+ * the JSPB instance for transitional soy proto support:
736
+ * http://goto/soy-param-migration
737
+ * @param {!proto.CanvasResponse.Canvas.Artist} msg The msg instance to transform.
738
+ * @return {!Object}
739
+ * @suppress {unusedLocalVariables} f is only used for nested messages
740
+ */
741
+ proto.CanvasResponse.Canvas.Artist.toObject = function(includeInstance, msg) {
742
+ var f, obj = {
743
+ artistUri: jspb.Message.getFieldWithDefault(msg, 1, ""),
744
+ artistName: jspb.Message.getFieldWithDefault(msg, 2, ""),
745
+ artistImgUrl: jspb.Message.getFieldWithDefault(msg, 3, "")
746
+ };
747
+
748
+ if (includeInstance) {
749
+ obj.$jspbMessageInstance = msg;
750
+ }
751
+ return obj;
752
+ };
753
+ }
754
+
755
+
756
+ /**
757
+ * Deserializes binary data (in protobuf wire format).
758
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
759
+ * @return {!proto.CanvasResponse.Canvas.Artist}
760
+ */
761
+ proto.CanvasResponse.Canvas.Artist.deserializeBinary = function(bytes) {
762
+ var reader = new jspb.BinaryReader(bytes);
763
+ var msg = new proto.CanvasResponse.Canvas.Artist;
764
+ return proto.CanvasResponse.Canvas.Artist.deserializeBinaryFromReader(msg, reader);
765
+ };
766
+
767
+
768
+ /**
769
+ * Deserializes binary data (in protobuf wire format) from the
770
+ * given reader into the given message object.
771
+ * @param {!proto.CanvasResponse.Canvas.Artist} msg The message object to deserialize into.
772
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
773
+ * @return {!proto.CanvasResponse.Canvas.Artist}
774
+ */
775
+ proto.CanvasResponse.Canvas.Artist.deserializeBinaryFromReader = function(msg, reader) {
776
+ while (reader.nextField()) {
777
+ if (reader.isEndGroup()) {
778
+ break;
779
+ }
780
+ var field = reader.getFieldNumber();
781
+ switch (field) {
782
+ case 1:
783
+ var value = /** @type {string} */ (reader.readString());
784
+ msg.setArtistUri(value);
785
+ break;
786
+ case 2:
787
+ var value = /** @type {string} */ (reader.readString());
788
+ msg.setArtistName(value);
789
+ break;
790
+ case 3:
791
+ var value = /** @type {string} */ (reader.readString());
792
+ msg.setArtistImgUrl(value);
793
+ break;
794
+ default:
795
+ reader.skipField();
796
+ break;
797
+ }
798
+ }
799
+ return msg;
800
+ };
801
+
802
+
803
+ /**
804
+ * Serializes the message to binary data (in protobuf wire format).
805
+ * @return {!Uint8Array}
806
+ */
807
+ proto.CanvasResponse.Canvas.Artist.prototype.serializeBinary = function() {
808
+ var writer = new jspb.BinaryWriter();
809
+ proto.CanvasResponse.Canvas.Artist.serializeBinaryToWriter(this, writer);
810
+ return writer.getResultBuffer();
811
+ };
812
+
813
+
814
+ /**
815
+ * Serializes the given message to binary data (in protobuf wire
816
+ * format), writing to the given BinaryWriter.
817
+ * @param {!proto.CanvasResponse.Canvas.Artist} message
818
+ * @param {!jspb.BinaryWriter} writer
819
+ * @suppress {unusedLocalVariables} f is only used for nested messages
820
+ */
821
+ proto.CanvasResponse.Canvas.Artist.serializeBinaryToWriter = function(message, writer) {
822
+ var f = undefined;
823
+ f = message.getArtistUri();
824
+ if (f.length > 0) {
825
+ writer.writeString(
826
+ 1,
827
+ f
828
+ );
829
+ }
830
+ f = message.getArtistName();
831
+ if (f.length > 0) {
832
+ writer.writeString(
833
+ 2,
834
+ f
835
+ );
836
+ }
837
+ f = message.getArtistImgUrl();
838
+ if (f.length > 0) {
839
+ writer.writeString(
840
+ 3,
841
+ f
842
+ );
843
+ }
844
+ };
845
+
846
+
847
+ /**
848
+ * optional string artist_uri = 1;
849
+ * @return {string}
850
+ */
851
+ proto.CanvasResponse.Canvas.Artist.prototype.getArtistUri = function() {
852
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
853
+ };
854
+
855
+
856
+ /**
857
+ * @param {string} value
858
+ * @return {!proto.CanvasResponse.Canvas.Artist} returns this
859
+ */
860
+ proto.CanvasResponse.Canvas.Artist.prototype.setArtistUri = function(value) {
861
+ return jspb.Message.setProto3StringField(this, 1, value);
862
+ };
863
+
864
+
865
+ /**
866
+ * optional string artist_name = 2;
867
+ * @return {string}
868
+ */
869
+ proto.CanvasResponse.Canvas.Artist.prototype.getArtistName = function() {
870
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
871
+ };
872
+
873
+
874
+ /**
875
+ * @param {string} value
876
+ * @return {!proto.CanvasResponse.Canvas.Artist} returns this
877
+ */
878
+ proto.CanvasResponse.Canvas.Artist.prototype.setArtistName = function(value) {
879
+ return jspb.Message.setProto3StringField(this, 2, value);
880
+ };
881
+
882
+
883
+ /**
884
+ * optional string artist_img_url = 3;
885
+ * @return {string}
886
+ */
887
+ proto.CanvasResponse.Canvas.Artist.prototype.getArtistImgUrl = function() {
888
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
889
+ };
890
+
891
+
892
+ /**
893
+ * @param {string} value
894
+ * @return {!proto.CanvasResponse.Canvas.Artist} returns this
895
+ */
896
+ proto.CanvasResponse.Canvas.Artist.prototype.setArtistImgUrl = function(value) {
897
+ return jspb.Message.setProto3StringField(this, 3, value);
898
+ };
899
+
900
+
901
+ /**
902
+ * optional string id = 1;
903
+ * @return {string}
904
+ */
905
+ proto.CanvasResponse.Canvas.prototype.getId = function() {
906
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
907
+ };
908
+
909
+
910
+ /**
911
+ * @param {string} value
912
+ * @return {!proto.CanvasResponse.Canvas} returns this
913
+ */
914
+ proto.CanvasResponse.Canvas.prototype.setId = function(value) {
915
+ return jspb.Message.setProto3StringField(this, 1, value);
916
+ };
917
+
918
+
919
+ /**
920
+ * optional string canvas_url = 2;
921
+ * @return {string}
922
+ */
923
+ proto.CanvasResponse.Canvas.prototype.getCanvasUrl = function() {
924
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
925
+ };
926
+
927
+
928
+ /**
929
+ * @param {string} value
930
+ * @return {!proto.CanvasResponse.Canvas} returns this
931
+ */
932
+ proto.CanvasResponse.Canvas.prototype.setCanvasUrl = function(value) {
933
+ return jspb.Message.setProto3StringField(this, 2, value);
934
+ };
935
+
936
+
937
+ /**
938
+ * optional string track_uri = 5;
939
+ * @return {string}
940
+ */
941
+ proto.CanvasResponse.Canvas.prototype.getTrackUri = function() {
942
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
943
+ };
944
+
945
+
946
+ /**
947
+ * @param {string} value
948
+ * @return {!proto.CanvasResponse.Canvas} returns this
949
+ */
950
+ proto.CanvasResponse.Canvas.prototype.setTrackUri = function(value) {
951
+ return jspb.Message.setProto3StringField(this, 5, value);
952
+ };
953
+
954
+
955
+ /**
956
+ * optional Artist artist = 6;
957
+ * @return {?proto.CanvasResponse.Canvas.Artist}
958
+ */
959
+ proto.CanvasResponse.Canvas.prototype.getArtist = function() {
960
+ return /** @type{?proto.CanvasResponse.Canvas.Artist} */ (
961
+ jspb.Message.getWrapperField(this, proto.CanvasResponse.Canvas.Artist, 6));
962
+ };
963
+
964
+
965
+ /**
966
+ * @param {?proto.CanvasResponse.Canvas.Artist|undefined} value
967
+ * @return {!proto.CanvasResponse.Canvas} returns this
968
+ */
969
+ proto.CanvasResponse.Canvas.prototype.setArtist = function(value) {
970
+ return jspb.Message.setWrapperField(this, 6, value);
971
+ };
972
+
973
+
974
+ /**
975
+ * Clears the message field making it undefined.
976
+ * @return {!proto.CanvasResponse.Canvas} returns this
977
+ */
978
+ proto.CanvasResponse.Canvas.prototype.clearArtist = function() {
979
+ return this.setArtist(undefined);
980
+ };
981
+
982
+
983
+ /**
984
+ * Returns whether this field is set.
985
+ * @return {boolean}
986
+ */
987
+ proto.CanvasResponse.Canvas.prototype.hasArtist = function() {
988
+ return jspb.Message.getField(this, 6) != null;
989
+ };
990
+
991
+
992
+ /**
993
+ * optional string other_id = 9;
994
+ * @return {string}
995
+ */
996
+ proto.CanvasResponse.Canvas.prototype.getOtherId = function() {
997
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
998
+ };
999
+
1000
+
1001
+ /**
1002
+ * @param {string} value
1003
+ * @return {!proto.CanvasResponse.Canvas} returns this
1004
+ */
1005
+ proto.CanvasResponse.Canvas.prototype.setOtherId = function(value) {
1006
+ return jspb.Message.setProto3StringField(this, 9, value);
1007
+ };
1008
+
1009
+
1010
+ /**
1011
+ * optional string canvas_uri = 11;
1012
+ * @return {string}
1013
+ */
1014
+ proto.CanvasResponse.Canvas.prototype.getCanvasUri = function() {
1015
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
1016
+ };
1017
+
1018
+
1019
+ /**
1020
+ * @param {string} value
1021
+ * @return {!proto.CanvasResponse.Canvas} returns this
1022
+ */
1023
+ proto.CanvasResponse.Canvas.prototype.setCanvasUri = function(value) {
1024
+ return jspb.Message.setProto3StringField(this, 11, value);
1025
+ };
1026
+
1027
+
1028
+ /**
1029
+ * repeated Canvas canvases = 1;
1030
+ * @return {!Array<!proto.CanvasResponse.Canvas>}
1031
+ */
1032
+ proto.CanvasResponse.prototype.getCanvasesList = function() {
1033
+ return /** @type{!Array<!proto.CanvasResponse.Canvas>} */ (
1034
+ jspb.Message.getRepeatedWrapperField(this, proto.CanvasResponse.Canvas, 1));
1035
+ };
1036
+
1037
+
1038
+ /**
1039
+ * @param {!Array<!proto.CanvasResponse.Canvas>} value
1040
+ * @return {!proto.CanvasResponse} returns this
1041
+ */
1042
+ proto.CanvasResponse.prototype.setCanvasesList = function(value) {
1043
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
1044
+ };
1045
+
1046
+
1047
+ /**
1048
+ * @param {!proto.CanvasResponse.Canvas=} opt_value
1049
+ * @param {number=} opt_index
1050
+ * @return {!proto.CanvasResponse.Canvas}
1051
+ */
1052
+ proto.CanvasResponse.prototype.addCanvases = function(opt_value, opt_index) {
1053
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.CanvasResponse.Canvas, opt_index);
1054
+ };
1055
+
1056
+
1057
+ /**
1058
+ * Clears the list making it empty but non-null.
1059
+ * @return {!proto.CanvasResponse} returns this
1060
+ */
1061
+ proto.CanvasResponse.prototype.clearCanvasesList = function() {
1062
+ return this.setCanvasesList([]);
1063
+ };
1064
+
1065
+
1066
+ goog.object.extend(exports, proto);
routes/canvasRoutes.js ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ import express from 'express';
2
+ import { fetchCanvas } from '../controllers/canvasController.js';
3
+
4
+ const router = express.Router();
5
+
6
+ router.get('/', fetchCanvas);
7
+
8
+ export default router;
services/browserAuthService.js ADDED
@@ -0,0 +1,290 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import puppeteer from 'puppeteer-core';
2
+ import fs from 'fs';
3
+ import path from 'path';
4
+ import { updateSpDc } from './spotifyAuthService.js';
5
+
6
+ let cachedCreds = null;
7
+ let credsExpiresAt = 0;
8
+ let browser = null;
9
+ let page = null;
10
+ let pendingResolvers = [];
11
+ let activeRefreshPromise = null;
12
+ let pageNavigationPromise = null;
13
+
14
+ const runWithPageLock = async (fn) => {
15
+ while (pageNavigationPromise) {
16
+ try {
17
+ await pageNavigationPromise;
18
+ } catch (e) {}
19
+ }
20
+ pageNavigationPromise = (async () => {
21
+ try {
22
+ return await fn();
23
+ } finally {
24
+ pageNavigationPromise = null;
25
+ }
26
+ })();
27
+ return pageNavigationPromise;
28
+ };
29
+
30
+ const parseNetscapeCookies = (text) => {
31
+ const cookies = [];
32
+ for (const line of text.split('\n')) {
33
+ if (!line.trim() || line.startsWith('#')) continue;
34
+ const parts = line.split('\t');
35
+ if (parts.length >= 7) {
36
+ cookies.push({
37
+ name: parts[5],
38
+ value: parts[6].trim(),
39
+ domain: parts[0],
40
+ path: parts[2],
41
+ secure: parts[3] === 'TRUE',
42
+ expires: parseFloat(parts[4])
43
+ });
44
+ }
45
+ }
46
+ return cookies;
47
+ };
48
+
49
+ const getExecutablePath = () => {
50
+ if (process.env.PUPPETEER_EXECUTABLE_PATH) {
51
+ return process.env.PUPPETEER_EXECUTABLE_PATH;
52
+ }
53
+ if (process.platform === 'darwin') {
54
+ return '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome';
55
+ }
56
+ for (const p of ['/usr/bin/chromium-browser', '/usr/bin/google-chrome', '/usr/bin/chromium']) {
57
+ if (fs.existsSync(p)) return p;
58
+ }
59
+ return null;
60
+ };
61
+
62
+ // Update cookies from browser context to sp_dc
63
+ const syncCookies = async () => {
64
+ if (!page) return;
65
+ try {
66
+ const pageCookies = await page.cookies();
67
+ const spDcCookie = pageCookies.find(c => c.name === 'sp_dc');
68
+ if (spDcCookie) {
69
+ updateSpDc(spDcCookie.value);
70
+ console.log('Synced sp_dc cookie from persistent browser:', spDcCookie.value);
71
+ }
72
+ } catch (error) {
73
+ console.error('Failed to sync cookies from browser:', error.message);
74
+ }
75
+ };
76
+
77
+ // Plays a song briefly to trigger cookie/token updates
78
+ const playSongToRefreshSession = () => runWithPageLock(async () => {
79
+ if (!page) return;
80
+ try {
81
+ console.log('Navigating to a Spotify track to trigger playback session refresh...');
82
+ // Navigate to a popular stable track
83
+ await page.goto('https://open.spotify.com/track/4PTG3Z6ehGkBF3zI7Ywt8q', { waitUntil: 'networkidle2', timeout: 30000 });
84
+
85
+ // Wait for the main play button to be rendered
86
+ const playButtonSelector = 'button[data-testid="play-button"], button[aria-label="Play"]';
87
+ await page.waitForSelector(playButtonSelector, { timeout: 10000 });
88
+
89
+ // Click play
90
+ await page.click(playButtonSelector);
91
+ console.log('Playback command sent. Waiting 6 seconds to let Spotify update session tokens...');
92
+ await new Promise(resolve => setTimeout(resolve, 6000));
93
+
94
+ // Pause playback to prevent running up data/audio streams indefinitely
95
+ const pauseButtonSelector = 'button[data-testid="control-button-playpause"], button[aria-label="Pause"]';
96
+ try {
97
+ await page.waitForSelector(pauseButtonSelector, { timeout: 2000 });
98
+ await page.click(pauseButtonSelector);
99
+ console.log('Playback paused successfully.');
100
+ } catch (e) {
101
+ console.log('Could not find pause button (or already paused), continuing...');
102
+ }
103
+
104
+ // Navigate back to search to be ready for search header intercepts
105
+ await page.goto('https://open.spotify.com/search', { waitUntil: 'networkidle2', timeout: 30000 });
106
+ } catch (error) {
107
+ console.error('Failed to trigger song playback refresh:', error.message);
108
+ // Fallback: make sure we are back on search page
109
+ try {
110
+ await page.goto('https://open.spotify.com/search', { waitUntil: 'networkidle2', timeout: 20000 });
111
+ } catch (e) {}
112
+ }
113
+ });
114
+
115
+ export const initPersistentBrowser = async () => {
116
+ if (browser) {
117
+ try {
118
+ await browser.close();
119
+ } catch (e) {}
120
+ }
121
+
122
+ const cookiePath = path.resolve('cookies.txt');
123
+ if (!fs.existsSync(cookiePath)) {
124
+ throw new Error('cookies.txt not found in project root.');
125
+ }
126
+
127
+ const executablePath = getExecutablePath();
128
+ if (!executablePath) {
129
+ throw new Error('Chrome/Chromium not found. Install Chrome or set PUPPETEER_EXECUTABLE_PATH.');
130
+ }
131
+
132
+ console.log('Starting persistent headless browser...');
133
+ const cookieText = fs.readFileSync(cookiePath, 'utf8');
134
+ const cookies = parseNetscapeCookies(cookieText);
135
+
136
+ browser = await puppeteer.launch({
137
+ executablePath,
138
+ headless: true,
139
+ args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage', '--disable-gpu']
140
+ });
141
+
142
+ page = await browser.newPage();
143
+ await page.setCookie(...cookies);
144
+
145
+ page.on('request', async (request) => {
146
+ const headers = request.headers();
147
+ if (headers['authorization'] && headers['authorization'].startsWith('Bearer ') && headers['client-token']) {
148
+ const authorization = headers['authorization'].split(' ')[1];
149
+ const clientToken = headers['client-token'];
150
+
151
+ cachedCreds = { authorization, clientToken };
152
+ // Cache for 50 minutes
153
+ credsExpiresAt = Date.now() + 50 * 60 * 1000;
154
+
155
+ const resolvers = [...pendingResolvers];
156
+ pendingResolvers = [];
157
+ for (const resolver of resolvers) {
158
+ resolver(cachedCreds);
159
+ }
160
+ }
161
+ });
162
+
163
+ // Periodically sync sp_dc cookie and reload page to keep session alive
164
+ page.on('load', syncCookies);
165
+
166
+ console.log('Navigating persistent browser to Spotify...');
167
+ await page.goto('https://open.spotify.com/search', { waitUntil: 'networkidle2', timeout: 60000 });
168
+ await syncCookies();
169
+
170
+ // Play a song on initialization to ensure cookies get updated immediately
171
+ await playSongToRefreshSession();
172
+
173
+ // Refresh every 15 minutes by playing a song and syncing cookies
174
+ setInterval(async () => {
175
+ try {
176
+ console.log('Triggering periodic playback session refresh...');
177
+ await playSongToRefreshSession();
178
+ await syncCookies();
179
+ } catch (error) {
180
+ console.error('Error refreshing persistent browser page:', error.message);
181
+ }
182
+ }, 15 * 60 * 1000);
183
+ };
184
+
185
+ export const getBrowserCredentials = async () => {
186
+ if (!browser || !page) {
187
+ await initPersistentBrowser();
188
+ }
189
+
190
+ if (cachedCreds && Date.now() < credsExpiresAt) {
191
+ return cachedCreds;
192
+ }
193
+
194
+ if (activeRefreshPromise) {
195
+ return activeRefreshPromise;
196
+ }
197
+
198
+ activeRefreshPromise = (async () => {
199
+ console.log('Credentials expired or missing, triggering song play session to refresh...');
200
+ const credsPromise = new Promise((resolve) => {
201
+ pendingResolvers.push(resolve);
202
+ });
203
+
204
+ try {
205
+ await playSongToRefreshSession();
206
+ const creds = await Promise.race([
207
+ credsPromise,
208
+ new Promise((_, reject) => setTimeout(() => reject(new Error('Credential detection timed out')), 25000))
209
+ ]);
210
+ return creds;
211
+ } catch (error) {
212
+ throw error;
213
+ } finally {
214
+ activeRefreshPromise = null;
215
+ pendingResolvers = [];
216
+ }
217
+ })();
218
+
219
+ return activeRefreshPromise;
220
+ };
221
+
222
+ // Search using Spotify's internal GraphQL v2 endpoint
223
+ export const searchSpotifyGraphQL = async (query, limit = 20) => {
224
+ const { authorization, clientToken } = await getBrowserCredentials();
225
+
226
+ const payload = {
227
+ variables: {
228
+ query,
229
+ limit,
230
+ offset: 0,
231
+ numberOfTopResults: limit,
232
+ includeArtistHasConcertsField: false,
233
+ includeAudiobooks: false,
234
+ includeAuthors: false,
235
+ includePreReleases: true,
236
+ includeAlbumPreReleases: true,
237
+ includeEpisodeContentRatingsV2: false,
238
+ isPrefix: null
239
+ },
240
+ operationName: 'searchTopResultsList',
241
+ extensions: {
242
+ persistedQuery: {
243
+ version: 1,
244
+ sha256Hash: '63a93cc04f6d8dea84a85de315e43f396a76cb681500de9ac5ccf5fc618c84cb'
245
+ }
246
+ }
247
+ };
248
+
249
+ const axios = (await import('axios')).default;
250
+ const response = await axios.post('https://api-partner.spotify.com/pathfinder/v2/query', payload, {
251
+ headers: {
252
+ 'accept': 'application/json',
253
+ 'content-type': 'application/json;charset=UTF-8',
254
+ 'authorization': `Bearer ${authorization}`,
255
+ 'client-token': clientToken,
256
+ 'app-platform': 'WebPlayer',
257
+ 'origin': 'https://open.spotify.com',
258
+ 'referer': 'https://open.spotify.com/',
259
+ 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36',
260
+ 'spotify-app-version': '1.2.95.15.g813d8ea0'
261
+ }
262
+ });
263
+
264
+ // Extract tracks from the GraphQL response
265
+ const topResults = response.data?.data?.searchV2?.topResultsV2?.itemsV2 || [];
266
+ const tracks = topResults
267
+ .filter(item => item?.item?.__typename === 'TrackResponseWrapper')
268
+ .map(item => {
269
+ const d = item.item.data;
270
+ return {
271
+ id: d.id,
272
+ name: d.name,
273
+ uri: d.uri,
274
+ artists: (d.artists?.items || []).map(a => ({ name: a.profile.name, uri: a.uri })),
275
+ duration_ms: d.duration?.totalMilliseconds,
276
+ album: {
277
+ name: d.albumOfTrack?.name,
278
+ id: d.albumOfTrack?.id
279
+ }
280
+ };
281
+ });
282
+
283
+ return tracks;
284
+ };
285
+
286
+ // Backwards compatible export for token-only consumers
287
+ export const getBrowserSearchToken = async () => {
288
+ const { authorization } = await getBrowserCredentials();
289
+ return authorization;
290
+ };
services/spotifyAuthService.js ADDED
@@ -0,0 +1,258 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import axios from "axios";
2
+ import * as OTPAuth from "otpauth";
3
+ import fs from "fs";
4
+ import { fileURLToPath } from "url";
5
+
6
+ let _spDcCache = null;
7
+ let cachedToken = null;
8
+ let tokenExpiresAt = 0;
9
+
10
+ export function updateSpDc(value) {
11
+ _spDcCache = value;
12
+ cachedToken = null;
13
+ tokenExpiresAt = 0;
14
+ }
15
+
16
+ function getSpDc() {
17
+ if (_spDcCache) return _spDcCache;
18
+
19
+ try {
20
+ const cookiePath = new URL('../cookies.txt', import.meta.url).pathname;
21
+ const text = fs.readFileSync(cookiePath, 'utf8');
22
+ for (const line of text.split('\n')) {
23
+ if (!line.trim() || line.startsWith('#')) continue;
24
+ const parts = line.split('\t');
25
+ if (parts.length >= 7 && parts[5] === 'sp_dc') {
26
+ _spDcCache = parts[6].trim();
27
+ return _spDcCache;
28
+ }
29
+ }
30
+ } catch (e) {
31
+ console.error('Failed to read sp_dc from cookies.txt:', e.message);
32
+ }
33
+
34
+ throw new Error('sp_dc not found in cookies.txt — please update the file.');
35
+ }
36
+ const DEFAULT_SECRETS_URL = "https://git.gay/thereallo/totp-secrets/raw/branch/main/secrets/secretDict.json";
37
+ const FALLBACK_SECRETS_URL = "https://raw.githubusercontent.com/xyloflake/spot-secrets-go/refs/heads/main/secrets/secretDict.json";
38
+
39
+ // Global variables to store the current TOTP configuration
40
+ let currentTotp = null;
41
+ let currentTotpVersion = null;
42
+ let lastFetchTime = 0;
43
+ const FETCH_INTERVAL = 60 * 60 * 1000; // 1 hour in milliseconds
44
+
45
+ // Initialize TOTP secrets on startup
46
+ initializeTOTPSecrets();
47
+
48
+ // Set up periodic updates
49
+ setInterval(updateTOTPSecrets, FETCH_INTERVAL);
50
+
51
+ async function initializeTOTPSecrets() {
52
+ try {
53
+ await updateTOTPSecrets();
54
+ } catch (error) {
55
+ console.error('Failed to initialize TOTP secrets:', error);
56
+ // Fallback to the original hardcoded secret
57
+ useFallbackSecret();
58
+ }
59
+ }
60
+
61
+ async function updateTOTPSecrets() {
62
+ try {
63
+ const now = Date.now();
64
+ if (now - lastFetchTime < FETCH_INTERVAL) {
65
+ return; // Don't fetch too frequently
66
+ }
67
+
68
+ console.log('Fetching updated TOTP secrets...');
69
+ const secrets = await fetchSecrets();
70
+ const newestVersion = findNewestVersion(secrets);
71
+
72
+ if (newestVersion && newestVersion !== currentTotpVersion) {
73
+ const secretData = secrets[newestVersion];
74
+ const totpSecret = createTotpSecret(secretData);
75
+
76
+ currentTotp = new OTPAuth.TOTP({
77
+ period: 30,
78
+ digits: 6,
79
+ algorithm: "SHA1",
80
+ secret: totpSecret
81
+ });
82
+
83
+ currentTotpVersion = newestVersion;
84
+ lastFetchTime = now;
85
+ console.log(`TOTP secrets updated to version ${newestVersion}`);
86
+ } else {
87
+ console.log(`No new TOTP secrets found, using version ${newestVersion}`);
88
+ }
89
+ } catch (error) {
90
+ console.error('Failed to update TOTP secrets:', error);
91
+ // Keep using current TOTP if available, otherwise use fallback
92
+ if (!currentTotp) {
93
+ useFallbackSecret();
94
+ }
95
+ }
96
+ }
97
+
98
+ async function fetchSecrets() {
99
+ const urlOption = process.env.SECRETS_URL || DEFAULT_SECRETS_URL;
100
+
101
+ // Try loading from local file
102
+ if (urlOption.startsWith("file://") || (!urlOption.startsWith("http://") && !urlOption.startsWith("https://"))) {
103
+ try {
104
+ let filePath = urlOption;
105
+ if (urlOption.startsWith("file://")) {
106
+ filePath = fileURLToPath(urlOption);
107
+ }
108
+ console.log(`Reading secrets from local file: ${filePath}`);
109
+ const fileContent = await fs.promises.readFile(filePath, 'utf8');
110
+ return JSON.parse(fileContent);
111
+ } catch (error) {
112
+ console.error(`Failed to read secrets from local file: ${error.message}`);
113
+ throw error;
114
+ }
115
+ }
116
+
117
+ // Remote fetching with fallback
118
+ try {
119
+ console.log(`Fetching secrets from remote URL: ${urlOption}`);
120
+ const response = await axios.get(urlOption, {
121
+ timeout: 10000,
122
+ headers: {
123
+ 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'
124
+ }
125
+ });
126
+ return response.data;
127
+ } catch (error) {
128
+ console.error(`Failed to fetch secrets from URL (${urlOption}): ${error.message}`);
129
+ // If the error was from the default primary URL, try the fallback URL
130
+ if (urlOption === DEFAULT_SECRETS_URL) {
131
+ try {
132
+ console.log(`Trying fallback secrets URL: ${FALLBACK_SECRETS_URL}`);
133
+ const response = await axios.get(FALLBACK_SECRETS_URL, {
134
+ timeout: 10000,
135
+ headers: {
136
+ 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'
137
+ }
138
+ });
139
+ return response.data;
140
+ } catch (fallbackError) {
141
+ console.error(`Failed to fetch secrets from fallback URL: ${fallbackError.message}`);
142
+ throw fallbackError;
143
+ }
144
+ }
145
+ throw error;
146
+ }
147
+ }
148
+
149
+ function findNewestVersion(secrets) {
150
+ const versions = Object.keys(secrets).map(Number);
151
+ return Math.max(...versions).toString();
152
+ }
153
+
154
+ function createTotpSecret(data) {
155
+ const mappedData = data.map((value, index) => value ^ ((index % 33) + 9));
156
+ const hexData = Buffer.from(mappedData.join(""), "utf8").toString("hex");
157
+ return OTPAuth.Secret.fromHex(hexData);
158
+ }
159
+
160
+ function useFallbackSecret() {
161
+ // Fallback to the original hardcoded secret
162
+ // This secret will most likely fail because Spotify is rotating the secrets every couple of days
163
+ // This is really just kept in here for reference
164
+ const fallbackData = [99, 111, 47, 88, 49, 56, 118, 65, 52, 67, 50, 104, 117, 101, 55, 94, 95, 75, 94, 49, 69, 36, 85, 64, 74, 60];
165
+ const totpSecret = createTotpSecret(fallbackData);
166
+
167
+ currentTotp = new OTPAuth.TOTP({
168
+ period: 30,
169
+ digits: 6,
170
+ algorithm: "SHA1",
171
+ secret: totpSecret
172
+ });
173
+
174
+ currentTotpVersion = "19"; // Fallback version
175
+ console.log('Using fallback TOTP secret');
176
+ }
177
+
178
+ export async function getToken(reason = "init", productType = "mobile-web-player") {
179
+ if (cachedToken && Date.now() < tokenExpiresAt) {
180
+ return cachedToken;
181
+ }
182
+
183
+ // Ensure we have a TOTP instance
184
+ if (!currentTotp) {
185
+ await initializeTOTPSecrets();
186
+ }
187
+
188
+ const payload = await generateAuthPayload(reason, productType);
189
+
190
+ const url = new URL("https://open.spotify.com/api/token");
191
+ Object.entries(payload).forEach(([key, value]) => url.searchParams.append(key, value));
192
+
193
+ const response = await axios.get(url.toString(), {
194
+ headers: {
195
+ 'User-Agent': userAgent(),
196
+ 'Origin': 'https://open.spotify.com/',
197
+ 'Referer': 'https://open.spotify.com/',
198
+ 'Cookie': `sp_dc=${getSpDc()}`,
199
+ },
200
+ });
201
+
202
+ const token = response.data?.accessToken;
203
+ if (token) {
204
+ cachedToken = token;
205
+ const expiresTimestamp = response.data?.accessTokenExpirationTimestampMs;
206
+ if (expiresTimestamp && !isNaN(expiresTimestamp)) {
207
+ // Refresh 5 minutes before actual expiry
208
+ tokenExpiresAt = Number(expiresTimestamp) - 5 * 60 * 1000;
209
+ } else {
210
+ tokenExpiresAt = Date.now() + 50 * 60 * 1000;
211
+ }
212
+ }
213
+
214
+ return token;
215
+ }
216
+
217
+ async function generateAuthPayload(reason, productType) {
218
+ const localTime = Date.now();
219
+ const serverTime = await getServerTime();
220
+
221
+ return {
222
+ reason,
223
+ productType,
224
+ totp: generateTOTP(localTime),
225
+ totpVer: currentTotpVersion || "19",
226
+ totpServer: generateTOTP(Math.floor(serverTime / 30))
227
+ };
228
+ }
229
+
230
+ async function getServerTime() {
231
+ try {
232
+ const { data } = await axios.get("https://open.spotify.com/api/server-time", {
233
+ headers: {
234
+ 'User-Agent': userAgent(),
235
+ 'Origin': 'https://open.spotify.com/',
236
+ 'Referer': 'https://open.spotify.com/',
237
+ 'Cookie': `sp_dc=${getSpDc()}`,
238
+ },
239
+ });
240
+
241
+ const time = Number(data.serverTime);
242
+ if (isNaN(time)) throw new Error("Invalid server time");
243
+ return time * 1000;
244
+ } catch {
245
+ return Date.now();
246
+ }
247
+ }
248
+
249
+ function generateTOTP(timestamp) {
250
+ if (!currentTotp) {
251
+ throw new Error("TOTP not initialized");
252
+ }
253
+ return currentTotp.generate({ timestamp });
254
+ }
255
+
256
+ function userAgent() {
257
+ return "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36";
258
+ }
services/spotifyCanvasService.js ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import axios from 'axios';
2
+ import { getToken } from './spotifyAuthService.js';
3
+
4
+ export async function getCanvases(trackUri) {
5
+ const { CanvasRequest, CanvasResponse } = (await import('../proto/_canvas_pb.cjs')).default;
6
+
7
+ try {
8
+ const accessToken = await getToken();
9
+
10
+ const canvasRequest = new CanvasRequest();
11
+ const track = new CanvasRequest.Track();
12
+ track.setTrackUri(trackUri);
13
+ canvasRequest.addTracks(track);
14
+
15
+ const requestBytes = canvasRequest.serializeBinary();
16
+
17
+ const response = await axios.post(
18
+ 'https://spclient.wg.spotify.com/canvaz-cache/v0/canvases',
19
+ requestBytes,
20
+ {
21
+ responseType: 'arraybuffer',
22
+ headers: {
23
+ 'Accept': 'application/protobuf',
24
+ 'Content-Type': 'application/x-www-form-urlencoded',
25
+ 'Accept-Language': 'en',
26
+ 'User-Agent': 'Spotify/9.0.34.593 iOS/18.4 (iPhone15,3)',
27
+ 'Accept-Encoding': 'gzip, deflate, br',
28
+ 'Authorization': `Bearer ${accessToken}`,
29
+ },
30
+ }
31
+ );
32
+
33
+ if (response.status !== 200) {
34
+ console.error(`Canvas fetch failed: ${response.status} ${response.statusText}`);
35
+ return null;
36
+ }
37
+
38
+ const parsed = CanvasResponse.deserializeBinary(response.data).toObject();
39
+ return parsed;
40
+ } catch (error) {
41
+ console.error(`Canvas request error:`, error);
42
+ return null;
43
+ }
44
+ }