commit e25c995560dfa212b00a3e9e608cde7d4c51f443 Author: Tom Chien (IQ-AS) Date: Tue Sep 8 17:46:28 2026 +0800 init diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 0000000..c850e42 --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,34 @@ +{ + "permissions": { + "allow": [ + "mcp__figma-console__figma_get_status", + "mcp__figma-console__figma_take_screenshot", + "mcp__figma-console__figma_get_selection", + "mcp__figma-console__figma_execute", + "mcp__figma-console__figma_reconnect", + "mcp__figma-console__figma_capture_screenshot", + "mcp__figma-console__figma_get_file_data", + "Bash(cd \"C:\\\\Users\\\\tom_chien\\\\Desktop\\\\TrendMicro_Projetc\\\\it_cost_dashboad\" && ls -la && node --version && npm --version)", + "Bash(cd \"C:\\\\Users\\\\tom_chien\\\\Desktop\\\\TrendMicro_Projetc\\\\it_cost_dashboad\" && npm install 2>&1 | tail -n 20)", + "Bash(cd \"C:\\\\Users\\\\tom_chien\\\\Desktop\\\\TrendMicro_Projetc\\\\it_cost_dashboad\" && npx prisma generate 2>&1 | tail -n 25)", + "Bash(cd \"C:\\\\Users\\\\tom_chien\\\\Desktop\\\\TrendMicro_Projetc\\\\it_cost_dashboad\" && npx prisma migrate dev --name init 2>&1 | tail -n 30)", + "Bash(cd \"C:\\\\Users\\\\tom_chien\\\\Desktop\\\\TrendMicro_Projetc\\\\it_cost_dashboad\" && npm run build 2>&1 | tail -n 45)", + "Bash(cd \"C:\\\\Users\\\\tom_chien\\\\Desktop\\\\TrendMicro_Projetc\\\\it_cost_dashboad\" && npm run build 2>&1 | tail -n 40)", + "Bash(cd \"C:\\\\Users\\\\tom_chien\\\\Desktop\\\\TrendMicro_Projetc\\\\it_cost_dashboad\" && rm -rf src/app/budgets src/app/reports && echo \"removed\" && ls src/app)", + "Bash(cd \"C:\\\\Users\\\\tom_chien\\\\Desktop\\\\TrendMicro_Projetc\\\\it_cost_dashboad\" && npm run build 2>&1 | tail -n 30)", + "Bash(cd \"C:\\\\Users\\\\tom_chien\\\\Desktop\\\\TrendMicro_Projetc\\\\it_cost_dashboad\" && tasklist | grep -i node || echo \"no node\"; echo \"---\"; npx next build 2>&1 | tail -n 35)", + "Bash(cd \"C:\\\\Users\\\\tom_chien\\\\Desktop\\\\TrendMicro_Projetc\\\\it_cost_dashboad\" && npx next build 2>&1 | tail -n 12)", + "Bash(cd \"C:/Users/tom_chien/Desktop/TrendMicro_Projetc/it_cost_dashboad\" && npx prisma migrate dev --name add_year --skip-seed 2>&1 | tail -30)", + "Bash(cd \"C:/Users/tom_chien/Desktop/TrendMicro_Projetc/it_cost_dashboad\" && taskkill //F //IM node.exe 2>&1 | head -5; sleep 1; npx prisma generate 2>&1 | tail -10)", + "Bash(cd \"C:/Users/tom_chien/Desktop/TrendMicro_Projetc/it_cost_dashboad\" && npx next build 2>&1 | tail -40)", + "Bash(taskkill //F //IM node.exe 2>&1 | head -3)", + "Bash(cd:*)", + "Bash(ssh:*)", + "Bash(node:*)", + "Bash(git fetch:*)", + "Bash(command:*)", + "Bash(timeout:*)", + "Bash(git:*)" + ] + } +} diff --git a/.env b/.env new file mode 100644 index 0000000..e9494fc --- /dev/null +++ b/.env @@ -0,0 +1,15 @@ +# SQLite for local dev only. Production (MySQL/RDS) config lives in .env.production +# (gitignored) and uses prisma/prod/schema.prisma — see DEPLOY.md. +DATABASE_URL="file:./dev.db" +DATABASE_PROVIDER="sqlite" + +# SSO secrets are NOT stored here (this file is committed). Dev auth vars live in +# .env.local (gitignored); prod auth vars in .env.production — see .env.production.example. + +# Local break-glass admin login (username/password, in addition to SSO). The +# password is intentionally EMPTY here so local login is DISABLED by default; +# set a real value in the gitignored .env.local (dev) / .env.production (prod). +# Role model: config/users.json maps SSO emails -> "admin" | "user"; unlisted +# SSO emails cannot sign in. The local admin always has the admin role. +LOCAL_ADMIN_USERNAME="admin" +LOCAL_ADMIN_PASSWORD="" diff --git a/.env.production.example b/.env.production.example new file mode 100644 index 0000000..cbc6531 --- /dev/null +++ b/.env.production.example @@ -0,0 +1,38 @@ +# Production environment template (AWS RDS MySQL). +# Copy to .env.production on the EC2 host and fill in the real credentials. +# The real .env.production is gitignored so secrets never land in git. +# +# For Prisma CLI commands (migrate/seed), export these first: +# set -a && source .env.production && set +a +# +# Note: if the DB password contains URL-reserved characters, percent-encode them +# (e.g. "@" -> %40, "/" -> %2F, ":" -> %3A). +DATABASE_URL="mysql://USER:PASSWORD@it-cost-prod-db.c8hgbsblyypx.us-west-2.rds.amazonaws.com:3306/it_cost_dashboard" +DATABASE_PROVIDER="mysql" +NODE_ENV="production" + +# --- Microsoft Entra ID (Azure AD) SSO --- +# Next.js does NOT load .env.local in production, so prod auth vars MUST live here. +# Register the prod redirect URI in Azure: +# https:///api/auth/callback/microsoft-entra-id +AUTH_MICROSOFT_ENTRA_ID_ID="" +AUTH_MICROSOFT_ENTRA_ID_SECRET="" +AUTH_MICROSOFT_ENTRA_ID_ISSUER="https://login.microsoftonline.com//v2.0" +# 32-byte random string used to sign session cookies (generate: npx auth secret). +AUTH_SECRET="" +# Canonical public URL of the app. If TLS is terminated by a proxy/ALB in front +# of the app, set AUTH_TRUST_HOST=true instead of (or in addition to) AUTH_URL. +AUTH_URL="https://" +# AUTH_TRUST_HOST=true + +# --- Local break-glass admin + role model --- +# In addition to SSO, /login offers a username/password form for a local admin. +# A NON-EMPTY password ENABLES it; leave empty to disable local login entirely. +# This account always has the admin role and bypasses config/users.json (so you +# can still get in to fix a broken/empty allowlist). +LOCAL_ADMIN_USERNAME="admin" +LOCAL_ADMIN_PASSWORD="" + +# Role-based access is driven by the committed, hand-edited allowlist +# config/users.json (email -> "admin" | "user"). SSO emails NOT listed there +# cannot sign in (fail closed). Edit that file and re-login / restart to apply. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8f42642 --- /dev/null +++ b/.gitignore @@ -0,0 +1,34 @@ +# dependencies +/node_modules +/.pnp +.pnp.js + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env*.local + +# production env (contains real RDS credentials) - use .env.production.example as template +.env.production + +# typescript +*.tsbuildinfo +next-env.d.ts + +# prisma / sqlite +/prisma/dev.db +/prisma/dev.db-journal diff --git a/DEPLOY.md b/DEPLOY.md new file mode 100644 index 0000000..5c4e2d0 --- /dev/null +++ b/DEPLOY.md @@ -0,0 +1,183 @@ +# Production Deployment (EC2 + RDS) + +Dev runs on **SQLite**; production runs on **MySQL (AWS RDS)**. Because Prisma +cannot switch the datasource `provider` via `env()`, dev and prod use separate +schema files and migration histories: + +| Environment | Schema | Migrations | DB | +| ----------- | -------------------------- | ------------------------- | --------------------------- | +| dev | `prisma/schema.prisma` | `prisma/migrations` | SQLite (`prisma/dev.db`) | +| prod | `prisma/prod/schema.prisma`| `prisma/prod/migrations` | MySQL / RDS | + +## Infrastructure + +- **App EC2**: `10.106.103.40` +- **RDS (private subnet)**: `it-cost-prod-db.c8hgbsblyypx.us-west-2.rds.amazonaws.com:3306` + - Database: `it_cost_dashboard` + - The EC2 host is verified able to reach the RDS instance. + +## One-time setup on the EC2 host + +1. Install dependencies: + ```bash + npm ci + ``` +2. Create the production env file from the template and fill in the real + RDS credentials (this file is gitignored and must never be committed): + ```bash + cp .env.production.example .env.production + # edit .env.production -> set the real DATABASE_URL + ``` + +## Deploy / release steps + +Run from the project root on the EC2 host (`/var/www/it_cost_dashboard`): + +```bash +cd /var/www/it_cost_dashboard + +# 1. Make the prod DATABASE_URL available to the Prisma CLI (it only reads .env +# by default, so we export .env.production explicitly). +set -a && source .env.production && set +a + +# 2. Apply migrations to RDS (idempotent; safe to re-run). +npm run prod:migrate + +# 3. (First release only) seed baseline data. +npm run seed + +# 4. Generate the MySQL Prisma client. ALWAYS re-run this if you just ran +# `npm ci` / `npm install` — installing can reset the generated client in +# node_modules/.prisma/client back to the default (dev/SQLite) schema. +npm run prod:generate + +# 5. Wipe stale build output BEFORE building. This is a hard rule: a leftover +# `.next/cache` from an earlier `npm run build` (dev/SQLite) can bake the +# wrong Prisma client into the compiled routes ("URL must start with `file:`"). +rm -rf .next + +# 6. Generate the MySQL client again + build Next.js. +npm run build:prod + +# 7. (Re)start under pm2, picking up fresh env from .env.production. +pm2 restart it_cost_dashboard --update-env # first time: pm2 start npm --name it_cost_dashboard -- run start +``` + +### Verify the release + +Always confirm the app came up on the MySQL client (not a stale SQLite build): + +```bash +# No Prisma init errors in the logs. +pm2 logs it_cost_dashboard --lines 40 --nostream + +# The failing endpoint returns 200 + JSON (adjust port if PORT differs). +curl -s -o /dev/null -w "%{http_code}\n" http://localhost:3000/api/years # expect 200 +curl -s http://localhost:3000/api/years | head -c 300 # expect JSON, not a 500 +``` + +Success = `/api/years` returns 200 + JSON and pm2 logs show no +`PrismaClientInitializationError` / `the URL must start with the protocol \`file:\``. + +### Alternative: systemd unit + +For a systemd-managed process instead of pm2: + +```ini +# /etc/systemd/system/it-cost-dashboard.service +[Service] +WorkingDirectory=/var/www/it_cost_dashboard +EnvironmentFile=/var/www/it_cost_dashboard/.env.production +ExecStart=/usr/bin/npm run start +Restart=always +``` + +## Authentication & authorization + +Sign-in uses Auth.js / NextAuth v5. There are **two** ways in, and access is +**role-based** (`admin` = full access; `user` = read-only dashboard/trend): + +1. **Microsoft Entra ID SSO** — allowed only if the user's email is in the + allowlist (see below). Unlisted emails cannot enter the app (fail closed). +2. **Local username/password** (break-glass admin) — a form on `/login`, + controlled by `LOCAL_ADMIN_USERNAME` / `LOCAL_ADMIN_PASSWORD`. This account is + always `admin` and bypasses the allowlist, so you can always get in to fix a + broken/empty `config/users.json`. + +Middleware redirects any unauthenticated request to `/login` and enforces roles +**server-side**: normal users are redirected away from admin pages +(`/cost-registration`, `/cost-item-creation`, `/year-creation`) and any write API +call (non-`GET` `/api/*`) returns **403**. Read APIs (`GET /api/*`) stay open to +any signed-in user. The sidebar "Admin" group is also hidden for normal users. + +### Role allowlist — `config/users.json` + +Committed (NOT secret), hand-edited map of **email → role**: + +```json +{ + "Sunny_Ho@trendmicro.com": "admin", + "tom_chien@trendmicro.com": "user" +} +``` + +- Emails are matched **case-insensitively**. +- An email that is absent (or an unreadable/invalid file) ⇒ SSO sign-in denied. +- The role is baked into the session JWT at sign-in, so after editing this file + users must **re-login** (or restart the app) for changes to apply: + `pm2 restart it_cost_dashboard`. + +### Required env vars (`.env.production`) + +Next.js does **not** load `.env.local` in production, so these must live in +`.env.production` on the EC2 host: + +```env +AUTH_MICROSOFT_ENTRA_ID_ID="" +AUTH_MICROSOFT_ENTRA_ID_SECRET="" +AUTH_MICROSOFT_ENTRA_ID_ISSUER="https://login.microsoftonline.com//v2.0" +AUTH_SECRET="<32-byte random string, e.g. `npx auth secret`>" +AUTH_URL="https://" # or set AUTH_TRUST_HOST=true behind a TLS proxy/ALB + +# Local break-glass admin. Non-empty password ENABLES the /login form; empty disables it. +LOCAL_ADMIN_USERNAME="admin" +LOCAL_ADMIN_PASSWORD="" +``` + +After changing `config/users.json` or the auth env vars, rebuild and restart: + +```bash +rm -rf .next && npm run build:prod && pm2 restart it_cost_dashboard --update-env +``` + +In the Entra app registration, add the prod **redirect URI**: + +``` +https:///api/auth/callback/microsoft-entra-id +``` + +(Dev uses `http://localhost:3000/api/auth/callback/microsoft-entra-id`, configured +in the gitignored `.env.local`.) The `AUTH_*` vars are read at both build and +runtime, so they must be present before `npm run build:prod` and at `pm2` start. + +## Notes + +- Do **not** run `npm run build` (dev/SQLite) on prod — use `npm run build:prod`. +- Both `prisma/schema.prisma` (sqlite) and `prisma/prod/schema.prisma` (mysql) + generate to the same default path `node_modules/.prisma/client` (last-writer-wins), + and the app imports the bare `@prisma/client`. So the deployed client is whichever + schema was generated **last before `next build`**. Two ways prod can end up with the + wrong (SQLite) client baked into `.next`: + 1. **Stale `.next` cache** — an earlier dev `npm run build` left compiled route + chunks that `build:prod` reused. Fix: always `rm -rf .next` before building (step 5). + 2. **Clobbered client** — `npm ci` / `npm install` reset the generated client to the + default schema. Fix: re-run `npm run prod:generate` after any install (step 4). + - Symptom: every API call 500s with + `error: Error validating datasource \`db\`: the URL must start with the protocol \`file:\`` + even though the runtime `DATABASE_URL` is MySQL. +- `DATABASE_URL` set as a real OS/systemd env var always takes precedence over + any value in `.env` / `.env.production`, so the committed dev `.env` (SQLite) + never leaks into production. +- If you change the schema, generate a new MySQL migration against a MySQL dev + instance with `prisma migrate dev --schema=prisma/prod/schema.prisma`, then + redeploy with `npm run prod:migrate`. diff --git a/README.md b/README.md new file mode 100644 index 0000000..6011c63 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +Using the figma-console MCP tools, on the currently open Figma file (page "main") diff --git a/config/users.json b/config/users.json new file mode 100644 index 0000000..2380bce --- /dev/null +++ b/config/users.json @@ -0,0 +1,4 @@ +{ + "Sunny_Ho@trendmicro.com": "admin", + "tom_chien@trendmicro.com": "user" +} diff --git a/next.config.mjs b/next.config.mjs new file mode 100644 index 0000000..4678774 --- /dev/null +++ b/next.config.mjs @@ -0,0 +1,4 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = {}; + +export default nextConfig; diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..e2c966a --- /dev/null +++ b/package-lock.json @@ -0,0 +1,3732 @@ +{ + "name": "it_cost_dashboard", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "it_cost_dashboard", + "version": "0.1.0", + "dependencies": { + "@prisma/client": "^6.1.0", + "next": "15.1.4", + "next-auth": "^5.0.0-beta.32", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "recharts": "^2.15.0" + }, + "devDependencies": { + "@tailwindcss/postcss": "^4.0.0", + "@types/node": "^22.10.5", + "@types/react": "^19.0.4", + "@types/react-dom": "^19.0.2", + "better-sqlite3": "^11.8.1", + "mysql2": "^3.12.0", + "prisma": "^6.1.0", + "tailwindcss": "^4.0.0", + "tsx": "^4.19.2", + "typescript": "^5.7.3" + } + }, + "node_modules/@alloc/quick-lru": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", + "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@auth/core": { + "version": "0.41.3", + "resolved": "https://registry.npmjs.org/@auth/core/-/core-0.41.3.tgz", + "integrity": "sha512-sJ3JMHHkXMD3aOjopv7mOBTO1Ocw4b0fAEXJBz6k7YHLpYQI6C40jCUPc5fNvUKxXRXNE1/sRISA15UrwWJBTw==", + "license": "ISC", + "dependencies": { + "@panva/hkdf": "^1.2.1", + "jose": "^6.0.6", + "oauth4webapi": "^3.3.0", + "preact": "10.24.3", + "preact-render-to-string": "6.5.11" + }, + "peerDependencies": { + "@simplewebauthn/browser": "^9.0.1", + "@simplewebauthn/server": "^9.0.2", + "nodemailer": "^7.0.7 || ^8.0.5" + }, + "peerDependenciesMeta": { + "@simplewebauthn/browser": { + "optional": true + }, + "@simplewebauthn/server": { + "optional": true + }, + "nodemailer": { + "optional": true + } + } + }, + "node_modules/@babel/runtime": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.7.tgz", + "integrity": "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz", + "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==", + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.1.tgz", + "integrity": "sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.1.tgz", + "integrity": "sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.1.tgz", + "integrity": "sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.1.tgz", + "integrity": "sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.1.tgz", + "integrity": "sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.1.tgz", + "integrity": "sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.1.tgz", + "integrity": "sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.1.tgz", + "integrity": "sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.1.tgz", + "integrity": "sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.1.tgz", + "integrity": "sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.1.tgz", + "integrity": "sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.1.tgz", + "integrity": "sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.1.tgz", + "integrity": "sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.1.tgz", + "integrity": "sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.1.tgz", + "integrity": "sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.1.tgz", + "integrity": "sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.1.tgz", + "integrity": "sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.1.tgz", + "integrity": "sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.1.tgz", + "integrity": "sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.1.tgz", + "integrity": "sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.1.tgz", + "integrity": "sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.1.tgz", + "integrity": "sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.1.tgz", + "integrity": "sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.1.tgz", + "integrity": "sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.1.tgz", + "integrity": "sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.1.tgz", + "integrity": "sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@img/sharp-darwin-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz", + "integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-darwin-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz", + "integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-libvips-darwin-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz", + "integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-darwin-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz", + "integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz", + "integrity": "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==", + "cpu": [ + "arm" + ], + "libc": [ + "glibc" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz", + "integrity": "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==", + "cpu": [ + "arm64" + ], + "libc": [ + "glibc" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-s390x": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.4.tgz", + "integrity": "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==", + "cpu": [ + "s390x" + ], + "libc": [ + "glibc" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz", + "integrity": "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==", + "cpu": [ + "x64" + ], + "libc": [ + "glibc" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz", + "integrity": "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==", + "cpu": [ + "arm64" + ], + "libc": [ + "musl" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz", + "integrity": "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==", + "cpu": [ + "x64" + ], + "libc": [ + "musl" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-linux-arm": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz", + "integrity": "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==", + "cpu": [ + "arm" + ], + "libc": [ + "glibc" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm": "1.0.5" + } + }, + "node_modules/@img/sharp-linux-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz", + "integrity": "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==", + "cpu": [ + "arm64" + ], + "libc": [ + "glibc" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-linux-s390x": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.5.tgz", + "integrity": "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==", + "cpu": [ + "s390x" + ], + "libc": [ + "glibc" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-s390x": "1.0.4" + } + }, + "node_modules/@img/sharp-linux-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz", + "integrity": "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==", + "cpu": [ + "x64" + ], + "libc": [ + "glibc" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-linuxmusl-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz", + "integrity": "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==", + "cpu": [ + "arm64" + ], + "libc": [ + "musl" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-linuxmusl-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz", + "integrity": "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==", + "cpu": [ + "x64" + ], + "libc": [ + "musl" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-wasm32": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.5.tgz", + "integrity": "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==", + "cpu": [ + "wasm32" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", + "optional": true, + "dependencies": { + "@emnapi/runtime": "^1.2.0" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-ia32": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.5.tgz", + "integrity": "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==", + "cpu": [ + "ia32" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz", + "integrity": "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@next/env": { + "version": "15.1.4", + "resolved": "https://registry.npmjs.org/@next/env/-/env-15.1.4.tgz", + "integrity": "sha512-2fZ5YZjedi5AGaeoaC0B20zGntEHRhi2SdWcu61i48BllODcAmmtj8n7YarSPt4DaTsJaBFdxQAVEVzgmx2Zpw==", + "license": "MIT" + }, + "node_modules/@next/swc-darwin-arm64": { + "version": "15.1.4", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.1.4.tgz", + "integrity": "sha512-wBEMBs+np+R5ozN1F8Y8d/Dycns2COhRnkxRc+rvnbXke5uZBHkUGFgWxfTXn5rx7OLijuUhyfB+gC/ap58dDw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-darwin-x64": { + "version": "15.1.4", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.1.4.tgz", + "integrity": "sha512-7sgf5rM7Z81V9w48F02Zz6DgEJulavC0jadab4ZsJ+K2sxMNK0/BtF8J8J3CxnsJN3DGcIdC260wEKssKTukUw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-gnu": { + "version": "15.1.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.1.4.tgz", + "integrity": "sha512-JaZlIMNaJenfd55kjaLWMfok+vWBlcRxqnRoZrhFQrhM1uAehP3R0+Aoe+bZOogqlZvAz53nY/k3ZyuKDtT2zQ==", + "cpu": [ + "arm64" + ], + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-musl": { + "version": "15.1.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.1.4.tgz", + "integrity": "sha512-7EBBjNoyTO2ipMDgCiORpwwOf5tIueFntKjcN3NK+GAQD7OzFJe84p7a2eQUeWdpzZvhVXuAtIen8QcH71ZCOQ==", + "cpu": [ + "arm64" + ], + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-gnu": { + "version": "15.1.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.1.4.tgz", + "integrity": "sha512-9TGEgOycqZFuADyFqwmK/9g6S0FYZ3tphR4ebcmCwhL8Y12FW8pIBKJvSwV+UBjMkokstGNH+9F8F031JZKpHw==", + "cpu": [ + "x64" + ], + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-musl": { + "version": "15.1.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.1.4.tgz", + "integrity": "sha512-0578bLRVDJOh+LdIoKvgNDz77+Bd85c5JrFgnlbI1SM3WmEQvsjxTA8ATu9Z9FCiIS/AliVAW2DV/BDwpXbtiQ==", + "cpu": [ + "x64" + ], + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-arm64-msvc": { + "version": "15.1.4", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.1.4.tgz", + "integrity": "sha512-JgFCiV4libQavwII+kncMCl30st0JVxpPOtzWcAI2jtum4HjYaclobKhj+JsRu5tFqMtA5CJIa0MvYyuu9xjjQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-x64-msvc": { + "version": "15.1.4", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.1.4.tgz", + "integrity": "sha512-xxsJy9wzq7FR5SqPCUqdgSXiNXrMuidgckBa8nH9HtjjxsilgcN6VgXF6tZ3uEWuVEadotQJI8/9EQ6guTC4Yw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@panva/hkdf": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@panva/hkdf/-/hkdf-1.2.1.tgz", + "integrity": "sha512-6oclG6Y3PiDFcoyk8srjLfVKyMfVCKJ27JwNPViuXziFpmdz+MZnZN/aKY0JGXgYuO/VghU0jcOAZgWXZ1Dmrw==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, + "node_modules/@prisma/client": { + "version": "6.19.3", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-6.19.3.tgz", + "integrity": "sha512-mKq3jQFhjvko5LTJFHGilsuQs+W+T3Gm451NzuTDGQxwCzwXHYnIu2zGkRoW+Exq3Rob7yp2MfzSrdIiZVhrBg==", + "hasInstallScript": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "peerDependencies": { + "prisma": "*", + "typescript": ">=5.1.0" + }, + "peerDependenciesMeta": { + "prisma": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/@prisma/config": { + "version": "6.19.3", + "resolved": "https://registry.npmjs.org/@prisma/config/-/config-6.19.3.tgz", + "integrity": "sha512-CBPT44BjlQxEt8kiMEauji2WHTDoVBOKl7UlewXmUgBPnr/oPRZC3psci5chJnYmH0ivEIog2OU9PGWoki3DLQ==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "c12": "3.1.0", + "deepmerge-ts": "7.1.5", + "effect": "3.21.0", + "empathic": "2.0.0" + } + }, + "node_modules/@prisma/debug": { + "version": "6.19.3", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-6.19.3.tgz", + "integrity": "sha512-ljkJ+SgpXNktLG0Q/n4JGYCkKf0f8oYLyjImS2I8e2q2WCfdRRtWER062ZV/ixaNP2M2VKlWXVJiGzZaUgbKZw==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/engines": { + "version": "6.19.3", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-6.19.3.tgz", + "integrity": "sha512-RSYxtlYFl5pJ8ZePgMv0lZ9IzVCOdTPOegrs2qcbAEFrBI1G33h6wyC9kjQvo0DnYEhEVY0X4LsuFHXLKQk88g==", + "devOptional": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "6.19.3", + "@prisma/engines-version": "7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7", + "@prisma/fetch-engine": "6.19.3", + "@prisma/get-platform": "6.19.3" + } + }, + "node_modules/@prisma/engines-version": { + "version": "7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7.tgz", + "integrity": "sha512-03bgb1VD5gvuumNf+7fVGBzfpJPjmqV423l/WxsWk2cNQ42JD0/SsFBPhN6z8iAvdHs07/7ei77SKu7aZfq8bA==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/fetch-engine": { + "version": "6.19.3", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-6.19.3.tgz", + "integrity": "sha512-tKtl/qco9Nt7LU5iKhpultD8O4vMCZcU2CHjNTnRrL1QvSUr5W/GcyFPjNL87GtRrwBc7ubXXD9xy4EvLvt8JA==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "6.19.3", + "@prisma/engines-version": "7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7", + "@prisma/get-platform": "6.19.3" + } + }, + "node_modules/@prisma/get-platform": { + "version": "6.19.3", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-6.19.3.tgz", + "integrity": "sha512-xFj1VcJ1N3MKooOQAGO0W5tsd0W2QzIvW7DD7c/8H14Zmp4jseeWAITm+w2LLoLrlhoHdPPh0NMZ8mfL6puoHA==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "6.19.3" + } + }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@swc/counter": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", + "license": "Apache-2.0" + }, + "node_modules/@swc/helpers": { + "version": "0.5.15", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz", + "integrity": "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.8.0" + } + }, + "node_modules/@tailwindcss/node": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.3.tgz", + "integrity": "sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "enhanced-resolve": "^5.24.1", + "jiti": "^2.7.0", + "lightningcss": "1.32.0", + "magic-string": "^0.30.21", + "source-map-js": "^1.2.1", + "tailwindcss": "4.3.3" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.3.tgz", + "integrity": "sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.3.3", + "@tailwindcss/oxide-darwin-arm64": "4.3.3", + "@tailwindcss/oxide-darwin-x64": "4.3.3", + "@tailwindcss/oxide-freebsd-x64": "4.3.3", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.3", + "@tailwindcss/oxide-linux-arm64-gnu": "4.3.3", + "@tailwindcss/oxide-linux-arm64-musl": "4.3.3", + "@tailwindcss/oxide-linux-x64-gnu": "4.3.3", + "@tailwindcss/oxide-linux-x64-musl": "4.3.3", + "@tailwindcss/oxide-wasm32-wasi": "4.3.3", + "@tailwindcss/oxide-win32-arm64-msvc": "4.3.3", + "@tailwindcss/oxide-win32-x64-msvc": "4.3.3" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.3.tgz", + "integrity": "sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.3.tgz", + "integrity": "sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.3.tgz", + "integrity": "sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.3.tgz", + "integrity": "sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.3.tgz", + "integrity": "sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.3.tgz", + "integrity": "sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.3.tgz", + "integrity": "sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.3.tgz", + "integrity": "sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.3.tgz", + "integrity": "sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.3.tgz", + "integrity": "sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.11.1", + "@emnapi/runtime": "^1.11.1", + "@emnapi/wasi-threads": "^1.2.2", + "@napi-rs/wasm-runtime": "^1.1.4", + "@tybys/wasm-util": "^0.10.2", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.3.tgz", + "integrity": "sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.3.tgz", + "integrity": "sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/postcss": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/postcss/-/postcss-4.3.3.tgz", + "integrity": "sha512-JTSZZGQi1AyKirbLN3azmjVzef92tcX7h+iSqPdaeStyFpGpDlKvvpxeOE8njhbUanbRwr3z8DyzhICWnMtQeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@alloc/quick-lru": "^5.2.0", + "@tailwindcss/node": "4.3.3", + "@tailwindcss/oxide": "4.3.3", + "postcss": "^8.5.16", + "tailwindcss": "4.3.3" + } + }, + "node_modules/@types/d3-array": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz", + "integrity": "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==", + "license": "MIT" + }, + "node_modules/@types/d3-color": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz", + "integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==", + "license": "MIT" + }, + "node_modules/@types/d3-ease": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz", + "integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==", + "license": "MIT" + }, + "node_modules/@types/d3-interpolate": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz", + "integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==", + "license": "MIT", + "dependencies": { + "@types/d3-color": "*" + } + }, + "node_modules/@types/d3-path": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz", + "integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==", + "license": "MIT" + }, + "node_modules/@types/d3-scale": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.9.tgz", + "integrity": "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==", + "license": "MIT", + "dependencies": { + "@types/d3-time": "*" + } + }, + "node_modules/@types/d3-shape": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.8.tgz", + "integrity": "sha512-lae0iWfcDeR7qt7rA88BNiqdvPS5pFVPpo5OfjElwNaT2yyekbM0C9vK+yqBqEmHr6lDkRnYNoTBYlAgJa7a4w==", + "license": "MIT", + "dependencies": { + "@types/d3-path": "*" + } + }, + "node_modules/@types/d3-time": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz", + "integrity": "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==", + "license": "MIT" + }, + "node_modules/@types/d3-timer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz", + "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==", + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.20.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.1.tgz", + "integrity": "sha512-EANqOCF9QFyra+4pfxUcX9STKJpCLjMbObVzljIJomAWSnuSIEAvyzEU53GaajbXJEgdh0iEcPL+DGvpUd4k1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@types/react": { + "version": "19.2.17", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.17.tgz", + "integrity": "sha512-MXfmqaVPEVgkBT/aY0aGCkRWWtByiYQXo3xdQ8r5RzuFrPiRn8Gar2tQdXSUQ2GKV3bkXckek89V8wQBY2Q/Aw==", + "dev": true, + "license": "MIT", + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "19.2.3", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz", + "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^19.2.0" + } + }, + "node_modules/aws-ssl-profiles": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/aws-ssl-profiles/-/aws-ssl-profiles-1.1.2.tgz", + "integrity": "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/better-sqlite3": { + "version": "11.10.0", + "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-11.10.0.tgz", + "integrity": "sha512-EwhOpyXiOEL/lKzHz9AW1msWFNzGc/z+LzeB3/jnFJpxu+th2yqvzsSWas1v9jgs9+xiXJcD5A8CJxAG2TaghQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "bindings": "^1.5.0", + "prebuild-install": "^7.1.1" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, + "node_modules/c12": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/c12/-/c12-3.1.0.tgz", + "integrity": "sha512-uWoS8OU1MEIsOv8p/5a82c3H31LsWVR5qiyXVfBNOzfffjUWtPnhAb4BYI2uG2HfGmZmFjCtui5XNWaps+iFuw==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "chokidar": "^4.0.3", + "confbox": "^0.2.2", + "defu": "^6.1.4", + "dotenv": "^16.6.1", + "exsolve": "^1.0.7", + "giget": "^2.0.0", + "jiti": "^2.4.2", + "ohash": "^2.0.11", + "pathe": "^2.0.3", + "perfect-debounce": "^1.0.0", + "pkg-types": "^2.2.0", + "rc9": "^2.1.2" + }, + "peerDependencies": { + "magicast": "^0.3.5" + }, + "peerDependenciesMeta": { + "magicast": { + "optional": true + } + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001806", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001806.tgz", + "integrity": "sha512-72Cuvd95zbSYPKq6Fhg8eDJRlzgWDf7/mtoZv6Qe/DYNCEBdNxoA3+rZAU2ZhGCpZlns3EssFavaZomckT5Uuw==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true, + "license": "ISC" + }, + "node_modules/citty": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz", + "integrity": "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "consola": "^3.2.3" + } + }, + "node_modules/client-only": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", + "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==", + "license": "MIT" + }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "license": "MIT", + "optional": true, + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT", + "optional": true + }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "license": "MIT", + "optional": true, + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/confbox": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.2.4.tgz", + "integrity": "sha512-ysOGlgTFbN2/Y6Cg3Iye8YKulHw+R2fNXHrgSmXISQdMnomY6eNDprVdW9R5xBguEqI954+S6709UyiO7B+6OQ==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/consola": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", + "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "license": "MIT" + }, + "node_modules/d3-array": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", + "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", + "license": "ISC", + "dependencies": { + "internmap": "1 - 2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-ease": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", + "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-format": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.2.tgz", + "integrity": "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", + "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-scale": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", + "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", + "license": "ISC", + "dependencies": { + "d3-array": "2.10.0 - 3", + "d3-format": "1 - 3", + "d3-interpolate": "1.2.0 - 3", + "d3-time": "2.1.1 - 3", + "d3-time-format": "2 - 4" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-shape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", + "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", + "license": "ISC", + "dependencies": { + "d3-path": "^3.1.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", + "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", + "license": "ISC", + "dependencies": { + "d3-array": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time-format": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", + "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", + "license": "ISC", + "dependencies": { + "d3-time": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-timer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", + "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/decimal.js-light": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/decimal.js-light/-/decimal.js-light-2.5.1.tgz", + "integrity": "sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==", + "license": "MIT" + }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/deepmerge-ts": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-7.1.5.tgz", + "integrity": "sha512-HOJkrhaYsweh+W+e74Yn7YStZOilkoPb6fycpwNLKzSPtruFs48nYis0zy5yJz1+ktUhHxoRDJ27RQAWLIJVJw==", + "devOptional": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/defu": { + "version": "6.1.7", + "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.7.tgz", + "integrity": "sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/denque": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/destr": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.5.tgz", + "integrity": "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "devOptional": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, + "node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "devOptional": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/effect": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/effect/-/effect-3.21.0.tgz", + "integrity": "sha512-PPN80qRokCd1f015IANNhrwOnLO7GrrMQfk4/lnZRE/8j7UPWrNNjPV0uBrZutI/nHzernbW+J0hdqQysHiSnQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.0.0", + "fast-check": "^3.23.1" + } + }, + "node_modules/empathic": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/empathic/-/empathic-2.0.0.tgz", + "integrity": "sha512-i6UzDscO/XfAcNYD75CfICkmfLedpyPDdozrLMmQc5ORaQcdMoc21OnlEylMIqI7U8eniKrPMxxtj8k0vhmJhA==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.24.3", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.24.3.tgz", + "integrity": "sha512-PwKooW9JUzh5chmYfHM3IQl5OkK2u2Nm011MgeZrss3JmFraUx/fqrf78kk8GUMYoibx/14MdwTl/1WKkG7TpQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/esbuild": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz", + "integrity": "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.1", + "@esbuild/android-arm": "0.28.1", + "@esbuild/android-arm64": "0.28.1", + "@esbuild/android-x64": "0.28.1", + "@esbuild/darwin-arm64": "0.28.1", + "@esbuild/darwin-x64": "0.28.1", + "@esbuild/freebsd-arm64": "0.28.1", + "@esbuild/freebsd-x64": "0.28.1", + "@esbuild/linux-arm": "0.28.1", + "@esbuild/linux-arm64": "0.28.1", + "@esbuild/linux-ia32": "0.28.1", + "@esbuild/linux-loong64": "0.28.1", + "@esbuild/linux-mips64el": "0.28.1", + "@esbuild/linux-ppc64": "0.28.1", + "@esbuild/linux-riscv64": "0.28.1", + "@esbuild/linux-s390x": "0.28.1", + "@esbuild/linux-x64": "0.28.1", + "@esbuild/netbsd-arm64": "0.28.1", + "@esbuild/netbsd-x64": "0.28.1", + "@esbuild/openbsd-arm64": "0.28.1", + "@esbuild/openbsd-x64": "0.28.1", + "@esbuild/openharmony-arm64": "0.28.1", + "@esbuild/sunos-x64": "0.28.1", + "@esbuild/win32-arm64": "0.28.1", + "@esbuild/win32-ia32": "0.28.1", + "@esbuild/win32-x64": "0.28.1" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "license": "MIT" + }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "dev": true, + "license": "(MIT OR WTFPL)", + "engines": { + "node": ">=6" + } + }, + "node_modules/exsolve": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.1.0.tgz", + "integrity": "sha512-D+42+T12DdIlJM3uepa55qGiL3sYdLBOxIl2ifQCzCHz4c7eiolaHsi3BIqEr7JxBzxv2pYZQX9kw16ziMcEmw==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/fast-check": { + "version": "3.23.2", + "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-3.23.2.tgz", + "integrity": "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A==", + "devOptional": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT", + "dependencies": { + "pure-rand": "^6.1.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/fast-equals": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.4.1.tgz", + "integrity": "sha512-DjlFSM5Pk9cGcL0q5QXl66eGzx0N6szNgaswwc5ZphlBohjTVJSnGgI+rJVOgOi65qUoQnDZN4nDqi33udtydQ==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true, + "license": "MIT" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/generate-function": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-property": "^1.0.2" + } + }, + "node_modules/giget": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/giget/-/giget-2.0.0.tgz", + "integrity": "sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.4.0", + "defu": "^6.1.4", + "node-fetch-native": "^1.6.6", + "nypm": "^0.6.0", + "pathe": "^2.0.3" + }, + "bin": { + "giget": "dist/cli.mjs" + } + }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", + "dev": true, + "license": "MIT" + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/iconv-lite": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.3.tgz", + "integrity": "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true, + "license": "ISC" + }, + "node_modules/internmap": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", + "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/is-arrayish": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.4.tgz", + "integrity": "sha512-m6UrgzFVUYawGBh1dUsWR5M2Clqic9RVXC/9f8ceNlv2IcO9j9J/z8UoCLPqtsPBFNzEpfR3xftohbfqDx8EQA==", + "license": "MIT", + "optional": true + }, + "node_modules/is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==", + "dev": true, + "license": "MIT" + }, + "node_modules/jiti": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", + "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==", + "devOptional": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/jose": { + "version": "6.2.5", + "resolved": "https://registry.npmjs.org/jose/-/jose-6.2.5.tgz", + "integrity": "sha512-2E5L2yRp03FnwreJLJX8/r7mHiZICCf8kG7fAsTWkSQTDAcc46NIZoQLKy+EJ8sPoJlxyS4OQR5H70LjIZZlIQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lodash": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", + "license": "MIT" + }, + "node_modules/long": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru.min": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lru.min/-/lru.min-1.1.4.tgz", + "integrity": "sha512-DqC6n3QQ77zdFpCMASA1a3Jlb64Hv2N2DciFGkO/4L9+q/IpIAuRlKOvCXabtRW6cQf8usbmM6BE/TOPysCdIA==", + "dev": true, + "license": "MIT", + "engines": { + "bun": ">=1.0.0", + "deno": ">=1.30.0", + "node": ">=8.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wellwelwel" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true, + "license": "MIT" + }, + "node_modules/mysql2": { + "version": "3.23.2", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.23.2.tgz", + "integrity": "sha512-fxh3HpQ8vJtu/Mmnd4Xsur19jGjHGzRLMxptiDtOkbX7EVBgnafGSGDx1WGGVmJLClVh2LeeBMMo24IFv8wCyQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "aws-ssl-profiles": "^1.1.2", + "denque": "^2.1.0", + "generate-function": "^2.3.1", + "iconv-lite": "^0.7.2", + "long": "^5.3.2", + "lru.min": "^1.1.4", + "named-placeholders": "^1.1.6", + "sql-escaper": "^1.5.1" + }, + "engines": { + "node": ">= 8.0" + }, + "peerDependencies": { + "@types/node": ">= 8" + } + }, + "node_modules/named-placeholders": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.6.tgz", + "integrity": "sha512-Tz09sEL2EEuv5fFowm419c1+a/jSMiBjI9gHxVLrVdbUkkNUUfjsVYs9pVZu5oCon/kmRh9TfLEObFtkVxmY0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "lru.min": "^1.1.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.16", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz", + "integrity": "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/napi-build-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz", + "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/next": { + "version": "15.1.4", + "resolved": "https://registry.npmjs.org/next/-/next-15.1.4.tgz", + "integrity": "sha512-mTaq9dwaSuwwOrcu3ebjDYObekkxRnXpuVL21zotM8qE2W0HBOdVIdg2Li9QjMEZrj73LN96LcWcz62V19FjAg==", + "deprecated": "This version has a security vulnerability. Please upgrade to a patched version. See https://nextjs.org/blog/CVE-2025-66478 for more details.", + "license": "MIT", + "dependencies": { + "@next/env": "15.1.4", + "@swc/counter": "0.1.3", + "@swc/helpers": "0.5.15", + "busboy": "1.6.0", + "caniuse-lite": "^1.0.30001579", + "postcss": "8.4.31", + "styled-jsx": "5.1.6" + }, + "bin": { + "next": "dist/bin/next" + }, + "engines": { + "node": "^18.18.0 || ^19.8.0 || >= 20.0.0" + }, + "optionalDependencies": { + "@next/swc-darwin-arm64": "15.1.4", + "@next/swc-darwin-x64": "15.1.4", + "@next/swc-linux-arm64-gnu": "15.1.4", + "@next/swc-linux-arm64-musl": "15.1.4", + "@next/swc-linux-x64-gnu": "15.1.4", + "@next/swc-linux-x64-musl": "15.1.4", + "@next/swc-win32-arm64-msvc": "15.1.4", + "@next/swc-win32-x64-msvc": "15.1.4", + "sharp": "^0.33.5" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.1.0", + "@playwright/test": "^1.41.2", + "babel-plugin-react-compiler": "*", + "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", + "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", + "sass": "^1.3.0" + }, + "peerDependenciesMeta": { + "@opentelemetry/api": { + "optional": true + }, + "@playwright/test": { + "optional": true + }, + "babel-plugin-react-compiler": { + "optional": true + }, + "sass": { + "optional": true + } + } + }, + "node_modules/next-auth": { + "version": "5.0.0-beta.32", + "resolved": "https://registry.npmjs.org/next-auth/-/next-auth-5.0.0-beta.32.tgz", + "integrity": "sha512-CGlChIEWZ6LltNVxrE5yiySMID+Idpmry47JYA5lLwgD8Sx02a8M65VL0TWVz9nbnOioS/tCW/rP/0+mE7Qp4Q==", + "license": "ISC", + "dependencies": { + "@auth/core": "0.41.3" + }, + "peerDependencies": { + "@simplewebauthn/browser": "^9.0.1", + "@simplewebauthn/server": "^9.0.2", + "next": "^14.0.0-0 || ^15.0.0 || ^16.0.0", + "nodemailer": "^7.0.7 || ^8.0.5", + "react": "^18.2.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@simplewebauthn/browser": { + "optional": true + }, + "@simplewebauthn/server": { + "optional": true + }, + "nodemailer": { + "optional": true + } + } + }, + "node_modules/next/node_modules/postcss": { + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.6", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/node-abi": { + "version": "3.94.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.94.0.tgz", + "integrity": "sha512-W5ZNO5KRPB5TkYmGVD9F6YqhsglXJzE6etpbmT+f6EQElhiX/UTG551cnsRGvLG3fyZEg9HwaDmNmj5nwJ4z9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-fetch-native": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.7.tgz", + "integrity": "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/nypm": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/nypm/-/nypm-0.6.8.tgz", + "integrity": "sha512-Q9K4Diu6l5u6xJQogeFSs/zKtyMSgFKFtRQV+tHP4kL7KPm2grpBU0dFIwFaXwNxN0MtfKWc43VpCugAa+LPsw==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "citty": "^0.2.2", + "pathe": "^2.0.3", + "tinyexec": "^1.2.4" + }, + "bin": { + "nypm": "dist/cli.mjs" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/nypm/node_modules/citty": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/citty/-/citty-0.2.2.tgz", + "integrity": "sha512-+6vJA3L98yv+IdfKGZHBNiGW5KHn22e/JwID0Strsz8h4S/csAu/OuICwxrg44k5MRiZHWIo8XXuJgQTriRP4w==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/oauth4webapi": { + "version": "3.8.6", + "resolved": "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-3.8.6.tgz", + "integrity": "sha512-iwemM91xz8nryHti2yTmg5fhyEMVOkOXwHNqbvcATjyajb5oQxCQzrNOA6uElRHuMhQQTKUyFKV9y/CNyg25BQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ohash": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/ohash/-/ohash-2.0.11.tgz", + "integrity": "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/perfect-debounce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz", + "integrity": "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, + "node_modules/pkg-types": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.3.1.tgz", + "integrity": "sha512-y+ichcgc2LrADuhLNAx8DFjVfgz91pRxfZdI3UDhxHvcVEZsenLO+7XaU5vOp0u/7V/wZ+plyuQxtrDlZJ+yeg==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "confbox": "^0.2.4", + "exsolve": "^1.0.8", + "pathe": "^2.0.3" + } + }, + "node_modules/postcss": { + "version": "8.5.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.23.tgz", + "integrity": "sha512-g50586zr4bZmwFiTlflMu8E0bDTb5I5gertgwAKmsdUlTQIhZtunzUlD1WSzwcVWPoAVpsrA6vlfCD7oXvRwgg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.16", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/preact": { + "version": "10.24.3", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.24.3.tgz", + "integrity": "sha512-Z2dPnBnMUfyQfSQ+GBdsGa16hz35YmLmtTLhM169uW944hYL6xzTYkJjC07j+Wosz733pMWx0fgON3JNw1jJQA==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + } + }, + "node_modules/preact-render-to-string": { + "version": "6.5.11", + "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-6.5.11.tgz", + "integrity": "sha512-ubnauqoGczeGISiOh6RjX0/cdaF8v/oDXIjO85XALCQjwQP+SB4RDXXtvZ6yTYSjG+PC1QRP2AhPgCEsM2EvUw==", + "license": "MIT", + "peerDependencies": { + "preact": ">=10" + } + }, + "node_modules/prebuild-install": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz", + "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==", + "deprecated": "No longer maintained. Please contact the author of the relevant native addon; alternatives are available.", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^2.0.0", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/prisma": { + "version": "6.19.3", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-6.19.3.tgz", + "integrity": "sha512-++ZJ0ijLrDJF6hNB4t4uxg2br3fC4H9Yc9tcbjr2fcNFP3rh/SBNrAgjhsqBU4Ght8JPrVofG/ZkXfnSfnYsFg==", + "devOptional": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/config": "6.19.3", + "@prisma/engines": "6.19.3" + }, + "bin": { + "prisma": "build/index.js" + }, + "engines": { + "node": ">=18.18" + }, + "peerDependencies": { + "typescript": ">=5.1.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/prop-types/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "license": "MIT" + }, + "node_modules/pump": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz", + "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "devOptional": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/rc9": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/rc9/-/rc9-2.1.2.tgz", + "integrity": "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "defu": "^6.1.4", + "destr": "^2.0.3" + } + }, + "node_modules/react": { + "version": "19.2.8", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.8.tgz", + "integrity": "sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.2.8", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.8.tgz", + "integrity": "sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.27.0" + }, + "peerDependencies": { + "react": "^19.2.8" + } + }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "license": "MIT" + }, + "node_modules/react-smooth": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/react-smooth/-/react-smooth-4.0.4.tgz", + "integrity": "sha512-gnGKTpYwqL0Iii09gHobNolvX4Kiq4PKx6eWBCYYix+8cdw+cGo3do906l1NBPKkSWx1DghC1dlWG9L2uGd61Q==", + "license": "MIT", + "dependencies": { + "fast-equals": "^5.0.1", + "prop-types": "^15.8.1", + "react-transition-group": "^4.4.5" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "license": "BSD-3-Clause", + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/recharts": { + "version": "2.15.4", + "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.15.4.tgz", + "integrity": "sha512-UT/q6fwS3c1dHbXv2uFgYJ9BMFHu3fwnd7AYZaEQhXuYQ4hgsxLvsUXzGdKeZrW5xopzDCvuA2N41WJ88I7zIw==", + "deprecated": "1.x and 2.x branches are no longer active. Bump to Recharts v3 to receive latest features and bugfixes. See https://github.com/recharts/recharts/wiki/3.0-migration-guide", + "license": "MIT", + "dependencies": { + "clsx": "^2.0.0", + "eventemitter3": "^4.0.1", + "lodash": "^4.17.21", + "react-is": "^18.3.1", + "react-smooth": "^4.0.4", + "recharts-scale": "^0.4.4", + "tiny-invariant": "^1.3.1", + "victory-vendor": "^36.6.8" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/recharts-scale": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/recharts-scale/-/recharts-scale-0.4.5.tgz", + "integrity": "sha512-kivNFO+0OcUNu7jQquLXAxz1FIwZj8nrj+YkOKc5694NbjCvcT6aSZiIzNzd2Kul4o4rTto8QVR9lMNtxD4G1w==", + "license": "MIT", + "dependencies": { + "decimal.js-light": "^2.4.1" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/scheduler": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "devOptional": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/sharp": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz", + "integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==", + "hasInstallScript": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "color": "^4.2.3", + "detect-libc": "^2.0.3", + "semver": "^7.6.3" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "0.33.5", + "@img/sharp-darwin-x64": "0.33.5", + "@img/sharp-libvips-darwin-arm64": "1.0.4", + "@img/sharp-libvips-darwin-x64": "1.0.4", + "@img/sharp-libvips-linux-arm": "1.0.5", + "@img/sharp-libvips-linux-arm64": "1.0.4", + "@img/sharp-libvips-linux-s390x": "1.0.4", + "@img/sharp-libvips-linux-x64": "1.0.4", + "@img/sharp-libvips-linuxmusl-arm64": "1.0.4", + "@img/sharp-libvips-linuxmusl-x64": "1.0.4", + "@img/sharp-linux-arm": "0.33.5", + "@img/sharp-linux-arm64": "0.33.5", + "@img/sharp-linux-s390x": "0.33.5", + "@img/sharp-linux-x64": "0.33.5", + "@img/sharp-linuxmusl-arm64": "0.33.5", + "@img/sharp-linuxmusl-x64": "0.33.5", + "@img/sharp-wasm32": "0.33.5", + "@img/sharp-win32-ia32": "0.33.5", + "@img/sharp-win32-x64": "0.33.5" + } + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/simple-swizzle": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.4.tgz", + "integrity": "sha512-nAu1WFPQSMNr2Zn9PGSZK9AGn4t/y97lEm+MXTtUDwfP0ksAIX4nO+6ruD9Jwut4C49SB1Ws+fbXsm/yScWOHw==", + "license": "MIT", + "optional": true, + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sql-escaper": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/sql-escaper/-/sql-escaper-1.5.1.tgz", + "integrity": "sha512-4toX5E1fQbBrpfXidaHnF0669nkAdETeIPTs2SUjxxD7RRIs9ICG4gtpmfc68JCEKehsdwLFqBu9VlQqZ1P1gg==", + "dev": true, + "license": "MIT", + "engines": { + "bun": ">=1.0.0", + "deno": ">=2.0.0", + "node": ">=12.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/mysqljs/sql-escaper?sponsor=1" + } + }, + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/styled-jsx": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.6.tgz", + "integrity": "sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==", + "license": "MIT", + "dependencies": { + "client-only": "0.0.1" + }, + "engines": { + "node": ">= 12.0.0" + }, + "peerDependencies": { + "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/tailwindcss": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.3.tgz", + "integrity": "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", + "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/tar-fs": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.5.tgz", + "integrity": "sha512-OboTd8mmMhZDNPV+UjQcK9yKAatXu2aJ+r1w4im1Otd4M4fl2hwvdoXUxIYHFTHWK/3y3FarBP70v3vwmGlOxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tiny-invariant": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", + "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==", + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.2.4.tgz", + "integrity": "sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/tsx": { + "version": "4.23.1", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.23.1.tgz", + "integrity": "sha512-GQHnkIfxyx1wYCOS/wonik5MVRZU9hi1TEZmzGZSCJB1y9YgoZ8H6itNE/u4suE+yLmOzuE4E5S4TZ/ZX2wcWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.28.0" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "devOptional": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/victory-vendor": { + "version": "36.9.2", + "resolved": "https://registry.npmjs.org/victory-vendor/-/victory-vendor-36.9.2.tgz", + "integrity": "sha512-PnpQQMuxlwYdocC8fIJqVXvkeViHYzotI+NJrCuav0ZYFoq912ZHBk3mCeuj+5/VpodOjPe1z0Fk2ihgzlXqjQ==", + "license": "MIT AND ISC", + "dependencies": { + "@types/d3-array": "^3.0.3", + "@types/d3-ease": "^3.0.0", + "@types/d3-interpolate": "^3.0.1", + "@types/d3-scale": "^4.0.2", + "@types/d3-shape": "^3.1.0", + "@types/d3-time": "^3.0.0", + "@types/d3-timer": "^3.0.0", + "d3-array": "^3.1.6", + "d3-ease": "^3.0.1", + "d3-interpolate": "^3.0.1", + "d3-scale": "^4.0.2", + "d3-shape": "^3.1.0", + "d3-time": "^3.0.0", + "d3-timer": "^3.0.1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..f538b62 --- /dev/null +++ b/package.json @@ -0,0 +1,39 @@ +{ + "name": "it_cost_dashboard", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "prisma generate && next build", + "start": "next start", + "lint": "next lint", + "seed": "tsx prisma/seed.ts", + "build:prod": "prisma generate --schema=prisma/prod/schema.prisma && next build", + "prod:generate": "prisma generate --schema=prisma/prod/schema.prisma", + "prod:migrate": "prisma migrate deploy --schema=prisma/prod/schema.prisma", + "migrate:data": "tsx scripts/migrate-dev-data-to-rds.ts" + }, + "prisma": { + "seed": "tsx prisma/seed.ts" + }, + "dependencies": { + "@prisma/client": "^6.1.0", + "next": "15.1.4", + "next-auth": "^5.0.0-beta.32", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "recharts": "^2.15.0" + }, + "devDependencies": { + "@tailwindcss/postcss": "^4.0.0", + "@types/node": "^22.10.5", + "@types/react": "^19.0.4", + "@types/react-dom": "^19.0.2", + "better-sqlite3": "^11.8.1", + "mysql2": "^3.12.0", + "prisma": "^6.1.0", + "tailwindcss": "^4.0.0", + "tsx": "^4.19.2", + "typescript": "^5.7.3" + } +} diff --git a/postcss.config.mjs b/postcss.config.mjs new file mode 100644 index 0000000..61e3684 --- /dev/null +++ b/postcss.config.mjs @@ -0,0 +1,7 @@ +const config = { + plugins: { + "@tailwindcss/postcss": {}, + }, +}; + +export default config; diff --git a/prisma/migrations/20260727071056_init/migration.sql b/prisma/migrations/20260727071056_init/migration.sql new file mode 100644 index 0000000..ab17fa2 --- /dev/null +++ b/prisma/migrations/20260727071056_init/migration.sql @@ -0,0 +1,35 @@ +-- CreateTable +CREATE TABLE "CostItem" ( + "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + "name" TEXT NOT NULL, + "region" TEXT NOT NULL, + "year" INTEGER NOT NULL, + "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" DATETIME NOT NULL +); + +-- CreateTable +CREATE TABLE "SubCostItem" ( + "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + "name" TEXT NOT NULL, + "subCost" REAL NOT NULL, + "costItemId" INTEGER NOT NULL, + CONSTRAINT "SubCostItem_costItemId_fkey" FOREIGN KEY ("costItemId") REFERENCES "CostItem" ("id") ON DELETE CASCADE ON UPDATE CASCADE +); + +-- CreateTable +CREATE TABLE "TrendAiPercentage" ( + "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + "region" TEXT NOT NULL, + "year" INTEGER NOT NULL, + "percentage" REAL NOT NULL +); + +-- CreateIndex +CREATE INDEX "CostItem_region_year_idx" ON "CostItem"("region", "year"); + +-- CreateIndex +CREATE INDEX "SubCostItem_costItemId_idx" ON "SubCostItem"("costItemId"); + +-- CreateIndex +CREATE UNIQUE INDEX "TrendAiPercentage_region_year_key" ON "TrendAiPercentage"("region", "year"); diff --git a/prisma/migrations/20260727093759_add_year/migration.sql b/prisma/migrations/20260727093759_add_year/migration.sql new file mode 100644 index 0000000..09fc099 --- /dev/null +++ b/prisma/migrations/20260727093759_add_year/migration.sql @@ -0,0 +1,4 @@ +-- CreateTable +CREATE TABLE "Year" ( + "year" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT +); diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml new file mode 100644 index 0000000..2a5a444 --- /dev/null +++ b/prisma/migrations/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (e.g., Git) +provider = "sqlite" diff --git a/prisma/prod/migrations/20260729000000_init/migration.sql b/prisma/prod/migrations/20260729000000_init/migration.sql new file mode 100644 index 0000000..6486121 --- /dev/null +++ b/prisma/prod/migrations/20260729000000_init/migration.sql @@ -0,0 +1,44 @@ +-- CreateTable +CREATE TABLE `CostItem` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `name` VARCHAR(191) NOT NULL, + `region` VARCHAR(191) NOT NULL, + `year` INTEGER NOT NULL, + `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `updatedAt` DATETIME(3) NOT NULL, + + INDEX `CostItem_region_year_idx`(`region`, `year`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `SubCostItem` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `name` VARCHAR(191) NOT NULL, + `subCost` DOUBLE NOT NULL, + `costItemId` INTEGER NOT NULL, + + INDEX `SubCostItem_costItemId_idx`(`costItemId`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `TrendAiPercentage` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `region` VARCHAR(191) NOT NULL, + `year` INTEGER NOT NULL, + `percentage` DOUBLE NOT NULL, + + UNIQUE INDEX `TrendAiPercentage_region_year_key`(`region`, `year`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Year` ( + `year` INTEGER NOT NULL, + + PRIMARY KEY (`year`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- AddForeignKey +ALTER TABLE `SubCostItem` ADD CONSTRAINT `SubCostItem_costItemId_fkey` FOREIGN KEY (`costItemId`) REFERENCES `CostItem`(`id`) ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/prisma/prod/migrations/migration_lock.toml b/prisma/prod/migrations/migration_lock.toml new file mode 100644 index 0000000..592fc0b --- /dev/null +++ b/prisma/prod/migrations/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (e.g., Git) +provider = "mysql" diff --git a/prisma/prod/schema.prisma b/prisma/prod/schema.prisma new file mode 100644 index 0000000..8767b53 --- /dev/null +++ b/prisma/prod/schema.prisma @@ -0,0 +1,61 @@ +// Production Prisma schema for the IT Cost Dashboard (MySQL / AWS RDS). +// +// This mirrors prisma/schema.prisma exactly except the datasource provider is +// "mysql". Prisma does NOT support env() for the `provider` field, so dev +// (SQLite) and prod (MySQL) each need their own schema file + migrations. +// +// Usage on the production EC2 box (see DEPLOY.md): +// npm run prod:generate # prisma generate --schema=prisma/prod/schema.prisma +// npm run prod:migrate # prisma migrate deploy --schema=prisma/prod/schema.prisma +// npm run build:prod +datasource db { + provider = "mysql" + url = env("DATABASE_URL") +} + +generator client { + provider = "prisma-client-js" +} + +// One row per (name, region, year). e.g. "Cloud Hosting" in AMEA IT 2026 is a +// distinct row from "Cloud Hosting" in EMEA IT 2026. Cost is never stored — it is +// always derived as SUM(subItems.subCost). +model CostItem { + id Int @id @default(autoincrement()) + name String + region String + year Int + subItems SubCostItem[] + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + @@index([region, year]) +} + +model SubCostItem { + id Int @id @default(autoincrement()) + name String + subCost Float + costItem CostItem @relation(fields: [costItemId], references: [id], onDelete: Cascade) + costItemId Int + + @@index([costItemId]) +} + +// The TrendAI percentage that splits each item's Cost into TrendAI vs TrendLife +// for a given region+year. Applies uniformly to all items in that region+year. +model TrendAiPercentage { + id Int @id @default(autoincrement()) + region String + year Int + percentage Float + + @@unique([region, year]) +} + +// The set of years available for selection across the app. Managed on the Year +// Creation page. Cost items reference years by value (not FK) so a year can exist +// with no cost data yet. +model Year { + year Int @id +} diff --git a/prisma/schema.prisma b/prisma/schema.prisma new file mode 100644 index 0000000..0cf7495 --- /dev/null +++ b/prisma/schema.prisma @@ -0,0 +1,58 @@ +// Prisma schema for the IT Cost Dashboard. +// +// Datasource provider is hardcoded to "sqlite" for local dev because Prisma does +// NOT support env() for the `provider` field (only for `url`). Production on RDS +// uses a separate MySQL schema at prisma/prod/schema.prisma with its own +// migration history in prisma/prod/migrations (see DEPLOY.md). Keep the two +// schemas' models in sync. +datasource db { + provider = "sqlite" + url = env("DATABASE_URL") +} + +generator client { + provider = "prisma-client-js" +} + +// One row per (name, region, year). e.g. "Cloud Hosting" in AMEA IT 2026 is a +// distinct row from "Cloud Hosting" in EMEA IT 2026. Cost is never stored — it is +// always derived as SUM(subItems.subCost). +model CostItem { + id Int @id @default(autoincrement()) + name String + region String + year Int + subItems SubCostItem[] + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + @@index([region, year]) +} + +model SubCostItem { + id Int @id @default(autoincrement()) + name String + subCost Float + costItem CostItem @relation(fields: [costItemId], references: [id], onDelete: Cascade) + costItemId Int + + @@index([costItemId]) +} + +// The TrendAI percentage that splits each item's Cost into TrendAI vs TrendLife +// for a given region+year. Applies uniformly to all items in that region+year. +model TrendAiPercentage { + id Int @id @default(autoincrement()) + region String + year Int + percentage Float + + @@unique([region, year]) +} + +// The set of years available for selection across the app. Managed on the Year +// Creation page. Cost items reference years by value (not FK) so a year can exist +// with no cost data yet. +model Year { + year Int @id +} diff --git a/prisma/seed.ts b/prisma/seed.ts new file mode 100644 index 0000000..ea8cda5 --- /dev/null +++ b/prisma/seed.ts @@ -0,0 +1,130 @@ +import { PrismaClient } from "@prisma/client"; + +const prisma = new PrismaClient(); + +const REGIONS = ["AMEA IT", "EMEA IT", "NABU IT", "PH IT", "JP IT"] as const; +const YEARS = [2022, 2023, 2024, 2025, 2026]; + +// Cost item catalog. Each item defines its sub-cost line names and a base cost +// per sub-item. Actual seeded sub-costs scale by region + year (below). +const ITEMS: { name: string; subs: { name: string; base: number }[] }[] = [ + { + name: "Cloud Hosting", + subs: [ + { name: "Compute (VMs)", base: 40000 }, + { name: "Storage", base: 18000 }, + { name: "Networking / Egress", base: 9000 }, + ], + }, + { + name: "Software Licenses", + subs: [ + { name: "Productivity Suite", base: 22000 }, + { name: "Design Tools", base: 8000 }, + ], + }, + { + name: "Security Tools", + subs: [ + { name: "Endpoint Protection", base: 15000 }, + { name: "SIEM", base: 20000 }, + { name: "Vulnerability Scanning", base: 6000 }, + ], + }, + { + name: "Support & Maintenance", + subs: [{ name: "Vendor Support Contract", base: 30000 }], + }, + { + name: "Network Infra", + subs: [ + { name: "Circuits / Bandwidth", base: 25000 }, + { name: "Hardware Refresh", base: 12000 }, + ], + }, +]; + +// Region weighting so regions differ in magnitude (NABU largest, PH smallest). +const REGION_WEIGHT: Record = { + "NABU IT": 1.4, + "EMEA IT": 1.2, + "AMEA IT": 1.0, + "JP IT": 0.9, + "PH IT": 0.7, +}; + +// TrendAI percentage per region grows over the years (AI adoption ramp). +// Value at year Y for a region = base + (Y-2022)*step, clamped. +const REGION_AI: Record = { + "NABU IT": { base: 12, step: 6 }, + "EMEA IT": { base: 10, step: 5 }, + "AMEA IT": { base: 8, step: 5 }, + "JP IT": { base: 15, step: 4 }, + "PH IT": { base: 6, step: 4 }, +}; + +function yearFactor(year: number): number { + // Costs grow ~8%/yr off a 2022 base. + return Math.pow(1.08, year - 2022); +} + +async function main() { + console.log("Clearing existing data..."); + await prisma.subCostItem.deleteMany(); + await prisma.costItem.deleteMany(); + await prisma.trendAiPercentage.deleteMany(); + await prisma.year.deleteMany(); + + console.log("Seeding years..."); + for (const year of YEARS) { + await prisma.year.create({ data: { year } }); + } + + console.log("Seeding cost items + sub-costs..."); + for (const region of REGIONS) { + const weight = REGION_WEIGHT[region]; + for (const year of YEARS) { + const yf = yearFactor(year); + for (const item of ITEMS) { + await prisma.costItem.create({ + data: { + name: item.name, + region, + year, + subItems: { + create: item.subs.map((s) => ({ + name: s.name, + subCost: Math.round((s.base * weight * yf) / 100) * 100, + })), + }, + }, + }); + } + } + } + + console.log("Seeding TrendAI percentages..."); + for (const region of REGIONS) { + const ai = REGION_AI[region]; + for (const year of YEARS) { + const pct = Math.min(60, ai.base + (year - 2022) * ai.step); + await prisma.trendAiPercentage.create({ + data: { region, year, percentage: pct }, + }); + } + } + + const items = await prisma.costItem.count(); + const subs = await prisma.subCostItem.count(); + const pcts = await prisma.trendAiPercentage.count(); + console.log(`Done. CostItems=${items}, SubCostItems=${subs}, TrendAiPercentage=${pcts}`); +} + +main() + .catch((e) => { + console.error(e); + process.exit(1); + }) + .finally(async () => { + await prisma.$disconnect(); + }); diff --git a/scripts/migrate-dev-data-to-rds.ts b/scripts/migrate-dev-data-to-rds.ts new file mode 100644 index 0000000..467039a --- /dev/null +++ b/scripts/migrate-dev-data-to-rds.ts @@ -0,0 +1,175 @@ +/** + * One-time data migration: copy rows from the local SQLite dev DB + * (prisma/dev.db) into the production MySQL/RDS database. + * + * WHY A STANDALONE SCRIPT (not two PrismaClients): the app generates + * @prisma/client to node_modules/.prisma/client from whichever schema was + * generated last (see DEPLOY.md — sqlite vs mysql client collision). Rather + * than juggling two generated clients, this script talks to both databases + * with plain drivers (better-sqlite3 + mysql2), so it can't clobber whatever + * client the app currently has generated. + * + * WHERE TO RUN THIS: the RDS instance is in a private subnet reachable only + * from the app EC2 host (per DEPLOY.md). Run this ON THE EC2 HOST, after + * copying prisma/dev.db there. + * + * PREREQS: + * 1. npm install better-sqlite3 mysql2 --save-dev (one-time) + * 2. Tables must already exist on RDS: + * set -a && source .env.production && set +a + * npm run prod:migrate + * 3. .env.production has the real DATABASE_URL (mysql://...) + * + * USAGE (from project root on the EC2 host): + * set -a && source .env.production && set +a + * npx tsx scripts/migrate-dev-data-to-rds.ts # migrate + * npx tsx scripts/migrate-dev-data-to-rds.ts --dry-run # preview only + * npx tsx scripts/migrate-dev-data-to-rds.ts --wipe # delete existing + * # prod rows first + * + * By default the script refuses to run if the destination tables are + * non-empty, to avoid double-importing. Pass --wipe to clear them first + * (CostItem/SubCostItem/TrendAiPercentage/Year only — nothing else is touched). + */ + +import Database from "better-sqlite3"; +import mysql from "mysql2/promise"; +import path from "node:path"; + +const DRY_RUN = process.argv.includes("--dry-run"); +const WIPE = process.argv.includes("--wipe"); + +const SQLITE_PATH = + process.env.DEV_SQLITE_PATH ?? path.join(__dirname, "..", "prisma", "dev.db"); + +async function main() { + const prodUrl = process.env.DATABASE_URL; + if (!prodUrl || !prodUrl.startsWith("mysql://")) { + throw new Error( + "DATABASE_URL is not set to a mysql:// URL. Did you `source .env.production` first?" + ); + } + + console.log(`Reading dev data from ${SQLITE_PATH}`); + const sqlite = new Database(SQLITE_PATH, { readonly: true }); + + const years = sqlite.prepare("SELECT year FROM Year").all() as { year: number }[]; + const costItems = sqlite + .prepare("SELECT id, name, region, year, createdAt, updatedAt FROM CostItem") + .all() as { + id: number; + name: string; + region: string; + year: number; + createdAt: string; + updatedAt: string; + }[]; + const subCostItems = sqlite + .prepare("SELECT id, name, subCost, costItemId FROM SubCostItem") + .all() as { id: number; name: string; subCost: number; costItemId: number }[]; + const trendAi = sqlite + .prepare("SELECT id, region, year, percentage FROM TrendAiPercentage") + .all() as { id: number; region: string; year: number; percentage: number }[]; + + sqlite.close(); + + console.log( + `Found: Year=${years.length}, CostItem=${costItems.length}, ` + + `SubCostItem=${subCostItems.length}, TrendAiPercentage=${trendAi.length}` + ); + + if (DRY_RUN) { + console.log("--dry-run set: not connecting to RDS. Done."); + return; + } + + const conn = await mysql.createConnection(prodUrl); + + try { + const [[{ c: yearCount }]]: any = await conn.query( + "SELECT COUNT(*) as c FROM `Year`" + ); + const [[{ c: itemCount }]]: any = await conn.query( + "SELECT COUNT(*) as c FROM `CostItem`" + ); + if ((yearCount > 0 || itemCount > 0) && !WIPE) { + throw new Error( + `Destination already has data (Year=${yearCount}, CostItem=${itemCount}). ` + + `Re-run with --wipe to clear existing rows first, or investigate before overwriting.` + ); + } + + await conn.beginTransaction(); + + if (WIPE) { + console.log("Wiping existing prod rows..."); + await conn.query("SET FOREIGN_KEY_CHECKS=0"); + await conn.query("DELETE FROM `SubCostItem`"); + await conn.query("DELETE FROM `CostItem`"); + await conn.query("DELETE FROM `TrendAiPercentage`"); + await conn.query("DELETE FROM `Year`"); + await conn.query("SET FOREIGN_KEY_CHECKS=1"); + } + + console.log("Inserting Year..."); + for (const y of years) { + await conn.query("INSERT INTO `Year` (year) VALUES (?)", [y.year]); + } + + console.log("Inserting CostItem..."); + for (const c of costItems) { + await conn.query( + "INSERT INTO `CostItem` (id, name, region, year, createdAt, updatedAt) VALUES (?, ?, ?, ?, ?, ?)", + [c.id, c.name, c.region, c.year, new Date(c.createdAt), new Date(c.updatedAt)] + ); + } + + console.log("Inserting SubCostItem..."); + for (const s of subCostItems) { + await conn.query( + "INSERT INTO `SubCostItem` (id, name, subCost, costItemId) VALUES (?, ?, ?, ?)", + [s.id, s.name, s.subCost, s.costItemId] + ); + } + + console.log("Inserting TrendAiPercentage..."); + for (const t of trendAi) { + await conn.query( + "INSERT INTO `TrendAiPercentage` (id, region, year, percentage) VALUES (?, ?, ?, ?)", + [t.id, t.region, t.year, t.percentage] + ); + } + + // Realign AUTO_INCREMENT counters so future inserts don't collide with + // the explicit ids we just wrote. + for (const table of ["CostItem", "SubCostItem", "TrendAiPercentage"]) { + const [[{ maxId }]]: any = await conn.query( + `SELECT COALESCE(MAX(id), 0) as maxId FROM \`${table}\`` + ); + await conn.query(`ALTER TABLE \`${table}\` AUTO_INCREMENT = ${maxId + 1}`); + } + + await conn.commit(); + + const [[{ c: finalItems }]]: any = await conn.query( + "SELECT COUNT(*) as c FROM `CostItem`" + ); + const [[{ c: finalSubs }]]: any = await conn.query( + "SELECT COUNT(*) as c FROM `SubCostItem`" + ); + console.log( + `Done. Committed. CostItem=${finalItems}, SubCostItem=${finalSubs} now in RDS.` + ); + } catch (err) { + await conn.rollback(); + console.error("Migration failed, rolled back:", err); + throw err; + } finally { + await conn.end(); + } +} + +main().catch((e) => { + console.error(e); + process.exit(1); +}); diff --git a/src/app/api/auth/[...nextauth]/route.ts b/src/app/api/auth/[...nextauth]/route.ts new file mode 100644 index 0000000..86c9f3d --- /dev/null +++ b/src/app/api/auth/[...nextauth]/route.ts @@ -0,0 +1,3 @@ +import { handlers } from "@/auth"; + +export const { GET, POST } = handlers; diff --git a/src/app/api/cost-items/delete/route.ts b/src/app/api/cost-items/delete/route.ts new file mode 100644 index 0000000..d372326 --- /dev/null +++ b/src/app/api/cost-items/delete/route.ts @@ -0,0 +1,32 @@ +import { NextRequest, NextResponse } from "next/server"; +import { prisma } from "@/lib/prisma"; +import { REGIONS, ALL_REGION, isRegion } from "@/lib/regions"; + +// POST /api/cost-items/delete { name, region, year } +// Deletes the cost item(s) matching name+year. When region = "All", remove every +// existing copy across regions (no warning if fewer than 5 exist). Cascades sub-costs. +export async function POST(req: NextRequest) { + const body = await req.json().catch(() => null); + const name = (body?.name ?? "").trim(); + const region = body?.region ?? ""; + const year = parseInt(String(body?.year), 10); + + if (!name) { + return NextResponse.json({ error: "name is required" }, { status: 400 }); + } + if (Number.isNaN(year)) { + return NextResponse.json({ error: "year is required" }, { status: 400 }); + } + + const targets = + region === ALL_REGION ? [...REGIONS] : isRegion(region) ? [region] : []; + if (targets.length === 0) { + return NextResponse.json({ error: "invalid region" }, { status: 400 }); + } + + const result = await prisma.costItem.deleteMany({ + where: { name, year, region: { in: targets } }, + }); + + return NextResponse.json({ deleted: result.count }); +} diff --git a/src/app/api/cost-items/route.ts b/src/app/api/cost-items/route.ts new file mode 100644 index 0000000..79a3cc5 --- /dev/null +++ b/src/app/api/cost-items/route.ts @@ -0,0 +1,64 @@ +import { NextRequest, NextResponse } from "next/server"; +import { prisma } from "@/lib/prisma"; +import { REGIONS, ALL_REGION, isRegion } from "@/lib/regions"; + +// GET /api/cost-items?region&year -> list of cost items (with derived cost). +export async function GET(req: NextRequest) { + const { searchParams } = new URL(req.url); + const region = searchParams.get("region") ?? ALL_REGION; + const yearParam = searchParams.get("year"); + const year = yearParam ? parseInt(yearParam, 10) : NaN; + + if (Number.isNaN(year)) { + return NextResponse.json({ error: "year is required" }, { status: 400 }); + } + + const regions = region === ALL_REGION ? REGIONS : isRegion(region) ? [region] : []; + if (regions.length === 0) return NextResponse.json({ items: [] }); + + const items = await prisma.costItem.findMany({ + where: { year, region: { in: [...regions] } }, + select: { id: true, name: true, region: true, year: true }, + orderBy: [{ name: "asc" }, { region: "asc" }], + }); + + return NextResponse.json({ items }); +} + +// POST /api/cost-items { name, region, year } -> create instantly. +// When region = "All", create in all 5 regions, skipping any that already have it. +export async function POST(req: NextRequest) { + const body = await req.json().catch(() => null); + const name = (body?.name ?? "").trim(); + const region = body?.region ?? ""; + const year = parseInt(String(body?.year), 10); + + if (!name) { + return NextResponse.json({ error: "name is required" }, { status: 400 }); + } + if (Number.isNaN(year)) { + return NextResponse.json({ error: "year is required" }, { status: 400 }); + } + + const targets = + region === ALL_REGION ? [...REGIONS] : isRegion(region) ? [region] : []; + if (targets.length === 0) { + return NextResponse.json({ error: "invalid region" }, { status: 400 }); + } + + let created = 0; + let skipped = 0; + for (const r of targets) { + const existing = await prisma.costItem.findFirst({ + where: { name, region: r, year }, + }); + if (existing) { + skipped++; + continue; + } + await prisma.costItem.create({ data: { name, region: r, year } }); + created++; + } + + return NextResponse.json({ created, skipped }); +} diff --git a/src/app/api/cost-registration/route.ts b/src/app/api/cost-registration/route.ts new file mode 100644 index 0000000..e195880 --- /dev/null +++ b/src/app/api/cost-registration/route.ts @@ -0,0 +1,45 @@ +import { NextRequest, NextResponse } from "next/server"; +import { prisma } from "@/lib/prisma"; +import { isRegion } from "@/lib/regions"; + +// GET /api/cost-registration?region&year -> cost items + subItems + pct for a +// specific region+year (registration requires a specific region). +export async function GET(req: NextRequest) { + const { searchParams } = new URL(req.url); + const region = searchParams.get("region") ?? ""; + const yearParam = searchParams.get("year"); + const year = yearParam ? parseInt(yearParam, 10) : NaN; + + if (!isRegion(region)) { + return NextResponse.json( + { error: "a specific region is required" }, + { status: 400 } + ); + } + if (Number.isNaN(year)) { + return NextResponse.json({ error: "year is required" }, { status: 400 }); + } + + const items = await prisma.costItem.findMany({ + where: { region, year }, + include: { subItems: { orderBy: { id: "asc" } } }, + orderBy: { name: "asc" }, + }); + + const pctRow = await prisma.trendAiPercentage.findUnique({ + where: { region_year: { region, year } }, + }); + + return NextResponse.json({ + items: items.map((it) => ({ + id: it.id, + name: it.name, + subItems: it.subItems.map((s) => ({ + id: s.id, + name: s.name, + subCost: s.subCost, + })), + })), + percentage: pctRow?.percentage ?? 0, + }); +} diff --git a/src/app/api/dashboard/route.ts b/src/app/api/dashboard/route.ts new file mode 100644 index 0000000..177b249 --- /dev/null +++ b/src/app/api/dashboard/route.ts @@ -0,0 +1,18 @@ +import { NextRequest, NextResponse } from "next/server"; +import { getDashboardRows } from "@/lib/calc"; + +// GET /api/dashboard?region&costItem&year -> aggregated table rows. +export async function GET(req: NextRequest) { + const { searchParams } = new URL(req.url); + const region = searchParams.get("region") ?? "All"; + const costItem = searchParams.get("costItem") ?? "All"; + const yearParam = searchParams.get("year"); + const year = yearParam ? parseInt(yearParam, 10) : NaN; + + if (Number.isNaN(year)) { + return NextResponse.json({ error: "year is required" }, { status: 400 }); + } + + const rows = await getDashboardRows({ region, costItem, year }); + return NextResponse.json({ rows }); +} diff --git a/src/app/api/sub-items/[id]/route.ts b/src/app/api/sub-items/[id]/route.ts new file mode 100644 index 0000000..c6313ed --- /dev/null +++ b/src/app/api/sub-items/[id]/route.ts @@ -0,0 +1,36 @@ +import { NextRequest, NextResponse } from "next/server"; +import { prisma } from "@/lib/prisma"; + +// PATCH /api/sub-items/[id] { name?, subCost? } -> update a sub-item. +export async function PATCH( + req: NextRequest, + { params }: { params: Promise<{ id: string }> } +) { + const { id: idStr } = await params; + const id = parseInt(idStr, 10); + if (Number.isNaN(id)) { + return NextResponse.json({ error: "invalid id" }, { status: 400 }); + } + + const body = await req.json().catch(() => null); + const data: { name?: string; subCost?: number } = {}; + if (typeof body?.name === "string") data.name = body.name; + if (body?.subCost !== undefined) data.subCost = Number(body.subCost) || 0; + + const updated = await prisma.subCostItem.update({ where: { id }, data }); + return NextResponse.json({ subItem: updated }); +} + +// DELETE /api/sub-items/[id] -> remove a sub-item. +export async function DELETE( + _req: NextRequest, + { params }: { params: Promise<{ id: string }> } +) { + const { id: idStr } = await params; + const id = parseInt(idStr, 10); + if (Number.isNaN(id)) { + return NextResponse.json({ error: "invalid id" }, { status: 400 }); + } + await prisma.subCostItem.delete({ where: { id } }); + return NextResponse.json({ ok: true }); +} diff --git a/src/app/api/sub-items/route.ts b/src/app/api/sub-items/route.ts new file mode 100644 index 0000000..1579643 --- /dev/null +++ b/src/app/api/sub-items/route.ts @@ -0,0 +1,25 @@ +import { NextRequest, NextResponse } from "next/server"; +import { prisma } from "@/lib/prisma"; + +// POST /api/sub-items { costItemId, name?, subCost? } -> append a sub-item. +export async function POST(req: NextRequest) { + const body = await req.json().catch(() => null); + const costItemId = parseInt(String(body?.costItemId), 10); + const name = (body?.name ?? "New Sub Cost").trim() || "New Sub Cost"; + const subCost = Number(body?.subCost ?? 0) || 0; + + if (Number.isNaN(costItemId)) { + return NextResponse.json({ error: "costItemId is required" }, { status: 400 }); + } + + const parent = await prisma.costItem.findUnique({ where: { id: costItemId } }); + if (!parent) { + return NextResponse.json({ error: "cost item not found" }, { status: 404 }); + } + + const sub = await prisma.subCostItem.create({ + data: { costItemId, name, subCost }, + }); + + return NextResponse.json({ subItem: sub }); +} diff --git a/src/app/api/trend-percentage/route.ts b/src/app/api/trend-percentage/route.ts new file mode 100644 index 0000000..10ae344 --- /dev/null +++ b/src/app/api/trend-percentage/route.ts @@ -0,0 +1,50 @@ +import { NextRequest, NextResponse } from "next/server"; +import { prisma } from "@/lib/prisma"; +import { isRegion } from "@/lib/regions"; + +// GET /api/trend-percentage?region&year -> current TrendAI percentage. +export async function GET(req: NextRequest) { + const { searchParams } = new URL(req.url); + const region = searchParams.get("region") ?? ""; + const year = parseInt(searchParams.get("year") ?? "", 10); + + if (!isRegion(region) || Number.isNaN(year)) { + return NextResponse.json( + { error: "region and year are required" }, + { status: 400 } + ); + } + + const row = await prisma.trendAiPercentage.findUnique({ + where: { region_year: { region, year } }, + }); + return NextResponse.json({ percentage: row?.percentage ?? 0 }); +} + +// PUT /api/trend-percentage { region, year, percentage } -> upsert. +export async function PUT(req: NextRequest) { + const body = await req.json().catch(() => null); + const region = body?.region ?? ""; + const year = parseInt(String(body?.year), 10); + const percentage = Number(body?.percentage); + + if (!isRegion(region) || Number.isNaN(year)) { + return NextResponse.json( + { error: "region and year are required" }, + { status: 400 } + ); + } + if (Number.isNaN(percentage) || percentage < 0 || percentage > 100) { + return NextResponse.json( + { error: "percentage must be between 0 and 100" }, + { status: 400 } + ); + } + + const row = await prisma.trendAiPercentage.upsert({ + where: { region_year: { region, year } }, + create: { region, year, percentage }, + update: { percentage }, + }); + return NextResponse.json({ percentage: row.percentage }); +} diff --git a/src/app/api/trend/route.ts b/src/app/api/trend/route.ts new file mode 100644 index 0000000..e41d0ed --- /dev/null +++ b/src/app/api/trend/route.ts @@ -0,0 +1,10 @@ +import { NextRequest, NextResponse } from "next/server"; +import { getTrendSeries } from "@/lib/calc"; + +// GET /api/trend?region -> series data across all years. +export async function GET(req: NextRequest) { + const { searchParams } = new URL(req.url); + const region = searchParams.get("region") ?? "All"; + const series = await getTrendSeries({ region }); + return NextResponse.json(series); +} diff --git a/src/app/api/years/delete/route.ts b/src/app/api/years/delete/route.ts new file mode 100644 index 0000000..bd38751 --- /dev/null +++ b/src/app/api/years/delete/route.ts @@ -0,0 +1,24 @@ +import { NextRequest, NextResponse } from "next/server"; +import { prisma } from "@/lib/prisma"; + +// POST /api/years/delete { year } -> remove a year and ALL cost data for it +// (cost items + their sub-costs via cascade, plus TrendAI percentages). +export async function POST(req: NextRequest) { + const body = await req.json().catch(() => null); + const year = parseInt(String(body?.year), 10); + + if (Number.isNaN(year)) { + return NextResponse.json({ error: "invalid year" }, { status: 400 }); + } + + // Sub-costs cascade when their cost items are deleted. + const items = await prisma.costItem.deleteMany({ where: { year } }); + const pcts = await prisma.trendAiPercentage.deleteMany({ where: { year } }); + await prisma.year.deleteMany({ where: { year } }); + + return NextResponse.json({ + year, + deletedItems: items.count, + deletedPercentages: pcts.count, + }); +} diff --git a/src/app/api/years/route.ts b/src/app/api/years/route.ts new file mode 100644 index 0000000..968494e --- /dev/null +++ b/src/app/api/years/route.ts @@ -0,0 +1,39 @@ +import { NextRequest, NextResponse } from "next/server"; +import { prisma } from "@/lib/prisma"; + +// GET /api/years -> all years (desc) for filter dropdowns + the Year Creation +// table. Union of the managed Year table and any years already used by cost +// items (so pre-existing data always shows even if not in the Year table). +export async function GET() { + const [yearRows, itemRows] = await Promise.all([ + prisma.year.findMany({ select: { year: true } }), + prisma.costItem.findMany({ + distinct: ["year"], + select: { year: true }, + }), + ]); + const set = new Set([ + ...yearRows.map((r) => r.year), + ...itemRows.map((r) => r.year), + ]); + const years = [...set].sort((a, b) => b - a); + return NextResponse.json({ years }); +} + +// POST /api/years { year } -> add a year. Reports whether it was created or +// already existed. +export async function POST(req: NextRequest) { + const body = await req.json().catch(() => null); + const year = parseInt(String(body?.year), 10); + + if (Number.isNaN(year) || year < 1900 || year > 3000) { + return NextResponse.json({ error: "invalid year" }, { status: 400 }); + } + + const existing = await prisma.year.findUnique({ where: { year } }); + if (existing) { + return NextResponse.json({ created: false, exists: true, year }); + } + await prisma.year.create({ data: { year } }); + return NextResponse.json({ created: true, exists: false, year }); +} diff --git a/src/app/cost-item-creation/page.tsx b/src/app/cost-item-creation/page.tsx new file mode 100644 index 0000000..04224bd --- /dev/null +++ b/src/app/cost-item-creation/page.tsx @@ -0,0 +1,300 @@ +"use client"; + +import { useEffect, useMemo, useState } from "react"; +import FilterBar from "@/components/ui/FilterBar"; +import Select from "@/components/ui/Select"; +import Card from "@/components/ui/Card"; +import { REGIONS, REGION_OPTIONS, ALL_REGION } from "@/lib/regions"; + +type Item = { id: number; name: string; region: string; year: number }; + +export default function CostItemCreationPage() { + const [years, setYears] = useState([]); + const [region, setRegion] = useState("All"); + const [year, setYear] = useState(""); + const [items, setItems] = useState([]); + const [loading, setLoading] = useState(false); + + const [newName, setNewName] = useState(""); + const [deleteName, setDeleteName] = useState(""); + const [confirmingDelete, setConfirmingDelete] = useState(false); + const [confirmText, setConfirmText] = useState(""); + const [busy, setBusy] = useState(false); + + useEffect(() => { + fetch("/api/years") + .then((r) => r.json()) + .then((d: { years: number[] }) => { + setYears(d.years); + if (d.years.length) setYear(String(d.years[0])); + }); + }, []); + + async function load() { + if (!year) return; + setLoading(true); + const qs = new URLSearchParams({ region, year }); + const d = await fetch(`/api/cost-items?${qs.toString()}`).then((r) => + r.json() + ); + setItems(d.items ?? []); + setLoading(false); + } + + useEffect(() => { + if (year) load(); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [region, year]); + + // Distinct item names (sorted) present in the current selection. + const names = useMemo( + () => [...new Set(items.map((i) => i.name))].sort((a, b) => a.localeCompare(b)), + [items] + ); + + // Set of "name||region" for O(1) presence lookups in the pivot table. + const presence = useMemo(() => { + const set = new Set(); + for (const it of items) set.add(`${it.name}||${it.region}`); + return set; + }, [items]); + + async function addItem() { + const name = newName.trim(); + if (!name) return; + setBusy(true); + const res = await fetch("/api/cost-items", { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ name, region, year }), + }).then((r) => r.json()); + setBusy(false); + setNewName(""); + await load(); + if (region === ALL_REGION) { + window.alert( + `Created in ${res.created} region(s)${ + res.skipped ? `, skipped ${res.skipped} that already had it` : "" + }.` + ); + } + } + + // Open the inline type-to-confirm step (no browser message box). + function startDelete() { + if (!deleteName.trim()) return; + setConfirmText(""); + setConfirmingDelete(true); + } + + function cancelDelete() { + setConfirmingDelete(false); + setConfirmText(""); + } + + async function confirmDelete() { + const name = deleteName.trim(); + if (!name || confirmText.trim() !== name) return; + setBusy(true); + const res = await fetch("/api/cost-items/delete", { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ name, region, year }), + }).then((r) => r.json()); + setBusy(false); + setConfirmingDelete(false); + setConfirmText(""); + setDeleteName(""); + await load(); + window.alert(`Deleted ${res.deleted} item(s).`); + } + + const deleteScope = + region === ALL_REGION ? `every region for ${year}` : `${region} ${year}`; + + const isAll = region === ALL_REGION; + + return ( +
+

+ Cost Item Creation +

+ + + + + +
+ +
+ setNewName(e.target.value)} + placeholder="Cost item name (e.g. Cloud Hosting)" + className="rounded-lg border border-[#E5E7EB] px-3 py-2.5 text-sm outline-none focus:border-[#3B82F6]" + /> +

+ {isAll + ? "Region = All → creates in all 5 regions (skips any that already have it)." + : `Creates in ${region} for ${year}.`} +

+ +
+
+ + +
+ setDeleteName(e.target.value)} + placeholder="Cost item name to delete" + disabled={confirmingDelete} + className="rounded-lg border border-[#E5E7EB] px-3 py-2.5 text-sm outline-none focus:border-[#EF4444] disabled:bg-gray-50" + /> +

+ {isAll + ? "Region = All → removes every copy across regions for this year." + : `Removes from ${region} for ${year}.`} +

+ + {confirmingDelete ? ( +
+

+ This will{" "} + + permanently delete + {" "} + "{deleteName.trim()}" from {deleteScope}, including its + sub-costs. Type the item name below to confirm. +

+ setConfirmText(e.target.value)} + placeholder={deleteName.trim()} + autoFocus + className="mb-3 w-full rounded-lg border border-[#FCA5A5] px-3 py-2 text-sm outline-none focus:border-[#EF4444]" + /> +
+ + +
+
+ ) : ( + + )} +
+
+
+ +
+ + + + + + {isAll && + REGIONS.map((r) => ( + + ))} + + + + {loading ? ( + + + + ) : names.length === 0 ? ( + + + + ) : ( + names.map((name) => ( + + + {isAll && + REGIONS.map((r) => { + const has = presence.has(`${name}||${r}`); + return ( + + ); + })} + + )) + )} + +
Cost Item + {r} +
+ Loading… +
+ No cost items yet. +
{name} + {has ? ( + + ✓ + + ) : ( + – + )} +
+
+
+
+ ); +} diff --git a/src/app/cost-registration/page.tsx b/src/app/cost-registration/page.tsx new file mode 100644 index 0000000..dd5ae51 --- /dev/null +++ b/src/app/cost-registration/page.tsx @@ -0,0 +1,319 @@ +"use client"; + +import { useEffect, useState } from "react"; +import FilterBar from "@/components/ui/FilterBar"; +import Select from "@/components/ui/Select"; +import Card from "@/components/ui/Card"; +import { REGIONS, isRegion } from "@/lib/regions"; +import { formatCurrency } from "@/lib/format"; + +type SubItem = { id: number; name: string; subCost: number }; +type Item = { id: number; name: string; subItems: SubItem[] }; + +export default function CostRegistrationPage() { + const [years, setYears] = useState([]); + const [region, setRegion] = useState(""); // placeholder until chosen + const [year, setYear] = useState("2026"); + const [items, setItems] = useState([]); + const [percentage, setPercentage] = useState("0"); + const [collapsed, setCollapsed] = useState>({}); + const [loading, setLoading] = useState(false); + const [saving, setSaving] = useState(false); + + const specific = isRegion(region); + + useEffect(() => { + fetch("/api/years") + .then((r) => r.json()) + .then((d: { years: number[] }) => { + setYears(d.years); + if (d.years.length && !d.years.includes(2026)) { + setYear(String(d.years[0])); + } + }); + }, []); + + async function load() { + if (!specific || !year) return; + setLoading(true); + const qs = new URLSearchParams({ region, year }); + const d = await fetch(`/api/cost-registration?${qs.toString()}`).then((r) => + r.json() + ); + const loaded: Item[] = d.items ?? []; + setItems(loaded); + // Fold every cost item by default. + setCollapsed(Object.fromEntries(loaded.map((it) => [it.id, true]))); + setPercentage(String(d.percentage ?? 0)); + setLoading(false); + } + + useEffect(() => { + if (specific && year) load(); + else setItems([]); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [region, year]); + + function toggle(itemId: number) { + setCollapsed((prev) => ({ ...prev, [itemId]: !prev[itemId] })); + } + + function setSub(itemId: number, subId: number, patch: Partial) { + setItems((prev) => + prev.map((it) => + it.id !== itemId + ? it + : { + ...it, + subItems: it.subItems.map((s) => + s.id === subId ? { ...s, ...patch } : s + ), + } + ) + ); + } + + // Add a sub-item and splice the created row into local state (no full reload). + async function addSub(itemId: number) { + const res = await fetch("/api/sub-items", { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ costItemId: itemId, name: "New Sub Cost", subCost: 0 }), + }).then((r) => r.json()); + const sub = res.subItem as SubItem; + if (!sub) return; + setItems((prev) => + prev.map((it) => + it.id === itemId + ? { + ...it, + subItems: [ + ...it.subItems, + { id: sub.id, name: sub.name, subCost: sub.subCost }, + ], + } + : it + ) + ); + } + + // Remove a sub-item and drop it from local state (no full reload). + async function removeSub(itemId: number, subId: number) { + if (!window.confirm("Remove this sub cost? This cannot be undone.")) return; + await fetch(`/api/sub-items/${subId}`, { method: "DELETE" }); + setItems((prev) => + prev.map((it) => + it.id === itemId + ? { ...it, subItems: it.subItems.filter((s) => s.id !== subId) } + : it + ) + ); + } + + async function update() { + setSaving(true); + // Persist every sub-item's current name + subCost. + await Promise.all( + items.flatMap((it) => + it.subItems.map((s) => + fetch(`/api/sub-items/${s.id}`, { + method: "PATCH", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ name: s.name, subCost: Number(s.subCost) || 0 }), + }) + ) + ) + ); + // Persist the TrendAI percentage for this region+year. + await fetch("/api/trend-percentage", { + method: "PUT", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ region, year, percentage: Number(percentage) || 0 }), + }); + setSaving(false); + window.alert("Saved. Dashboard TrendAI / TrendLife columns will reflect this."); + } + + return ( +
+

+ Cost Registration +

+ + + + + + {!specific ? ( + +

+ Please select a Region to register costs. +

+
+ ) : loading ? ( + +

Loading…

+
+ ) : ( +
+ +
+ setPercentage(e.target.value)} + className="w-28 rounded-lg border border-[#E5E7EB] px-3 py-2 text-sm outline-none focus:border-[#3B82F6]" + /> + + % of each item's cost attributed to TrendAI (the rest is + TrendLife). + +
+
+ + {items.length === 0 ? ( + +

+ No cost items for {region} {year}. Create items on the Cost Item + Creation page first. +

+
+ ) : ( + items.map((item) => { + const cost = item.subItems.reduce( + (a, s) => a + (Number(s.subCost) || 0), + 0 + ); + const isCollapsed = collapsed[item.id] ?? true; + return ( +
+ + + {!isCollapsed && ( +
+ + + + + + + + + + {item.subItems.map((s) => ( + + + + + + ))} + +
+ Sub Cost Item + + Sub Cost +
+ + setSub(item.id, s.id, { + name: e.target.value, + }) + } + className="w-full rounded-md border border-[#E5E7EB] px-2 py-1.5 outline-none focus:border-[#3B82F6]" + /> + + + setSub(item.id, s.id, { + subCost: Number(e.target.value), + }) + } + className="w-36 rounded-md border border-[#E5E7EB] px-2 py-1.5 text-right outline-none focus:border-[#3B82F6]" + /> + + +
+ +
+ )} +
+ ); + }) + )} + + {items.length > 0 && ( +
+ +
+ )} +
+ )} +
+ ); +} diff --git a/src/app/globals.css b/src/app/globals.css new file mode 100644 index 0000000..4d3b0fa --- /dev/null +++ b/src/app/globals.css @@ -0,0 +1,26 @@ +@import "tailwindcss"; + +@theme { + --color-ink: #111827; + --color-muted: #6b7280; + --color-cardborder: #e5e7eb; + --color-gridline: #edeff2; + --color-accent: #3b82f6; +} + +:root { + --background: #f9fafb; +} + +html, +body { + height: 100%; +} + +body { + background: var(--background); + color: #111827; + font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, + Helvetica, Arial, sans-serif; + -webkit-font-smoothing: antialiased; +} diff --git a/src/app/layout.tsx b/src/app/layout.tsx new file mode 100644 index 0000000..9f4a200 --- /dev/null +++ b/src/app/layout.tsx @@ -0,0 +1,44 @@ +import type { Metadata } from "next"; +import "./globals.css"; +import TopNav from "@/components/TopNav"; +import Sidebar from "@/components/Sidebar"; +import { auth } from "@/auth"; + +export const metadata: Metadata = { + title: "Global IT Cost Dashboard", + description: "Track IT cost across regions", +}; + +export default async function RootLayout({ + children, +}: { + children: React.ReactNode; +}) { + const session = await auth(); + + // Unauthenticated (e.g. the /login page) -> render a bare shell with no + // sidebar/topnav so the sign-in screen shows on its own. + if (!session?.user) { + return ( + + {children} + + ); + } + + const isAdmin = session.user.role === "admin"; + + return ( + + +
+ +
+ +
{children}
+
+
+ + + ); +} diff --git a/src/app/login/page.tsx b/src/app/login/page.tsx new file mode 100644 index 0000000..248ca98 --- /dev/null +++ b/src/app/login/page.tsx @@ -0,0 +1,112 @@ +import { redirect } from "next/navigation"; +import { AuthError } from "next-auth"; +import { signIn } from "@/auth"; + +// Map Auth.js error codes (passed back via ?error=) to human-readable text. +function errorMessage(code: string | undefined): string | null { + switch (code) { + case "CredentialsSignin": + return "Invalid username or password"; + case "AccessDenied": + return "Your account is not authorized — contact the administrator"; + default: + return code ? "Sign-in failed — please try again" : null; + } +} + +// Server action: kick off the Microsoft SSO flow. +async function microsoftLogin() { + "use server"; + await signIn("microsoft-entra-id", { redirectTo: "/" }); +} + +// Server action: local username/password login. +async function credentialsLogin(formData: FormData) { + "use server"; + try { + await signIn("credentials", { + username: formData.get("username"), + password: formData.get("password"), + redirectTo: "/", + }); + } catch (error) { + // A failed credentials check throws an AuthError -> show the banner. + if (error instanceof AuthError) { + redirect("/login?error=CredentialsSignin"); + } + // Re-throw the Next.js redirect control-flow error (successful sign-in). + throw error; + } +} + +export default async function LoginPage({ + searchParams, +}: { + searchParams: Promise<{ error?: string }>; +}) { + const { error } = await searchParams; + const message = errorMessage(error); + + return ( +
+
+

+ Global IT Cost Dashboard +

+

+ Sign in to continue +

+ + {message && ( +
+ {message} +
+ )} + +
+ +
+ +
+ + OR + +
+ +
+ + + +
+
+
+ ); +} diff --git a/src/app/page.tsx b/src/app/page.tsx new file mode 100644 index 0000000..f8cc49f --- /dev/null +++ b/src/app/page.tsx @@ -0,0 +1,151 @@ +"use client"; + +import { useEffect, useState } from "react"; +import FilterBar from "@/components/ui/FilterBar"; +import Select from "@/components/ui/Select"; +import Card from "@/components/ui/Card"; +import { REGION_OPTIONS, COST_ITEM_OPTIONS } from "@/lib/regions"; +import { formatCurrency } from "@/lib/format"; + +type Row = { + name: string; + cost: number; + trendAiCost: number; + trendLifeCost: number; +}; + +export default function DashboardPage() { + const [years, setYears] = useState([]); + const [region, setRegion] = useState("All"); + const [costItem, setCostItem] = useState("All"); + const [year, setYear] = useState(""); + const [rows, setRows] = useState([]); + const [loading, setLoading] = useState(false); + + // Load available years once; default to the newest. + useEffect(() => { + fetch("/api/years") + .then((r) => r.json()) + .then((d: { years: number[] }) => { + setYears(d.years); + if (d.years.length) setYear(String(d.years[0])); + }); + }, []); + + // Re-fetch table whenever filters change. + useEffect(() => { + if (!year) return; + setLoading(true); + const qs = new URLSearchParams({ region, costItem, year }); + fetch(`/api/dashboard?${qs.toString()}`) + .then((r) => r.json()) + .then((d: { rows: Row[] }) => setRows(d.rows ?? [])) + .finally(() => setLoading(false)); + }, [region, costItem, year]); + + const totals = rows.reduce( + (acc, r) => { + acc.cost += r.cost; + acc.ai += r.trendAiCost; + acc.life += r.trendLifeCost; + return acc; + }, + { cost: 0, ai: 0, life: 0 } + ); + + return ( +
+

+ Cost Overview +

+ + + + + setNewYear(e.target.value)} + placeholder="Year (e.g. 2027)" + className="rounded-lg border border-[#E5E7EB] px-3 py-2.5 text-sm outline-none focus:border-[#3B82F6]" + /> +

+ Adds a year available for selection across the app. +

+ +
+ + + +
+ setDeleteYear(e.target.value)} + placeholder="Year to delete" + disabled={confirmingDelete} + className="rounded-lg border border-[#E5E7EB] px-3 py-2.5 text-sm outline-none focus:border-[#EF4444] disabled:bg-gray-50" + /> +

+ Removes the year and all of its cost items and sub-costs across + every region. +

+ + {confirmingDelete ? ( +
+

+ This will{" "} + + permanently delete + {" "} + year "{deleteYear.trim()}" and all of its cost data. + Type the year below to confirm. +

+ setConfirmText(e.target.value)} + placeholder={deleteYear.trim()} + autoFocus + className="mb-3 w-full rounded-lg border border-[#FCA5A5] px-3 py-2 text-sm outline-none focus:border-[#EF4444]" + /> +
+ + +
+
+ ) : ( + + )} +
+
+ + +
+ + + + + + + + + {loading ? ( + + + + ) : years.length === 0 ? ( + + + + ) : ( + years.map((y) => ( + + + + )) + )} + +
Year
+ Loading… +
+ No years yet. +
{y}
+
+
+ + ); +} diff --git a/src/auth.config.ts b/src/auth.config.ts new file mode 100644 index 0000000..def9078 --- /dev/null +++ b/src/auth.config.ts @@ -0,0 +1,62 @@ +import type { NextAuthConfig } from "next-auth"; +import { NextResponse } from "next/server"; +import type { Role } from "@/lib/authz"; + +// Admin-only page routes. Normal users are redirected away from these. +const ADMIN_PAGE_PREFIXES = [ + "/cost-registration", + "/cost-item-creation", + "/year-creation", +]; + +// Edge-safe Auth.js config. This is imported by the middleware, which runs in +// the edge runtime, so it MUST NOT import Node APIs (node:fs) or the providers +// (Credentials/MicrosoftEntraID pull in Node crypto). The JSON allowlist is read +// only at sign-in in src/auth.ts (Node) and the resulting role is baked into the +// JWT; here we only read the role off the token. +export const authConfig = { + // Stateless JWT sessions — no DB adapter, keeps the middleware edge-compatible. + session: { strategy: "jwt" }, + // Custom sign-in page offering both SSO and local username/password. + pages: { signIn: "/login" }, + // Providers are added in the Node config (src/auth.ts). Empty here on purpose. + providers: [], + callbacks: { + // Copy the role from the token onto the session so server components / + // layout can read session.user.role. + session({ session, token }) { + if (session.user) { + session.user.role = token.role as Role | undefined; + } + return session; + }, + // Runs in the middleware on every matched request. Enforces both + // authentication and role-based authorization server-side. + authorized({ auth, request }) { + const { pathname } = request.nextUrl; + + // Always let the sign-in page through, even when unauthenticated. + if (pathname === "/login") return true; + + // Not signed in -> Auth.js redirects to the sign-in page. + if (!auth?.user) return false; + + const role = auth.user.role; + + // Admin is required for admin page routes and for any write API call + // (all mutations are non-GET requests to /api/*). + const needsAdmin = + ADMIN_PAGE_PREFIXES.some((prefix) => pathname.startsWith(prefix)) || + (pathname.startsWith("/api/") && request.method !== "GET"); + + if (needsAdmin && role !== "admin") { + if (pathname.startsWith("/api/")) { + return NextResponse.json({ error: "Forbidden" }, { status: 403 }); + } + return NextResponse.redirect(new URL("/", request.url)); + } + + return true; + }, + }, +} satisfies NextAuthConfig; diff --git a/src/auth.ts b/src/auth.ts new file mode 100644 index 0000000..3a087c6 --- /dev/null +++ b/src/auth.ts @@ -0,0 +1,71 @@ +import NextAuth from "next-auth"; +import MicrosoftEntraID from "next-auth/providers/microsoft-entra-id"; +import Credentials from "next-auth/providers/credentials"; +import { authConfig } from "@/auth.config"; +import { lookupRole, safeEqual } from "@/lib/authz"; + +// Auth.js v5 (NextAuth). Node-runtime config: spreads the edge-safe authConfig +// and adds the providers + Node-only callbacks (signIn/jwt) that need node:fs +// via lookupRole. Imported by the API route handler and server components — +// NEVER by the edge middleware (which uses src/auth.config.ts instead). +// +// Two sign-in paths: +// 1. Microsoft Entra ID SSO — allowed only if the email is in config/users.json. +// 2. Local username/password — break-glass admin, bypasses the JSON allowlist. +export const { handlers, auth, signIn, signOut } = NextAuth({ + ...authConfig, + providers: [ + MicrosoftEntraID({ + clientId: process.env.AUTH_MICROSOFT_ENTRA_ID_ID, + clientSecret: process.env.AUTH_MICROSOFT_ENTRA_ID_SECRET, + // Tenant-specific issuer restricts sign-in to our organization only. + issuer: process.env.AUTH_MICROSOFT_ENTRA_ID_ISSUER, + }), + Credentials({ + name: "Local account", + credentials: { + username: { label: "Username", type: "text" }, + password: { label: "Password", type: "password" }, + }, + authorize(credentials) { + const username = String(credentials?.username ?? ""); + const password = String(credentials?.password ?? ""); + + const expectedUser = process.env.LOCAL_ADMIN_USERNAME || "admin"; + const expectedPass = process.env.LOCAL_ADMIN_PASSWORD ?? ""; + + // Empty password env disables local login entirely (fail closed). + if (expectedPass === "") return null; + + if (safeEqual(username, expectedUser) && safeEqual(password, expectedPass)) { + return { id: "local-admin", name: username, role: "admin" }; + } + return null; + }, + }), + ], + callbacks: { + ...authConfig.callbacks, + // Gate SSO sign-ins against the JSON allowlist. The local Credentials + // account is always allowed (its role is set in authorize()). + signIn({ user, account, profile }) { + if (account?.provider === "credentials") return true; + + const email = + user.email ?? + (profile?.email as string | undefined) ?? + (profile?.preferred_username as string | undefined); + + // Returning false surfaces to the login page as ?error=AccessDenied. + return lookupRole(email) !== null; + }, + // On first sign-in, bake the role into the JWT so the edge middleware can + // read it without touching node:fs. + jwt({ token, user }) { + if (user) { + token.role = user.role ?? lookupRole(user.email) ?? "user"; + } + return token; + }, + }, +}); diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx new file mode 100644 index 0000000..ea7c3f0 --- /dev/null +++ b/src/components/Sidebar.tsx @@ -0,0 +1,57 @@ +"use client"; + +import Link from "next/link"; +import { usePathname } from "next/navigation"; + +type NavItem = { label: string; href: string }; + +const MAIN: NavItem[] = [ + { label: "Overview", href: "/" }, + { label: "Trend", href: "/trend" }, +]; + +const ADMIN: NavItem[] = [ + { label: "Cost Registration", href: "/cost-registration" }, + { label: "Cost Item Creation", href: "/cost-item-creation" }, + { label: "Year Creation", href: "/year-creation" }, +]; + +export default function Sidebar({ isAdmin }: { isAdmin: boolean }) { + const pathname = usePathname(); + + const renderLink = (item: NavItem) => { + const active = pathname === item.href; + return ( + + {item.label} + + ); + }; + + return ( + + ); +} diff --git a/src/components/TopNav.tsx b/src/components/TopNav.tsx new file mode 100644 index 0000000..f0eeff2 --- /dev/null +++ b/src/components/TopNav.tsx @@ -0,0 +1,44 @@ +import { auth, signIn, signOut } from "@/auth"; + +export default async function TopNav() { + const session = await auth(); + const user = session?.user; + + return ( +
+ Global IT Cost Dashboard + {user ? ( +
+ {user.name ?? user.email} +
{ + "use server"; + await signOut({ redirectTo: "/" }); + }} + > + +
+
+ ) : ( +
{ + "use server"; + await signIn("microsoft-entra-id"); + }} + > + +
+ )} +
+ ); +} diff --git a/src/components/TrendChart.tsx b/src/components/TrendChart.tsx new file mode 100644 index 0000000..2951907 --- /dev/null +++ b/src/components/TrendChart.tsx @@ -0,0 +1,116 @@ +"use client"; + +import { useMemo, useState } from "react"; +import { + LineChart, + Line, + XAxis, + YAxis, + CartesianGrid, + Tooltip, + Legend, + ResponsiveContainer, +} from "recharts"; +import { formatCurrency } from "@/lib/format"; + +export type Series = { + years: number[]; + lines: { key: string; values: number[] }[]; +}; + +// Total is blue + emphasized; regions/items cycle through this palette. +const TOTAL_COLOR = "#3B82F6"; +const PALETTE = [ + "#10B981", // green + "#F59E0B", // amber + "#EF4444", // red + "#8B5CF6", // purple + "#06B6D4", // cyan + "#EC4899", // pink + "#84CC16", // lime +]; + +export default function TrendChart({ series }: { series: Series }) { + // Which single line is isolated (null = show all). + const [isolated, setIsolated] = useState(null); + + const data = useMemo(() => { + return series.years.map((year, i) => { + const row: Record = { year }; + for (const line of series.lines) row[line.key] = line.values[i] ?? 0; + return row; + }); + }, [series]); + + const colorFor = (key: string, idx: number) => + key === "Total" ? TOTAL_COLOR : PALETTE[(idx - 1) % PALETTE.length]; + + // Click a legend entry to isolate that line; click it again to restore all. + const handleLegendClick = (o: { value?: unknown; dataKey?: unknown }) => { + const key = + typeof o?.dataKey === "string" + ? o.dataKey + : typeof o?.value === "string" + ? o.value + : ""; + if (!key) return; + setIsolated((cur) => (cur === key ? null : key)); + }; + + return ( +
+
+ + + + + formatCurrency(v)} + width={80} + /> + formatCurrency(v)} + contentStyle={{ + borderRadius: 8, + border: "1px solid #E5E7EB", + fontSize: 12, + }} + /> + + {series.lines.map((line, idx) => { + const hidden = isolated !== null && isolated !== line.key; + return ( + + ); + })} + + +
+

+ Tip: click a name in the legend to isolate that line; click it again to + show all. +

+
+ ); +} diff --git a/src/components/ui/Card.tsx b/src/components/ui/Card.tsx new file mode 100644 index 0000000..daffca0 --- /dev/null +++ b/src/components/ui/Card.tsx @@ -0,0 +1,22 @@ +export default function Card({ + title, + children, + className = "", +}: { + title?: string; + children: React.ReactNode; + className?: string; +}) { + return ( +
+ {title && ( +
+ {title} +
+ )} +
{children}
+
+ ); +} diff --git a/src/components/ui/FilterBar.tsx b/src/components/ui/FilterBar.tsx new file mode 100644 index 0000000..9111ae6 --- /dev/null +++ b/src/components/ui/FilterBar.tsx @@ -0,0 +1,7 @@ +export default function FilterBar({ children }: { children: React.ReactNode }) { + return ( +
+ {children} +
+ ); +} diff --git a/src/components/ui/Select.tsx b/src/components/ui/Select.tsx new file mode 100644 index 0000000..b9102fd --- /dev/null +++ b/src/components/ui/Select.tsx @@ -0,0 +1,61 @@ +"use client"; + +type Option = { value: string; label: string }; + +export default function Select({ + label, + value, + onChange, + options, + placeholder, + className = "", +}: { + label?: string; + value: string; + onChange: (value: string) => void; + options: (Option | string)[]; + placeholder?: string; + className?: string; +}) { + const normalized: Option[] = options.map((o) => + typeof o === "string" ? { value: o, label: o } : o + ); + + return ( +
+ {label && ( + {label} + )} +
+ + +
+
+ ); +} diff --git a/src/lib/authz.ts b/src/lib/authz.ts new file mode 100644 index 0000000..8c42d32 --- /dev/null +++ b/src/lib/authz.ts @@ -0,0 +1,55 @@ +import fs from "node:fs"; +import path from "node:path"; + +// Role model for the app. Access is either full "admin" or read-only "user". +// NOTE: this module uses node:fs and MUST only be imported from Node runtime +// code (src/auth.ts / server components / API routes) — never from the edge +// middleware, or the edge bundle will fail to compile. +export type Role = "admin" | "user"; + +// Resolve a user's role from the hand-edited allowlist at config/users.json. +// Emails are matched case-insensitively. This is FAIL CLOSED: a missing file, +// invalid JSON, or an email that is not listed all return null (access denied). +export function lookupRole(email: string | null | undefined): Role | null { + if (!email) return null; + + let raw: string; + try { + raw = fs.readFileSync( + path.join(process.cwd(), "config", "users.json"), + "utf8" + ); + } catch { + // File missing/unreadable -> deny everyone (local admin is the break-glass). + return null; + } + + let parsed: unknown; + try { + parsed = JSON.parse(raw); + } catch { + return null; + } + if (!parsed || typeof parsed !== "object") return null; + + // Lowercase every key so the lookup is case-insensitive. + const table: Record = {}; + for (const [key, value] of Object.entries(parsed as Record)) { + if (value === "admin" || value === "user") { + table[key.toLowerCase()] = value; + } + } + + return table[email.toLowerCase()] ?? null; +} + +// Constant-time string comparison to avoid leaking secrets via timing. +// Pure JS (no node:crypto) so this stays cheap and dependency-free. +export function safeEqual(a: string, b: string): boolean { + if (a.length !== b.length) return false; + let mismatch = 0; + for (let i = 0; i < a.length; i++) { + mismatch |= a.charCodeAt(i) ^ b.charCodeAt(i); + } + return mismatch === 0; +} diff --git a/src/lib/calc.ts b/src/lib/calc.ts new file mode 100644 index 0000000..8e84980 --- /dev/null +++ b/src/lib/calc.ts @@ -0,0 +1,144 @@ +import { prisma } from "@/lib/prisma"; +import { REGIONS, ALL_REGION, isRegion } from "@/lib/regions"; + +export type DashboardRow = { + name: string; + cost: number; + trendAiCost: number; + trendLifeCost: number; +}; + +// Sum of a cost item's sub-costs. Cost is always derived, never stored. +function sumSubCosts(subItems: { subCost: number }[]): number { + return subItems.reduce((acc, s) => acc + (s.subCost || 0), 0); +} + +// Build a lookup of region+year -> TrendAI percentage (0 if none). +async function loadPctMap( + year: number, + regions: readonly string[] +): Promise> { + const rows = await prisma.trendAiPercentage.findMany({ + where: { year, region: { in: [...regions] } }, + }); + const map = new Map(); + for (const r of rows) map.set(r.region, r.percentage); + return map; +} + +/** + * Dashboard aggregation. + * - region = "All": group by item name across the 5 regions for the year. + * Cost = Σ_region itemCost + * TrendAI = Σ_region (itemCost_region × pct_region/100) (mixed pct safe) + * TrendLife = Cost − TrendAI + * - single region: Cost/TrendAI/TrendLife for that one region+year. + * costItem filter: "All" | "Top 5" | "Top 10" (sorted by Cost desc, sliced). + */ +export async function getDashboardRows(params: { + region: string; + costItem: string; + year: number; +}): Promise { + const { region, costItem, year } = params; + + const regions = region === ALL_REGION ? REGIONS : isRegion(region) ? [region] : []; + if (regions.length === 0) return []; + + const pctMap = await loadPctMap(year, regions); + + const items = await prisma.costItem.findMany({ + where: { year, region: { in: [...regions] } }, + include: { subItems: true }, + }); + + // Aggregate by item name so "All" merges the same item across regions. + const byName = new Map(); + for (const item of items) { + const itemCost = sumSubCosts(item.subItems); + const pct = pctMap.get(item.region) ?? 0; + const trendAi = itemCost * (pct / 100); + const cur = byName.get(item.name) ?? { cost: 0, trendAi: 0 }; + cur.cost += itemCost; + cur.trendAi += trendAi; + byName.set(item.name, cur); + } + + let rows: DashboardRow[] = [...byName.entries()].map(([name, v]) => ({ + name, + cost: v.cost, + trendAiCost: v.trendAi, + trendLifeCost: v.cost - v.trendAi, + })); + + // Default sort: Cost desc, then name for stable ties. + rows.sort((a, b) => b.cost - a.cost || a.name.localeCompare(b.name)); + + if (costItem === "Top 5") rows = rows.slice(0, 5); + else if (costItem === "Top 10") rows = rows.slice(0, 10); + + return rows; +} + +export type TrendSeries = { + years: number[]; + // Each line: a label plus a cost value per year (aligned to `years`). + lines: { key: string; values: number[] }[]; +}; + +/** + * Trend chart data across ALL years. + * - region = "All": Total line + one line per region (region totals per year). + * - single region: Total line + one line per cost-item name (item cost per year). + */ +export async function getTrendSeries(params: { + region: string; +}): Promise { + const { region } = params; + const regions = region === ALL_REGION ? REGIONS : isRegion(region) ? [region] : []; + + const items = await prisma.costItem.findMany({ + where: regions.length ? { region: { in: [...regions] } } : undefined, + include: { subItems: true }, + }); + + const yearSet = new Set(); + for (const it of items) yearSet.add(it.year); + const years = [...yearSet].sort((a, b) => a - b); + const yearIndex = new Map(years.map((y, i) => [y, i])); + + const total = new Array(years.length).fill(0); + // group key -> per-year values + const groups = new Map(); + + const groupKeyFor = (item: (typeof items)[number]) => + region === ALL_REGION ? item.region : item.name; + + for (const item of items) { + const idx = yearIndex.get(item.year)!; + const cost = sumSubCosts(item.subItems); + total[idx] += cost; + const key = groupKeyFor(item); + if (!groups.has(key)) groups.set(key, new Array(years.length).fill(0)); + groups.get(key)![idx] += cost; + } + + // Order group lines: regions in canonical order, or items by total cost desc. + let orderedKeys = [...groups.keys()]; + if (region === ALL_REGION) { + orderedKeys = (REGIONS as readonly string[]).filter((r) => groups.has(r)); + } else { + orderedKeys.sort((a, b) => { + const sa = groups.get(a)!.reduce((x, y) => x + y, 0); + const sb = groups.get(b)!.reduce((x, y) => x + y, 0); + return sb - sa || a.localeCompare(b); + }); + } + + const lines = [ + { key: "Total", values: total }, + ...orderedKeys.map((key) => ({ key, values: groups.get(key)! })), + ]; + + return { years, lines }; +} diff --git a/src/lib/format.ts b/src/lib/format.ts new file mode 100644 index 0000000..f805c83 --- /dev/null +++ b/src/lib/format.ts @@ -0,0 +1,15 @@ +// Currency formatting for the dashboard, e.g. 120000 -> "$120,000". +const currency = new Intl.NumberFormat("en-US", { + style: "currency", + currency: "USD", + maximumFractionDigits: 0, +}); + +export function formatCurrency(value: number): string { + return currency.format(Math.round(value || 0)); +} + +// Percentage, e.g. 20 -> "20%". +export function formatPercent(value: number): string { + return `${Math.round((value || 0) * 100) / 100}%`; +} diff --git a/src/lib/prisma.ts b/src/lib/prisma.ts new file mode 100644 index 0000000..8348537 --- /dev/null +++ b/src/lib/prisma.ts @@ -0,0 +1,15 @@ +import { PrismaClient } from "@prisma/client"; + +// Reuse a single PrismaClient across hot-reloads in dev to avoid exhausting +// database connections. +const globalForPrisma = globalThis as unknown as { + prisma: PrismaClient | undefined; +}; + +export const prisma = + globalForPrisma.prisma ?? + new PrismaClient({ + log: process.env.NODE_ENV === "development" ? ["error", "warn"] : ["error"], + }); + +if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma; diff --git a/src/lib/regions.ts b/src/lib/regions.ts new file mode 100644 index 0000000..6368ef1 --- /dev/null +++ b/src/lib/regions.ts @@ -0,0 +1,16 @@ +// Canonical region labels (spaces normalized), matching the Figma trend legend. +export const REGIONS = ["AMEA IT", "EMEA IT", "NABU IT", "PH IT", "JP IT"] as const; +export type Region = (typeof REGIONS)[number]; + +export const ALL_REGION = "All"; + +// Region filter options: "All" plus the five regions. +export const REGION_OPTIONS = [ALL_REGION, ...REGIONS]; + +// Cost Item filter options for the Dashboard. +export const COST_ITEM_OPTIONS = ["All", "Top 5", "Top 10"] as const; +export type CostItemFilter = (typeof COST_ITEM_OPTIONS)[number]; + +export function isRegion(value: string): value is Region { + return (REGIONS as readonly string[]).includes(value); +} diff --git a/src/middleware.ts b/src/middleware.ts new file mode 100644 index 0000000..b1f2b0e --- /dev/null +++ b/src/middleware.ts @@ -0,0 +1,14 @@ +import NextAuth from "next-auth"; +import { authConfig } from "@/auth.config"; + +// Protect the whole app with role-aware auth. Runs in the edge runtime, so it +// uses the edge-safe authConfig (no node:fs / providers). The `authorized` +// callback there redirects unauthenticated users to /login and blocks normal +// users from admin pages / write APIs. +export const { auth: middleware } = NextAuth(authConfig); + +export const config = { + // Run on everything EXCEPT: the auth endpoints (must stay public so users can + // sign in), Next.js internals, and static asset requests (files with a dot). + matcher: ["/((?!api/auth|_next/static|_next/image|favicon.ico|.*\\.).*)"], +}; diff --git a/src/types/next-auth.d.ts b/src/types/next-auth.d.ts new file mode 100644 index 0000000..7b28463 --- /dev/null +++ b/src/types/next-auth.d.ts @@ -0,0 +1,22 @@ +import type { DefaultSession } from "next-auth"; +import type { Role } from "@/lib/authz"; + +// Bake our custom `role` onto the Auth.js types so the middleware, callbacks, +// and server components can read `session.user.role` / `token.role` type-safely. +declare module "next-auth" { + interface Session { + user: { + role?: Role; + } & DefaultSession["user"]; + } + + interface User { + role?: Role; + } +} + +declare module "next-auth/jwt" { + interface JWT { + role?: Role; + } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..6a9b955 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "ES2020", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [{ "name": "next" }], + "paths": { + "@/*": ["./src/*"] + } + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules", "scripts"] +}