Skip to content

Open-source agentic AI Search Execution Platform. Track AI visibility, find opportunities, and let agents turn signals into prioritized actions and drafted fixes across ChatGPT, Claude, Gemini, Google AI Overviews, Google AI Mode, Perplexity, Grok, and Microsoft Copilot.

feat: initial open-source release

Gökhan Geyik32fcb712b98f
diff --git a/.gitignore b/.gitignore
index 5ef6a5207..33b8ed450 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,37 +1,34 @@
-# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
-
# dependencies
-/node_modules
-/.pnp
-.pnp.*
-.yarn/*
-!.yarn/patches
-!.yarn/plugins
-!.yarn/releases
-!.yarn/versions
-
-# testing
-/coverage
+node_modules/
# next.js
-/.next/
-/out/
+.next/
+out/
# production
-/build
+build/
+dist/
# misc
.DS_Store
*.pem
-# debug
+# debug / logs
+*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
-# env files (can opt-in for committing if needed)
-.env*
+# testing
+coverage/
+
+# env files
+.env
+.env.local
+.env.production
+.env.development
+!.env.example
# vercel
.vercel
@@ -39,3 +36,9 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
+
+# ide
+.cursor/
+
+# claude
+.claude/
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 000000000..88c8ce0f5
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,22 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [Unreleased]
+
+## [0.1.0] - 2026-04-09
+
+### Added
+- Initial open-source release
+- Web frontend (Next.js 16) with dashboard, analytics, and content optimization
+- Backend server (Express) with multi-provider AI tracking (ChatGPT, Gemini, Perplexity, Grok, Claude)
+- Docker Compose setup for self-hosting
+- Multi-language support (13 languages, 18 regions)
+- Plan-based feature gating (self-hosted, starter, growth, enterprise)
+- Real-time brand visibility monitoring across AI search engines
+- Competitor tracking and content optimization suggestions
+- Prompt volume analysis
+- Stripe integration for cloud billing
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 000000000..ca031aae7
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,217 @@
+# Contributing to Ansvisor
+
+Thank you for your interest in contributing to Ansvisor! This guide will help you get started.
+
+## Ways to Contribute
+
+- **Bug reports** — found something broken? Open an issue.
+- **Feature requests** — have an idea? Start a discussion or open an issue.
+- **Code contributions** — fix a bug or implement a feature via pull request.
+- **Documentation** — improve guides, fix typos, add examples.
+
+## Prerequisites
+
+- [Node.js](https://nodejs.org/) >= 20
+- A [Supabase](https://supabase.com/) project (URL + anon key)
+- At least one AI provider API key (OpenAI, Google Gemini, Anthropic, Perplexity, or Grok)
+- [Docker](https://www.docker.com/) + Docker Compose (optional, for containerized setup)
+
+## Project Structure
+
+```
+ansvisor/
+├── web/ # Next.js 16 frontend (TypeScript)
+├── server/ # Express backend (Node.js ESM)
+├── supabase/ # Database migrations and config
+├── scripts/ # Version management tooling
+├── docker-compose.yml # Containerized deployment
+├── CHANGELOG.md
+└── LICENSE
+```
+
+Both `web/` and `server/` are independent packages with their own `package.json` and `Dockerfile`. They share a unified version number managed from the root.
+
+## Development Setup
+
+### 1. Clone the repository
+
+```bash
+git clone https://github.com/aeohub/ansvisor.git
+cd ansvisor
+```
+
+### 2. Configure environment variables
+
+```bash
+cp web/.env.example web/.env.local
+cp server/.env.example server/.env
+```
+
+Fill in at minimum:
+
+- **Supabase** URL and anon key (both `web/.env.local` and `server/.env`)
+- **At least one AI API key** in `server/.env` (e.g. `OPENAI_API_KEY`)
+
+### 3. Set up the database
+
+Run the migration SQL to create all tables, indexes, RLS policies, and triggers in your Supabase project:
+
+**Option A — Supabase SQL Editor (easiest):**
+
+1. Open your Supabase project dashboard
+2. Go to **SQL Editor**
+3. Paste the contents of `supabase/migrations/00001_initial_schema.sql`
+4. Click **Run**
+
+**Option B — Supabase CLI:**
+
+```bash
+npx supabase link --project-ref <YOUR_PROJECT_REF>
+npx supabase db push
+```
+
+### 4. Install dependencies
+
+The web app uses **yarn**, the server uses **npm**:
+
+```bash
+cd web && yarn install
+cd ../server && npm install
+```
+
+### 5. Start dev servers
+
+In separate terminals:
+
+```bash
+# Terminal 1 — frontend (http://localhost:3000)
+cd web && yarn dev
+
+# Terminal 2 — backend (http://localhost:80)
+cd server && npm run dev
+```
+
+### Docker alternative
+
+If you prefer Docker, configure your `.env` files first, then:
+
+```bash
+docker compose up --build
+```
+
+## Branch Naming
+
+We follow [GitHub Flow](https://docs.github.com/en/get-started/using-github/github-flow) with a single `main` branch. Create short-lived branches from `main` using these prefixes:
+
+| Prefix | Purpose | Example |
+|--------|---------|---------|
+| `feature/` | New feature | `feature/competitor-export` |
+| `fix/` | Bug fix | `fix/tracking-timeout` |
+| `chore/` | Maintenance | `chore/update-deps` |
+| `docs/` | Documentation | `docs/setup-guide` |
+
+## Making Changes
+
+1. Create a branch from `main`:
+
+ ```bash
+ git checkout -b feature/my-feature
+ ```
+
+2. Make your changes and commit (see commit conventions below).
+
+3. Verify versions are in sync:
+
+ ```bash
+ npm run version:check
+ ```
+
+4. Push and open a pull request against `main`.
+
+5. In your PR description, include:
+ - **What** changed and **why**
+ - **How to test** the change
+ - Screenshots if there are UI changes
+
+6. Wait for review, address feedback, and your PR will be merged.
+
+## Commit Messages
+
+We use [Conventional Commits](https://www.conventionalcommits.org/):
+
+```
+<type>: <description>
+```
+
+**Types:**
+
+| Type | When to use |
+|------|-------------|
+| `feat` | New feature |
+| `fix` | Bug fix |
+| `chore` | Maintenance, dependency updates |
+| `docs` | Documentation only |
+| `refactor` | Code change that neither fixes a bug nor adds a feature |
+| `test` | Adding or updating tests |
+
+**Examples:**
+
+```
+feat: add competitor export endpoint
+fix: resolve tracking timeout on large datasets
+chore: update AI SDK to v6.1
+docs: add self-hosting guide
+```
+
+Scope is optional but helpful for monorepo clarity:
+
+```
+feat(server): add rate limiting to tracking API
+fix(web): correct chart rendering on mobile
+```
+
+## Code Style
+
+### Web (`web/`)
+
+- TypeScript with strict mode enabled
+- ESLint with `eslint-config-next` (core-web-vitals + typescript)
+- Run `yarn lint` before submitting
+
+### Server (`server/`)
+
+- Node.js with ES modules (`"type": "module"`)
+- Zod for runtime validation
+- Follow existing patterns in `src/`
+
+### General
+
+- Follow the conventions already present in the codebase
+- Keep changes focused — one concern per PR
+
+## Versioning
+
+All three `package.json` files (root, `web/`, `server/`) share the same version. Use the provided scripts to manage versions:
+
+```bash
+# Check that all versions match
+npm run version:check
+
+# Bump version (updates all three package.json files)
+npm run version:bump -- patch # 0.1.0 → 0.1.1
+npm run version:bump -- minor # 0.1.0 → 0.2.0
+npm run version:bump -- major # 0.1.0 → 1.0.0
+```
+
+Do not edit version numbers in `package.json` files manually.
+
+## Reporting Issues
+
+When opening an issue, please include:
+
+- **Bug reports:** Steps to reproduce, expected vs. actual behavior, Node.js version, browser (if applicable)
+- **Feature requests:** Use case description and why it would be useful
+
+## License
+
+By contributing to Ansvisor, you agree that your contributions will be licensed under the [MIT License](LICENSE).
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000..f437294d0
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2026 Empler AI Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
index e215bc4cc..2153878bf 100644
--- a/README.md
+++ b/README.md
@@ -1,36 +1,122 @@
-This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
+# Ansvisor
-## Getting Started
+Open source AI Engine Optimization (AEO) platform. Monitor your brand's visibility across AI search engines, track competitors, and get content optimization suggestions.
-First, run the development server:
+## Features
+
+- **AI Search Tracking** — Monitor how AI engines (ChatGPT, Gemini, Perplexity, Grok, Claude) mention your brand
+- **Brand Visibility Analytics** — Real-time dashboard with visibility scores and trend analysis
+- **Competitor Tracking** — Compare your AI presence against competitors
+- **Content Optimization** — AI-powered suggestions to improve your brand's representation
+- **Prompt Volume Analysis** — Understand search demand across AI platforms
+- **Multi-language Support** — 13 languages, 18 regions
+- **Self-hosted or Cloud** — Run on your own infrastructure with all features unlocked
+
+## Quick Start
+
+### Prerequisites
+
+- [Node.js](https://nodejs.org/) >= 20
+- [Yarn](https://yarnpkg.com/) (for the web app)
+- A [Supabase](https://supabase.com/) project (free tier works)
+
+### Required Services
+
+| Service | Purpose | Where to get |
+|---------|---------|--------------|
+| **Supabase** | Database, Auth, API | [supabase.com](https://supabase.com/) |
+| **AI Provider** (at least one) | Brand tracking across AI engines | [OpenAI](https://platform.openai.com/) / [Google Gemini](https://ai.google.dev/) / [Anthropic](https://console.anthropic.com/) |
+| **Cloro** | Web scraping for AI platform responses | [cloro.ai](https://cloro.ai/) |
+
+### Optional Services
+
+| Service | Purpose | Where to get |
+|---------|---------|--------------|
+| **DataForSEO** | Keyword volume data for prompt analysis | [dataforseo.com](https://dataforseo.com/) |
+| **Stripe** | Payments (cloud mode only, not needed for self-hosted) | [stripe.com](https://stripe.com/) |
+
+### Setup
+
+#### 1. Clone and configure
```bash
-npm run dev
-# or
-yarn dev
-# or
-pnpm dev
-# or
-bun dev
+git clone https://github.com/aeohub/ansvisor.git
+cd ansvisor
+
+cp web/.env.example web/.env.local
+cp server/.env.example server/.env
```
-Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
+Edit both `.env` files and fill in your credentials. See the comments in each file for guidance.
+
+#### 2. Set up the database
+
+Run the migration SQL to create all tables, indexes, RLS policies, and triggers:
+
+**Option A — Supabase Dashboard:**
+1. Go to your project's **SQL Editor**
+2. Paste the contents of `supabase/migrations/00001_initial_schema.sql`
+3. Click **Run**
+
+**Option B — Supabase CLI:**
+
+```bash
+npx supabase link --project-ref <YOUR_PROJECT_REF>
+npx supabase db push
+```
-You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
+#### 3. Install dependencies
-This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
+```bash
+cd web && yarn install && cd ..
+cd server && npm install && cd ..
+```
+
+#### 4. Start dev servers
+
+```bash
+# Terminal 1 — frontend
+cd web && yarn dev # http://localhost:3000
+
+# Terminal 2 — backend
+cd server && npm run dev # http://localhost:80
+```
+
+### Docker
+
+```bash
+# Configure env files first, then:
+docker compose up --build
+```
+
+### Self-hosted vs Cloud
+
+Set `IS_CLOUD=false` (default) in `server/.env` and `NEXT_PUBLIC_IS_CLOUD=false` in `web/.env.local` for self-hosted mode. All features are unlocked automatically — no Stripe or payment setup needed.
+
+## Project Structure
+
+```
+ansvisor/
+├── web/ # Next.js 16 frontend (TypeScript)
+├── server/ # Express backend (Node.js ESM)
+├── supabase/ # Database migrations and config
+├── scripts/ # Version management tooling
+├── docker-compose.yml # Containerized deployment
+├── CONTRIBUTING.md
+├── CHANGELOG.md
+└── LICENSE
+```
-## Learn More
+## Tech Stack
-To learn more about Next.js, take a look at the following resources:
+**Frontend** — Next.js 16, React 19, TypeScript, Tailwind CSS 4, Supabase Auth, Stripe, Zustand, Recharts, next-intl
-- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
-- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
+**Backend** — Express, Vercel AI SDK, multi-provider AI (OpenAI, Anthropic, Google, Perplexity, Grok), Supabase, Socket.IO, Zod
-You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
+## Contributing
-## Deploy on Vercel
+We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, branch naming, commit conventions, and PR guidelines.
-The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
+## License
-Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
+[MIT](LICENSE) — Copyright (c) 2026 Empler AI Inc.
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 000000000..e02c42c5b
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,20 @@
+services:
+ web:
+ image: ghcr.io/aeohub/ansvisor/web:0.1.0
+ build: ./web
+ ports:
+ - "3000:3000"
+ env_file:
+ - ./web/.env
+ depends_on:
+ - server
+ restart: unless-stopped
+
+ server:
+ image: ghcr.io/aeohub/ansvisor/server:0.1.0
+ build: ./server
+ ports:
+ - "80:80"
+ env_file:
+ - ./server/.env
+ restart: unless-stopped
diff --git a/next.config.ts b/next.config.ts
deleted file mode 100644
index e9ffa3083..000000000
--- a/next.config.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import type { NextConfig } from "next";
-
-const nextConfig: NextConfig = {
- /* config options here */
-};
-
-export default nextConfig;
diff --git a/package.json b/package.json
index ee492ef2c..307eb705c 100644
--- a/package.json
+++ b/package.json
@@ -1,33 +1,20 @@
{
- "name": "aeo",
+ "name": "ansvisor",
"version": "0.1.0",
"private": true,
- "scripts": {
- "dev": "next dev",
- "build": "next build",
- "start": "next start",
- "lint": "eslint"
+ "description": "Open source AI Engine Optimization platform",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/aeohub/ansvisor.git"
},
- "dependencies": {
- "@base-ui/react": "^1.2.0",
- "class-variance-authority": "^0.7.1",
- "clsx": "^2.1.1",
- "lucide-react": "^0.577.0",
- "next": "16.1.6",
- "react": "19.2.3",
- "react-dom": "19.2.3",
- "shadcn": "^4.0.2",
- "tailwind-merge": "^3.5.0",
- "tw-animate-css": "^1.4.0"
+ "homepage": "https://github.com/aeohub/ansvisor",
+ "type": "module",
+ "license": "MIT",
+ "scripts": {
+ "version:check": "node scripts/version-check.js",
+ "version:bump": "node scripts/version-bump.js"
},
- "devDependencies": {
- "@tailwindcss/postcss": "^4",
- "@types/node": "^20",
- "@types/react": "^19",
- "@types/react-dom": "^19",
- "eslint": "^9",
- "eslint-config-next": "16.1.6",
- "tailwindcss": "^4",
- "typescript": "^5"
+ "engines": {
+ "node": ">=20"
}
}
diff --git a/scripts/version-bump.js b/scripts/version-bump.js
new file mode 100644
index 000000000..308d89990
--- /dev/null
+++ b/scripts/version-bump.js
@@ -0,0 +1,51 @@
+#!/usr/bin/env node
+
+import { readFileSync, writeFileSync } from 'fs';
+import { resolve, dirname } from 'path';
+import { fileURLToPath } from 'url';
+
+const __dirname = dirname(fileURLToPath(import.meta.url));
+const root = resolve(__dirname, '..');
+
+const PACKAGE_PATHS = [
+ resolve(root, 'package.json'),
+ resolve(root, 'web/package.json'),
+ resolve(root, 'server/package.json'),
+];
+
+function parseVersion(version) {
+ const match = version.match(/^(\d+)\.(\d+)\.(\d+)$/);
+ if (!match) throw new Error(`Invalid semver: ${version}`);
+ return { major: +match[1], minor: +match[2], patch: +match[3] };
+}
+
+function bump(current, type) {
+ const v = parseVersion(current);
+ switch (type) {
+ case 'major': return `${v.major + 1}.0.0`;
+ case 'minor': return `${v.major}.${v.minor + 1}.0`;
+ case 'patch': return `${v.major}.${v.minor}.${v.patch + 1}`;
+ default:
+ // Explicit version provided
+ parseVersion(type); // validate
+ return type;
+ }
+}
+
+const arg = process.argv[2];
+if (!arg) {
+ console.error('Usage: node version-bump.js <patch|minor|major|x.y.z>');
+ process.exit(1);
+}
+
+const rootPkg = JSON.parse(readFileSync(PACKAGE_PATHS[0], 'utf8'));
+const oldVersion = rootPkg.version;
+const newVersion = bump(oldVersion, arg);
+
+for (const pkgPath of PACKAGE_PATHS) {
+ const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
+ pkg.version = newVersion;
+ writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
+}
+
+console.log(`${oldVersion} → ${newVersion}`);
diff --git a/scripts/version-check.js b/scripts/version-check.js
new file mode 100644
index 000000000..e4c4f57a1
--- /dev/null
+++ b/scripts/version-check.js
@@ -0,0 +1,32 @@
+#!/usr/bin/env node
+
+import { readFileSync } from 'fs';
+import { resolve, dirname } from 'path';
+import { fileURLToPath } from 'url';
+
+const __dirname = dirname(fileURLToPath(import.meta.url));
+const root = resolve(__dirname, '..');
+
+const packages = [
+ { name: 'root', path: resolve(root, 'package.json') },
+ { name: 'web', path: resolve(root, 'web/package.json') },
+ { name: 'server', path: resolve(root, 'server/package.json') },
+];
+
+const versions = packages.map(({ name, path }) => {
+ const { version } = JSON.parse(readFileSync(path, 'utf8'));
+ return { name, version };
+});
+
+const allMatch = versions.every((v) => v.version === versions[0].version);
+
+if (allMatch) {
+ console.log(`✓ All packages at v${versions[0].version}`);
+ process.exit(0);
+} else {
+ console.error('✗ Version mismatch:');
+ for (const { name, version } of versions) {
+ console.error(` ${name}: ${version}`);
+ }
+ process.exit(1);
+}
diff --git a/server/.env.example b/server/.env.example
new file mode 100644
index 000000000..6b7260867
--- /dev/null
+++ b/server/.env.example
@@ -0,0 +1,42 @@
+NODE_ENV=development
+PORT=80
+
+# Supabase
+SUPABASE_URL=
+SUPABASE_ANON_KEY=
+SUPABASE_SERVICE_ROLE_KEY=
+
+# AI Providers
+OPENAI_API_KEY=
+ANTHROPIC_API_KEY=
+GOOGLE_GENERATIVE_AI_API_KEY=
+DEFAULT_SUGGESTION_MODEL=google/gemini-3-flash-preview
+TOPIC_SUGGESTION_MODEL=google/gemini-3-flash-preview
+PROMPT_SUGGESTION_MODEL=google/gemini-3-flash-preview
+COMPETITOR_SUGGESTION_MODEL=google/gemini-3-flash-preview
+
+# CORS
+ALLOWED_ORIGINS=http://localhost:3000
+
+# Cloud / Self-hosted mode
+# Set to "true" only for the official cloud deployment.
+# Self-hosted instances should leave this unset or "false" — all features
+# will be unlocked automatically.
+IS_CLOUD=false
+
+# DataForSEO (for keyword volume data)
+DATAFORSEO_LOGIN=
+DATAFORSEO_PASSWORD=
+
+# Cloro (platform web scrapers)
+CLORO_API_KEY=
+
+# Platform provider for web scrapers (default: cloro)
+PLATFORM_PROVIDER=cloro
+
+# AI Volume Multiplier (AI search adoption rate, e.g. 0.15 = 15%)
+AI_VOLUME_MULTIPLIER=0.15
+
+# Stripe (cloud only — not needed for self-hosted)
+# STRIPE_SECRET_KEY=sk_test_...
+# STRIPE_WEBHOOK_SECRET=whsec_...
diff --git a/server/.gitignore b/server/.gitignore
new file mode 100644
index 000000000..c9ea12fb3
--- /dev/null
+++ b/server/.gitignore
@@ -0,0 +1,10 @@
+node_modules/
+dist/
+.env
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+.DS_Store
+coverage/
+.nyc_output/
diff --git a/server/Dockerfile b/server/Dockerfile
new file mode 100644
index 000000000..6e58673e9
--- /dev/null
+++ b/server/Dockerfile
@@ -0,0 +1,19 @@
+FROM node:20
+
+ARG VERSION=0.1.0
+LABEL org.opencontainers.image.title="Ansvisor Server"
+LABEL org.opencontainers.image.version=$VERSION
+LABEL org.opencontainers.image.source="https://github.com/aeohub/ansvisor"
+LABEL org.opencontainers.image.licenses="MIT"
+
+WORKDIR /ansvisor-server
+
+COPY package.json package-lock.json* ./
+
+RUN npm install && npm install -g pm2
+
+COPY . .
+
+EXPOSE 80
+
+CMD ["pm2-runtime", "start", "src/server.js"]
diff --git a/server/package-lock.json b/server/package-lock.json
new file mode 100644
index 000000000..57078ffa5
--- /dev/null
+++ b/server/package-lock.json
@@ -0,0 +1,3477 @@
+{
+ "name": "aeo-server",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "aeo-server",
+ "version": "1.0.0",
+ "license": "ISC",
+ "dependencies": {
+ "@ai-sdk/anthropic": "^3.0.58",
+ "@ai-sdk/google": "^3.0.43",
+ "@ai-sdk/openai": "^3.0.41",
+ "@anthropic-ai/sdk": "^0.78.0",
+ "@supabase/supabase-js": "^2.49.1",
+ "ai": "^6.0.116",
+ "body-parser": "^1.20.2",
+ "cors": "^2.8.5",
+ "dotenv": "^16.3.1",
+ "express": "^4.18.2",
+ "express-rate-limit": "^7.1.4",
+ "helmet": "^7.1.0",
+ "node-cron": "^4.2.1",
+ "openai": "^6.27.0",
+ "pm2": "^5.3.0",
+ "socket.io": "^4.7.2",
+ "uuid": "^9.0.0",
+ "zod": "^4.3.6"
+ },
+ "devDependencies": {
+ "nodemon": "^3.0.2"
+ }
+ },
+ "node_modules/@ai-sdk/anthropic": {
+ "version": "3.0.58",
+ "resolved": "https://registry.npmjs.org/@ai-sdk/anthropic/-/anthropic-3.0.58.tgz",
+ "integrity": "sha512-/53SACgmVukO4bkms4dpxpRlYhW8Ct6QZRe6sj1Pi5H00hYhxIrqfiLbZBGxkdRvjsBQeP/4TVGsXgH5rQeb8Q==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@ai-sdk/provider": "3.0.8",
+ "@ai-sdk/provider-utils": "4.0.19"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "zod": "^3.25.76 || ^4.1.8"
+ }
+ },
+ "node_modules/@ai-sdk/gateway": {
+ "version": "3.0.66",
+ "resolved": "https://registry.npmjs.org/@ai-sdk/gateway/-/gateway-3.0.66.tgz",
+ "integrity": "sha512-SIQ0YY0iMuv+07HLsZ+bB990zUJ6S4ujORAh+Jv1V2KGNn73qQKnGO0JBk+w+Res8YqOFSycwDoWcFlQrVxS4A==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@ai-sdk/provider": "3.0.8",
+ "@ai-sdk/provider-utils": "4.0.19",
+ "@vercel/oidc": "3.1.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "zod": "^3.25.76 || ^4.1.8"
+ }
+ },
+ "node_modules/@ai-sdk/google": {
+ "version": "3.0.43",
+ "resolved": "https://registry.npmjs.org/@ai-sdk/google/-/google-3.0.43.tgz",
+ "integrity": "sha512-NGCgP5g8HBxrNdxvF8Dhww+UKfqAkZAmyYBvbu9YLoBkzAmGKDBGhVptN/oXPB5Vm0jggMdoLycZ8JReQM8Zqg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@ai-sdk/provider": "3.0.8",
+ "@ai-sdk/provider-utils": "4.0.19"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "zod": "^3.25.76 || ^4.1.8"
+ }
+ },
+ "node_modules/@ai-sdk/openai": {
+ "version": "3.0.41",
+ "resolved": "https://registry.npmjs.org/@ai-sdk/openai/-/openai-3.0.41.tgz",
+ "integrity": "sha512-IZ42A+FO+vuEQCVNqlnAPYQnnUpUfdJIwn1BEDOBywiEHa23fw7PahxVtlX9zm3/zMvTW4JKPzWyvAgDu+SQ2A==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@ai-sdk/provider": "3.0.8",
+ "@ai-sdk/provider-utils": "4.0.19"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "zod": "^3.25.76 || ^4.1.8"
+ }
+ },
+ "node_modules/@ai-sdk/provider": {
+ "version": "3.0.8",
+ "resolved": "https://registry.npmjs.org/@ai-sdk/provider/-/provider-3.0.8.tgz",
+ "integrity": "sha512-oGMAgGoQdBXbZqNG0Ze56CHjDZ1IDYOwGYxYjO5KLSlz5HiNQ9udIXsPZ61VWaHGZ5XW/jyjmr6t2xz2jGVwbQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "json-schema": "^0.4.0"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@ai-sdk/provider-utils": {
+ "version": "4.0.19",
+ "resolved": "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-4.0.19.tgz",
+ "integrity": "sha512-3eG55CrSWCu2SXlqq2QCsFjo3+E7+Gmg7i/oRVoSZzIodTuDSfLb3MRje67xE9RFea73Zao7Lm4mADIfUETKGg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@ai-sdk/provider": "3.0.8",
+ "@standard-schema/spec": "^1.1.0",
+ "eventsource-parser": "^3.0.6"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "zod": "^3.25.76 || ^4.1.8"
+ }
+ },
+ "node_modules/@anthropic-ai/sdk": {
+ "version": "0.78.0",
+ "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.78.0.tgz",
+ "integrity": "sha512-PzQhR715td/m1UaaN5hHXjYB8Gl2lF9UVhrrGrZeysiF6Rb74Wc9GCB8hzLdzmQtBd1qe89F9OptgB9Za1Ib5w==",
+ "license": "MIT",
+ "dependencies": {
+ "json-schema-to-ts": "^3.1.1"
+ },
+ "bin": {
+ "anthropic-ai-sdk": "bin/cli"
+ },
+ "peerDependencies": {
+ "zod": "^3.25.0 || ^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "zod": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@babel/runtime": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.6.tgz",
+ "integrity": "sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@opentelemetry/api": {
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz",
+ "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@pm2/agent": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@pm2/agent/-/agent-2.0.4.tgz",
+ "integrity": "sha512-n7WYvvTJhHLS2oBb1PjOtgLpMhgImOq8sXkPBw6smeg9LJBWZjiEgPKOpR8mn9UJZsB5P3W4V/MyvNnp31LKeA==",
+ "license": "AGPL-3.0",
+ "dependencies": {
+ "async": "~3.2.0",
+ "chalk": "~3.0.0",
+ "dayjs": "~1.8.24",
+ "debug": "~4.3.1",
+ "eventemitter2": "~5.0.1",
+ "fast-json-patch": "^3.0.0-1",
+ "fclone": "~1.0.11",
+ "nssocket": "0.6.0",
+ "pm2-axon": "~4.0.1",
+ "pm2-axon-rpc": "~0.7.0",
+ "proxy-agent": "~6.3.0",
+ "semver": "~7.5.0",
+ "ws": "~7.5.10"
+ }
+ },
+ "node_modules/@pm2/agent/node_modules/dayjs": {
+ "version": "1.8.36",
+ "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.8.36.tgz",
+ "integrity": "sha512-3VmRXEtw7RZKAf+4Tv1Ym9AGeo8r8+CjDi26x+7SYQil1UqtqdaokhzoEJohqlzt0m5kacJSDhJQkG/LWhpRBw==",
+ "license": "MIT"
+ },
+ "node_modules/@pm2/agent/node_modules/debug": {
+ "version": "4.3.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
+ "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@pm2/agent/node_modules/lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "license": "ISC",
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@pm2/agent/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@pm2/agent/node_modules/semver": {
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "license": "ISC",
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@pm2/agent/node_modules/ws": {
+ "version": "7.5.10",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz",
+ "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.3.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": "^5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@pm2/io": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/@pm2/io/-/io-6.0.1.tgz",
+ "integrity": "sha512-KiA+shC6sULQAr9mGZ1pg+6KVW9MF8NpG99x26Lf/082/Qy8qsTCtnJy+HQReW1A9Rdf0C/404cz0RZGZro+IA==",
+ "license": "Apache-2",
+ "dependencies": {
+ "async": "~2.6.1",
+ "debug": "~4.3.1",
+ "eventemitter2": "^6.3.1",
+ "require-in-the-middle": "^5.0.0",
+ "semver": "~7.5.4",
+ "shimmer": "^1.2.0",
+ "signal-exit": "^3.0.3",
+ "tslib": "1.9.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ }
+ },
+ "node_modules/@pm2/io/node_modules/async": {
+ "version": "2.6.4",
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
+ "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
+ "license": "MIT",
+ "dependencies": {
+ "lodash": "^4.17.14"
+ }
+ },
+ "node_modules/@pm2/io/node_modules/debug": {
+ "version": "4.3.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
+ "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@pm2/io/node_modules/eventemitter2": {
+ "version": "6.4.9",
+ "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz",
+ "integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==",
+ "license": "MIT"
+ },
+ "node_modules/@pm2/io/node_modules/lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "license": "ISC",
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@pm2/io/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@pm2/io/node_modules/semver": {
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "license": "ISC",
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@pm2/io/node_modules/tslib": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
+ "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==",
+ "license": "Apache-2.0"
+ },
+ "node_modules/@pm2/js-api": {
+ "version": "0.8.0",
+ "resolved": "https://registry.npmjs.org/@pm2/js-api/-/js-api-0.8.0.tgz",
+ "integrity": "sha512-nmWzrA/BQZik3VBz+npRcNIu01kdBhWL0mxKmP1ciF/gTcujPTQqt027N9fc1pK9ERM8RipFhymw7RcmCyOEYA==",
+ "license": "Apache-2",
+ "dependencies": {
+ "async": "^2.6.3",
+ "debug": "~4.3.1",
+ "eventemitter2": "^6.3.1",
+ "extrareqp2": "^1.0.0",
+ "ws": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/@pm2/js-api/node_modules/async": {
+ "version": "2.6.4",
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
+ "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
+ "license": "MIT",
+ "dependencies": {
+ "lodash": "^4.17.14"
+ }
+ },
+ "node_modules/@pm2/js-api/node_modules/debug": {
+ "version": "4.3.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
+ "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@pm2/js-api/node_modules/eventemitter2": {
+ "version": "6.4.9",
+ "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz",
+ "integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==",
+ "license": "MIT"
+ },
+ "node_modules/@pm2/js-api/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@pm2/js-api/node_modules/ws": {
+ "version": "7.5.10",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz",
+ "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.3.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": "^5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@pm2/pm2-version-check": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@pm2/pm2-version-check/-/pm2-version-check-1.0.4.tgz",
+ "integrity": "sha512-SXsM27SGH3yTWKc2fKR4SYNxsmnvuBQ9dd6QHtEWmiZ/VqaOYPAIlS8+vMcn27YLtAEBGvNRSh3TPNvtjZgfqA==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.1"
+ }
+ },
+ "node_modules/@pm2/pm2-version-check/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@pm2/pm2-version-check/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/@socket.io/component-emitter": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz",
+ "integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==",
+ "license": "MIT"
+ },
+ "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==",
+ "license": "MIT"
+ },
+ "node_modules/@supabase/auth-js": {
+ "version": "2.99.0",
+ "resolved": "https://registry.npmjs.org/@supabase/auth-js/-/auth-js-2.99.0.tgz",
+ "integrity": "sha512-tHiIST/OEoLmWBE+3X69xRY5srJM/lL86KltmMlIfDo9ePJLo14vQQV9T4NF+P+MoGhCwQL1GTmk51zuAFMXKw==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "2.8.1"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/@supabase/functions-js": {
+ "version": "2.99.0",
+ "resolved": "https://registry.npmjs.org/@supabase/functions-js/-/functions-js-2.99.0.tgz",
+ "integrity": "sha512-zA9oad6EqGwMLLu2LfP1bXbqKcJGiotAdbdTfZG7YS7619YZQAEgejj9mp+E5vglKE1yMWbKK+S1J3PbuUtgLg==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "2.8.1"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/@supabase/postgrest-js": {
+ "version": "2.99.0",
+ "resolved": "https://registry.npmjs.org/@supabase/postgrest-js/-/postgrest-js-2.99.0.tgz",
+ "integrity": "sha512-8qfOMi2pu9y0IQhUAeFqjrvR49G4ELGevXCWV9qAHXFQ/h2FFh0I8PYjFQj4rHcHSq6hrpozDnS1vbQU8NAQ/A==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "2.8.1"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/@supabase/realtime-js": {
+ "version": "2.99.0",
+ "resolved": "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-2.99.0.tgz",
+ "integrity": "sha512-7nFTZhNeANR7FvEY6PfWLCfE8dHqcaJd9SuR7IPEZvBPG9K4uEHMivpjZx4NWRSU7Eji7ZbKy2LG+cJ48DhwHg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/phoenix": "^1.6.6",
+ "@types/ws": "^8.18.1",
+ "tslib": "2.8.1",
+ "ws": "^8.18.2"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/@supabase/storage-js": {
+ "version": "2.99.0",
+ "resolved": "https://registry.npmjs.org/@supabase/storage-js/-/storage-js-2.99.0.tgz",
+ "integrity": "sha512-mAEEbfsght5EEALejYrwAP9k8sFBGjfMZT8n4SyMXk2iYuWVeRMs1kA/uKg0uDMctWdZ0bL+L4jZzksUJpCjMA==",
+ "license": "MIT",
+ "dependencies": {
+ "iceberg-js": "^0.8.1",
+ "tslib": "2.8.1"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/@supabase/supabase-js": {
+ "version": "2.99.0",
+ "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-2.99.0.tgz",
+ "integrity": "sha512-SP9Sn9tsHDB7N4u2gT13rdeZJewE4xibAxasG7vOz+fYi92+XkMMbWNx0uGK53zKTnAnvTs16isRooyBy4sn5w==",
+ "license": "MIT",
+ "dependencies": {
+ "@supabase/auth-js": "2.99.0",
+ "@supabase/functions-js": "2.99.0",
+ "@supabase/postgrest-js": "2.99.0",
+ "@supabase/realtime-js": "2.99.0",
+ "@supabase/storage-js": "2.99.0"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/@tootallnate/quickjs-emscripten": {
+ "version": "0.23.0",
+ "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz",
+ "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==",
+ "license": "MIT"
+ },
+ "node_modules/@types/cors": {
+ "version": "2.8.19",
+ "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.19.tgz",
+ "integrity": "sha512-mFNylyeyqN93lfe/9CSxOGREz8cpzAhH+E93xJ4xWQf62V8sQ/24reV2nyzUWM6H6Xji+GGHpkbLe7pVoUEskg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/node": {
+ "version": "25.4.0",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-25.4.0.tgz",
+ "integrity": "sha512-9wLpoeWuBlcbBpOY3XmzSTG3oscB6xjBEEtn+pYXTfhyXhIxC5FsBer2KTopBlvKEiW9l13po9fq+SJY/5lkhw==",
+ "license": "MIT",
+ "dependencies": {
+ "undici-types": "~7.18.0"
+ }
+ },
+ "node_modules/@types/phoenix": {
+ "version": "1.6.7",
+ "resolved": "https://registry.npmjs.org/@types/phoenix/-/phoenix-1.6.7.tgz",
+ "integrity": "sha512-oN9ive//QSBkf19rfDv45M7eZPi0eEXylht2OLEXicu5b4KoQ1OzXIw+xDSGWxSxe1JmepRR/ZH283vsu518/Q==",
+ "license": "MIT"
+ },
+ "node_modules/@types/ws": {
+ "version": "8.18.1",
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz",
+ "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@vercel/oidc": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@vercel/oidc/-/oidc-3.1.0.tgz",
+ "integrity": "sha512-Fw28YZpRnA3cAHHDlkt7xQHiJ0fcL+NRcIqsocZQUSmbzeIKRpwttJjik5ZGanXP+vlA4SbTg+AbA3bP363l+w==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/accepts": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
+ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-types": "~2.1.34",
+ "negotiator": "0.6.3"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/agent-base": {
+ "version": "7.1.4",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz",
+ "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/ai": {
+ "version": "6.0.116",
+ "resolved": "https://registry.npmjs.org/ai/-/ai-6.0.116.tgz",
+ "integrity": "sha512-7yM+cTmyRLeNIXwt4Vj+mrrJgVQ9RMIW5WO0ydoLoYkewIvsMcvUmqS4j2RJTUXaF1HphwmSKUMQ/HypNRGOmA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@ai-sdk/gateway": "3.0.66",
+ "@ai-sdk/provider": "3.0.8",
+ "@ai-sdk/provider-utils": "4.0.19",
+ "@opentelemetry/api": "1.9.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "zod": "^3.25.76 || ^4.1.8"
+ }
+ },
+ "node_modules/amp": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/amp/-/amp-0.3.1.tgz",
+ "integrity": "sha512-OwIuC4yZaRogHKiuU5WlMR5Xk/jAcpPtawWL05Gj8Lvm2F6mwoJt4O/bHI+DHwG79vWd+8OFYM4/BzYqyRd3qw==",
+ "license": "MIT"
+ },
+ "node_modules/amp-message": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/amp-message/-/amp-message-0.1.2.tgz",
+ "integrity": "sha512-JqutcFwoU1+jhv7ArgW38bqrE+LQdcRv4NxNw0mp0JHQyB6tXesWRjtYKlDgHRY2o3JE5UTaBGUK8kSWUdxWUg==",
+ "license": "MIT",
+ "dependencies": {
+ "amp": "0.3.1"
+ }
+ },
+ "node_modules/ansi-colors": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz",
+ "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/anymatch": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
+ "license": "ISC",
+ "dependencies": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/argparse": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
+ "license": "Python-2.0"
+ },
+ "node_modules/array-flatten": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
+ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
+ "license": "MIT"
+ },
+ "node_modules/ast-types": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz",
+ "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/async": {
+ "version": "3.2.6",
+ "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz",
+ "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==",
+ "license": "MIT"
+ },
+ "node_modules/balanced-match": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
+ "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "18 || 20 || >=22"
+ }
+ },
+ "node_modules/base64id": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz",
+ "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==",
+ "license": "MIT",
+ "engines": {
+ "node": "^4.5.0 || >= 5.9"
+ }
+ },
+ "node_modules/basic-ftp": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.2.0.tgz",
+ "integrity": "sha512-VoMINM2rqJwJgfdHq6RiUudKt2BV+FY5ZFezP/ypmwayk68+NzzAQy4XXLlqsGD4MCzq3DrmNFD/uUmBJuGoXw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.0.0"
+ }
+ },
+ "node_modules/binary-extensions": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
+ "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/blessed": {
+ "version": "0.1.81",
+ "resolved": "https://registry.npmjs.org/blessed/-/blessed-0.1.81.tgz",
+ "integrity": "sha512-LoF5gae+hlmfORcG1M5+5XZi4LBmvlXTzwJWzUlPryN/SJdSflZvROM2TwkT0GMpq7oqT48NRd4GS7BiVBc5OQ==",
+ "license": "MIT",
+ "bin": {
+ "blessed": "bin/tput.js"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/bodec": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/bodec/-/bodec-0.1.0.tgz",
+ "integrity": "sha512-Ylo+MAo5BDUq1KA3f3R/MFhh+g8cnHmo8bz3YPGhI1znrMaf77ol1sfvYJzsw3nTE+Y2GryfDxBaR+AqpAkEHQ==",
+ "license": "MIT"
+ },
+ "node_modules/body-parser": {
+ "version": "1.20.4",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.4.tgz",
+ "integrity": "sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "~3.1.2",
+ "content-type": "~1.0.5",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "~1.2.0",
+ "http-errors": "~2.0.1",
+ "iconv-lite": "~0.4.24",
+ "on-finished": "~2.4.1",
+ "qs": "~6.14.0",
+ "raw-body": "~2.5.3",
+ "type-is": "~1.6.18",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
+ "node_modules/brace-expansion": {
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz",
+ "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^4.0.2"
+ },
+ "engines": {
+ "node": "18 || 20 || >=22"
+ }
+ },
+ "node_modules/braces": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
+ "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
+ "license": "MIT",
+ "dependencies": {
+ "fill-range": "^7.1.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/buffer-from": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
+ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
+ "license": "MIT"
+ },
+ "node_modules/bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/call-bind-apply-helpers": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
+ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/call-bound": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
+ "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "get-intrinsic": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/chalk": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
+ "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/chalk/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/chalk/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/charm": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/charm/-/charm-0.1.2.tgz",
+ "integrity": "sha512-syedaZ9cPe7r3hoQA9twWYKu5AIyCswN5+szkmPBe9ccdLrj4bYaCnLVPTLd2kgVRc7+zoX4tyPgRnFKCj5YjQ==",
+ "license": "MIT/X11"
+ },
+ "node_modules/chokidar": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
+ "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
+ "license": "MIT",
+ "dependencies": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ },
+ "engines": {
+ "node": ">= 8.10.0"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/cli-tableau": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/cli-tableau/-/cli-tableau-2.0.1.tgz",
+ "integrity": "sha512-he+WTicka9cl0Fg/y+YyxcN6/bfQ/1O3QmgxRXDhABKqLzvoOSM4fMzp39uMyLBulAFuywD2N7UaoQE7WaADxQ==",
+ "dependencies": {
+ "chalk": "3.0.0"
+ },
+ "engines": {
+ "node": ">=8.10.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",
+ "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"
+ },
+ "node_modules/commander": {
+ "version": "2.15.1",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz",
+ "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==",
+ "license": "MIT"
+ },
+ "node_modules/content-disposition": {
+ "version": "0.5.4",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
+ "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "5.2.1"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/content-type": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
+ "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie-signature": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz",
+ "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==",
+ "license": "MIT"
+ },
+ "node_modules/cors": {
+ "version": "2.8.6",
+ "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.6.tgz",
+ "integrity": "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==",
+ "license": "MIT",
+ "dependencies": {
+ "object-assign": "^4",
+ "vary": "^1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/croner": {
+ "version": "4.1.97",
+ "resolved": "https://registry.npmjs.org/croner/-/croner-4.1.97.tgz",
+ "integrity": "sha512-/f6gpQuxDaqXu+1kwQYSckUglPaOrHdbIlBAu0YuW8/Cdb45XwXYNUBXg3r/9Mo6n540Kn/smKcZWko5x99KrQ==",
+ "license": "MIT"
+ },
+ "node_modules/culvert": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/culvert/-/culvert-0.1.2.tgz",
+ "integrity": "sha512-yi1x3EAWKjQTreYWeSd98431AV+IEE0qoDyOoaHJ7KJ21gv6HtBXHVLX74opVSGqcR8/AbjJBHAHpcOy2bj5Gg==",
+ "license": "MIT"
+ },
+ "node_modules/data-uri-to-buffer": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz",
+ "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/dayjs": {
+ "version": "1.11.19",
+ "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz",
+ "integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==",
+ "license": "MIT"
+ },
+ "node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/degenerator": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz",
+ "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ast-types": "^0.13.4",
+ "escodegen": "^2.1.0",
+ "esprima": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/depd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/destroy": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
+ "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
+ "node_modules/dotenv": {
+ "version": "16.6.1",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz",
+ "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://dotenvx.com"
+ }
+ },
+ "node_modules/dunder-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/ee-first": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
+ "license": "MIT"
+ },
+ "node_modules/encodeurl": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
+ "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/engine.io": {
+ "version": "6.6.6",
+ "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.6.tgz",
+ "integrity": "sha512-U2SN0w3OpjFRVlrc17E6TMDmH58Xl9rai1MblNjAdwWp07Kk+llmzX0hjDpQdrDGzwmvOtgM5yI+meYX6iZ2xA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/cors": "^2.8.12",
+ "@types/node": ">=10.0.0",
+ "@types/ws": "^8.5.12",
+ "accepts": "~1.3.4",
+ "base64id": "2.0.0",
+ "cookie": "~0.7.2",
+ "cors": "~2.8.5",
+ "debug": "~4.4.1",
+ "engine.io-parser": "~5.2.1",
+ "ws": "~8.18.3"
+ },
+ "engines": {
+ "node": ">=10.2.0"
+ }
+ },
+ "node_modules/engine.io-parser": {
+ "version": "5.2.3",
+ "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz",
+ "integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.0.0"
+ }
+ },
+ "node_modules/engine.io/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/engine.io/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/engine.io/node_modules/ws": {
+ "version": "8.18.3",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz",
+ "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": ">=5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/enquirer": {
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz",
+ "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-colors": "^4.1.1"
+ },
+ "engines": {
+ "node": ">=8.6"
+ }
+ },
+ "node_modules/es-define-property": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-errors": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-object-atoms": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
+ "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
+ "license": "MIT"
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/escodegen": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz",
+ "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "esprima": "^4.0.1",
+ "estraverse": "^5.2.0",
+ "esutils": "^2.0.2"
+ },
+ "bin": {
+ "escodegen": "bin/escodegen.js",
+ "esgenerate": "bin/esgenerate.js"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "optionalDependencies": {
+ "source-map": "~0.6.1"
+ }
+ },
+ "node_modules/esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "license": "BSD-2-Clause",
+ "bin": {
+ "esparse": "bin/esparse.js",
+ "esvalidate": "bin/esvalidate.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/estraverse": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/etag": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/eventemitter2": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-5.0.1.tgz",
+ "integrity": "sha512-5EM1GHXycJBS6mauYAbVKT1cVs7POKWb2NXD4Vyt8dDqeZa7LaDK1/sjtL+Zb0lzTpSNil4596Dyu97hz37QLg==",
+ "license": "MIT"
+ },
+ "node_modules/eventsource-parser": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.6.tgz",
+ "integrity": "sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/express": {
+ "version": "4.22.1",
+ "resolved": "https://registry.npmjs.org/express/-/express-4.22.1.tgz",
+ "integrity": "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==",
+ "license": "MIT",
+ "dependencies": {
+ "accepts": "~1.3.8",
+ "array-flatten": "1.1.1",
+ "body-parser": "~1.20.3",
+ "content-disposition": "~0.5.4",
+ "content-type": "~1.0.4",
+ "cookie": "~0.7.1",
+ "cookie-signature": "~1.0.6",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "encodeurl": "~2.0.0",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "finalhandler": "~1.3.1",
+ "fresh": "~0.5.2",
+ "http-errors": "~2.0.0",
+ "merge-descriptors": "1.0.3",
+ "methods": "~1.1.2",
+ "on-finished": "~2.4.1",
+ "parseurl": "~1.3.3",
+ "path-to-regexp": "~0.1.12",
+ "proxy-addr": "~2.0.7",
+ "qs": "~6.14.0",
+ "range-parser": "~1.2.1",
+ "safe-buffer": "5.2.1",
+ "send": "~0.19.0",
+ "serve-static": "~1.16.2",
+ "setprototypeof": "1.2.0",
+ "statuses": "~2.0.1",
+ "type-is": "~1.6.18",
+ "utils-merge": "1.0.1",
+ "vary": "~1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.10.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/express-rate-limit": {
+ "version": "7.5.1",
+ "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.5.1.tgz",
+ "integrity": "sha512-7iN8iPMDzOMHPUYllBEsQdWVB6fPDMPqwjBaFrgr4Jgr/+okjvzAy+UHlYYL/Vs0OsOrMkwS6PJDkFlJwoxUnw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/express-rate-limit"
+ },
+ "peerDependencies": {
+ "express": ">= 4.11"
+ }
+ },
+ "node_modules/extrareqp2": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/extrareqp2/-/extrareqp2-1.0.0.tgz",
+ "integrity": "sha512-Gum0g1QYb6wpPJCVypWP3bbIuaibcFiJcpuPM10YSXp/tzqi84x9PJageob+eN4xVRIOto4wjSGNLyMD54D2xA==",
+ "license": "MIT",
+ "dependencies": {
+ "follow-redirects": "^1.14.0"
+ }
+ },
+ "node_modules/fast-json-patch": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.1.1.tgz",
+ "integrity": "sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==",
+ "license": "MIT"
+ },
+ "node_modules/fclone": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/fclone/-/fclone-1.0.11.tgz",
+ "integrity": "sha512-GDqVQezKzRABdeqflsgMr7ktzgF9CyS+p2oe0jJqUY6izSSbhPIQJDpoU4PtGcD7VPM9xh/dVrTu6z1nwgmEGw==",
+ "license": "MIT"
+ },
+ "node_modules/fill-range": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
+ "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
+ "license": "MIT",
+ "dependencies": {
+ "to-regex-range": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/finalhandler": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz",
+ "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "2.6.9",
+ "encodeurl": "~2.0.0",
+ "escape-html": "~1.0.3",
+ "on-finished": "~2.4.1",
+ "parseurl": "~1.3.3",
+ "statuses": "~2.0.2",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/follow-redirects": {
+ "version": "1.15.11",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz",
+ "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/RubenVerborgh"
+ }
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=4.0"
+ },
+ "peerDependenciesMeta": {
+ "debug": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/forwarded": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fresh": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
+ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
+ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "es-define-property": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
+ "function-bind": "^1.1.2",
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "hasown": "^2.0.2",
+ "math-intrinsics": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
+ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
+ "license": "MIT",
+ "dependencies": {
+ "dunder-proto": "^1.0.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/get-uri": {
+ "version": "6.0.5",
+ "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.5.tgz",
+ "integrity": "sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg==",
+ "license": "MIT",
+ "dependencies": {
+ "basic-ftp": "^5.0.2",
+ "data-uri-to-buffer": "^6.0.2",
+ "debug": "^4.3.4"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/get-uri/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/get-uri/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/git-node-fs": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/git-node-fs/-/git-node-fs-1.0.0.tgz",
+ "integrity": "sha512-bLQypt14llVXBg0S0u8q8HmU7g9p3ysH+NvVlae5vILuUvs759665HvmR5+wb04KjHyjFcDRxdYb4kyNnluMUQ==",
+ "license": "MIT"
+ },
+ "node_modules/git-sha1": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/git-sha1/-/git-sha1-0.1.2.tgz",
+ "integrity": "sha512-2e/nZezdVlyCopOCYHeW0onkbZg7xP1Ad6pndPy1rCygeRykefUS6r7oA5cJRGEFvseiaz5a/qUHFVX1dd6Isg==",
+ "license": "MIT"
+ },
+ "node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "license": "ISC",
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/gopd": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
+ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/hasown": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
+ "license": "MIT",
+ "dependencies": {
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/helmet": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/helmet/-/helmet-7.2.0.tgz",
+ "integrity": "sha512-ZRiwvN089JfMXokizgqEPXsl2Guk094yExfoDXR0cBYWxtBbaSww/w+vT4WEJsBW2iTUi1GgZ6swmoug3Oy4Xw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=16.0.0"
+ }
+ },
+ "node_modules/http-errors": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
+ "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
+ "license": "MIT",
+ "dependencies": {
+ "depd": "~2.0.0",
+ "inherits": "~2.0.4",
+ "setprototypeof": "~1.2.0",
+ "statuses": "~2.0.2",
+ "toidentifier": "~1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/http-proxy-agent": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz",
+ "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==",
+ "license": "MIT",
+ "dependencies": {
+ "agent-base": "^7.1.0",
+ "debug": "^4.3.4"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/http-proxy-agent/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/http-proxy-agent/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/https-proxy-agent": {
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",
+ "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",
+ "license": "MIT",
+ "dependencies": {
+ "agent-base": "^7.1.2",
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/https-proxy-agent/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/https-proxy-agent/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/iceberg-js": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/iceberg-js/-/iceberg-js-0.8.1.tgz",
+ "integrity": "sha512-1dhVQZXhcHje7798IVM+xoo/1ZdVfzOMIc8/rgVSijRK38EDqOJoGula9N/8ZI5RD8QTxNQtK/Gozpr+qUqRRA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/iconv-lite": {
+ "version": "0.4.24",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+ "license": "MIT",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/ignore-by-default": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
+ "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "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==",
+ "license": "ISC"
+ },
+ "node_modules/ip-address": {
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz",
+ "integrity": "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 12"
+ }
+ },
+ "node_modules/ipaddr.js": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "license": "MIT",
+ "dependencies": {
+ "binary-extensions": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-core-module": {
+ "version": "2.16.1",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",
+ "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==",
+ "license": "MIT",
+ "dependencies": {
+ "hasown": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "license": "MIT",
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "node_modules/js-git": {
+ "version": "0.7.8",
+ "resolved": "https://registry.npmjs.org/js-git/-/js-git-0.7.8.tgz",
+ "integrity": "sha512-+E5ZH/HeRnoc/LW0AmAyhU+mNcWBzAKE+30+IDMLSLbbK+Tdt02AdkOKq9u15rlJsDEGFqtgckc8ZM59LhhiUA==",
+ "license": "MIT",
+ "dependencies": {
+ "bodec": "^0.1.0",
+ "culvert": "^0.1.2",
+ "git-sha1": "^0.1.2",
+ "pako": "^0.2.5"
+ }
+ },
+ "node_modules/js-yaml": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
+ "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
+ "license": "MIT",
+ "dependencies": {
+ "argparse": "^2.0.1"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ }
+ },
+ "node_modules/json-schema": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz",
+ "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==",
+ "license": "(AFL-2.1 OR BSD-3-Clause)"
+ },
+ "node_modules/json-schema-to-ts": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/json-schema-to-ts/-/json-schema-to-ts-3.1.1.tgz",
+ "integrity": "sha512-+DWg8jCJG2TEnpy7kOm/7/AxaYoaRbjVB4LFZLySZlWn8exGs3A4OLJR966cVvU26N7X9TWxl+Jsw7dzAqKT6g==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.18.3",
+ "ts-algebra": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/json-stringify-safe": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
+ "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==",
+ "license": "ISC",
+ "optional": true
+ },
+ "node_modules/lazy": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/lazy/-/lazy-1.0.11.tgz",
+ "integrity": "sha512-Y+CjUfLmIpoUCCRl0ub4smrYtGGr5AOa2AKOaWelGHOGz33X/Y/KizefGqbkwfz44+cnq/+9habclf8vOmu2LA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.2.0"
+ }
+ },
+ "node_modules/lodash": {
+ "version": "4.17.23",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
+ "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
+ "license": "MIT"
+ },
+ "node_modules/lru-cache": {
+ "version": "7.18.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz",
+ "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/math-intrinsics": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/media-typer": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/merge-descriptors": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
+ "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/methods": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
+ "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
+ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+ "license": "MIT",
+ "bin": {
+ "mime": "cli.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/minimatch": {
+ "version": "10.2.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz",
+ "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==",
+ "dev": true,
+ "license": "BlueOak-1.0.0",
+ "dependencies": {
+ "brace-expansion": "^5.0.2"
+ },
+ "engines": {
+ "node": "18 || 20 || >=22"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/mkdirp": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
+ "license": "MIT",
+ "bin": {
+ "mkdirp": "bin/cmd.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/module-details-from-path": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.4.tgz",
+ "integrity": "sha512-EGWKgxALGMgzvxYF1UyGTy0HXX/2vHLkw6+NvDKW2jypWbHpjQuj4UMcqQWXHERJhVGKikolT06G3bcKe4fi7w==",
+ "license": "MIT"
+ },
+ "node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "license": "MIT"
+ },
+ "node_modules/mute-stream": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
+ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
+ "license": "ISC"
+ },
+ "node_modules/needle": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/needle/-/needle-2.4.0.tgz",
+ "integrity": "sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^3.2.6",
+ "iconv-lite": "^0.4.4",
+ "sax": "^1.2.4"
+ },
+ "bin": {
+ "needle": "bin/needle"
+ },
+ "engines": {
+ "node": ">= 4.4.x"
+ }
+ },
+ "node_modules/needle/node_modules/debug": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/needle/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/negotiator": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/netmask": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz",
+ "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/node-cron": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/node-cron/-/node-cron-4.2.1.tgz",
+ "integrity": "sha512-lgimEHPE/QDgFlywTd8yTR61ptugX3Qer29efeyWw2rv259HtGBNn1vZVmp8lB9uo9wC0t/AT4iGqXxia+CJFg==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/nodemon": {
+ "version": "3.1.14",
+ "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.14.tgz",
+ "integrity": "sha512-jakjZi93UtB3jHMWsXL68FXSAosbLfY0In5gtKq3niLSkrWznrVBzXFNOEMJUfc9+Ke7SHWoAZsiMkNP3vq6Jw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "chokidar": "^3.5.2",
+ "debug": "^4",
+ "ignore-by-default": "^1.0.1",
+ "minimatch": "^10.2.1",
+ "pstree.remy": "^1.1.8",
+ "semver": "^7.5.3",
+ "simple-update-notifier": "^2.0.0",
+ "supports-color": "^5.5.0",
+ "touch": "^3.1.0",
+ "undefsafe": "^2.0.5"
+ },
+ "bin": {
+ "nodemon": "bin/nodemon.js"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/nodemon"
+ }
+ },
+ "node_modules/nodemon/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/nodemon/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/nssocket": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/nssocket/-/nssocket-0.6.0.tgz",
+ "integrity": "sha512-a9GSOIql5IqgWJR3F/JXG4KpJTA3Z53Cj0MeMvGpglytB1nxE4PdFNC0jINe27CS7cGivoynwc054EzCcT3M3w==",
+ "license": "MIT",
+ "dependencies": {
+ "eventemitter2": "~0.4.14",
+ "lazy": "~1.0.11"
+ },
+ "engines": {
+ "node": ">= 0.10.x"
+ }
+ },
+ "node_modules/nssocket/node_modules/eventemitter2": {
+ "version": "0.4.14",
+ "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz",
+ "integrity": "sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ==",
+ "license": "MIT"
+ },
+ "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/object-inspect": {
+ "version": "1.13.4",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
+ "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/on-finished": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+ "license": "MIT",
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/openai": {
+ "version": "6.27.0",
+ "resolved": "https://registry.npmjs.org/openai/-/openai-6.27.0.tgz",
+ "integrity": "sha512-osTKySlrdYrLYTt0zjhY8yp0JUBmWDCN+Q+QxsV4xMQnnoVFpylgKGgxwN8sSdTNw0G4y+WUXs4eCMWpyDNWZQ==",
+ "license": "Apache-2.0",
+ "bin": {
+ "openai": "bin/cli"
+ },
+ "peerDependencies": {
+ "ws": "^8.18.0",
+ "zod": "^3.25 || ^4.0"
+ },
+ "peerDependenciesMeta": {
+ "ws": {
+ "optional": true
+ },
+ "zod": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/pac-proxy-agent": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz",
+ "integrity": "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==",
+ "license": "MIT",
+ "dependencies": {
+ "@tootallnate/quickjs-emscripten": "^0.23.0",
+ "agent-base": "^7.1.2",
+ "debug": "^4.3.4",
+ "get-uri": "^6.0.1",
+ "http-proxy-agent": "^7.0.0",
+ "https-proxy-agent": "^7.0.6",
+ "pac-resolver": "^7.0.1",
+ "socks-proxy-agent": "^8.0.5"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/pac-proxy-agent/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/pac-proxy-agent/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/pac-resolver": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz",
+ "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==",
+ "license": "MIT",
+ "dependencies": {
+ "degenerator": "^5.0.0",
+ "netmask": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/pako": {
+ "version": "0.2.9",
+ "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz",
+ "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==",
+ "license": "MIT"
+ },
+ "node_modules/parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/path-parse": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+ "license": "MIT"
+ },
+ "node_modules/path-to-regexp": {
+ "version": "0.1.12",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
+ "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==",
+ "license": "MIT"
+ },
+ "node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/pidusage": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/pidusage/-/pidusage-3.0.2.tgz",
+ "integrity": "sha512-g0VU+y08pKw5M8EZ2rIGiEBaB8wrQMjYGFfW2QVIfyT8V+fq8YFLkvlz4bz5ljvFDJYNFCWT3PWqcRr2FKO81w==",
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "^5.2.1"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/pm2": {
+ "version": "5.4.3",
+ "resolved": "https://registry.npmjs.org/pm2/-/pm2-5.4.3.tgz",
+ "integrity": "sha512-4/I1htIHzZk1Y67UgOCo4F1cJtas1kSds31N8zN0PybO230id1nigyjGuGFzUnGmUFPmrJ0On22fO1ChFlp7VQ==",
+ "license": "AGPL-3.0",
+ "dependencies": {
+ "@pm2/agent": "~2.0.0",
+ "@pm2/io": "~6.0.1",
+ "@pm2/js-api": "~0.8.0",
+ "@pm2/pm2-version-check": "latest",
+ "async": "~3.2.0",
+ "blessed": "0.1.81",
+ "chalk": "3.0.0",
+ "chokidar": "^3.5.3",
+ "cli-tableau": "^2.0.0",
+ "commander": "2.15.1",
+ "croner": "~4.1.92",
+ "dayjs": "~1.11.5",
+ "debug": "^4.3.1",
+ "enquirer": "2.3.6",
+ "eventemitter2": "5.0.1",
+ "fclone": "1.0.11",
+ "js-yaml": "~4.1.0",
+ "mkdirp": "1.0.4",
+ "needle": "2.4.0",
+ "pidusage": "~3.0",
+ "pm2-axon": "~4.0.1",
+ "pm2-axon-rpc": "~0.7.1",
+ "pm2-deploy": "~1.0.2",
+ "pm2-multimeter": "^0.1.2",
+ "promptly": "^2",
+ "semver": "^7.2",
+ "source-map-support": "0.5.21",
+ "sprintf-js": "1.1.2",
+ "vizion": "~2.2.1"
+ },
+ "bin": {
+ "pm2": "bin/pm2",
+ "pm2-dev": "bin/pm2-dev",
+ "pm2-docker": "bin/pm2-docker",
+ "pm2-runtime": "bin/pm2-runtime"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "optionalDependencies": {
+ "pm2-sysmonit": "^1.2.8"
+ }
+ },
+ "node_modules/pm2-axon": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/pm2-axon/-/pm2-axon-4.0.1.tgz",
+ "integrity": "sha512-kES/PeSLS8orT8dR5jMlNl+Yu4Ty3nbvZRmaAtROuVm9nYYGiaoXqqKQqQYzWQzMYWUKHMQTvBlirjE5GIIxqg==",
+ "license": "MIT",
+ "dependencies": {
+ "amp": "~0.3.1",
+ "amp-message": "~0.1.1",
+ "debug": "^4.3.1",
+ "escape-string-regexp": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=5"
+ }
+ },
+ "node_modules/pm2-axon-rpc": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/pm2-axon-rpc/-/pm2-axon-rpc-0.7.1.tgz",
+ "integrity": "sha512-FbLvW60w+vEyvMjP/xom2UPhUN/2bVpdtLfKJeYM3gwzYhoTEEChCOICfFzxkxuoEleOlnpjie+n1nue91bDQw==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.1"
+ },
+ "engines": {
+ "node": ">=5"
+ }
+ },
+ "node_modules/pm2-axon-rpc/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/pm2-axon-rpc/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/pm2-axon/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/pm2-axon/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/pm2-deploy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/pm2-deploy/-/pm2-deploy-1.0.2.tgz",
+ "integrity": "sha512-YJx6RXKrVrWaphEYf++EdOOx9EH18vM8RSZN/P1Y+NokTKqYAca/ejXwVLyiEpNju4HPZEk3Y2uZouwMqUlcgg==",
+ "license": "MIT",
+ "dependencies": {
+ "run-series": "^1.1.8",
+ "tv4": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/pm2-multimeter": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/pm2-multimeter/-/pm2-multimeter-0.1.2.tgz",
+ "integrity": "sha512-S+wT6XfyKfd7SJIBqRgOctGxaBzUOmVQzTAS+cg04TsEUObJVreha7lvCfX8zzGVr871XwCSnHUU7DQQ5xEsfA==",
+ "license": "MIT/X11",
+ "dependencies": {
+ "charm": "~0.1.1"
+ }
+ },
+ "node_modules/pm2-sysmonit": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/pm2-sysmonit/-/pm2-sysmonit-1.2.8.tgz",
+ "integrity": "sha512-ACOhlONEXdCTVwKieBIQLSi2tQZ8eKinhcr9JpZSUAL8Qy0ajIgRtsLxG/lwPOW3JEKqPyw/UaHmTWhUzpP4kA==",
+ "license": "Apache",
+ "optional": true,
+ "dependencies": {
+ "async": "^3.2.0",
+ "debug": "^4.3.1",
+ "pidusage": "^2.0.21",
+ "systeminformation": "^5.7",
+ "tx2": "~1.0.4"
+ }
+ },
+ "node_modules/pm2-sysmonit/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/pm2-sysmonit/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT",
+ "optional": true
+ },
+ "node_modules/pm2-sysmonit/node_modules/pidusage": {
+ "version": "2.0.21",
+ "resolved": "https://registry.npmjs.org/pidusage/-/pidusage-2.0.21.tgz",
+ "integrity": "sha512-cv3xAQos+pugVX+BfXpHsbyz/dLzX+lr44zNMsYiGxUw+kV5sgQCIcLd1z+0vq+KyC7dJ+/ts2PsfgWfSC3WXA==",
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "safe-buffer": "^5.2.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/pm2/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/pm2/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/promptly": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/promptly/-/promptly-2.2.0.tgz",
+ "integrity": "sha512-aC9j+BZsRSSzEsXBNBwDnAxujdx19HycZoKgRgzWnS8eOHg1asuf9heuLprfbe739zY3IdUQx+Egv6Jn135WHA==",
+ "license": "MIT",
+ "dependencies": {
+ "read": "^1.0.4"
+ }
+ },
+ "node_modules/proxy-addr": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+ "license": "MIT",
+ "dependencies": {
+ "forwarded": "0.2.0",
+ "ipaddr.js": "1.9.1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/proxy-agent": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.3.1.tgz",
+ "integrity": "sha512-Rb5RVBy1iyqOtNl15Cw/llpeLH8bsb37gM1FUfKQ+Wck6xHlbAhWGUFiTRHtkjqGTA5pSHz6+0hrPW/oECihPQ==",
+ "license": "MIT",
+ "dependencies": {
+ "agent-base": "^7.0.2",
+ "debug": "^4.3.4",
+ "http-proxy-agent": "^7.0.0",
+ "https-proxy-agent": "^7.0.2",
+ "lru-cache": "^7.14.1",
+ "pac-proxy-agent": "^7.0.1",
+ "proxy-from-env": "^1.1.0",
+ "socks-proxy-agent": "^8.0.2"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/proxy-agent/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/proxy-agent/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/proxy-from-env": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
+ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
+ "license": "MIT"
+ },
+ "node_modules/pstree.remy": {
+ "version": "1.1.8",
+ "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
+ "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/qs": {
+ "version": "6.14.2",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz",
+ "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "side-channel": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=0.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/range-parser": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/raw-body": {
+ "version": "2.5.3",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz",
+ "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "~3.1.2",
+ "http-errors": "~2.0.1",
+ "iconv-lite": "~0.4.24",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/read": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz",
+ "integrity": "sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ==",
+ "license": "ISC",
+ "dependencies": {
+ "mute-stream": "~0.0.4"
+ },
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "license": "MIT",
+ "dependencies": {
+ "picomatch": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=8.10.0"
+ }
+ },
+ "node_modules/require-in-the-middle": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-5.2.0.tgz",
+ "integrity": "sha512-efCx3b+0Z69/LGJmm9Yvi4cqEdxnoGnxYxGxBghkkTTFeXRtTCmmhO0AnAfHz59k957uTSuy8WaHqOs8wbYUWg==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.1.1",
+ "module-details-from-path": "^1.0.3",
+ "resolve": "^1.22.1"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/require-in-the-middle/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/require-in-the-middle/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/resolve": {
+ "version": "1.22.11",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz",
+ "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==",
+ "license": "MIT",
+ "dependencies": {
+ "is-core-module": "^2.16.1",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ },
+ "bin": {
+ "resolve": "bin/resolve"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/run-series": {
+ "version": "1.1.9",
+ "resolved": "https://registry.npmjs.org/run-series/-/run-series-1.1.9.tgz",
+ "integrity": "sha512-Arc4hUN896vjkqCYrUXquBFtRZdv1PfLbTYP71efP6butxyQ0kWpiNJyAgsxscmQg1cqvHY32/UCBzXedTpU2g==",
+ "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/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==",
+ "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==",
+ "license": "MIT"
+ },
+ "node_modules/sax": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/sax/-/sax-1.5.0.tgz",
+ "integrity": "sha512-21IYA3Q5cQf089Z6tgaUTr7lDAyzoTPx5HRtbhsME8Udispad8dC/+sziTNugOEx54ilvatQ9YCzl4KQLPcRHA==",
+ "license": "BlueOak-1.0.0",
+ "engines": {
+ "node": ">=11.0.0"
+ }
+ },
+ "node_modules/semver": {
+ "version": "7.7.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz",
+ "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/send": {
+ "version": "0.19.2",
+ "resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz",
+ "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "encodeurl": "~2.0.0",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "fresh": "~0.5.2",
+ "http-errors": "~2.0.1",
+ "mime": "1.6.0",
+ "ms": "2.1.3",
+ "on-finished": "~2.4.1",
+ "range-parser": "~1.2.1",
+ "statuses": "~2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/send/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/serve-static": {
+ "version": "1.16.3",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz",
+ "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==",
+ "license": "MIT",
+ "dependencies": {
+ "encodeurl": "~2.0.0",
+ "escape-html": "~1.0.3",
+ "parseurl": "~1.3.3",
+ "send": "~0.19.1"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/setprototypeof": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
+ "license": "ISC"
+ },
+ "node_modules/shimmer": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz",
+ "integrity": "sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==",
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/side-channel": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
+ "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.3",
+ "side-channel-list": "^1.0.0",
+ "side-channel-map": "^1.0.1",
+ "side-channel-weakmap": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-list": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
+ "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-map": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
+ "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-weakmap": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
+ "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3",
+ "side-channel-map": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/signal-exit": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
+ "license": "ISC"
+ },
+ "node_modules/simple-update-notifier": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
+ "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "semver": "^7.5.3"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/smart-buffer": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
+ "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6.0.0",
+ "npm": ">= 3.0.0"
+ }
+ },
+ "node_modules/socket.io": {
+ "version": "4.8.3",
+ "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.8.3.tgz",
+ "integrity": "sha512-2Dd78bqzzjE6KPkD5fHZmDAKRNe3J15q+YHDrIsy9WEkqttc7GY+kT9OBLSMaPbQaEd0x1BjcmtMtXkfpc+T5A==",
+ "license": "MIT",
+ "dependencies": {
+ "accepts": "~1.3.4",
+ "base64id": "~2.0.0",
+ "cors": "~2.8.5",
+ "debug": "~4.4.1",
+ "engine.io": "~6.6.0",
+ "socket.io-adapter": "~2.5.2",
+ "socket.io-parser": "~4.2.4"
+ },
+ "engines": {
+ "node": ">=10.2.0"
+ }
+ },
+ "node_modules/socket.io-adapter": {
+ "version": "2.5.6",
+ "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.6.tgz",
+ "integrity": "sha512-DkkO/dz7MGln0dHn5bmN3pPy+JmywNICWrJqVWiVOyvXjWQFIv9c2h24JrQLLFJ2aQVQf/Cvl1vblnd4r2apLQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "~4.4.1",
+ "ws": "~8.18.3"
+ }
+ },
+ "node_modules/socket.io-adapter/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/socket.io-adapter/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/socket.io-adapter/node_modules/ws": {
+ "version": "8.18.3",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz",
+ "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": ">=5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/socket.io-parser": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.5.tgz",
+ "integrity": "sha512-bPMmpy/5WWKHea5Y/jYAP6k74A+hvmRCQaJuJB6I/ML5JZq/KfNieUVo/3Mh7SAqn7TyFdIo6wqYHInG1MU1bQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@socket.io/component-emitter": "~3.1.0",
+ "debug": "~4.4.1"
+ },
+ "engines": {
+ "node": ">=10.0.0"
+ }
+ },
+ "node_modules/socket.io-parser/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/socket.io-parser/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/socket.io/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/socket.io/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/socks": {
+ "version": "2.8.7",
+ "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz",
+ "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==",
+ "license": "MIT",
+ "dependencies": {
+ "ip-address": "^10.0.1",
+ "smart-buffer": "^4.2.0"
+ },
+ "engines": {
+ "node": ">= 10.0.0",
+ "npm": ">= 3.0.0"
+ }
+ },
+ "node_modules/socks-proxy-agent": {
+ "version": "8.0.5",
+ "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz",
+ "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==",
+ "license": "MIT",
+ "dependencies": {
+ "agent-base": "^7.1.2",
+ "debug": "^4.3.4",
+ "socks": "^2.8.3"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/socks-proxy-agent/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/socks-proxy-agent/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/source-map-support": {
+ "version": "0.5.21",
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
+ "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
+ "license": "MIT",
+ "dependencies": {
+ "buffer-from": "^1.0.0",
+ "source-map": "^0.6.0"
+ }
+ },
+ "node_modules/sprintf-js": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz",
+ "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/statuses": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
+ "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/supports-preserve-symlinks-flag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/systeminformation": {
+ "version": "5.31.4",
+ "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.31.4.tgz",
+ "integrity": "sha512-lZppDyQx91VdS5zJvAyGkmwe+Mq6xY978BDUG2wRkWE+jkmUF5ti8cvOovFQoN5bvSFKCXVkyKEaU5ec3SJiRg==",
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin",
+ "linux",
+ "win32",
+ "freebsd",
+ "openbsd",
+ "netbsd",
+ "sunos",
+ "android"
+ ],
+ "bin": {
+ "systeminformation": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ },
+ "funding": {
+ "type": "Buy me a coffee",
+ "url": "https://www.buymeacoffee.com/systeminfo"
+ }
+ },
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "license": "MIT",
+ "dependencies": {
+ "is-number": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/toidentifier": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
+ "node_modules/touch": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz",
+ "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "nodetouch": "bin/nodetouch.js"
+ }
+ },
+ "node_modules/ts-algebra": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ts-algebra/-/ts-algebra-2.0.0.tgz",
+ "integrity": "sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw==",
+ "license": "MIT"
+ },
+ "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/tv4": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/tv4/-/tv4-1.3.0.tgz",
+ "integrity": "sha512-afizzfpJgvPr+eDkREK4MxJ/+r8nEEHcmitwgnPUqpaP+FpwQyadnxNoSACbgc/b1LsZYtODGoPiFxQrgJgjvw==",
+ "license": [
+ {
+ "type": "Public Domain",
+ "url": "http://geraintluff.github.io/tv4/LICENSE.txt"
+ },
+ {
+ "type": "MIT",
+ "url": "http://jsonary.com/LICENSE.txt"
+ }
+ ],
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/tx2": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/tx2/-/tx2-1.0.5.tgz",
+ "integrity": "sha512-sJ24w0y03Md/bxzK4FU8J8JveYYUbSs2FViLJ2D/8bytSiyPRbuE3DyL/9UKYXTZlV3yXq0L8GLlhobTnekCVg==",
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "json-stringify-safe": "^5.0.1"
+ }
+ },
+ "node_modules/type-is": {
+ "version": "1.6.18",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
+ "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+ "license": "MIT",
+ "dependencies": {
+ "media-typer": "0.3.0",
+ "mime-types": "~2.1.24"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/undefsafe": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
+ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/undici-types": {
+ "version": "7.18.2",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
+ "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
+ "license": "MIT"
+ },
+ "node_modules/unpipe": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/utils-merge": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
+ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/uuid": {
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
+ "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",
+ "funding": [
+ "https://github.com/sponsors/broofa",
+ "https://github.com/sponsors/ctavan"
+ ],
+ "license": "MIT",
+ "bin": {
+ "uuid": "dist/bin/uuid"
+ }
+ },
+ "node_modules/vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/vizion": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/vizion/-/vizion-2.2.1.tgz",
+ "integrity": "sha512-sfAcO2yeSU0CSPFI/DmZp3FsFE9T+8913nv1xWBOyzODv13fwkn6Vl7HqxGpkr9F608M+8SuFId3s+BlZqfXww==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "async": "^2.6.3",
+ "git-node-fs": "^1.0.0",
+ "ini": "^1.3.5",
+ "js-git": "^0.7.8"
+ },
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/vizion/node_modules/async": {
+ "version": "2.6.4",
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
+ "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
+ "license": "MIT",
+ "dependencies": {
+ "lodash": "^4.17.14"
+ }
+ },
+ "node_modules/ws": {
+ "version": "8.19.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz",
+ "integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": ">=5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "license": "ISC"
+ },
+ "node_modules/zod": {
+ "version": "4.3.6",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz",
+ "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/colinhacks"
+ }
+ }
+ }
+}
diff --git a/server/package.json b/server/package.json
new file mode 100644
index 000000000..f61d7cd78
--- /dev/null
+++ b/server/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "@aeohub/ansvisor-server",
+ "version": "0.1.0",
+ "description": "Ansvisor - AI Engine Optimization Server",
+ "main": "src/server.js",
+ "type": "module",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/aeohub/ansvisor.git",
+ "directory": "server"
+ },
+ "homepage": "https://github.com/aeohub/ansvisor",
+ "scripts": {
+ "dev": "NODE_ENV=development nodemon src/server.js",
+ "start": "NODE_ENV=production pm2 start src/server.js --max-restarts 10000"
+ },
+ "keywords": [],
+ "author": "Empler AI Inc.",
+ "license": "MIT",
+ "dependencies": {
+ "@ai-sdk/anthropic": "^3.0.58",
+ "@ai-sdk/google": "^3.0.43",
+ "@ai-sdk/openai": "^3.0.41",
+ "@anthropic-ai/sdk": "^0.78.0",
+ "@supabase/supabase-js": "^2.49.1",
+ "ai": "^6.0.116",
+ "body-parser": "^1.20.2",
+ "cors": "^2.8.5",
+ "dotenv": "^16.3.1",
+ "express": "^4.18.2",
+ "express-rate-limit": "^7.1.4",
+ "helmet": "^7.1.0",
+ "node-cron": "^4.2.1",
+ "openai": "^6.27.0",
+ "pm2": "^5.3.0",
+ "socket.io": "^4.7.2",
+ "uuid": "^9.0.0",
+ "zod": "^4.3.6"
+ },
+ "devDependencies": {
+ "nodemon": "^3.0.2"
+ }
+}
diff --git a/server/src/config/plans.js b/server/src/config/plans.js
new file mode 100644
index 000000000..fe8896f3c
--- /dev/null
+++ b/server/src/config/plans.js
@@ -0,0 +1,128 @@
+/**
+ * Plan definitions — must stay in sync with frontend (aeo/src/config/plans.ts).
+ * Self-hosted instances bypass all limits (IS_CLOUD !== "true").
+ */
+
+export const PLANS = {
+ self_hosted: {
+ id: 'self_hosted',
+ name: 'Self-Hosted',
+ limits: {
+ maxBrands: -1,
+ maxPrompts: -1,
+ maxPlatforms: 8,
+ maxTeamMembers: -1,
+ maxDomainsPerBrand: -1,
+ maxVolumeAnalyses: -1,
+ maxDailyOnDemand: -1,
+ onDemandCooldownMinutes: 0,
+ features: [
+ 'basic_insights',
+ 'prompt_suggestions',
+ 'prompt_volumes',
+ 'advanced_analytics',
+ 'daily_monitoring',
+ 'competitor_tracking',
+ 'content_optimization',
+ 'custom_reports',
+ 'api_access',
+ ],
+ },
+ },
+ starter: {
+ id: 'starter',
+ name: 'Starter',
+ limits: {
+ maxBrands: 1,
+ maxPrompts: 50,
+ maxPlatforms: 4,
+ maxTeamMembers: 1,
+ maxDomainsPerBrand: 3,
+ maxVolumeAnalyses: 4,
+ maxDailyOnDemand: 3,
+ onDemandCooldownMinutes: 15,
+ features: [
+ 'basic_insights',
+ 'prompt_suggestions',
+ 'prompt_volumes',
+ 'advanced_analytics',
+ 'daily_monitoring',
+ 'competitor_tracking',
+ 'content_optimization',
+ 'custom_reports',
+ 'api_access',
+ ],
+ },
+ },
+ growth: {
+ id: 'growth',
+ name: 'Growth',
+ limits: {
+ maxBrands: 10,
+ maxPrompts: 200,
+ maxPlatforms: 8,
+ maxTeamMembers: 3,
+ maxDomainsPerBrand: 10,
+ maxVolumeAnalyses: 10,
+ maxDailyOnDemand: 10,
+ onDemandCooldownMinutes: 5,
+ features: [
+ 'basic_insights',
+ 'prompt_suggestions',
+ 'prompt_volumes',
+ 'advanced_analytics',
+ 'daily_monitoring',
+ 'competitor_tracking',
+ 'content_optimization',
+ 'custom_reports',
+ 'api_access',
+ ],
+ },
+ },
+ enterprise: {
+ id: 'enterprise',
+ name: 'Enterprise',
+ limits: {
+ maxBrands: -1,
+ maxPrompts: -1,
+ maxPlatforms: 8,
+ maxTeamMembers: -1,
+ maxDomainsPerBrand: -1,
+ maxVolumeAnalyses: -1,
+ maxDailyOnDemand: -1,
+ onDemandCooldownMinutes: 0,
+ features: [
+ 'basic_insights',
+ 'prompt_suggestions',
+ 'prompt_volumes',
+ 'advanced_analytics',
+ 'daily_monitoring',
+ 'competitor_tracking',
+ 'content_optimization',
+ 'custom_reports',
+ 'api_access',
+ 'white_label',
+ 'sso_saml',
+ ],
+ },
+ },
+};
+
+export function isCloud() {
+ return process.env.IS_CLOUD === 'true';
+}
+
+export function getPlan(planId) {
+ if (!isCloud()) return PLANS.self_hosted;
+ return PLANS[planId] || PLANS.starter;
+}
+
+export function hasFeature(plan, feature) {
+ return plan.limits.features.includes(feature);
+}
+
+export function isWithinLimit(plan, key, currentCount) {
+ const limit = plan.limits[key];
+ if (limit === -1) return true;
+ return currentCount < limit;
+}
diff --git a/server/src/config/supabase.js b/server/src/config/supabase.js
new file mode 100644
index 000000000..e74cfa1d9
--- /dev/null
+++ b/server/src/config/supabase.js
@@ -0,0 +1,27 @@
+import 'dotenv/config';
+import { createClient } from '@supabase/supabase-js';
+
+const supabaseUrl = process.env.SUPABASE_URL;
+const supabaseServiceRoleKey = process.env.SUPABASE_SERVICE_ROLE_KEY;
+const supabaseAnonKey = process.env.SUPABASE_ANON_KEY;
+
+if (!supabaseUrl || !supabaseServiceRoleKey) {
+ console.error(
+ 'Missing SUPABASE_URL or SUPABASE_SERVICE_ROLE_KEY environment variables'
+ );
+ process.exit(1);
+}
+
+// Admin client with service role key — bypasses RLS, use only on server side
+const supabaseAdmin = createClient(supabaseUrl, supabaseServiceRoleKey, {
+ auth: {
+ autoRefreshToken: false,
+ persistSession: false,
+ },
+});
+
+// Public client with anon key — respects RLS
+const supabase = createClient(supabaseUrl, supabaseAnonKey || supabaseServiceRoleKey);
+
+export { supabaseAdmin, supabase };
+export default supabaseAdmin;
diff --git a/server/src/db/.gitkeep b/server/src/db/.gitkeep
new file mode 100644
index 000000000..8b1378917
--- /dev/null
+++ b/server/src/db/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/server/src/lib/.gitkeep b/server/src/lib/.gitkeep
new file mode 100644
index 000000000..8b1378917
--- /dev/null
+++ b/server/src/lib/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/server/src/lib/ai-provider.js b/server/src/lib/ai-provider.js
new file mode 100644
index 000000000..e9ad3dbfd
--- /dev/null
+++ b/server/src/lib/ai-provider.js
@@ -0,0 +1,89 @@
+/**
+ * Vercel AI SDK provider registry
+ * Resolves "provider/model" strings to SDK-compatible model instances
+ */
+
+import { createOpenAI } from '@ai-sdk/openai';
+import { createAnthropic } from '@ai-sdk/anthropic';
+import { createGoogleGenerativeAI } from '@ai-sdk/google';
+
+const providers = {};
+
+/** @type {ReturnType<typeof createOpenAI> | null} */
+let openaiProvider = null;
+
+/** @type {ReturnType<typeof createGoogleGenerativeAI> | null} */
+let googleProvider = null;
+
+// Initialize providers based on available API keys
+if (process.env.OPENAI_API_KEY) {
+ openaiProvider = createOpenAI({ apiKey: process.env.OPENAI_API_KEY });
+ providers.openai = openaiProvider;
+}
+
+if (process.env.ANTHROPIC_API_KEY) {
+ providers.anthropic = createAnthropic({
+ apiKey: process.env.ANTHROPIC_API_KEY,
+ });
+}
+
+if (process.env.GOOGLE_GENERATIVE_AI_API_KEY) {
+ googleProvider = createGoogleGenerativeAI({
+ apiKey: process.env.GOOGLE_GENERATIVE_AI_API_KEY,
+ });
+ providers.google = googleProvider;
+}
+
+/**
+ * Resolve a "provider/model" string into a Vercel AI SDK model instance
+ * @param {string} modelString - e.g. "openai/gpt-4o-mini", "anthropic/claude-sonnet-4-20250514", "google/gemini-pro"
+ * @returns AI SDK model instance
+ */
+export function resolveModel(modelString, options) {
+ const defaultModel =
+ process.env.DEFAULT_SUGGESTION_MODEL || 'openai/gpt-5-mini';
+ const target = modelString || defaultModel;
+
+ const [providerName, ...modelParts] = target.split('/');
+ const modelId = modelParts.join('/');
+
+ const provider = providers[providerName];
+ if (!provider) {
+ const available = Object.keys(providers);
+ throw new Error(
+ `Provider "${providerName}" is not configured. Available: ${available.join(', ') || 'none (add API keys to .env)'}`,
+ );
+ }
+
+ return provider(modelId, options);
+}
+
+/**
+ * List available providers (those with API keys configured)
+ * @returns {string[]}
+ */
+export function getAvailableProviders() {
+ return Object.keys(providers);
+}
+
+/**
+ * Get the raw OpenAI provider instance (for .responses() and .tools)
+ * @returns {ReturnType<typeof createOpenAI>}
+ */
+export function getOpenAIProvider() {
+ if (!openaiProvider) {
+ throw new Error('OpenAI provider is not configured. Add OPENAI_API_KEY to .env');
+ }
+ return openaiProvider;
+}
+
+/**
+ * Get the raw Google Generative AI provider instance
+ * @returns {ReturnType<typeof createGoogleGenerativeAI>}
+ */
+export function getGoogleProvider() {
+ if (!googleProvider) {
+ throw new Error('Google provider is not configured. Add GOOGLE_GENERATIVE_AI_API_KEY to .env');
+ }
+ return googleProvider;
+}
diff --git a/server/src/lib/ai-tracker.js b/server/src/lib/ai-tracker.js
new file mode 100644
index 000000000..a26ef1c70
--- /dev/null
+++ b/server/src/lib/ai-tracker.js
@@ -0,0 +1,29 @@
+/**
+ * Unified AI tracker that routes to the correct provider (OpenAI or Anthropic)
+ * based on the model name.
+ */
+
+import { runPrompt as runPromptOpenAI } from './openai-tracker.js';
+import { runPromptAnthropic } from './anthropic-tracker.js';
+
+const ANTHROPIC_PREFIXES = ['claude-'];
+
+function isAnthropicModel(model) {
+ return ANTHROPIC_PREFIXES.some((prefix) => model.startsWith(prefix));
+}
+
+/**
+ * Run a prompt through the appropriate AI provider based on model name.
+ * @param {string} promptText
+ * @param {string} model
+ * @param {string} [region]
+ * @returns {Promise<{ text: string, citations: Array<{ url: string, title: string, startIndex: number, endIndex: number }>, model: string }>}
+ */
+export async function runPrompt(promptText, model, region) {
+ if (isAnthropicModel(model)) {
+ return runPromptAnthropic(promptText, model, region);
+ }
+ return runPromptOpenAI(promptText, model, region);
+}
+
+export { analyzeSentimentAI } from './openai-tracker.js';
diff --git a/server/src/lib/anthropic-tracker.js b/server/src/lib/anthropic-tracker.js
new file mode 100644
index 000000000..97dab2b61
--- /dev/null
+++ b/server/src/lib/anthropic-tracker.js
@@ -0,0 +1,70 @@
+/**
+ * Anthropic Messages API client with web_search tool for prompt tracking.
+ * Sends prompts to Claude and returns the response with citations.
+ */
+
+import Anthropic from '@anthropic-ai/sdk';
+
+let client = null;
+
+function getClient() {
+ if (!client) {
+ if (!process.env.ANTHROPIC_API_KEY) {
+ throw new Error('ANTHROPIC_API_KEY is not configured');
+ }
+ client = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY });
+ }
+ return client;
+}
+
+/**
+ * Run a single prompt through Anthropic Messages API with web_search enabled.
+ * @param {string} promptText
+ * @param {string} model - e.g. "claude-sonnet-4-6"
+ * @param {string} [region] - ISO 2-letter country code for web_search user_location
+ * @returns {Promise<{ text: string, citations: Array<{ url: string, title: string, startIndex: number, endIndex: number }>, model: string }>}
+ */
+export async function runPromptAnthropic(promptText, model, region) {
+ const anthropic = getClient();
+
+ const webSearchTool = {
+ type: 'web_search_20250305',
+ name: 'web_search',
+ max_uses: 5,
+ };
+
+ if (region) {
+ webSearchTool.user_location = { type: 'approximate', country: region };
+ }
+
+ const response = await anthropic.messages.create({
+ model,
+ max_tokens: 4096,
+ messages: [{ role: 'user', content: promptText }],
+ tools: [webSearchTool],
+ });
+
+ let text = '';
+ const citations = [];
+
+ for (const block of response.content || []) {
+ if (block.type === 'text') {
+ text += block.text;
+
+ if (block.citations) {
+ for (const cite of block.citations) {
+ if (cite.type === 'web_search_result_location') {
+ citations.push({
+ url: cite.url || '',
+ title: cite.title || '',
+ startIndex: cite.start_index ?? 0,
+ endIndex: cite.end_index ?? 0,
+ });
+ }
+ }
+ }
+ }
+ }
+
+ return { text, citations, model };
+}
diff --git a/server/src/lib/cloro-scraper.js b/server/src/lib/cloro-scraper.js
new file mode 100644
index 000000000..cb874c1b7
--- /dev/null
+++ b/server/src/lib/cloro-scraper.js
@@ -0,0 +1,250 @@
+/**
+ * Cloro scraper client — async-only.
+ * All requests go through the Cloro async task API (submit + poll).
+ *
+ * Docs:
+ * - Async requests: https://docs.cloro.dev/guides/making-requests#asynchronous-requests
+ * - Task status: https://docs.cloro.dev/api-reference/endpoint/get-task-status
+ */
+
+const CLORO_API = 'https://api.cloro.dev';
+
+const SCRAPER_TASK_TYPES = {
+ 'chatgpt-web': 'CHATGPT',
+ 'google-aio': 'GOOGLE',
+ 'google-aimode': 'AIMODE',
+ 'copilot-web': 'COPILOT',
+ 'grok-web': 'GROK',
+ 'perplexity-web': 'PERPLEXITY',
+ 'gemini-web': 'GEMINI',
+};
+
+const DEFAULT_MAX_WAIT_MS = 5 * 60 * 1000; // 5 minutes
+const DEFAULT_POLL_INTERVAL_MS = 3000; // 3 seconds
+
+function getApiKey() {
+ const key = process.env.CLORO_API_KEY;
+ if (!key) throw new Error('CLORO_API_KEY must be configured');
+ return key;
+}
+
+function buildRequestBody(promptText, scraperId, region) {
+ const country = region || 'US';
+
+ if (scraperId === 'google-aio') {
+ return {
+ query: promptText,
+ country,
+ include: {
+ html: false,
+ aioverview: { markdown: true },
+ },
+ };
+ }
+
+ if (scraperId === 'google-aimode') {
+ return {
+ prompt: promptText,
+ country,
+ include: {
+ html: false,
+ markdown: true,
+ },
+ };
+ }
+
+ return {
+ prompt: promptText,
+ country,
+ include: {
+ html: false,
+ markdown: true,
+ rawResponse: false,
+ searchQueries: false,
+ },
+ };
+}
+
+function parseResponse(result, scraperId) {
+ if (scraperId === 'google-aio') {
+ const aio = result.aioverview;
+ if (!aio) {
+ throw new Error('Google did not return an AI Overview for this query');
+ }
+
+ const text = aio.markdown || aio.text || '';
+ const citations = (aio.sources || []).map((src, idx) => ({
+ url: src.url || '',
+ title: src.label || '',
+ startIndex: idx * 100,
+ endIndex: idx * 100 + 50,
+ }));
+
+ return { text, citations, model: 'google-aio' };
+ }
+
+ if (scraperId === 'google-aimode') {
+ const aiMode = result.result || result;
+ const text = aiMode.markdown || aiMode.text || '';
+ const citations = (aiMode.sources || []).map((src, idx) => ({
+ url: src.url || '',
+ title: src.label || '',
+ startIndex: idx * 100,
+ endIndex: idx * 100 + 50,
+ }));
+
+ return { text, citations, model: 'google-aimode' };
+ }
+
+ const text = result.markdown || result.text || '';
+ const model = result.model || scraperId;
+ const citations = (result.sources || []).map((src, idx) => ({
+ url: src.url || '',
+ title: src.label || '',
+ startIndex: idx * 100,
+ endIndex: idx * 100 + 50,
+ }));
+
+ return { text, citations, model };
+}
+
+/**
+ * Submit a scraper task to the Cloro async queue.
+ * @param {string} promptText
+ * @param {string} scraperId
+ * @param {string} [region]
+ * @returns {Promise<{ taskId: string, scraperId: string }>}
+ */
+export async function submitScraperTask(promptText, scraperId, region) {
+ const taskType = SCRAPER_TASK_TYPES[scraperId];
+ if (!taskType) throw new Error(`Unknown scraper: ${scraperId}`);
+
+ const payload = buildRequestBody(promptText, scraperId, region);
+
+ console.log(
+ `[cloro] Submitting ${taskType} task | scraper=${scraperId} region=${region || 'US'} prompt="${promptText.slice(0, 60)}..."`,
+ );
+
+ const res = await fetch(`${CLORO_API}/v1/async/task`, {
+ method: 'POST',
+ headers: {
+ Authorization: `Bearer ${getApiKey()}`,
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({ taskType, payload }),
+ });
+
+ if (!res.ok) {
+ const errorBody = await res.text().catch(() => '');
+ console.error(
+ `[cloro] Submit failed ${res.status} for ${scraperId}: ${errorBody.slice(0, 300)}`,
+ );
+ throw new Error(
+ `Cloro async submit error ${res.status}: ${errorBody.slice(0, 300)}`,
+ );
+ }
+
+ const data = await res.json();
+
+ if (!data.success || !data.task?.id) {
+ console.error(
+ `[cloro] Submit returned no task ID for ${scraperId}:`,
+ JSON.stringify(data).slice(0, 300),
+ );
+ throw new Error(
+ `Cloro async submit failed: ${data.error || 'No task ID returned'}`,
+ );
+ }
+
+ console.log(
+ `[cloro] Task submitted: id=${data.task.id} type=${taskType} scraper=${scraperId}`,
+ );
+ return { taskId: data.task.id, scraperId };
+}
+
+/**
+ * Poll a Cloro async task until it completes or fails.
+ * @param {string} taskId
+ * @param {string} scraperId - needed to parse the response correctly
+ * @param {{ maxWaitMs?: number, pollIntervalMs?: number }} [opts]
+ * @returns {Promise<{ text: string, citations: Array, model: string }>}
+ */
+export async function pollScraperResult(taskId, scraperId, opts = {}) {
+ const maxWait = opts.maxWaitMs ?? DEFAULT_MAX_WAIT_MS;
+ const interval = opts.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS;
+ const deadline = Date.now() + maxWait;
+ let pollCount = 0;
+
+ while (Date.now() < deadline) {
+ pollCount++;
+ const res = await fetch(`${CLORO_API}/v1/async/task/${taskId}`, {
+ headers: { Authorization: `Bearer ${getApiKey()}` },
+ });
+
+ if (!res.ok) {
+ if (res.status === 404) {
+ console.error(
+ `[cloro] Poll #${pollCount} task=${taskId}: 404 not found`,
+ );
+ throw new Error(`Cloro task ${taskId} not found`);
+ }
+ const errorBody = await res.text().catch(() => '');
+ console.error(
+ `[cloro] Poll #${pollCount} task=${taskId}: HTTP ${res.status}`,
+ );
+ throw new Error(
+ `Cloro poll error ${res.status}: ${errorBody.slice(0, 300)}`,
+ );
+ }
+
+ const data = await res.json();
+ const status = data.task?.status;
+
+ if (status === 'COMPLETED') {
+ console.log(
+ `[cloro] Task ${taskId} COMPLETED after ${pollCount} polls (${scraperId})`,
+ );
+ const result = data.response;
+ if (!result)
+ throw new Error(
+ `Cloro task ${taskId} completed but returned no response`,
+ );
+ return parseResponse(result, scraperId);
+ }
+
+ if (status === 'FAILED') {
+ const errMsg =
+ data.response?.error || data.task?.failedReason || 'Unknown failure';
+ console.error(
+ `[cloro] Task ${taskId} FAILED after ${pollCount} polls: ${errMsg}`,
+ );
+ throw new Error(`Cloro task ${taskId} failed: ${errMsg}`);
+ }
+
+ if (pollCount === 1 || pollCount % 5 === 0) {
+ console.log(
+ `[cloro] Task ${taskId} status=${status} poll #${pollCount} (${scraperId})`,
+ );
+ }
+
+ await new Promise((r) => setTimeout(r, interval));
+ }
+
+ console.error(
+ `[cloro] Task ${taskId} TIMED OUT after ${pollCount} polls / ${maxWait / 1000}s`,
+ );
+ throw new Error(`Cloro task ${taskId} timed out after ${maxWait / 1000}s`);
+}
+
+/**
+ * Run a prompt through a Cloro scraper (async submit + poll).
+ * Drop-in replacement for the old sync runScraperPrompt.
+ * @param {string} promptText
+ * @param {string} scraperId
+ * @param {string} [region]
+ * @returns {Promise<{ text: string, citations: Array<{ url: string, title: string, startIndex: number, endIndex: number }>, model: string }>}
+ */
+export async function runScraperPrompt(promptText, scraperId, region) {
+ const { taskId } = await submitScraperTask(promptText, scraperId, region);
+ return pollScraperResult(taskId, scraperId);
+}
diff --git a/server/src/lib/dataforseo.js b/server/src/lib/dataforseo.js
new file mode 100644
index 000000000..7f81fb838
--- /dev/null
+++ b/server/src/lib/dataforseo.js
@@ -0,0 +1,68 @@
+const DATAFORSEO_API_URL =
+ 'https://api.dataforseo.com/v3/keywords_data/google_ads/search_volume/live';
+
+function getAuthHeader() {
+ const login = process.env.DATAFORSEO_LOGIN;
+ const password = process.env.DATAFORSEO_PASSWORD;
+
+ if (!login || !password) {
+ throw new Error(
+ 'DATAFORSEO_LOGIN and DATAFORSEO_PASSWORD must be set in environment variables',
+ );
+ }
+
+ return 'Basic ' + Buffer.from(`${login}:${password}`).toString('base64');
+}
+
+/**
+ * Fetch Google Ads search volume for a list of keywords via DataForSEO.
+ * @param {string[]} keywords - Up to 1000 keywords
+ * @param {{ locationCode?: number, languageCode?: string }} options
+ * @returns {Promise<Record<string, number>>} Map of keyword → monthly search volume
+ */
+export async function getSearchVolumes(keywords, options = {}) {
+ const body = [
+ {
+ keywords,
+ ...(options.locationCode && { location_code: options.locationCode }),
+ ...(options.languageCode && { language_code: options.languageCode }),
+ },
+ ];
+
+ const response = await fetch(DATAFORSEO_API_URL, {
+ method: 'POST',
+ headers: {
+ Authorization: getAuthHeader(),
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify(body),
+ });
+
+ if (!response.ok) {
+ throw new Error(
+ `DataForSEO API error (${response.status}): ${response.statusText}`,
+ );
+ }
+
+ const data = await response.json();
+
+ if (data.status_code !== 20000) {
+ throw new Error(
+ `DataForSEO error: ${data.status_message || 'Unknown error'}`,
+ );
+ }
+
+ const task = data.tasks?.[0];
+ if (!task || task.status_code !== 20000) {
+ throw new Error(
+ `DataForSEO task error: ${task?.status_message || 'No task returned'}`,
+ );
+ }
+
+ const volumes = {};
+ for (const item of task.result || []) {
+ volumes[item.keyword] = item.search_volume ?? 0;
+ }
+
+ return volumes;
+}
diff --git a/server/src/lib/job-manager.js b/server/src/lib/job-manager.js
new file mode 100644
index 000000000..6bb6299aa
--- /dev/null
+++ b/server/src/lib/job-manager.js
@@ -0,0 +1,186 @@
+/**
+ * Supabase-based job manager — replaces Bull/Redis queue.
+ * Provides CRUD operations for the `jobs` table and in-memory
+ * AbortController tracking for cancellation support.
+ */
+
+import supabaseAdmin from '../config/supabase.js';
+
+/** @type {Map<string, AbortController>} */
+const activeJobs = new Map();
+
+/**
+ * Insert a new job row and return it.
+ * @param {{ type: 'tracking'|'content', brandId: string, data: object, maxAttempts?: number }} opts
+ */
+export async function createJob({ type, brandId, data, maxAttempts }) {
+ const { data: job, error } = await supabaseAdmin
+ .from('jobs')
+ .insert({
+ type,
+ brand_id: brandId,
+ data: data || {},
+ max_attempts: maxAttempts ?? (type === 'tracking' ? 3 : 2),
+ })
+ .select()
+ .single();
+
+ if (error) throw new Error(`Failed to create job: ${error.message}`);
+ return job;
+}
+
+/**
+ * Update job progress (called from workers during execution).
+ */
+export async function updateJobProgress(jobId, progress) {
+ const { error } = await supabaseAdmin
+ .from('jobs')
+ .update({ progress, updated_at: new Date().toISOString() })
+ .eq('id', jobId);
+
+ if (error) console.error(`[job-manager] Failed to update progress for ${jobId}:`, error.message);
+}
+
+/**
+ * Mark a job as completed with its result.
+ */
+export async function completeJob(jobId, result) {
+ const now = new Date().toISOString();
+ const { error } = await supabaseAdmin
+ .from('jobs')
+ .update({
+ status: 'completed',
+ result,
+ completed_at: now,
+ updated_at: now,
+ })
+ .eq('id', jobId);
+
+ if (error) console.error(`[job-manager] Failed to complete job ${jobId}:`, error.message);
+}
+
+/**
+ * Mark a job as failed.
+ */
+export async function failJob(jobId, reason) {
+ const { error } = await supabaseAdmin
+ .from('jobs')
+ .update({
+ status: 'failed',
+ failed_reason: reason,
+ updated_at: new Date().toISOString(),
+ })
+ .eq('id', jobId);
+
+ if (error) console.error(`[job-manager] Failed to fail job ${jobId}:`, error.message);
+}
+
+/**
+ * Mark a job as active and increment attempts.
+ */
+export async function markJobActive(jobId) {
+ const now = new Date().toISOString();
+
+ // Use rpc-free approach: fetch then update
+ const { data: job } = await supabaseAdmin
+ .from('jobs')
+ .select('attempts')
+ .eq('id', jobId)
+ .single();
+
+ const { error } = await supabaseAdmin
+ .from('jobs')
+ .update({
+ status: 'active',
+ started_at: now,
+ updated_at: now,
+ attempts: (job?.attempts || 0) + 1,
+ })
+ .eq('id', jobId);
+
+ if (error) console.error(`[job-manager] Failed to mark job active ${jobId}:`, error.message);
+}
+
+/**
+ * Fetch a single job by ID. Returns null if not found.
+ */
+export async function getJob(jobId) {
+ const { data: job, error } = await supabaseAdmin
+ .from('jobs')
+ .select('*')
+ .eq('id', jobId)
+ .single();
+
+ if (error) return null;
+ return job;
+}
+
+/**
+ * Cancel a job — updates DB status and aborts in-memory signal.
+ */
+export async function cancelJob(jobId) {
+ const { error } = await supabaseAdmin
+ .from('jobs')
+ .update({
+ status: 'cancelled',
+ updated_at: new Date().toISOString(),
+ })
+ .eq('id', jobId);
+
+ if (error) console.error(`[job-manager] Failed to cancel job ${jobId}:`, error.message);
+
+ const controller = activeJobs.get(jobId);
+ if (controller) controller.abort();
+}
+
+/** Register an active job's AbortController. */
+export function registerActiveJob(jobId, abortController) {
+ activeJobs.set(jobId, abortController);
+}
+
+/** Unregister a finished job. */
+export function unregisterActiveJob(jobId) {
+ activeJobs.delete(jobId);
+}
+
+/** Check if a job has been cancelled via its abort signal. */
+export function isJobCancelled(jobId) {
+ const controller = activeJobs.get(jobId);
+ return controller ? controller.signal.aborted : false;
+}
+
+/**
+ * On server startup, mark any leftover 'active' jobs as failed.
+ */
+export async function cleanupStaleJobs() {
+ const { data, error } = await supabaseAdmin
+ .from('jobs')
+ .update({
+ status: 'failed',
+ failed_reason: 'Server restarted during execution',
+ updated_at: new Date().toISOString(),
+ })
+ .eq('status', 'active')
+ .select('id');
+
+ if (error) {
+ console.error('[job-manager] Failed to cleanup stale jobs:', error.message);
+ } else if (data && data.length > 0) {
+ console.log(`[job-manager] Cleaned up ${data.length} stale active jobs`);
+ }
+}
+
+/**
+ * Delete jobs older than 7 days. Call from daily cron.
+ */
+export async function cleanupOldJobs() {
+ const cutoff = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString();
+ const { error } = await supabaseAdmin
+ .from('jobs')
+ .delete()
+ .lt('created_at', cutoff);
+
+ if (error) {
+ console.error('[job-manager] Failed to cleanup old jobs:', error.message);
+ }
+}
diff --git a/server/src/lib/job-runner.js b/server/src/lib/job-runner.js
new file mode 100644
index 000000000..b60d1dd04
--- /dev/null
+++ b/server/src/lib/job-runner.js
@@ -0,0 +1,162 @@
+/**
+ * Job runner — orchestrates async job execution with concurrency
+ * control, retry logic, and Socket.IO notifications.
+ * Replaces Bull's queue.process() mechanism.
+ */
+
+import {
+ getJob,
+ markJobActive,
+ completeJob,
+ failJob,
+ updateJobProgress,
+ registerActiveJob,
+ unregisterActiveJob,
+} from './job-manager.js';
+import { processTrackingJob } from '../workers/tracking-worker.js';
+import { processContentJob } from '../workers/content-worker.js';
+
+// Concurrency counters (matches previous Bull concurrency of 2 per queue)
+let activeTrackingCount = 0;
+const MAX_CONCURRENT_TRACKING = 2;
+let activeContentCount = 0;
+const MAX_CONCURRENT_CONTENT = 2;
+
+/**
+ * Create a mock job object that mirrors the Bull job interface
+ * used by processTrackingJob / processContentJob.
+ */
+function createJobProxy(jobId, signal) {
+ return {
+ progress: (data) => updateJobProgress(jobId, data),
+ signal,
+ };
+}
+
+/**
+ * Run a tracking job. Call without await (fire-and-forget).
+ * Handles concurrency gating, retry, and Socket.IO emit.
+ */
+export async function runTrackingJob(jobId, io) {
+ if (activeTrackingCount >= MAX_CONCURRENT_TRACKING) {
+ setTimeout(() => runTrackingJob(jobId, io), 5000);
+ return;
+ }
+
+ const jobRow = await getJob(jobId);
+ if (!jobRow || jobRow.status === 'cancelled') return;
+
+ activeTrackingCount++;
+ const abortController = new AbortController();
+ registerActiveJob(jobId, abortController);
+
+ try {
+ await markJobActive(jobId);
+
+ const { brandId, promptId, promptIds, immediate } = jobRow.data;
+ const proxy = createJobProxy(jobId, abortController.signal);
+
+ const result = await processTrackingJob({ brandId, promptId, promptIds, job: proxy });
+
+ await completeJob(jobId, result);
+
+ if (io) {
+ io.emit('tracking:complete', {
+ brandId,
+ resultCount: result.resultCount,
+ immediate: !!immediate,
+ });
+ }
+ } catch (err) {
+ if (abortController.signal.aborted) {
+ console.log(`[job-runner] Tracking job ${jobId} was cancelled`);
+ return;
+ }
+
+ console.error(`[job-runner] Tracking job ${jobId} failed:`, err.message);
+
+ // Re-fetch to get latest attempts count
+ const latest = await getJob(jobId);
+ if (latest && latest.attempts < latest.max_attempts) {
+ const delay = latest.attempts * 30_000; // exponential-ish backoff
+ console.log(`[job-runner] Retrying tracking job ${jobId} in ${delay / 1000}s (attempt ${latest.attempts}/${latest.max_attempts})`);
+
+ await failJob(jobId, err.message);
+ // Reset to waiting for retry
+ const supabaseAdmin = (await import('../config/supabase.js')).default;
+ await supabaseAdmin
+ .from('jobs')
+ .update({ status: 'waiting', updated_at: new Date().toISOString() })
+ .eq('id', jobId);
+
+ setTimeout(() => runTrackingJob(jobId, io), delay);
+ } else {
+ await failJob(jobId, err.message);
+ }
+ } finally {
+ unregisterActiveJob(jobId);
+ activeTrackingCount--;
+ }
+}
+
+/**
+ * Run a content generation job. Call without await (fire-and-forget).
+ */
+export async function runContentJob(jobId, io) {
+ if (activeContentCount >= MAX_CONCURRENT_CONTENT) {
+ setTimeout(() => runContentJob(jobId, io), 5000);
+ return;
+ }
+
+ const jobRow = await getJob(jobId);
+ if (!jobRow || jobRow.status === 'cancelled') return;
+
+ activeContentCount++;
+ const abortController = new AbortController();
+ registerActiveJob(jobId, abortController);
+
+ try {
+ await markJobActive(jobId);
+
+ const { brandId, model } = jobRow.data;
+ const proxy = createJobProxy(jobId, abortController.signal);
+
+ const result = await processContentJob({ brandId, model, job: proxy });
+
+ await completeJob(jobId, result);
+
+ if (io) {
+ io.emit('content:generated', {
+ brandId,
+ generated: result.generated,
+ });
+ }
+ } catch (err) {
+ if (abortController.signal.aborted) {
+ console.log(`[job-runner] Content job ${jobId} was cancelled`);
+ return;
+ }
+
+ console.error(`[job-runner] Content job ${jobId} failed:`, err.message);
+
+ const latest = await getJob(jobId);
+ if (latest && latest.attempts < latest.max_attempts) {
+ const delay = latest.attempts * 15_000;
+ console.log(`[job-runner] Retrying content job ${jobId} in ${delay / 1000}s (attempt ${latest.attempts}/${latest.max_attempts})`);
+
+ await failJob(jobId, err.message);
+ const supabaseAdmin = (await import('../config/supabase.js')).default;
+ await supabaseAdmin
+ .from('jobs')
+ .update({ status: 'waiting', updated_at: new Date().toISOString() })
+ .eq('id', jobId);
+
+ setTimeout(() => runContentJob(jobId, io), delay);
+ } else {
+ await failJob(jobId, err.message);
+ }
+ } finally {
+ unregisterActiveJob(jobId);
+ activeContentCount--;
+ }
+}
diff --git a/server/src/lib/languages.js b/server/src/lib/languages.js
new file mode 100644
index 000000000..e0918abbc
--- /dev/null
+++ b/server/src/lib/languages.js
@@ -0,0 +1,19 @@
+export const LANGUAGE_NAMES = {
+ en: 'English',
+ de: 'German',
+ fr: 'French',
+ es: 'Spanish',
+ tr: 'Turkish',
+ ja: 'Japanese',
+ pt: 'Portuguese',
+ hi: 'Hindi',
+ ko: 'Korean',
+ it: 'Italian',
+ nl: 'Dutch',
+ sv: 'Swedish',
+ ar: 'Arabic',
+};
+
+export function getLanguageName(code) {
+ return LANGUAGE_NAMES[code] || 'English';
+}
diff --git a/server/src/lib/openai-tracker.js b/server/src/lib/openai-tracker.js
new file mode 100644
index 000000000..c0549b4ff
--- /dev/null
+++ b/server/src/lib/openai-tracker.js
@@ -0,0 +1,117 @@
+/**
+ * OpenAI Responses API client with web_search tool for prompt tracking.
+ * Sends prompts to OpenAI and returns the response with citations.
+ */
+
+import OpenAI from 'openai';
+
+const DEFAULT_MODEL = 'gpt-5-chat-latest';
+
+let client = null;
+
+function getClient() {
+ if (!client) {
+ if (!process.env.OPENAI_API_KEY) {
+ throw new Error('OPENAI_API_KEY is not configured');
+ }
+ client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
+ }
+ return client;
+}
+
+/**
+ * Run a single prompt through OpenAI Responses API with web_search enabled.
+ * @param {string} promptText - The prompt to send
+ * @param {string} [model] - OpenAI model name (defaults to gpt-5-chat-latest)
+ * @param {string} [region] - ISO 2-letter country code for web_search user_location
+ * @returns {Promise<{ text: string, citations: Array<{ url: string, title: string, startIndex: number, endIndex: number }>, model: string }>}
+ */
+export async function runPrompt(promptText, model, region) {
+ const openai = getClient();
+ const modelName = model || DEFAULT_MODEL;
+
+ const webSearchTool = { type: 'web_search' };
+ if (region) {
+ webSearchTool.user_location = { type: 'approximate', country: region };
+ }
+
+ const response = await openai.responses.create({
+ model: modelName,
+ tools: [webSearchTool],
+ input: promptText,
+ });
+
+ const text = response.output_text || '';
+
+ const citations = [];
+ for (const item of response.output || []) {
+ if (item.type === 'message' && item.content) {
+ for (const block of item.content) {
+ if (block.type === 'output_text' && block.annotations) {
+ for (const ann of block.annotations) {
+ if (ann.type === 'url_citation') {
+ citations.push({
+ url: ann.url,
+ title: ann.title || '',
+ startIndex: ann.start_index,
+ endIndex: ann.end_index,
+ });
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return { text, citations, model: modelName };
+}
+
+const SENTIMENT_MODEL = 'gpt-5-mini';
+
+/**
+ * Analyze sentiment of an AI response toward a specific brand using gpt-5-mini.
+ * Returns structured sentiment with confidence and reasoning.
+ * @param {string} responseText - The AI-generated response text
+ * @param {string} brandName - The brand name to analyze sentiment for
+ * @returns {Promise<{ sentiment: 'positive'|'neutral'|'negative', confidence: number, reason: string }>}
+ */
+export async function analyzeSentimentAI(responseText, brandName) {
+ const openai = getClient();
+
+ try {
+ const response = await openai.responses.create({
+ model: SENTIMENT_MODEL,
+ input: [
+ {
+ role: 'system',
+ content: `You are a brand sentiment analyzer. Given an AI-generated response and a brand name, determine the sentiment toward that brand. Respond ONLY with valid JSON in this exact format: {"sentiment":"positive"|"neutral"|"negative","confidence":0.0-1.0,"reason":"one sentence explanation"}`,
+ },
+ {
+ role: 'user',
+ content: `Brand: "${brandName}"\n\nAI Response:\n${responseText.slice(0, 3000)}`,
+ },
+ ],
+ });
+
+ const raw = (response.output_text || '').trim();
+ const json = JSON.parse(raw);
+
+ const sentiment = ['positive', 'neutral', 'negative'].includes(
+ json.sentiment,
+ )
+ ? json.sentiment
+ : 'neutral';
+ const confidence =
+ typeof json.confidence === 'number'
+ ? Math.max(0, Math.min(1, json.confidence))
+ : 0.5;
+
+ return { sentiment, confidence, reason: json.reason || '' };
+ } catch (err) {
+ console.error(
+ '[sentiment-ai] Failed, falling back to neutral:',
+ err.message,
+ );
+ return { sentiment: 'neutral', confidence: 0, reason: 'Analysis failed' };
+ }
+}
diff --git a/server/src/lib/opportunity-generator.js b/server/src/lib/opportunity-generator.js
new file mode 100644
index 000000000..eef3c6c1c
--- /dev/null
+++ b/server/src/lib/opportunity-generator.js
@@ -0,0 +1,170 @@
+/**
+ * Standalone opportunity generation function used by the tracking worker.
+ * Calls the content generate endpoint logic directly without HTTP.
+ */
+
+import { generateObject } from 'ai';
+import { z } from 'zod';
+import { resolveModel } from './ai-provider.js';
+import supabaseAdmin from '../config/supabase.js';
+
+const opportunitySchema = z.object({
+ opportunities: z
+ .array(
+ z.object({
+ title: z.string(),
+ description: z.string(),
+ type: z.enum(['owned', 'earned']),
+ impact: z.enum(['high', 'medium', 'low']),
+ relatedPromptIndex: z.number(),
+ }),
+ )
+ .min(1)
+ .max(20),
+});
+
+const SYSTEM_PROMPT = `You are an AEO content strategist. Given a brand's AI visibility data, generate specific, actionable content recommendations.
+Rules:
+- Each recommendation must be concrete and actionable.
+- Reference specific data points: volumes, visibility scores, competitor gaps.
+- Focus on content that will improve the brand's visibility in AI-generated answers.
+- Categorize as "owned" or "earned".
+- Generate between 5 and 15 opportunities.`;
+
+function computeScore(volume, visibility, competitorGap, intent) {
+ const weights = {
+ comparison: 1.0, 'best-top': 0.95, 'vs-review': 0.9, recommendation: 0.85,
+ 'how-to': 0.75, 'problem-solving': 0.7, 'what-is': 0.6, other: 0.5,
+ };
+ const nv = Math.min(volume / 50000, 1);
+ const vg = (100 - (visibility || 0)) / 100;
+ const cg = Math.min((competitorGap || 0) / 100, 1);
+ const iw = weights[intent] || 0.5;
+ return Math.round(Math.min(nv * 40 + vg * 30 + cg * 20 + iw * 10, 100) * 100) / 100;
+}
+
+export async function generateContentOpportunities(brandId) {
+ console.log(`[opportunities] Generating for brand ${brandId}`);
+
+ const { data: brand } = await supabaseAdmin
+ .from('brands')
+ .select('id, name, description, industry')
+ .eq('id', brandId)
+ .single();
+ if (!brand) return;
+
+ const { data: domains } = await supabaseAdmin
+ .from('brand_domains')
+ .select('domain')
+ .eq('brand_id', brandId);
+
+ const { data: promptSets } = await supabaseAdmin
+ .from('prompt_sets')
+ .select('id')
+ .eq('brand_id', brandId);
+ if (!promptSets?.length) return;
+
+ const setIds = promptSets.map((ps) => ps.id);
+ const { data: prompts } = await supabaseAdmin
+ .from('prompts')
+ .select('id, text, category')
+ .in('prompt_set_id', setIds)
+ .eq('is_active', true);
+ if (!prompts?.length) return;
+
+ const promptIds = prompts.map((p) => p.id);
+
+ const [volRes, resRes, compRes] = await Promise.all([
+ supabaseAdmin.from('prompt_volumes').select('*').in('prompt_id', promptIds),
+ supabaseAdmin
+ .from('prompt_results')
+ .select('prompt_id, visibility_score, competitor_mentions')
+ .in('prompt_id', promptIds)
+ .order('created_at', { ascending: false }),
+ supabaseAdmin.from('competitors').select('name').eq('brand_id', brandId),
+ ]);
+
+ const volMap = {};
+ for (const v of volRes.data || []) volMap[v.prompt_id] = v;
+
+ const resMap = {};
+ for (const r of resRes.data || []) {
+ if (!resMap[r.prompt_id]) resMap[r.prompt_id] = [];
+ resMap[r.prompt_id].push(r);
+ }
+
+ const testedPrompts = prompts.filter((p) => (resMap[p.id] || []).length > 0);
+ if (!testedPrompts.length) return;
+
+ const scored = testedPrompts
+ .map((p) => {
+ const vol = volMap[p.id];
+ const res = resMap[p.id] || [];
+ const avgVis = res.length ? Math.round(res.reduce((s, r) => s + r.visibility_score, 0) / res.length) : 0;
+ const compMentions = {};
+ for (const r of res) {
+ const cms = typeof r.competitor_mentions === 'string' ? JSON.parse(r.competitor_mentions) : r.competitor_mentions;
+ for (const cm of cms || []) compMentions[cm.name] = (compMentions[cm.name] || 0) + (cm.visibility_score || 0);
+ }
+ const cg = Object.values(compMentions).length
+ ? Math.round(Object.values(compMentions).reduce((a, b) => a + b, 0) / Object.values(compMentions).length) - avgVis
+ : 0;
+
+ return {
+ promptId: p.id, text: p.text, category: p.category || 'unknown',
+ estAiVolume: vol?.est_ai_volume || 0, intent: vol?.intent || 'other',
+ keywords: vol?.keywords || [], avgVisibility: avgVis, competitorGap: cg,
+ competitorsCited: Object.keys(compMentions),
+ score: computeScore(vol?.est_ai_volume || 0, avgVis, cg, vol?.intent || 'other'),
+ };
+ })
+ .sort((a, b) => b.score - a.score)
+ .slice(0, 25);
+
+ if (!scored.length) return;
+
+ const userPrompt = `Brand: ${brand.name}
+Industry: ${brand.industry || 'Not specified'}
+Domain: ${(domains || []).map((d) => d.domain).join(', ') || 'N/A'}
+Competitors: ${(compRes.data || []).map((c) => c.name).join(', ') || 'None'}
+
+Prompt Data:
+${scored.map((p, i) => `[${i}] "${p.text}" | Intent: ${p.intent} | AI Vol: ${p.estAiVolume}/mo | Vis: ${p.avgVisibility}% | Gap: ${p.competitorGap}%`).join('\n')}
+
+Generate actionable content opportunities.`;
+
+ const { object } = await generateObject({
+ model: resolveModel(),
+ schema: opportunitySchema,
+ system: SYSTEM_PROMPT,
+ prompt: userPrompt,
+ });
+
+ await supabaseAdmin
+ .from('content_opportunities')
+ .delete()
+ .eq('brand_id', brandId)
+ .in('status', ['new']);
+
+ const rows = object.opportunities.map((opp) => {
+ const rel = scored[opp.relatedPromptIndex] || scored[0];
+ return {
+ brand_id: brandId,
+ prompt_id: rel.promptId,
+ title: opp.title,
+ description: opp.description,
+ type: opp.type,
+ impact: opp.impact,
+ opportunity_score: rel.score,
+ status: 'new',
+ source_data: {
+ promptText: rel.text, estAiVolume: rel.estAiVolume,
+ visibilityScore: rel.avgVisibility, competitorGap: rel.competitorGap,
+ intent: rel.intent, keywords: rel.keywords, competitorsCited: rel.competitorsCited,
+ },
+ };
+ });
+
+ await supabaseAdmin.from('content_opportunities').insert(rows);
+ console.log(`[opportunities] Generated ${rows.length} opportunities for brand ${brandId}`);
+}
diff --git a/server/src/lib/plan-guard.js b/server/src/lib/plan-guard.js
new file mode 100644
index 000000000..8d04d4fe2
--- /dev/null
+++ b/server/src/lib/plan-guard.js
@@ -0,0 +1,195 @@
+import supabaseAdmin from '../config/supabase.js';
+import {
+ getPlan,
+ hasFeature,
+ isWithinLimit,
+ isCloud,
+} from '../config/plans.js';
+
+export class PlanLimitError extends Error {
+ constructor(message, statusCode = 403) {
+ super(message);
+ this.name = 'PlanLimitError';
+ this.statusCode = statusCode;
+ }
+}
+
+/**
+ * Resolve the user's organization plan from the database.
+ * Self-hosted → returns self_hosted plan (unlimited).
+ */
+async function resolveOrgPlan(userId) {
+ if (!isCloud()) return getPlan('self_hosted');
+
+ const { data: profile } = await supabaseAdmin
+ .from('profiles')
+ .select('organization_id')
+ .eq('id', userId)
+ .single();
+
+ if (!profile?.organization_id) {
+ throw new PlanLimitError('No organization found for user.', 400);
+ }
+
+ const { data: org } = await supabaseAdmin
+ .from('organizations')
+ .select('plan, subscription_status')
+ .eq('id', profile.organization_id)
+ .single();
+
+ if (!org || org.subscription_status !== 'active') {
+ return getPlan('starter');
+ }
+
+ return getPlan(org.plan);
+}
+
+/**
+ * Enforce that the user's plan includes a specific feature.
+ * Throws PlanLimitError if not.
+ */
+export async function enforceFeature(userId, feature) {
+ const plan = await resolveOrgPlan(userId);
+ if (!hasFeature(plan, feature)) {
+ throw new PlanLimitError(
+ `Your ${plan.name} plan does not include "${feature}". Please upgrade.`,
+ );
+ }
+ return plan;
+}
+
+/**
+ * Enforce that the user's plan has not exceeded a numeric limit.
+ * Throws PlanLimitError if limit reached.
+ */
+export async function enforceLimit(userId, limitKey, currentCount) {
+ const plan = await resolveOrgPlan(userId);
+ if (!isWithinLimit(plan, limitKey, currentCount)) {
+ const max = plan.limits[limitKey];
+ throw new PlanLimitError(
+ `Plan limit reached: maximum ${max} ${limitKey} on the ${plan.name} plan. Please upgrade.`,
+ );
+ }
+ return plan;
+}
+
+/**
+ * Enforce monthly volume analysis quota.
+ * Returns { plan, remaining, orgId } on success, throws PlanLimitError if quota exceeded.
+ */
+export async function enforceVolumeQuota(userId) {
+ const plan = await resolveOrgPlan(userId);
+ const maxAnalyses = plan.limits.maxVolumeAnalyses;
+ if (maxAnalyses === -1) {
+ const { data: profile } = await supabaseAdmin
+ .from('profiles')
+ .select('organization_id')
+ .eq('id', userId)
+ .single();
+ return { plan, remaining: -1, orgId: profile?.organization_id };
+ }
+
+ const { data: profile } = await supabaseAdmin
+ .from('profiles')
+ .select('organization_id')
+ .eq('id', userId)
+ .single();
+
+ if (!profile?.organization_id) {
+ throw new PlanLimitError('No organization found for user.', 400);
+ }
+
+ const startOfMonth = new Date();
+ startOfMonth.setUTCDate(1);
+ startOfMonth.setUTCHours(0, 0, 0, 0);
+
+ const { count } = await supabaseAdmin
+ .from('volume_usage')
+ .select('*', { count: 'exact', head: true })
+ .eq('organization_id', profile.organization_id)
+ .gte('used_at', startOfMonth.toISOString());
+
+ const used = count || 0;
+ if (used >= maxAnalyses) {
+ throw new PlanLimitError(
+ `Monthly volume analysis limit reached (${used}/${maxAnalyses}). Resets on the 1st of next month.`,
+ );
+ }
+
+ return { plan, remaining: maxAnalyses - used, orgId: profile.organization_id };
+}
+
+/**
+ * Get current volume quota status without enforcing.
+ * Returns { used, limit, remaining }.
+ */
+export async function getVolumeQuotaStatus(userId) {
+ const plan = await resolveOrgPlan(userId);
+ const maxAnalyses = plan.limits.maxVolumeAnalyses;
+ if (maxAnalyses === -1) return { used: 0, limit: -1, remaining: -1 };
+
+ const { data: profile } = await supabaseAdmin
+ .from('profiles')
+ .select('organization_id')
+ .eq('id', userId)
+ .single();
+
+ if (!profile?.organization_id) return { used: 0, limit: maxAnalyses, remaining: maxAnalyses };
+
+ const startOfMonth = new Date();
+ startOfMonth.setUTCDate(1);
+ startOfMonth.setUTCHours(0, 0, 0, 0);
+
+ const { count } = await supabaseAdmin
+ .from('volume_usage')
+ .select('*', { count: 'exact', head: true })
+ .eq('organization_id', profile.organization_id)
+ .gte('used_at', startOfMonth.toISOString());
+
+ const used = count || 0;
+ return { used, limit: maxAnalyses, remaining: maxAnalyses - used };
+}
+
+/**
+ * Express middleware that attaches req.plan from the authenticated user.
+ * Must run after auth middleware (req.user must exist).
+ */
+export function attachPlan() {
+ return async (req, res, next) => {
+ try {
+ req.plan = await resolveOrgPlan(req.user.id);
+ next();
+ } catch (err) {
+ if (err instanceof PlanLimitError) {
+ return res.status(err.statusCode).json({
+ success: false,
+ error: 'plan_limit',
+ message: err.message,
+ });
+ }
+ next(err);
+ }
+ };
+}
+
+/**
+ * Express middleware factory — blocks the request if the plan lacks a feature.
+ * Usage: router.post('/suggest', requireFeature('prompt_suggestions'), handler)
+ */
+export function requireFeature(feature) {
+ return async (req, res, next) => {
+ try {
+ await enforceFeature(req.user.id, feature);
+ next();
+ } catch (err) {
+ if (err instanceof PlanLimitError) {
+ return res.status(err.statusCode).json({
+ success: false,
+ error: 'plan_limit',
+ message: err.message,
+ });
+ }
+ next(err);
+ }
+ };
+}
diff --git a/server/src/lib/response-parser.js b/server/src/lib/response-parser.js
new file mode 100644
index 000000000..60b66a60e
--- /dev/null
+++ b/server/src/lib/response-parser.js
@@ -0,0 +1,139 @@
+/**
+ * Parses an AI response to extract brand visibility metrics.
+ * Mentions and citations are computed locally; sentiment comes from AI.
+ */
+
+/**
+ * Strip markdown link URLs so only display text remains.
+ * "[label](https://example.com/path)" → "label"
+ * Also removes bare URLs (https://...) that aren't inside markdown links.
+ */
+function stripUrls(text) {
+ let cleaned = text.replace(/\[([^\]]*)\]\([^)]+\)/g, '$1');
+ cleaned = cleaned.replace(/https?:\/\/[^\s)>\]]+/g, '');
+ return cleaned;
+}
+
+/**
+ * Count case-insensitive occurrences of a term in text.
+ */
+function countOccurrences(text, term) {
+ if (!term) return 0;
+ const escaped = term.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
+ const regex = new RegExp(`\\b${escaped}\\b`, 'gi');
+ return (text.match(regex) || []).length;
+}
+
+/**
+ * Count how many times the brand (name or any of its domains) is mentioned
+ * in an AI response. URL-stripped to avoid double-counting citations.
+ * Used to short-circuit sentiment analysis when the brand isn't mentioned.
+ */
+export function countBrandMentions(text, brand) {
+ const cleanText = stripUrls(text);
+ let count = countOccurrences(cleanText, brand.brandName);
+ for (const domain of brand.domains) {
+ count += countOccurrences(cleanText, domain);
+ }
+ return count;
+}
+
+/**
+ * Parse the AI response and compute visibility metrics for a brand.
+ * Sentiment must be provided externally (from AI analysis).
+ * @param {{ text: string, citations: Array<{ url: string, title: string, startIndex: number, endIndex: number }> }} response
+ * @param {{ brandName: string, domains: string[] }} brand
+ * @param {'positive'|'neutral'|'negative'} sentiment - AI-analyzed sentiment
+ * @param {Array<{ id: string, name: string, domain: string }>} [competitors] - Optional competitor list
+ * @returns {{ mentionCount: number, citationCount: number, sentiment: string, visibilityScore: number, competitorMentions: Array }}
+ */
+export function parseResponse(response, brand, sentiment = 'neutral', competitors = []) {
+ const { text, citations } = response;
+ const cleanText = stripUrls(text);
+
+ // --- Brand mention count (on URL-stripped text to avoid double-counting) ---
+ let mentionCount = countOccurrences(cleanText, brand.brandName);
+ for (const domain of brand.domains) {
+ mentionCount += countOccurrences(cleanText, domain);
+ }
+
+ // --- Brand citation count ---
+ let citationCount = 0;
+ for (const cite of citations) {
+ const url = (cite.url || '').toLowerCase();
+ for (const domain of brand.domains) {
+ if (url.includes(domain.toLowerCase())) {
+ citationCount++;
+ break;
+ }
+ }
+ }
+
+ // --- Visibility Score (0-100) ---
+ const visibilityScore = computeVisibilityScore({
+ mentionCount,
+ citationCount,
+ totalCitations: citations.length,
+ sentiment,
+ });
+
+ // --- Competitor mentions (on URL-stripped text) ---
+ const competitorMentions = competitors.map((comp) => {
+ let compMentions = countOccurrences(cleanText, comp.name);
+ if (comp.domain) {
+ compMentions += countOccurrences(cleanText, comp.domain);
+ }
+
+ let compCitations = 0;
+ if (comp.domain) {
+ for (const cite of citations) {
+ const url = (cite.url || '').toLowerCase();
+ if (url.includes(comp.domain.toLowerCase())) {
+ compCitations++;
+ }
+ }
+ }
+
+ const compScore = computeVisibilityScore({
+ mentionCount: compMentions,
+ citationCount: compCitations,
+ totalCitations: citations.length,
+ sentiment: 'neutral',
+ });
+
+ return {
+ competitor_id: comp.id,
+ name: comp.name,
+ domain: comp.domain || '',
+ mention_count: compMentions,
+ citation_count: compCitations,
+ visibility_score: compScore,
+ };
+ });
+
+ return { mentionCount, citationCount, sentiment, visibilityScore, competitorMentions };
+}
+
+/**
+ * Compute a 0-100 visibility score based on multiple signals.
+ */
+function computeVisibilityScore({ mentionCount, citationCount, totalCitations, sentiment }) {
+ let score = 0;
+
+ // Mention component (max 40 pts): each mention = 10pts, capped at 4+
+ score += Math.min(mentionCount * 10, 40);
+
+ // Citation component (max 30 pts): each citation = 15pts, capped at 2+
+ score += Math.min(citationCount * 15, 30);
+
+ // Citation ratio bonus (max 15 pts): brand citations / total citations
+ if (totalCitations > 0) {
+ score += Math.round((citationCount / totalCitations) * 15);
+ }
+
+ // Sentiment bonus (max 15 pts)
+ if (sentiment === 'positive') score += 15;
+ else if (sentiment === 'neutral' && mentionCount > 0) score += 7;
+
+ return Math.min(score, 100);
+}
diff --git a/server/src/middleware/index.js b/server/src/middleware/index.js
new file mode 100644
index 000000000..58d6ae372
--- /dev/null
+++ b/server/src/middleware/index.js
@@ -0,0 +1,127 @@
+import supabaseAdmin from '../config/supabase.js';
+
+class Middleware {
+ async decodeTokenForSocket(socket, next) {
+ try {
+ const token = socket?.handshake?.query?.authorization;
+
+ if (!token) {
+ return next(new Error('Missing authorization token'));
+ }
+
+ const {
+ data: { user },
+ error,
+ } = await supabaseAdmin.auth.getUser(token);
+
+ if (error || !user) {
+ console.log('Unauthorized Socket Request');
+ return next(new Error('Unauthorized'));
+ }
+
+ socket.user = user;
+ return next();
+ } catch (e) {
+ console.log('Internal Error (Socket Middleware):', e.message);
+ return next(new Error('Internal Error'));
+ }
+ }
+
+ async decodeToken(req, res, next) {
+ try {
+ const token = req?.headers?.authorization?.split(' ')[1];
+
+ if (!token) {
+ return res.status(401).json({ message: 'Missing authorization token' });
+ }
+
+ const {
+ data: { user },
+ error,
+ } = await supabaseAdmin.auth.getUser(token);
+
+ if (error || !user) {
+ return res.status(401).json({ message: 'Unauthorized API Request' });
+ }
+
+ req.user = user;
+ return next();
+ } catch (e) {
+ return res.status(500).json({ message: 'Internal Error' });
+ }
+ }
+
+ async checkRequestIsComingFromDomain(req, res, next) {
+ if (process.env.NODE_ENV === 'development') {
+ return next();
+ }
+
+ try {
+ const allowedOrigins = (process.env.ALLOWED_ORIGINS || '')
+ .split(',')
+ .map((o) => o.trim())
+ .filter(Boolean);
+
+ const domain = req?.headers?.referer || req?.headers?.origin;
+
+ if (!domain) {
+ return res.status(403).json({ message: 'Forbidden' });
+ }
+
+ const url = new URL(domain);
+
+ const isAllowed = allowedOrigins.some((origin) => {
+ const allowed = new URL(origin);
+ return url.hostname === allowed.hostname;
+ });
+
+ if (isAllowed) {
+ return next();
+ }
+
+ return res.status(403).json({ message: 'Forbidden' });
+ } catch (error) {
+ console.log('Domain check error:', error.message);
+ return res.status(500).json({ message: 'Internal Error' });
+ }
+ }
+
+ async checkRequestIsComingFromDomainForSocket(socket, next) {
+ if (process.env.NODE_ENV === 'development') {
+ return next();
+ }
+
+ try {
+ const allowedOrigins = (process.env.ALLOWED_ORIGINS || '')
+ .split(',')
+ .map((o) => o.trim())
+ .filter(Boolean);
+
+ const domain =
+ socket?.handshake?.headers?.referer ||
+ socket?.handshake?.headers?.origin;
+
+ if (!domain) {
+ return next(new Error('Forbidden Socket'));
+ }
+
+ const url = new URL(domain);
+
+ const isAllowed = allowedOrigins.some((origin) => {
+ const allowed = new URL(origin);
+ return url.hostname === allowed.hostname;
+ });
+
+ if (isAllowed) {
+ return next();
+ }
+
+ return next(new Error('Forbidden Socket'));
+ } catch (error) {
+ console.log('Socket domain check error:', error.message);
+ return next(new Error('Internal Error Socket'));
+ }
+ }
+}
+
+export default new Middleware();
diff --git a/server/src/middleware/rate-limiter.js b/server/src/middleware/rate-limiter.js
new file mode 100644
index 000000000..0f0dc2982
--- /dev/null
+++ b/server/src/middleware/rate-limiter.js
@@ -0,0 +1,47 @@
+import rateLimit from 'express-rate-limit';
+
+// General API rate limit: 100 requests per 15 minutes
+export const apiLimiter = rateLimit({
+ windowMs: 15 * 60 * 1000,
+ max: 250,
+ standardHeaders: true,
+ legacyHeaders: false,
+ message: {
+ success: false,
+ message: 'Too many requests, please try again later.',
+ },
+});
+
+// Stricter limit for public/unauthenticated endpoints: 30 requests per 15 minutes
+export const publicLimiter = rateLimit({
+ windowMs: 15 * 60 * 1000,
+ max: 30,
+ standardHeaders: true,
+ legacyHeaders: false,
+ message: {
+ success: false,
+ message: 'Too many requests, please try again later.',
+ },
+});
+
+// Traffic tracking beacon: 60 requests per minute per IP
+export const trafficLimiter = rateLimit({
+ windowMs: 60 * 1000,
+ max: 60,
+ standardHeaders: true,
+ legacyHeaders: false,
+ message: '',
+ handler: (_req, res) => res.status(204).end(),
+});
+
+// Auth endpoints: 10 requests per 15 minutes
+export const authLimiter = rateLimit({
+ windowMs: 15 * 60 * 1000,
+ max: 10,
+ standardHeaders: true,
+ legacyHeaders: false,
+ message: {
+ success: false,
+ message: 'Too many authentication attempts, please try again later.',
+ },
+});
diff --git a/server/src/public/t.js b/server/src/public/t.js
new file mode 100644
index 000000000..6e932eb88
--- /dev/null
+++ b/server/src/public/t.js
@@ -0,0 +1 @@
+(function(){if(window.__at)return;var r=document.referrer,h="";try{h=new URL(r).hostname.replace(/^www\./,"")}catch(e){}var d=["chatgpt.com","chat.openai.com","search.chatgpt.com","perplexity.ai","claude.ai","gemini.google.com","copilot.microsoft.com","you.com","phind.com","meta.ai","poe.com","labs.google"],f=d.some(function(a){return h===a||h.endsWith("."+a)});if(!f){var p=new URLSearchParams(location.search),s=(p.get("utm_source")||"").toLowerCase(),m=(p.get("utm_medium")||"").toLowerCase();f=["chatgpt","chatgpt.com","openai","perplexity","perplexity.ai","claude","claude.ai","gemini","copilot","ai-chat"].indexOf(s)!==-1||s.indexOf("chatgpt")!==-1||s.indexOf("perplexity")!==-1||s.indexOf("claude")!==-1||s.indexOf("gemini")!==-1||s.indexOf("copilot")!==-1||m==="ai"||m==="ai-referral"}if(!f&&h.indexOf("bing.com")!==-1)f=r.indexOf("/ck/a")!==-1;if(!f)return;window.__at=1;var c=document.currentScript,k=c.getAttribute("data-t"),o=c.src.replace(/\/t\.js(\?.*)?$/,"");var b=JSON.stringify({u:location.href,r:r,s:h,a:navigator.userAgent,t:Date.now(),l:navigator.language,d:screen.width+"x"+screen.height});var e=o+"/track/"+k;if(navigator.sendBeacon)navigator.sendBeacon(e,new Blob([b],{type:"application/json"}));else fetch(e,{method:"POST",body:b,headers:{"Content-Type":"application/json"},keepalive:!0}).catch(function(){})})();
diff --git a/server/src/routes/competitors.js b/server/src/routes/competitors.js
new file mode 100644
index 000000000..3bb04fc04
--- /dev/null
+++ b/server/src/routes/competitors.js
@@ -0,0 +1,67 @@
+import { Router } from 'express';
+import { generateText, generateObject } from 'ai';
+import { z } from 'zod';
+import { resolveModel } from '../lib/ai-provider.js';
+import { getLanguageName } from '../lib/languages.js';
+
+const router = Router();
+
+const competitorSchema = z.object({
+ competitors: z.array(
+ z.object({
+ name: z.string().describe('Company/brand display name'),
+ domain: z.string().describe('Root domain without protocol, e.g. "asana.com"'),
+ })
+ ).min(3).max(10),
+});
+
+/**
+ * POST /api/competitors/suggest
+ * Body: { brandName, industry, description? }
+ * Returns: { competitors: [{ name, domain }] }
+ *
+ * Uses OpenAI Responses API with web search to find real competitors,
+ * then structures the results with generateObject.
+ */
+router.post('/suggest', async (req, res) => {
+ try {
+ const { brandName, industry, description, language } = req.body;
+ const langName = getLanguageName(language);
+
+ if (!brandName) {
+ return res.status(400).json({ error: 'brandName is required' });
+ }
+
+ const competitorModel = process.env.COMPETITOR_SUGGESTION_MODEL || 'google/gemini-3-flash-preview';
+
+ // Phase 1: web search to find real competitors
+ const researchPrompt = `Search the web and find 5-10 direct competitors of "${brandName}".
+Industry: ${industry || 'Not specified'}
+Description: ${description || 'Not specified'}
+
+Find REAL companies that compete directly with "${brandName}" — selling similar products/services to similar audiences, especially in the ${langName}-speaking market. For each competitor, provide the company name and their actual website domain.`;
+
+ const { text: research } = await generateText({
+ model: resolveModel(competitorModel, { useSearchGrounding: true }),
+ prompt: researchPrompt,
+ });
+
+ // Phase 2: structure the research into the schema
+ const { object } = await generateObject({
+ model: resolveModel(competitorModel),
+ schema: competitorSchema,
+ system: `Extract competitor information from the research below. Only include companies with REAL, verified domains. Return the root domain (e.g. "monday.com"), not full URLs. Do NOT include "${brandName}" itself.`,
+ prompt: research,
+ });
+
+ return res.json({ competitors: object.competitors });
+ } catch (error) {
+ console.error('Competitor suggestion error:', error);
+ return res.status(500).json({
+ error: 'Failed to generate competitor suggestions',
+ details: error.message,
+ });
+ }
+});
+
+export default router;
diff --git a/server/src/routes/content.js b/server/src/routes/content.js
new file mode 100644
index 000000000..f73f643f8
--- /dev/null
+++ b/server/src/routes/content.js
@@ -0,0 +1,705 @@
+import { Router } from 'express';
+import { generateObject } from 'ai';
+import { z } from 'zod';
+import { requireFeature } from '../lib/plan-guard.js';
+import { createJob, getJob } from '../lib/job-manager.js';
+import { runContentJob } from '../lib/job-runner.js';
+import { resolveModel } from '../lib/ai-provider.js';
+import supabaseAdmin from '../config/supabase.js';
+
+const router = Router();
+
+function mapOpportunityRow(row) {
+ return {
+ id: row.id,
+ brandId: row.brand_id,
+ promptId: row.prompt_id,
+ title: row.title,
+ description: row.description,
+ type: row.type,
+ impact: row.impact,
+ opportunityScore: parseFloat(row.opportunity_score),
+ status: row.status,
+ sourceData: row.source_data || {},
+ brief: row.brief || null,
+ webhookSentAt: row.webhook_sent_at,
+ webhookResponse: row.webhook_response,
+ createdAt: row.created_at,
+ updatedAt: row.updated_at,
+ };
+}
+
+/**
+ * POST /api/content/generate
+ * Enqueues a content opportunity generation job. Returns { jobId } immediately.
+ */
+router.post(
+ '/generate',
+ requireFeature('content_optimization'),
+ async (req, res) => {
+ try {
+ const { brandId, model } = req.body;
+
+ if (!brandId) {
+ return res.status(400).json({ error: 'brandId is required' });
+ }
+
+ const { data: brand } = await supabaseAdmin
+ .from('brands')
+ .select('id, organization_id')
+ .eq('id', brandId)
+ .single();
+
+ if (!brand) {
+ return res.status(404).json({ error: 'Brand not found' });
+ }
+
+ const { data: profile } = await supabaseAdmin
+ .from('profiles')
+ .select('organization_id')
+ .eq('id', req.user.id)
+ .single();
+
+ if (!profile || profile.organization_id !== brand.organization_id) {
+ return res.status(403).json({ error: 'Unauthorized' });
+ }
+
+ const job = await createJob({
+ type: 'content',
+ brandId,
+ data: { brandId, model: model || null },
+ maxAttempts: 2,
+ });
+
+ const io = req.app.get('io');
+ runContentJob(job.id, io);
+
+ return res.json({
+ success: true,
+ jobId: job.id,
+ message: 'Content generation job enqueued',
+ });
+ } catch (error) {
+ console.error('[content] Enqueue error:', error.message);
+ return res.status(500).json({ error: error.message });
+ }
+ },
+);
+
+/**
+ * GET /api/content/job/:jobId
+ * Returns job state and progress for content generation.
+ */
+router.get('/job/:jobId', async (req, res) => {
+ try {
+ const job = await getJob(req.params.jobId);
+ if (!job) {
+ return res.json({ success: true, status: 'not_found' });
+ }
+
+ const progress = job.progress || {};
+
+ return res.json({
+ success: true,
+ status: job.status,
+ progress: progress && typeof progress === 'object' && progress.phase ? progress : null,
+ result: job.status === 'completed' ? job.result : null,
+ failedReason: job.status === 'failed' ? job.failed_reason : null,
+ });
+ } catch (error) {
+ console.error('[content] Job status error:', error.message);
+ return res.status(500).json({ success: false, message: error.message });
+ }
+});
+
+/**
+ * GET /api/content/brand/:brandId
+ * List opportunities for a brand with optional filters.
+ */
+router.get('/brand/:brandId', async (req, res) => {
+ try {
+ const { brandId } = req.params;
+ const { status, impact, type, limit = 50, offset = 0, sort = 'score' } = req.query;
+
+ let query = supabaseAdmin
+ .from('content_opportunities')
+ .select('*', { count: 'exact' })
+ .eq('brand_id', brandId);
+
+ if (status) query = query.eq('status', status);
+ if (impact) query = query.eq('impact', impact);
+ if (type) query = query.eq('type', type);
+
+ if (sort === 'score') {
+ query = query.order('opportunity_score', { ascending: false });
+ } else if (sort === 'newest') {
+ query = query.order('created_at', { ascending: false });
+ }
+
+ query = query.range(Number(offset), Number(offset) + Number(limit) - 1);
+
+ const { data, error, count } = await query;
+
+ if (error) throw new Error(error.message);
+
+ return res.json({
+ opportunities: (data || []).map(mapOpportunityRow),
+ total: count || 0,
+ });
+ } catch (error) {
+ console.error('List opportunities error:', error);
+ return res.status(500).json({
+ error: 'Failed to list opportunities',
+ details: error.message,
+ });
+ }
+});
+
+/**
+ * POST /api/content/bulk/status
+ * Update the status of multiple opportunities at once.
+ */
+router.post('/bulk/status', async (req, res) => {
+ try {
+ const { ids, status } = req.body;
+
+ if (!Array.isArray(ids) || ids.length === 0) {
+ return res.status(400).json({ error: 'ids must be a non-empty array' });
+ }
+
+ const validStatuses = ['new', 'sent', 'in_progress', 'done', 'dismissed'];
+ if (!validStatuses.includes(status)) {
+ return res
+ .status(400)
+ .json({ error: `Invalid status. Must be one of: ${validStatuses.join(', ')}` });
+ }
+
+ const { data, error } = await supabaseAdmin
+ .from('content_opportunities')
+ .update({ status, updated_at: new Date().toISOString() })
+ .in('id', ids)
+ .select('id');
+
+ if (error) throw new Error(error.message);
+
+ return res.json({ updated: data?.length || 0 });
+ } catch (error) {
+ console.error('Bulk status update error:', error);
+ return res.status(500).json({
+ error: 'Failed to bulk update status',
+ details: error.message,
+ });
+ }
+});
+
+/**
+ * POST /api/content/bulk/send-webhook
+ * Send multiple opportunities to webhook.
+ */
+router.post('/bulk/send-webhook', async (req, res) => {
+ try {
+ const { ids } = req.body;
+
+ if (!Array.isArray(ids) || ids.length === 0) {
+ return res.status(400).json({ error: 'ids must be a non-empty array' });
+ }
+
+ const { data: opportunities, error: oppErr } = await supabaseAdmin
+ .from('content_opportunities')
+ .select('*')
+ .in('id', ids);
+
+ if (oppErr) throw new Error(oppErr.message);
+ if (!opportunities?.length) {
+ return res.status(404).json({ error: 'No opportunities found' });
+ }
+
+ const brandId = opportunities[0].brand_id;
+
+ const { data: webhookConfig } = await supabaseAdmin
+ .from('webhook_configs')
+ .select('*')
+ .eq('brand_id', brandId)
+ .eq('is_active', true)
+ .limit(1)
+ .single();
+
+ if (!webhookConfig) {
+ return res
+ .status(400)
+ .json({ error: 'No active webhook configured for this brand. Set up a webhook first.' });
+ }
+
+ const { data: brand } = await supabaseAdmin
+ .from('brands')
+ .select('name, industry')
+ .eq('id', brandId)
+ .single();
+
+ const { data: domains } = await supabaseAdmin
+ .from('brand_domains')
+ .select('domain')
+ .eq('brand_id', brandId)
+ .eq('is_primary', true)
+ .limit(1);
+
+ const serverUrl = process.env.PUBLIC_SERVER_URL || `http://localhost:${process.env.PORT || 3001}`;
+ const headers = { 'Content-Type': 'application/json' };
+ if (webhookConfig.webhook_secret) {
+ headers['X-Webhook-Secret'] = webhookConfig.webhook_secret;
+ }
+
+ let sent = 0;
+ let failed = 0;
+
+ for (const opportunity of opportunities) {
+ try {
+ let prompt = null;
+ if (opportunity.prompt_id) {
+ const { data: p } = await supabaseAdmin
+ .from('prompts')
+ .select('text, category')
+ .eq('id', opportunity.prompt_id)
+ .single();
+ prompt = p;
+ }
+
+ const payload = {
+ event: 'opportunity.sent',
+ opportunity: {
+ id: opportunity.id,
+ title: opportunity.title,
+ description: opportunity.description,
+ type: opportunity.type,
+ impact: opportunity.impact,
+ opportunity_score: parseFloat(opportunity.opportunity_score),
+ },
+ prompt: prompt
+ ? { text: prompt.text, category: prompt.category }
+ : null,
+ data: opportunity.source_data || {},
+ brief: opportunity.brief || null,
+ brand: {
+ name: brand?.name || '',
+ domain: domains?.[0]?.domain || '',
+ industry: brand?.industry || '',
+ },
+ callback_url: `${serverUrl}/api/content/${opportunity.id}/status`,
+ };
+
+ const webhookRes = await fetch(webhookConfig.webhook_url, {
+ method: 'POST',
+ headers,
+ body: JSON.stringify(payload),
+ signal: AbortSignal.timeout(15000),
+ });
+
+ const responseBody = await webhookRes.text().catch(() => '');
+
+ await supabaseAdmin
+ .from('content_opportunities')
+ .update({
+ status: 'sent',
+ webhook_sent_at: new Date().toISOString(),
+ webhook_response: {
+ status: webhookRes.status,
+ body: responseBody.slice(0, 1000),
+ },
+ updated_at: new Date().toISOString(),
+ })
+ .eq('id', opportunity.id);
+
+ sent++;
+ } catch {
+ failed++;
+ }
+ }
+
+ return res.json({ sent, failed });
+ } catch (error) {
+ console.error('Bulk send webhook error:', error);
+ return res.status(500).json({
+ error: 'Failed to bulk send webhooks',
+ details: error.message,
+ });
+ }
+});
+
+/**
+ * PATCH /api/content/:id/status
+ * Update the status of an opportunity.
+ */
+router.patch('/:id/status', async (req, res) => {
+ try {
+ const { id } = req.params;
+ const { status } = req.body;
+
+ const validStatuses = ['new', 'sent', 'in_progress', 'done', 'dismissed'];
+ if (!validStatuses.includes(status)) {
+ return res
+ .status(400)
+ .json({ error: `Invalid status. Must be one of: ${validStatuses.join(', ')}` });
+ }
+
+ const { data, error } = await supabaseAdmin
+ .from('content_opportunities')
+ .update({ status, updated_at: new Date().toISOString() })
+ .eq('id', id)
+ .select()
+ .single();
+
+ if (error) throw new Error(error.message);
+ if (!data) return res.status(404).json({ error: 'Opportunity not found' });
+
+ return res.json(mapOpportunityRow(data));
+ } catch (error) {
+ console.error('Update opportunity status error:', error);
+ return res.status(500).json({
+ error: 'Failed to update status',
+ details: error.message,
+ });
+ }
+});
+
+/**
+ * POST /api/content/:id/send-webhook
+ * Send an opportunity to the configured webhook endpoint.
+ */
+router.post('/:id/send-webhook', async (req, res) => {
+ try {
+ const { id } = req.params;
+
+ const { data: opportunity, error: oppErr } = await supabaseAdmin
+ .from('content_opportunities')
+ .select('*')
+ .eq('id', id)
+ .single();
+
+ if (oppErr || !opportunity) {
+ return res.status(404).json({ error: 'Opportunity not found' });
+ }
+
+ const { data: webhookConfig } = await supabaseAdmin
+ .from('webhook_configs')
+ .select('*')
+ .eq('brand_id', opportunity.brand_id)
+ .eq('is_active', true)
+ .limit(1)
+ .single();
+
+ if (!webhookConfig) {
+ return res
+ .status(400)
+ .json({ error: 'No active webhook configured for this brand. Set up a webhook first.' });
+ }
+
+ const { data: brand } = await supabaseAdmin
+ .from('brands')
+ .select('name, industry')
+ .eq('id', opportunity.brand_id)
+ .single();
+
+ const { data: domains } = await supabaseAdmin
+ .from('brand_domains')
+ .select('domain')
+ .eq('brand_id', opportunity.brand_id)
+ .eq('is_primary', true)
+ .limit(1);
+
+ let prompt = null;
+ if (opportunity.prompt_id) {
+ const { data: p } = await supabaseAdmin
+ .from('prompts')
+ .select('text, category')
+ .eq('id', opportunity.prompt_id)
+ .single();
+ prompt = p;
+ }
+
+ const serverUrl = process.env.PUBLIC_SERVER_URL || `http://localhost:${process.env.PORT || 3001}`;
+
+ const payload = {
+ event: 'opportunity.sent',
+ opportunity: {
+ id: opportunity.id,
+ title: opportunity.title,
+ description: opportunity.description,
+ type: opportunity.type,
+ impact: opportunity.impact,
+ opportunity_score: parseFloat(opportunity.opportunity_score),
+ },
+ prompt: prompt
+ ? { text: prompt.text, category: prompt.category }
+ : null,
+ data: opportunity.source_data || {},
+ brief: opportunity.brief || null,
+ brand: {
+ name: brand?.name || '',
+ domain: domains?.[0]?.domain || '',
+ industry: brand?.industry || '',
+ },
+ callback_url: `${serverUrl}/api/content/${opportunity.id}/status`,
+ };
+
+ const headers = { 'Content-Type': 'application/json' };
+ if (webhookConfig.webhook_secret) {
+ headers['X-Webhook-Secret'] = webhookConfig.webhook_secret;
+ }
+
+ const webhookRes = await fetch(webhookConfig.webhook_url, {
+ method: 'POST',
+ headers,
+ body: JSON.stringify(payload),
+ signal: AbortSignal.timeout(15000),
+ });
+
+ const responseBody = await webhookRes.text().catch(() => '');
+
+ await supabaseAdmin
+ .from('content_opportunities')
+ .update({
+ status: 'sent',
+ webhook_sent_at: new Date().toISOString(),
+ webhook_response: {
+ status: webhookRes.status,
+ body: responseBody.slice(0, 1000),
+ },
+ updated_at: new Date().toISOString(),
+ })
+ .eq('id', id);
+
+ return res.json({
+ success: true,
+ webhookStatus: webhookRes.status,
+ opportunityStatus: 'sent',
+ });
+ } catch (error) {
+ console.error('Send webhook error:', error);
+ return res.status(500).json({
+ error: 'Failed to send webhook',
+ details: error.message,
+ });
+ }
+});
+
+/**
+ * POST /api/content/webhook-test
+ * Test a webhook URL with a dummy payload.
+ */
+router.post('/webhook-test', async (req, res) => {
+ try {
+ const { webhookUrl, webhookSecret } = req.body;
+
+ if (!webhookUrl) {
+ return res.status(400).json({ error: 'webhookUrl is required' });
+ }
+
+ const payload = {
+ event: 'webhook.test',
+ message: 'This is a test webhook from AEO platform.',
+ timestamp: new Date().toISOString(),
+ };
+
+ const headers = { 'Content-Type': 'application/json' };
+ if (webhookSecret) {
+ headers['X-Webhook-Secret'] = webhookSecret;
+ }
+
+ const webhookRes = await fetch(webhookUrl, {
+ method: 'POST',
+ headers,
+ body: JSON.stringify(payload),
+ signal: AbortSignal.timeout(10000),
+ });
+
+ return res.json({
+ success: webhookRes.ok,
+ status: webhookRes.status,
+ statusText: webhookRes.statusText,
+ });
+ } catch (error) {
+ return res.json({
+ success: false,
+ status: 0,
+ error: error.message,
+ });
+ }
+});
+
+const briefSchema = z.object({
+ suggestedTitle: z.string(),
+ contentType: z.enum([
+ 'blog-post',
+ 'comparison-page',
+ 'landing-page',
+ 'faq-page',
+ 'guide',
+ 'case-study',
+ ]),
+ targetWordCount: z.number(),
+ outline: z
+ .array(
+ z.object({
+ heading: z.string(),
+ keyPoints: z.array(z.string()),
+ }),
+ )
+ .min(3)
+ .max(8),
+ targetKeywords: z.array(z.string()).min(3).max(10),
+ competitorInsights: z.string(),
+ callToAction: z.string(),
+});
+
+const BRIEF_SYSTEM_PROMPT = `You are a senior content strategist specializing in Answer Engine Optimization (AEO). Given a content opportunity with its data (prompt text, visibility scores, competitor gaps, etc.), generate a comprehensive content brief that will help a writer create content optimized for AI-generated answers.
+
+Rules:
+- The suggested title must be compelling and SEO-friendly.
+- The outline should have 3-8 sections with specific key points per section.
+- Target keywords should be relevant to the prompt and opportunity.
+- Competitor insights should reference the actual competitors cited and their visibility advantage.
+- The call to action should be specific and relevant to the content type.
+- Target word count should be appropriate for the content type (e.g. blog post: 1500-3000, guide: 3000-5000).`;
+
+/**
+ * POST /api/content/:id/brief
+ * Generate an AI-powered content brief for an opportunity.
+ */
+router.post('/:id/brief', async (req, res) => {
+ try {
+ const { id } = req.params;
+ const { model } = req.body;
+
+ const { data: opportunity, error: oppErr } = await supabaseAdmin
+ .from('content_opportunities')
+ .select('*')
+ .eq('id', id)
+ .single();
+
+ if (oppErr || !opportunity) {
+ return res.status(404).json({ error: 'Opportunity not found' });
+ }
+
+ if (opportunity.brief) {
+ return res.json({ brief: opportunity.brief });
+ }
+
+ const { data: brand } = await supabaseAdmin
+ .from('brands')
+ .select('name, industry, description')
+ .eq('id', opportunity.brand_id)
+ .single();
+
+ const { data: domains } = await supabaseAdmin
+ .from('brand_domains')
+ .select('domain')
+ .eq('brand_id', opportunity.brand_id);
+
+ let promptText = opportunity.source_data?.promptText || '';
+ let latestResults = [];
+
+ if (opportunity.prompt_id) {
+ const { data: prompt } = await supabaseAdmin
+ .from('prompts')
+ .select('text, category')
+ .eq('id', opportunity.prompt_id)
+ .single();
+
+ if (prompt) promptText = prompt.text;
+
+ const { data: results } = await supabaseAdmin
+ .from('prompt_results')
+ .select('platform, visibility_score, mention_count, citation_count, sentiment, response, competitor_mentions')
+ .eq('prompt_id', opportunity.prompt_id)
+ .order('created_at', { ascending: false })
+ .limit(10);
+
+ latestResults = results || [];
+ }
+
+ const { data: competitors } = await supabaseAdmin
+ .from('competitors')
+ .select('name, domain')
+ .eq('brand_id', opportunity.brand_id);
+
+ const sourceData = opportunity.source_data || {};
+
+ const userPrompt = `Brand: ${brand?.name || 'Unknown'}
+Industry: ${brand?.industry || 'Not specified'}
+Description: ${brand?.description || 'N/A'}
+Domain: ${(domains || []).map((d) => d.domain).join(', ') || 'N/A'}
+Competitors: ${(competitors || []).map((c) => `${c.name} (${c.domain})`).join(', ') || 'None'}
+
+Opportunity:
+- Title: ${opportunity.title}
+- Description: ${opportunity.description}
+- Type: ${opportunity.type}
+- Impact: ${opportunity.impact}
+- Score: ${opportunity.opportunity_score}
+
+Related Prompt: "${promptText}"
+Intent: ${sourceData.intent || 'unknown'}
+Est. AI Volume: ${sourceData.estAiVolume || 0}/mo
+Current Visibility: ${sourceData.visibilityScore || 0}%
+Competitor Gap: ${sourceData.competitorGap || 0}%
+Keywords: ${(sourceData.keywords || []).join(', ') || 'none'}
+Competitors Cited: ${(sourceData.competitorsCited || []).join(', ') || 'none'}
+
+Latest Results Summary:
+${latestResults.map((r) => `- ${r.platform}: visibility ${r.visibility_score}%, mentions: ${r.mention_count}, citations: ${r.citation_count}, sentiment: ${r.sentiment}`).join('\n') || 'No results yet'}
+
+Generate a detailed content brief for this opportunity.`;
+
+ const aiModel = resolveModel(model);
+
+ const { object: brief } = await generateObject({
+ model: aiModel,
+ schema: briefSchema,
+ system: BRIEF_SYSTEM_PROMPT,
+ prompt: userPrompt,
+ });
+
+ await supabaseAdmin
+ .from('content_opportunities')
+ .update({ brief, updated_at: new Date().toISOString() })
+ .eq('id', id);
+
+ return res.json({ brief });
+ } catch (error) {
+ console.error('[content] Brief generation error:', error);
+ return res.status(500).json({
+ error: 'Failed to generate brief',
+ details: error.message,
+ });
+ }
+});
+
+/**
+ * GET /api/content/:id
+ * Get a single opportunity by ID.
+ */
+router.get('/:id', async (req, res) => {
+ try {
+ const { id } = req.params;
+
+ const { data, error } = await supabaseAdmin
+ .from('content_opportunities')
+ .select('*')
+ .eq('id', id)
+ .single();
+
+ if (error || !data) {
+ return res.status(404).json({ error: 'Opportunity not found' });
+ }
+
+ return res.json(mapOpportunityRow(data));
+ } catch (error) {
+ console.error('Get opportunity error:', error);
+ return res.status(500).json({
+ error: 'Failed to get opportunity',
+ details: error.message,
+ });
+ }
+});
+
+export default router;
diff --git a/server/src/routes/index.js b/server/src/routes/index.js
new file mode 100644
index 000000000..59a3320b6
--- /dev/null
+++ b/server/src/routes/index.js
@@ -0,0 +1,22 @@
+import { Router } from 'express';
+import promptRoutes from './prompts.js';
+import trackingRoutes from './tracking.js';
+import volumeRoutes from './volumes.js';
+import contentRoutes from './content.js';
+import competitorRoutes from './competitors.js';
+import topicRoutes from './topics.js';
+
+const router = Router();
+
+router.use('/prompts', promptRoutes);
+router.use('/tracking', trackingRoutes);
+router.use('/volumes', volumeRoutes);
+router.use('/content', contentRoutes);
+router.use('/competitors', competitorRoutes);
+router.use('/topics', topicRoutes);
+
+router.get('/health', (req, res) => {
+ res.json({ status: 'ok', user: req.user?.id });
+});
+
+export default router;
diff --git a/server/src/routes/prompts.js b/server/src/routes/prompts.js
new file mode 100644
index 000000000..ab6e74b7a
--- /dev/null
+++ b/server/src/routes/prompts.js
@@ -0,0 +1,552 @@
+import { Router } from 'express';
+import { generateObject } from 'ai';
+import { z } from 'zod';
+import supabaseAdmin from '../config/supabase.js';
+import { resolveModel } from '../lib/ai-provider.js';
+import { getLanguageName } from '../lib/languages.js';
+import { requireFeature } from '../lib/plan-guard.js';
+
+const router = Router();
+
+async function assertBrandAccess(brandId, userId) {
+ const { data: brand } = await supabaseAdmin
+ .from('brands')
+ .select('id, name, description, organization_id, language')
+ .eq('id', brandId)
+ .single();
+ if (!brand) {
+ const err = new Error('Brand not found');
+ err.status = 404;
+ throw err;
+ }
+ const { data: profile } = await supabaseAdmin
+ .from('profiles')
+ .select('organization_id, role')
+ .eq('id', userId)
+ .single();
+ if (!profile || profile.organization_id !== brand.organization_id) {
+ const err = new Error('Unauthorized');
+ err.status = 403;
+ throw err;
+ }
+ return { brand, profile };
+}
+
+async function loadSuggestionContext(brandId) {
+ const [
+ { data: brand },
+ { data: existingPrompts },
+ { data: existingTopics },
+ { data: recentResults },
+ ] = await Promise.all([
+ supabaseAdmin
+ .from('brands')
+ .select('name, description, language')
+ .eq('id', brandId)
+ .single(),
+ supabaseAdmin
+ .from('prompts')
+ .select(
+ 'id, text, prompt_sets!inner(brand_id), prompt_volumes(est_ai_volume, intent)',
+ )
+ .eq('prompt_sets.brand_id', brandId)
+ .eq('is_active', true)
+ .limit(80),
+ supabaseAdmin
+ .from('topics')
+ .select('name')
+ .eq('brand_id', brandId)
+ .eq('is_active', true)
+ .limit(40),
+ supabaseAdmin
+ .from('prompt_results')
+ .select('competitor_mentions')
+ .eq('brand_id', brandId)
+ .order('created_at', { ascending: false })
+ .limit(200),
+ ]);
+
+ const competitorCount = new Map();
+ for (const row of recentResults || []) {
+ const mentions = row.competitor_mentions;
+ if (!mentions) continue;
+ if (Array.isArray(mentions)) {
+ for (const m of mentions) {
+ const name = typeof m === 'string' ? m : m?.name;
+ if (name) competitorCount.set(name, (competitorCount.get(name) || 0) + 1);
+ }
+ } else if (typeof mentions === 'object') {
+ for (const [name, val] of Object.entries(mentions)) {
+ const n = typeof val === 'number' ? val : 1;
+ competitorCount.set(name, (competitorCount.get(name) || 0) + n);
+ }
+ }
+ }
+ const topCompetitors = [...competitorCount.entries()]
+ .sort((a, b) => b[1] - a[1])
+ .slice(0, 12)
+ .map(([name]) => name);
+
+ const promptVolumeSamples = [];
+ let volumeSum = 0;
+ let volumeCount = 0;
+ let highVolumeMax = 0;
+ for (const p of existingPrompts || []) {
+ const pv = p.prompt_volumes;
+ const vol = Array.isArray(pv) ? pv[0]?.est_ai_volume : pv?.est_ai_volume;
+ const intent = Array.isArray(pv) ? pv[0]?.intent : pv?.intent;
+ if (typeof vol === 'number' && vol > 0) {
+ volumeSum += vol;
+ volumeCount += 1;
+ if (vol > highVolumeMax) highVolumeMax = vol;
+ promptVolumeSamples.push({ text: p.text, volume: vol, intent });
+ }
+ }
+ const avgVolume = volumeCount > 0 ? Math.round(volumeSum / volumeCount) : 0;
+ promptVolumeSamples.sort((a, b) => b.volume - a.volume);
+ const topByVolume = promptVolumeSamples.slice(0, 6);
+ const bottomByVolume = promptVolumeSamples.slice(-4).reverse();
+
+ return {
+ brand: brand || {},
+ existingPromptTexts: (existingPrompts || []).map((p) => p.text),
+ existingTopicNames: (existingTopics || []).map((t) => t.name),
+ topCompetitors,
+ volume: {
+ avg: avgVolume,
+ max: highVolumeMax,
+ coveredCount: volumeCount,
+ totalPrompts: (existingPrompts || []).length,
+ topByVolume,
+ bottomByVolume,
+ },
+ };
+}
+
+const newSuggestionSchema = z.object({
+ suggestions: z
+ .array(
+ z.object({
+ text: z
+ .string()
+ .min(20)
+ .max(120)
+ .describe(
+ 'A short, generic search query without any brand names',
+ ),
+ topic: z
+ .string()
+ .min(3)
+ .max(60)
+ .describe(
+ 'A 2-4 word topic label that groups this prompt (e.g. "EV Range", "Reliability", "Pricing")',
+ ),
+ reason: z
+ .string()
+ .min(20)
+ .max(220)
+ .describe(
+ 'One sentence explaining why this prompt matters for the brand (gap, trend, competitor coverage)',
+ ),
+ estVolume: z
+ .number()
+ .int()
+ .min(0)
+ .max(100000)
+ .describe('Estimated monthly AI search volume (rough)'),
+ }),
+ )
+ .min(6)
+ .max(12),
+});
+
+const SUGGESTION_TTL_HOURS = 48;
+
+async function generateSuggestions(brandId) {
+ const ctx = await loadSuggestionContext(brandId);
+ const langName = getLanguageName(ctx.brand.language);
+ const currentYear = new Date().getFullYear();
+
+ const system = `You are an AEO (Answer Engine Optimization) strategist. You suggest NEW search prompts a brand should track in AI engines (ChatGPT, Perplexity, Gemini, Claude). Current year: ${currentYear}.
+
+RULES:
+- Suggest 8 prompts that are NOT already tracked by this brand.
+- Each prompt: 30-100 chars, generic, no brand names, written in ${langName}.
+- Group each prompt under a short topic label (2-4 words). Reuse existing topic labels when they fit; otherwise create a clean new one.
+- Pick prompts where the brand could realistically appear AND where its competitors are already getting cited.
+- Volume bias: prioritize prompt ideas that resemble (in topic and intent) the HIGH-volume prompts already tracked. Avoid suggesting prompts close in topic to LOW-volume ones unless there is a strong competitor gap.
+- estVolume must be a realistic monthly AI search volume; calibrate it against the volume samples shown — do not output flat round numbers like 1000 for everything.
+- Reasons must be concrete: cite the gap, the trend, or the competitor activity. Avoid generic platitudes.
+- Diversity: mix comparison, how-to, best-of, recommendation, and problem-solving intents.`;
+
+ const v = ctx.volume;
+ const volumeBlock =
+ v && v.coveredCount > 0
+ ? `Volume signal (from prompt_volumes for tracked prompts):
+- Coverage: ${v.coveredCount}/${v.totalPrompts} tracked prompts have estimated AI volume
+- Average AI volume: ~${v.avg.toLocaleString('en-US')}/mo
+- Highest tracked: ~${v.max.toLocaleString('en-US')}/mo
+- Top-volume tracked prompts (for topic/intent inspiration, do NOT duplicate):
+${v.topByVolume.map((p) => ` • [~${p.volume.toLocaleString('en-US')}/mo${p.intent ? `, ${p.intent}` : ''}] ${p.text}`).join('\n')}
+- Lowest-volume tracked prompts (avoid suggesting similar ones):
+${v.bottomByVolume.map((p) => ` • [~${p.volume.toLocaleString('en-US')}/mo${p.intent ? `, ${p.intent}` : ''}] ${p.text}`).join('\n')}`
+ : 'Volume signal: no AI volume data analyzed yet for tracked prompts.';
+
+ const userPrompt = `Brand: ${ctx.brand.name}
+Description: ${ctx.brand.description || '(none)'}
+
+Existing tracked prompts (DO NOT duplicate these):
+${ctx.existingPromptTexts.length ? ctx.existingPromptTexts.map((p, i) => `${i + 1}. ${p}`).join('\n') : '(none yet)'}
+
+Existing topics for this brand (prefer reusing):
+${ctx.existingTopicNames.length ? ctx.existingTopicNames.join(', ') : '(none)'}
+
+Top competitors currently cited in this brand's tracked AI responses:
+${ctx.topCompetitors.length ? ctx.topCompetitors.join(', ') : '(no data yet)'}
+
+${volumeBlock}
+
+Suggest the next 8 prompts this brand should start tracking, with topic, reason and a calibrated monthly AI search volume (estVolume).`;
+
+ const promptModel =
+ process.env.PROMPT_SUGGESTION_MODEL || 'google/gemini-3-flash-preview';
+ const aiModel = resolveModel(promptModel);
+
+ const { object } = await generateObject({
+ model: aiModel,
+ schema: newSuggestionSchema,
+ system,
+ prompt: userPrompt,
+ });
+
+ return object.suggestions;
+}
+
+async function findOrCreateTopic(brandId, topicName) {
+ if (!topicName) return null;
+ const { data: existing } = await supabaseAdmin
+ .from('topics')
+ .select('id')
+ .eq('brand_id', brandId)
+ .ilike('name', topicName)
+ .limit(1)
+ .maybeSingle();
+ if (existing?.id) return existing.id;
+ const { data: created, error } = await supabaseAdmin
+ .from('topics')
+ .insert({ brand_id: brandId, name: topicName, is_active: true })
+ .select('id')
+ .single();
+ if (error) return null;
+ return created?.id ?? null;
+}
+
+router.post(
+ '/suggestions/:brandId/refresh',
+ requireFeature('prompt_suggestions'),
+ async (req, res) => {
+ try {
+ await assertBrandAccess(req.params.brandId, req.user.id);
+ const suggestions = await generateSuggestions(req.params.brandId);
+
+ await supabaseAdmin
+ .from('prompt_suggestions')
+ .delete()
+ .eq('brand_id', req.params.brandId)
+ .eq('status', 'new');
+
+ const expiresAt = new Date(
+ Date.now() + SUGGESTION_TTL_HOURS * 60 * 60 * 1000,
+ ).toISOString();
+
+ const rows = [];
+ for (const s of suggestions) {
+ const topicId = await findOrCreateTopic(req.params.brandId, s.topic);
+ rows.push({
+ brand_id: req.params.brandId,
+ suggested_text: s.text,
+ topic_name: s.topic,
+ topic_id: topicId,
+ reason: s.reason,
+ est_volume: s.estVolume,
+ source: 'llm',
+ status: 'new',
+ expires_at: expiresAt,
+ });
+ }
+
+ const { data: inserted, error } = await supabaseAdmin
+ .from('prompt_suggestions')
+ .insert(rows)
+ .select();
+ if (error) throw error;
+
+ return res.json({ suggestions: inserted });
+ } catch (error) {
+ const status = error.status || 500;
+ console.error('[prompt-suggestions] refresh error:', error.message);
+ return res
+ .status(status)
+ .json({ error: error.message || 'Failed to generate suggestions' });
+ }
+ },
+);
+
+router.get('/suggestions/:brandId', async (req, res) => {
+ try {
+ await assertBrandAccess(req.params.brandId, req.user.id);
+ const { data, error } = await supabaseAdmin
+ .from('prompt_suggestions')
+ .select('*')
+ .eq('brand_id', req.params.brandId)
+ .eq('status', 'new')
+ .order('generated_at', { ascending: false });
+ if (error) throw error;
+
+ const stale = (data || []).every(
+ (r) => new Date(r.expires_at).getTime() < Date.now(),
+ );
+ return res.json({
+ suggestions: data || [],
+ stale: data?.length === 0 || stale,
+ });
+ } catch (error) {
+ const status = error.status || 500;
+ console.error('[prompt-suggestions] list error:', error.message);
+ return res
+ .status(status)
+ .json({ error: error.message || 'Failed to load suggestions' });
+ }
+});
+
+router.post('/suggestions/:id/dismiss', async (req, res) => {
+ try {
+ const { data: suggestion } = await supabaseAdmin
+ .from('prompt_suggestions')
+ .select('brand_id')
+ .eq('id', req.params.id)
+ .single();
+ if (!suggestion) return res.status(404).json({ error: 'Not found' });
+ await assertBrandAccess(suggestion.brand_id, req.user.id);
+
+ const { error } = await supabaseAdmin
+ .from('prompt_suggestions')
+ .update({ status: 'dismissed', updated_at: new Date().toISOString() })
+ .eq('id', req.params.id);
+ if (error) throw error;
+ return res.json({ success: true });
+ } catch (error) {
+ const status = error.status || 500;
+ console.error('[prompt-suggestions] dismiss error:', error.message);
+ return res
+ .status(status)
+ .json({ error: error.message || 'Failed to dismiss' });
+ }
+});
+
+router.post('/suggestions/:id/accept', async (req, res) => {
+ try {
+ const { promptId } = req.body || {};
+ if (!promptId) {
+ return res.status(400).json({ error: 'promptId is required' });
+ }
+ const { data: suggestion } = await supabaseAdmin
+ .from('prompt_suggestions')
+ .select('brand_id')
+ .eq('id', req.params.id)
+ .single();
+ if (!suggestion) return res.status(404).json({ error: 'Not found' });
+ await assertBrandAccess(suggestion.brand_id, req.user.id);
+
+ const { error } = await supabaseAdmin
+ .from('prompt_suggestions')
+ .update({
+ status: 'added',
+ added_prompt_id: promptId,
+ updated_at: new Date().toISOString(),
+ })
+ .eq('id', req.params.id);
+ if (error) throw error;
+ return res.json({ success: true });
+ } catch (error) {
+ const status = error.status || 500;
+ console.error('[prompt-suggestions] accept error:', error.message);
+ return res
+ .status(status)
+ .json({ error: error.message || 'Failed to accept' });
+ }
+});
+
+const promptSuggestionSchema = z.object({
+ prompts: z
+ .array(
+ z.object({
+ text: z
+ .string()
+ .describe(
+ 'A short, generic search query (30-100 characters) WITHOUT any brand names',
+ ),
+ category: z
+ .enum([
+ 'industry',
+ 'comparison',
+ 'how-to',
+ 'use-case',
+ 'recommendation',
+ 'alternative',
+ 'problem-solving',
+ ])
+ .describe('Category of the prompt'),
+ }),
+ )
+ .length(10),
+});
+
+function getSystemPrompt(langName) {
+ const currentYear = new Date().getFullYear();
+ return `You are an AEO (Answer Engine Optimization) expert. Given brand information, generate exactly 10 search prompts that real users would type into AI search engines (ChatGPT, Perplexity, Gemini, Claude, etc.). Current year: ${currentYear}.
+
+CRITICAL RULES:
+- Do NOT use the brand name in prompts. These must be generic, high-volume industry queries.
+- Each prompt MUST be between 30 and 100 characters long. Aim for 40-80 characters.
+- The goal is to measure whether the brand appears organically in AI responses when users search for general topics.
+- Think about what potential customers search BEFORE they know about any specific brand.
+- Focus on high search-volume queries that are relevant to what the brand does.
+
+Generate prompts like these (generic, no brand names):
+- "Best project management tools for remote teams"
+- "How to automate email marketing campaigns"
+- "Top CRM software for small businesses ${currentYear}"
+- "What is the best way to manage inventory for e-commerce"
+- "Free alternatives to enterprise automation platforms"
+
+Do NOT generate prompts like these (brand-specific, low value):
+- "What is [BrandName]?"
+- "[BrandName] pricing"
+- "[BrandName] vs [Competitor]"
+- "How to use [BrandName]"
+
+Include a diverse mix of:
+- Industry best-of queries ("Best [category] tools", "Top [industry] software")
+- How-to queries related to the brand's domain ("How to [solve problem the brand solves]")
+- Comparison/listicle queries ("Top 10 [product category] in ${currentYear}")
+- Use-case queries ("Best tool for [specific use case]")
+- Problem-solving queries ("How to fix/improve [pain point]")
+- Recommendation queries ("What [tool type] should I use for [scenario]")
+- Alternative/options queries ("Free [product category] options", "Open source [category]")
+
+Make prompts natural, realistic, and high search-volume — things real users actually search for.
+Each prompt must have a category: industry, comparison, how-to, use-case, recommendation, alternative, or problem-solving.
+IMPORTANT: All prompts MUST be written in ${langName}.`;
+}
+
+/**
+ * POST /api/prompts/suggest
+ * Body: { brandName, industry, description?, model? }
+ * Returns: { prompts: [{ text, category }] }
+ */
+router.post(
+ '/suggest',
+ requireFeature('prompt_suggestions'),
+ async (req, res) => {
+ try {
+ const { brandName, industry, description, model, language } = req.body;
+ const langName = getLanguageName(language);
+
+ if (!brandName) {
+ return res.status(400).json({ error: 'brandName is required' });
+ }
+
+ const userPrompt = `Brand context (DO NOT use the brand name "${brandName}" in any prompt):
+Industry: ${industry || 'Not specified'}
+Description: ${description || 'Not specified'}
+Language: ${langName} — write ALL prompts in this language.
+
+Based on this brand's industry and context, generate 10 short, generic search prompts (each 30-100 characters, aim for 40-80) that potential customers would type into AI search engines. These prompts should be queries where this brand COULD naturally appear in AI responses — but the prompts themselves must NOT contain any brand names.`;
+
+ const promptModel = process.env.PROMPT_SUGGESTION_MODEL || 'google/gemini-3-flash-preview';
+ const aiModel = resolveModel(model || promptModel);
+
+ const { object } = await generateObject({
+ model: aiModel,
+ schema: promptSuggestionSchema,
+ system: getSystemPrompt(langName),
+ prompt: userPrompt,
+ });
+
+ return res.json({ prompts: object.prompts });
+ } catch (error) {
+ console.error('Prompt suggestion error:', error);
+ return res.status(500).json({
+ error: 'Failed to generate prompt suggestions',
+ details: error.message,
+ });
+ }
+ },
+);
+
+const topicPromptSchema = z.object({
+ topicPrompts: z.array(
+ z.object({
+ topic: z.string(),
+ prompts: z.array(z.string().min(30).max(100)).length(5),
+ }),
+ ),
+});
+
+/**
+ * POST /api/prompts/from-topics
+ * Body: { brandName, industry, description?, topics: string[] }
+ * Returns: { topicPrompts: [{ topic, prompts: string[] }] }
+ */
+router.post('/from-topics', async (req, res) => {
+ try {
+ const { brandName, industry, description, topics, language } = req.body;
+ const langName = getLanguageName(language);
+
+ if (!brandName || !topics?.length) {
+ return res
+ .status(400)
+ .json({ error: 'brandName and topics are required' });
+ }
+
+ const promptModel = process.env.PROMPT_SUGGESTION_MODEL || 'google/gemini-3-flash-preview';
+ const aiModel = resolveModel(promptModel);
+
+ const topicList = topics.map((t, i) => `${i + 1}. ${t}`).join('\n');
+
+ const { object } = await generateObject({
+ model: aiModel,
+ schema: topicPromptSchema,
+ system: `You are an AEO (Answer Engine Optimization) expert. Generate exactly 5 search prompts per topic that real users would type into AI search engines. Current year: ${new Date().getFullYear()}.
+
+RULES:
+- Keep prompts SHORT and concise — between 30 and 100 characters. Aim for 40-80 characters.
+- Write them like real quick searches, e.g. "best CRM for small business" or "top email marketing tools ${new Date().getFullYear()}".
+- Do NOT use the brand name "${brandName}" in the prompts.
+- Each prompt should be relevant to the specific topic it belongs to.
+- Focus on queries where the brand could organically appear in AI-generated answers.
+- Make prompts diverse: include comparisons, how-tos, best-of lists, recommendations, alternatives.
+IMPORTANT: All prompts MUST be written in ${langName}.`,
+ prompt: `Brand: ${brandName}
+Industry: ${industry || 'Not specified'}
+Description: ${description || 'Not specified'}
+Language: ${langName} — write ALL prompts in this language.
+
+Generate 5 search prompts for each of these topics:
+${topicList}
+
+Return the exact topic names as provided above.`,
+ });
+
+ return res.json({ topicPrompts: object.topicPrompts });
+ } catch (error) {
+ console.error('Topic prompt generation error:', error);
+ return res.status(500).json({
+ error: 'Failed to generate prompts from topics',
+ details: error.message,
+ });
+ }
+});
+
+export default router;
diff --git a/server/src/routes/topics.js b/server/src/routes/topics.js
new file mode 100644
index 000000000..ddb83949b
--- /dev/null
+++ b/server/src/routes/topics.js
@@ -0,0 +1,83 @@
+import { Router } from 'express';
+import { generateText, generateObject } from 'ai';
+import { z } from 'zod';
+import { resolveModel } from '../lib/ai-provider.js';
+import { getLanguageName } from '../lib/languages.js';
+
+const router = Router();
+
+const topicSchema = z.object({
+ topics: z
+ .array(
+ z.object({
+ name: z
+ .string()
+ .describe(
+ 'A concise topic name (3-8 words) relevant to the brand for AEO tracking',
+ ),
+ }),
+ )
+ .min(6)
+ .max(12),
+});
+
+/**
+ * POST /api/topics/suggest
+ * Body: { brandName, industry, description?, website?, language? }
+ * Returns: { topics: [{ name }] }
+ */
+router.post('/suggest', async (req, res) => {
+ try {
+ const { brandName, industry, description, website, language } = req.body;
+ const langName = getLanguageName(language);
+
+ if (!brandName) {
+ return res.status(400).json({ error: 'brandName is required' });
+ }
+
+ const topicModel = process.env.TOPIC_SUGGESTION_MODEL || 'google/gemini-3-flash-preview';
+
+ const researchPrompt = `Search the web and research "${brandName}" (${website || 'no website provided'}).
+Industry: ${industry || 'Not specified'}
+Description: ${description || 'Not specified'}
+
+Find 8-12 relevant TOPICS that this brand should track for Answer Engine Optimization (AEO). Topics should represent key areas where users might ask AI assistants about this brand or its industry.
+
+IMPORTANT: Do NOT include the brand name "${brandName}" in any topic. Topics must be generic industry terms.
+
+Good topics examples:
+- "Best [product category] tools"
+- "[Industry] best practices"
+- "[Product category] comparison"
+- "[Specific feature] solutions"
+- "[Use case] automation"
+
+Each topic must focus on a SINGLE concept. Do NOT combine two ideas with "and" or "&" in a single topic. For example, instead of "Fabric types and care", create two separate topics: "Fabric types" and "Fabric care".
+
+Topics should be diverse: include competitive comparisons, product features, industry trends, use cases, and problem-solving areas.
+
+IMPORTANT: Generate all topic names in ${langName}.`;
+
+ const { text: research } = await generateText({
+ model: resolveModel(topicModel, { useSearchGrounding: true }),
+ prompt: researchPrompt,
+ });
+
+ const { object } = await generateObject({
+ model: resolveModel(topicModel),
+ schema: topicSchema,
+ system: `Extract AEO tracking topics from the research below. Each topic should be concise (3-8 words) and represent an area where AI assistants might mention or discuss "${brandName}". Do NOT include the brand name "${brandName}" in any topic — keep them generic. Include a mix of: competitive comparisons, product/service features, industry trends, use cases, and problem-solving topics. Each topic MUST focus on a single concept — never combine two ideas with "and" or "&". IMPORTANT: All topic names MUST be written in ${langName}.`,
+ prompt: research,
+ });
+
+ return res.json({ topics: object.topics });
+ } catch (error) {
+ console.error('Topic suggestion error:', error);
+ return res.status(500).json({
+ error: 'Failed to generate topic suggestions',
+ details: error.message,
+ });
+ }
+});
+
+export default router;
diff --git a/server/src/routes/tracking.js b/server/src/routes/tracking.js
new file mode 100644
index 000000000..cb6ff43a9
--- /dev/null
+++ b/server/src/routes/tracking.js
@@ -0,0 +1,399 @@
+import { Router } from 'express';
+import { createJob, getJob, cancelJob } from '../lib/job-manager.js';
+import { runTrackingJob } from '../lib/job-runner.js';
+import supabaseAdmin from '../config/supabase.js';
+import { isCloud, getPlan } from '../config/plans.js';
+
+const router = Router();
+
+/**
+ * POST /api/tracking/check
+ * Body: { brandId, platformId?, promptId? }
+ * Enqueues an immediate tracking job.
+ */
+router.post('/check', async (req, res) => {
+ try {
+ const { brandId, promptId } = req.body;
+
+ if (!brandId) {
+ return res.status(400).json({ success: false, message: 'brandId is required' });
+ }
+
+ // Verify the user owns this brand
+ const { data: brand, error: brandErr } = await supabaseAdmin
+ .from('brands')
+ .select('id, organization_id')
+ .eq('id', brandId)
+ .single();
+
+ if (brandErr || !brand) {
+ return res.status(404).json({ success: false, message: 'Brand not found' });
+ }
+
+ const { data: profile } = await supabaseAdmin
+ .from('profiles')
+ .select('organization_id')
+ .eq('id', req.user.id)
+ .single();
+
+ if (!profile || profile.organization_id !== brand.organization_id) {
+ return res.status(403).json({ success: false, message: 'Unauthorized' });
+ }
+
+ const job = await createJob({
+ type: 'tracking',
+ brandId,
+ data: { brandId, promptId: promptId || null, immediate: true },
+ maxAttempts: 3,
+ });
+
+ const io = req.app.get('io');
+ runTrackingJob(job.id, io);
+
+ return res.json({
+ success: true,
+ jobId: job.id,
+ message: 'Tracking job enqueued',
+ });
+ } catch (error) {
+ console.error('[tracking] Check error:', error.message);
+ return res.status(500).json({ success: false, message: error.message });
+ }
+});
+
+/**
+ * POST /api/tracking/analyze-new
+ * Body: { brandId }
+ * Finds prompts with no results yet and runs tracking only for those.
+ * Enforces daily on-demand limit and cooldown in cloud mode.
+ */
+router.post('/analyze-new', async (req, res) => {
+ try {
+ const { brandId, promptIds: clientPromptIds } = req.body;
+ if (!brandId) {
+ return res.status(400).json({ success: false, message: 'brandId is required' });
+ }
+
+ const { data: brand, error: brandErr } = await supabaseAdmin
+ .from('brands')
+ .select('id, organization_id')
+ .eq('id', brandId)
+ .single();
+
+ if (brandErr || !brand) {
+ return res.status(404).json({ success: false, message: 'Brand not found' });
+ }
+
+ const { data: profile } = await supabaseAdmin
+ .from('profiles')
+ .select('organization_id')
+ .eq('id', req.user.id)
+ .single();
+
+ if (!profile || profile.organization_id !== brand.organization_id) {
+ return res.status(403).json({ success: false, message: 'Unauthorized' });
+ }
+
+ let newPromptIds;
+
+ if (Array.isArray(clientPromptIds) && clientPromptIds.length > 0) {
+ // Client sent specific prompt IDs — validate they belong to this brand
+ const { data: promptSets } = await supabaseAdmin
+ .from('prompt_sets')
+ .select('id')
+ .eq('brand_id', brandId);
+
+ if (!promptSets || promptSets.length === 0) {
+ return res.json({ success: true, newCount: 0, message: 'No prompt sets found' });
+ }
+
+ const setIds = promptSets.map((s) => s.id);
+ const { data: validPrompts } = await supabaseAdmin
+ .from('prompts')
+ .select('id')
+ .in('prompt_set_id', setIds)
+ .in('id', clientPromptIds)
+ .eq('is_active', true);
+
+ newPromptIds = (validPrompts || []).map((p) => p.id);
+ } else {
+ // Auto-detect unanalyzed prompts
+ const { data: promptSets } = await supabaseAdmin
+ .from('prompt_sets')
+ .select('id')
+ .eq('brand_id', brandId);
+
+ if (!promptSets || promptSets.length === 0) {
+ return res.json({ success: true, newCount: 0, message: 'No prompt sets found' });
+ }
+
+ const setIds = promptSets.map((s) => s.id);
+ const { data: allPrompts } = await supabaseAdmin
+ .from('prompts')
+ .select('id')
+ .in('prompt_set_id', setIds)
+ .eq('is_active', true);
+
+ if (!allPrompts || allPrompts.length === 0) {
+ return res.json({ success: true, newCount: 0, message: 'No active prompts' });
+ }
+
+ const allPromptIds = allPrompts.map((p) => p.id);
+
+ const { data: existingResults } = await supabaseAdmin
+ .from('prompt_results')
+ .select('prompt_id')
+ .eq('brand_id', brandId)
+ .in('prompt_id', allPromptIds);
+
+ const analyzedIds = new Set((existingResults || []).map((r) => r.prompt_id));
+ newPromptIds = allPromptIds.filter((id) => !analyzedIds.has(id));
+ }
+
+ if (newPromptIds.length === 0) {
+ return res.json({ success: true, newCount: 0, message: 'All prompts already analyzed' });
+ }
+
+ // --- Cloud-mode rate limiting ---
+ if (isCloud()) {
+ const { data: org } = await supabaseAdmin
+ .from('organizations')
+ .select('plan, subscription_status')
+ .eq('id', brand.organization_id)
+ .single();
+
+ const plan = !org || org.subscription_status !== 'active'
+ ? getPlan('starter')
+ : getPlan(org.plan);
+
+ const { maxDailyOnDemand, onDemandCooldownMinutes } = plan.limits;
+
+ // Check daily on-demand limit
+ if (maxDailyOnDemand !== -1) {
+ const todayStart = new Date();
+ todayStart.setHours(0, 0, 0, 0);
+
+ const { count: todayCount } = await supabaseAdmin
+ .from('jobs')
+ .select('id', { count: 'exact', head: true })
+ .eq('brand_id', brandId)
+ .eq('type', 'tracking')
+ .gte('created_at', todayStart.toISOString())
+ .contains('data', { onDemand: true });
+
+ if ((todayCount || 0) >= maxDailyOnDemand) {
+ return res.status(429).json({
+ success: false,
+ message: `Daily on-demand analysis limit reached (${maxDailyOnDemand}/day). Next analyses will run with the daily scheduled job.`,
+ limit: maxDailyOnDemand,
+ });
+ }
+ }
+
+ // Check cooldown
+ if (onDemandCooldownMinutes > 0) {
+ const cooldownCutoff = new Date(Date.now() - onDemandCooldownMinutes * 60 * 1000).toISOString();
+
+ const { data: recentJobs } = await supabaseAdmin
+ .from('jobs')
+ .select('created_at')
+ .eq('brand_id', brandId)
+ .eq('type', 'tracking')
+ .contains('data', { onDemand: true })
+ .gte('created_at', cooldownCutoff)
+ .limit(1);
+
+ if (recentJobs && recentJobs.length > 0) {
+ const nextAvailable = new Date(new Date(recentJobs[0].created_at).getTime() + onDemandCooldownMinutes * 60 * 1000);
+ const minutesLeft = Math.ceil((nextAvailable.getTime() - Date.now()) / 60_000);
+ return res.status(429).json({
+ success: false,
+ message: `Please wait ${minutesLeft} minute${minutesLeft !== 1 ? 's' : ''} before running another analysis.`,
+ retryAfterMinutes: minutesLeft,
+ });
+ }
+ }
+ }
+
+ const job = await createJob({
+ type: 'tracking',
+ brandId,
+ data: { brandId, promptIds: newPromptIds, immediate: true, onDemand: true },
+ maxAttempts: 3,
+ });
+
+ const io = req.app.get('io');
+ runTrackingJob(job.id, io);
+
+ return res.json({
+ success: true,
+ jobId: job.id,
+ newCount: newPromptIds.length,
+ message: `Analyzing ${newPromptIds.length} new prompt${newPromptIds.length !== 1 ? 's' : ''}`,
+ });
+ } catch (error) {
+ console.error('[tracking] analyze-new error:', error.message);
+ return res.status(500).json({ success: false, message: error.message });
+ }
+});
+
+/**
+ * GET /api/tracking/unanalyzed/:brandId
+ * Returns the list of active prompts that have no results yet.
+ */
+router.get('/unanalyzed/:brandId', async (req, res) => {
+ try {
+ const { brandId } = req.params;
+
+ const { data: promptSets } = await supabaseAdmin
+ .from('prompt_sets')
+ .select('id')
+ .eq('brand_id', brandId);
+
+ if (!promptSets || promptSets.length === 0) {
+ return res.json({ success: true, count: 0, prompts: [] });
+ }
+
+ const setIds = promptSets.map((s) => s.id);
+ const { data: allPrompts } = await supabaseAdmin
+ .from('prompts')
+ .select('id, text, category')
+ .in('prompt_set_id', setIds)
+ .eq('is_active', true);
+
+ if (!allPrompts || allPrompts.length === 0) {
+ return res.json({ success: true, count: 0, prompts: [] });
+ }
+
+ const allPromptIds = allPrompts.map((p) => p.id);
+
+ const { data: existingResults } = await supabaseAdmin
+ .from('prompt_results')
+ .select('prompt_id')
+ .eq('brand_id', brandId)
+ .in('prompt_id', allPromptIds);
+
+ const analyzedIds = new Set((existingResults || []).map((r) => r.prompt_id));
+ const unanalyzed = allPrompts.filter((p) => !analyzedIds.has(p.id));
+
+ return res.json({ success: true, count: unanalyzed.length, prompts: unanalyzed });
+ } catch (error) {
+ console.error('[tracking] unanalyzed error:', error.message);
+ return res.status(500).json({ success: false, message: error.message });
+ }
+});
+
+/**
+ * GET /api/tracking/results/:brandId
+ * Query: ?limit=20&offset=0&promptId=xxx&platform=chatgpt
+ */
+router.get('/results/:brandId', async (req, res) => {
+ try {
+ const { brandId } = req.params;
+ const limit = Math.min(parseInt(req.query.limit || '20', 10), 100);
+ const offset = parseInt(req.query.offset || '0', 10);
+ const { promptId, platform } = req.query;
+
+ // Verify ownership
+ const { data: brand } = await supabaseAdmin
+ .from('brands')
+ .select('id, organization_id')
+ .eq('id', brandId)
+ .single();
+
+ if (!brand) {
+ return res.status(404).json({ success: false, message: 'Brand not found' });
+ }
+
+ const { data: profile } = await supabaseAdmin
+ .from('profiles')
+ .select('organization_id')
+ .eq('id', req.user.id)
+ .single();
+
+ if (!profile || profile.organization_id !== brand.organization_id) {
+ return res.status(403).json({ success: false, message: 'Unauthorized' });
+ }
+
+ let query = supabaseAdmin
+ .from('prompt_results')
+ .select('*', { count: 'exact' })
+ .eq('brand_id', brandId)
+ .order('created_at', { ascending: false })
+ .range(offset, offset + limit - 1);
+
+ if (promptId) query = query.eq('prompt_id', promptId);
+ if (platform) query = query.eq('platform', platform);
+
+ const { data, error, count } = await query;
+ if (error) throw error;
+
+ return res.json({ success: true, results: data, total: count });
+ } catch (error) {
+ console.error('[tracking] Results error:', error.message);
+ return res.status(500).json({ success: false, message: error.message });
+ }
+});
+
+/**
+ * GET /api/tracking/status/:brandId
+ * Returns the latest check timestamps per platform.
+ */
+router.get('/status/:brandId', async (req, res) => {
+ try {
+ const { brandId } = req.params;
+
+ const { data: platforms, error } = await supabaseAdmin
+ .from('brand_platforms')
+ .select('id, platform, is_enabled, last_checked_at, check_frequency, api_model')
+ .eq('brand_id', brandId)
+ .eq('is_enabled', true);
+
+ if (error) throw error;
+
+ return res.json({ success: true, platforms: platforms || [] });
+ } catch (error) {
+ console.error('[tracking] Status error:', error.message);
+ return res.status(500).json({ success: false, message: error.message });
+ }
+});
+
+/**
+ * GET /api/tracking/job/:jobId
+ * Returns job state and progress for live tracking UI.
+ */
+router.get('/job/:jobId', async (req, res) => {
+ try {
+ const job = await getJob(req.params.jobId);
+ if (!job) {
+ return res.json({ success: true, status: 'not_found' });
+ }
+
+ return res.json({
+ success: true,
+ status: job.status,
+ progress: job.progress || {},
+ result: job.status === 'completed' ? job.result : null,
+ failedReason: job.status === 'failed' ? job.failed_reason : null,
+ });
+ } catch (error) {
+ console.error('[tracking] Job status error:', error.message);
+ return res.status(500).json({ success: false, message: error.message });
+ }
+});
+
+/**
+ * DELETE /api/tracking/job/:jobId
+ * Cancels a tracking job.
+ */
+router.delete('/job/:jobId', async (req, res) => {
+ try {
+ await cancelJob(req.params.jobId);
+ return res.json({ success: true, message: 'Job cancelled' });
+ } catch (error) {
+ console.error('[tracking] Job cancel error:', error.message);
+ return res.status(500).json({ success: false, message: error.message });
+ }
+});
+
+export default router;
diff --git a/server/src/routes/traffic.js b/server/src/routes/traffic.js
new file mode 100644
index 000000000..b9154e26d
--- /dev/null
+++ b/server/src/routes/traffic.js
@@ -0,0 +1,111 @@
+import { Router } from 'express';
+import { readFileSync } from 'fs';
+import { join, dirname } from 'path';
+import { fileURLToPath } from 'url';
+import supabaseAdmin from '../config/supabase.js';
+import { trafficLimiter } from '../middleware/rate-limiter.js';
+
+const router = Router();
+
+const __dirname = dirname(fileURLToPath(import.meta.url));
+const scriptPath = join(__dirname, '..', 'public', 't.js');
+
+let cachedScript = null;
+let cachedEtag = null;
+
+function getScript() {
+ if (!cachedScript) {
+ cachedScript = readFileSync(scriptPath, 'utf-8');
+ cachedEtag = `"${Buffer.from(cachedScript).length.toString(36)}-${Date.now().toString(36)}"`;
+ }
+ return { body: cachedScript, etag: cachedEtag };
+}
+
+/**
+ * GET /t.js — serve the tracking script with aggressive caching
+ */
+router.get('/t.js', (req, res) => {
+ const { body, etag } = getScript();
+
+ if (req.headers['if-none-match'] === etag) {
+ return res.status(304).end();
+ }
+
+ res.set({
+ 'Content-Type': 'application/javascript; charset=utf-8',
+ 'Cache-Control': 'public, max-age=3600, stale-while-revalidate=86400',
+ 'ETag': etag,
+ 'Access-Control-Allow-Origin': '*',
+ 'X-Content-Type-Options': 'nosniff',
+ });
+
+ return res.send(body);
+});
+
+/**
+ * CORS preflight for track endpoint (fetch fallback needs this)
+ */
+router.options('/track/:trackingCode', (req, res) => {
+ res.set({
+ 'Access-Control-Allow-Origin': '*',
+ 'Access-Control-Allow-Methods': 'POST, OPTIONS',
+ 'Access-Control-Allow-Headers': 'Content-Type',
+ 'Access-Control-Max-Age': '86400',
+ });
+ return res.status(204).end();
+});
+
+/**
+ * POST /track/:trackingCode — receive beacon data from t.js
+ */
+router.post('/track/:trackingCode', trafficLimiter, async (req, res) => {
+ res.set('Access-Control-Allow-Origin', '*');
+ try {
+ const { trackingCode } = req.params;
+
+ if (!trackingCode || trackingCode.length < 6 || trackingCode.length > 64) {
+ return res.status(400).json({ ok: false });
+ }
+
+ const { data: brand, error: brandErr } = await supabaseAdmin
+ .from('brands')
+ .select('id')
+ .eq('tracking_code', trackingCode)
+ .single();
+
+ if (brandErr || !brand) {
+ return res.status(404).json({ ok: false });
+ }
+
+ const body = req.body;
+ if (!body || !body.u) {
+ return res.status(400).json({ ok: false });
+ }
+
+ const ip = req.headers['cf-connecting-ip']
+ || req.headers['x-forwarded-for']?.split(',')[0]?.trim()
+ || req.headers['x-real-ip']
+ || req.ip;
+
+ const country = req.headers['cf-ipcountry'] || null;
+
+ await supabaseAdmin.from('ai_traffic_logs').insert({
+ brand_id: brand.id,
+ url: (body.u || '').slice(0, 2048),
+ referrer: (body.r || '').slice(0, 2048) || null,
+ source_platform: (body.s || '').slice(0, 255) || null,
+ user_agent: (body.a || '').slice(0, 512) || null,
+ ip_address: ip || null,
+ country,
+ language: (body.l || '').slice(0, 16) || null,
+ screen: (body.d || '').slice(0, 16) || null,
+ });
+
+ return res.status(204).end();
+ } catch (error) {
+ console.error('[traffic] Track error:', error.message);
+ return res.status(500).json({ ok: false });
+ }
+});
+
+export default router;
diff --git a/server/src/routes/volumes.js b/server/src/routes/volumes.js
new file mode 100644
index 000000000..e67343f3d
--- /dev/null
+++ b/server/src/routes/volumes.js
@@ -0,0 +1,476 @@
+import { Router } from 'express';
+import { generateObject } from 'ai';
+import { z } from 'zod';
+import { resolveModel } from '../lib/ai-provider.js';
+import { getSearchVolumes } from '../lib/dataforseo.js';
+import { requireFeature, enforceVolumeQuota, getVolumeQuotaStatus, PlanLimitError } from '../lib/plan-guard.js';
+import supabaseAdmin from '../config/supabase.js';
+
+const router = Router();
+
+const AI_VOLUME_MULTIPLIER = parseFloat(
+ process.env.AI_VOLUME_MULTIPLIER || '0.15',
+);
+
+const intentKeywordSchema = z.object({
+ intent: z
+ .enum([
+ 'comparison',
+ 'how-to',
+ 'what-is',
+ 'best-top',
+ 'vs-review',
+ 'recommendation',
+ 'problem-solving',
+ 'other',
+ ])
+ .describe('The primary search intent behind this prompt'),
+ keywords: z
+ .array(
+ z
+ .string()
+ .describe('A short, Google-searchable keyword phrase (2-5 words)'),
+ )
+ .length(5)
+ .describe(
+ 'Five high-volume Google search keywords that capture the same intent as the prompt',
+ ),
+});
+
+const INTENT_SYSTEM_PROMPT = `You are a keyword research expert. Given an AI search prompt, you must:
+
+1. Determine the primary search intent (comparison, how-to, what-is, best-top, vs-review, recommendation, or problem-solving).
+2. Generate exactly 5 short keyword phrases (2-5 words each) that a user would type into Google when searching for the same topic.
+
+Rules:
+- Keywords must be generic — no brand names.
+- Keywords should be realistic, high-volume Google search queries.
+- Each keyword must be unique and cover a slightly different angle of the same topic.
+- Use lowercase only.
+- Think about what real users actually type into Google's search bar.
+
+Example: For the prompt "What are the best tools for managing remote teams?"
+- Intent: best-top
+- Keywords: ["best remote team tools", "remote team management software", "tools for remote teams", "remote work management", "top remote collaboration tools"]`;
+
+function mapVolumeRow(saved) {
+ return {
+ id: saved.id,
+ promptId: saved.prompt_id,
+ intent: saved.intent,
+ keywords: saved.keywords,
+ googleVolumes: saved.google_volumes,
+ totalGoogleVolume: saved.total_google_volume,
+ aiVolumeMultiplier: parseFloat(saved.ai_volume_multiplier),
+ estAiVolume: saved.est_ai_volume,
+ locationCode: saved.location_code,
+ languageCode: saved.language_code,
+ fetchedAt: saved.fetched_at,
+ };
+}
+
+async function fetchAndSaveVolumes(
+ promptId,
+ keywords,
+ intent,
+ locationCode,
+ languageCode,
+) {
+ const volumes = await getSearchVolumes(keywords, {
+ locationCode: locationCode || undefined,
+ languageCode: languageCode || undefined,
+ });
+
+ const totalGoogleVolume = Object.values(volumes).reduce(
+ (sum, v) => sum + v,
+ 0,
+ );
+ const estAiVolume = Math.round(totalGoogleVolume * AI_VOLUME_MULTIPLIER);
+
+ const { data: saved, error: dbError } = await supabaseAdmin
+ .from('prompt_volumes')
+ .upsert(
+ {
+ prompt_id: promptId,
+ intent,
+ keywords,
+ google_volumes: volumes,
+ total_google_volume: totalGoogleVolume,
+ ai_volume_multiplier: AI_VOLUME_MULTIPLIER,
+ est_ai_volume: estAiVolume,
+ location_code: locationCode || null,
+ language_code: languageCode || null,
+ fetched_at: new Date().toISOString(),
+ },
+ { onConflict: 'prompt_id' },
+ )
+ .select()
+ .single();
+
+ if (dbError) throw new Error(dbError.message);
+ return saved;
+}
+
+/**
+ * POST /api/volumes/analyze
+ * First-time analysis: LLM extracts intent + keywords, then fetches volumes.
+ * If keywords already exist for this prompt, only refreshes volumes (skips LLM).
+ * Pass force=true to re-generate keywords via LLM even if they exist.
+ */
+router.post('/analyze', requireFeature('prompt_volumes'), async (req, res) => {
+ try {
+ const { remaining, orgId } = await enforceVolumeQuota(req.user.id);
+
+ const { promptId, promptText, locationCode, languageCode, model, force } =
+ req.body;
+
+ if (!promptId || !promptText) {
+ return res
+ .status(400)
+ .json({ error: 'promptId and promptText are required' });
+ }
+
+ let intent;
+ let keywords;
+
+ if (!force) {
+ const { data: existing } = await supabaseAdmin
+ .from('prompt_volumes')
+ .select('intent, keywords')
+ .eq('prompt_id', promptId)
+ .single();
+
+ if (existing?.keywords?.length) {
+ intent = existing.intent;
+ keywords = existing.keywords;
+ }
+ }
+
+ if (!keywords) {
+ const aiModel = resolveModel(model);
+ const { object: intentResult } = await generateObject({
+ model: aiModel,
+ schema: intentKeywordSchema,
+ system: INTENT_SYSTEM_PROMPT,
+ prompt: `Analyze this AI search prompt and extract intent + 5 Google keywords:\n\n"${promptText}"`,
+ });
+ intent = intentResult.intent;
+ keywords = intentResult.keywords;
+ }
+
+ const saved = await fetchAndSaveVolumes(
+ promptId,
+ keywords,
+ intent,
+ locationCode,
+ languageCode,
+ );
+
+ if (orgId) {
+ await supabaseAdmin.from('volume_usage').insert({
+ organization_id: orgId,
+ action: 'analyze',
+ prompt_count: 1,
+ });
+ }
+
+ const result = mapVolumeRow(saved);
+ return res.json({ ...result, remaining: remaining === -1 ? -1 : remaining - 1 });
+ } catch (error) {
+ if (error instanceof PlanLimitError) {
+ return res.status(error.statusCode).json({
+ success: false,
+ error: 'quota_exceeded',
+ message: error.message,
+ });
+ }
+ console.error('Volume analysis error:', error);
+ return res.status(500).json({
+ error: 'Failed to analyze prompt volume',
+ details: error.message,
+ });
+ }
+});
+
+/**
+ * POST /api/volumes/analyze-batch
+ * Batch analysis. Uses saved keywords when available, calls LLM only for new prompts.
+ * Pass force=true to re-generate all keywords via LLM.
+ */
+router.post(
+ '/analyze-batch',
+ requireFeature('prompt_volumes'),
+ async (req, res) => {
+ try {
+ const { remaining, orgId } = await enforceVolumeQuota(req.user.id);
+
+ const { prompts, locationCode, languageCode, model, force } = req.body;
+
+ if (!Array.isArray(prompts) || prompts.length === 0) {
+ return res
+ .status(400)
+ .json({ error: 'prompts array is required and must not be empty' });
+ }
+
+ if (prompts.length > 50) {
+ return res.status(400).json({ error: 'Maximum 50 prompts per batch' });
+ }
+
+ const promptIds = prompts.map((p) => p.promptId);
+ let existingMap = {};
+
+ if (!force) {
+ const { data: existingRows } = await supabaseAdmin
+ .from('prompt_volumes')
+ .select('prompt_id, intent, keywords')
+ .in('prompt_id', promptIds);
+
+ if (existingRows) {
+ for (const row of existingRows) {
+ if (row.keywords?.length) {
+ existingMap[row.prompt_id] = {
+ intent: row.intent,
+ keywords: row.keywords,
+ };
+ }
+ }
+ }
+ }
+
+ const aiModel = resolveModel(model);
+ const results = [];
+
+ for (const { promptId, promptText } of prompts) {
+ try {
+ let intent;
+ let keywords;
+
+ const cached = existingMap[promptId];
+ if (cached) {
+ intent = cached.intent;
+ keywords = cached.keywords;
+ } else {
+ const { object: intentResult } = await generateObject({
+ model: aiModel,
+ schema: intentKeywordSchema,
+ system: INTENT_SYSTEM_PROMPT,
+ prompt: `Analyze this AI search prompt and extract intent + 5 Google keywords:\n\n"${promptText}"`,
+ });
+ intent = intentResult.intent;
+ keywords = intentResult.keywords;
+ }
+
+ const saved = await fetchAndSaveVolumes(
+ promptId,
+ keywords,
+ intent,
+ locationCode,
+ languageCode,
+ );
+ results.push(mapVolumeRow(saved));
+ } catch (err) {
+ results.push({ promptId, error: err.message });
+ }
+ }
+
+ const successCount = results.filter((r) => !r.error).length;
+ if (successCount > 0 && orgId) {
+ await supabaseAdmin.from('volume_usage').insert({
+ organization_id: orgId,
+ action: 'analyze-batch',
+ prompt_count: successCount,
+ });
+ }
+
+ return res.json({ results, remaining: remaining === -1 ? -1 : remaining - 1 });
+ } catch (error) {
+ if (error instanceof PlanLimitError) {
+ return res.status(error.statusCode).json({
+ success: false,
+ error: 'quota_exceeded',
+ message: error.message,
+ });
+ }
+ console.error('Batch volume analysis error:', error);
+ return res.status(500).json({
+ error: 'Failed to analyze prompt volumes',
+ details: error.message,
+ });
+ }
+ },
+);
+
+/**
+ * POST /api/volumes/refresh
+ * Refreshes Google volumes for all prompts that already have saved keywords.
+ * Does NOT call LLM — only re-fetches DataForSEO volumes.
+ * Body: { brandId, locationCode?, languageCode? }
+ */
+router.post('/refresh', requireFeature('prompt_volumes'), async (req, res) => {
+ try {
+ const { remaining, orgId } = await enforceVolumeQuota(req.user.id);
+
+ const { brandId, locationCode, languageCode } = req.body;
+
+ if (!brandId) {
+ return res.status(400).json({ error: 'brandId is required' });
+ }
+
+ const { data: promptSets } = await supabaseAdmin
+ .from('prompt_sets')
+ .select('id')
+ .eq('brand_id', brandId);
+
+ if (!promptSets?.length) {
+ return res.json({ results: [], refreshed: 0, remaining });
+ }
+
+ const { data: prompts } = await supabaseAdmin
+ .from('prompts')
+ .select('id')
+ .in(
+ 'prompt_set_id',
+ promptSets.map((ps) => ps.id),
+ );
+
+ if (!prompts?.length) {
+ return res.json({ results: [], refreshed: 0, remaining });
+ }
+
+ const { data: existingVolumes } = await supabaseAdmin
+ .from('prompt_volumes')
+ .select('prompt_id, intent, keywords')
+ .in(
+ 'prompt_id',
+ prompts.map((p) => p.id),
+ );
+
+ if (!existingVolumes?.length) {
+ return res.json({ results: [], refreshed: 0, remaining });
+ }
+
+ const results = [];
+
+ for (const row of existingVolumes) {
+ try {
+ const saved = await fetchAndSaveVolumes(
+ row.prompt_id,
+ row.keywords,
+ row.intent,
+ locationCode,
+ languageCode,
+ );
+ results.push(mapVolumeRow(saved));
+ } catch (err) {
+ results.push({ promptId: row.prompt_id, error: err.message });
+ }
+ }
+
+ const refreshed = results.filter((r) => !r.error).length;
+ if (refreshed > 0 && orgId) {
+ await supabaseAdmin.from('volume_usage').insert({
+ organization_id: orgId,
+ action: 'refresh',
+ prompt_count: refreshed,
+ });
+ }
+
+ return res.json({
+ results,
+ refreshed,
+ remaining: remaining === -1 ? -1 : remaining - 1,
+ });
+ } catch (error) {
+ if (error instanceof PlanLimitError) {
+ return res.status(error.statusCode).json({
+ success: false,
+ error: 'quota_exceeded',
+ message: error.message,
+ });
+ }
+ console.error('Volume refresh error:', error);
+ return res.status(500).json({
+ error: 'Failed to refresh volumes',
+ details: error.message,
+ });
+ }
+});
+
+/**
+ * GET /api/volumes/brand/:brandId
+ */
+router.get('/brand/:brandId', async (req, res) => {
+ try {
+ const { brandId } = req.params;
+
+ const { data: promptSets, error: psError } = await supabaseAdmin
+ .from('prompt_sets')
+ .select('id')
+ .eq('brand_id', brandId);
+
+ if (psError) {
+ return res.status(500).json({
+ error: 'Failed to fetch prompt sets',
+ details: psError.message,
+ });
+ }
+
+ if (!promptSets || promptSets.length === 0) {
+ return res.json({ volumes: [] });
+ }
+
+ const setIds = promptSets.map((ps) => ps.id);
+
+ const { data: prompts, error: pError } = await supabaseAdmin
+ .from('prompts')
+ .select('id, text, category, prompt_set_id')
+ .in('prompt_set_id', setIds);
+
+ if (pError) {
+ return res
+ .status(500)
+ .json({ error: 'Failed to fetch prompts', details: pError.message });
+ }
+
+ if (!prompts || prompts.length === 0) {
+ return res.json({ volumes: [] });
+ }
+
+ const promptIds = prompts.map((p) => p.id);
+
+ const { data: volumes, error: vError } = await supabaseAdmin
+ .from('prompt_volumes')
+ .select('*')
+ .in('prompt_id', promptIds)
+ .order('est_ai_volume', { ascending: false });
+
+ if (vError) {
+ return res
+ .status(500)
+ .json({ error: 'Failed to fetch volumes', details: vError.message });
+ }
+
+ const promptMap = {};
+ for (const p of prompts) {
+ promptMap[p.id] = { text: p.text, category: p.category };
+ }
+
+ const enriched = (volumes || []).map((v) => ({
+ ...mapVolumeRow(v),
+ promptText: promptMap[v.prompt_id]?.text || '',
+ promptCategory: promptMap[v.prompt_id]?.category || '',
+ }));
+
+ const quota = await getVolumeQuotaStatus(req.user.id);
+
+ return res.json({ volumes: enriched, quota });
+ } catch (error) {
+ console.error('Fetch volumes error:', error);
+ return res.status(500).json({
+ error: 'Failed to fetch volume data',
+ details: error.message,
+ });
+ }
+});
+
+export default router;
diff --git a/server/src/server.js b/server/src/server.js
new file mode 100644
index 000000000..d677381f7
--- /dev/null
+++ b/server/src/server.js
@@ -0,0 +1,232 @@
+import 'dotenv/config';
+import express from 'express';
+import http from 'http';
+import cors from 'cors';
+import helmet from 'helmet';
+import bodyParser from 'body-parser';
+import { Server as SocketIOServer } from 'socket.io';
+import cron from 'node-cron';
+
+import Middleware from './middleware/index.js';
+import { apiLimiter } from './middleware/rate-limiter.js';
+import routes from './routes/index.js';
+import trafficRoutes from './routes/traffic.js';
+import { createJob, cleanupStaleJobs, cleanupOldJobs } from './lib/job-manager.js';
+import { runTrackingJob } from './lib/job-runner.js';
+import supabaseAdmin from './config/supabase.js';
+import { getPlan, hasFeature, isCloud } from './config/plans.js';
+
+const app = express();
+app.set('trust proxy', 1);
+const server = http.createServer(app);
+
+// --- Body parsing (before all routes) ---
+app.use(bodyParser.json({ limit: '50mb' }));
+app.use(bodyParser.urlencoded({ limit: '50mb', extended: true }));
+
+// --- Public traffic tracking (before helmet/cors — needs its own CORS for any origin) ---
+app.use('/', trafficRoutes);
+
+// --- Request logger (before everything to catch all requests) ---
+app.use((req, res, next) => {
+ console.log(`[req] ${req.method} ${req.path} | origin: ${req.headers.origin} | ip: ${req.ip}`);
+ next();
+});
+
+// --- CORS (for dashboard API only — after traffic routes) ---
+const allowedOrigins = (process.env.ALLOWED_ORIGINS || 'http://localhost:3000')
+ .split(',')
+ .map((o) => o.trim());
+
+console.log('[cors] Allowed origins:', allowedOrigins);
+
+app.use(
+ cors({
+ origin: allowedOrigins,
+ credentials: true,
+ })
+);
+
+// --- Security ---
+app.use(helmet({
+ crossOriginResourcePolicy: { policy: 'cross-origin' },
+}));
+
+// --- Rate limiting ---
+app.use('/api', apiLimiter);
+
+// --- Socket.IO ---
+const io = new SocketIOServer(server, {
+ cors: {
+ origin: allowedOrigins,
+ methods: ['GET', 'POST'],
+ credentials: true,
+ },
+});
+
+io.use((socket, next) =>
+ Middleware.checkRequestIsComingFromDomainForSocket(socket, next)
+);
+io.use((socket, next) => Middleware.decodeTokenForSocket(socket, next));
+
+io.on('connection', (socket) => {
+ console.log(`Socket connected: ${socket.id} (user: ${socket.user?.id})`);
+
+ socket.on('disconnect', () => {
+ console.log(`Socket disconnected: ${socket.id}`);
+ });
+});
+
+// Make io accessible to routes
+app.set('io', io);
+
+// --- Daily tracking logic (shared by internal endpoint and self-hosted cron) ---
+async function runDailyTracking() {
+ const isCloudMode = isCloud();
+
+ const { data: brands, error } = await supabaseAdmin
+ .from('brands')
+ .select('id, organization_id');
+
+ if (error || !brands || brands.length === 0) {
+ return { triggered: 0, total: 0 };
+ }
+
+ const orgPlanCache = {};
+ let triggered = 0;
+
+ for (const brand of brands) {
+ if (!orgPlanCache[brand.organization_id]) {
+ if (!isCloudMode) {
+ orgPlanCache[brand.organization_id] = getPlan('self_hosted');
+ } else {
+ const { data: org } = await supabaseAdmin
+ .from('organizations')
+ .select('plan, subscription_status')
+ .eq('id', brand.organization_id)
+ .single();
+ orgPlanCache[brand.organization_id] =
+ !org || org.subscription_status !== 'active'
+ ? getPlan('starter')
+ : getPlan(org.plan);
+ }
+ }
+
+ const plan = orgPlanCache[brand.organization_id];
+ if (!hasFeature(plan, 'daily_monitoring')) continue;
+
+ const { count } = await supabaseAdmin
+ .from('prompts')
+ .select('id, prompt_sets!inner(brand_id)', { count: 'exact', head: true })
+ .eq('prompt_sets.brand_id', brand.id)
+ .eq('is_active', true);
+
+ if ((count || 0) === 0) continue;
+
+ const job = await createJob({
+ type: 'tracking',
+ brandId: brand.id,
+ data: { brandId: brand.id, immediate: false },
+ maxAttempts: 3,
+ });
+ runTrackingJob(job.id, io);
+ triggered++;
+ }
+
+ console.log(`[cron] Daily tracking: triggered=${triggered} total_brands=${brands.length}`);
+ return { triggered, total: brands.length };
+}
+
+// --- Internal cron endpoint (CRON_SECRET auth, used by Vercel Cron in cloud mode) ---
+app.post('/api/internal/daily-tracking', async (req, res) => {
+ const secret = req.headers.authorization?.replace('Bearer ', '');
+ if (!process.env.CRON_SECRET || secret !== process.env.CRON_SECRET) {
+ return res.status(401).json({ success: false, message: 'Unauthorized' });
+ }
+
+ try {
+ const result = await runDailyTracking();
+ return res.json({ success: true, ...result });
+ } catch (err) {
+ console.error('[cron] Daily tracking error:', err.message);
+ return res.status(500).json({ success: false, message: err.message });
+ }
+});
+
+// --- Internal trigger-tracking endpoint (CRON_SECRET auth, called by Stripe success route) ---
+app.post('/api/internal/trigger-tracking', async (req, res) => {
+ const secret = req.headers.authorization?.replace('Bearer ', '');
+ if (!process.env.CRON_SECRET || secret !== process.env.CRON_SECRET) {
+ return res.status(401).json({ success: false, message: 'Unauthorized' });
+ }
+
+ try {
+ const { brandId } = req.body;
+ if (!brandId) {
+ return res.status(400).json({ success: false, message: 'brandId is required' });
+ }
+
+ const job = await createJob({
+ type: 'tracking',
+ brandId,
+ data: { brandId, immediate: true },
+ maxAttempts: 3,
+ });
+ runTrackingJob(job.id, io);
+
+ return res.json({ success: true, jobId: job.id });
+ } catch (err) {
+ console.error('[internal] trigger-tracking error:', err.message);
+ return res.status(500).json({ success: false, message: err.message });
+ }
+});
+
+// --- Authenticated API routes ---
+app.use('/api', Middleware.decodeToken.bind(Middleware), routes);
+
+// Health check
+app.get('/', (req, res) => {
+ res.json({
+ status: 'ok',
+ service: 'aeo-server',
+ mode: process.env.IS_CLOUD === 'true' ? 'cloud' : 'self-hosted',
+ timestamp: new Date().toISOString(),
+ });
+});
+
+// --- Global error handler ---
+app.use((err, req, res, _next) => {
+ console.error('Unhandled error:', err.message);
+ res.status(err.status || 500).json({
+ success: false,
+ message:
+ process.env.NODE_ENV === 'development'
+ ? err.message
+ : 'Internal Server Error',
+ });
+});
+
+// --- Start ---
+const PORT = process.env.PORT || 80;
+
+server.listen(PORT, async () => {
+ console.log(`AEO Server running on port ${PORT} [${process.env.NODE_ENV}]`);
+
+ await cleanupStaleJobs();
+
+ if (!isCloud()) {
+ const schedule = process.env.DAILY_CRON_SCHEDULE || '0 6 * * *';
+ cron.schedule(schedule, async () => {
+ console.log('[cron] Self-hosted daily tracking triggered');
+ try {
+ await runDailyTracking();
+ await cleanupOldJobs();
+ } catch (err) {
+ console.error('[cron] Self-hosted daily tracking failed:', err.message);
+ }
+ });
+ console.log(`[cron] Self-hosted daily cron active (schedule: ${schedule})`);
+ }
+});
+
+export { app, server, io };
diff --git a/server/src/test-tracking.js b/server/src/test-tracking.js
new file mode 100644
index 000000000..07eed9cd1
--- /dev/null
+++ b/server/src/test-tracking.js
@@ -0,0 +1,67 @@
+/**
+ * Quick test script for the prompt tracking pipeline.
+ * Run: node src/test-tracking.js
+ *
+ * Tests: OpenAI Responses API (web_search) -> response parser -> console output
+ * No Redis or Supabase required.
+ */
+
+import 'dotenv/config';
+import { runPrompt } from './lib/openai-tracker.js';
+import { parseResponse } from './lib/response-parser.js';
+
+const TEST_PROMPT =
+ 'Best AI automation platforms for sales and marketing teams';
+const TEST_BRAND = {
+ brandName: 'Empler AI',
+ domains: ['empler.ai'],
+};
+
+async function main() {
+ console.log('=== Prompt Tracking Test ===\n');
+ console.log(`Prompt: "${TEST_PROMPT}"`);
+ console.log(`Brand: ${TEST_BRAND.brandName}`);
+ console.log(`Domains: ${TEST_BRAND.domains.join(', ')}`);
+ console.log(`Model: gpt-5-chat-latest (default)\n`);
+ console.log('Calling OpenAI Responses API with web_search...\n');
+
+ const startTime = Date.now();
+
+ try {
+ const response = await runPrompt(TEST_PROMPT);
+ const elapsed = ((Date.now() - startTime) / 1000).toFixed(1);
+
+ console.log(`--- Response (${elapsed}s) ---`);
+ console.log(response.text.slice(0, 500));
+ if (response.text.length > 500)
+ console.log(`... (${response.text.length} chars total)`);
+ console.log();
+
+ console.log(`--- Citations (${response.citations.length}) ---`);
+ for (const cite of response.citations.slice(0, 5)) {
+ console.log(` ${cite.title || 'No title'}`);
+ console.log(` ${cite.url}`);
+ console.log();
+ }
+ if (response.citations.length > 5) {
+ console.log(` ... and ${response.citations.length - 5} more`);
+ }
+
+ const metrics = parseResponse(response, TEST_BRAND);
+ console.log('--- Metrics ---');
+ console.log(` Mention Count: ${metrics.mentionCount}`);
+ console.log(` Citation Count: ${metrics.citationCount}`);
+ console.log(` Sentiment: ${metrics.sentiment}`);
+ console.log(` Visibility Score: ${metrics.visibilityScore}/100`);
+ console.log(` Model Used: ${response.model}`);
+ console.log('\nTest completed successfully!');
+ } catch (err) {
+ console.error('Test failed:', err.message);
+ if (err.message.includes('API key')) {
+ console.error('\nMake sure OPENAI_API_KEY is set in .env');
+ }
+ process.exit(1);
+ }
+}
+
+main();
diff --git a/server/src/test-volumes.js b/server/src/test-volumes.js
new file mode 100644
index 000000000..aee036f0a
--- /dev/null
+++ b/server/src/test-volumes.js
@@ -0,0 +1,132 @@
+import 'dotenv/config';
+import { generateObject } from 'ai';
+import { z } from 'zod';
+import { resolveModel } from './lib/ai-provider.js';
+import { getSearchVolumes } from './lib/dataforseo.js';
+
+const AI_VOLUME_MULTIPLIER = parseFloat(process.env.AI_VOLUME_MULTIPLIER || '0.15');
+
+const intentKeywordSchema = z.object({
+ intent: z.enum([
+ 'comparison', 'how-to', 'what-is', 'best-top',
+ 'vs-review', 'recommendation', 'problem-solving',
+ ]),
+ keywords: z.array(z.string()).length(5),
+});
+
+const INTENT_SYSTEM_PROMPT = `You are a keyword research expert. Given an AI search prompt, you must:
+1. Determine the primary search intent (comparison, how-to, what-is, best-top, vs-review, recommendation, or problem-solving).
+2. Generate exactly 5 short keyword phrases (2-5 words each) that a user would type into Google when searching for the same topic.
+
+Rules:
+- Keywords must be generic — no brand names.
+- Keywords should be realistic, high-volume Google search queries.
+- Each keyword must be unique and cover a slightly different angle of the same topic.
+- Use lowercase only.`;
+
+async function testDataForSEO() {
+ console.log('=== Test 1: DataForSEO Connection ===\n');
+
+ try {
+ const volumes = await getSearchVolumes(
+ ['best crm software', 'crm tools comparison'],
+ { locationCode: 2840, languageCode: 'en' }
+ );
+ console.log('DataForSEO volumes:', volumes);
+ console.log('OK - DataForSEO connection works!\n');
+ return true;
+ } catch (err) {
+ console.error('FAIL - DataForSEO error:', err.message, '\n');
+ return false;
+ }
+}
+
+async function testLLMExtraction() {
+ console.log('=== Test 2: LLM Intent + Keyword Extraction ===\n');
+
+ const testPrompt = 'Best CRM software for small businesses';
+
+ try {
+ const aiModel = resolveModel();
+ const { object } = await generateObject({
+ model: aiModel,
+ schema: intentKeywordSchema,
+ system: INTENT_SYSTEM_PROMPT,
+ prompt: `Analyze this AI search prompt and extract intent + 5 Google keywords:\n\n"${testPrompt}"`,
+ });
+
+ console.log('Prompt:', testPrompt);
+ console.log('Intent:', object.intent);
+ console.log('Keywords:', object.keywords);
+ console.log('OK - LLM extraction works!\n');
+ return object;
+ } catch (err) {
+ console.error('FAIL - LLM error:', err.message, '\n');
+ return null;
+ }
+}
+
+async function testFullPipeline() {
+ console.log('=== Test 3: Full Pipeline (LLM + DataForSEO + Calculation) ===\n');
+
+ const testPrompt = 'How to improve website SEO ranking';
+
+ try {
+ const aiModel = resolveModel();
+ const { object: intentResult } = await generateObject({
+ model: aiModel,
+ schema: intentKeywordSchema,
+ system: INTENT_SYSTEM_PROMPT,
+ prompt: `Analyze this AI search prompt and extract intent + 5 Google keywords:\n\n"${testPrompt}"`,
+ });
+
+ console.log('Prompt:', testPrompt);
+ console.log('Intent:', intentResult.intent);
+ console.log('Keywords:', intentResult.keywords);
+
+ const volumes = await getSearchVolumes(intentResult.keywords, {
+ locationCode: 2840,
+ languageCode: 'en',
+ });
+
+ console.log('\nGoogle Volumes:');
+ for (const [kw, vol] of Object.entries(volumes)) {
+ console.log(` "${kw}": ${vol.toLocaleString()}/mo`);
+ }
+
+ const totalGoogleVolume = Object.values(volumes).reduce((sum, v) => sum + v, 0);
+ const estAiVolume = Math.round(totalGoogleVolume * AI_VOLUME_MULTIPLIER);
+
+ console.log(`\nTotal Google Volume: ${totalGoogleVolume.toLocaleString()}/mo`);
+ console.log(`AI Multiplier: ${AI_VOLUME_MULTIPLIER} (${(AI_VOLUME_MULTIPLIER * 100).toFixed(0)}%)`);
+ console.log(`Est. AI Volume: ${estAiVolume.toLocaleString()}/mo`);
+ console.log('\nOK - Full pipeline works!');
+ } catch (err) {
+ console.error('FAIL - Pipeline error:', err.message);
+ }
+}
+
+async function main() {
+ console.log('Prompt Volumes System - Test Suite\n');
+ console.log(`DATAFORSEO_LOGIN: ${process.env.DATAFORSEO_LOGIN ? 'SET' : 'MISSING'}`);
+ console.log(`DATAFORSEO_PASSWORD: ${process.env.DATAFORSEO_PASSWORD ? 'SET' : 'MISSING'}`);
+ console.log(`AI_VOLUME_MULTIPLIER: ${AI_VOLUME_MULTIPLIER}`);
+ console.log(`OPENAI_API_KEY: ${process.env.OPENAI_API_KEY ? 'SET' : 'MISSING'}`);
+ console.log('');
+
+ const dfOk = await testDataForSEO();
+ if (!dfOk) {
+ console.log('Stopping — fix DataForSEO credentials first.');
+ process.exit(1);
+ }
+
+ const llmResult = await testLLMExtraction();
+ if (!llmResult) {
+ console.log('Stopping — fix AI provider config first.');
+ process.exit(1);
+ }
+
+ await testFullPipeline();
+}
+
+main().catch(console.error);
diff --git a/server/src/utils/.gitkeep b/server/src/utils/.gitkeep
new file mode 100644
index 000000000..8b1378917
--- /dev/null
+++ b/server/src/utils/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/server/src/workers/content-worker.js b/server/src/workers/content-worker.js
new file mode 100644
index 000000000..5f0912df4
--- /dev/null
+++ b/server/src/workers/content-worker.js
@@ -0,0 +1,292 @@
+/**
+ * Content opportunity generation processor.
+ * Moves the LLM-based generation out of the HTTP request path.
+ */
+
+import { generateObject } from 'ai';
+import { z } from 'zod';
+import { resolveModel } from '../lib/ai-provider.js';
+import supabaseAdmin from '../config/supabase.js';
+
+const opportunitySchema = z.object({
+ opportunities: z
+ .array(
+ z.object({
+ title: z
+ .string()
+ .describe(
+ 'A specific, actionable content recommendation backed by the data provided',
+ ),
+ description: z
+ .string()
+ .describe(
+ 'A 1-2 sentence explanation of why this action matters, referencing specific metrics',
+ ),
+ type: z
+ .enum(['owned', 'earned'])
+ .describe(
+ 'owned = content the brand controls (blog, landing page); earned = external content (PR, guest post, review)',
+ ),
+ impact: z
+ .enum(['high', 'medium', 'low'])
+ .describe('Expected impact on AI visibility based on volume and gap'),
+ relatedPromptIndex: z
+ .number()
+ .describe('0-based index of the prompt in the input array this opportunity relates to'),
+ }),
+ )
+ .min(1)
+ .max(20),
+});
+
+const OPPORTUNITY_SYSTEM_PROMPT = `You are an AEO (Answer Engine Optimization) content strategist. Given a brand's AI visibility data — including prompt tracking results, search volumes, and competitor mentions — generate specific, actionable content recommendations.
+
+Rules:
+- Each recommendation must be concrete and actionable (e.g. "Create a comprehensive comparison page for X" not "Improve your content").
+- Reference specific data points: volumes, visibility scores, competitor gaps.
+- Focus on content that will improve the brand's visibility in AI-generated answers.
+- Categorize as "owned" (blog posts, landing pages, FAQ pages the brand controls) or "earned" (guest posts, PR, review sites).
+- Set impact based on: volume × (100 - current visibility) × competitor gap.
+- Generate between 5 and 15 opportunities depending on data richness.
+- Do NOT repeat the same recommendation in different wording.`;
+
+function computeOpportunityScore(volume, visibility, competitorGap, intent) {
+ const intentWeights = {
+ comparison: 1.0,
+ 'best-top': 0.95,
+ 'vs-review': 0.9,
+ recommendation: 0.85,
+ 'how-to': 0.75,
+ 'problem-solving': 0.7,
+ 'what-is': 0.6,
+ other: 0.5,
+ };
+
+ const maxVolume = 50000;
+ const normalizedVolume = Math.min(volume / maxVolume, 1);
+ const visibilityGap = (100 - (visibility || 0)) / 100;
+ const normalizedCompGap = Math.min((competitorGap || 0) / 100, 1);
+ const intentWeight = intentWeights[intent] || 0.5;
+
+ const score =
+ normalizedVolume * 40 +
+ visibilityGap * 30 +
+ normalizedCompGap * 20 +
+ intentWeight * 10;
+
+ return Math.round(Math.min(score, 100) * 100) / 100;
+}
+
+/**
+ * Core logic: collect brand data, generate opportunities via LLM, save them.
+ * @param {{ brandId: string, model?: string, job?: { progress: function, signal?: AbortSignal } }} opts
+ */
+export async function processContentJob({ brandId, model, job }) {
+ job.progress({ phase: 'collecting_data', message: 'Fetching brand and prompt data...' });
+
+ const { data: brand } = await supabaseAdmin
+ .from('brands')
+ .select('id, name, description, industry, organization_id')
+ .eq('id', brandId)
+ .single();
+
+ if (!brand) throw new Error(`Brand not found: ${brandId}`);
+
+ const { data: domains } = await supabaseAdmin
+ .from('brand_domains')
+ .select('domain')
+ .eq('brand_id', brandId);
+
+ const { data: promptSets } = await supabaseAdmin
+ .from('prompt_sets')
+ .select('id')
+ .eq('brand_id', brandId);
+
+ if (!promptSets?.length) {
+ throw new Error('No prompt sets found. Add prompts first.');
+ }
+
+ const setIds = promptSets.map((ps) => ps.id);
+
+ const { data: prompts } = await supabaseAdmin
+ .from('prompts')
+ .select('id, text, category')
+ .in('prompt_set_id', setIds)
+ .eq('is_active', true);
+
+ if (!prompts?.length) {
+ throw new Error('No active prompts found.');
+ }
+
+ const promptIds = prompts.map((p) => p.id);
+
+ const [volumeResult, resultResult, competitorResult] = await Promise.all([
+ supabaseAdmin
+ .from('prompt_volumes')
+ .select('*')
+ .in('prompt_id', promptIds),
+ supabaseAdmin
+ .from('prompt_results')
+ .select('prompt_id, visibility_score, mention_count, citation_count, sentiment, competitor_mentions')
+ .in('prompt_id', promptIds)
+ .order('created_at', { ascending: false }),
+ supabaseAdmin
+ .from('competitors')
+ .select('id, name, domain')
+ .eq('brand_id', brandId),
+ ]);
+
+ const volumes = volumeResult.data || [];
+ const results = resultResult.data || [];
+ const competitors = competitorResult.data || [];
+
+ const volumeMap = {};
+ for (const v of volumes) volumeMap[v.prompt_id] = v;
+
+ const resultMap = {};
+ for (const r of results) {
+ if (!resultMap[r.prompt_id]) resultMap[r.prompt_id] = [];
+ resultMap[r.prompt_id].push(r);
+ }
+
+ const testedPrompts = prompts.filter((p) => (resultMap[p.id] || []).length > 0);
+ if (!testedPrompts.length) {
+ return { generated: 0 };
+ }
+
+ const promptDataForLLM = testedPrompts.map((p, idx) => {
+ const vol = volumeMap[p.id];
+ const res = resultMap[p.id] || [];
+
+ const avgVisibility =
+ res.length > 0
+ ? Math.round(res.reduce((s, r) => s + r.visibility_score, 0) / res.length)
+ : 0;
+
+ const competitorMentions = {};
+ for (const r of res) {
+ if (r.competitor_mentions) {
+ const mentions = typeof r.competitor_mentions === 'string'
+ ? JSON.parse(r.competitor_mentions)
+ : r.competitor_mentions;
+ for (const cm of mentions || []) {
+ competitorMentions[cm.name] =
+ (competitorMentions[cm.name] || 0) + (cm.visibility_score || 0);
+ }
+ }
+ }
+
+ return {
+ index: idx,
+ promptId: p.id,
+ text: p.text,
+ category: p.category || 'unknown',
+ estAiVolume: vol?.est_ai_volume || 0,
+ intent: vol?.intent || 'other',
+ keywords: vol?.keywords || [],
+ avgVisibility,
+ totalResults: res.length,
+ competitorsCited: Object.keys(competitorMentions),
+ competitorGap:
+ Object.values(competitorMentions).length > 0
+ ? Math.round(
+ Object.values(competitorMentions).reduce((a, b) => a + b, 0) /
+ Object.values(competitorMentions).length,
+ ) - avgVisibility
+ : 0,
+ };
+ });
+
+ const scoredPrompts = promptDataForLLM
+ .map((p) => ({
+ ...p,
+ score: computeOpportunityScore(
+ p.estAiVolume,
+ p.avgVisibility,
+ p.competitorGap,
+ p.intent,
+ ),
+ }))
+ .sort((a, b) => b.score - a.score)
+ .slice(0, 25);
+
+ if (scoredPrompts.length === 0) {
+ return { generated: 0 };
+ }
+
+ job.progress({ phase: 'analyzing', message: 'Generating opportunities with AI...' });
+
+ const userPrompt = `Brand: ${brand.name}
+Industry: ${brand.industry || 'Not specified'}
+Domain: ${(domains || []).map((d) => d.domain).join(', ') || 'N/A'}
+Competitors: ${competitors.map((c) => c.name).join(', ') || 'None tracked'}
+
+Prompt Data (sorted by opportunity score, highest first):
+${scoredPrompts
+ .map(
+ (p, i) =>
+ `[${i}] "${p.text}" | Category: ${p.category} | Intent: ${p.intent} | Est. AI Volume: ${p.estAiVolume}/mo | Visibility: ${p.avgVisibility}% | Competitor Gap: ${p.competitorGap > 0 ? '+' + p.competitorGap : p.competitorGap}% | Competitors Cited: ${p.competitorsCited.join(', ') || 'none'} | Keywords: ${p.keywords.join(', ')}`,
+ )
+ .join('\n')}
+
+Generate actionable content opportunities based on this data. Reference specific numbers and competitors where relevant.`;
+
+ const aiModel = resolveModel(model);
+
+ const { object } = await generateObject({
+ model: aiModel,
+ schema: opportunitySchema,
+ system: OPPORTUNITY_SYSTEM_PROMPT,
+ prompt: userPrompt,
+ });
+
+ job.progress({ phase: 'saving', message: 'Saving opportunities...' });
+
+ await supabaseAdmin
+ .from('content_opportunities')
+ .delete()
+ .eq('brand_id', brandId)
+ .in('status', ['new']);
+
+ const rows = object.opportunities.map((opp) => {
+ const relatedPrompt = scoredPrompts[opp.relatedPromptIndex] || scoredPrompts[0];
+ const score = computeOpportunityScore(
+ relatedPrompt.estAiVolume,
+ relatedPrompt.avgVisibility,
+ relatedPrompt.competitorGap,
+ relatedPrompt.intent,
+ );
+
+ return {
+ brand_id: brandId,
+ prompt_id: relatedPrompt.promptId,
+ title: opp.title,
+ description: opp.description,
+ type: opp.type,
+ impact: opp.impact,
+ opportunity_score: score,
+ status: 'new',
+ source_data: {
+ promptText: relatedPrompt.text,
+ estAiVolume: relatedPrompt.estAiVolume,
+ visibilityScore: relatedPrompt.avgVisibility,
+ competitorGap: relatedPrompt.competitorGap,
+ intent: relatedPrompt.intent,
+ keywords: relatedPrompt.keywords,
+ competitorsCited: relatedPrompt.competitorsCited,
+ },
+ };
+ });
+
+ const { error: insertErr } = await supabaseAdmin
+ .from('content_opportunities')
+ .insert(rows);
+
+ if (insertErr) {
+ throw new Error(insertErr.message);
+ }
+
+ console.log(`[content] Brand ${brandId}: ${rows.length} opportunities generated`);
+
+ return { generated: rows.length };
+}
diff --git a/server/src/workers/tracking-worker.js b/server/src/workers/tracking-worker.js
new file mode 100644
index 000000000..0b6d730e4
--- /dev/null
+++ b/server/src/workers/tracking-worker.js
@@ -0,0 +1,319 @@
+/**
+ * Tracking job processor.
+ * Fetches brand data, runs prompts through AI models / scrapers, stores results.
+ */
+
+import { runPrompt, analyzeSentimentAI } from '../lib/ai-tracker.js';
+import { submitScraperTask, pollScraperResult } from '../lib/cloro-scraper.js';
+import { parseResponse, countBrandMentions } from '../lib/response-parser.js';
+import supabaseAdmin from '../config/supabase.js';
+import { hasFeature, getPlan } from '../config/plans.js';
+import { generateContentOpportunities } from '../lib/opportunity-generator.js';
+
+function resolveModelPlatform(model) {
+ if (model.startsWith('claude-')) return 'claude';
+ if (model.startsWith('gemini-')) return 'gemini';
+ return 'chatgpt';
+}
+
+/**
+ * Core logic: fetch prompts, run them through specified models, store results.
+ * @param {{ brandId: string, promptId?: string, promptIds?: string[], job?: { progress: function, signal?: AbortSignal } }} opts
+ */
+export async function processTrackingJob({ brandId, promptId, promptIds, job }) {
+ // 1. Fetch brand info with domains
+ const { data: brand, error: brandErr } = await supabaseAdmin
+ .from('brands')
+ .select('id, name, organization_id')
+ .eq('id', brandId)
+ .single();
+ if (brandErr || !brand) throw new Error(`Brand not found: ${brandId}`);
+
+ const { data: domains } = await supabaseAdmin
+ .from('brand_domains')
+ .select('domain')
+ .eq('brand_id', brandId);
+
+ const brandInfo = {
+ brandName: brand.name,
+ domains: (domains || []).map((d) => d.domain),
+ };
+
+ // 2. Fetch active prompts
+ const { data: promptSets } = await supabaseAdmin
+ .from('prompt_sets')
+ .select('id')
+ .eq('brand_id', brandId);
+
+ if (!promptSets || promptSets.length === 0) {
+ console.log(`[tracking] No prompt sets for brand ${brandId}`);
+ return { resultCount: 0 };
+ }
+
+ const setIds = promptSets.map((s) => s.id);
+
+ let promptsQuery = supabaseAdmin
+ .from('prompts')
+ .select('*')
+ .in('prompt_set_id', setIds)
+ .eq('is_active', true);
+
+ if (promptId) {
+ promptsQuery = promptsQuery.eq('id', promptId);
+ } else if (promptIds && promptIds.length > 0) {
+ promptsQuery = promptsQuery.in('id', promptIds);
+ }
+
+ const { data: prompts, error: promptErr } = await promptsQuery;
+ if (promptErr) throw new Error(`Failed to fetch prompts: ${promptErr.message}`);
+ if (!prompts || prompts.length === 0) {
+ console.log(`[tracking] No active prompts for brand ${brandId}`);
+ return { resultCount: 0 };
+ }
+
+ // 3. Fetch competitors for this brand
+ const { data: competitorRows } = await supabaseAdmin
+ .from('competitors')
+ .select('id, name, domain')
+ .eq('brand_id', brandId);
+
+ const competitors = (competitorRows || []).map((c) => ({
+ id: c.id,
+ name: c.name,
+ domain: c.domain || '',
+ }));
+
+ // 4. Count total tasks: prompt × (models + scrapers) × regions
+ let totalTasks = 0;
+ for (const prompt of prompts) {
+ const mc = prompt.models && prompt.models.length > 0 ? prompt.models.length : 0;
+ const sc = prompt.platforms && prompt.platforms.length > 0 ? prompt.platforms.length : 0;
+ const rc = prompt.regions && prompt.regions.length > 0 ? prompt.regions.length : 1;
+ totalTasks += (mc + sc) * rc;
+ }
+
+ // 5. Shared counters & helper
+ let insertedCount = 0;
+ let completedTasks = 0;
+
+ async function insertResult(row) {
+ const { error } = await supabaseAdmin.from('prompt_results').insert(row);
+ if (error) {
+ console.error('[tracking] Failed to insert result:', error.message);
+ throw error;
+ }
+ insertedCount++;
+ }
+
+ // 6. Phase 1: Collect & run all scraper (platform) tasks first
+ const scraperTasks = [];
+ for (const prompt of prompts) {
+ const scrapersToRun = prompt.platforms && prompt.platforms.length > 0
+ ? prompt.platforms
+ : [];
+ const regionsToRun = prompt.regions && prompt.regions.length > 0
+ ? prompt.regions
+ : [null];
+
+ for (const scraperId of scrapersToRun) {
+ for (const region of regionsToRun) {
+ scraperTasks.push({ prompt, scraperId, region });
+ }
+ }
+ }
+
+ if (scraperTasks.length > 0) {
+ console.log(`[tracking] Submitting ${scraperTasks.length} scraper tasks to Cloro...`);
+
+ if (job) {
+ job.progress({
+ current: completedTasks,
+ total: totalTasks,
+ promptText: 'Preparing platform scans...',
+ model: null,
+ platform: 'cloro',
+ });
+ }
+
+ // Submit all tasks concurrently
+ const submissions = await Promise.allSettled(
+ scraperTasks.map((t) =>
+ submitScraperTask(t.prompt.text, t.scraperId, t.region)
+ .then((res) => ({ ...res, meta: t }))
+ ),
+ );
+
+ const submitted = [];
+ for (const sub of submissions) {
+ if (sub.status === 'fulfilled') {
+ console.log(`[tracking] Submitted ${sub.value.scraperId} task=${sub.value.taskId} prompt="${sub.value.meta.prompt.text.slice(0, 50)}..."`);
+ submitted.push(sub.value);
+ } else {
+ const failedTask = scraperTasks[submissions.indexOf(sub)];
+ console.error(
+ `[tracking] Failed to submit scraper "${failedTask.scraperId}" for "${failedTask.prompt.text.slice(0, 50)}...":`,
+ sub.reason?.message || sub.reason,
+ );
+ completedTasks++;
+ }
+ }
+
+ console.log(`[tracking] ${submitted.length}/${scraperTasks.length} tasks submitted, polling for results...`);
+
+ // Poll + parse + insert each task independently (all in parallel)
+ await Promise.allSettled(
+ submitted.map(async ({ taskId, scraperId, meta }) => {
+ try {
+ console.log(`[tracking] Polling task=${taskId} scraper=${scraperId}...`);
+ const aiResponse = await pollScraperResult(taskId, scraperId);
+ console.log(`[tracking] Task=${taskId} scraper=${scraperId} completed, inserting result...`);
+
+ const mentionCount = countBrandMentions(aiResponse.text, brandInfo);
+ const sentimentResult = mentionCount > 0
+ ? await analyzeSentimentAI(aiResponse.text, brandInfo.brandName)
+ : { sentiment: 'neutral', confidence: 0, reason: 'Brand not mentioned' };
+ const metrics = parseResponse(aiResponse, brandInfo, sentimentResult.sentiment, competitors);
+
+ await insertResult({
+ prompt_id: meta.prompt.id,
+ brand_id: brandId,
+ platform: meta.scraperId,
+ response: aiResponse.text,
+ citations: aiResponse.citations,
+ mention_count: metrics.mentionCount,
+ citation_count: metrics.citationCount,
+ sentiment: metrics.sentiment,
+ visibility_score: metrics.visibilityScore,
+ model_used: aiResponse.model,
+ region: meta.region,
+ competitor_mentions: metrics.competitorMentions,
+ });
+
+ console.log(`[tracking] Task=${taskId} scraper=${scraperId} result saved.`);
+ } catch (err) {
+ console.error(
+ `[tracking] Task=${taskId} scraper=${scraperId} failed: ${err.message}`,
+ );
+ }
+
+ completedTasks++;
+ if (job) {
+ job.progress({
+ current: completedTasks,
+ total: totalTasks,
+ promptText: meta.prompt.text.slice(0, 80),
+ model: scraperId,
+ platform: 'cloro',
+ });
+ }
+ }),
+ );
+ }
+
+ // 7. Phase 2: Run AI model tasks concurrently
+ const modelTasks = [];
+ for (const prompt of prompts) {
+ const modelsToRun = prompt.models && prompt.models.length > 0
+ ? prompt.models
+ : [];
+ const regionsToRun = prompt.regions && prompt.regions.length > 0
+ ? prompt.regions
+ : [null];
+
+ for (const modelName of modelsToRun) {
+ for (const region of regionsToRun) {
+ modelTasks.push({ prompt, modelName, region });
+ }
+ }
+ }
+
+ if (modelTasks.length > 0) {
+ console.log(`[tracking] Running ${modelTasks.length} AI model tasks concurrently...`);
+
+ await Promise.allSettled(
+ modelTasks.map(async ({ prompt, modelName, region }) => {
+ if (job) {
+ job.progress({
+ current: completedTasks,
+ total: totalTasks,
+ promptText: prompt.text.slice(0, 80),
+ model: modelName,
+ region,
+ platform: resolveModelPlatform(modelName),
+ });
+ }
+
+ try {
+ const aiResponse = await runPrompt(prompt.text, modelName, region);
+
+ const mentionCount = countBrandMentions(aiResponse.text, brandInfo);
+ const sentimentResult = mentionCount > 0
+ ? await analyzeSentimentAI(aiResponse.text, brandInfo.brandName)
+ : { sentiment: 'neutral', confidence: 0, reason: 'Brand not mentioned' };
+ const metrics = parseResponse(aiResponse, brandInfo, sentimentResult.sentiment, competitors);
+
+ await insertResult({
+ prompt_id: prompt.id,
+ brand_id: brandId,
+ platform: resolveModelPlatform(modelName),
+ response: aiResponse.text,
+ citations: aiResponse.citations,
+ mention_count: metrics.mentionCount,
+ citation_count: metrics.citationCount,
+ sentiment: metrics.sentiment,
+ visibility_score: metrics.visibilityScore,
+ model_used: aiResponse.model,
+ region,
+ competitor_mentions: metrics.competitorMentions,
+ });
+ } catch (err) {
+ console.error(
+ `[tracking] Failed prompt "${prompt.text.slice(0, 50)}..." model=${modelName} region=${region}:`,
+ err.message,
+ );
+ }
+
+ completedTasks++;
+ if (job) {
+ job.progress({
+ current: completedTasks,
+ total: totalTasks,
+ promptText: prompt.text.slice(0, 80),
+ model: modelName,
+ platform: resolveModelPlatform(modelName),
+ });
+ }
+ }),
+ );
+ }
+
+ console.log(`[tracking] Brand ${brandId}: ${insertedCount} results stored`);
+
+ try {
+ const { data: profile } = await supabaseAdmin
+ .from('profiles')
+ .select('organization_id')
+ .eq('organization_id', brand.organization_id)
+ .limit(1)
+ .single();
+
+ if (profile) {
+ const { data: org } = await supabaseAdmin
+ .from('organizations')
+ .select('plan')
+ .eq('id', brand.organization_id)
+ .single();
+
+ const plan = getPlan(org?.plan);
+ if (hasFeature(plan, 'content_optimization')) {
+ generateContentOpportunities(brandId).catch((err) => {
+ console.error(`[tracking] Auto opportunity generation failed for brand ${brandId}:`, err.message);
+ });
+ }
+ }
+ } catch (err) {
+ console.error('[tracking] Failed to check opportunity generation eligibility:', err.message);
+ }
+
+ return { resultCount: insertedCount };
+}
diff --git a/server/start.sh b/server/start.sh
new file mode 100755
index 000000000..d5413c618
--- /dev/null
+++ b/server/start.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+npm install
+
+npm install -g nodemon
+
+npm install -g pm2
+
+npm start
+
+pm2 log 0
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
deleted file mode 100644
index f7fa87eb8..000000000
--- a/src/app/layout.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import type { Metadata } from "next";
-import { Geist, Geist_Mono } from "next/font/google";
-import "./globals.css";
-
-const geistSans = Geist({
- variable: "--font-geist-sans",
- subsets: ["latin"],
-});
-
-const geistMono = Geist_Mono({
- variable: "--font-geist-mono",
- subsets: ["latin"],
-});
-
-export const metadata: Metadata = {
- title: "Create Next App",
- description: "Generated by create next app",
-};
-
-export default function RootLayout({
- children,
-}: Readonly<{
- children: React.ReactNode;
-}>) {
- return (
- <html lang="en">
- <body
- className={`${geistSans.variable} ${geistMono.variable} antialiased`}
- >
- {children}
- </body>
- </html>
- );
-}
diff --git a/src/app/page.tsx b/src/app/page.tsx
deleted file mode 100644
index 295f8fdf1..000000000
--- a/src/app/page.tsx
+++ /dev/null
@@ -1,65 +0,0 @@
-import Image from "next/image";
-
-export default function Home() {
- return (
- <div className="flex min-h-screen items-center justify-center bg-zinc-50 font-sans dark:bg-black">
- <main className="flex min-h-screen w-full max-w-3xl flex-col items-center justify-between py-32 px-16 bg-white dark:bg-black sm:items-start">
- <Image
- className="dark:invert"
- src="/next.svg"
- alt="Next.js logo"
- width={100}
- height={20}
- priority
- />
- <div className="flex flex-col items-center gap-6 text-center sm:items-start sm:text-left">
- <h1 className="max-w-xs text-3xl font-semibold leading-10 tracking-tight text-black dark:text-zinc-50">
- To get started, edit the page.tsx file.
- </h1>
- <p className="max-w-md text-lg leading-8 text-zinc-600 dark:text-zinc-400">
- Looking for a starting point or more instructions? Head over to{" "}
- <a
- href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
- className="font-medium text-zinc-950 dark:text-zinc-50"
- >
- Templates
- </a>{" "}
- or the{" "}
- <a
- href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
- className="font-medium text-zinc-950 dark:text-zinc-50"
- >
- Learning
- </a>{" "}
- center.
- </p>
- </div>
- <div className="flex flex-col gap-4 text-base font-medium sm:flex-row">
- <a
- className="flex h-12 w-full items-center justify-center gap-2 rounded-full bg-foreground px-5 text-background transition-colors hover:bg-[#383838] dark:hover:bg-[#ccc] md:w-[158px]"
- href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
- target="_blank"
- rel="noopener noreferrer"
- >
- <Image
- className="dark:invert"
- src="/vercel.svg"
- alt="Vercel logomark"
- width={16}
- height={16}
- />
- Deploy Now
- </a>
- <a
- className="flex h-12 w-full items-center justify-center rounded-full border border-solid border-black/[.08] px-5 transition-colors hover:border-transparent hover:bg-black/[.04] dark:border-white/[.145] dark:hover:bg-[#1a1a1a] md:w-[158px]"
- href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
- target="_blank"
- rel="noopener noreferrer"
- >
- Documentation
- </a>
- </div>
- </main>
- </div>
- );
-}
diff --git a/supabase/.gitignore b/supabase/.gitignore
new file mode 100644
index 000000000..ad9264f0b
--- /dev/null
+++ b/supabase/.gitignore
@@ -0,0 +1,8 @@
+# Supabase
+.branches
+.temp
+
+# dotenvx
+.env.keys
+.env.local
+.env.*.local
diff --git a/supabase/config.toml b/supabase/config.toml
new file mode 100644
index 000000000..cec184f66
--- /dev/null
+++ b/supabase/config.toml
@@ -0,0 +1,403 @@
+# For detailed configuration reference documentation, visit:
+# https://supabase.com/docs/guides/local-development/cli/config
+# A string used to distinguish different Supabase projects on the same host. Defaults to the
+# working directory name when running `supabase init`.
+project_id = "aeo"
+
+[api]
+enabled = true
+# Port to use for the API URL.
+port = 54321
+# Schemas to expose in your API. Tables, views and stored procedures in this schema will get API
+# endpoints. `public` and `graphql_public` schemas are included by default.
+schemas = ["public", "graphql_public"]
+# Extra schemas to add to the search_path of every request.
+extra_search_path = ["public", "extensions"]
+# The maximum number of rows returns from a view, table, or stored procedure. Limits payload size
+# for accidental or malicious requests.
+max_rows = 1000
+
+[api.tls]
+# Enable HTTPS endpoints locally using a self-signed certificate.
+enabled = false
+# Paths to self-signed certificate pair.
+# cert_path = "../certs/my-cert.pem"
+# key_path = "../certs/my-key.pem"
+
+[db]
+# Port to use for the local database URL.
+port = 54322
+# Port used by db diff command to initialize the shadow database.
+shadow_port = 54320
+# Maximum amount of time to wait for health check when starting the local database.
+health_timeout = "2m"
+# The database major version to use. This has to be the same as your remote database's. Run `SHOW
+# server_version;` on the remote database to check.
+major_version = 17
+
+[db.pooler]
+enabled = false
+# Port to use for the local connection pooler.
+port = 54329
+# Specifies when a server connection can be reused by other clients.
+# Configure one of the supported pooler modes: `transaction`, `session`.
+pool_mode = "transaction"
+# How many server connections to allow per user/database pair.
+default_pool_size = 20
+# Maximum number of client connections allowed.
+max_client_conn = 100
+
+# [db.vault]
+# secret_key = "env(SECRET_VALUE)"
+
+[db.migrations]
+# If disabled, migrations will be skipped during a db push or reset.
+enabled = true
+# Specifies an ordered list of schema files that describe your database.
+# Supports glob patterns relative to supabase directory: "./schemas/*.sql"
+schema_paths = []
+
+[db.seed]
+# If enabled, seeds the database after migrations during a db reset.
+enabled = true
+# Specifies an ordered list of seed files to load during db reset.
+# Supports glob patterns relative to supabase directory: "./seeds/*.sql"
+sql_paths = ["./seed.sql"]
+
+[db.network_restrictions]
+# Enable management of network restrictions.
+enabled = false
+# List of IPv4 CIDR blocks allowed to connect to the database.
+# Defaults to allow all IPv4 connections. Set empty array to block all IPs.
+allowed_cidrs = ["0.0.0.0/0"]
+# List of IPv6 CIDR blocks allowed to connect to the database.
+# Defaults to allow all IPv6 connections. Set empty array to block all IPs.
+allowed_cidrs_v6 = ["::/0"]
+
+# Uncomment to reject non-secure connections to the database.
+# [db.ssl_enforcement]
+# enabled = true
+
+[realtime]
+enabled = true
+# Bind realtime via either IPv4 or IPv6. (default: IPv4)
+# ip_version = "IPv6"
+# The maximum length in bytes of HTTP request headers. (default: 4096)
+# max_header_length = 4096
+
+[studio]
+enabled = true
+# Port to use for Supabase Studio.
+port = 54323
+# External URL of the API server that frontend connects to.
+api_url = "http://127.0.0.1"
+# OpenAI API Key to use for Supabase AI in the Supabase Studio.
+openai_api_key = "env(OPENAI_API_KEY)"
+
+# Email testing server. Emails sent with the local dev setup are not actually sent - rather, they
+# are monitored, and you can view the emails that would have been sent from the web interface.
+[inbucket]
+enabled = true
+# Port to use for the email testing server web interface.
+port = 54324
+# Uncomment to expose additional ports for testing user applications that send emails.
+# smtp_port = 54325
+# pop3_port = 54326
+# admin_email = "[email protected]"
+# sender_name = "Admin"
+
+[storage]
+enabled = true
+# The maximum file size allowed (e.g. "5MB", "500KB").
+file_size_limit = "50MiB"
+
+# Uncomment to configure local storage buckets
+# [storage.buckets.images]
+# public = false
+# file_size_limit = "50MiB"
+# allowed_mime_types = ["image/png", "image/jpeg"]
+# objects_path = "./images"
+
+# Allow connections via S3 compatible clients
+[storage.s3_protocol]
+enabled = true
+
+# Image transformation API is available to Supabase Pro plan.
+# [storage.image_transformation]
+# enabled = true
+
+# Store analytical data in S3 for running ETL jobs over Iceberg Catalog
+# This feature is only available on the hosted platform.
+[storage.analytics]
+enabled = false
+max_namespaces = 5
+max_tables = 10
+max_catalogs = 2
+
+# Analytics Buckets is available to Supabase Pro plan.
+# [storage.analytics.buckets.my-warehouse]
+
+# Store vector embeddings in S3 for large and durable datasets
+# This feature is only available on the hosted platform.
+[storage.vector]
+enabled = false
+max_buckets = 10
+max_indexes = 5
+
+# Vector Buckets is available to Supabase Pro plan.
+# [storage.vector.buckets.documents-openai]
+
+[auth]
+enabled = true
+# The base URL of your website. Used as an allow-list for redirects and for constructing URLs used
+# in emails.
+site_url = "http://127.0.0.1:3000"
+# A list of *exact* URLs that auth providers are permitted to redirect to post authentication.
+additional_redirect_urls = ["https://127.0.0.1:3000"]
+# How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 (1 week).
+jwt_expiry = 3600
+# JWT issuer URL. If not set, defaults to the local API URL (http://127.0.0.1:<port>/auth/v1).
+# jwt_issuer = ""
+# Path to JWT signing key. DO NOT commit your signing keys file to git.
+# signing_keys_path = "./signing_keys.json"
+# If disabled, the refresh token will never expire.
+enable_refresh_token_rotation = true
+# Allows refresh tokens to be reused after expiry, up to the specified interval in seconds.
+# Requires enable_refresh_token_rotation = true.
+refresh_token_reuse_interval = 10
+# Allow/disallow new user signups to your project.
+enable_signup = true
+# Allow/disallow anonymous sign-ins to your project.
+enable_anonymous_sign_ins = false
+# Allow/disallow testing manual linking of accounts
+enable_manual_linking = false
+# Passwords shorter than this value will be rejected as weak. Minimum 6, recommended 8 or more.
+minimum_password_length = 6
+# Passwords that do not meet the following requirements will be rejected as weak. Supported values
+# are: `letters_digits`, `lower_upper_letters_digits`, `lower_upper_letters_digits_symbols`
+password_requirements = ""
+
+# Configure passkey sign-ins.
+# [auth.passkey]
+# enabled = false
+# rp_display_name = "Supabase"
+# rp_id = "localhost"
+# rp_origins = ["http://127.0.0.1:3000"]
+
+[auth.rate_limit]
+# Number of emails that can be sent per hour. Requires auth.email.smtp to be enabled.
+email_sent = 2
+# Number of SMS messages that can be sent per hour. Requires auth.sms to be enabled.
+sms_sent = 30
+# Number of anonymous sign-ins that can be made per hour per IP address. Requires enable_anonymous_sign_ins = true.
+anonymous_users = 30
+# Number of sessions that can be refreshed in a 5 minute interval per IP address.
+token_refresh = 150
+# Number of sign up and sign-in requests that can be made in a 5 minute interval per IP address (excludes anonymous users).
+sign_in_sign_ups = 30
+# Number of OTP / Magic link verifications that can be made in a 5 minute interval per IP address.
+token_verifications = 30
+# Number of Web3 logins that can be made in a 5 minute interval per IP address.
+web3 = 30
+
+# Configure one of the supported captcha providers: `hcaptcha`, `turnstile`.
+# [auth.captcha]
+# enabled = true
+# provider = "hcaptcha"
+# secret = ""
+
+[auth.email]
+# Allow/disallow new user signups via email to your project.
+enable_signup = true
+# If enabled, a user will be required to confirm any email change on both the old, and new email
+# addresses. If disabled, only the new email is required to confirm.
+double_confirm_changes = true
+# If enabled, users need to confirm their email address before signing in.
+enable_confirmations = false
+# If enabled, users will need to reauthenticate or have logged in recently to change their password.
+secure_password_change = false
+# Controls the minimum amount of time that must pass before sending another signup confirmation or password reset email.
+max_frequency = "1s"
+# Number of characters used in the email OTP.
+otp_length = 6
+# Number of seconds before the email OTP expires (defaults to 1 hour).
+otp_expiry = 3600
+
+# Use a production-ready SMTP server
+# [auth.email.smtp]
+# enabled = true
+# host = "smtp.sendgrid.net"
+# port = 587
+# user = "apikey"
+# pass = "env(SENDGRID_API_KEY)"
+# admin_email = "[email protected]"
+# sender_name = "Admin"
+
+# Uncomment to customize email template
+# [auth.email.template.invite]
+# subject = "You have been invited"
+# content_path = "./supabase/templates/invite.html"
+
+# Uncomment to customize notification email template
+# [auth.email.notification.password_changed]
+# enabled = true
+# subject = "Your password has been changed"
+# content_path = "./templates/password_changed_notification.html"
+
+[auth.sms]
+# Allow/disallow new user signups via SMS to your project.
+enable_signup = false
+# If enabled, users need to confirm their phone number before signing in.
+enable_confirmations = false
+# Template for sending OTP to users
+template = "Your code is {{ .Code }}"
+# Controls the minimum amount of time that must pass before sending another sms otp.
+max_frequency = "5s"
+
+# Use pre-defined map of phone number to OTP for testing.
+# [auth.sms.test_otp]
+# 4152127777 = "123456"
+
+# Configure logged in session timeouts.
+# [auth.sessions]
+# Force log out after the specified duration.
+# timebox = "24h"
+# Force log out if the user has been inactive longer than the specified duration.
+# inactivity_timeout = "8h"
+
+# This hook runs before a new user is created and allows developers to reject the request based on the incoming user object.
+# [auth.hook.before_user_created]
+# enabled = true
+# uri = "pg-functions://postgres/auth/before-user-created-hook"
+
+# This hook runs before a token is issued and allows you to add additional claims based on the authentication method used.
+# [auth.hook.custom_access_token]
+# enabled = true
+# uri = "pg-functions://<database>/<schema>/<hook_name>"
+
+# Configure one of the supported SMS providers: `twilio`, `twilio_verify`, `messagebird`, `textlocal`, `vonage`.
+[auth.sms.twilio]
+enabled = false
+account_sid = ""
+message_service_sid = ""
+# DO NOT commit your Twilio auth token to git. Use environment variable substitution instead:
+auth_token = "env(SUPABASE_AUTH_SMS_TWILIO_AUTH_TOKEN)"
+
+# Multi-factor-authentication is available to Supabase Pro plan.
+[auth.mfa]
+# Control how many MFA factors can be enrolled at once per user.
+max_enrolled_factors = 10
+
+# Control MFA via App Authenticator (TOTP)
+[auth.mfa.totp]
+enroll_enabled = false
+verify_enabled = false
+
+# Configure MFA via Phone Messaging
+[auth.mfa.phone]
+enroll_enabled = false
+verify_enabled = false
+otp_length = 6
+template = "Your code is {{ .Code }}"
+max_frequency = "5s"
+
+# Configure MFA via WebAuthn
+# [auth.mfa.web_authn]
+# enroll_enabled = true
+# verify_enabled = true
+
+# Use an external OAuth provider. The full list of providers are: `apple`, `azure`, `bitbucket`,
+# `discord`, `facebook`, `github`, `gitlab`, `google`, `keycloak`, `linkedin_oidc`, `notion`, `twitch`,
+# `twitter`, `x`, `slack`, `spotify`, `workos`, `zoom`.
+[auth.external.apple]
+enabled = false
+client_id = ""
+# DO NOT commit your OAuth provider secret to git. Use environment variable substitution instead:
+secret = "env(SUPABASE_AUTH_EXTERNAL_APPLE_SECRET)"
+# Overrides the default auth redirectUrl.
+redirect_uri = ""
+# Overrides the default auth provider URL. Used to support self-hosted gitlab, single-tenant Azure,
+# or any other third-party OIDC providers.
+url = ""
+# If enabled, the nonce check will be skipped. Required for local sign in with Google auth.
+skip_nonce_check = false
+# If enabled, it will allow the user to successfully authenticate when the provider does not return an email address.
+email_optional = false
+
+# Allow Solana wallet holders to sign in to your project via the Sign in with Solana (SIWS, EIP-4361) standard.
+# You can configure "web3" rate limit in the [auth.rate_limit] section and set up [auth.captcha] if self-hosting.
+[auth.web3.solana]
+enabled = false
+
+# Use Firebase Auth as a third-party provider alongside Supabase Auth.
+[auth.third_party.firebase]
+enabled = false
+# project_id = "my-firebase-project"
+
+# Use Auth0 as a third-party provider alongside Supabase Auth.
+[auth.third_party.auth0]
+enabled = false
+# tenant = "my-auth0-tenant"
+# tenant_region = "us"
+
+# Use AWS Cognito (Amplify) as a third-party provider alongside Supabase Auth.
+[auth.third_party.aws_cognito]
+enabled = false
+# user_pool_id = "my-user-pool-id"
+# user_pool_region = "us-east-1"
+
+# Use Clerk as a third-party provider alongside Supabase Auth.
+[auth.third_party.clerk]
+enabled = false
+# Obtain from https://clerk.com/setup/supabase
+# domain = "example.clerk.accounts.dev"
+
+# OAuth server configuration
+[auth.oauth_server]
+# Enable OAuth server functionality
+enabled = false
+# Path for OAuth consent flow UI
+authorization_url_path = "/oauth/consent"
+# Allow dynamic client registration
+allow_dynamic_registration = false
+
+[edge_runtime]
+enabled = true
+# Supported request policies: `oneshot`, `per_worker`.
+# `per_worker` (default) — enables hot reload during local development.
+# `oneshot` — fallback mode if hot reload causes issues (e.g. in large repos or with symlinks).
+policy = "per_worker"
+# Port to attach the Chrome inspector for debugging edge functions.
+inspector_port = 8083
+# The Deno major version to use.
+deno_version = 2
+
+# [edge_runtime.secrets]
+# secret_key = "env(SECRET_VALUE)"
+
+[analytics]
+enabled = true
+port = 54327
+# Configure one of the supported backends: `postgres`, `bigquery`.
+backend = "postgres"
+
+# Experimental features may be deprecated any time
+[experimental]
+# Configures Postgres storage engine to use OrioleDB (S3)
+orioledb_version = ""
+# Configures S3 bucket URL, eg. <bucket_name>.s3-<region>.amazonaws.com
+s3_host = "env(S3_HOST)"
+# Configures S3 bucket region, eg. us-east-1
+s3_region = "env(S3_REGION)"
+# Configures AWS_ACCESS_KEY_ID for S3 bucket
+s3_access_key = "env(S3_ACCESS_KEY)"
+# Configures AWS_SECRET_ACCESS_KEY for S3 bucket
+s3_secret_key = "env(S3_SECRET_KEY)"
+
+# [experimental.pgdelta]
+# When enabled, pg-delta becomes the active engine for supported schema flows.
+# enabled = false
+# Directory under `supabase/` where declarative files are written.
+# declarative_schema_path = "./database"
+# JSON string passed through to pg-delta SQL formatting.
+# format_options = "{\"keywordCase\":\"upper\",\"indent\":2,\"maxWidth\":80,\"commaStyle\":\"trailing\"}"
diff --git a/supabase/migrations/00001_initial_schema.sql b/supabase/migrations/00001_initial_schema.sql
new file mode 100644
index 000000000..846a9a908
--- /dev/null
+++ b/supabase/migrations/00001_initial_schema.sql
@@ -0,0 +1,1016 @@
+
+
+
+SET statement_timeout = 0;
+SET lock_timeout = 0;
+SET idle_in_transaction_session_timeout = 0;
+SET client_encoding = 'UTF8';
+SET standard_conforming_strings = on;
+SELECT pg_catalog.set_config('search_path', '', false);
+SET check_function_bodies = false;
+SET xmloption = content;
+SET client_min_messages = warning;
+SET row_security = off;
+
+
+COMMENT ON SCHEMA "public" IS 'standard public schema';
+
+
+CREATE EXTENSION IF NOT EXISTS "pg_graphql" WITH SCHEMA "graphql";
+
+
+CREATE EXTENSION IF NOT EXISTS "pg_stat_statements" WITH SCHEMA "extensions";
+
+
+CREATE EXTENSION IF NOT EXISTS "pgcrypto" WITH SCHEMA "extensions";
+
+
+CREATE EXTENSION IF NOT EXISTS "supabase_vault" WITH SCHEMA "vault";
+
+
+CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA "extensions";
+
+
+CREATE TYPE "public"."user_role" AS ENUM (
+ 'admin',
+ 'manager',
+ 'analyst',
+ 'agency_partner'
+);
+
+
+ALTER TYPE "public"."user_role" OWNER TO "postgres";
+
+SET default_tablespace = '';
+
+SET default_table_access_method = "heap";
+
+
+CREATE TABLE IF NOT EXISTS "public"."prompt_results" (
+ "id" "uuid" DEFAULT "gen_random_uuid"() NOT NULL,
+ "prompt_id" "uuid" NOT NULL,
+ "brand_id" "uuid" NOT NULL,
+ "platform" "text" NOT NULL,
+ "response" "text" DEFAULT ''::"text" NOT NULL,
+ "citations" "jsonb" DEFAULT '[]'::"jsonb" NOT NULL,
+ "mention_count" integer DEFAULT 0 NOT NULL,
+ "citation_count" integer DEFAULT 0 NOT NULL,
+ "sentiment" "text" DEFAULT 'neutral'::"text" NOT NULL,
+ "visibility_score" numeric DEFAULT 0 NOT NULL,
+ "model_used" "text",
+ "created_at" timestamp with time zone DEFAULT "now"() NOT NULL,
+ "region" "text",
+ "competitor_mentions" "jsonb" DEFAULT '[]'::"jsonb" NOT NULL
+);
+
+
+ALTER TABLE "public"."prompt_results" OWNER TO "postgres";
+
+
+CREATE OR REPLACE FUNCTION "public"."get_latest_prompt_results"("p_brand_id" "uuid", "p_platform" "text" DEFAULT NULL::"text") RETURNS SETOF "public"."prompt_results"
+ LANGUAGE "sql" STABLE SECURITY DEFINER
+ AS $$
+ SELECT DISTINCT ON (pr.prompt_id, pr.platform) pr.*
+ FROM public.prompt_results pr
+ WHERE pr.brand_id = p_brand_id
+ AND (p_platform IS NULL OR pr.platform = p_platform)
+ ORDER BY pr.prompt_id, pr.platform, pr.created_at DESC;
+$$;
+
+
+ALTER FUNCTION "public"."get_latest_prompt_results"("p_brand_id" "uuid", "p_platform" "text") OWNER TO "postgres";
+
+
+CREATE OR REPLACE FUNCTION "public"."get_latest_prompt_results"("p_brand_id" "uuid", "p_platform" "text" DEFAULT NULL::"text", "p_model" "text" DEFAULT NULL::"text", "p_region" "text" DEFAULT NULL::"text", "p_date_from" timestamp with time zone DEFAULT NULL::timestamp with time zone, "p_date_to" timestamp with time zone DEFAULT NULL::timestamp with time zone) RETURNS SETOF "public"."prompt_results"
+ LANGUAGE "sql" STABLE SECURITY DEFINER
+ AS $$
+ SELECT DISTINCT ON (pr.prompt_id, pr.platform, pr.model_used, pr.region) pr.*
+ FROM public.prompt_results pr
+ WHERE pr.brand_id = p_brand_id
+ AND (p_platform IS NULL OR pr.platform = p_platform)
+ AND (p_model IS NULL OR pr.model_used = p_model)
+ AND (p_region IS NULL OR pr.region = p_region)
+ AND (p_date_from IS NULL OR pr.created_at >= p_date_from)
+ AND (p_date_to IS NULL OR pr.created_at <= p_date_to)
+ ORDER BY pr.prompt_id, pr.platform, pr.model_used, pr.region, pr.created_at DESC;
+$$;
+
+
+ALTER FUNCTION "public"."get_latest_prompt_results"("p_brand_id" "uuid", "p_platform" "text", "p_model" "text", "p_region" "text", "p_date_from" timestamp with time zone, "p_date_to" timestamp with time zone) OWNER TO "postgres";
+
+
+CREATE OR REPLACE FUNCTION "public"."handle_new_user"() RETURNS "trigger"
+ LANGUAGE "plpgsql" SECURITY DEFINER
+ SET "search_path" TO 'public'
+ AS $$
+begin
+ insert into public.profiles (id, full_name, avatar_url)
+ values (
+ new.id,
+ new.raw_user_meta_data->>'full_name',
+ new.raw_user_meta_data->>'avatar_url'
+ );
+ return new;
+end;
+$$;
+
+
+ALTER FUNCTION "public"."handle_new_user"() OWNER TO "postgres";
+
+
+CREATE OR REPLACE FUNCTION "public"."handle_updated_at"() RETURNS "trigger"
+ LANGUAGE "plpgsql" SECURITY DEFINER
+ SET "search_path" TO 'public'
+ AS $$
+begin
+ new.updated_at = now();
+ return new;
+end;
+$$;
+
+
+ALTER FUNCTION "public"."handle_updated_at"() OWNER TO "postgres";
+
+
+CREATE TABLE IF NOT EXISTS "public"."ai_traffic_logs" (
+ "id" "uuid" DEFAULT "gen_random_uuid"() NOT NULL,
+ "brand_id" "uuid" NOT NULL,
+ "url" "text" NOT NULL,
+ "referrer" "text",
+ "source_platform" "text",
+ "user_agent" "text",
+ "ip_address" "text",
+ "country" "text",
+ "language" "text",
+ "screen" "text",
+ "created_at" timestamp with time zone DEFAULT "now"() NOT NULL
+);
+
+
+ALTER TABLE "public"."ai_traffic_logs" OWNER TO "postgres";
+
+
+CREATE TABLE IF NOT EXISTS "public"."brand_domains" (
+ "id" "uuid" DEFAULT "gen_random_uuid"() NOT NULL,
+ "brand_id" "uuid" NOT NULL,
+ "domain" "text" NOT NULL,
+ "country" "text",
+ "is_primary" boolean DEFAULT false NOT NULL,
+ "created_at" timestamp with time zone DEFAULT "now"() NOT NULL
+);
+
+
+ALTER TABLE "public"."brand_domains" OWNER TO "postgres";
+
+
+CREATE TABLE IF NOT EXISTS "public"."brand_platforms" (
+ "id" "uuid" DEFAULT "gen_random_uuid"() NOT NULL,
+ "brand_id" "uuid" NOT NULL,
+ "platform" "text" NOT NULL,
+ "is_enabled" boolean DEFAULT true NOT NULL,
+ "check_frequency" "text" DEFAULT 'daily'::"text" NOT NULL,
+ "last_checked_at" timestamp with time zone,
+ "created_at" timestamp with time zone DEFAULT "now"() NOT NULL,
+ "updated_at" timestamp with time zone DEFAULT "now"() NOT NULL,
+ "api_model" "text"
+);
+
+
+ALTER TABLE "public"."brand_platforms" OWNER TO "postgres";
+
+
+CREATE TABLE IF NOT EXISTS "public"."brands" (
+ "id" "uuid" DEFAULT "gen_random_uuid"() NOT NULL,
+ "organization_id" "uuid" NOT NULL,
+ "name" "text" NOT NULL,
+ "slug" "text" NOT NULL,
+ "logo_url" "text",
+ "industry" "text",
+ "description" "text",
+ "created_at" timestamp with time zone DEFAULT "now"() NOT NULL,
+ "updated_at" timestamp with time zone DEFAULT "now"() NOT NULL,
+ "tracking_code" "text" DEFAULT "encode"("extensions"."gen_random_bytes"(16), 'hex'::"text") NOT NULL,
+ "region" "text" DEFAULT 'US'::"text",
+ "language" "text" DEFAULT 'en'::"text"
+);
+
+
+ALTER TABLE "public"."brands" OWNER TO "postgres";
+
+
+CREATE TABLE IF NOT EXISTS "public"."competitors" (
+ "id" "uuid" DEFAULT "gen_random_uuid"() NOT NULL,
+ "brand_id" "uuid" NOT NULL,
+ "name" "text" NOT NULL,
+ "domain" "text" DEFAULT ''::"text" NOT NULL,
+ "created_at" timestamp with time zone DEFAULT "now"() NOT NULL
+);
+
+
+ALTER TABLE "public"."competitors" OWNER TO "postgres";
+
+
+CREATE TABLE IF NOT EXISTS "public"."content_opportunities" (
+ "id" "uuid" DEFAULT "gen_random_uuid"() NOT NULL,
+ "brand_id" "uuid" NOT NULL,
+ "prompt_id" "uuid",
+ "title" "text" NOT NULL,
+ "description" "text",
+ "type" "text" DEFAULT 'owned'::"text" NOT NULL,
+ "impact" "text" DEFAULT 'medium'::"text" NOT NULL,
+ "opportunity_score" numeric(5,2) DEFAULT 0,
+ "status" "text" DEFAULT 'new'::"text" NOT NULL,
+ "source_data" "jsonb" DEFAULT '{}'::"jsonb",
+ "webhook_sent_at" timestamp with time zone,
+ "webhook_response" "jsonb",
+ "created_at" timestamp with time zone DEFAULT "now"(),
+ "updated_at" timestamp with time zone DEFAULT "now"(),
+ "brief" "jsonb"
+);
+
+
+ALTER TABLE "public"."content_opportunities" OWNER TO "postgres";
+
+
+CREATE TABLE IF NOT EXISTS "public"."jobs" (
+ "id" "uuid" DEFAULT "gen_random_uuid"() NOT NULL,
+ "type" "text" NOT NULL,
+ "brand_id" "uuid" NOT NULL,
+ "status" "text" DEFAULT 'waiting'::"text" NOT NULL,
+ "data" "jsonb" DEFAULT '{}'::"jsonb" NOT NULL,
+ "progress" "jsonb",
+ "result" "jsonb",
+ "failed_reason" "text",
+ "attempts" integer DEFAULT 0 NOT NULL,
+ "max_attempts" integer DEFAULT 3 NOT NULL,
+ "created_at" timestamp with time zone DEFAULT "now"() NOT NULL,
+ "updated_at" timestamp with time zone DEFAULT "now"() NOT NULL,
+ "started_at" timestamp with time zone,
+ "completed_at" timestamp with time zone,
+ CONSTRAINT "jobs_status_check" CHECK (("status" = ANY (ARRAY['waiting'::"text", 'active'::"text", 'completed'::"text", 'failed'::"text", 'cancelled'::"text"]))),
+ CONSTRAINT "jobs_type_check" CHECK (("type" = ANY (ARRAY['tracking'::"text", 'content'::"text"])))
+);
+
+
+ALTER TABLE "public"."jobs" OWNER TO "postgres";
+
+
+CREATE TABLE IF NOT EXISTS "public"."organizations" (
+ "id" "uuid" DEFAULT "gen_random_uuid"() NOT NULL,
+ "name" "text" NOT NULL,
+ "slug" "text" NOT NULL,
+ "created_at" timestamp with time zone DEFAULT "now"() NOT NULL,
+ "updated_at" timestamp with time zone DEFAULT "now"() NOT NULL,
+ "plan" "text" DEFAULT 'free'::"text" NOT NULL,
+ "subscription_status" "text" DEFAULT 'incomplete'::"text" NOT NULL,
+ "stripe_customer_id" "text",
+ "subscription_ends_at" timestamp with time zone,
+ "stripe_subscription_id" "text",
+ "plan_overrides" "jsonb"
+);
+
+
+ALTER TABLE "public"."organizations" OWNER TO "postgres";
+
+
+CREATE TABLE IF NOT EXISTS "public"."profiles" (
+ "id" "uuid" NOT NULL,
+ "full_name" "text",
+ "avatar_url" "text",
+ "role" "public"."user_role" DEFAULT 'admin'::"public"."user_role" NOT NULL,
+ "organization_id" "uuid",
+ "created_at" timestamp with time zone DEFAULT "now"() NOT NULL,
+ "updated_at" timestamp with time zone DEFAULT "now"() NOT NULL,
+ "onboarding_completed" boolean DEFAULT false
+);
+
+
+ALTER TABLE "public"."profiles" OWNER TO "postgres";
+
+
+CREATE TABLE IF NOT EXISTS "public"."prompt_sets" (
+ "id" "uuid" DEFAULT "gen_random_uuid"() NOT NULL,
+ "brand_id" "uuid" NOT NULL,
+ "name" "text" NOT NULL,
+ "created_at" timestamp with time zone DEFAULT "now"() NOT NULL,
+ "updated_at" timestamp with time zone DEFAULT "now"() NOT NULL
+);
+
+
+ALTER TABLE "public"."prompt_sets" OWNER TO "postgres";
+
+
+CREATE TABLE IF NOT EXISTS "public"."prompt_volumes" (
+ "id" "uuid" DEFAULT "gen_random_uuid"() NOT NULL,
+ "prompt_id" "uuid" NOT NULL,
+ "intent" "text" NOT NULL,
+ "keywords" "jsonb" NOT NULL,
+ "google_volumes" "jsonb" NOT NULL,
+ "total_google_volume" integer NOT NULL,
+ "ai_volume_multiplier" numeric(4,3) NOT NULL,
+ "est_ai_volume" integer NOT NULL,
+ "location_code" integer,
+ "language_code" "text",
+ "fetched_at" timestamp with time zone DEFAULT "now"(),
+ "created_at" timestamp with time zone DEFAULT "now"()
+);
+
+
+ALTER TABLE "public"."prompt_volumes" OWNER TO "postgres";
+
+
+CREATE TABLE IF NOT EXISTS "public"."prompts" (
+ "id" "uuid" DEFAULT "gen_random_uuid"() NOT NULL,
+ "prompt_set_id" "uuid" NOT NULL,
+ "text" "text" NOT NULL,
+ "category" "text",
+ "platforms" "text"[] DEFAULT '{}'::"text"[] NOT NULL,
+ "is_active" boolean DEFAULT true NOT NULL,
+ "created_at" timestamp with time zone DEFAULT "now"() NOT NULL,
+ "regions" "text"[] DEFAULT '{}'::"text"[] NOT NULL,
+ "models" "text"[] DEFAULT '{}'::"text"[] NOT NULL,
+ "topic_id" "uuid"
+);
+
+
+ALTER TABLE "public"."prompts" OWNER TO "postgres";
+
+
+CREATE TABLE IF NOT EXISTS "public"."topics" (
+ "id" "uuid" DEFAULT "gen_random_uuid"() NOT NULL,
+ "brand_id" "uuid" NOT NULL,
+ "name" "text" NOT NULL,
+ "is_active" boolean DEFAULT true,
+ "created_at" timestamp with time zone DEFAULT "now"()
+);
+
+
+ALTER TABLE "public"."topics" OWNER TO "postgres";
+
+
+CREATE TABLE IF NOT EXISTS "public"."volume_usage" (
+ "id" "uuid" DEFAULT "gen_random_uuid"() NOT NULL,
+ "organization_id" "uuid" NOT NULL,
+ "used_at" timestamp with time zone DEFAULT "now"() NOT NULL,
+ "action" "text" NOT NULL,
+ "prompt_count" integer DEFAULT 0,
+ "created_at" timestamp with time zone DEFAULT "now"()
+);
+
+
+ALTER TABLE "public"."volume_usage" OWNER TO "postgres";
+
+
+CREATE TABLE IF NOT EXISTS "public"."webhook_configs" (
+ "id" "uuid" DEFAULT "gen_random_uuid"() NOT NULL,
+ "brand_id" "uuid" NOT NULL,
+ "name" "text" DEFAULT 'Default'::"text" NOT NULL,
+ "webhook_url" "text" NOT NULL,
+ "webhook_secret" "text",
+ "events" "text"[] DEFAULT '{opportunity.sent}'::"text"[],
+ "is_active" boolean DEFAULT true,
+ "created_at" timestamp with time zone DEFAULT "now"(),
+ "updated_at" timestamp with time zone DEFAULT "now"()
+);
+
+
+ALTER TABLE "public"."webhook_configs" OWNER TO "postgres";
+
+
+ALTER TABLE ONLY "public"."ai_traffic_logs"
+ ADD CONSTRAINT "ai_traffic_logs_pkey" PRIMARY KEY ("id");
+
+
+ALTER TABLE ONLY "public"."brand_domains"
+ ADD CONSTRAINT "brand_domains_pkey" PRIMARY KEY ("id");
+
+
+ALTER TABLE ONLY "public"."brand_platforms"
+ ADD CONSTRAINT "brand_platforms_brand_id_platform_key" UNIQUE ("brand_id", "platform");
+
+
+ALTER TABLE ONLY "public"."brand_platforms"
+ ADD CONSTRAINT "brand_platforms_pkey" PRIMARY KEY ("id");
+
+
+ALTER TABLE ONLY "public"."brands"
+ ADD CONSTRAINT "brands_organization_id_slug_key" UNIQUE ("organization_id", "slug");
+
+
+ALTER TABLE ONLY "public"."brands"
+ ADD CONSTRAINT "brands_pkey" PRIMARY KEY ("id");
+
+
+ALTER TABLE ONLY "public"."brands"
+ ADD CONSTRAINT "brands_tracking_code_key" UNIQUE ("tracking_code");
+
+
+ALTER TABLE ONLY "public"."competitors"
+ ADD CONSTRAINT "competitors_pkey" PRIMARY KEY ("id");
+
+
+ALTER TABLE ONLY "public"."content_opportunities"
+ ADD CONSTRAINT "content_opportunities_pkey" PRIMARY KEY ("id");
+
+
+ALTER TABLE ONLY "public"."jobs"
+ ADD CONSTRAINT "jobs_pkey" PRIMARY KEY ("id");
+
+
+ALTER TABLE ONLY "public"."organizations"
+ ADD CONSTRAINT "organizations_pkey" PRIMARY KEY ("id");
+
+
+ALTER TABLE ONLY "public"."organizations"
+ ADD CONSTRAINT "organizations_slug_key" UNIQUE ("slug");
+
+
+ALTER TABLE ONLY "public"."profiles"
+ ADD CONSTRAINT "profiles_pkey" PRIMARY KEY ("id");
+
+
+ALTER TABLE ONLY "public"."prompt_results"
+ ADD CONSTRAINT "prompt_results_pkey" PRIMARY KEY ("id");
+
+
+ALTER TABLE ONLY "public"."prompt_sets"
+ ADD CONSTRAINT "prompt_sets_pkey" PRIMARY KEY ("id");
+
+
+ALTER TABLE ONLY "public"."prompt_volumes"
+ ADD CONSTRAINT "prompt_volumes_pkey" PRIMARY KEY ("id");
+
+
+ALTER TABLE ONLY "public"."prompts"
+ ADD CONSTRAINT "prompts_pkey" PRIMARY KEY ("id");
+
+
+ALTER TABLE ONLY "public"."topics"
+ ADD CONSTRAINT "topics_pkey" PRIMARY KEY ("id");
+
+
+ALTER TABLE ONLY "public"."prompt_volumes"
+ ADD CONSTRAINT "uq_prompt_volumes_prompt_id" UNIQUE ("prompt_id");
+
+
+ALTER TABLE ONLY "public"."volume_usage"
+ ADD CONSTRAINT "volume_usage_pkey" PRIMARY KEY ("id");
+
+
+ALTER TABLE ONLY "public"."webhook_configs"
+ ADD CONSTRAINT "webhook_configs_brand_id_name_key" UNIQUE ("brand_id", "name");
+
+
+ALTER TABLE ONLY "public"."webhook_configs"
+ ADD CONSTRAINT "webhook_configs_pkey" PRIMARY KEY ("id");
+
+
+CREATE INDEX "idx_ai_traffic_logs_brand_created" ON "public"."ai_traffic_logs" USING "btree" ("brand_id", "created_at" DESC);
+
+
+CREATE INDEX "idx_ai_traffic_logs_brand_id" ON "public"."ai_traffic_logs" USING "btree" ("brand_id");
+
+
+CREATE INDEX "idx_ai_traffic_logs_created_at" ON "public"."ai_traffic_logs" USING "btree" ("created_at" DESC);
+
+
+CREATE INDEX "idx_ai_traffic_logs_source_platform" ON "public"."ai_traffic_logs" USING "btree" ("source_platform");
+
+
+CREATE INDEX "idx_brand_domains_brand_id" ON "public"."brand_domains" USING "btree" ("brand_id");
+
+
+CREATE INDEX "idx_brand_platforms_brand_id" ON "public"."brand_platforms" USING "btree" ("brand_id");
+
+
+CREATE INDEX "idx_brands_organization_id" ON "public"."brands" USING "btree" ("organization_id");
+
+
+CREATE INDEX "idx_brands_tracking_code" ON "public"."brands" USING "btree" ("tracking_code");
+
+
+CREATE INDEX "idx_co_brand_id" ON "public"."content_opportunities" USING "btree" ("brand_id");
+
+
+CREATE INDEX "idx_co_score" ON "public"."content_opportunities" USING "btree" ("opportunity_score" DESC);
+
+
+CREATE INDEX "idx_co_status" ON "public"."content_opportunities" USING "btree" ("status");
+
+
+CREATE INDEX "idx_competitors_brand_id" ON "public"."competitors" USING "btree" ("brand_id");
+
+
+CREATE INDEX "idx_jobs_brand_id" ON "public"."jobs" USING "btree" ("brand_id");
+
+
+CREATE INDEX "idx_jobs_status" ON "public"."jobs" USING "btree" ("status");
+
+
+CREATE INDEX "idx_jobs_type_status" ON "public"."jobs" USING "btree" ("type", "status");
+
+
+CREATE INDEX "idx_profiles_organization_id" ON "public"."profiles" USING "btree" ("organization_id");
+
+
+CREATE INDEX "idx_prompt_results_brand_id" ON "public"."prompt_results" USING "btree" ("brand_id");
+
+
+CREATE INDEX "idx_prompt_results_created_at" ON "public"."prompt_results" USING "btree" ("created_at" DESC);
+
+
+CREATE INDEX "idx_prompt_results_prompt_id" ON "public"."prompt_results" USING "btree" ("prompt_id");
+
+
+CREATE INDEX "idx_prompt_volumes_est_ai_volume" ON "public"."prompt_volumes" USING "btree" ("est_ai_volume" DESC);
+
+
+CREATE INDEX "idx_prompt_volumes_prompt_id" ON "public"."prompt_volumes" USING "btree" ("prompt_id");
+
+
+CREATE INDEX "idx_prompts_topic" ON "public"."prompts" USING "btree" ("topic_id");
+
+
+CREATE INDEX "idx_topics_brand" ON "public"."topics" USING "btree" ("brand_id");
+
+
+CREATE INDEX "idx_volume_usage_org_month" ON "public"."volume_usage" USING "btree" ("organization_id", "used_at");
+
+
+CREATE INDEX "idx_wc_brand_id" ON "public"."webhook_configs" USING "btree" ("brand_id");
+
+
+CREATE OR REPLACE TRIGGER "handle_prompt_sets_updated_at" BEFORE UPDATE ON "public"."prompt_sets" FOR EACH ROW EXECUTE FUNCTION "public"."handle_updated_at"();
+
+
+CREATE OR REPLACE TRIGGER "trg_brands_updated_at" BEFORE UPDATE ON "public"."brands" FOR EACH ROW EXECUTE FUNCTION "public"."handle_updated_at"();
+
+
+CREATE OR REPLACE TRIGGER "trg_organizations_updated_at" BEFORE UPDATE ON "public"."organizations" FOR EACH ROW EXECUTE FUNCTION "public"."handle_updated_at"();
+
+
+CREATE OR REPLACE TRIGGER "trg_profiles_updated_at" BEFORE UPDATE ON "public"."profiles" FOR EACH ROW EXECUTE FUNCTION "public"."handle_updated_at"();
+
+
+ALTER TABLE ONLY "public"."ai_traffic_logs"
+ ADD CONSTRAINT "ai_traffic_logs_brand_id_fkey" FOREIGN KEY ("brand_id") REFERENCES "public"."brands"("id") ON DELETE CASCADE;
+
+
+ALTER TABLE ONLY "public"."brand_domains"
+ ADD CONSTRAINT "brand_domains_brand_id_fkey" FOREIGN KEY ("brand_id") REFERENCES "public"."brands"("id") ON DELETE CASCADE;
+
+
+ALTER TABLE ONLY "public"."brand_platforms"
+ ADD CONSTRAINT "brand_platforms_brand_id_fkey" FOREIGN KEY ("brand_id") REFERENCES "public"."brands"("id") ON DELETE CASCADE;
+
+
+ALTER TABLE ONLY "public"."brands"
+ ADD CONSTRAINT "brands_organization_id_fkey" FOREIGN KEY ("organization_id") REFERENCES "public"."organizations"("id") ON DELETE CASCADE;
+
+
+ALTER TABLE ONLY "public"."competitors"
+ ADD CONSTRAINT "competitors_brand_id_fkey" FOREIGN KEY ("brand_id") REFERENCES "public"."brands"("id") ON DELETE CASCADE;
+
+
+ALTER TABLE ONLY "public"."content_opportunities"
+ ADD CONSTRAINT "content_opportunities_brand_id_fkey" FOREIGN KEY ("brand_id") REFERENCES "public"."brands"("id") ON DELETE CASCADE;
+
+
+ALTER TABLE ONLY "public"."content_opportunities"
+ ADD CONSTRAINT "content_opportunities_prompt_id_fkey" FOREIGN KEY ("prompt_id") REFERENCES "public"."prompts"("id") ON DELETE SET NULL;
+
+
+ALTER TABLE ONLY "public"."jobs"
+ ADD CONSTRAINT "jobs_brand_id_fkey" FOREIGN KEY ("brand_id") REFERENCES "public"."brands"("id") ON DELETE CASCADE;
+
+
+ALTER TABLE ONLY "public"."profiles"
+ ADD CONSTRAINT "profiles_id_fkey" FOREIGN KEY ("id") REFERENCES "auth"."users"("id") ON DELETE CASCADE;
+
+
+ALTER TABLE ONLY "public"."profiles"
+ ADD CONSTRAINT "profiles_organization_id_fkey" FOREIGN KEY ("organization_id") REFERENCES "public"."organizations"("id") ON DELETE SET NULL;
+
+
+ALTER TABLE ONLY "public"."prompt_results"
+ ADD CONSTRAINT "prompt_results_brand_id_fkey" FOREIGN KEY ("brand_id") REFERENCES "public"."brands"("id") ON DELETE CASCADE;
+
+
+ALTER TABLE ONLY "public"."prompt_results"
+ ADD CONSTRAINT "prompt_results_prompt_id_fkey" FOREIGN KEY ("prompt_id") REFERENCES "public"."prompts"("id") ON DELETE CASCADE;
+
+
+ALTER TABLE ONLY "public"."prompt_sets"
+ ADD CONSTRAINT "prompt_sets_brand_id_fkey" FOREIGN KEY ("brand_id") REFERENCES "public"."brands"("id") ON DELETE CASCADE;
+
+
+ALTER TABLE ONLY "public"."prompt_volumes"
+ ADD CONSTRAINT "prompt_volumes_prompt_id_fkey" FOREIGN KEY ("prompt_id") REFERENCES "public"."prompts"("id") ON DELETE CASCADE;
+
+
+ALTER TABLE ONLY "public"."prompts"
+ ADD CONSTRAINT "prompts_prompt_set_id_fkey" FOREIGN KEY ("prompt_set_id") REFERENCES "public"."prompt_sets"("id") ON DELETE CASCADE;
+
+
+ALTER TABLE ONLY "public"."prompts"
+ ADD CONSTRAINT "prompts_topic_id_fkey" FOREIGN KEY ("topic_id") REFERENCES "public"."topics"("id") ON DELETE SET NULL;
+
+
+ALTER TABLE ONLY "public"."topics"
+ ADD CONSTRAINT "topics_brand_id_fkey" FOREIGN KEY ("brand_id") REFERENCES "public"."brands"("id") ON DELETE CASCADE;
+
+
+ALTER TABLE ONLY "public"."volume_usage"
+ ADD CONSTRAINT "volume_usage_organization_id_fkey" FOREIGN KEY ("organization_id") REFERENCES "public"."organizations"("id") ON DELETE CASCADE;
+
+
+ALTER TABLE ONLY "public"."webhook_configs"
+ ADD CONSTRAINT "webhook_configs_brand_id_fkey" FOREIGN KEY ("brand_id") REFERENCES "public"."brands"("id") ON DELETE CASCADE;
+
+
+CREATE POLICY "Service role can delete prompt results" ON "public"."prompt_results" FOR DELETE USING (true);
+
+
+CREATE POLICY "Service role can insert prompt results" ON "public"."prompt_results" FOR INSERT WITH CHECK (true);
+
+
+CREATE POLICY "Service role can insert traffic logs" ON "public"."ai_traffic_logs" FOR INSERT WITH CHECK (true);
+
+
+CREATE POLICY "Users can delete brand platforms through org" ON "public"."brand_platforms" FOR DELETE USING ((EXISTS ( SELECT 1
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE (("b"."id" = "brand_platforms"."brand_id") AND ("p"."id" = "auth"."uid"())))));
+
+
+CREATE POLICY "Users can insert brand platforms through org" ON "public"."brand_platforms" FOR INSERT WITH CHECK ((EXISTS ( SELECT 1
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE (("b"."id" = "brand_platforms"."brand_id") AND ("p"."id" = "auth"."uid"())))));
+
+
+CREATE POLICY "Users can read own org prompt results" ON "public"."prompt_results" FOR SELECT USING (("brand_id" IN ( SELECT "b"."id"
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE ("p"."id" = "auth"."uid"()))));
+
+
+CREATE POLICY "Users can update brand platforms through org" ON "public"."brand_platforms" FOR UPDATE USING ((EXISTS ( SELECT 1
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE (("b"."id" = "brand_platforms"."brand_id") AND ("p"."id" = "auth"."uid"())))));
+
+
+CREATE POLICY "Users can view brand platforms through org" ON "public"."brand_platforms" FOR SELECT USING ((EXISTS ( SELECT 1
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE (("b"."id" = "brand_platforms"."brand_id") AND ("p"."id" = "auth"."uid"())))));
+
+
+CREATE POLICY "Users can view own org traffic logs" ON "public"."ai_traffic_logs" FOR SELECT USING (("brand_id" IN ( SELECT "b"."id"
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE ("p"."id" = "auth"."uid"()))));
+
+
+CREATE POLICY "Users cannot update plan fields directly" ON "public"."organizations" FOR UPDATE USING ((EXISTS ( SELECT 1
+ FROM "public"."profiles"
+ WHERE (("profiles"."organization_id" = "organizations"."id") AND ("profiles"."id" = "auth"."uid"()))))) WITH CHECK ((EXISTS ( SELECT 1
+ FROM "public"."profiles"
+ WHERE (("profiles"."organization_id" = "organizations"."id") AND ("profiles"."id" = "auth"."uid"())))));
+
+
+ALTER TABLE "public"."ai_traffic_logs" ENABLE ROW LEVEL SECURITY;
+
+
+ALTER TABLE "public"."brand_domains" ENABLE ROW LEVEL SECURITY;
+
+
+CREATE POLICY "brand_domains: admin/manager delete" ON "public"."brand_domains" FOR DELETE USING (("brand_id" IN ( SELECT "b"."id"
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE (("p"."id" = "auth"."uid"()) AND ("p"."role" = ANY (ARRAY['admin'::"public"."user_role", 'manager'::"public"."user_role"]))))));
+
+
+CREATE POLICY "brand_domains: admin/manager insert" ON "public"."brand_domains" FOR INSERT WITH CHECK (("brand_id" IN ( SELECT "b"."id"
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE (("p"."id" = "auth"."uid"()) AND ("p"."role" = ANY (ARRAY['admin'::"public"."user_role", 'manager'::"public"."user_role"]))))));
+
+
+CREATE POLICY "brand_domains: admin/manager update" ON "public"."brand_domains" FOR UPDATE USING (("brand_id" IN ( SELECT "b"."id"
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE (("p"."id" = "auth"."uid"()) AND ("p"."role" = ANY (ARRAY['admin'::"public"."user_role", 'manager'::"public"."user_role"]))))));
+
+
+CREATE POLICY "brand_domains: member select" ON "public"."brand_domains" FOR SELECT USING (("brand_id" IN ( SELECT "b"."id"
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE ("p"."id" = "auth"."uid"()))));
+
+
+ALTER TABLE "public"."brand_platforms" ENABLE ROW LEVEL SECURITY;
+
+
+ALTER TABLE "public"."brands" ENABLE ROW LEVEL SECURITY;
+
+
+CREATE POLICY "brands: admin delete" ON "public"."brands" FOR DELETE USING (("organization_id" IN ( SELECT "profiles"."organization_id"
+ FROM "public"."profiles"
+ WHERE (("profiles"."id" = "auth"."uid"()) AND ("profiles"."role" = 'admin'::"public"."user_role")))));
+
+
+CREATE POLICY "brands: admin/manager insert" ON "public"."brands" FOR INSERT WITH CHECK (("organization_id" IN ( SELECT "profiles"."organization_id"
+ FROM "public"."profiles"
+ WHERE (("profiles"."id" = "auth"."uid"()) AND ("profiles"."role" = ANY (ARRAY['admin'::"public"."user_role", 'manager'::"public"."user_role"]))))));
+
+
+CREATE POLICY "brands: admin/manager update" ON "public"."brands" FOR UPDATE USING (("organization_id" IN ( SELECT "profiles"."organization_id"
+ FROM "public"."profiles"
+ WHERE (("profiles"."id" = "auth"."uid"()) AND ("profiles"."role" = ANY (ARRAY['admin'::"public"."user_role", 'manager'::"public"."user_role"]))))));
+
+
+CREATE POLICY "brands: member select" ON "public"."brands" FOR SELECT USING (("organization_id" IN ( SELECT "profiles"."organization_id"
+ FROM "public"."profiles"
+ WHERE ("profiles"."id" = "auth"."uid"()))));
+
+
+ALTER TABLE "public"."content_opportunities" ENABLE ROW LEVEL SECURITY;
+
+
+CREATE POLICY "content_opportunities: admin/manager delete" ON "public"."content_opportunities" FOR DELETE USING (("brand_id" IN ( SELECT "b"."id"
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE (("p"."id" = "auth"."uid"()) AND ("p"."role" = ANY (ARRAY['admin'::"public"."user_role", 'manager'::"public"."user_role"]))))));
+
+
+CREATE POLICY "content_opportunities: admin/manager insert" ON "public"."content_opportunities" FOR INSERT WITH CHECK (("brand_id" IN ( SELECT "b"."id"
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE (("p"."id" = "auth"."uid"()) AND ("p"."role" = ANY (ARRAY['admin'::"public"."user_role", 'manager'::"public"."user_role"]))))));
+
+
+CREATE POLICY "content_opportunities: admin/manager update" ON "public"."content_opportunities" FOR UPDATE USING (("brand_id" IN ( SELECT "b"."id"
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE (("p"."id" = "auth"."uid"()) AND ("p"."role" = ANY (ARRAY['admin'::"public"."user_role", 'manager'::"public"."user_role"]))))));
+
+
+CREATE POLICY "content_opportunities: member select" ON "public"."content_opportunities" FOR SELECT USING (("brand_id" IN ( SELECT "b"."id"
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE ("p"."id" = "auth"."uid"()))));
+
+
+ALTER TABLE "public"."organizations" ENABLE ROW LEVEL SECURITY;
+
+
+CREATE POLICY "organizations: admin update" ON "public"."organizations" FOR UPDATE USING (("id" IN ( SELECT "profiles"."organization_id"
+ FROM "public"."profiles"
+ WHERE (("profiles"."id" = "auth"."uid"()) AND ("profiles"."role" = 'admin'::"public"."user_role")))));
+
+
+CREATE POLICY "organizations: authenticated insert" ON "public"."organizations" FOR INSERT WITH CHECK (("auth"."uid"() IS NOT NULL));
+
+
+CREATE POLICY "organizations: member or creator select" ON "public"."organizations" FOR SELECT USING ((("id" IN ( SELECT "profiles"."organization_id"
+ FROM "public"."profiles"
+ WHERE ("profiles"."id" = "auth"."uid"()))) OR (NOT (EXISTS ( SELECT 1
+ FROM "public"."profiles"
+ WHERE ("profiles"."organization_id" = "organizations"."id"))))));
+
+
+ALTER TABLE "public"."profiles" ENABLE ROW LEVEL SECURITY;
+
+
+CREATE POLICY "profiles: own row select" ON "public"."profiles" FOR SELECT USING (("auth"."uid"() = "id"));
+
+
+CREATE POLICY "profiles: own row update" ON "public"."profiles" FOR UPDATE USING (("auth"."uid"() = "id"));
+
+
+ALTER TABLE "public"."prompt_results" ENABLE ROW LEVEL SECURITY;
+
+
+ALTER TABLE "public"."prompt_sets" ENABLE ROW LEVEL SECURITY;
+
+
+CREATE POLICY "prompt_sets: admin/manager delete" ON "public"."prompt_sets" FOR DELETE USING (("brand_id" IN ( SELECT "b"."id"
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE (("p"."id" = "auth"."uid"()) AND ("p"."role" = ANY (ARRAY['admin'::"public"."user_role", 'manager'::"public"."user_role"]))))));
+
+
+CREATE POLICY "prompt_sets: admin/manager insert" ON "public"."prompt_sets" FOR INSERT WITH CHECK (("brand_id" IN ( SELECT "b"."id"
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE (("p"."id" = "auth"."uid"()) AND ("p"."role" = ANY (ARRAY['admin'::"public"."user_role", 'manager'::"public"."user_role"]))))));
+
+
+CREATE POLICY "prompt_sets: admin/manager update" ON "public"."prompt_sets" FOR UPDATE USING (("brand_id" IN ( SELECT "b"."id"
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE (("p"."id" = "auth"."uid"()) AND ("p"."role" = ANY (ARRAY['admin'::"public"."user_role", 'manager'::"public"."user_role"]))))));
+
+
+CREATE POLICY "prompt_sets: member select" ON "public"."prompt_sets" FOR SELECT USING (("brand_id" IN ( SELECT "b"."id"
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE ("p"."id" = "auth"."uid"()))));
+
+
+ALTER TABLE "public"."prompts" ENABLE ROW LEVEL SECURITY;
+
+
+CREATE POLICY "prompts: admin/manager delete" ON "public"."prompts" FOR DELETE USING (("prompt_set_id" IN ( SELECT "ps"."id"
+ FROM (("public"."prompt_sets" "ps"
+ JOIN "public"."brands" "b" ON (("b"."id" = "ps"."brand_id")))
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE (("p"."id" = "auth"."uid"()) AND ("p"."role" = ANY (ARRAY['admin'::"public"."user_role", 'manager'::"public"."user_role"]))))));
+
+
+CREATE POLICY "prompts: admin/manager insert" ON "public"."prompts" FOR INSERT WITH CHECK (("prompt_set_id" IN ( SELECT "ps"."id"
+ FROM (("public"."prompt_sets" "ps"
+ JOIN "public"."brands" "b" ON (("b"."id" = "ps"."brand_id")))
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE (("p"."id" = "auth"."uid"()) AND ("p"."role" = ANY (ARRAY['admin'::"public"."user_role", 'manager'::"public"."user_role"]))))));
+
+
+CREATE POLICY "prompts: admin/manager update" ON "public"."prompts" FOR UPDATE USING (("prompt_set_id" IN ( SELECT "ps"."id"
+ FROM (("public"."prompt_sets" "ps"
+ JOIN "public"."brands" "b" ON (("b"."id" = "ps"."brand_id")))
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE (("p"."id" = "auth"."uid"()) AND ("p"."role" = ANY (ARRAY['admin'::"public"."user_role", 'manager'::"public"."user_role"]))))));
+
+
+CREATE POLICY "prompts: member select" ON "public"."prompts" FOR SELECT USING (("prompt_set_id" IN ( SELECT "ps"."id"
+ FROM (("public"."prompt_sets" "ps"
+ JOIN "public"."brands" "b" ON (("b"."id" = "ps"."brand_id")))
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE ("p"."id" = "auth"."uid"()))));
+
+
+ALTER TABLE "public"."volume_usage" ENABLE ROW LEVEL SECURITY;
+
+
+ALTER TABLE "public"."webhook_configs" ENABLE ROW LEVEL SECURITY;
+
+
+CREATE POLICY "webhook_configs: admin/manager delete" ON "public"."webhook_configs" FOR DELETE USING (("brand_id" IN ( SELECT "b"."id"
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE (("p"."id" = "auth"."uid"()) AND ("p"."role" = ANY (ARRAY['admin'::"public"."user_role", 'manager'::"public"."user_role"]))))));
+
+
+CREATE POLICY "webhook_configs: admin/manager insert" ON "public"."webhook_configs" FOR INSERT WITH CHECK (("brand_id" IN ( SELECT "b"."id"
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE (("p"."id" = "auth"."uid"()) AND ("p"."role" = ANY (ARRAY['admin'::"public"."user_role", 'manager'::"public"."user_role"]))))));
+
+
+CREATE POLICY "webhook_configs: admin/manager update" ON "public"."webhook_configs" FOR UPDATE USING (("brand_id" IN ( SELECT "b"."id"
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE (("p"."id" = "auth"."uid"()) AND ("p"."role" = ANY (ARRAY['admin'::"public"."user_role", 'manager'::"public"."user_role"]))))));
+
+
+CREATE POLICY "webhook_configs: member select" ON "public"."webhook_configs" FOR SELECT USING (("brand_id" IN ( SELECT "b"."id"
+ FROM ("public"."brands" "b"
+ JOIN "public"."profiles" "p" ON (("p"."organization_id" = "b"."organization_id")))
+ WHERE ("p"."id" = "auth"."uid"()))));
+
+
+ALTER PUBLICATION "supabase_realtime" OWNER TO "postgres";
+
+
+GRANT USAGE ON SCHEMA "public" TO "postgres";
+GRANT USAGE ON SCHEMA "public" TO "anon";
+GRANT USAGE ON SCHEMA "public" TO "authenticated";
+GRANT USAGE ON SCHEMA "public" TO "service_role";
+
+
+GRANT ALL ON TABLE "public"."prompt_results" TO "anon";
+GRANT ALL ON TABLE "public"."prompt_results" TO "authenticated";
+GRANT ALL ON TABLE "public"."prompt_results" TO "service_role";
+
+
+GRANT ALL ON FUNCTION "public"."get_latest_prompt_results"("p_brand_id" "uuid", "p_platform" "text") TO "anon";
+GRANT ALL ON FUNCTION "public"."get_latest_prompt_results"("p_brand_id" "uuid", "p_platform" "text") TO "authenticated";
+GRANT ALL ON FUNCTION "public"."get_latest_prompt_results"("p_brand_id" "uuid", "p_platform" "text") TO "service_role";
+
+
+GRANT ALL ON FUNCTION "public"."get_latest_prompt_results"("p_brand_id" "uuid", "p_platform" "text", "p_model" "text", "p_region" "text", "p_date_from" timestamp with time zone, "p_date_to" timestamp with time zone) TO "anon";
+GRANT ALL ON FUNCTION "public"."get_latest_prompt_results"("p_brand_id" "uuid", "p_platform" "text", "p_model" "text", "p_region" "text", "p_date_from" timestamp with time zone, "p_date_to" timestamp with time zone) TO "authenticated";
+GRANT ALL ON FUNCTION "public"."get_latest_prompt_results"("p_brand_id" "uuid", "p_platform" "text", "p_model" "text", "p_region" "text", "p_date_from" timestamp with time zone, "p_date_to" timestamp with time zone) TO "service_role";
+
+
+GRANT ALL ON FUNCTION "public"."handle_new_user"() TO "anon";
+GRANT ALL ON FUNCTION "public"."handle_new_user"() TO "authenticated";
+GRANT ALL ON FUNCTION "public"."handle_new_user"() TO "service_role";
+
+
+GRANT ALL ON FUNCTION "public"."handle_updated_at"() TO "anon";
+GRANT ALL ON FUNCTION "public"."handle_updated_at"() TO "authenticated";
+GRANT ALL ON FUNCTION "public"."handle_updated_at"() TO "service_role";
+
+
+GRANT ALL ON TABLE "public"."ai_traffic_logs" TO "anon";
+GRANT ALL ON TABLE "public"."ai_traffic_logs" TO "authenticated";
+GRANT ALL ON TABLE "public"."ai_traffic_logs" TO "service_role";
+
+
+GRANT ALL ON TABLE "public"."brand_domains" TO "anon";
+GRANT ALL ON TABLE "public"."brand_domains" TO "authenticated";
+GRANT ALL ON TABLE "public"."brand_domains" TO "service_role";
+
+
+GRANT ALL ON TABLE "public"."brand_platforms" TO "anon";
+GRANT ALL ON TABLE "public"."brand_platforms" TO "authenticated";
+GRANT ALL ON TABLE "public"."brand_platforms" TO "service_role";
+
+
+GRANT ALL ON TABLE "public"."brands" TO "anon";
+GRANT ALL ON TABLE "public"."brands" TO "authenticated";
+GRANT ALL ON TABLE "public"."brands" TO "service_role";
+
+
+GRANT ALL ON TABLE "public"."competitors" TO "anon";
+GRANT ALL ON TABLE "public"."competitors" TO "authenticated";
+GRANT ALL ON TABLE "public"."competitors" TO "service_role";
+
+
+GRANT ALL ON TABLE "public"."content_opportunities" TO "anon";
+GRANT ALL ON TABLE "public"."content_opportunities" TO "authenticated";
+GRANT ALL ON TABLE "public"."content_opportunities" TO "service_role";
+
+
+GRANT ALL ON TABLE "public"."jobs" TO "anon";
+GRANT ALL ON TABLE "public"."jobs" TO "authenticated";
+GRANT ALL ON TABLE "public"."jobs" TO "service_role";
+
+
+GRANT ALL ON TABLE "public"."organizations" TO "anon";
+GRANT ALL ON TABLE "public"."organizations" TO "authenticated";
+GRANT ALL ON TABLE "public"."organizations" TO "service_role";
+
+
+GRANT ALL ON TABLE "public"."profiles" TO "anon";
+GRANT ALL ON TABLE "public"."profiles" TO "authenticated";
+GRANT ALL ON TABLE "public"."profiles" TO "service_role";
+
+
+GRANT ALL ON TABLE "public"."prompt_sets" TO "anon";
+GRANT ALL ON TABLE "public"."prompt_sets" TO "authenticated";
+GRANT ALL ON TABLE "public"."prompt_sets" TO "service_role";
+
+
+GRANT ALL ON TABLE "public"."prompt_volumes" TO "anon";
+GRANT ALL ON TABLE "public"."prompt_volumes" TO "authenticated";
+GRANT ALL ON TABLE "public"."prompt_volumes" TO "service_role";
+
+
+GRANT ALL ON TABLE "public"."prompts" TO "anon";
+GRANT ALL ON TABLE "public"."prompts" TO "authenticated";
+GRANT ALL ON TABLE "public"."prompts" TO "service_role";
+
+
+GRANT ALL ON TABLE "public"."topics" TO "anon";
+GRANT ALL ON TABLE "public"."topics" TO "authenticated";
+GRANT ALL ON TABLE "public"."topics" TO "service_role";
+
+
+GRANT ALL ON TABLE "public"."volume_usage" TO "anon";
+GRANT ALL ON TABLE "public"."volume_usage" TO "authenticated";
+GRANT ALL ON TABLE "public"."volume_usage" TO "service_role";
+
+
+GRANT ALL ON TABLE "public"."webhook_configs" TO "anon";
+GRANT ALL ON TABLE "public"."webhook_configs" TO "authenticated";
+GRANT ALL ON TABLE "public"."webhook_configs" TO "service_role";
+
+
+ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "postgres";
+ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "anon";
+ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "authenticated";
+ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "service_role";
+
+
+ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "postgres";
+ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "anon";
+ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "authenticated";
+ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "service_role";
+
+
+ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "postgres";
+ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "anon";
+ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "authenticated";
+ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "service_role";
+
+
+CREATE TRIGGER on_auth_user_created
+ AFTER INSERT ON auth.users
+ FOR EACH ROW
+ EXECUTE FUNCTION public.handle_new_user();
+
+
diff --git a/supabase/migrations/00002_team_invitations.sql b/supabase/migrations/00002_team_invitations.sql
new file mode 100644
index 000000000..f1f66223e
--- /dev/null
+++ b/supabase/migrations/00002_team_invitations.sql
@@ -0,0 +1,100 @@
+-- Team invitations
+-- Adds invitation flow so organization admins can invite teammates via email.
+
+CREATE TYPE "public"."invitation_status" AS ENUM (
+ 'pending',
+ 'accepted',
+ 'expired',
+ 'revoked'
+);
+
+ALTER TYPE "public"."invitation_status" OWNER TO "postgres";
+
+CREATE TABLE IF NOT EXISTS "public"."invitations" (
+ "id" uuid DEFAULT gen_random_uuid() NOT NULL,
+ "organization_id" uuid NOT NULL,
+ "email" text NOT NULL,
+ "role" public.user_role NOT NULL DEFAULT 'analyst',
+ "token" text NOT NULL,
+ "invited_by" uuid NOT NULL,
+ "status" public.invitation_status NOT NULL DEFAULT 'pending',
+ "expires_at" timestamptz NOT NULL DEFAULT (now() + interval '7 days'),
+ "accepted_at" timestamptz,
+ "created_at" timestamptz NOT NULL DEFAULT now()
+);
+
+ALTER TABLE "public"."invitations" OWNER TO "postgres";
+
+ALTER TABLE ONLY "public"."invitations"
+ ADD CONSTRAINT "invitations_pkey" PRIMARY KEY ("id");
+
+ALTER TABLE ONLY "public"."invitations"
+ ADD CONSTRAINT "invitations_token_key" UNIQUE ("token");
+
+ALTER TABLE ONLY "public"."invitations"
+ ADD CONSTRAINT "invitations_organization_id_fkey"
+ FOREIGN KEY ("organization_id")
+ REFERENCES "public"."organizations"("id") ON DELETE CASCADE;
+
+ALTER TABLE ONLY "public"."invitations"
+ ADD CONSTRAINT "invitations_invited_by_fkey"
+ FOREIGN KEY ("invited_by")
+ REFERENCES "auth"."users"("id") ON DELETE CASCADE;
+
+-- Prevent duplicate pending invitations for the same org+email combo.
+CREATE UNIQUE INDEX IF NOT EXISTS "invitations_org_email_pending_idx"
+ ON "public"."invitations" ("organization_id", lower("email"))
+ WHERE status = 'pending';
+
+CREATE INDEX IF NOT EXISTS "idx_invitations_organization_id"
+ ON "public"."invitations" USING btree ("organization_id");
+
+CREATE INDEX IF NOT EXISTS "idx_invitations_email"
+ ON "public"."invitations" USING btree (lower("email"));
+
+CREATE INDEX IF NOT EXISTS "idx_invitations_token"
+ ON "public"."invitations" USING btree ("token");
+
+-- RLS
+ALTER TABLE "public"."invitations" ENABLE ROW LEVEL SECURITY;
+
+-- Members of an org can read invitations for that org.
+CREATE POLICY "Members can view org invitations"
+ ON "public"."invitations" FOR SELECT
+ USING (
+ organization_id IN (
+ SELECT organization_id FROM public.profiles WHERE id = auth.uid()
+ )
+ );
+
+-- Admins of an org can manage (insert/update/delete) invitations.
+CREATE POLICY "Admins can insert invitations"
+ ON "public"."invitations" FOR INSERT
+ WITH CHECK (
+ organization_id IN (
+ SELECT organization_id FROM public.profiles
+ WHERE id = auth.uid() AND role = 'admin'
+ )
+ );
+
+CREATE POLICY "Admins can update invitations"
+ ON "public"."invitations" FOR UPDATE
+ USING (
+ organization_id IN (
+ SELECT organization_id FROM public.profiles
+ WHERE id = auth.uid() AND role = 'admin'
+ )
+ );
+
+CREATE POLICY "Admins can delete invitations"
+ ON "public"."invitations" FOR DELETE
+ USING (
+ organization_id IN (
+ SELECT organization_id FROM public.profiles
+ WHERE id = auth.uid() AND role = 'admin'
+ )
+ );
+
+GRANT ALL ON TABLE "public"."invitations" TO "anon";
+GRANT ALL ON TABLE "public"."invitations" TO "authenticated";
+GRANT ALL ON TABLE "public"."invitations" TO "service_role";
diff --git a/web/.env.example b/web/.env.example
new file mode 100644
index 000000000..f5af28486
--- /dev/null
+++ b/web/.env.example
@@ -0,0 +1,52 @@
+# =============================================================================
+# AEO Platform — Environment Variables
+# Copy this file to .env.local and fill in your values
+# =============================================================================
+
+# -----------------------------------------------------------------------------
+# Supabase
+# Get these from: https://supabase.com/dashboard/project/YOUR_PROJECT/settings/api
+# -----------------------------------------------------------------------------
+NEXT_PUBLIC_SUPABASE_URL=https://xxxxxxxxxxxxxxxxxxxx.supabase.co
+NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
+
+# -----------------------------------------------------------------------------
+# AI API Keys (users can provide their own)
+# -----------------------------------------------------------------------------
+OPENAI_API_KEY=sk-...
+GOOGLE_GEMINI_API_KEY=AIza...
+ANTHROPIC_API_KEY=sk-ant-...
+PERPLEXITY_API_KEY=pplx-...
+GROK_API_KEY=xai-...
+
+# -----------------------------------------------------------------------------
+# App
+# -----------------------------------------------------------------------------
+NEXT_PUBLIC_APP_URL=http://localhost:3000
+
+# -----------------------------------------------------------------------------
+# Cloud / Self-hosted mode
+# Set to "true" only for the official cloud deployment.
+# Self-hosted instances should leave this unset or "false" — all features
+# will be unlocked automatically.
+# -----------------------------------------------------------------------------
+NEXT_PUBLIC_IS_CLOUD=false
+
+# -----------------------------------------------------------------------------
+# AEO Server (backend API)
+# -----------------------------------------------------------------------------
+NEXT_PUBLIC_API_URL=http://localhost:80
+
+# -----------------------------------------------------------------------------
+# Stripe (cloud only — not needed for self-hosted)
+# -----------------------------------------------------------------------------
+# NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
+# STRIPE_SECRET_KEY=sk_test_...
+# STRIPE_WEBHOOK_SECRET=whsec_...
+# STRIPE_STARTER_MONTHLY_PRICE_ID=price_...
+# STRIPE_GROWTH_MONTHLY_PRICE_ID=price_...
+
+# -----------------------------------------------------------------------------
+# Supabase Service Role Key (cloud only — for Stripe webhooks)
+# -----------------------------------------------------------------------------
+# SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOi...
diff --git a/web/.gitignore b/web/.gitignore
new file mode 100644
index 000000000..c21489df9
--- /dev/null
+++ b/web/.gitignore
@@ -0,0 +1,42 @@
+# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
+
+# dependencies
+/node_modules
+/.pnp
+.pnp.*
+.yarn/*
+!.yarn/patches
+!.yarn/plugins
+!.yarn/releases
+!.yarn/versions
+
+# testing
+/coverage
+
+# next.js
+/.next/
+/out/
+
+# production
+/build
+
+# misc
+.DS_Store
+*.pem
+
+# debug
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+.pnpm-debug.log*
+
+# env files
+.env*.local
+.env
+
+# vercel
+.vercel
+
+# typescript
+*.tsbuildinfo
+next-env.d.ts
diff --git a/web/Dockerfile b/web/Dockerfile
new file mode 100644
index 000000000..6ce8b89bd
--- /dev/null
+++ b/web/Dockerfile
@@ -0,0 +1,40 @@
+FROM node:20-alpine AS base
+
+ARG VERSION=0.1.0
+LABEL org.opencontainers.image.title="Ansvisor Web"
+LABEL org.opencontainers.image.version=$VERSION
+LABEL org.opencontainers.image.source="https://github.com/aeohub/ansvisor"
+LABEL org.opencontainers.image.licenses="MIT"
+
+# Install dependencies
+FROM base AS deps
+WORKDIR /app
+COPY package.json yarn.lock* package-lock.json* ./
+RUN if [ -f yarn.lock ]; then yarn install --frozen-lockfile; \
+ elif [ -f package-lock.json ]; then npm ci; \
+ else npm install; fi
+
+# Build
+FROM base AS builder
+WORKDIR /app
+COPY --from=deps /app/node_modules ./node_modules
+COPY . .
+RUN npm run build
+
+# Production
+FROM base AS runner
+WORKDIR /app
+ENV NODE_ENV=production
+
+RUN addgroup --system --gid 1001 nodejs
+RUN adduser --system --uid 1001 nextjs
+
+COPY --from=builder /app/public ./public
+COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
+COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
+
+USER nextjs
+EXPOSE 3000
+ENV PORT=3000
+
+CMD ["node", "server.js"]
diff --git a/components.json b/web/components.json
similarity index 100%
rename from components.json
rename to web/components.json
diff --git a/eslint.config.mjs b/web/eslint.config.mjs
similarity index 100%
rename from eslint.config.mjs
rename to web/eslint.config.mjs
diff --git a/web/messages/en.json b/web/messages/en.json
new file mode 100644
index 000000000..66180bd77
--- /dev/null
+++ b/web/messages/en.json
@@ -0,0 +1,479 @@
+{
+ "common": {
+ "loading": "Loading...",
+ "error": "Something went wrong.",
+ "retry": "Try again",
+ "save": "Save",
+ "cancel": "Cancel",
+ "delete": "Delete",
+ "edit": "Edit",
+ "view": "View",
+ "back": "Back",
+ "next": "Next",
+ "search": "Search",
+ "filter": "Filter",
+ "export": "Export",
+ "noData": "No data available"
+ },
+ "nav": {
+ "overview": "Overview",
+ "insights": "Answer Engine Insights",
+ "traffic": "AI Traffic Analytics",
+ "prompts": "Prompts",
+ "topics": "Topics",
+ "content": "Content Optimization",
+ "competitors": "Competitors",
+ "citations": "Citations",
+ "reports": "Reports",
+ "settings": "Settings"
+ },
+ "auth": {
+ "signIn": "Sign in",
+ "signUp": "Sign up",
+ "signOut": "Sign out",
+ "email": "Email",
+ "password": "Password",
+ "forgotPassword": "Forgot password?",
+ "noAccount": "Don't have an account?",
+ "hasAccount": "Already have an account?",
+ "createAccount": "Create account",
+ "signingIn": "Signing in...",
+ "signingUp": "Creating account...",
+ "emailPlaceholder": "[email protected]",
+ "passwordPlaceholder": "••••••••",
+ "fullName": "Full name",
+ "fullNamePlaceholder": "John Doe",
+ "magicLink": "Send magic link",
+ "magicLinkSent": "Check your email for the sign-in link.",
+ "verificationEmailSent": "We sent you a verification email. Check your inbox to confirm your account.",
+ "verificationPending": "We sent a verification email to your inbox. Please click the link to verify your account before signing in.",
+ "orContinueWith": "Or continue with",
+ "termsAgreement": "By continuing, you agree to our",
+ "termsOfService": "Terms of Service",
+ "and": "and",
+ "privacyPolicy": "Privacy Policy",
+ "errors": {
+ "invalidCredentials": "Invalid email or password.",
+ "emailRequired": "Email is required.",
+ "passwordRequired": "Password is required.",
+ "passwordTooShort": "Password must be at least 8 characters.",
+ "generic": "An error occurred. Please try again.",
+ "emailNotConfirmed": "Please verify your email address first. Check your inbox for the confirmation link."
+ }
+ },
+ "dashboard": {
+ "overview": "Overview",
+ "welcome": "Welcome back",
+ "visibilityScore": "Visibility Score",
+ "totalMentions": "Total Mentions",
+ "totalCitations": "Total Citations",
+ "activePlatforms": "Active Platforms",
+ "recentActivity": "Recent Activity",
+ "quickActions": "Quick Actions",
+ "viewAll": "View all"
+ },
+ "insights": {
+ "title": "Answer Engine Insights",
+ "description": "Monitor how your brand is represented in AI-generated answers.",
+ "runPrompts": "Run Prompts",
+ "promptResults": "Prompt Results",
+ "platform": "Platform",
+ "mentions": "Mentions",
+ "citations": "Citations",
+ "sentiment": "Sentiment",
+ "score": "Score",
+ "positive": "Positive",
+ "neutral": "Neutral",
+ "negative": "Negative"
+ },
+ "content": {
+ "title": "Content Opportunities",
+ "description": "AI-powered content recommendations to improve your visibility in AI-generated answers.",
+ "opportunities": "Opportunities",
+ "generate": "Generate Opportunities",
+ "regenerate": "Refresh Opportunities",
+ "generating": "Analyzing...",
+ "sendToWorkflow": "Send to Workflow",
+ "sending": "Sending...",
+ "dismiss": "Dismiss",
+ "viewDetails": "View Details",
+ "configureWebhook": "Configure Webhook",
+ "noOpportunities": "No content opportunities yet",
+ "noOpportunitiesHint": "Generate opportunities to get AI-powered content recommendations based on your prompt data.",
+ "noPromptsHint": "Add prompts and run volume analysis first to generate content opportunities.",
+ "available": "{count} Available",
+ "status": {
+ "new": "New",
+ "sent": "Sent to Workflow",
+ "in_progress": "In Progress",
+ "done": "Done",
+ "dismissed": "Dismissed"
+ },
+ "impact": {
+ "high": "High",
+ "medium": "Medium",
+ "low": "Low"
+ },
+ "type": {
+ "owned": "Owned",
+ "earned": "Earned"
+ },
+ "kpi": {
+ "total": "Total Opportunities",
+ "highImpact": "High Impact",
+ "sentToWorkflow": "Sent to Workflow",
+ "avgScore": "Avg. Score"
+ },
+ "filters": {
+ "allStatuses": "All Statuses",
+ "allImpacts": "All Impacts",
+ "allTypes": "All Types"
+ },
+ "bulk": {
+ "selected": "{count} selected",
+ "sendAll": "Send All",
+ "dismissAll": "Dismiss All"
+ },
+ "table": {
+ "action": "Action",
+ "type": "Type",
+ "impact": "Impact",
+ "score": "Score",
+ "status": "Status",
+ "actions": "Actions"
+ },
+ "detail": {
+ "backToList": "Back to Opportunities",
+ "sourceData": "Source Data",
+ "relatedPrompt": "Related Prompt",
+ "estAiVolume": "Est. AI Volume",
+ "visibility": "Current Visibility",
+ "competitorGap": "Competitor Gap",
+ "intent": "Search Intent",
+ "keywords": "Keywords",
+ "competitorsCited": "Competitors Cited",
+ "webhookStatus": "Webhook Status",
+ "notSentYet": "Not sent to any workflow yet.",
+ "sentAt": "Sent at {date}",
+ "webhookResponse": "Webhook Response"
+ },
+ "webhook": {
+ "title": "Webhook Settings",
+ "description": "Connect your workflow automation tool (n8n, Make, Zapier) to receive opportunities.",
+ "url": "Webhook URL",
+ "urlPlaceholder": "https://your-n8n-instance.com/webhook/...",
+ "secret": "Secret Key (optional)",
+ "secretPlaceholder": "Optional shared secret for verification",
+ "test": "Test Webhook",
+ "testing": "Testing...",
+ "testSuccess": "Webhook responded successfully!",
+ "testFailed": "Webhook test failed: {error}",
+ "save": "Save Webhook",
+ "saving": "Saving...",
+ "saved": "Webhook saved!",
+ "active": "Active",
+ "inactive": "Inactive",
+ "noWebhook": "No webhook configured",
+ "setupFirst": "Set up a webhook to send opportunities to your workflow tools."
+ }
+ },
+ "traffic": {
+ "title": "AI Traffic Analytics",
+ "description": "Track which AI bots are crawling your website.",
+ "totalCrawls": "Total Crawls",
+ "uniqueBots": "Unique Bots",
+ "referralTraffic": "AI Referral Traffic",
+ "topPages": "Top Crawled Pages"
+ },
+ "prompts": {
+ "title": "Prompt Volumes",
+ "description": "Discover query volumes and trends across AI platforms.",
+ "totalVolume": "Total Volume",
+ "trending": "Trending",
+ "presenceRate": "Presence Rate",
+ "gaps": "Content Gaps"
+ },
+ "competitors": {
+ "title": "Competitors",
+ "description": "Manage competitors and compare AI visibility head-to-head.",
+ "addCompetitor": "Add Competitor",
+ "name": "Name",
+ "namePlaceholder": "e.g. Acme Corp",
+ "domain": "Domain",
+ "domainPlaceholder": "e.g. acme.com",
+ "visibilityScore": "Visibility Score",
+ "mentions": "Mentions",
+ "citations": "Citations",
+ "trackedCompetitors": "Tracked Competitors",
+ "selectToCompare": "Select a competitor to see head-to-head comparison.",
+ "selected": "Selected",
+ "noData": "No data",
+ "emptyTitle": "No competitors yet",
+ "emptyDescription": "Add competitor domains to compare their AI visibility against yours across all AI platforms.",
+ "addDescription": "Enter the competitor's name and website domain to start tracking their AI visibility.",
+ "add": "Add",
+ "cancel": "Cancel",
+ "addSuccess": "Competitor added successfully.",
+ "addError": "Failed to add competitor.",
+ "deleteSuccess": "Competitor removed.",
+ "deleteError": "Failed to remove competitor.",
+ "delete": "Delete",
+ "confirmDeleteTitle": "Remove {name}?",
+ "confirmDeleteDescription": "This will stop tracking {name} and remove it from your competitor list. Historical comparison data for this competitor will remain in past results but cannot be linked back to a competitor record.",
+ "confirmDeleteAction": "Yes, remove competitor",
+ "loadError": "Failed to load competitors.",
+ "upgradeTitle": "Unlock Competitor Tracking",
+ "upgradeDescription": "Upgrade your plan to track competitor AI visibility and compare your brand's performance across AI platforms.",
+ "upgradeRequiredPlan": "Starter Plan Required",
+ "noBrandTitle": "No brand selected",
+ "noBrandDescription": "Select or create a brand to start tracking competitors.",
+ "h2h": {
+ "title": "{brand} vs {competitor}",
+ "yourAvg": "Your Avg. Score",
+ "theirAvg": "Their Avg. Score",
+ "overallDiff": "Score Difference",
+ "platformBreakdown": "Platform Breakdown",
+ "promptByPrompt": "Prompt-by-Prompt Comparison",
+ "promptByPromptDesc": "Click a prompt to expand and see per-platform breakdown.",
+ "comparison": "Comparison",
+ "prompt": "Prompt",
+ "diff": "Diff",
+ "platform": "Platform",
+ "gaps": "Gaps",
+ "strengths": "Strengths",
+ "you": "You",
+ "them": "Them",
+ "noGaps": "No gaps found — you're ahead on all prompts!",
+ "noStrengths": "No strengths found — competitor leads on all prompts.",
+ "noPromptData": "No prompt-level data available. Run a tracking check first.",
+ "noDataTitle": "No comparison data",
+ "noDataDescription": "Run a tracking check from the Insights page to generate comparison data for this competitor.",
+ "loadError": "Failed to load comparison data."
+ }
+ },
+ "citations": {
+ "title": "Citations",
+ "description": "Domains and URLs that AI platforms cite when mentioning you — and your competitors.",
+ "kpiTotalCitations": "Total Citations",
+ "kpiTotalCitationsSub": "Across {results} tracked results",
+ "kpiUniqueDomains": "Unique Domains",
+ "kpiUniqueDomainsSub": "{urls} unique URLs",
+ "kpiAvgPerResult": "Avg citations per result",
+ "kpiAvgPerResultSub": "Number of links per AI answer",
+ "sourcesTitle": "Top Sources",
+ "sourceTypesTitle": "Source Types",
+ "tabDomains": "Domains",
+ "tabUrls": "URLs",
+ "excludeOwnDomain": "Exclude own domain",
+ "competitorsOnly": "Competitors only",
+ "noBrandTitle": "No brand selected",
+ "noBrandDescription": "Select or create a brand to see the citations AI platforms use when answering about it."
+ },
+ "reports": {
+ "title": "Reports",
+ "description": "Export and share your AI visibility reports.",
+ "generateReport": "Generate Report",
+ "downloadPDF": "Download PDF",
+ "dateRange": "Date Range",
+ "platforms": "Platforms"
+ },
+ "settings": {
+ "title": "Settings",
+ "description": "Manage your project and account settings.",
+ "account": "Account",
+ "accountDescription": "Your profile and sign-in details.",
+ "theme": "Theme",
+ "themeDescription": "Choose light or dark mode for the dashboard.",
+ "font": "Font",
+ "fontDescription": "Choose a font family for the dashboard.",
+ "general": "General",
+ "project": "Project",
+ "apiKeys": "API Keys",
+ "team": "Team",
+ "billing": "Billing",
+ "danger": "Danger Zone",
+ "projectName": "Project Name",
+ "domain": "Domain",
+ "displayName": "Display Name",
+ "email": "Email",
+ "save": "Save changes",
+ "saved": "Changes saved!",
+ "signOut": "Sign out",
+ "billingDescription": "Manage your subscription and billing details.",
+ "currentPlan": "Current Plan",
+ "month": "mo",
+ "year": "yr",
+ "unlimited": "Unlimited",
+ "brands": "brands",
+ "prompts": "prompts tracked",
+ "platforms": "answer engines",
+ "teamMembers": "team members",
+ "renewsOn": "Renews on {date}",
+ "cancelsOn": "Subscription ends on {date}",
+ "changePlan": "Change Plan",
+ "upgradeTo": "Upgrade to {plan}",
+ "downgradeTo": "Downgrade to {plan}",
+ "changePlanConfirmTitle": "Change to {plan}?",
+ "changePlanConfirmDescription": "You will be switched to the {plan} plan at ${price}/mo. Proration will be applied to your next invoice.",
+ "changePlanConfirm": "Confirm Change",
+ "processing": "Processing...",
+ "cancelSubscription": "Cancel Subscription",
+ "cancelConfirmTitle": "Cancel your subscription?",
+ "cancelConfirmDescription": "Your subscription will remain active until the end of the current billing period. After that, you will lose access to paid features.",
+ "cancelConfirm": "Yes, Cancel",
+ "reactivate": "Reactivate Subscription",
+ "subscriptionReactivated": "Subscription reactivated.",
+ "invoices": "Invoice History",
+ "invoiceNumber": "Invoice",
+ "invoiceDate": "Date",
+ "invoiceAmount": "Amount",
+ "invoiceStatus": "Status",
+ "invoiceDownload": "Download",
+ "noInvoices": "No invoices yet.",
+ "noSubscription": "No active subscription found.",
+ "planChanged": "Plan updated successfully.",
+ "subscriptionCanceled": "Your subscription has been canceled.",
+ "needCustomPlan": "Need a custom plan?",
+ "customPlanDescription": "Get unlimited brands, custom integrations, dedicated support, and more.",
+ "contactUs": "Contact Us"
+ },
+ "brands": {
+ "title": "Brands",
+ "description": "Manage all the brands you track across AI platforms.",
+ "addBrand": "Add Brand",
+ "editBrand": "Edit Brand",
+ "deleteBrand": "Delete Brand",
+ "noBrands": "No brands yet",
+ "noBrandsDescription": "Add your first brand to start tracking AI visibility.",
+ "switchBrand": "Switch brand",
+ "selectBrand": "Select a brand",
+ "brand": "Brand",
+ "domains": "Domains",
+ "domain": "Domain",
+ "primaryDomain": "Primary Domain",
+ "addDomain": "Add Domain",
+ "removeDomain": "Remove",
+ "setPrimary": "Set as primary",
+ "industry": "Industry",
+ "description_field": "Description",
+ "logoUrl": "Logo URL",
+ "brandName": "Brand Name",
+ "brandNamePlaceholder": "e.g. Nike",
+ "slug": "Slug",
+ "domainPlaceholder": "e.g. example.com",
+ "countryPlaceholder": "e.g. US, TR (optional)",
+ "industryPlaceholder": "Select an industry",
+ "descriptionPlaceholder": "Short description of this brand...",
+ "domainCount": "{count, plural, one {# domain} other {# domains}}",
+ "wizard": {
+ "step1": "Brand & Domains",
+ "step2": "Prompts",
+ "step3": "Competitors",
+ "step1Description": "Set up your brand, add domains, and choose regions.",
+ "step2Description": "Add prompts to track — generate with AI or add manually.",
+ "step3Description": "Add your competitors to compare AI visibility.",
+ "atLeastOneDomain": "At least one domain is required.",
+ "creating": "Creating brand...",
+ "created": "Brand created successfully!",
+ "back": "Back",
+ "next": "Next",
+ "finish": "Finish Setup"
+ },
+ "settings": {
+ "title": "Brand Settings",
+ "generalTab": "General",
+ "domainsTab": "Domains",
+ "aiModelsTab": "AI Models",
+ "dangerTab": "Danger Zone",
+ "saveChanges": "Save Changes",
+ "saved": "Brand updated!",
+ "deleteWarning": "This action cannot be undone. All data for this brand (insights, content, competitors) will be permanently deleted.",
+ "confirmDelete": "Type the brand name to confirm:",
+ "deleteConfirmPlaceholder": "Brand name",
+ "deleteButton": "Delete Brand Permanently",
+ "aiModels": {
+ "description": "Configure which AI platforms to monitor and how often prompts should be checked for this brand.",
+ "platformsActive": "platforms active",
+ "monitoringActive": "Monitoring enabled",
+ "lastChecked": "Last checked:",
+ "hint": "Enabled platforms will be queried at the configured frequency to check your brand's prompt visibility.",
+ "loadError": "Failed to load AI platform settings.",
+ "saveError": "Failed to save AI platform settings."
+ }
+ },
+ "card": {
+ "visibility": "Visibility Score",
+ "mentions": "Mentions",
+ "citations": "Citations",
+ "domainsTracked": "Domains Tracked",
+ "manage": "Manage",
+ "viewInsights": "View Insights"
+ }
+ },
+ "plans": {
+ "free": "Free",
+ "starter": "Starter",
+ "pro": "Pro",
+ "enterprise": "Enterprise",
+ "currentPlan": "Current Plan",
+ "upgrade": "Upgrade",
+ "upgradeTitle": "Upgrade your plan",
+ "upgradeDescription": "Unlock more features and higher limits by upgrading your plan.",
+ "featureLocked": "This feature requires {plan} plan or higher.",
+ "limitReached": "You've reached the {limit} limit on the {plan} plan.",
+ "limits": {
+ "maxBrands": "brands",
+ "maxPrompts": "prompts tracked",
+ "maxPlatforms": "AI platforms",
+ "maxTeamMembers": "team members",
+ "maxDomainsPerBrand": "domains per brand"
+ },
+ "features": {
+ "basic_insights": "Basic Insights",
+ "advanced_analytics": "Advanced Analytics",
+ "prompt_suggestions": "Prompt Suggestions",
+ "daily_monitoring": "Daily Monitoring",
+ "competitor_tracking": "Competitor Tracking",
+ "content_optimization": "Content Optimization",
+ "custom_reports": "Custom Reports",
+ "api_access": "API Access",
+ "white_label": "White Label",
+ "sso_saml": "SSO / SAML"
+ }
+ },
+ "marketing": {
+ "hero": {
+ "badge": "Open Source Ansops Platform",
+ "title": "Your Brand in Every AI Answer",
+ "subtitle": "Monitor, analyze, and optimize your brand's visibility across ChatGPT, Perplexity, Gemini, Claude, and more.",
+ "cta": "Get Started for Free",
+ "secondaryCta": "View on GitHub"
+ },
+ "features": {
+ "title": "Everything you need for AI visibility",
+ "insights": {
+ "title": "Answer Engine Insights",
+ "description": "Track your brand mentions and citations across all major AI platforms in real time."
+ },
+ "content": {
+ "title": "Content Optimization",
+ "description": "Discover content gaps and get AI-powered briefs to improve your visibility."
+ },
+ "traffic": {
+ "title": "AI Traffic Analytics",
+ "description": "See which AI bots are crawling your site and how they convert to human visitors."
+ },
+ "prompts": {
+ "title": "Prompt Volumes",
+ "description": "Understand query volume trends across platforms and identify opportunities."
+ }
+ },
+ "pricing": {
+ "title": "Simple, transparent pricing",
+ "subtitle": "Start for free, scale as you grow. Self-host with all features unlocked, or let us handle the infrastructure.",
+ "compareTitle": "Compare all plans",
+ "ossTitle": "100% Open Source",
+ "ossDescription": "Self-host the entire platform for free with all features unlocked. No artificial limits, no license keys. Use our cloud when you want us to handle the infrastructure."
+ }
+ }
+}
diff --git a/web/next.config.ts b/web/next.config.ts
new file mode 100644
index 000000000..904064222
--- /dev/null
+++ b/web/next.config.ts
@@ -0,0 +1,10 @@
+import type { NextConfig } from 'next';
+import createNextIntlPlugin from 'next-intl/plugin';
+
+const withNextIntl = createNextIntlPlugin('./src/i18n/request.ts');
+
+const nextConfig: NextConfig = {
+ /* config options here */
+};
+
+export default withNextIntl(nextConfig);
diff --git a/web/package-lock.json b/web/package-lock.json
new file mode 100644
index 000000000..3b012ffc3
--- /dev/null
+++ b/web/package-lock.json
@@ -0,0 +1,11322 @@
+{
+ "name": "@aeohub/ansvisor-web",
+ "version": "0.1.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "@aeohub/ansvisor-web",
+ "version": "0.1.0",
+ "license": "MIT",
+ "dependencies": {
+ "@base-ui/react": "^1.2.0",
+ "@radix-ui/react-checkbox": "^1.3.3",
+ "@stripe/stripe-js": "^9.1.0",
+ "@supabase/ssr": "^0.9.0",
+ "@supabase/supabase-js": "^2.99.0",
+ "class-variance-authority": "^0.7.1",
+ "clsx": "^2.1.1",
+ "framer-motion": "^12.35.2",
+ "lucide-react": "^0.577.0",
+ "marked": "^18.0.0",
+ "next": "16.1.6",
+ "next-intl": "^4.8.3",
+ "next-themes": "^0.4.6",
+ "react": "19.2.3",
+ "react-dom": "19.2.3",
+ "react-is": "^19.2.4",
+ "react-markdown": "^10.1.0",
+ "recharts": "^3.8.0",
+ "remark-breaks": "^4.0.0",
+ "remark-gfm": "^4.0.1",
+ "shadcn": "^4.0.2",
+ "shiki": "^4.0.2",
+ "sonner": "^2.0.7",
+ "stripe": "^22.0.0",
+ "tailwind-merge": "^3.5.0",
+ "tw-animate-css": "^1.4.0",
+ "zustand": "^5.0.11"
+ },
+ "devDependencies": {
+ "@tailwindcss/postcss": "^4",
+ "@tailwindcss/typography": "^0.5.19",
+ "@types/node": "^20",
+ "@types/react": "^19",
+ "@types/react-dom": "^19",
+ "eslint": "^9",
+ "eslint-config-next": "16.1.6",
+ "tailwindcss": "^4",
+ "typescript": "^5"
+ }
+ },
+ "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/@antfu/ni": {
+ "version": "25.0.0",
+ "resolved": "https://registry.npmjs.org/@antfu/ni/-/ni-25.0.0.tgz",
+ "integrity": "sha512-9q/yCljni37pkMr4sPrI3G4jqdIk074+iukc5aFJl7kmDCCsiJrbZ6zKxnES1Gwg+i9RcDZwvktl23puGslmvA==",
+ "license": "MIT",
+ "dependencies": {
+ "ansis": "^4.0.0",
+ "fzf": "^0.5.2",
+ "package-manager-detector": "^1.3.0",
+ "tinyexec": "^1.0.1"
+ },
+ "bin": {
+ "na": "bin/na.mjs",
+ "nci": "bin/nci.mjs",
+ "ni": "bin/ni.mjs",
+ "nlx": "bin/nlx.mjs",
+ "nr": "bin/nr.mjs",
+ "nun": "bin/nun.mjs",
+ "nup": "bin/nup.mjs"
+ }
+ },
+ "node_modules/@babel/code-frame": {
+ "version": "7.29.0",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz",
+ "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.28.5",
+ "js-tokens": "^4.0.0",
+ "picocolors": "^1.1.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/compat-data": {
+ "version": "7.29.0",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz",
+ "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/core": {
+ "version": "7.29.0",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz",
+ "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.29.0",
+ "@babel/generator": "^7.29.0",
+ "@babel/helper-compilation-targets": "^7.28.6",
+ "@babel/helper-module-transforms": "^7.28.6",
+ "@babel/helpers": "^7.28.6",
+ "@babel/parser": "^7.29.0",
+ "@babel/template": "^7.28.6",
+ "@babel/traverse": "^7.29.0",
+ "@babel/types": "^7.29.0",
+ "@jridgewell/remapping": "^2.3.5",
+ "convert-source-map": "^2.0.0",
+ "debug": "^4.1.0",
+ "gensync": "^1.0.0-beta.2",
+ "json5": "^2.2.3",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/babel"
+ }
+ },
+ "node_modules/@babel/generator": {
+ "version": "7.29.1",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz",
+ "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/parser": "^7.29.0",
+ "@babel/types": "^7.29.0",
+ "@jridgewell/gen-mapping": "^0.3.12",
+ "@jridgewell/trace-mapping": "^0.3.28",
+ "jsesc": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-annotate-as-pure": {
+ "version": "7.27.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz",
+ "integrity": "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.27.3"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-compilation-targets": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz",
+ "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/compat-data": "^7.28.6",
+ "@babel/helper-validator-option": "^7.27.1",
+ "browserslist": "^4.24.0",
+ "lru-cache": "^5.1.1",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-create-class-features-plugin": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.6.tgz",
+ "integrity": "sha512-dTOdvsjnG3xNT9Y0AUg1wAl38y+4Rl4sf9caSQZOXdNqVn+H+HbbJ4IyyHaIqNR6SW9oJpA/RuRjsjCw2IdIow==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.27.3",
+ "@babel/helper-member-expression-to-functions": "^7.28.5",
+ "@babel/helper-optimise-call-expression": "^7.27.1",
+ "@babel/helper-replace-supers": "^7.28.6",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1",
+ "@babel/traverse": "^7.28.6",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-globals": {
+ "version": "7.28.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz",
+ "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-member-expression-to-functions": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.28.5.tgz",
+ "integrity": "sha512-cwM7SBRZcPCLgl8a7cY0soT1SptSzAlMH39vwiRpOQkJlh53r5hdHwLSCZpQdVLT39sZt+CRpNwYG4Y2v77atg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/traverse": "^7.28.5",
+ "@babel/types": "^7.28.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-module-imports": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz",
+ "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/traverse": "^7.28.6",
+ "@babel/types": "^7.28.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-module-transforms": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz",
+ "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-module-imports": "^7.28.6",
+ "@babel/helper-validator-identifier": "^7.28.5",
+ "@babel/traverse": "^7.28.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-optimise-call-expression": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.27.1.tgz",
+ "integrity": "sha512-URMGH08NzYFhubNSGJrpUEphGKQwMQYBySzat5cAByY1/YgIRkULnIy3tAMeszlL/so2HbeilYloUmSpd7GdVw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-plugin-utils": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz",
+ "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-replace-supers": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.28.6.tgz",
+ "integrity": "sha512-mq8e+laIk94/yFec3DxSjCRD2Z0TAjhVbEJY3UQrlwVo15Lmt7C2wAUbK4bjnTs4APkwsYLTahXRraQXhb1WCg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-member-expression-to-functions": "^7.28.5",
+ "@babel/helper-optimise-call-expression": "^7.27.1",
+ "@babel/traverse": "^7.28.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-skip-transparent-expression-wrappers": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.27.1.tgz",
+ "integrity": "sha512-Tub4ZKEXqbPjXgWLl2+3JpQAYBJ8+ikpQ2Ocj/q/r0LwE3UhENh7EUabyHjz2kCEsrRY83ew2DQdHluuiDQFzg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/traverse": "^7.27.1",
+ "@babel/types": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-string-parser": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
+ "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-identifier": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz",
+ "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-option": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz",
+ "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helpers": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.6.tgz",
+ "integrity": "sha512-xOBvwq86HHdB7WUDTfKfT/Vuxh7gElQ+Sfti2Cy6yIWNW05P8iUslOVcZ4/sKbE+/jQaukQAdz/gf3724kYdqw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/template": "^7.28.6",
+ "@babel/types": "^7.28.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/parser": {
+ "version": "7.29.0",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.0.tgz",
+ "integrity": "sha512-IyDgFV5GeDUVX4YdF/3CPULtVGSXXMLh1xVIgdCgxApktqnQV0r7/8Nqthg+8YLGaAtdyIlo2qIdZrbCv4+7ww==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.29.0"
+ },
+ "bin": {
+ "parser": "bin/babel-parser.js"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-jsx": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.28.6.tgz",
+ "integrity": "sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.28.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-typescript": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.28.6.tgz",
+ "integrity": "sha512-+nDNmQye7nlnuuHDboPbGm00Vqg3oO8niRRL27/4LYHUsHYh0zJ1xWOz0uRwNFmM1Avzk8wZbc6rdiYhomzv/A==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.28.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-modules-commonjs": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.28.6.tgz",
+ "integrity": "sha512-jppVbf8IV9iWWwWTQIxJMAJCWBuuKx71475wHwYytrRGQ2CWiDvYlADQno3tcYpS/T2UUWFQp3nVtYfK/YBQrA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-module-transforms": "^7.28.6",
+ "@babel/helper-plugin-utils": "^7.28.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-typescript": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.28.6.tgz",
+ "integrity": "sha512-0YWL2RFxOqEm9Efk5PvreamxPME8OyY0wM5wh5lHjF+VtVhdneCWGzZeSqzOfiobVqQaNCd2z0tQvnI9DaPWPw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.27.3",
+ "@babel/helper-create-class-features-plugin": "^7.28.6",
+ "@babel/helper-plugin-utils": "^7.28.6",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1",
+ "@babel/plugin-syntax-typescript": "^7.28.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/preset-typescript": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.28.5.tgz",
+ "integrity": "sha512-+bQy5WOI2V6LJZpPVxY+yp66XdZ2yifu0Mc1aP5CQKgjn4QM5IN2i5fAZ4xKop47pr8rpVhiAeu+nDQa12C8+g==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-validator-option": "^7.27.1",
+ "@babel/plugin-syntax-jsx": "^7.27.1",
+ "@babel/plugin-transform-modules-commonjs": "^7.27.1",
+ "@babel/plugin-transform-typescript": "^7.28.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/runtime": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.6.tgz",
+ "integrity": "sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/template": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz",
+ "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.28.6",
+ "@babel/parser": "^7.28.6",
+ "@babel/types": "^7.28.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/traverse": {
+ "version": "7.29.0",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz",
+ "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.29.0",
+ "@babel/generator": "^7.29.0",
+ "@babel/helper-globals": "^7.28.0",
+ "@babel/parser": "^7.29.0",
+ "@babel/template": "^7.28.6",
+ "@babel/types": "^7.29.0",
+ "debug": "^4.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/types": {
+ "version": "7.29.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz",
+ "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-string-parser": "^7.27.1",
+ "@babel/helper-validator-identifier": "^7.28.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@base-ui/react": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@base-ui/react/-/react-1.2.0.tgz",
+ "integrity": "sha512-O6aEQHcm+QyGTFY28xuwRD3SEJGZOBDpyjN2WvpfWYFVhg+3zfXPysAILqtM0C1kWC82MccOE/v1j+GHXE4qIw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.28.6",
+ "@base-ui/utils": "0.2.5",
+ "@floating-ui/react-dom": "^2.1.6",
+ "@floating-ui/utils": "^0.2.10",
+ "tabbable": "^6.4.0",
+ "use-sync-external-store": "^1.6.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/mui-org"
+ },
+ "peerDependencies": {
+ "@types/react": "^17 || ^18 || ^19",
+ "react": "^17 || ^18 || ^19",
+ "react-dom": "^17 || ^18 || ^19"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@base-ui/utils": {
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/@base-ui/utils/-/utils-0.2.5.tgz",
+ "integrity": "sha512-oYC7w0gp76RI5MxprlGLV0wze0SErZaRl3AAkeP3OnNB/UBMb6RqNf6ZSIlxOc9Qp68Ab3C2VOcJQyRs7Xc7Vw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.28.6",
+ "@floating-ui/utils": "^0.2.10",
+ "reselect": "^5.1.1",
+ "use-sync-external-store": "^1.6.0"
+ },
+ "peerDependencies": {
+ "@types/react": "^17 || ^18 || ^19",
+ "react": "^17 || ^18 || ^19",
+ "react-dom": "^17 || ^18 || ^19"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@dotenvx/dotenvx": {
+ "version": "1.54.1",
+ "resolved": "https://registry.npmjs.org/@dotenvx/dotenvx/-/dotenvx-1.54.1.tgz",
+ "integrity": "sha512-41gU3q7v05GM92QPuPUf4CmUw+mmF8p4wLUh6MCRlxpCkJ9ByLcY9jUf6MwrMNmiKyG/rIckNxj9SCfmNCmCqw==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "commander": "^11.1.0",
+ "dotenv": "^17.2.1",
+ "eciesjs": "^0.4.10",
+ "execa": "^5.1.1",
+ "fdir": "^6.2.0",
+ "ignore": "^5.3.0",
+ "object-treeify": "1.1.33",
+ "picomatch": "^4.0.2",
+ "which": "^4.0.0"
+ },
+ "bin": {
+ "dotenvx": "src/cli/dotenvx.js"
+ },
+ "funding": {
+ "url": "https://dotenvx.com"
+ }
+ },
+ "node_modules/@dotenvx/dotenvx/node_modules/commander": {
+ "version": "11.1.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz",
+ "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/@dotenvx/dotenvx/node_modules/execa": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
+ "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
+ "license": "MIT",
+ "dependencies": {
+ "cross-spawn": "^7.0.3",
+ "get-stream": "^6.0.0",
+ "human-signals": "^2.1.0",
+ "is-stream": "^2.0.0",
+ "merge-stream": "^2.0.0",
+ "npm-run-path": "^4.0.1",
+ "onetime": "^5.1.2",
+ "signal-exit": "^3.0.3",
+ "strip-final-newline": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/execa?sponsor=1"
+ }
+ },
+ "node_modules/@dotenvx/dotenvx/node_modules/get-stream": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
+ "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@dotenvx/dotenvx/node_modules/human-signals": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
+ "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=10.17.0"
+ }
+ },
+ "node_modules/@dotenvx/dotenvx/node_modules/is-stream": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
+ "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@dotenvx/dotenvx/node_modules/isexe": {
+ "version": "3.1.5",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.5.tgz",
+ "integrity": "sha512-6B3tLtFqtQS4ekarvLVMZ+X+VlvQekbe4taUkf/rhVO3d/h0M2rfARm/pXLcPEsjjMsFgrFgSrhQIxcSVrBz8w==",
+ "license": "BlueOak-1.0.0",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@dotenvx/dotenvx/node_modules/npm-run-path": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
+ "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",
+ "license": "MIT",
+ "dependencies": {
+ "path-key": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@dotenvx/dotenvx/node_modules/signal-exit": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
+ "license": "ISC"
+ },
+ "node_modules/@dotenvx/dotenvx/node_modules/strip-final-newline": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
+ "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/@dotenvx/dotenvx/node_modules/which": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz",
+ "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==",
+ "license": "ISC",
+ "dependencies": {
+ "isexe": "^3.1.1"
+ },
+ "bin": {
+ "node-which": "bin/which.js"
+ },
+ "engines": {
+ "node": "^16.13.0 || >=18.0.0"
+ }
+ },
+ "node_modules/@ecies/ciphers": {
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/@ecies/ciphers/-/ciphers-0.2.5.tgz",
+ "integrity": "sha512-GalEZH4JgOMHYYcYmVqnFirFsjZHeoGMDt9IxEnM9F7GRUUyUksJ7Ou53L83WHJq3RWKD3AcBpo0iQh0oMpf8A==",
+ "license": "MIT",
+ "engines": {
+ "bun": ">=1",
+ "deno": ">=2",
+ "node": ">=16"
+ },
+ "peerDependencies": {
+ "@noble/ciphers": "^1.0.0"
+ }
+ },
+ "node_modules/@eslint-community/eslint-utils": {
+ "version": "4.9.1",
+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz",
+ "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "eslint-visitor-keys": "^3.4.3"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
+ }
+ },
+ "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
+ "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/@eslint-community/regexpp": {
+ "version": "4.12.2",
+ "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz",
+ "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
+ }
+ },
+ "node_modules/@eslint/config-array": {
+ "version": "0.21.2",
+ "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.2.tgz",
+ "integrity": "sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@eslint/object-schema": "^2.1.7",
+ "debug": "^4.3.1",
+ "minimatch": "^3.1.5"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ }
+ },
+ "node_modules/@eslint/config-helpers": {
+ "version": "0.4.2",
+ "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz",
+ "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@eslint/core": "^0.17.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ }
+ },
+ "node_modules/@eslint/core": {
+ "version": "0.17.0",
+ "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz",
+ "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@types/json-schema": "^7.0.15"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ }
+ },
+ "node_modules/@eslint/eslintrc": {
+ "version": "3.3.5",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.5.tgz",
+ "integrity": "sha512-4IlJx0X0qftVsN5E+/vGujTRIFtwuLbNsVUe7TO6zYPDR1O6nFwvwhIKEKSrl6dZchmYBITazxKoUYOjdtjlRg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ajv": "^6.14.0",
+ "debug": "^4.3.2",
+ "espree": "^10.0.1",
+ "globals": "^14.0.0",
+ "ignore": "^5.2.0",
+ "import-fresh": "^3.2.1",
+ "js-yaml": "^4.1.1",
+ "minimatch": "^3.1.5",
+ "strip-json-comments": "^3.1.1"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/@eslint/eslintrc/node_modules/globals": {
+ "version": "14.0.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz",
+ "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@eslint/js": {
+ "version": "9.39.4",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.4.tgz",
+ "integrity": "sha512-nE7DEIchvtiFTwBw4Lfbu59PG+kCofhjsKaCWzxTpt4lfRjRMqG6uMBzKXuEcyXhOHoUp9riAm7/aWYGhXZ9cw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://eslint.org/donate"
+ }
+ },
+ "node_modules/@eslint/object-schema": {
+ "version": "2.1.7",
+ "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz",
+ "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ }
+ },
+ "node_modules/@eslint/plugin-kit": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz",
+ "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@eslint/core": "^0.17.0",
+ "levn": "^0.4.1"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ }
+ },
+ "node_modules/@floating-ui/core": {
+ "version": "1.7.5",
+ "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.5.tgz",
+ "integrity": "sha512-1Ih4WTWyw0+lKyFMcBHGbb5U5FtuHJuujoyyr5zTaWS5EYMeT6Jb2AuDeftsCsEuchO+mM2ij5+q9crhydzLhQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@floating-ui/utils": "^0.2.11"
+ }
+ },
+ "node_modules/@floating-ui/dom": {
+ "version": "1.7.6",
+ "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.6.tgz",
+ "integrity": "sha512-9gZSAI5XM36880PPMm//9dfiEngYoC6Am2izES1FF406YFsjvyBMmeJ2g4SAju3xWwtuynNRFL2s9hgxpLI5SQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@floating-ui/core": "^1.7.5",
+ "@floating-ui/utils": "^0.2.11"
+ }
+ },
+ "node_modules/@floating-ui/react-dom": {
+ "version": "2.1.8",
+ "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.8.tgz",
+ "integrity": "sha512-cC52bHwM/n/CxS87FH0yWdngEZrjdtLW/qVruo68qg+prK7ZQ4YGdut2GyDVpoGeAYe/h899rVeOVm6Oi40k2A==",
+ "license": "MIT",
+ "dependencies": {
+ "@floating-ui/dom": "^1.7.6"
+ },
+ "peerDependencies": {
+ "react": ">=16.8.0",
+ "react-dom": ">=16.8.0"
+ }
+ },
+ "node_modules/@floating-ui/utils": {
+ "version": "0.2.11",
+ "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.11.tgz",
+ "integrity": "sha512-RiB/yIh78pcIxl6lLMG0CgBXAZ2Y0eVHqMPYugu+9U0AeT6YBeiJpf7lbdJNIugFP5SIjwNRgo4DhR1Qxi26Gg==",
+ "license": "MIT"
+ },
+ "node_modules/@formatjs/ecma402-abstract": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-3.1.1.tgz",
+ "integrity": "sha512-jhZbTwda+2tcNrs4kKvxrPLPjx8QsBCLCUgrrJ/S+G9YrGHWLhAyFMMBHJBnBoOwuLHd7L14FgYudviKaxkO2Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@formatjs/fast-memoize": "3.1.0",
+ "@formatjs/intl-localematcher": "0.8.1",
+ "decimal.js": "^10.6.0",
+ "tslib": "^2.8.1"
+ }
+ },
+ "node_modules/@formatjs/fast-memoize": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@formatjs/fast-memoize/-/fast-memoize-3.1.0.tgz",
+ "integrity": "sha512-b5mvSWCI+XVKiz5WhnBCY3RJ4ZwfjAidU0yVlKa3d3MSgKmH1hC3tBGEAtYyN5mqL7N0G5x0BOUYyO8CEupWgg==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "^2.8.1"
+ }
+ },
+ "node_modules/@formatjs/icu-messageformat-parser": {
+ "version": "3.5.1",
+ "resolved": "https://registry.npmjs.org/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-3.5.1.tgz",
+ "integrity": "sha512-sSDmSvmmoVQ92XqWb499KrIhv/vLisJU8ITFrx7T7NZHUmMY7EL9xgRowAosaljhqnj/5iufG24QrdzB6X3ItA==",
+ "license": "MIT",
+ "dependencies": {
+ "@formatjs/ecma402-abstract": "3.1.1",
+ "@formatjs/icu-skeleton-parser": "2.1.1",
+ "tslib": "^2.8.1"
+ }
+ },
+ "node_modules/@formatjs/icu-skeleton-parser": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-2.1.1.tgz",
+ "integrity": "sha512-PSFABlcNefjI6yyk8f7nyX1DC7NHmq6WaCHZLySEXBrXuLOB2f935YsnzuPjlz+ibhb9yWTdPeVX1OVcj24w2Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@formatjs/ecma402-abstract": "3.1.1",
+ "tslib": "^2.8.1"
+ }
+ },
+ "node_modules/@formatjs/intl-localematcher": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.8.1.tgz",
+ "integrity": "sha512-xwEuwQFdtSq1UKtQnyTZWC+eHdv7Uygoa+H2k/9uzBVQjDyp9r20LNDNKedWXll7FssT3GRHvqsdJGYSUWqYFA==",
+ "license": "MIT",
+ "dependencies": {
+ "@formatjs/fast-memoize": "3.1.0",
+ "tslib": "^2.8.1"
+ }
+ },
+ "node_modules/@hono/node-server": {
+ "version": "1.19.11",
+ "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.11.tgz",
+ "integrity": "sha512-dr8/3zEaB+p0D2n/IUrlPF1HZm586qgJNXK1a9fhg/PzdtkK7Ksd5l312tJX2yBuALqDYBlG20QEbayqPyxn+g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.14.1"
+ },
+ "peerDependencies": {
+ "hono": "^4"
+ }
+ },
+ "node_modules/@humanfs/core": {
+ "version": "0.19.1",
+ "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz",
+ "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=18.18.0"
+ }
+ },
+ "node_modules/@humanfs/node": {
+ "version": "0.16.7",
+ "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz",
+ "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@humanfs/core": "^0.19.1",
+ "@humanwhocodes/retry": "^0.4.0"
+ },
+ "engines": {
+ "node": ">=18.18.0"
+ }
+ },
+ "node_modules/@humanwhocodes/module-importer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
+ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=12.22"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/nzakas"
+ }
+ },
+ "node_modules/@humanwhocodes/retry": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz",
+ "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=18.18"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/nzakas"
+ }
+ },
+ "node_modules/@img/colour": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz",
+ "integrity": "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==",
+ "license": "MIT",
+ "optional": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@img/sharp-darwin-arm64": {
+ "version": "0.34.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.5.tgz",
+ "integrity": "sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==",
+ "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.2.4"
+ }
+ },
+ "node_modules/@img/sharp-libvips-darwin-arm64": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.4.tgz",
+ "integrity": "sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@inquirer/ansi": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-1.0.2.tgz",
+ "integrity": "sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@inquirer/confirm": {
+ "version": "5.1.21",
+ "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.21.tgz",
+ "integrity": "sha512-KR8edRkIsUayMXV+o3Gv+q4jlhENF9nMYUZs9PA2HzrXeHI8M5uDag70U7RJn9yyiMZSbtF5/UexBtAVtZGSbQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@inquirer/core": "^10.3.2",
+ "@inquirer/type": "^3.0.10"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "@types/node": ">=18"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@inquirer/core": {
+ "version": "10.3.2",
+ "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.3.2.tgz",
+ "integrity": "sha512-43RTuEbfP8MbKzedNqBrlhhNKVwoK//vUFNW3Q3vZ88BLcrs4kYpGg+B2mm5p2K/HfygoCxuKwJJiv8PbGmE0A==",
+ "license": "MIT",
+ "dependencies": {
+ "@inquirer/ansi": "^1.0.2",
+ "@inquirer/figures": "^1.0.15",
+ "@inquirer/type": "^3.0.10",
+ "cli-width": "^4.1.0",
+ "mute-stream": "^2.0.0",
+ "signal-exit": "^4.1.0",
+ "wrap-ansi": "^6.2.0",
+ "yoctocolors-cjs": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "@types/node": ">=18"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@inquirer/figures": {
+ "version": "1.0.15",
+ "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.15.tgz",
+ "integrity": "sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@inquirer/type": {
+ "version": "3.0.10",
+ "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.10.tgz",
+ "integrity": "sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "@types/node": ">=18"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ }
+ }
+ },
+ "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==",
+ "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==",
+ "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==",
+ "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==",
+ "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==",
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.1.0",
+ "@jridgewell/sourcemap-codec": "^1.4.14"
+ }
+ },
+ "node_modules/@modelcontextprotocol/sdk": {
+ "version": "1.27.1",
+ "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.27.1.tgz",
+ "integrity": "sha512-sr6GbP+4edBwFndLbM60gf07z0FQ79gaExpnsjMGePXqFcSSb7t6iscpjk9DhFhwd+mTEQrzNafGP8/iGGFYaA==",
+ "license": "MIT",
+ "dependencies": {
+ "@hono/node-server": "^1.19.9",
+ "ajv": "^8.17.1",
+ "ajv-formats": "^3.0.1",
+ "content-type": "^1.0.5",
+ "cors": "^2.8.5",
+ "cross-spawn": "^7.0.5",
+ "eventsource": "^3.0.2",
+ "eventsource-parser": "^3.0.0",
+ "express": "^5.2.1",
+ "express-rate-limit": "^8.2.1",
+ "hono": "^4.11.4",
+ "jose": "^6.1.3",
+ "json-schema-typed": "^8.0.2",
+ "pkce-challenge": "^5.0.0",
+ "raw-body": "^3.0.0",
+ "zod": "^3.25 || ^4.0",
+ "zod-to-json-schema": "^3.25.1"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "@cfworker/json-schema": "^4.1.1",
+ "zod": "^3.25 || ^4.0"
+ },
+ "peerDependenciesMeta": {
+ "@cfworker/json-schema": {
+ "optional": true
+ },
+ "zod": {
+ "optional": false
+ }
+ }
+ },
+ "node_modules/@modelcontextprotocol/sdk/node_modules/ajv": {
+ "version": "8.18.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz",
+ "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==",
+ "license": "MIT",
+ "dependencies": {
+ "fast-deep-equal": "^3.1.3",
+ "fast-uri": "^3.0.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/@modelcontextprotocol/sdk/node_modules/ajv-formats": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz",
+ "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ajv": "^8.0.0"
+ },
+ "peerDependencies": {
+ "ajv": "^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "ajv": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@modelcontextprotocol/sdk/node_modules/json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "license": "MIT"
+ },
+ "node_modules/@modelcontextprotocol/sdk/node_modules/zod": {
+ "version": "4.3.6",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz",
+ "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/colinhacks"
+ }
+ },
+ "node_modules/@mswjs/interceptors": {
+ "version": "0.41.3",
+ "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.41.3.tgz",
+ "integrity": "sha512-cXu86tF4VQVfwz8W1SPbhoRyHJkti6mjH/XJIxp40jhO4j2k1m4KYrEykxqWPkFF3vrK4rgQppBh//AwyGSXPA==",
+ "license": "MIT",
+ "dependencies": {
+ "@open-draft/deferred-promise": "^2.2.0",
+ "@open-draft/logger": "^0.3.0",
+ "@open-draft/until": "^2.0.0",
+ "is-node-process": "^1.2.0",
+ "outvariant": "^1.4.3",
+ "strict-event-emitter": "^0.5.1"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@next/env": {
+ "version": "16.1.6",
+ "resolved": "https://registry.npmjs.org/@next/env/-/env-16.1.6.tgz",
+ "integrity": "sha512-N1ySLuZjnAtN3kFnwhAwPvZah8RJxKasD7x1f8shFqhncnWZn4JMfg37diLNuoHsLAlrDfM3g4mawVdtAG8XLQ==",
+ "license": "MIT"
+ },
+ "node_modules/@next/eslint-plugin-next": {
+ "version": "16.1.6",
+ "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-16.1.6.tgz",
+ "integrity": "sha512-/Qq3PTagA6+nYVfryAtQ7/9FEr/6YVyvOtl6rZnGsbReGLf0jZU6gkpr1FuChAQpvV46a78p4cmHOVP8mbfSMQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fast-glob": "3.3.1"
+ }
+ },
+ "node_modules/@next/eslint-plugin-next/node_modules/fast-glob": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz",
+ "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@nodelib/fs.stat": "^2.0.2",
+ "@nodelib/fs.walk": "^1.2.3",
+ "glob-parent": "^5.1.2",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.4"
+ },
+ "engines": {
+ "node": ">=8.6.0"
+ }
+ },
+ "node_modules/@next/swc-darwin-arm64": {
+ "version": "16.1.6",
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.1.6.tgz",
+ "integrity": "sha512-wTzYulosJr/6nFnqGW7FrG3jfUUlEf8UjGA0/pyypJl42ExdVgC6xJgcXQ+V8QFn6niSG2Pb8+MIG1mZr2vczw==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@next/swc-darwin-x64": {
+ "version": "16.1.6",
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-16.1.6.tgz",
+ "integrity": "sha512-BLFPYPDO+MNJsiDWbeVzqvYd4NyuRrEYVB5k2N3JfWncuHAy2IVwMAOlVQDFjj+krkWzhY2apvmekMkfQR0CUQ==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@next/swc-linux-arm64-gnu": {
+ "version": "16.1.6",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.1.6.tgz",
+ "integrity": "sha512-OJYkCd5pj/QloBvoEcJ2XiMnlJkRv9idWA/j0ugSuA34gMT6f5b7vOiCQHVRpvStoZUknhl6/UxOXL4OwtdaBw==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@next/swc-linux-arm64-musl": {
+ "version": "16.1.6",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.1.6.tgz",
+ "integrity": "sha512-S4J2v+8tT3NIO9u2q+S0G5KdvNDjXfAv06OhfOzNDaBn5rw84DGXWndOEB7d5/x852A20sW1M56vhC/tRVbccQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@next/swc-linux-x64-gnu": {
+ "version": "16.1.6",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-16.1.6.tgz",
+ "integrity": "sha512-2eEBDkFlMMNQnkTyPBhQOAyn2qMxyG2eE7GPH2WIDGEpEILcBPI/jdSv4t6xupSP+ot/jkfrCShLAa7+ZUPcJQ==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@next/swc-linux-x64-musl": {
+ "version": "16.1.6",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.1.6.tgz",
+ "integrity": "sha512-oicJwRlyOoZXVlxmIMaTq7f8pN9QNbdes0q2FXfRsPhfCi8n8JmOZJm5oo1pwDaFbnnD421rVU409M3evFbIqg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@next/swc-win32-arm64-msvc": {
+ "version": "16.1.6",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.1.6.tgz",
+ "integrity": "sha512-gQmm8izDTPgs+DCWH22kcDmuUp7NyiJgEl18bcr8irXA5N2m2O+JQIr6f3ct42GOs9c0h8QF3L5SzIxcYAAXXw==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@next/swc-win32-x64-msvc": {
+ "version": "16.1.6",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.1.6.tgz",
+ "integrity": "sha512-NRfO39AIrzBnixKbjuo2YiYhB6o9d8v/ymU9m/Xk8cyVk+k7XylniXkHwjs4s70wedVffc6bQNbufk5v0xEm0A==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@noble/ciphers": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-1.3.0.tgz",
+ "integrity": "sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw==",
+ "license": "MIT",
+ "engines": {
+ "node": "^14.21.3 || >=16"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@noble/curves": {
+ "version": "1.9.7",
+ "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz",
+ "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==",
+ "license": "MIT",
+ "dependencies": {
+ "@noble/hashes": "1.8.0"
+ },
+ "engines": {
+ "node": "^14.21.3 || >=16"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@noble/hashes": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz",
+ "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==",
+ "license": "MIT",
+ "engines": {
+ "node": "^14.21.3 || >=16"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@nodelib/fs.scandir": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
+ "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
+ "license": "MIT",
+ "dependencies": {
+ "@nodelib/fs.stat": "2.0.5",
+ "run-parallel": "^1.1.9"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.stat": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
+ "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.walk": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
+ "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
+ "license": "MIT",
+ "dependencies": {
+ "@nodelib/fs.scandir": "2.1.5",
+ "fastq": "^1.6.0"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nolyfill/is-core-module": {
+ "version": "1.0.39",
+ "resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz",
+ "integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.4.0"
+ }
+ },
+ "node_modules/@open-draft/deferred-promise": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz",
+ "integrity": "sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==",
+ "license": "MIT"
+ },
+ "node_modules/@open-draft/logger": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/@open-draft/logger/-/logger-0.3.0.tgz",
+ "integrity": "sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==",
+ "license": "MIT",
+ "dependencies": {
+ "is-node-process": "^1.2.0",
+ "outvariant": "^1.4.0"
+ }
+ },
+ "node_modules/@open-draft/until": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/@open-draft/until/-/until-2.1.0.tgz",
+ "integrity": "sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==",
+ "license": "MIT"
+ },
+ "node_modules/@parcel/watcher": {
+ "version": "2.5.6",
+ "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.6.tgz",
+ "integrity": "sha512-tmmZ3lQxAe/k/+rNnXQRawJ4NjxO2hqiOLTHvWchtGZULp4RyFeh6aU4XdOYBFe2KE1oShQTv4AblOs2iOrNnQ==",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "dependencies": {
+ "detect-libc": "^2.0.3",
+ "is-glob": "^4.0.3",
+ "node-addon-api": "^7.0.0",
+ "picomatch": "^4.0.3"
+ },
+ "engines": {
+ "node": ">= 10.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ },
+ "optionalDependencies": {
+ "@parcel/watcher-android-arm64": "2.5.6",
+ "@parcel/watcher-darwin-arm64": "2.5.6",
+ "@parcel/watcher-darwin-x64": "2.5.6",
+ "@parcel/watcher-freebsd-x64": "2.5.6",
+ "@parcel/watcher-linux-arm-glibc": "2.5.6",
+ "@parcel/watcher-linux-arm-musl": "2.5.6",
+ "@parcel/watcher-linux-arm64-glibc": "2.5.6",
+ "@parcel/watcher-linux-arm64-musl": "2.5.6",
+ "@parcel/watcher-linux-x64-glibc": "2.5.6",
+ "@parcel/watcher-linux-x64-musl": "2.5.6",
+ "@parcel/watcher-win32-arm64": "2.5.6",
+ "@parcel/watcher-win32-ia32": "2.5.6",
+ "@parcel/watcher-win32-x64": "2.5.6"
+ }
+ },
+ "node_modules/@parcel/watcher-darwin-arm64": {
+ "version": "2.5.6",
+ "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.6.tgz",
+ "integrity": "sha512-Z2ZdrnwyXvvvdtRHLmM4knydIdU9adO3D4n/0cVipF3rRiwP+3/sfzpAwA/qKFL6i1ModaabkU7IbpeMBgiVEA==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 10.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/@radix-ui/primitive": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.3.tgz",
+ "integrity": "sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg==",
+ "license": "MIT"
+ },
+ "node_modules/@radix-ui/react-checkbox": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-checkbox/-/react-checkbox-1.3.3.tgz",
+ "integrity": "sha512-wBbpv+NQftHDdG86Qc0pIyXk5IR3tM8Vd0nWLKDcX8nNn4nXFOFwsKuqw2okA/1D/mpaAkmuyndrPJTYDNZtFw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-controllable-state": "1.2.2",
+ "@radix-ui/react-use-previous": "1.1.1",
+ "@radix-ui/react-use-size": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-compose-refs": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz",
+ "integrity": "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-context": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.2.tgz",
+ "integrity": "sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-presence": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.5.tgz",
+ "integrity": "sha512-/jfEwNDdQVBCNvjkGit4h6pMOzq8bHkopq458dPt2lMjx+eBQUohZNG9A7DtO/O5ukSbxuaNGXMjHicgwy6rQQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-primitive": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.3.tgz",
+ "integrity": "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-slot": "1.2.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-slot": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz",
+ "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-use-controllable-state": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.2.2.tgz",
+ "integrity": "sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-effect-event": "0.0.2",
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-use-effect-event": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.2.tgz",
+ "integrity": "sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-use-layout-effect": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.1.tgz",
+ "integrity": "sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-use-previous": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.1.tgz",
+ "integrity": "sha512-2dHfToCj/pzca2Ck724OZ5L0EVrr3eHRNsG/b3xQJLA2hZpVCS99bLAX+hm1IHXDEnzU6by5z/5MIY794/a8NQ==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-use-size": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.1.tgz",
+ "integrity": "sha512-ewrXRDTAqAXlkl6t/fkXWNAhFX9I+CkKlw6zjEwk86RSPKwZr3xpBRso655aqYafwtnbpHLj6toFzmd6xdVptQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@reduxjs/toolkit": {
+ "version": "2.11.2",
+ "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-2.11.2.tgz",
+ "integrity": "sha512-Kd6kAHTA6/nUpp8mySPqj3en3dm0tdMIgbttnQ1xFMVpufoj+ADi8pXLBsd4xzTRHQa7t/Jv8W5UnCuW4kuWMQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@standard-schema/spec": "^1.0.0",
+ "@standard-schema/utils": "^0.3.0",
+ "immer": "^11.0.0",
+ "redux": "^5.0.1",
+ "redux-thunk": "^3.1.0",
+ "reselect": "^5.1.0"
+ },
+ "peerDependencies": {
+ "react": "^16.9.0 || ^17.0.0 || ^18 || ^19",
+ "react-redux": "^7.2.1 || ^8.1.3 || ^9.0.0"
+ },
+ "peerDependenciesMeta": {
+ "react": {
+ "optional": true
+ },
+ "react-redux": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@reduxjs/toolkit/node_modules/immer": {
+ "version": "11.1.4",
+ "resolved": "https://registry.npmjs.org/immer/-/immer-11.1.4.tgz",
+ "integrity": "sha512-XREFCPo6ksxVzP4E0ekD5aMdf8WMwmdNaz6vuvxgI40UaEiu6q3p8X52aU6GdyvLY3XXX/8R7JOTXStz/nBbRw==",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/immer"
+ }
+ },
+ "node_modules/@rtsao/scc": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz",
+ "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@schummar/icu-type-parser": {
+ "version": "1.21.5",
+ "resolved": "https://registry.npmjs.org/@schummar/icu-type-parser/-/icu-type-parser-1.21.5.tgz",
+ "integrity": "sha512-bXHSaW5jRTmke9Vd0h5P7BtWZG9Znqb8gSDxZnxaGSJnGwPLDPfS+3g0BKzeWqzgZPsIVZkM7m2tbo18cm5HBw==",
+ "license": "MIT"
+ },
+ "node_modules/@sec-ant/readable-stream": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/@sec-ant/readable-stream/-/readable-stream-0.4.1.tgz",
+ "integrity": "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==",
+ "license": "MIT"
+ },
+ "node_modules/@shikijs/core": {
+ "version": "4.0.2",
+ "license": "MIT",
+ "dependencies": {
+ "@shikijs/primitive": "4.0.2",
+ "@shikijs/types": "4.0.2",
+ "@shikijs/vscode-textmate": "^10.0.2",
+ "@types/hast": "^3.0.4",
+ "hast-util-to-html": "^9.0.5"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@shikijs/engine-javascript": {
+ "version": "4.0.2",
+ "license": "MIT",
+ "dependencies": {
+ "@shikijs/types": "4.0.2",
+ "@shikijs/vscode-textmate": "^10.0.2",
+ "oniguruma-to-es": "^4.3.4"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@shikijs/engine-oniguruma": {
+ "version": "4.0.2",
+ "license": "MIT",
+ "dependencies": {
+ "@shikijs/types": "4.0.2",
+ "@shikijs/vscode-textmate": "^10.0.2"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@shikijs/langs": {
+ "version": "4.0.2",
+ "license": "MIT",
+ "dependencies": {
+ "@shikijs/types": "4.0.2"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@shikijs/primitive": {
+ "version": "4.0.2",
+ "license": "MIT",
+ "dependencies": {
+ "@shikijs/types": "4.0.2",
+ "@shikijs/vscode-textmate": "^10.0.2",
+ "@types/hast": "^3.0.4"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@shikijs/themes": {
+ "version": "4.0.2",
+ "license": "MIT",
+ "dependencies": {
+ "@shikijs/types": "4.0.2"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@shikijs/types": {
+ "version": "4.0.2",
+ "license": "MIT",
+ "dependencies": {
+ "@shikijs/vscode-textmate": "^10.0.2",
+ "@types/hast": "^3.0.4"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@shikijs/vscode-textmate": {
+ "version": "10.0.2",
+ "license": "MIT"
+ },
+ "node_modules/@sindresorhus/merge-streams": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz",
+ "integrity": "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "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==",
+ "license": "MIT"
+ },
+ "node_modules/@standard-schema/utils": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/@standard-schema/utils/-/utils-0.3.0.tgz",
+ "integrity": "sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g==",
+ "license": "MIT"
+ },
+ "node_modules/@stripe/stripe-js": {
+ "version": "9.1.0",
+ "resolved": "https://registry.npmjs.org/@stripe/stripe-js/-/stripe-js-9.1.0.tgz",
+ "integrity": "sha512-v51LoEfZNiNS/5DcarWPCYgn24w4dqwwALR4GTbMW/N0DDzzj4DgYNoixX6PYvpt6uIJMucGUabn/BHhylggIQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.16"
+ }
+ },
+ "node_modules/@supabase/auth-js": {
+ "version": "2.99.0",
+ "resolved": "https://registry.npmjs.org/@supabase/auth-js/-/auth-js-2.99.0.tgz",
+ "integrity": "sha512-tHiIST/OEoLmWBE+3X69xRY5srJM/lL86KltmMlIfDo9ePJLo14vQQV9T4NF+P+MoGhCwQL1GTmk51zuAFMXKw==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "2.8.1"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/@supabase/functions-js": {
+ "version": "2.99.0",
+ "resolved": "https://registry.npmjs.org/@supabase/functions-js/-/functions-js-2.99.0.tgz",
+ "integrity": "sha512-zA9oad6EqGwMLLu2LfP1bXbqKcJGiotAdbdTfZG7YS7619YZQAEgejj9mp+E5vglKE1yMWbKK+S1J3PbuUtgLg==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "2.8.1"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/@supabase/postgrest-js": {
+ "version": "2.99.0",
+ "resolved": "https://registry.npmjs.org/@supabase/postgrest-js/-/postgrest-js-2.99.0.tgz",
+ "integrity": "sha512-8qfOMi2pu9y0IQhUAeFqjrvR49G4ELGevXCWV9qAHXFQ/h2FFh0I8PYjFQj4rHcHSq6hrpozDnS1vbQU8NAQ/A==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "2.8.1"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/@supabase/realtime-js": {
+ "version": "2.99.0",
+ "resolved": "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-2.99.0.tgz",
+ "integrity": "sha512-7nFTZhNeANR7FvEY6PfWLCfE8dHqcaJd9SuR7IPEZvBPG9K4uEHMivpjZx4NWRSU7Eji7ZbKy2LG+cJ48DhwHg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/phoenix": "^1.6.6",
+ "@types/ws": "^8.18.1",
+ "tslib": "2.8.1",
+ "ws": "^8.18.2"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/@supabase/ssr": {
+ "version": "0.9.0",
+ "resolved": "https://registry.npmjs.org/@supabase/ssr/-/ssr-0.9.0.tgz",
+ "integrity": "sha512-UFY6otYV3yqCgV+AyHj80vNkTvbf1Gas2LW4dpbQ4ap6p6v3eB2oaDfcI99jsuJzwVBCFU4BJI+oDYyhNk1z0Q==",
+ "license": "MIT",
+ "dependencies": {
+ "cookie": "^1.0.2"
+ },
+ "peerDependencies": {
+ "@supabase/supabase-js": "^2.97.0"
+ }
+ },
+ "node_modules/@supabase/storage-js": {
+ "version": "2.99.0",
+ "resolved": "https://registry.npmjs.org/@supabase/storage-js/-/storage-js-2.99.0.tgz",
+ "integrity": "sha512-mAEEbfsght5EEALejYrwAP9k8sFBGjfMZT8n4SyMXk2iYuWVeRMs1kA/uKg0uDMctWdZ0bL+L4jZzksUJpCjMA==",
+ "license": "MIT",
+ "dependencies": {
+ "iceberg-js": "^0.8.1",
+ "tslib": "2.8.1"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/@supabase/supabase-js": {
+ "version": "2.99.0",
+ "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-2.99.0.tgz",
+ "integrity": "sha512-SP9Sn9tsHDB7N4u2gT13rdeZJewE4xibAxasG7vOz+fYi92+XkMMbWNx0uGK53zKTnAnvTs16isRooyBy4sn5w==",
+ "license": "MIT",
+ "dependencies": {
+ "@supabase/auth-js": "2.99.0",
+ "@supabase/functions-js": "2.99.0",
+ "@supabase/postgrest-js": "2.99.0",
+ "@supabase/realtime-js": "2.99.0",
+ "@supabase/storage-js": "2.99.0"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/@swc/core": {
+ "version": "1.15.18",
+ "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.15.18.tgz",
+ "integrity": "sha512-z87aF9GphWp//fnkRsqvtY+inMVPgYW3zSlXH1kJFvRT5H/wiAn+G32qW5l3oEk63KSF1x3Ov0BfHCObAmT8RA==",
+ "hasInstallScript": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@swc/counter": "^0.1.3",
+ "@swc/types": "^0.1.25"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/swc"
+ },
+ "optionalDependencies": {
+ "@swc/core-darwin-arm64": "1.15.18",
+ "@swc/core-darwin-x64": "1.15.18",
+ "@swc/core-linux-arm-gnueabihf": "1.15.18",
+ "@swc/core-linux-arm64-gnu": "1.15.18",
+ "@swc/core-linux-arm64-musl": "1.15.18",
+ "@swc/core-linux-x64-gnu": "1.15.18",
+ "@swc/core-linux-x64-musl": "1.15.18",
+ "@swc/core-win32-arm64-msvc": "1.15.18",
+ "@swc/core-win32-ia32-msvc": "1.15.18",
+ "@swc/core-win32-x64-msvc": "1.15.18"
+ },
+ "peerDependencies": {
+ "@swc/helpers": ">=0.5.17"
+ },
+ "peerDependenciesMeta": {
+ "@swc/helpers": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@swc/core-darwin-arm64": {
+ "version": "1.15.18",
+ "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.15.18.tgz",
+ "integrity": "sha512-+mIv7uBuSaywN3C9LNuWaX1jJJ3SKfiJuE6Lr3bd+/1Iv8oMU7oLBjYMluX1UrEPzwN2qCdY6Io0yVicABoCwQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-darwin-x64": {
+ "version": "1.15.18",
+ "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.15.18.tgz",
+ "integrity": "sha512-wZle0eaQhnzxWX5V/2kEOI6Z9vl/lTFEC6V4EWcn+5pDjhemCpQv9e/TDJ0GIoiClX8EDWRvuZwh+Z3dhL1NAg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-linux-arm-gnueabihf": {
+ "version": "1.15.18",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.15.18.tgz",
+ "integrity": "sha512-ao61HGXVqrJFHAcPtF4/DegmwEkVCo4HApnotLU8ognfmU8x589z7+tcf3hU+qBiU1WOXV5fQX6W9Nzs6hjxDw==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-linux-arm64-gnu": {
+ "version": "1.15.18",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.15.18.tgz",
+ "integrity": "sha512-3xnctOBLIq3kj8PxOCgPrGjBLP/kNOddr6f5gukYt/1IZxsITQaU9TDyjeX6jG+FiCIHjCuWuffsyQDL5Ew1bg==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-linux-arm64-musl": {
+ "version": "1.15.18",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.15.18.tgz",
+ "integrity": "sha512-0a+Lix+FSSHBSBOA0XznCcHo5/1nA6oLLjcnocvzXeqtdjnPb+SvchItHI+lfeiuj1sClYPDvPMLSLyXFaiIKw==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-linux-x64-gnu": {
+ "version": "1.15.18",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.15.18.tgz",
+ "integrity": "sha512-wG9J8vReUlpaHz4KOD/5UE1AUgirimU4UFT9oZmupUDEofxJKYb1mTA/DrMj0s78bkBiNI+7Fo2EgPuvOJfuAA==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-linux-x64-musl": {
+ "version": "1.15.18",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.15.18.tgz",
+ "integrity": "sha512-4nwbVvCphKzicwNWRmvD5iBaZj8JYsRGa4xOxJmOyHlMDpsvvJ2OR2cODlvWyGFH6BYL1MfIAK3qph3hp0Az6g==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-win32-arm64-msvc": {
+ "version": "1.15.18",
+ "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.15.18.tgz",
+ "integrity": "sha512-zk0RYO+LjiBCat2RTMHzAWaMky0cra9loH4oRrLKLLNuL+jarxKLFDA8xTZWEkCPLjUTwlRN7d28eDLLMgtUcQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-win32-ia32-msvc": {
+ "version": "1.15.18",
+ "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.15.18.tgz",
+ "integrity": "sha512-yVuTrZ0RccD5+PEkpcLOBAuPbYBXS6rslENvIXfvJGXSdX5QGi1ehC4BjAMl5FkKLiam4kJECUI0l7Hq7T1vwg==",
+ "cpu": [
+ "ia32"
+ ],
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-win32-x64-msvc": {
+ "version": "1.15.18",
+ "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.15.18.tgz",
+ "integrity": "sha512-7NRmE4hmUQNCbYU3Hn9Tz57mK9Qq4c97ZS+YlamlK6qG9Fb5g/BB3gPDe0iLlJkns/sYv2VWSkm8c3NmbEGjbg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "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.21",
+ "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.21.tgz",
+ "integrity": "sha512-jI/VAmtdjB/RnI8GTnokyX7Ug8c+g+ffD6QRLa6XQewtnGyukKkKSk3wLTM3b5cjt1jNh9x0jfVlagdN2gDKQg==",
+ "license": "Apache-2.0",
+ "optional": true,
+ "peer": true,
+ "dependencies": {
+ "tslib": "^2.8.0"
+ }
+ },
+ "node_modules/@swc/types": {
+ "version": "0.1.25",
+ "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.25.tgz",
+ "integrity": "sha512-iAoY/qRhNH8a/hBvm3zKj9qQ4oc2+3w1unPJa2XvTK3XjeLXtzcCingVPw/9e5mn1+0yPqxcBGp9Jf0pkfMb1g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@swc/counter": "^0.1.3"
+ }
+ },
+ "node_modules/@tailwindcss/node": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.2.1.tgz",
+ "integrity": "sha512-jlx6sLk4EOwO6hHe1oCGm1Q4AN/s0rSrTTPBGPM0/RQ6Uylwq17FuU8IeJJKEjtc6K6O07zsvP+gDO6MMWo7pg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/remapping": "^2.3.5",
+ "enhanced-resolve": "^5.19.0",
+ "jiti": "^2.6.1",
+ "lightningcss": "1.31.1",
+ "magic-string": "^0.30.21",
+ "source-map-js": "^1.2.1",
+ "tailwindcss": "4.2.1"
+ }
+ },
+ "node_modules/@tailwindcss/oxide": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.2.1.tgz",
+ "integrity": "sha512-yv9jeEFWnjKCI6/T3Oq50yQEOqmpmpfzG1hcZsAOaXFQPfzWprWrlHSdGPEF3WQTi8zu8ohC9Mh9J470nT5pUw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 20"
+ },
+ "optionalDependencies": {
+ "@tailwindcss/oxide-android-arm64": "4.2.1",
+ "@tailwindcss/oxide-darwin-arm64": "4.2.1",
+ "@tailwindcss/oxide-darwin-x64": "4.2.1",
+ "@tailwindcss/oxide-freebsd-x64": "4.2.1",
+ "@tailwindcss/oxide-linux-arm-gnueabihf": "4.2.1",
+ "@tailwindcss/oxide-linux-arm64-gnu": "4.2.1",
+ "@tailwindcss/oxide-linux-arm64-musl": "4.2.1",
+ "@tailwindcss/oxide-linux-x64-gnu": "4.2.1",
+ "@tailwindcss/oxide-linux-x64-musl": "4.2.1",
+ "@tailwindcss/oxide-wasm32-wasi": "4.2.1",
+ "@tailwindcss/oxide-win32-arm64-msvc": "4.2.1",
+ "@tailwindcss/oxide-win32-x64-msvc": "4.2.1"
+ }
+ },
+ "node_modules/@tailwindcss/oxide-darwin-arm64": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.2.1.tgz",
+ "integrity": "sha512-q/LHkOstoJ7pI1J0q6djesLzRvQSIfEto148ppAd+BVQK0JYjQIFSK3JgYZJa+Yzi0DDa52ZsQx2rqytBnf8Hw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/@tailwindcss/postcss": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/postcss/-/postcss-4.2.1.tgz",
+ "integrity": "sha512-OEwGIBnXnj7zJeonOh6ZG9woofIjGrd2BORfvE5p9USYKDCZoQmfqLcfNiRWoJlRWLdNPn2IgVZuWAOM4iTYMw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@alloc/quick-lru": "^5.2.0",
+ "@tailwindcss/node": "4.2.1",
+ "@tailwindcss/oxide": "4.2.1",
+ "postcss": "^8.5.6",
+ "tailwindcss": "4.2.1"
+ }
+ },
+ "node_modules/@tailwindcss/typography": {
+ "version": "0.5.19",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.19.tgz",
+ "integrity": "sha512-w31dd8HOx3k9vPtcQh5QHP9GwKcgbMp87j58qi6xgiBnFFtKEAgCWnDw4qUT8aHwkCp8bKvb/KGKWWHedP0AAg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "postcss-selector-parser": "6.0.10"
+ },
+ "peerDependencies": {
+ "tailwindcss": ">=3.0.0 || insiders || >=4.0.0-alpha.20 || >=4.0.0-beta.1"
+ }
+ },
+ "node_modules/@tailwindcss/typography/node_modules/postcss-selector-parser": {
+ "version": "6.0.10",
+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz",
+ "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "cssesc": "^3.0.0",
+ "util-deprecate": "^1.0.2"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/@ts-morph/common": {
+ "version": "0.27.0",
+ "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.27.0.tgz",
+ "integrity": "sha512-Wf29UqxWDpc+i61k3oIOzcUfQt79PIT9y/MWfAGlrkjg6lBC1hwDECLXPVJAhWjiGbfBCxZd65F/LIZF3+jeJQ==",
+ "license": "MIT",
+ "dependencies": {
+ "fast-glob": "^3.3.3",
+ "minimatch": "^10.0.1",
+ "path-browserify": "^1.0.1"
+ }
+ },
+ "node_modules/@ts-morph/common/node_modules/balanced-match": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
+ "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
+ "license": "MIT",
+ "engines": {
+ "node": "18 || 20 || >=22"
+ }
+ },
+ "node_modules/@ts-morph/common/node_modules/brace-expansion": {
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz",
+ "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==",
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^4.0.2"
+ },
+ "engines": {
+ "node": "18 || 20 || >=22"
+ }
+ },
+ "node_modules/@ts-morph/common/node_modules/minimatch": {
+ "version": "10.2.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz",
+ "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==",
+ "license": "BlueOak-1.0.0",
+ "dependencies": {
+ "brace-expansion": "^5.0.2"
+ },
+ "engines": {
+ "node": "18 || 20 || >=22"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "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/debug": {
+ "version": "4.1.13",
+ "license": "MIT",
+ "dependencies": {
+ "@types/ms": "*"
+ }
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
+ "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
+ "license": "MIT"
+ },
+ "node_modules/@types/estree-jsx": {
+ "version": "1.0.5",
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "*"
+ }
+ },
+ "node_modules/@types/hast": {
+ "version": "3.0.4",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "*"
+ }
+ },
+ "node_modules/@types/json-schema": {
+ "version": "7.0.15",
+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
+ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/json5": {
+ "version": "0.0.29",
+ "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
+ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/mdast": {
+ "version": "4.0.4",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "*"
+ }
+ },
+ "node_modules/@types/ms": {
+ "version": "2.1.0",
+ "license": "MIT"
+ },
+ "node_modules/@types/node": {
+ "version": "20.19.37",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.37.tgz",
+ "integrity": "sha512-8kzdPJ3FsNsVIurqBs7oodNnCEVbni9yUEkaHbgptDACOPW04jimGagZ51E6+lXUwJjgnBw+hyko/lkFWCldqw==",
+ "devOptional": true,
+ "license": "MIT",
+ "dependencies": {
+ "undici-types": "~6.21.0"
+ }
+ },
+ "node_modules/@types/phoenix": {
+ "version": "1.6.7",
+ "resolved": "https://registry.npmjs.org/@types/phoenix/-/phoenix-1.6.7.tgz",
+ "integrity": "sha512-oN9ive//QSBkf19rfDv45M7eZPi0eEXylht2OLEXicu5b4KoQ1OzXIw+xDSGWxSxe1JmepRR/ZH283vsu518/Q==",
+ "license": "MIT"
+ },
+ "node_modules/@types/react": {
+ "version": "19.2.14",
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.14.tgz",
+ "integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==",
+ "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==",
+ "devOptional": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "^19.2.0"
+ }
+ },
+ "node_modules/@types/statuses": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/@types/statuses/-/statuses-2.0.6.tgz",
+ "integrity": "sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA==",
+ "license": "MIT"
+ },
+ "node_modules/@types/unist": {
+ "version": "3.0.3",
+ "license": "MIT"
+ },
+ "node_modules/@types/use-sync-external-store": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.6.tgz",
+ "integrity": "sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==",
+ "license": "MIT"
+ },
+ "node_modules/@types/validate-npm-package-name": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/@types/validate-npm-package-name/-/validate-npm-package-name-4.0.2.tgz",
+ "integrity": "sha512-lrpDziQipxCEeK5kWxvljWYhUvOiB2A9izZd9B2AFarYAkqZshb4lPbRs7zKEic6eGtH8V/2qJW+dPp9OtF6bw==",
+ "license": "MIT"
+ },
+ "node_modules/@types/ws": {
+ "version": "8.18.1",
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz",
+ "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/ws/node_modules/@types/node": {
+ "version": "25.3.5",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-25.3.5.tgz",
+ "integrity": "sha512-oX8xrhvpiyRCQkG1MFchB09f+cXftgIXb3a7UUa4Y3wpmZPw5tyZGTLWhlESOLq1Rq6oDlc8npVU2/9xiCuXMA==",
+ "license": "MIT",
+ "dependencies": {
+ "undici-types": "~7.18.0"
+ }
+ },
+ "node_modules/@types/ws/node_modules/undici-types": {
+ "version": "7.18.2",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
+ "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
+ "license": "MIT"
+ },
+ "node_modules/@typescript-eslint/eslint-plugin": {
+ "version": "8.56.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.56.1.tgz",
+ "integrity": "sha512-Jz9ZztpB37dNC+HU2HI28Bs9QXpzCz+y/twHOwhyrIRdbuVDxSytJNDl6z/aAKlaRIwC7y8wJdkBv7FxYGgi0A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@eslint-community/regexpp": "^4.12.2",
+ "@typescript-eslint/scope-manager": "8.56.1",
+ "@typescript-eslint/type-utils": "8.56.1",
+ "@typescript-eslint/utils": "8.56.1",
+ "@typescript-eslint/visitor-keys": "8.56.1",
+ "ignore": "^7.0.5",
+ "natural-compare": "^1.4.0",
+ "ts-api-utils": "^2.4.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "@typescript-eslint/parser": "^8.56.1",
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": {
+ "version": "7.0.5",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz",
+ "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/@typescript-eslint/parser": {
+ "version": "8.56.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.56.1.tgz",
+ "integrity": "sha512-klQbnPAAiGYFyI02+znpBRLyjL4/BrBd0nyWkdC0s/6xFLkXYQ8OoRrSkqacS1ddVxf/LDyODIKbQ5TgKAf/Fg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/scope-manager": "8.56.1",
+ "@typescript-eslint/types": "8.56.1",
+ "@typescript-eslint/typescript-estree": "8.56.1",
+ "@typescript-eslint/visitor-keys": "8.56.1",
+ "debug": "^4.4.3"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/project-service": {
+ "version": "8.56.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.56.1.tgz",
+ "integrity": "sha512-TAdqQTzHNNvlVFfR+hu2PDJrURiwKsUvxFn1M0h95BB8ah5jejas08jUWG4dBA68jDMI988IvtfdAI53JzEHOQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/tsconfig-utils": "^8.56.1",
+ "@typescript-eslint/types": "^8.56.1",
+ "debug": "^4.4.3"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/scope-manager": {
+ "version": "8.56.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.56.1.tgz",
+ "integrity": "sha512-YAi4VDKcIZp0O4tz/haYKhmIDZFEUPOreKbfdAN3SzUDMcPhJ8QI99xQXqX+HoUVq8cs85eRKnD+rne2UAnj2w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/types": "8.56.1",
+ "@typescript-eslint/visitor-keys": "8.56.1"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/tsconfig-utils": {
+ "version": "8.56.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.56.1.tgz",
+ "integrity": "sha512-qOtCYzKEeyr3aR9f28mPJqBty7+DBqsdd63eO0yyDwc6vgThj2UjWfJIcsFeSucYydqcuudMOprZ+x1SpF3ZuQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/type-utils": {
+ "version": "8.56.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.56.1.tgz",
+ "integrity": "sha512-yB/7dxi7MgTtGhZdaHCemf7PuwrHMenHjmzgUW1aJpO+bBU43OycnM3Wn+DdvDO/8zzA9HlhaJ0AUGuvri4oGg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/types": "8.56.1",
+ "@typescript-eslint/typescript-estree": "8.56.1",
+ "@typescript-eslint/utils": "8.56.1",
+ "debug": "^4.4.3",
+ "ts-api-utils": "^2.4.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/types": {
+ "version": "8.56.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.56.1.tgz",
+ "integrity": "sha512-dbMkdIUkIkchgGDIv7KLUpa0Mda4IYjo4IAMJUZ+3xNoUXxMsk9YtKpTHSChRS85o+H9ftm51gsK1dZReY9CVw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree": {
+ "version": "8.56.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.56.1.tgz",
+ "integrity": "sha512-qzUL1qgalIvKWAf9C1HpvBjif+Vm6rcT5wZd4VoMb9+Km3iS3Cv9DY6dMRMDtPnwRAFyAi7YXJpTIEXLvdfPxg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/project-service": "8.56.1",
+ "@typescript-eslint/tsconfig-utils": "8.56.1",
+ "@typescript-eslint/types": "8.56.1",
+ "@typescript-eslint/visitor-keys": "8.56.1",
+ "debug": "^4.4.3",
+ "minimatch": "^10.2.2",
+ "semver": "^7.7.3",
+ "tinyglobby": "^0.2.15",
+ "ts-api-utils": "^2.4.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/balanced-match": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
+ "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "18 || 20 || >=22"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz",
+ "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^4.0.2"
+ },
+ "engines": {
+ "node": "18 || 20 || >=22"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
+ "version": "10.2.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz",
+ "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==",
+ "dev": true,
+ "license": "BlueOak-1.0.0",
+ "dependencies": {
+ "brace-expansion": "^5.0.2"
+ },
+ "engines": {
+ "node": "18 || 20 || >=22"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": {
+ "version": "7.7.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz",
+ "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@typescript-eslint/utils": {
+ "version": "8.56.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.56.1.tgz",
+ "integrity": "sha512-HPAVNIME3tABJ61siYlHzSWCGtOoeP2RTIaHXFMPqjrQKCGB9OgUVdiNgH7TJS2JNIQ5qQ4RsAUDuGaGme/KOA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.9.1",
+ "@typescript-eslint/scope-manager": "8.56.1",
+ "@typescript-eslint/types": "8.56.1",
+ "@typescript-eslint/typescript-estree": "8.56.1"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/visitor-keys": {
+ "version": "8.56.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.56.1.tgz",
+ "integrity": "sha512-KiROIzYdEV85YygXw6BI/Dx4fnBlFQu6Mq4QE4MOH9fFnhohw6wX/OAvDY2/C+ut0I3RSPKenvZJIVYqJNkhEw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/types": "8.56.1",
+ "eslint-visitor-keys": "^5.0.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz",
+ "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/@ungap/structured-clone": {
+ "version": "1.3.0",
+ "license": "ISC"
+ },
+ "node_modules/@unrs/resolver-binding-darwin-arm64": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.11.1.tgz",
+ "integrity": "sha512-gPVA1UjRu1Y/IsB/dQEsp2V1pm44Of6+LWvbLc9SDk1c2KhhDRDBUkQCYVWe6f26uJb3fOK8saWMgtX8IrMk3g==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/accepts": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",
+ "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-types": "^3.0.0",
+ "negotiator": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/acorn": {
+ "version": "8.16.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz",
+ "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/acorn-jsx": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
+ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ }
+ },
+ "node_modules/agent-base": {
+ "version": "7.1.4",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz",
+ "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/ajv": {
+ "version": "6.14.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz",
+ "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/ansis": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/ansis/-/ansis-4.2.0.tgz",
+ "integrity": "sha512-HqZ5rWlFjGiV0tDm3UxxgNRqsOTniqoKZu0pIAfh7TZQMGuZK+hH0drySty0si0QXj1ieop4+SkSfPZBPPkHig==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/argparse": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
+ "license": "Python-2.0"
+ },
+ "node_modules/aria-query": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz",
+ "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/array-buffer-byte-length": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz",
+ "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "is-array-buffer": "^3.0.5"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array-includes": {
+ "version": "3.1.9",
+ "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz",
+ "integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.4",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.24.0",
+ "es-object-atoms": "^1.1.1",
+ "get-intrinsic": "^1.3.0",
+ "is-string": "^1.1.1",
+ "math-intrinsics": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array.prototype.findlast": {
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz",
+ "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.2",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.0.0",
+ "es-shim-unscopables": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array.prototype.findlastindex": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz",
+ "integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.4",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.9",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
+ "es-shim-unscopables": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array.prototype.flat": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz",
+ "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.5",
+ "es-shim-unscopables": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array.prototype.flatmap": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz",
+ "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.5",
+ "es-shim-unscopables": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array.prototype.tosorted": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz",
+ "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.3",
+ "es-errors": "^1.3.0",
+ "es-shim-unscopables": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/arraybuffer.prototype.slice": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz",
+ "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "array-buffer-byte-length": "^1.0.1",
+ "call-bind": "^1.0.8",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.5",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.6",
+ "is-array-buffer": "^3.0.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/ast-types": {
+ "version": "0.16.1",
+ "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.16.1.tgz",
+ "integrity": "sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/ast-types-flow": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz",
+ "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/async-function": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz",
+ "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/available-typed-arrays": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz",
+ "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "possible-typed-array-names": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/axe-core": {
+ "version": "4.11.1",
+ "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.11.1.tgz",
+ "integrity": "sha512-BASOg+YwO2C+346x3LZOeoovTIoTrRqEsqMa6fmfAV0P+U9mFr9NsyOEpiYvFjbc64NMrSswhV50WdXzdb/Z5A==",
+ "dev": true,
+ "license": "MPL-2.0",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/axobject-query": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz",
+ "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/bail": {
+ "version": "2.0.2",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/baseline-browser-mapping": {
+ "version": "2.10.0",
+ "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.0.tgz",
+ "integrity": "sha512-lIyg0szRfYbiy67j9KN8IyeD7q7hcmqnJ1ddWmNt19ItGpNN64mnllmxUNFIOdOm6by97jlL6wfpTTJrmnjWAA==",
+ "license": "Apache-2.0",
+ "bin": {
+ "baseline-browser-mapping": "dist/cli.cjs"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/body-parser": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz",
+ "integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "^3.1.2",
+ "content-type": "^1.0.5",
+ "debug": "^4.4.3",
+ "http-errors": "^2.0.0",
+ "iconv-lite": "^0.7.0",
+ "on-finished": "^2.4.1",
+ "qs": "^6.14.1",
+ "raw-body": "^3.0.1",
+ "type-is": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/brace-expansion": {
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/braces": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
+ "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
+ "license": "MIT",
+ "dependencies": {
+ "fill-range": "^7.1.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/browserslist": {
+ "version": "4.28.1",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz",
+ "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "baseline-browser-mapping": "^2.9.0",
+ "caniuse-lite": "^1.0.30001759",
+ "electron-to-chromium": "^1.5.263",
+ "node-releases": "^2.0.27",
+ "update-browserslist-db": "^1.2.0"
+ },
+ "bin": {
+ "browserslist": "cli.js"
+ },
+ "engines": {
+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
+ }
+ },
+ "node_modules/bundle-name": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz",
+ "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==",
+ "license": "MIT",
+ "dependencies": {
+ "run-applescript": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/call-bind": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz",
+ "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.0",
+ "es-define-property": "^1.0.0",
+ "get-intrinsic": "^1.2.4",
+ "set-function-length": "^1.2.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/call-bind-apply-helpers": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
+ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/call-bound": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
+ "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "get-intrinsic": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/callsites": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/caniuse-lite": {
+ "version": "1.0.30001777",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001777.tgz",
+ "integrity": "sha512-tmN+fJxroPndC74efCdp12j+0rk0RHwV5Jwa1zWaFVyw2ZxAuPeG8ZgWC3Wz7uSjT3qMRQ5XHZ4COgQmsCMJAQ==",
+ "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/ccount": {
+ "version": "2.0.1",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/chalk": {
+ "version": "5.6.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz",
+ "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==",
+ "license": "MIT",
+ "engines": {
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/character-entities": {
+ "version": "2.0.2",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/character-entities-html4": {
+ "version": "2.1.0",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/character-entities-legacy": {
+ "version": "3.0.0",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/character-reference-invalid": {
+ "version": "2.0.1",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/class-variance-authority": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.1.tgz",
+ "integrity": "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "clsx": "^2.1.1"
+ },
+ "funding": {
+ "url": "https://polar.sh/cva"
+ }
+ },
+ "node_modules/cli-cursor": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz",
+ "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==",
+ "license": "MIT",
+ "dependencies": {
+ "restore-cursor": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/cli-spinners": {
+ "version": "2.9.2",
+ "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz",
+ "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/cli-width": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz",
+ "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==",
+ "license": "ISC",
+ "engines": {
+ "node": ">= 12"
+ }
+ },
+ "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/cliui": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
+ "license": "ISC",
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.1",
+ "wrap-ansi": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/cliui/node_modules/wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
+ "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/code-block-writer": {
+ "version": "13.0.3",
+ "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-13.0.3.tgz",
+ "integrity": "sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg==",
+ "license": "MIT"
+ },
+ "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",
+ "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"
+ },
+ "node_modules/comma-separated-tokens": {
+ "version": "2.0.3",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/commander": {
+ "version": "14.0.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz",
+ "integrity": "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/content-disposition": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz",
+ "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/content-type": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/convert-source-map": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
+ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
+ "license": "MIT"
+ },
+ "node_modules/cookie": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz",
+ "integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/cookie-signature": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz",
+ "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.6.0"
+ }
+ },
+ "node_modules/cors": {
+ "version": "2.8.6",
+ "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.6.tgz",
+ "integrity": "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==",
+ "license": "MIT",
+ "dependencies": {
+ "object-assign": "^4",
+ "vary": "^1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/cosmiconfig": {
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.1.tgz",
+ "integrity": "sha512-hr4ihw+DBqcvrsEDioRO31Z17x71pUYoNe/4h6Z0wB72p7MU7/9gH8Q3s12NFhHPfYBBOV3qyfUxmr/Yn3shnQ==",
+ "license": "MIT",
+ "dependencies": {
+ "env-paths": "^2.2.1",
+ "import-fresh": "^3.3.0",
+ "js-yaml": "^4.1.0",
+ "parse-json": "^5.2.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/d-fischer"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.9.5"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/cross-spawn": {
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
+ "license": "MIT",
+ "dependencies": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/cssesc": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
+ "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
+ "license": "MIT",
+ "bin": {
+ "cssesc": "bin/cssesc"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "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/damerau-levenshtein": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz",
+ "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==",
+ "dev": true,
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/data-uri-to-buffer": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
+ "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 12"
+ }
+ },
+ "node_modules/data-view-buffer": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz",
+ "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "es-errors": "^1.3.0",
+ "is-data-view": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/data-view-byte-length": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz",
+ "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "es-errors": "^1.3.0",
+ "is-data-view": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/inspect-js"
+ }
+ },
+ "node_modules/data-view-byte-offset": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz",
+ "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "is-data-view": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/decimal.js": {
+ "version": "10.6.0",
+ "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz",
+ "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==",
+ "license": "MIT"
+ },
+ "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/decode-named-character-reference": {
+ "version": "1.3.0",
+ "license": "MIT",
+ "dependencies": {
+ "character-entities": "^2.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/dedent": {
+ "version": "1.7.2",
+ "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.2.tgz",
+ "integrity": "sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA==",
+ "license": "MIT",
+ "peerDependencies": {
+ "babel-plugin-macros": "^3.1.0"
+ },
+ "peerDependenciesMeta": {
+ "babel-plugin-macros": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/deep-is": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
+ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/deepmerge": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
+ "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/default-browser": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.5.0.tgz",
+ "integrity": "sha512-H9LMLr5zwIbSxrmvikGuI/5KGhZ8E2zH3stkMgM5LpOWDutGM2JZaj460Udnf1a+946zc7YBgrqEWwbk7zHvGw==",
+ "license": "MIT",
+ "dependencies": {
+ "bundle-name": "^4.1.0",
+ "default-browser-id": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/default-browser-id": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.1.tgz",
+ "integrity": "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/define-data-property": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
+ "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "es-define-property": "^1.0.0",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/define-lazy-prop": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz",
+ "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/define-properties": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz",
+ "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "define-data-property": "^1.0.1",
+ "has-property-descriptors": "^1.0.0",
+ "object-keys": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/depd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/dequal": {
+ "version": "2.0.3",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "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==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/devlop": {
+ "version": "1.1.0",
+ "license": "MIT",
+ "dependencies": {
+ "dequal": "^2.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/diff": {
+ "version": "8.0.3",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-8.0.3.tgz",
+ "integrity": "sha512-qejHi7bcSD4hQAZE0tNAawRK1ZtafHDmMTMkrrIGgSLl7hTnQHmKCeB45xAcbfTqK2zowkM3j3bHt/4b/ARbYQ==",
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.3.1"
+ }
+ },
+ "node_modules/doctrine": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
+ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "esutils": "^2.0.2"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/dotenv": {
+ "version": "17.3.1",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.3.1.tgz",
+ "integrity": "sha512-IO8C/dzEb6O3F9/twg6ZLXz164a2fhTnEWb95H23Dm4OuN+92NmEAlTrupP9VW6Jm3sO26tQlqyvyi4CsnY9GA==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://dotenvx.com"
+ }
+ },
+ "node_modules/dunder-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/eciesjs": {
+ "version": "0.4.18",
+ "resolved": "https://registry.npmjs.org/eciesjs/-/eciesjs-0.4.18.tgz",
+ "integrity": "sha512-wG99Zcfcys9fZux7Cft8BAX/YrOJLJSZ3jyYPfhZHqN2E+Ffx+QXBDsv3gubEgPtV6dTzJMSQUwk1H98/t/0wQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@ecies/ciphers": "^0.2.5",
+ "@noble/ciphers": "^1.3.0",
+ "@noble/curves": "^1.9.7",
+ "@noble/hashes": "^1.8.0"
+ },
+ "engines": {
+ "bun": ">=1",
+ "deno": ">=2",
+ "node": ">=16"
+ }
+ },
+ "node_modules/ee-first": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
+ "license": "MIT"
+ },
+ "node_modules/electron-to-chromium": {
+ "version": "1.5.307",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.307.tgz",
+ "integrity": "sha512-5z3uFKBWjiNR44nFcYdkcXjKMbg5KXNdciu7mhTPo9tB7NbqSNP2sSnGR+fqknZSCwKkBN+oxiiajWs4dT6ORg==",
+ "license": "ISC"
+ },
+ "node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "license": "MIT"
+ },
+ "node_modules/encodeurl": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
+ "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/enhanced-resolve": {
+ "version": "5.20.0",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.20.0.tgz",
+ "integrity": "sha512-/ce7+jQ1PQ6rVXwe+jKEg5hW5ciicHwIQUagZkp6IufBoY3YDgdTTY1azVs0qoRgVmvsNB+rbjLJxDAeHHtwsQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "graceful-fs": "^4.2.4",
+ "tapable": "^2.3.0"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/env-paths": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
+ "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/error-ex": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz",
+ "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==",
+ "license": "MIT",
+ "dependencies": {
+ "is-arrayish": "^0.2.1"
+ }
+ },
+ "node_modules/es-abstract": {
+ "version": "1.24.1",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.1.tgz",
+ "integrity": "sha512-zHXBLhP+QehSSbsS9Pt23Gg964240DPd6QCf8WpkqEXxQ7fhdZzYsocOr5u7apWonsS5EjZDmTF+/slGMyasvw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "array-buffer-byte-length": "^1.0.2",
+ "arraybuffer.prototype.slice": "^1.0.4",
+ "available-typed-arrays": "^1.0.7",
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.4",
+ "data-view-buffer": "^1.0.2",
+ "data-view-byte-length": "^1.0.2",
+ "data-view-byte-offset": "^1.0.1",
+ "es-define-property": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
+ "es-set-tostringtag": "^2.1.0",
+ "es-to-primitive": "^1.3.0",
+ "function.prototype.name": "^1.1.8",
+ "get-intrinsic": "^1.3.0",
+ "get-proto": "^1.0.1",
+ "get-symbol-description": "^1.1.0",
+ "globalthis": "^1.0.4",
+ "gopd": "^1.2.0",
+ "has-property-descriptors": "^1.0.2",
+ "has-proto": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "hasown": "^2.0.2",
+ "internal-slot": "^1.1.0",
+ "is-array-buffer": "^3.0.5",
+ "is-callable": "^1.2.7",
+ "is-data-view": "^1.0.2",
+ "is-negative-zero": "^2.0.3",
+ "is-regex": "^1.2.1",
+ "is-set": "^2.0.3",
+ "is-shared-array-buffer": "^1.0.4",
+ "is-string": "^1.1.1",
+ "is-typed-array": "^1.1.15",
+ "is-weakref": "^1.1.1",
+ "math-intrinsics": "^1.1.0",
+ "object-inspect": "^1.13.4",
+ "object-keys": "^1.1.1",
+ "object.assign": "^4.1.7",
+ "own-keys": "^1.0.1",
+ "regexp.prototype.flags": "^1.5.4",
+ "safe-array-concat": "^1.1.3",
+ "safe-push-apply": "^1.0.0",
+ "safe-regex-test": "^1.1.0",
+ "set-proto": "^1.0.0",
+ "stop-iteration-iterator": "^1.1.0",
+ "string.prototype.trim": "^1.2.10",
+ "string.prototype.trimend": "^1.0.9",
+ "string.prototype.trimstart": "^1.0.8",
+ "typed-array-buffer": "^1.0.3",
+ "typed-array-byte-length": "^1.0.3",
+ "typed-array-byte-offset": "^1.0.4",
+ "typed-array-length": "^1.0.7",
+ "unbox-primitive": "^1.1.0",
+ "which-typed-array": "^1.1.19"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/es-define-property": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-errors": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-iterator-helpers": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.2.2.tgz",
+ "integrity": "sha512-BrUQ0cPTB/IwXj23HtwHjS9n7O4h9FX94b4xc5zlTHxeLgTAdzYUDyy6KdExAl9lbN5rtfe44xpjpmj9grxs5w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.4",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.24.1",
+ "es-errors": "^1.3.0",
+ "es-set-tostringtag": "^2.1.0",
+ "function-bind": "^1.1.2",
+ "get-intrinsic": "^1.3.0",
+ "globalthis": "^1.0.4",
+ "gopd": "^1.2.0",
+ "has-property-descriptors": "^1.0.2",
+ "has-proto": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "internal-slot": "^1.1.0",
+ "iterator.prototype": "^1.1.5",
+ "safe-array-concat": "^1.1.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-object-atoms": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
+ "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-set-tostringtag": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
+ "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.6",
+ "has-tostringtag": "^1.0.2",
+ "hasown": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-shim-unscopables": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz",
+ "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "hasown": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-to-primitive": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz",
+ "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-callable": "^1.2.7",
+ "is-date-object": "^1.0.5",
+ "is-symbol": "^1.0.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/es-toolkit": {
+ "version": "1.45.1",
+ "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.45.1.tgz",
+ "integrity": "sha512-/jhoOj/Fx+A+IIyDNOvO3TItGmlMKhtX8ISAHKE90c4b/k1tqaqEZ+uUqfpU8DMnW5cgNJv606zS55jGvza0Xw==",
+ "license": "MIT",
+ "workspaces": [
+ "docs",
+ "benchmarks"
+ ]
+ },
+ "node_modules/escalade": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
+ "license": "MIT"
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/eslint": {
+ "version": "9.39.4",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.4.tgz",
+ "integrity": "sha512-XoMjdBOwe/esVgEvLmNsD3IRHkm7fbKIUGvrleloJXUZgDHig2IPWNniv+GwjyJXzuNqVjlr5+4yVUZjycJwfQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.8.0",
+ "@eslint-community/regexpp": "^4.12.1",
+ "@eslint/config-array": "^0.21.2",
+ "@eslint/config-helpers": "^0.4.2",
+ "@eslint/core": "^0.17.0",
+ "@eslint/eslintrc": "^3.3.5",
+ "@eslint/js": "9.39.4",
+ "@eslint/plugin-kit": "^0.4.1",
+ "@humanfs/node": "^0.16.6",
+ "@humanwhocodes/module-importer": "^1.0.1",
+ "@humanwhocodes/retry": "^0.4.2",
+ "@types/estree": "^1.0.6",
+ "ajv": "^6.14.0",
+ "chalk": "^4.0.0",
+ "cross-spawn": "^7.0.6",
+ "debug": "^4.3.2",
+ "escape-string-regexp": "^4.0.0",
+ "eslint-scope": "^8.4.0",
+ "eslint-visitor-keys": "^4.2.1",
+ "espree": "^10.4.0",
+ "esquery": "^1.5.0",
+ "esutils": "^2.0.2",
+ "fast-deep-equal": "^3.1.3",
+ "file-entry-cache": "^8.0.0",
+ "find-up": "^5.0.0",
+ "glob-parent": "^6.0.2",
+ "ignore": "^5.2.0",
+ "imurmurhash": "^0.1.4",
+ "is-glob": "^4.0.0",
+ "json-stable-stringify-without-jsonify": "^1.0.1",
+ "lodash.merge": "^4.6.2",
+ "minimatch": "^3.1.5",
+ "natural-compare": "^1.4.0",
+ "optionator": "^0.9.3"
+ },
+ "bin": {
+ "eslint": "bin/eslint.js"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://eslint.org/donate"
+ },
+ "peerDependencies": {
+ "jiti": "*"
+ },
+ "peerDependenciesMeta": {
+ "jiti": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/eslint-config-next": {
+ "version": "16.1.6",
+ "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-16.1.6.tgz",
+ "integrity": "sha512-vKq40io2B0XtkkNDYyleATwblNt8xuh3FWp8SpSz3pt7P01OkBFlKsJZ2mWt5WsCySlDQLckb1zMY9yE9Qy0LA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@next/eslint-plugin-next": "16.1.6",
+ "eslint-import-resolver-node": "^0.3.6",
+ "eslint-import-resolver-typescript": "^3.5.2",
+ "eslint-plugin-import": "^2.32.0",
+ "eslint-plugin-jsx-a11y": "^6.10.0",
+ "eslint-plugin-react": "^7.37.0",
+ "eslint-plugin-react-hooks": "^7.0.0",
+ "globals": "16.4.0",
+ "typescript-eslint": "^8.46.0"
+ },
+ "peerDependencies": {
+ "eslint": ">=9.0.0",
+ "typescript": ">=3.3.1"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/eslint-import-resolver-node": {
+ "version": "0.3.9",
+ "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz",
+ "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^3.2.7",
+ "is-core-module": "^2.13.0",
+ "resolve": "^1.22.4"
+ }
+ },
+ "node_modules/eslint-import-resolver-node/node_modules/debug": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/eslint-import-resolver-typescript": {
+ "version": "3.10.1",
+ "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.10.1.tgz",
+ "integrity": "sha512-A1rHYb06zjMGAxdLSkN2fXPBwuSaQ0iO5M/hdyS0Ajj1VBaRp0sPD3dn1FhME3c/JluGFbwSxyCfqdSbtQLAHQ==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "@nolyfill/is-core-module": "1.0.39",
+ "debug": "^4.4.0",
+ "get-tsconfig": "^4.10.0",
+ "is-bun-module": "^2.0.0",
+ "stable-hash": "^0.0.5",
+ "tinyglobby": "^0.2.13",
+ "unrs-resolver": "^1.6.2"
+ },
+ "engines": {
+ "node": "^14.18.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint-import-resolver-typescript"
+ },
+ "peerDependencies": {
+ "eslint": "*",
+ "eslint-plugin-import": "*",
+ "eslint-plugin-import-x": "*"
+ },
+ "peerDependenciesMeta": {
+ "eslint-plugin-import": {
+ "optional": true
+ },
+ "eslint-plugin-import-x": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/eslint-module-utils": {
+ "version": "2.12.1",
+ "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz",
+ "integrity": "sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^3.2.7"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "peerDependenciesMeta": {
+ "eslint": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/eslint-module-utils/node_modules/debug": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/eslint-plugin-import": {
+ "version": "2.32.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz",
+ "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@rtsao/scc": "^1.1.0",
+ "array-includes": "^3.1.9",
+ "array.prototype.findlastindex": "^1.2.6",
+ "array.prototype.flat": "^1.3.3",
+ "array.prototype.flatmap": "^1.3.3",
+ "debug": "^3.2.7",
+ "doctrine": "^2.1.0",
+ "eslint-import-resolver-node": "^0.3.9",
+ "eslint-module-utils": "^2.12.1",
+ "hasown": "^2.0.2",
+ "is-core-module": "^2.16.1",
+ "is-glob": "^4.0.3",
+ "minimatch": "^3.1.2",
+ "object.fromentries": "^2.0.8",
+ "object.groupby": "^1.0.3",
+ "object.values": "^1.2.1",
+ "semver": "^6.3.1",
+ "string.prototype.trimend": "^1.0.9",
+ "tsconfig-paths": "^3.15.0"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "peerDependencies": {
+ "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9"
+ }
+ },
+ "node_modules/eslint-plugin-import/node_modules/debug": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/eslint-plugin-import/node_modules/json5": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
+ "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "minimist": "^1.2.0"
+ },
+ "bin": {
+ "json5": "lib/cli.js"
+ }
+ },
+ "node_modules/eslint-plugin-import/node_modules/tsconfig-paths": {
+ "version": "3.15.0",
+ "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",
+ "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/json5": "^0.0.29",
+ "json5": "^1.0.2",
+ "minimist": "^1.2.6",
+ "strip-bom": "^3.0.0"
+ }
+ },
+ "node_modules/eslint-plugin-jsx-a11y": {
+ "version": "6.10.2",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz",
+ "integrity": "sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "aria-query": "^5.3.2",
+ "array-includes": "^3.1.8",
+ "array.prototype.flatmap": "^1.3.2",
+ "ast-types-flow": "^0.0.8",
+ "axe-core": "^4.10.0",
+ "axobject-query": "^4.1.0",
+ "damerau-levenshtein": "^1.0.8",
+ "emoji-regex": "^9.2.2",
+ "hasown": "^2.0.2",
+ "jsx-ast-utils": "^3.3.5",
+ "language-tags": "^1.0.9",
+ "minimatch": "^3.1.2",
+ "object.fromentries": "^2.0.8",
+ "safe-regex-test": "^1.0.3",
+ "string.prototype.includes": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=4.0"
+ },
+ "peerDependencies": {
+ "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9"
+ }
+ },
+ "node_modules/eslint-plugin-jsx-a11y/node_modules/emoji-regex": {
+ "version": "9.2.2",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
+ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/eslint-plugin-react": {
+ "version": "7.37.5",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz",
+ "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "array-includes": "^3.1.8",
+ "array.prototype.findlast": "^1.2.5",
+ "array.prototype.flatmap": "^1.3.3",
+ "array.prototype.tosorted": "^1.1.4",
+ "doctrine": "^2.1.0",
+ "es-iterator-helpers": "^1.2.1",
+ "estraverse": "^5.3.0",
+ "hasown": "^2.0.2",
+ "jsx-ast-utils": "^2.4.1 || ^3.0.0",
+ "minimatch": "^3.1.2",
+ "object.entries": "^1.1.9",
+ "object.fromentries": "^2.0.8",
+ "object.values": "^1.2.1",
+ "prop-types": "^15.8.1",
+ "resolve": "^2.0.0-next.5",
+ "semver": "^6.3.1",
+ "string.prototype.matchall": "^4.0.12",
+ "string.prototype.repeat": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "peerDependencies": {
+ "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7"
+ }
+ },
+ "node_modules/eslint-plugin-react-hooks": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-7.0.1.tgz",
+ "integrity": "sha512-O0d0m04evaNzEPoSW+59Mezf8Qt0InfgGIBJnpC0h3NH/WjUAR7BIKUfysC6todmtiZ/A0oUVS8Gce0WhBrHsA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/core": "^7.24.4",
+ "@babel/parser": "^7.24.4",
+ "hermes-parser": "^0.25.1",
+ "zod": "^3.25.0 || ^4.0.0",
+ "zod-validation-error": "^3.5.0 || ^4.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0"
+ }
+ },
+ "node_modules/eslint-plugin-react-hooks/node_modules/zod": {
+ "version": "4.3.6",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz",
+ "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/colinhacks"
+ }
+ },
+ "node_modules/eslint-plugin-react-hooks/node_modules/zod-validation-error": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-4.0.2.tgz",
+ "integrity": "sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.0.0"
+ },
+ "peerDependencies": {
+ "zod": "^3.25.0 || ^4.0.0"
+ }
+ },
+ "node_modules/eslint-plugin-react/node_modules/resolve": {
+ "version": "2.0.0-next.6",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.6.tgz",
+ "integrity": "sha512-3JmVl5hMGtJ3kMmB3zi3DL25KfkCEyy3Tw7Gmw7z5w8M9WlwoPFnIvwChzu1+cF3iaK3sp18hhPz8ANeimdJfA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "is-core-module": "^2.16.1",
+ "node-exports-info": "^1.6.0",
+ "object-keys": "^1.1.1",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ },
+ "bin": {
+ "resolve": "bin/resolve"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/eslint-scope": {
+ "version": "8.4.0",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz",
+ "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "esrecurse": "^4.3.0",
+ "estraverse": "^5.2.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/eslint-visitor-keys": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
+ "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/eslint/node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/eslint/node_modules/glob-parent": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
+ "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "is-glob": "^4.0.3"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/espree": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz",
+ "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-jsx": "^5.3.2",
+ "eslint-visitor-keys": "^4.2.1"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "license": "BSD-2-Clause",
+ "bin": {
+ "esparse": "bin/esparse.js",
+ "esvalidate": "bin/esvalidate.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/esquery": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz",
+ "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "estraverse": "^5.1.0"
+ },
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/esrecurse": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
+ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "estraverse": "^5.2.0"
+ },
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/estraverse": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/estree-util-is-identifier-name": {
+ "version": "3.0.0",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/etag": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/eventemitter3": {
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz",
+ "integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==",
+ "license": "MIT"
+ },
+ "node_modules/eventsource": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz",
+ "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==",
+ "license": "MIT",
+ "dependencies": {
+ "eventsource-parser": "^3.0.1"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/eventsource-parser": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.6.tgz",
+ "integrity": "sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/execa": {
+ "version": "9.6.1",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-9.6.1.tgz",
+ "integrity": "sha512-9Be3ZoN4LmYR90tUoVu2te2BsbzHfhJyfEiAVfz7N5/zv+jduIfLrV2xdQXOHbaD6KgpGdO9PRPM1Y4Q9QkPkA==",
+ "license": "MIT",
+ "dependencies": {
+ "@sindresorhus/merge-streams": "^4.0.0",
+ "cross-spawn": "^7.0.6",
+ "figures": "^6.1.0",
+ "get-stream": "^9.0.0",
+ "human-signals": "^8.0.1",
+ "is-plain-obj": "^4.1.0",
+ "is-stream": "^4.0.1",
+ "npm-run-path": "^6.0.0",
+ "pretty-ms": "^9.2.0",
+ "signal-exit": "^4.1.0",
+ "strip-final-newline": "^4.0.0",
+ "yoctocolors": "^2.1.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.5.0"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/execa?sponsor=1"
+ }
+ },
+ "node_modules/express": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",
+ "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
+ "license": "MIT",
+ "dependencies": {
+ "accepts": "^2.0.0",
+ "body-parser": "^2.2.1",
+ "content-disposition": "^1.0.0",
+ "content-type": "^1.0.5",
+ "cookie": "^0.7.1",
+ "cookie-signature": "^1.2.1",
+ "debug": "^4.4.0",
+ "depd": "^2.0.0",
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "etag": "^1.8.1",
+ "finalhandler": "^2.1.0",
+ "fresh": "^2.0.0",
+ "http-errors": "^2.0.0",
+ "merge-descriptors": "^2.0.0",
+ "mime-types": "^3.0.0",
+ "on-finished": "^2.4.1",
+ "once": "^1.4.0",
+ "parseurl": "^1.3.3",
+ "proxy-addr": "^2.0.7",
+ "qs": "^6.14.0",
+ "range-parser": "^1.2.1",
+ "router": "^2.2.0",
+ "send": "^1.1.0",
+ "serve-static": "^2.2.0",
+ "statuses": "^2.0.1",
+ "type-is": "^2.0.1",
+ "vary": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/express-rate-limit": {
+ "version": "8.3.1",
+ "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.3.1.tgz",
+ "integrity": "sha512-D1dKN+cmyPWuvB+G2SREQDzPY1agpBIcTa9sJxOPMCNeH3gwzhqJRDWCXW3gg0y//+LQ/8j52JbMROWyrKdMdw==",
+ "license": "MIT",
+ "dependencies": {
+ "ip-address": "10.1.0"
+ },
+ "engines": {
+ "node": ">= 16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/express-rate-limit"
+ },
+ "peerDependencies": {
+ "express": ">= 4.11"
+ }
+ },
+ "node_modules/express/node_modules/cookie": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
+ "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/extend": {
+ "version": "3.0.2",
+ "license": "MIT"
+ },
+ "node_modules/fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "license": "MIT"
+ },
+ "node_modules/fast-glob": {
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",
+ "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",
+ "license": "MIT",
+ "dependencies": {
+ "@nodelib/fs.stat": "^2.0.2",
+ "@nodelib/fs.walk": "^1.2.3",
+ "glob-parent": "^5.1.2",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.8"
+ },
+ "engines": {
+ "node": ">=8.6.0"
+ }
+ },
+ "node_modules/fast-json-stable-stringify": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/fast-levenshtein": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/fast-uri": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz",
+ "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/fastify"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/fastify"
+ }
+ ],
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/fastq": {
+ "version": "1.20.1",
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz",
+ "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==",
+ "license": "ISC",
+ "dependencies": {
+ "reusify": "^1.0.4"
+ }
+ },
+ "node_modules/fdir": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "picomatch": "^3 || ^4"
+ },
+ "peerDependenciesMeta": {
+ "picomatch": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/fetch-blob": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
+ "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/jimmywarting"
+ },
+ {
+ "type": "paypal",
+ "url": "https://paypal.me/jimmywarting"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "node-domexception": "^1.0.0",
+ "web-streams-polyfill": "^3.0.3"
+ },
+ "engines": {
+ "node": "^12.20 || >= 14.13"
+ }
+ },
+ "node_modules/figures": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/figures/-/figures-6.1.0.tgz",
+ "integrity": "sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==",
+ "license": "MIT",
+ "dependencies": {
+ "is-unicode-supported": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/file-entry-cache": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz",
+ "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "flat-cache": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=16.0.0"
+ }
+ },
+ "node_modules/fill-range": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
+ "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
+ "license": "MIT",
+ "dependencies": {
+ "to-regex-range": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/finalhandler": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz",
+ "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.4.0",
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "on-finished": "^2.4.1",
+ "parseurl": "^1.3.3",
+ "statuses": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/find-up": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "locate-path": "^6.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/flat-cache": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz",
+ "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "flatted": "^3.2.9",
+ "keyv": "^4.5.4"
+ },
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/flatted": {
+ "version": "3.4.1",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.1.tgz",
+ "integrity": "sha512-IxfVbRFVlV8V/yRaGzk0UVIcsKKHMSfYw66T/u4nTwlWteQePsxe//LjudR1AMX4tZW3WFCh3Zqa/sjlqpbURQ==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/for-each": {
+ "version": "0.3.5",
+ "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz",
+ "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-callable": "^1.2.7"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/formdata-polyfill": {
+ "version": "4.0.10",
+ "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
+ "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
+ "license": "MIT",
+ "dependencies": {
+ "fetch-blob": "^3.1.2"
+ },
+ "engines": {
+ "node": ">=12.20.0"
+ }
+ },
+ "node_modules/forwarded": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/framer-motion": {
+ "version": "12.35.2",
+ "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.35.2.tgz",
+ "integrity": "sha512-dhfuEMaNo0hc+AEqyHiIfiJRNb9U9UQutE9FoKm5pjf7CMitp9xPEF1iWZihR1q86LBmo6EJ7S8cN8QXEy49AA==",
+ "license": "MIT",
+ "dependencies": {
+ "motion-dom": "^12.35.2",
+ "motion-utils": "^12.29.2",
+ "tslib": "^2.4.0"
+ },
+ "peerDependencies": {
+ "@emotion/is-prop-valid": "*",
+ "react": "^18.0.0 || ^19.0.0",
+ "react-dom": "^18.0.0 || ^19.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@emotion/is-prop-valid": {
+ "optional": true
+ },
+ "react": {
+ "optional": true
+ },
+ "react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/fresh": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
+ "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/fs-extra": {
+ "version": "11.3.4",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.4.tgz",
+ "integrity": "sha512-CTXd6rk/M3/ULNQj8FBqBWHYBVYybQ3VPBw0xGKFe3tuH7ytT6ACnvzpIQ3UZtB8yvUKC2cXn1a+x+5EVQLovA==",
+ "license": "MIT",
+ "dependencies": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=14.14"
+ }
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/function.prototype.name": {
+ "version": "1.1.8",
+ "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz",
+ "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.3",
+ "define-properties": "^1.2.1",
+ "functions-have-names": "^1.2.3",
+ "hasown": "^2.0.2",
+ "is-callable": "^1.2.7"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/functions-have-names": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz",
+ "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/fuzzysort": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/fuzzysort/-/fuzzysort-3.1.0.tgz",
+ "integrity": "sha512-sR9BNCjBg6LNgwvxlBd0sBABvQitkLzoVY9MYYROQVX/FvfJ4Mai9LsGhDgd8qYdds0bY77VzYd5iuB+v5rwQQ==",
+ "license": "MIT"
+ },
+ "node_modules/fzf": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/fzf/-/fzf-0.5.2.tgz",
+ "integrity": "sha512-Tt4kuxLXFKHy8KT40zwsUPUkg1CrsgY25FxA2U/j/0WgEDCk3ddc/zLTCCcbSHX9FcKtLuVaDGtGE/STWC+j3Q==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/generator-function": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz",
+ "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/gensync": {
+ "version": "1.0.0-beta.2",
+ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
+ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+ "license": "ISC",
+ "engines": {
+ "node": "6.* || 8.* || >= 10.*"
+ }
+ },
+ "node_modules/get-east-asian-width": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.5.0.tgz",
+ "integrity": "sha512-CQ+bEO+Tva/qlmw24dCejulK5pMzVnUOFOijVogd3KQs07HnRIgp8TGipvCCRT06xeYEbpbgwaCxglFyiuIcmA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
+ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "es-define-property": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
+ "function-bind": "^1.1.2",
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "hasown": "^2.0.2",
+ "math-intrinsics": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-own-enumerable-keys": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/get-own-enumerable-keys/-/get-own-enumerable-keys-1.0.0.tgz",
+ "integrity": "sha512-PKsK2FSrQCyxcGHsGrLDcK0lx+0Ke+6e8KFFozA9/fIQLhQzPaRvJFdcz7+Axg3jUH/Mq+NI4xa5u/UT2tQskA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=14.16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/get-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
+ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
+ "license": "MIT",
+ "dependencies": {
+ "dunder-proto": "^1.0.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/get-stream": {
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-9.0.1.tgz",
+ "integrity": "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==",
+ "license": "MIT",
+ "dependencies": {
+ "@sec-ant/readable-stream": "^0.4.1",
+ "is-stream": "^4.0.1"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/get-symbol-description": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz",
+ "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.6"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-tsconfig": {
+ "version": "4.13.6",
+ "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.6.tgz",
+ "integrity": "sha512-shZT/QMiSHc/YBLxxOkMtgSid5HFoauqCE3/exfsEcwg1WkeqjG+V40yBbBrsD+jW2HDXcs28xOfcbm2jI8Ddw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "resolve-pkg-maps": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
+ }
+ },
+ "node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "license": "ISC",
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/globals": {
+ "version": "16.4.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-16.4.0.tgz",
+ "integrity": "sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/globalthis": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz",
+ "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "define-properties": "^1.2.1",
+ "gopd": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/gopd": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "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==",
+ "license": "ISC"
+ },
+ "node_modules/graphql": {
+ "version": "16.13.1",
+ "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.13.1.tgz",
+ "integrity": "sha512-gGgrVCoDKlIZ8fIqXBBb0pPKqDgki0Z/FSKNiQzSGj2uEYHr1tq5wmBegGwJx6QB5S5cM0khSBpi/JFHMCvsmQ==",
+ "license": "MIT",
+ "engines": {
+ "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0"
+ }
+ },
+ "node_modules/has-bigints": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz",
+ "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/has-property-descriptors": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
+ "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "es-define-property": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-proto": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz",
+ "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "dunder-proto": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
+ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-tostringtag": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
+ "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-symbols": "^1.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/hasown": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
+ "license": "MIT",
+ "dependencies": {
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/hast-util-to-html": {
+ "version": "9.0.5",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "@types/unist": "^3.0.0",
+ "ccount": "^2.0.0",
+ "comma-separated-tokens": "^2.0.0",
+ "hast-util-whitespace": "^3.0.0",
+ "html-void-elements": "^3.0.0",
+ "mdast-util-to-hast": "^13.0.0",
+ "property-information": "^7.0.0",
+ "space-separated-tokens": "^2.0.0",
+ "stringify-entities": "^4.0.0",
+ "zwitch": "^2.0.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/hast-util-to-jsx-runtime": {
+ "version": "2.3.6",
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "^1.0.0",
+ "@types/hast": "^3.0.0",
+ "@types/unist": "^3.0.0",
+ "comma-separated-tokens": "^2.0.0",
+ "devlop": "^1.0.0",
+ "estree-util-is-identifier-name": "^3.0.0",
+ "hast-util-whitespace": "^3.0.0",
+ "mdast-util-mdx-expression": "^2.0.0",
+ "mdast-util-mdx-jsx": "^3.0.0",
+ "mdast-util-mdxjs-esm": "^2.0.0",
+ "property-information": "^7.0.0",
+ "space-separated-tokens": "^2.0.0",
+ "style-to-js": "^1.0.0",
+ "unist-util-position": "^5.0.0",
+ "vfile-message": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/hast-util-whitespace": {
+ "version": "3.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/headers-polyfill": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-4.0.3.tgz",
+ "integrity": "sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==",
+ "license": "MIT"
+ },
+ "node_modules/hermes-estree": {
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.25.1.tgz",
+ "integrity": "sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/hermes-parser": {
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.25.1.tgz",
+ "integrity": "sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "hermes-estree": "0.25.1"
+ }
+ },
+ "node_modules/hono": {
+ "version": "4.12.5",
+ "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.5.tgz",
+ "integrity": "sha512-3qq+FUBtlTHhtYxbxheZgY8NIFnkkC/MR8u5TTsr7YZ3wixryQ3cCwn3iZbg8p8B88iDBBAYSfZDS75t8MN7Vg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=16.9.0"
+ }
+ },
+ "node_modules/html-url-attributes": {
+ "version": "3.0.1",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/html-void-elements": {
+ "version": "3.0.0",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/http-errors": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
+ "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
+ "license": "MIT",
+ "dependencies": {
+ "depd": "~2.0.0",
+ "inherits": "~2.0.4",
+ "setprototypeof": "~1.2.0",
+ "statuses": "~2.0.2",
+ "toidentifier": "~1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/https-proxy-agent": {
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",
+ "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",
+ "license": "MIT",
+ "dependencies": {
+ "agent-base": "^7.1.2",
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/human-signals": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-8.0.1.tgz",
+ "integrity": "sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=18.18.0"
+ }
+ },
+ "node_modules/iceberg-js": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/iceberg-js/-/iceberg-js-0.8.1.tgz",
+ "integrity": "sha512-1dhVQZXhcHje7798IVM+xoo/1ZdVfzOMIc8/rgVSijRK38EDqOJoGula9N/8ZI5RD8QTxNQtK/Gozpr+qUqRRA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/iconv-lite": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz",
+ "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==",
+ "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/icu-minify": {
+ "version": "4.8.3",
+ "resolved": "https://registry.npmjs.org/icu-minify/-/icu-minify-4.8.3.tgz",
+ "integrity": "sha512-65Av7FLosNk7bPbmQx5z5XG2Y3T2GFppcjiXh4z1idHeVgQxlDpAmkGoYI0eFzAvrOnjpWTL5FmPDhsdfRMPEA==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/amannn"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "@formatjs/icu-messageformat-parser": "^3.4.0"
+ }
+ },
+ "node_modules/ignore": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
+ "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/immer": {
+ "version": "10.2.0",
+ "resolved": "https://registry.npmjs.org/immer/-/immer-10.2.0.tgz",
+ "integrity": "sha512-d/+XTN3zfODyjr89gM3mPq1WNX2B8pYsu7eORitdwyA2sBubnTl3laYlBk4sXY5FUa5qTZGBDPJICVbvqzjlbw==",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/immer"
+ }
+ },
+ "node_modules/import-fresh": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz",
+ "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==",
+ "license": "MIT",
+ "dependencies": {
+ "parent-module": "^1.0.0",
+ "resolve-from": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/imurmurhash": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.8.19"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "license": "ISC"
+ },
+ "node_modules/inline-style-parser": {
+ "version": "0.2.7",
+ "license": "MIT"
+ },
+ "node_modules/internal-slot": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz",
+ "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "hasown": "^2.0.2",
+ "side-channel": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "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/intl-messageformat": {
+ "version": "11.1.2",
+ "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-11.1.2.tgz",
+ "integrity": "sha512-ucSrQmZGAxfiBHfBRXW/k7UC8MaGFlEj4Ry1tKiDcmgwQm1y3EDl40u+4VNHYomxJQMJi9NEI3riDRlth96jKg==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "@formatjs/ecma402-abstract": "3.1.1",
+ "@formatjs/fast-memoize": "3.1.0",
+ "@formatjs/icu-messageformat-parser": "3.5.1",
+ "tslib": "^2.8.1"
+ }
+ },
+ "node_modules/ip-address": {
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz",
+ "integrity": "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 12"
+ }
+ },
+ "node_modules/ipaddr.js": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/is-alphabetical": {
+ "version": "2.0.1",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/is-alphanumerical": {
+ "version": "2.0.1",
+ "license": "MIT",
+ "dependencies": {
+ "is-alphabetical": "^2.0.0",
+ "is-decimal": "^2.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/is-array-buffer": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz",
+ "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.3",
+ "get-intrinsic": "^1.2.6"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-arrayish": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
+ "license": "MIT"
+ },
+ "node_modules/is-async-function": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz",
+ "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "async-function": "^1.0.0",
+ "call-bound": "^1.0.3",
+ "get-proto": "^1.0.1",
+ "has-tostringtag": "^1.0.2",
+ "safe-regex-test": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-bigint": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz",
+ "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-bigints": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-boolean-object": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz",
+ "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "has-tostringtag": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-bun-module": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-2.0.0.tgz",
+ "integrity": "sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "semver": "^7.7.1"
+ }
+ },
+ "node_modules/is-bun-module/node_modules/semver": {
+ "version": "7.7.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz",
+ "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/is-callable": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
+ "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-core-module": {
+ "version": "2.16.1",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",
+ "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "hasown": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-data-view": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz",
+ "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "get-intrinsic": "^1.2.6",
+ "is-typed-array": "^1.1.13"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-date-object": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz",
+ "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "has-tostringtag": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-decimal": {
+ "version": "2.0.1",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/is-docker": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz",
+ "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==",
+ "license": "MIT",
+ "bin": {
+ "is-docker": "cli.js"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-finalizationregistry": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz",
+ "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-generator-function": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz",
+ "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.4",
+ "generator-function": "^2.0.0",
+ "get-proto": "^1.0.1",
+ "has-tostringtag": "^1.0.2",
+ "safe-regex-test": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "license": "MIT",
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-hexadecimal": {
+ "version": "2.0.1",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/is-in-ssh": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-in-ssh/-/is-in-ssh-1.0.0.tgz",
+ "integrity": "sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-inside-container": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz",
+ "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==",
+ "license": "MIT",
+ "dependencies": {
+ "is-docker": "^3.0.0"
+ },
+ "bin": {
+ "is-inside-container": "cli.js"
+ },
+ "engines": {
+ "node": ">=14.16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-interactive": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz",
+ "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-map": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz",
+ "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-negative-zero": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz",
+ "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-node-process": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/is-node-process/-/is-node-process-1.2.0.tgz",
+ "integrity": "sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==",
+ "license": "MIT"
+ },
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "node_modules/is-number-object": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz",
+ "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "has-tostringtag": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-obj": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-3.0.0.tgz",
+ "integrity": "sha512-IlsXEHOjtKhpN8r/tRFj2nDyTmHvcfNeu/nrRIcXE17ROeatXchkojffa1SpdqW4cr/Fj6QkEf/Gn4zf6KKvEQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-plain-obj": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz",
+ "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-promise": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
+ "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
+ "license": "MIT"
+ },
+ "node_modules/is-regex": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz",
+ "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "gopd": "^1.2.0",
+ "has-tostringtag": "^1.0.2",
+ "hasown": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-regexp": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-3.1.0.tgz",
+ "integrity": "sha512-rbku49cWloU5bSMI+zaRaXdQHXnthP6DZ/vLnfdSKyL4zUzuWnomtOEiZZOd+ioQ+avFo/qau3KPTc7Fjy1uPA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-set": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz",
+ "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-shared-array-buffer": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz",
+ "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-stream": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz",
+ "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-string": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz",
+ "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "has-tostringtag": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-symbol": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz",
+ "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "has-symbols": "^1.1.0",
+ "safe-regex-test": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-typed-array": {
+ "version": "1.1.15",
+ "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz",
+ "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "which-typed-array": "^1.1.16"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-unicode-supported": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz",
+ "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-weakmap": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz",
+ "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-weakref": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz",
+ "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-weakset": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz",
+ "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "get-intrinsic": "^1.2.6"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-wsl": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.1.tgz",
+ "integrity": "sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==",
+ "license": "MIT",
+ "dependencies": {
+ "is-inside-container": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/isarray": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
+ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
+ "license": "ISC"
+ },
+ "node_modules/iterator.prototype": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz",
+ "integrity": "sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "define-data-property": "^1.1.4",
+ "es-object-atoms": "^1.0.0",
+ "get-intrinsic": "^1.2.6",
+ "get-proto": "^1.0.0",
+ "has-symbols": "^1.1.0",
+ "set-function-name": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/jiti": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz",
+ "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "jiti": "lib/jiti-cli.mjs"
+ }
+ },
+ "node_modules/jose": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/jose/-/jose-6.2.1.tgz",
+ "integrity": "sha512-jUaKr1yrbfaImV7R2TN/b3IcZzsw38/chqMpo2XJ7i2F8AfM/lA4G1goC3JVEwg0H7UldTmSt3P68nt31W7/mw==",
+ "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/js-yaml": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
+ "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
+ "license": "MIT",
+ "dependencies": {
+ "argparse": "^2.0.1"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ }
+ },
+ "node_modules/jsesc": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
+ "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",
+ "license": "MIT",
+ "bin": {
+ "jsesc": "bin/jsesc"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/json-buffer": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
+ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/json-parse-even-better-errors": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
+ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
+ "license": "MIT"
+ },
+ "node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/json-schema-typed": {
+ "version": "8.0.2",
+ "resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-8.0.2.tgz",
+ "integrity": "sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==",
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/json-stable-stringify-without-jsonify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
+ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/json5": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
+ "license": "MIT",
+ "bin": {
+ "json5": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/jsonfile": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz",
+ "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==",
+ "license": "MIT",
+ "dependencies": {
+ "universalify": "^2.0.0"
+ },
+ "optionalDependencies": {
+ "graceful-fs": "^4.1.6"
+ }
+ },
+ "node_modules/jsx-ast-utils": {
+ "version": "3.3.5",
+ "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz",
+ "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "array-includes": "^3.1.6",
+ "array.prototype.flat": "^1.3.1",
+ "object.assign": "^4.1.4",
+ "object.values": "^1.1.6"
+ },
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/keyv": {
+ "version": "4.5.4",
+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
+ "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "json-buffer": "3.0.1"
+ }
+ },
+ "node_modules/kleur": {
+ "version": "4.1.5",
+ "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",
+ "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/language-subtag-registry": {
+ "version": "0.3.23",
+ "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz",
+ "integrity": "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==",
+ "dev": true,
+ "license": "CC0-1.0"
+ },
+ "node_modules/language-tags": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz",
+ "integrity": "sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "language-subtag-registry": "^0.3.20"
+ },
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/levn": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
+ "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "prelude-ls": "^1.2.1",
+ "type-check": "~0.4.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/lightningcss": {
+ "version": "1.31.1",
+ "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.31.1.tgz",
+ "integrity": "sha512-l51N2r93WmGUye3WuFoN5k10zyvrVs0qfKBhyC5ogUQ6Ew6JUSswh78mbSO+IU3nTWsyOArqPCcShdQSadghBQ==",
+ "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.31.1",
+ "lightningcss-darwin-arm64": "1.31.1",
+ "lightningcss-darwin-x64": "1.31.1",
+ "lightningcss-freebsd-x64": "1.31.1",
+ "lightningcss-linux-arm-gnueabihf": "1.31.1",
+ "lightningcss-linux-arm64-gnu": "1.31.1",
+ "lightningcss-linux-arm64-musl": "1.31.1",
+ "lightningcss-linux-x64-gnu": "1.31.1",
+ "lightningcss-linux-x64-musl": "1.31.1",
+ "lightningcss-win32-arm64-msvc": "1.31.1",
+ "lightningcss-win32-x64-msvc": "1.31.1"
+ }
+ },
+ "node_modules/lightningcss-darwin-arm64": {
+ "version": "1.31.1",
+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.31.1.tgz",
+ "integrity": "sha512-02uTEqf3vIfNMq3h/z2cJfcOXnQ0GRwQrkmPafhueLb2h7mqEidiCzkE4gBMEH65abHRiQvhdcQ+aP0D0g67sg==",
+ "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/lines-and-columns": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
+ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
+ "license": "MIT"
+ },
+ "node_modules/locate-path": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "p-locate": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/lodash.merge": {
+ "version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
+ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/log-symbols": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-6.0.0.tgz",
+ "integrity": "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==",
+ "license": "MIT",
+ "dependencies": {
+ "chalk": "^5.3.0",
+ "is-unicode-supported": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/log-symbols/node_modules/is-unicode-supported": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz",
+ "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/longest-streak": {
+ "version": "3.1.0",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "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==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "js-tokens": "^3.0.0 || ^4.0.0"
+ },
+ "bin": {
+ "loose-envify": "cli.js"
+ }
+ },
+ "node_modules/lru-cache": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+ "license": "ISC",
+ "dependencies": {
+ "yallist": "^3.0.2"
+ }
+ },
+ "node_modules/lucide-react": {
+ "version": "0.577.0",
+ "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.577.0.tgz",
+ "integrity": "sha512-4LjoFv2eEPwYDPg/CUdBJQSDfPyzXCRrVW1X7jrx/trgxnxkHFjnVZINbzvzxjN70dxychOfg+FTYwBiS3pQ5A==",
+ "license": "ISC",
+ "peerDependencies": {
+ "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0"
+ }
+ },
+ "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/markdown-table": {
+ "version": "3.0.4",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/marked": {
+ "version": "18.0.0",
+ "resolved": "https://registry.npmjs.org/marked/-/marked-18.0.0.tgz",
+ "integrity": "sha512-2e7Qiv/HJSXj8rDEpgTvGKsP8yYtI9xXHKDnrftrmnrJPaFNM7VRb2YCzWaX4BP1iCJ/XPduzDJZMFoqTCcIMA==",
+ "license": "MIT",
+ "bin": {
+ "marked": "bin/marked.js"
+ },
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/math-intrinsics": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/mdast-util-find-and-replace": {
+ "version": "3.0.2",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "escape-string-regexp": "^5.0.0",
+ "unist-util-is": "^6.0.0",
+ "unist-util-visit-parents": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp": {
+ "version": "5.0.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/mdast-util-from-markdown": {
+ "version": "2.0.3",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "@types/unist": "^3.0.0",
+ "decode-named-character-reference": "^1.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-to-string": "^4.0.0",
+ "micromark": "^4.0.0",
+ "micromark-util-decode-numeric-character-reference": "^2.0.0",
+ "micromark-util-decode-string": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0",
+ "unist-util-stringify-position": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-gfm": {
+ "version": "3.1.0",
+ "license": "MIT",
+ "dependencies": {
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-gfm-autolink-literal": "^2.0.0",
+ "mdast-util-gfm-footnote": "^2.0.0",
+ "mdast-util-gfm-strikethrough": "^2.0.0",
+ "mdast-util-gfm-table": "^2.0.0",
+ "mdast-util-gfm-task-list-item": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-gfm-autolink-literal": {
+ "version": "2.0.1",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "ccount": "^2.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-find-and-replace": "^3.0.0",
+ "micromark-util-character": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-gfm-footnote": {
+ "version": "2.1.0",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.1.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-gfm-strikethrough": {
+ "version": "2.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-gfm-table": {
+ "version": "2.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "markdown-table": "^3.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-gfm-task-list-item": {
+ "version": "2.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-mdx-expression": {
+ "version": "2.0.1",
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree-jsx": "^1.0.0",
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-mdx-jsx": {
+ "version": "3.2.0",
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree-jsx": "^1.0.0",
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "@types/unist": "^3.0.0",
+ "ccount": "^2.0.0",
+ "devlop": "^1.1.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0",
+ "parse-entities": "^4.0.0",
+ "stringify-entities": "^4.0.0",
+ "unist-util-stringify-position": "^4.0.0",
+ "vfile-message": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-mdxjs-esm": {
+ "version": "2.0.1",
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree-jsx": "^1.0.0",
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-newline-to-break": {
+ "version": "2.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "mdast-util-find-and-replace": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-phrasing": {
+ "version": "4.1.0",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "unist-util-is": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-to-hast": {
+ "version": "13.2.1",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "@ungap/structured-clone": "^1.0.0",
+ "devlop": "^1.0.0",
+ "micromark-util-sanitize-uri": "^2.0.0",
+ "trim-lines": "^3.0.0",
+ "unist-util-position": "^5.0.0",
+ "unist-util-visit": "^5.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-to-markdown": {
+ "version": "2.1.2",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "@types/unist": "^3.0.0",
+ "longest-streak": "^3.0.0",
+ "mdast-util-phrasing": "^4.0.0",
+ "mdast-util-to-string": "^4.0.0",
+ "micromark-util-classify-character": "^2.0.0",
+ "micromark-util-decode-string": "^2.0.0",
+ "unist-util-visit": "^5.0.0",
+ "zwitch": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-to-string": {
+ "version": "4.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/media-typer": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",
+ "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/merge-descriptors": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz",
+ "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/merge-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
+ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
+ "license": "MIT"
+ },
+ "node_modules/merge2": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
+ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/micromark": {
+ "version": "4.0.2",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "@types/debug": "^4.0.0",
+ "debug": "^4.0.0",
+ "decode-named-character-reference": "^1.0.0",
+ "devlop": "^1.0.0",
+ "micromark-core-commonmark": "^2.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-combine-extensions": "^2.0.0",
+ "micromark-util-decode-numeric-character-reference": "^2.0.0",
+ "micromark-util-encode": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-resolve-all": "^2.0.0",
+ "micromark-util-sanitize-uri": "^2.0.0",
+ "micromark-util-subtokenize": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-core-commonmark": {
+ "version": "2.0.3",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "decode-named-character-reference": "^1.0.0",
+ "devlop": "^1.0.0",
+ "micromark-factory-destination": "^2.0.0",
+ "micromark-factory-label": "^2.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-factory-title": "^2.0.0",
+ "micromark-factory-whitespace": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-classify-character": "^2.0.0",
+ "micromark-util-html-tag-name": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-resolve-all": "^2.0.0",
+ "micromark-util-subtokenize": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-extension-gfm": {
+ "version": "3.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "micromark-extension-gfm-autolink-literal": "^2.0.0",
+ "micromark-extension-gfm-footnote": "^2.0.0",
+ "micromark-extension-gfm-strikethrough": "^2.0.0",
+ "micromark-extension-gfm-table": "^2.0.0",
+ "micromark-extension-gfm-tagfilter": "^2.0.0",
+ "micromark-extension-gfm-task-list-item": "^2.0.0",
+ "micromark-util-combine-extensions": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-extension-gfm-autolink-literal": {
+ "version": "2.1.0",
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-sanitize-uri": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-extension-gfm-footnote": {
+ "version": "2.1.0",
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-core-commonmark": "^2.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-sanitize-uri": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-extension-gfm-strikethrough": {
+ "version": "2.1.0",
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-classify-character": "^2.0.0",
+ "micromark-util-resolve-all": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-extension-gfm-table": {
+ "version": "2.1.1",
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-extension-gfm-tagfilter": {
+ "version": "2.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-extension-gfm-task-list-item": {
+ "version": "2.1.0",
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-factory-destination": {
+ "version": "2.0.1",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-factory-label": {
+ "version": "2.0.1",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-factory-space": {
+ "version": "2.0.1",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-factory-title": {
+ "version": "2.0.1",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-factory-whitespace": {
+ "version": "2.0.1",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-character": {
+ "version": "2.1.1",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-chunked": {
+ "version": "2.0.1",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-symbol": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-classify-character": {
+ "version": "2.0.1",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-combine-extensions": {
+ "version": "2.0.1",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-decode-numeric-character-reference": {
+ "version": "2.0.2",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-symbol": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-decode-string": {
+ "version": "2.0.1",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "decode-named-character-reference": "^1.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-decode-numeric-character-reference": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-encode": {
+ "version": "2.0.1",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/micromark-util-html-tag-name": {
+ "version": "2.0.1",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/micromark-util-normalize-identifier": {
+ "version": "2.0.1",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-symbol": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-resolve-all": {
+ "version": "2.0.1",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-sanitize-uri": {
+ "version": "2.0.1",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-encode": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-subtokenize": {
+ "version": "2.1.0",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-symbol": {
+ "version": "2.0.1",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/micromark-util-types": {
+ "version": "2.0.2",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/micromatch": {
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
+ "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
+ "license": "MIT",
+ "dependencies": {
+ "braces": "^3.0.3",
+ "picomatch": "^2.3.1"
+ },
+ "engines": {
+ "node": ">=8.6"
+ }
+ },
+ "node_modules/micromatch/node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.54.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",
+ "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz",
+ "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-db": "^1.54.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/mimic-fn": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/mimic-function": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz",
+ "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/minimatch": {
+ "version": "3.1.5",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",
+ "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/minimist": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
+ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/motion-dom": {
+ "version": "12.35.2",
+ "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-12.35.2.tgz",
+ "integrity": "sha512-pWXFMTwvGDbx1Fe9YL5HZebv2NhvGBzRtiNUv58aoK7+XrsuaydQ0JGRKK2r+bTKlwgSWwWxHbP5249Qr/BNpg==",
+ "license": "MIT",
+ "dependencies": {
+ "motion-utils": "^12.29.2"
+ }
+ },
+ "node_modules/motion-utils": {
+ "version": "12.29.2",
+ "resolved": "https://registry.npmjs.org/motion-utils/-/motion-utils-12.29.2.tgz",
+ "integrity": "sha512-G3kc34H2cX2gI63RqU+cZq+zWRRPSsNIOjpdl9TN4AQwC4sgwYPl/Q/Obf/d53nOm569T0fYK+tcoSV50BWx8A==",
+ "license": "MIT"
+ },
+ "node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/msw": {
+ "version": "2.12.10",
+ "resolved": "https://registry.npmjs.org/msw/-/msw-2.12.10.tgz",
+ "integrity": "sha512-G3VUymSE0/iegFnuipujpwyTM2GuZAKXNeerUSrG2+Eg391wW63xFs5ixWsK9MWzr1AGoSkYGmyAzNgbR3+urw==",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "dependencies": {
+ "@inquirer/confirm": "^5.0.0",
+ "@mswjs/interceptors": "^0.41.2",
+ "@open-draft/deferred-promise": "^2.2.0",
+ "@types/statuses": "^2.0.6",
+ "cookie": "^1.0.2",
+ "graphql": "^16.12.0",
+ "headers-polyfill": "^4.0.2",
+ "is-node-process": "^1.2.0",
+ "outvariant": "^1.4.3",
+ "path-to-regexp": "^6.3.0",
+ "picocolors": "^1.1.1",
+ "rettime": "^0.10.1",
+ "statuses": "^2.0.2",
+ "strict-event-emitter": "^0.5.1",
+ "tough-cookie": "^6.0.0",
+ "type-fest": "^5.2.0",
+ "until-async": "^3.0.2",
+ "yargs": "^17.7.2"
+ },
+ "bin": {
+ "msw": "cli/index.js"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/mswjs"
+ },
+ "peerDependencies": {
+ "typescript": ">= 4.8.x"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/mute-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz",
+ "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==",
+ "license": "ISC",
+ "engines": {
+ "node": "^18.17.0 || >=20.5.0"
+ }
+ },
+ "node_modules/nanoid": {
+ "version": "3.3.11",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
+ "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
+ "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-postinstall": {
+ "version": "0.3.4",
+ "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz",
+ "integrity": "sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "napi-postinstall": "lib/cli.js"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.18.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/napi-postinstall"
+ }
+ },
+ "node_modules/natural-compare": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
+ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/negotiator": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz",
+ "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/next": {
+ "version": "16.1.6",
+ "resolved": "https://registry.npmjs.org/next/-/next-16.1.6.tgz",
+ "integrity": "sha512-hkyRkcu5x/41KoqnROkfTm2pZVbKxvbZRuNvKXLRXxs3VfyO0WhY50TQS40EuKO9SW3rBj/sF3WbVwDACeMZyw==",
+ "license": "MIT",
+ "dependencies": {
+ "@next/env": "16.1.6",
+ "@swc/helpers": "0.5.15",
+ "baseline-browser-mapping": "^2.8.3",
+ "caniuse-lite": "^1.0.30001579",
+ "postcss": "8.4.31",
+ "styled-jsx": "5.1.6"
+ },
+ "bin": {
+ "next": "dist/bin/next"
+ },
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "optionalDependencies": {
+ "@next/swc-darwin-arm64": "16.1.6",
+ "@next/swc-darwin-x64": "16.1.6",
+ "@next/swc-linux-arm64-gnu": "16.1.6",
+ "@next/swc-linux-arm64-musl": "16.1.6",
+ "@next/swc-linux-x64-gnu": "16.1.6",
+ "@next/swc-linux-x64-musl": "16.1.6",
+ "@next/swc-win32-arm64-msvc": "16.1.6",
+ "@next/swc-win32-x64-msvc": "16.1.6",
+ "sharp": "^0.34.4"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.1.0",
+ "@playwright/test": "^1.51.1",
+ "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-intl": {
+ "version": "4.8.3",
+ "resolved": "https://registry.npmjs.org/next-intl/-/next-intl-4.8.3.tgz",
+ "integrity": "sha512-PvdBDWg+Leh7BR7GJUQbCDVVaBRn37GwDBWc9sv0rVQOJDQ5JU1rVzx9EEGuOGYo0DHAl70++9LQ7HxTawdL7w==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/amannn"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "@formatjs/intl-localematcher": "^0.8.1",
+ "@parcel/watcher": "^2.4.1",
+ "@swc/core": "^1.15.2",
+ "icu-minify": "^4.8.3",
+ "negotiator": "^1.0.0",
+ "next-intl-swc-plugin-extractor": "^4.8.3",
+ "po-parser": "^2.1.1",
+ "use-intl": "^4.8.3"
+ },
+ "peerDependencies": {
+ "next": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0 || ^19.0.0",
+ "typescript": "^5.0.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/next-intl-swc-plugin-extractor": {
+ "version": "4.8.3",
+ "resolved": "https://registry.npmjs.org/next-intl-swc-plugin-extractor/-/next-intl-swc-plugin-extractor-4.8.3.tgz",
+ "integrity": "sha512-YcaT+R9z69XkGhpDarVFWUprrCMbxgIQYPUaXoE6LGVnLjGdo8hu3gL6bramDVjNKViYY8a/pXPy7Bna0mXORg==",
+ "license": "MIT"
+ },
+ "node_modules/next-themes": {
+ "version": "0.4.6",
+ "resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.4.6.tgz",
+ "integrity": "sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA==",
+ "license": "MIT",
+ "peerDependencies": {
+ "react": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc"
+ }
+ },
+ "node_modules/next/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/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-addon-api": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz",
+ "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==",
+ "license": "MIT"
+ },
+ "node_modules/node-domexception": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
+ "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/jimmywarting"
+ },
+ {
+ "type": "github",
+ "url": "https://paypal.me/jimmywarting"
+ }
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.5.0"
+ }
+ },
+ "node_modules/node-exports-info": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/node-exports-info/-/node-exports-info-1.6.0.tgz",
+ "integrity": "sha512-pyFS63ptit/P5WqUkt+UUfe+4oevH+bFeIiPPdfb0pFeYEu/1ELnJu5l+5EcTKYL5M7zaAa7S8ddywgXypqKCw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "array.prototype.flatmap": "^1.3.3",
+ "es-errors": "^1.3.0",
+ "object.entries": "^1.1.9",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/node-fetch": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz",
+ "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
+ "license": "MIT",
+ "dependencies": {
+ "data-uri-to-buffer": "^4.0.0",
+ "fetch-blob": "^3.1.4",
+ "formdata-polyfill": "^4.0.10"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/node-fetch"
+ }
+ },
+ "node_modules/node-releases": {
+ "version": "2.0.36",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.36.tgz",
+ "integrity": "sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA==",
+ "license": "MIT"
+ },
+ "node_modules/npm-run-path": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-6.0.0.tgz",
+ "integrity": "sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==",
+ "license": "MIT",
+ "dependencies": {
+ "path-key": "^4.0.0",
+ "unicorn-magic": "^0.3.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/npm-run-path/node_modules/path-key": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
+ "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "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/object-inspect": {
+ "version": "1.13.4",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
+ "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/object-keys": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/object-treeify": {
+ "version": "1.1.33",
+ "resolved": "https://registry.npmjs.org/object-treeify/-/object-treeify-1.1.33.tgz",
+ "integrity": "sha512-EFVjAYfzWqWsBMRHPMAXLCDIJnpMhdWAqR7xG6M6a2cs6PMFpl/+Z20w9zDW4vkxOFfddegBKq9Rehd0bxWE7A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/object.assign": {
+ "version": "4.1.7",
+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz",
+ "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.3",
+ "define-properties": "^1.2.1",
+ "es-object-atoms": "^1.0.0",
+ "has-symbols": "^1.1.0",
+ "object-keys": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/object.entries": {
+ "version": "1.1.9",
+ "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz",
+ "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.4",
+ "define-properties": "^1.2.1",
+ "es-object-atoms": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/object.fromentries": {
+ "version": "2.0.8",
+ "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz",
+ "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.2",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/object.groupby": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz",
+ "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/object.values": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz",
+ "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.3",
+ "define-properties": "^1.2.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/on-finished": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+ "license": "MIT",
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "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==",
+ "license": "ISC",
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/onetime": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
+ "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
+ "license": "MIT",
+ "dependencies": {
+ "mimic-fn": "^2.1.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/oniguruma-parser": {
+ "version": "0.12.1",
+ "license": "MIT"
+ },
+ "node_modules/oniguruma-to-es": {
+ "version": "4.3.5",
+ "license": "MIT",
+ "dependencies": {
+ "oniguruma-parser": "^0.12.1",
+ "regex": "^6.1.0",
+ "regex-recursion": "^6.0.2"
+ }
+ },
+ "node_modules/open": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/open/-/open-11.0.0.tgz",
+ "integrity": "sha512-smsWv2LzFjP03xmvFoJ331ss6h+jixfA4UUV/Bsiyuu4YJPfN+FIQGOIiv4w9/+MoHkfkJ22UIaQWRVFRfH6Vw==",
+ "license": "MIT",
+ "dependencies": {
+ "default-browser": "^5.4.0",
+ "define-lazy-prop": "^3.0.0",
+ "is-in-ssh": "^1.0.0",
+ "is-inside-container": "^1.0.0",
+ "powershell-utils": "^0.1.0",
+ "wsl-utils": "^0.3.0"
+ },
+ "engines": {
+ "node": ">=20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/optionator": {
+ "version": "0.9.4",
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
+ "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "deep-is": "^0.1.3",
+ "fast-levenshtein": "^2.0.6",
+ "levn": "^0.4.1",
+ "prelude-ls": "^1.2.1",
+ "type-check": "^0.4.0",
+ "word-wrap": "^1.2.5"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/ora": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/ora/-/ora-8.2.0.tgz",
+ "integrity": "sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==",
+ "license": "MIT",
+ "dependencies": {
+ "chalk": "^5.3.0",
+ "cli-cursor": "^5.0.0",
+ "cli-spinners": "^2.9.2",
+ "is-interactive": "^2.0.0",
+ "is-unicode-supported": "^2.0.0",
+ "log-symbols": "^6.0.0",
+ "stdin-discarder": "^0.2.2",
+ "string-width": "^7.2.0",
+ "strip-ansi": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/ora/node_modules/ansi-regex": {
+ "version": "6.2.2",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz",
+ "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
+ }
+ },
+ "node_modules/ora/node_modules/emoji-regex": {
+ "version": "10.6.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz",
+ "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==",
+ "license": "MIT"
+ },
+ "node_modules/ora/node_modules/string-width": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz",
+ "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==",
+ "license": "MIT",
+ "dependencies": {
+ "emoji-regex": "^10.3.0",
+ "get-east-asian-width": "^1.0.0",
+ "strip-ansi": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/ora/node_modules/strip-ansi": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz",
+ "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^6.2.2"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
+ }
+ },
+ "node_modules/outvariant": {
+ "version": "1.4.3",
+ "resolved": "https://registry.npmjs.org/outvariant/-/outvariant-1.4.3.tgz",
+ "integrity": "sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==",
+ "license": "MIT"
+ },
+ "node_modules/own-keys": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz",
+ "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "get-intrinsic": "^1.2.6",
+ "object-keys": "^1.1.1",
+ "safe-push-apply": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/p-limit": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "yocto-queue": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-locate": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "p-limit": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/package-manager-detector": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.6.0.tgz",
+ "integrity": "sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA==",
+ "license": "MIT"
+ },
+ "node_modules/parent-module": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+ "license": "MIT",
+ "dependencies": {
+ "callsites": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/parse-entities": {
+ "version": "4.0.2",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^2.0.0",
+ "character-entities-legacy": "^3.0.0",
+ "character-reference-invalid": "^2.0.0",
+ "decode-named-character-reference": "^1.0.0",
+ "is-alphanumerical": "^2.0.0",
+ "is-decimal": "^2.0.0",
+ "is-hexadecimal": "^2.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/parse-entities/node_modules/@types/unist": {
+ "version": "2.0.11",
+ "license": "MIT"
+ },
+ "node_modules/parse-json": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.0.0",
+ "error-ex": "^1.3.1",
+ "json-parse-even-better-errors": "^2.3.0",
+ "lines-and-columns": "^1.1.6"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/parse-ms": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-4.0.0.tgz",
+ "integrity": "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/path-browserify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
+ "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==",
+ "license": "MIT"
+ },
+ "node_modules/path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-parse": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/path-to-regexp": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz",
+ "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==",
+ "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/picomatch": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
+ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/pkce-challenge": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.1.tgz",
+ "integrity": "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/po-parser": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/po-parser/-/po-parser-2.1.1.tgz",
+ "integrity": "sha512-ECF4zHLbUItpUgE3OTtLKlPjeBN+fKEczj2zYjDfCGOzicNs0GK3Vg2IoAYwx7LH/XYw43fZQP6xnZ4TkNxSLQ==",
+ "license": "MIT"
+ },
+ "node_modules/possible-typed-array-names": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz",
+ "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/postcss": {
+ "version": "8.5.8",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz",
+ "integrity": "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==",
+ "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.11",
+ "picocolors": "^1.1.1",
+ "source-map-js": "^1.2.1"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ }
+ },
+ "node_modules/postcss-selector-parser": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz",
+ "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==",
+ "license": "MIT",
+ "dependencies": {
+ "cssesc": "^3.0.0",
+ "util-deprecate": "^1.0.2"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/powershell-utils": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/powershell-utils/-/powershell-utils-0.1.0.tgz",
+ "integrity": "sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/prelude-ls": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
+ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/pretty-ms": {
+ "version": "9.3.0",
+ "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.3.0.tgz",
+ "integrity": "sha512-gjVS5hOP+M3wMm5nmNOucbIrqudzs9v/57bWRHQWLYklXqoXKrVfYW2W9+glfGsqtPgpiz5WwyEEB+ksXIx3gQ==",
+ "license": "MIT",
+ "dependencies": {
+ "parse-ms": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/prompts": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz",
+ "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==",
+ "license": "MIT",
+ "dependencies": {
+ "kleur": "^3.0.3",
+ "sisteransi": "^1.0.5"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/prompts/node_modules/kleur": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
+ "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "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==",
+ "dev": true,
+ "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==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/property-information": {
+ "version": "7.1.0",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/proxy-addr": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+ "license": "MIT",
+ "dependencies": {
+ "forwarded": "0.2.0",
+ "ipaddr.js": "1.9.1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/punycode": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/qs": {
+ "version": "6.15.0",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.0.tgz",
+ "integrity": "sha512-mAZTtNCeetKMH+pSjrb76NAM8V9a05I9aBZOHztWy/UqcJdQYNsf59vrRKWnojAT9Y+GbIvoTBC++CPHqpDBhQ==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "side-channel": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=0.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/queue-microtask": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
+ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
+ "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/range-parser": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/raw-body": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz",
+ "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "~3.1.2",
+ "http-errors": "~2.0.1",
+ "iconv-lite": "~0.7.0",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/react": {
+ "version": "19.2.3",
+ "resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz",
+ "integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/react-dom": {
+ "version": "19.2.3",
+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.3.tgz",
+ "integrity": "sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==",
+ "license": "MIT",
+ "dependencies": {
+ "scheduler": "^0.27.0"
+ },
+ "peerDependencies": {
+ "react": "^19.2.3"
+ }
+ },
+ "node_modules/react-is": {
+ "version": "19.2.4",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.4.tgz",
+ "integrity": "sha512-W+EWGn2v0ApPKgKKCy/7s7WHXkboGcsrXE+2joLyVxkbyVQfO3MUEaUQDHoSmb8TFFrSKYa9mw64WZHNHSDzYA==",
+ "license": "MIT"
+ },
+ "node_modules/react-markdown": {
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-10.1.0.tgz",
+ "integrity": "sha512-qKxVopLT/TyA6BX3Ue5NwabOsAzm0Q7kAPwq6L+wWDwisYs7R8vZ0nRXqq6rkueboxpkjvLGU9fWifiX/ZZFxQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "hast-util-to-jsx-runtime": "^2.0.0",
+ "html-url-attributes": "^3.0.0",
+ "mdast-util-to-hast": "^13.0.0",
+ "remark-parse": "^11.0.0",
+ "remark-rehype": "^11.0.0",
+ "unified": "^11.0.0",
+ "unist-util-visit": "^5.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ },
+ "peerDependencies": {
+ "@types/react": ">=18",
+ "react": ">=18"
+ }
+ },
+ "node_modules/react-redux": {
+ "version": "9.2.0",
+ "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.2.0.tgz",
+ "integrity": "sha512-ROY9fvHhwOD9ySfrF0wmvu//bKCQ6AeZZq1nJNtbDC+kk5DuSuNX/n6YWYF/SYy7bSba4D4FSz8DJeKY/S/r+g==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/use-sync-external-store": "^0.0.6",
+ "use-sync-external-store": "^1.4.0"
+ },
+ "peerDependencies": {
+ "@types/react": "^18.2.25 || ^19",
+ "react": "^18.0 || ^19",
+ "redux": "^5.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "redux": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/recast": {
+ "version": "0.23.11",
+ "resolved": "https://registry.npmjs.org/recast/-/recast-0.23.11.tgz",
+ "integrity": "sha512-YTUo+Flmw4ZXiWfQKGcwwc11KnoRAYgzAE2E7mXKCjSviTKShtxBsN6YUUBB2gtaBzKzeKunxhUwNHQuRryhWA==",
+ "license": "MIT",
+ "dependencies": {
+ "ast-types": "^0.16.1",
+ "esprima": "~4.0.0",
+ "source-map": "~0.6.1",
+ "tiny-invariant": "^1.3.3",
+ "tslib": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/recharts": {
+ "version": "3.8.0",
+ "resolved": "https://registry.npmjs.org/recharts/-/recharts-3.8.0.tgz",
+ "integrity": "sha512-Z/m38DX3L73ExO4Tpc9/iZWHmHnlzWG4njQbxsF5aSjwqmHNDDIm0rdEBArkwsBvR8U6EirlEHiQNYWCVh9sGQ==",
+ "license": "MIT",
+ "workspaces": [
+ "www"
+ ],
+ "dependencies": {
+ "@reduxjs/toolkit": "^1.9.0 || 2.x.x",
+ "clsx": "^2.1.1",
+ "decimal.js-light": "^2.5.1",
+ "es-toolkit": "^1.39.3",
+ "eventemitter3": "^5.0.1",
+ "immer": "^10.1.1",
+ "react-redux": "8.x.x || 9.x.x",
+ "reselect": "5.1.1",
+ "tiny-invariant": "^1.3.3",
+ "use-sync-external-store": "^1.2.2",
+ "victory-vendor": "^37.0.2"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
+ "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
+ "react-is": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
+ }
+ },
+ "node_modules/redux": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz",
+ "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==",
+ "license": "MIT"
+ },
+ "node_modules/redux-thunk": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-3.1.0.tgz",
+ "integrity": "sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "redux": "^5.0.0"
+ }
+ },
+ "node_modules/reflect.getprototypeof": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz",
+ "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.9",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.0.0",
+ "get-intrinsic": "^1.2.7",
+ "get-proto": "^1.0.1",
+ "which-builtin-type": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/regex": {
+ "version": "6.1.0",
+ "license": "MIT",
+ "dependencies": {
+ "regex-utilities": "^2.3.0"
+ }
+ },
+ "node_modules/regex-recursion": {
+ "version": "6.0.2",
+ "license": "MIT",
+ "dependencies": {
+ "regex-utilities": "^2.3.0"
+ }
+ },
+ "node_modules/regex-utilities": {
+ "version": "2.3.0",
+ "license": "MIT"
+ },
+ "node_modules/regexp.prototype.flags": {
+ "version": "1.5.4",
+ "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz",
+ "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "define-properties": "^1.2.1",
+ "es-errors": "^1.3.0",
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "set-function-name": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/remark-breaks": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/remark-breaks/-/remark-breaks-4.0.0.tgz",
+ "integrity": "sha512-IjEjJOkH4FuJvHZVIW0QCDWxcG96kCq7An/KVH2NfJe6rKZU2AsHeB3OEjPNRxi4QC34Xdx7I2KGYn6IpT7gxQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "mdast-util-newline-to-break": "^2.0.0",
+ "unified": "^11.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/remark-gfm": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-4.0.1.tgz",
+ "integrity": "sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "mdast-util-gfm": "^3.0.0",
+ "micromark-extension-gfm": "^3.0.0",
+ "remark-parse": "^11.0.0",
+ "remark-stringify": "^11.0.0",
+ "unified": "^11.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/remark-parse": {
+ "version": "11.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "micromark-util-types": "^2.0.0",
+ "unified": "^11.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/remark-rehype": {
+ "version": "11.1.2",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "mdast-util-to-hast": "^13.0.0",
+ "unified": "^11.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/remark-stringify": {
+ "version": "11.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "mdast-util-to-markdown": "^2.0.0",
+ "unified": "^11.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/require-directory": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/require-from-string": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/reselect": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/reselect/-/reselect-5.1.1.tgz",
+ "integrity": "sha512-K/BG6eIky/SBpzfHZv/dd+9JBFiS4SWV7FIujVyJRux6e45+73RaUHXLmIR1f7WOMaQ0U1km6qwklRQxpJJY0w==",
+ "license": "MIT"
+ },
+ "node_modules/resolve": {
+ "version": "1.22.11",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz",
+ "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-core-module": "^2.16.1",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ },
+ "bin": {
+ "resolve": "bin/resolve"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/resolve-pkg-maps": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
+ "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
+ }
+ },
+ "node_modules/restore-cursor": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz",
+ "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==",
+ "license": "MIT",
+ "dependencies": {
+ "onetime": "^7.0.0",
+ "signal-exit": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/restore-cursor/node_modules/onetime": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz",
+ "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==",
+ "license": "MIT",
+ "dependencies": {
+ "mimic-function": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/rettime": {
+ "version": "0.10.1",
+ "resolved": "https://registry.npmjs.org/rettime/-/rettime-0.10.1.tgz",
+ "integrity": "sha512-uyDrIlUEH37cinabq0AX4QbgV4HbFZ/gqoiunWQ1UqBtRvTTytwhNYjE++pO/MjPTZL5KQCf2bEoJ/BJNVQ5Kw==",
+ "license": "MIT"
+ },
+ "node_modules/reusify": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz",
+ "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",
+ "license": "MIT",
+ "engines": {
+ "iojs": ">=1.0.0",
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/router": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz",
+ "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.4.0",
+ "depd": "^2.0.0",
+ "is-promise": "^4.0.0",
+ "parseurl": "^1.3.3",
+ "path-to-regexp": "^8.0.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/router/node_modules/path-to-regexp": {
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz",
+ "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/run-applescript": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz",
+ "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/run-parallel": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
+ "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
+ "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": {
+ "queue-microtask": "^1.2.2"
+ }
+ },
+ "node_modules/safe-array-concat": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz",
+ "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.2",
+ "get-intrinsic": "^1.2.6",
+ "has-symbols": "^1.1.0",
+ "isarray": "^2.0.5"
+ },
+ "engines": {
+ "node": ">=0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/safe-push-apply": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz",
+ "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "isarray": "^2.0.5"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/safe-regex-test": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz",
+ "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "is-regex": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "license": "MIT"
+ },
+ "node_modules/scheduler": {
+ "version": "0.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": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/send": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz",
+ "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.4.3",
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "etag": "^1.8.1",
+ "fresh": "^2.0.0",
+ "http-errors": "^2.0.1",
+ "mime-types": "^3.0.2",
+ "ms": "^2.1.3",
+ "on-finished": "^2.4.1",
+ "range-parser": "^1.2.1",
+ "statuses": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/serve-static": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz",
+ "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==",
+ "license": "MIT",
+ "dependencies": {
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "parseurl": "^1.3.3",
+ "send": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/set-function-length": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
+ "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "define-data-property": "^1.1.4",
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2",
+ "get-intrinsic": "^1.2.4",
+ "gopd": "^1.0.1",
+ "has-property-descriptors": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/set-function-name": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz",
+ "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "define-data-property": "^1.1.4",
+ "es-errors": "^1.3.0",
+ "functions-have-names": "^1.2.3",
+ "has-property-descriptors": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/set-proto": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz",
+ "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "dunder-proto": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/setprototypeof": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
+ "license": "ISC"
+ },
+ "node_modules/shadcn": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/shadcn/-/shadcn-4.0.2.tgz",
+ "integrity": "sha512-U6BxywcVt5Vy+iLdjoyWTPcuz2RQNad09tjJsW8hyKtxlx7VAvzHIvoNxvXN+gxWt/HX8kt/cVNk8AXcmPUaNQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@antfu/ni": "^25.0.0",
+ "@babel/core": "^7.28.0",
+ "@babel/parser": "^7.28.0",
+ "@babel/plugin-transform-typescript": "^7.28.0",
+ "@babel/preset-typescript": "^7.27.1",
+ "@dotenvx/dotenvx": "^1.48.4",
+ "@modelcontextprotocol/sdk": "^1.26.0",
+ "@types/validate-npm-package-name": "^4.0.2",
+ "browserslist": "^4.26.2",
+ "commander": "^14.0.0",
+ "cosmiconfig": "^9.0.0",
+ "dedent": "^1.6.0",
+ "deepmerge": "^4.3.1",
+ "diff": "^8.0.2",
+ "execa": "^9.6.0",
+ "fast-glob": "^3.3.3",
+ "fs-extra": "^11.3.1",
+ "fuzzysort": "^3.1.0",
+ "https-proxy-agent": "^7.0.6",
+ "kleur": "^4.1.5",
+ "msw": "^2.10.4",
+ "node-fetch": "^3.3.2",
+ "open": "^11.0.0",
+ "ora": "^8.2.0",
+ "postcss": "^8.5.6",
+ "postcss-selector-parser": "^7.1.0",
+ "prompts": "^2.4.2",
+ "recast": "^0.23.11",
+ "stringify-object": "^5.0.0",
+ "tailwind-merge": "^3.0.1",
+ "ts-morph": "^26.0.0",
+ "tsconfig-paths": "^4.2.0",
+ "validate-npm-package-name": "^7.0.1",
+ "zod": "^3.24.1",
+ "zod-to-json-schema": "^3.24.6"
+ },
+ "bin": {
+ "shadcn": "dist/index.js"
+ }
+ },
+ "node_modules/sharp": {
+ "version": "0.34.5",
+ "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.5.tgz",
+ "integrity": "sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==",
+ "hasInstallScript": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "dependencies": {
+ "@img/colour": "^1.0.0",
+ "detect-libc": "^2.1.2",
+ "semver": "^7.7.3"
+ },
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-darwin-arm64": "0.34.5",
+ "@img/sharp-darwin-x64": "0.34.5",
+ "@img/sharp-libvips-darwin-arm64": "1.2.4",
+ "@img/sharp-libvips-darwin-x64": "1.2.4",
+ "@img/sharp-libvips-linux-arm": "1.2.4",
+ "@img/sharp-libvips-linux-arm64": "1.2.4",
+ "@img/sharp-libvips-linux-ppc64": "1.2.4",
+ "@img/sharp-libvips-linux-riscv64": "1.2.4",
+ "@img/sharp-libvips-linux-s390x": "1.2.4",
+ "@img/sharp-libvips-linux-x64": "1.2.4",
+ "@img/sharp-libvips-linuxmusl-arm64": "1.2.4",
+ "@img/sharp-libvips-linuxmusl-x64": "1.2.4",
+ "@img/sharp-linux-arm": "0.34.5",
+ "@img/sharp-linux-arm64": "0.34.5",
+ "@img/sharp-linux-ppc64": "0.34.5",
+ "@img/sharp-linux-riscv64": "0.34.5",
+ "@img/sharp-linux-s390x": "0.34.5",
+ "@img/sharp-linux-x64": "0.34.5",
+ "@img/sharp-linuxmusl-arm64": "0.34.5",
+ "@img/sharp-linuxmusl-x64": "0.34.5",
+ "@img/sharp-wasm32": "0.34.5",
+ "@img/sharp-win32-arm64": "0.34.5",
+ "@img/sharp-win32-ia32": "0.34.5",
+ "@img/sharp-win32-x64": "0.34.5"
+ }
+ },
+ "node_modules/sharp/node_modules/semver": {
+ "version": "7.7.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz",
+ "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==",
+ "license": "ISC",
+ "optional": true,
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "license": "MIT",
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shiki": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/shiki/-/shiki-4.0.2.tgz",
+ "integrity": "sha512-eAVKTMedR5ckPo4xne/PjYQYrU3qx78gtJZ+sHlXEg5IHhhoQhMfZVzetTYuaJS0L2Ef3AcCRzCHV8T0WI6nIQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@shikijs/core": "4.0.2",
+ "@shikijs/engine-javascript": "4.0.2",
+ "@shikijs/engine-oniguruma": "4.0.2",
+ "@shikijs/langs": "4.0.2",
+ "@shikijs/themes": "4.0.2",
+ "@shikijs/types": "4.0.2",
+ "@shikijs/vscode-textmate": "^10.0.2",
+ "@types/hast": "^3.0.4"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/side-channel": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
+ "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.3",
+ "side-channel-list": "^1.0.0",
+ "side-channel-map": "^1.0.1",
+ "side-channel-weakmap": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-list": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
+ "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-map": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
+ "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-weakmap": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
+ "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3",
+ "side-channel-map": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/signal-exit": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
+ "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/sisteransi": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
+ "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==",
+ "license": "MIT"
+ },
+ "node_modules/sonner": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/sonner/-/sonner-2.0.7.tgz",
+ "integrity": "sha512-W6ZN4p58k8aDKA4XPcx2hpIQXBRAgyiWVkYhT7CvK6D3iAu7xjvVyhQHg2/iaKJZ1XVJ4r7XuwGL+WGEK37i9w==",
+ "license": "MIT",
+ "peerDependencies": {
+ "react": "^18.0.0 || ^19.0.0 || ^19.0.0-rc",
+ "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-rc"
+ }
+ },
+ "node_modules/source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "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/space-separated-tokens": {
+ "version": "2.0.2",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/stable-hash": {
+ "version": "0.0.5",
+ "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.5.tgz",
+ "integrity": "sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/statuses": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
+ "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/stdin-discarder": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz",
+ "integrity": "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/stop-iteration-iterator": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz",
+ "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "internal-slot": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/strict-event-emitter": {
+ "version": "0.5.1",
+ "resolved": "https://registry.npmjs.org/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz",
+ "integrity": "sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==",
+ "license": "MIT"
+ },
+ "node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "license": "MIT",
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/string.prototype.includes": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.1.tgz",
+ "integrity": "sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/string.prototype.matchall": {
+ "version": "4.0.12",
+ "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz",
+ "integrity": "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.3",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.6",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.0.0",
+ "get-intrinsic": "^1.2.6",
+ "gopd": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "internal-slot": "^1.1.0",
+ "regexp.prototype.flags": "^1.5.3",
+ "set-function-name": "^2.0.2",
+ "side-channel": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/string.prototype.repeat": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz",
+ "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.5"
+ }
+ },
+ "node_modules/string.prototype.trim": {
+ "version": "1.2.10",
+ "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz",
+ "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.2",
+ "define-data-property": "^1.1.4",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.5",
+ "es-object-atoms": "^1.0.0",
+ "has-property-descriptors": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/string.prototype.trimend": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz",
+ "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.2",
+ "define-properties": "^1.2.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/string.prototype.trimstart": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz",
+ "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/stringify-entities": {
+ "version": "4.0.4",
+ "license": "MIT",
+ "dependencies": {
+ "character-entities-html4": "^2.0.0",
+ "character-entities-legacy": "^3.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/stringify-object": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-5.0.0.tgz",
+ "integrity": "sha512-zaJYxz2FtcMb4f+g60KsRNFOpVMUyuJgA51Zi5Z1DOTC3S59+OQiVOzE9GZt0x72uBGWKsQIuBKeF9iusmKFsg==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "get-own-enumerable-keys": "^1.0.0",
+ "is-obj": "^3.0.0",
+ "is-regexp": "^3.1.0"
+ },
+ "engines": {
+ "node": ">=14.16"
+ },
+ "funding": {
+ "url": "https://github.com/yeoman/stringify-object?sponsor=1"
+ }
+ },
+ "node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-bom": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+ "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/strip-final-newline": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-4.0.0.tgz",
+ "integrity": "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/strip-json-comments": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
+ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/stripe": {
+ "version": "22.0.0",
+ "resolved": "https://registry.npmjs.org/stripe/-/stripe-22.0.0.tgz",
+ "integrity": "sha512-q1UgXXpSfZCmkyzZEh3vFEWT7+ajuaFGqaP9Tsi2NMtwlkigIWNr+KBIUQqtNeNEsreDKgdn+BP5HRW9JDj22Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "@types/node": ">=18"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/style-to-js": {
+ "version": "1.1.21",
+ "license": "MIT",
+ "dependencies": {
+ "style-to-object": "1.0.14"
+ }
+ },
+ "node_modules/style-to-object": {
+ "version": "1.0.14",
+ "license": "MIT",
+ "dependencies": {
+ "inline-style-parser": "0.2.7"
+ }
+ },
+ "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/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/supports-preserve-symlinks-flag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/tabbable": {
+ "version": "6.4.0",
+ "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.4.0.tgz",
+ "integrity": "sha512-05PUHKSNE8ou2dwIxTngl4EzcnsCDZGJ/iCLtDflR/SHB/ny14rXc+qU5P4mG9JkusiV7EivzY9Mhm55AzAvCg==",
+ "license": "MIT"
+ },
+ "node_modules/tagged-tag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/tagged-tag/-/tagged-tag-1.0.0.tgz",
+ "integrity": "sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/tailwind-merge": {
+ "version": "3.5.0",
+ "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.5.0.tgz",
+ "integrity": "sha512-I8K9wewnVDkL1NTGoqWmVEIlUcB9gFriAEkXkfCjX5ib8ezGxtR3xD7iZIxrfArjEsH7F1CHD4RFUtxefdqV/A==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/dcastil"
+ }
+ },
+ "node_modules/tailwindcss": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.2.1.tgz",
+ "integrity": "sha512-/tBrSQ36vCleJkAOsy9kbNTgaxvGbyOamC30PRePTQe/o1MFwEKHQk4Cn7BNGaPtjp+PuUrByJehM1hgxfq4sw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/tapable": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz",
+ "integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ }
+ },
+ "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.0.2",
+ "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.2.tgz",
+ "integrity": "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tinyglobby": {
+ "version": "0.2.15",
+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz",
+ "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fdir": "^6.5.0",
+ "picomatch": "^4.0.3"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/SuperchupuDev"
+ }
+ },
+ "node_modules/tldts": {
+ "version": "7.0.25",
+ "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.0.25.tgz",
+ "integrity": "sha512-keinCnPbwXEUG3ilrWQZU+CqcTTzHq9m2HhoUP2l7Xmi8l1LuijAXLpAJ5zRW+ifKTNscs4NdCkfkDCBYm352w==",
+ "license": "MIT",
+ "dependencies": {
+ "tldts-core": "^7.0.25"
+ },
+ "bin": {
+ "tldts": "bin/cli.js"
+ }
+ },
+ "node_modules/tldts-core": {
+ "version": "7.0.25",
+ "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.0.25.tgz",
+ "integrity": "sha512-ZjCZK0rppSBu7rjHYDYsEaMOIbbT+nWF57hKkv4IUmZWBNrBWBOjIElc0mKRgLM8bm7x/BBlof6t2gi/Oq/Asw==",
+ "license": "MIT"
+ },
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "license": "MIT",
+ "dependencies": {
+ "is-number": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/toidentifier": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
+ "node_modules/tough-cookie": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.0.tgz",
+ "integrity": "sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "tldts": "^7.0.5"
+ },
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/trim-lines": {
+ "version": "3.0.1",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/trough": {
+ "version": "2.2.0",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/ts-api-utils": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.4.0.tgz",
+ "integrity": "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.12"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4"
+ }
+ },
+ "node_modules/ts-morph": {
+ "version": "26.0.0",
+ "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-26.0.0.tgz",
+ "integrity": "sha512-ztMO++owQnz8c/gIENcM9XfCEzgoGphTv+nKpYNM1bgsdOVC/jRZuEBf6N+mLLDNg68Kl+GgUZfOySaRiG1/Ug==",
+ "license": "MIT",
+ "dependencies": {
+ "@ts-morph/common": "~0.27.0",
+ "code-block-writer": "^13.0.3"
+ }
+ },
+ "node_modules/tsconfig-paths": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz",
+ "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==",
+ "license": "MIT",
+ "dependencies": {
+ "json5": "^2.2.2",
+ "minimist": "^1.2.6",
+ "strip-bom": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "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/tw-animate-css": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/tw-animate-css/-/tw-animate-css-1.4.0.tgz",
+ "integrity": "sha512-7bziOlRqH0hJx80h/3mbicLW7o8qLsH5+RaLR2t+OHM3D0JlWGODQKQ4cxbK7WlvmUxpcj6Kgu6EKqjrGFe3QQ==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/Wombosvideo"
+ }
+ },
+ "node_modules/type-check": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
+ "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "prelude-ls": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/type-fest": {
+ "version": "5.4.4",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-5.4.4.tgz",
+ "integrity": "sha512-JnTrzGu+zPV3aXIUhnyWJj4z/wigMsdYajGLIYakqyOW1nPllzXEJee0QQbHj+CTIQtXGlAjuK0UY+2xTyjVAw==",
+ "license": "(MIT OR CC0-1.0)",
+ "dependencies": {
+ "tagged-tag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/type-is": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",
+ "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",
+ "license": "MIT",
+ "dependencies": {
+ "content-type": "^1.0.5",
+ "media-typer": "^1.1.0",
+ "mime-types": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/typed-array-buffer": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz",
+ "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "es-errors": "^1.3.0",
+ "is-typed-array": "^1.1.14"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/typed-array-byte-length": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz",
+ "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.8",
+ "for-each": "^0.3.3",
+ "gopd": "^1.2.0",
+ "has-proto": "^1.2.0",
+ "is-typed-array": "^1.1.14"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/typed-array-byte-offset": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz",
+ "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "available-typed-arrays": "^1.0.7",
+ "call-bind": "^1.0.8",
+ "for-each": "^0.3.3",
+ "gopd": "^1.2.0",
+ "has-proto": "^1.2.0",
+ "is-typed-array": "^1.1.15",
+ "reflect.getprototypeof": "^1.0.9"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/typed-array-length": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz",
+ "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "for-each": "^0.3.3",
+ "gopd": "^1.0.1",
+ "is-typed-array": "^1.1.13",
+ "possible-typed-array-names": "^1.0.0",
+ "reflect.getprototypeof": "^1.0.6"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "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/typescript-eslint": {
+ "version": "8.56.1",
+ "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.56.1.tgz",
+ "integrity": "sha512-U4lM6pjmBX7J5wk4szltF7I1cGBHXZopnAXCMXb3+fZ3B/0Z3hq3wS/CCUB2NZBNAExK92mCU2tEohWuwVMsDQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/eslint-plugin": "8.56.1",
+ "@typescript-eslint/parser": "8.56.1",
+ "@typescript-eslint/typescript-estree": "8.56.1",
+ "@typescript-eslint/utils": "8.56.1"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/unbox-primitive": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz",
+ "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "has-bigints": "^1.0.2",
+ "has-symbols": "^1.1.0",
+ "which-boxed-primitive": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "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==",
+ "devOptional": true,
+ "license": "MIT"
+ },
+ "node_modules/unicorn-magic": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz",
+ "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/unified": {
+ "version": "11.0.5",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "bail": "^2.0.0",
+ "devlop": "^1.0.0",
+ "extend": "^3.0.0",
+ "is-plain-obj": "^4.0.0",
+ "trough": "^2.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unist-util-is": {
+ "version": "6.0.1",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unist-util-position": {
+ "version": "5.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unist-util-stringify-position": {
+ "version": "4.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unist-util-visit": {
+ "version": "5.1.0",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "unist-util-is": "^6.0.0",
+ "unist-util-visit-parents": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unist-util-visit-parents": {
+ "version": "6.0.2",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "unist-util-is": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/universalify": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+ },
+ "node_modules/unpipe": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/unrs-resolver": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.11.1.tgz",
+ "integrity": "sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "dependencies": {
+ "napi-postinstall": "^0.3.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/unrs-resolver"
+ },
+ "optionalDependencies": {
+ "@unrs/resolver-binding-android-arm-eabi": "1.11.1",
+ "@unrs/resolver-binding-android-arm64": "1.11.1",
+ "@unrs/resolver-binding-darwin-arm64": "1.11.1",
+ "@unrs/resolver-binding-darwin-x64": "1.11.1",
+ "@unrs/resolver-binding-freebsd-x64": "1.11.1",
+ "@unrs/resolver-binding-linux-arm-gnueabihf": "1.11.1",
+ "@unrs/resolver-binding-linux-arm-musleabihf": "1.11.1",
+ "@unrs/resolver-binding-linux-arm64-gnu": "1.11.1",
+ "@unrs/resolver-binding-linux-arm64-musl": "1.11.1",
+ "@unrs/resolver-binding-linux-ppc64-gnu": "1.11.1",
+ "@unrs/resolver-binding-linux-riscv64-gnu": "1.11.1",
+ "@unrs/resolver-binding-linux-riscv64-musl": "1.11.1",
+ "@unrs/resolver-binding-linux-s390x-gnu": "1.11.1",
+ "@unrs/resolver-binding-linux-x64-gnu": "1.11.1",
+ "@unrs/resolver-binding-linux-x64-musl": "1.11.1",
+ "@unrs/resolver-binding-wasm32-wasi": "1.11.1",
+ "@unrs/resolver-binding-win32-arm64-msvc": "1.11.1",
+ "@unrs/resolver-binding-win32-ia32-msvc": "1.11.1",
+ "@unrs/resolver-binding-win32-x64-msvc": "1.11.1"
+ }
+ },
+ "node_modules/until-async": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/until-async/-/until-async-3.0.2.tgz",
+ "integrity": "sha512-IiSk4HlzAMqTUseHHe3VhIGyuFmN90zMTpD3Z3y8jeQbzLIq500MVM7Jq2vUAnTKAFPJrqwkzr6PoTcPhGcOiw==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/kettanaito"
+ }
+ },
+ "node_modules/update-browserslist-db": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz",
+ "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "escalade": "^3.2.0",
+ "picocolors": "^1.1.1"
+ },
+ "bin": {
+ "update-browserslist-db": "cli.js"
+ },
+ "peerDependencies": {
+ "browserslist": ">= 4.21.0"
+ }
+ },
+ "node_modules/uri-js": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "punycode": "^2.1.0"
+ }
+ },
+ "node_modules/use-intl": {
+ "version": "4.8.3",
+ "resolved": "https://registry.npmjs.org/use-intl/-/use-intl-4.8.3.tgz",
+ "integrity": "sha512-nLxlC/RH+le6g3amA508Itnn/00mE+J22ui21QhOWo5V9hCEC43+WtnRAITbJW0ztVZphev5X9gvOf2/Dk9PLA==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/amannn"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "@formatjs/fast-memoize": "^3.1.0",
+ "@schummar/icu-type-parser": "1.21.5",
+ "icu-minify": "^4.8.3",
+ "intl-messageformat": "^11.1.0"
+ },
+ "peerDependencies": {
+ "react": "^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0 || ^19.0.0"
+ }
+ },
+ "node_modules/use-sync-external-store": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz",
+ "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==",
+ "license": "MIT",
+ "peerDependencies": {
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
+ }
+ },
+ "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==",
+ "license": "MIT"
+ },
+ "node_modules/validate-npm-package-name": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-7.0.2.tgz",
+ "integrity": "sha512-hVDIBwsRruT73PbK7uP5ebUt+ezEtCmzZz3F59BSr2F6OVFnJ/6h8liuvdLrQ88Xmnk6/+xGGuq+pG9WwTuy3A==",
+ "license": "ISC",
+ "engines": {
+ "node": "^20.17.0 || >=22.9.0"
+ }
+ },
+ "node_modules/vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/vfile": {
+ "version": "6.0.3",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "vfile-message": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/vfile-message": {
+ "version": "4.0.3",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "unist-util-stringify-position": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/victory-vendor": {
+ "version": "37.3.6",
+ "resolved": "https://registry.npmjs.org/victory-vendor/-/victory-vendor-37.3.6.tgz",
+ "integrity": "sha512-SbPDPdDBYp+5MJHhBCAyI7wKM3d5ivekigc2Dk2s7pgbZ9wIgIBYGVw4zGHBml/qTFbexrofXW6Gu4noGxrOwQ==",
+ "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/web-streams-polyfill": {
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",
+ "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "license": "ISC",
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "node-which": "bin/node-which"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/which-boxed-primitive": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz",
+ "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-bigint": "^1.1.0",
+ "is-boolean-object": "^1.2.1",
+ "is-number-object": "^1.1.1",
+ "is-string": "^1.1.1",
+ "is-symbol": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/which-builtin-type": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz",
+ "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "function.prototype.name": "^1.1.6",
+ "has-tostringtag": "^1.0.2",
+ "is-async-function": "^2.0.0",
+ "is-date-object": "^1.1.0",
+ "is-finalizationregistry": "^1.1.0",
+ "is-generator-function": "^1.0.10",
+ "is-regex": "^1.2.1",
+ "is-weakref": "^1.0.2",
+ "isarray": "^2.0.5",
+ "which-boxed-primitive": "^1.1.0",
+ "which-collection": "^1.0.2",
+ "which-typed-array": "^1.1.16"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/which-collection": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz",
+ "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-map": "^2.0.3",
+ "is-set": "^2.0.3",
+ "is-weakmap": "^2.0.2",
+ "is-weakset": "^2.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/which-typed-array": {
+ "version": "1.1.20",
+ "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.20.tgz",
+ "integrity": "sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "available-typed-arrays": "^1.0.7",
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.4",
+ "for-each": "^0.3.5",
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "has-tostringtag": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/word-wrap": {
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
+ "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/wrap-ansi": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
+ "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "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==",
+ "license": "ISC"
+ },
+ "node_modules/ws": {
+ "version": "8.19.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz",
+ "integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": ">=5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/wsl-utils": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.3.1.tgz",
+ "integrity": "sha512-g/eziiSUNBSsdDJtCLB8bdYEUMj4jR7AGeUo96p/3dTafgjHhpF4RiCFPiRILwjQoDXx5MqkBr4fwWtR3Ky4Wg==",
+ "license": "MIT",
+ "dependencies": {
+ "is-wsl": "^3.1.0",
+ "powershell-utils": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/yallist": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
+ "license": "ISC"
+ },
+ "node_modules/yargs": {
+ "version": "17.7.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
+ "license": "MIT",
+ "dependencies": {
+ "cliui": "^8.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/yargs-parser": {
+ "version": "21.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/yocto-queue": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/yoctocolors": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.2.tgz",
+ "integrity": "sha512-CzhO+pFNo8ajLM2d2IW/R93ipy99LWjtwblvC1RsoSUMZgyLbYFr221TnSNT7GjGdYui6P459mw9JH/g/zW2ug==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/yoctocolors-cjs": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz",
+ "integrity": "sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/zod": {
+ "version": "3.25.76",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
+ "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/colinhacks"
+ }
+ },
+ "node_modules/zod-to-json-schema": {
+ "version": "3.25.1",
+ "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.1.tgz",
+ "integrity": "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA==",
+ "license": "ISC",
+ "peerDependencies": {
+ "zod": "^3.25 || ^4"
+ }
+ },
+ "node_modules/zustand": {
+ "version": "5.0.11",
+ "resolved": "https://registry.npmjs.org/zustand/-/zustand-5.0.11.tgz",
+ "integrity": "sha512-fdZY+dk7zn/vbWNCYmzZULHRrss0jx5pPFiOuMZ/5HJN6Yv3u+1Wswy/4MpZEkEGhtNH+pwxZB8OKgUBPzYAGg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.20.0"
+ },
+ "peerDependencies": {
+ "@types/react": ">=18.0.0",
+ "immer": ">=9.0.6",
+ "react": ">=18.0.0",
+ "use-sync-external-store": ">=1.2.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "immer": {
+ "optional": true
+ },
+ "react": {
+ "optional": true
+ },
+ "use-sync-external-store": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/zwitch": {
+ "version": "2.0.4",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ }
+ }
+}
diff --git a/web/package.json b/web/package.json
new file mode 100644
index 000000000..48d0fd69c
--- /dev/null
+++ b/web/package.json
@@ -0,0 +1,59 @@
+{
+ "name": "@aeohub/ansvisor-web",
+ "version": "0.1.0",
+ "private": true,
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/aeohub/ansvisor.git",
+ "directory": "web"
+ },
+ "homepage": "https://github.com/aeohub/ansvisor",
+ "license": "MIT",
+ "scripts": {
+ "dev": "next dev",
+ "build": "next build",
+ "start": "next start",
+ "lint": "eslint",
+ "typecheck": "tsc --noEmit"
+ },
+ "dependencies": {
+ "@base-ui/react": "^1.2.0",
+ "@radix-ui/react-checkbox": "^1.3.3",
+ "@stripe/stripe-js": "^9.1.0",
+ "@supabase/ssr": "^0.9.0",
+ "@supabase/supabase-js": "^2.99.0",
+ "class-variance-authority": "^0.7.1",
+ "clsx": "^2.1.1",
+ "framer-motion": "^12.35.2",
+ "lucide-react": "^0.577.0",
+ "marked": "^18.0.0",
+ "next": "16.1.6",
+ "next-intl": "^4.8.3",
+ "next-themes": "^0.4.6",
+ "react": "19.2.3",
+ "react-dom": "19.2.3",
+ "react-is": "^19.2.4",
+ "react-markdown": "^10.1.0",
+ "recharts": "^3.8.0",
+ "remark-breaks": "^4.0.0",
+ "remark-gfm": "^4.0.1",
+ "shadcn": "^4.0.2",
+ "shiki": "^4.0.2",
+ "sonner": "^2.0.7",
+ "stripe": "^22.0.0",
+ "tailwind-merge": "^3.5.0",
+ "tw-animate-css": "^1.4.0",
+ "zustand": "^5.0.11"
+ },
+ "devDependencies": {
+ "@tailwindcss/postcss": "^4",
+ "@tailwindcss/typography": "^0.5.19",
+ "@types/node": "^20",
+ "@types/react": "^19",
+ "@types/react-dom": "^19",
+ "eslint": "^9",
+ "eslint-config-next": "16.1.6",
+ "tailwindcss": "^4",
+ "typescript": "^5"
+ }
+}
diff --git a/postcss.config.mjs b/web/postcss.config.mjs
similarity index 100%
rename from postcss.config.mjs
rename to web/postcss.config.mjs
diff --git a/web/public/ai_mode.svg b/web/public/ai_mode.svg
new file mode 100644
index 000000000..e69de29bb
diff --git a/web/public/ai_overview.svg b/web/public/ai_overview.svg
new file mode 100644
index 000000000..a04ece0be
--- /dev/null
+++ b/web/public/ai_overview.svg
@@ -0,0 +1 @@
+<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-full h-full"> <path d="M12.545,10.239v3.821h5.445c-0.712,2.315-2.647,3.972-5.445,3.972c-3.332,0-6.033-2.701-6.033-6.032 s2.701-6.032,6.033-6.032c1.498,0,2.866,0.549,3.921,1.453l2.814-2.814C17.503,2.988,15.139,2,12.545,2 C7.021,2,2.543,6.477,2.543,12s4.478,10,10.002,10c8.396,0,10.249-7.85,9.426-11.748L12.545,10.239z" fill="#4285f4"></path> </svg>
\ No newline at end of file
diff --git a/web/public/chatgpt.svg b/web/public/chatgpt.svg
new file mode 100644
index 000000000..90dbe7777
--- /dev/null
+++ b/web/public/chatgpt.svg
@@ -0,0 +1 @@
+<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-full h-full"> <path d="M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z" fill="white"></path> </svg>
\ No newline at end of file
diff --git a/web/public/claude.svg b/web/public/claude.svg
new file mode 100644
index 000000000..164899f3c
--- /dev/null
+++ b/web/public/claude.svg
@@ -0,0 +1,3 @@
+<svg width="292" height="292" viewBox="0 0 292 292" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M85.2405 178.962L124.582 156.903L125.241 154.981L124.582 153.918H122.658L116.076 153.513L93.5949 152.906L74.1013 152.097L55.2152 151.085L50.4557 150.073L46 144.204L46.4557 141.269L50.4557 138.588L56.1772 139.094L68.8354 139.954L87.8228 141.269L101.595 142.079L122 144.204H125.241L125.696 142.888L124.582 142.079L123.722 141.269L104.076 127.963L82.8101 113.898L71.6709 105.803L65.6456 101.705L62.6076 97.8594L61.2911 89.4607L66.7595 83.4399L74.1013 83.9459L75.9747 84.4518L83.4177 90.169L99.3165 102.463L120.076 117.743L123.114 120.273L124.329 119.413L124.481 118.805L123.114 116.529L111.823 96.1391L99.7722 75.3954L94.4051 66.7943L92.9873 61.6337C92.481 59.5087 92.1266 57.7379 92.1266 55.5624L98.3544 47.1131L101.797 46L110.101 47.1131L113.595 50.1487L118.759 61.9373L127.114 80.5054L140.076 105.752L143.873 113.24L145.899 120.172L146.658 122.296H147.975V121.082L149.038 106.865L151.013 89.4101L152.937 66.9461L153.595 60.6218L156.734 53.0326L162.962 48.9345L167.823 51.2618L171.823 56.979L171.266 60.6724L168.886 76.1037L164.228 100.288L161.19 116.478H162.962L164.987 114.454L173.19 103.577L186.962 86.3744L193.038 79.5441L200.127 72.0056L204.684 68.4134H213.291L219.62 77.8239L216.785 87.5381L207.924 98.7701L200.582 108.282L190.051 122.448L183.468 133.781L184.076 134.692L185.646 134.54L209.443 129.481L222.304 127.154L237.646 124.523L244.582 127.761L245.342 131.049L242.608 137.778L226.203 141.826L206.962 145.671L178.304 152.451L177.949 152.704L178.354 153.21L191.266 154.424L196.785 154.728H210.304L235.468 156.6L242.051 160.951L246 166.263L245.342 170.311L235.215 175.471L221.544 172.233L189.646 164.644L178.709 161.912H177.19V162.823L186.304 171.727L203.013 186.804L223.924 206.233L224.987 211.039L222.304 214.834L219.468 214.429L201.089 200.617L194 194.394L177.949 180.885H176.886V182.302L180.582 187.715L200.127 217.06L201.139 226.066L199.722 229L194.658 230.771L189.089 229.759L177.646 213.721L165.848 195.659L156.329 179.468L155.165 180.126L149.544 240.586L146.911 243.673L140.835 246L135.772 242.155L133.089 235.932L135.772 223.637L139.013 207.599L141.646 194.849L144.025 179.013L145.443 173.751L145.342 173.397L144.177 173.549L132.228 189.941L114.051 214.48L99.6709 229.86L96.2279 231.226L90.2532 228.14L90.8101 222.625L94.1519 217.718L114.051 192.42L126.051 176.736L133.797 167.68L133.747 166.364H133.291L80.4304 200.667L71.0127 201.882L66.962 198.087L67.4684 191.864L69.3924 189.84L85.2911 178.912L85.2405 178.962Z" fill="#D97757"/>
+</svg>
diff --git a/web/public/copilot.svg b/web/public/copilot.svg
new file mode 100644
index 000000000..a68fcfd0e
--- /dev/null
+++ b/web/public/copilot.svg
@@ -0,0 +1,39 @@
+<svg width="292" height="292" viewBox="0 0 292 292" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M192.124 70.1938C189.501 61.2127 181.276 55.0771 171.939 55.0771H165.804C155.622 55.0771 146.952 62.3242 145.085 72.3279L134.548 129.682L137.171 120.746C139.794 111.765 148.019 105.584 157.356 105.584H193.058L208.041 111.409L222.491 105.584H218.267C208.931 105.584 200.705 99.4489 198.082 90.4679L192.124 70.1938Z" fill="url(#paint0_radial_535_57)"/>
+<path d="M102.047 221.761C104.67 230.787 112.896 236.967 122.277 236.967H135.348C146.775 236.967 156.111 227.852 156.378 216.47L157.801 161.161L154.822 171.298C152.199 180.279 143.974 186.415 134.637 186.415H98.6237L85.7746 179.434L71.8584 186.415H75.9932C85.3744 186.415 93.5997 192.595 96.2229 201.62L102.047 221.761Z" fill="url(#paint1_radial_535_57)"/>
+<path d="M171.051 55.0332H98.1353C77.2832 55.0332 64.7897 82.5544 56.4756 110.12C46.5609 142.754 33.6228 186.415 71.0142 186.415H102.492C111.918 186.415 120.143 180.19 122.766 171.164C128.235 152.002 137.839 118.612 145.397 93.136C149.221 80.1979 152.422 69.1272 157.312 62.1914C160.025 58.2788 164.604 55.0332 171.051 55.0332Z" fill="url(#paint2_linear_535_57)"/>
+<path d="M171.051 55.0332H98.1353C77.2832 55.0332 64.7897 82.5544 56.4756 110.12C46.5609 142.754 33.6228 186.415 71.0142 186.415H102.492C111.918 186.415 120.143 180.19 122.766 171.164C128.235 152.002 137.839 118.612 145.397 93.136C149.221 80.1979 152.422 69.1272 157.312 62.1914C160.025 58.2788 164.604 55.0332 171.051 55.0332Z" fill="url(#paint3_linear_535_57)"/>
+<path d="M120.988 236.966H193.904C214.756 236.966 227.249 209.401 235.563 181.879C245.434 149.245 258.372 105.585 220.98 105.585H189.502C180.077 105.585 171.807 111.809 169.228 120.879C163.759 140.042 154.156 173.476 146.598 198.908C142.774 211.846 139.573 222.961 134.682 229.853C132.015 233.721 127.435 236.966 120.988 236.966Z" fill="url(#paint4_radial_535_57)"/>
+<path d="M120.988 236.966H193.904C214.756 236.966 227.249 209.401 235.563 181.879C245.434 149.245 258.372 105.585 220.98 105.585H189.502C180.077 105.585 171.807 111.809 169.228 120.879C163.759 140.042 154.156 173.476 146.598 198.908C142.774 211.846 139.573 222.961 134.682 229.853C132.015 233.721 127.435 236.966 120.988 236.966Z" fill="url(#paint5_linear_535_57)"/>
+<defs>
+<radialGradient id="paint0_radial_535_57" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(209.713 130.149) rotate(-129.304) scale(78.6848 73.9888)">
+<stop offset="0.0956" stop-color="#00AEFF"/>
+<stop offset="0.7732" stop-color="#2253CE"/>
+<stop offset="1" stop-color="#0736C4"/>
+</radialGradient>
+<radialGradient id="paint1_radial_535_57" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(87.4565 186.081) rotate(51.8401) scale(72.7183 70.5387)">
+<stop stop-color="#FFB657"/>
+<stop offset="0.6337" stop-color="#FF5F3D"/>
+<stop offset="0.9234" stop-color="#C02B3C"/>
+</radialGradient>
+<linearGradient id="paint2_linear_535_57" x1="105.175" y1="69.9786" x2="115.581" y2="190.371" gradientUnits="userSpaceOnUse">
+<stop offset="0.1562" stop-color="#0D91E1"/>
+<stop offset="0.4875" stop-color="#52B471"/>
+<stop offset="0.6524" stop-color="#98BD42"/>
+<stop offset="0.9374" stop-color="#FFC800"/>
+</linearGradient>
+<linearGradient id="paint3_linear_535_57" x1="106.212" y1="54.9054" x2="111.894" y2="186.244" gradientUnits="userSpaceOnUse">
+<stop stop-color="#3DCBFF"/>
+<stop offset="0.2467" stop-color="#0588F7" stop-opacity="0"/>
+</linearGradient>
+<radialGradient id="paint4_radial_535_57" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(224.779 92.7356) rotate(109.274) scale(174.562 209.12)">
+<stop offset="0.0662" stop-color="#8C48FF"/>
+<stop offset="0.5" stop-color="#F2598A"/>
+<stop offset="0.8958" stop-color="#FFB152"/>
+</radialGradient>
+<linearGradient id="paint5_linear_535_57" x1="183.713" y1="97.4542" x2="183.638" y2="133.236" gradientUnits="userSpaceOnUse">
+<stop offset="0.0582" stop-color="#F8ADFA"/>
+<stop offset="0.7081" stop-color="#A86EDD" stop-opacity="0"/>
+</linearGradient>
+</defs>
+</svg>
diff --git a/public/file.svg b/web/public/file.svg
similarity index 100%
rename from public/file.svg
rename to web/public/file.svg
diff --git a/web/public/gemini.svg b/web/public/gemini.svg
new file mode 100644
index 000000000..0b9f2a060
--- /dev/null
+++ b/web/public/gemini.svg
@@ -0,0 +1 @@
+<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="w-full h-full"> <path d="M16 8.016A8.522 8.522 0 008.016 16h-.032A8.521 8.521 0 000 8.016v-.032A8.521 8.521 0 007.984 0h.032A8.522 8.522 0 0016 7.984v.032z" fill="url(#gemini_gradient)"></path> <defs> <radialGradient id="gemini_gradient" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(16.1326 5.4553 -43.70045 129.2322 1.588 6.503)"> <stop offset=".067" stop-color="#9168C0"></stop> <stop offset=".343" stop-color="#5684D1"></stop> <stop offset=".672" stop-color="#1BA1E3"></stop> </radialGradient> </defs> </svg>
\ No newline at end of file
diff --git a/public/globe.svg b/web/public/globe.svg
similarity index 100%
rename from public/globe.svg
rename to web/public/globe.svg
diff --git a/web/public/grok.svg b/web/public/grok.svg
new file mode 100644
index 000000000..685ad062c
--- /dev/null
+++ b/web/public/grok.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 512 492" class="w-full h-full"> <rect width="512" height="492" fill="#000"></rect> <path fill-rule="evenodd" clip-rule="evenodd" d="M197.76 315.52l170.197-125.803c8.342-6.186 20.267-3.776 24.256 5.803 20.907 50.539 11.563 111.253-30.08 152.939-41.621 41.685-99.562 50.816-152.512 29.994l-57.834 26.816c82.965 56.768 183.701 42.731 246.656-20.33 49.941-50.006 65.408-118.166 50.944-179.627l.128.149c-20.971-90.282 5.162-126.378 58.666-200.17 1.28-1.75 2.56-3.499 3.819-5.291l-70.421 70.507v-.214l-243.883 245.27m-35.072 30.528c-59.563-56.96-49.28-145.088 1.515-195.926 37.568-37.61 99.136-52.97 152.874-30.4l57.707-26.666a166.554 166.554 0 00-39.019-21.334 191.467 191.467 0 00-208.042 41.942c-54.038 54.101-71.04 137.301-41.856 208.298 21.802 53.056-13.931 90.582-49.92 128.47C23.104 463.915 10.304 477.333 0 491.541l162.56-145.386" fill="#fff"></path> </svg>
\ No newline at end of file
diff --git a/web/public/logo_dark.svg b/web/public/logo_dark.svg
new file mode 100644
index 000000000..f71740448
--- /dev/null
+++ b/web/public/logo_dark.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="2000" zoomAndPan="magnify" viewBox="0 0 1500 1499.999933" height="2000" preserveAspectRatio="xMidYMid meet" version="1.0"><defs><clipPath id="de6a863ee9"><path d="M 611.484375 535.074219 L 873.984375 535.074219 L 873.984375 797.574219 L 611.484375 797.574219 Z M 611.484375 535.074219 " clip-rule="nonzero"/></clipPath></defs><path stroke-linecap="butt" transform="matrix(1.899279, 0, 0, 1.899279, -96.569138, -148.322585)" fill-opacity="1" fill="#ffffff" fill-rule="nonzero" stroke-linejoin="miter" d="M 437.019703 453.800091 C 402.078397 696.910461 422.232018 773.32927 597.859948 864.980012 C 613.215283 868.338606 638.648456 865.940492 630.970789 844.826392 C 431.830645 730.146761 442.270463 703.555664 455.729519 450.926878 C 412.106875 1219.687017 1158.580594 318.526705 466.19813 420.69542 C 1177.979405 354.418207 419.768089 -282.435367 443.967241 397.516391 C 455.906395 -287.252163 -289.55337 431.647356 418.157692 421.538668 C -257.242586 407.7999 386.431011 1169.838738 437.01559 453.804204 Z M 437.019703 453.800091 " stroke="#000000" stroke-width="0.312" stroke-opacity="1" stroke-miterlimit="4"/><path fill="#ffffff" d="M 721.734375 528.828125 C 690.800781 402.515625 706.269531 117.671875 501.34375 68.6875 C 213.925781 60.957031 119.835938 316.164062 149.484375 439.882812 C 221.660156 622.90625 487.175781 604.859375 679.210938 617.75 " fill-opacity="1" fill-rule="evenodd"/><path fill="#ffffff" d="M 757.800781 505.714844 C 792.601562 325.269531 800.335938 82.953125 1005.277344 33.988281 C 1292.695312 26.257812 1394.515625 273.714844 1345.554688 397.453125 C 1242.445312 580.476562 1015.589844 608.824219 823.554688 621.722656 " fill-opacity="1" fill-rule="evenodd"/><path fill="#ffffff" d="M 716.605469 752.390625 C 686.5 877.8125 666.753906 1226.375 467.308594 1275.015625 C 230.125 1332.960938 96.019531 1029.289062 124.867188 906.421875 C 195.113281 724.691406 503.773438 676.875 690.683594 664.074219 " fill-opacity="1" fill-rule="evenodd"/><path fill="#ffffff" d="M 780.992188 772.351562 C 811.925781 898.664062 757.792969 1237.636719 962.726562 1286.621094 C 1250.144531 1294.355469 1363.566406 942.492188 1333.921875 818.753906 C 1261.742188 635.730469 1023.292969 657.640625 835.132812 664.085938 " fill-opacity="1" fill-rule="evenodd"/><g clip-path="url(#de6a863ee9)"><path fill="#242021" d="M 873.621094 666.140625 C 873.621094 668.285156 873.570312 670.429688 873.464844 672.574219 C 873.359375 674.714844 873.203125 676.855469 872.992188 678.988281 C 872.78125 681.125 872.519531 683.25 872.203125 685.375 C 871.890625 687.496094 871.523438 689.609375 871.105469 691.710938 C 870.683594 693.816406 870.214844 695.90625 869.695312 697.988281 C 869.171875 700.070312 868.601562 702.136719 867.976562 704.1875 C 867.355469 706.242188 866.683594 708.277344 865.960938 710.296875 C 865.238281 712.316406 864.464844 714.316406 863.644531 716.300781 C 862.824219 718.28125 861.957031 720.242188 861.039062 722.179688 C 860.121094 724.121094 859.15625 726.035156 858.144531 727.925781 C 857.132812 729.820312 856.078125 731.683594 854.976562 733.523438 C 853.871094 735.363281 852.726562 737.175781 851.53125 738.960938 C 850.339844 740.742188 849.105469 742.496094 847.828125 744.21875 C 846.550781 745.941406 845.230469 747.632812 843.871094 749.289062 C 842.511719 750.949219 841.109375 752.574219 839.667969 754.160156 C 838.226562 755.75 836.75 757.304688 835.234375 758.820312 C 833.714844 760.335938 832.164062 761.816406 830.574219 763.257812 C 828.984375 764.699219 827.359375 766.097656 825.703125 767.457031 C 824.042969 768.820312 822.355469 770.140625 820.632812 771.417969 C 818.90625 772.695312 817.15625 773.929688 815.371094 775.121094 C 813.589844 776.3125 811.777344 777.460938 809.9375 778.5625 C 808.097656 779.664062 806.230469 780.722656 804.339844 781.734375 C 802.445312 782.746094 800.53125 783.710938 798.59375 784.625 C 796.652344 785.542969 794.691406 786.414062 792.710938 787.234375 C 790.730469 788.054688 788.730469 788.824219 786.710938 789.546875 C 784.691406 790.269531 782.652344 790.945312 780.601562 791.566406 C 778.546875 792.1875 776.480469 792.761719 774.402344 793.28125 C 772.320312 793.804688 770.226562 794.273438 768.125 794.691406 C 766.019531 795.109375 763.90625 795.476562 761.785156 795.792969 C 759.664062 796.105469 757.535156 796.367188 755.402344 796.578125 C 753.265625 796.789062 751.128906 796.945312 748.984375 797.050781 C 746.84375 797.15625 744.699219 797.210938 742.554688 797.210938 C 740.410156 797.210938 738.265625 797.15625 736.121094 797.050781 C 733.980469 796.945312 731.839844 796.789062 729.707031 796.578125 C 727.570312 796.367188 725.445312 796.105469 723.320312 795.792969 C 721.199219 795.476562 719.085938 795.109375 716.984375 794.691406 C 714.878906 794.273438 712.789062 793.804688 710.707031 793.28125 C 708.625 792.761719 706.558594 792.1875 704.507812 791.566406 C 702.453125 790.945312 700.417969 790.269531 698.398438 789.546875 C 696.378906 788.824219 694.378906 788.054688 692.394531 787.234375 C 690.414062 786.414062 688.453125 785.542969 686.515625 784.625 C 684.574219 783.710938 682.660156 782.746094 680.769531 781.734375 C 678.875 780.722656 677.011719 779.664062 675.171875 778.5625 C 673.332031 777.460938 671.519531 776.3125 669.734375 775.121094 C 667.953125 773.929688 666.199219 772.695312 664.476562 771.417969 C 662.753906 770.140625 661.0625 768.820312 659.40625 767.457031 C 657.746094 766.097656 656.121094 764.699219 654.535156 763.257812 C 652.945312 761.816406 651.390625 760.335938 649.875 758.820312 C 648.359375 757.304688 646.878906 755.75 645.4375 754.160156 C 643.996094 752.574219 642.597656 750.949219 641.238281 749.289062 C 639.875 747.632812 638.554688 745.941406 637.277344 744.21875 C 636 742.496094 634.765625 740.742188 633.574219 738.960938 C 632.382812 737.175781 631.234375 735.363281 630.132812 733.523438 C 629.03125 731.683594 627.972656 729.820312 626.960938 727.925781 C 625.949219 726.035156 624.988281 724.121094 624.070312 722.179688 C 623.152344 720.242188 622.285156 718.28125 621.460938 716.300781 C 620.640625 714.316406 619.871094 712.316406 619.148438 710.296875 C 618.425781 708.277344 617.75 706.242188 617.128906 704.1875 C 616.507812 702.136719 615.933594 700.070312 615.414062 697.988281 C 614.890625 695.90625 614.421875 693.816406 614.003906 691.710938 C 613.585938 689.609375 613.21875 687.496094 612.902344 685.375 C 612.589844 683.25 612.328125 681.125 612.117188 678.988281 C 611.90625 676.855469 611.75 674.714844 611.644531 672.574219 C 611.539062 670.429688 611.484375 668.285156 611.484375 666.140625 C 611.484375 663.996094 611.539062 661.851562 611.644531 659.710938 C 611.75 657.566406 611.90625 655.429688 612.117188 653.292969 C 612.328125 651.160156 612.589844 649.03125 612.902344 646.910156 C 613.21875 644.789062 613.585938 642.675781 614.003906 640.570312 C 614.421875 638.46875 614.890625 636.375 615.414062 634.292969 C 615.933594 632.214844 616.507812 630.148438 617.128906 628.09375 C 617.75 626.042969 618.425781 624.003906 619.148438 621.984375 C 619.871094 619.964844 620.640625 617.964844 621.460938 615.984375 C 622.285156 614.003906 623.152344 612.042969 624.070312 610.101562 C 624.988281 608.164062 625.949219 606.25 626.960938 604.355469 C 627.972656 602.464844 629.03125 600.597656 630.132812 598.757812 C 631.234375 596.917969 632.382812 595.109375 633.574219 593.324219 C 634.765625 591.539062 636 589.789062 637.277344 588.0625 C 638.554688 586.339844 639.875 584.652344 641.238281 582.992188 C 642.597656 581.335938 643.996094 579.710938 645.4375 578.121094 C 646.878906 576.53125 648.359375 574.980469 649.875 573.460938 C 651.390625 571.945312 652.945312 570.46875 654.535156 569.027344 C 656.121094 567.585938 657.746094 566.183594 659.40625 564.824219 C 661.0625 563.464844 662.753906 562.144531 664.476562 560.867188 C 666.199219 559.589844 667.953125 558.355469 669.734375 557.164062 C 671.519531 555.96875 673.332031 554.824219 675.171875 553.71875 C 677.011719 552.617188 678.875 551.5625 680.769531 550.550781 C 682.660156 549.539062 684.574219 548.574219 686.515625 547.65625 C 688.453125 546.742188 690.414062 545.871094 692.394531 545.050781 C 694.378906 544.230469 696.378906 543.457031 698.398438 542.734375 C 700.417969 542.011719 702.453125 541.339844 704.507812 540.71875 C 706.558594 540.09375 708.625 539.523438 710.707031 539 C 712.789062 538.480469 714.878906 538.011719 716.984375 537.59375 C 719.085938 537.171875 721.199219 536.808594 723.320312 536.492188 C 725.445312 536.175781 727.570312 535.914062 729.707031 535.703125 C 731.839844 535.496094 733.980469 535.335938 736.121094 535.230469 C 738.265625 535.125 740.410156 535.074219 742.554688 535.074219 C 744.699219 535.074219 746.84375 535.125 748.984375 535.230469 C 751.128906 535.335938 753.265625 535.496094 755.402344 535.703125 C 757.535156 535.914062 759.664062 536.175781 761.785156 536.492188 C 763.90625 536.808594 766.019531 537.171875 768.125 537.59375 C 770.226562 538.011719 772.320312 538.480469 774.402344 539 C 776.480469 539.523438 778.546875 540.09375 780.601562 540.71875 C 782.652344 541.339844 784.691406 542.011719 786.710938 542.734375 C 788.730469 543.457031 790.730469 544.230469 792.710938 545.050781 C 794.691406 545.871094 796.652344 546.742188 798.59375 547.65625 C 800.53125 548.574219 802.445312 549.539062 804.339844 550.550781 C 806.230469 551.5625 808.097656 552.617188 809.9375 553.71875 C 811.777344 554.824219 813.589844 555.96875 815.371094 557.164062 C 817.15625 558.355469 818.910156 559.589844 820.632812 560.867188 C 822.355469 562.144531 824.042969 563.464844 825.703125 564.824219 C 827.359375 566.183594 828.984375 567.585938 830.574219 569.027344 C 832.164062 570.46875 833.714844 571.945312 835.234375 573.460938 C 836.75 574.980469 838.226562 576.53125 839.667969 578.121094 C 841.109375 579.710938 842.511719 581.335938 843.871094 582.992188 C 845.230469 584.652344 846.550781 586.339844 847.828125 588.0625 C 849.105469 589.789062 850.339844 591.539062 851.53125 593.324219 C 852.726562 595.109375 853.871094 596.917969 854.976562 598.757812 C 856.078125 600.597656 857.132812 602.464844 858.144531 604.355469 C 859.15625 606.25 860.121094 608.164062 861.039062 610.101562 C 861.957031 612.042969 862.824219 614.003906 863.644531 615.984375 C 864.464844 617.964844 865.238281 619.964844 865.960938 621.984375 C 866.683594 624.003906 867.355469 626.042969 867.976562 628.09375 C 868.601562 630.148438 869.171875 632.214844 869.695312 634.292969 C 870.214844 636.375 870.683594 638.46875 871.105469 640.570312 C 871.523438 642.675781 871.890625 644.789062 872.203125 646.910156 C 872.519531 649.03125 872.78125 651.160156 872.992188 653.292969 C 873.203125 655.429688 873.359375 657.566406 873.464844 659.710938 C 873.570312 661.851562 873.621094 663.996094 873.621094 666.140625 Z M 873.621094 666.140625 " fill-opacity="1" fill-rule="nonzero"/></g></svg>
\ No newline at end of file
diff --git a/web/public/logo_light.svg b/web/public/logo_light.svg
new file mode 100644
index 000000000..b40e17e54
--- /dev/null
+++ b/web/public/logo_light.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="2000" zoomAndPan="magnify" viewBox="0 0 1500 1499.999933" height="2000" preserveAspectRatio="xMidYMid meet" version="1.0"><defs><clipPath id="7352204c4e"><path d="M 0.320312 0.960938 L 1259.601562 0.960938 L 1259.601562 1486.558594 L 0.320312 1486.558594 Z M 0.320312 0.960938 " clip-rule="nonzero"/></clipPath><clipPath id="5659d34a91"><path d="M 499.484375 523.074219 L 761.625 523.074219 L 761.625 785.210938 L 499.484375 785.210938 Z M 499.484375 523.074219 " clip-rule="nonzero"/></clipPath><clipPath id="186d2c055d"><rect x="0" width="1260" y="0" height="1487"/></clipPath></defs><g transform="matrix(1, 0, 0, 1, 112, 12)"><g clip-path="url(#186d2c055d)"><path fill="#242021" d="M 621.449219 701.570312 C 555.085938 1163.300781 593.363281 1308.445312 926.929688 1482.515625 C 956.09375 1488.894531 1004.398438 1484.335938 989.8125 1444.234375 C 611.59375 1226.425781 631.421875 1175.925781 656.984375 696.109375 C 574.128906 2156.199219 1991.890625 444.644531 676.867188 638.695312 C 2028.734375 512.816406 588.683594 -696.746094 634.644531 594.671875 C 657.320312 -705.894531 -758.515625 659.496094 585.625 640.292969 C -697.148438 614.199219 525.363281 2061.523438 621.441406 701.578125 Z M 621.449219 701.570312 " fill-opacity="1" fill-rule="nonzero"/><g clip-path="url(#7352204c4e)"><path stroke-linecap="butt" transform="matrix(1.899277, 0, 0, 1.899277, -208.572889, -160.322938)" fill="none" stroke-linejoin="miter" d="M 437.019936 453.800603 C 402.078605 696.909092 422.23224 773.330013 597.860297 864.980821 C 613.215643 868.339417 638.648834 865.939244 630.969105 844.825129 C 431.830874 730.145416 442.270699 703.556357 455.729765 450.925332 C 412.105034 1219.686025 1158.57929 318.525064 466.198384 420.695909 C 1177.978115 354.418648 419.76831 -282.435385 443.96748 397.516864 C 455.906642 -287.252184 -289.55366 431.647853 418.157911 421.5371 C -257.242853 407.798323 386.429151 1169.837709 437.015823 453.804717 Z M 437.019936 453.800603 " stroke="#000000" stroke-width="0.312" stroke-opacity="1" stroke-miterlimit="4"/></g><path fill="#242021" d="M 609.730469 516.828125 C 578.796875 390.515625 594.265625 105.671875 389.339844 56.6875 C 101.921875 48.957031 7.832031 304.164062 37.476562 427.882812 C 109.65625 610.90625 375.171875 592.859375 567.207031 605.75 " fill-opacity="1" fill-rule="evenodd"/><path fill="#242021" d="M 645.796875 493.710938 C 680.597656 313.265625 688.332031 70.953125 893.273438 21.988281 C 1180.691406 14.253906 1282.511719 261.714844 1233.546875 385.453125 C 1130.4375 568.476562 903.585938 596.824219 711.550781 609.71875 " fill-opacity="1" fill-rule="evenodd"/><path fill="#242021" d="M 604.601562 740.390625 C 574.496094 865.8125 554.75 1214.375 355.304688 1263.015625 C 118.121094 1320.960938 -15.984375 1017.285156 12.863281 894.421875 C 83.109375 712.691406 391.769531 664.875 578.675781 652.074219 " fill-opacity="1" fill-rule="evenodd"/><path fill="#242021" d="M 668.988281 760.351562 C 699.921875 886.664062 645.789062 1225.636719 850.71875 1274.621094 C 1138.136719 1282.351562 1251.5625 930.488281 1221.914062 806.75 C 1149.738281 623.730469 911.289062 645.640625 723.128906 652.085938 " fill-opacity="1" fill-rule="evenodd"/><g clip-path="url(#5659d34a91)"><path fill="#d9d9d9" d="M 761.605469 654.132812 C 761.605469 656.277344 761.550781 658.421875 761.445312 660.5625 C 761.339844 662.707031 761.183594 664.84375 760.972656 666.980469 C 760.761719 669.113281 760.5 671.242188 760.1875 673.363281 C 759.871094 675.484375 759.503906 677.597656 759.085938 679.703125 C 758.667969 681.804688 758.199219 683.898438 757.675781 685.976562 C 757.15625 688.058594 756.582031 690.125 755.960938 692.175781 C 755.339844 694.230469 754.664062 696.265625 753.941406 698.285156 C 753.21875 700.304688 752.449219 702.304688 751.628906 704.289062 C 750.808594 706.269531 749.9375 708.230469 749.019531 710.167969 C 748.105469 712.105469 747.140625 714.023438 746.128906 715.914062 C 745.117188 717.804688 744.0625 719.671875 742.957031 721.511719 C 741.855469 723.351562 740.707031 725.164062 739.515625 726.945312 C 738.324219 728.730469 737.089844 730.480469 735.8125 732.203125 C 734.535156 733.925781 733.214844 735.617188 731.855469 737.277344 C 730.496094 738.933594 729.09375 740.558594 727.652344 742.148438 C 726.214844 743.734375 724.734375 745.289062 723.21875 746.804688 C 721.703125 748.324219 720.148438 749.800781 718.558594 751.242188 C 716.96875 752.683594 715.347656 754.082031 713.6875 755.441406 C 712.03125 756.804688 710.339844 758.125 708.617188 759.402344 C 706.894531 760.679688 705.140625 761.914062 703.359375 763.105469 C 701.574219 764.296875 699.761719 765.445312 697.921875 766.546875 C 696.082031 767.648438 694.21875 768.707031 692.324219 769.71875 C 690.433594 770.726562 688.519531 771.691406 686.578125 772.609375 C 684.640625 773.527344 682.679688 774.394531 680.699219 775.214844 C 678.71875 776.035156 676.71875 776.808594 674.699219 777.53125 C 672.679688 778.253906 670.640625 778.925781 668.589844 779.550781 C 666.535156 780.171875 664.46875 780.742188 662.390625 781.265625 C 660.308594 781.785156 658.21875 782.253906 656.113281 782.675781 C 654.007812 783.09375 651.898438 783.460938 649.773438 783.773438 C 647.652344 784.089844 645.527344 784.351562 643.390625 784.5625 C 641.257812 784.769531 639.117188 784.929688 636.976562 785.035156 C 634.832031 785.140625 632.691406 785.191406 630.542969 785.191406 C 628.398438 785.191406 626.257812 785.140625 624.113281 785.035156 C 621.972656 784.929688 619.832031 784.769531 617.699219 784.5625 C 615.5625 784.351562 613.4375 784.089844 611.3125 783.773438 C 609.191406 783.460938 607.078125 783.09375 604.976562 782.675781 C 602.871094 782.253906 600.78125 781.785156 598.699219 781.265625 C 596.621094 780.742188 594.554688 780.171875 592.5 779.550781 C 590.449219 778.925781 588.410156 778.253906 586.390625 777.53125 C 584.371094 776.808594 582.371094 776.035156 580.390625 775.214844 C 578.410156 774.394531 576.449219 773.527344 574.507812 772.609375 C 572.570312 771.691406 570.65625 770.726562 568.765625 769.71875 C 566.871094 768.707031 565.007812 767.648438 563.167969 766.546875 C 561.328125 765.445312 559.515625 764.296875 557.730469 763.105469 C 555.949219 761.914062 554.195312 760.679688 552.472656 759.402344 C 550.75 758.125 549.058594 756.804688 547.402344 755.441406 C 545.742188 754.082031 544.121094 752.683594 542.53125 751.242188 C 540.941406 749.800781 539.386719 748.324219 537.871094 746.804688 C 536.355469 745.289062 534.875 743.734375 533.4375 742.148438 C 531.996094 740.558594 530.59375 738.933594 529.234375 737.277344 C 527.875 735.617188 526.554688 733.925781 525.277344 732.203125 C 524 730.480469 522.765625 728.730469 521.574219 726.945312 C 520.382812 725.164062 519.234375 723.351562 518.132812 721.511719 C 517.027344 719.671875 515.972656 717.804688 514.960938 715.914062 C 513.949219 714.023438 512.984375 712.105469 512.070312 710.167969 C 511.152344 708.230469 510.28125 706.269531 509.460938 704.289062 C 508.640625 702.304688 507.871094 700.304688 507.148438 698.285156 C 506.425781 696.265625 505.75 694.230469 505.128906 692.175781 C 504.507812 690.125 503.933594 688.058594 503.414062 685.976562 C 502.890625 683.898438 502.421875 681.804688 502.003906 679.703125 C 501.585938 677.597656 501.21875 675.484375 500.902344 673.363281 C 500.589844 671.242188 500.328125 669.113281 500.117188 666.980469 C 499.90625 664.84375 499.75 662.707031 499.644531 660.5625 C 499.539062 658.421875 499.484375 656.277344 499.484375 654.132812 C 499.484375 651.988281 499.539062 649.84375 499.644531 647.703125 C 499.75 645.558594 499.90625 643.421875 500.117188 641.285156 C 500.328125 639.152344 500.589844 637.023438 500.902344 634.902344 C 501.21875 632.78125 501.585938 630.667969 502.003906 628.5625 C 502.421875 626.460938 502.890625 624.367188 503.414062 622.289062 C 503.933594 620.207031 504.507812 618.140625 505.128906 616.089844 C 505.75 614.035156 506.425781 612 507.148438 609.980469 C 507.871094 607.960938 508.640625 605.960938 509.460938 603.980469 C 510.28125 601.996094 511.152344 600.035156 512.070312 598.097656 C 512.984375 596.160156 513.949219 594.242188 514.960938 592.351562 C 515.972656 590.460938 517.027344 588.59375 518.132812 586.753906 C 519.234375 584.914062 520.382812 583.105469 521.574219 581.320312 C 522.765625 579.535156 524 577.785156 525.277344 576.0625 C 526.554688 574.339844 527.875 572.648438 529.234375 570.988281 C 530.59375 569.332031 531.996094 567.707031 533.4375 566.117188 C 534.875 564.53125 536.355469 562.976562 537.871094 561.460938 C 539.386719 559.941406 540.941406 558.464844 542.53125 557.023438 C 544.121094 555.582031 545.742188 554.183594 547.402344 552.824219 C 549.058594 551.460938 550.75 550.144531 552.472656 548.863281 C 554.195312 547.585938 555.949219 546.351562 557.730469 545.160156 C 559.515625 543.96875 561.328125 542.820312 563.167969 541.71875 C 565.007812 540.617188 566.871094 539.558594 568.765625 538.546875 C 570.65625 537.539062 572.570312 536.574219 574.507812 535.65625 C 576.449219 534.738281 578.410156 533.871094 580.390625 533.050781 C 582.371094 532.230469 584.371094 531.457031 586.390625 530.734375 C 588.410156 530.011719 590.449219 529.339844 592.5 528.714844 C 594.554688 528.09375 596.621094 527.523438 598.699219 527 C 600.78125 526.480469 602.871094 526.011719 604.976562 525.589844 C 607.082031 525.171875 609.191406 524.808594 611.3125 524.492188 C 613.4375 524.175781 615.5625 523.914062 617.699219 523.703125 C 619.832031 523.496094 621.972656 523.335938 624.113281 523.230469 C 626.257812 523.125 628.398438 523.074219 630.542969 523.074219 C 632.691406 523.074219 634.832031 523.125 636.976562 523.230469 C 639.117188 523.335938 641.257812 523.496094 643.390625 523.703125 C 645.527344 523.914062 647.652344 524.175781 649.773438 524.492188 C 651.898438 524.808594 654.007812 525.171875 656.113281 525.589844 C 658.21875 526.011719 660.308594 526.480469 662.390625 527 C 664.46875 527.523438 666.535156 528.09375 668.589844 528.714844 C 670.640625 529.339844 672.679688 530.011719 674.699219 530.734375 C 676.71875 531.457031 678.71875 532.230469 680.699219 533.050781 C 682.679688 533.871094 684.640625 534.738281 686.578125 535.65625 C 688.519531 536.574219 690.433594 537.539062 692.324219 538.546875 C 694.21875 539.558594 696.082031 540.617188 697.921875 541.71875 C 699.761719 542.820312 701.574219 543.96875 703.359375 545.160156 C 705.140625 546.351562 706.894531 547.585938 708.617188 548.863281 C 710.339844 550.144531 712.03125 551.460938 713.6875 552.824219 C 715.347656 554.183594 716.96875 555.582031 718.558594 557.023438 C 720.148438 558.464844 721.703125 559.941406 723.21875 561.460938 C 724.734375 562.976562 726.214844 564.53125 727.652344 566.117188 C 729.09375 567.707031 730.496094 569.332031 731.855469 570.988281 C 733.214844 572.648438 734.535156 574.339844 735.8125 576.0625 C 737.089844 577.785156 738.324219 579.535156 739.515625 581.320312 C 740.707031 583.105469 741.855469 584.914062 742.957031 586.753906 C 744.0625 588.59375 745.117188 590.460938 746.128906 592.351562 C 747.140625 594.242188 748.105469 596.160156 749.019531 598.097656 C 749.9375 600.035156 750.808594 601.996094 751.628906 603.980469 C 752.449219 605.960938 753.21875 607.960938 753.941406 609.980469 C 754.664062 612 755.339844 614.035156 755.960938 616.089844 C 756.582031 618.140625 757.15625 620.207031 757.675781 622.289062 C 758.199219 624.367188 758.667969 626.460938 759.085938 628.5625 C 759.503906 630.667969 759.871094 632.78125 760.1875 634.902344 C 760.5 637.023438 760.761719 639.152344 760.972656 641.285156 C 761.183594 643.421875 761.339844 645.558594 761.445312 647.703125 C 761.550781 649.84375 761.605469 651.988281 761.605469 654.132812 Z M 761.605469 654.132812 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></svg>
\ No newline at end of file
diff --git a/public/next.svg b/web/public/next.svg
similarity index 100%
rename from public/next.svg
rename to web/public/next.svg
diff --git a/web/public/perplexity.svg b/web/public/perplexity.svg
new file mode 100644
index 000000000..41e8ddd35
--- /dev/null
+++ b/web/public/perplexity.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" class="w-full h-full"> <path d="M23.566,1.398l-9.495,9.504h9.495V1.398v2.602V1.398Zm-9.496,9.504L4.574,1.398v9.504h9.496Zm-.021-10.902v36m9.517-15.596l-9.495-9.504v13.625l9.495,9.504v-13.625Zm-18.991,0l9.496-9.504v13.625l-9.496,9.504v-13.625ZM.5,10.9v13.57h4.074v-4.066l9.496-9.504H.5Zm13.57,0l9.495,9.504v4.066h4.075v-13.57h-13.57Z" fill="none" stroke="#20808d" stroke-miterlimit="10"></path> </svg>
\ No newline at end of file
diff --git a/public/vercel.svg b/web/public/vercel.svg
similarity index 100%
rename from public/vercel.svg
rename to web/public/vercel.svg
diff --git a/public/window.svg b/web/public/window.svg
similarity index 100%
rename from public/window.svg
rename to web/public/window.svg
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/brands/[id]/layout.tsx b/web/src/app/[locale]/(dashboard)/dashboard/brands/[id]/layout.tsx
new file mode 100644
index 000000000..256acd741
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/brands/[id]/layout.tsx
@@ -0,0 +1,94 @@
+"use client";
+
+import { use } from "react";
+import { usePathname, Link } from "@/i18n/navigation";
+import { useBrandStore } from "@/stores/use-brand-store";
+import { Button } from "@/components/ui/button";
+import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
+import { cn } from "@/lib/utils";
+import { ArrowLeft, MessageSquareText, Settings, Tag } from "lucide-react";
+
+const SUB_NAV = [
+ { href: "topics", label: "Topics", icon: Tag },
+ { href: "prompts", label: "Prompts", icon: MessageSquareText },
+ { href: "settings", label: "Settings", icon: Settings },
+] as const;
+
+export default function BrandDetailLayout({
+ children,
+ params,
+}: {
+ children: React.ReactNode;
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ params: any;
+}) {
+ const { id } = use(params) as { id: string };
+ const pathname = usePathname();
+ const { brands } = useBrandStore();
+ const brand = brands.find((b) => b.id === id);
+
+ const initials = brand
+ ? brand.name
+ .split(" ")
+ .map((w) => w[0])
+ .join("")
+ .toUpperCase()
+ .slice(0, 2)
+ : "?";
+
+ return (
+ <div className="space-y-6">
+ {/* Brand header + back */}
+ <div className="flex items-center gap-4">
+ <Link href="/dashboard/brands">
+ <Button variant="ghost" size="icon">
+ <ArrowLeft className="h-4 w-4" />
+ </Button>
+ </Link>
+ {brand && (
+ <div className="flex items-center gap-3">
+ <Avatar className="h-9 w-9 rounded-lg">
+ <AvatarImage src={brand.logoUrl} alt={brand.name} />
+ <AvatarFallback className="rounded-lg bg-primary/10 text-primary text-sm font-semibold">
+ {initials}
+ </AvatarFallback>
+ </Avatar>
+ <div>
+ <h1 className="text-xl font-bold tracking-tight">{brand.name}</h1>
+ <p className="text-xs text-muted-foreground">
+ {brand.domains.find((d) => d.isPrimary)?.domain ?? ""}
+ </p>
+ </div>
+ </div>
+ )}
+ </div>
+
+ {/* Sub-nav */}
+ <nav className="flex gap-1 border-b">
+ {SUB_NAV.map((item) => {
+ const fullHref = `/dashboard/brands/${id}/${item.href}`;
+ const isActive = pathname.includes(`/${item.href}`);
+
+ return (
+ <Link key={item.href} href={fullHref}>
+ <span
+ className={cn(
+ "inline-flex items-center gap-2 border-b-2 px-4 py-2 text-sm font-medium transition-colors",
+ isActive
+ ? "border-primary text-primary"
+ : "border-transparent text-muted-foreground hover:text-foreground"
+ )}
+ >
+ <item.icon className="h-4 w-4" />
+ {item.label}
+ </span>
+ </Link>
+ );
+ })}
+ </nav>
+
+ {/* Page content */}
+ {children}
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/brands/[id]/prompts/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/brands/[id]/prompts/page.tsx
new file mode 100644
index 000000000..131e8281c
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/brands/[id]/prompts/page.tsx
@@ -0,0 +1,896 @@
+"use client";
+
+import { useEffect, useState, useCallback, useMemo } from "react";
+import { useParams } from "next/navigation";
+import { createClient } from "@/lib/supabase/client";
+import { getPromptSets, savePromptSet, addPromptToSet, updatePrompt, deletePrompt } from "@/lib/actions/prompt";
+import { getBrandById } from "@/lib/actions/brand";
+import { getTopics } from "@/lib/actions/topic";
+import { PromptSuggestionCard } from "@/components/dashboard/prompt-suggestion-card";
+import { Button } from "@/components/ui/button";
+import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
+import { Skeleton } from "@/components/ui/skeleton";
+import { Input } from "@/components/ui/input";
+import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
+import { toast } from "sonner";
+import { Badge } from "@/components/ui/badge";
+import { Loader2, Plus, Sparkles, Save, X, Play, Search } from "lucide-react";
+import { MODEL_GROUPS, ALL_MODELS, SCRAPER_GROUPS, ALL_SCRAPERS } from "@/config/prompt-options";
+import { usePlanContext } from "@/components/providers/plan-provider";
+import { PLANS } from "@/config/plans";
+import { saveTrackingJob } from "@/lib/tracking-job-store";
+import { useRouter } from "@/i18n/navigation";
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+} from "@/components/ui/dialog";
+import { Checkbox } from "@/components/ui/checkbox";
+import type { Brand, Prompt, PromptSet, Topic } from "@/types";
+
+interface UnanalyzedPrompt {
+ id: string;
+ text: string;
+ category: string;
+}
+
+const AEO_SERVER_URL = process.env.NEXT_PUBLIC_API_URL || "http://localhost:80";
+
+interface SuggestedPrompt {
+ text: string;
+ category: string;
+ isActive: boolean;
+}
+
+export default function PromptsPage() {
+ const params = useParams();
+ const brandId = params.id as string;
+ const router = useRouter();
+
+ const [brand, setBrand] = useState<Brand | null>(null);
+ const [topics, setTopics] = useState<Topic[]>([]);
+ const [promptSets, setPromptSets] = useState<PromptSet[]>([]);
+ const [suggestions, setSuggestions] = useState<SuggestedPrompt[]>([]);
+ const [isLoading, setIsLoading] = useState(true);
+ const [isGenerating, setIsGenerating] = useState(false);
+ const [isSaving, setIsSaving] = useState(false);
+ const [manualText, setManualText] = useState("");
+ const [manualCategory, setManualCategory] = useState("");
+ const [generateTopics, setGenerateTopics] = useState<string[] | null>(null);
+ const { planId } = usePlanContext();
+ const allowedScraperIds = useMemo(() => {
+ const allowed = PLANS[planId].limits.allowedScrapers;
+ return allowed ? [...allowed] : ALL_SCRAPERS.map((s) => s.id);
+ }, [planId]);
+ const allowedModelIds = useMemo(() => {
+ const allowed = PLANS[planId].limits.allowedModels;
+ return allowed ? [...allowed] : ALL_MODELS.map((m) => m.id);
+ }, [planId]);
+ const visibleScrapers = useMemo(
+ () => ALL_SCRAPERS.filter((s) => allowedScraperIds.includes(s.id)),
+ [allowedScraperIds],
+ );
+ const visibleModels = useMemo(
+ () => ALL_MODELS.filter((m) => allowedModelIds.includes(m.id)),
+ [allowedModelIds],
+ );
+ const [manualModels, setManualModels] = useState<string[]>(allowedModelIds);
+ const [manualScrapers, setManualScrapers] = useState<string[]>(allowedScraperIds);
+ const [isAddingManual, setIsAddingManual] = useState(false);
+ const [unanalyzedPrompts, setUnanalyzedPrompts] = useState<UnanalyzedPrompt[]>([]);
+ const [isAnalyzing, setIsAnalyzing] = useState(false);
+ const [analyzeDialogOpen, setAnalyzeDialogOpen] = useState(false);
+ const [selectedAnalyzeIds, setSelectedAnalyzeIds] = useState<Set<string>>(new Set());
+ const [isLoadingUnanalyzed, setIsLoadingUnanalyzed] = useState(false);
+
+ // Flatten all prompts from all sets, sorted newest first
+ const allPrompts = useMemo(() => {
+ return promptSets
+ .flatMap((set) => set.prompts)
+ .sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
+ }, [promptSets]);
+
+ const fetchUnanalyzed = useCallback(async () => {
+ try {
+ const supabase = createClient();
+ const { data: { session } } = await supabase.auth.getSession();
+ if (!session) return;
+ const resp = await fetch(`${AEO_SERVER_URL}/api/tracking/unanalyzed/${brandId}`, {
+ headers: {
+ Authorization: `Bearer ${session.access_token}`,
+ "ngrok-skip-browser-warning": "1",
+ },
+ });
+ if (resp.ok) {
+ const data = await resp.json();
+ setUnanalyzedPrompts(data.prompts ?? []);
+ }
+ } catch {}
+ }, [brandId]);
+
+ const loadData = useCallback(async () => {
+ try {
+ const [brandData, sets, topicsData] = await Promise.all([
+ getBrandById(brandId),
+ getPromptSets(brandId),
+ getTopics(brandId),
+ ]);
+ setBrand(brandData);
+ setTopics(topicsData);
+ if (topicsData.length > 0 && !manualCategory) {
+ setManualCategory(topicsData[0].name);
+ }
+ setGenerateTopics((prev) =>
+ prev === null ? topicsData.map((t) => t.name) : prev,
+ );
+ setPromptSets(sets);
+ } catch {
+ toast.error("Failed to load data");
+ } finally {
+ setIsLoading(false);
+ }
+ fetchUnanalyzed();
+ }, [brandId, manualCategory, fetchUnanalyzed]);
+
+ useEffect(() => {
+ loadData();
+ }, [loadData]);
+
+ const handleGenerate = async () => {
+ if (!brand) return;
+ if (!generateTopics || generateTopics.length === 0) {
+ toast.error("Select at least one topic to generate prompts");
+ return;
+ }
+
+ setIsGenerating(true);
+ setSuggestions([]);
+
+ try {
+ const supabase = createClient();
+ const { data: { session } } = await supabase.auth.getSession();
+ if (!session) throw new Error("Not authenticated");
+
+ const response = await fetch(`${AEO_SERVER_URL}/api/prompts/from-topics`, {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ Authorization: `Bearer ${session.access_token}`,
+ },
+ body: JSON.stringify({
+ brandName: brand.name,
+ industry: brand.industry || undefined,
+ description: brand.description || undefined,
+ topics: generateTopics,
+ language: brand.language || "en",
+ }),
+ });
+
+ if (!response.ok) {
+ const err = await response.json().catch(() => ({}));
+ throw new Error(err.error || `Server error (${response.status})`);
+ }
+
+ const data = await response.json();
+ const allPrompts: SuggestedPrompt[] = [];
+ for (const tp of data.topicPrompts ?? []) {
+ for (const text of tp.prompts) {
+ allPrompts.push({ text, category: tp.topic, isActive: true });
+ }
+ }
+ setSuggestions(allPrompts);
+ toast.success(`${allPrompts.length} prompt suggestions generated!`);
+ } catch (err) {
+ toast.error(err instanceof Error ? err.message : "Failed to generate suggestions");
+ } finally {
+ setIsGenerating(false);
+ }
+ };
+
+ const handleSaveSuggestions = async () => {
+ const activePrompts = suggestions.filter((s) => s.isActive);
+ if (activePrompts.length === 0) {
+ toast.error("Select at least one prompt to save");
+ return;
+ }
+
+ setIsSaving(true);
+ try {
+ const defaultPlatforms = allowedScraperIds;
+ const defaultModels = allowedModelIds;
+
+ let targetSetId = promptSets[0]?.id;
+
+ if (!targetSetId) {
+ const newSet = await savePromptSet({
+ brandId,
+ name: "Prompts",
+ prompts: activePrompts.map((p) => ({
+ text: p.text,
+ category: p.category,
+ platforms: defaultPlatforms,
+ models: defaultModels,
+ })),
+ });
+ targetSetId = newSet.id;
+ } else {
+ await Promise.all(
+ activePrompts.map((p) =>
+ addPromptToSet({
+ promptSetId: targetSetId,
+ text: p.text,
+ category: p.category,
+ platforms: defaultPlatforms,
+ models: defaultModels,
+ })
+ )
+ );
+ }
+
+ setSuggestions([]);
+ toast.success(`Saved ${activePrompts.length} prompts`);
+ await loadData();
+ } catch (err) {
+ toast.error(err instanceof Error ? err.message : "Failed to save prompts");
+ } finally {
+ setIsSaving(false);
+ }
+ };
+
+ const handleAddManualPrompt = async () => {
+ if (!manualText.trim()) return;
+
+ setIsAddingManual(true);
+ try {
+ const existingSet = promptSets[0];
+
+ const promptData = {
+ text: manualText.trim(),
+ category: manualCategory,
+ platforms: manualScrapers,
+ models: manualModels,
+ };
+
+ if (existingSet) {
+ await addPromptToSet({
+ promptSetId: existingSet.id,
+ ...promptData,
+ });
+ } else {
+ await savePromptSet({
+ brandId,
+ name: `Prompts`,
+ prompts: [promptData],
+ });
+ }
+
+ setManualText("");
+ setManualModels(allowedModelIds);
+ setManualScrapers(allowedScraperIds);
+ toast.success("Prompt added");
+ await loadData();
+ } catch (err) {
+ toast.error(err instanceof Error ? err.message : "Failed to add prompt");
+ } finally {
+ setIsAddingManual(false);
+ }
+ };
+
+ const updatePromptLocal = useCallback((promptId: string, patch: Partial<Prompt>) => {
+ setPromptSets((prev) =>
+ prev.map((set) => ({
+ ...set,
+ prompts: set.prompts.map((p) =>
+ p.id === promptId ? { ...p, ...patch } : p,
+ ),
+ })),
+ );
+ }, []);
+
+ const removePromptLocal = useCallback((promptId: string) => {
+ setPromptSets((prev) =>
+ prev.map((set) => ({
+ ...set,
+ prompts: set.prompts.filter((p) => p.id !== promptId),
+ })),
+ );
+ }, []);
+
+ const handleTogglePrompt = useCallback(async (prompt: Prompt) => {
+ updatePromptLocal(prompt.id, { isActive: !prompt.isActive });
+ try {
+ await updatePrompt(prompt.id, { isActive: !prompt.isActive });
+ } catch {
+ updatePromptLocal(prompt.id, { isActive: prompt.isActive });
+ toast.error("Failed to update prompt");
+ }
+ }, [updatePromptLocal]);
+
+ const handleEditPrompt = useCallback(async (promptId: string, text: string) => {
+ updatePromptLocal(promptId, { text });
+ try {
+ await updatePrompt(promptId, { text });
+ } catch {
+ toast.error("Failed to update prompt");
+ await loadData();
+ }
+ }, [updatePromptLocal, loadData]);
+
+ const handleCategoryChange = useCallback(async (promptId: string, category: string) => {
+ updatePromptLocal(promptId, { category });
+ try {
+ await updatePrompt(promptId, { category });
+ } catch {
+ toast.error("Failed to update topic");
+ await loadData();
+ }
+ }, [updatePromptLocal, loadData]);
+
+ const handleModelsChange = useCallback(async (promptId: string, models: string[]) => {
+ updatePromptLocal(promptId, { models });
+ try {
+ await updatePrompt(promptId, { models });
+ } catch {
+ toast.error("Failed to update models");
+ await loadData();
+ }
+ }, [updatePromptLocal, loadData]);
+
+ const handlePlatformsChange = useCallback(async (promptId: string, platforms: string[]) => {
+ updatePromptLocal(promptId, { platforms: platforms as Prompt["platforms"] });
+ try {
+ await updatePrompt(promptId, { platforms });
+ } catch {
+ toast.error("Failed to update platforms");
+ await loadData();
+ }
+ }, [updatePromptLocal, loadData]);
+
+ const handleDeletePrompt = useCallback(async (promptId: string) => {
+ removePromptLocal(promptId);
+ try {
+ await deletePrompt(promptId);
+ } catch {
+ toast.error("Failed to delete prompt");
+ await loadData();
+ }
+ }, [removePromptLocal, loadData]);
+
+ const openAnalyzeDialog = useCallback(async () => {
+ setAnalyzeDialogOpen(true);
+ setIsLoadingUnanalyzed(true);
+ try {
+ const supabase = createClient();
+ const { data: { session } } = await supabase.auth.getSession();
+ if (!session) return;
+ const resp = await fetch(`${AEO_SERVER_URL}/api/tracking/unanalyzed/${brandId}`, {
+ headers: {
+ Authorization: `Bearer ${session.access_token}`,
+ "ngrok-skip-browser-warning": "1",
+ },
+ });
+ if (resp.ok) {
+ const data = await resp.json();
+ const prompts: UnanalyzedPrompt[] = data.prompts ?? [];
+ setUnanalyzedPrompts(prompts);
+ setSelectedAnalyzeIds(new Set(prompts.map((p) => p.id)));
+ }
+ } catch {
+ toast.error("Failed to load unanalyzed prompts");
+ } finally {
+ setIsLoadingUnanalyzed(false);
+ }
+ }, [brandId]);
+
+ const handleAnalyzeSelected = async () => {
+ if (isAnalyzing || selectedAnalyzeIds.size === 0) return;
+ setIsAnalyzing(true);
+ try {
+ const supabase = createClient();
+ const { data: { session } } = await supabase.auth.getSession();
+ if (!session) throw new Error("Not authenticated");
+
+ const resp = await fetch(`${AEO_SERVER_URL}/api/tracking/analyze-new`, {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ Authorization: `Bearer ${session.access_token}`,
+ "ngrok-skip-browser-warning": "1",
+ },
+ body: JSON.stringify({ brandId, promptIds: Array.from(selectedAnalyzeIds) }),
+ });
+
+ const data = await resp.json();
+
+ if (!resp.ok) {
+ toast.error(data.message || "Failed to start analysis");
+ return;
+ }
+
+ if (data.newCount === 0) {
+ toast.info(data.message || "All prompts already analyzed");
+ } else {
+ toast.success(data.message || `Analyzing ${data.newCount} new prompts`);
+ setUnanalyzedPrompts([]);
+ setAnalyzeDialogOpen(false);
+ saveTrackingJob({ jobId: data.jobId, brandId, startedAt: Date.now() });
+ router.push("/dashboard/insights");
+ }
+ } catch (err) {
+ toast.error(err instanceof Error ? err.message : "Failed to start analysis");
+ } finally {
+ setIsAnalyzing(false);
+ }
+ };
+
+ if (isLoading) {
+ return (
+ <div className="space-y-6">
+ <Skeleton className="h-8 w-48" />
+ <Skeleton className="h-64 w-full" />
+ </div>
+ );
+ }
+
+ if (!brand) {
+ return (
+ <div className="flex flex-col items-center justify-center py-12">
+ <p className="text-muted-foreground">Brand not found</p>
+ </div>
+ );
+ }
+
+ return (
+ <div className="space-y-6">
+ {/* Add Prompt + AI Generate */}
+ <div className="grid gap-4 md:grid-cols-2">
+ {/* Manual Add */}
+ <Card>
+ <CardHeader className="pb-3">
+ <CardTitle className="flex items-center gap-2 text-base">
+ <Plus className="h-4 w-4" />
+ Add Prompt
+ </CardTitle>
+ </CardHeader>
+ <CardContent>
+ <div className="space-y-3">
+ <Input
+ placeholder="e.g. Best project management tools for startups"
+ value={manualText}
+ onChange={(e) => setManualText(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === "Enter" && manualText.trim()) handleAddManualPrompt();
+ }}
+ />
+
+ <div className="space-y-3">
+ {/* Topic */}
+ <div>
+ <label className="mb-1.5 block text-xs font-medium text-muted-foreground">Topic</label>
+ {topics.length > 0 ? (
+ <Select value={manualCategory} onValueChange={(v) => v && setManualCategory(v)}>
+ <SelectTrigger className="w-full">
+ <SelectValue placeholder="Select a topic" />
+ </SelectTrigger>
+ <SelectContent>
+ {topics.map((topic) => (
+ <SelectItem key={topic.id} value={topic.name}>{topic.name}</SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ ) : (
+ <p className="text-xs text-muted-foreground py-2">
+ No topics defined yet. Add topics in brand settings.
+ </p>
+ )}
+ </div>
+
+ {/* Platform & Models — combined select */}
+ <div>
+ <label className="mb-1.5 block text-xs font-medium text-muted-foreground">Platform & Models</label>
+ <Select
+ value="__placeholder__"
+ onValueChange={(v) => {
+ if (!v || v === "__placeholder__") return;
+ if (visibleModels.some((m) => m.id === v) && !manualModels.includes(v)) {
+ setManualModels((prev) => [...prev, v]);
+ } else if (visibleScrapers.some((s) => s.id === v) && !manualScrapers.includes(v)) {
+ setManualScrapers((prev) => [...prev, v]);
+ }
+ }}
+ >
+ <SelectTrigger className="w-full">
+ <span className="truncate text-muted-foreground">
+ {manualModels.length + manualScrapers.length > 0
+ ? `${manualModels.length + manualScrapers.length} selected`
+ : "Select platform & models"}
+ </span>
+ </SelectTrigger>
+ <SelectContent>
+ {SCRAPER_GROUPS.map((group) => {
+ const scrapers = group.scrapers.filter((s) =>
+ visibleScrapers.some((vs) => vs.id === s.id),
+ );
+ if (scrapers.length === 0) return null;
+ return (
+ <div key={group.provider}>
+ <div className="px-2 py-1.5 text-xs font-semibold text-muted-foreground">{group.provider} (Scraper)</div>
+ {scrapers.map((s) => (
+ <SelectItem key={s.id} value={s.id} disabled={manualScrapers.includes(s.id)}>
+ <div>
+ <div>{s.label}</div>
+ <div className="text-[10px] text-muted-foreground font-mono">{s.id}</div>
+ </div>
+ </SelectItem>
+ ))}
+ </div>
+ );
+ })}
+ {MODEL_GROUPS.map((group) => {
+ const groupModels = group.models.filter((m) =>
+ visibleModels.some((vm) => vm.id === m.id),
+ );
+ if (groupModels.length === 0) return null;
+ return (
+ <div key={group.provider}>
+ <div className="px-2 py-1.5 text-xs font-semibold text-muted-foreground">{group.provider} (API)</div>
+ {groupModels.map((m) => (
+ <SelectItem key={m.id} value={m.id} disabled={manualModels.includes(m.id)}>
+ <div>
+ <div>{m.label}</div>
+ <div className="text-[10px] text-muted-foreground font-mono">{m.id}</div>
+ </div>
+ </SelectItem>
+ ))}
+ </div>
+ );
+ })}
+ </SelectContent>
+ </Select>
+ {(manualModels.length > 0 || manualScrapers.length > 0) && (
+ <div className="mt-1.5 flex flex-wrap gap-1">
+ {manualScrapers.map((id) => {
+ const s = ALL_SCRAPERS.find((as_) => as_.id === id);
+ return (
+ <Badge key={id} variant="outline" className="gap-1 text-xs">
+ {s?.label ?? id}
+ <button type="button" onClick={() => setManualScrapers((p) => p.filter((i) => i !== id))}>
+ <X className="h-3 w-3" />
+ </button>
+ </Badge>
+ );
+ })}
+ {manualModels.map((id) => {
+ const m = ALL_MODELS.find((am) => am.id === id);
+ return (
+ <Badge key={id} variant="secondary" className="gap-1 text-xs">
+ {m?.label ?? id}
+ <button type="button" onClick={() => setManualModels((p) => p.filter((i) => i !== id))}>
+ <X className="h-3 w-3" />
+ </button>
+ </Badge>
+ );
+ })}
+ </div>
+ )}
+ </div>
+ </div>
+
+ <Button
+ onClick={handleAddManualPrompt}
+ disabled={
+ isAddingManual ||
+ !manualText.trim() ||
+ (manualScrapers.length === 0 && manualModels.length === 0)
+ }
+ className="w-full"
+ >
+ {isAddingManual ? (
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ ) : (
+ <Plus className="mr-2 h-4 w-4" />
+ )}
+ Add Prompt
+ </Button>
+ </div>
+ </CardContent>
+ </Card>
+
+ {/* AI Generate */}
+ <Card>
+ <CardHeader className="pb-3">
+ <CardTitle className="flex items-center gap-2 text-base">
+ <Sparkles className="h-4 w-4" />
+ AI Generate
+ </CardTitle>
+ </CardHeader>
+ <CardContent>
+ <div className="space-y-3">
+ <p className="text-sm text-muted-foreground">
+ Select topics and generate 5 optimized search prompts per topic using AI.
+ </p>
+ {topics.length > 0 ? (
+ <div>
+ <label className="mb-1.5 block text-xs font-medium text-muted-foreground">Topics</label>
+ <div className="flex flex-wrap gap-1.5">
+ {topics.map((topic) => {
+ const selected = generateTopics?.includes(topic.name) ?? false;
+ return (
+ <Badge
+ key={topic.id}
+ variant={selected ? "default" : "outline"}
+ className="cursor-pointer select-none"
+ onClick={() =>
+ setGenerateTopics((prev) =>
+ selected
+ ? (prev ?? []).filter((t) => t !== topic.name)
+ : [...(prev ?? []), topic.name]
+ )
+ }
+ >
+ {topic.name}
+ </Badge>
+ );
+ })}
+ </div>
+ {generateTopics && generateTopics.length > 0 && (
+ <p className="mt-1.5 text-xs text-muted-foreground">
+ {generateTopics.length} topic{generateTopics.length !== 1 ? "s" : ""} selected — {generateTopics.length * 5} prompts will be generated
+ </p>
+ )}
+ </div>
+ ) : (
+ <p className="text-xs text-muted-foreground py-2">
+ No topics defined yet. Add topics in brand settings first.
+ </p>
+ )}
+ <Button
+ onClick={handleGenerate}
+ disabled={isGenerating || !generateTopics || generateTopics.length === 0}
+ className="w-full"
+ >
+ {isGenerating ? (
+ <>
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ Generating...
+ </>
+ ) : (
+ <>
+ <Sparkles className="mr-2 h-4 w-4" />
+ Generate Prompts
+ </>
+ )}
+ </Button>
+ </div>
+ </CardContent>
+ </Card>
+ </div>
+
+ {/* AI Suggestions Review (shown only when generated) */}
+ {suggestions.length > 0 && (
+ <Card>
+ <CardHeader className="pb-3">
+ <CardTitle className="text-base">Review AI Suggestions</CardTitle>
+ <CardDescription>
+ Toggle off prompts you don&apos;t want, edit text if needed, then save.
+ </CardDescription>
+ </CardHeader>
+ <CardContent>
+ <div className="space-y-2">
+ {suggestions.map((s, i) => (
+ <PromptSuggestionCard
+ key={i}
+ text={s.text}
+ category={s.category}
+ isActive={s.isActive}
+ onToggle={() =>
+ setSuggestions((prev) =>
+ prev.map((p, idx) =>
+ idx === i ? { ...p, isActive: !p.isActive } : p
+ )
+ )
+ }
+ onTextChange={(text) =>
+ setSuggestions((prev) =>
+ prev.map((p, idx) =>
+ idx === i ? { ...p, text } : p
+ )
+ )
+ }
+ mode="review"
+ />
+ ))}
+ </div>
+
+ <div className="flex items-center gap-3 pt-4">
+ <Button onClick={handleSaveSuggestions} disabled={isSaving}>
+ {isSaving ? (
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ ) : (
+ <Save className="mr-2 h-4 w-4" />
+ )}
+ Save Selected ({suggestions.filter((s) => s.isActive).length})
+ </Button>
+ <Button
+ variant="outline"
+ onClick={handleGenerate}
+ disabled={isGenerating}
+ >
+ {isGenerating ? (
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ ) : (
+ <Sparkles className="mr-2 h-4 w-4" />
+ )}
+ Regenerate
+ </Button>
+ <Button variant="ghost" onClick={() => setSuggestions([])}>
+ Dismiss
+ </Button>
+ </div>
+ </CardContent>
+ </Card>
+ )}
+
+ {/* All Prompts — flat list, newest first */}
+ {allPrompts.length > 0 && (
+ <div className="space-y-3">
+ <div className="flex items-center justify-between">
+ <h2 className="text-lg font-semibold">
+ All Prompts ({allPrompts.length})
+ </h2>
+ <Button
+ size="sm"
+ variant={unanalyzedPrompts.length > 0 ? "default" : "outline"}
+ onClick={openAnalyzeDialog}
+ >
+ <Search className="mr-2 h-3.5 w-3.5" />
+ Analyze Prompts
+ {unanalyzedPrompts.length > 0 && (
+ <Badge variant="secondary" className="ml-2 text-[10px]">
+ {unanalyzedPrompts.length} new
+ </Badge>
+ )}
+ </Button>
+ </div>
+ <div className="space-y-2">
+ {allPrompts.map((prompt) => (
+ <PromptSuggestionCard
+ key={prompt.id}
+ text={prompt.text}
+ category={prompt.category ?? ""}
+ isActive={prompt.isActive}
+ regions={prompt.regions}
+ models={prompt.models}
+ platforms={prompt.platforms}
+ topics={topics}
+ allowedScraperIds={allowedScraperIds}
+ allowedModelIds={allowedModelIds}
+ onToggle={() => handleTogglePrompt(prompt)}
+ onTextChange={(text) => handleEditPrompt(prompt.id, text)}
+ onCategoryChange={(category) => handleCategoryChange(prompt.id, category)}
+ onModelsChange={(models) => handleModelsChange(prompt.id, models)}
+ onPlatformsChange={(platforms) => handlePlatformsChange(prompt.id, platforms)}
+ onDelete={() => handleDeletePrompt(prompt.id)}
+ mode="manage"
+ />
+ ))}
+ </div>
+ </div>
+ )}
+
+ {/* Empty state */}
+ {allPrompts.length === 0 && suggestions.length === 0 && (
+ <div className="rounded-xl border border-dashed p-8 text-center">
+ <Sparkles className="mx-auto h-8 w-8 text-muted-foreground/50" />
+ <h3 className="mt-3 text-sm font-medium">No prompts yet</h3>
+ <p className="mt-1 text-sm text-muted-foreground">
+ Add prompts manually or generate them with AI above.
+ </p>
+ </div>
+ )}
+
+ {/* Analyze Prompts Dialog */}
+ <Dialog open={analyzeDialogOpen} onOpenChange={setAnalyzeDialogOpen}>
+ <DialogContent className="sm:max-w-md">
+ <DialogHeader>
+ <DialogTitle>Analyze Prompts</DialogTitle>
+ <DialogDescription>
+ {unanalyzedPrompts.length > 0
+ ? "Select which prompts to analyze with AI platforms."
+ : "All prompts have already been analyzed."}
+ </DialogDescription>
+ </DialogHeader>
+
+ {isLoadingUnanalyzed ? (
+ <div className="flex items-center justify-center py-8">
+ <Loader2 className="h-6 w-6 animate-spin text-muted-foreground" />
+ </div>
+ ) : unanalyzedPrompts.length > 0 ? (
+ <div className="space-y-3">
+ <div className="flex items-center justify-between">
+ <span className="text-sm text-muted-foreground">
+ {selectedAnalyzeIds.size} of {unanalyzedPrompts.length} selected
+ </span>
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => {
+ if (selectedAnalyzeIds.size === unanalyzedPrompts.length) {
+ setSelectedAnalyzeIds(new Set());
+ } else {
+ setSelectedAnalyzeIds(new Set(unanalyzedPrompts.map((p) => p.id)));
+ }
+ }}
+ >
+ {selectedAnalyzeIds.size === unanalyzedPrompts.length ? "Deselect All" : "Select All"}
+ </Button>
+ </div>
+ <div className="max-h-64 space-y-1.5 overflow-y-auto rounded-md border p-2">
+ {unanalyzedPrompts.map((prompt) => {
+ const checked = selectedAnalyzeIds.has(prompt.id);
+ return (
+ <label
+ key={prompt.id}
+ className="flex cursor-pointer items-start gap-2.5 rounded-md p-2 hover:bg-muted/50 transition-colors"
+ >
+ <Checkbox
+ checked={checked}
+ onCheckedChange={() => {
+ setSelectedAnalyzeIds((prev) => {
+ const next = new Set(prev);
+ if (checked) next.delete(prompt.id);
+ else next.add(prompt.id);
+ return next;
+ });
+ }}
+ className="mt-0.5"
+ />
+ <div className="min-w-0 flex-1">
+ <p className="text-sm leading-snug">{prompt.text}</p>
+ <span className="text-[10px] text-muted-foreground uppercase tracking-wider">
+ {prompt.category}
+ </span>
+ </div>
+ </label>
+ );
+ })}
+ </div>
+ </div>
+ ) : (
+ <div className="py-6 text-center">
+ <Play className="mx-auto h-8 w-8 text-muted-foreground/40" />
+ <p className="mt-2 text-sm text-muted-foreground">
+ All prompts have been analyzed. Add new prompts to analyze them.
+ </p>
+ </div>
+ )}
+
+ <DialogFooter>
+ <Button
+ variant="outline"
+ onClick={() => setAnalyzeDialogOpen(false)}
+ >
+ Cancel
+ </Button>
+ {unanalyzedPrompts.length > 0 && (
+ <Button
+ onClick={handleAnalyzeSelected}
+ disabled={isAnalyzing || selectedAnalyzeIds.size === 0}
+ >
+ {isAnalyzing ? (
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ ) : (
+ <Play className="mr-2 h-4 w-4" />
+ )}
+ Analyze ({selectedAnalyzeIds.size})
+ </Button>
+ )}
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/brands/[id]/settings/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/brands/[id]/settings/page.tsx
new file mode 100644
index 000000000..9ed891188
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/brands/[id]/settings/page.tsx
@@ -0,0 +1,764 @@
+"use client";
+
+import { use, useState, useEffect, useCallback } from "react";
+import { useTranslations } from "next-intl";
+import { useRouter, Link } from "@/i18n/navigation";
+import { useBrandStore } from "@/stores/use-brand-store";
+import { updateBrand, deleteBrand } from "@/lib/actions/brand";
+import { syncDomains } from "@/lib/actions/brand-domain";
+import {
+ getCompetitors,
+ addCompetitor,
+ deleteCompetitor,
+} from "@/lib/actions/competitor";
+import { getFaviconUrl } from "@/lib/favicon";
+import type { Competitor } from "@/types";
+import {
+ INDUSTRIES,
+ type Brand,
+ type BrandDomain,
+} from "@/types";
+import { Button } from "@/components/ui/button";
+import { Input } from "@/components/ui/input";
+import { Label } from "@/components/ui/label";
+import { Textarea } from "@/components/ui/textarea";
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from "@/components/ui/select";
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
+import { Badge } from "@/components/ui/badge";
+import { Separator } from "@/components/ui/separator";
+import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
+import { toast } from "sonner";
+import {
+ Check,
+ Code,
+ Copy,
+ Globe,
+ Loader2,
+ Pencil,
+ Plus,
+ Save,
+ Trash2,
+ X,
+} from "lucide-react";
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+ DialogTrigger,
+ DialogClose,
+} from "@/components/ui/dialog";
+
+interface PageProps {
+ params: Promise<{ id: string }>;
+}
+
+export default function BrandSettingsPage({ params }: PageProps) {
+ const { id } = use(params);
+ const t = useTranslations("brands");
+ const router = useRouter();
+ const { brands, updateBrand: updateBrandStore, removeBrand } = useBrandStore();
+
+ const brand = brands.find((b) => b.id === id);
+
+ if (!brand) {
+ return (
+ <div className="flex flex-col items-center justify-center py-20 text-center">
+ <h2 className="text-lg font-semibold">Brand not found</h2>
+ <p className="text-muted-foreground text-sm mt-1">
+ This brand may have been deleted.
+ </p>
+ <Link href="/dashboard/brands" className="mt-4">
+ <Button variant="outline">Back to Brands</Button>
+ </Link>
+ </div>
+ );
+ }
+
+ return (
+ <div className="space-y-6">
+ <Tabs defaultValue="general" className="space-y-4">
+ <TabsList>
+ <TabsTrigger value="general">{t("settings.generalTab")}</TabsTrigger>
+ <TabsTrigger value="domains">{t("settings.domainsTab")}</TabsTrigger>
+ <TabsTrigger value="tracking">Tracking</TabsTrigger>
+ <TabsTrigger value="competitors">Competitors</TabsTrigger>
+ <TabsTrigger value="danger" className="text-destructive data-[state=active]:text-destructive">
+ {t("settings.dangerTab")}
+ </TabsTrigger>
+ </TabsList>
+
+ <TabsContent value="general">
+ <GeneralTab
+ brand={brand}
+ onUpdate={(updated) => updateBrandStore(brand.id, updated)}
+ />
+ </TabsContent>
+
+ <TabsContent value="domains">
+ <DomainsTab
+ brand={brand}
+ onUpdate={(updated) => updateBrandStore(brand.id, updated)}
+ />
+ </TabsContent>
+
+ <TabsContent value="tracking">
+ <TrackingTab brand={brand} />
+ </TabsContent>
+
+ <TabsContent value="competitors">
+ <CompetitorsTab brandId={brand.id} />
+ </TabsContent>
+
+ <TabsContent value="danger">
+ <DangerTab
+ brand={brand}
+ onDelete={async () => {
+ removeBrand(brand.id);
+ toast.success("Brand deleted.");
+ router.push("/dashboard/brands");
+ }}
+ />
+ </TabsContent>
+ </Tabs>
+ </div>
+ );
+}
+
+// ─── General Tab ──────────────────────────────────────────────────────────────
+
+function GeneralTab({
+ brand,
+ onUpdate,
+}: {
+ brand: Brand;
+ onUpdate: (updates: Partial<Brand>) => void;
+}) {
+ const t = useTranslations("brands");
+ const [name, setName] = useState(brand.name);
+ const [industry, setIndustry] = useState(brand.industry ?? "");
+ const [description, setDescription] = useState(brand.description ?? "");
+ const [isSaving, setIsSaving] = useState(false);
+
+ const handleSave = async () => {
+ if (!name.trim()) return;
+ setIsSaving(true);
+ try {
+ const updated = await updateBrand(brand.id, {
+ name: name.trim(),
+ industry: industry || null,
+ description: description || null,
+ });
+ onUpdate({
+ name: updated.name,
+ slug: updated.slug,
+ industry: updated.industry,
+ description: updated.description,
+ updatedAt: updated.updatedAt,
+ });
+ toast.success(t("settings.saved"));
+ } catch (err) {
+ toast.error(err instanceof Error ? err.message : "Failed to save changes.");
+ } finally {
+ setIsSaving(false);
+ }
+ };
+
+ return (
+ <Card>
+ <CardHeader>
+ <CardTitle>{t("settings.generalTab")}</CardTitle>
+ <CardDescription>Update your brand&apos;s basic information.</CardDescription>
+ </CardHeader>
+ <CardContent className="space-y-4">
+ <div className="space-y-2">
+ <Label htmlFor="name">{t("brandName")} *</Label>
+ <Input
+ id="name"
+ value={name}
+ onChange={(e) => setName(e.target.value)}
+ placeholder={t("brandNamePlaceholder")}
+ />
+ </div>
+
+ <div className="space-y-2">
+ <Label htmlFor="industry">{t("industry")}</Label>
+ <Select value={industry} onValueChange={(v) => setIndustry(v ?? "")}>
+ <SelectTrigger id="industry">
+ <SelectValue placeholder={t("industryPlaceholder")} />
+ </SelectTrigger>
+ <SelectContent>
+ {INDUSTRIES.map((ind) => (
+ <SelectItem key={ind} value={ind}>
+ {ind}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+
+ <div className="space-y-2">
+ <Label htmlFor="description">{t("description_field")}</Label>
+ <Textarea
+ id="description"
+ value={description}
+ onChange={(e) => setDescription(e.target.value)}
+ placeholder={t("descriptionPlaceholder")}
+ rows={3}
+ />
+ </div>
+
+ <Button onClick={handleSave} disabled={isSaving || !name.trim()} className="gap-2">
+ {isSaving ? (
+ <Loader2 className="h-4 w-4 animate-spin" />
+ ) : (
+ <Save className="h-4 w-4" />
+ )}
+ {t("settings.saveChanges")}
+ </Button>
+ </CardContent>
+ </Card>
+ );
+}
+
+// ─── Domains Tab ──────────────────────────────────────────────────────────────
+
+function DomainsTab({
+ brand,
+ onUpdate,
+}: {
+ brand: Brand;
+ onUpdate: (updates: Partial<Brand>) => void;
+}) {
+ const t = useTranslations("brands");
+ const [domains, setDomains] = useState<BrandDomain[]>(brand.domains);
+ const [isSaving, setIsSaving] = useState(false);
+ const [newDomain, setNewDomain] = useState("");
+ const [newCountry, setNewCountry] = useState("");
+
+ const addDomain = () => {
+ if (!newDomain.trim()) return;
+ const entry: BrandDomain = {
+ id: crypto.randomUUID(),
+ brandId: brand.id,
+ domain: newDomain.trim(),
+ country: newCountry.trim() || undefined,
+ isPrimary: domains.length === 0,
+ };
+ setDomains((prev) => [...prev, entry]);
+ setNewDomain("");
+ setNewCountry("");
+ };
+
+ const removeDomainLocal = (id: string) => {
+ setDomains((prev) => {
+ const updated = prev.filter((d) => d.id !== id);
+ if (prev.find((d) => d.id === id)?.isPrimary && updated.length > 0) {
+ updated[0] = { ...updated[0], isPrimary: true };
+ }
+ return updated;
+ });
+ };
+
+ const setPrimary = (id: string) => {
+ setDomains((prev) => prev.map((d) => ({ ...d, isPrimary: d.id === id })));
+ };
+
+ const handleSave = async () => {
+ setIsSaving(true);
+ try {
+ const savedDomains = await syncDomains(
+ brand.id,
+ domains.map((d) => ({
+ domain: d.domain,
+ country: d.country,
+ isPrimary: d.isPrimary,
+ }))
+ );
+ setDomains(savedDomains);
+
+ const newPrimary = savedDomains.find((d) => d.isPrimary);
+ const newLogoUrl = newPrimary ? getFaviconUrl(newPrimary.domain) : null;
+ const oldPrimary = brand.domains.find((d) => d.isPrimary);
+
+ if (newPrimary?.domain !== oldPrimary?.domain) {
+ await updateBrand(brand.id, { logoUrl: newLogoUrl });
+ }
+
+ onUpdate({
+ domains: savedDomains,
+ logoUrl: newLogoUrl ?? undefined,
+ updatedAt: new Date().toISOString(),
+ });
+ toast.success(t("settings.saved"));
+ } catch (err) {
+ toast.error(err instanceof Error ? err.message : "Failed to save domains.");
+ } finally {
+ setIsSaving(false);
+ }
+ };
+
+ return (
+ <Card>
+ <CardHeader>
+ <CardTitle>{t("settings.domainsTab")}</CardTitle>
+ <CardDescription>
+ Manage the domains tracked for this brand. One domain must be set as primary.
+ </CardDescription>
+ </CardHeader>
+ <CardContent className="space-y-4">
+ <div className="space-y-2">
+ {domains.map((d) => (
+ <div
+ key={d.id}
+ className="flex items-center gap-3 rounded-lg border px-3 py-2.5"
+ >
+ <Globe className="h-4 w-4 shrink-0 text-muted-foreground" />
+ <div className="flex-1 overflow-hidden">
+ <p className="truncate text-sm font-medium">{d.domain}</p>
+ {d.country && (
+ <p className="text-xs text-muted-foreground">{d.country}</p>
+ )}
+ </div>
+ {d.isPrimary && (
+ <Badge variant="secondary" className="text-xs shrink-0">
+ {t("primaryDomain")}
+ </Badge>
+ )}
+ {!d.isPrimary && (
+ <Button
+ variant="ghost"
+ size="sm"
+ className="h-7 text-xs shrink-0"
+ onClick={() => setPrimary(d.id)}
+ >
+ {t("setPrimary")}
+ </Button>
+ )}
+ {domains.length > 1 && (
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-7 w-7 shrink-0 text-destructive hover:text-destructive"
+ onClick={() => removeDomainLocal(d.id)}
+ >
+ <Trash2 className="h-3.5 w-3.5" />
+ </Button>
+ )}
+ </div>
+ ))}
+ </div>
+
+ <Separator />
+
+ <div className="space-y-2">
+ <Label className="text-sm font-medium">{t("addDomain")}</Label>
+ <div className="flex gap-2">
+ <Input
+ placeholder={t("domainPlaceholder")}
+ value={newDomain}
+ onChange={(e) => setNewDomain(e.target.value)}
+ onKeyDown={(e) => e.key === "Enter" && addDomain()}
+ className="flex-1"
+ />
+ <Input
+ placeholder={t("countryPlaceholder")}
+ value={newCountry}
+ onChange={(e) => setNewCountry(e.target.value)}
+ className="w-28"
+ />
+ <Button
+ type="button"
+ variant="outline"
+ size="icon"
+ onClick={addDomain}
+ disabled={!newDomain.trim()}
+ >
+ <Plus className="h-4 w-4" />
+ </Button>
+ </div>
+ </div>
+
+ <Button
+ onClick={handleSave}
+ disabled={isSaving || domains.length === 0}
+ className="gap-2"
+ >
+ {isSaving ? (
+ <Loader2 className="h-4 w-4 animate-spin" />
+ ) : (
+ <Save className="h-4 w-4" />
+ )}
+ {t("settings.saveChanges")}
+ </Button>
+ </CardContent>
+ </Card>
+ );
+}
+
+// ─── Competitors Tab ──────────────────────────────────────────────────────────
+
+function CompetitorsTab({ brandId }: { brandId: string }) {
+ const [competitors, setCompetitors] = useState<Competitor[]>([]);
+ const [isLoading, setIsLoading] = useState(true);
+ const [isAdding, setIsAdding] = useState(false);
+ const [deletingId, setDeletingId] = useState<string | null>(null);
+ const [newName, setNewName] = useState("");
+ const [newDomain, setNewDomain] = useState("");
+
+ const load = useCallback(async () => {
+ setIsLoading(true);
+ try {
+ const data = await getCompetitors(brandId);
+ setCompetitors(data);
+ } catch {
+ toast.error("Failed to load competitors");
+ } finally {
+ setIsLoading(false);
+ }
+ }, [brandId]);
+
+ useEffect(() => {
+ load();
+ }, [load]);
+
+ const handleAdd = async () => {
+ if (!newName.trim()) return;
+ setIsAdding(true);
+ try {
+ const added = await addCompetitor(brandId, {
+ name: newName.trim(),
+ domain: newDomain.trim(),
+ });
+ setCompetitors((prev) => [...prev, added]);
+ setNewName("");
+ setNewDomain("");
+ toast.success(`${added.name} added`);
+ } catch (err) {
+ toast.error(err instanceof Error ? err.message : "Failed to add competitor");
+ } finally {
+ setIsAdding(false);
+ }
+ };
+
+ const handleDelete = async (id: string) => {
+ try {
+ await deleteCompetitor(id);
+ setCompetitors((prev) => prev.filter((c) => c.id !== id));
+ setDeletingId(null);
+ toast.success("Competitor removed");
+ } catch {
+ toast.error("Failed to remove competitor");
+ }
+ };
+
+ return (
+ <Card>
+ <CardHeader>
+ <CardTitle>Competitors</CardTitle>
+ <CardDescription>
+ Add your competitors to compare AI visibility. When prompts run, the system will
+ automatically detect how often each competitor is mentioned alongside your brand.
+ </CardDescription>
+ </CardHeader>
+ <CardContent className="space-y-4">
+ {isLoading ? (
+ <div className="flex items-center justify-center py-8">
+ <Loader2 className="h-6 w-6 animate-spin text-muted-foreground" />
+ </div>
+ ) : (
+ <>
+ {competitors.length > 0 && (
+ <div className="space-y-2">
+ {competitors.map((c) => (
+ <div
+ key={c.id}
+ className="flex items-center gap-3 rounded-lg border px-3 py-2.5"
+ >
+ {c.domain ? (
+ /* eslint-disable-next-line @next/next/no-img-element */
+ <img
+ src={getFaviconUrl(c.domain, 64)}
+ alt={c.name}
+ className="h-8 w-8 shrink-0 rounded-full bg-muted object-contain"
+ />
+ ) : (
+ <div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-bold">
+ {c.name.charAt(0).toUpperCase()}
+ </div>
+ )}
+ <div className="flex-1 overflow-hidden">
+ <p className="truncate text-sm font-medium">{c.name}</p>
+ {c.domain && (
+ <p className="text-xs text-muted-foreground">{c.domain}</p>
+ )}
+ </div>
+ <Dialog open={deletingId === c.id} onOpenChange={(open) => !open && setDeletingId(null)}>
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-7 w-7 shrink-0 text-destructive hover:text-destructive"
+ onClick={() => setDeletingId(c.id)}
+ >
+ <Trash2 className="h-3.5 w-3.5" />
+ </Button>
+ <DialogContent>
+ <DialogHeader>
+ <DialogTitle>Remove {c.name}?</DialogTitle>
+ <DialogDescription>
+ This will remove the competitor and its comparison data. This action cannot be undone.
+ </DialogDescription>
+ </DialogHeader>
+ <DialogFooter>
+ <Button variant="outline" onClick={() => setDeletingId(null)}>
+ Cancel
+ </Button>
+ <Button variant="destructive" onClick={() => handleDelete(c.id)}>
+ Remove
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ </div>
+ ))}
+ </div>
+ )}
+
+ {competitors.length === 0 && (
+ <div className="rounded-lg border border-dashed py-8 text-center">
+ <p className="text-sm text-muted-foreground">
+ No competitors added yet. Add your competitors below.
+ </p>
+ </div>
+ )}
+
+ <Separator />
+
+ <div className="space-y-2">
+ <Label className="text-sm font-medium">Add Competitor</Label>
+ <div className="flex gap-2">
+ <Input
+ placeholder="Competitor name"
+ value={newName}
+ onChange={(e) => setNewName(e.target.value)}
+ onKeyDown={(e) => e.key === "Enter" && newName.trim() && handleAdd()}
+ className="flex-1"
+ />
+ <Input
+ placeholder="domain.com"
+ value={newDomain}
+ onChange={(e) => setNewDomain(e.target.value)}
+ onKeyDown={(e) => e.key === "Enter" && newName.trim() && handleAdd()}
+ className="w-40"
+ />
+ <Button
+ variant="outline"
+ onClick={handleAdd}
+ disabled={isAdding || !newName.trim()}
+ className="gap-1.5 shrink-0"
+ >
+ {isAdding ? (
+ <Loader2 className="h-4 w-4 animate-spin" />
+ ) : (
+ <Plus className="h-4 w-4" />
+ )}
+ Add
+ </Button>
+ </div>
+ </div>
+ </>
+ )}
+ </CardContent>
+ </Card>
+ );
+}
+
+// ─── Tracking Tab ────────────────────────────────────────────────────────
+
+function TrackingTab({ brand }: { brand: Brand }) {
+ const [copied, setCopied] = useState<"code" | "snippet" | null>(null);
+ const isCloud = process.env.NEXT_PUBLIC_IS_CLOUD === "true";
+ const apiUrl = isCloud ? "https://api.ansops.ai" : process.env.NEXT_PUBLIC_API_URL;
+ const snippet = apiUrl
+ ? `<script src="${apiUrl}/t.js" data-t="${brand.trackingCode || ""}" defer></script>`
+ : "";
+
+ const copyToClipboard = (text: string, key: "code" | "snippet") => {
+ navigator.clipboard.writeText(text);
+ setCopied(key);
+ setTimeout(() => setCopied(null), 2000);
+ };
+
+ return (
+ <Card>
+ <CardHeader>
+ <CardTitle className="flex items-center gap-2">
+ <Code className="h-4 w-4" />
+ AI Traffic Tracking
+ </CardTitle>
+ <CardDescription>
+ Track visits to your website that come from AI platforms like ChatGPT, Perplexity, Claude, and more.
+ </CardDescription>
+ </CardHeader>
+ <CardContent className="space-y-6">
+ {brand.trackingCode ? (
+ <>
+ {!apiUrl && (
+ <div className="rounded-lg border border-yellow-500/30 bg-yellow-500/5 px-4 py-3 text-sm">
+ <p className="font-medium text-yellow-700 dark:text-yellow-400">Server URL not configured</p>
+ <p className="text-xs text-muted-foreground mt-0.5">
+ Set <code className="text-[11px] bg-muted px-1 py-0.5 rounded">NEXT_PUBLIC_API_URL</code> in your <code className="text-[11px] bg-muted px-1 py-0.5 rounded">.env</code> file to your aeo-server URL (e.g. <code className="text-[11px] bg-muted px-1 py-0.5 rounded">https://api.yourdomain.com</code>).
+ </p>
+ </div>
+ )}
+
+ {/* Tracking Code */}
+ <div className="space-y-2">
+ <Label className="text-sm font-medium">Tracking Code</Label>
+ <div className="flex items-center gap-2">
+ <Input value={brand.trackingCode} readOnly className="font-mono text-sm" />
+ <Button
+ variant="outline"
+ size="icon"
+ className="shrink-0"
+ onClick={() => copyToClipboard(brand.trackingCode!, "code")}
+ >
+ {copied === "code" ? (
+ <Check className="h-4 w-4 text-green-500" />
+ ) : (
+ <Copy className="h-4 w-4" />
+ )}
+ </Button>
+ </div>
+ </div>
+
+ {/* Snippet */}
+ {apiUrl && (
+ <div className="space-y-2">
+ <Label className="text-sm font-medium">Installation Snippet</Label>
+ <p className="text-xs text-muted-foreground">
+ Add this script tag before the closing <code className="text-[11px]">&lt;/head&gt;</code> tag of your website.
+ </p>
+ <div className="relative">
+ <pre className="text-[12px] bg-muted rounded-md px-4 py-3 overflow-x-auto font-mono leading-relaxed">
+ {snippet}
+ </pre>
+ <Button
+ variant="ghost"
+ size="icon"
+ className="absolute top-2 right-2 h-7 w-7"
+ onClick={() => copyToClipboard(snippet, "snippet")}
+ >
+ {copied === "snippet" ? (
+ <Check className="h-3.5 w-3.5 text-green-500" />
+ ) : (
+ <Copy className="h-3.5 w-3.5" />
+ )}
+ </Button>
+ </div>
+ </div>
+ )}
+
+ {/* How it works */}
+ <div className="rounded-lg border p-4 space-y-2">
+ <p className="text-sm font-medium">How it works</p>
+ <ul className="text-xs text-muted-foreground space-y-1 list-disc pl-4">
+ <li>The script detects visitors coming from AI platforms (ChatGPT, Perplexity, Claude, Gemini, Copilot, etc.)</li>
+ <li>Only AI-referred visits are tracked — regular traffic is ignored</li>
+ <li>Data appears in your AI Traffic Analytics dashboard</li>
+ <li>The script is lightweight (~1KB) and does not affect page performance</li>
+ </ul>
+ </div>
+ </>
+ ) : (
+ <div className="rounded-lg border border-dashed py-8 text-center">
+ <Code className="h-8 w-8 mx-auto text-muted-foreground/50" />
+ <p className="text-sm text-muted-foreground mt-2">
+ No tracking code available for this brand.
+ </p>
+ <p className="text-xs text-muted-foreground mt-1">
+ A tracking code is automatically generated when the brand is created.
+ </p>
+ </div>
+ )}
+ </CardContent>
+ </Card>
+ );
+}
+
+// ─── Danger Tab ───────────────────────────────────────────────────────────────
+
+function DangerTab({
+ brand,
+ onDelete,
+}: {
+ brand: Brand;
+ onDelete: () => Promise<void>;
+}) {
+ const t = useTranslations("brands");
+ const [confirmValue, setConfirmValue] = useState("");
+ const [isDeleting, setIsDeleting] = useState(false);
+
+ const canDelete = confirmValue === brand.name;
+
+ const handleDelete = async () => {
+ if (!canDelete) return;
+ setIsDeleting(true);
+ try {
+ await deleteBrand(brand.id);
+ await onDelete();
+ } catch (err) {
+ toast.error(err instanceof Error ? err.message : "Failed to delete brand.");
+ setIsDeleting(false);
+ }
+ };
+
+ return (
+ <Card className="border-destructive/30">
+ <CardHeader>
+ <CardTitle className="text-destructive">{t("settings.dangerTab")}</CardTitle>
+ <CardDescription>{t("settings.deleteWarning")}</CardDescription>
+ </CardHeader>
+ <CardContent className="space-y-4">
+ <div className="space-y-2">
+ <Label className="text-sm">
+ {t("settings.confirmDelete")}{" "}
+ <span className="font-semibold">{brand.name}</span>
+ </Label>
+ <Input
+ placeholder={t("settings.deleteConfirmPlaceholder")}
+ value={confirmValue}
+ onChange={(e) => setConfirmValue(e.target.value)}
+ />
+ </div>
+ <Button
+ variant="destructive"
+ disabled={!canDelete || isDeleting}
+ onClick={handleDelete}
+ className="gap-2"
+ >
+ {isDeleting ? (
+ <Loader2 className="h-4 w-4 animate-spin" />
+ ) : (
+ <Trash2 className="h-4 w-4" />
+ )}
+ {t("settings.deleteButton")}
+ </Button>
+ </CardContent>
+ </Card>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/brands/[id]/topics/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/brands/[id]/topics/page.tsx
new file mode 100644
index 000000000..9b38e20cd
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/brands/[id]/topics/page.tsx
@@ -0,0 +1,279 @@
+"use client";
+
+import { use, useCallback, useEffect, useState } from "react";
+import {
+ createTopic,
+ deleteTopic,
+ getPromptCountByTopic,
+ getTopics,
+ updateTopic,
+} from "@/lib/actions/topic";
+import type { Topic } from "@/types";
+import { Button } from "@/components/ui/button";
+import { Input } from "@/components/ui/input";
+import { Label } from "@/components/ui/label";
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
+import { Separator } from "@/components/ui/separator";
+import { toast } from "sonner";
+import { Check, Loader2, Pencil, Plus, Tag, Trash2, X } from "lucide-react";
+import {
+ Dialog,
+ DialogClose,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+ DialogTrigger,
+} from "@/components/ui/dialog";
+
+interface PageProps {
+ params: Promise<{ id: string }>;
+}
+
+export default function BrandTopicsPage({ params }: PageProps) {
+ const { id: brandId } = use(params);
+
+ const [topics, setTopics] = useState<Topic[]>([]);
+ const [promptCounts, setPromptCounts] = useState<Record<string, number>>({});
+ const [isLoading, setIsLoading] = useState(true);
+ const [isAdding, setIsAdding] = useState(false);
+ const [newName, setNewName] = useState("");
+ const [editingId, setEditingId] = useState<string | null>(null);
+ const [editName, setEditName] = useState("");
+
+ const load = useCallback(async () => {
+ setIsLoading(true);
+ try {
+ const data = await getTopics(brandId);
+ setTopics(data);
+ const counts: Record<string, number> = {};
+ await Promise.all(
+ data.map(async (t) => {
+ counts[t.id] = await getPromptCountByTopic(brandId, t.name);
+ }),
+ );
+ setPromptCounts(counts);
+ } catch {
+ toast.error("Failed to load topics");
+ } finally {
+ setIsLoading(false);
+ }
+ }, [brandId]);
+
+ useEffect(() => {
+ load();
+ }, [load]);
+
+ const handleAdd = async () => {
+ const name = newName.trim();
+ if (!name) return;
+ if (topics.some((t) => t.name.toLowerCase() === name.toLowerCase())) {
+ toast.error("This topic already exists");
+ return;
+ }
+ setIsAdding(true);
+ try {
+ const added = await createTopic(brandId, name);
+ setTopics((prev) => [...prev, added]);
+ setNewName("");
+ toast.success(`"${added.name}" topic added`);
+ } catch (err) {
+ toast.error(err instanceof Error ? err.message : "Failed to add topic");
+ } finally {
+ setIsAdding(false);
+ }
+ };
+
+ const handleEdit = async (id: string) => {
+ const name = editName.trim();
+ if (!name) return;
+ if (topics.some((t) => t.id !== id && t.name.toLowerCase() === name.toLowerCase())) {
+ toast.error("This topic already exists");
+ return;
+ }
+ try {
+ const updated = await updateTopic(id, name);
+ setTopics((prev) => prev.map((t) => (t.id === id ? updated : t)));
+ setEditingId(null);
+ toast.success("Topic updated");
+ } catch (err) {
+ toast.error(err instanceof Error ? err.message : "Failed to update topic");
+ }
+ };
+
+ const handleDelete = async (id: string) => {
+ try {
+ await deleteTopic(id);
+ setTopics((prev) => prev.filter((t) => t.id !== id));
+ toast.success("Topic removed");
+ } catch {
+ toast.error("Failed to remove topic");
+ }
+ };
+
+ return (
+ <Card>
+ <CardHeader>
+ <CardTitle className="flex items-center gap-2">
+ <Tag className="h-4 w-4" />
+ Topics
+ </CardTitle>
+ <CardDescription>
+ Manage the topics used to categorize your prompts. Topics are assigned to prompts during creation.
+ </CardDescription>
+ </CardHeader>
+ <CardContent className="space-y-4">
+ {isLoading ? (
+ <div className="flex items-center justify-center py-8">
+ <Loader2 className="h-6 w-6 animate-spin text-muted-foreground" />
+ </div>
+ ) : (
+ <>
+ {topics.length > 0 && (
+ <div className="space-y-2">
+ {topics.map((topic) => (
+ <div
+ key={topic.id}
+ className="flex items-center gap-3 rounded-lg border px-3 py-2.5"
+ >
+ <Tag className="h-4 w-4 shrink-0 text-muted-foreground" />
+
+ {editingId === topic.id ? (
+ <div className="flex flex-1 items-center gap-2">
+ <Input
+ value={editName}
+ onChange={(e) => setEditName(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === "Enter") handleEdit(topic.id);
+ if (e.key === "Escape") setEditingId(null);
+ }}
+ className="h-8 text-sm"
+ autoFocus
+ />
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-7 w-7 shrink-0"
+ onClick={() => handleEdit(topic.id)}
+ >
+ <Check className="h-3.5 w-3.5" />
+ </Button>
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-7 w-7 shrink-0"
+ onClick={() => setEditingId(null)}
+ >
+ <X className="h-3.5 w-3.5" />
+ </Button>
+ </div>
+ ) : (
+ <>
+ <p className="flex-1 truncate text-sm font-medium">
+ {topic.name}
+ </p>
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-7 w-7 shrink-0"
+ onClick={() => {
+ setEditingId(topic.id);
+ setEditName(topic.name);
+ }}
+ >
+ <Pencil className="h-3.5 w-3.5" />
+ </Button>
+ <Dialog>
+ <DialogTrigger
+ render={
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-7 w-7 shrink-0 text-destructive hover:text-destructive"
+ />
+ }
+ >
+ <Trash2 className="h-3.5 w-3.5" />
+ </DialogTrigger>
+ <DialogContent className="sm:max-w-sm">
+ <DialogHeader>
+ <DialogTitle>Delete Topic</DialogTitle>
+ <DialogDescription>
+ Are you sure you want to delete &quot;{topic.name}&quot;?
+ {(promptCounts[topic.id] ?? 0) > 0
+ ? ` ${promptCounts[topic.id]} prompt${promptCounts[topic.id] === 1 ? "" : "s"} using this topic will become uncategorized.`
+ : " No prompts are using this topic."}
+ </DialogDescription>
+ </DialogHeader>
+ <DialogFooter>
+ <DialogClose render={<Button variant="outline" />}>
+ Cancel
+ </DialogClose>
+ <DialogClose
+ render={
+ <Button
+ variant="destructive"
+ onClick={() => handleDelete(topic.id)}
+ />
+ }
+ >
+ Delete
+ </DialogClose>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ </>
+ )}
+ </div>
+ ))}
+ </div>
+ )}
+
+ {topics.length === 0 && (
+ <div className="rounded-lg border border-dashed py-8 text-center">
+ <p className="text-sm text-muted-foreground">
+ No topics yet. Add your first topic below.
+ </p>
+ </div>
+ )}
+
+ <Separator />
+
+ <div className="space-y-2">
+ <Label className="text-sm font-medium">Add Topic</Label>
+ <div className="flex gap-2">
+ <Input
+ placeholder="e.g. Industry, Comparison, How-to..."
+ value={newName}
+ onChange={(e) => setNewName(e.target.value)}
+ onKeyDown={(e) => e.key === "Enter" && newName.trim() && handleAdd()}
+ className="flex-1"
+ />
+ <Button
+ variant="outline"
+ onClick={handleAdd}
+ disabled={isAdding || !newName.trim()}
+ className="gap-1.5 shrink-0"
+ >
+ {isAdding ? (
+ <Loader2 className="h-4 w-4 animate-spin" />
+ ) : (
+ <Plus className="h-4 w-4" />
+ )}
+ Add
+ </Button>
+ </div>
+ </div>
+ </>
+ )}
+ </CardContent>
+ </Card>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/brands/_brands-client.tsx b/web/src/app/[locale]/(dashboard)/dashboard/brands/_brands-client.tsx
new file mode 100644
index 000000000..b558622c1
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/brands/_brands-client.tsx
@@ -0,0 +1,61 @@
+"use client";
+
+import { useEffect } from "react";
+import { useTranslations } from "next-intl";
+import { Link } from "@/i18n/navigation";
+import { useBrandStore } from "@/stores/use-brand-store";
+import { BrandCard } from "@/components/dashboard/brand-card";
+import { Button } from "@/components/ui/button";
+import type { Brand } from "@/types";
+import type { BrandCardSummary } from "@/lib/actions/brand";
+import { Building2, Plus } from "lucide-react";
+
+interface BrandsClientProps {
+ brands: Brand[];
+ summaries: Record<string, BrandCardSummary>;
+}
+
+export function BrandsClient({ brands, summaries }: BrandsClientProps) {
+ const { setBrands } = useBrandStore();
+
+ useEffect(() => {
+ setBrands(brands);
+ }, [brands, setBrands]);
+
+ if (brands.length === 0) {
+ return <EmptyState />;
+ }
+
+ return (
+ <div className="grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-3">
+ {brands.map((brand) => (
+ <BrandCard
+ key={brand.id}
+ brand={brand}
+ summary={summaries[brand.id]}
+ />
+ ))}
+ </div>
+ );
+}
+
+function EmptyState() {
+ const t = useTranslations("brands");
+ return (
+ <div className="flex flex-col items-center justify-center rounded-xl border border-dashed py-20 text-center">
+ <div className="mb-4 flex h-14 w-14 items-center justify-center rounded-full bg-muted">
+ <Building2 className="h-7 w-7 text-muted-foreground" />
+ </div>
+ <h2 className="text-lg font-semibold">{t("noBrands")}</h2>
+ <p className="mt-1 max-w-sm text-sm text-muted-foreground">
+ {t("noBrandsDescription")}
+ </p>
+ <Link href="/dashboard/brands/new" className="mt-6">
+ <Button className="gap-2">
+ <Plus className="h-4 w-4" />
+ {t("addBrand")}
+ </Button>
+ </Link>
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/brands/new/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/brands/new/page.tsx
new file mode 100644
index 000000000..a3abcaa6a
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/brands/new/page.tsx
@@ -0,0 +1,1283 @@
+'use client';
+
+import { useState, useEffect, useRef } from 'react';
+import { useRouter } from '@/i18n/navigation';
+import { createClient } from '@/lib/supabase/client';
+import { createBrand } from '@/lib/actions/brand';
+import { createTopics } from '@/lib/actions/topic';
+import { savePromptSet } from '@/lib/actions/prompt';
+import { addCompetitor } from '@/lib/actions/competitor';
+import { triggerTrackingCheck } from '@/lib/actions/tracking';
+import { getFaviconUrl } from '@/lib/favicon';
+import { useBrandStore } from '@/stores/use-brand-store';
+import { REGIONS, LANGUAGES } from '@/config/prompt-options';
+import { ALL_MODELS, ALL_SCRAPERS } from '@/config/prompt-options';
+import { getPlan, type PlanId } from '@/config/plans';
+import type { Brand } from '@/types';
+import { Button } from '@/components/ui/button';
+import { Input } from '@/components/ui/input';
+import { Label } from '@/components/ui/label';
+import { Textarea } from '@/components/ui/textarea';
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from '@/components/ui/select';
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+} from '@/components/ui/dropdown-menu';
+import { toast } from 'sonner';
+import {
+ ArrowLeft,
+ Check,
+ ChevronDown,
+ ChevronRight,
+ Globe,
+ Loader2,
+ MoreHorizontal,
+ Plus,
+ Sparkles,
+ X,
+} from 'lucide-react';
+import { cn } from '@/lib/utils';
+
+const AEO_SERVER_URL =
+ process.env.NEXT_PUBLIC_API_URL || 'http://localhost:80';
+
+// ── Step indicator ─────────────────────────────────────────────────────────────
+
+function StepDots({ current, total }: { current: number; total: number }) {
+ return (
+ <div className="flex items-center gap-1.5">
+ {Array.from({ length: total }, (_, i) => (
+ <div
+ key={i}
+ className={cn(
+ 'h-1.5 rounded-full transition-all',
+ i + 1 === current
+ ? 'w-6 bg-foreground'
+ : i + 1 < current
+ ? 'w-1.5 bg-foreground'
+ : 'w-1.5 bg-muted-foreground/30',
+ )}
+ />
+ ))}
+ </div>
+ );
+}
+
+// ── Brand header (Steps 2-5) ───────────────────────────────────────────────────
+
+function BrandHeader({ name, domain }: { name: string; domain: string }) {
+ return (
+ <div className="flex items-center gap-2.5 mb-8">
+ {domain && (
+ /* eslint-disable-next-line @next/next/no-img-element */
+ <img
+ src={getFaviconUrl(domain, 32)}
+ alt=""
+ className="h-6 w-6 rounded"
+ />
+ )}
+ <span className="text-sm font-medium">{name}</span>
+ {domain && (
+ <span className="text-sm text-muted-foreground">{domain}</span>
+ )}
+ </div>
+ );
+}
+
+// ── Topic Prompt Accordion ─────────────────────────────────────────────────────
+
+interface TopicPromptsData {
+ topic: string;
+ prompts: string[];
+}
+
+function TopicAccordion({
+ data,
+ defaultOpen = false,
+ onRemoveTopic,
+ onAddPrompt,
+ onRemovePrompt,
+}: {
+ data: TopicPromptsData;
+ defaultOpen?: boolean;
+ onRemoveTopic: () => void;
+ onAddPrompt: (prompt: string) => void;
+ onRemovePrompt: (index: number) => void;
+}) {
+ const [open, setOpen] = useState(defaultOpen);
+ const [newPrompt, setNewPrompt] = useState('');
+
+ const handleAdd = () => {
+ const trimmed = newPrompt.trim();
+ if (trimmed.length >= 10) {
+ onAddPrompt(trimmed);
+ setNewPrompt('');
+ }
+ };
+
+ return (
+ <div className="border-b last:border-b-0">
+ <div className="flex items-center gap-3 py-3 px-1">
+ <button
+ onClick={() => setOpen(!open)}
+ className="flex items-center gap-2 flex-1 text-left text-sm"
+ >
+ {open ? (
+ <ChevronDown className="h-4 w-4 text-muted-foreground shrink-0" />
+ ) : (
+ <ChevronRight className="h-4 w-4 text-muted-foreground shrink-0" />
+ )}
+ <span className="font-medium">{data.topic}</span>
+ <span className="text-xs text-muted-foreground">
+ {data.prompts.length} prompts
+ </span>
+ </button>
+ <DropdownMenu>
+ <DropdownMenuTrigger className="p-1 rounded hover:bg-muted text-muted-foreground">
+ <MoreHorizontal className="h-4 w-4" />
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end">
+ <DropdownMenuItem
+ className="text-destructive focus:text-destructive"
+ onClick={onRemoveTopic}
+ >
+ Remove topic
+ </DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ </div>
+ {open && (
+ <div className="pl-7 pb-3 space-y-1.5">
+ {data.prompts.map((p, idx) => (
+ <div
+ key={idx}
+ className="flex items-center gap-2 group rounded-md border bg-muted/30 px-3 py-2"
+ >
+ <span className="text-sm flex-1">{p}</span>
+ <button
+ onClick={() => onRemovePrompt(idx)}
+ className="opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-destructive transition-opacity"
+ >
+ <X className="h-3.5 w-3.5" />
+ </button>
+ </div>
+ ))}
+ <div className="flex items-center gap-2 mt-2">
+ <Input
+ placeholder="Enter new prompt..."
+ value={newPrompt}
+ onChange={(e) => setNewPrompt(e.target.value)}
+ onKeyDown={(e) => e.key === 'Enter' && handleAdd()}
+ className="text-sm h-9"
+ />
+ <Button
+ size="sm"
+ variant="ghost"
+ onClick={handleAdd}
+ disabled={newPrompt.trim().length < 10}
+ className="h-9 px-2"
+ >
+ <Check className="h-4 w-4" />
+ </Button>
+ <Button
+ size="sm"
+ variant="ghost"
+ onClick={() => setNewPrompt('')}
+ className="h-9 px-2"
+ >
+ <X className="h-4 w-4" />
+ </Button>
+ </div>
+ </div>
+ )}
+ </div>
+ );
+}
+
+// ── Constants ─────────────────────────────────────────────────────────────────
+
+const TOPIC_LOADING_MESSAGES = [
+ 'Researching topics for your brand...',
+ 'Analyzing your industry landscape...',
+ 'Identifying key themes and trends...',
+ 'Finding what your audience cares about...',
+ 'Evaluating competitive topics...',
+ 'Almost there, finalizing suggestions...',
+];
+
+const COMPETITOR_LOADING_MESSAGES = [
+ 'Searching for competitors...',
+ 'Analyzing your market...',
+ 'Identifying key players...',
+ 'Verifying company details...',
+ 'Finalizing recommendations...',
+];
+
+const TOTAL_STEPS = 5;
+
+// ── Main page ──────────────────────────────────────────────────────────────────
+
+export default function NewBrandPage() {
+ const router = useRouter();
+ const { addBrand, setActiveBrand } = useBrandStore();
+
+ const [step, setStep] = useState(1);
+ const [isLoading, setIsLoading] = useState(false);
+
+ // Step 1
+ const [brandName, setBrandName] = useState('');
+ const [website, setWebsite] = useState('');
+ const [description, setDescription] = useState('');
+
+ // Step 2
+ const [region, setRegion] = useState('US');
+ const [language, setLanguage] = useState('en');
+
+ // Intermediate state
+ const [createdBrand, setCreatedBrand] = useState<Brand | null>(null);
+ const [currentPlanId, setCurrentPlanId] = useState<PlanId>('starter');
+
+ // Step 3
+ const [suggestedTopics, setSuggestedTopics] = useState<string[]>([]);
+ const [selectedTopics, setSelectedTopics] = useState<Set<string>>(new Set());
+ const [customTopic, setCustomTopic] = useState('');
+ const [loadingTopics, setLoadingTopics] = useState(false);
+ const [topicLoadingMsg, setTopicLoadingMsg] = useState('');
+ const topicMsgIdx = useRef(0);
+
+ useEffect(() => {
+ if (!loadingTopics) {
+ topicMsgIdx.current = 0;
+ return;
+ }
+ setTopicLoadingMsg(TOPIC_LOADING_MESSAGES[0]);
+ topicMsgIdx.current = 0;
+
+ const interval = setInterval(() => {
+ topicMsgIdx.current =
+ (topicMsgIdx.current + 1) % TOPIC_LOADING_MESSAGES.length;
+ setTopicLoadingMsg(TOPIC_LOADING_MESSAGES[topicMsgIdx.current]);
+ }, 2500);
+
+ return () => clearInterval(interval);
+ }, [loadingTopics]);
+
+ // Step 4
+ const [topicPrompts, setTopicPrompts] = useState<TopicPromptsData[]>([]);
+ const [loadingPrompts, setLoadingPrompts] = useState(false);
+
+ // Step 5
+ interface CompetitorItem {
+ name: string;
+ domain: string;
+ selected: boolean;
+ }
+ const [suggestedCompetitors, setSuggestedCompetitors] = useState<
+ CompetitorItem[]
+ >([]);
+ const [loadingCompetitors, setLoadingCompetitors] = useState(false);
+ const [competitorName, setCompetitorName] = useState('');
+ const [competitorDomain, setCompetitorDomain] = useState('');
+ const [savingCompetitors, setSavingCompetitors] = useState(false);
+ const [competitorLoadingMsg, setCompetitorLoadingMsg] = useState('');
+ const competitorMsgIdx = useRef(0);
+
+ const currentPlan = getPlan(currentPlanId);
+ const allowedScraperIds = currentPlan.limits.allowedScrapers;
+ const activeScrapers = allowedScraperIds
+ ? ALL_SCRAPERS.filter((s) => allowedScraperIds.includes(s.id))
+ : ALL_SCRAPERS;
+ const allowedModelIds = currentPlan.limits.allowedModels;
+ const activeModels = allowedModelIds
+ ? ALL_MODELS.filter((m) => allowedModelIds.includes(m.id))
+ : ALL_MODELS;
+
+ useEffect(() => {
+ if (!loadingCompetitors) {
+ competitorMsgIdx.current = 0;
+ return;
+ }
+ setCompetitorLoadingMsg(COMPETITOR_LOADING_MESSAGES[0]);
+ competitorMsgIdx.current = 0;
+
+ const interval = setInterval(() => {
+ competitorMsgIdx.current =
+ (competitorMsgIdx.current + 1) % COMPETITOR_LOADING_MESSAGES.length;
+ setCompetitorLoadingMsg(
+ COMPETITOR_LOADING_MESSAGES[competitorMsgIdx.current],
+ );
+ }, 2500);
+
+ return () => clearInterval(interval);
+ }, [loadingCompetitors]);
+
+ // Auto-fetch competitor suggestions when arriving at step 5 with none loaded
+ useEffect(() => {
+ if (
+ step === 5 &&
+ !loadingCompetitors &&
+ suggestedCompetitors.length === 0 &&
+ createdBrand
+ ) {
+ fetchCompetitorSuggestions();
+ }
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [step]);
+
+ // Load current plan from org on mount
+ useEffect(() => {
+ async function loadPlan() {
+ try {
+ const supabase = createClient();
+ const {
+ data: { user },
+ } = await supabase.auth.getUser();
+ if (!user) return;
+
+ const { data: profile } = await supabase
+ .from('profiles')
+ .select('organization_id')
+ .eq('id', user.id)
+ .single();
+
+ if (profile?.organization_id) {
+ const { data: org } = await supabase
+ .from('organizations')
+ .select('plan')
+ .eq('id', profile.organization_id)
+ .single();
+ if (org?.plan) setCurrentPlanId(org.plan as PlanId);
+ }
+ } catch {
+ // Non-critical
+ }
+ }
+ loadPlan();
+ }, []);
+
+ const domain = website
+ .replace(/^https?:\/\//, '')
+ .replace(/\/.*$/, '')
+ .trim();
+
+ // ── Step 2 → Step 3 transition: create brand ──
+
+ const handleCreateBrand = async () => {
+ setIsLoading(true);
+ try {
+ const supabase = createClient();
+ const {
+ data: { user },
+ } = await supabase.auth.getUser();
+ if (!user) throw new Error('Not authenticated');
+
+ const { data: profile } = await supabase
+ .from('profiles')
+ .select('organization_id')
+ .eq('id', user.id)
+ .single();
+
+ if (!profile?.organization_id)
+ throw new Error('No organization found');
+
+ const logoUrl = domain ? getFaviconUrl(domain) : undefined;
+
+ const brand = await createBrand({
+ organizationId: profile.organization_id,
+ name: brandName.trim(),
+ logoUrl,
+ description: description.trim() || undefined,
+ region,
+ language,
+ domains: domain ? [{ domain, isPrimary: true }] : [],
+ });
+
+ setCreatedBrand(brand);
+ addBrand(brand);
+ setActiveBrand(brand.id);
+
+ setStep(3);
+
+ if (suggestedTopics.length === 0) {
+ fetchTopicSuggestions();
+ }
+ } catch (err) {
+ toast.error(
+ err instanceof Error ? err.message : 'Failed to create brand',
+ );
+ } finally {
+ setIsLoading(false);
+ }
+ };
+
+ // ── Topic suggestion ──
+
+ const fetchTopicSuggestions = async () => {
+ setLoadingTopics(true);
+ try {
+ const supabase = createClient();
+ const {
+ data: { session },
+ } = await supabase.auth.getSession();
+
+ const res = await fetch(`${AEO_SERVER_URL}/api/topics/suggest`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: `Bearer ${session?.access_token}`,
+ },
+ body: JSON.stringify({
+ brandName: brandName.trim(),
+ industry: '',
+ description: description.trim(),
+ website: domain,
+ language,
+ }),
+ });
+
+ if (!res.ok) throw new Error('Failed to suggest topics');
+ const data = await res.json();
+
+ const names = (data.topics || []).map((t: { name: string }) => t.name);
+ setSuggestedTopics(names);
+ setSelectedTopics(new Set(names.slice(0, 7)));
+ } catch (err) {
+ console.error('Topic suggestion error:', err);
+ toast.error('Failed to generate topic suggestions');
+ } finally {
+ setLoadingTopics(false);
+ }
+ };
+
+ const toggleTopic = (topic: string) => {
+ setSelectedTopics((prev) => {
+ const next = new Set(prev);
+ if (next.has(topic)) {
+ next.delete(topic);
+ } else if (next.size < 10) {
+ next.add(topic);
+ }
+ return next;
+ });
+ };
+
+ const addCustomTopic = () => {
+ const trimmed = customTopic.trim();
+ if (trimmed && !suggestedTopics.includes(trimmed)) {
+ setSuggestedTopics((prev) => [...prev, trimmed]);
+ setSelectedTopics((prev) => {
+ if (prev.size < 10) {
+ const next = new Set(prev);
+ next.add(trimmed);
+ return next;
+ }
+ return prev;
+ });
+ setCustomTopic('');
+ }
+ };
+
+ // ── Step 3 → Step 4: generate prompts from topics ──
+
+ const handleGeneratePrompts = async () => {
+ if (!createdBrand) return;
+ setLoadingPrompts(true);
+ try {
+ const topicNames = Array.from(selectedTopics);
+ await createTopics(createdBrand.id, topicNames);
+
+ const supabase = createClient();
+ const {
+ data: { session },
+ } = await supabase.auth.getSession();
+
+ const res = await fetch(`${AEO_SERVER_URL}/api/prompts/from-topics`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: `Bearer ${session?.access_token}`,
+ },
+ body: JSON.stringify({
+ brandName: brandName.trim(),
+ industry: '',
+ description: description.trim(),
+ topics: topicNames,
+ language,
+ }),
+ });
+
+ if (!res.ok) throw new Error('Failed to generate prompts');
+ const data = await res.json();
+
+ setTopicPrompts(
+ (data.topicPrompts || []).map(
+ (tp: { topic: string; prompts: string[] }) => ({
+ topic: tp.topic,
+ prompts: tp.prompts,
+ }),
+ ),
+ );
+ setStep(4);
+ } catch (err) {
+ console.error('Prompt generation error:', err);
+ toast.error('Failed to generate prompts from topics');
+ } finally {
+ setLoadingPrompts(false);
+ }
+ };
+
+ // ── Step 4 → Step 5: save prompts + fetch competitors ──
+
+ const handleSavePromptsAndContinue = async () => {
+ if (!createdBrand) return;
+ setIsLoading(true);
+ try {
+ const allPrompts = topicPrompts.flatMap((tp) =>
+ tp.prompts.map((text) => ({
+ text,
+ category: tp.topic,
+ platforms: activeScrapers.map((s) => s.id),
+ models: activeModels.map((m) => m.id),
+ isActive: true,
+ })),
+ );
+
+ if (allPrompts.length === 0) {
+ toast.error('Add at least one prompt before continuing');
+ setIsLoading(false);
+ return;
+ }
+
+ await savePromptSet({
+ brandId: createdBrand.id,
+ name: 'Brand Setup Prompts',
+ prompts: allPrompts,
+ });
+
+ setStep(5);
+ fetchCompetitorSuggestions();
+ } catch (err) {
+ toast.error(
+ err instanceof Error ? err.message : 'Failed to save prompts',
+ );
+ } finally {
+ setIsLoading(false);
+ }
+ };
+
+ // ── Competitor suggestion ──
+
+ const fetchCompetitorSuggestions = async () => {
+ setLoadingCompetitors(true);
+ try {
+ const supabase = createClient();
+ const {
+ data: { session },
+ } = await supabase.auth.getSession();
+
+ const res = await fetch(`${AEO_SERVER_URL}/api/competitors/suggest`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: `Bearer ${session?.access_token}`,
+ },
+ body: JSON.stringify({
+ brandName: brandName.trim(),
+ industry: '',
+ description: description.trim(),
+ language,
+ }),
+ });
+
+ if (!res.ok) throw new Error('Failed to suggest competitors');
+ const data = await res.json();
+
+ setSuggestedCompetitors(
+ (data.competitors || []).map((c: { name: string; domain: string }) => ({
+ name: c.name,
+ domain: c.domain,
+ selected: true,
+ })),
+ );
+ } catch (err) {
+ console.error('Competitor suggestion error:', err);
+ toast.error('Failed to generate competitor suggestions');
+ } finally {
+ setLoadingCompetitors(false);
+ }
+ };
+
+ const toggleCompetitor = (index: number) => {
+ setSuggestedCompetitors((prev) =>
+ prev.map((c, i) => (i === index ? { ...c, selected: !c.selected } : c)),
+ );
+ };
+
+ const removeCompetitor = (index: number) => {
+ setSuggestedCompetitors((prev) => prev.filter((_, i) => i !== index));
+ };
+
+ const addManualCompetitor = () => {
+ const name = competitorName.trim();
+ const d = competitorDomain
+ .trim()
+ .replace(/^https?:\/\//, '')
+ .replace(/\/+$/, '');
+ if (!name) return;
+ setSuggestedCompetitors((prev) => [
+ ...prev,
+ { name, domain: d, selected: true },
+ ]);
+ setCompetitorName('');
+ setCompetitorDomain('');
+ };
+
+ // ── Step 5: final save ──
+
+ const handleFinish = async () => {
+ if (!createdBrand) return;
+ setSavingCompetitors(true);
+ try {
+ const selected = suggestedCompetitors.filter((c) => c.selected);
+ if (selected.length > 0) {
+ await Promise.all(
+ selected.map((c) =>
+ addCompetitor(createdBrand.id, { name: c.name, domain: c.domain }),
+ ),
+ );
+ }
+
+ try {
+ const { jobId } = await triggerTrackingCheck(createdBrand.id);
+ localStorage.setItem(
+ 'aeo:tracking-job',
+ JSON.stringify({
+ jobId,
+ brandId: createdBrand.id,
+ startedAt: Date.now(),
+ }),
+ );
+ } catch {
+ // Non-critical — scheduled tracking will still run
+ }
+
+ toast.success('Brand setup complete! Tracking is starting.');
+ router.push('/dashboard/insights');
+ } catch (err) {
+ toast.error(
+ err instanceof Error ? err.message : 'Failed to save competitors',
+ );
+ setSavingCompetitors(false);
+ }
+ };
+
+ // ── Topic prompt editing helpers ──
+
+ const removeTopic = (index: number) => {
+ setTopicPrompts((prev) => prev.filter((_, i) => i !== index));
+ };
+
+ const addPromptToTopic = (topicIndex: number, prompt: string) => {
+ setTopicPrompts((prev) =>
+ prev.map((tp, i) =>
+ i === topicIndex ? { ...tp, prompts: [...tp.prompts, prompt] } : tp,
+ ),
+ );
+ };
+
+ const removePromptFromTopic = (topicIndex: number, promptIndex: number) => {
+ setTopicPrompts((prev) =>
+ prev.map((tp, i) =>
+ i === topicIndex
+ ? { ...tp, prompts: tp.prompts.filter((_, pi) => pi !== promptIndex) }
+ : tp,
+ ),
+ );
+ };
+
+ const totalPrompts = topicPrompts.reduce(
+ (sum, tp) => sum + tp.prompts.length,
+ 0,
+ );
+
+ // ── Step 1: Brand Info ──
+
+ if (step === 1) {
+ return (
+ <div className="flex min-h-svh flex-col items-center justify-center gap-6 p-6 md:p-10">
+ <div className="flex w-full max-w-md flex-col gap-6">
+ <div className="flex flex-col items-center gap-2 text-center">
+ <div className="flex h-12 w-12 items-center justify-center rounded-xl bg-primary text-primary-foreground">
+ <Globe className="h-6 w-6" />
+ </div>
+ <h1 className="text-2xl font-bold tracking-tight">
+ Add a new brand
+ </h1>
+ <p className="text-sm text-muted-foreground">
+ See how AI platforms talk about your brand. Fill in the basics to
+ get started.
+ </p>
+ </div>
+
+ <div className="space-y-4">
+ <div className="space-y-2">
+ <Label htmlFor="brandName">Brand name</Label>
+ <Input
+ id="brandName"
+ placeholder="e.g. Acme Corp"
+ value={brandName}
+ onChange={(e) => setBrandName(e.target.value)}
+ autoFocus
+ />
+ </div>
+
+ <div className="space-y-2">
+ <Label htmlFor="website">Website</Label>
+ <div className="flex">
+ <span className="inline-flex items-center rounded-l-md border border-r-0 bg-muted px-3 text-sm text-muted-foreground">
+ https://
+ </span>
+ <Input
+ id="website"
+ placeholder="example.com"
+ value={website}
+ onChange={(e) => setWebsite(e.target.value)}
+ className="rounded-l-none"
+ />
+ </div>
+ </div>
+
+ <div className="space-y-2">
+ <Label htmlFor="description">
+ Describe your brand{' '}
+ <span className="text-muted-foreground">(optional)</span>
+ </Label>
+ <Textarea
+ id="description"
+ placeholder="A brief description helps us generate better suggestions."
+ value={description}
+ onChange={(e) => setDescription(e.target.value)}
+ rows={3}
+ />
+ <ul className="text-xs text-muted-foreground space-y-1 list-disc ml-4">
+ <li>What industry are you in?</li>
+ <li>Who is your target audience?</li>
+ </ul>
+ </div>
+
+ <Button
+ className="w-full"
+ disabled={!brandName.trim() || !website.trim()}
+ onClick={() => setStep(2)}
+ >
+ Continue
+ </Button>
+ </div>
+ </div>
+
+ <StepDots current={1} total={TOTAL_STEPS} />
+ </div>
+ );
+ }
+
+ // ── Step 2: Region & Language ──
+
+ if (step === 2) {
+ return (
+ <div className="flex min-h-svh flex-col items-center justify-center gap-6 p-6 md:p-10">
+ <div className="flex w-full max-w-md flex-col gap-6">
+ <BrandHeader name={brandName} domain={domain} />
+
+ <div>
+ <h1 className="text-2xl font-bold tracking-tight">
+ Select your target market
+ </h1>
+ <p className="text-sm text-muted-foreground mt-1">
+ Pick the region and language your audience uses. This helps us
+ deliver more accurate AI visibility data.
+ </p>
+ </div>
+
+ <div className="space-y-4">
+ <div className="space-y-2">
+ <Label>Region</Label>
+ <Select value={region} onValueChange={(v) => v && setRegion(v)}>
+ <SelectTrigger>
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ {REGIONS.map((r) => (
+ <SelectItem key={r.code} value={r.code}>
+ {r.label}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+
+ <div className="space-y-2">
+ <Label>Language</Label>
+ <Select
+ value={language}
+ onValueChange={(v) => v && setLanguage(v)}
+ >
+ <SelectTrigger>
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ {LANGUAGES.map((l) => (
+ <SelectItem key={l.code} value={l.code}>
+ {l.label}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+
+ <Button
+ className="w-full"
+ onClick={handleCreateBrand}
+ disabled={isLoading}
+ >
+ {isLoading ? (
+ <>
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ Setting up...
+ </>
+ ) : (
+ 'Continue'
+ )}
+ </Button>
+ </div>
+ </div>
+
+ <div className="flex w-full max-w-md items-center justify-between">
+ <button
+ onClick={() => setStep(1)}
+ className="flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground"
+ >
+ <ArrowLeft className="h-3.5 w-3.5" />
+ Back
+ </button>
+ <StepDots current={2} total={TOTAL_STEPS} />
+ <div className="w-12" />
+ </div>
+ </div>
+ );
+ }
+
+ // ── Step 3: Topic Selection ──
+
+ if (step === 3) {
+ return (
+ <div className="flex min-h-svh flex-col p-6 md:p-10">
+ <div className="mx-auto w-full max-w-4xl flex-1">
+ <BrandHeader name={brandName} domain={domain} />
+
+ <div className="grid grid-cols-1 gap-10 lg:grid-cols-5">
+ <div className="lg:col-span-3 space-y-6">
+ <div>
+ <h1 className="text-2xl font-bold tracking-tight">
+ Choose topics to monitor
+ </h1>
+ <div className="flex items-center gap-2 mt-3">
+ <span className="text-sm text-muted-foreground">
+ Select up to 10 topics
+ </span>
+ <div className="flex-1 h-1.5 rounded-full bg-muted overflow-hidden">
+ <div
+ className="h-full bg-primary rounded-full transition-all"
+ style={{
+ width: `${(selectedTopics.size / 10) * 100}%`,
+ }}
+ />
+ </div>
+ </div>
+ </div>
+
+ {loadingTopics ? (
+ <div className="flex flex-col items-center gap-3 py-12 text-muted-foreground">
+ <Sparkles className="h-5 w-5 animate-pulse" />
+ <span
+ key={topicLoadingMsg}
+ className="text-sm animate-in fade-in duration-500"
+ >
+ {topicLoadingMsg}
+ </span>
+ </div>
+ ) : (
+ <div className="space-y-2">
+ {suggestedTopics.map((topic) => {
+ const isSelected = selectedTopics.has(topic);
+ return (
+ <button
+ key={topic}
+ onClick={() => toggleTopic(topic)}
+ className={cn(
+ 'flex items-center gap-3 w-full rounded-lg border px-4 py-3 text-left text-sm transition-colors',
+ isSelected
+ ? 'border-primary bg-primary/5'
+ : 'border-border hover:border-muted-foreground/30',
+ )}
+ >
+ <div
+ className={cn(
+ 'flex h-5 w-5 shrink-0 items-center justify-center rounded border',
+ isSelected
+ ? 'border-primary bg-primary text-primary-foreground'
+ : 'border-muted-foreground/30',
+ )}
+ >
+ {isSelected && <Check className="h-3 w-3" />}
+ </div>
+ {topic}
+ </button>
+ );
+ })}
+
+ <div className="flex items-center gap-2 pt-2">
+ <Input
+ placeholder="Add custom topic..."
+ value={customTopic}
+ onChange={(e) => setCustomTopic(e.target.value)}
+ onKeyDown={(e) => e.key === 'Enter' && addCustomTopic()}
+ className="text-sm"
+ />
+ <Button
+ size="sm"
+ variant="outline"
+ onClick={addCustomTopic}
+ disabled={!customTopic.trim()}
+ >
+ <Plus className="h-4 w-4" />
+ </Button>
+ </div>
+ </div>
+ )}
+
+ <Button
+ className="w-full"
+ disabled={
+ selectedTopics.size === 0 || loadingPrompts || loadingTopics
+ }
+ onClick={handleGeneratePrompts}
+ >
+ {loadingPrompts ? (
+ <>
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ Generating prompts...
+ </>
+ ) : (
+ 'Looks good'
+ )}
+ </Button>
+ </div>
+
+ <div className="lg:col-span-2">
+ <div className="rounded-xl border bg-card p-5 sticky top-10">
+ <h3 className="text-sm font-semibold mb-4">
+ Topic Selection Tips
+ </h3>
+ <div className="space-y-4">
+ <div className="flex gap-3">
+ <Check className="h-4 w-4 text-foreground shrink-0 mt-0.5" />
+ <div>
+ <p className="text-sm font-medium">
+ 5 prompts are created per topic
+ </p>
+ <p className="text-xs text-muted-foreground mt-0.5">
+ You can select up to 10 topics for a total of 50
+ prompts. More can be added anytime from the dashboard.
+ </p>
+ </div>
+ </div>
+ <div className="flex gap-3">
+ <Check className="h-4 w-4 text-foreground shrink-0 mt-0.5" />
+ <div>
+ <p className="text-sm font-medium">
+ Think like your customers
+ </p>
+ <p className="text-xs text-muted-foreground mt-0.5">
+ Use terms your audience would search for when looking
+ for products or services like yours.
+ </p>
+ </div>
+ </div>
+ <div className="flex gap-3">
+ <Check className="h-4 w-4 text-foreground shrink-0 mt-0.5" />
+ <div>
+ <p className="text-sm font-medium">Keep it short</p>
+ <p className="text-xs text-muted-foreground mt-0.5">
+ Topics should be concise — we&apos;ll turn them into
+ detailed prompts in the next step.
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div className="flex mx-auto w-full max-w-4xl items-center justify-between mt-8">
+ <button
+ onClick={() => setStep(2)}
+ className="flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground"
+ >
+ <ArrowLeft className="h-3.5 w-3.5" />
+ Back
+ </button>
+ <StepDots current={3} total={TOTAL_STEPS} />
+ <div className="w-12" />
+ </div>
+ </div>
+ );
+ }
+
+ // ── Step 4: Prompt Review ──
+
+ if (step === 4) {
+ return (
+ <div className="flex min-h-svh flex-col p-6 md:p-10">
+ <div className="mx-auto w-full max-w-4xl flex-1">
+ <BrandHeader name={brandName} domain={domain} />
+
+ <div className="flex items-start justify-between mb-6">
+ <div>
+ <h1 className="text-2xl font-bold tracking-tight">
+ Review your prompts
+ </h1>
+ <p className="text-sm text-muted-foreground mt-1">
+ These prompts will be sent to AI platforms daily. Feel free to
+ edit, add, or remove any before starting.
+ </p>
+ </div>
+ <Button
+ onClick={handleSavePromptsAndContinue}
+ disabled={isLoading || totalPrompts === 0}
+ >
+ {isLoading ? (
+ <>
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ Saving prompts...
+ </>
+ ) : (
+ 'Continue'
+ )}
+ </Button>
+ </div>
+
+ <div className="mb-4">
+ <p className="text-sm font-medium">Your Prompt List</p>
+ <p className="text-xs text-muted-foreground">
+ {totalPrompts} prompts total
+ </p>
+ </div>
+
+ <div className="rounded-lg border">
+ <div className="flex items-center gap-4 px-4 py-2.5 border-b bg-muted/50 text-xs font-medium text-muted-foreground">
+ <span className="flex-1">Topic</span>
+ </div>
+ {topicPrompts.map((tp, idx) => (
+ <TopicAccordion
+ key={`${tp.topic}-${idx}`}
+ data={tp}
+ defaultOpen={idx === 0}
+ onRemoveTopic={() => removeTopic(idx)}
+ onAddPrompt={(p) => addPromptToTopic(idx, p)}
+ onRemovePrompt={(pi) => removePromptFromTopic(idx, pi)}
+ />
+ ))}
+ {topicPrompts.length === 0 && (
+ <div className="py-8 text-center text-sm text-muted-foreground">
+ No prompts generated yet.
+ </div>
+ )}
+ </div>
+ </div>
+
+ <div className="flex mx-auto w-full max-w-4xl items-center justify-between mt-8">
+ <button
+ onClick={() => setStep(3)}
+ className="flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground"
+ >
+ <ArrowLeft className="h-3.5 w-3.5" />
+ Back
+ </button>
+ <StepDots current={4} total={TOTAL_STEPS} />
+ <div className="w-12" />
+ </div>
+ </div>
+ );
+ }
+
+ // ── Step 5: Competitors ──
+
+ if (step === 5) {
+ const selectedCompetitorCount = suggestedCompetitors.filter(
+ (c) => c.selected,
+ ).length;
+
+ return (
+ <div className="flex min-h-svh flex-col p-6 md:p-10">
+ <div className="mx-auto w-full max-w-lg flex-1">
+ <BrandHeader name={brandName} domain={domain} />
+
+ <div className="mb-6">
+ <h1 className="text-2xl font-bold tracking-tight">
+ Add your competitors
+ </h1>
+ <p className="text-sm text-muted-foreground mt-1">
+ We&apos;ll track how often competitors appear alongside your brand
+ in AI responses.
+ </p>
+ </div>
+
+ {loadingCompetitors ? (
+ <div className="flex flex-col items-center gap-3 py-16 text-muted-foreground">
+ <Sparkles className="h-5 w-5 animate-pulse" />
+ <span
+ key={competitorLoadingMsg}
+ className="text-sm animate-in fade-in duration-500"
+ >
+ {competitorLoadingMsg}
+ </span>
+ </div>
+ ) : (
+ <div className="space-y-4">
+ {suggestedCompetitors.length > 0 && (
+ <div className="space-y-2">
+ <p className="text-xs font-medium text-muted-foreground uppercase tracking-wider">
+ Suggested competitors
+ </p>
+ {suggestedCompetitors.map((c, idx) => (
+ <div
+ key={`${c.domain}-${idx}`}
+ className={cn(
+ 'flex items-center gap-3 rounded-lg border px-4 py-3 cursor-pointer transition-colors',
+ c.selected
+ ? 'border-primary/50 bg-primary/5'
+ : 'border-border hover:bg-muted/50',
+ )}
+ onClick={() => toggleCompetitor(idx)}
+ >
+ <div
+ className={cn(
+ 'flex h-5 w-5 shrink-0 items-center justify-center rounded border transition-colors',
+ c.selected
+ ? 'bg-primary border-primary text-primary-foreground'
+ : 'border-muted-foreground/30',
+ )}
+ >
+ {c.selected && <Check className="h-3 w-3" />}
+ </div>
+ {c.domain && (
+ /* eslint-disable-next-line @next/next/no-img-element */
+ <img
+ src={getFaviconUrl(c.domain)}
+ alt=""
+ className="h-5 w-5 rounded-sm"
+ onError={(e) => {
+ (e.target as HTMLImageElement).style.display =
+ 'none';
+ }}
+ />
+ )}
+ <div className="flex-1 min-w-0">
+ <p className="text-sm font-medium truncate">{c.name}</p>
+ {c.domain && (
+ <p className="text-xs text-muted-foreground truncate">
+ {c.domain}
+ </p>
+ )}
+ </div>
+ <button
+ onClick={(e) => {
+ e.stopPropagation();
+ removeCompetitor(idx);
+ }}
+ className="p-1 rounded hover:bg-muted text-muted-foreground hover:text-destructive"
+ >
+ <X className="h-3.5 w-3.5" />
+ </button>
+ </div>
+ ))}
+ </div>
+ )}
+
+ <div className="space-y-2">
+ <p className="text-xs font-medium text-muted-foreground uppercase tracking-wider">
+ Add manually
+ </p>
+ <div className="flex items-center gap-2">
+ <Input
+ placeholder="Company name"
+ value={competitorName}
+ onChange={(e) => setCompetitorName(e.target.value)}
+ className="text-sm"
+ />
+ <Input
+ placeholder="domain.com"
+ value={competitorDomain}
+ onChange={(e) => setCompetitorDomain(e.target.value)}
+ onKeyDown={(e) =>
+ e.key === 'Enter' && addManualCompetitor()
+ }
+ className="text-sm"
+ />
+ <Button
+ size="sm"
+ variant="outline"
+ onClick={addManualCompetitor}
+ disabled={!competitorName.trim()}
+ >
+ <Plus className="h-4 w-4" />
+ </Button>
+ </div>
+ </div>
+
+ <Button
+ className="w-full"
+ onClick={handleFinish}
+ disabled={savingCompetitors}
+ >
+ {savingCompetitors ? (
+ <>
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ Finishing setup...
+ </>
+ ) : selectedCompetitorCount > 0 ? (
+ `Start tracking with ${selectedCompetitorCount} competitor${selectedCompetitorCount !== 1 ? 's' : ''}`
+ ) : (
+ 'Skip & start tracking'
+ )}
+ </Button>
+ </div>
+ )}
+ </div>
+
+ <div className="flex mx-auto w-full max-w-lg items-center justify-between mt-8">
+ <button
+ onClick={() => setStep(4)}
+ className="flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground"
+ >
+ <ArrowLeft className="h-3.5 w-3.5" />
+ Back
+ </button>
+ <StepDots current={5} total={TOTAL_STEPS} />
+ <div className="w-12" />
+ </div>
+ </div>
+ );
+ }
+
+ return null;
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/brands/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/brands/page.tsx
new file mode 100644
index 000000000..0cc350cb9
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/brands/page.tsx
@@ -0,0 +1,72 @@
+import { useTranslations } from 'next-intl';
+import { Link } from '@/i18n/navigation';
+import { createClient } from '@/lib/supabase/server';
+import { getBrands, getBrandsCardSummary } from '@/lib/actions/brand';
+import { getPlan, isCloud as checkIsCloud } from '@/config/plans';
+import { BrandsClient } from './_brands-client';
+import { Button } from '@/components/ui/button';
+import { Crown, Plus } from 'lucide-react';
+
+function BrandsHeader({ canAddBrand, needsUpgrade }: { canAddBrand: boolean; needsUpgrade: boolean }) {
+ const t = useTranslations('brands');
+ return (
+ <div className="flex items-center justify-between">
+ <div>
+ <h1 className="text-2xl font-bold tracking-tight">{t('title')}</h1>
+ <p className="text-muted-foreground">{t('description')}</p>
+ </div>
+ {canAddBrand ? (
+ <Link href="/dashboard/brands/new">
+ <Button className="gap-2">
+ <Plus className="h-4 w-4" />
+ {t('addBrand')}
+ </Button>
+ </Link>
+ ) : needsUpgrade ? (
+ <Link href="/dashboard/settings?tab=billing">
+ <Button variant="outline" className="gap-2">
+ <Crown className="h-4 w-4" />
+ {t('addBrand')}
+ </Button>
+ </Link>
+ ) : null}
+ </div>
+ );
+}
+
+export default async function BrandsPage() {
+ const supabase = await createClient();
+
+ const { data: profile } = await supabase
+ .from('profiles')
+ .select('organization_id')
+ .single();
+
+ const orgId = profile?.organization_id;
+
+ const [brands, orgData] = await Promise.all([
+ orgId ? getBrands(orgId) : [],
+ orgId
+ ? supabase
+ .from('organizations')
+ .select('plan')
+ .eq('id', orgId)
+ .single()
+ .then((r) => r.data)
+ : null,
+ ]);
+
+ const plan = getPlan(orgData?.plan as string | null);
+ const maxBrands = plan.limits.maxBrands;
+ const canAddBrand = maxBrands === -1 || brands.length < maxBrands;
+ const needsUpgrade = !canAddBrand && checkIsCloud();
+
+ const summaries = await getBrandsCardSummary(brands.map((b) => b.id));
+
+ return (
+ <div className="space-y-6">
+ <BrandsHeader canAddBrand={canAddBrand} needsUpgrade={needsUpgrade} />
+ <BrandsClient brands={brands} summaries={summaries} />
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/citations/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/citations/page.tsx
new file mode 100644
index 000000000..da7211148
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/citations/page.tsx
@@ -0,0 +1,959 @@
+'use client';
+
+import {
+ useCallback,
+ useEffect,
+ useMemo,
+ useRef,
+ useState,
+} from 'react';
+import { useTranslations } from 'next-intl';
+import Image from 'next/image';
+import {
+ PieChart,
+ Pie,
+ Cell,
+ Tooltip,
+} from 'recharts';
+import {
+ Quote,
+ Globe,
+ ExternalLink,
+ Filter as FilterIcon,
+ Layers,
+} from 'lucide-react';
+import { useBrandStore } from '@/stores/use-brand-store';
+import {
+ getCitationsOverview,
+ type CitationsFilters,
+ type CitationsOverview,
+ type CitationDomainRow,
+ type CitationUrlRow,
+ type CitationsDatePreset,
+} from '@/lib/actions/citations';
+import { getTopics } from '@/lib/actions/topic';
+import type { Topic } from '@/types';
+import {
+ SOURCE_CATEGORY_LABELS,
+ type SourceCategory,
+} from '@/lib/citations/classify';
+import { getFaviconUrl } from '@/lib/favicon';
+import {
+ Card,
+ CardContent,
+ CardHeader,
+ CardTitle,
+} from '@/components/ui/card';
+import { Badge } from '@/components/ui/badge';
+import { Button } from '@/components/ui/button';
+import { Input } from '@/components/ui/input';
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from '@/components/ui/select';
+import {
+ Tabs,
+ TabsContent,
+ TabsList,
+ TabsTrigger,
+} from '@/components/ui/tabs';
+import {
+ Table,
+ TableBody,
+ TableCell,
+ TableHead,
+ TableHeader,
+ TableRow,
+} from '@/components/ui/table';
+import { Skeleton } from '@/components/ui/skeleton';
+import { cn } from '@/lib/utils';
+import {
+ AIProviderAvatar,
+ resolveAIProvider,
+ type AIProviderKey,
+} from '@/components/ai-provider-avatar';
+
+// ─── Constants ───────────────────────────────────────────────────────────────
+
+const DATE_PRESETS: CitationsDatePreset[] = [
+ '24h',
+ '7d',
+ '30d',
+ '90d',
+ 'all',
+ 'custom',
+];
+
+const CATEGORY_COLORS: Record<SourceCategory, string> = {
+ you: '#6366f1',
+ competitor: '#f97316',
+ editorial: '#3b82f6',
+ forum: '#22c55e',
+ social: '#a855f7',
+ review: '#eab308',
+ institutional: '#14b8a6',
+ other: '#94a3b8',
+};
+
+const CATEGORY_BADGE_CLASSES: Record<SourceCategory, string> = {
+ you: 'border-indigo-500/30 bg-indigo-500/10 text-indigo-700 dark:text-indigo-300',
+ competitor:
+ 'border-orange-500/30 bg-orange-500/10 text-orange-700 dark:text-orange-300',
+ editorial:
+ 'border-blue-500/30 bg-blue-500/10 text-blue-700 dark:text-blue-300',
+ forum:
+ 'border-green-500/30 bg-green-500/10 text-green-700 dark:text-green-300',
+ social:
+ 'border-purple-500/30 bg-purple-500/10 text-purple-700 dark:text-purple-300',
+ review:
+ 'border-yellow-500/30 bg-yellow-500/10 text-yellow-700 dark:text-yellow-300',
+ institutional:
+ 'border-teal-500/30 bg-teal-500/10 text-teal-700 dark:text-teal-300',
+ other:
+ 'border-slate-400/30 bg-slate-400/10 text-slate-700 dark:text-slate-300',
+};
+
+// AI platform / model friendly names — kept in sync with the insights page.
+const MODEL_DISPLAY_NAME: Record<string, string> = {
+ 'gpt-4o': 'GPT-4o',
+ 'gpt-4o-mini': 'GPT-4o Mini',
+ 'gpt-4.1': 'GPT-4.1',
+ 'gpt-4.1-mini': 'GPT-4.1 Mini',
+ 'gpt-4.1-nano': 'GPT-4.1 Nano',
+ 'gpt-5-chat-latest': 'ChatGPT',
+ 'claude-sonnet-4-6': 'Claude',
+ 'claude-opus-4-6': 'Claude',
+ 'claude-haiku-4-5': 'Claude',
+ 'gemini-2.5-pro': 'Gemini 2.5 Pro',
+ 'gemini-2.5-flash': 'Gemini 2.5 Flash',
+ 'grok-3': 'Grok',
+ 'grok-4-auto': 'Grok',
+ 'chatgpt-web': 'ChatGPT',
+ 'perplexity-web': 'Perplexity',
+ 'google-aio': 'Google AI Overview',
+ 'google-aimode': 'Google AI Mode',
+ 'copilot-web': 'Microsoft Copilot',
+ 'grok-web': 'Grok',
+ 'gemini-web': 'Gemini',
+};
+
+function getModelLabel(model: string): string {
+ return MODEL_DISPLAY_NAME[model] ?? model;
+}
+
+// ─── Filter types ─────────────────────────────────────────────────────────────
+
+interface UIFilters {
+ datePreset: CitationsDatePreset;
+ dateFrom: string;
+ dateTo: string;
+ platform: string;
+ region: string;
+ topic: string;
+ excludeOwnDomain: boolean;
+ competitorOnly: boolean;
+}
+
+const DEFAULT_FILTERS: UIFilters = {
+ datePreset: 'all',
+ dateFrom: '',
+ dateTo: '',
+ platform: '',
+ region: '',
+ topic: '',
+ excludeOwnDomain: false,
+ competitorOnly: false,
+};
+
+// ─── Sub-components ───────────────────────────────────────────────────────────
+
+function CategoryBadge({ category }: { category: SourceCategory }) {
+ return (
+ <Badge
+ variant="outline"
+ className={cn(
+ 'text-[10px] font-medium capitalize whitespace-nowrap',
+ CATEGORY_BADGE_CLASSES[category],
+ )}
+ >
+ {SOURCE_CATEGORY_LABELS[category]}
+ </Badge>
+ );
+}
+
+function ProviderDot({ provider }: { provider: AIProviderKey }) {
+ return <AIProviderAvatar provider={provider} />;
+}
+
+/**
+ * Collapse model identifiers down to their underlying provider so the column
+ * shows at most one dot per platform (ChatGPT, Claude, Gemini, ...). There
+ * are only 7 known providers, so the row width stays stable regardless of
+ * how many raw models fed into the domain.
+ */
+function PlatformsCell({ models }: { models: string[] }) {
+ if (models.length === 0) {
+ return <span className="text-xs text-muted-foreground">—</span>;
+ }
+ const providers = Array.from(new Set(models.map((m) => resolveAIProvider(m)))).sort();
+ return (
+ <div className="flex items-center gap-1">
+ {providers.map((p) => (
+ <ProviderDot key={p} provider={p} />
+ ))}
+ </div>
+ );
+}
+
+function UsageBar({ pct }: { pct: number }) {
+ const clamped = Math.min(100, Math.max(0, pct));
+ return (
+ <div className="flex items-center gap-2">
+ <div className="h-1.5 w-20 rounded-full bg-muted overflow-hidden">
+ <div
+ className="h-full rounded-full bg-primary"
+ style={{ width: `${clamped}%` }}
+ />
+ </div>
+ <span className="text-xs tabular-nums text-foreground">
+ {pct.toFixed(1)}%
+ </span>
+ </div>
+ );
+}
+
+function DomainFavicon({ domain }: { domain: string }) {
+ const [errored, setErrored] = useState(false);
+ if (errored) {
+ return (
+ <div className="flex h-6 w-6 items-center justify-center rounded border bg-muted">
+ <Globe className="h-3 w-3 text-muted-foreground" />
+ </div>
+ );
+ }
+ return (
+ <Image
+ src={getFaviconUrl(domain, 64)}
+ alt=""
+ width={20}
+ height={20}
+ unoptimized
+ className="h-5 w-5 rounded-sm border bg-white object-contain"
+ onError={() => setErrored(true)}
+ />
+ );
+}
+
+// ─── Donut ────────────────────────────────────────────────────────────────────
+
+function ChartContainer({
+ height,
+ children,
+}: {
+ height: number;
+ children: (width: number) => React.ReactNode;
+}) {
+ const ref = useRef<HTMLDivElement>(null);
+ const [width, setWidth] = useState(0);
+
+ useEffect(() => {
+ const el = ref.current;
+ if (!el) return;
+ const update = () => setWidth(el.clientWidth);
+ update();
+ const ro = new ResizeObserver(update);
+ ro.observe(el);
+ return () => ro.disconnect();
+ }, []);
+
+ return (
+ <div ref={ref} style={{ width: '100%', height }}>
+ {width > 0 && children(width)}
+ </div>
+ );
+}
+
+function SourceTypeDonut({
+ data,
+ total,
+}: {
+ data: { category: SourceCategory; count: number; pct: number }[];
+ total: number;
+}) {
+ if (data.length === 0 || total === 0) {
+ return (
+ <div className="flex h-[220px] flex-col items-center justify-center gap-2 text-sm text-muted-foreground">
+ <Layers className="h-8 w-8 opacity-30" />
+ No citation sources yet.
+ </div>
+ );
+ }
+
+ const chartData = data.map((d) => ({
+ ...d,
+ fill: CATEGORY_COLORS[d.category],
+ label: SOURCE_CATEGORY_LABELS[d.category],
+ }));
+
+ return (
+ <div className="flex flex-col gap-4">
+ <ChartContainer height={200}>
+ {(width) => {
+ const size = Math.min(width, 220);
+ return (
+ <PieChart width={width} height={200}>
+ <Pie
+ data={chartData}
+ cx={width / 2}
+ cy={100}
+ innerRadius={size * 0.28}
+ outerRadius={size * 0.44}
+ paddingAngle={2}
+ dataKey="count"
+ nameKey="label"
+ >
+ {chartData.map((entry) => (
+ <Cell key={entry.category} fill={entry.fill} stroke="none" />
+ ))}
+ </Pie>
+ <Tooltip
+ isAnimationActive={false}
+ content={({ active, payload }) => {
+ if (!active || !payload || payload.length === 0) return null;
+ const p = payload[0].payload as {
+ label: string;
+ count: number;
+ pct: number;
+ };
+ return (
+ <div className="rounded-md border bg-popover px-2.5 py-1.5 text-xs shadow-sm">
+ <div className="font-medium">{p.label}</div>
+ <div className="text-muted-foreground">
+ {p.count} · {p.pct.toFixed(1)}%
+ </div>
+ </div>
+ );
+ }}
+ />
+ </PieChart>
+ );
+ }}
+ </ChartContainer>
+ <ul className="grid grid-cols-2 gap-x-3 gap-y-1.5">
+ {chartData.map((d) => (
+ <li key={d.category} className="flex items-center gap-2 text-xs">
+ <span
+ className="h-2.5 w-2.5 shrink-0 rounded-sm"
+ style={{ background: d.fill }}
+ aria-hidden
+ />
+ <span className="truncate text-foreground">{d.label}</span>
+ <span className="ml-auto tabular-nums text-muted-foreground">
+ {d.pct.toFixed(1)}%
+ </span>
+ </li>
+ ))}
+ </ul>
+ </div>
+ );
+}
+
+// ─── Filter bar ───────────────────────────────────────────────────────────────
+
+function FilterBar({
+ filters,
+ onChange,
+ topics,
+ platforms,
+ regions,
+}: {
+ filters: UIFilters;
+ onChange: (patch: Partial<UIFilters>) => void;
+ topics: Topic[];
+ platforms: string[];
+ regions: string[];
+}) {
+ return (
+ <div className="flex flex-wrap items-end gap-3">
+ <div>
+ <label className="mb-1.5 block text-xs font-medium text-muted-foreground">
+ Date Range
+ </label>
+ <div className="flex rounded-md border overflow-hidden">
+ {DATE_PRESETS.map((p) => (
+ <button
+ key={p}
+ type="button"
+ onClick={() => onChange({ datePreset: p })}
+ className={cn(
+ 'px-3 py-1.5 text-xs font-medium transition-colors',
+ filters.datePreset === p
+ ? 'bg-primary text-primary-foreground'
+ : 'bg-card hover:bg-muted text-foreground',
+ )}
+ >
+ {p === 'custom' ? 'Custom' : p === 'all' ? 'All' : p}
+ </button>
+ ))}
+ </div>
+ </div>
+
+ {filters.datePreset === 'custom' && (
+ <>
+ <div>
+ <label className="mb-1.5 block text-xs font-medium text-muted-foreground">
+ From
+ </label>
+ <Input
+ type="date"
+ value={filters.dateFrom}
+ onChange={(e) => onChange({ dateFrom: e.target.value })}
+ className="h-8 w-36 text-xs"
+ />
+ </div>
+ <div>
+ <label className="mb-1.5 block text-xs font-medium text-muted-foreground">
+ To
+ </label>
+ <Input
+ type="date"
+ value={filters.dateTo}
+ onChange={(e) => onChange({ dateTo: e.target.value })}
+ className="h-8 w-36 text-xs"
+ />
+ </div>
+ </>
+ )}
+
+ {topics.length > 0 && (
+ <div>
+ <label className="mb-1.5 block text-xs font-medium text-muted-foreground">
+ Topic
+ </label>
+ <Select
+ value={filters.topic || null}
+ onValueChange={(v) =>
+ onChange({ topic: !v || v === '__all__' ? '' : v })
+ }
+ >
+ <SelectTrigger className="h-8 w-40 text-xs">
+ <SelectValue placeholder="All Topics">
+ {(value) =>
+ value && value !== '__all__'
+ ? (topics.find((t) => t.id === value)?.name ?? 'All Topics')
+ : 'All Topics'
+ }
+ </SelectValue>
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="__all__">All Topics</SelectItem>
+ {topics.map((t) => (
+ <SelectItem key={t.id} value={t.id}>
+ {t.name}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+ )}
+
+ <div>
+ <label className="mb-1.5 block text-xs font-medium text-muted-foreground">
+ Platform
+ </label>
+ <Select
+ value={filters.platform || null}
+ onValueChange={(v) =>
+ onChange({ platform: !v || v === '__all__' ? '' : v })
+ }
+ >
+ <SelectTrigger className="h-8 w-40 text-xs">
+ <SelectValue placeholder="All Platforms">
+ {(value) =>
+ value && value !== '__all__'
+ ? getModelLabel(value)
+ : 'All Platforms'
+ }
+ </SelectValue>
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="__all__">All Platforms</SelectItem>
+ {platforms.map((p) => (
+ <SelectItem key={p} value={p}>
+ {getModelLabel(p)}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+
+ <div>
+ <label className="mb-1.5 block text-xs font-medium text-muted-foreground">
+ Region
+ </label>
+ <Select
+ value={filters.region || null}
+ onValueChange={(v) =>
+ onChange({ region: !v || v === '__all__' ? '' : v })
+ }
+ >
+ <SelectTrigger className="h-8 w-32 text-xs">
+ <SelectValue placeholder="All Regions" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="__all__">All Regions</SelectItem>
+ {regions.map((r) => (
+ <SelectItem key={r} value={r}>
+ {r}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+
+ <div className="flex items-center gap-2 pb-0.5">
+ <Button
+ type="button"
+ variant={filters.excludeOwnDomain ? 'default' : 'outline'}
+ size="sm"
+ className="h-8 text-xs"
+ onClick={() =>
+ onChange({ excludeOwnDomain: !filters.excludeOwnDomain })
+ }
+ >
+ Exclude own domain
+ </Button>
+ <Button
+ type="button"
+ variant={filters.competitorOnly ? 'default' : 'outline'}
+ size="sm"
+ className="h-8 text-xs"
+ onClick={() =>
+ onChange({
+ competitorOnly: !filters.competitorOnly,
+ excludeOwnDomain: !filters.competitorOnly
+ ? true
+ : filters.excludeOwnDomain,
+ })
+ }
+ >
+ Competitors only
+ </Button>
+ </div>
+ </div>
+ );
+}
+
+// ─── KPI Card ─────────────────────────────────────────────────────────────────
+
+function KpiCard({
+ title,
+ value,
+ sub,
+ icon: Icon,
+}: {
+ title: string;
+ value: string;
+ sub: string;
+ icon: React.ComponentType<{ className?: string }>;
+}) {
+ return (
+ <Card>
+ <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-1">
+ <CardTitle className="text-xs font-medium text-muted-foreground uppercase tracking-wide">
+ {title}
+ </CardTitle>
+ <Icon className="h-3.5 w-3.5 text-muted-foreground" />
+ </CardHeader>
+ <CardContent>
+ <div className="text-3xl font-bold tabular-nums">{value}</div>
+ <p className="text-xs mt-1 text-muted-foreground">{sub}</p>
+ </CardContent>
+ </Card>
+ );
+}
+
+// ─── Tables ───────────────────────────────────────────────────────────────────
+
+function DomainsTable({ rows }: { rows: CitationDomainRow[] }) {
+ if (rows.length === 0) return <EmptyRows />;
+
+ return (
+ <Table>
+ <TableHeader>
+ <TableRow>
+ <TableHead className="w-[56px] text-xs">Rank</TableHead>
+ <TableHead className="text-xs">Domain</TableHead>
+ <TableHead className="text-xs">Platforms</TableHead>
+ <TableHead className="text-xs">Usage</TableHead>
+ <TableHead className="text-right text-xs">Avg Citations</TableHead>
+ </TableRow>
+ </TableHeader>
+ <TableBody>
+ {rows.map((row, i) => (
+ <TableRow key={row.domain}>
+ <TableCell className="text-xs text-muted-foreground tabular-nums">
+ {i + 1}
+ </TableCell>
+ <TableCell>
+ <div className="flex items-center gap-2 min-w-0">
+ <DomainFavicon domain={row.domain} />
+ <div className="flex min-w-0 flex-col">
+ <span className="truncate text-sm font-medium">
+ {row.domain}
+ </span>
+ <div className="flex items-center gap-1.5 pt-0.5">
+ <CategoryBadge category={row.category} />
+ <a
+ href={`https://${row.domain}`}
+ target="_blank"
+ rel="noreferrer noopener"
+ className="inline-flex items-center text-muted-foreground hover:text-foreground"
+ aria-label={`Open ${row.domain} in a new tab`}
+ >
+ <ExternalLink className="h-3 w-3" />
+ </a>
+ </div>
+ </div>
+ </div>
+ </TableCell>
+ <TableCell>
+ <PlatformsCell models={row.models} />
+ </TableCell>
+ <TableCell>
+ <UsageBar pct={row.usagePct} />
+ </TableCell>
+ <TableCell className="text-right text-xs tabular-nums">
+ {row.avgCitationsPerResult.toFixed(1)}
+ </TableCell>
+ </TableRow>
+ ))}
+ </TableBody>
+ </Table>
+ );
+}
+
+function UrlsTable({ rows }: { rows: CitationUrlRow[] }) {
+ if (rows.length === 0) return <EmptyRows />;
+
+ return (
+ <Table>
+ <TableHeader>
+ <TableRow>
+ <TableHead className="w-[56px] text-xs">Rank</TableHead>
+ <TableHead className="text-xs">URL</TableHead>
+ <TableHead className="text-xs">Platforms</TableHead>
+ <TableHead className="text-xs">Usage</TableHead>
+ <TableHead className="text-right text-xs">Citations</TableHead>
+ </TableRow>
+ </TableHeader>
+ <TableBody>
+ {rows.map((row, i) => (
+ <TableRow key={row.url}>
+ <TableCell className="text-xs text-muted-foreground tabular-nums">
+ {i + 1}
+ </TableCell>
+ <TableCell>
+ <div className="flex items-start gap-2 min-w-0">
+ <DomainFavicon domain={row.domain} />
+ <div className="flex min-w-0 max-w-[480px] flex-col">
+ <a
+ href={row.url}
+ target="_blank"
+ rel="noreferrer noopener"
+ className="truncate text-sm font-medium text-foreground hover:underline"
+ title={row.title || row.url}
+ >
+ {row.title || row.url}
+ </a>
+ <div className="flex items-center gap-1.5 pt-0.5">
+ <span className="truncate text-[11px] text-muted-foreground">
+ {row.domain}
+ </span>
+ <CategoryBadge category={row.category} />
+ </div>
+ </div>
+ </div>
+ </TableCell>
+ <TableCell>
+ <PlatformsCell models={row.models} />
+ </TableCell>
+ <TableCell>
+ <UsageBar pct={row.usagePct} />
+ </TableCell>
+ <TableCell className="text-right text-xs tabular-nums">
+ {row.totalCitations}
+ </TableCell>
+ </TableRow>
+ ))}
+ </TableBody>
+ </Table>
+ );
+}
+
+function EmptyRows() {
+ return (
+ <div className="flex flex-col items-center justify-center py-16 text-center">
+ <FilterIcon className="h-8 w-8 text-muted-foreground/40 mb-3" />
+ <p className="text-sm font-medium">No citations match your filters</p>
+ <p className="mt-1 text-xs text-muted-foreground">
+ Try widening your date range or removing filters.
+ </p>
+ </div>
+ );
+}
+
+// ─── Page ─────────────────────────────────────────────────────────────────────
+
+function getDateRange(
+ preset: CitationsDatePreset,
+ custom: { from: string; to: string },
+): { dateFrom?: string; dateTo?: string } {
+ if (preset === 'all') return {};
+ if (preset === 'custom') {
+ return {
+ dateFrom: custom.from || undefined,
+ dateTo: custom.to ? `${custom.to}T23:59:59.999Z` : undefined,
+ };
+ }
+ if (preset === '24h') {
+ const from = new Date();
+ from.setHours(from.getHours() - 24);
+ return { dateFrom: from.toISOString() };
+ }
+ const days = preset === '7d' ? 7 : preset === '30d' ? 30 : 90;
+ const from = new Date();
+ from.setDate(from.getDate() - days);
+ return { dateFrom: from.toISOString() };
+}
+
+export default function CitationsPage() {
+ const t = useTranslations('citations');
+ const { getActiveBrand } = useBrandStore();
+ const brand = getActiveBrand();
+
+ const [filters, setFilters] = useState<UIFilters>(DEFAULT_FILTERS);
+ const [data, setData] = useState<CitationsOverview | null>(null);
+ const [isLoading, setIsLoading] = useState(true);
+ const [topics, setTopics] = useState<Topic[]>([]);
+ const [availablePlatforms, setAvailablePlatforms] = useState<string[]>([]);
+ const [availableRegions, setAvailableRegions] = useState<string[]>([]);
+
+ const activeBrandId = brand?.id ?? null;
+
+ useEffect(() => {
+ if (!activeBrandId) return;
+ getTopics(activeBrandId).then(setTopics).catch(() => {});
+ }, [activeBrandId]);
+
+ const loadData = useCallback(async () => {
+ if (!activeBrandId) {
+ setIsLoading(false);
+ return;
+ }
+ setIsLoading(true);
+ try {
+ const { dateFrom, dateTo } = getDateRange(filters.datePreset, {
+ from: filters.dateFrom,
+ to: filters.dateTo,
+ });
+ const apiFilters: CitationsFilters = {
+ datePreset: filters.datePreset,
+ dateFrom,
+ dateTo,
+ platforms: filters.platform ? [filters.platform] : undefined,
+ regions: filters.region ? [filters.region] : undefined,
+ topicIds: filters.topic ? [filters.topic] : undefined,
+ excludeOwnDomain: filters.excludeOwnDomain,
+ competitorOnly: filters.competitorOnly,
+ };
+ const overview = await getCitationsOverview(activeBrandId, apiFilters);
+ setData(overview);
+
+ // Surface filter options from the observed models/regions.
+ const platforms = new Set<string>();
+ const regions = new Set<string>();
+ for (const row of overview.rows) {
+ for (const m of row.models) platforms.add(m);
+ }
+ setAvailablePlatforms((prev) =>
+ Array.from(new Set([...prev, ...platforms])).sort((a, b) =>
+ a.localeCompare(b),
+ ),
+ );
+ if (regions.size > 0) {
+ setAvailableRegions((prev) =>
+ Array.from(new Set([...prev, ...regions])).sort((a, b) =>
+ a.localeCompare(b),
+ ),
+ );
+ }
+ } catch {
+ // swallow — user will see empty state / can retry
+ } finally {
+ setIsLoading(false);
+ }
+ }, [
+ activeBrandId,
+ filters.datePreset,
+ filters.dateFrom,
+ filters.dateTo,
+ filters.platform,
+ filters.region,
+ filters.topic,
+ filters.excludeOwnDomain,
+ filters.competitorOnly,
+ ]);
+
+ useEffect(() => {
+ loadData();
+ }, [loadData]);
+
+ const totals = data?.totals;
+ const kpis = useMemo(
+ () => [
+ {
+ title: t('kpiTotalCitations'),
+ value: totals ? totals.citations.toLocaleString() : '—',
+ sub: t('kpiTotalCitationsSub', {
+ results: totals?.results ?? 0,
+ }),
+ icon: Quote,
+ },
+ {
+ title: t('kpiUniqueDomains'),
+ value: totals ? totals.domains.toLocaleString() : '—',
+ sub: t('kpiUniqueDomainsSub', {
+ urls: totals?.urls ?? 0,
+ }),
+ icon: Globe,
+ },
+ {
+ title: t('kpiAvgPerResult'),
+ value: totals ? totals.avgCitationsPerResult.toFixed(1) : '—',
+ sub: t('kpiAvgPerResultSub'),
+ icon: Layers,
+ },
+ ],
+ [totals, t],
+ );
+
+ if (!brand) {
+ return (
+ <div className="flex flex-col items-center justify-center py-20 text-center">
+ <Globe className="h-10 w-10 text-muted-foreground/40 mb-3" />
+ <h2 className="text-lg font-semibold">{t('noBrandTitle')}</h2>
+ <p className="mt-1 max-w-md text-sm text-muted-foreground">
+ {t('noBrandDescription')}
+ </p>
+ </div>
+ );
+ }
+
+ return (
+ <div className="space-y-6">
+ <div className="flex items-start justify-between gap-4">
+ <div>
+ <h1 className="text-2xl font-bold">{t('title')}</h1>
+ <p className="mt-1 text-sm text-muted-foreground">
+ {t('description')}
+ </p>
+ </div>
+ </div>
+
+ <FilterBar
+ filters={filters}
+ onChange={(patch) => setFilters((f) => ({ ...f, ...patch }))}
+ topics={topics}
+ platforms={availablePlatforms}
+ regions={availableRegions}
+ />
+
+ {isLoading ? (
+ <CitationsSkeleton />
+ ) : (
+ <>
+ <div className="grid gap-4 sm:grid-cols-3">
+ {kpis.map((k) => (
+ <KpiCard key={k.title} {...k} />
+ ))}
+ </div>
+
+ <div className="grid gap-4 lg:grid-cols-5">
+ <Card className="lg:col-span-3">
+ <CardHeader>
+ <CardTitle className="text-base">{t('sourcesTitle')}</CardTitle>
+ </CardHeader>
+ <CardContent>
+ <Tabs defaultValue="domains">
+ <TabsList>
+ <TabsTrigger value="domains">
+ {t('tabDomains')} ({data?.totals.domains ?? 0})
+ </TabsTrigger>
+ <TabsTrigger value="urls">
+ {t('tabUrls')} ({data?.totals.urls ?? 0})
+ </TabsTrigger>
+ </TabsList>
+ <TabsContent value="domains" className="mt-4">
+ <DomainsTable rows={data?.rows ?? []} />
+ </TabsContent>
+ <TabsContent value="urls" className="mt-4">
+ <UrlsTable rows={data?.urlRows ?? []} />
+ </TabsContent>
+ </Tabs>
+ </CardContent>
+ </Card>
+
+ <Card className="lg:col-span-2">
+ <CardHeader>
+ <CardTitle className="text-base">
+ {t('sourceTypesTitle')}
+ </CardTitle>
+ </CardHeader>
+ <CardContent>
+ <SourceTypeDonut
+ data={data?.sourceTypeBreakdown ?? []}
+ total={data?.totals.domains ?? 0}
+ />
+ </CardContent>
+ </Card>
+ </div>
+ </>
+ )}
+ </div>
+ );
+}
+
+function CitationsSkeleton() {
+ return (
+ <div className="space-y-6">
+ <div className="grid gap-4 sm:grid-cols-3">
+ {Array.from({ length: 3 }).map((_, i) => (
+ <Card key={i}>
+ <CardContent className="pt-6 space-y-2">
+ <Skeleton className="h-4 w-24" />
+ <Skeleton className="h-8 w-16" />
+ <Skeleton className="h-3 w-32" />
+ </CardContent>
+ </Card>
+ ))}
+ </div>
+ <div className="grid gap-4 lg:grid-cols-5">
+ <Card className="lg:col-span-3">
+ <CardContent className="pt-6">
+ <Skeleton className="mb-4 h-8 w-48" />
+ <Skeleton className="h-64 w-full" />
+ </CardContent>
+ </Card>
+ <Card className="lg:col-span-2">
+ <CardContent className="pt-6">
+ <Skeleton className="h-56 w-full" />
+ </CardContent>
+ </Card>
+ </div>
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/competitors/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/competitors/page.tsx
new file mode 100644
index 000000000..83b673dcf
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/competitors/page.tsx
@@ -0,0 +1,1552 @@
+"use client";
+
+import { useState, useEffect, useCallback, useRef } from "react";
+import { useRouter } from "@/i18n/navigation";
+import { createPortal } from "react-dom";
+import { useTranslations } from "next-intl";
+import { useBrandStore } from "@/stores/use-brand-store";
+import { useFeatureGate } from "@/hooks/use-feature-gate";
+import {
+ getCompetitors,
+ addCompetitor,
+ deleteCompetitor,
+} from "@/lib/actions/competitor";
+import {
+ getCompetitorComparison,
+ getHeadToHeadComparison,
+ type CompetitorComparisonData,
+ type HeadToHeadData,
+ type HeadToHeadPromptRow,
+} from "@/lib/actions/tracking";
+import { getFaviconUrl } from "@/lib/favicon";
+import type { Competitor } from "@/types";
+import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
+import { Button } from "@/components/ui/button";
+import { Input } from "@/components/ui/input";
+import { Label } from "@/components/ui/label";
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+} from "@/components/ui/dialog";
+import {
+ Table,
+ TableBody,
+ TableCell,
+ TableHead,
+ TableHeader,
+ TableRow,
+} from "@/components/ui/table";
+import { Badge } from "@/components/ui/badge";
+import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
+import { toast } from "sonner";
+import { cn } from "@/lib/utils";
+import {
+ AIProviderAvatar,
+ resolveAIProvider,
+} from "@/components/ai-provider-avatar";
+import {
+ Plus,
+ Trash2,
+ Loader2,
+ Users,
+ Globe,
+ Crown,
+ AlertCircle,
+ ArrowUpRight,
+ ArrowDownRight,
+ Minus,
+ Swords,
+ TrendingUp,
+ TrendingDown,
+ Target,
+ ShieldAlert,
+ ChevronDown,
+ Eye,
+ HelpCircle,
+} from "lucide-react";
+
+// ─── Shared Visual Components (mirroring Insights) ───────────────────────────
+
+const MODEL_DISPLAY_NAME: Record<string, string> = {
+ "gpt-4o": "GPT-4o",
+ "gpt-4o-mini": "GPT-4o Mini",
+ "gpt-4.1": "GPT-4.1",
+ "gpt-4.1-mini": "GPT-4.1 Mini",
+ "gpt-4.1-nano": "GPT-4.1 Nano",
+ "gpt-5-chat-latest": "ChatGPT",
+ "claude-sonnet-4-6": "Claude Sonnet",
+ "claude-opus-4-6": "Claude Opus",
+ "claude-haiku-4-5": "Claude Haiku",
+ "gemini-2.5-pro": "Gemini 2.5 Pro",
+ "gemini-2.5-flash": "Gemini 2.5 Flash",
+ "grok-3": "Grok",
+ "grok-4-auto": "Grok",
+ "chatgpt-web": "ChatGPT",
+ "perplexity-web": "Perplexity",
+ "google-aio": "Google AI Overview",
+ "google-aimode": "Google AI Mode",
+ "copilot-web": "Microsoft Copilot",
+ "grok-web": "Grok",
+ "gemini-web": "Gemini",
+};
+
+function getModelDisplayName(model: string, platform?: string): string {
+ // In h2h data, platform is already resolved (e.g. "ChatGPT", "Perplexity")
+ // so use it directly if available
+ if (platform) {
+ const modelName = MODEL_DISPLAY_NAME[model];
+ return modelName && modelName !== platform
+ ? `${platform} · ${modelName}`
+ : platform;
+ }
+ return MODEL_DISPLAY_NAME[model] ?? model;
+}
+
+function ModelBadge({ model, platform }: { model: string; platform?: string }) {
+ const provider = resolveAIProvider(model, platform);
+ return (
+ <span className="inline-flex items-center gap-1.5">
+ <AIProviderAvatar provider={provider} />
+ <span className="text-xs">{getModelDisplayName(model, platform)}</span>
+ </span>
+ );
+}
+
+function SentimentBadge({
+ sentiment,
+}: {
+ sentiment: "positive" | "neutral" | "negative";
+}) {
+ return (
+ <Badge
+ variant="outline"
+ className={cn(
+ "text-xs capitalize",
+ sentiment === "positive" &&
+ "border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400",
+ sentiment === "neutral" &&
+ "border-yellow-500/30 bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",
+ sentiment === "negative" &&
+ "border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400",
+ )}
+ >
+ {sentiment}
+ </Badge>
+ );
+}
+
+function VisibilityBar({ score, max = 100 }: { score: number; max?: number }) {
+ const pct = Math.round((score / max) * 100);
+ return (
+ <div className="flex items-center gap-2">
+ <div className="h-1.5 w-24 rounded-full bg-muted overflow-hidden">
+ <div
+ className={cn(
+ "h-full rounded-full transition-all",
+ score >= 60
+ ? "bg-green-500"
+ : score >= 40
+ ? "bg-yellow-500"
+ : "bg-red-500",
+ )}
+ style={{ width: `${pct}%` }}
+ />
+ </div>
+ <span className="text-sm font-medium tabular-nums">{Math.round(score)}</span>
+ </div>
+ );
+}
+
+function InfoTip({ content }: { content: string }) {
+ const [pos, setPos] = useState<{ x: number; y: number } | null>(null);
+ const ref = useRef<HTMLSpanElement>(null);
+
+ function show() {
+ const r = ref.current?.getBoundingClientRect();
+ if (r) setPos({ x: r.left + r.width / 2, y: r.bottom + 6 });
+ }
+
+ return (
+ <>
+ <span
+ ref={ref}
+ onMouseEnter={show}
+ onMouseLeave={() => setPos(null)}
+ className="inline-flex items-center cursor-help"
+ >
+ <HelpCircle className="h-3 w-3 text-muted-foreground/60 hover:text-muted-foreground transition-colors" />
+ </span>
+ {pos &&
+ createPortal(
+ <div
+ style={{ left: pos.x, top: pos.y, transform: "translateX(-50%)" }}
+ className="pointer-events-none fixed z-[9999] w-56 rounded-md border bg-popover px-3 py-2 text-xs text-popover-foreground shadow-md"
+ >
+ {content}
+ </div>,
+ document.body,
+ )}
+ </>
+ );
+}
+
+function ColHead({
+ children,
+ tooltip,
+ className,
+}: {
+ children: React.ReactNode;
+ tooltip?: string;
+ className?: string;
+}) {
+ return (
+ <TableHead className={className}>
+ <span className="inline-flex items-center gap-1">
+ {children}
+ {tooltip && <InfoTip content={tooltip} />}
+ </span>
+ </TableHead>
+ );
+}
+
+// ─── Plan Gate ────────────────────────────────────────────────────────────────
+
+function PlanGateOverlay() {
+ const t = useTranslations("competitors");
+ return (
+ <div className="space-y-6">
+ <div>
+ <h1 className="text-2xl font-bold tracking-tight">{t("title")}</h1>
+ <p className="text-muted-foreground">{t("description")}</p>
+ </div>
+ <Card>
+ <CardContent className="flex flex-col items-center justify-center py-16 text-center">
+ <div className="flex h-14 w-14 items-center justify-center rounded-full bg-amber-100 dark:bg-amber-900/30 mb-4">
+ <Crown className="h-7 w-7 text-amber-600 dark:text-amber-400" />
+ </div>
+ <h3 className="text-lg font-semibold">{t("upgradeTitle")}</h3>
+ <p className="text-sm text-muted-foreground mt-1 max-w-sm">
+ {t("upgradeDescription")}
+ </p>
+ <Badge variant="outline" className="mt-4">
+ <Crown className="mr-1 h-3 w-3" />
+ {t("upgradeRequiredPlan")}
+ </Badge>
+ </CardContent>
+ </Card>
+ </div>
+ );
+}
+
+// ─── No Brand ─────────────────────────────────────────────────────────────────
+
+function NoBrandSelected() {
+ const t = useTranslations("competitors");
+ return (
+ <div className="space-y-6">
+ <div>
+ <h1 className="text-2xl font-bold tracking-tight">{t("title")}</h1>
+ <p className="text-muted-foreground">{t("description")}</p>
+ </div>
+ <Card>
+ <CardContent className="flex flex-col items-center justify-center py-16 text-center">
+ <div className="flex h-14 w-14 items-center justify-center rounded-full bg-muted mb-4">
+ <AlertCircle className="h-7 w-7 text-muted-foreground" />
+ </div>
+ <h3 className="text-lg font-semibold">{t("noBrandTitle")}</h3>
+ <p className="text-sm text-muted-foreground mt-1 max-w-sm">
+ {t("noBrandDescription")}
+ </p>
+ </CardContent>
+ </Card>
+ </div>
+ );
+}
+
+// ─── Empty State ──────────────────────────────────────────────────────────────
+
+function EmptyState({ onAdd }: { onAdd: () => void }) {
+ const t = useTranslations("competitors");
+ return (
+ <Card>
+ <CardContent className="flex flex-col items-center justify-center py-16 text-center">
+ <div className="flex h-14 w-14 items-center justify-center rounded-full bg-muted mb-4">
+ <Users className="h-7 w-7 text-muted-foreground" />
+ </div>
+ <h3 className="text-lg font-semibold">{t("emptyTitle")}</h3>
+ <p className="text-sm text-muted-foreground mt-1 max-w-sm">
+ {t("emptyDescription")}
+ </p>
+ <Button className="mt-6 gap-2" onClick={onAdd}>
+ <Plus className="h-4 w-4" />
+ {t("addCompetitor")}
+ </Button>
+ </CardContent>
+ </Card>
+ );
+}
+
+// ─── Add Dialog ───────────────────────────────────────────────────────────────
+
+function AddCompetitorDialog({
+ open,
+ onOpenChange,
+ onAdd,
+}: {
+ open: boolean;
+ onOpenChange: (open: boolean) => void;
+ onAdd: (name: string, domain: string) => Promise<void>;
+}) {
+ const t = useTranslations("competitors");
+ const [name, setName] = useState("");
+ const [domain, setDomain] = useState("");
+ const [saving, setSaving] = useState(false);
+
+ function reset() {
+ setName("");
+ setDomain("");
+ }
+
+ async function handleSubmit(e: React.FormEvent) {
+ e.preventDefault();
+ if (!name.trim()) return;
+ setSaving(true);
+ try {
+ await onAdd(name.trim(), domain.trim());
+ reset();
+ onOpenChange(false);
+ } catch {
+ toast.error(t("addError"));
+ } finally {
+ setSaving(false);
+ }
+ }
+
+ return (
+ <Dialog open={open} onOpenChange={onOpenChange}>
+ <DialogContent className="sm:max-w-md">
+ <form onSubmit={handleSubmit}>
+ <DialogHeader>
+ <DialogTitle>{t("addCompetitor")}</DialogTitle>
+ <DialogDescription>{t("addDescription")}</DialogDescription>
+ </DialogHeader>
+ <div className="grid gap-4 py-4">
+ <div className="grid gap-2">
+ <Label htmlFor="comp-name">{t("name")}</Label>
+ <Input
+ id="comp-name"
+ placeholder={t("namePlaceholder")}
+ value={name}
+ onChange={(e) => setName(e.target.value)}
+ autoFocus
+ />
+ </div>
+ <div className="grid gap-2">
+ <Label htmlFor="comp-domain">{t("domain")}</Label>
+ <Input
+ id="comp-domain"
+ placeholder={t("domainPlaceholder")}
+ value={domain}
+ onChange={(e) => setDomain(e.target.value)}
+ />
+ </div>
+ </div>
+ <DialogFooter>
+ <Button
+ type="button"
+ variant="outline"
+ onClick={() => onOpenChange(false)}
+ >
+ {t("cancel")}
+ </Button>
+ <Button type="submit" disabled={saving || !name.trim()}>
+ {saving && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
+ {t("add")}
+ </Button>
+ </DialogFooter>
+ </form>
+ </DialogContent>
+ </Dialog>
+ );
+}
+
+// ─── Diff Indicator ───────────────────────────────────────────────────────────
+
+function DiffBadge({ diff }: { diff: number }) {
+ if (diff > 0) {
+ return (
+ <span className="inline-flex items-center gap-0.5 text-xs font-medium text-green-600 dark:text-green-400">
+ <ArrowUpRight className="h-3 w-3" />+{diff}
+ </span>
+ );
+ }
+ if (diff < 0) {
+ return (
+ <span className="inline-flex items-center gap-0.5 text-xs font-medium text-red-600 dark:text-red-400">
+ <ArrowDownRight className="h-3 w-3" />{diff}
+ </span>
+ );
+ }
+ return (
+ <span className="inline-flex items-center gap-0.5 text-xs font-medium text-muted-foreground">
+ <Minus className="h-3 w-3" />0
+ </span>
+ );
+}
+
+// ─── Competitor Cards (Management) ────────────────────────────────────────────
+
+function CompetitorCard({
+ competitor,
+ stats,
+ isSelected,
+ onSelect,
+ onDelete,
+ deleting,
+}: {
+ competitor: Competitor;
+ stats: { avg: number; mentions: number; citations: number } | null;
+ isSelected: boolean;
+ onSelect: () => void;
+ onDelete: () => void;
+ deleting: boolean;
+}) {
+ const t = useTranslations("competitors");
+
+ return (
+ <div
+ className={cn(
+ "group relative flex items-center gap-3 rounded-lg border p-3 transition-colors cursor-pointer hover:bg-accent/50",
+ isSelected && "border-primary bg-primary/5 ring-1 ring-primary/20",
+ )}
+ onClick={onSelect}
+ >
+ <div className="flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-muted">
+ {competitor.domain ? (
+ /* eslint-disable-next-line @next/next/no-img-element */
+ <img
+ src={getFaviconUrl(competitor.domain)}
+ alt=""
+ className="h-5 w-5 rounded-sm"
+ onError={(e) => {
+ const el = e.target as HTMLImageElement;
+ el.style.display = "none";
+ el.parentElement!.innerHTML =
+ '<svg class="h-5 w-5 text-muted-foreground" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9" /></svg>';
+ }}
+ />
+ ) : (
+ <Globe className="h-5 w-5 text-muted-foreground" />
+ )}
+ </div>
+
+ <div className="flex-1 min-w-0">
+ <div className="flex items-center gap-2">
+ <span className="text-sm font-medium truncate">{competitor.name}</span>
+ {isSelected && (
+ <Badge variant="outline" className="text-[10px] px-1.5 py-0">
+ {t("selected")}
+ </Badge>
+ )}
+ </div>
+ <span className="text-xs text-muted-foreground truncate block">
+ {competitor.domain || "—"}
+ </span>
+ </div>
+
+ <div className="flex items-center gap-3 shrink-0">
+ {stats ? (
+ <div className="text-right">
+ <div className="text-sm font-semibold tabular-nums">{stats.avg}%</div>
+ <div className="text-[10px] text-muted-foreground">
+ {stats.mentions}m · {stats.citations}c
+ </div>
+ </div>
+ ) : (
+ <div className="text-right">
+ <span className="text-xs text-muted-foreground">{t("noData")}</span>
+ </div>
+ )}
+
+ <Button
+ variant="ghost"
+ size="icon"
+ aria-label={t("delete")}
+ title={t("delete")}
+ className="h-7 w-7 opacity-0 group-hover:opacity-70 hover:opacity-100 focus-visible:opacity-100 text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-opacity"
+ onClick={(e) => {
+ e.stopPropagation();
+ onDelete();
+ }}
+ disabled={deleting}
+ >
+ {deleting ? (
+ <Loader2 className="h-3.5 w-3.5 animate-spin" />
+ ) : (
+ <Trash2 className="h-3.5 w-3.5" />
+ )}
+ </Button>
+ </div>
+ </div>
+ );
+}
+
+// ─── Head-to-Head: Platform Breakdown ─────────────────────────────────────────
+
+function PlatformBreakdown({
+ data,
+ brandName,
+ competitorName,
+}: {
+ data: HeadToHeadData;
+ brandName: string;
+ competitorName: string;
+}) {
+ const t = useTranslations("competitors");
+
+ return (
+ <Card>
+ <CardHeader className="pb-2">
+ <CardTitle className="text-sm font-medium">
+ {t("h2h.platformBreakdown")}
+ </CardTitle>
+ </CardHeader>
+ <CardContent>
+ <div className="space-y-3">
+ {data.platformRows.map((row) => {
+ const max = Math.max(row.brandScore, row.competitorScore, 1);
+ return (
+ <div key={row.platform} className="space-y-1">
+ <div className="flex items-center justify-between text-xs">
+ <span className="font-medium">{row.platform}</span>
+ <DiffBadge diff={row.diff} />
+ </div>
+ <div className="flex gap-1 items-center">
+ <div className="flex-1 flex gap-1">
+ <div
+ className="h-2 rounded-full bg-blue-500 dark:bg-blue-400 transition-all"
+ style={{ width: `${(row.brandScore / max) * 100}%` }}
+ />
+ </div>
+ <span className="text-[10px] tabular-nums w-8 text-right font-medium">
+ {row.brandScore}%
+ </span>
+ </div>
+ <div className="flex gap-1 items-center">
+ <div className="flex-1 flex gap-1">
+ <div
+ className="h-2 rounded-full bg-orange-400 dark:bg-orange-500 transition-all"
+ style={{ width: `${(row.competitorScore / max) * 100}%` }}
+ />
+ </div>
+ <span className="text-[10px] tabular-nums w-8 text-right font-medium">
+ {row.competitorScore}%
+ </span>
+ </div>
+ </div>
+ );
+ })}
+ </div>
+ <div className="flex items-center gap-4 mt-4 text-[10px] text-muted-foreground">
+ <div className="flex items-center gap-1">
+ <div className="h-2 w-2 rounded-full bg-blue-500 dark:bg-blue-400" />
+ {brandName}
+ </div>
+ <div className="flex items-center gap-1">
+ <div className="h-2 w-2 rounded-full bg-orange-400 dark:bg-orange-500" />
+ {competitorName}
+ </div>
+ </div>
+ </CardContent>
+ </Card>
+ );
+}
+
+// ─── Head-to-Head: Grouped Prompt Comparison ─────────────────────────────────
+
+interface PromptComparisonGroup {
+ promptId: string;
+ promptText: string;
+ promptCategory?: string;
+ rows: HeadToHeadData["promptRows"];
+ avgBrandScore: number;
+ avgCompetitorScore: number;
+ avgDiff: number;
+}
+
+function groupH2HByPrompt(
+ rows: HeadToHeadData["promptRows"],
+): PromptComparisonGroup[] {
+ const map = new Map<string, HeadToHeadData["promptRows"]>();
+ for (const r of rows) {
+ const arr = map.get(r.promptId) || [];
+ arr.push(r);
+ map.set(r.promptId, arr);
+ }
+ return Array.from(map.entries()).map(([promptId, items]) => {
+ const avgB = Math.round(
+ items.reduce((s, r) => s + r.brandScore, 0) / items.length,
+ );
+ const avgC = Math.round(
+ items.reduce((s, r) => s + r.competitorScore, 0) / items.length,
+ );
+ return {
+ promptId,
+ promptText: items[0].promptText,
+ promptCategory: items[0].promptCategory,
+ rows: items,
+ avgBrandScore: avgB,
+ avgCompetitorScore: avgC,
+ avgDiff: avgB - avgC,
+ };
+ });
+}
+
+interface ModelComparisonGroup {
+ key: string;
+ platform: string;
+ modelUsed: string;
+ region?: string;
+ rows: HeadToHeadPromptRow[];
+ latest: HeadToHeadPromptRow;
+ avgBrandScore: number;
+ avgCompetitorScore: number;
+ avgDiff: number;
+}
+
+function groupH2HByModel(rows: HeadToHeadPromptRow[]): ModelComparisonGroup[] {
+ const map = new Map<string, HeadToHeadPromptRow[]>();
+ for (const r of rows) {
+ const key = `${r.platform}|${r.modelUsed ?? ""}|${r.region ?? ""}`;
+ const arr = map.get(key) || [];
+ arr.push(r);
+ map.set(key, arr);
+ }
+
+ return Array.from(map.entries())
+ .map(([key, items]) => {
+ const sorted = [...items].sort(
+ (a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(),
+ );
+ const latest = sorted[0];
+ const avgB = Math.round(
+ sorted.reduce((s, r) => s + r.brandScore, 0) / sorted.length,
+ );
+ const avgC = Math.round(
+ sorted.reduce((s, r) => s + r.competitorScore, 0) / sorted.length,
+ );
+ return {
+ key,
+ platform: latest.platform,
+ modelUsed: latest.modelUsed,
+ region: latest.region,
+ rows: sorted,
+ latest,
+ avgBrandScore: avgB,
+ avgCompetitorScore: avgC,
+ avgDiff: avgB - avgC,
+ } satisfies ModelComparisonGroup;
+ })
+ .sort((a, b) => b.avgBrandScore - a.avgBrandScore);
+}
+
+function formatTimestamp(iso: string): string {
+ const d = new Date(iso);
+ return d.toLocaleDateString(undefined, {
+ month: "short",
+ day: "numeric",
+ });
+}
+
+function ModelSubGroup({
+ group,
+ expanded,
+ onToggle,
+ onViewRow,
+ brandName,
+ competitorName,
+}: {
+ group: ModelComparisonGroup;
+ expanded: boolean;
+ onToggle: () => void;
+ onViewRow: (row: HeadToHeadPromptRow) => void;
+ brandName: string;
+ competitorName: string;
+}) {
+ const t = useTranslations("competitors");
+ const hasHistory = group.rows.length > 1;
+
+ return (
+ <div className="rounded-md border bg-background/50">
+ <div
+ role="button"
+ tabIndex={0}
+ onClick={onToggle}
+ onKeyDown={(e) => {
+ if (e.key === "Enter" || e.key === " ") {
+ e.preventDefault();
+ onToggle();
+ }
+ }}
+ className={cn(
+ "flex w-full items-center gap-3 px-3 py-2 transition-colors select-none",
+ hasHistory
+ ? "hover:bg-muted/40 cursor-pointer"
+ : "cursor-default",
+ )}
+ >
+ <ChevronDown
+ className={cn(
+ "h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform",
+ !expanded && "-rotate-90",
+ !hasHistory && "opacity-0",
+ )}
+ />
+ <div className="flex-1 min-w-0 flex items-center gap-2">
+ <ModelBadge
+ model={group.modelUsed || group.platform}
+ platform={group.platform}
+ />
+ {group.region && (
+ <Badge variant="outline" className="text-[10px]">
+ {group.region}
+ </Badge>
+ )}
+ <span className="text-[10px] text-muted-foreground tabular-nums ml-1">
+ {group.rows.length} run{group.rows.length !== 1 ? "s" : ""}
+ </span>
+ </div>
+ <div className="flex items-center gap-4 shrink-0">
+ <div className="text-right">
+ <p className="text-[10px] text-muted-foreground">{t("h2h.you")}</p>
+ <p className="text-xs font-semibold tabular-nums">
+ {group.avgBrandScore}%
+ </p>
+ </div>
+ <div className="text-right">
+ <p className="text-[10px] text-muted-foreground">{t("h2h.them")}</p>
+ <p className="text-xs font-semibold tabular-nums">
+ {group.avgCompetitorScore}%
+ </p>
+ </div>
+ <div className="text-right min-w-[48px]">
+ <p className="text-[10px] text-muted-foreground">{t("h2h.diff")}</p>
+ <DiffBadge diff={group.avgDiff} />
+ </div>
+ <SentimentBadge sentiment={group.latest.sentiment} />
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-7 w-7"
+ title="View latest AI response"
+ onClick={(e) => {
+ e.stopPropagation();
+ onViewRow(group.latest);
+ }}
+ >
+ <Eye className="h-3.5 w-3.5" />
+ </Button>
+ </div>
+ </div>
+
+ {expanded && hasHistory && (
+ <div className="border-t bg-muted/20 px-3 py-2">
+ <p className="text-[10px] uppercase tracking-wide text-muted-foreground font-medium mb-1.5">
+ Previous runs
+ </p>
+ <Table>
+ <TableHeader>
+ <TableRow>
+ <TableHead className="text-[10px] h-7">Date</TableHead>
+ <TableHead className="text-[10px] h-7 text-center">
+ {brandName}
+ </TableHead>
+ <TableHead className="text-[10px] h-7 text-center">
+ {competitorName}
+ </TableHead>
+ <TableHead className="text-[10px] h-7 text-center">
+ {t("h2h.diff")}
+ </TableHead>
+ <TableHead className="text-[10px] h-7 text-center">
+ Sentiment
+ </TableHead>
+ <TableHead className="text-[10px] h-7 w-[60px]" />
+ </TableRow>
+ </TableHeader>
+ <TableBody>
+ {group.rows.map((row) => (
+ <TableRow key={row.resultId} className="hover:bg-muted/30">
+ <TableCell className="text-xs text-muted-foreground py-1.5">
+ {formatTimestamp(row.createdAt)}
+ </TableCell>
+ <TableCell className="text-center py-1.5 text-xs font-semibold tabular-nums">
+ {Math.round(row.brandScore)}%
+ </TableCell>
+ <TableCell className="text-center py-1.5 text-xs font-semibold tabular-nums">
+ {Math.round(row.competitorScore)}%
+ </TableCell>
+ <TableCell className="text-center py-1.5">
+ <DiffBadge
+ diff={Math.round(row.brandScore - row.competitorScore)}
+ />
+ </TableCell>
+ <TableCell className="text-center py-1.5">
+ <SentimentBadge sentiment={row.sentiment} />
+ </TableCell>
+ <TableCell className="text-center py-1.5">
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-6 w-6"
+ title="View AI response"
+ onClick={(e) => {
+ e.stopPropagation();
+ onViewRow(row);
+ }}
+ >
+ <Eye className="h-3 w-3" />
+ </Button>
+ </TableCell>
+ </TableRow>
+ ))}
+ </TableBody>
+ </Table>
+ </div>
+ )}
+ </div>
+ );
+}
+
+function PromptComparisonGrouped({
+ rows,
+ brandName,
+ competitorName,
+ onViewRow,
+}: {
+ rows: HeadToHeadData["promptRows"];
+ brandName: string;
+ competitorName: string;
+ onViewRow: (row: HeadToHeadPromptRow) => void;
+}) {
+ const t = useTranslations("competitors");
+ const groups = groupH2HByPrompt(rows);
+ const [expanded, setExpanded] = useState<Set<string>>(new Set());
+ const [expandedModels, setExpandedModels] = useState<Set<string>>(new Set());
+
+ const toggle = (id: string) =>
+ setExpanded((prev) => {
+ const next = new Set(prev);
+ if (next.has(id)) next.delete(id); else next.add(id);
+ return next;
+ });
+
+ const toggleModel = (id: string) =>
+ setExpandedModels((prev) => {
+ const next = new Set(prev);
+ if (next.has(id)) next.delete(id); else next.add(id);
+ return next;
+ });
+
+ if (groups.length === 0) {
+ return (
+ <div className="flex items-center justify-center py-12 text-sm text-muted-foreground">
+ {t("h2h.noPromptData")}
+ </div>
+ );
+ }
+
+ return (
+ <div className="space-y-2">
+ {groups.map((group) => {
+ const isOpen = expanded.has(group.promptId);
+ const modelGroups = groupH2HByModel(group.rows);
+ return (
+ <div
+ key={group.promptId}
+ className="rounded-lg border overflow-hidden"
+ >
+ {/* Group Header */}
+ <div
+ role="button"
+ tabIndex={0}
+ onClick={() => toggle(group.promptId)}
+ onKeyDown={(e) => {
+ if (e.key === "Enter" || e.key === " ") {
+ e.preventDefault();
+ toggle(group.promptId);
+ }
+ }}
+ className="flex w-full items-center gap-3 px-4 py-3 text-left hover:bg-muted/50 transition-colors cursor-pointer select-none"
+ >
+ <ChevronDown
+ className={cn(
+ "h-4 w-4 shrink-0 text-muted-foreground transition-transform",
+ !isOpen && "-rotate-90",
+ )}
+ />
+ <div className="flex-1 min-w-0">
+ <p className="text-sm font-medium line-clamp-1">
+ {group.promptText}
+ </p>
+ <div className="flex items-center gap-2 mt-0.5">
+ {group.promptCategory && (
+ <Badge variant="outline" className="text-[10px]">
+ {group.promptCategory}
+ </Badge>
+ )}
+ <span className="text-[11px] text-muted-foreground">
+ {modelGroups.length} platform
+ {modelGroups.length !== 1 ? "s" : ""} · {group.rows.length}{" "}
+ result{group.rows.length !== 1 ? "s" : ""}
+ </span>
+ </div>
+ </div>
+ <div className="flex items-center gap-4 shrink-0">
+ <div className="text-right">
+ <p className="text-[10px] text-muted-foreground">{t("h2h.you")}</p>
+ <p className="text-sm font-semibold tabular-nums">
+ {group.avgBrandScore}%
+ </p>
+ </div>
+ <div className="text-right">
+ <p className="text-[10px] text-muted-foreground">{t("h2h.them")}</p>
+ <p className="text-sm font-semibold tabular-nums">
+ {group.avgCompetitorScore}%
+ </p>
+ </div>
+ <div className="text-right min-w-[48px]">
+ <p className="text-[10px] text-muted-foreground">{t("h2h.diff")}</p>
+ <DiffBadge diff={group.avgDiff} />
+ </div>
+ </div>
+ </div>
+
+ {/* Platform/Model sub-groups */}
+ {isOpen && (
+ <div className="border-t px-3 py-2 space-y-1.5 bg-muted/10">
+ {modelGroups.map((mg) => {
+ const compositeKey = `${group.promptId}::${mg.key}`;
+ return (
+ <ModelSubGroup
+ key={compositeKey}
+ group={mg}
+ expanded={expandedModels.has(compositeKey)}
+ onToggle={() => toggleModel(compositeKey)}
+ onViewRow={onViewRow}
+ brandName={brandName}
+ competitorName={competitorName}
+ />
+ );
+ })}
+ </div>
+ )}
+ </div>
+ );
+ })}
+ </div>
+ );
+}
+
+// ─── Gap / Strength Cards ─────────────────────────────────────────────────────
+
+interface GapStrengthGroup {
+ promptId: string;
+ promptText: string;
+ items: HeadToHeadData["gaps"];
+ avgBrandScore: number;
+ avgCompetitorScore: number;
+ avgDiff: number;
+}
+
+function groupGapStrengthByPrompt(
+ items: HeadToHeadData["gaps"],
+): GapStrengthGroup[] {
+ const map = new Map<string, HeadToHeadData["gaps"]>();
+ for (const item of items) {
+ const arr = map.get(item.promptId) || [];
+ arr.push(item);
+ map.set(item.promptId, arr);
+ }
+ return Array.from(map.entries())
+ .map(([promptId, groupItems]) => {
+ const avgB = Math.round(
+ groupItems.reduce((s, r) => s + r.brandScore, 0) / groupItems.length,
+ );
+ const avgC = Math.round(
+ groupItems.reduce((s, r) => s + r.competitorScore, 0) / groupItems.length,
+ );
+ return {
+ promptId,
+ promptText: groupItems[0].promptText,
+ items: groupItems,
+ avgBrandScore: avgB,
+ avgCompetitorScore: avgC,
+ avgDiff: avgB - avgC,
+ };
+ })
+ .sort((a, b) => (a.avgDiff - b.avgDiff));
+}
+
+function GapStrengthList({
+ items,
+ type,
+}: {
+ items: HeadToHeadData["gaps"];
+ type: "gap" | "strength";
+}) {
+ const t = useTranslations("competitors");
+ const isGap = type === "gap";
+ const groups = groupGapStrengthByPrompt(items);
+ const [expanded, setExpanded] = useState<Set<string>>(new Set());
+
+ const toggle = (id: string) =>
+ setExpanded((prev) => {
+ const next = new Set(prev);
+ if (next.has(id)) next.delete(id); else next.add(id);
+ return next;
+ });
+
+ if (groups.length === 0) {
+ return (
+ <div className="flex items-center justify-center py-8 text-sm text-muted-foreground">
+ {isGap ? t("h2h.noGaps") : t("h2h.noStrengths")}
+ </div>
+ );
+ }
+
+ // For strengths, reverse so best performers appear first
+ const sorted = isGap ? groups : [...groups].reverse();
+
+ return (
+ <div className="space-y-2">
+ {sorted.map((group, i) => {
+ const isOpen = expanded.has(group.promptId);
+ const hasMultiple = group.items.length > 1;
+
+ return (
+ <div
+ key={group.promptId}
+ className={cn(
+ "rounded-lg border overflow-hidden",
+ isGap
+ ? "border-red-200/50 bg-red-50/50 dark:border-red-900/30 dark:bg-red-950/20"
+ : "border-green-200/50 bg-green-50/50 dark:border-green-900/30 dark:bg-green-950/20",
+ )}
+ >
+ {/* Group Header */}
+ <div
+ role={hasMultiple ? "button" : undefined}
+ tabIndex={hasMultiple ? 0 : undefined}
+ onClick={() => hasMultiple && toggle(group.promptId)}
+ onKeyDown={(e) => {
+ if (hasMultiple && (e.key === "Enter" || e.key === " ")) {
+ e.preventDefault();
+ toggle(group.promptId);
+ }
+ }}
+ className={cn(
+ "flex items-start gap-3 p-3",
+ hasMultiple && "cursor-pointer hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors select-none",
+ )}
+ >
+ <div
+ className={cn(
+ "flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs font-bold mt-0.5",
+ isGap
+ ? "bg-red-100 text-red-600 dark:bg-red-900/40 dark:text-red-400"
+ : "bg-green-100 text-green-600 dark:bg-green-900/40 dark:text-green-400",
+ )}
+ >
+ {i + 1}
+ </div>
+ <div className="flex-1 min-w-0">
+ <div className="flex items-center gap-2">
+ {hasMultiple && (
+ <ChevronDown
+ className={cn(
+ "h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform",
+ !isOpen && "-rotate-90",
+ )}
+ />
+ )}
+ <p className="text-sm line-clamp-2">{group.promptText}</p>
+ </div>
+ <div className="flex items-center gap-3 mt-1 text-xs text-muted-foreground">
+ <span>{t("h2h.you")}: {group.avgBrandScore}%</span>
+ <span>{t("h2h.them")}: {group.avgCompetitorScore}%</span>
+ {hasMultiple ? (
+ <span>{group.items.length} models</span>
+ ) : (group.items[0].modelUsed || group.items[0].platform) ? (
+ <ModelBadge model={group.items[0].modelUsed || group.items[0].platform} platform={group.items[0].platform} />
+ ) : (
+ <span className="text-xs text-muted-foreground">—</span>
+ )}
+ {!hasMultiple && group.items[0].createdAt && (
+ <span className="text-muted-foreground">
+ {new Date(group.items[0].createdAt).toLocaleDateString(undefined, { day: "numeric", month: "short", year: "numeric" })}
+ </span>
+ )}
+ </div>
+ </div>
+ <div className="shrink-0">
+ <DiffBadge diff={group.avgDiff} />
+ </div>
+ </div>
+
+ {/* Expanded: per-model breakdown */}
+ {isOpen && hasMultiple && (
+ <div className="border-t px-3 pb-3 pt-2 space-y-1.5">
+ {group.items.map((item, j) => (
+ <div
+ key={`${item.promptId}-${item.modelUsed}-${j}`}
+ className={cn(
+ "flex items-center gap-3 rounded-md px-3 py-2 text-xs",
+ isGap
+ ? "bg-red-100/50 dark:bg-red-900/20"
+ : "bg-green-100/50 dark:bg-green-900/20",
+ )}
+ >
+ <div className="flex-1 min-w-0">
+ {(item.modelUsed || item.platform) ? (
+ <ModelBadge model={item.modelUsed || item.platform} platform={item.platform} />
+ ) : (
+ <span className="text-xs text-muted-foreground">—</span>
+ )}
+ </div>
+ {item.region && (
+ <Badge variant="outline" className="text-[10px]">
+ {item.region}
+ </Badge>
+ )}
+ <span className="tabular-nums text-muted-foreground">
+ {t("h2h.you")}: {Math.round(item.brandScore)}%
+ </span>
+ <span className="tabular-nums text-muted-foreground">
+ {t("h2h.them")}: {Math.round(item.competitorScore)}%
+ </span>
+ {item.createdAt && (
+ <span className="text-muted-foreground whitespace-nowrap">
+ {new Date(item.createdAt).toLocaleDateString(undefined, { day: "numeric", month: "short" })}
+ </span>
+ )}
+ <DiffBadge diff={Math.round(item.diff)} />
+ </div>
+ ))}
+ </div>
+ )}
+ </div>
+ );
+ })}
+ </div>
+ );
+}
+
+// ─── Head-to-Head Section ─────────────────────────────────────────────────────
+
+function HeadToHeadSection({
+ data,
+ brandName,
+ competitorName,
+}: {
+ data: HeadToHeadData;
+ brandName: string;
+ competitorName: string;
+}) {
+ const t = useTranslations("competitors");
+ const router = useRouter();
+ const overallDiff = data.brandAvg - data.competitorAvg;
+
+ return (
+ <div className="space-y-4">
+ {/* Summary Stats */}
+ <div className="grid grid-cols-1 gap-3 sm:grid-cols-3">
+ <Card>
+ <CardContent className="pt-5 pb-4">
+ <div className="flex items-center gap-2 text-xs text-muted-foreground mb-1">
+ <Target className="h-3.5 w-3.5" />
+ {t("h2h.yourAvg")}
+ </div>
+ <div className="text-2xl font-bold tabular-nums">{data.brandAvg}%</div>
+ </CardContent>
+ </Card>
+ <Card>
+ <CardContent className="pt-5 pb-4">
+ <div className="flex items-center gap-2 text-xs text-muted-foreground mb-1">
+ <Swords className="h-3.5 w-3.5" />
+ {t("h2h.theirAvg")}
+ </div>
+ <div className="text-2xl font-bold tabular-nums">{data.competitorAvg}%</div>
+ </CardContent>
+ </Card>
+ <Card>
+ <CardContent className="pt-5 pb-4">
+ <div className="flex items-center gap-2 text-xs text-muted-foreground mb-1">
+ {overallDiff >= 0 ? (
+ <TrendingUp className="h-3.5 w-3.5" />
+ ) : (
+ <TrendingDown className="h-3.5 w-3.5" />
+ )}
+ {t("h2h.overallDiff")}
+ </div>
+ <div
+ className={cn(
+ "text-2xl font-bold tabular-nums",
+ overallDiff > 0 && "text-green-600 dark:text-green-400",
+ overallDiff < 0 && "text-red-600 dark:text-red-400",
+ )}
+ >
+ {overallDiff > 0 ? "+" : ""}{overallDiff}%
+ </div>
+ </CardContent>
+ </Card>
+ </div>
+
+ <div className="grid grid-cols-1 gap-4 lg:grid-cols-3">
+ {/* Platform Breakdown */}
+ <PlatformBreakdown
+ data={data}
+ brandName={brandName}
+ competitorName={competitorName}
+ />
+
+ {/* Gaps & Strengths */}
+ <Card className="lg:col-span-2">
+ <CardContent className="pt-4">
+ <Tabs defaultValue="gaps">
+ <TabsList className="mb-3">
+ <TabsTrigger value="gaps" className="gap-1.5 text-xs">
+ <ShieldAlert className="h-3.5 w-3.5" />
+ {t("h2h.gaps")} ({data.gaps.length})
+ </TabsTrigger>
+ <TabsTrigger value="strengths" className="gap-1.5 text-xs">
+ <TrendingUp className="h-3.5 w-3.5" />
+ {t("h2h.strengths")} ({data.strengths.length})
+ </TabsTrigger>
+ </TabsList>
+ <TabsContent value="gaps">
+ <GapStrengthList items={data.gaps} type="gap" />
+ </TabsContent>
+ <TabsContent value="strengths">
+ <GapStrengthList items={data.strengths} type="strength" />
+ </TabsContent>
+ </Tabs>
+ </CardContent>
+ </Card>
+ </div>
+
+ {/* Grouped Prompt-by-Prompt Comparison */}
+ <Card>
+ <CardHeader className="pb-2">
+ <CardTitle className="text-sm font-medium">
+ {t("h2h.promptByPrompt")}
+ </CardTitle>
+ <p className="text-xs text-muted-foreground">{t("h2h.promptByPromptDesc")}</p>
+ </CardHeader>
+ <CardContent className="pt-0">
+ <PromptComparisonGrouped
+ rows={data.promptRows}
+ brandName={brandName}
+ competitorName={competitorName}
+ onViewRow={(row) => router.push(`/dashboard/insights/${row.resultId}`)}
+ />
+ </CardContent>
+ </Card>
+ </div>
+ );
+}
+
+// ─── Main Page ────────────────────────────────────────────────────────────────
+
+export default function CompetitorsPage() {
+ const t = useTranslations("competitors");
+ const { canUse, isCloud } = useFeatureGate();
+ const brand = useBrandStore((s) => s.getActiveBrand());
+
+ const [competitors, setCompetitors] = useState<Competitor[]>([]);
+ const [comparisonData, setComparisonData] =
+ useState<CompetitorComparisonData | null>(null);
+ const [loading, setLoading] = useState(true);
+ const [dialogOpen, setDialogOpen] = useState(false);
+ const [deleting, setDeleting] = useState<string | null>(null);
+ const [confirmDelete, setConfirmDelete] = useState<Competitor | null>(null);
+
+ // Head-to-head
+ const [selectedCompetitorId, setSelectedCompetitorId] = useState<string | null>(null);
+ const [h2hData, setH2hData] = useState<HeadToHeadData | null>(null);
+ const [h2hLoading, setH2hLoading] = useState(false);
+
+ const loadData = useCallback(async () => {
+ if (!brand) return;
+ setLoading(true);
+ try {
+ const [comps, comparison] = await Promise.all([
+ getCompetitors(brand.id),
+ getCompetitorComparison(brand.id),
+ ]);
+ setCompetitors(comps);
+ setComparisonData(comparison.brands.length > 1 ? comparison : null);
+ } catch {
+ toast.error(t("loadError"));
+ } finally {
+ setLoading(false);
+ }
+ }, [brand, t]);
+
+ useEffect(() => {
+ loadData();
+ }, [loadData]);
+
+ // Load head-to-head when a competitor is selected
+ const loadH2H = useCallback(
+ async (competitorId: string) => {
+ if (!brand) return;
+ setH2hLoading(true);
+ setH2hData(null);
+ try {
+ const data = await getHeadToHeadComparison(brand.id, competitorId);
+ setH2hData(data);
+ } catch {
+ toast.error(t("h2h.loadError"));
+ } finally {
+ setH2hLoading(false);
+ }
+ },
+ [brand, t],
+ );
+
+ useEffect(() => {
+ if (selectedCompetitorId) {
+ loadH2H(selectedCompetitorId);
+ } else {
+ setH2hData(null);
+ }
+ }, [selectedCompetitorId, loadH2H]);
+
+ if (isCloud && !canUse("competitor_tracking")) {
+ return <PlanGateOverlay />;
+ }
+
+ if (!brand) return <NoBrandSelected />;
+
+ // Build score map from comparison data
+ const scoreMap = new Map<string, { avg: number; mentions: number; citations: number }>();
+ if (comparisonData) {
+ for (const entry of comparisonData.brands) {
+ if (!entry.isOwnBrand) {
+ scoreMap.set(entry.name, {
+ avg: entry.avgVisibilityScore,
+ mentions: entry.totalMentions,
+ citations: entry.totalCitations,
+ });
+ }
+ }
+ }
+
+ async function handleAdd(name: string, domain: string) {
+ if (!brand) return;
+ await addCompetitor(brand.id, { name, domain });
+ toast.success(t("addSuccess"));
+ loadData();
+ }
+
+ async function handleDelete(id: string) {
+ setDeleting(id);
+ try {
+ await deleteCompetitor(id);
+ toast.success(t("deleteSuccess"));
+ if (selectedCompetitorId === id) {
+ setSelectedCompetitorId(null);
+ }
+ loadData();
+ } catch {
+ toast.error(t("deleteError"));
+ } finally {
+ setDeleting(null);
+ }
+ }
+
+ const selectedCompetitor = competitors.find((c) => c.id === selectedCompetitorId);
+
+ if (loading) {
+ return (
+ <div className="space-y-6">
+ <div>
+ <h1 className="text-2xl font-bold tracking-tight">{t("title")}</h1>
+ <p className="text-muted-foreground">{t("description")}</p>
+ </div>
+ <div className="flex items-center justify-center py-20">
+ <Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
+ </div>
+ </div>
+ );
+ }
+
+ return (
+ <div className="space-y-6">
+ {/* Header */}
+ <div className="flex items-center justify-between">
+ <div>
+ <h1 className="text-2xl font-bold tracking-tight">{t("title")}</h1>
+ <p className="text-muted-foreground">{t("description")}</p>
+ </div>
+ <Button className="gap-2" onClick={() => setDialogOpen(true)}>
+ <Plus className="h-4 w-4" />
+ {t("addCompetitor")}
+ </Button>
+ </div>
+
+ {competitors.length === 0 ? (
+ <EmptyState onAdd={() => setDialogOpen(true)} />
+ ) : (
+ <>
+ {/* Competitor List */}
+ <Card>
+ <CardHeader className="pb-3">
+ <CardTitle className="flex items-center gap-2 text-base">
+ <Users className="h-4 w-4" />
+ {t("trackedCompetitors")}
+ <Badge variant="secondary" className="text-xs">
+ {competitors.length}
+ </Badge>
+ </CardTitle>
+ <p className="text-xs text-muted-foreground">{t("selectToCompare")}</p>
+ </CardHeader>
+ <CardContent>
+ <div className="grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3">
+ {competitors.map((comp) => (
+ <CompetitorCard
+ key={comp.id}
+ competitor={comp}
+ stats={scoreMap.get(comp.name) ?? null}
+ isSelected={selectedCompetitorId === comp.id}
+ onSelect={() =>
+ setSelectedCompetitorId(
+ selectedCompetitorId === comp.id ? null : comp.id,
+ )
+ }
+ onDelete={() => setConfirmDelete(comp)}
+ deleting={deleting === comp.id}
+ />
+ ))}
+ </div>
+ </CardContent>
+ </Card>
+
+ {/* Head-to-Head Section */}
+ {selectedCompetitorId && (
+ <>
+ <div className="flex items-center gap-2 pt-2">
+ <Swords className="h-5 w-5 text-primary" />
+ <h2 className="text-lg font-semibold">
+ {t("h2h.title", {
+ brand: brand.name,
+ competitor: selectedCompetitor?.name ?? "",
+ })}
+ </h2>
+ </div>
+
+ {h2hLoading ? (
+ <div className="flex items-center justify-center py-16">
+ <Loader2 className="h-6 w-6 animate-spin text-muted-foreground" />
+ </div>
+ ) : h2hData && h2hData.promptRows.length > 0 ? (
+ <HeadToHeadSection
+ data={h2hData}
+ brandName={brand.name}
+ competitorName={selectedCompetitor?.name ?? ""}
+ />
+ ) : (
+ <Card>
+ <CardContent className="flex flex-col items-center justify-center py-12 text-center">
+ <Swords className="h-8 w-8 text-muted-foreground mb-3" />
+ <h3 className="text-sm font-semibold">{t("h2h.noDataTitle")}</h3>
+ <p className="text-xs text-muted-foreground mt-1 max-w-sm">
+ {t("h2h.noDataDescription")}
+ </p>
+ </CardContent>
+ </Card>
+ )}
+ </>
+ )}
+ </>
+ )}
+
+ <AddCompetitorDialog
+ open={dialogOpen}
+ onOpenChange={setDialogOpen}
+ onAdd={handleAdd}
+ />
+
+ <ConfirmDeleteCompetitorDialog
+ competitor={confirmDelete}
+ onOpenChange={(open) => {
+ if (!open) setConfirmDelete(null);
+ }}
+ onConfirm={async () => {
+ if (!confirmDelete) return;
+ const id = confirmDelete.id;
+ setConfirmDelete(null);
+ await handleDelete(id);
+ }}
+ deleting={
+ confirmDelete !== null && deleting === confirmDelete.id
+ }
+ />
+ </div>
+ );
+}
+
+function ConfirmDeleteCompetitorDialog({
+ competitor,
+ onOpenChange,
+ onConfirm,
+ deleting,
+}: {
+ competitor: Competitor | null;
+ onOpenChange: (open: boolean) => void;
+ onConfirm: () => void;
+ deleting: boolean;
+}) {
+ const t = useTranslations("competitors");
+ const name = competitor?.name ?? "";
+
+ return (
+ <Dialog open={competitor !== null} onOpenChange={onOpenChange}>
+ <DialogContent className="sm:max-w-md">
+ <DialogHeader>
+ <DialogTitle className="flex items-center gap-2">
+ <AlertCircle className="h-5 w-5 text-destructive" />
+ {t("confirmDeleteTitle", { name })}
+ </DialogTitle>
+ <DialogDescription>
+ {t("confirmDeleteDescription", { name })}
+ </DialogDescription>
+ </DialogHeader>
+ <DialogFooter className="gap-2 sm:gap-2">
+ <Button
+ type="button"
+ variant="outline"
+ onClick={() => onOpenChange(false)}
+ disabled={deleting}
+ >
+ {t("cancel")}
+ </Button>
+ <Button
+ type="button"
+ onClick={onConfirm}
+ disabled={deleting}
+ className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
+ >
+ {deleting && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
+ <Trash2 className="mr-1.5 h-4 w-4" />
+ {t("confirmDeleteAction")}
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/content/[id]/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/content/[id]/page.tsx
new file mode 100644
index 000000000..cd2900414
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/content/[id]/page.tsx
@@ -0,0 +1,450 @@
+"use client";
+
+import { useState, useEffect } from "react";
+import { useTranslations } from "next-intl";
+import { useParams } from "next/navigation";
+import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
+import { Badge } from "@/components/ui/badge";
+import { Button } from "@/components/ui/button";
+import {
+ ArrowLeft,
+ Send,
+ Loader2,
+ TrendingUp,
+ Eye,
+ Users,
+ Search,
+ Tag,
+ Clock,
+ X,
+ Sparkles,
+ FileText,
+ Target,
+ ListOrdered,
+} from "lucide-react";
+import { cn } from "@/lib/utils";
+import { Link } from "@/i18n/navigation";
+import {
+ getOpportunity,
+ updateOpportunityStatus,
+ sendToWebhook,
+ generateBrief,
+} from "@/lib/actions/content";
+import type { ContentBrief, ContentOpportunity } from "@/types";
+import { toast } from "sonner";
+
+const IMPACT_COLORS: Record<string, string> = {
+ high: "border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400",
+ medium: "border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400",
+ low: "border-slate-500/30 bg-slate-500/10 text-slate-600 dark:text-slate-400",
+};
+
+const STATUS_COLORS: Record<string, string> = {
+ new: "border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400",
+ sent: "border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",
+ in_progress: "border-violet-500/30 bg-violet-500/10 text-violet-600 dark:text-violet-400",
+ done: "border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400",
+ dismissed: "border-zinc-500/30 bg-zinc-500/10 text-zinc-500 dark:text-zinc-400",
+};
+
+const INTENT_LABELS: Record<string, string> = {
+ comparison: "Comparison",
+ "how-to": "How-to",
+ "what-is": "What is",
+ "best-top": "Best / Top",
+ "vs-review": "vs. / Review",
+ recommendation: "Recommendation",
+ "problem-solving": "Problem Solving",
+ other: "Other",
+};
+
+function StatCard({
+ icon: Icon,
+ label,
+ value,
+ className,
+}: {
+ icon: React.ElementType;
+ label: string;
+ value: React.ReactNode;
+ className?: string;
+}) {
+ return (
+ <div className={cn("flex items-center gap-3 rounded-lg border p-3", className)}>
+ <Icon className="h-4 w-4 text-muted-foreground shrink-0" />
+ <div>
+ <p className="text-xs text-muted-foreground">{label}</p>
+ <p className="text-sm font-medium">{value}</p>
+ </div>
+ </div>
+ );
+}
+
+export default function ContentDetailPage() {
+ const t = useTranslations("content");
+ const params = useParams();
+ const id = params.id as string;
+
+ const [opportunity, setOpportunity] = useState<ContentOpportunity | null>(null);
+ const [loading, setLoading] = useState(true);
+ const [sending, setSending] = useState(false);
+ const [generatingBrief, setGeneratingBrief] = useState(false);
+ const [brief, setBrief] = useState<ContentBrief | null>(null);
+
+ useEffect(() => {
+ setLoading(true);
+ getOpportunity(id)
+ .then((opp) => {
+ setOpportunity(opp);
+ if (opp.brief) setBrief(opp.brief);
+ })
+ .catch((err) => {
+ console.error("Failed to load opportunity:", err);
+ toast.error("Failed to load opportunity");
+ })
+ .finally(() => setLoading(false));
+ }, [id]);
+
+ const handleSend = async () => {
+ setSending(true);
+ try {
+ await sendToWebhook(id);
+ toast.success("Sent to workflow!");
+ const updated = await getOpportunity(id);
+ setOpportunity(updated);
+ } catch (err) {
+ console.error("Send failed:", err);
+ toast.error(err instanceof Error ? err.message : "Failed to send");
+ } finally {
+ setSending(false);
+ }
+ };
+
+ const handleDismiss = async () => {
+ try {
+ await updateOpportunityStatus(id, "dismissed");
+ toast.success("Opportunity dismissed");
+ const updated = await getOpportunity(id);
+ setOpportunity(updated);
+ } catch {
+ toast.error("Failed to dismiss");
+ }
+ };
+
+ const handleGenerateBrief = async () => {
+ setGeneratingBrief(true);
+ try {
+ const result = await generateBrief(id);
+ setBrief(result);
+ toast.success("Content brief generated!");
+ } catch (err) {
+ console.error("Brief generation failed:", err);
+ toast.error(err instanceof Error ? err.message : "Failed to generate brief");
+ } finally {
+ setGeneratingBrief(false);
+ }
+ };
+
+ if (loading) {
+ return (
+ <div className="flex items-center justify-center min-h-[400px]">
+ <Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
+ </div>
+ );
+ }
+
+ if (!opportunity) {
+ return (
+ <div className="flex items-center justify-center min-h-[400px]">
+ <p className="text-muted-foreground">Opportunity not found.</p>
+ </div>
+ );
+ }
+
+ const sd = opportunity.sourceData;
+
+ return (
+ <div className="space-y-6">
+ <div className="flex items-center gap-4">
+ <Link href="/dashboard/content">
+ <Button variant="ghost" size="icon">
+ <ArrowLeft className="h-4 w-4" />
+ </Button>
+ </Link>
+ <div className="flex-1">
+ <h1 className="text-xl font-bold tracking-tight">{opportunity.title}</h1>
+ {opportunity.description && (
+ <p className="text-sm text-muted-foreground mt-1">
+ {opportunity.description}
+ </p>
+ )}
+ </div>
+ <div className="flex items-center gap-2">
+ {opportunity.status === "new" && (
+ <>
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={handleDismiss}
+ className="gap-2 text-muted-foreground"
+ >
+ <X className="h-4 w-4" />
+ {t("dismiss")}
+ </Button>
+ <Button
+ size="sm"
+ onClick={handleSend}
+ disabled={sending}
+ className="gap-2"
+ >
+ {sending ? (
+ <Loader2 className="h-4 w-4 animate-spin" />
+ ) : (
+ <Send className="h-4 w-4" />
+ )}
+ {sending ? t("sending") : t("sendToWorkflow")}
+ </Button>
+ </>
+ )}
+ </div>
+ </div>
+
+ <div className="flex items-center gap-2">
+ <Badge variant="outline" className="text-xs">
+ {t(`type.${opportunity.type}` as "type.owned" | "type.earned")}
+ </Badge>
+ <Badge
+ variant="outline"
+ className={cn("text-xs", IMPACT_COLORS[opportunity.impact])}
+ >
+ {t(`impact.${opportunity.impact}` as "impact.high" | "impact.medium" | "impact.low")}
+ </Badge>
+ <Badge
+ variant="outline"
+ className={cn("text-xs", STATUS_COLORS[opportunity.status])}
+ >
+ {t(`status.${opportunity.status}` as `status.${typeof opportunity.status}`)}
+ </Badge>
+ <Badge variant="outline" className="text-xs tabular-nums">
+ Score: {Math.round(opportunity.opportunityScore)}
+ </Badge>
+ <span className="text-xs text-muted-foreground ml-auto flex items-center gap-1.5">
+ <Clock className="h-3.5 w-3.5" />
+ {new Date(opportunity.createdAt).toLocaleDateString(undefined, {
+ day: "numeric",
+ month: "short",
+ year: "numeric",
+ })}
+ </span>
+ </div>
+
+ <div className="grid grid-cols-1 gap-4 lg:grid-cols-2">
+ <Card>
+ <CardHeader className="pb-2">
+ <CardTitle className="text-sm font-medium">
+ {t("detail.sourceData")}
+ </CardTitle>
+ </CardHeader>
+ <CardContent className="space-y-3">
+ {sd.promptText && (
+ <StatCard
+ icon={Search}
+ label={t("detail.relatedPrompt")}
+ value={sd.promptText}
+ />
+ )}
+
+ <div className="grid grid-cols-2 gap-3">
+ {sd.estAiVolume !== undefined && (
+ <StatCard
+ icon={TrendingUp}
+ label={t("detail.estAiVolume")}
+ value={`~${sd.estAiVolume.toLocaleString()}/mo`}
+ />
+ )}
+ {sd.visibilityScore !== undefined && (
+ <StatCard
+ icon={Eye}
+ label={t("detail.visibility")}
+ value={`${Math.round(sd.visibilityScore)}%`}
+ />
+ )}
+ {sd.competitorGap !== undefined && (
+ <StatCard
+ icon={Users}
+ label={t("detail.competitorGap")}
+ value={`${sd.competitorGap > 0 ? "+" : ""}${Math.round(sd.competitorGap)}%`}
+ />
+ )}
+ {sd.intent && (
+ <StatCard
+ icon={Tag}
+ label={t("detail.intent")}
+ value={INTENT_LABELS[sd.intent] || sd.intent}
+ />
+ )}
+ </div>
+
+ {sd.keywords && sd.keywords.length > 0 && (
+ <div>
+ <p className="text-xs text-muted-foreground mb-1.5">
+ {t("detail.keywords")}
+ </p>
+ <div className="flex flex-wrap gap-1">
+ {sd.keywords.map((kw) => (
+ <Badge key={kw} variant="outline" className="text-xs">
+ {kw}
+ </Badge>
+ ))}
+ </div>
+ </div>
+ )}
+
+ {sd.competitorsCited && sd.competitorsCited.length > 0 && (
+ <div>
+ <p className="text-xs text-muted-foreground mb-1.5">
+ {t("detail.competitorsCited")}
+ </p>
+ <div className="flex flex-wrap gap-1">
+ {sd.competitorsCited.map((comp) => (
+ <Badge
+ key={comp}
+ variant="outline"
+ className="text-xs border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400"
+ >
+ {comp}
+ </Badge>
+ ))}
+ </div>
+ </div>
+ )}
+ </CardContent>
+ </Card>
+
+ {brief ? (
+ <Card>
+ <CardHeader className="pb-3">
+ <div className="flex items-center gap-2">
+ <FileText className="h-4 w-4 text-primary" />
+ <CardTitle className="text-sm font-medium">
+ Content Brief
+ </CardTitle>
+ </div>
+ </CardHeader>
+ <CardContent className="space-y-4">
+ <div>
+ <h3 className="text-base font-semibold">
+ {brief.suggestedTitle}
+ </h3>
+ <div className="flex items-center gap-2 mt-1.5">
+ <Badge variant="outline" className="text-xs">
+ {brief.contentType.replace(/-/g, " ")}
+ </Badge>
+ <Badge variant="outline" className="text-xs tabular-nums">
+ ~{brief.targetWordCount.toLocaleString()} words
+ </Badge>
+ </div>
+ </div>
+
+ <div>
+ <div className="flex items-center gap-2 mb-1.5">
+ <Target className="h-3.5 w-3.5 text-muted-foreground" />
+ <p className="text-xs font-medium">Keywords</p>
+ </div>
+ <div className="flex flex-wrap gap-1">
+ {brief.targetKeywords.map((kw) => (
+ <Badge
+ key={kw}
+ variant="outline"
+ className="text-xs border-primary/30 bg-primary/5"
+ >
+ {kw}
+ </Badge>
+ ))}
+ </div>
+ </div>
+
+ <div className="rounded-lg border border-primary/20 bg-primary/5 p-2.5">
+ <p className="text-xs text-muted-foreground mb-0.5">CTA</p>
+ <p className="text-xs font-medium">{brief.callToAction}</p>
+ </div>
+ </CardContent>
+ </Card>
+ ) : (
+ <Card>
+ <CardContent className="flex flex-col items-center justify-center py-10 text-center">
+ <Sparkles className="h-10 w-10 text-muted-foreground/40 mb-3" />
+ <h3 className="text-sm font-medium mb-1">
+ No Content Brief Yet
+ </h3>
+ <p className="text-xs text-muted-foreground mb-4 max-w-sm">
+ Generate an AI-powered content brief with a suggested title,
+ outline, target keywords, and competitor insights.
+ </p>
+ <Button
+ onClick={handleGenerateBrief}
+ disabled={generatingBrief}
+ className="gap-2"
+ >
+ {generatingBrief ? (
+ <Loader2 className="h-4 w-4 animate-spin" />
+ ) : (
+ <Sparkles className="h-4 w-4" />
+ )}
+ {generatingBrief ? "Generating..." : "Generate Content Brief"}
+ </Button>
+ </CardContent>
+ </Card>
+ )}
+ </div>
+
+ {/* Full Brief Detail (shown when brief exists) */}
+ {brief && (
+ <Card>
+ <CardHeader className="pb-3">
+ <div className="flex items-center gap-2">
+ <ListOrdered className="h-4 w-4 text-primary" />
+ <CardTitle className="text-sm font-medium">
+ Brief Outline
+ </CardTitle>
+ </div>
+ </CardHeader>
+ <CardContent className="space-y-5">
+ <div className="space-y-3">
+ {brief.outline.map((section, idx) => (
+ <div
+ key={idx}
+ className="rounded-lg border bg-muted/30 p-3"
+ >
+ <p className="text-sm font-medium mb-1.5">
+ {idx + 1}. {section.heading}
+ </p>
+ <ul className="space-y-1 ml-4">
+ {section.keyPoints.map((point, pIdx) => (
+ <li
+ key={pIdx}
+ className="text-xs text-muted-foreground list-disc"
+ >
+ {point}
+ </li>
+ ))}
+ </ul>
+ </div>
+ ))}
+ </div>
+
+ <div>
+ <div className="flex items-center gap-2 mb-2">
+ <Users className="h-4 w-4 text-muted-foreground" />
+ <p className="text-sm font-medium">Competitor Insights</p>
+ </div>
+ <p className="text-sm text-muted-foreground leading-relaxed">
+ {brief.competitorInsights}
+ </p>
+ </div>
+ </CardContent>
+ </Card>
+ )}
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/content/_webhook-settings.tsx b/web/src/app/[locale]/(dashboard)/dashboard/content/_webhook-settings.tsx
new file mode 100644
index 000000000..895ac90cb
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/content/_webhook-settings.tsx
@@ -0,0 +1,211 @@
+"use client";
+
+import { useState, useEffect } from "react";
+import { useTranslations } from "next-intl";
+import {
+ Dialog,
+ DialogContent,
+ DialogHeader,
+ DialogTitle,
+ DialogDescription,
+} from "@/components/ui/dialog";
+import { Button } from "@/components/ui/button";
+import { Input } from "@/components/ui/input";
+import { Label } from "@/components/ui/label";
+import { Loader2, CheckCircle2, XCircle } from "lucide-react";
+import {
+ getWebhookConfig,
+ saveWebhookConfig,
+ testWebhook,
+} from "@/lib/actions/content";
+import { toast } from "sonner";
+
+interface WebhookSettingsDialogProps {
+ open: boolean;
+ onOpenChange: (open: boolean) => void;
+ brandId: string;
+}
+
+export function WebhookSettingsDialog({
+ open,
+ onOpenChange,
+ brandId,
+}: WebhookSettingsDialogProps) {
+ const t = useTranslations("content.webhook");
+
+ const [url, setUrl] = useState("");
+ const [secret, setSecret] = useState("");
+ const [isActive, setIsActive] = useState(true);
+ const [loading, setLoading] = useState(false);
+ const [saving, setSaving] = useState(false);
+ const [testing, setTesting] = useState(false);
+ const [testResult, setTestResult] = useState<{
+ success: boolean;
+ message: string;
+ } | null>(null);
+
+ useEffect(() => {
+ if (open && brandId) {
+ setLoading(true);
+ setTestResult(null);
+ getWebhookConfig(brandId)
+ .then((config) => {
+ if (config) {
+ setUrl(config.webhookUrl);
+ setSecret(config.webhookSecret || "");
+ setIsActive(config.isActive);
+ }
+ })
+ .catch(console.error)
+ .finally(() => setLoading(false));
+ }
+ }, [open, brandId]);
+
+ const handleSave = async () => {
+ if (!url.trim()) {
+ toast.error("Webhook URL is required");
+ return;
+ }
+ setSaving(true);
+ try {
+ await saveWebhookConfig(brandId, {
+ webhookUrl: url.trim(),
+ webhookSecret: secret.trim() || undefined,
+ isActive,
+ });
+ toast.success(t("saved"));
+ onOpenChange(false);
+ } catch (err) {
+ console.error("Save webhook failed:", err);
+ toast.error("Failed to save webhook config");
+ } finally {
+ setSaving(false);
+ }
+ };
+
+ const handleTest = async () => {
+ if (!url.trim()) {
+ toast.error("Enter a webhook URL first");
+ return;
+ }
+ setTesting(true);
+ setTestResult(null);
+ try {
+ const result = await testWebhook(url.trim(), secret.trim() || undefined);
+ setTestResult({
+ success: result.success,
+ message: result.success
+ ? t("testSuccess")
+ : result.error || `HTTP ${result.status}`,
+ });
+ } catch (err) {
+ setTestResult({
+ success: false,
+ message: err instanceof Error ? err.message : "Test failed",
+ });
+ } finally {
+ setTesting(false);
+ }
+ };
+
+ return (
+ <Dialog open={open} onOpenChange={onOpenChange}>
+ <DialogContent className="sm:max-w-md">
+ <DialogHeader>
+ <DialogTitle>{t("title")}</DialogTitle>
+ <DialogDescription>{t("description")}</DialogDescription>
+ </DialogHeader>
+
+ {loading ? (
+ <div className="flex justify-center py-8">
+ <Loader2 className="h-6 w-6 animate-spin text-muted-foreground" />
+ </div>
+ ) : (
+ <div className="space-y-4">
+ <div className="space-y-2">
+ <Label htmlFor="webhook-url">{t("url")}</Label>
+ <Input
+ id="webhook-url"
+ type="url"
+ placeholder={t("urlPlaceholder")}
+ value={url}
+ onChange={(e) => setUrl(e.target.value)}
+ />
+ </div>
+
+ <div className="space-y-2">
+ <Label htmlFor="webhook-secret">{t("secret")}</Label>
+ <Input
+ id="webhook-secret"
+ type="password"
+ placeholder={t("secretPlaceholder")}
+ value={secret}
+ onChange={(e) => setSecret(e.target.value)}
+ />
+ </div>
+
+ <div className="flex items-center gap-2">
+ <button
+ type="button"
+ role="switch"
+ aria-checked={isActive}
+ onClick={() => setIsActive(!isActive)}
+ className={`relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors ${
+ isActive ? "bg-primary" : "bg-muted"
+ }`}
+ >
+ <span
+ className={`pointer-events-none block h-3.5 w-3.5 rounded-full bg-background shadow-lg transition-transform ${
+ isActive ? "translate-x-4" : "translate-x-0.5"
+ }`}
+ />
+ </button>
+ <span className="text-sm">
+ {isActive ? t("active") : t("inactive")}
+ </span>
+ </div>
+
+ {testResult && (
+ <div
+ className={`flex items-center gap-2 rounded-md border p-3 text-sm ${
+ testResult.success
+ ? "border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400"
+ : "border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400"
+ }`}
+ >
+ {testResult.success ? (
+ <CheckCircle2 className="h-4 w-4 shrink-0" />
+ ) : (
+ <XCircle className="h-4 w-4 shrink-0" />
+ )}
+ {testResult.message}
+ </div>
+ )}
+
+ <div className="flex justify-between gap-2 pt-2">
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={handleTest}
+ disabled={testing || !url.trim()}
+ className="gap-2"
+ >
+ {testing && <Loader2 className="h-3.5 w-3.5 animate-spin" />}
+ {testing ? t("testing") : t("test")}
+ </Button>
+ <Button
+ size="sm"
+ onClick={handleSave}
+ disabled={saving || !url.trim()}
+ className="gap-2"
+ >
+ {saving && <Loader2 className="h-3.5 w-3.5 animate-spin" />}
+ {saving ? t("saving") : t("save")}
+ </Button>
+ </div>
+ </div>
+ )}
+ </DialogContent>
+ </Dialog>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/content/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/content/page.tsx
new file mode 100644
index 000000000..7becd73f0
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/content/page.tsx
@@ -0,0 +1,657 @@
+"use client";
+
+import { useState, useEffect, useCallback, useRef } from "react";
+import { useTranslations } from "next-intl";
+import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
+import { Badge } from "@/components/ui/badge";
+import { Button } from "@/components/ui/button";
+import { Input } from "@/components/ui/input";
+import { Checkbox } from "@/components/ui/checkbox";
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from "@/components/ui/select";
+import {
+ Table,
+ TableBody,
+ TableCell,
+ TableHead,
+ TableHeader,
+ TableRow,
+} from "@/components/ui/table";
+import {
+ Lightbulb,
+ Zap,
+ Send,
+ BarChart3,
+ Search,
+ Loader2,
+ RefreshCw,
+ ExternalLink,
+ X,
+ Settings2,
+} from "lucide-react";
+import { cn } from "@/lib/utils";
+import { useBrandStore } from "@/stores/use-brand-store";
+import { usePlanContext } from "@/components/providers/plan-provider";
+import {
+ generateOpportunities,
+ getGenerationJobStatus,
+ getOpportunities,
+ updateOpportunityStatus,
+ sendToWebhook,
+ bulkSendToWebhook,
+ bulkUpdateStatus,
+} from "@/lib/actions/content";
+import type {
+ ContentOpportunity,
+ ContentOpportunityStatus,
+} from "@/types";
+import { toast } from "sonner";
+import { Link } from "@/i18n/navigation";
+import { WebhookSettingsDialog } from "./_webhook-settings";
+
+const GENERATION_STORAGE_KEY = "aeo:content-generation";
+const GENERATION_TIMEOUT_MS = 3 * 60 * 1000;
+
+interface GenerationJob {
+ brandId: string;
+ jobId: string;
+ startedAt: number;
+}
+
+function saveGenerationJob(job: GenerationJob) {
+ try { localStorage.setItem(GENERATION_STORAGE_KEY, JSON.stringify(job)); } catch {}
+}
+
+function loadGenerationJob(): GenerationJob | null {
+ try {
+ const raw = localStorage.getItem(GENERATION_STORAGE_KEY);
+ if (!raw) return null;
+ const job = JSON.parse(raw) as GenerationJob;
+ if (Date.now() - job.startedAt > GENERATION_TIMEOUT_MS) {
+ localStorage.removeItem(GENERATION_STORAGE_KEY);
+ return null;
+ }
+ return job;
+ } catch { return null; }
+}
+
+function clearGenerationJob() {
+ try { localStorage.removeItem(GENERATION_STORAGE_KEY); } catch {}
+}
+
+const IMPACT_COLORS: Record<string, string> = {
+ high: "border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400",
+ medium: "border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400",
+ low: "border-slate-500/30 bg-slate-500/10 text-slate-600 dark:text-slate-400",
+};
+
+const STATUS_COLORS: Record<string, string> = {
+ new: "border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400",
+ sent: "border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",
+ in_progress: "border-violet-500/30 bg-violet-500/10 text-violet-600 dark:text-violet-400",
+ done: "border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400",
+ dismissed: "border-zinc-500/30 bg-zinc-500/10 text-zinc-500 dark:text-zinc-400",
+};
+
+function KpiCard({
+ title,
+ icon: Icon,
+ value,
+ sub,
+}: {
+ title: string;
+ icon: React.ElementType;
+ value: React.ReactNode;
+ sub: React.ReactNode;
+}) {
+ return (
+ <Card>
+ <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-1">
+ <CardTitle className="text-xs font-medium text-muted-foreground uppercase tracking-wide">
+ {title}
+ </CardTitle>
+ <Icon className="h-3.5 w-3.5 text-muted-foreground" />
+ </CardHeader>
+ <CardContent>
+ <div className="text-3xl font-bold">{value}</div>
+ <p className="text-xs mt-1 text-muted-foreground">{sub}</p>
+ </CardContent>
+ </Card>
+ );
+}
+
+export default function ContentPage() {
+ const t = useTranslations("content");
+ const activeBrandId = useBrandStore((s) => s.activeBrandId);
+ const { isCloud } = usePlanContext();
+
+ const [opportunities, setOpportunities] = useState<ContentOpportunity[]>([]);
+ const [total, setTotal] = useState(0);
+ const [loading, setLoading] = useState(true);
+ const [generating, setGenerating] = useState(false);
+ const [sendingId, setSendingId] = useState<string | null>(null);
+
+ const [search, setSearch] = useState("");
+ const [statusFilter, setStatusFilter] = useState<string>("all");
+ const [impactFilter, setImpactFilter] = useState<string>("all");
+ const [typeFilter, setTypeFilter] = useState<string>("all");
+
+ const [selectedIds, setSelectedIds] = useState<Set<string>>(new Set());
+ const [bulkSending, setBulkSending] = useState(false);
+
+ const [webhookOpen, setWebhookOpen] = useState(false);
+ const pollRef = useRef(false);
+
+ const loadData = useCallback(async () => {
+ if (!activeBrandId) {
+ setOpportunities([]);
+ setTotal(0);
+ setLoading(false);
+ return;
+ }
+
+ setLoading(true);
+ setSelectedIds(new Set());
+ try {
+ const filters: Record<string, string> = {};
+ if (statusFilter !== "all") filters.status = statusFilter;
+ if (impactFilter !== "all") filters.impact = impactFilter;
+ if (typeFilter !== "all") filters.type = typeFilter;
+
+ const data = await getOpportunities(activeBrandId, {
+ ...filters,
+ limit: 100,
+ sort: "score",
+ });
+ setOpportunities(data.opportunities);
+ setTotal(data.total);
+ return data.total;
+ } catch (err) {
+ console.error("Failed to load opportunities:", err);
+ toast.error("Failed to load content opportunities");
+ return 0;
+ } finally {
+ setLoading(false);
+ }
+ }, [activeBrandId, statusFilter, impactFilter, typeFilter]);
+
+ useEffect(() => {
+ loadData();
+ }, [loadData]);
+
+ const pollJob = useCallback((jobId: string, startedAt: number) => {
+ pollRef.current = true;
+ setGenerating(true);
+
+ const poll = async () => {
+ while (pollRef.current) {
+ await new Promise((r) => setTimeout(r, 3000));
+ if (!pollRef.current) break;
+ try {
+ const status = await getGenerationJobStatus(jobId);
+
+ if (status.status === "completed") {
+ pollRef.current = false;
+ clearGenerationJob();
+ setGenerating(false);
+ toast.success(`Generated ${status.result?.generated ?? 0} opportunities`);
+ loadData();
+ break;
+ }
+
+ if (status.status === "failed") {
+ pollRef.current = false;
+ clearGenerationJob();
+ setGenerating(false);
+ toast.error(status.failedReason || "Generation failed — please try again");
+ break;
+ }
+
+ if (Date.now() - startedAt > GENERATION_TIMEOUT_MS) {
+ pollRef.current = false;
+ clearGenerationJob();
+ setGenerating(false);
+ toast.error("Generation timed out — please try again");
+ break;
+ }
+ } catch {
+ // keep polling
+ }
+ }
+ };
+
+ poll();
+ }, [loadData]);
+
+ // Restore generation state from localStorage on mount
+ useEffect(() => {
+ if (!activeBrandId) return;
+ const saved = loadGenerationJob();
+ if (!saved || saved.brandId !== activeBrandId) return;
+
+ pollJob(saved.jobId, saved.startedAt);
+ return () => { pollRef.current = false; };
+ }, [activeBrandId, pollJob]);
+
+ const handleGenerate = async () => {
+ if (!activeBrandId) return;
+ try {
+ const { jobId } = await generateOpportunities(activeBrandId);
+ const startedAt = Date.now();
+ saveGenerationJob({ brandId: activeBrandId, jobId, startedAt });
+ pollJob(jobId, startedAt);
+ } catch (err) {
+ console.error("Generate failed:", err);
+ toast.error(err instanceof Error ? err.message : "Failed to generate opportunities");
+ setGenerating(false);
+ }
+ };
+
+ const handleSendWebhook = async (id: string) => {
+ setSendingId(id);
+ try {
+ await sendToWebhook(id);
+ toast.success("Sent to workflow!");
+ await loadData();
+ } catch (err) {
+ console.error("Webhook send failed:", err);
+ toast.error(err instanceof Error ? err.message : "Failed to send");
+ } finally {
+ setSendingId(null);
+ }
+ };
+
+ const handleDismiss = async (id: string) => {
+ try {
+ await updateOpportunityStatus(id, "dismissed");
+ toast.success("Opportunity dismissed");
+ await loadData();
+ } catch (err) {
+ console.error("Dismiss failed:", err);
+ toast.error("Failed to dismiss");
+ }
+ };
+
+ const handleBulkSend = async () => {
+ setBulkSending(true);
+ try {
+ const result = await bulkSendToWebhook(Array.from(selectedIds));
+ toast.success(`Sent ${result.sent} opportunities to workflow`);
+ if (result.failed > 0) toast.error(`${result.failed} failed to send`);
+ setSelectedIds(new Set());
+ await loadData();
+ } catch (err) {
+ toast.error(err instanceof Error ? err.message : "Bulk send failed");
+ } finally {
+ setBulkSending(false);
+ }
+ };
+
+ const handleBulkDismiss = async () => {
+ setBulkSending(true);
+ try {
+ const ids = Array.from(selectedIds);
+ const result = await bulkUpdateStatus(ids, "dismissed");
+ toast.success(`Dismissed ${result.updated} opportunities`);
+ setSelectedIds(new Set());
+ await loadData();
+ } catch (err) {
+ toast.error(err instanceof Error ? err.message : "Bulk dismiss failed");
+ } finally {
+ setBulkSending(false);
+ }
+ };
+
+ const filtered = opportunities.filter((o) =>
+ o.title.toLowerCase().includes(search.toLowerCase()) ||
+ (o.description || "").toLowerCase().includes(search.toLowerCase()),
+ );
+
+ const highImpact = opportunities.filter((o) => o.impact === "high").length;
+ const sentCount = opportunities.filter((o) => o.status === "sent" || o.status === "in_progress" || o.status === "done").length;
+ const avgScore =
+ opportunities.length > 0
+ ? Math.round(
+ opportunities.reduce((s, o) => s + o.opportunityScore, 0) / opportunities.length,
+ )
+ : 0;
+
+ if (!activeBrandId) {
+ return (
+ <div className="flex items-center justify-center min-h-[400px]">
+ <p className="text-muted-foreground">Select a brand to view content opportunities.</p>
+ </div>
+ );
+ }
+
+ return (
+ <div className="space-y-6">
+ <div className="flex items-center justify-between gap-4 flex-wrap">
+ <div>
+ <h1 className="text-2xl font-bold tracking-tight">{t("title")}</h1>
+ <p className="text-muted-foreground text-sm">{t("description")}</p>
+ </div>
+ <div className="flex items-center gap-2">
+ <Button
+ onClick={() => setWebhookOpen(true)}
+ variant="outline"
+ size="sm"
+ className="gap-2"
+ >
+ <Settings2 className="h-4 w-4" />
+ {t("webhook.title")}
+ </Button>
+ {!isCloud && (
+ <Button
+ onClick={handleGenerate}
+ disabled={generating || loading}
+ size="sm"
+ className="gap-2"
+ >
+ {generating ? (
+ <Loader2 className="h-4 w-4 animate-spin" />
+ ) : opportunities.length > 0 ? (
+ <RefreshCw className="h-4 w-4" />
+ ) : (
+ <Lightbulb className="h-4 w-4" />
+ )}
+ {generating
+ ? t("generating")
+ : opportunities.length > 0
+ ? t("regenerate")
+ : t("generate")}
+ </Button>
+ )}
+ </div>
+ </div>
+
+ {loading ? (
+ <div className="flex items-center justify-center min-h-[300px]">
+ <Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
+ </div>
+ ) : opportunities.length === 0 ? (
+ <Card>
+ <CardContent className="flex flex-col items-center justify-center py-16 gap-4">
+ <Lightbulb className="h-12 w-12 text-muted-foreground/40" />
+ <div className="text-center space-y-1">
+ <p className="text-sm font-medium">{t("noOpportunities")}</p>
+ <p className="text-xs text-muted-foreground">
+ {t("noOpportunitiesHint")}
+ </p>
+ </div>
+ <Button onClick={handleGenerate} disabled={generating} size="sm" className="gap-2">
+ {generating ? (
+ <Loader2 className="h-4 w-4 animate-spin" />
+ ) : (
+ <Lightbulb className="h-4 w-4" />
+ )}
+ {generating ? t("generating") : t("generate")}
+ </Button>
+ </CardContent>
+ </Card>
+ ) : (
+ <>
+ <div className="grid grid-cols-2 gap-4 sm:grid-cols-4">
+ <KpiCard
+ title={t("kpi.total")}
+ icon={Lightbulb}
+ value={total}
+ sub={`${filtered.length} shown`}
+ />
+ <KpiCard
+ title={t("kpi.highImpact")}
+ icon={Zap}
+ value={highImpact}
+ sub="opportunities"
+ />
+ <KpiCard
+ title={t("kpi.sentToWorkflow")}
+ icon={Send}
+ value={sentCount}
+ sub="sent or in progress"
+ />
+ <KpiCard
+ title={t("kpi.avgScore")}
+ icon={BarChart3}
+ value={avgScore}
+ sub="out of 100"
+ />
+ </div>
+
+ <Card>
+ <CardHeader className="pb-3">
+ <div className="flex items-center justify-between gap-4 flex-wrap">
+ <div className="flex items-center gap-2">
+ <CardTitle className="text-sm font-medium">
+ {t("opportunities")}
+ </CardTitle>
+ <Badge variant="outline" className="text-xs border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400">
+ {total} Available
+ </Badge>
+ </div>
+ <div className="flex items-center gap-2 flex-wrap">
+ <div className="relative w-48">
+ <Search className="absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground" />
+ <Input
+ placeholder="Search..."
+ value={search}
+ onChange={(e) => setSearch(e.target.value)}
+ className="pl-8 h-8 text-xs"
+ />
+ </div>
+ <Select value={statusFilter} onValueChange={(v) => v && setStatusFilter(v)}>
+ <SelectTrigger className="h-8 w-[130px] text-xs">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="all">{t("filters.allStatuses")}</SelectItem>
+ <SelectItem value="new">{t("status.new")}</SelectItem>
+ <SelectItem value="sent">{t("status.sent")}</SelectItem>
+ <SelectItem value="in_progress">{t("status.in_progress")}</SelectItem>
+ <SelectItem value="done">{t("status.done")}</SelectItem>
+ <SelectItem value="dismissed">{t("status.dismissed")}</SelectItem>
+ </SelectContent>
+ </Select>
+ <Select value={impactFilter} onValueChange={(v) => v && setImpactFilter(v)}>
+ <SelectTrigger className="h-8 w-[120px] text-xs">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="all">{t("filters.allImpacts")}</SelectItem>
+ <SelectItem value="high">{t("impact.high")}</SelectItem>
+ <SelectItem value="medium">{t("impact.medium")}</SelectItem>
+ <SelectItem value="low">{t("impact.low")}</SelectItem>
+ </SelectContent>
+ </Select>
+ <Select value={typeFilter} onValueChange={(v) => v && setTypeFilter(v)}>
+ <SelectTrigger className="h-8 w-[110px] text-xs">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="all">{t("filters.allTypes")}</SelectItem>
+ <SelectItem value="owned">{t("type.owned")}</SelectItem>
+ <SelectItem value="earned">{t("type.earned")}</SelectItem>
+ </SelectContent>
+ </Select>
+ </div>
+ </div>
+ </CardHeader>
+ {selectedIds.size > 0 && (
+ <div className="flex items-center gap-2 border-b bg-muted/50 px-4 py-2">
+ <span className="text-xs text-muted-foreground">
+ {t("bulk.selected", { count: selectedIds.size })}
+ </span>
+ <div className="flex items-center gap-1 ml-auto">
+ <Button
+ variant="outline"
+ size="sm"
+ className="h-7 text-xs gap-1.5"
+ onClick={handleBulkSend}
+ disabled={bulkSending}
+ >
+ {bulkSending ? (
+ <Loader2 className="h-3 w-3 animate-spin" />
+ ) : (
+ <Send className="h-3 w-3" />
+ )}
+ {t("bulk.sendAll")}
+ </Button>
+ <Button
+ variant="outline"
+ size="sm"
+ className="h-7 text-xs gap-1.5 text-muted-foreground"
+ onClick={handleBulkDismiss}
+ disabled={bulkSending}
+ >
+ <X className="h-3 w-3" />
+ {t("bulk.dismissAll")}
+ </Button>
+ </div>
+ </div>
+ )}
+ <CardContent className="p-0">
+ <Table className="table-fixed">
+ <TableHeader>
+ <TableRow>
+ <TableHead className="w-10 pl-4">
+ <Checkbox
+ checked={
+ filtered.length > 0 &&
+ selectedIds.size === filtered.length
+ }
+ onCheckedChange={(checked) => {
+ if (checked) {
+ setSelectedIds(
+ new Set(filtered.map((o) => o.id))
+ );
+ } else {
+ setSelectedIds(new Set());
+ }
+ }}
+ />
+ </TableHead>
+ <TableHead className="pl-6 w-[40%]">{t("table.action")}</TableHead>
+ <TableHead className="text-center">{t("table.type")}</TableHead>
+ <TableHead className="text-center">{t("table.impact")}</TableHead>
+ <TableHead className="text-center">{t("table.score")}</TableHead>
+ <TableHead className="text-center">{t("table.status")}</TableHead>
+ <TableHead className="text-right pr-6">{t("table.actions")}</TableHead>
+ </TableRow>
+ </TableHeader>
+ <TableBody>
+ {filtered.map((opp) => (
+ <TableRow key={opp.id} className="hover:bg-muted/50">
+ <TableCell className="w-10 pl-4">
+ <Checkbox
+ checked={selectedIds.has(opp.id)}
+ onCheckedChange={(checked) => {
+ const next = new Set(selectedIds);
+ if (checked) next.add(opp.id);
+ else next.delete(opp.id);
+ setSelectedIds(next);
+ }}
+ />
+ </TableCell>
+ <TableCell className="pl-6 max-w-0">
+ <Link
+ href={`/dashboard/content/${opp.id}`}
+ className="block hover:underline"
+ >
+ <p className="text-sm font-medium line-clamp-1">
+ {opp.title}
+ </p>
+ {opp.description && (
+ <p className="text-xs text-muted-foreground line-clamp-1 mt-0.5">
+ {opp.description}
+ </p>
+ )}
+ </Link>
+ </TableCell>
+ <TableCell className="text-center">
+ <Badge variant="outline" className="text-xs">
+ {t(`type.${opp.type}` as "type.owned" | "type.earned")}
+ </Badge>
+ </TableCell>
+ <TableCell className="text-center">
+ <Badge
+ variant="outline"
+ className={cn("text-xs", IMPACT_COLORS[opp.impact])}
+ >
+ {t(`impact.${opp.impact}` as "impact.high" | "impact.medium" | "impact.low")}
+ </Badge>
+ </TableCell>
+ <TableCell className="text-center">
+ <span className="tabular-nums font-semibold text-sm">
+ {Math.round(opp.opportunityScore)}
+ </span>
+ </TableCell>
+ <TableCell className="text-center">
+ <Badge
+ variant="outline"
+ className={cn("text-xs whitespace-nowrap", STATUS_COLORS[opp.status])}
+ >
+ {t(`status.${opp.status}` as `status.${ContentOpportunityStatus}`)}
+ </Badge>
+ </TableCell>
+ <TableCell className="text-right pr-6">
+ <div className="flex items-center justify-end gap-1">
+ {opp.status === "new" && (
+ <>
+ <Button
+ variant="ghost"
+ size="sm"
+ className="h-7 px-2 text-xs gap-1"
+ onClick={() => handleSendWebhook(opp.id)}
+ disabled={sendingId === opp.id}
+ >
+ {sendingId === opp.id ? (
+ <Loader2 className="h-3 w-3 animate-spin" />
+ ) : (
+ <Send className="h-3 w-3" />
+ )}
+ Send
+ </Button>
+ <Button
+ variant="ghost"
+ size="sm"
+ className="h-7 px-2 text-xs text-muted-foreground"
+ onClick={() => handleDismiss(opp.id)}
+ >
+ <X className="h-3 w-3" />
+ </Button>
+ </>
+ )}
+ <Link href={`/dashboard/content/${opp.id}`}>
+ <Button variant="ghost" size="sm" className="h-7 px-2 text-xs">
+ <ExternalLink className="h-3 w-3" />
+ </Button>
+ </Link>
+ </div>
+ </TableCell>
+ </TableRow>
+ ))}
+ </TableBody>
+ </Table>
+ {filtered.length === 0 && (
+ <div className="py-10 text-center text-sm text-muted-foreground">
+ No opportunities match your filters.
+ </div>
+ )}
+ </CardContent>
+ </Card>
+ </>
+ )}
+
+ <WebhookSettingsDialog
+ open={webhookOpen}
+ onOpenChange={setWebhookOpen}
+ brandId={activeBrandId}
+ />
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/insights/[id]/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/insights/[id]/page.tsx
new file mode 100644
index 000000000..ef230d1e6
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/insights/[id]/page.tsx
@@ -0,0 +1,247 @@
+'use client';
+
+import { useEffect, useState } from 'react';
+import { useParams } from 'next/navigation';
+import { useRouter } from '@/i18n/navigation';
+import {
+ getPromptResultById,
+ type PromptResultWithText,
+} from '@/lib/actions/tracking';
+import { Markdown } from '@/components/ui/markdown';
+import { Badge } from '@/components/ui/badge';
+import { Button } from '@/components/ui/button';
+import { Card, CardContent } from '@/components/ui/card';
+import { Skeleton } from '@/components/ui/skeleton';
+import {
+ ArrowLeft,
+ ExternalLink,
+ MessageSquareText,
+ Quote,
+ Eye,
+ Clock,
+} from 'lucide-react';
+import { cn } from '@/lib/utils';
+
+const PLATFORM_LABELS: Record<string, string> = {
+ chatgpt: 'ChatGPT',
+ gemini: 'Gemini',
+ perplexity: 'Perplexity',
+ claude: 'Claude',
+ grok: 'Grok',
+ copilot: 'Copilot',
+ 'meta-ai': 'Meta AI',
+ 'google-ai-overviews': 'Google AI Overview',
+ 'google-ai-mode': 'Google AI Mode',
+ 'chatgpt-web': 'ChatGPT',
+ 'google-aio': 'Google AI Overview',
+ 'google-aimode': 'Google AI Mode',
+ 'perplexity-web': 'Perplexity',
+ 'copilot-web': 'Microsoft Copilot',
+ 'grok-web': 'Grok',
+ 'gemini-web': 'Gemini',
+};
+
+function SentimentBadge({
+ sentiment,
+}: {
+ sentiment: 'positive' | 'neutral' | 'negative';
+}) {
+ return (
+ <Badge
+ variant="outline"
+ className={cn(
+ 'text-xs capitalize',
+ sentiment === 'positive' &&
+ 'border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400',
+ sentiment === 'neutral' &&
+ 'border-yellow-500/30 bg-yellow-500/10 text-yellow-600 dark:text-yellow-400',
+ sentiment === 'negative' &&
+ 'border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400',
+ )}
+ >
+ {sentiment}
+ </Badge>
+ );
+}
+
+export default function ResultDetailPage() {
+ const params = useParams();
+ const router = useRouter();
+ const resultId = params.id as string;
+
+ const [result, setResult] = useState<PromptResultWithText | null>(null);
+ const [loading, setLoading] = useState(true);
+ const [notFound, setNotFound] = useState(false);
+
+ useEffect(() => {
+ let cancelled = false;
+ async function load() {
+ setLoading(true);
+ const data = await getPromptResultById(resultId);
+ if (cancelled) return;
+ if (!data) {
+ setNotFound(true);
+ } else {
+ setResult(data);
+ }
+ setLoading(false);
+ }
+ load();
+ return () => {
+ cancelled = true;
+ };
+ }, [resultId]);
+
+ if (loading) {
+ return (
+ <div className="space-y-6 p-6">
+ <Skeleton className="h-8 w-48" />
+ <Skeleton className="h-6 w-96" />
+ <Skeleton className="h-64 w-full" />
+ </div>
+ );
+ }
+
+ if (notFound || !result) {
+ return (
+ <div className="flex flex-col items-center justify-center py-24 text-center">
+ <MessageSquareText className="h-12 w-12 text-muted-foreground/40 mb-4" />
+ <h2 className="text-lg font-semibold">Result not found</h2>
+ <p className="text-muted-foreground text-sm mt-1">
+ This result may have been deleted or does not exist.
+ </p>
+ <Button
+ variant="outline"
+ className="mt-6 gap-2"
+ onClick={() => router.back()}
+ >
+ <ArrowLeft className="h-4 w-4" />
+ Go back
+ </Button>
+ </div>
+ );
+ }
+
+ return (
+ <div className="space-y-6 p-2 sm:p-6 max-w-5xl mx-auto">
+ {/* Back button */}
+ <Button
+ variant="ghost"
+ size="sm"
+ className="gap-2 -ml-2 text-muted-foreground hover:text-foreground"
+ onClick={() => router.back()}
+ >
+ <ArrowLeft className="h-4 w-4" />
+ Back
+ </Button>
+
+ {/* Header */}
+ <div className="space-y-3">
+ <h1 className="text-xl font-semibold leading-snug">
+ {result.promptText}
+ </h1>
+
+ <div className="flex flex-wrap items-center gap-2">
+ <Badge variant="secondary" className="text-xs">
+ {PLATFORM_LABELS[result.platform] ?? result.platform}
+ </Badge>
+ <SentimentBadge sentiment={result.sentiment} />
+ <Badge variant="outline" className="text-xs gap-1">
+ <Eye className="h-3 w-3" />
+ {result.visibilityScore}/100
+ </Badge>
+ {result.region && (
+ <Badge variant="outline" className="text-xs">
+ {result.region}
+ </Badge>
+ )}
+ </div>
+ </div>
+
+ {/* Stats */}
+ <div className="grid grid-cols-3 gap-4">
+ <Card>
+ <CardContent className="flex items-center gap-3 p-4">
+ <MessageSquareText className="h-5 w-5 text-muted-foreground" />
+ <div>
+ <p className="text-2xl font-bold tabular-nums">
+ {result.mentionCount}
+ </p>
+ <p className="text-xs text-muted-foreground">Mentions</p>
+ </div>
+ </CardContent>
+ </Card>
+ <Card>
+ <CardContent className="flex items-center gap-3 p-4">
+ <Quote className="h-5 w-5 text-muted-foreground" />
+ <div>
+ <p className="text-2xl font-bold tabular-nums">
+ {result.citationCount}
+ </p>
+ <p className="text-xs text-muted-foreground">Brand Citations</p>
+ </div>
+ </CardContent>
+ </Card>
+ <Card>
+ <CardContent className="flex items-center gap-3 p-4">
+ <ExternalLink className="h-5 w-5 text-muted-foreground" />
+ <div>
+ <p className="text-2xl font-bold tabular-nums">
+ {result.citations.length}
+ </p>
+ <p className="text-xs text-muted-foreground">Total Citations</p>
+ </div>
+ </CardContent>
+ </Card>
+ </div>
+
+ {/* AI Response */}
+ <Card>
+ <CardContent className="p-6">
+ <h2 className="text-sm font-medium mb-4">AI Response</h2>
+ <div className="prose prose-sm dark:prose-invert max-w-none">
+ <Markdown>{result.response}</Markdown>
+ </div>
+ </CardContent>
+ </Card>
+
+ {/* Citations */}
+ {result.citations.length > 0 && (
+ <Card>
+ <CardContent className="p-6">
+ <h2 className="text-sm font-medium mb-4">
+ Citations ({result.citations.length})
+ </h2>
+ <div className="space-y-2">
+ {result.citations.map((cite, i) => (
+ <a
+ key={i}
+ href={cite.url}
+ target="_blank"
+ rel="noopener noreferrer"
+ className="flex items-start gap-3 rounded-lg border px-4 py-3 text-sm hover:bg-muted/50 transition-colors"
+ >
+ <ExternalLink className="h-4 w-4 mt-0.5 shrink-0 text-muted-foreground" />
+ <div className="min-w-0">
+ <p className="font-medium truncate">
+ {cite.title || cite.url}
+ </p>
+ <p className="text-muted-foreground text-xs truncate">
+ {cite.url}
+ </p>
+ </div>
+ </a>
+ ))}
+ </div>
+ </CardContent>
+ </Card>
+ )}
+
+ {/* Timestamp */}
+ <div className="flex items-center gap-2 text-xs text-muted-foreground pb-6">
+ <Clock className="h-3.5 w-3.5" />
+ Checked: {new Date(result.createdAt).toLocaleString()}
+ </div>
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/insights/_charts.tsx b/web/src/app/[locale]/(dashboard)/dashboard/insights/_charts.tsx
new file mode 100644
index 000000000..512b32a90
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/insights/_charts.tsx
@@ -0,0 +1,803 @@
+'use client';
+
+import { useRef, useState, useEffect } from 'react';
+import {
+ AreaChart,
+ Area,
+ XAxis,
+ YAxis,
+ CartesianGrid,
+ Tooltip,
+ Legend,
+ PieChart,
+ Pie,
+ Cell,
+ BarChart,
+ Bar,
+} from 'recharts';
+import type {
+ CompetitorComparisonEntry,
+ ProviderComparisonRow,
+ VisibilityTrendPoint,
+ SoVByPlatform,
+ SoVTrendPoint,
+} from '@/lib/actions/tracking';
+
+// ─── Auto-sizing wrapper ─────────────────────────────────────────────────────
+// Replaces ResponsiveContainer which has issues with React 19
+
+function ChartContainer({
+ height,
+ children,
+}: {
+ height: number;
+ children: (width: number) => React.ReactNode;
+}) {
+ const ref = useRef<HTMLDivElement>(null);
+ const [width, setWidth] = useState(0);
+
+ useEffect(() => {
+ const el = ref.current;
+ if (!el) return;
+
+ const update = () => setWidth(el.clientWidth);
+ update();
+
+ const ro = new ResizeObserver(update);
+ ro.observe(el);
+ return () => ro.disconnect();
+ }, []);
+
+ return (
+ <div ref={ref} style={{ width: '100%', height }}>
+ {width > 0 && children(width)}
+ </div>
+ );
+}
+
+// ─── Data ─────────────────────────────────────────────────────────────────────
+
+const DEFAULT_PLATFORM_DATA = [
+ { name: 'Perplexity', value: 72, color: '#6366f1' },
+ { name: 'ChatGPT', value: 58, color: '#8b5cf6' },
+ { name: 'Claude', value: 49, color: '#a78bfa' },
+ { name: 'Gemini', value: 41, color: '#c4b5fd' },
+ { name: 'Copilot', value: 35, color: '#ddd6fe' },
+];
+
+const PLATFORM_COLORS: Record<string, string> = {
+ chatgpt: '#8b5cf6',
+ gemini: '#c4b5fd',
+ perplexity: '#6366f1',
+ claude: '#a78bfa',
+ grok: '#f59e0b',
+ copilot: '#ddd6fe',
+ 'meta-ai': '#3b82f6',
+ 'google-ai-overviews': '#22c55e',
+ 'google-ai-mode': '#4285f4',
+ 'google-aimode': '#4285f4',
+ 'gpt-5-chat-latest': '#8b5cf6',
+ 'gpt-5-mini': '#a78bfa',
+ 'claude-sonnet-4-6': '#f97316',
+ 'claude-opus-4-6': '#ea580c',
+ 'gemini-2.5-pro': '#22c55e',
+ 'gemini-2.5-flash': '#4ade80',
+};
+
+const PLATFORM_LABELS: Record<string, string> = {
+ chatgpt: 'ChatGPT',
+ gemini: 'Gemini',
+ perplexity: 'Perplexity',
+ claude: 'Claude',
+ grok: 'Grok',
+ copilot: 'Copilot',
+ 'meta-ai': 'Meta AI',
+ 'google-ai-overviews': 'Google AI',
+ 'google-ai-mode': 'Google AI Mode',
+ 'google-aimode': 'Google AI Mode',
+ 'gpt-5-chat-latest': 'GPT-5',
+ 'gpt-5-mini': 'GPT-5 Mini',
+ 'claude-sonnet-4-6': 'Claude Sonnet 4.6',
+ 'claude-opus-4-6': 'Claude Opus 4.6',
+ 'gemini-2.5-pro': 'Gemini 2.5 Pro',
+ 'gemini-2.5-flash': 'Gemini 2.5 Flash',
+};
+
+// ─── Custom Tooltips ──────────────────────────────────────────────────────────
+
+function AreaTooltip({
+ active,
+ payload,
+ label,
+}: {
+ active?: boolean;
+ payload?: { name: string; value: number; color: string }[];
+ label?: string;
+}) {
+ if (!active || !payload?.length) return null;
+ return (
+ <div className="rounded-lg border bg-background px-3 py-2 shadow-md text-xs">
+ <p className="font-medium text-foreground mb-1">{label}</p>
+ {payload.map((entry) => (
+ <div key={entry.name} className="flex items-center gap-2">
+ <span
+ className="inline-block h-2 w-2 rounded-full shrink-0"
+ style={{ backgroundColor: entry.color }}
+ />
+ <span className="text-muted-foreground capitalize">
+ {entry.name}:
+ </span>
+ <span className="font-medium text-foreground">{entry.value}</span>
+ </div>
+ ))}
+ </div>
+ );
+}
+
+function PieTooltip({
+ active,
+ payload,
+}: {
+ active?: boolean;
+ payload?: {
+ name: string;
+ value: number;
+ payload: { color: string; isRemainder?: boolean };
+ }[];
+}) {
+ if (!active || !payload?.length) return null;
+ const entry = payload[0];
+ if (entry.payload.isRemainder) return null;
+ return (
+ <div className="rounded-lg border bg-background px-3 py-2 shadow-md text-xs">
+ <div className="flex items-center gap-2">
+ <span
+ className="inline-block h-2 w-2 rounded-full shrink-0"
+ style={{ backgroundColor: entry.payload.color }}
+ />
+ <span className="text-muted-foreground">{entry.name}:</span>
+ <span className="font-medium text-foreground">{entry.value}%</span>
+ </div>
+ </div>
+ );
+}
+
+// ─── Bar List ─────────────────────────────────────────────────────────────────
+
+function BarList({
+ data,
+}: {
+ data: { name: string; value: number; color: string }[];
+}) {
+ const max = 100;
+ return (
+ <div className="w-full space-y-2">
+ {data.map((item) => (
+ <div key={item.name} className="flex items-center gap-2 text-xs">
+ <span className="w-20 shrink-0 text-muted-foreground truncate">
+ {item.name}
+ </span>
+ <div className="flex-1 h-1.5 rounded-full bg-muted overflow-hidden">
+ <div
+ className="h-full rounded-full transition-all"
+ style={{
+ width: `${Math.round((item.value / max) * 100)}%`,
+ backgroundColor: item.color,
+ }}
+ />
+ </div>
+ <span className="w-6 text-right font-medium tabular-nums text-foreground">
+ {item.value}
+ </span>
+ </div>
+ ))}
+ </div>
+ );
+}
+
+// ─── Exported Charts ──────────────────────────────────────────────────────────
+
+export function TrendChart({ data }: { data: VisibilityTrendPoint[] }) {
+ const hasCompetitors = data.some((d) => d.competitors !== null);
+
+ if (data.length === 0) {
+ return (
+ <div className="flex items-center justify-center h-[192px] text-sm text-muted-foreground">
+ No trend data available yet
+ </div>
+ );
+ }
+
+ return (
+ <ChartContainer height={192}>
+ {(width) => (
+ <AreaChart
+ width={width}
+ height={192}
+ data={data}
+ margin={{ top: 4, right: 4, left: -24, bottom: 0 }}
+ >
+ <defs>
+ <linearGradient id="gradScore" x1="0" y1="0" x2="0" y2="1">
+ <stop offset="5%" stopColor="#6366f1" stopOpacity={0.2} />
+ <stop offset="95%" stopColor="#6366f1" stopOpacity={0} />
+ </linearGradient>
+ <linearGradient id="gradCompetitors" x1="0" y1="0" x2="0" y2="1">
+ <stop offset="5%" stopColor="#94a3b8" stopOpacity={0.15} />
+ <stop offset="95%" stopColor="#94a3b8" stopOpacity={0} />
+ </linearGradient>
+ </defs>
+ <CartesianGrid
+ strokeDasharray="3 3"
+ className="stroke-border"
+ vertical={false}
+ />
+ <XAxis
+ dataKey="date"
+ tick={{ fontSize: 11 }}
+ tickLine={false}
+ axisLine={false}
+ className="fill-muted-foreground"
+ />
+ <YAxis
+ tick={{ fontSize: 11 }}
+ tickLine={false}
+ axisLine={false}
+ className="fill-muted-foreground"
+ domain={[0, 100]}
+ />
+ <Tooltip content={<AreaTooltip />} />
+ <Legend
+ iconType="circle"
+ iconSize={8}
+ wrapperStyle={{ fontSize: 11, paddingTop: 8 }}
+ />
+ <Area
+ type="monotone"
+ dataKey="score"
+ name="Your Brand"
+ stroke="#6366f1"
+ strokeWidth={2}
+ fill="url(#gradScore)"
+ dot={false}
+ activeDot={{ r: 4 }}
+ />
+ {hasCompetitors && (
+ <Area
+ type="monotone"
+ dataKey="competitors"
+ name="Avg. Competitor"
+ stroke="#94a3b8"
+ strokeWidth={2}
+ fill="url(#gradCompetitors)"
+ dot={false}
+ activeDot={{ r: 4 }}
+ strokeDasharray="4 4"
+ />
+ )}
+ </AreaChart>
+ )}
+ </ChartContainer>
+ );
+}
+
+export function PlatformChart({
+ data,
+}: {
+ data?: { platform: string; avgScore: number; resultCount: number }[];
+}) {
+ const [hovered, setHovered] = useState<string | null>(null);
+
+ const modelSlices = data
+ ? data.map((d) => ({
+ name: PLATFORM_LABELS[d.platform] ?? d.platform,
+ value: d.avgScore,
+ color: PLATFORM_COLORS[d.platform] ?? '#94a3b8',
+ isRemainder: false,
+ }))
+ : DEFAULT_PLATFORM_DATA.map((d) => ({ ...d, isRemainder: false }));
+
+ const totalValue = modelSlices.reduce((s, d) => s + d.value, 0);
+ const remainderValue = Math.max(totalValue * 0.25, 100 - totalValue);
+
+ const chartData = [
+ ...modelSlices,
+ {
+ name: '_remainder',
+ value: remainderValue,
+ color: 'var(--muted)',
+ isRemainder: true,
+ },
+ ];
+
+ return (
+ <div className="flex flex-col items-center gap-4 w-full">
+ <ChartContainer height={140}>
+ {(width) => {
+ const size = Math.min(width, 140);
+ return (
+ <PieChart width={width} height={140}>
+ <Pie
+ data={chartData}
+ cx={width / 2}
+ cy={70}
+ innerRadius={size * 0.27}
+ outerRadius={size * 0.43}
+ paddingAngle={2}
+ dataKey="value"
+ onMouseEnter={(_, index) => {
+ if (!chartData[index].isRemainder)
+ setHovered(chartData[index].name);
+ }}
+ onMouseLeave={() => setHovered(null)}
+ >
+ {chartData.map((entry) => (
+ <Cell
+ key={entry.name}
+ fill={entry.isRemainder ? 'hsl(var(--muted))' : entry.color}
+ opacity={
+ entry.isRemainder
+ ? 0.4
+ : hovered === null || hovered === entry.name
+ ? 1
+ : 0.4
+ }
+ stroke="none"
+ />
+ ))}
+ </Pie>
+ <Tooltip content={<PieTooltip />} isAnimationActive={false} />
+ </PieChart>
+ );
+ }}
+ </ChartContainer>
+ <BarList data={modelSlices} />
+ </div>
+ );
+}
+
+// ─── Competitor Comparison Chart ──────────────────────────────────────────────
+
+const BRAND_COLORS = [
+ '#6366f1',
+ '#22c55e',
+ '#f97316',
+ '#8b5cf6',
+ '#3b82f6',
+ '#ef4444',
+ '#eab308',
+ '#14b8a6',
+ '#f43f5e',
+ '#a855f7',
+];
+
+function CompetitorTooltip({
+ active,
+ payload,
+ label,
+}: {
+ active?: boolean;
+ payload?: { name: string; value: number; fill: string }[];
+ label?: string;
+}) {
+ if (!active || !payload?.length) return null;
+ return (
+ <div className="rounded-lg border bg-background px-3 py-2 shadow-md text-xs">
+ <p className="font-medium text-foreground mb-1">{label}</p>
+ {payload
+ .filter((e) => e.value > 0)
+ .map((entry) => (
+ <div key={entry.name} className="flex items-center gap-2">
+ <span
+ className="inline-block h-2 w-2 rounded-full shrink-0"
+ style={{ backgroundColor: entry.fill }}
+ />
+ <span className="text-muted-foreground">{entry.name}:</span>
+ <span className="font-medium text-foreground">{entry.value}%</span>
+ </div>
+ ))}
+ </div>
+ );
+}
+
+export function CompetitorChart({
+ providerRows,
+ brands,
+}: {
+ providerRows: ProviderComparisonRow[];
+ brands: CompetitorComparisonEntry[];
+}) {
+ const brandNames = brands.slice(0, 5).map((b) => b.name);
+
+ return (
+ <ChartContainer height={320}>
+ {(width) => (
+ <BarChart
+ width={width}
+ height={320}
+ data={providerRows}
+ margin={{ top: 8, right: 8, left: -8, bottom: 0 }}
+ barGap={2}
+ barCategoryGap="20%"
+ >
+ <CartesianGrid
+ strokeDasharray="3 3"
+ className="stroke-border"
+ vertical={false}
+ />
+ <XAxis
+ dataKey="provider"
+ tick={{ fontSize: 11 }}
+ tickLine={false}
+ axisLine={false}
+ className="fill-muted-foreground"
+ />
+ <YAxis
+ tick={{ fontSize: 11 }}
+ tickLine={false}
+ axisLine={false}
+ className="fill-muted-foreground"
+ domain={[0, 100]}
+ tickFormatter={(v: number) => `${v}%`}
+ />
+ <Tooltip
+ content={<CompetitorTooltip />}
+ cursor={{ fill: 'hsl(var(--muted) / 0.3)' }}
+ />
+ <Legend
+ iconType="circle"
+ iconSize={8}
+ wrapperStyle={{ fontSize: 11, paddingTop: 8 }}
+ />
+ {brandNames.map((name, i) => (
+ <Bar
+ key={`${name}-${i}`}
+ dataKey={name}
+ fill={BRAND_COLORS[i % BRAND_COLORS.length]}
+ radius={[3, 3, 0, 0]}
+ />
+ ))}
+ </BarChart>
+ )}
+ </ChartContainer>
+ );
+}
+
+const MAX_VISIBLE = 5;
+
+function LeaderboardEntry({
+ entry,
+ rank,
+}: {
+ entry: CompetitorComparisonEntry;
+ rank: number;
+}) {
+ return (
+ <div
+ className={`flex items-center gap-3 rounded-lg border px-3 py-2.5 ${
+ entry.isOwnBrand ? 'border-primary/30 bg-primary/5' : ''
+ }`}
+ >
+ <div className="flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-bold">
+ {rank}
+ </div>
+ <div className="flex-1 min-w-0">
+ <div className="flex items-center gap-2">
+ <span className="text-sm font-medium truncate">{entry.name}</span>
+ {entry.isOwnBrand && (
+ <span className="text-[10px] font-medium text-primary">YOU</span>
+ )}
+ </div>
+ <div className="flex items-center gap-3 text-xs text-muted-foreground mt-0.5">
+ <span>{entry.totalMentions} mentions</span>
+ <span>{entry.totalCitations} citations</span>
+ </div>
+ </div>
+ <div className="flex flex-col items-end gap-0.5 shrink-0">
+ <span className="text-sm font-semibold tabular-nums">
+ {entry.avgVisibilityScore}%
+ </span>
+ {entry.change !== null && entry.change !== 0 && (
+ <span
+ className={`text-[10px] font-medium tabular-nums ${
+ entry.change > 0 ? 'text-green-500' : 'text-red-500'
+ }`}
+ >
+ {entry.change > 0 ? '↑' : '↓'} {Math.abs(entry.change).toFixed(1)}%
+ </span>
+ )}
+ {entry.change === 0 && (
+ <span className="text-[10px] font-medium tabular-nums text-muted-foreground">
+ — 0%
+ </span>
+ )}
+ </div>
+ </div>
+ );
+}
+
+export function CompetitorLeaderboard({
+ data,
+}: {
+ data: CompetitorComparisonEntry[];
+}) {
+ const [expanded, setExpanded] = useState(false);
+
+ const needsTruncation = data.length > MAX_VISIBLE;
+
+ const visibleEntries: { entry: CompetitorComparisonEntry; rank: number }[] =
+ (() => {
+ if (!needsTruncation || expanded) {
+ return data.map((entry, i) => ({ entry, rank: i + 1 }));
+ }
+
+ const ownBrandIdx = data.findIndex((e) => e.isOwnBrand);
+ const ownBrandInTop = ownBrandIdx >= 0 && ownBrandIdx < MAX_VISIBLE - 1;
+
+ if (ownBrandInTop || ownBrandIdx < 0) {
+ return data
+ .slice(0, MAX_VISIBLE)
+ .map((entry, i) => ({ entry, rank: i + 1 }));
+ }
+
+ // Show top 4 + own brand at its actual rank
+ const top = data
+ .slice(0, MAX_VISIBLE - 1)
+ .map((entry, i) => ({ entry, rank: i + 1 }));
+ top.push({ entry: data[ownBrandIdx], rank: ownBrandIdx + 1 });
+ return top;
+ })();
+
+ return (
+ <div className="space-y-2">
+ {visibleEntries.map(({ entry, rank }, idx) => (
+ <LeaderboardEntry
+ key={`lb-${idx}-${rank}-${entry.isOwnBrand ? 'own' : entry.name}`}
+ entry={entry}
+ rank={rank}
+ />
+ ))}
+ {needsTruncation && !expanded && (
+ <button
+ onClick={() => setExpanded(true)}
+ className="w-full text-center text-xs font-medium text-muted-foreground hover:text-foreground py-2 transition-colors"
+ >
+ Show all ({data.length})
+ </button>
+ )}
+ {expanded && (
+ <button
+ onClick={() => setExpanded(false)}
+ className="w-full text-center text-xs font-medium text-muted-foreground hover:text-foreground py-2 transition-colors"
+ >
+ Show less
+ </button>
+ )}
+ </div>
+ );
+}
+
+// ─── Share of Voice Charts ───────────────────────────────────────────────────
+
+export function ShareOfVoicePlatformChart({
+ data,
+ overallSov,
+}: {
+ data: SoVByPlatform[];
+ overallSov: number;
+}) {
+ if (data.length === 0) {
+ return (
+ <div className="flex items-center justify-center h-[280px] text-sm text-muted-foreground">
+ No share of voice data available
+ </div>
+ );
+ }
+
+ const palette = [
+ '#6366f1',
+ '#8b5cf6',
+ '#3b82f6',
+ '#22c55e',
+ '#f97316',
+ '#f59e0b',
+ '#06b6d4',
+ '#ec4899',
+ ];
+
+ const chartData = data.map((d, index) => ({
+ ...d,
+ fill: palette[index % palette.length],
+ voiceMentions: d.brandMentions + d.competitorMentions,
+ }));
+ const totalVoiceMentions = chartData.reduce(
+ (sum, d) => sum + d.voiceMentions,
+ 0,
+ );
+
+ return (
+ <div className="flex flex-col gap-4">
+ <div className="text-center">
+ <div className="text-4xl font-bold tabular-nums">{overallSov}%</div>
+ <div className="text-xs text-muted-foreground mt-0.5">
+ Overall Share of Voice
+ </div>
+ </div>
+
+ <ChartContainer height={200}>
+ {(width) => {
+ const size = Math.min(width, 220);
+ return (
+ <PieChart width={width} height={200}>
+ <Pie
+ data={chartData}
+ cx={width / 2}
+ cy={100}
+ innerRadius={size * 0.28}
+ outerRadius={size * 0.44}
+ paddingAngle={2}
+ dataKey="voiceMentions"
+ nameKey="provider"
+ >
+ {chartData.map((entry) => (
+ <Cell key={entry.provider} fill={entry.fill} stroke="none" />
+ ))}
+ </Pie>
+ <Tooltip
+ isAnimationActive={false}
+ content={({ active, payload }) => {
+ if (!active || !payload || payload.length === 0) return null;
+ const p = payload[0].payload as SoVByPlatform & {
+ fill: string;
+ voiceMentions: number;
+ };
+ const platformShare =
+ totalVoiceMentions > 0
+ ? (p.voiceMentions / totalVoiceMentions) * 100
+ : 0;
+ return (
+ <div className="rounded-md border bg-popover px-2.5 py-1.5 text-xs shadow-sm">
+ <div className="font-medium">{p.provider}</div>
+ <div className="text-muted-foreground">
+ {p.sov.toFixed(1)}% SoV · {platformShare.toFixed(1)}% of
+ voice
+ </div>
+ </div>
+ );
+ }}
+ />
+ </PieChart>
+ );
+ }}
+ </ChartContainer>
+
+ <ul className="grid grid-cols-2 gap-x-3 gap-y-1.5">
+ {chartData.map((d) => (
+ <li key={d.provider} className="flex items-center gap-2 text-xs">
+ <span
+ className="h-2.5 w-2.5 shrink-0 rounded-sm"
+ style={{ background: d.fill }}
+ aria-hidden
+ />
+ <span className="truncate text-foreground">{d.provider}</span>
+ <span className="ml-auto tabular-nums text-muted-foreground">
+ {d.sov.toFixed(1)}%
+ </span>
+ </li>
+ ))}
+ </ul>
+ </div>
+ );
+}
+
+function SoVTrendTooltip({
+ active,
+ payload,
+ label,
+}: {
+ active?: boolean;
+ payload?: { name: string; value: number; color: string }[];
+ label?: string;
+}) {
+ if (!active || !payload?.length) return null;
+ return (
+ <div className="rounded-lg border bg-background px-3 py-2 shadow-md text-xs">
+ <p className="font-medium text-foreground mb-1">{label}</p>
+ {payload.map((entry) => (
+ <div key={entry.name} className="flex items-center gap-2">
+ <span
+ className="inline-block h-2 w-2 rounded-full shrink-0"
+ style={{ backgroundColor: entry.color }}
+ />
+ <span className="text-muted-foreground">{entry.name}:</span>
+ <span className="font-medium text-foreground">{entry.value}%</span>
+ </div>
+ ))}
+ </div>
+ );
+}
+
+export function ShareOfVoiceTrendChart({ data }: { data: SoVTrendPoint[] }) {
+ if (data.length === 0) {
+ return (
+ <div className="flex items-center justify-center h-[280px] text-sm text-muted-foreground">
+ No trend data available yet
+ </div>
+ );
+ }
+
+ const hasCompetitors = data.some((d) => d.competitorSov > 0);
+
+ return (
+ <ChartContainer height={280}>
+ {(width) => (
+ <AreaChart
+ width={width}
+ height={280}
+ data={data}
+ margin={{ top: 4, right: 4, left: -24, bottom: 0 }}
+ >
+ <defs>
+ <linearGradient id="gradSovBrand" x1="0" y1="0" x2="0" y2="1">
+ <stop offset="5%" stopColor="#6366f1" stopOpacity={0.2} />
+ <stop offset="95%" stopColor="#6366f1" stopOpacity={0} />
+ </linearGradient>
+ <linearGradient id="gradSovComp" x1="0" y1="0" x2="0" y2="1">
+ <stop offset="5%" stopColor="#94a3b8" stopOpacity={0.15} />
+ <stop offset="95%" stopColor="#94a3b8" stopOpacity={0} />
+ </linearGradient>
+ </defs>
+ <CartesianGrid
+ strokeDasharray="3 3"
+ className="stroke-border"
+ vertical={false}
+ />
+ <XAxis
+ dataKey="date"
+ tick={{ fontSize: 11 }}
+ tickLine={false}
+ axisLine={false}
+ className="fill-muted-foreground"
+ />
+ <YAxis
+ tick={{ fontSize: 11 }}
+ tickLine={false}
+ axisLine={false}
+ className="fill-muted-foreground"
+ domain={[0, 100]}
+ tickFormatter={(v: number) => `${v}%`}
+ />
+ <Tooltip content={<SoVTrendTooltip />} />
+ <Legend
+ iconType="circle"
+ iconSize={8}
+ wrapperStyle={{ fontSize: 11, paddingTop: 8 }}
+ />
+ <Area
+ type="monotone"
+ dataKey="brandSov"
+ name="Your Brand"
+ stroke="#6366f1"
+ strokeWidth={2}
+ fill="url(#gradSovBrand)"
+ dot={false}
+ activeDot={{ r: 4 }}
+ />
+ {hasCompetitors && (
+ <Area
+ type="monotone"
+ dataKey="competitorSov"
+ name="Competitors"
+ stroke="#94a3b8"
+ strokeWidth={2}
+ fill="url(#gradSovComp)"
+ dot={false}
+ activeDot={{ r: 4 }}
+ strokeDasharray="4 4"
+ />
+ )}
+ </AreaChart>
+ )}
+ </ChartContainer>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/insights/_metric-breakdown-sheet.tsx b/web/src/app/[locale]/(dashboard)/dashboard/insights/_metric-breakdown-sheet.tsx
new file mode 100644
index 000000000..a5b697130
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/insights/_metric-breakdown-sheet.tsx
@@ -0,0 +1,429 @@
+'use client';
+
+import { useEffect, useMemo, useState } from 'react';
+import { TrendingDown, TrendingUp, Minus, AlertTriangle } from 'lucide-react';
+import {
+ Sheet,
+ SheetContent,
+ SheetHeader,
+ SheetTitle,
+ SheetDescription,
+} from '@/components/ui/sheet';
+import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs';
+import { Badge } from '@/components/ui/badge';
+import { Skeleton } from '@/components/ui/skeleton';
+import { Link } from '@/i18n/navigation';
+import { cn } from '@/lib/utils';
+import {
+ getInsightsBreakdown,
+ type BreakdownMetric,
+ type BreakdownRow,
+ type InsightsBreakdown,
+} from '@/lib/actions/tracking';
+
+const METRIC_TITLE: Record<BreakdownMetric, string> = {
+ mentions: 'Mentions',
+ visibility: 'Visibility Score',
+};
+
+const METRIC_UNIT: Record<BreakdownMetric, string> = {
+ mentions: '',
+ visibility: ' pts',
+};
+
+interface Props {
+ brandId: string | null;
+ metric: BreakdownMetric | null;
+ onOpenChange: (open: boolean) => void;
+ filters?: {
+ dateFrom?: string;
+ dateTo?: string;
+ region?: string;
+ model?: string;
+ topicId?: string;
+ };
+}
+
+export function MetricBreakdownSheet({
+ brandId,
+ metric,
+ onOpenChange,
+ filters,
+}: Props) {
+ const open = Boolean(brandId && metric);
+ const [data, setData] = useState<InsightsBreakdown | null>(null);
+ const [loading, setLoading] = useState(false);
+ const [error, setError] = useState<string | null>(null);
+
+ // Filters is passed as a fresh object each render from the parent — derive a
+ // stable cache key so the fetch effect doesn't re-run needlessly.
+ const filtersKey = useMemo(
+ () => JSON.stringify(filters ?? {}),
+ [filters],
+ );
+
+ useEffect(() => {
+ if (!open || !brandId || !metric) {
+ setData(null);
+ setError(null);
+ return;
+ }
+
+ let cancelled = false;
+ setLoading(true);
+ setError(null);
+
+ getInsightsBreakdown(brandId, metric, filters)
+ .then((res) => {
+ if (!cancelled) setData(res);
+ })
+ .catch((err: unknown) => {
+ if (!cancelled) {
+ setError(err instanceof Error ? err.message : 'Failed to load breakdown');
+ }
+ })
+ .finally(() => {
+ if (!cancelled) setLoading(false);
+ });
+
+ return () => {
+ cancelled = true;
+ };
+ // filtersKey is the stable dependency; `filters` is intentionally omitted.
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [open, brandId, metric, filtersKey]);
+
+ const title = metric ? METRIC_TITLE[metric] : '';
+
+ return (
+ <Sheet open={open} onOpenChange={onOpenChange}>
+ <SheetContent className="w-full flex flex-col gap-0 p-0 sm:max-w-xl">
+ <SheetHeader className="border-b px-5 py-4">
+ <SheetTitle className="text-base">
+ {title} Breakdown
+ </SheetTitle>
+ <SheetDescription className="text-xs">
+ {data
+ ? `Last ${data.windowDays} days vs previous ${data.windowDays} days`
+ : 'Comparing the selected window with the previous equal-length window.'}
+ </SheetDescription>
+ </SheetHeader>
+
+ <div className="flex-1 overflow-y-auto px-5 py-4">
+ {loading && <BreakdownSkeleton />}
+
+ {error && !loading && (
+ <div className="flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 p-3 text-sm text-destructive">
+ <AlertTriangle className="h-4 w-4 mt-0.5 shrink-0" />
+ <div>{error}</div>
+ </div>
+ )}
+
+ {!loading && !error && data && metric && (
+ <BreakdownBody data={data} metric={metric} />
+ )}
+ </div>
+ </SheetContent>
+ </Sheet>
+ );
+}
+
+function BreakdownSkeleton() {
+ return (
+ <div className="space-y-3">
+ <Skeleton className="h-14 w-full" />
+ <Skeleton className="h-8 w-60" />
+ <Skeleton className="h-10 w-full" />
+ {Array.from({ length: 6 }).map((_, i) => (
+ <Skeleton key={i} className="h-12 w-full" />
+ ))}
+ </div>
+ );
+}
+
+function BreakdownBody({
+ data,
+ metric,
+}: {
+ data: InsightsBreakdown;
+ metric: BreakdownMetric;
+}) {
+ const [tab, setTab] = useState<'prompts' | 'platforms' | 'topics'>('prompts');
+
+ const pickRows = () =>
+ tab === 'prompts' ? data.byPrompt
+ : tab === 'platforms' ? data.byPlatform
+ : data.byTopic;
+
+ return (
+ <div className="space-y-4">
+ {/* Summary */}
+ <div className="rounded-lg border bg-muted/30 p-3">
+ <div className="flex items-center justify-between gap-3">
+ <div className="min-w-0">
+ <div className="text-xs uppercase tracking-wide text-muted-foreground">
+ Current {data.windowDays}d
+ </div>
+ <div className="text-2xl font-semibold tabular-nums">
+ {formatValue(data.curTotal, metric)}
+ <span className="text-sm font-normal text-muted-foreground">
+ {METRIC_UNIT[metric]}
+ </span>
+ </div>
+ <div className="text-xs text-muted-foreground">
+ vs previous{' '}
+ <span className="tabular-nums">
+ {formatValue(data.prevTotal, metric)}
+ {METRIC_UNIT[metric]}
+ </span>
+ </div>
+ </div>
+ <DeltaPill
+ delta={data.delta}
+ deltaPct={data.deltaPct}
+ metric={metric}
+ big
+ />
+ </div>
+ <RootCauseSummary data={data} metric={metric} />
+ </div>
+
+ {/* Tabs */}
+ <Tabs value={tab} onValueChange={(v) => setTab(v as typeof tab)}>
+ <TabsList className="w-full">
+ <TabsTrigger value="prompts">
+ Prompts
+ <Badge variant="secondary" className="ml-1.5 h-5 px-1.5 text-[10px]">
+ {data.byPrompt.length}
+ </Badge>
+ </TabsTrigger>
+ <TabsTrigger value="platforms">
+ Platforms
+ <Badge variant="secondary" className="ml-1.5 h-5 px-1.5 text-[10px]">
+ {data.byPlatform.length}
+ </Badge>
+ </TabsTrigger>
+ <TabsTrigger value="topics">
+ Topics
+ <Badge variant="secondary" className="ml-1.5 h-5 px-1.5 text-[10px]">
+ {data.byTopic.length}
+ </Badge>
+ </TabsTrigger>
+ </TabsList>
+
+ <TabsContent value={tab} className="mt-3">
+ <BreakdownTable rows={pickRows()} metric={metric} kind={tab} />
+ </TabsContent>
+ </Tabs>
+ </div>
+ );
+}
+
+function RootCauseSummary({
+ data,
+ metric,
+}: {
+ data: InsightsBreakdown;
+ metric: BreakdownMetric;
+}) {
+ const isDrop = data.delta < 0;
+ const isFlat = data.delta === 0;
+ const topPrompt = isDrop
+ ? data.byPrompt[0]
+ : data.byPrompt[data.byPrompt.length - 1];
+ const topPlatform = isDrop
+ ? data.byPlatform[0]
+ : data.byPlatform[data.byPlatform.length - 1];
+ const promptContributes =
+ !!topPrompt && (isDrop ? topPrompt.delta < 0 : topPrompt.delta > 0);
+ const platformContributes =
+ !!topPlatform && (isDrop ? topPlatform.delta < 0 : topPlatform.delta > 0);
+
+ if (isFlat || !promptContributes || !topPrompt) {
+ return (
+ <div className="mt-2 text-xs text-muted-foreground leading-relaxed">
+ {data.rootCause}
+ </div>
+ );
+ }
+
+ return (
+ <div className="mt-2 text-xs text-muted-foreground leading-relaxed">
+ {isDrop ? 'Biggest drop' : 'Biggest gain'}:{' '}
+ <Link
+ href={`/dashboard/prompts/${topPrompt.id}`}
+ className="font-medium text-foreground underline-offset-2 hover:underline"
+ >
+ &quot;{truncate(topPrompt.label, 60)}&quot;
+ </Link>{' '}
+ {formatContribution(topPrompt, metric)}.
+ {platformContributes && topPlatform && (
+ <>
+ {' '}Top platform {isDrop ? 'drop' : 'gain'}: {topPlatform.label}{' '}
+ {formatContribution(topPlatform, metric)}.
+ </>
+ )}
+ </div>
+ );
+}
+
+function BreakdownTable({
+ rows,
+ metric,
+ kind,
+}: {
+ rows: BreakdownRow[];
+ metric: BreakdownMetric;
+ kind: 'prompts' | 'platforms' | 'topics';
+}) {
+ if (rows.length === 0) {
+ return (
+ <div className="py-10 text-center text-sm text-muted-foreground">
+ No data in this window yet.
+ </div>
+ );
+ }
+
+ return (
+ <div className="overflow-hidden rounded-md border">
+ <table className="w-full text-sm">
+ <thead>
+ <tr className="border-b bg-muted/40 text-[11px] uppercase tracking-wide text-muted-foreground">
+ <th className="text-left font-medium px-3 py-2">Name</th>
+ <th className="text-right font-medium px-2 py-2 w-16">Prev</th>
+ <th className="text-right font-medium px-2 py-2 w-16">Cur</th>
+ <th className="text-right font-medium px-2 py-2 w-24">Change</th>
+ </tr>
+ </thead>
+ <tbody>
+ {rows.map((r) => (
+ <tr key={r.id} className="border-b last:border-b-0 hover:bg-muted/30">
+ <td className="px-3 py-2.5 min-w-0">
+ {kind === 'prompts' ? (
+ <Link
+ href={`/dashboard/prompts/${r.id}`}
+ className="line-clamp-2 text-sm transition-colors hover:text-primary hover:underline"
+ >
+ {r.label}
+ </Link>
+ ) : (
+ <div className="line-clamp-2 text-sm">{r.label}</div>
+ )}
+ {r.sublabel && (
+ <div className="mt-0.5 text-[11px] text-muted-foreground">
+ {r.sublabel}
+ </div>
+ )}
+ </td>
+ <td className="px-2 py-2 text-right tabular-nums text-muted-foreground">
+ {formatValue(r.prev, metric)}
+ </td>
+ <td className="px-2 py-2 text-right tabular-nums">
+ {formatValue(r.cur, metric)}
+ </td>
+ <td className="px-2 py-2 text-right">
+ <DeltaPill
+ delta={r.delta}
+ deltaPct={r.deltaPct}
+ metric={metric}
+ />
+ </td>
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ </div>
+ );
+}
+
+function DeltaPill({
+ delta,
+ deltaPct,
+ metric,
+ big = false,
+}: {
+ delta: number;
+ deltaPct: number | null;
+ metric: BreakdownMetric;
+ big?: boolean;
+}) {
+ if (delta === 0) {
+ return (
+ <span
+ className={cn(
+ 'inline-flex items-center gap-0.5 text-muted-foreground tabular-nums',
+ big ? 'text-sm' : 'text-xs',
+ )}
+ >
+ <Minus className={big ? 'h-3.5 w-3.5' : 'h-3 w-3'} />0
+ </span>
+ );
+ }
+
+ const positive = delta > 0;
+ const Icon = positive ? TrendingUp : TrendingDown;
+ const color = positive
+ ? 'text-green-600 dark:text-green-400'
+ : 'text-red-500';
+
+ // Prefer percentage display for count metrics when available; fall back to
+ // absolute delta for visibility (pts) or when previous was zero.
+ const showPct = metric !== 'visibility' && deltaPct !== null;
+ const sign = positive ? '+' : '';
+ const primary = showPct
+ ? `${sign}${deltaPct}%`
+ : metric === 'visibility'
+ ? `${sign}${delta} pts`
+ : `${sign}${delta}`;
+ const secondary = showPct ? `${sign}${delta}` : null;
+
+ return (
+ <span
+ className={cn(
+ 'inline-flex items-center gap-1 font-medium tabular-nums',
+ big ? 'text-sm' : 'text-xs',
+ color,
+ )}
+ >
+ <Icon className={big ? 'h-3.5 w-3.5' : 'h-3 w-3'} />
+ <span>{primary}</span>
+ {secondary && (
+ <span
+ className={cn(
+ 'font-normal text-muted-foreground',
+ big ? 'text-xs' : 'text-[10px]',
+ )}
+ >
+ ({secondary})
+ </span>
+ )}
+ </span>
+ );
+}
+
+function formatValue(value: number, metric: BreakdownMetric): string {
+ if (metric === 'visibility') {
+ return value.toLocaleString(undefined, { maximumFractionDigits: 1 });
+ }
+ return value.toLocaleString();
+}
+
+function formatContribution(row: BreakdownRow, metric: BreakdownMetric): string {
+ const isLoss = row.delta < 0;
+ const abs = Math.abs(row.delta);
+
+ if (metric === 'visibility') {
+ const verb = isLoss ? 'dropped' : 'rose';
+ return `${verb} ${Math.round(abs * 10) / 10} pts`;
+ }
+
+ const verb = isLoss ? 'lost' : 'gained';
+ const core = `${verb} ${abs.toLocaleString()} mentions`;
+ if (row.deltaPct === null) return core;
+ const sign = row.deltaPct < 0 ? '−' : '+';
+ return `${core} (${sign}${Math.abs(row.deltaPct)}%)`;
+}
+
+function truncate(value: string, max: number): string {
+ return value.length > max ? `${value.slice(0, max - 1)}…` : value;
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/insights/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/insights/page.tsx
new file mode 100644
index 000000000..703c5aef1
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/insights/page.tsx
@@ -0,0 +1,1908 @@
+'use client';
+
+import { useState, useRef, useEffect, useCallback } from 'react';
+import { useRouter } from '@/i18n/navigation';
+import { useSearchParams } from 'next/navigation';
+import { createPortal } from 'react-dom';
+import { CompetitorChart, CompetitorLeaderboard, ShareOfVoicePlatformChart, ShareOfVoiceTrendChart } from './_charts';
+import { MetricBreakdownSheet } from './_metric-breakdown-sheet';
+import { useBrandStore } from '@/stores/use-brand-store';
+import {
+ getPromptResults,
+ getInsightsSummary,
+ getCompetitorComparison,
+ getShareOfVoiceData,
+ triggerTrackingCheck,
+ getJobStatus,
+ cancelTrackingJob,
+ getBrandPrompts,
+ type PromptResultWithText,
+ type InsightsSummary,
+ type CompetitorComparisonData,
+ type ShareOfVoiceData,
+ type TrackingJobStatus,
+ type BreakdownMetric,
+} from '@/lib/actions/tracking';
+import { getTopics } from '@/lib/actions/topic';
+import type { Topic } from '@/types';
+import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
+import { Badge } from '@/components/ui/badge';
+import { Button } from '@/components/ui/button';
+import {
+ Dialog,
+ DialogContent,
+ DialogHeader,
+ DialogTitle,
+} from '@/components/ui/dialog';
+import {
+ Table,
+ TableBody,
+ TableCell,
+ TableRow,
+} from '@/components/ui/table';
+import { Skeleton } from '@/components/ui/skeleton';
+import {
+ BarChart3,
+ CalendarX2,
+ ChevronDown,
+ HelpCircle,
+ Play,
+ TrendingUp,
+ TrendingDown,
+ Quote,
+ Zap,
+ AlertCircle,
+ Loader2,
+ Eye,
+ RefreshCw,
+ FlaskConical,
+ PieChart,
+ Users,
+ StopCircle,
+ Tag,
+ ArrowUpRight,
+} from 'lucide-react';
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from '@/components/ui/select';
+import { Input } from '@/components/ui/input';
+import { cn } from '@/lib/utils';
+import {
+ AIProviderAvatar,
+ getAIProviderDisplayName,
+ resolveAIProvider,
+} from '@/components/ai-provider-avatar';
+import { usePlanContext } from '@/components/providers/plan-provider';
+import { toast } from 'sonner';
+
+// ─── Filter Types ─────────────────────────────────────────────────────────────
+
+type DatePreset = '24h' | '7d' | '30d' | '90d' | 'all' | 'custom';
+
+interface InsightsFilters {
+ datePreset: DatePreset;
+ dateFrom: string;
+ dateTo: string;
+ region: string;
+ model: string;
+ topic: string;
+}
+
+const DEFAULT_FILTERS: InsightsFilters = {
+ datePreset: 'all',
+ dateFrom: '',
+ dateTo: '',
+ region: '',
+ model: '',
+ topic: '',
+};
+
+/** Max rows loaded for the grouped Prompt Results table (newest first).
+ * Sized to show several recent runs per (prompt × platform) pair so the
+ * "previous runs" history inside each platform group has meaningful depth. */
+const PROMPT_RESULTS_ROW_LIMIT = 1500;
+
+function getDateRange(
+ preset: DatePreset,
+ custom: { from: string; to: string },
+) {
+ if (preset === 'all') return { dateFrom: undefined, dateTo: undefined };
+ if (preset === 'custom') {
+ return {
+ dateFrom: custom.from || undefined,
+ dateTo: custom.to ? `${custom.to}T23:59:59.999Z` : undefined,
+ };
+ }
+ if (preset === '24h') {
+ const from = new Date();
+ from.setHours(from.getHours() - 24);
+ return { dateFrom: from.toISOString(), dateTo: undefined };
+ }
+ const days = preset === '7d' ? 7 : preset === '30d' ? 30 : 90;
+ const from = new Date();
+ from.setDate(from.getDate() - days);
+ return { dateFrom: from.toISOString(), dateTo: undefined };
+}
+
+// ─── Info Tooltip ─────────────────────────────────────────────────────────────
+
+function InfoTip({ content }: { content: string }) {
+ const [pos, setPos] = useState<{ x: number; y: number } | null>(null);
+ const ref = useRef<HTMLSpanElement>(null);
+
+ function show() {
+ const r = ref.current?.getBoundingClientRect();
+ if (r) setPos({ x: r.left + r.width / 2, y: r.bottom + 6 });
+ }
+
+ return (
+ <>
+ <span
+ ref={ref}
+ onMouseEnter={show}
+ onMouseLeave={() => setPos(null)}
+ className="inline-flex items-center cursor-help"
+ >
+ <HelpCircle className="h-3 w-3 text-muted-foreground/60 hover:text-muted-foreground transition-colors" />
+ </span>
+ {pos &&
+ createPortal(
+ <div
+ style={{ left: pos.x, top: pos.y, transform: 'translateX(-50%)' }}
+ className="pointer-events-none fixed z-[9999] w-56 rounded-md border bg-popover px-3 py-2 text-xs text-popover-foreground shadow-md"
+ >
+ {content}
+ </div>,
+ document.body,
+ )}
+ </>
+ );
+}
+
+// ─── Sub-components ───────────────────────────────────────────────────────────
+
+function SentimentBadge({
+ sentiment,
+}: {
+ sentiment: 'positive' | 'neutral' | 'negative';
+}) {
+ return (
+ <Badge
+ variant="outline"
+ className={cn(
+ 'text-xs capitalize',
+ sentiment === 'positive' &&
+ 'border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400',
+ sentiment === 'neutral' &&
+ 'border-yellow-500/30 bg-yellow-500/10 text-yellow-600 dark:text-yellow-400',
+ sentiment === 'negative' &&
+ 'border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400',
+ )}
+ >
+ {sentiment}
+ </Badge>
+ );
+}
+
+function VisibilityBar({ score, max = 100 }: { score: number; max?: number }) {
+ const pct = Math.round((score / max) * 100);
+ return (
+ <div className="flex items-center gap-2">
+ <div className="h-1.5 w-24 rounded-full bg-muted overflow-hidden">
+ <div
+ className={cn(
+ 'h-full rounded-full transition-all',
+ score >= 60
+ ? 'bg-green-500'
+ : score >= 40
+ ? 'bg-yellow-500'
+ : 'bg-red-500',
+ )}
+ style={{ width: `${pct}%` }}
+ />
+ </div>
+ <span className="text-sm font-medium tabular-nums">{Math.round(score)}</span>
+ </div>
+ );
+}
+
+const PLATFORM_LABELS: Record<string, string> = {
+ chatgpt: 'ChatGPT',
+ gemini: 'Gemini',
+ perplexity: 'Perplexity',
+ claude: 'Claude',
+ grok: 'Grok',
+ copilot: 'Copilot',
+ 'meta-ai': 'Meta AI',
+ 'google-ai-overviews': 'Google AI',
+ 'google-ai-mode': 'Google AI Mode',
+ 'chatgpt-web': 'ChatGPT',
+ 'google-aio': 'Google AI Overview',
+ 'google-aimode': 'Google AI Mode',
+ 'copilot-web': 'Microsoft Copilot',
+ 'grok-web': 'Grok',
+ 'perplexity-web': 'Perplexity',
+ 'gemini-web': 'Google Gemini',
+};
+
+const MODEL_DISPLAY_NAME: Record<string, string> = {
+ 'gpt-4o': 'GPT-4o',
+ 'gpt-4o-mini': 'GPT-4o Mini',
+ 'gpt-4.1': 'GPT-4.1',
+ 'gpt-4.1-mini': 'GPT-4.1 Mini',
+ 'gpt-4.1-nano': 'GPT-4.1 Nano',
+ 'gpt-5-chat-latest': 'ChatGPT',
+ 'claude-sonnet-4-6': 'Claude',
+ 'claude-opus-4-6': 'Claude',
+ 'claude-haiku-4-5': 'Claude',
+ 'gemini-2.5-pro': 'Gemini 2.5 Pro',
+ 'gemini-2.5-flash': 'Gemini 2.5 Flash',
+ 'grok-3': 'Grok',
+ 'grok-4-auto': 'Grok',
+ 'chatgpt-web': 'ChatGPT',
+ 'perplexity-web': 'Perplexity',
+ 'google-aio': 'Google AI Overview',
+ 'google-aimode': 'Google AI Mode',
+ 'copilot-web': 'Microsoft Copilot',
+ 'grok-web': 'Grok',
+ 'gemini-web': 'Gemini',
+};
+
+function getModelDisplayName(model: string, platform?: string): string {
+ if (platform && MODEL_DISPLAY_NAME[platform]) {
+ const modelName = MODEL_DISPLAY_NAME[model];
+ return modelName && modelName !== MODEL_DISPLAY_NAME[platform]
+ ? `${MODEL_DISPLAY_NAME[platform]} · ${modelName}`
+ : MODEL_DISPLAY_NAME[platform];
+ }
+ return MODEL_DISPLAY_NAME[model] ?? model;
+}
+
+function ModelBadge({ model, platform }: { model: string; platform?: string }) {
+ const provider = resolveAIProvider(model, platform);
+
+ return (
+ <span className="inline-flex items-center gap-1.5">
+ <AIProviderAvatar provider={provider} />
+ <span className="text-xs">{getModelDisplayName(model, platform)}</span>
+ </span>
+ );
+}
+
+interface PlatformGroup {
+ key: string;
+ platform: string;
+ modelUsed?: string;
+ region?: string;
+ results: PromptResultWithText[];
+ latest: PromptResultWithText;
+ latestScore: number;
+ avgScore: number;
+ totalMentions: number;
+ totalCitations: number;
+}
+
+interface PromptGroup {
+ promptId: string;
+ promptText: string;
+ promptCategory?: string;
+ results: PromptResultWithText[];
+ platformGroups: PlatformGroup[];
+ avgScore: number;
+ totalMentions: number;
+ totalCitations: number;
+}
+
+function groupResultsByPlatform(items: PromptResultWithText[]): PlatformGroup[] {
+ const map = new Map<string, PromptResultWithText[]>();
+ for (const r of items) {
+ const key = `${r.platform}|${r.modelUsed ?? ''}`;
+ const arr = map.get(key) || [];
+ arr.push(r);
+ map.set(key, arr);
+ }
+
+ return Array.from(map.entries())
+ .map(([key, arr]) => {
+ const sorted = [...arr].sort(
+ (a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(),
+ );
+ const latest = sorted[0];
+ return {
+ key,
+ platform: latest.platform,
+ modelUsed: latest.modelUsed,
+ region: latest.region,
+ results: sorted,
+ latest,
+ latestScore: latest.visibilityScore,
+ avgScore:
+ Math.round(
+ (sorted.reduce((s, r) => s + r.visibilityScore, 0) / sorted.length) * 10,
+ ) / 10,
+ totalMentions: sorted.reduce((s, r) => s + r.mentionCount, 0),
+ totalCitations: sorted.reduce((s, r) => s + r.citationCount, 0),
+ } satisfies PlatformGroup;
+ })
+ .sort((a, b) => b.latestScore - a.latestScore);
+}
+
+function computePromptGroup(promptId: string, items: PromptResultWithText[]): PromptGroup {
+ const sorted = [...items].sort(
+ (a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(),
+ );
+ return {
+ promptId,
+ promptText: sorted[0].promptText,
+ promptCategory: sorted[0].promptCategory,
+ results: sorted,
+ platformGroups: groupResultsByPlatform(sorted),
+ avgScore: Math.round(
+ sorted.reduce((s, r) => s + r.visibilityScore, 0) / sorted.length,
+ ),
+ totalMentions: sorted.reduce((s, r) => s + r.mentionCount, 0),
+ totalCitations: sorted.reduce((s, r) => s + r.citationCount, 0),
+ };
+}
+
+function groupResultsByPrompt(results: PromptResultWithText[]): PromptGroup[] {
+ const map = new Map<string, PromptResultWithText[]>();
+ for (const r of results) {
+ const arr = map.get(r.promptId) || [];
+ arr.push(r);
+ map.set(r.promptId, arr);
+ }
+ return Array.from(map.entries()).map(([promptId, items]) =>
+ computePromptGroup(promptId, items),
+ );
+}
+
+interface TopicGroup {
+ topicId: string;
+ topicName: string;
+ prompts: PromptGroup[];
+ avgScore: number;
+ totalMentions: number;
+ totalCitations: number;
+ totalResults: number;
+}
+
+function groupResultsByTopic(results: PromptResultWithText[]): TopicGroup[] {
+ const topicMap = new Map<string, PromptResultWithText[]>();
+ for (const r of results) {
+ const key = r.topicName ?? '__uncategorized__';
+ const arr = topicMap.get(key) || [];
+ arr.push(r);
+ topicMap.set(key, arr);
+ }
+
+ return Array.from(topicMap.entries())
+ .map(([topicName, items]) => {
+ const promptMap = new Map<string, PromptResultWithText[]>();
+ for (const r of items) {
+ const arr = promptMap.get(r.promptId) || [];
+ arr.push(r);
+ promptMap.set(r.promptId, arr);
+ }
+ const prompts = Array.from(promptMap.entries()).map(([pid, pItems]) =>
+ computePromptGroup(pid, pItems),
+ );
+ return {
+ topicId: items[0].topicId ?? `__cat_${topicName}`,
+ topicName: topicName === '__uncategorized__' ? 'Uncategorized' : topicName,
+ prompts,
+ avgScore: Math.round(
+ items.reduce((s, r) => s + r.visibilityScore, 0) / items.length,
+ ),
+ totalMentions: items.reduce((s, r) => s + r.mentionCount, 0),
+ totalCitations: items.reduce((s, r) => s + r.citationCount, 0),
+ totalResults: items.length,
+ };
+ })
+ .sort((a, b) => b.avgScore - a.avgScore);
+}
+
+// ─── Delta Badge ──────────────────────────────────────────────────────────────
+
+function DeltaBadge({
+ delta,
+ suffix = '%',
+}: {
+ delta: number | null;
+ suffix?: string;
+}) {
+ if (delta === null) return null;
+ if (delta === 0)
+ return <span className="text-xs text-muted-foreground">— 0{suffix}</span>;
+ const pos = delta > 0;
+ return (
+ <span
+ className={cn(
+ 'flex items-center gap-0.5 text-xs font-medium',
+ pos ? 'text-green-600 dark:text-green-400' : 'text-red-500',
+ )}
+ >
+ {pos ? (
+ <TrendingUp className="h-3 w-3" />
+ ) : (
+ <TrendingDown className="h-3 w-3" />
+ )}
+ {pos ? '+' : ''}
+ {delta}
+ {suffix}
+ </span>
+ );
+}
+
+// ─── KPI Card ─────────────────────────────────────────────────────────────────
+
+function KpiCard({
+ title,
+ tooltip,
+ icon: Icon,
+ value,
+ sub,
+ subVariant = 'muted',
+ onClick,
+}: {
+ title: string;
+ tooltip: string;
+ icon: React.ElementType;
+ value: React.ReactNode;
+ sub: React.ReactNode;
+ subVariant?: 'muted' | 'positive';
+ onClick?: () => void;
+}) {
+ const clickable = typeof onClick === 'function';
+ return (
+ <Card
+ onClick={clickable ? onClick : undefined}
+ role={clickable ? 'button' : undefined}
+ tabIndex={clickable ? 0 : undefined}
+ aria-label={clickable ? `${title} — view breakdown` : undefined}
+ title={clickable ? 'Click to see breakdown' : undefined}
+ onKeyDown={
+ clickable
+ ? (e) => {
+ if (e.key === 'Enter' || e.key === ' ') {
+ e.preventDefault();
+ onClick?.();
+ }
+ }
+ : undefined
+ }
+ className={cn(
+ 'group relative',
+ clickable &&
+ 'cursor-pointer transition-all duration-150 hover:border-foreground/30 hover:shadow-md hover:-translate-y-0.5 hover:bg-accent/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
+ )}
+ >
+ <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-1">
+ <CardTitle className="flex items-center gap-1 text-xs font-medium text-muted-foreground uppercase tracking-wide">
+ {title}
+ <InfoTip content={tooltip} />
+ </CardTitle>
+ <div className="relative flex h-4 w-4 items-center justify-center">
+ <Icon
+ className={cn(
+ 'h-3.5 w-3.5 text-muted-foreground transition-opacity',
+ clickable && 'group-hover:opacity-0',
+ )}
+ />
+ {clickable && (
+ <ArrowUpRight
+ className="absolute h-4 w-4 text-foreground opacity-0 transition-opacity group-hover:opacity-100"
+ aria-hidden
+ />
+ )}
+ </div>
+ </CardHeader>
+ <CardContent>
+ <div className="text-3xl font-bold">{value}</div>
+ <p
+ className={cn(
+ 'text-xs mt-1 flex items-center gap-0.5',
+ subVariant === 'positive'
+ ? 'text-green-600 dark:text-green-400'
+ : 'text-muted-foreground',
+ )}
+ >
+ {sub}
+ </p>
+ {clickable && (
+ <p className="mt-2 flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70 opacity-0 transition-opacity group-hover:opacity-100">
+ View breakdown
+ <ArrowUpRight className="h-2.5 w-2.5" />
+ </p>
+ )}
+ </CardContent>
+ </Card>
+ );
+}
+
+
+// ─── Run Single Prompt Dialog ─────────────────────────────────────────────────
+
+function RunSinglePromptDialog({
+ brandId,
+ open,
+ onClose,
+ onJobStarted,
+}: {
+ brandId: string;
+ open: boolean;
+ onClose: () => void;
+ onJobStarted: (jobId: string) => void;
+}) {
+ const [prompts, setPrompts] = useState<
+ { id: string; text: string; category?: string; platforms: string[] }[]
+ >([]);
+ const [loading, setLoading] = useState(false);
+ const [runningId, setRunningId] = useState<string | null>(null);
+
+ useEffect(() => {
+ if (!open) return;
+ setLoading(true);
+ getBrandPrompts(brandId)
+ .then(setPrompts)
+ .catch(() => toast.error('Failed to load prompts'))
+ .finally(() => setLoading(false));
+ }, [open, brandId]);
+
+ const handleRun = async (promptId: string) => {
+ setRunningId(promptId);
+ try {
+ const { jobId } = await triggerTrackingCheck(brandId, { promptId });
+ onClose();
+ onJobStarted(jobId);
+ } catch (err) {
+ toast.error(err instanceof Error ? err.message : 'Failed to run prompt');
+ } finally {
+ setRunningId(null);
+ }
+ };
+
+ return (
+ <Dialog open={open} onOpenChange={(v) => !v && onClose()}>
+ <DialogContent className="max-w-[calc(100%-2rem)] sm:max-w-lg max-h-[70vh] overflow-y-auto">
+ <DialogHeader>
+ <DialogTitle className="flex items-center gap-2 text-base">
+ <FlaskConical className="h-4 w-4" />
+ Run Single Prompt
+ </DialogTitle>
+ <p className="text-sm text-muted-foreground">
+ Pick a prompt to test. Only that prompt will run across your enabled
+ platforms.
+ </p>
+ </DialogHeader>
+
+ <div className="space-y-2 pt-2">
+ {loading && (
+ <div className="space-y-2">
+ {Array.from({ length: 3 }).map((_, i) => (
+ <Skeleton key={i} className="h-14 w-full" />
+ ))}
+ </div>
+ )}
+
+ {!loading && prompts.length === 0 && (
+ <p className="text-sm text-muted-foreground py-6 text-center">
+ No active prompts found. Add prompts in brand settings first.
+ </p>
+ )}
+
+ {!loading &&
+ prompts.map((p) => (
+ <div
+ key={p.id}
+ className="flex items-center gap-3 rounded-lg border p-3 hover:bg-muted/50 transition-colors"
+ >
+ <div className="flex-1 min-w-0">
+ <p className="text-sm font-medium line-clamp-2">{p.text}</p>
+ {p.category && (
+ <Badge variant="outline" className="text-[10px] mt-1">
+ {p.category}
+ </Badge>
+ )}
+ </div>
+ <Button
+ size="sm"
+ variant="outline"
+ className="gap-1.5 shrink-0"
+ disabled={runningId !== null}
+ onClick={() => handleRun(p.id)}
+ >
+ {runningId === p.id ? (
+ <Loader2 className="h-3.5 w-3.5 animate-spin" />
+ ) : (
+ <Play className="h-3.5 w-3.5" />
+ )}
+ Run
+ </Button>
+ </div>
+ ))}
+ </div>
+ </DialogContent>
+ </Dialog>
+ );
+}
+
+// ─── Filter Bar ───────────────────────────────────────────────────────────────
+
+function FilterBar({
+ filters,
+ onChange,
+ availableRegions,
+ availableModels,
+ availableTopics,
+}: {
+ filters: InsightsFilters;
+ onChange: (f: InsightsFilters) => void;
+ availableRegions: string[];
+ availableModels: string[];
+ availableTopics: Topic[];
+}) {
+ const set = (patch: Partial<InsightsFilters>) =>
+ onChange({ ...filters, ...patch });
+
+ return (
+ <div className="flex flex-wrap items-end gap-3">
+ {/* Date presets */}
+ <div>
+ <label className="mb-1.5 block text-xs font-medium text-muted-foreground">
+ Date Range
+ </label>
+ <div className="flex rounded-md border overflow-hidden">
+ {(['24h', '7d', '30d', '90d', 'all', 'custom'] as DatePreset[]).map(
+ (p) => (
+ <button
+ key={p}
+ type="button"
+ onClick={() => set({ datePreset: p })}
+ className={cn(
+ 'px-3 py-1.5 text-xs font-medium transition-colors',
+ filters.datePreset === p
+ ? 'bg-primary text-primary-foreground'
+ : 'bg-card hover:bg-muted text-foreground',
+ )}
+ >
+ {p === 'custom' ? 'Custom' : p === 'all' ? 'All' : p}
+ </button>
+ ),
+ )}
+ </div>
+ </div>
+
+ {/* Custom date inputs */}
+ {filters.datePreset === 'custom' && (
+ <>
+ <div>
+ <label className="mb-1.5 block text-xs font-medium text-muted-foreground">
+ From
+ </label>
+ <Input
+ type="date"
+ value={filters.dateFrom}
+ onChange={(e) => set({ dateFrom: e.target.value })}
+ className="h-8 w-36 text-xs"
+ />
+ </div>
+ <div>
+ <label className="mb-1.5 block text-xs font-medium text-muted-foreground">
+ To
+ </label>
+ <Input
+ type="date"
+ value={filters.dateTo}
+ onChange={(e) => set({ dateTo: e.target.value })}
+ className="h-8 w-36 text-xs"
+ />
+ </div>
+ </>
+ )}
+
+ {/* Topic filter */}
+ {availableTopics.length > 0 && (
+ <div>
+ <label className="mb-1.5 block text-xs font-medium text-muted-foreground">
+ Topic
+ </label>
+ <Select
+ value={filters.topic || null}
+ onValueChange={(v) => set({ topic: !v || v === '__all__' ? '' : v })}
+ >
+ <SelectTrigger className="h-8 w-40 text-xs">
+ <SelectValue placeholder="All Topics">
+ {(value) =>
+ value && value !== '__all__'
+ ? availableTopics.find((t) => t.id === value)?.name ?? 'All Topics'
+ : 'All Topics'
+ }
+ </SelectValue>
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="__all__">All Topics</SelectItem>
+ {availableTopics.map((t) => (
+ <SelectItem key={t.id} value={t.id}>
+ {t.name}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+ )}
+
+ {/* Region filter */}
+ <div>
+ <label className="mb-1.5 block text-xs font-medium text-muted-foreground">
+ Region
+ </label>
+ <Select
+ value={filters.region || null}
+ onValueChange={(v) => set({ region: !v || v === '__all__' ? '' : v })}
+ >
+ <SelectTrigger className="h-8 w-32 text-xs">
+ <SelectValue placeholder="All Regions" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="__all__">All Regions</SelectItem>
+ {availableRegions.map((r) => (
+ <SelectItem key={r} value={r}>
+ {r}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+
+ {/* Model filter */}
+ <div>
+ <label className="mb-1.5 block text-xs font-medium text-muted-foreground">
+ AI Model
+ </label>
+ <Select
+ value={filters.model || null}
+ onValueChange={(v) => set({ model: !v || v === '__all__' ? '' : v })}
+ >
+ <SelectTrigger className="h-8 w-44 text-xs">
+ <SelectValue placeholder="All Platforms" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="__all__">All Platforms</SelectItem>
+ {availableModels.map((m) => (
+ <SelectItem key={m} value={m}>
+ {MODEL_DISPLAY_NAME[m] ??
+ PLATFORM_LABELS[m] ??
+ getAIProviderDisplayName(resolveAIProvider(m))}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+ </div>
+ );
+}
+
+// ─── Loading Skeleton ─────────────────────────────────────────────────────────
+
+function InsightsSkeleton() {
+ return (
+ <div className="space-y-6">
+ <div className="flex items-start justify-between gap-4">
+ <div className="space-y-2">
+ <Skeleton className="h-8 w-64" />
+ <Skeleton className="h-4 w-80" />
+ </div>
+ <Skeleton className="h-10 w-32" />
+ </div>
+ <div className="grid grid-cols-2 gap-4 sm:grid-cols-4">
+ {Array.from({ length: 4 }).map((_, i) => (
+ <Card key={i}>
+ <CardContent className="pt-6 space-y-2">
+ <Skeleton className="h-4 w-24" />
+ <Skeleton className="h-8 w-16" />
+ <Skeleton className="h-3 w-32" />
+ </CardContent>
+ </Card>
+ ))}
+ </div>
+ <Card>
+ <CardContent className="pt-6">
+ <Skeleton className="h-48 w-full" />
+ </CardContent>
+ </Card>
+ </div>
+ );
+}
+
+// ─── Empty State ──────────────────────────────────────────────────────────────
+
+function EmptyState({
+ onRunPrompts,
+ isRunning,
+ isCloud,
+}: {
+ onRunPrompts: () => void;
+ isRunning: boolean;
+ isCloud: boolean;
+}) {
+ return (
+ <div className="flex flex-col items-center justify-center py-20 text-center">
+ <BarChart3 className="h-12 w-12 text-muted-foreground/40 mb-4" />
+ <h2 className="text-lg font-semibold">No tracking data yet</h2>
+ <p className="text-muted-foreground text-sm mt-1 max-w-md">
+ Run your prompts through AI platforms to see how your brand appears in
+ AI-generated responses.
+ </p>
+ {!isCloud && (
+ <Button
+ onClick={onRunPrompts}
+ disabled={isRunning}
+ className="mt-6 gap-2"
+ >
+ {isRunning ? (
+ <Loader2 className="h-4 w-4 animate-spin" />
+ ) : (
+ <Play className="h-4 w-4" />
+ )}
+ Run Prompts Now
+ </Button>
+ )}
+ </div>
+ );
+}
+
+function NoDataForPeriod({
+ datePreset,
+ onReset,
+}: {
+ datePreset: DatePreset;
+ onReset: () => void;
+}) {
+ const labels: Record<DatePreset, string> = {
+ '24h': 'last 24 hours',
+ '7d': 'last 7 days',
+ '30d': 'last 30 days',
+ '90d': 'last 90 days',
+ all: 'selected period',
+ custom: 'selected period',
+ };
+ return (
+ <div className="flex flex-col items-center justify-center py-16 text-center">
+ <CalendarX2 className="h-10 w-10 text-muted-foreground/40 mb-3" />
+ <h3 className="text-base font-semibold">
+ No results for the {labels[datePreset]}
+ </h3>
+ <p className="text-muted-foreground text-sm mt-1 max-w-sm">
+ There is tracking data available in other time periods. Try a wider
+ range or switch to &quot;All time&quot;.
+ </p>
+ <Button variant="outline" size="sm" className="mt-4" onClick={onReset}>
+ Show all data
+ </Button>
+ </div>
+ );
+}
+
+// ─── Tracking Progress ────────────────────────────────────────────────────────
+
+import { saveTrackingJob, loadTrackingJob, clearTrackingJob } from '@/lib/tracking-job-store';
+
+function TrackingProgressBanner({
+ jobStatus,
+ onStop,
+}: {
+ jobStatus: TrackingJobStatus | null;
+ onStop: () => void;
+}) {
+ if (!jobStatus) return null;
+
+ const isActive =
+ jobStatus.status === 'active' || jobStatus.status === 'waiting';
+ if (!isActive) return null;
+
+ const progress = jobStatus.progress;
+ const pct = progress
+ ? Math.round((progress.current / progress.total) * 100)
+ : 0;
+
+ return (
+ <div className="rounded-lg border border-primary/20 bg-primary/5 px-4 py-3 space-y-2">
+ <div className="flex items-center justify-between">
+ <div className="flex items-center gap-2">
+ <Loader2 className="h-4 w-4 animate-spin text-primary" />
+ <span className="text-sm font-medium">
+ {jobStatus.status === 'waiting'
+ ? 'Queued — waiting to start...'
+ : 'Analyzing prompts...'}
+ </span>
+ {progress && (
+ <span className="text-xs text-muted-foreground tabular-nums">
+ {progress.current}/{progress.total}
+ </span>
+ )}
+ </div>
+ <Button
+ variant="ghost"
+ size="sm"
+ className="h-7 gap-1.5 text-xs text-destructive hover:text-destructive hover:bg-destructive/10"
+ onClick={onStop}
+ >
+ <StopCircle className="h-3.5 w-3.5" />
+ Stop
+ </Button>
+ </div>
+
+ {progress && progress.total > 0 && (
+ <>
+ <div className="h-1.5 w-full rounded-full bg-muted overflow-hidden">
+ <div
+ className="h-full rounded-full bg-primary transition-all duration-500"
+ style={{ width: `${Math.max(pct, 2)}%` }}
+ />
+ </div>
+ {progress.promptText && (
+ <p className="text-xs text-muted-foreground truncate">
+ {progress.model && (
+ <span className="font-medium text-foreground">
+ {PLATFORM_LABELS[progress.model] ?? progress.model}
+ {progress.region && <span> · {progress.region}</span>}
+ {' — '}
+ </span>
+ )}
+ {progress.promptText}
+ </p>
+ )}
+ </>
+ )}
+ </div>
+ );
+}
+
+// ─── Prompt Results Grouped ───────────────────────────────────────────────────
+
+function formatTimestamp(iso: string): string {
+ const d = new Date(iso);
+ if (Number.isNaN(d.getTime())) return '—';
+ return d.toLocaleString(undefined, {
+ month: 'short',
+ day: 'numeric',
+ hour: 'numeric',
+ minute: '2-digit',
+ });
+}
+
+function PlatformSubGroup({
+ group,
+ expanded,
+ onToggle,
+ onViewResult,
+}: {
+ group: PlatformGroup;
+ expanded: boolean;
+ onToggle: () => void;
+ onViewResult: (r: PromptResultWithText) => void;
+}) {
+ const HISTORY_LIMIT = 8;
+ const history = group.results.slice(1, 1 + HISTORY_LIMIT);
+ const hasMoreHistory = group.results.length > 1 + HISTORY_LIMIT;
+ const latest = group.latest;
+ const responsePreview =
+ (latest.response ?? '').trim().length > 0
+ ? latest.response
+ : 'No response text available.';
+
+ return (
+ <div className="rounded-md border bg-background/50">
+ <div
+ role="button"
+ tabIndex={0}
+ onClick={onToggle}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); onToggle(); }
+ }}
+ className="flex w-full items-center gap-3 px-3 py-2 hover:bg-muted/40 transition-colors cursor-pointer select-none"
+ >
+ <ChevronDown className={cn('h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform', !expanded && '-rotate-90')} />
+ <div className="flex-1 min-w-0 flex items-center gap-2">
+ <ModelBadge
+ model={latest.modelUsed ?? latest.platform}
+ platform={latest.platform}
+ />
+ {latest.region && (
+ <Badge variant="outline" className="text-[10px]">{latest.region}</Badge>
+ )}
+ <span className="text-[10px] text-muted-foreground tabular-nums ml-1">
+ {group.results.length} run{group.results.length !== 1 ? 's' : ''}
+ </span>
+ </div>
+ <div className="flex items-center gap-4 shrink-0">
+ <div className="hidden sm:block text-right">
+ <p className="text-[10px] text-muted-foreground">Mentions</p>
+ <p className="text-xs font-semibold tabular-nums">{latest.mentionCount}</p>
+ </div>
+ <div className="hidden sm:block text-right">
+ <p className="text-[10px] text-muted-foreground">Citations</p>
+ <p className="text-xs font-semibold tabular-nums">{latest.citationCount}</p>
+ </div>
+ <SentimentBadge sentiment={latest.sentiment} />
+ <div className="w-[100px] sm:w-[140px]">
+ <VisibilityBar score={latest.visibilityScore} />
+ </div>
+ </div>
+ </div>
+
+ {expanded && (
+ <div className="border-t bg-muted/20 px-4 py-3 space-y-3">
+ <div>
+ <div className="flex items-center justify-between gap-3 mb-1.5">
+ <p className="text-[10px] uppercase tracking-wide text-muted-foreground font-medium">
+ Latest response · {formatTimestamp(latest.createdAt)}
+ </p>
+ <Button
+ variant="ghost"
+ size="sm"
+ className="h-6 gap-1.5 text-[11px]"
+ onClick={(e) => { e.stopPropagation(); onViewResult(latest); }}
+ >
+ <Eye className="h-3 w-3" />
+ Full detail
+ </Button>
+ </div>
+ <p className="text-xs text-foreground/90 leading-relaxed whitespace-pre-wrap line-clamp-6">
+ {responsePreview}
+ </p>
+ </div>
+
+ {history.length > 0 && (
+ <div>
+ <p className="text-[10px] uppercase tracking-wide text-muted-foreground font-medium mb-1">
+ Previous runs
+ </p>
+ <div className="rounded border overflow-hidden">
+ <Table>
+ <TableBody>
+ {history.map((r) => (
+ <TableRow key={r.id} className="hover:bg-muted/30">
+ <TableCell className="text-xs text-muted-foreground py-1.5">
+ {formatTimestamp(r.createdAt)}
+ </TableCell>
+ <TableCell className="text-center py-1.5 text-xs tabular-nums w-[110px]">
+ <span className="font-semibold">{r.mentionCount}</span>
+ <span className="text-muted-foreground">
+ {' '}mention{r.mentionCount !== 1 ? 's' : ''}
+ </span>
+ </TableCell>
+ <TableCell className="text-center py-1.5 text-xs tabular-nums w-[110px]">
+ <span className="font-semibold">{r.citationCount}</span>
+ <span className="text-muted-foreground">
+ {' '}citation{r.citationCount !== 1 ? 's' : ''}
+ </span>
+ </TableCell>
+ <TableCell className="text-center py-1.5 w-[100px]">
+ <SentimentBadge sentiment={r.sentiment} />
+ </TableCell>
+ <TableCell className="py-1.5 w-[140px]">
+ <VisibilityBar score={r.visibilityScore} />
+ </TableCell>
+ <TableCell className="text-center py-1.5 w-[50px]">
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-6 w-6"
+ title="View detail"
+ onClick={(e) => { e.stopPropagation(); onViewResult(r); }}
+ >
+ <Eye className="h-3 w-3" />
+ </Button>
+ </TableCell>
+ </TableRow>
+ ))}
+ </TableBody>
+ </Table>
+ </div>
+ {hasMoreHistory && (
+ <p className="text-[10px] text-muted-foreground mt-1">
+ Showing latest {HISTORY_LIMIT} of {group.results.length - 1} previous runs.
+ </p>
+ )}
+ </div>
+ )}
+ </div>
+ )}
+ </div>
+ );
+}
+
+function PromptSubGroup({
+ group,
+ expanded,
+ expandedPlatforms,
+ refreshingId,
+ onToggle,
+ onTogglePlatform,
+ onRefresh,
+ onViewResult,
+}: {
+ group: PromptGroup;
+ expanded: boolean;
+ expandedPlatforms: Set<string>;
+ refreshingId: string | null;
+ onToggle: () => void;
+ onTogglePlatform: (compositeKey: string) => void;
+ onRefresh: (promptId: string) => void;
+ onViewResult: (r: PromptResultWithText) => void;
+}) {
+ return (
+ <div className="rounded-lg border overflow-hidden">
+ <div
+ role="button"
+ tabIndex={0}
+ onClick={onToggle}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); onToggle(); }
+ }}
+ className="flex w-full items-center gap-3 px-4 py-2.5 text-left hover:bg-muted/50 transition-colors cursor-pointer select-none"
+ >
+ <ChevronDown className={cn('h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform', !expanded && '-rotate-90')} />
+ <div className="flex-1 min-w-0">
+ <p className="text-sm line-clamp-1">{group.promptText}</p>
+ <span className="text-[11px] text-muted-foreground">
+ {group.platformGroups.length} platform{group.platformGroups.length !== 1 ? 's' : ''}
+ {' · '}
+ {group.results.length} result{group.results.length !== 1 ? 's' : ''}
+ </span>
+ </div>
+ <div className="flex items-center gap-4 shrink-0">
+ <div className="text-right">
+ <p className="text-[10px] text-muted-foreground">Score</p>
+ <p className="text-xs font-semibold tabular-nums">{group.avgScore}</p>
+ </div>
+ <div className="text-right">
+ <p className="text-[10px] text-muted-foreground">Mentions</p>
+ <p className="text-xs font-semibold tabular-nums">{group.totalMentions}</p>
+ </div>
+ <div className="text-right">
+ <p className="text-[10px] text-muted-foreground">Citations</p>
+ <p className="text-xs font-semibold tabular-nums">{group.totalCitations}</p>
+ </div>
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-6 w-6"
+ title="Refresh results"
+ disabled={refreshingId !== null}
+ onClick={(e) => { e.stopPropagation(); onRefresh(group.promptId); }}
+ >
+ {refreshingId === group.promptId ? (
+ <Loader2 className="h-3 w-3 animate-spin" />
+ ) : (
+ <RefreshCw className="h-3 w-3" />
+ )}
+ </Button>
+ </div>
+ </div>
+
+ {expanded && (
+ <div className="border-t px-3 py-2 space-y-1.5 bg-muted/10">
+ {group.platformGroups.map((pg) => {
+ const compositeKey = `${group.promptId}::${pg.key}`;
+ return (
+ <PlatformSubGroup
+ key={compositeKey}
+ group={pg}
+ expanded={expandedPlatforms.has(compositeKey)}
+ onToggle={() => onTogglePlatform(compositeKey)}
+ onViewResult={onViewResult}
+ />
+ );
+ })}
+ </div>
+ )}
+ </div>
+ );
+}
+
+function PromptResultsGrouped({
+ results,
+ loadedRowCount,
+ totalRowCount,
+ onViewResult,
+ onRefreshPrompt,
+}: {
+ results: PromptResultWithText[];
+ loadedRowCount: number;
+ totalRowCount: number;
+ onViewResult: (r: PromptResultWithText) => void;
+ onRefreshPrompt: (promptId: string) => Promise<void>;
+}) {
+ const topicGroups = groupResultsByTopic(results);
+ const [expandedTopics, setExpandedTopics] = useState<Set<string>>(new Set());
+ const [expandedPrompts, setExpandedPrompts] = useState<Set<string>>(new Set());
+ const [expandedPlatforms, setExpandedPlatforms] = useState<Set<string>>(new Set());
+ const [refreshingId, setRefreshingId] = useState<string | null>(null);
+
+ const toggleTopic = (id: string) =>
+ setExpandedTopics((prev) => {
+ const next = new Set(prev);
+ if (next.has(id)) next.delete(id); else next.add(id);
+ return next;
+ });
+
+ const togglePrompt = (id: string) =>
+ setExpandedPrompts((prev) => {
+ const next = new Set(prev);
+ if (next.has(id)) next.delete(id); else next.add(id);
+ return next;
+ });
+
+ const togglePlatform = (id: string) =>
+ setExpandedPlatforms((prev) => {
+ const next = new Set(prev);
+ if (next.has(id)) next.delete(id); else next.add(id);
+ return next;
+ });
+
+ const handleRefresh = async (promptId: string) => {
+ setRefreshingId(promptId);
+ try { await onRefreshPrompt(promptId); } finally { setRefreshingId(null); }
+ };
+
+ const truncated = totalRowCount > loadedRowCount && loadedRowCount > 0;
+
+ return (
+ <Card>
+ <CardHeader className="pb-2">
+ <div className="flex flex-col gap-0.5 sm:flex-row sm:items-center sm:justify-between sm:gap-3">
+ <CardTitle className="text-sm font-medium">Prompt Results by Topic</CardTitle>
+ {truncated && (
+ <p className="text-xs text-muted-foreground font-normal">
+ Showing {loadedRowCount} of {totalRowCount} rows (newest first).
+ Narrow the date range or filters to focus the list.
+ </p>
+ )}
+ </div>
+ </CardHeader>
+ <CardContent className="pt-0">
+ {topicGroups.length === 0 && (
+ <p className="text-center text-muted-foreground py-8 text-sm">
+ No results yet. Click &quot;Run Prompts&quot; to start tracking.
+ </p>
+ )}
+
+ <div className="space-y-3">
+ {topicGroups.map((topic) => {
+ const isTopicOpen = expandedTopics.has(topic.topicId);
+ return (
+ <div key={topic.topicId + topic.topicName} className="rounded-lg border overflow-hidden">
+ <div
+ role="button"
+ tabIndex={0}
+ onClick={() => toggleTopic(topic.topicId)}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); toggleTopic(topic.topicId); }
+ }}
+ className="flex w-full items-center gap-3 px-4 py-3 text-left hover:bg-muted/50 transition-colors cursor-pointer select-none"
+ >
+ <ChevronDown className={cn('h-4 w-4 shrink-0 text-muted-foreground transition-transform', !isTopicOpen && '-rotate-90')} />
+ <Tag className="h-4 w-4 shrink-0 text-muted-foreground" />
+ <div className="flex-1 min-w-0">
+ <p className="text-sm font-medium">{topic.topicName}</p>
+ <span className="text-[11px] text-muted-foreground">
+ {topic.prompts.length} prompt{topic.prompts.length !== 1 ? 's' : ''} · {topic.totalResults} result{topic.totalResults !== 1 ? 's' : ''}
+ </span>
+ </div>
+ <div className="flex items-center gap-4 shrink-0">
+ <div className="text-right">
+ <p className="text-xs text-muted-foreground">Avg Score</p>
+ <p className="text-sm font-semibold tabular-nums">{topic.avgScore}</p>
+ </div>
+ <div className="text-right">
+ <p className="text-xs text-muted-foreground">Mentions</p>
+ <p className="text-sm font-semibold tabular-nums">{topic.totalMentions}</p>
+ </div>
+ <div className="text-right">
+ <p className="text-xs text-muted-foreground">Citations</p>
+ <p className="text-sm font-semibold tabular-nums">{topic.totalCitations}</p>
+ </div>
+ </div>
+ </div>
+
+ {isTopicOpen && (
+ <div className="border-t px-3 py-2 space-y-2 bg-muted/10">
+ {topic.prompts.map((pg) => (
+ <PromptSubGroup
+ key={pg.promptId}
+ group={pg}
+ expanded={expandedPrompts.has(pg.promptId)}
+ expandedPlatforms={expandedPlatforms}
+ refreshingId={refreshingId}
+ onToggle={() => togglePrompt(pg.promptId)}
+ onTogglePlatform={togglePlatform}
+ onRefresh={handleRefresh}
+ onViewResult={onViewResult}
+ />
+ ))}
+ </div>
+ )}
+ </div>
+ );
+ })}
+ </div>
+ </CardContent>
+ </Card>
+ );
+}
+
+// ─── Main Page ────────────────────────────────────────────────────────────────
+
+export default function InsightsPage() {
+ const router = useRouter();
+ const { isCloud } = usePlanContext();
+ const brand = useBrandStore((s) => s.getActiveBrand());
+ const [summary, setSummary] = useState<InsightsSummary | null>(null);
+ const [results, setResults] = useState<PromptResultWithText[]>([]);
+ const [totalResults, setTotalResults] = useState(0);
+ const [isLoading, setIsLoading] = useState(true);
+ const [isRunning, setIsRunning] = useState(false);
+ const [activeJobId, setActiveJobId] = useState<string | null>(null);
+ const [jobStatus, setJobStatus] = useState<TrackingJobStatus | null>(null);
+ const [showSinglePrompt, setShowSinglePrompt] = useState(false);
+ const [filters, setFilters] = useState<InsightsFilters>(DEFAULT_FILTERS);
+ const [hasAnyData, setHasAnyData] = useState<boolean | null>(null);
+ const [availableRegions, setAvailableRegions] = useState<string[]>([]);
+ const [availableModels, setAvailableModels] = useState<string[]>([]);
+ const [availableTopics, setAvailableTopics] = useState<Topic[]>([]);
+ const [competitorData, setCompetitorData] =
+ useState<CompetitorComparisonData | null>(null);
+ const [sovData, setSovData] = useState<ShareOfVoiceData | null>(null);
+ const [breakdownMetric, setBreakdownMetric] = useState<BreakdownMetric | null>(null);
+ const filtersRef = useRef(filters);
+ filtersRef.current = filters;
+
+ const loadData = useCallback(
+ async (overrideFilters?: InsightsFilters, { silent = false } = {}) => {
+ if (!brand) return;
+ if (!silent) setIsLoading(true);
+ try {
+ const f = overrideFilters ?? filtersRef.current;
+ const { dateFrom, dateTo } = getDateRange(f.datePreset, {
+ from: f.dateFrom,
+ to: f.dateTo,
+ });
+ const filterOpts = {
+ model: f.model || undefined,
+ region: f.region || undefined,
+ topicId: f.topic || undefined,
+ dateFrom,
+ dateTo,
+ };
+
+ const hasFilters = f.datePreset !== 'all' || f.model || f.region || f.topic;
+
+ const promises: [
+ Promise<InsightsSummary>,
+ Promise<{ results: PromptResultWithText[]; total: number }>,
+ Promise<CompetitorComparisonData>,
+ Promise<ShareOfVoiceData>,
+ Promise<{ total: number } | null>,
+ ] = [
+ getInsightsSummary(brand.id, filterOpts),
+ getPromptResults(brand.id, {
+ limit: PROMPT_RESULTS_ROW_LIMIT,
+ ...filterOpts,
+ }),
+ getCompetitorComparison(brand.id, filterOpts),
+ getShareOfVoiceData(brand.id, filterOpts),
+ hasFilters
+ ? getPromptResults(brand.id, { limit: 1 }).then(({ total }) => ({ total }))
+ : Promise.resolve(null),
+ ];
+
+ const [summaryData, resultsData, compData, sovResult, unfilteredCheck] = await Promise.all(promises);
+ setSummary(summaryData);
+ setResults(resultsData.results);
+ setTotalResults(resultsData.total);
+ setCompetitorData(compData.brands.length > 1 ? compData : null);
+ setSovData(sovResult.byPlatform.length > 0 ? sovResult : null);
+
+ if (unfilteredCheck !== null) {
+ setHasAnyData(unfilteredCheck.total > 0);
+ } else {
+ setHasAnyData(resultsData.total > 0);
+ }
+
+ const regions = [
+ ...new Set(
+ resultsData.results
+ .map((r) => r.region)
+ .filter(Boolean) as string[],
+ ),
+ ].sort();
+ const models = [
+ ...new Set(
+ resultsData.results
+ .map((r) => r.modelUsed)
+ .filter(Boolean) as string[],
+ ),
+ ].sort();
+ setAvailableRegions((prev) =>
+ [...new Set([...prev, ...regions])].sort((a, b) =>
+ a.localeCompare(b),
+ ),
+ );
+ setAvailableModels((prev) =>
+ [...new Set([...prev, ...models])].sort((a, b) =>
+ a.localeCompare(b),
+ ),
+ );
+ } catch (err) {
+ toast.error(
+ err instanceof Error ? err.message : 'Failed to load insights',
+ );
+ } finally {
+ setIsLoading(false);
+ }
+ },
+ [brand],
+ );
+
+ useEffect(() => {
+ if (!brand?.id) return;
+ setAvailableRegions([]);
+ setAvailableModels([]);
+ setAvailableTopics([]);
+ const next = { ...filtersRef.current, region: '', model: '', topic: '' };
+ filtersRef.current = next;
+ setFilters(next);
+ getTopics(brand.id).then(setAvailableTopics).catch(() => {});
+ }, [brand?.id]);
+
+ useEffect(() => {
+ loadData();
+ }, [loadData]);
+
+ // Restore active job from localStorage or URL query param (post-payment redirect)
+ const searchParams = useSearchParams();
+ useEffect(() => {
+ if (!brand) return;
+
+ const urlJobId = searchParams.get('jobId');
+ if (urlJobId) {
+ saveTrackingJob({ jobId: urlJobId, brandId: brand.id, startedAt: Date.now() });
+ setActiveJobId(urlJobId);
+ setIsRunning(true);
+ window.history.replaceState({}, '', window.location.pathname);
+ return;
+ }
+
+ const saved = loadTrackingJob();
+ if (saved && saved.brandId === brand.id) {
+ setActiveJobId(saved.jobId);
+ setIsRunning(true);
+ }
+ }, [brand, searchParams]);
+
+ // Poll job status while a job is active
+ useEffect(() => {
+ if (!activeJobId) return;
+
+ let cancelled = false;
+ let lastRefresh = 0;
+ const poll = async () => {
+ while (!cancelled) {
+ try {
+ const status = await getJobStatus(activeJobId);
+ if (cancelled) break;
+ setJobStatus(status);
+
+ // Refresh data every ~10s while active so new results appear progressively
+ const now = Date.now();
+ if (status.status === 'active' && now - lastRefresh > 10_000) {
+ lastRefresh = now;
+ loadData(undefined, { silent: true });
+ }
+
+ if (status.status === 'completed') {
+ clearTrackingJob();
+ setActiveJobId(null);
+ setIsRunning(false);
+ setJobStatus(null);
+ toast.success(
+ `Analysis complete — ${status.result?.resultCount ?? 0} results saved.`,
+ );
+ loadData(undefined, { silent: true });
+ break;
+ }
+
+ if (status.status === 'failed' || status.status === 'not_found') {
+ clearTrackingJob();
+ setActiveJobId(null);
+ setIsRunning(false);
+ setJobStatus(null);
+ if (status.status === 'failed') {
+ toast.error(
+ `Job failed: ${status.failedReason ?? 'Unknown error'}`,
+ );
+ }
+ break;
+ }
+ } catch {
+ // network error, keep polling
+ }
+ await new Promise((r) => setTimeout(r, 3000));
+ }
+ };
+
+ poll();
+ return () => {
+ cancelled = true;
+ };
+ }, [activeJobId, loadData]);
+
+ const handleFilterChange = (newFilters: InsightsFilters) => {
+ setFilters(newFilters);
+ loadData(newFilters);
+ };
+
+ const handleRunPrompts = async () => {
+ if (!brand) return;
+ setIsRunning(true);
+ try {
+ const { jobId } = await triggerTrackingCheck(brand.id);
+ saveTrackingJob({ jobId, brandId: brand.id, startedAt: Date.now() });
+ setActiveJobId(jobId);
+ setJobStatus({
+ status: 'waiting',
+ progress: null,
+ result: null,
+ failedReason: null,
+ });
+ } catch (err) {
+ setIsRunning(false);
+ toast.error(
+ err instanceof Error ? err.message : 'Failed to trigger tracking',
+ );
+ }
+ };
+
+ const handleStopTracking = async () => {
+ if (!activeJobId) return;
+ try {
+ await cancelTrackingJob(activeJobId);
+ } catch {}
+ clearTrackingJob();
+ setActiveJobId(null);
+ setIsRunning(false);
+ setJobStatus(null);
+ toast.success('Tracking stopped');
+ loadData(undefined, { silent: true });
+ };
+
+ const handleJobStarted = (jobId: string) => {
+ if (!brand) return;
+ setIsRunning(true);
+ saveTrackingJob({ jobId, brandId: brand.id, startedAt: Date.now() });
+ setActiveJobId(jobId);
+ setJobStatus({
+ status: 'waiting',
+ progress: null,
+ result: null,
+ failedReason: null,
+ });
+ };
+
+ const handleRefreshPrompt = async (promptId: string) => {
+ if (!brand) return;
+ try {
+ const { dateFrom, dateTo } = getDateRange(filtersRef.current.datePreset, {
+ from: filtersRef.current.dateFrom,
+ to: filtersRef.current.dateTo,
+ });
+ const { results: fresh } = await getPromptResults(brand.id, {
+ promptId,
+ dateFrom,
+ dateTo,
+ limit: 500,
+ });
+ // Merge fresh results into existing state — replace old entries for this prompt
+ setResults((prev) => {
+ const without = prev.filter((r) => r.promptId !== promptId);
+ return [...without, ...fresh];
+ });
+ toast.success('Results refreshed');
+ } catch (err) {
+ toast.error(err instanceof Error ? err.message : 'Failed to refresh results');
+ }
+ };
+
+ if (!brand || (isLoading && !summary)) return <InsightsSkeleton />;
+
+ const noResults = !summary || summary.totalResults === 0;
+ const trulyEmpty = noResults && !hasAnyData;
+
+ if (trulyEmpty) {
+ return (
+ <div className="space-y-6">
+ <div>
+ <h1 className="text-2xl font-bold tracking-tight">
+ Answer Engine Insights
+ </h1>
+ <p className="text-muted-foreground text-sm">{brand.name}</p>
+ </div>
+ <TrackingProgressBanner
+ jobStatus={jobStatus}
+ onStop={handleStopTracking}
+ />
+ <EmptyState onRunPrompts={handleRunPrompts} isRunning={isRunning} isCloud={isCloud} />
+ {!isCloud && (
+ <div className="flex justify-center">
+ <Button
+ variant="outline"
+ onClick={() => setShowSinglePrompt(true)}
+ className="gap-2"
+ >
+ <FlaskConical className="h-4 w-4" />
+ Or test a single prompt
+ </Button>
+ </div>
+ )}
+ <RunSinglePromptDialog
+ brandId={brand.id}
+ open={showSinglePrompt}
+ onClose={() => setShowSinglePrompt(false)}
+ onJobStarted={handleJobStarted}
+ />
+ </div>
+ );
+ }
+
+ const lastCheckedLabel = summary?.lastCheckedAt
+ ? formatTimeAgo(new Date(summary.lastCheckedAt))
+ : 'Never';
+
+ const handleResetFilters = () => {
+ const resetFilters = { ...DEFAULT_FILTERS };
+ setFilters(resetFilters);
+ loadData(resetFilters);
+ };
+
+ return (
+ <div className="space-y-6">
+ {/* Header */}
+ <div className="flex items-start justify-between gap-4">
+ <div>
+ <h1 className="text-2xl font-bold tracking-tight">
+ Answer Engine Insights
+ </h1>
+ <p className="text-muted-foreground text-sm">
+ {brand.name} · Last run: {lastCheckedLabel} · {totalResults} results
+ </p>
+ </div>
+ {!isCloud && (
+ <div className="flex items-center gap-2 shrink-0">
+ <Button
+ variant="outline"
+ onClick={() => setShowSinglePrompt(true)}
+ className="gap-2"
+ >
+ <FlaskConical className="h-4 w-4" />
+ Test Single Prompt
+ </Button>
+ <Button
+ onClick={handleRunPrompts}
+ disabled={isRunning}
+ className="gap-2"
+ >
+ {isRunning ? (
+ <Loader2 className="h-4 w-4 animate-spin" />
+ ) : (
+ <Play className="h-4 w-4" />
+ )}
+ Run All
+ </Button>
+ </div>
+ )}
+ </div>
+
+ {/* Filter Bar */}
+ <FilterBar
+ filters={filters}
+ onChange={handleFilterChange}
+ availableRegions={availableRegions}
+ availableModels={availableModels}
+ availableTopics={availableTopics}
+ />
+
+ {/* Tracking Progress */}
+ <TrackingProgressBanner
+ jobStatus={jobStatus}
+ onStop={handleStopTracking}
+ />
+
+ {noResults ? (
+ <NoDataForPeriod
+ datePreset={filters.datePreset}
+ onReset={handleResetFilters}
+ />
+ ) : (
+ <>
+ {/* KPI Cards */}
+ <div className="grid grid-cols-2 gap-4 sm:grid-cols-4">
+ <KpiCard
+ title="Visibility Score"
+ tooltip="A composite score (0–100) reflecting how prominently your brand appears across AI engine responses. Combines mentions, citations, and sentiment."
+ icon={BarChart3}
+ value={summary!.avgVisibilityScore}
+ sub={<DeltaBadge delta={summary!.visibilityChange} suffix=" pts" />}
+ subVariant={
+ summary!.visibilityChange !== null && summary!.visibilityChange > 0
+ ? 'positive'
+ : 'muted'
+ }
+ onClick={() => setBreakdownMetric('visibility')}
+ />
+ <KpiCard
+ title="Mentions"
+ tooltip="How many times your brand was referenced by name in AI-generated responses."
+ icon={Zap}
+ value={summary!.totalMentions}
+ sub={<DeltaBadge delta={summary!.mentionsChange} />}
+ subVariant={
+ summary!.mentionsChange !== null && summary!.mentionsChange > 0
+ ? 'positive'
+ : 'muted'
+ }
+ onClick={() => setBreakdownMetric('mentions')}
+ />
+ <KpiCard
+ title="Citations"
+ tooltip="Times your brand's domain was cited as a source with a direct link in AI responses."
+ icon={Quote}
+ value={summary!.totalCitations}
+ sub={<DeltaBadge delta={summary!.citationsChange} />}
+ subVariant={
+ summary!.citationsChange !== null && summary!.citationsChange > 0
+ ? 'positive'
+ : 'muted'
+ }
+ onClick={() => router.push('/dashboard/citations')}
+ />
+ <KpiCard
+ title="Positive Sentiment"
+ tooltip="Percentage of AI responses that described your brand in a positive context."
+ icon={AlertCircle}
+ value={`${summary!.positiveSentimentPct}%`}
+ sub={<DeltaBadge delta={summary!.sentimentChange} suffix=" pts" />}
+ subVariant={
+ summary!.sentimentChange !== null && summary!.sentimentChange > 0
+ ? 'positive'
+ : 'muted'
+ }
+ />
+ </div>
+
+ {/* Competitor Comparison */}
+ {competitorData && (
+ <div className="grid grid-cols-1 gap-4 lg:grid-cols-5">
+ <Card className="lg:col-span-3">
+ <CardHeader className="pb-2">
+ <CardTitle className="flex items-center gap-2 text-sm font-medium">
+ <Users className="h-4 w-4" />
+ AI Visibility — Brand vs Competitors
+ </CardTitle>
+ </CardHeader>
+ <CardContent>
+ <CompetitorChart
+ providerRows={competitorData.providerRows}
+ brands={competitorData.brands}
+ />
+ </CardContent>
+ </Card>
+
+ <Card className="lg:col-span-2">
+ <CardHeader className="pb-2">
+ <CardTitle className="text-sm font-medium">Leaderboard</CardTitle>
+ </CardHeader>
+ <CardContent>
+ <CompetitorLeaderboard data={competitorData.brands} />
+ </CardContent>
+ </Card>
+ </div>
+ )}
+
+ {/* Share of Voice */}
+ {sovData && (
+ <div className="grid grid-cols-1 gap-4 lg:grid-cols-2">
+ <Card>
+ <CardHeader className="pb-2">
+ <CardTitle className="flex items-center gap-2 text-sm font-medium">
+ <PieChart className="h-4 w-4" />
+ Share of Voice by Platform
+ </CardTitle>
+ {sovData.overallSovChange !== null && sovData.overallSovChange !== 0 && (
+ <DeltaBadge delta={sovData.overallSovChange} suffix=" pts" />
+ )}
+ </CardHeader>
+ <CardContent>
+ <ShareOfVoicePlatformChart
+ data={sovData.byPlatform}
+ overallSov={sovData.overallSov}
+ />
+ </CardContent>
+ </Card>
+
+ <Card>
+ <CardHeader className="pb-2">
+ <CardTitle className="flex items-center gap-2 text-sm font-medium">
+ <TrendingUp className="h-4 w-4" />
+ Share of Voice Trend
+ </CardTitle>
+ </CardHeader>
+ <CardContent>
+ <ShareOfVoiceTrendChart data={sovData.trend} />
+ </CardContent>
+ </Card>
+ </div>
+ )}
+
+ {/* Prompt Results by Topic */}
+ <PromptResultsGrouped
+ results={results}
+ loadedRowCount={results.length}
+ totalRowCount={totalResults}
+ onViewResult={(r) => router.push(`/dashboard/insights/${r.id}`)}
+ onRefreshPrompt={handleRefreshPrompt}
+ />
+ </>
+ )}
+
+ {/* Single Prompt Runner */}
+ <RunSinglePromptDialog
+ brandId={brand.id}
+ open={showSinglePrompt}
+ onClose={() => setShowSinglePrompt(false)}
+ onJobStarted={handleJobStarted}
+ />
+
+ {/* Metric Breakdown Drilldown */}
+ <MetricBreakdownSheet
+ brandId={brand.id}
+ metric={breakdownMetric}
+ onOpenChange={(open) => {
+ if (!open) setBreakdownMetric(null);
+ }}
+ filters={(() => {
+ const { dateFrom, dateTo } = getDateRange(filters.datePreset, {
+ from: filters.dateFrom,
+ to: filters.dateTo,
+ });
+ return {
+ dateFrom,
+ dateTo,
+ region: filters.region || undefined,
+ model: filters.model || undefined,
+ topicId: filters.topic || undefined,
+ };
+ })()}
+ />
+ </div>
+ );
+}
+
+// ─── Helpers ──────────────────────────────────────────────────────────────────
+
+function formatTimeAgo(date: Date): string {
+ const diff = Date.now() - date.getTime();
+ const minutes = Math.floor(diff / 60_000);
+ if (minutes < 1) return 'just now';
+ if (minutes < 60) return `${minutes}m ago`;
+ const hours = Math.floor(minutes / 60);
+ if (hours < 24) return `${hours}h ago`;
+ const days = Math.floor(hours / 24);
+ return `${days}d ago`;
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/page.tsx
new file mode 100644
index 000000000..5ba9d6797
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/page.tsx
@@ -0,0 +1,5 @@
+import { redirect } from "next/navigation";
+
+export default function DashboardPage() {
+ redirect("/dashboard/insights");
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/prompts/[id]/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/prompts/[id]/page.tsx
new file mode 100644
index 000000000..6a5f3d169
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/prompts/[id]/page.tsx
@@ -0,0 +1,517 @@
+'use client';
+
+import { useEffect, useMemo, useState, type ComponentType } from 'react';
+import { useParams } from 'next/navigation';
+import { useRouter } from '@/i18n/navigation';
+import {
+ getPromptDetail,
+ type PromptDetailData,
+ type PromptResultWithText,
+} from '@/lib/actions/tracking';
+import { Badge } from '@/components/ui/badge';
+import { Button } from '@/components/ui/button';
+import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
+import { Skeleton } from '@/components/ui/skeleton';
+import {
+ ArrowLeft,
+ ChevronDown,
+ Clock,
+ Eye,
+ MessageSquareText,
+ Quote,
+} from 'lucide-react';
+import { cn } from '@/lib/utils';
+import {
+ AIProviderAvatar,
+ resolveAIProvider,
+} from '@/components/ai-provider-avatar';
+
+const PLATFORM_LABELS: Record<string, string> = {
+ chatgpt: 'ChatGPT',
+ gemini: 'Gemini',
+ perplexity: 'Perplexity',
+ claude: 'Claude',
+ grok: 'Grok',
+ copilot: 'Copilot',
+ 'meta-ai': 'Meta AI',
+ 'google-ai-overviews': 'Google AI',
+ 'google-ai-mode': 'Google AI Mode',
+ 'chatgpt-web': 'ChatGPT',
+ 'google-aio': 'Google AI Overview',
+ 'google-aimode': 'Google AI Mode',
+ 'perplexity-web': 'Perplexity',
+ 'copilot-web': 'Microsoft Copilot',
+ 'grok-web': 'Grok',
+ 'gemini-web': 'Gemini',
+};
+
+const MODEL_DISPLAY_NAME: Record<string, string> = {
+ 'gpt-4o': 'GPT-4o',
+ 'gpt-4o-mini': 'GPT-4o Mini',
+ 'gpt-4.1': 'GPT-4.1',
+ 'gpt-4.1-mini': 'GPT-4.1 Mini',
+ 'gpt-4.1-nano': 'GPT-4.1 Nano',
+ 'gpt-5-chat-latest': 'ChatGPT',
+ 'claude-sonnet-4-6': 'Claude',
+ 'claude-opus-4-6': 'Claude',
+ 'claude-haiku-4-5': 'Claude',
+ 'gemini-2.5-pro': 'Gemini 2.5 Pro',
+ 'gemini-2.5-flash': 'Gemini 2.5 Flash',
+ 'grok-3': 'Grok',
+ 'grok-4-auto': 'Grok',
+ 'chatgpt-web': 'ChatGPT',
+ 'perplexity-web': 'Perplexity',
+ 'google-aio': 'Google AI Overview',
+ 'google-aimode': 'Google AI Mode',
+ 'copilot-web': 'Microsoft Copilot',
+ 'grok-web': 'Grok',
+ 'gemini-web': 'Gemini',
+};
+
+function getModelDisplayName(model?: string, platform?: string): string {
+ if (model && MODEL_DISPLAY_NAME[model]) return MODEL_DISPLAY_NAME[model];
+ if (platform && PLATFORM_LABELS[platform]) return PLATFORM_LABELS[platform];
+ return model ?? platform ?? 'Unknown';
+}
+
+function formatTimestamp(iso: string): string {
+ const date = new Date(iso);
+ if (Number.isNaN(date.getTime())) return '—';
+ return date.toLocaleString(undefined, {
+ month: 'short',
+ day: 'numeric',
+ hour: 'numeric',
+ minute: '2-digit',
+ });
+}
+
+function SentimentBadge({
+ sentiment,
+}: {
+ sentiment: 'positive' | 'neutral' | 'negative';
+}) {
+ return (
+ <Badge
+ variant="outline"
+ className={cn(
+ 'text-xs capitalize',
+ sentiment === 'positive' &&
+ 'border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400',
+ sentiment === 'neutral' &&
+ 'border-yellow-500/30 bg-yellow-500/10 text-yellow-600 dark:text-yellow-400',
+ sentiment === 'negative' &&
+ 'border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400',
+ )}
+ >
+ {sentiment}
+ </Badge>
+ );
+}
+
+function ModelBadge({
+ model,
+ platform,
+}: {
+ model?: string;
+ platform?: string;
+}) {
+ const provider = resolveAIProvider(model ?? platform ?? '', platform);
+ return (
+ <span className="inline-flex items-center gap-1.5 rounded-full border bg-background px-2 py-1">
+ <AIProviderAvatar provider={provider} className="h-4 w-4" />
+ <span className="text-xs">{getModelDisplayName(model, platform)}</span>
+ </span>
+ );
+}
+
+function VisibilityBar({ score }: { score: number }) {
+ const rounded = Math.round(score);
+ return (
+ <div className="flex items-center gap-2">
+ <div className="h-1.5 flex-1 overflow-hidden rounded-full bg-muted">
+ <div
+ className={cn(
+ 'h-full rounded-full',
+ rounded >= 70
+ ? 'bg-emerald-500'
+ : rounded >= 40
+ ? 'bg-amber-500'
+ : 'bg-red-500',
+ )}
+ style={{ width: `${Math.min(100, Math.max(0, rounded))}%` }}
+ />
+ </div>
+ <span className="w-8 text-right text-xs font-semibold tabular-nums">
+ {rounded}
+ </span>
+ </div>
+ );
+}
+
+interface PlatformGroup {
+ key: string;
+ platform: string;
+ modelUsed?: string;
+ region?: string;
+ results: PromptResultWithText[];
+ avgScore: number;
+ totalMentions: number;
+ totalCitations: number;
+}
+
+function groupByPlatform(results: PromptResultWithText[]): PlatformGroup[] {
+ const map = new Map<string, PromptResultWithText[]>();
+ for (const result of results) {
+ const key = `${result.platform}|${result.modelUsed ?? ''}`;
+ const items = map.get(key) ?? [];
+ items.push(result);
+ map.set(key, items);
+ }
+
+ return Array.from(map.entries())
+ .map(([key, items]) => {
+ const sorted = [...items].sort(
+ (a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(),
+ );
+ const latest = sorted[0];
+ return {
+ key,
+ platform: latest.platform,
+ modelUsed: latest.modelUsed,
+ region: latest.region,
+ results: sorted,
+ avgScore: Math.round(
+ sorted.reduce((sum, row) => sum + row.visibilityScore, 0) / sorted.length,
+ ),
+ totalMentions: sorted.reduce((sum, row) => sum + row.mentionCount, 0),
+ totalCitations: sorted.reduce((sum, row) => sum + row.citationCount, 0),
+ };
+ })
+ .sort((a, b) => b.avgScore - a.avgScore);
+}
+
+function KpiCard({
+ title,
+ value,
+ icon: Icon,
+}: {
+ title: string;
+ value: string | number;
+ icon: ComponentType<{ className?: string }>;
+}) {
+ return (
+ <Card>
+ <CardContent className="flex items-center gap-3 p-4">
+ <Icon className="h-5 w-5 text-muted-foreground" />
+ <div>
+ <p className="text-2xl font-bold tabular-nums">{value}</p>
+ <p className="text-xs text-muted-foreground">{title}</p>
+ </div>
+ </CardContent>
+ </Card>
+ );
+}
+
+function PlatformResultGroup({
+ group,
+ expanded,
+ onToggle,
+ onViewResult,
+}: {
+ group: PlatformGroup;
+ expanded: boolean;
+ onToggle: () => void;
+ onViewResult: (result: PromptResultWithText) => void;
+}) {
+ const visibleRuns = group.results.slice(0, 10);
+ const hiddenCount = group.results.length - visibleRuns.length;
+
+ return (
+ <div className="overflow-hidden rounded-lg border">
+ <div
+ role="button"
+ tabIndex={0}
+ onClick={onToggle}
+ onKeyDown={(event) => {
+ if (event.key === 'Enter' || event.key === ' ') {
+ event.preventDefault();
+ onToggle();
+ }
+ }}
+ className="flex cursor-pointer select-none items-center gap-3 px-4 py-3 transition-colors hover:bg-muted/50"
+ >
+ <ChevronDown
+ className={cn(
+ 'h-4 w-4 shrink-0 text-muted-foreground transition-transform',
+ !expanded && '-rotate-90',
+ )}
+ />
+ <div className="min-w-0 flex-1">
+ <div className="flex flex-wrap items-center gap-2">
+ <ModelBadge model={group.modelUsed ?? group.platform} platform={group.platform} />
+ {group.region && (
+ <Badge variant="outline" className="text-[10px]">
+ {group.region}
+ </Badge>
+ )}
+ <span className="text-[11px] text-muted-foreground">
+ {group.results.length} run{group.results.length !== 1 ? 's' : ''}
+ </span>
+ </div>
+ </div>
+ <div className="hidden items-center gap-5 sm:flex">
+ <div className="text-right">
+ <p className="text-[10px] text-muted-foreground">Mentions</p>
+ <p className="text-xs font-semibold tabular-nums">{group.totalMentions}</p>
+ </div>
+ <div className="text-right">
+ <p className="text-[10px] text-muted-foreground">Citations</p>
+ <p className="text-xs font-semibold tabular-nums">{group.totalCitations}</p>
+ </div>
+ <div className="w-32">
+ <VisibilityBar score={group.avgScore} />
+ </div>
+ </div>
+ </div>
+
+ {expanded && (
+ <div className="border-t bg-muted/10 px-4 py-3">
+ <p className="mb-2 text-[10px] font-medium uppercase tracking-wide text-muted-foreground">
+ Runs
+ </p>
+ <div className="overflow-hidden rounded-md border bg-background">
+ {visibleRuns.map((result, index) => (
+ <div
+ key={result.id}
+ className={cn(
+ 'grid grid-cols-[1fr_auto] gap-3 px-3 py-2 text-xs sm:grid-cols-[1.4fr_90px_90px_100px_140px_40px] sm:items-center',
+ index > 0 && 'border-t',
+ )}
+ >
+ <div className="min-w-0 text-muted-foreground">
+ <span className="inline-flex items-center gap-1">
+ <Clock className="h-3 w-3" />
+ {formatTimestamp(result.createdAt)}
+ </span>
+ </div>
+ <div className="hidden text-center tabular-nums sm:block">
+ <span className="font-semibold">{result.mentionCount}</span>
+ <span className="text-muted-foreground"> mentions</span>
+ </div>
+ <div className="hidden text-center tabular-nums sm:block">
+ <span className="font-semibold">{result.citationCount}</span>
+ <span className="text-muted-foreground"> citations</span>
+ </div>
+ <div className="hidden justify-center sm:flex">
+ <SentimentBadge sentiment={result.sentiment} />
+ </div>
+ <div className="hidden sm:block">
+ <VisibilityBar score={result.visibilityScore} />
+ </div>
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-6 w-6 justify-self-end"
+ title="View response detail"
+ onClick={(event) => {
+ event.stopPropagation();
+ onViewResult(result);
+ }}
+ >
+ <Eye className="h-3.5 w-3.5" />
+ </Button>
+ <div className="col-span-2 flex flex-wrap items-center gap-2 sm:hidden">
+ <span className="tabular-nums">
+ <span className="font-semibold">{result.mentionCount}</span>
+ <span className="text-muted-foreground"> mentions</span>
+ </span>
+ <span className="tabular-nums">
+ <span className="font-semibold">{result.citationCount}</span>
+ <span className="text-muted-foreground"> citations</span>
+ </span>
+ <SentimentBadge sentiment={result.sentiment} />
+ <div className="w-32">
+ <VisibilityBar score={result.visibilityScore} />
+ </div>
+ </div>
+ </div>
+ ))}
+ </div>
+ {hiddenCount > 0 && (
+ <p className="mt-2 text-xs text-muted-foreground">
+ Showing latest {visibleRuns.length} of {group.results.length} runs for this platform.
+ </p>
+ )}
+ </div>
+ )}
+ </div>
+ );
+}
+
+export default function PromptDetailPage() {
+ const params = useParams();
+ const router = useRouter();
+ const promptId = params.id as string;
+
+ const [data, setData] = useState<PromptDetailData | null>(null);
+ const [loading, setLoading] = useState(true);
+ const [notFound, setNotFound] = useState(false);
+ const [expanded, setExpanded] = useState<Set<string>>(new Set());
+
+ useEffect(() => {
+ let cancelled = false;
+ async function load() {
+ setLoading(true);
+ const detail = await getPromptDetail(promptId);
+ if (cancelled) return;
+ if (!detail) {
+ setNotFound(true);
+ } else {
+ setData(detail);
+ const groups = groupByPlatform(detail.results);
+ setExpanded(new Set(groups.length > 0 ? [groups[0].key] : []));
+ }
+ setLoading(false);
+ }
+ load();
+ return () => {
+ cancelled = true;
+ };
+ }, [promptId]);
+
+ const platformGroups = useMemo(
+ () => groupByPlatform(data?.results ?? []),
+ [data?.results],
+ );
+
+ const togglePlatform = (key: string) =>
+ setExpanded((prev) => {
+ const next = new Set(prev);
+ if (next.has(key)) next.delete(key);
+ else next.add(key);
+ return next;
+ });
+
+ if (loading) {
+ return (
+ <div className="mx-auto max-w-5xl space-y-6 p-2 sm:p-6">
+ <Skeleton className="h-8 w-48" />
+ <Skeleton className="h-8 w-full max-w-3xl" />
+ <div className="grid gap-4 sm:grid-cols-3">
+ <Skeleton className="h-24" />
+ <Skeleton className="h-24" />
+ <Skeleton className="h-24" />
+ </div>
+ <Skeleton className="h-72 w-full" />
+ </div>
+ );
+ }
+
+ if (notFound || !data) {
+ return (
+ <div className="flex flex-col items-center justify-center py-24 text-center">
+ <MessageSquareText className="mb-4 h-12 w-12 text-muted-foreground/40" />
+ <h2 className="text-lg font-semibold">Prompt not found</h2>
+ <p className="mt-1 text-sm text-muted-foreground">
+ This prompt may have been deleted or does not exist.
+ </p>
+ <Button
+ variant="outline"
+ className="mt-6 gap-2"
+ onClick={() => router.back()}
+ >
+ <ArrowLeft className="h-4 w-4" />
+ Go back
+ </Button>
+ </div>
+ );
+ }
+
+ return (
+ <div className="mx-auto max-w-5xl space-y-6 p-2 sm:p-6">
+ <Button
+ variant="ghost"
+ size="sm"
+ className="-ml-2 gap-2 text-muted-foreground hover:text-foreground"
+ onClick={() => router.back()}
+ >
+ <ArrowLeft className="h-4 w-4" />
+ Back
+ </Button>
+
+ <div className="space-y-3">
+ <h1 className="text-xl font-semibold leading-snug">
+ {data.prompt.text}
+ </h1>
+ <div className="flex flex-wrap items-center gap-2">
+ {data.prompt.topicName && (
+ <Badge variant="secondary" className="text-xs">
+ {data.prompt.topicName}
+ </Badge>
+ )}
+ <Badge
+ variant="outline"
+ className={cn(
+ 'text-xs',
+ data.prompt.isActive
+ ? 'border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400'
+ : 'border-muted-foreground/20 text-muted-foreground',
+ )}
+ >
+ {data.prompt.isActive ? 'Active' : 'Paused'}
+ </Badge>
+ {data.summary.lastCheckedAt && (
+ <Badge variant="outline" className="gap-1 text-xs">
+ <Clock className="h-3 w-3" />
+ Last run: {formatTimestamp(data.summary.lastCheckedAt)}
+ </Badge>
+ )}
+ </div>
+ </div>
+
+ <div className="grid gap-4 sm:grid-cols-3">
+ <KpiCard
+ title="Visibility Score"
+ value={`${data.summary.avgVisibilityScore}/100`}
+ icon={Eye}
+ />
+ <KpiCard
+ title="Mentions"
+ value={data.summary.totalMentions.toLocaleString()}
+ icon={MessageSquareText}
+ />
+ <KpiCard
+ title="Citations"
+ value={data.summary.totalCitations.toLocaleString()}
+ icon={Quote}
+ />
+ </div>
+
+ <Card>
+ <CardHeader className="pb-3">
+ <CardTitle className="text-sm font-medium">Platform Results</CardTitle>
+ <p className="text-xs text-muted-foreground">
+ {data.summary.totalResults} result{data.summary.totalResults !== 1 ? 's' : ''} grouped by platform and model.
+ </p>
+ </CardHeader>
+ <CardContent className="space-y-3">
+ {platformGroups.length === 0 ? (
+ <div className="rounded-lg border border-dashed py-12 text-center text-sm text-muted-foreground">
+ No tracking results yet for this prompt.
+ </div>
+ ) : (
+ platformGroups.map((group) => (
+ <PlatformResultGroup
+ key={group.key}
+ group={group}
+ expanded={expanded.has(group.key)}
+ onToggle={() => togglePlatform(group.key)}
+ onViewResult={(result) => router.push(`/dashboard/insights/${result.id}`)}
+ />
+ ))
+ )}
+ </CardContent>
+ </Card>
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/prompts/_charts.tsx b/web/src/app/[locale]/(dashboard)/dashboard/prompts/_charts.tsx
new file mode 100644
index 000000000..203189721
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/prompts/_charts.tsx
@@ -0,0 +1,170 @@
+'use client';
+
+import { useRef, useState, useEffect } from 'react';
+import {
+ BarChart,
+ Bar,
+ XAxis,
+ YAxis,
+ CartesianGrid,
+ Tooltip,
+ Cell,
+} from 'recharts';
+
+// ─── Auto-sizing wrapper ─────────────────────────────────────────────────────
+
+function ChartContainer({
+ height,
+ children,
+}: {
+ height: number;
+ children: (width: number) => React.ReactNode;
+}) {
+ const ref = useRef<HTMLDivElement>(null);
+ const [width, setWidth] = useState(0);
+
+ useEffect(() => {
+ const el = ref.current;
+ if (!el) return;
+ const update = () => setWidth(el.clientWidth);
+ update();
+ const ro = new ResizeObserver(update);
+ ro.observe(el);
+ return () => ro.disconnect();
+ }, []);
+
+ return (
+ <div ref={ref} style={{ width: '100%', height }}>
+ {width > 0 && children(width)}
+ </div>
+ );
+}
+
+// ─── Exported Charts ──────────────────────────────────────────────────────────
+
+interface PlatformVolumeItem {
+ name: string;
+ share: number;
+ volume: number;
+ color: string;
+}
+
+/**
+ * Estimated share of AI-answered search queries across major answer engines.
+ *
+ * Derivation (all daily volume figures, early 2026):
+ * • Google Search: ~16.4B searches/day (ExplodingTopics, Feb 2026)
+ * • AI Overview coverage: ~35% of Google searches (Semrush / Pew estimates)
+ * → AI Overview volume: ~5.74B/day
+ * • Google AI Mode: ~100M MAU / ~1B monthly queries (Alphabet Q2 2025
+ * disclosures, 2026 industry estimates), still below Gemini app scale
+ * • ChatGPT: ~2.5B prompts/day (Ahrefs, Jul 2025)
+ * • Other chatbots combined: ~1.13B/day, split using the blended standalone
+ * chatbot market share average from Statcounter (Mar 2026),
+ * Similarweb (Jan 2026) and FirstPageSage (Apr 2026).
+ *
+ * Unlike raw chatbot-only market-share charts, this distribution reflects the
+ * "any query that gets an AI-generated answer" universe — which is the
+ * relevant denominator for Answer Engine Optimisation (AEO). Shares sum to 1.
+ */
+export const AI_PLATFORM_SHARES: {
+ name: string;
+ share: number;
+ color: string;
+}[] = [
+ { name: 'Google AI Overview', share: 0.602, color: '#4285f4' },
+ { name: 'ChatGPT', share: 0.27, color: '#10a37f' },
+ { name: 'Google Gemini', share: 0.055, color: '#8ab4f8' },
+ { name: 'Microsoft Copilot', share: 0.029, color: '#0ea5e9' },
+ { name: 'Perplexity', share: 0.018, color: '#6366f1' },
+ { name: 'Claude', share: 0.013, color: '#d97706' },
+ { name: 'Google AI Mode', share: 0.008, color: '#1a73e8' },
+ { name: 'Grok', share: 0.005, color: '#18181b' },
+];
+
+export function PlatformVolumeChart({ totalVolume }: { totalVolume: number }) {
+ if (totalVolume <= 0) {
+ return (
+ <div className="flex items-center justify-center h-[220px] text-xs text-muted-foreground">
+ No volume data available
+ </div>
+ );
+ }
+
+ const data: PlatformVolumeItem[] = AI_PLATFORM_SHARES.map((p) => ({
+ name: p.name,
+ share: p.share,
+ volume: Math.round(totalVolume * p.share),
+ color: p.color,
+ })).sort((a, b) => b.volume - a.volume);
+
+ return (
+ <ChartContainer height={220}>
+ {(width) => (
+ <BarChart
+ width={width}
+ height={220}
+ data={data}
+ layout="vertical"
+ margin={{ top: 0, right: 12, left: 4, bottom: 0 }}
+ >
+ <CartesianGrid
+ strokeDasharray="3 3"
+ className="stroke-border"
+ horizontal={false}
+ />
+ <XAxis
+ type="number"
+ tick={{ fontSize: 10 }}
+ tickLine={false}
+ axisLine={false}
+ className="fill-muted-foreground"
+ tickFormatter={(v) =>
+ v >= 1000 ? `${(v / 1000).toFixed(0)}k` : `${v}`
+ }
+ />
+ <YAxis
+ type="category"
+ dataKey="name"
+ tick={{ fontSize: 11 }}
+ tickLine={false}
+ axisLine={false}
+ className="fill-muted-foreground"
+ width={120}
+ />
+ <Tooltip
+ cursor={{ fill: 'hsl(var(--muted)/0.4)' }}
+ content={({ active, payload }) => {
+ if (!active || !payload?.length) return null;
+ const row = payload[0].payload as PlatformVolumeItem;
+ return (
+ <div className="rounded-lg border bg-background px-3 py-2 shadow-md text-xs">
+ <p className="font-medium text-foreground mb-0.5">
+ {row.name}
+ </p>
+ <p className="text-muted-foreground">
+ Est. queries:{' '}
+ <span className="font-medium text-foreground">
+ {row.volume.toLocaleString()}
+ </span>
+ </p>
+ <p className="text-muted-foreground">
+ Share:{' '}
+ <span className="font-medium text-foreground">
+ {(row.share * 100).toFixed(0)}%
+ </span>
+ </p>
+ </div>
+ );
+ }}
+ />
+ <Bar dataKey="volume" radius={[0, 4, 4, 0]}>
+ {data.map((entry) => (
+ <Cell key={entry.name} fill={entry.color} />
+ ))}
+ </Bar>
+ </BarChart>
+ )}
+ </ChartContainer>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/prompts/_suggestions-card.tsx b/web/src/app/[locale]/(dashboard)/dashboard/prompts/_suggestions-card.tsx
new file mode 100644
index 000000000..d77431243
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/prompts/_suggestions-card.tsx
@@ -0,0 +1,240 @@
+'use client';
+
+import { useEffect, useState, useCallback, useTransition } from 'react';
+import {
+ Card,
+ CardContent,
+ CardHeader,
+ CardTitle,
+} from '@/components/ui/card';
+import { Badge } from '@/components/ui/badge';
+import { Button } from '@/components/ui/button';
+import {
+ Sparkles,
+ Plus,
+ X,
+ RefreshCw,
+ Loader2,
+ TrendingUp,
+ Tag,
+ Info,
+} from 'lucide-react';
+import { toast } from 'sonner';
+import {
+ getPromptSuggestions,
+ refreshPromptSuggestions,
+ acceptSuggestion,
+ dismissSuggestion,
+ type PromptSuggestion,
+} from '@/lib/actions/prompt-suggestions';
+
+interface Props {
+ brandId: string;
+}
+
+export function SuggestionsCard({ brandId }: Props) {
+ const [suggestions, setSuggestions] = useState<PromptSuggestion[]>([]);
+ const [loading, setLoading] = useState(true);
+ const [refreshing, setRefreshing] = useState(false);
+ const [pendingId, setPendingId] = useState<string | null>(null);
+ const [, startTransition] = useTransition();
+
+ const load = useCallback(
+ async (autoRefresh = false) => {
+ try {
+ const { suggestions: s, stale } = await getPromptSuggestions(brandId);
+ if (autoRefresh && stale) {
+ setRefreshing(true);
+ const fresh = await refreshPromptSuggestions(brandId);
+ setSuggestions(fresh);
+ setRefreshing(false);
+ } else {
+ setSuggestions(s);
+ }
+ } catch (err) {
+ console.error('Failed to load suggestions:', err);
+ } finally {
+ setLoading(false);
+ }
+ },
+ [brandId],
+ );
+
+ useEffect(() => {
+ setLoading(true);
+ load(true);
+ }, [load]);
+
+ const handleRefresh = async () => {
+ setRefreshing(true);
+ try {
+ const fresh = await refreshPromptSuggestions(brandId);
+ setSuggestions(fresh);
+ toast.success('Suggestions refreshed');
+ } catch (err) {
+ toast.error(err instanceof Error ? err.message : 'Refresh failed');
+ } finally {
+ setRefreshing(false);
+ }
+ };
+
+ const handleAccept = (s: PromptSuggestion) => {
+ setPendingId(s.id);
+ startTransition(async () => {
+ try {
+ await acceptSuggestion(s.id);
+ setSuggestions((prev) => prev.filter((x) => x.id !== s.id));
+ toast.success('Prompt added to your tracked list');
+ } catch (err) {
+ toast.error(err instanceof Error ? err.message : 'Failed to add');
+ } finally {
+ setPendingId(null);
+ }
+ });
+ };
+
+ const handleDismiss = (s: PromptSuggestion) => {
+ setPendingId(s.id);
+ setSuggestions((prev) => prev.filter((x) => x.id !== s.id));
+ dismissSuggestion(s.id)
+ .catch(() => {
+ // Roll back on failure
+ setSuggestions((prev) => [...prev, s]);
+ toast.error('Failed to dismiss');
+ })
+ .finally(() => setPendingId(null));
+ };
+
+ return (
+ <Card>
+ <CardHeader className="pb-3">
+ <div className="flex items-center justify-between gap-4 flex-wrap">
+ <div className="flex items-center gap-2">
+ <Sparkles className="h-4 w-4 text-primary" />
+ <CardTitle className="text-sm font-medium">
+ Prompt Suggestions
+ </CardTitle>
+ <Info
+ className="h-3.5 w-3.5 text-muted-foreground cursor-help"
+ aria-label="AI-generated prompt ideas based on your brand, existing tracked prompts, and competitors cited in AI answers."
+ >
+ <title>
+ AI-generated prompt ideas based on your brand, existing tracked
+ prompts, and competitors cited in AI answers.
+ </title>
+ </Info>
+ </div>
+ <Button
+ onClick={handleRefresh}
+ disabled={refreshing}
+ size="sm"
+ variant="outline"
+ className="gap-2"
+ >
+ {refreshing ? (
+ <Loader2 className="h-3.5 w-3.5 animate-spin" />
+ ) : (
+ <RefreshCw className="h-3.5 w-3.5" />
+ )}
+ {refreshing ? 'Generating…' : 'Refresh'}
+ </Button>
+ </div>
+ </CardHeader>
+ <CardContent>
+ {loading ? (
+ <div className="flex items-center justify-center py-10">
+ <Loader2 className="h-5 w-5 animate-spin text-muted-foreground" />
+ </div>
+ ) : suggestions.length === 0 ? (
+ <div className="flex flex-col items-center justify-center py-10 text-center">
+ <Sparkles className="h-8 w-8 text-muted-foreground/40 mb-2" />
+ <p className="text-sm font-medium mb-1">No suggestions right now</p>
+ <p className="text-xs text-muted-foreground mb-3 max-w-sm">
+ Click refresh to generate new prompt ideas tailored to your brand
+ and competitor activity.
+ </p>
+ <Button
+ onClick={handleRefresh}
+ disabled={refreshing}
+ size="sm"
+ className="gap-2"
+ >
+ {refreshing ? (
+ <Loader2 className="h-3.5 w-3.5 animate-spin" />
+ ) : (
+ <Sparkles className="h-3.5 w-3.5" />
+ )}
+ Generate Suggestions
+ </Button>
+ </div>
+ ) : (
+ <ul className="space-y-2">
+ {suggestions.map((s) => {
+ const busy = pendingId === s.id;
+ return (
+ <li
+ key={s.id}
+ className="group flex items-start gap-3 rounded-lg border bg-muted/20 p-3 transition-colors hover:bg-muted/40"
+ >
+ <div className="flex-1 min-w-0 space-y-1.5">
+ <p className="text-sm font-medium leading-snug">
+ {s.suggestedText}
+ </p>
+ <div className="flex flex-wrap items-center gap-1.5">
+ {s.topicName && (
+ <Badge variant="outline" className="gap-1 text-xs">
+ <Tag className="h-3 w-3" />
+ {s.topicName}
+ </Badge>
+ )}
+ {s.estVolume != null && s.estVolume > 0 && (
+ <Badge
+ variant="outline"
+ className="gap-1 text-xs tabular-nums"
+ >
+ <TrendingUp className="h-3 w-3" />
+ ~{s.estVolume.toLocaleString()}/mo
+ </Badge>
+ )}
+ </div>
+ {s.reason && (
+ <p className="text-xs text-muted-foreground leading-relaxed">
+ {s.reason}
+ </p>
+ )}
+ </div>
+ <div className="flex items-center gap-1 shrink-0">
+ <Button
+ size="icon"
+ variant="outline"
+ className="h-8 w-8"
+ onClick={() => handleAccept(s)}
+ disabled={busy}
+ title="Add to tracked prompts"
+ >
+ {busy ? (
+ <Loader2 className="h-3.5 w-3.5 animate-spin" />
+ ) : (
+ <Plus className="h-3.5 w-3.5" />
+ )}
+ </Button>
+ <Button
+ size="icon"
+ variant="ghost"
+ className="h-8 w-8 text-muted-foreground"
+ onClick={() => handleDismiss(s)}
+ disabled={busy}
+ title="Dismiss"
+ >
+ <X className="h-3.5 w-3.5" />
+ </Button>
+ </div>
+ </li>
+ );
+ })}
+ </ul>
+ )}
+ </CardContent>
+ </Card>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/prompts/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/prompts/page.tsx
new file mode 100644
index 000000000..eff67f405
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/prompts/page.tsx
@@ -0,0 +1,1135 @@
+'use client';
+
+import { useState, useRef, useEffect, useCallback, useMemo } from 'react';
+import { createPortal } from 'react-dom';
+import { useSearchParams } from 'next/navigation';
+import { Link, useRouter } from '@/i18n/navigation';
+import { PlatformVolumeChart } from './_charts';
+import { SuggestionsCard } from './_suggestions-card';
+import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
+import { Badge } from '@/components/ui/badge';
+import { Button, buttonVariants } from '@/components/ui/button';
+import { Input } from '@/components/ui/input';
+import {
+ Table,
+ TableBody,
+ TableCell,
+ TableHead,
+ TableHeader,
+ TableRow,
+} from '@/components/ui/table';
+import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
+import {
+ TrendingUp,
+ Search,
+ AlertCircle,
+ BarChart3,
+ Layers,
+ Eye,
+ HelpCircle,
+ Loader2,
+ RefreshCw,
+ Pencil,
+ Settings2,
+} from 'lucide-react';
+import { cn } from '@/lib/utils';
+import { useBrandStore } from '@/stores/use-brand-store';
+import {
+ getPromptVolumes,
+ analyzePromptVolumesBatch,
+ refreshVolumes,
+ type VolumeQuota,
+} from '@/lib/actions/volumes';
+import { getPromptSets } from '@/lib/actions/prompt';
+import {
+ getPromptVisibilitySummaries,
+ type PromptVisibilitySummary,
+} from '@/lib/actions/tracking';
+import { aggregatePromptVolumeClusters } from '@/lib/prompt-volume-clusters';
+import type { PromptVolume, Prompt } from '@/types';
+import { toast } from 'sonner';
+
+// ─── Info Tooltip ─────────────────────────────────────────────────────────────
+
+function InfoTip({ content }: { content: string }) {
+ const [pos, setPos] = useState<{ x: number; y: number } | null>(null);
+ const ref = useRef<HTMLSpanElement>(null);
+
+ function show() {
+ const r = ref.current?.getBoundingClientRect();
+ if (r) setPos({ x: r.left + r.width / 2, y: r.bottom + 6 });
+ }
+
+ return (
+ <>
+ <span
+ ref={ref}
+ onMouseEnter={show}
+ onMouseLeave={() => setPos(null)}
+ className="inline-flex items-center cursor-help"
+ >
+ <HelpCircle className="h-3 w-3 text-muted-foreground/60 hover:text-muted-foreground transition-colors" />
+ </span>
+ {pos &&
+ createPortal(
+ <div
+ style={{ left: pos.x, top: pos.y, transform: 'translateX(-50%)' }}
+ className="pointer-events-none fixed z-[9999] w-56 rounded-md border bg-popover px-3 py-2 text-xs text-popover-foreground shadow-md"
+ >
+ {content}
+ </div>,
+ document.body,
+ )}
+ </>
+ );
+}
+
+function ColHead({
+ children,
+ tooltip,
+ className,
+}: {
+ children: React.ReactNode;
+ tooltip: string;
+ className?: string;
+}) {
+ return (
+ <TableHead className={className}>
+ <span className="inline-flex items-center gap-1">
+ {children}
+ <InfoTip content={tooltip} />
+ </span>
+ </TableHead>
+ );
+}
+
+// ─── Intent labels ───────────────────────────────────────────────────────────
+
+const INTENT_LABELS: Record<string, string> = {
+ comparison: 'Comparison',
+ 'how-to': 'How-to',
+ 'what-is': 'What is',
+ 'best-top': 'Best / Top',
+ 'vs-review': 'vs. / Review',
+ recommendation: 'Recommendation',
+ 'problem-solving': 'Problem Solving',
+};
+
+const INTENT_COLORS: Record<string, string> = {
+ comparison:
+ 'border-indigo-500/30 bg-indigo-500/10 text-indigo-600 dark:text-indigo-400',
+ 'how-to':
+ 'border-violet-500/30 bg-violet-500/10 text-violet-600 dark:text-violet-400',
+ 'what-is':
+ 'border-purple-400/30 bg-purple-400/10 text-purple-600 dark:text-purple-400',
+ 'best-top':
+ 'border-blue-400/30 bg-blue-400/10 text-blue-600 dark:text-blue-400',
+ 'vs-review':
+ 'border-cyan-500/30 bg-cyan-500/10 text-cyan-600 dark:text-cyan-400',
+ recommendation:
+ 'border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400',
+ 'problem-solving':
+ 'border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400',
+};
+
+// ─── Helpers ──────────────────────────────────────────────────────────────────
+
+const VALID_TABS = ['all', 'insights'] as const;
+type TabId = (typeof VALID_TABS)[number];
+
+function formatRelative(iso?: string): string {
+ if (!iso) return '—';
+ const diffMs = Date.now() - new Date(iso).getTime();
+ const diffMin = Math.round(diffMs / 60000);
+ if (diffMin < 1) return 'Just now';
+ if (diffMin < 60) return `${diffMin}m ago`;
+ const diffHr = Math.round(diffMin / 60);
+ if (diffHr < 24) return `${diffHr}h ago`;
+ const diffDay = Math.round(diffHr / 24);
+ if (diffDay < 30) return `${diffDay}d ago`;
+ return new Date(iso).toLocaleDateString();
+}
+
+function visibilityColorClass(score: number): string {
+ if (score >= 70) return 'text-emerald-600 dark:text-emerald-400';
+ if (score >= 40) return 'text-amber-600 dark:text-amber-400';
+ return 'text-red-600 dark:text-red-400';
+}
+
+function visibilityBarClass(score: number): string {
+ if (score >= 70) return 'bg-emerald-500';
+ if (score >= 40) return 'bg-amber-500';
+ return 'bg-red-500';
+}
+
+// ─── Sub-components ───────────────────────────────────────────────────────────
+
+function KpiCard({
+ title,
+ icon: Icon,
+ value,
+ sub,
+ subPositive,
+}: {
+ title: string;
+ icon: React.ElementType;
+ value: React.ReactNode;
+ sub: React.ReactNode;
+ subPositive?: boolean;
+}) {
+ return (
+ <Card>
+ <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-1">
+ <CardTitle className="text-xs font-medium text-muted-foreground uppercase tracking-wide">
+ {title}
+ </CardTitle>
+ <Icon className="h-3.5 w-3.5 text-muted-foreground" />
+ </CardHeader>
+ <CardContent>
+ <div className="text-3xl font-bold">{value}</div>
+ <p
+ className={cn(
+ 'text-xs mt-1 flex items-center gap-0.5',
+ subPositive
+ ? 'text-green-600 dark:text-green-400'
+ : 'text-muted-foreground',
+ )}
+ >
+ {sub}
+ </p>
+ </CardContent>
+ </Card>
+ );
+}
+
+function VolumePill({ value }: { value: number }) {
+ const k = value >= 1000 ? `~${(value / 1000).toFixed(1)}k` : `~${value}`;
+ return <span className="tabular-nums font-semibold text-sm">{k}</span>;
+}
+
+// ─── Main Page ────────────────────────────────────────────────────────────────
+
+export default function PromptsPage() {
+ const [search, setSearch] = useState('');
+ const [volumes, setVolumes] = useState<PromptVolume[]>([]);
+ const [allPrompts, setAllPrompts] = useState<Prompt[]>([]);
+ const [visibility, setVisibility] = useState<
+ Record<string, PromptVisibilitySummary>
+ >({});
+ const [loading, setLoading] = useState(true);
+ const [analyzing, setAnalyzing] = useState(false);
+ const [refreshing, setRefreshing] = useState(false);
+ const [quota, setQuota] = useState<VolumeQuota | null>(null);
+
+ const activeBrandId = useBrandStore((s) => s.activeBrandId);
+ const router = useRouter();
+ const searchParams = useSearchParams();
+
+ const initialTab: TabId = (() => {
+ const raw = searchParams.get('tab');
+ return (VALID_TABS as readonly string[]).includes(raw ?? '')
+ ? (raw as TabId)
+ : 'all';
+ })();
+ const [tab, setTab] = useState<TabId>(initialTab);
+
+ // Keep the URL in sync with the active tab so deep links / refreshes land
+ // back on the same view.
+ useEffect(() => {
+ const current = searchParams.get('tab');
+ if (current === tab) return;
+ const params = new URLSearchParams(Array.from(searchParams.entries()));
+ params.set('tab', tab);
+ router.replace(`/dashboard/prompts?${params.toString()}`, {
+ scroll: false,
+ });
+ }, [tab, searchParams, router]);
+
+ const loadData = useCallback(async () => {
+ if (!activeBrandId) {
+ setVolumes([]);
+ setAllPrompts([]);
+ setVisibility({});
+ setLoading(false);
+ return;
+ }
+
+ setLoading(true);
+ try {
+ const [volumeResult, promptSets, visSummary] = await Promise.all([
+ getPromptVolumes(activeBrandId),
+ getPromptSets(activeBrandId),
+ getPromptVisibilitySummaries(activeBrandId, { days: 30 }),
+ ]);
+ setVolumes(volumeResult.volumes);
+ if (volumeResult.quota) setQuota(volumeResult.quota);
+ const prompts = promptSets.flatMap((ps) => ps.prompts);
+ setAllPrompts(prompts);
+ setVisibility(visSummary);
+ } catch (err) {
+ console.error('Failed to load prompt data:', err);
+ toast.error('Failed to load prompt data');
+ } finally {
+ setLoading(false);
+ }
+ }, [activeBrandId]);
+
+ useEffect(() => {
+ loadData();
+ }, [loadData]);
+
+ const handleAnalyzeNew = async () => {
+ if (!activeBrandId) return;
+
+ const promptsWithoutVolume = allPrompts.filter(
+ (p) => p.isActive && !volumes.find((v) => v.promptId === p.id),
+ );
+
+ const promptsToAnalyze =
+ promptsWithoutVolume.length > 0
+ ? promptsWithoutVolume
+ : allPrompts.filter((p) => p.isActive);
+
+ if (promptsToAnalyze.length === 0) {
+ toast.error(
+ 'No active prompts to analyze. Add prompts to a brand first.',
+ );
+ return;
+ }
+
+ setAnalyzing(true);
+ try {
+ const result = await analyzePromptVolumesBatch(
+ promptsToAnalyze.map((p) => ({ promptId: p.id, promptText: p.text })),
+ );
+ if (result.remaining !== undefined && quota) {
+ setQuota({
+ ...quota,
+ remaining: result.remaining,
+ used: quota.limit === -1 ? 0 : quota.limit - result.remaining,
+ });
+ }
+ toast.success(`Analyzed ${promptsToAnalyze.length} prompts`);
+ await loadData();
+ } catch (err: unknown) {
+ const message =
+ err instanceof Error ? err.message : 'Volume analysis failed';
+ if (message.includes('limit reached')) {
+ toast.error(
+ 'Monthly volume analysis limit reached. Upgrade your plan for more.',
+ );
+ } else {
+ console.error('Volume analysis failed:', err);
+ toast.error('Volume analysis failed');
+ }
+ } finally {
+ setAnalyzing(false);
+ }
+ };
+
+ const handleRefreshVolumes = async () => {
+ if (!activeBrandId || volumes.length === 0) return;
+
+ setRefreshing(true);
+ try {
+ const result = await refreshVolumes(activeBrandId);
+ if (result.remaining !== undefined && quota) {
+ setQuota({
+ ...quota,
+ remaining: result.remaining,
+ used: quota.limit === -1 ? 0 : quota.limit - result.remaining,
+ });
+ }
+ toast.success(`Refreshed volumes for ${result.refreshed} prompts`);
+ await loadData();
+ } catch (err: unknown) {
+ const message =
+ err instanceof Error ? err.message : 'Volume refresh failed';
+ if (message.includes('limit reached')) {
+ toast.error(
+ 'Monthly volume analysis limit reached. Upgrade your plan for more.',
+ );
+ } else {
+ console.error('Volume refresh failed:', err);
+ toast.error('Volume refresh failed');
+ }
+ } finally {
+ setRefreshing(false);
+ }
+ };
+
+ const handleReanalyzeAll = async () => {
+ if (!activeBrandId) return;
+
+ const activePrompts = allPrompts.filter((p) => p.isActive);
+ if (activePrompts.length === 0) {
+ toast.error('No active prompts to analyze.');
+ return;
+ }
+
+ setAnalyzing(true);
+ try {
+ const result = await analyzePromptVolumesBatch(
+ activePrompts.map((p) => ({ promptId: p.id, promptText: p.text })),
+ undefined,
+ undefined,
+ true,
+ );
+ if (result.remaining !== undefined && quota) {
+ setQuota({
+ ...quota,
+ remaining: result.remaining,
+ used: quota.limit === -1 ? 0 : quota.limit - result.remaining,
+ });
+ }
+ toast.success(
+ `Re-analyzed ${activePrompts.length} prompts with new keywords`,
+ );
+ await loadData();
+ } catch (err: unknown) {
+ const message = err instanceof Error ? err.message : 'Re-analysis failed';
+ if (message.includes('limit reached')) {
+ toast.error(
+ 'Monthly volume analysis limit reached. Upgrade your plan for more.',
+ );
+ } else {
+ console.error('Re-analysis failed:', err);
+ toast.error('Re-analysis failed');
+ }
+ } finally {
+ setAnalyzing(false);
+ }
+ };
+
+ const totalGoogleVol = volumes.reduce((s, v) => s + v.totalGoogleVolume, 0);
+ const totalAiVol = volumes.reduce((s, v) => s + v.estAiVolume, 0);
+ const totalKeywords = volumes.reduce((s, v) => s + v.keywords.length, 0);
+
+ const filtered = volumes.filter(
+ (v) =>
+ v.promptText.toLowerCase().includes(search.toLowerCase()) ||
+ v.intent.toLowerCase().includes(search.toLowerCase()),
+ );
+
+ const quotaExhausted =
+ quota !== null && quota.limit !== -1 && quota.remaining <= 0;
+
+ // Join prompts with their volume + visibility summaries once, reused by the
+ // All Prompts table.
+ const volumeByPromptId = useMemo(() => {
+ const m = new Map<string, PromptVolume>();
+ for (const v of volumes) m.set(v.promptId, v);
+ return m;
+ }, [volumes]);
+
+ if (!activeBrandId) {
+ return (
+ <div className="flex items-center justify-center min-h-[400px]">
+ <p className="text-muted-foreground">Select a brand to view prompts.</p>
+ </div>
+ );
+ }
+
+ return (
+ <div className="space-y-6">
+ {/* Header */}
+ <div className="flex items-center justify-between gap-4 flex-wrap">
+ <div>
+ <h1 className="text-2xl font-bold tracking-tight">Prompts</h1>
+ <p className="text-muted-foreground text-sm">
+ Manage every tracked prompt and review estimated AI demand
+ <span className="ml-2 inline-flex items-center gap-1 text-xs text-muted-foreground/70">
+ <AlertCircle className="h-3 w-3" />
+ Volumes are estimates, not exact figures
+ </span>
+ </p>
+ </div>
+ </div>
+
+ <Tabs value={tab} onValueChange={(v) => setTab(v as TabId)}>
+ <div className="flex items-center justify-between gap-4 flex-wrap">
+ <TabsList>
+ <TabsTrigger value="all">All Prompts</TabsTrigger>
+ <TabsTrigger value="insights">Insights</TabsTrigger>
+ </TabsList>
+ <Link
+ href={`/dashboard/brands/${activeBrandId}/prompts`}
+ className={buttonVariants({ variant: 'outline', size: 'sm' })}
+ >
+ <Settings2 className="h-4 w-4" />
+ Manage prompts
+ </Link>
+ </div>
+
+ {/* ─── All Prompts tab ─────────────────────────────────────────── */}
+ <TabsContent value="all" className="mt-4">
+ <AllPromptsTab
+ loading={loading}
+ prompts={allPrompts}
+ activeBrandId={activeBrandId}
+ volumeByPromptId={volumeByPromptId}
+ visibility={visibility}
+ />
+ </TabsContent>
+
+ {/* ─── Insights tab ────────────────────────────────────────────── */}
+ <TabsContent value="insights" className="mt-4">
+ {/* Action toolbar */}
+ <div className="flex items-center justify-end gap-2 flex-wrap mb-4">
+ {quota && quota.limit !== -1 && (
+ <span
+ className={cn(
+ 'text-xs tabular-nums',
+ quotaExhausted ? 'text-red-500' : 'text-muted-foreground',
+ )}
+ >
+ {quota.remaining}/{quota.limit} analyses left
+ </span>
+ )}
+ {volumes.length > 0 && (
+ <>
+ <Button
+ onClick={handleRefreshVolumes}
+ disabled={
+ refreshing || analyzing || loading || quotaExhausted
+ }
+ size="sm"
+ variant="outline"
+ className="gap-2"
+ >
+ {refreshing ? (
+ <Loader2 className="h-4 w-4 animate-spin" />
+ ) : (
+ <RefreshCw className="h-4 w-4" />
+ )}
+ {refreshing ? 'Refreshing...' : 'Refresh Volumes'}
+ </Button>
+ <Button
+ onClick={handleReanalyzeAll}
+ disabled={
+ analyzing || refreshing || loading || quotaExhausted
+ }
+ size="sm"
+ variant="outline"
+ className="gap-2"
+ >
+ {analyzing ? (
+ <Loader2 className="h-4 w-4 animate-spin" />
+ ) : (
+ <BarChart3 className="h-4 w-4" />
+ )}
+ {analyzing ? 'Analyzing...' : 'Re-analyze Keywords'}
+ </Button>
+ </>
+ )}
+ {volumes.length > 0 &&
+ allPrompts.filter(
+ (p) => p.isActive && !volumes.find((v) => v.promptId === p.id),
+ ).length > 0 && (
+ <Button
+ onClick={handleAnalyzeNew}
+ disabled={
+ analyzing || refreshing || loading || quotaExhausted
+ }
+ size="sm"
+ className="gap-2"
+ >
+ {analyzing ? (
+ <Loader2 className="h-4 w-4 animate-spin" />
+ ) : (
+ <BarChart3 className="h-4 w-4" />
+ )}
+ {analyzing ? 'Analyzing...' : 'Analyze New Prompts'}
+ </Button>
+ )}
+ </div>
+
+ {loading ? (
+ <div className="flex items-center justify-center min-h-[300px]">
+ <Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
+ </div>
+ ) : volumes.length === 0 ? (
+ <Card>
+ <CardContent className="flex flex-col items-center justify-center py-16 gap-4">
+ <BarChart3 className="h-12 w-12 text-muted-foreground/40" />
+ <div className="text-center space-y-1">
+ <p className="text-sm font-medium">No volume data yet</p>
+ <p className="text-xs text-muted-foreground">
+ {allPrompts.length > 0
+ ? 'Click "Analyze Volumes" to fetch search volume data for your prompts.'
+ : 'Add prompts to your brand first, then analyze their volumes.'}
+ </p>
+ </div>
+ {allPrompts.length > 0 && (
+ <>
+ <Button
+ onClick={handleAnalyzeNew}
+ disabled={analyzing || quotaExhausted}
+ size="sm"
+ className="gap-2"
+ >
+ {analyzing ? (
+ <Loader2 className="h-4 w-4 animate-spin" />
+ ) : (
+ <BarChart3 className="h-4 w-4" />
+ )}
+ {analyzing ? 'Analyzing...' : 'Analyze Volumes'}
+ </Button>
+ {quotaExhausted && (
+ <p className="text-xs text-red-500">
+ Monthly analysis limit reached. Resets on the 1st.
+ </p>
+ )}
+ {quota && quota.limit !== -1 && !quotaExhausted && (
+ <p className="text-xs text-muted-foreground">
+ {quota.remaining}/{quota.limit} analyses remaining this
+ month
+ </p>
+ )}
+ </>
+ )}
+ </CardContent>
+ </Card>
+ ) : (
+ <div className="space-y-6">
+ {/* KPI Cards */}
+ <div className="grid grid-cols-2 gap-4 sm:grid-cols-4">
+ <KpiCard
+ title="Prompts Analyzed"
+ icon={Layers}
+ value={volumes.length}
+ sub={`across ${totalKeywords} keywords`}
+ />
+ <KpiCard
+ title="Total Est. AI Volume"
+ icon={BarChart3}
+ value={`~${(totalAiVol / 1000).toFixed(0)}k`}
+ sub={`from ${(totalGoogleVol / 1000).toFixed(0)}k Google searches`}
+ />
+ <KpiCard
+ title="AI Adoption Rate"
+ icon={TrendingUp}
+ value={`${((volumes[0]?.aiVolumeMultiplier ?? 0.15) * 100).toFixed(0)}%`}
+ sub="of Google search volume"
+ />
+ <KpiCard
+ title="Avg. AI Volume"
+ icon={BarChart3}
+ value={`~${(totalAiVol / volumes.length / 1000).toFixed(1)}k`}
+ sub="per prompt"
+ />
+ </div>
+
+ {/* Charts row */}
+ <div className="grid grid-cols-1 gap-4 lg:grid-cols-3">
+ <Card className="lg:col-span-2">
+ <CardHeader className="pb-2">
+ <CardTitle className="text-sm font-medium">
+ Prompt Volumes
+ </CardTitle>
+ <p className="text-xs text-muted-foreground">
+ Total estimated AI-answered queries across all topic
+ clusters, split by answer-engine share. Weights include
+ Google AI Overview (~35% of Google searches), Google AI
+ Mode, and standalone chatbots.
+ </p>
+ </CardHeader>
+ <CardContent>
+ <PlatformVolumeChart totalVolume={totalAiVol} />
+ </CardContent>
+ </Card>
+
+ <Card>
+ <CardHeader className="pb-2">
+ <div className="flex items-start justify-between gap-3">
+ <div>
+ <CardTitle className="text-sm font-medium">
+ Similar Topics
+ </CardTitle>
+ <p className="text-xs text-muted-foreground">
+ Most-searched keyword clusters across all prompts
+ </p>
+ </div>
+ <Link
+ href="/dashboard/prompts/similar-topics"
+ className="shrink-0 text-xs font-medium text-primary underline-offset-2 hover:underline"
+ >
+ See all
+ </Link>
+ </div>
+ </CardHeader>
+ <CardContent>
+ <SimilarTopicsList volumes={volumes} />
+ </CardContent>
+ </Card>
+ </div>
+
+ {/* Prompt Suggestions */}
+ {activeBrandId && <SuggestionsCard brandId={activeBrandId} />}
+
+ {/* Prompt Volume Table */}
+ <Card>
+ <CardHeader className="pb-3">
+ <div className="flex items-center justify-between gap-4 flex-wrap">
+ <CardTitle className="text-sm font-medium">
+ Prompt Volumes
+ </CardTitle>
+ <div className="relative w-60">
+ <Search className="absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground" />
+ <Input
+ placeholder="Search prompts…"
+ value={search}
+ onChange={(e) => setSearch(e.target.value)}
+ className="pl-8 h-8 text-xs"
+ />
+ </div>
+ </div>
+ </CardHeader>
+ <CardContent className="p-0">
+ <Table>
+ <TableHeader>
+ <TableRow>
+ <TableHead className="pl-6">Prompt</TableHead>
+ <ColHead
+ className="text-center"
+ tooltip="Number of keywords extracted from this prompt by AI analysis."
+ >
+ Keywords
+ </ColHead>
+ <ColHead
+ className="text-right"
+ tooltip="Total monthly Google search volume across all extracted keywords."
+ >
+ Google Vol.
+ </ColHead>
+ <ColHead
+ className="text-right"
+ tooltip="Estimated monthly AI prompt volume. Calculated as total Google volume multiplied by the AI adoption rate."
+ >
+ Est. AI Vol.
+ </ColHead>
+ <ColHead
+ className="text-center"
+ tooltip="The search intent detected by AI analysis. Different intents indicate how users frame their queries."
+ >
+ Intent
+ </ColHead>
+ <ColHead
+ className="text-right pr-6"
+ tooltip="The AI adoption multiplier applied to Google volume."
+ >
+ Multiplier
+ </ColHead>
+ </TableRow>
+ </TableHeader>
+ <TableBody>
+ {filtered.map((row) => (
+ <TableRow key={row.id} className="hover:bg-muted/50">
+ <TableCell className="pl-6 font-medium text-sm max-w-[280px]">
+ <span className="line-clamp-1">
+ {row.promptText}
+ </span>
+ </TableCell>
+ <TableCell className="text-center text-xs text-muted-foreground tabular-nums">
+ {row.keywords.length}
+ </TableCell>
+ <TableCell className="text-right tabular-nums text-sm text-muted-foreground">
+ {row.totalGoogleVolume.toLocaleString()}
+ </TableCell>
+ <TableCell className="text-right">
+ <VolumePill value={row.estAiVolume} />
+ </TableCell>
+ <TableCell className="text-center">
+ <Badge
+ variant="outline"
+ className={cn(
+ 'text-xs whitespace-nowrap',
+ INTENT_COLORS[row.intent] || '',
+ )}
+ >
+ {INTENT_LABELS[row.intent] || row.intent}
+ </Badge>
+ </TableCell>
+ <TableCell className="text-right pr-6 text-xs text-muted-foreground tabular-nums">
+ ×{row.aiVolumeMultiplier}
+ </TableCell>
+ </TableRow>
+ ))}
+ </TableBody>
+ </Table>
+ {filtered.length === 0 && (
+ <div className="py-10 text-center text-sm text-muted-foreground">
+ No prompts match your search.
+ </div>
+ )}
+ <div className="px-6 py-2 border-t">
+ <p className="text-xs text-muted-foreground">
+ * Est. AI Volume = Total Google search volume of extracted
+ keywords × AI adoption rate. Figures are approximations
+ for planning purposes.
+ </p>
+ </div>
+ </CardContent>
+ </Card>
+
+ {/* High Opportunity Prompts */}
+ {volumes.filter((v) => v.estAiVolume >= 5000).length > 0 && (
+ <Card>
+ <CardHeader className="pb-2">
+ <div className="flex items-center gap-2">
+ <Eye className="h-4 w-4 text-emerald-500" />
+ <CardTitle className="text-sm font-medium">
+ High Opportunity Prompts
+ </CardTitle>
+ <span className="text-xs text-muted-foreground ml-1">
+ Prompts with highest estimated AI search demand
+ </span>
+ </div>
+ </CardHeader>
+ <CardContent className="p-0">
+ <Table>
+ <TableHeader>
+ <TableRow>
+ <TableHead className="pl-6">Prompt</TableHead>
+ <ColHead
+ className="text-right"
+ tooltip="Estimated monthly AI prompt volume. Sorted by highest volume first."
+ >
+ Est. AI Volume
+ </ColHead>
+ <ColHead
+ className="text-center"
+ tooltip="The detected search intent."
+ >
+ Intent
+ </ColHead>
+ <ColHead
+ className="text-right pr-6"
+ tooltip="Opportunity level based on estimated AI volume. High = above 10k/mo, Medium = 5k–10k/mo."
+ >
+ Opportunity
+ </ColHead>
+ </TableRow>
+ </TableHeader>
+ <TableBody>
+ {volumes
+ .filter((v) => v.estAiVolume >= 5000)
+ .sort((a, b) => b.estAiVolume - a.estAiVolume)
+ .map((row) => (
+ <TableRow
+ key={row.id}
+ className="hover:bg-muted/50"
+ >
+ <TableCell className="pl-6 font-medium text-sm">
+ {row.promptText}
+ </TableCell>
+ <TableCell className="text-right">
+ <VolumePill value={row.estAiVolume} />
+ </TableCell>
+ <TableCell className="text-center">
+ <Badge
+ variant="outline"
+ className={cn(
+ 'text-xs',
+ INTENT_COLORS[row.intent] || '',
+ )}
+ >
+ {INTENT_LABELS[row.intent] || row.intent}
+ </Badge>
+ </TableCell>
+ <TableCell className="text-right pr-6">
+ <Badge
+ variant="outline"
+ className={cn(
+ 'text-xs',
+ row.estAiVolume >= 10000
+ ? 'border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400'
+ : 'border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400',
+ )}
+ >
+ {row.estAiVolume >= 10000 ? 'High' : 'Medium'}
+ </Badge>
+ </TableCell>
+ </TableRow>
+ ))}
+ </TableBody>
+ </Table>
+ </CardContent>
+ </Card>
+ )}
+ </div>
+ )}
+ </TabsContent>
+ </Tabs>
+ </div>
+ );
+}
+
+// ─── All Prompts Tab ──────────────────────────────────────────────────────────
+
+function AllPromptsTab({
+ loading,
+ prompts,
+ activeBrandId,
+ volumeByPromptId,
+ visibility,
+}: {
+ loading: boolean;
+ prompts: Prompt[];
+ activeBrandId: string;
+ volumeByPromptId: Map<string, PromptVolume>;
+ visibility: Record<string, PromptVisibilitySummary>;
+}) {
+ const [search, setSearch] = useState('');
+
+ const filtered = useMemo(() => {
+ const q = search.trim().toLowerCase();
+ const sorted = [...prompts].sort(
+ (a, b) =>
+ new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(),
+ );
+ if (!q) return sorted;
+ return sorted.filter(
+ (p) =>
+ p.text.toLowerCase().includes(q) ||
+ (p.category ?? '').toLowerCase().includes(q),
+ );
+ }, [prompts, search]);
+
+ if (loading) {
+ return (
+ <div className="flex items-center justify-center min-h-[300px]">
+ <Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
+ </div>
+ );
+ }
+
+ if (prompts.length === 0) {
+ return (
+ <Card>
+ <CardContent className="flex flex-col items-center justify-center py-16 gap-4">
+ <Layers className="h-12 w-12 text-muted-foreground/40" />
+ <div className="text-center space-y-1">
+ <p className="text-sm font-medium">No prompts yet</p>
+ <p className="text-xs text-muted-foreground">
+ Add prompts to your brand to start tracking their AI visibility.
+ </p>
+ </div>
+ <Link href={`/dashboard/brands/${activeBrandId}/prompts`}>
+ <Button size="sm" className="gap-2">
+ <Pencil className="h-4 w-4" />
+ Manage prompts
+ </Button>
+ </Link>
+ </CardContent>
+ </Card>
+ );
+ }
+
+ return (
+ <Card>
+ <CardHeader className="pb-3">
+ <div className="flex items-center justify-between gap-4 flex-wrap">
+ <div>
+ <CardTitle className="text-sm font-medium">
+ All Prompts ({prompts.length})
+ </CardTitle>
+ <p className="text-xs text-muted-foreground mt-0.5">
+ Read-only overview · edit prompts from each brand&apos;s page
+ </p>
+ </div>
+ <div className="relative w-60">
+ <Search className="absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground" />
+ <Input
+ placeholder="Search prompts…"
+ value={search}
+ onChange={(e) => setSearch(e.target.value)}
+ className="pl-8 h-8 text-xs"
+ />
+ </div>
+ </div>
+ </CardHeader>
+ <CardContent className="p-0">
+ <Table>
+ <TableHeader>
+ <TableRow>
+ <TableHead className="pl-6">Prompt</TableHead>
+ <TableHead>Topic</TableHead>
+ <TableHead className="text-center">Status</TableHead>
+ <ColHead
+ className="text-right"
+ tooltip="Average brand visibility score in AI answers for this prompt over the last 30 days."
+ >
+ Visibility
+ </ColHead>
+ <ColHead
+ className="text-right"
+ tooltip="Total times the brand was mentioned across AI answers for this prompt over the last 30 days."
+ >
+ Mentions
+ </ColHead>
+ <ColHead
+ className="text-right"
+ tooltip="Estimated monthly AI prompt volume, from keyword analysis. Empty until analysed."
+ >
+ Volume
+ </ColHead>
+ <ColHead
+ className="text-right"
+ tooltip="Most recent tracking run for this prompt."
+ >
+ Last run
+ </ColHead>
+ <TableHead className="text-right pr-6 w-[60px]">Edit</TableHead>
+ </TableRow>
+ </TableHeader>
+ <TableBody>
+ {filtered.map((p) => {
+ const vol = volumeByPromptId.get(p.id);
+ const vis = visibility[p.id];
+ return (
+ <TableRow key={p.id} className="hover:bg-muted/50">
+ <TableCell className="pl-6 font-medium text-sm max-w-[320px]">
+ <Link
+ href={`/dashboard/prompts/${p.id}`}
+ className="line-clamp-2 transition-colors hover:text-primary hover:underline"
+ >
+ {p.text}
+ </Link>
+ </TableCell>
+ <TableCell>
+ <span className="text-xs text-muted-foreground truncate inline-block max-w-[140px] align-middle">
+ {p.category?.trim() ? p.category : '—'}
+ </span>
+ </TableCell>
+ <TableCell className="text-center">
+ <Badge
+ variant="outline"
+ className={cn(
+ 'text-xs',
+ p.isActive
+ ? 'border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400'
+ : 'border-muted-foreground/20 text-muted-foreground',
+ )}
+ >
+ {p.isActive ? 'Active' : 'Paused'}
+ </Badge>
+ </TableCell>
+ <TableCell className="text-right">
+ {vis ? (
+ <div className="inline-flex items-center gap-2 justify-end min-w-[110px]">
+ <span
+ className={cn(
+ 'text-sm font-semibold tabular-nums',
+ visibilityColorClass(vis.avgVisibility),
+ )}
+ >
+ {vis.avgVisibility.toFixed(0)}
+ </span>
+ <div className="h-1.5 w-16 rounded-full bg-muted overflow-hidden">
+ <div
+ className={cn(
+ 'h-full rounded-full',
+ visibilityBarClass(vis.avgVisibility),
+ )}
+ style={{
+ width: `${Math.min(100, Math.max(0, vis.avgVisibility))}%`,
+ }}
+ />
+ </div>
+ </div>
+ ) : (
+ <span className="text-xs text-muted-foreground">—</span>
+ )}
+ </TableCell>
+ <TableCell className="text-right tabular-nums text-sm">
+ {vis ? (
+ vis.totalMentions.toLocaleString()
+ ) : (
+ <span className="text-xs text-muted-foreground">—</span>
+ )}
+ </TableCell>
+ <TableCell className="text-right">
+ {vol ? (
+ <VolumePill value={vol.estAiVolume} />
+ ) : (
+ <span className="text-xs text-muted-foreground">—</span>
+ )}
+ </TableCell>
+ <TableCell className="text-right text-xs text-muted-foreground">
+ {formatRelative(vis?.lastRunAt)}
+ </TableCell>
+ <TableCell className="text-right pr-6">
+ <Link href={`/dashboard/brands/${activeBrandId}/prompts`}>
+ <Button
+ size="sm"
+ variant="ghost"
+ className="h-7 w-7 p-0"
+ aria-label="Edit prompt"
+ >
+ <Pencil className="h-3.5 w-3.5" />
+ </Button>
+ </Link>
+ </TableCell>
+ </TableRow>
+ );
+ })}
+ </TableBody>
+ </Table>
+ {filtered.length === 0 && (
+ <div className="py-10 text-center text-sm text-muted-foreground">
+ No prompts match your search.
+ </div>
+ )}
+ </CardContent>
+ </Card>
+ );
+}
+
+// ─── Similar Topics List ──────────────────────────────────────────────────────
+
+/**
+ * Aggregates related keyword clusters across all prompts. Keywords can appear
+ * in multiple prompts (e.g. "most reliable luxury cars"), so we sum their
+ * volumes and keep a unique row per normalised keyword to avoid duplicate
+ * React keys and double-counted totals.
+ */
+function SimilarTopicsList({ volumes }: { volumes: PromptVolume[] }) {
+ const sorted = aggregatePromptVolumeClusters(volumes).slice(0, 8);
+
+ const maxVol = sorted[0]?.volume || 1;
+
+ return (
+ <div className="w-full space-y-2">
+ {sorted.map((item) => {
+ const key = item.keyword.trim().toLowerCase();
+ return (
+ <div key={key} className="flex items-center gap-2 text-xs">
+ <span
+ className="w-32 shrink-0 text-muted-foreground truncate"
+ title={`${item.keyword}${item.occurrences > 1 ? ` (in ${item.occurrences} prompts)` : ''}`}
+ >
+ {item.keyword}
+ </span>
+ <div className="flex-1 h-1.5 rounded-full bg-muted overflow-hidden">
+ <div
+ className="h-full rounded-full bg-indigo-500 transition-all"
+ style={{ width: `${(item.volume / maxVol) * 100}%` }}
+ />
+ </div>
+ <span className="w-12 text-right font-medium tabular-nums text-foreground">
+ {item.volume >= 1000
+ ? `${(item.volume / 1000).toFixed(1)}k`
+ : item.volume}
+ </span>
+ </div>
+ );
+ })}
+ {sorted.length === 0 && (
+ <p className="text-xs text-muted-foreground text-center py-4">
+ No keyword data yet
+ </p>
+ )}
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/prompts/similar-topics/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/prompts/similar-topics/page.tsx
new file mode 100644
index 000000000..2c8bbe6f0
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/prompts/similar-topics/page.tsx
@@ -0,0 +1,235 @@
+'use client';
+
+import { useEffect, useMemo, useState } from 'react';
+import { ArrowLeft, Layers, Search } from 'lucide-react';
+import { Link } from '@/i18n/navigation';
+import { Badge } from '@/components/ui/badge';
+import { buttonVariants } from '@/components/ui/button';
+import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
+import { Input } from '@/components/ui/input';
+import {
+ Table,
+ TableBody,
+ TableCell,
+ TableHead,
+ TableHeader,
+ TableRow,
+} from '@/components/ui/table';
+import { getPromptVolumes } from '@/lib/actions/volumes';
+import { aggregatePromptVolumeClusters } from '@/lib/prompt-volume-clusters';
+import { useBrandStore } from '@/stores/use-brand-store';
+import type { PromptVolume } from '@/types';
+
+function formatVolume(value: number): string {
+ if (value >= 1_000_000) return `${(value / 1_000_000).toFixed(1)}M`;
+ if (value >= 1000) return `${(value / 1000).toFixed(1)}k`;
+ return value.toLocaleString();
+}
+
+export default function SimilarTopicsPage() {
+ const { getActiveBrand } = useBrandStore();
+ const brand = getActiveBrand();
+ const [volumes, setVolumes] = useState<PromptVolume[]>([]);
+ const [loading, setLoading] = useState(true);
+ const [search, setSearch] = useState('');
+
+ useEffect(() => {
+ let cancelled = false;
+
+ async function load() {
+ if (!brand?.id) {
+ setLoading(false);
+ return;
+ }
+
+ setLoading(true);
+ try {
+ const { volumes: nextVolumes } = await getPromptVolumes(brand.id);
+ if (!cancelled) setVolumes(nextVolumes);
+ } finally {
+ if (!cancelled) setLoading(false);
+ }
+ }
+
+ load();
+ return () => {
+ cancelled = true;
+ };
+ }, [brand?.id]);
+
+ const clusters = useMemo(() => {
+ const normalizedSearch = search.trim().toLowerCase();
+ const all = aggregatePromptVolumeClusters(volumes);
+
+ if (!normalizedSearch) return all;
+
+ return all.filter((cluster) => {
+ if (cluster.keyword.toLowerCase().includes(normalizedSearch)) return true;
+ return cluster.prompts.some((prompt) =>
+ prompt.text.toLowerCase().includes(normalizedSearch),
+ );
+ });
+ }, [search, volumes]);
+
+ const totals = useMemo(
+ () => ({
+ clusters: aggregatePromptVolumeClusters(volumes).length,
+ googleVolume: volumes.reduce((sum, volume) => sum + volume.totalGoogleVolume, 0),
+ aiVolume: volumes.reduce((sum, volume) => sum + volume.estAiVolume, 0),
+ }),
+ [volumes],
+ );
+
+ return (
+ <div className="mx-auto max-w-6xl space-y-6 p-2 sm:p-6">
+ <div className="space-y-2">
+ <Link
+ href="/dashboard/prompts?tab=insights"
+ className={buttonVariants({
+ variant: 'ghost',
+ size: 'sm',
+ className: 'gap-2 px-0',
+ })}
+ >
+ <ArrowLeft className="h-4 w-4" />
+ Back to Prompt Insights
+ </Link>
+ <div>
+ <h1 className="text-2xl font-semibold tracking-tight">
+ Similar Topics
+ </h1>
+ <p className="mt-1 text-sm text-muted-foreground">
+ Keyword clusters aggregated across analyzed prompts.
+ </p>
+ </div>
+ </div>
+
+ <div className="grid gap-4 sm:grid-cols-3">
+ <Card>
+ <CardHeader className="pb-2">
+ <CardTitle className="text-sm font-medium">Topic Clusters</CardTitle>
+ </CardHeader>
+ <CardContent>
+ <div className="text-2xl font-semibold tabular-nums">
+ {totals.clusters.toLocaleString()}
+ </div>
+ <p className="text-xs text-muted-foreground">unique keywords</p>
+ </CardContent>
+ </Card>
+ <Card>
+ <CardHeader className="pb-2">
+ <CardTitle className="text-sm font-medium">Google Volume</CardTitle>
+ </CardHeader>
+ <CardContent>
+ <div className="text-2xl font-semibold tabular-nums">
+ {formatVolume(totals.googleVolume)}
+ </div>
+ <p className="text-xs text-muted-foreground">monthly searches</p>
+ </CardContent>
+ </Card>
+ <Card>
+ <CardHeader className="pb-2">
+ <CardTitle className="text-sm font-medium">Est. AI Volume</CardTitle>
+ </CardHeader>
+ <CardContent>
+ <div className="text-2xl font-semibold tabular-nums">
+ {formatVolume(totals.aiVolume)}
+ </div>
+ <p className="text-xs text-muted-foreground">monthly AI queries</p>
+ </CardContent>
+ </Card>
+ </div>
+
+ <Card>
+ <CardHeader className="pb-3">
+ <div className="flex flex-wrap items-center justify-between gap-3">
+ <div className="flex items-center gap-2">
+ <CardTitle className="text-sm font-medium">
+ All Similar Topics
+ </CardTitle>
+ <Badge variant="secondary">{clusters.length}</Badge>
+ </div>
+ <div className="relative w-full sm:w-60">
+ <Search className="pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" />
+ <Input
+ value={search}
+ onChange={(event) => setSearch(event.target.value)}
+ placeholder="Search topics..."
+ className="h-8 pl-8 text-xs"
+ />
+ </div>
+ </div>
+ </CardHeader>
+ <CardContent className="p-0">
+ <Table>
+ <TableHeader>
+ <TableRow>
+ <TableHead className="pl-6">Topic</TableHead>
+ <TableHead className="text-right">Google Vol.</TableHead>
+ <TableHead className="text-right">Est. AI Vol.</TableHead>
+ <TableHead className="text-center">Prompts</TableHead>
+ <TableHead>Top Prompt</TableHead>
+ </TableRow>
+ </TableHeader>
+ <TableBody>
+ {loading && (
+ <TableRow>
+ <TableCell colSpan={5} className="h-32 text-center text-sm text-muted-foreground">
+ Loading similar topics...
+ </TableCell>
+ </TableRow>
+ )}
+ {!loading &&
+ clusters.map((cluster) => {
+ const topPrompt = [...cluster.prompts].sort(
+ (a, b) => b.volume - a.volume,
+ )[0];
+
+ return (
+ <TableRow key={cluster.keyword.toLowerCase()}>
+ <TableCell className="pl-6">
+ <div className="flex items-center gap-2">
+ <Layers className="h-4 w-4 text-muted-foreground" />
+ <span className="font-medium">{cluster.keyword}</span>
+ </div>
+ </TableCell>
+ <TableCell className="text-right font-medium tabular-nums">
+ {formatVolume(cluster.volume)}
+ </TableCell>
+ <TableCell className="text-right tabular-nums">
+ {formatVolume(cluster.estimatedAiVolume)}
+ </TableCell>
+ <TableCell className="text-center">
+ <Badge variant="outline">
+ {cluster.occurrences}
+ </Badge>
+ </TableCell>
+ <TableCell className="max-w-[360px]">
+ {topPrompt ? (
+ <Link
+ href={`/dashboard/prompts/${topPrompt.id}`}
+ className="line-clamp-2 text-sm text-muted-foreground transition-colors hover:text-primary hover:underline"
+ >
+ {topPrompt.text}
+ </Link>
+ ) : (
+ <span className="text-sm text-muted-foreground">—</span>
+ )}
+ </TableCell>
+ </TableRow>
+ );
+ })}
+ {!loading && clusters.length === 0 && (
+ <TableRow>
+ <TableCell colSpan={5} className="h-32 text-center text-sm text-muted-foreground">
+ No similar topics found.
+ </TableCell>
+ </TableRow>
+ )}
+ </TableBody>
+ </Table>
+ </CardContent>
+ </Card>
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/reports/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/reports/page.tsx
new file mode 100644
index 000000000..024317c47
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/reports/page.tsx
@@ -0,0 +1,41 @@
+import { useTranslations } from "next-intl";
+import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
+import { Button } from "@/components/ui/button";
+import { FileDown, Plus } from "lucide-react";
+
+export default function ReportsPage() {
+ const t = useTranslations("reports");
+
+ return (
+ <div className="space-y-6">
+ <div className="flex items-center justify-between">
+ <div>
+ <h1 className="text-2xl font-bold tracking-tight">{t("title")}</h1>
+ <p className="text-muted-foreground">{t("description")}</p>
+ </div>
+ <div className="flex items-center gap-2">
+ <Button variant="outline" className="gap-2">
+ <FileDown className="h-4 w-4" />
+ {t("downloadPDF")}
+ </Button>
+ <Button className="gap-2">
+ <Plus className="h-4 w-4" />
+ {t("generateReport")}
+ </Button>
+ </div>
+ </div>
+
+ <Card>
+ <CardHeader>
+ <CardTitle className="text-base">Generated Reports</CardTitle>
+ </CardHeader>
+ <CardContent>
+ <p className="text-sm text-muted-foreground">
+ No reports generated yet. Run at least one prompt analysis to
+ generate your first report.
+ </p>
+ </CardContent>
+ </Card>
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/settings/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/settings/page.tsx
new file mode 100644
index 000000000..ed85782c2
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/settings/page.tsx
@@ -0,0 +1,183 @@
+"use client";
+
+import { useEffect, useState } from "react";
+import { useTranslations } from "next-intl";
+import { useRouter } from "@/i18n/navigation";
+import { useSearchParams } from "next/navigation";
+import { createClient } from "@/lib/supabase/client";
+import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
+import { Input } from "@/components/ui/input";
+import { Label } from "@/components/ui/label";
+import { Button } from "@/components/ui/button";
+import { Separator } from "@/components/ui/separator";
+import { ThemeSwitch } from "@/components/settings/theme-switch";
+import { FontSwitch } from "@/components/settings/font-switch";
+import { cn } from "@/lib/utils";
+import { usePlanContext } from "@/components/providers/plan-provider";
+import { BillingSection } from "@/components/settings/billing-section";
+import { TeamSection } from "@/components/settings/team-section";
+
+type Section = "account" | "theme" | "project" | "team" | "billing";
+
+export default function SettingsPage() {
+ const t = useTranslations("settings");
+ const tAuth = useTranslations("auth");
+ const router = useRouter();
+ const { isCloud } = usePlanContext();
+ const searchParams = useSearchParams();
+ const tabParam = searchParams.get("tab");
+ const [active, setActive] = useState<Section>(
+ tabParam === "billing" && isCloud ? "billing" : "account"
+ );
+ const [displayName, setDisplayName] = useState("");
+ const [email, setEmail] = useState("");
+
+ useEffect(() => {
+ const supabase = createClient();
+ supabase.auth.getUser().then(({ data: { user: u } }) => {
+ setDisplayName(u?.user_metadata?.full_name ?? "");
+ setEmail(u?.email ?? "");
+ });
+ }, []);
+
+ async function handleSignOut() {
+ const supabase = createClient();
+ await supabase.auth.signOut();
+ router.push("/sign-in");
+ router.refresh();
+ }
+
+ const navItems: { id: Section; label: string }[] = [
+ { id: "account", label: t("account") },
+ { id: "theme", label: t("theme") },
+ { id: "project", label: t("project") },
+ { id: "team", label: t("team") },
+ ...(isCloud ? [{ id: "billing" as Section, label: t("billing") }] : []),
+ ];
+
+ return (
+ <div className="space-y-6">
+ <div>
+ <h1 className="text-2xl font-bold tracking-tight">{t("title")}</h1>
+ <p className="text-muted-foreground">{t("description")}</p>
+ </div>
+
+ <Separator />
+
+ <div className="grid grid-cols-1 gap-6 lg:grid-cols-3">
+ {/* Sidebar nav */}
+ <nav className="space-y-1">
+ {navItems.map((item) => (
+ <button
+ key={item.id}
+ onClick={() => setActive(item.id)}
+ className={cn(
+ "w-full text-left rounded-md px-3 py-2 text-sm font-medium transition-colors",
+ active === item.id
+ ? "bg-accent text-accent-foreground"
+ : "text-muted-foreground hover:bg-accent hover:text-accent-foreground"
+ )}
+ >
+ {item.label}
+ </button>
+ ))}
+ </nav>
+
+ {/* Main content — only active section shown */}
+ <div className="lg:col-span-2">
+ {/* Account */}
+ {active === "account" && (
+ <Card>
+ <CardHeader>
+ <CardTitle>{t("account")}</CardTitle>
+ <CardDescription>{t("accountDescription")}</CardDescription>
+ </CardHeader>
+ <CardContent className="space-y-4">
+ <div className="space-y-2">
+ <Label htmlFor="name">{t("displayName")}</Label>
+ <Input
+ id="name"
+ placeholder="Your name"
+ value={displayName}
+ onChange={(e) => setDisplayName(e.target.value)}
+ />
+ </div>
+ <div className="space-y-2">
+ <Label htmlFor="email">{t("email")}</Label>
+ <Input
+ id="email"
+ type="email"
+ placeholder="[email protected]"
+ value={email}
+ onChange={() => {}}
+ disabled
+ />
+ </div>
+ <Button>{t("save")}</Button>
+ <Separator className="my-2" />
+ <Button
+ variant="outline"
+ onClick={handleSignOut}
+ className="text-destructive hover:text-destructive"
+ >
+ {tAuth("signOut")}
+ </Button>
+ </CardContent>
+ </Card>
+ )}
+
+ {/* Theme */}
+ {active === "theme" && (
+ <div className="space-y-6">
+ <Card>
+ <CardHeader>
+ <CardTitle>{t("theme")}</CardTitle>
+ <CardDescription>{t("themeDescription")}</CardDescription>
+ </CardHeader>
+ <CardContent>
+ <ThemeSwitch />
+ </CardContent>
+ </Card>
+ <Card>
+ <CardHeader>
+ <CardTitle>{t("font")}</CardTitle>
+ <CardDescription>{t("fontDescription")}</CardDescription>
+ </CardHeader>
+ <CardContent>
+ <FontSwitch />
+ </CardContent>
+ </Card>
+ </div>
+ )}
+
+ {/* Project */}
+ {active === "project" && (
+ <Card>
+ <CardHeader>
+ <CardTitle>{t("project")}</CardTitle>
+ <CardDescription>Configure your project settings.</CardDescription>
+ </CardHeader>
+ <CardContent className="space-y-4">
+ <div className="space-y-2">
+ <Label htmlFor="projectName">{t("projectName")}</Label>
+ <Input id="projectName" placeholder="My Brand" />
+ </div>
+ <div className="space-y-2">
+ <Label htmlFor="domain">{t("domain")}</Label>
+ <Input id="domain" placeholder="example.com" />
+ </div>
+ <Button>{t("save")}</Button>
+ </CardContent>
+ </Card>
+ )}
+
+ {/* Team */}
+ {active === "team" && <TeamSection />}
+
+ {/* Billing */}
+ {active === "billing" && isCloud && <BillingSection />}
+ </div>
+ </div>
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/topics/[id]/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/topics/[id]/page.tsx
new file mode 100644
index 000000000..00a380807
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/topics/[id]/page.tsx
@@ -0,0 +1,557 @@
+'use client';
+
+import { useCallback, useEffect, useRef, useState, use } from 'react';
+import { Link, useRouter } from '@/i18n/navigation';
+import { useBrandStore } from '@/stores/use-brand-store';
+import {
+ getInsightsSummary,
+ getVisibilityTrend,
+ getShareOfVoiceData,
+ getCompetitorComparison,
+ getPromptResults,
+ type InsightsSummary,
+ type VisibilityTrendPoint,
+ type ShareOfVoiceData,
+ type CompetitorComparisonData,
+ type PromptResultWithText,
+} from '@/lib/actions/tracking';
+import { getTopics } from '@/lib/actions/topic';
+import type { Topic } from '@/types';
+import {
+ Card,
+ CardContent,
+ CardHeader,
+ CardTitle,
+} from '@/components/ui/card';
+import { Badge } from '@/components/ui/badge';
+import { Button } from '@/components/ui/button';
+import { Skeleton } from '@/components/ui/skeleton';
+import {
+ ArrowLeft,
+ BarChart3,
+ Eye,
+ Quote,
+ TrendingDown,
+ TrendingUp,
+ Zap,
+ Users,
+} from 'lucide-react';
+import { ShareOfVoicePlatformChart } from '../../insights/_charts';
+import { cn } from '@/lib/utils';
+import {
+ AreaChart,
+ Area,
+ CartesianGrid,
+ Tooltip,
+ XAxis,
+ YAxis,
+} from 'recharts';
+
+function ChartContainer({
+ height,
+ children,
+}: {
+ height: number;
+ children: (width: number) => React.ReactNode;
+}) {
+ const ref = useRef<HTMLDivElement>(null);
+ const [width, setWidth] = useState(0);
+
+ useEffect(() => {
+ const el = ref.current;
+ if (!el) return;
+ const update = () => setWidth(el.clientWidth);
+ update();
+ const ro = new ResizeObserver(update);
+ ro.observe(el);
+ return () => ro.disconnect();
+ }, []);
+
+ return (
+ <div ref={ref} style={{ width: '100%', height }}>
+ {width > 0 && children(width)}
+ </div>
+ );
+}
+
+// ─── KPI Card ────────────────────────────────────────────────────────────
+
+function KpiCard({
+ icon: Icon,
+ label,
+ value,
+ change,
+ suffix,
+}: {
+ icon: React.ComponentType<{ className?: string }>;
+ label: string;
+ value: string | number;
+ change?: number | null;
+ suffix?: string;
+}) {
+ return (
+ <Card>
+ <CardContent className="pt-6 pb-5">
+ <div className="flex items-center gap-2 text-xs text-muted-foreground mb-2">
+ <Icon className="h-3.5 w-3.5" />
+ {label}
+ </div>
+ <div className="flex items-baseline justify-between gap-2">
+ <div className="text-2xl font-semibold tabular-nums">
+ {value}
+ {suffix && (
+ <span className="text-sm font-normal text-muted-foreground ml-0.5">
+ {suffix}
+ </span>
+ )}
+ </div>
+ {change !== null && change !== undefined && (
+ <span
+ className={cn(
+ 'flex items-center text-xs font-medium',
+ change > 0
+ ? 'text-emerald-600 dark:text-emerald-400'
+ : change < 0
+ ? 'text-rose-600 dark:text-rose-400'
+ : 'text-muted-foreground',
+ )}
+ >
+ {change > 0 ? (
+ <TrendingUp className="h-3 w-3 mr-0.5" />
+ ) : change < 0 ? (
+ <TrendingDown className="h-3 w-3 mr-0.5" />
+ ) : null}
+ {change > 0 ? '+' : ''}
+ {change}
+ {suffix === '%' ? 'pts' : ''}
+ </span>
+ )}
+ </div>
+ </CardContent>
+ </Card>
+ );
+}
+
+// ─── Visibility trend chart ───────────────────────────────────────────────
+
+function VisibilityTrendChart({ data }: { data: VisibilityTrendPoint[] }) {
+ if (data.length === 0) {
+ return (
+ <div className="flex h-[260px] items-center justify-center text-sm text-muted-foreground">
+ No data yet for this topic.
+ </div>
+ );
+ }
+ return (
+ <ChartContainer height={260}>
+ {(width) => (
+ <AreaChart
+ width={width}
+ height={260}
+ data={data}
+ margin={{ top: 8, right: 12, left: -12, bottom: 0 }}
+ >
+ <defs>
+ <linearGradient id="brandTopic" x1="0" y1="0" x2="0" y2="1">
+ <stop offset="5%" stopColor="#6366f1" stopOpacity={0.25} />
+ <stop offset="95%" stopColor="#6366f1" stopOpacity={0} />
+ </linearGradient>
+ <linearGradient id="compTopic" x1="0" y1="0" x2="0" y2="1">
+ <stop offset="5%" stopColor="#94a3b8" stopOpacity={0.15} />
+ <stop offset="95%" stopColor="#94a3b8" stopOpacity={0} />
+ </linearGradient>
+ </defs>
+ <CartesianGrid strokeDasharray="3 3" className="stroke-border" vertical={false} />
+ <XAxis
+ dataKey="date"
+ tick={{ fontSize: 11 }}
+ tickLine={false}
+ axisLine={false}
+ className="fill-muted-foreground"
+ />
+ <YAxis
+ tick={{ fontSize: 11 }}
+ tickLine={false}
+ axisLine={false}
+ className="fill-muted-foreground"
+ domain={[0, 100]}
+ tickFormatter={(v: number) => `${v}%`}
+ />
+ <Tooltip
+ contentStyle={{
+ fontSize: 11,
+ borderRadius: 6,
+ border: '1px solid hsl(var(--border))',
+ background: 'hsl(var(--popover))',
+ }}
+ />
+ <Area
+ type="monotone"
+ dataKey="competitors"
+ stroke="#94a3b8"
+ strokeOpacity={0.8}
+ strokeWidth={1.5}
+ fill="url(#compTopic)"
+ name="Competitors avg"
+ strokeDasharray="4 4"
+ dot={false}
+ />
+ <Area
+ type="monotone"
+ dataKey="score"
+ stroke="#6366f1"
+ strokeWidth={2}
+ fill="url(#brandTopic)"
+ name="Brand"
+ dot={false}
+ activeDot={{ r: 4 }}
+ />
+ </AreaChart>
+ )}
+ </ChartContainer>
+ );
+}
+
+// ─── Page ────────────────────────────────────────────────────────────────
+
+export default function TopicDetailPage({
+ params,
+}: {
+ params: Promise<{ id: string }>;
+}) {
+ const { id: topicId } = use(params);
+ const router = useRouter();
+ const activeBrandId = useBrandStore((s) => s.activeBrandId);
+
+ const [topic, setTopic] = useState<Topic | null>(null);
+ const [summary, setSummary] = useState<InsightsSummary | null>(null);
+ const [trend, setTrend] = useState<VisibilityTrendPoint[]>([]);
+ const [sov, setSov] = useState<ShareOfVoiceData | null>(null);
+ const [competitors, setCompetitors] = useState<CompetitorComparisonData | null>(null);
+ const [results, setResults] = useState<PromptResultWithText[]>([]);
+ const [loading, setLoading] = useState(true);
+
+ const loadData = useCallback(async () => {
+ if (!activeBrandId || !topicId) return;
+ setLoading(true);
+ try {
+ const [topics, summ, tr, sv, cmp, res] = await Promise.all([
+ getTopics(activeBrandId),
+ getInsightsSummary(activeBrandId, { topicId }),
+ getVisibilityTrend(activeBrandId, { topicId }),
+ getShareOfVoiceData(activeBrandId, { topicId }),
+ getCompetitorComparison(activeBrandId, { topicId }),
+ getPromptResults(activeBrandId, { topicId, limit: 50 }),
+ ]);
+ setTopic(topics.find((t) => t.id === topicId) ?? null);
+ setSummary(summ);
+ setTrend(tr);
+ setSov(sv);
+ setCompetitors(cmp);
+ setResults(res.results);
+ } catch (err) {
+ console.error('Failed to load topic detail', err);
+ } finally {
+ setLoading(false);
+ }
+ }, [activeBrandId, topicId]);
+
+ useEffect(() => {
+ loadData();
+ }, [loadData]);
+
+ if (!activeBrandId) {
+ return (
+ <div className="flex h-[60vh] items-center justify-center">
+ <Card className="max-w-md">
+ <CardContent className="pt-6 text-center">
+ <h2 className="text-base font-semibold">No brand selected</h2>
+ <p className="mt-1 text-sm text-muted-foreground">
+ Select a brand from the top switcher first.
+ </p>
+ </CardContent>
+ </Card>
+ </div>
+ );
+ }
+
+ // Top/weak prompts — aggregate by prompt_id
+ const promptRollup = new Map<
+ string,
+ { promptText: string; totalScore: number; count: number }
+ >();
+ for (const r of results) {
+ const ex =
+ promptRollup.get(r.promptId) ?? {
+ promptText: r.promptText,
+ totalScore: 0,
+ count: 0,
+ };
+ ex.totalScore += r.visibilityScore;
+ ex.count += 1;
+ promptRollup.set(r.promptId, ex);
+ }
+ const promptList = [...promptRollup.entries()].map(([id, v]) => ({
+ id,
+ text: v.promptText,
+ avg: Math.round(v.totalScore / v.count),
+ runs: v.count,
+ }));
+ const topPrompts = [...promptList].sort((a, b) => b.avg - a.avg).slice(0, 5);
+ const weakPrompts = [...promptList].sort((a, b) => a.avg - b.avg).slice(0, 5);
+
+ return (
+ <div className="space-y-6">
+ {/* Header */}
+ <div>
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => router.push('/dashboard/topics')}
+ className="mb-2 -ml-2 text-muted-foreground"
+ >
+ <ArrowLeft className="h-4 w-4 mr-1" />
+ Topics
+ </Button>
+ {loading && !topic ? (
+ <Skeleton className="h-8 w-64" />
+ ) : topic ? (
+ <div>
+ <h1 className="text-2xl font-bold tracking-tight">{topic.name}</h1>
+ </div>
+ ) : (
+ <h1 className="text-2xl font-bold">Topic not found</h1>
+ )}
+ </div>
+
+ {/* KPI strip */}
+ {loading ? (
+ <div className="grid gap-3 sm:grid-cols-2 lg:grid-cols-4">
+ {Array.from({ length: 4 }).map((_, i) => (
+ <Skeleton key={i} className="h-[104px]" />
+ ))}
+ </div>
+ ) : summary ? (
+ <div className="grid gap-3 sm:grid-cols-2 lg:grid-cols-4">
+ <KpiCard
+ icon={Eye}
+ label="Avg visibility"
+ value={summary.avgVisibilityScore}
+ change={summary.visibilityChange}
+ suffix="%"
+ />
+ <KpiCard
+ icon={Zap}
+ label="Brand mentions"
+ value={summary.totalMentions.toLocaleString()}
+ change={summary.mentionsChange}
+ />
+ <KpiCard
+ icon={Quote}
+ label="Citations"
+ value={summary.totalCitations.toLocaleString()}
+ change={summary.citationsChange}
+ />
+ <KpiCard
+ icon={BarChart3}
+ label="Positive sentiment"
+ value={summary.positiveSentimentPct}
+ change={summary.sentimentChange}
+ suffix="%"
+ />
+ </div>
+ ) : null}
+
+ {/* Trend + SoV platform */}
+ <div className="grid gap-4 lg:grid-cols-3">
+ <Card className="lg:col-span-2">
+ <CardHeader className="pb-2">
+ <CardTitle className="text-sm font-medium">
+ Visibility trend
+ </CardTitle>
+ <p className="text-xs text-muted-foreground">
+ Daily average visibility for this topic vs. competitor average
+ </p>
+ </CardHeader>
+ <CardContent>
+ {loading ? (
+ <Skeleton className="h-[260px]" />
+ ) : (
+ <VisibilityTrendChart data={trend} />
+ )}
+ </CardContent>
+ </Card>
+ <Card>
+ <CardHeader className="pb-2">
+ <CardTitle className="text-sm font-medium">
+ Share of voice by platform
+ </CardTitle>
+ <p className="text-xs text-muted-foreground">
+ Brand vs. competitors on answer engines
+ </p>
+ </CardHeader>
+ <CardContent>
+ {loading ? (
+ <Skeleton className="h-[260px]" />
+ ) : sov && sov.byPlatform.length > 0 ? (
+ <ShareOfVoicePlatformChart
+ data={sov.byPlatform}
+ overallSov={sov.overallSov}
+ />
+ ) : (
+ <div className="flex h-[260px] items-center justify-center text-sm text-muted-foreground">
+ No platform data yet.
+ </div>
+ )}
+ </CardContent>
+ </Card>
+ </div>
+
+ {/* Competitor table + prompts */}
+ <div className="grid gap-4 lg:grid-cols-2">
+ {/* Competitors */}
+ <Card>
+ <CardHeader className="pb-2">
+ <CardTitle className="text-sm font-medium flex items-center gap-2">
+ <Users className="h-4 w-4" />
+ Competitor comparison
+ </CardTitle>
+ <p className="text-xs text-muted-foreground">
+ Your brand vs. direct competitors on this topic
+ </p>
+ </CardHeader>
+ <CardContent>
+ {loading ? (
+ <Skeleton className="h-[200px]" />
+ ) : competitors && competitors.brands.length > 0 ? (
+ <ul className="divide-y">
+ {competitors.brands.slice(0, 6).map((c, i) => (
+ <li
+ key={c.name}
+ className={cn(
+ 'flex items-center gap-3 py-2',
+ c.isOwnBrand && 'bg-primary/5 -mx-3 px-3 rounded',
+ )}
+ >
+ <span className="w-5 text-xs text-muted-foreground tabular-nums text-right">
+ {i + 1}
+ </span>
+ <span className="flex-1 text-sm font-medium truncate">
+ {c.name}
+ {c.isOwnBrand && (
+ <span className="ml-1.5 text-[10px] font-medium text-primary">
+ YOU
+ </span>
+ )}
+ </span>
+ <span className="text-sm tabular-nums w-10 text-right">
+ {c.avgVisibilityScore}%
+ </span>
+ {c.change !== null && (
+ <span
+ className={cn(
+ 'text-xs tabular-nums w-12 text-right',
+ c.change > 0
+ ? 'text-emerald-600 dark:text-emerald-400'
+ : c.change < 0
+ ? 'text-rose-600 dark:text-rose-400'
+ : 'text-muted-foreground',
+ )}
+ >
+ {c.change > 0 ? '+' : ''}
+ {c.change}
+ </span>
+ )}
+ </li>
+ ))}
+ </ul>
+ ) : (
+ <p className="text-sm text-muted-foreground py-10 text-center">
+ No competitor mentions yet.
+ </p>
+ )}
+ </CardContent>
+ </Card>
+
+ {/* Top / Weak prompts */}
+ <Card>
+ <CardHeader className="pb-2">
+ <CardTitle className="text-sm font-medium">
+ Prompt performance
+ </CardTitle>
+ <p className="text-xs text-muted-foreground">
+ Best & worst performing prompts in this topic (last 50 runs)
+ </p>
+ </CardHeader>
+ <CardContent className="space-y-4">
+ {loading ? (
+ <>
+ <Skeleton className="h-24" />
+ <Skeleton className="h-24" />
+ </>
+ ) : promptList.length === 0 ? (
+ <p className="text-sm text-muted-foreground py-6 text-center">
+ No prompt results yet.
+ </p>
+ ) : (
+ <>
+ <div>
+ <div className="flex items-center gap-2 text-xs font-medium text-emerald-600 dark:text-emerald-400 mb-2">
+ <TrendingUp className="h-3 w-3" />
+ Top performers
+ </div>
+ <ul className="space-y-1.5">
+ {topPrompts.map((p) => (
+ <li
+ key={p.id}
+ className="flex items-center gap-2 text-sm"
+ >
+ <Badge variant="outline" className="text-[10px] shrink-0">
+ {p.avg}%
+ </Badge>
+ <span className="flex-1 truncate">{p.text}</span>
+ <span className="text-xs text-muted-foreground">
+ {p.runs} runs
+ </span>
+ </li>
+ ))}
+ </ul>
+ </div>
+ <div>
+ <div className="flex items-center gap-2 text-xs font-medium text-rose-600 dark:text-rose-400 mb-2">
+ <TrendingDown className="h-3 w-3" />
+ Needs improvement
+ </div>
+ <ul className="space-y-1.5">
+ {weakPrompts.map((p) => (
+ <li
+ key={p.id}
+ className="flex items-center gap-2 text-sm"
+ >
+ <Badge variant="outline" className="text-[10px] shrink-0">
+ {p.avg}%
+ </Badge>
+ <span className="flex-1 truncate">{p.text}</span>
+ <span className="text-xs text-muted-foreground">
+ {p.runs} runs
+ </span>
+ </li>
+ ))}
+ </ul>
+ </div>
+ <div className="pt-2 border-t">
+ <Link
+ href={`/dashboard/insights?topic=${topicId}`}
+ className="text-xs text-primary hover:underline"
+ >
+ View all prompt results for this topic →
+ </Link>
+ </div>
+ </>
+ )}
+ </CardContent>
+ </Card>
+ </div>
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/topics/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/topics/page.tsx
new file mode 100644
index 000000000..73737f464
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/topics/page.tsx
@@ -0,0 +1,453 @@
+'use client';
+
+import { useCallback, useEffect, useMemo, useState } from 'react';
+import { Link } from '@/i18n/navigation';
+import { useBrandStore } from '@/stores/use-brand-store';
+import {
+ getTopicsOverview,
+ type TopicOverviewRow,
+} from '@/lib/actions/topic';
+import {
+ Card,
+ CardContent,
+ CardHeader,
+ CardTitle,
+} from '@/components/ui/card';
+import {
+ Table,
+ TableBody,
+ TableCell,
+ TableHead,
+ TableHeader,
+ TableRow,
+} from '@/components/ui/table';
+import { Skeleton } from '@/components/ui/skeleton';
+import { Badge } from '@/components/ui/badge';
+import { buttonVariants } from '@/components/ui/button';
+import {
+ ArrowRight,
+ Flame,
+ Layers,
+ Minus,
+ Settings2,
+ Tag,
+ TrendingDown,
+ TrendingUp,
+ Trophy,
+} from 'lucide-react';
+import { cn } from '@/lib/utils';
+
+// ─── Helpers ─────────────────────────────────────────────────────────────
+
+function formatRelative(iso: string | null): string {
+ if (!iso) return '—';
+ const diff = Date.now() - new Date(iso).getTime();
+ const m = Math.floor(diff / 60000);
+ if (m < 1) return 'just now';
+ if (m < 60) return `${m}m ago`;
+ const h = Math.floor(m / 60);
+ if (h < 24) return `${h}h ago`;
+ const d = Math.floor(h / 24);
+ if (d < 30) return `${d}d ago`;
+ return new Date(iso).toLocaleDateString();
+}
+
+function visibilityBarColor(score: number) {
+ if (score >= 75) return 'bg-emerald-500';
+ if (score >= 50) return 'bg-amber-500';
+ if (score >= 25) return 'bg-orange-500';
+ return 'bg-rose-500';
+}
+
+function visibilityTextColor(score: number) {
+ if (score >= 75) return 'text-emerald-600 dark:text-emerald-400';
+ if (score >= 50) return 'text-amber-600 dark:text-amber-400';
+ if (score >= 25) return 'text-orange-600 dark:text-orange-400';
+ return 'text-rose-600 dark:text-rose-400';
+}
+
+// ─── Sparkline ───────────────────────────────────────────────────────────
+
+function Sparkline({ points }: { points: number[] }) {
+ if (!points.length) return null;
+ const width = 80;
+ const height = 24;
+ const max = Math.max(...points, 1);
+ const min = Math.min(...points);
+ const range = max - min || 1;
+ const step = width / Math.max(points.length - 1, 1);
+
+ const path = points
+ .map((p, i) => {
+ const x = i * step;
+ const y = height - ((p - min) / range) * height;
+ return `${i === 0 ? 'M' : 'L'}${x.toFixed(2)},${y.toFixed(2)}`;
+ })
+ .join(' ');
+
+ const last = points[points.length - 1];
+ const first = points[0];
+ const trendUp = last >= first;
+
+ return (
+ <svg width={width} height={height} className="inline-block">
+ <path
+ d={path}
+ fill="none"
+ strokeWidth={1.5}
+ className={
+ trendUp
+ ? 'stroke-emerald-500'
+ : 'stroke-rose-500'
+ }
+ />
+ </svg>
+ );
+}
+
+// ─── KPI Card ────────────────────────────────────────────────────────────
+
+function KpiCard({
+ icon: Icon,
+ label,
+ value,
+ sub,
+ tone = 'neutral',
+}: {
+ icon: React.ComponentType<{ className?: string }>;
+ label: string;
+ value: string | number;
+ sub?: string;
+ tone?: 'neutral' | 'positive' | 'negative' | 'warning';
+}) {
+ const toneClasses: Record<string, string> = {
+ neutral: 'text-foreground',
+ positive: 'text-emerald-600 dark:text-emerald-400',
+ negative: 'text-rose-600 dark:text-rose-400',
+ warning: 'text-amber-600 dark:text-amber-400',
+ };
+ return (
+ <Card>
+ <CardContent className="pt-6 pb-5">
+ <div className="flex items-center gap-2 text-xs text-muted-foreground mb-2">
+ <Icon className="h-3.5 w-3.5" />
+ {label}
+ </div>
+ <div className={cn('text-2xl font-semibold tabular-nums', toneClasses[tone])}>
+ {value}
+ </div>
+ {sub && (
+ <p className="text-xs text-muted-foreground mt-1 truncate">{sub}</p>
+ )}
+ </CardContent>
+ </Card>
+ );
+}
+
+// ─── Page ────────────────────────────────────────────────────────────────
+
+export default function TopicsPage() {
+ const activeBrandId = useBrandStore((s) => s.activeBrandId);
+ const [topics, setTopics] = useState<TopicOverviewRow[]>([]);
+ const [unassignedPromptCount, setUnassignedPromptCount] = useState(0);
+ const [loading, setLoading] = useState(true);
+
+ const loadData = useCallback(async () => {
+ if (!activeBrandId) {
+ setTopics([]);
+ setLoading(false);
+ return;
+ }
+ setLoading(true);
+ try {
+ const data = await getTopicsOverview(activeBrandId);
+ setTopics(data.topics);
+ setUnassignedPromptCount(data.unassignedPromptCount);
+ } catch (err) {
+ console.error('Failed to load topics overview', err);
+ } finally {
+ setLoading(false);
+ }
+ }, [activeBrandId]);
+
+ useEffect(() => {
+ loadData();
+ }, [loadData]);
+
+ const sortedByVisibility = useMemo(
+ () =>
+ [...topics].sort((a, b) => b.avgVisibilityScore - a.avgVisibilityScore),
+ [topics],
+ );
+
+ const kpis = useMemo(() => {
+ if (topics.length === 0) return null;
+ const withData = topics.filter((t) => t.avgVisibilityScore > 0);
+ if (withData.length === 0) {
+ return {
+ total: topics.length,
+ best: null as TopicOverviewRow | null,
+ weakest: null as TopicOverviewRow | null,
+ gainer: null as TopicOverviewRow | null,
+ };
+ }
+ const best = [...withData].sort(
+ (a, b) => b.avgVisibilityScore - a.avgVisibilityScore,
+ )[0];
+ const weakest = [...withData].sort(
+ (a, b) => a.avgVisibilityScore - b.avgVisibilityScore,
+ )[0];
+ const withChange = topics.filter((t) => t.visibilityChange !== null);
+ const gainer = withChange.length
+ ? [...withChange].sort(
+ (a, b) => (b.visibilityChange ?? 0) - (a.visibilityChange ?? 0),
+ )[0]
+ : null;
+
+ return {
+ total: topics.length,
+ best,
+ weakest,
+ gainer,
+ };
+ }, [topics]);
+
+ if (!activeBrandId) {
+ return (
+ <div className="flex h-[60vh] items-center justify-center">
+ <Card className="max-w-md">
+ <CardContent className="pt-6 text-center">
+ <Tag className="mx-auto h-10 w-10 text-muted-foreground/50" />
+ <h2 className="mt-3 text-base font-semibold">No brand selected</h2>
+ <p className="mt-1 text-sm text-muted-foreground">
+ Select a brand from the top switcher to view topic analytics.
+ </p>
+ </CardContent>
+ </Card>
+ </div>
+ );
+ }
+
+ return (
+ <div className="space-y-6">
+ {/* Header */}
+ <div className="flex items-center justify-between gap-4 flex-wrap">
+ <div>
+ <h1 className="text-2xl font-bold tracking-tight">Topics</h1>
+ <p className="text-muted-foreground text-sm">
+ Topic-level analytics across all tracked prompts (last 30 days)
+ </p>
+ </div>
+ <Link
+ href={`/dashboard/brands/${activeBrandId}/topics`}
+ className={buttonVariants({ variant: 'outline', size: 'sm' })}
+ >
+ <Settings2 className="h-4 w-4" />
+ Manage topics
+ </Link>
+ </div>
+
+ {/* KPIs */}
+ {loading ? (
+ <div className="grid gap-3 sm:grid-cols-2 lg:grid-cols-4">
+ {Array.from({ length: 4 }).map((_, i) => (
+ <Skeleton key={i} className="h-[104px]" />
+ ))}
+ </div>
+ ) : kpis ? (
+ <div className="grid gap-3 sm:grid-cols-2 lg:grid-cols-4">
+ <KpiCard
+ icon={Layers}
+ label="Tracked topics"
+ value={kpis.total}
+ sub={
+ unassignedPromptCount > 0
+ ? `${unassignedPromptCount} prompts without a topic`
+ : 'All prompts categorised'
+ }
+ />
+ <KpiCard
+ icon={Trophy}
+ label="Best performer"
+ value={kpis.best ? `${kpis.best.avgVisibilityScore}%` : '—'}
+ sub={kpis.best?.name ?? 'No data yet'}
+ tone="positive"
+ />
+ <KpiCard
+ icon={TrendingDown}
+ label="Biggest gap"
+ value={kpis.weakest ? `${kpis.weakest.avgVisibilityScore}%` : '—'}
+ sub={kpis.weakest?.name ?? 'No data yet'}
+ tone="warning"
+ />
+ <KpiCard
+ icon={Flame}
+ label="Top mover (7d)"
+ value={
+ kpis.gainer && kpis.gainer.visibilityChange !== null
+ ? `${kpis.gainer.visibilityChange > 0 ? '+' : ''}${kpis.gainer.visibilityChange}%`
+ : '—'
+ }
+ sub={kpis.gainer?.name ?? 'Not enough data'}
+ tone={
+ kpis.gainer?.visibilityChange && kpis.gainer.visibilityChange >= 0
+ ? 'positive'
+ : 'negative'
+ }
+ />
+ </div>
+ ) : null}
+
+ {/* Leaderboard */}
+ <Card>
+ <CardHeader className="pb-3">
+ <CardTitle className="text-sm font-medium">
+ Topic leaderboard
+ </CardTitle>
+ <p className="text-xs text-muted-foreground">
+ Click a topic to drill into detailed analytics
+ </p>
+ </CardHeader>
+ <CardContent className="p-0">
+ {loading ? (
+ <div className="p-6 space-y-2">
+ {Array.from({ length: 5 }).map((_, i) => (
+ <Skeleton key={i} className="h-12" />
+ ))}
+ </div>
+ ) : topics.length === 0 ? (
+ <div className="py-14 text-center text-sm text-muted-foreground">
+ <Tag className="mx-auto h-9 w-9 text-muted-foreground/40" />
+ <p className="mt-2">No topics defined yet.</p>
+ <p className="text-xs">
+ Add topics from brand settings to enable topic-based analytics.
+ </p>
+ </div>
+ ) : (
+ <Table>
+ <TableHeader>
+ <TableRow>
+ <TableHead className="pl-6">Topic</TableHead>
+ <TableHead className="text-right">Prompts</TableHead>
+ <TableHead>Visibility (30d)</TableHead>
+ <TableHead className="text-right">SoV</TableHead>
+ <TableHead className="text-right">Mentions</TableHead>
+ <TableHead className="text-right">Citations</TableHead>
+ <TableHead>Trend</TableHead>
+ <TableHead>Top competitor</TableHead>
+ <TableHead className="text-right">Last run</TableHead>
+ <TableHead className="pr-6 text-right w-[40px]" />
+ </TableRow>
+ </TableHeader>
+ <TableBody>
+ {sortedByVisibility.map((t) => (
+ <TableRow key={t.id} className="group hover:bg-muted/50">
+ <TableCell className="pl-6 font-medium text-sm">
+ <Link
+ href={`/dashboard/topics/${t.id}`}
+ className="hover:underline"
+ >
+ {t.name}
+ </Link>
+ </TableCell>
+ <TableCell className="text-right tabular-nums text-sm">
+ {t.promptCount}
+ </TableCell>
+ <TableCell className="min-w-[160px]">
+ {t.avgVisibilityScore > 0 ? (
+ <div className="flex items-center gap-2">
+ <span
+ className={cn(
+ 'text-sm font-semibold tabular-nums w-8',
+ visibilityTextColor(t.avgVisibilityScore),
+ )}
+ >
+ {t.avgVisibilityScore}
+ </span>
+ <div className="h-1.5 flex-1 max-w-[90px] rounded-full bg-muted overflow-hidden">
+ <div
+ className={cn(
+ 'h-full rounded-full',
+ visibilityBarColor(t.avgVisibilityScore),
+ )}
+ style={{
+ width: `${Math.min(100, t.avgVisibilityScore)}%`,
+ }}
+ />
+ </div>
+ </div>
+ ) : (
+ <span className="text-xs text-muted-foreground">—</span>
+ )}
+ </TableCell>
+ <TableCell className="text-right tabular-nums text-sm">
+ {t.shareOfVoice > 0 ? `${t.shareOfVoice}%` : '—'}
+ </TableCell>
+ <TableCell className="text-right tabular-nums text-sm">
+ {t.totalMentions.toLocaleString()}
+ </TableCell>
+ <TableCell className="text-right tabular-nums text-sm">
+ {t.totalCitations.toLocaleString()}
+ </TableCell>
+ <TableCell>
+ {t.trendSparkline.length > 0 &&
+ t.trendSparkline.some((v) => v > 0) ? (
+ <div className="flex items-center gap-2">
+ <Sparkline points={t.trendSparkline} />
+ {t.visibilityChange !== null &&
+ t.visibilityChange !== 0 && (
+ <span
+ className={cn(
+ 'text-xs font-medium tabular-nums',
+ t.visibilityChange > 0
+ ? 'text-emerald-600 dark:text-emerald-400'
+ : 'text-rose-600 dark:text-rose-400',
+ )}
+ >
+ {t.visibilityChange > 0 ? (
+ <TrendingUp className="h-3 w-3 inline mr-0.5" />
+ ) : (
+ <TrendingDown className="h-3 w-3 inline mr-0.5" />
+ )}
+ {Math.abs(t.visibilityChange).toFixed(1)}%
+ </span>
+ )}
+ {t.visibilityChange === 0 && (
+ <Minus className="h-3 w-3 text-muted-foreground" />
+ )}
+ </div>
+ ) : (
+ <span className="text-xs text-muted-foreground">—</span>
+ )}
+ </TableCell>
+ <TableCell>
+ {t.topCompetitor ? (
+ <Badge variant="outline" className="text-[10px]">
+ {t.topCompetitor.name} · {t.topCompetitor.sov}%
+ </Badge>
+ ) : (
+ <span className="text-xs text-muted-foreground">—</span>
+ )}
+ </TableCell>
+ <TableCell className="text-right text-xs text-muted-foreground">
+ {formatRelative(t.lastRunAt)}
+ </TableCell>
+ <TableCell className="pr-6 text-right">
+ <Link
+ href={`/dashboard/topics/${t.id}`}
+ className="inline-flex opacity-0 group-hover:opacity-100 transition-opacity"
+ aria-label="Open topic details"
+ >
+ <ArrowRight className="h-4 w-4 text-muted-foreground" />
+ </Link>
+ </TableCell>
+ </TableRow>
+ ))}
+ </TableBody>
+ </Table>
+ )}
+ </CardContent>
+ </Card>
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/traffic/_charts.tsx b/web/src/app/[locale]/(dashboard)/dashboard/traffic/_charts.tsx
new file mode 100644
index 000000000..d236e0c3f
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/traffic/_charts.tsx
@@ -0,0 +1,290 @@
+"use client";
+
+import { useRef, useState, useEffect } from "react";
+import {
+ AreaChart,
+ Area,
+ XAxis,
+ YAxis,
+ CartesianGrid,
+ Tooltip,
+ Legend,
+ PieChart,
+ Pie,
+ Cell,
+} from "recharts";
+import type { TrafficTrendPoint } from "@/lib/actions/traffic";
+
+// ─── Auto-sizing wrapper ─────────────────────────────────────────────────────
+
+function ChartContainer({
+ height,
+ children,
+}: {
+ height: number;
+ children: (width: number) => React.ReactNode;
+}) {
+ const ref = useRef<HTMLDivElement>(null);
+ const [width, setWidth] = useState(0);
+
+ useEffect(() => {
+ const el = ref.current;
+ if (!el) return;
+
+ const update = () => setWidth(el.clientWidth);
+ update();
+
+ const ro = new ResizeObserver(update);
+ ro.observe(el);
+ return () => ro.disconnect();
+ }, []);
+
+ return (
+ <div ref={ref} style={{ width: "100%", height }}>
+ {width > 0 && children(width)}
+ </div>
+ );
+}
+
+// ─── Platform colors ─────────────────────────────────────────────────────────
+
+const PLATFORM_COLORS: Record<string, string> = {
+ "chatgpt.com": "#6366f1",
+ "chat.openai.com": "#6366f1",
+ "search.chatgpt.com": "#6366f1",
+ "perplexity.ai": "#8b5cf6",
+ "claude.ai": "#c4b5fd",
+ "gemini.google.com": "#a78bfa",
+ "copilot.microsoft.com": "#ddd6fe",
+ "you.com": "#818cf8",
+ "phind.com": "#a5b4fc",
+ "meta.ai": "#7c3aed",
+ "poe.com": "#e9d5ff",
+ unknown: "#94a3b8",
+};
+
+const PLATFORM_NAMES: Record<string, string> = {
+ "chatgpt.com": "ChatGPT",
+ "chat.openai.com": "ChatGPT",
+ "search.chatgpt.com": "ChatGPT",
+ "perplexity.ai": "Perplexity",
+ "claude.ai": "Claude",
+ "gemini.google.com": "Gemini",
+ "copilot.microsoft.com": "Copilot",
+ "you.com": "You.com",
+ "phind.com": "Phind",
+ "meta.ai": "Meta AI",
+ "poe.com": "Poe",
+ unknown: "Unknown",
+};
+
+function getColor(platform: string): string {
+ return PLATFORM_COLORS[platform] ?? "#94a3b8";
+}
+
+export function getPlatformName(platform: string): string {
+ return PLATFORM_NAMES[platform] ?? platform;
+}
+
+// ─── Custom Tooltips ──────────────────────────────────────────────────────────
+
+function AreaTooltip({
+ active,
+ payload,
+ label,
+}: {
+ active?: boolean;
+ payload?: { name: string; value: number; color: string }[];
+ label?: string;
+}) {
+ if (!active || !payload?.length) return null;
+ return (
+ <div className="rounded-lg border bg-background px-3 py-2 shadow-md text-xs">
+ <p className="font-medium text-foreground mb-1">{label}</p>
+ {payload.map((entry) => (
+ <div key={entry.name} className="flex items-center gap-2">
+ <span
+ className="inline-block h-2 w-2 rounded-full shrink-0"
+ style={{ backgroundColor: entry.color }}
+ />
+ <span className="text-muted-foreground">{getPlatformName(entry.name)}:</span>
+ <span className="font-medium text-foreground">{entry.value.toLocaleString()}</span>
+ </div>
+ ))}
+ </div>
+ );
+}
+
+function PieTooltip({
+ active,
+ payload,
+}: {
+ active?: boolean;
+ payload?: { name: string; value: number; payload: { color: string } }[];
+}) {
+ if (!active || !payload?.length) return null;
+ const entry = payload[0];
+ return (
+ <div className="rounded-lg border bg-background px-3 py-2 shadow-md text-xs">
+ <div className="flex items-center gap-2">
+ <span
+ className="inline-block h-2 w-2 rounded-full shrink-0"
+ style={{ backgroundColor: entry.payload.color }}
+ />
+ <span className="text-muted-foreground">{entry.name}:</span>
+ <span className="font-medium text-foreground">{entry.value}%</span>
+ </div>
+ </div>
+ );
+}
+
+// ─── Bar List ─────────────────────────────────────────────────────────────────
+
+function BarList({ data }: { data: { name: string; value: number; color: string }[] }) {
+ const max = Math.max(...data.map((d) => d.value), 1);
+ return (
+ <div className="w-full space-y-2">
+ {data.map((item) => (
+ <div key={item.name} className="flex items-center gap-2 text-xs">
+ <span className="w-20 shrink-0 text-muted-foreground truncate">{item.name}</span>
+ <div className="flex-1 h-1.5 rounded-full bg-muted overflow-hidden">
+ <div
+ className="h-full rounded-full transition-all"
+ style={{
+ width: `${Math.round((item.value / max) * 100)}%`,
+ backgroundColor: item.color,
+ }}
+ />
+ </div>
+ <span className="w-8 text-right font-medium tabular-nums text-foreground">
+ {item.value}%
+ </span>
+ </div>
+ ))}
+ </div>
+ );
+}
+
+// ─── Exported Charts ──────────────────────────────────────────────────────────
+
+export function ReferralTrendChart({ data }: { data: TrafficTrendPoint[] }) {
+ if (!data.length) return null;
+
+ // Extract platform keys (everything except 'date')
+ const platformKeys = Object.keys(data[0]).filter((k) => k !== "date");
+
+ return (
+ <ChartContainer height={220}>
+ {(width) => (
+ <AreaChart
+ width={width}
+ height={220}
+ data={data}
+ margin={{ top: 4, right: 4, left: -24, bottom: 0 }}
+ >
+ <defs>
+ {platformKeys.map((key) => (
+ <linearGradient key={key} id={`grad-${key}`} x1="0" y1="0" x2="0" y2="1">
+ <stop offset="5%" stopColor={getColor(key)} stopOpacity={0.15} />
+ <stop offset="95%" stopColor={getColor(key)} stopOpacity={0} />
+ </linearGradient>
+ ))}
+ </defs>
+ <CartesianGrid strokeDasharray="3 3" className="stroke-border" vertical={false} />
+ <XAxis
+ dataKey="date"
+ tick={{ fontSize: 11 }}
+ tickLine={false}
+ axisLine={false}
+ className="fill-muted-foreground"
+ tickFormatter={(v: string) => {
+ const d = new Date(v);
+ return d.toLocaleDateString("en", { month: "short", day: "numeric" });
+ }}
+ />
+ <YAxis
+ tick={{ fontSize: 11 }}
+ tickLine={false}
+ axisLine={false}
+ className="fill-muted-foreground"
+ allowDecimals={false}
+ />
+ <Tooltip content={<AreaTooltip />} />
+ <Legend
+ iconType="circle"
+ iconSize={8}
+ wrapperStyle={{ fontSize: 11, paddingTop: 8 }}
+ formatter={(value: string) => getPlatformName(value)}
+ />
+ {platformKeys.map((key) => (
+ <Area
+ key={key}
+ type="monotone"
+ dataKey={key}
+ name={key}
+ stroke={getColor(key)}
+ strokeWidth={2}
+ fill={`url(#grad-${key})`}
+ dot={false}
+ activeDot={{ r: 3 }}
+ />
+ ))}
+ </AreaChart>
+ )}
+ </ChartContainer>
+ );
+}
+
+export function PlatformBreakdownChart({
+ data,
+}: {
+ data: { platform: string; visits: number }[];
+}) {
+ const [hovered, setHovered] = useState<string | null>(null);
+
+ const total = data.reduce((s, d) => s + d.visits, 0) || 1;
+ const pieData = data
+ .filter((d) => d.visits > 0)
+ .map((d) => ({
+ name: getPlatformName(d.platform),
+ value: Math.round((d.visits / total) * 100),
+ color: getColor(d.platform),
+ }));
+
+ if (!pieData.length) return null;
+
+ return (
+ <div className="flex flex-col items-center gap-4 w-full">
+ <ChartContainer height={140}>
+ {(width) => {
+ const size = Math.min(width, 140);
+ return (
+ <PieChart width={width} height={140}>
+ <Pie
+ data={pieData}
+ cx={width / 2}
+ cy={70}
+ innerRadius={size * 0.27}
+ outerRadius={size * 0.43}
+ paddingAngle={2}
+ dataKey="value"
+ onMouseEnter={(_, index) => setHovered(pieData[index].name)}
+ onMouseLeave={() => setHovered(null)}
+ >
+ {pieData.map((entry) => (
+ <Cell
+ key={entry.name}
+ fill={entry.color}
+ opacity={hovered === null || hovered === entry.name ? 1 : 0.4}
+ />
+ ))}
+ </Pie>
+ <Tooltip content={<PieTooltip />} />
+ </PieChart>
+ );
+ }}
+ </ChartContainer>
+ <BarList data={pieData} />
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/traffic/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/traffic/page.tsx
new file mode 100644
index 000000000..50b79d842
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/dashboard/traffic/page.tsx
@@ -0,0 +1,436 @@
+"use client";
+
+import { useState, useEffect, useCallback } from "react";
+import { ReferralTrendChart, PlatformBreakdownChart, getPlatformName } from "./_charts";
+import { useBrandStore } from "@/stores/use-brand-store";
+import {
+ getTrafficSummary,
+ getTrafficTrend,
+ getTrafficLogs,
+ type TrafficSummary,
+ type TrafficTrendPoint,
+ type TrafficLog,
+} from "@/lib/actions/traffic";
+import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
+import { Badge } from "@/components/ui/badge";
+import {
+ Table,
+ TableBody,
+ TableCell,
+ TableHead,
+ TableHeader,
+ TableRow,
+} from "@/components/ui/table";
+import { Skeleton } from "@/components/ui/skeleton";
+import {
+ Globe,
+ TrendingUp,
+ TrendingDown,
+ Users,
+ LayoutList,
+ Code,
+ Copy,
+ Check,
+} from "lucide-react";
+import { cn } from "@/lib/utils";
+import { Button } from "@/components/ui/button";
+
+// ─── Sub-components ───────────────────────────────────────────────────────────
+
+function KpiCard({
+ title,
+ icon: Icon,
+ value,
+ sub,
+ subPositive,
+}: {
+ title: string;
+ icon: React.ElementType;
+ value: React.ReactNode;
+ sub: React.ReactNode;
+ subPositive?: boolean;
+}) {
+ return (
+ <Card>
+ <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-1">
+ <CardTitle className="text-xs font-medium text-muted-foreground uppercase tracking-wide">
+ {title}
+ </CardTitle>
+ <Icon className="h-3.5 w-3.5 text-muted-foreground" />
+ </CardHeader>
+ <CardContent>
+ <div className="text-3xl font-bold">{value}</div>
+ <p
+ className={cn(
+ "text-xs mt-1 flex items-center gap-0.5",
+ subPositive === true
+ ? "text-green-600 dark:text-green-400"
+ : subPositive === false
+ ? "text-red-500"
+ : "text-muted-foreground"
+ )}
+ >
+ {sub}
+ </p>
+ </CardContent>
+ </Card>
+ );
+}
+
+function DeltaBadge({ current, previous }: { current: number; previous: number }) {
+ if (previous === 0 && current === 0) return <span className="text-xs text-muted-foreground">—</span>;
+ if (previous === 0) return (
+ <span className="flex items-center gap-0.5 text-xs font-medium text-green-600 dark:text-green-400">
+ <TrendingUp className="h-3 w-3" />new
+ </span>
+ );
+ const delta = Math.round(((current - previous) / previous) * 100);
+ if (delta === 0) return <span className="text-xs text-muted-foreground">—</span>;
+ const pos = delta > 0;
+ return (
+ <span
+ className={cn(
+ "flex items-center gap-0.5 text-xs font-medium",
+ pos ? "text-green-600 dark:text-green-400" : "text-red-500"
+ )}
+ >
+ {pos ? <TrendingUp className="h-3 w-3" /> : <TrendingDown className="h-3 w-3" />}
+ {pos ? "+" : ""}{delta}%
+ </span>
+ );
+}
+
+function SnippetBanner({ trackingCode }: { trackingCode?: string }) {
+ const [copied, setCopied] = useState(false);
+ const isCloud = process.env.NEXT_PUBLIC_IS_CLOUD === "true";
+ const apiUrl = isCloud ? "https://api.ansops.ai" : process.env.NEXT_PUBLIC_API_URL;
+ const snippet = `<script src="${apiUrl}/t.js" data-t="${trackingCode || "YOUR_TRACKING_CODE"}" defer></script>`;
+
+ if (!trackingCode || !apiUrl) return null;
+
+ const handleCopy = () => {
+ navigator.clipboard.writeText(snippet);
+ setCopied(true);
+ setTimeout(() => setCopied(false), 2000);
+ };
+
+ return (
+ <Card className="border-blue-500/20 bg-blue-500/5">
+ <CardContent className="py-3 px-4 flex items-start gap-3">
+ <Code className="h-4 w-4 mt-0.5 shrink-0 text-blue-500" />
+ <div className="flex-1 min-w-0">
+ <p className="text-sm font-medium">Add this snippet to your website</p>
+ <p className="text-xs text-muted-foreground mt-0.5">
+ Paste this before the closing <code className="text-[11px]">&lt;/head&gt;</code> tag to track AI-referred visits.
+ </p>
+ <div className="mt-2 relative">
+ <pre className="text-[11px] bg-muted/50 rounded-md px-3 py-2 overflow-x-auto font-mono">
+ {snippet}
+ </pre>
+ </div>
+ </div>
+ <Button variant="ghost" size="icon" className="shrink-0 h-8 w-8" onClick={handleCopy}>
+ {copied ? <Check className="h-3.5 w-3.5 text-green-500" /> : <Copy className="h-3.5 w-3.5" />}
+ </Button>
+ </CardContent>
+ </Card>
+ );
+}
+
+function timeAgo(dateStr: string): string {
+ const diff = Date.now() - new Date(dateStr).getTime();
+ const mins = Math.floor(diff / 60000);
+ if (mins < 1) return "just now";
+ if (mins < 60) return `${mins}m ago`;
+ const hrs = Math.floor(mins / 60);
+ if (hrs < 24) return `${hrs}h ago`;
+ const days = Math.floor(hrs / 24);
+ return `${days}d ago`;
+}
+
+// ─── Main Page ────────────────────────────────────────────────────────────────
+
+export default function TrafficPage() {
+ const { getActiveBrand } = useBrandStore();
+ const brand = getActiveBrand();
+
+ const [summary, setSummary] = useState<TrafficSummary | null>(null);
+ const [trend, setTrend] = useState<TrafficTrendPoint[]>([]);
+ const [logs, setLogs] = useState<TrafficLog[]>([]);
+ const [logsTotal, setLogsTotal] = useState(0);
+ const [isLoading, setIsLoading] = useState(true);
+
+ const load = useCallback(async () => {
+ if (!brand) return;
+ setIsLoading(true);
+ try {
+ const [s, t, l] = await Promise.all([
+ getTrafficSummary(brand.id),
+ getTrafficTrend(brand.id),
+ getTrafficLogs(brand.id, { limit: 10 }),
+ ]);
+ setSummary(s);
+ setTrend(t);
+ setLogs(l.logs);
+ setLogsTotal(l.total);
+ } catch (err) {
+ console.error("Failed to load traffic data:", err);
+ } finally {
+ setIsLoading(false);
+ }
+ }, [brand]);
+
+ useEffect(() => {
+ load();
+ }, [load]);
+
+ if (!brand) {
+ return (
+ <div className="flex flex-col items-center justify-center py-20 text-center">
+ <h2 className="text-lg font-semibold">No brand selected</h2>
+ <p className="text-muted-foreground text-sm mt-1">
+ Select a brand to view AI traffic analytics.
+ </p>
+ </div>
+ );
+ }
+
+ const primaryDomain = brand.domains.find((d) => d.isPrimary)?.domain ?? brand.domains[0]?.domain;
+
+ if (isLoading) {
+ return (
+ <div className="space-y-6">
+ <div>
+ <Skeleton className="h-8 w-64" />
+ <Skeleton className="h-4 w-96 mt-2" />
+ </div>
+ <div className="grid grid-cols-2 gap-4 sm:grid-cols-3">
+ {[1, 2, 3].map((i) => (
+ <Skeleton key={i} className="h-24" />
+ ))}
+ </div>
+ <div className="grid grid-cols-1 gap-4 lg:grid-cols-3">
+ <Skeleton className="h-64 lg:col-span-2" />
+ <Skeleton className="h-64" />
+ </div>
+ </div>
+ );
+ }
+
+ const totalVisits = summary?.totalVisits ?? 0;
+ const totalVisitsPrev = summary?.totalVisitsPrev ?? 0;
+ const visitsDelta = totalVisitsPrev > 0
+ ? Math.round(((totalVisits - totalVisitsPrev) / totalVisitsPrev) * 100)
+ : 0;
+ const topPlatform = summary?.platformBreakdown[0];
+
+ const isEmpty = totalVisits === 0 && logs.length === 0;
+
+ return (
+ <div className="space-y-6">
+ {/* Header */}
+ <div>
+ <h1 className="text-2xl font-bold tracking-tight">AI Traffic Analytics</h1>
+ <p className="text-muted-foreground text-sm">
+ {primaryDomain ? `${primaryDomain} · ` : ""}AI-referred visits to your website
+ </p>
+ </div>
+
+ {/* Snippet Banner */}
+ <SnippetBanner trackingCode={brand.trackingCode} />
+
+ {isEmpty ? (
+ <Card>
+ <CardContent className="py-16 text-center">
+ <Globe className="h-10 w-10 mx-auto text-muted-foreground/50" />
+ <h3 className="text-lg font-semibold mt-4">No traffic data yet</h3>
+ <p className="text-sm text-muted-foreground mt-1 max-w-md mx-auto">
+ {brand.trackingCode
+ ? "Once visitors arrive from AI platforms, their visits will appear here."
+ : "Add the tracking snippet to your website to start collecting AI-referred traffic data."}
+ </p>
+ </CardContent>
+ </Card>
+ ) : (
+ <>
+ {/* KPI Cards */}
+ <div className="grid grid-cols-2 gap-4 sm:grid-cols-3">
+ <KpiCard
+ title="AI-Referred Visits"
+ icon={Users}
+ value={totalVisits.toLocaleString()}
+ sub={
+ totalVisitsPrev > 0 ? (
+ <>
+ {visitsDelta >= 0 ? <TrendingUp className="h-3 w-3" /> : <TrendingDown className="h-3 w-3" />}
+ {visitsDelta >= 0 ? "+" : ""}{visitsDelta}% vs previous period
+ </>
+ ) : (
+ "last 7 days"
+ )
+ }
+ subPositive={visitsDelta > 0 ? true : visitsDelta < 0 ? false : undefined}
+ />
+ <KpiCard
+ title="Top Platform"
+ icon={Globe}
+ value={topPlatform ? getPlatformName(topPlatform.platform) : "—"}
+ sub={topPlatform ? `${topPlatform.visits} visits` : "no data"}
+ />
+ <KpiCard
+ title="Platforms"
+ icon={Globe}
+ value={summary?.platformBreakdown.length ?? 0}
+ sub="unique AI sources"
+ />
+ </div>
+
+ {/* Charts row */}
+ <div className="grid grid-cols-1 gap-4 lg:grid-cols-3">
+ <Card className="lg:col-span-2">
+ <CardHeader className="pb-2">
+ <CardTitle className="text-sm font-medium">AI Referral Trend — Last 7 Days</CardTitle>
+ </CardHeader>
+ <CardContent>
+ <ReferralTrendChart data={trend} />
+ </CardContent>
+ </Card>
+
+ <Card>
+ <CardHeader className="pb-2">
+ <CardTitle className="text-sm font-medium">Platform Breakdown</CardTitle>
+ </CardHeader>
+ <CardContent>
+ <PlatformBreakdownChart data={summary?.platformBreakdown ?? []} />
+ </CardContent>
+ </Card>
+ </div>
+
+ {/* Tables row */}
+ <div className="grid grid-cols-1 gap-4 lg:grid-cols-2">
+ {/* Platform table */}
+ <Card>
+ <CardHeader className="pb-2">
+ <CardTitle className="text-sm font-medium">Referrals by Platform</CardTitle>
+ </CardHeader>
+ <CardContent className="p-0">
+ <Table>
+ <TableHeader>
+ <TableRow>
+ <TableHead className="pl-6">Platform</TableHead>
+ <TableHead className="text-right">Visits</TableHead>
+ <TableHead className="text-right pr-6">Change</TableHead>
+ </TableRow>
+ </TableHeader>
+ <TableBody>
+ {(summary?.platformBreakdown ?? []).map((row) => (
+ <TableRow key={row.platform} className="hover:bg-muted/50">
+ <TableCell className="pl-6">
+ <span className="font-medium text-sm">{getPlatformName(row.platform)}</span>
+ </TableCell>
+ <TableCell className="text-right font-semibold tabular-nums">
+ {row.visits.toLocaleString()}
+ </TableCell>
+ <TableCell className="text-right pr-6">
+ <div className="flex justify-end">
+ <DeltaBadge current={row.visits} previous={row.visitsPrev} />
+ </div>
+ </TableCell>
+ </TableRow>
+ ))}
+ </TableBody>
+ </Table>
+ </CardContent>
+ </Card>
+
+ {/* Top Pages */}
+ <Card>
+ <CardHeader className="pb-2">
+ <CardTitle className="text-sm font-medium">Top Landing Pages</CardTitle>
+ </CardHeader>
+ <CardContent className="p-0">
+ <Table>
+ <TableHeader>
+ <TableRow>
+ <TableHead className="pl-6">Page</TableHead>
+ <TableHead className="text-right">Visits</TableHead>
+ <TableHead className="text-right pr-6">Change</TableHead>
+ </TableRow>
+ </TableHeader>
+ <TableBody>
+ {(summary?.topPages ?? []).map((row) => (
+ <TableRow key={row.url} className="hover:bg-muted/50">
+ <TableCell className="pl-6 max-w-[200px]">
+ <span className="font-mono text-xs text-muted-foreground line-clamp-1">
+ {row.url}
+ </span>
+ </TableCell>
+ <TableCell className="text-right font-semibold tabular-nums text-sm">
+ {row.visits.toLocaleString()}
+ </TableCell>
+ <TableCell className="text-right pr-6">
+ <div className="flex justify-end">
+ <DeltaBadge current={row.visits} previous={row.visitsPrev} />
+ </div>
+ </TableCell>
+ </TableRow>
+ ))}
+ </TableBody>
+ </Table>
+ </CardContent>
+ </Card>
+ </div>
+
+ {/* Recent Visit Log */}
+ <Card>
+ <CardHeader className="pb-2">
+ <div className="flex items-center justify-between">
+ <div className="flex items-center gap-2">
+ <LayoutList className="h-4 w-4 text-muted-foreground" />
+ <CardTitle className="text-sm font-medium">Recent AI Referral Visits</CardTitle>
+ </div>
+ {logsTotal > 10 && (
+ <Badge variant="secondary" className="text-xs">{logsTotal} total</Badge>
+ )}
+ </div>
+ </CardHeader>
+ <CardContent className="p-0">
+ <Table>
+ <TableHeader>
+ <TableRow>
+ <TableHead className="pl-6 w-[100px]">Time</TableHead>
+ <TableHead>Platform</TableHead>
+ <TableHead>Page</TableHead>
+ <TableHead className="text-right pr-6">Country</TableHead>
+ </TableRow>
+ </TableHeader>
+ <TableBody>
+ {logs.map((row) => (
+ <TableRow key={row.id} className="hover:bg-muted/50">
+ <TableCell className="pl-6 text-xs text-muted-foreground whitespace-nowrap">
+ {timeAgo(row.createdAt)}
+ </TableCell>
+ <TableCell>
+ <span className="text-sm">{getPlatformName(row.sourcePlatform ?? "unknown")}</span>
+ </TableCell>
+ <TableCell>
+ <span className="font-mono text-xs text-muted-foreground line-clamp-1">
+ {(() => {
+ try { return new URL(row.url).pathname; } catch { return row.url; }
+ })()}
+ </span>
+ </TableCell>
+ <TableCell className="text-right pr-6">
+ <span className="text-xs text-muted-foreground">{row.country ?? "—"}</span>
+ </TableCell>
+ </TableRow>
+ ))}
+ </TableBody>
+ </Table>
+ </CardContent>
+ </Card>
+ </>
+ )}
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(dashboard)/layout.tsx b/web/src/app/[locale]/(dashboard)/layout.tsx
new file mode 100644
index 000000000..34c2eb5ab
--- /dev/null
+++ b/web/src/app/[locale]/(dashboard)/layout.tsx
@@ -0,0 +1,82 @@
+import { redirect } from 'next/navigation';
+import { createClient } from '@/lib/supabase/server';
+import { Sidebar } from '@/components/layout/sidebar';
+import { SidebarErrorBoundary } from '@/components/layout/sidebar-error-boundary';
+import { MobileNav } from '@/components/layout/mobile-nav';
+import { AuthProvider } from '@/components/providers/auth-provider';
+import { PlanProvider } from '@/components/providers/plan-provider';
+import { BrandLoader } from '@/components/providers/brand-loader';
+import { BrandGuard } from '@/components/providers/brand-guard';
+import { getBrands } from '@/lib/actions/brand';
+import { isCloud, type PlanId } from '@/config/plans';
+
+export default async function DashboardLayout({
+ children,
+}: {
+ children: React.ReactNode;
+}) {
+ const supabase = await createClient();
+ const {
+ data: { user },
+ } = await supabase.auth.getUser();
+
+ if (!user) {
+ redirect('/sign-in');
+ }
+
+ const { data: profile } = await supabase
+ .from('profiles')
+ .select('organization_id, onboarding_completed')
+ .eq('id', user.id)
+ .single();
+
+ if (!profile?.organization_id || !profile?.onboarding_completed) {
+ redirect('/dashboard/onboarding');
+ }
+
+ const [{ data: org }, brands] = await Promise.all([
+ supabase
+ .from('organizations')
+ .select('plan, subscription_status')
+ .eq('id', profile.organization_id)
+ .single(),
+ getBrands(profile.organization_id),
+ ]);
+
+ // Cloud mode: require active or trialing subscription
+ if (isCloud()) {
+ const subStatus = org?.subscription_status as string | null;
+ if (subStatus !== 'active' && subStatus !== 'trialing') {
+ redirect('/dashboard/onboarding');
+ }
+ }
+
+ const planId = (org?.plan ?? 'starter') as PlanId;
+
+ return (
+ <>
+ <AuthProvider user={user} />
+ <BrandLoader brands={brands} />
+ <PlanProvider planId={planId}>
+ <div className="flex h-screen overflow-hidden">
+ {/* Desktop sidebar */}
+ <div className="hidden md:flex md:flex-shrink-0">
+ <SidebarErrorBoundary>
+ <Sidebar />
+ </SidebarErrorBoundary>
+ </div>
+
+ {/* Main area */}
+ <div className="flex flex-1 flex-col overflow-hidden">
+ <div className="flex h-16 items-center border-b bg-card px-4 gap-3 md:hidden">
+ <MobileNav />
+ </div>
+ <main className="flex-1 overflow-y-auto bg-background p-6">
+ <BrandGuard>{children}</BrandGuard>
+ </main>
+ </div>
+ </div>
+ </PlanProvider>
+ </>
+ );
+}
diff --git a/web/src/app/[locale]/(marketing)/auth/callback/route.ts b/web/src/app/[locale]/(marketing)/auth/callback/route.ts
new file mode 100644
index 000000000..6fa33085b
--- /dev/null
+++ b/web/src/app/[locale]/(marketing)/auth/callback/route.ts
@@ -0,0 +1,28 @@
+import { NextResponse } from "next/server";
+import { createClient } from "@/lib/supabase/server";
+
+export async function GET(request: Request) {
+ const { searchParams, origin } = new URL(request.url);
+ const code = searchParams.get("code");
+ const next = searchParams.get("next") ?? "/dashboard";
+
+ if (code) {
+ const supabase = await createClient();
+ const { error } = await supabase.auth.exchangeCodeForSession(code);
+
+ if (!error) {
+ const forwardedHost = request.headers.get("x-forwarded-host");
+ const isLocalEnv = process.env.NODE_ENV === "development";
+
+ if (isLocalEnv) {
+ return NextResponse.redirect(`${origin}${next}`);
+ } else if (forwardedHost) {
+ return NextResponse.redirect(`https://${forwardedHost}${next}`);
+ } else {
+ return NextResponse.redirect(`${origin}${next}`);
+ }
+ }
+ }
+
+ return NextResponse.redirect(`${origin}/sign-in?error=auth_callback_failed`);
+}
diff --git a/web/src/app/[locale]/(marketing)/layout.tsx b/web/src/app/[locale]/(marketing)/layout.tsx
new file mode 100644
index 000000000..34204ee5c
--- /dev/null
+++ b/web/src/app/[locale]/(marketing)/layout.tsx
@@ -0,0 +1,16 @@
+import { MarketingHeader } from "@/components/marketing/marketing-header";
+import { MarketingFooter } from "@/components/marketing/marketing-footer";
+
+export default function MarketingLayout({
+ children,
+}: {
+ children: React.ReactNode;
+}) {
+ return (
+ <div className="flex min-h-screen flex-col">
+ <MarketingHeader />
+ <main className="flex-1">{children}</main>
+ <MarketingFooter />
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(marketing)/pricing/page.tsx b/web/src/app/[locale]/(marketing)/pricing/page.tsx
new file mode 100644
index 000000000..78a540e84
--- /dev/null
+++ b/web/src/app/[locale]/(marketing)/pricing/page.tsx
@@ -0,0 +1,389 @@
+"use client";
+
+
+import { useTranslations } from "next-intl";
+import { Link } from "@/i18n/navigation";
+import { PLANS, PLAN_ORDER, type PlanId } from "@/config/plans";
+import { Button } from "@/components/ui/button";
+import { Badge } from "@/components/ui/badge";
+import { Separator } from "@/components/ui/separator";
+import { cn } from "@/lib/utils";
+import { Check, Minus, Github } from "lucide-react";
+
+
+function PlanCard({
+ planId,
+}: {
+ planId: PlanId;
+}) {
+ const plan = PLANS[planId];
+ const price = plan.pricing;
+ const isHighlighted = plan.highlighted;
+ const displayPrice = price === null ? null : price.monthly;
+
+ const ctaMap: Record<PlanId, { label: string; href: string }> = {
+ self_hosted: { label: "Self-Host", href: "/docs/self-host" },
+ starter: { label: "Get Started", href: "/sign-up" },
+ growth: { label: "Start Free Trial", href: "/sign-up" },
+ enterprise: { label: "Contact Sales", href: "mailto:[email protected]" },
+ };
+ const cta = ctaMap[planId];
+
+ return (
+ <div
+ className={cn(
+ "relative flex flex-col rounded-2xl border bg-card p-6 shadow-sm transition-shadow hover:shadow-md",
+ isHighlighted && "border-primary shadow-md ring-1 ring-primary/20",
+ )}
+ >
+ {isHighlighted && (
+ <Badge className="absolute -top-3 left-1/2 -translate-x-1/2">
+ Most Popular
+ </Badge>
+ )}
+
+ <div className="mb-6">
+ <h3 className="text-lg font-semibold">{plan.name}</h3>
+ <p className="mt-1 text-sm text-muted-foreground">{plan.tagline}</p>
+
+ <div className="mt-4 flex items-end gap-1">
+ {displayPrice !== null ? (
+ <>
+ <span className="text-4xl font-bold tracking-tight">
+ ${displayPrice}
+ </span>
+ {displayPrice !== 0 && (
+ <span className="mb-1 text-sm text-muted-foreground">
+ /month
+ </span>
+ )}
+ </>
+ ) : (
+ <span className="text-3xl font-bold tracking-tight">Custom</span>
+ )}
+ </div>
+
+ </div>
+
+ <Link href={cta.href}>
+ <Button
+ variant={isHighlighted ? "default" : "outline"}
+ className="w-full"
+ >
+ {cta.label}
+ </Button>
+ </Link>
+
+ <Separator className="my-6" />
+
+ <div className="flex-1 space-y-3 text-sm">
+ <PlanFeature>
+ <strong>
+ {plan.limits.maxBrands === -1
+ ? "Unlimited"
+ : plan.limits.maxBrands}
+ </strong>{" "}
+ {plan.limits.maxBrands === 1 ? "brand" : "brands"}
+ </PlanFeature>
+ <PlanFeature>
+ <strong>
+ {plan.limits.maxPrompts === -1
+ ? "Unlimited"
+ : plan.limits.maxPrompts}
+ </strong>{" "}
+ prompts tracked
+ </PlanFeature>
+ <PlanFeature>
+ {plan.limits.maxPlatforms === 1 ? (
+ <><strong>1</strong> platform (ChatGPT)</>
+ ) : (
+ <><strong>{plan.limits.maxPlatforms}</strong> AI platforms</>
+ )}
+ </PlanFeature>
+ <PlanFeature>
+ <strong>
+ {plan.limits.maxTeamMembers === -1
+ ? "Unlimited"
+ : plan.limits.maxTeamMembers}
+ </strong>{" "}
+ team {plan.limits.maxTeamMembers === 1 ? "member" : "members"}
+ </PlanFeature>
+ <PlanFeature>
+ {plan.limits.features.includes("daily_monitoring")
+ ? "Daily monitoring"
+ : "Weekly monitoring"}
+ </PlanFeature>
+
+ {plan.limits.features.includes("competitor_tracking") && (
+ <PlanFeature>Competitor tracking</PlanFeature>
+ )}
+ {plan.limits.features.includes("content_optimization") && (
+ <PlanFeature>Content optimization</PlanFeature>
+ )}
+ {plan.limits.features.includes("advanced_analytics") && (
+ <PlanFeature>Advanced analytics</PlanFeature>
+ )}
+ {plan.limits.features.includes("custom_reports") && (
+ <PlanFeature>Custom reports</PlanFeature>
+ )}
+ {plan.limits.features.includes("api_access") && (
+ <PlanFeature>API access</PlanFeature>
+ )}
+ {plan.limits.features.includes("white_label") && (
+ <PlanFeature>White-label</PlanFeature>
+ )}
+ {plan.limits.features.includes("sso_saml") && (
+ <PlanFeature>SSO / SAML</PlanFeature>
+ )}
+ </div>
+ </div>
+ );
+}
+
+function PlanFeature({ children }: { children: React.ReactNode }) {
+ return (
+ <div className="flex items-start gap-2">
+ <Check className="mt-0.5 h-4 w-4 shrink-0 text-primary" />
+ <span>{children}</span>
+ </div>
+ );
+}
+
+// ─── Comparison Table ────────────────────────────────────────────────────────
+
+interface ComparisonRow {
+ label: string;
+ values: Record<PlanId, string | boolean>;
+}
+
+const COMPARISON_SECTIONS: {
+ title: string;
+ rows: ComparisonRow[];
+}[] = [
+ {
+ title: "Answer Engine Insights",
+ rows: [
+ {
+ label: "AI platforms",
+ values: { self_hosted: "All 8", starter: "4", growth: "All 8", enterprise: "All 8" },
+ },
+ {
+ label: "Prompts tracked",
+ values: { self_hosted: "Unlimited", starter: "10", growth: "200", enterprise: "Unlimited" },
+ },
+ {
+ label: "Daily monitoring",
+ values: { self_hosted: true, starter: true, growth: true, enterprise: true },
+ },
+ {
+ label: "Competitor tracking",
+ values: { self_hosted: true, starter: true, growth: true, enterprise: true },
+ },
+ {
+ label: "Sentiment analysis",
+ values: { self_hosted: true, starter: true, growth: true, enterprise: true },
+ },
+ {
+ label: "Prompt suggestions (AI)",
+ values: { self_hosted: true, starter: true, growth: true, enterprise: true },
+ },
+ ],
+ },
+ {
+ title: "Content & Optimization",
+ rows: [
+ {
+ label: "Content optimization",
+ values: { self_hosted: true, starter: false, growth: true, enterprise: true },
+ },
+ {
+ label: "Advanced analytics",
+ values: { self_hosted: true, starter: false, growth: true, enterprise: true },
+ },
+ {
+ label: "Custom reports",
+ values: { self_hosted: true, starter: false, growth: true, enterprise: true },
+ },
+ ],
+ },
+ {
+ title: "Organization",
+ rows: [
+ {
+ label: "Brands",
+ values: { self_hosted: "Unlimited", starter: "1", growth: "10", enterprise: "Unlimited" },
+ },
+ {
+ label: "Team members",
+ values: { self_hosted: "Unlimited", starter: "3", growth: "10", enterprise: "Unlimited" },
+ },
+ {
+ label: "Domains per brand",
+ values: { self_hosted: "Unlimited", starter: "3", growth: "10", enterprise: "Unlimited" },
+ },
+ {
+ label: "API access",
+ values: { self_hosted: true, starter: false, growth: true, enterprise: true },
+ },
+ {
+ label: "White-label",
+ values: { self_hosted: true, starter: false, growth: false, enterprise: true },
+ },
+ {
+ label: "SSO / SAML",
+ values: { self_hosted: false, starter: false, growth: false, enterprise: true },
+ },
+ ],
+ },
+ {
+ title: "Support",
+ rows: [
+ {
+ label: "Community support",
+ values: { self_hosted: true, starter: true, growth: true, enterprise: true },
+ },
+ {
+ label: "Email support",
+ values: { self_hosted: false, starter: true, growth: true, enterprise: true },
+ },
+ {
+ label: "Priority support",
+ values: { self_hosted: false, starter: false, growth: true, enterprise: true },
+ },
+ {
+ label: "Dedicated success manager",
+ values: { self_hosted: false, starter: false, growth: false, enterprise: true },
+ },
+ {
+ label: "SLA",
+ values: { self_hosted: false, starter: false, growth: false, enterprise: true },
+ },
+ ],
+ },
+];
+
+function ComparisonCell({ value }: { value: string | boolean }) {
+ if (typeof value === "boolean") {
+ return value ? (
+ <Check className="mx-auto h-4 w-4 text-primary" />
+ ) : (
+ <Minus className="mx-auto h-4 w-4 text-muted-foreground/40" />
+ );
+ }
+ return <span className="text-sm font-medium">{value}</span>;
+}
+
+function ComparisonTable() {
+ return (
+ <div className="overflow-x-auto">
+ <table className="w-full min-w-[700px] text-sm">
+ <thead>
+ <tr className="border-b">
+ <th className="py-4 pr-4 text-left font-medium text-muted-foreground w-[240px]">
+ Features
+ </th>
+ {PLAN_ORDER.map((id) => (
+ <th key={id} className="px-4 py-4 text-center font-semibold">
+ {PLANS[id].name}
+ </th>
+ ))}
+ </tr>
+ </thead>
+ <tbody>
+ {COMPARISON_SECTIONS.map((section) => (
+ <>
+ <tr key={section.title}>
+ <td
+ colSpan={5}
+ className="pb-2 pt-6 text-xs font-semibold uppercase tracking-wider text-muted-foreground"
+ >
+ {section.title}
+ </td>
+ </tr>
+ {section.rows.map((row) => (
+ <tr key={row.label} className="border-b border-border/50">
+ <td className="py-3 pr-4 text-sm">{row.label}</td>
+ {PLAN_ORDER.map((id) => (
+ <td key={id} className="px-4 py-3 text-center">
+ <ComparisonCell value={row.values[id]} />
+ </td>
+ ))}
+ </tr>
+ ))}
+ </>
+ ))}
+ </tbody>
+ </table>
+ </div>
+ );
+}
+
+// ─── Main Page ───────────────────────────────────────────────────────────────
+
+export default function PricingPage() {
+ const t = useTranslations("marketing.pricing");
+
+ return (
+ <div className="py-20">
+ <div className="container max-w-6xl">
+ {/* Header */}
+ <div className="mb-4 text-center">
+ <h1 className="text-4xl font-bold tracking-tight sm:text-5xl">
+ {t("title")}
+ </h1>
+ <p className="mt-3 text-lg text-muted-foreground">
+ {t("subtitle")}
+ </p>
+ </div>
+
+ {/* Self-hosted banner */}
+ <div className="mb-10 flex justify-center">
+ <div className="inline-flex items-center gap-2 rounded-full border bg-card px-4 py-2 text-sm">
+ <Github className="h-4 w-4" />
+ <span>
+ Self-host for free with{" "}
+ <strong className="text-foreground">all features unlocked</strong>
+ </span>
+ </div>
+ </div>
+
+ {/* Plan cards */}
+ <div className="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
+ {PLAN_ORDER.map((id) => (
+ <PlanCard key={id} planId={id} />
+ ))}
+ </div>
+
+ {/* Comparison table */}
+ <div className="mt-20">
+ <h2 className="mb-8 text-center text-2xl font-bold tracking-tight">
+ {t("compareTitle")}
+ </h2>
+ <div className="rounded-xl border bg-card p-6 shadow-sm">
+ <ComparisonTable />
+ </div>
+ </div>
+
+ {/* Open source callout */}
+ <div className="mt-16 rounded-2xl border bg-card p-8 text-center shadow-sm">
+ <Github className="mx-auto h-10 w-10 text-muted-foreground" />
+ <h3 className="mt-4 text-xl font-bold">{t("ossTitle")}</h3>
+ <p className="mx-auto mt-2 max-w-md text-sm text-muted-foreground">
+ {t("ossDescription")}
+ </p>
+ <div className="mt-6 flex justify-center gap-3">
+ <Link href="https://github.com/your-org/ansvisor">
+ <Button variant="outline" className="gap-2">
+ <Github className="h-4 w-4" />
+ View on GitHub
+ </Button>
+ </Link>
+ <Link href="/sign-up">
+ <Button>Try Cloud Free</Button>
+ </Link>
+ </div>
+ </div>
+ </div>
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(marketing)/sign-in/page.tsx b/web/src/app/[locale]/(marketing)/sign-in/page.tsx
new file mode 100644
index 000000000..f05f7c20b
--- /dev/null
+++ b/web/src/app/[locale]/(marketing)/sign-in/page.tsx
@@ -0,0 +1,57 @@
+import { useTranslations } from "next-intl";
+import { Link } from "@/i18n/navigation";
+import { SignInForm } from "@/components/auth/sign-in-form";
+import { MailCheck } from "lucide-react";
+
+export default async function SignInPage({
+ searchParams,
+}: {
+ searchParams: Promise<{ verified?: string }>;
+}) {
+ const params = await searchParams;
+ const showVerificationBanner = params.verified === "pending";
+
+ return (
+ <div className="flex min-h-svh flex-col items-center justify-center gap-6 p-6 md:p-10">
+ <div className="flex w-full max-w-sm flex-col gap-6">
+ {showVerificationBanner && <VerificationBanner />}
+ <SignInCard />
+ </div>
+ </div>
+ );
+}
+
+function VerificationBanner() {
+ const t = useTranslations("auth");
+
+ return (
+ <div className="flex items-start gap-3 rounded-lg border border-blue-200 bg-blue-50 p-4 dark:border-blue-900 dark:bg-blue-950/50">
+ <MailCheck className="mt-0.5 h-5 w-5 shrink-0 text-blue-600 dark:text-blue-400" />
+ <p className="text-sm text-blue-800 dark:text-blue-300">
+ {t("verificationPending")}
+ </p>
+ </div>
+ );
+}
+
+function SignInCard() {
+ const t = useTranslations("auth");
+
+ return (
+ <div className="rounded-xl border bg-card p-6 shadow-sm">
+ <div className="mb-6 text-center">
+ <h1 className="text-2xl font-semibold tracking-tight">{t("signIn")}</h1>
+ <p className="mt-1 text-sm text-muted-foreground">
+ {t("noAccount")}{" "}
+ <Link
+ href="/sign-up"
+ className="font-medium text-primary underline-offset-4 hover:underline"
+ >
+ {t("createAccount")}
+ </Link>
+ </p>
+ </div>
+ <SignInForm />
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(marketing)/sign-up/page.tsx b/web/src/app/[locale]/(marketing)/sign-up/page.tsx
new file mode 100644
index 000000000..3bbad092e
--- /dev/null
+++ b/web/src/app/[locale]/(marketing)/sign-up/page.tsx
@@ -0,0 +1,35 @@
+import { useTranslations } from "next-intl";
+import { Link } from "@/i18n/navigation";
+import { SignUpForm } from "@/components/auth/sign-up-form";
+
+export default function SignUpPage() {
+ return (
+ <div className="flex min-h-svh flex-col items-center justify-center gap-6 p-6 md:p-10">
+ <div className="flex w-full max-w-sm flex-col gap-6">
+ <SignUpCard />
+ </div>
+ </div>
+ );
+}
+
+function SignUpCard() {
+ const t = useTranslations("auth");
+
+ return (
+ <div className="rounded-xl border bg-card p-6 shadow-sm">
+ <div className="mb-6 text-center">
+ <h1 className="text-2xl font-semibold tracking-tight">{t("signUp")}</h1>
+ <p className="mt-1 text-sm text-muted-foreground">
+ {t("hasAccount")}{" "}
+ <Link
+ href="/sign-in"
+ className="font-medium text-primary underline-offset-4 hover:underline"
+ >
+ {t("signIn")}
+ </Link>
+ </p>
+ </div>
+ <SignUpForm />
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(onboarding)/dashboard/onboarding/page.tsx b/web/src/app/[locale]/(onboarding)/dashboard/onboarding/page.tsx
new file mode 100644
index 000000000..8bd7c3ec5
--- /dev/null
+++ b/web/src/app/[locale]/(onboarding)/dashboard/onboarding/page.tsx
@@ -0,0 +1,1637 @@
+'use client';
+
+import { useState, useEffect, useRef } from 'react';
+import { useRouter } from '@/i18n/navigation';
+import { createClient } from '@/lib/supabase/client';
+import { createBrand } from '@/lib/actions/brand';
+import { createTopics, getTopics } from '@/lib/actions/topic';
+import { savePromptSet } from '@/lib/actions/prompt';
+import { triggerTrackingCheck } from '@/lib/actions/tracking';
+import { addCompetitor, getCompetitors } from '@/lib/actions/competitor';
+import { getFaviconUrl } from '@/lib/favicon';
+import { useBrandStore } from '@/stores/use-brand-store';
+import { REGIONS, LANGUAGES } from '@/config/prompt-options';
+import { ALL_MODELS, ALL_SCRAPERS } from '@/config/prompt-options';
+import { isCloud, PLANS, SUBSCRIBABLE_PLANS, getPlan, type PlanId } from '@/config/plans';
+import type { Brand } from '@/types';
+import { Badge } from '@/components/ui/badge';
+import { Button } from '@/components/ui/button';
+import { Input } from '@/components/ui/input';
+import { Label } from '@/components/ui/label';
+import { Separator } from '@/components/ui/separator';
+import { Textarea } from '@/components/ui/textarea';
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from '@/components/ui/select';
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+} from '@/components/ui/dropdown-menu';
+import { toast } from 'sonner';
+import {
+ ArrowLeft,
+ Check,
+ ChevronDown,
+ ChevronRight,
+ Globe,
+ Loader2,
+ MoreHorizontal,
+ Plus,
+ Sparkles,
+ X,
+} from 'lucide-react';
+import { cn } from '@/lib/utils';
+
+const AEO_SERVER_URL =
+ process.env.NEXT_PUBLIC_API_URL || 'http://localhost:80';
+
+// ── Step indicator ─────────────────────────────────────────────────────────────
+
+function StepDots({ current, total }: { current: number; total: number }) {
+ return (
+ <div className="flex items-center gap-1.5">
+ {Array.from({ length: total }, (_, i) => (
+ <div
+ key={i}
+ className={cn(
+ 'h-1.5 rounded-full transition-all',
+ i + 1 === current
+ ? 'w-6 bg-foreground'
+ : i + 1 < current
+ ? 'w-1.5 bg-foreground'
+ : 'w-1.5 bg-muted-foreground/30',
+ )}
+ />
+ ))}
+ </div>
+ );
+}
+
+// ── Brand header (Steps 2-4) ───────────────────────────────────────────────────
+
+function BrandHeader({ name, domain }: { name: string; domain: string }) {
+ return (
+ <div className="flex items-center gap-2.5 mb-8">
+ {domain && (
+ /* eslint-disable-next-line @next/next/no-img-element */
+ <img
+ src={getFaviconUrl(domain, 32)}
+ alt=""
+ className="h-6 w-6 rounded"
+ />
+ )}
+ <span className="text-sm font-medium">{name}</span>
+ {domain && (
+ <span className="text-sm text-muted-foreground">{domain}</span>
+ )}
+ </div>
+ );
+}
+
+// ── Topic Prompt Accordion ─────────────────────────────────────────────────────
+
+interface TopicPromptsData {
+ topic: string;
+ prompts: string[];
+}
+
+function TopicAccordion({
+ data,
+ defaultOpen = false,
+ onRemoveTopic,
+ onAddPrompt,
+ onRemovePrompt,
+}: {
+ data: TopicPromptsData;
+ defaultOpen?: boolean;
+ onRemoveTopic: () => void;
+ onAddPrompt: (prompt: string) => void;
+ onRemovePrompt: (index: number) => void;
+}) {
+ const [open, setOpen] = useState(defaultOpen);
+ const [newPrompt, setNewPrompt] = useState('');
+
+ const handleAdd = () => {
+ const trimmed = newPrompt.trim();
+ if (trimmed.length >= 10) {
+ onAddPrompt(trimmed);
+ setNewPrompt('');
+ }
+ };
+
+ return (
+ <div className="border-b last:border-b-0">
+ <div className="flex items-center gap-3 py-3 px-1">
+ <button
+ onClick={() => setOpen(!open)}
+ className="flex items-center gap-2 flex-1 text-left text-sm"
+ >
+ {open ? (
+ <ChevronDown className="h-4 w-4 text-muted-foreground shrink-0" />
+ ) : (
+ <ChevronRight className="h-4 w-4 text-muted-foreground shrink-0" />
+ )}
+ <span className="font-medium">{data.topic}</span>
+ <span className="text-xs text-muted-foreground">
+ {data.prompts.length} prompts
+ </span>
+ </button>
+ <DropdownMenu>
+ <DropdownMenuTrigger className="p-1 rounded hover:bg-muted text-muted-foreground">
+ <MoreHorizontal className="h-4 w-4" />
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end">
+ <DropdownMenuItem
+ className="text-destructive focus:text-destructive"
+ onClick={onRemoveTopic}
+ >
+ Remove topic
+ </DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ </div>
+ {open && (
+ <div className="pl-7 pb-3 space-y-1.5">
+ {data.prompts.map((p, idx) => (
+ <div
+ key={idx}
+ className="flex items-center gap-2 group rounded-md border bg-muted/30 px-3 py-2"
+ >
+ <span className="text-sm flex-1">{p}</span>
+ <button
+ onClick={() => onRemovePrompt(idx)}
+ className="opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-destructive transition-opacity"
+ >
+ <X className="h-3.5 w-3.5" />
+ </button>
+ </div>
+ ))}
+ <div className="flex items-center gap-2 mt-2">
+ <Input
+ placeholder="Enter new prompt..."
+ value={newPrompt}
+ onChange={(e) => setNewPrompt(e.target.value)}
+ onKeyDown={(e) => e.key === 'Enter' && handleAdd()}
+ className="text-sm h-9"
+ />
+ <Button
+ size="sm"
+ variant="ghost"
+ onClick={handleAdd}
+ disabled={newPrompt.trim().length < 10}
+ className="h-9 px-2"
+ >
+ <Check className="h-4 w-4" />
+ </Button>
+ <Button
+ size="sm"
+ variant="ghost"
+ onClick={() => setNewPrompt('')}
+ className="h-9 px-2"
+ >
+ <X className="h-4 w-4" />
+ </Button>
+ </div>
+ </div>
+ )}
+ </div>
+ );
+}
+
+// ── Constants ─────────────────────────────────────────────────────────────────
+
+const TOPIC_LOADING_MESSAGES = [
+ 'Researching topics for your brand...',
+ 'Analyzing your industry landscape...',
+ 'Identifying key themes and trends...',
+ 'Finding what your audience cares about...',
+ 'Evaluating competitive topics...',
+ 'Almost there, finalizing suggestions...',
+];
+
+const COMPETITOR_LOADING_MESSAGES = [
+ 'Searching for competitors...',
+ 'Analyzing your market...',
+ 'Identifying key players...',
+ 'Verifying company details...',
+ 'Finalizing recommendations...',
+];
+
+// ── Main page ──────────────────────────────────────────────────────────────────
+
+export default function OnboardingPage() {
+ const router = useRouter();
+ const { addBrand, setActiveBrand } = useBrandStore();
+
+ const [step, setStep] = useState(1);
+ const [isLoading, setIsLoading] = useState(false);
+ const [initialLoading, setInitialLoading] = useState(true);
+
+ // Step 1
+ const [brandName, setBrandName] = useState('');
+ const [website, setWebsite] = useState('');
+ const [description, setDescription] = useState('');
+
+ // Step 2
+ const [region, setRegion] = useState('US');
+ const [language, setLanguage] = useState('en');
+
+ // Intermediate state
+ const [createdBrand, setCreatedBrand] = useState<Brand | null>(null);
+
+ // Step 3
+ const [suggestedTopics, setSuggestedTopics] = useState<string[]>([]);
+ const [selectedTopics, setSelectedTopics] = useState<Set<string>>(new Set());
+ const [customTopic, setCustomTopic] = useState('');
+ const [loadingTopics, setLoadingTopics] = useState(false);
+ const [topicLoadingMsg, setTopicLoadingMsg] = useState('');
+ const topicMsgIdx = useRef(0);
+
+ useEffect(() => {
+ if (!loadingTopics) {
+ topicMsgIdx.current = 0;
+ return;
+ }
+ setTopicLoadingMsg(TOPIC_LOADING_MESSAGES[0]);
+ topicMsgIdx.current = 0;
+
+ const interval = setInterval(() => {
+ topicMsgIdx.current =
+ (topicMsgIdx.current + 1) % TOPIC_LOADING_MESSAGES.length;
+ setTopicLoadingMsg(TOPIC_LOADING_MESSAGES[topicMsgIdx.current]);
+ }, 2500);
+
+ return () => clearInterval(interval);
+ }, [loadingTopics]);
+
+ // Step 4
+ const [topicPrompts, setTopicPrompts] = useState<TopicPromptsData[]>([]);
+ const [loadingPrompts, setLoadingPrompts] = useState(false);
+
+ // Step 5
+ interface CompetitorItem {
+ name: string;
+ domain: string;
+ selected: boolean;
+ }
+ const [suggestedCompetitors, setSuggestedCompetitors] = useState<
+ CompetitorItem[]
+ >([]);
+ const [loadingCompetitors, setLoadingCompetitors] = useState(false);
+ const [competitorName, setCompetitorName] = useState('');
+ const [competitorDomain, setCompetitorDomain] = useState('');
+ const [savingCompetitors, setSavingCompetitors] = useState(false);
+ const [competitorLoadingMsg, setCompetitorLoadingMsg] = useState('');
+ const competitorMsgIdx = useRef(0);
+
+ // Step 6 (cloud only)
+ const [checkoutLoading, setCheckoutLoading] = useState<PlanId | null>(null);
+ const [organizationId, setOrganizationId] = useState<string | null>(null);
+ const [currentPlanId, setCurrentPlanId] = useState<PlanId>('starter');
+
+ const totalSteps = isCloud() ? 6 : 5;
+
+ // Determine which scrapers/models are available based on the plan
+ const currentPlan = getPlan(currentPlanId);
+ const allowedScraperIds = currentPlan.limits.allowedScrapers;
+ const activeScrapers = allowedScraperIds
+ ? ALL_SCRAPERS.filter((s) => allowedScraperIds.includes(s.id))
+ : ALL_SCRAPERS;
+ const allowedModelIds = currentPlan.limits.allowedModels;
+ const activeModels = allowedModelIds
+ ? ALL_MODELS.filter((m) => allowedModelIds.includes(m.id))
+ : ALL_MODELS;
+
+ useEffect(() => {
+ if (!loadingCompetitors) {
+ competitorMsgIdx.current = 0;
+ return;
+ }
+ setCompetitorLoadingMsg(COMPETITOR_LOADING_MESSAGES[0]);
+ competitorMsgIdx.current = 0;
+
+ const interval = setInterval(() => {
+ competitorMsgIdx.current =
+ (competitorMsgIdx.current + 1) % COMPETITOR_LOADING_MESSAGES.length;
+ setCompetitorLoadingMsg(
+ COMPETITOR_LOADING_MESSAGES[competitorMsgIdx.current],
+ );
+ }, 2500);
+
+ return () => clearInterval(interval);
+ }, [loadingCompetitors]);
+
+ // Auto-fetch competitor suggestions when arriving at step 5 with none loaded
+ useEffect(() => {
+ if (
+ step === 5 &&
+ !initialLoading &&
+ !loadingCompetitors &&
+ suggestedCompetitors.length === 0 &&
+ createdBrand
+ ) {
+ fetchCompetitorSuggestions();
+ }
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [step, initialLoading]);
+
+ // Resume logic: check existing state on mount
+ useEffect(() => {
+ async function checkResume() {
+ try {
+ const supabase = createClient();
+ const {
+ data: { user },
+ } = await supabase.auth.getUser();
+ if (!user) return;
+
+ const { data: profile } = await supabase
+ .from('profiles')
+ .select('organization_id, onboarding_completed')
+ .eq('id', user.id)
+ .single();
+
+ if (profile?.onboarding_completed) {
+ if (isCloud() && profile.organization_id) {
+ // Check subscription status — if not active/trialing, show plan selection
+ const { data: org } = await supabase
+ .from('organizations')
+ .select('subscription_status, plan')
+ .eq('id', profile.organization_id)
+ .single();
+ if (org?.plan) setCurrentPlanId(org.plan as PlanId);
+ const subStatus = org?.subscription_status;
+ if (subStatus !== 'active' && subStatus !== 'trialing') {
+ setOrganizationId(profile.organization_id);
+ setStep(6);
+ setInitialLoading(false);
+ return;
+ }
+ }
+ router.push('/dashboard');
+ router.refresh();
+ return;
+ }
+
+ if (profile?.organization_id) {
+ setOrganizationId(profile.organization_id);
+ const { data: brands } = await supabase
+ .from('brands')
+ .select('*, brand_domains(*)')
+ .eq('organization_id', profile.organization_id)
+ .limit(1);
+
+ if (brands?.length) {
+ const b = brands[0];
+ const mapped: Brand = {
+ id: b.id,
+ organizationId: b.organization_id,
+ name: b.name,
+ slug: b.slug,
+ logoUrl: b.logo_url ?? undefined,
+ industry: b.industry ?? undefined,
+ description: b.description ?? undefined,
+ region: b.region ?? undefined,
+ language: b.language ?? undefined,
+ domains: (b.brand_domains || []).map(
+ (d: Record<string, unknown>) => ({
+ id: d.id as string,
+ brandId: d.brand_id as string,
+ domain: d.domain as string,
+ country: (d.country as string) ?? undefined,
+ isPrimary: d.is_primary as boolean,
+ }),
+ ),
+ createdAt: b.created_at,
+ updatedAt: b.updated_at,
+ };
+ setCreatedBrand(mapped);
+ addBrand(mapped);
+ setActiveBrand(mapped.id);
+ setBrandName(mapped.name);
+ setWebsite(mapped.domains[0]?.domain || '');
+ setDescription(mapped.description || '');
+ setRegion(mapped.region || 'US');
+ setLanguage(mapped.language || 'en');
+
+ const topics = await getTopics(mapped.id);
+ if (topics.length > 0) {
+ const { data: promptSets } = await supabase
+ .from('prompt_sets')
+ .select('id')
+ .eq('brand_id', mapped.id);
+
+ if (promptSets?.length) {
+ // Prompts exist — go to step 5 (competitors)
+ const existingCompetitors = await getCompetitors(mapped.id);
+ if (existingCompetitors.length > 0) {
+ setSuggestedCompetitors(
+ existingCompetitors.map((c) => ({
+ name: c.name,
+ domain: c.domain,
+ selected: true,
+ })),
+ );
+ }
+ setStep(5);
+ } else {
+ setStep(3);
+ setSuggestedTopics(topics.map((t) => t.name));
+ setSelectedTopics(new Set(topics.map((t) => t.name)));
+ }
+ } else {
+ setStep(3);
+ }
+ }
+ }
+ } catch (err) {
+ console.error('Resume check failed:', err);
+ } finally {
+ setInitialLoading(false);
+ }
+ }
+ checkResume();
+ }, [router, addBrand, setActiveBrand]);
+
+ const domain = website
+ .replace(/^https?:\/\//, '')
+ .replace(/\/.*$/, '')
+ .trim();
+
+ // ── Step 2 → Step 3 transition: create org + brand ──
+
+ const handleCreateOrgAndBrand = async () => {
+ setIsLoading(true);
+ try {
+ const supabase = createClient();
+ const {
+ data: { user },
+ } = await supabase.auth.getUser();
+ if (!user) throw new Error('Not authenticated');
+
+ // Check if org already exists (resume case)
+ const { data: profile } = await supabase
+ .from('profiles')
+ .select('organization_id')
+ .eq('id', user.id)
+ .single();
+
+ let orgId = profile?.organization_id;
+
+ if (!orgId) {
+ const slug =
+ brandName
+ .toLowerCase()
+ .trim()
+ .replace(/\s+/g, '-')
+ .replace(/[^a-z0-9-]/g, '')
+ .replace(/-+/g, '-')
+ .replace(/^-|-$/g, '') || `org-${Date.now()}`;
+
+ const { data: existing } = await supabase
+ .from('organizations')
+ .select('id')
+ .eq('slug', slug)
+ .maybeSingle();
+
+ const finalSlug = existing ? `${slug}-${Date.now()}` : slug;
+
+ const { data: org, error: orgError } = await supabase
+ .from('organizations')
+ .insert({ name: brandName.trim(), slug: finalSlug })
+ .select()
+ .single();
+
+ if (orgError || !org)
+ throw new Error(orgError?.message ?? 'Failed to create organization');
+
+ const { error: profileError } = await supabase
+ .from('profiles')
+ .update({ organization_id: org.id })
+ .eq('id', user.id);
+
+ if (profileError) throw new Error(profileError.message);
+ orgId = org.id;
+ }
+
+ setOrganizationId(orgId);
+
+ // Create brand if not already created
+ if (!createdBrand) {
+ const logoUrl = domain ? getFaviconUrl(domain) : undefined;
+
+ const brand = await createBrand({
+ organizationId: orgId,
+ name: brandName.trim(),
+ logoUrl,
+ description: description.trim() || undefined,
+ region,
+ language,
+ domains: domain ? [{ domain, isPrimary: true }] : [],
+ });
+
+ setCreatedBrand(brand);
+ addBrand(brand);
+ setActiveBrand(brand.id);
+ }
+
+ setStep(3);
+
+ // Auto-suggest topics
+ if (suggestedTopics.length === 0) {
+ fetchTopicSuggestions();
+ }
+ } catch (err) {
+ toast.error(
+ err instanceof Error ? err.message : 'Failed to create brand',
+ );
+ } finally {
+ setIsLoading(false);
+ }
+ };
+
+ // ── Topic suggestion ──
+
+ const fetchTopicSuggestions = async () => {
+ setLoadingTopics(true);
+ try {
+ const supabase = createClient();
+ const {
+ data: { session },
+ } = await supabase.auth.getSession();
+
+ const res = await fetch(`${AEO_SERVER_URL}/api/topics/suggest`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: `Bearer ${session?.access_token}`,
+ },
+ body: JSON.stringify({
+ brandName: brandName.trim(),
+ industry: '',
+ description: description.trim(),
+ website: domain,
+ language,
+ }),
+ });
+
+ if (!res.ok) throw new Error('Failed to suggest topics');
+ const data = await res.json();
+
+ const names = (data.topics || []).map((t: { name: string }) => t.name);
+ setSuggestedTopics(names);
+ setSelectedTopics(new Set(names.slice(0, 7)));
+ } catch (err) {
+ console.error('Topic suggestion error:', err);
+ toast.error('Failed to generate topic suggestions');
+ } finally {
+ setLoadingTopics(false);
+ }
+ };
+
+ const toggleTopic = (topic: string) => {
+ setSelectedTopics((prev) => {
+ const next = new Set(prev);
+ if (next.has(topic)) {
+ next.delete(topic);
+ } else if (next.size < 10) {
+ next.add(topic);
+ }
+ return next;
+ });
+ };
+
+ const addCustomTopic = () => {
+ const trimmed = customTopic.trim();
+ if (trimmed && !suggestedTopics.includes(trimmed)) {
+ setSuggestedTopics((prev) => [...prev, trimmed]);
+ setSelectedTopics((prev) => {
+ if (prev.size < 10) {
+ const next = new Set(prev);
+ next.add(trimmed);
+ return next;
+ }
+ return prev;
+ });
+ setCustomTopic('');
+ }
+ };
+
+ // ── Step 3 → Step 4: generate prompts from topics ──
+
+ const handleGeneratePrompts = async () => {
+ if (!createdBrand) return;
+ setLoadingPrompts(true);
+ try {
+ // Save topics to DB
+ const topicNames = Array.from(selectedTopics);
+ await createTopics(createdBrand.id, topicNames);
+
+ const supabase = createClient();
+ const {
+ data: { session },
+ } = await supabase.auth.getSession();
+
+ const res = await fetch(`${AEO_SERVER_URL}/api/prompts/from-topics`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: `Bearer ${session?.access_token}`,
+ },
+ body: JSON.stringify({
+ brandName: brandName.trim(),
+ industry: '',
+ description: description.trim(),
+ topics: topicNames,
+ language,
+ }),
+ });
+
+ if (!res.ok) throw new Error('Failed to generate prompts');
+ const data = await res.json();
+
+ setTopicPrompts(
+ (data.topicPrompts || []).map(
+ (tp: { topic: string; prompts: string[] }) => ({
+ topic: tp.topic,
+ prompts: tp.prompts,
+ }),
+ ),
+ );
+ setStep(4);
+ } catch (err) {
+ console.error('Prompt generation error:', err);
+ toast.error('Failed to generate prompts from topics');
+ } finally {
+ setLoadingPrompts(false);
+ }
+ };
+
+ // ── Step 4 → Step 5: save prompts + fetch competitors ──
+
+ const handleSavePromptsAndContinue = async () => {
+ if (!createdBrand) return;
+ setIsLoading(true);
+ try {
+ const allPrompts = topicPrompts.flatMap((tp) =>
+ tp.prompts.map((text) => ({
+ text,
+ category: tp.topic,
+ platforms: activeScrapers.map((s) => s.id),
+ models: activeModels.map((m) => m.id),
+ isActive: true,
+ })),
+ );
+
+ if (allPrompts.length === 0) {
+ toast.error('Add at least one prompt before continuing');
+ setIsLoading(false);
+ return;
+ }
+
+ await savePromptSet({
+ brandId: createdBrand.id,
+ name: 'Onboarding Prompts',
+ prompts: allPrompts,
+ });
+
+ setStep(5);
+ fetchCompetitorSuggestions();
+ } catch (err) {
+ toast.error(
+ err instanceof Error ? err.message : 'Failed to save prompts',
+ );
+ } finally {
+ setIsLoading(false);
+ }
+ };
+
+ // ── Competitor suggestion ──
+
+ const fetchCompetitorSuggestions = async () => {
+ setLoadingCompetitors(true);
+ try {
+ const supabase = createClient();
+ const {
+ data: { session },
+ } = await supabase.auth.getSession();
+
+ const res = await fetch(`${AEO_SERVER_URL}/api/competitors/suggest`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: `Bearer ${session?.access_token}`,
+ },
+ body: JSON.stringify({
+ brandName: brandName.trim(),
+ industry: '',
+ description: description.trim(),
+ language,
+ }),
+ });
+
+ if (!res.ok) throw new Error('Failed to suggest competitors');
+ const data = await res.json();
+
+ setSuggestedCompetitors(
+ (data.competitors || []).map((c: { name: string; domain: string }) => ({
+ name: c.name,
+ domain: c.domain,
+ selected: true,
+ })),
+ );
+ } catch (err) {
+ console.error('Competitor suggestion error:', err);
+ toast.error('Failed to generate competitor suggestions');
+ } finally {
+ setLoadingCompetitors(false);
+ }
+ };
+
+ const toggleCompetitor = (index: number) => {
+ setSuggestedCompetitors((prev) =>
+ prev.map((c, i) => (i === index ? { ...c, selected: !c.selected } : c)),
+ );
+ };
+
+ const removeCompetitor = (index: number) => {
+ setSuggestedCompetitors((prev) => prev.filter((_, i) => i !== index));
+ };
+
+ const addManualCompetitor = () => {
+ const name = competitorName.trim();
+ const domain = competitorDomain
+ .trim()
+ .replace(/^https?:\/\//, '')
+ .replace(/\/+$/, '');
+ if (!name) return;
+ setSuggestedCompetitors((prev) => [
+ ...prev,
+ { name, domain, selected: true },
+ ]);
+ setCompetitorName('');
+ setCompetitorDomain('');
+ };
+
+ // ── Step 5: final save ──
+
+ const handleFinish = async () => {
+ if (!createdBrand) return;
+ setSavingCompetitors(true);
+ try {
+ // Save selected competitors
+ const selected = suggestedCompetitors.filter((c) => c.selected);
+ if (selected.length > 0) {
+ await Promise.all(
+ selected.map((c) =>
+ addCompetitor(createdBrand.id, { name: c.name, domain: c.domain }),
+ ),
+ );
+ }
+
+ // Mark onboarding as complete
+ const supabase = createClient();
+ const {
+ data: { user },
+ } = await supabase.auth.getUser();
+ if (user) {
+ await supabase
+ .from('profiles')
+ .update({ onboarding_completed: true })
+ .eq('id', user.id);
+ }
+
+ // Cloud mode → proceed to subscription step (tracking triggered after payment)
+ if (isCloud()) {
+ toast.success('Almost done! Choose a plan to start your free trial.');
+ setSavingCompetitors(false);
+ setStep(6);
+ return;
+ }
+
+ // Self-hosted: trigger tracking immediately
+ try {
+ const { jobId } = await triggerTrackingCheck(createdBrand.id);
+ localStorage.setItem(
+ 'aeo:tracking-job',
+ JSON.stringify({
+ jobId,
+ brandId: createdBrand.id,
+ startedAt: Date.now(),
+ }),
+ );
+ } catch {
+ // Non-critical — tracking will run on schedule
+ }
+
+ toast.success('Setup complete! Your first tracking is starting.');
+
+ // Full page navigation bypasses Next.js router cache, ensuring
+ // the server-side layout reads the fresh onboarding_completed flag.
+ window.location.href = '/dashboard/insights';
+ } catch (err) {
+ toast.error(
+ err instanceof Error ? err.message : 'Failed to save competitors',
+ );
+ setSavingCompetitors(false);
+ }
+ };
+
+ // ── Step 6: Stripe checkout ──
+
+ const handleCheckout = async (planId: PlanId) => {
+ if (!organizationId) return;
+ setCheckoutLoading(planId);
+ try {
+ const res = await fetch('/api/stripe/checkout', {
+ method: 'POST',
+ headers: { 'Content-Type': 'application/json' },
+ body: JSON.stringify({ planId, organizationId }),
+ });
+ const data = await res.json();
+ if (!res.ok) throw new Error(data.error || 'Failed to create checkout session');
+ if (data.url) {
+ window.location.href = data.url;
+ }
+ } catch (err) {
+ toast.error(err instanceof Error ? err.message : 'Checkout failed');
+ setCheckoutLoading(null);
+ }
+ };
+
+ // ── Topic prompt editing helpers ──
+
+ const removeTopic = (index: number) => {
+ setTopicPrompts((prev) => prev.filter((_, i) => i !== index));
+ };
+
+ const addPromptToTopic = (topicIndex: number, prompt: string) => {
+ setTopicPrompts((prev) =>
+ prev.map((tp, i) =>
+ i === topicIndex ? { ...tp, prompts: [...tp.prompts, prompt] } : tp,
+ ),
+ );
+ };
+
+ const removePromptFromTopic = (topicIndex: number, promptIndex: number) => {
+ setTopicPrompts((prev) =>
+ prev.map((tp, i) =>
+ i === topicIndex
+ ? { ...tp, prompts: tp.prompts.filter((_, pi) => pi !== promptIndex) }
+ : tp,
+ ),
+ );
+ };
+
+ const totalPrompts = topicPrompts.reduce(
+ (sum, tp) => sum + tp.prompts.length,
+ 0,
+ );
+
+ // ── Loading state ──
+
+ if (initialLoading) {
+ return (
+ <div className="flex min-h-svh items-center justify-center">
+ <Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
+ </div>
+ );
+ }
+
+ // ── Step 1: Brand Info ──
+
+ if (step === 1) {
+ return (
+ <div className="flex min-h-svh flex-col items-center justify-center gap-6 p-6 md:p-10">
+ <div className="flex w-full max-w-md flex-col gap-6">
+ <div className="flex flex-col items-center gap-2 text-center">
+ <div className="flex h-12 w-12 items-center justify-center rounded-xl bg-primary text-primary-foreground">
+ <Globe className="h-6 w-6" />
+ </div>
+ <h1 className="text-2xl font-bold tracking-tight">
+ Set up your brand
+ </h1>
+ <p className="text-sm text-muted-foreground">
+ See how AI platforms talk about you. Add your first brand to get
+ started.
+ </p>
+ </div>
+
+ <div className="space-y-4">
+ <div className="space-y-2">
+ <Label htmlFor="brandName">Brand name</Label>
+ <Input
+ id="brandName"
+ placeholder="e.g. Acme Corp"
+ value={brandName}
+ onChange={(e) => setBrandName(e.target.value)}
+ autoFocus
+ />
+ </div>
+
+ <div className="space-y-2">
+ <Label htmlFor="website">Website</Label>
+ <div className="flex">
+ <span className="inline-flex items-center rounded-l-md border border-r-0 bg-muted px-3 text-sm text-muted-foreground">
+ https://
+ </span>
+ <Input
+ id="website"
+ placeholder="example.com"
+ value={website}
+ onChange={(e) => setWebsite(e.target.value)}
+ className="rounded-l-none"
+ />
+ </div>
+ </div>
+
+ <div className="space-y-2">
+ <Label htmlFor="description">
+ Describe your brand{' '}
+ <span className="text-muted-foreground">(optional)</span>
+ </Label>
+ <Textarea
+ id="description"
+ placeholder="A brief description helps us generate better suggestions."
+ value={description}
+ onChange={(e) => setDescription(e.target.value)}
+ rows={3}
+ />
+ <ul className="text-xs text-muted-foreground space-y-1 list-disc ml-4">
+ <li>What industry are you in?</li>
+ <li>Who is your target audience?</li>
+ </ul>
+ </div>
+
+ <Button
+ className="w-full"
+ disabled={!brandName.trim() || !website.trim()}
+ onClick={() => setStep(2)}
+ >
+ Continue
+ </Button>
+ </div>
+ </div>
+
+ <StepDots current={1} total={totalSteps} />
+ </div>
+ );
+ }
+
+ // ── Step 2: Region & Language ──
+
+ if (step === 2) {
+ return (
+ <div className="flex min-h-svh flex-col items-center justify-center gap-6 p-6 md:p-10">
+ <div className="flex w-full max-w-md flex-col gap-6">
+ <BrandHeader name={brandName} domain={domain} />
+
+ <div>
+ <h1 className="text-2xl font-bold tracking-tight">
+ Select your target market
+ </h1>
+ <p className="text-sm text-muted-foreground mt-1">
+ Pick the region and language your audience uses. This helps us
+ deliver more accurate AI visibility data.
+ </p>
+ </div>
+
+ <div className="space-y-4">
+ <div className="space-y-2">
+ <Label>Region</Label>
+ <Select value={region} onValueChange={(v) => v && setRegion(v)}>
+ <SelectTrigger>
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ {REGIONS.map((r) => (
+ <SelectItem key={r.code} value={r.code}>
+ {r.label}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+
+ <div className="space-y-2">
+ <Label>Language</Label>
+ <Select
+ value={language}
+ onValueChange={(v) => v && setLanguage(v)}
+ >
+ <SelectTrigger>
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ {LANGUAGES.map((l) => (
+ <SelectItem key={l.code} value={l.code}>
+ {l.label}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+
+ <Button
+ className="w-full"
+ onClick={handleCreateOrgAndBrand}
+ disabled={isLoading}
+ >
+ {isLoading ? (
+ <>
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ Setting up...
+ </>
+ ) : (
+ 'Continue'
+ )}
+ </Button>
+ </div>
+ </div>
+
+ <div className="flex w-full max-w-md items-center justify-between">
+ <button
+ onClick={() => setStep(1)}
+ className="flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground"
+ >
+ <ArrowLeft className="h-3.5 w-3.5" />
+ Back
+ </button>
+ <StepDots current={2} total={totalSteps} />
+ <div className="w-12" />
+ </div>
+ </div>
+ );
+ }
+
+ // ── Step 3: Topic Selection ──
+
+ if (step === 3) {
+ return (
+ <div className="flex min-h-svh flex-col p-6 md:p-10">
+ <div className="mx-auto w-full max-w-4xl flex-1">
+ <BrandHeader name={brandName} domain={domain} />
+
+ <div className="grid grid-cols-1 gap-10 lg:grid-cols-5">
+ <div className="lg:col-span-3 space-y-6">
+ <div>
+ <h1 className="text-2xl font-bold tracking-tight">
+ Choose topics to monitor
+ </h1>
+ <div className="flex items-center gap-2 mt-3">
+ <span className="text-sm text-muted-foreground">
+ Select up to 10 topics
+ </span>
+ <div className="flex-1 h-1.5 rounded-full bg-muted overflow-hidden">
+ <div
+ className="h-full bg-primary rounded-full transition-all"
+ style={{
+ width: `${(selectedTopics.size / 10) * 100}%`,
+ }}
+ />
+ </div>
+ </div>
+ </div>
+
+ {loadingTopics ? (
+ <div className="flex flex-col items-center gap-3 py-12 text-muted-foreground">
+ <Sparkles className="h-5 w-5 animate-pulse" />
+ <span
+ key={topicLoadingMsg}
+ className="text-sm animate-in fade-in duration-500"
+ >
+ {topicLoadingMsg}
+ </span>
+ </div>
+ ) : (
+ <div className="space-y-2">
+ {suggestedTopics.map((topic) => {
+ const isSelected = selectedTopics.has(topic);
+ return (
+ <button
+ key={topic}
+ onClick={() => toggleTopic(topic)}
+ className={cn(
+ 'flex items-center gap-3 w-full rounded-lg border px-4 py-3 text-left text-sm transition-colors',
+ isSelected
+ ? 'border-primary bg-primary/5'
+ : 'border-border hover:border-muted-foreground/30',
+ )}
+ >
+ <div
+ className={cn(
+ 'flex h-5 w-5 shrink-0 items-center justify-center rounded border',
+ isSelected
+ ? 'border-primary bg-primary text-primary-foreground'
+ : 'border-muted-foreground/30',
+ )}
+ >
+ {isSelected && <Check className="h-3 w-3" />}
+ </div>
+ {topic}
+ </button>
+ );
+ })}
+
+ <div className="flex items-center gap-2 pt-2">
+ <Input
+ placeholder="Add custom topic..."
+ value={customTopic}
+ onChange={(e) => setCustomTopic(e.target.value)}
+ onKeyDown={(e) => e.key === 'Enter' && addCustomTopic()}
+ className="text-sm"
+ />
+ <Button
+ size="sm"
+ variant="outline"
+ onClick={addCustomTopic}
+ disabled={!customTopic.trim()}
+ >
+ <Plus className="h-4 w-4" />
+ </Button>
+ </div>
+ </div>
+ )}
+
+ <Button
+ className="w-full"
+ disabled={
+ selectedTopics.size === 0 || loadingPrompts || loadingTopics
+ }
+ onClick={handleGeneratePrompts}
+ >
+ {loadingPrompts ? (
+ <>
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ Generating prompts...
+ </>
+ ) : (
+ 'Looks good'
+ )}
+ </Button>
+ </div>
+
+ <div className="lg:col-span-2">
+ <div className="rounded-xl border bg-card p-5 sticky top-10">
+ <h3 className="text-sm font-semibold mb-4">
+ Topic Selection Tips
+ </h3>
+ <div className="space-y-4">
+ <div className="flex gap-3">
+ <Check className="h-4 w-4 text-foreground shrink-0 mt-0.5" />
+ <div>
+ <p className="text-sm font-medium">
+ 5 prompts are created per topic
+ </p>
+ <p className="text-xs text-muted-foreground mt-0.5">
+ You can select up to 10 topics for a total of 50
+ prompts. More can be added anytime from the dashboard.
+ </p>
+ </div>
+ </div>
+ <div className="flex gap-3">
+ <Check className="h-4 w-4 text-foreground shrink-0 mt-0.5" />
+ <div>
+ <p className="text-sm font-medium">
+ Think like your customers
+ </p>
+ <p className="text-xs text-muted-foreground mt-0.5">
+ Use terms your audience would search for when looking
+ for products or services like yours.
+ </p>
+ </div>
+ </div>
+ <div className="flex gap-3">
+ <Check className="h-4 w-4 text-foreground shrink-0 mt-0.5" />
+ <div>
+ <p className="text-sm font-medium">Keep it short</p>
+ <p className="text-xs text-muted-foreground mt-0.5">
+ Topics should be concise — we&apos;ll turn them into
+ detailed prompts in the next step.
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div className="flex mx-auto w-full max-w-4xl items-center justify-between mt-8">
+ <button
+ onClick={() => setStep(2)}
+ className="flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground"
+ >
+ <ArrowLeft className="h-3.5 w-3.5" />
+ Back
+ </button>
+ <StepDots current={3} total={totalSteps} />
+ <div className="w-12" />
+ </div>
+ </div>
+ );
+ }
+
+ // ── Step 4: Prompt Review ──
+
+ if (step === 4) {
+ return (
+ <div className="flex min-h-svh flex-col p-6 md:p-10">
+ <div className="mx-auto w-full max-w-4xl flex-1">
+ <BrandHeader name={brandName} domain={domain} />
+
+ <div className="flex items-start justify-between mb-6">
+ <div>
+ <h1 className="text-2xl font-bold tracking-tight">
+ Review your prompts
+ </h1>
+ <p className="text-sm text-muted-foreground mt-1">
+ These prompts will be sent to AI platforms daily. Feel free to
+ edit, add, or remove any before starting.
+ </p>
+ </div>
+ <Button
+ onClick={handleSavePromptsAndContinue}
+ disabled={isLoading || totalPrompts === 0}
+ >
+ {isLoading ? (
+ <>
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ Saving prompts...
+ </>
+ ) : (
+ 'Continue'
+ )}
+ </Button>
+ </div>
+
+ <div className="mb-4">
+ <p className="text-sm font-medium">Your Prompt List</p>
+ <p className="text-xs text-muted-foreground">
+ {totalPrompts} prompts total
+ </p>
+ </div>
+
+ <div className="rounded-lg border">
+ <div className="flex items-center gap-4 px-4 py-2.5 border-b bg-muted/50 text-xs font-medium text-muted-foreground">
+ <span className="flex-1">Topic</span>
+ </div>
+ {topicPrompts.map((tp, idx) => (
+ <TopicAccordion
+ key={`${tp.topic}-${idx}`}
+ data={tp}
+ defaultOpen={idx === 0}
+ onRemoveTopic={() => removeTopic(idx)}
+ onAddPrompt={(p) => addPromptToTopic(idx, p)}
+ onRemovePrompt={(pi) => removePromptFromTopic(idx, pi)}
+ />
+ ))}
+ {topicPrompts.length === 0 && (
+ <div className="py-8 text-center text-sm text-muted-foreground">
+ No prompts generated yet.
+ </div>
+ )}
+ </div>
+ </div>
+
+ <div className="flex mx-auto w-full max-w-4xl items-center justify-between mt-8">
+ <button
+ onClick={() => setStep(3)}
+ className="flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground"
+ >
+ <ArrowLeft className="h-3.5 w-3.5" />
+ Back
+ </button>
+ <StepDots current={4} total={totalSteps} />
+ <div className="w-12" />
+ </div>
+ </div>
+ );
+ }
+
+ // ── Step 5: Competitors ──
+
+ if (step === 5) {
+ const selectedCompetitorCount = suggestedCompetitors.filter(
+ (c) => c.selected,
+ ).length;
+
+ return (
+ <div className="flex min-h-svh flex-col p-6 md:p-10">
+ <div className="mx-auto w-full max-w-lg flex-1">
+ <BrandHeader name={brandName} domain={domain} />
+
+ <div className="mb-6">
+ <h1 className="text-2xl font-bold tracking-tight">
+ Add your competitors
+ </h1>
+ <p className="text-sm text-muted-foreground mt-1">
+ We&apos;ll track how often competitors appear alongside your brand
+ in AI responses.
+ </p>
+ </div>
+
+ {loadingCompetitors ? (
+ <div className="flex flex-col items-center gap-3 py-16 text-muted-foreground">
+ <Sparkles className="h-5 w-5 animate-pulse" />
+ <span
+ key={competitorLoadingMsg}
+ className="text-sm animate-in fade-in duration-500"
+ >
+ {competitorLoadingMsg}
+ </span>
+ </div>
+ ) : (
+ <div className="space-y-4">
+ {suggestedCompetitors.length > 0 && (
+ <div className="space-y-2">
+ <p className="text-xs font-medium text-muted-foreground uppercase tracking-wider">
+ Suggested competitors
+ </p>
+ {suggestedCompetitors.map((c, idx) => (
+ <div
+ key={`${c.domain}-${idx}`}
+ className={cn(
+ 'flex items-center gap-3 rounded-lg border px-4 py-3 cursor-pointer transition-colors',
+ c.selected
+ ? 'border-primary/50 bg-primary/5'
+ : 'border-border hover:bg-muted/50',
+ )}
+ onClick={() => toggleCompetitor(idx)}
+ >
+ <div
+ className={cn(
+ 'flex h-5 w-5 shrink-0 items-center justify-center rounded border transition-colors',
+ c.selected
+ ? 'bg-primary border-primary text-primary-foreground'
+ : 'border-muted-foreground/30',
+ )}
+ >
+ {c.selected && <Check className="h-3 w-3" />}
+ </div>
+ {c.domain && (
+ /* eslint-disable-next-line @next/next/no-img-element */
+ <img
+ src={getFaviconUrl(c.domain)}
+ alt=""
+ className="h-5 w-5 rounded-sm"
+ onError={(e) => {
+ (e.target as HTMLImageElement).style.display = 'none';
+ }}
+ />
+ )}
+ <div className="flex-1 min-w-0">
+ <p className="text-sm font-medium truncate">{c.name}</p>
+ {c.domain && (
+ <p className="text-xs text-muted-foreground truncate">
+ {c.domain}
+ </p>
+ )}
+ </div>
+ <button
+ onClick={(e) => {
+ e.stopPropagation();
+ removeCompetitor(idx);
+ }}
+ className="p-1 rounded hover:bg-muted text-muted-foreground hover:text-destructive"
+ >
+ <X className="h-3.5 w-3.5" />
+ </button>
+ </div>
+ ))}
+ </div>
+ )}
+
+ <div className="space-y-2">
+ <p className="text-xs font-medium text-muted-foreground uppercase tracking-wider">
+ Add manually
+ </p>
+ <div className="flex items-center gap-2">
+ <Input
+ placeholder="Company name"
+ value={competitorName}
+ onChange={(e) => setCompetitorName(e.target.value)}
+ className="text-sm"
+ />
+ <Input
+ placeholder="domain.com"
+ value={competitorDomain}
+ onChange={(e) => setCompetitorDomain(e.target.value)}
+ onKeyDown={(e) => e.key === 'Enter' && addManualCompetitor()}
+ className="text-sm"
+ />
+ <Button
+ size="sm"
+ variant="outline"
+ onClick={addManualCompetitor}
+ disabled={!competitorName.trim()}
+ >
+ <Plus className="h-4 w-4" />
+ </Button>
+ </div>
+ </div>
+
+ <Button
+ className="w-full"
+ onClick={handleFinish}
+ disabled={savingCompetitors}
+ >
+ {savingCompetitors ? (
+ <>
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ Finishing setup...
+ </>
+ ) : selectedCompetitorCount > 0 ? (
+ `Start tracking with ${selectedCompetitorCount} competitor${selectedCompetitorCount !== 1 ? 's' : ''}`
+ ) : (
+ 'Skip & start tracking'
+ )}
+ </Button>
+ </div>
+ )}
+ </div>
+
+ <div className="flex mx-auto w-full max-w-lg items-center justify-between mt-8">
+ <button
+ onClick={() => setStep(4)}
+ className="flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground"
+ >
+ <ArrowLeft className="h-3.5 w-3.5" />
+ Back
+ </button>
+ <StepDots current={5} total={totalSteps} />
+ <div className="w-12" />
+ </div>
+ </div>
+ );
+ }
+
+ // ── Step 6: Choose Plan (cloud only) ──
+
+ if (step !== 6) return null;
+
+ return (
+ <div className="flex min-h-svh flex-col p-6 md:p-10">
+ <div className="mx-auto w-full max-w-2xl flex-1">
+ <div className="mb-8 text-center">
+ <h1 className="text-2xl font-bold tracking-tight">
+ Choose your plan
+ </h1>
+ <p className="text-sm text-muted-foreground mt-1">
+ Start with a 7-day free trial. Cancel anytime.
+ </p>
+ </div>
+
+ {/* Plan cards */}
+ <div className="grid gap-6 sm:grid-cols-2">
+ {SUBSCRIBABLE_PLANS.map((planId) => {
+ const plan = PLANS[planId];
+ const price = plan.pricing;
+ if (!price) return null;
+
+ const loading = checkoutLoading === planId;
+
+ return (
+ <div
+ key={planId}
+ className={cn(
+ 'relative flex flex-col rounded-2xl border bg-card p-6 shadow-sm transition-shadow hover:shadow-md',
+ plan.highlighted &&
+ 'border-primary shadow-md ring-1 ring-primary/20',
+ )}
+ >
+ {plan.highlighted && (
+ <Badge className="absolute -top-3 left-1/2 -translate-x-1/2">
+ Most Popular
+ </Badge>
+ )}
+
+ <div className="mb-4">
+ <h3 className="text-lg font-semibold">{plan.name}</h3>
+ <p className="mt-1 text-sm text-muted-foreground">
+ {plan.tagline}
+ </p>
+ </div>
+
+ <div className="flex items-end gap-1 mb-4">
+ <span className="text-4xl font-bold tracking-tight">
+ ${price.monthly}
+ </span>
+ <span className="mb-1 text-sm text-muted-foreground">
+ /month
+ </span>
+ </div>
+
+ <Button
+ className="w-full"
+ variant={plan.highlighted ? 'default' : 'outline'}
+ onClick={() => handleCheckout(planId)}
+ disabled={checkoutLoading !== null}
+ >
+ {loading ? (
+ <>
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ Redirecting...
+ </>
+ ) : (
+ 'Start Free Trial'
+ )}
+ </Button>
+
+ <Separator className="my-5" />
+
+ <div className="flex-1 space-y-2.5 text-sm">
+ <PlanFeatureItem>
+ <strong>
+ {plan.limits.maxBrands === -1
+ ? 'Unlimited'
+ : plan.limits.maxBrands}
+ </strong>{' '}
+ {plan.limits.maxBrands === 1 ? 'brand' : 'brands'}
+ </PlanFeatureItem>
+ <PlanFeatureItem>
+ <strong>
+ {plan.limits.maxPrompts === -1
+ ? 'Unlimited'
+ : plan.limits.maxPrompts}
+ </strong>{' '}
+ prompts tracked
+ </PlanFeatureItem>
+ <PlanFeatureItem>
+ <strong>{plan.limits.maxPlatforms}</strong> answer engines
+ {plan.limits.allowedScrapers && plan.limits.allowedScrapers.length > 0 && (
+ <span className="text-muted-foreground font-normal">
+ {' '}({plan.limits.allowedScrapers.map((id) => {
+ const s = ALL_SCRAPERS.find((s) => s.id === id);
+ return s ? s.label.replace(/\s*\(Web\)/i, '') : id;
+ }).join(' & ')})
+ </span>
+ )}
+ </PlanFeatureItem>
+ {plan.limits.maxTeamMembers > 1 && (
+ <PlanFeatureItem>
+ <strong>{plan.limits.maxTeamMembers}</strong> team members
+ </PlanFeatureItem>
+ )}
+ <PlanFeatureItem>
+ {plan.limits.features.includes('daily_monitoring')
+ ? 'Daily monitoring'
+ : 'Weekly monitoring'}
+ </PlanFeatureItem>
+ {plan.limits.features.includes('competitor_tracking') && (
+ <PlanFeatureItem>Competitor tracking</PlanFeatureItem>
+ )}
+ {plan.limits.features.includes('content_optimization') && (
+ <PlanFeatureItem>Content optimization</PlanFeatureItem>
+ )}
+ {plan.limits.features.includes('advanced_analytics') && (
+ <PlanFeatureItem>Advanced analytics</PlanFeatureItem>
+ )}
+ <PlanFeatureItem>Email support</PlanFeatureItem>
+ </div>
+ </div>
+ );
+ })}
+ </div>
+
+ <p className="mt-6 text-center text-xs text-muted-foreground">
+ Need more?{' '}
+ <a
+ href="mailto:[email protected]"
+ className="underline hover:text-foreground"
+ >
+ Contact sales
+ </a>{' '}
+ for Enterprise pricing.
+ </p>
+ </div>
+
+ <div className="flex mx-auto w-full max-w-2xl items-center justify-between mt-8">
+ <button
+ onClick={() => setStep(5)}
+ className="flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground"
+ >
+ <ArrowLeft className="h-3.5 w-3.5" />
+ Back
+ </button>
+ <StepDots current={6} total={totalSteps} />
+ <div className="w-12" />
+ </div>
+ </div>
+ );
+}
+
+function PlanFeatureItem({ children }: { children: React.ReactNode }) {
+ return (
+ <div className="flex items-start gap-2">
+ <Check className="mt-0.5 h-4 w-4 shrink-0 text-primary" />
+ <span>{children}</span>
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/(onboarding)/layout.tsx b/web/src/app/[locale]/(onboarding)/layout.tsx
new file mode 100644
index 000000000..e31a624b4
--- /dev/null
+++ b/web/src/app/[locale]/(onboarding)/layout.tsx
@@ -0,0 +1,25 @@
+import { redirect } from "next/navigation";
+import { createClient } from "@/lib/supabase/server";
+import { AuthProvider } from "@/components/providers/auth-provider";
+
+export default async function OnboardingLayout({
+ children,
+}: {
+ children: React.ReactNode;
+}) {
+ const supabase = await createClient();
+ const {
+ data: { user },
+ } = await supabase.auth.getUser();
+
+ if (!user) {
+ redirect("/sign-in");
+ }
+
+ return (
+ <>
+ <AuthProvider user={user} />
+ {children}
+ </>
+ );
+}
diff --git a/web/src/app/[locale]/invite/[token]/page.tsx b/web/src/app/[locale]/invite/[token]/page.tsx
new file mode 100644
index 000000000..651f0b3e6
--- /dev/null
+++ b/web/src/app/[locale]/invite/[token]/page.tsx
@@ -0,0 +1,98 @@
+import { redirect } from "@/i18n/navigation";
+import { getInvitationByToken } from "@/lib/actions/team";
+import { createClient } from "@/lib/supabase/server";
+import { AcceptInvitationCard } from "@/components/team/accept-invitation-card";
+import { AlertTriangle } from "lucide-react";
+
+export default async function InviteAcceptPage({
+ params,
+}: {
+ params: Promise<{ token: string; locale: string }>;
+}) {
+ const { token, locale } = await params;
+
+ const invitation = await getInvitationByToken(token);
+
+ if (!invitation) {
+ return <InvalidInvitation reason="not_found" />;
+ }
+
+ if (invitation.status !== "pending") {
+ return <InvalidInvitation reason={invitation.status} />;
+ }
+
+ if (new Date(invitation.expiresAt).getTime() < Date.now()) {
+ return <InvalidInvitation reason="expired" />;
+ }
+
+ const supabase = await createClient();
+ const {
+ data: { user },
+ } = await supabase.auth.getUser();
+
+ if (!user) {
+ const next = `/${locale}/invite/${token}`;
+ redirect({
+ href: `/sign-up?invite=${token}&email=${encodeURIComponent(invitation.email)}&next=${encodeURIComponent(next)}`,
+ locale,
+ });
+ }
+
+ const emailMatches =
+ user!.email?.toLowerCase() === invitation.email.toLowerCase();
+
+ return (
+ <div className="flex min-h-svh flex-col items-center justify-center gap-6 p-6 md:p-10">
+ <div className="flex w-full max-w-md flex-col gap-6">
+ <AcceptInvitationCard
+ token={token}
+ organizationName={invitation.organizationName ?? "this team"}
+ email={invitation.email}
+ role={invitation.role}
+ currentUserEmail={user!.email ?? ""}
+ emailMatches={emailMatches}
+ />
+ </div>
+ </div>
+ );
+}
+
+function InvalidInvitation({
+ reason,
+}: {
+ reason: "not_found" | "expired" | "accepted" | "revoked" | "pending";
+}) {
+ const messages: Record<string, { title: string; description: string }> = {
+ not_found: {
+ title: "Invitation not found",
+ description: "The link you followed is invalid.",
+ },
+ expired: {
+ title: "Invitation expired",
+ description: "Ask your team admin to send a new invitation.",
+ },
+ accepted: {
+ title: "Invitation already used",
+ description: "This invitation has already been accepted.",
+ },
+ revoked: {
+ title: "Invitation revoked",
+ description: "This invitation was revoked by the team admin.",
+ },
+ pending: {
+ title: "Invitation unavailable",
+ description: "Please try again or contact your team admin.",
+ },
+ };
+ const msg = messages[reason] ?? messages.pending;
+
+ return (
+ <div className="flex min-h-svh flex-col items-center justify-center gap-6 p-6 md:p-10">
+ <div className="flex w-full max-w-md flex-col gap-4 rounded-xl border bg-card p-6 text-center shadow-sm">
+ <AlertTriangle className="mx-auto h-10 w-10 text-destructive" />
+ <h1 className="text-xl font-semibold">{msg.title}</h1>
+ <p className="text-sm text-muted-foreground">{msg.description}</p>
+ </div>
+ </div>
+ );
+}
diff --git a/web/src/app/[locale]/layout.tsx b/web/src/app/[locale]/layout.tsx
new file mode 100644
index 000000000..afd9800c4
--- /dev/null
+++ b/web/src/app/[locale]/layout.tsx
@@ -0,0 +1,36 @@
+import { NextIntlClientProvider, hasLocale } from "next-intl";
+import { getMessages } from "next-intl/server";
+import { notFound } from "next/navigation";
+import { ThemeProvider } from "next-themes";
+import { routing } from "@/i18n/routing";
+import { Toaster } from "@/components/ui/sonner";
+
+export default async function LocaleLayout({
+ children,
+ params,
+}: {
+ children: React.ReactNode;
+ params: Promise<{ locale: string }>;
+}) {
+ const { locale } = await params;
+
+ if (!hasLocale(routing.locales, locale)) {
+ notFound();
+ }
+
+ const messages = await getMessages();
+
+ return (
+ <ThemeProvider
+ attribute="class"
+ defaultTheme="dark"
+ enableSystem
+ disableTransitionOnChange
+ >
+ <NextIntlClientProvider messages={messages} locale={locale}>
+ {children}
+ <Toaster richColors position="top-right" />
+ </NextIntlClientProvider>
+ </ThemeProvider>
+ );
+}
diff --git a/web/src/app/api/cron/daily-tracking/route.ts b/web/src/app/api/cron/daily-tracking/route.ts
new file mode 100644
index 000000000..084bb540e
--- /dev/null
+++ b/web/src/app/api/cron/daily-tracking/route.ts
@@ -0,0 +1,39 @@
+import { NextResponse } from 'next/server';
+
+const AEO_SERVER_URL =
+ process.env.NEXT_PUBLIC_API_URL || 'http://localhost:80';
+
+export async function GET(request: Request) {
+ const cronSecret = process.env.CRON_SECRET;
+
+ const authHeader = request.headers.get('authorization');
+ const vercelHeader = request.headers.get('x-vercel-cron-auth');
+
+ const token = vercelHeader ?? authHeader?.replace('Bearer ', '');
+
+ if (!cronSecret || token !== cronSecret) {
+ return NextResponse.json(
+ { success: false, message: 'Unauthorized' },
+ { status: 401 },
+ );
+ }
+
+ try {
+ const res = await fetch(`${AEO_SERVER_URL}/api/internal/daily-tracking`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: `Bearer ${cronSecret}`,
+ },
+ });
+
+ const data = await res.json();
+ return NextResponse.json(data);
+ } catch (err) {
+ console.error('[cron] daily-tracking failed:', err);
+ return NextResponse.json(
+ { success: false, message: 'Internal error' },
+ { status: 500 },
+ );
+ }
+}
diff --git a/web/src/app/api/stripe/checkout/route.ts b/web/src/app/api/stripe/checkout/route.ts
new file mode 100644
index 000000000..1d27e0675
--- /dev/null
+++ b/web/src/app/api/stripe/checkout/route.ts
@@ -0,0 +1,94 @@
+import { NextRequest, NextResponse } from 'next/server';
+import { createClient } from '@/lib/supabase/server';
+import { stripe, PRICE_IDS } from '@/lib/stripe';
+
+export async function POST(req: NextRequest) {
+ try {
+ const supabase = await createClient();
+ const {
+ data: { user },
+ } = await supabase.auth.getUser();
+
+ if (!user) {
+ return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
+ }
+
+ const body = await req.json();
+ const { planId, organizationId } = body as {
+ planId: 'starter' | 'growth';
+ organizationId: string;
+ };
+
+ if (!planId || !organizationId) {
+ return NextResponse.json(
+ { error: 'Missing required fields' },
+ { status: 400 },
+ );
+ }
+
+ const priceId = PRICE_IDS[planId]?.monthly;
+ if (!priceId) {
+ console.error(
+ '[stripe/checkout] Missing price ID for plan:',
+ planId,
+ 'PRICE_IDS:',
+ PRICE_IDS,
+ );
+ return NextResponse.json(
+ { error: 'Price not configured for this plan' },
+ { status: 400 },
+ );
+ }
+
+ // Fetch org to check for existing Stripe customer
+ const { data: org } = await supabase
+ .from('organizations')
+ .select('stripe_customer_id')
+ .eq('id', organizationId)
+ .single();
+
+ let customerId = org?.stripe_customer_id as string | null;
+
+ // Create Stripe customer if none exists
+ if (!customerId) {
+ const customer = await stripe.customers.create({
+ email: user.email,
+ metadata: {
+ organization_id: organizationId,
+ supabase_user_id: user.id,
+ },
+ });
+ customerId = customer.id;
+
+ await supabase
+ .from('organizations')
+ .update({ stripe_customer_id: customerId })
+ .eq('id', organizationId);
+ }
+
+ const appUrl = process.env.NEXT_PUBLIC_APP_URL || 'http://localhost:3000';
+
+ console.log('appUrl', appUrl);
+
+ const session = await stripe.checkout.sessions.create({
+ mode: 'subscription',
+ customer: customerId,
+ line_items: [{ price: priceId, quantity: 1 }],
+ subscription_data: {
+ trial_period_days: 7,
+ metadata: { organization_id: organizationId, plan_id: planId },
+ },
+ success_url: `${appUrl}/api/stripe/success?session_id={CHECKOUT_SESSION_ID}`,
+ cancel_url: `${appUrl}/dashboard/onboarding`,
+ allow_promotion_codes: true,
+ });
+
+ return NextResponse.json({ url: session.url });
+ } catch (err) {
+ console.error('[stripe/checkout]', err);
+ return NextResponse.json(
+ { error: err instanceof Error ? err.message : 'Internal error' },
+ { status: 500 },
+ );
+ }
+}
diff --git a/web/src/app/api/stripe/invoices/route.ts b/web/src/app/api/stripe/invoices/route.ts
new file mode 100644
index 000000000..7a322ff55
--- /dev/null
+++ b/web/src/app/api/stripe/invoices/route.ts
@@ -0,0 +1,59 @@
+import { NextResponse } from 'next/server';
+import { createClient } from '@/lib/supabase/server';
+import { stripe } from '@/lib/stripe';
+
+export async function GET() {
+ try {
+ const supabase = await createClient();
+ const {
+ data: { user },
+ } = await supabase.auth.getUser();
+
+ if (!user) {
+ return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
+ }
+
+ const { data: profile } = await supabase
+ .from('profiles')
+ .select('organization_id')
+ .eq('id', user.id)
+ .single();
+
+ if (!profile?.organization_id) {
+ return NextResponse.json({ error: 'No organization' }, { status: 400 });
+ }
+
+ const { data: org } = await supabase
+ .from('organizations')
+ .select('stripe_customer_id')
+ .eq('id', profile.organization_id)
+ .single();
+
+ if (!org?.stripe_customer_id) {
+ return NextResponse.json([]);
+ }
+
+ const invoices = await stripe.invoices.list({
+ customer: org.stripe_customer_id as string,
+ limit: 24,
+ });
+
+ const result = invoices.data.map((inv) => ({
+ id: inv.id,
+ number: inv.number,
+ date: inv.created ? new Date(inv.created * 1000).toISOString() : null,
+ amount: inv.amount_paid != null ? inv.amount_paid / 100 : 0,
+ currency: inv.currency ?? 'usd',
+ status: inv.status,
+ pdfUrl: inv.invoice_pdf,
+ }));
+
+ return NextResponse.json(result);
+ } catch (err) {
+ console.error('[stripe/invoices] GET error:', err);
+ return NextResponse.json(
+ { error: err instanceof Error ? err.message : 'Internal error' },
+ { status: 500 },
+ );
+ }
+}
diff --git a/web/src/app/api/stripe/subscription/route.ts b/web/src/app/api/stripe/subscription/route.ts
new file mode 100644
index 000000000..f980ec908
--- /dev/null
+++ b/web/src/app/api/stripe/subscription/route.ts
@@ -0,0 +1,196 @@
+import { NextRequest, NextResponse } from 'next/server';
+import { createClient } from '@/lib/supabase/server';
+import { stripe, PRICE_IDS } from '@/lib/stripe';
+import { SUBSCRIBABLE_PLANS } from '@/config/plans';
+
+type SubscriptionRaw = {
+ id: string;
+ status: string;
+ current_period_end: number;
+ cancel_at_period_end: boolean;
+ metadata: Record<string, string>;
+ items: { data: Array<{ id: string; price: { unit_amount: number | null; recurring: { interval: string } | null } }> };
+};
+
+async function getOrgStripeIds() {
+ const supabase = await createClient();
+ const {
+ data: { user },
+ } = await supabase.auth.getUser();
+
+ if (!user) return null;
+
+ const { data: profile } = await supabase
+ .from('profiles')
+ .select('organization_id')
+ .eq('id', user.id)
+ .single();
+
+ if (!profile?.organization_id) return null;
+
+ const { data: org } = await supabase
+ .from('organizations')
+ .select('id, plan, subscription_status, stripe_customer_id, stripe_subscription_id, subscription_ends_at')
+ .eq('id', profile.organization_id)
+ .single();
+
+ return org;
+}
+
+/** GET — current subscription details */
+export async function GET() {
+ try {
+ const org = await getOrgStripeIds();
+ if (!org) {
+ return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
+ }
+
+ if (!org.stripe_subscription_id) {
+ return NextResponse.json({
+ planId: org.plan ?? 'starter',
+ status: org.subscription_status ?? 'inactive',
+ currentPeriodEnd: org.subscription_ends_at,
+ cancelAtPeriodEnd: false,
+ priceAmount: null,
+ interval: null,
+ });
+ }
+
+ const sub = await stripe.subscriptions.retrieve(
+ org.stripe_subscription_id as string,
+ ) as unknown as SubscriptionRaw;
+
+ const item = sub.items.data[0];
+ const price = item?.price;
+
+ return NextResponse.json({
+ planId: org.plan ?? 'starter',
+ status: sub.status,
+ currentPeriodEnd: new Date(sub.current_period_end * 1000).toISOString(),
+ cancelAtPeriodEnd: sub.cancel_at_period_end,
+ priceAmount: price?.unit_amount ? price.unit_amount / 100 : null,
+ interval: price?.recurring?.interval ?? null,
+ });
+ } catch (err) {
+ console.error('[stripe/subscription] GET error:', err);
+ return NextResponse.json(
+ { error: err instanceof Error ? err.message : 'Internal error' },
+ { status: 500 },
+ );
+ }
+}
+
+/** PATCH — change plan (upgrade/downgrade) or reactivate */
+export async function PATCH(req: NextRequest) {
+ try {
+ const org = await getOrgStripeIds();
+ if (!org) {
+ return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
+ }
+
+ if (!org.stripe_subscription_id) {
+ return NextResponse.json({ error: 'No active subscription' }, { status: 400 });
+ }
+
+ const body = await req.json();
+ const { newPlanId, reactivate } = body as {
+ newPlanId?: 'starter' | 'growth';
+ reactivate?: boolean;
+ };
+
+ const subscriptionId = org.stripe_subscription_id as string;
+
+ // Reactivate a canceled-at-period-end subscription
+ if (reactivate) {
+ const updated = await stripe.subscriptions.update(subscriptionId, {
+ cancel_at_period_end: false,
+ }) as unknown as SubscriptionRaw;
+ return NextResponse.json({
+ status: updated.status,
+ cancelAtPeriodEnd: false,
+ currentPeriodEnd: new Date(updated.current_period_end * 1000).toISOString(),
+ });
+ }
+
+ // Plan change
+ if (!newPlanId || !SUBSCRIBABLE_PLANS.includes(newPlanId)) {
+ return NextResponse.json({ error: 'Invalid plan' }, { status: 400 });
+ }
+
+ if (newPlanId === org.plan) {
+ return NextResponse.json({ error: 'Already on this plan' }, { status: 400 });
+ }
+
+ const priceId = PRICE_IDS[newPlanId]?.monthly;
+ if (!priceId) {
+ return NextResponse.json({ error: 'Price not configured' }, { status: 400 });
+ }
+
+ const currentSub = await stripe.subscriptions.retrieve(subscriptionId) as unknown as SubscriptionRaw;
+ const itemId = currentSub.items.data[0]?.id;
+
+ if (!itemId) {
+ return NextResponse.json({ error: 'Subscription item not found' }, { status: 400 });
+ }
+
+ const updated = await stripe.subscriptions.update(subscriptionId, {
+ items: [{ id: itemId, price: priceId }],
+ metadata: { plan_id: newPlanId, organization_id: org.id },
+ proration_behavior: 'create_prorations',
+ }) as unknown as SubscriptionRaw;
+
+ // Optimistic DB update
+ const supabase = await createClient();
+ await supabase
+ .from('organizations')
+ .update({ plan: newPlanId })
+ .eq('id', org.id);
+
+ const newPrice = updated.items.data[0]?.price;
+
+ return NextResponse.json({
+ planId: newPlanId,
+ status: updated.status,
+ currentPeriodEnd: new Date(updated.current_period_end * 1000).toISOString(),
+ cancelAtPeriodEnd: updated.cancel_at_period_end,
+ priceAmount: newPrice?.unit_amount ? newPrice.unit_amount / 100 : null,
+ interval: newPrice?.recurring?.interval ?? null,
+ });
+ } catch (err) {
+ console.error('[stripe/subscription] PATCH error:', err);
+ return NextResponse.json(
+ { error: err instanceof Error ? err.message : 'Internal error' },
+ { status: 500 },
+ );
+ }
+}
+
+/** DELETE — cancel subscription at period end */
+export async function DELETE() {
+ try {
+ const org = await getOrgStripeIds();
+ if (!org) {
+ return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
+ }
+
+ if (!org.stripe_subscription_id) {
+ return NextResponse.json({ error: 'No active subscription' }, { status: 400 });
+ }
+
+ const updated = await stripe.subscriptions.update(
+ org.stripe_subscription_id as string,
+ { cancel_at_period_end: true },
+ ) as unknown as SubscriptionRaw;
+
+ return NextResponse.json({
+ cancelAtPeriodEnd: true,
+ currentPeriodEnd: new Date(updated.current_period_end * 1000).toISOString(),
+ });
+ } catch (err) {
+ console.error('[stripe/subscription] DELETE error:', err);
+ return NextResponse.json(
+ { error: err instanceof Error ? err.message : 'Internal error' },
+ { status: 500 },
+ );
+ }
+}
diff --git a/web/src/app/api/stripe/success/route.ts b/web/src/app/api/stripe/success/route.ts
new file mode 100644
index 000000000..89d5a033b
--- /dev/null
+++ b/web/src/app/api/stripe/success/route.ts
@@ -0,0 +1,104 @@
+import { NextRequest, NextResponse } from 'next/server';
+import { stripe } from '@/lib/stripe';
+import { supabaseAdmin } from '@/lib/supabase/admin';
+
+export async function GET(req: NextRequest) {
+ const { searchParams } = new URL(req.url);
+ const sessionId = searchParams.get('session_id');
+ const appUrl = process.env.NEXT_PUBLIC_APP_URL || 'http://localhost:3000';
+
+ if (!sessionId) {
+ return NextResponse.redirect(`${appUrl}/dashboard/insights`);
+ }
+
+ let trackingJobId: string | null = null;
+
+ try {
+ // Retrieve and validate the Stripe checkout session
+ const session = await stripe.checkout.sessions.retrieve(sessionId, {
+ expand: ['subscription'],
+ });
+
+ if (session.payment_status === 'paid' || session.status === 'complete') {
+ const customerId =
+ typeof session.customer === 'string'
+ ? session.customer
+ : session.customer?.id;
+
+ const subscription =
+ typeof session.subscription === 'string'
+ ? await stripe.subscriptions.retrieve(session.subscription)
+ : session.subscription;
+
+ const subscriptionId = subscription?.id;
+ const orgId =
+ (subscription as { metadata?: { organization_id?: string } })?.metadata?.organization_id;
+ const planId =
+ (subscription as { metadata?: { plan_id?: string } })?.metadata?.plan_id;
+
+ if (orgId && customerId && subscriptionId) {
+ // Update org subscription (resolves webhook race condition)
+ const { error: updateError } = await supabaseAdmin
+ .from('organizations')
+ .update({
+ subscription_status: 'trialing',
+ plan: planId || 'starter',
+ stripe_customer_id: customerId,
+ stripe_subscription_id: subscriptionId,
+ })
+ .eq('id', orgId);
+
+ if (updateError) {
+ console.error('[stripe/success] DB update error:', updateError);
+ } else {
+ console.log('[stripe/success] DB updated for org:', orgId);
+
+ // Find first brand and trigger tracking via aeo-server
+ const { data: brand } = await supabaseAdmin
+ .from('brands')
+ .select('id')
+ .eq('organization_id', orgId)
+ .order('created_at', { ascending: true })
+ .limit(1)
+ .single();
+
+ if (brand) {
+ const serverUrl = process.env.NEXT_PUBLIC_API_URL || 'http://localhost';
+ const cronSecret = process.env.CRON_SECRET;
+
+ if (cronSecret) {
+ try {
+ const trackingRes = await fetch(`${serverUrl}/api/internal/trigger-tracking`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: `Bearer ${cronSecret}`,
+ },
+ body: JSON.stringify({ brandId: brand.id }),
+ });
+
+ if (trackingRes.ok) {
+ const result = await trackingRes.json();
+ trackingJobId = result.jobId;
+ console.log('[stripe/success] Tracking triggered for brand:', brand.id, 'jobId:', trackingJobId);
+ } else {
+ console.error('[stripe/success] Tracking trigger failed:', trackingRes.status);
+ }
+ } catch (fetchErr) {
+ console.error('[stripe/success] Failed to call trigger-tracking:', fetchErr);
+ }
+ }
+ }
+ }
+ }
+ }
+ } catch (err) {
+ console.error('[stripe/success] Error:', err);
+ }
+
+ const redirectUrl = new URL(`${appUrl}/dashboard/insights`);
+ if (trackingJobId) {
+ redirectUrl.searchParams.set('jobId', trackingJobId);
+ }
+ return NextResponse.redirect(redirectUrl.toString());
+}
diff --git a/web/src/app/api/stripe/webhook/route.ts b/web/src/app/api/stripe/webhook/route.ts
new file mode 100644
index 000000000..a54552787
--- /dev/null
+++ b/web/src/app/api/stripe/webhook/route.ts
@@ -0,0 +1,151 @@
+import { NextRequest, NextResponse } from 'next/server';
+import { stripe } from '@/lib/stripe';
+import { supabaseAdmin } from '@/lib/supabase/admin';
+import type Stripe from 'stripe';
+
+export async function POST(req: NextRequest) {
+ const body = await req.text();
+ const signature = req.headers.get('stripe-signature');
+
+ if (!signature) {
+ return NextResponse.json({ error: 'Missing signature' }, { status: 400 });
+ }
+
+ let event: Stripe.Event;
+ try {
+ event = stripe.webhooks.constructEvent(
+ body,
+ signature,
+ process.env.STRIPE_WEBHOOK_SECRET!,
+ );
+ } catch (err) {
+ console.error('[stripe/webhook] Signature verification failed:', err);
+ return NextResponse.json({ error: 'Invalid signature' }, { status: 400 });
+ }
+
+ try {
+ switch (event.type) {
+ case 'checkout.session.completed': {
+ const session = event.data.object as Stripe.Checkout.Session;
+ const customerId =
+ typeof session.customer === 'string'
+ ? session.customer
+ : session.customer?.id;
+ const subscriptionId =
+ typeof session.subscription === 'string'
+ ? session.subscription
+ : session.subscription?.id;
+
+ if (customerId && subscriptionId) {
+ // Fetch the subscription to get metadata
+ const subscription =
+ await stripe.subscriptions.retrieve(subscriptionId);
+ const orgId = subscription.metadata.organization_id;
+ const planId = subscription.metadata.plan_id;
+ console.log('[webhook] checkout.session.completed — orgId:', orgId, 'planId:', planId, 'customerId:', customerId, 'subscriptionId:', subscriptionId);
+
+ if (orgId) {
+ const { error } = await supabaseAdmin
+ .from('organizations')
+ .update({
+ subscription_status: 'trialing',
+ plan: planId || 'starter',
+ stripe_customer_id: customerId,
+ stripe_subscription_id: subscriptionId,
+ })
+ .eq('id', orgId);
+ if (error) console.error('[webhook] DB update error:', error);
+ else console.log('[webhook] DB updated successfully for org:', orgId);
+ }
+ } else {
+ console.log('[webhook] checkout.session.completed — missing customerId or subscriptionId:', { customerId, subscriptionId });
+ }
+ break;
+ }
+
+ case 'customer.subscription.updated': {
+ const subscription = event.data.object as Stripe.Subscription;
+ const customerId =
+ typeof subscription.customer === 'string'
+ ? subscription.customer
+ : subscription.customer?.id;
+
+ if (customerId) {
+ const updates: Record<string, unknown> = {
+ subscription_status: subscription.status,
+ subscription_ends_at: new Date(
+ (subscription as unknown as { current_period_end: number }).current_period_end * 1000,
+ ).toISOString(),
+ };
+
+ // Update plan if metadata has plan_id
+ if (subscription.metadata.plan_id) {
+ updates.plan = subscription.metadata.plan_id;
+ }
+
+ await supabaseAdmin
+ .from('organizations')
+ .update(updates)
+ .eq('stripe_customer_id', customerId);
+ }
+ break;
+ }
+
+ case 'customer.subscription.deleted': {
+ const subscription = event.data.object as Stripe.Subscription;
+ const customerId =
+ typeof subscription.customer === 'string'
+ ? subscription.customer
+ : subscription.customer?.id;
+
+ if (customerId) {
+ await supabaseAdmin
+ .from('organizations')
+ .update({
+ subscription_status: 'canceled',
+ plan: 'starter',
+ })
+ .eq('stripe_customer_id', customerId);
+ }
+ break;
+ }
+
+ case 'invoice.payment_succeeded': {
+ const invoice = event.data.object as Stripe.Invoice;
+ const customerId =
+ typeof invoice.customer === 'string'
+ ? invoice.customer
+ : invoice.customer?.id;
+
+ if (customerId) {
+ await supabaseAdmin
+ .from('organizations')
+ .update({ subscription_status: 'active' })
+ .eq('stripe_customer_id', customerId);
+ }
+ break;
+ }
+
+ case 'invoice.payment_failed': {
+ const invoice = event.data.object as Stripe.Invoice;
+ const customerId =
+ typeof invoice.customer === 'string'
+ ? invoice.customer
+ : invoice.customer?.id;
+
+ if (customerId) {
+ await supabaseAdmin
+ .from('organizations')
+ .update({ subscription_status: 'past_due' })
+ .eq('stripe_customer_id', customerId);
+ }
+ break;
+ }
+ }
+ } catch (err) {
+ console.error('[stripe/webhook] Error processing event:', err);
+ return NextResponse.json({ error: 'Webhook processing failed' }, { status: 500 });
+ }
+
+ return NextResponse.json({ received: true });
+}
diff --git a/web/src/app/auth/callback/route.ts b/web/src/app/auth/callback/route.ts
new file mode 100644
index 000000000..fe0ee56bb
--- /dev/null
+++ b/web/src/app/auth/callback/route.ts
@@ -0,0 +1,18 @@
+import { NextResponse } from 'next/server';
+import { createClient } from '@/lib/supabase/server';
+
+export async function GET(request: Request) {
+ const { searchParams, origin } = new URL(request.url);
+ const code = searchParams.get('code');
+ const next = searchParams.get('next') ?? '/dashboard';
+
+ if (code) {
+ const supabase = await createClient();
+ const { error } = await supabase.auth.exchangeCodeForSession(code);
+ if (!error) {
+ return NextResponse.redirect(`${origin}${next}`);
+ }
+ }
+
+ return NextResponse.redirect(`${origin}/sign-in?error=auth`);
+}
diff --git a/src/app/favicon.ico b/web/src/app/favicon.ico
similarity index 100%
rename from src/app/favicon.ico
rename to web/src/app/favicon.ico
diff --git a/src/app/globals.css b/web/src/app/globals.css
similarity index 89%
rename from src/app/globals.css
rename to web/src/app/globals.css
index a80ba7170..a822662d2 100644
--- a/src/app/globals.css
+++ b/web/src/app/globals.css
@@ -1,13 +1,14 @@
@import "tailwindcss";
@import "tw-animate-css";
@import "shadcn/tailwind.css";
+@plugin "@tailwindcss/typography";
@custom-variant dark (&:is(.dark *));
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
- --font-sans: var(--font-sans);
+ --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
--font-mono: var(--font-geist-mono);
--color-sidebar-ring: var(--sidebar-ring);
--color-sidebar-border: var(--sidebar-border);
@@ -126,4 +127,27 @@
html {
@apply font-sans;
}
+}
+
+@utility container {
+ margin-inline: auto;
+ padding-inline: 1.5rem;
+ width: 100%;
+
+ @media (width >= 640px) {
+ max-width: 640px;
+ }
+ @media (width >= 768px) {
+ max-width: 768px;
+ padding-inline: 2rem;
+ }
+ @media (width >= 1024px) {
+ max-width: 1024px;
+ }
+ @media (width >= 1280px) {
+ max-width: 1280px;
+ }
+ @media (width >= 1536px) {
+ max-width: 1536px;
+ }
}
\ No newline at end of file
diff --git a/web/src/app/layout.tsx b/web/src/app/layout.tsx
new file mode 100644
index 000000000..60604dea5
--- /dev/null
+++ b/web/src/app/layout.tsx
@@ -0,0 +1,51 @@
+import type { Metadata } from "next";
+import { Geist, Geist_Mono, Inter, Plus_Jakarta_Sans } from "next/font/google";
+import { FontProvider } from "@/components/providers/font-provider";
+import "./globals.css";
+
+const geistSans = Geist({
+ variable: "--font-geist-sans",
+ subsets: ["latin"],
+});
+
+const geistMono = Geist_Mono({
+ variable: "--font-geist-mono",
+ subsets: ["latin"],
+});
+
+const inter = Inter({
+ variable: "--font-inter",
+ subsets: ["latin"],
+});
+
+const jakarta = Plus_Jakarta_Sans({
+ variable: "--font-jakarta",
+ subsets: ["latin"],
+});
+
+export const metadata: Metadata = {
+ title: {
+ default: "Ansvisor",
+ template: "%s | Ansvisor",
+ },
+ description:
+ "Monitor, analyze, and optimize your brand's visibility in AI-powered search engines.",
+};
+
+export default function RootLayout({
+ children,
+}: {
+ children: React.ReactNode;
+}) {
+ return (
+ <html suppressHydrationWarning className={`${geistSans.variable} ${geistMono.variable} ${inter.variable} ${jakarta.variable}`}>
+ <body
+ suppressHydrationWarning
+ className="font-sans antialiased"
+ >
+ <FontProvider />
+ {children}
+ </body>
+ </html>
+ );
+}
diff --git a/web/src/components/ai-provider-avatar.tsx b/web/src/components/ai-provider-avatar.tsx
new file mode 100644
index 000000000..6bcb527d5
--- /dev/null
+++ b/web/src/components/ai-provider-avatar.tsx
@@ -0,0 +1,184 @@
+import { cn } from '@/lib/utils';
+
+export type AIProviderKey =
+ | 'openai'
+ | 'anthropic'
+ | 'google'
+ | 'googleAio'
+ | 'googleAiMode'
+ | 'perplexity'
+ | 'copilot'
+ | 'xai'
+ | 'meta';
+
+const AI_PROVIDER_META: Record<
+ AIProviderKey,
+ { label: string; shortLabel: string; icon: string; fallbackClassName: string }
+> = {
+ openai: {
+ label: 'ChatGPT',
+ shortLabel: 'O',
+ icon: '/chatgpt.svg',
+ fallbackClassName: 'bg-emerald-500 text-white',
+ },
+ anthropic: {
+ label: 'Claude',
+ shortLabel: 'A',
+ icon: '/claude.svg',
+ fallbackClassName: 'bg-amber-500 text-white',
+ },
+ google: {
+ label: 'Gemini',
+ shortLabel: 'G',
+ icon: '/gemini.svg',
+ fallbackClassName: 'bg-blue-500 text-white',
+ },
+ googleAio: {
+ label: 'Google AI Overview',
+ shortLabel: 'G',
+ icon: '/ai_overview.svg',
+ fallbackClassName: 'bg-blue-500 text-white',
+ },
+ googleAiMode: {
+ label: 'Google AI Mode',
+ shortLabel: 'G',
+ icon: '/ai_mode.svg',
+ fallbackClassName: 'bg-blue-500 text-white',
+ },
+ perplexity: {
+ label: 'Perplexity',
+ shortLabel: 'P',
+ icon: '/perplexity.svg',
+ fallbackClassName: 'bg-indigo-500 text-white',
+ },
+ copilot: {
+ label: 'Microsoft Copilot',
+ shortLabel: 'C',
+ icon: '/copilot.svg',
+ fallbackClassName: 'bg-cyan-600 text-white',
+ },
+ xai: {
+ label: 'Grok',
+ shortLabel: 'X',
+ icon: '/grok.svg',
+ fallbackClassName: 'bg-zinc-800 text-white dark:bg-zinc-300 dark:text-zinc-900',
+ },
+ meta: {
+ label: 'Meta AI',
+ shortLabel: 'M',
+ icon: '',
+ fallbackClassName: 'bg-sky-500 text-white',
+ },
+};
+
+export function resolveAIProvider(model: string, platform?: string): AIProviderKey {
+ const key = platform || model;
+
+ if (
+ key === 'ChatGPT' ||
+ key === 'chatgpt' ||
+ key === 'chatgpt-web' ||
+ key.startsWith('gpt-')
+ ) {
+ return 'openai';
+ }
+ if (key === 'Claude' || key === 'claude' || key.startsWith('claude-')) {
+ return 'anthropic';
+ }
+ if (
+ key === 'Perplexity' ||
+ key === 'perplexity' ||
+ key === 'perplexity-web' ||
+ key.startsWith('sonar')
+ ) {
+ return 'perplexity';
+ }
+ if (
+ key === 'Microsoft Copilot' ||
+ key === 'Copilot' ||
+ key === 'copilot' ||
+ key === 'copilot-web'
+ ) {
+ return 'copilot';
+ }
+ if (key === 'Grok' || key === 'grok' || key === 'grok-web' || key.startsWith('grok-')) {
+ return 'xai';
+ }
+ if (
+ key === 'Google AI Overview' ||
+ key === 'google-aio' ||
+ key === 'google-ai-overviews'
+ ) {
+ return 'googleAio';
+ }
+ if (
+ key === 'Google AI Mode' ||
+ key === 'google-ai-mode' ||
+ key === 'google-aimode' ||
+ key === 'ai-mode'
+ ) {
+ return 'googleAiMode';
+ }
+ if (
+ key === 'Gemini' ||
+ key === 'Google Gemini' ||
+ key === 'gemini' ||
+ key === 'gemini-web' ||
+ key.startsWith('gemini-')
+ ) {
+ return 'google';
+ }
+ if (key === 'Meta AI' || key === 'meta-ai' || key.startsWith('llama-')) {
+ return 'meta';
+ }
+
+ return platform ? resolveAIProvider(platform) : 'openai';
+}
+
+export function getAIProviderDisplayName(provider: AIProviderKey): string {
+ return AI_PROVIDER_META[provider].label;
+}
+
+export function AIProviderAvatar({
+ provider,
+ className,
+}: {
+ provider: AIProviderKey;
+ className?: string;
+}) {
+ const meta = AI_PROVIDER_META[provider];
+
+ if (!meta.icon) {
+ return (
+ <span
+ title={meta.label}
+ aria-label={meta.label}
+ className={cn(
+ 'flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-[10px] font-bold',
+ meta.fallbackClassName,
+ className,
+ )}
+ >
+ {meta.shortLabel}
+ </span>
+ );
+ }
+
+ return (
+ <span
+ title={meta.label}
+ aria-label={meta.label}
+ className={cn(
+ 'relative flex h-5 w-5 shrink-0 overflow-hidden rounded-full border bg-background',
+ className,
+ )}
+ >
+ <img
+ src={meta.icon}
+ alt=""
+ className="h-full w-full object-cover"
+ aria-hidden="true"
+ />
+ </span>
+ );
+}
diff --git a/web/src/components/auth/oauth-buttons.tsx b/web/src/components/auth/oauth-buttons.tsx
new file mode 100644
index 000000000..935f8c0b6
--- /dev/null
+++ b/web/src/components/auth/oauth-buttons.tsx
@@ -0,0 +1,78 @@
+"use client";
+
+import { useState } from "react";
+import { createClient } from "@/lib/supabase/client";
+import { Button } from "@/components/ui/button";
+import { Loader2 } from "lucide-react";
+
+function GitHubIcon({ className }: { className?: string }) {
+ return (
+ <svg viewBox="0 0 24 24" className={className} fill="currentColor">
+ <path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z" />
+ </svg>
+ );
+}
+
+function GoogleIcon({ className }: { className?: string }) {
+ return (
+ <svg viewBox="0 0 24 24" className={className}>
+ <path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z" fill="#4285F4" />
+ <path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" fill="#34A853" />
+ <path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" fill="#FBBC05" />
+ <path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" fill="#EA4335" />
+ </svg>
+ );
+}
+
+type Provider = "github" | "google";
+
+export function OAuthButtons() {
+ const [loadingProvider, setLoadingProvider] = useState<Provider | null>(null);
+
+ async function handleOAuth(provider: Provider) {
+ setLoadingProvider(provider);
+ const supabase = createClient();
+
+ const { error } = await supabase.auth.signInWithOAuth({
+ provider,
+ options: {
+ redirectTo: `${window.location.origin}/auth/callback`,
+ },
+ });
+
+ if (error) {
+ setLoadingProvider(null);
+ }
+ }
+
+ return (
+ <div className="grid grid-cols-2 gap-3">
+ <Button
+ variant="outline"
+ type="button"
+ disabled={loadingProvider !== null}
+ onClick={() => handleOAuth("github")}
+ >
+ {loadingProvider === "github" ? (
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ ) : (
+ <GitHubIcon className="mr-2 h-4 w-4" />
+ )}
+ GitHub
+ </Button>
+ <Button
+ variant="outline"
+ type="button"
+ disabled={loadingProvider !== null}
+ onClick={() => handleOAuth("google")}
+ >
+ {loadingProvider === "google" ? (
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ ) : (
+ <GoogleIcon className="mr-2 h-4 w-4" />
+ )}
+ Google
+ </Button>
+ </div>
+ );
+}
diff --git a/web/src/components/auth/sign-in-form.tsx b/web/src/components/auth/sign-in-form.tsx
new file mode 100644
index 000000000..92b638aab
--- /dev/null
+++ b/web/src/components/auth/sign-in-form.tsx
@@ -0,0 +1,118 @@
+"use client";
+
+import { useState } from "react";
+import { useTranslations } from "next-intl";
+import { useSearchParams } from "next/navigation";
+import { useRouter } from "@/i18n/navigation";
+import { createClient } from "@/lib/supabase/client";
+import { Button } from "@/components/ui/button";
+import { Input } from "@/components/ui/input";
+import { Label } from "@/components/ui/label";
+import { toast } from "sonner";
+import { Loader2 } from "lucide-react";
+import { OAuthButtons } from "@/components/auth/oauth-buttons";
+import { Separator } from "@/components/ui/separator";
+
+export function SignInForm() {
+ const t = useTranslations("auth");
+ const router = useRouter();
+ const searchParams = useSearchParams();
+ const nextPath = searchParams.get("next");
+ const [email, setEmail] = useState("");
+ const [password, setPassword] = useState("");
+ const [isLoading, setIsLoading] = useState(false);
+
+ async function handleSubmit(e: React.FormEvent<HTMLFormElement>) {
+ e.preventDefault();
+ setIsLoading(true);
+
+ const supabase = createClient();
+
+ const { error } = await supabase.auth.signInWithPassword({
+ email,
+ password,
+ });
+
+ if (error) {
+ const msg = error.message.toLowerCase();
+ if (msg.includes("email not confirmed")) {
+ toast.error(t("errors.emailNotConfirmed"));
+ } else if (msg.includes("invalid login credentials")) {
+ toast.error(t("errors.invalidCredentials"));
+ } else {
+ toast.error(t("errors.generic"));
+ }
+ setIsLoading(false);
+ return;
+ }
+
+ router.push(nextPath && nextPath.startsWith("/") ? nextPath : "/dashboard");
+ router.refresh();
+ }
+
+ return (
+ <div className="space-y-4">
+ <OAuthButtons />
+
+ <div className="relative">
+ <div className="absolute inset-0 flex items-center">
+ <Separator className="w-full" />
+ </div>
+ <div className="relative flex justify-center text-xs uppercase">
+ <span className="bg-card px-2 text-muted-foreground">
+ {t("orContinueWith")}
+ </span>
+ </div>
+ </div>
+
+ <form onSubmit={handleSubmit} className="space-y-4">
+ <div className="space-y-2">
+ <Label htmlFor="email">{t("email")}</Label>
+ <Input
+ id="email"
+ type="email"
+ placeholder={t("emailPlaceholder")}
+ value={email}
+ onChange={(e) => setEmail(e.target.value)}
+ required
+ autoComplete="email"
+ disabled={isLoading}
+ />
+ </div>
+
+ <div className="space-y-2">
+ <div className="flex items-center justify-between">
+ <Label htmlFor="password">{t("password")}</Label>
+ <a
+ href="#"
+ className="text-sm text-muted-foreground hover:text-primary underline-offset-4 hover:underline"
+ >
+ {t("forgotPassword")}
+ </a>
+ </div>
+ <Input
+ id="password"
+ type="password"
+ placeholder={t("passwordPlaceholder")}
+ value={password}
+ onChange={(e) => setPassword(e.target.value)}
+ required
+ autoComplete="current-password"
+ disabled={isLoading}
+ />
+ </div>
+
+ <Button type="submit" className="w-full" disabled={isLoading}>
+ {isLoading ? (
+ <>
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ {t("signingIn")}
+ </>
+ ) : (
+ t("signIn")
+ )}
+ </Button>
+ </form>
+ </div>
+ );
+}
diff --git a/web/src/components/auth/sign-up-form.tsx b/web/src/components/auth/sign-up-form.tsx
new file mode 100644
index 000000000..65f9ed74d
--- /dev/null
+++ b/web/src/components/auth/sign-up-form.tsx
@@ -0,0 +1,142 @@
+"use client";
+
+import { useState } from "react";
+import { useTranslations } from "next-intl";
+import { useSearchParams } from "next/navigation";
+import { useRouter, Link } from "@/i18n/navigation";
+import { createClient } from "@/lib/supabase/client";
+import { Button } from "@/components/ui/button";
+import { Input } from "@/components/ui/input";
+import { Label } from "@/components/ui/label";
+import { toast } from "sonner";
+import { Loader2 } from "lucide-react";
+import { OAuthButtons } from "@/components/auth/oauth-buttons";
+import { Separator } from "@/components/ui/separator";
+
+export function SignUpForm() {
+ const t = useTranslations("auth");
+ const router = useRouter();
+ const searchParams = useSearchParams();
+ const invitedEmail = searchParams.get("email") ?? "";
+ const nextPath = searchParams.get("next");
+ const [fullName, setFullName] = useState("");
+ const [email, setEmail] = useState(invitedEmail);
+ const [password, setPassword] = useState("");
+ const [isLoading, setIsLoading] = useState(false);
+
+ async function handleSubmit(e: React.FormEvent<HTMLFormElement>) {
+ e.preventDefault();
+
+ if (password.length < 8) {
+ toast.error(t("errors.passwordTooShort"));
+ return;
+ }
+
+ setIsLoading(true);
+ const supabase = createClient();
+
+ const { error } = await supabase.auth.signUp({
+ email,
+ password,
+ options: {
+ data: {
+ full_name: fullName,
+ },
+ },
+ });
+
+ if (error) {
+ toast.error(t("errors.generic"));
+ setIsLoading(false);
+ return;
+ }
+
+ toast.success(t("verificationEmailSent"));
+ const nextQuery = nextPath ? `&next=${encodeURIComponent(nextPath)}` : "";
+ router.push(`/sign-in?verified=pending${nextQuery}`);
+ }
+
+ return (
+ <div className="space-y-4">
+ <OAuthButtons />
+
+ <div className="relative">
+ <div className="absolute inset-0 flex items-center">
+ <Separator className="w-full" />
+ </div>
+ <div className="relative flex justify-center text-xs uppercase">
+ <span className="bg-card px-2 text-muted-foreground">
+ {t("orContinueWith")}
+ </span>
+ </div>
+ </div>
+
+ <form onSubmit={handleSubmit} className="space-y-4">
+ <div className="space-y-2">
+ <Label htmlFor="fullName">{t("fullName")}</Label>
+ <Input
+ id="fullName"
+ type="text"
+ placeholder={t("fullNamePlaceholder")}
+ value={fullName}
+ onChange={(e) => setFullName(e.target.value)}
+ required
+ autoComplete="name"
+ disabled={isLoading}
+ />
+ </div>
+
+ <div className="space-y-2">
+ <Label htmlFor="email">{t("email")}</Label>
+ <Input
+ id="email"
+ type="email"
+ placeholder={t("emailPlaceholder")}
+ value={email}
+ onChange={(e) => setEmail(e.target.value)}
+ required
+ autoComplete="email"
+ disabled={isLoading || Boolean(invitedEmail)}
+ />
+ </div>
+
+ <div className="space-y-2">
+ <Label htmlFor="password">{t("password")}</Label>
+ <Input
+ id="password"
+ type="password"
+ placeholder={t("passwordPlaceholder")}
+ value={password}
+ onChange={(e) => setPassword(e.target.value)}
+ required
+ autoComplete="new-password"
+ disabled={isLoading}
+ />
+ </div>
+
+ <Button type="submit" className="w-full" disabled={isLoading}>
+ {isLoading ? (
+ <>
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ {t("signingUp")}
+ </>
+ ) : (
+ t("createAccount")
+ )}
+ </Button>
+
+ <p className="text-center text-xs text-muted-foreground">
+ {t("termsAgreement")}{" "}
+ <Link href="/terms" className="underline underline-offset-4 hover:text-primary">
+ {t("termsOfService")}
+ </Link>{" "}
+ {t("and")}{" "}
+ <Link href="/privacy" className="underline underline-offset-4 hover:text-primary">
+ {t("privacyPolicy")}
+ </Link>
+ .
+ </p>
+ </form>
+ </div>
+ );
+}
diff --git a/web/src/components/dashboard/brand-card.tsx b/web/src/components/dashboard/brand-card.tsx
new file mode 100644
index 000000000..56c5c1095
--- /dev/null
+++ b/web/src/components/dashboard/brand-card.tsx
@@ -0,0 +1,335 @@
+"use client";
+
+import { useTranslations } from "next-intl";
+import { Link, useRouter } from "@/i18n/navigation";
+import { useBrandStore } from "@/stores/use-brand-store";
+import type { Brand } from "@/types";
+import type { BrandCardSummary } from "@/lib/actions/brand";
+import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
+import { Badge } from "@/components/ui/badge";
+import { Button } from "@/components/ui/button";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuSeparator,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
+import {
+ ArrowUpRight,
+ BarChart3,
+ CheckCircle2,
+ Globe,
+ MessageSquareText,
+ MoreHorizontal,
+ Settings,
+ Sparkles,
+ Tag,
+ TrendingDown,
+ TrendingUp,
+} from "lucide-react";
+import { cn } from "@/lib/utils";
+
+interface BrandCardProps {
+ brand: Brand;
+ summary?: BrandCardSummary;
+}
+
+const GRADIENTS = [
+ "from-indigo-500/30 via-purple-500/20 to-fuchsia-500/10",
+ "from-sky-500/30 via-cyan-500/20 to-emerald-500/10",
+ "from-rose-500/30 via-pink-500/20 to-amber-500/10",
+ "from-violet-500/30 via-indigo-500/20 to-blue-500/10",
+ "from-emerald-500/30 via-teal-500/20 to-cyan-500/10",
+ "from-amber-500/30 via-orange-500/20 to-rose-500/10",
+ "from-fuchsia-500/30 via-purple-500/20 to-indigo-500/10",
+ "from-blue-500/30 via-sky-500/20 to-teal-500/10",
+];
+
+function pickGradient(seed: string): string {
+ let hash = 0;
+ for (let i = 0; i < seed.length; i++) {
+ hash = (hash * 31 + seed.charCodeAt(i)) | 0;
+ }
+ return GRADIENTS[Math.abs(hash) % GRADIENTS.length];
+}
+
+function Sparkline({ data, positive }: { data: number[]; positive: boolean }) {
+ if (!data.length || data.every((v) => v === 0)) {
+ return (
+ <svg viewBox="0 0 100 28" className="h-7 w-full opacity-30">
+ <line
+ x1="0"
+ y1="14"
+ x2="100"
+ y2="14"
+ stroke="currentColor"
+ strokeWidth="1"
+ strokeDasharray="2 3"
+ />
+ </svg>
+ );
+ }
+ const max = Math.max(...data, 1);
+ const min = Math.min(...data, 0);
+ const range = Math.max(max - min, 1);
+ const points = data
+ .map((v, i) => {
+ const x = (i / (data.length - 1)) * 100;
+ const y = 26 - ((v - min) / range) * 22;
+ return `${x.toFixed(2)},${y.toFixed(2)}`;
+ })
+ .join(" ");
+ const stroke = positive ? "#10b981" : "#ef4444";
+ return (
+ <svg viewBox="0 0 100 28" className="h-7 w-full" preserveAspectRatio="none">
+ <polyline
+ fill="none"
+ stroke={stroke}
+ strokeWidth="1.5"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ points={points}
+ />
+ </svg>
+ );
+}
+
+function StatusPill({ status }: { status: BrandCardSummary["status"] }) {
+ const config = {
+ healthy: {
+ label: "Tracking",
+ color:
+ "border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",
+ icon: CheckCircle2,
+ },
+ declining: {
+ label: "Needs attention",
+ color:
+ "border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400",
+ icon: TrendingDown,
+ },
+ "no-prompts": {
+ label: "No prompts yet",
+ color:
+ "border-zinc-500/30 bg-zinc-500/10 text-zinc-600 dark:text-zinc-400",
+ icon: MessageSquareText,
+ },
+ "no-data": {
+ label: "Awaiting data",
+ color:
+ "border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400",
+ icon: Sparkles,
+ },
+ } as const;
+ const c = config[status];
+ return (
+ <Badge variant="outline" className={cn("gap-1 text-[10px]", c.color)}>
+ <c.icon className="h-2.5 w-2.5" />
+ {c.label}
+ </Badge>
+ );
+}
+
+export function BrandCard({ brand, summary }: BrandCardProps) {
+ const t = useTranslations("brands");
+ const router = useRouter();
+ const { activeBrandId, setActiveBrand } = useBrandStore();
+ const isActive = brand.id === activeBrandId;
+
+ const initials = brand.name
+ .split(" ")
+ .map((w) => w[0])
+ .join("")
+ .toUpperCase()
+ .slice(0, 2);
+
+ const primaryDomain = brand.domains.find((d) => d.isPrimary);
+ const gradient = pickGradient(brand.id);
+
+ const visibility = summary?.visibility7d ?? 0;
+ const delta = summary?.visibilityDelta ?? 0;
+ const mentions = summary?.mentions7d ?? 0;
+ const prompts = summary?.promptCount ?? 0;
+ const trafficVisits = summary?.trafficVisits7d ?? 0;
+ const trend = summary?.trend ?? [];
+ const status = summary?.status ?? "no-prompts";
+ const trendPositive = delta >= 0;
+
+ const handleSelectAndGo = (path: string) => {
+ setActiveBrand(brand.id);
+ router.push(path);
+ };
+
+ return (
+ <div
+ className={cn(
+ "group relative overflow-hidden rounded-xl border bg-card transition-all",
+ "hover:border-primary/40 hover:shadow-lg hover:-translate-y-0.5",
+ isActive && "ring-2 ring-primary border-primary/60",
+ )}
+ >
+ {/* Hero gradient backdrop */}
+ <div
+ className={cn(
+ "relative h-28 bg-gradient-to-br px-5 pt-5",
+ gradient,
+ )}
+ >
+ <div className="absolute inset-0 bg-[radial-gradient(circle_at_top_right,_rgba(255,255,255,0.15),_transparent_60%)]" />
+ <div className="relative flex items-start justify-between gap-3">
+ <Avatar className="h-14 w-14 rounded-xl ring-4 ring-background shadow-md">
+ <AvatarImage src={brand.logoUrl} alt={brand.name} />
+ <AvatarFallback className="rounded-xl bg-background text-foreground text-base font-bold">
+ {initials}
+ </AvatarFallback>
+ </Avatar>
+ <div className="flex items-center gap-1.5">
+ {isActive && (
+ <Badge
+ variant="secondary"
+ className="gap-1 border-primary/30 bg-primary/15 text-primary text-[10px]"
+ >
+ <span className="h-1.5 w-1.5 rounded-full bg-primary" />
+ Active
+ </Badge>
+ )}
+ <DropdownMenu>
+ <DropdownMenuTrigger
+ render={
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-7 w-7 bg-background/40 backdrop-blur hover:bg-background/70"
+ >
+ <MoreHorizontal className="h-3.5 w-3.5" />
+ </Button>
+ }
+ />
+ <DropdownMenuContent align="end" className="w-44">
+ <DropdownMenuItem
+ render={<Link href={`/dashboard/brands/${brand.id}/prompts`} />}
+ >
+ <MessageSquareText className="h-3.5 w-3.5 mr-2" />
+ Prompts
+ </DropdownMenuItem>
+ <DropdownMenuItem
+ render={<Link href={`/dashboard/brands/${brand.id}/topics`} />}
+ >
+ <Tag className="h-3.5 w-3.5 mr-2" />
+ Topics
+ </DropdownMenuItem>
+ <DropdownMenuSeparator />
+ <DropdownMenuItem
+ render={<Link href={`/dashboard/brands/${brand.id}/settings`} />}
+ >
+ <Settings className="h-3.5 w-3.5 mr-2" />
+ Settings
+ </DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ </div>
+ </div>
+ </div>
+
+ {/* Body */}
+ <div className="px-5 pt-3 pb-4 space-y-4">
+ <div className="flex items-start justify-between gap-2">
+ <div className="min-w-0 flex-1">
+ <h3 className="font-semibold text-base leading-tight truncate">
+ {brand.name}
+ </h3>
+ {primaryDomain && (
+ <p className="mt-0.5 flex items-center gap-1 text-xs text-muted-foreground truncate">
+ <Globe className="h-3 w-3 shrink-0" />
+ {primaryDomain.domain}
+ </p>
+ )}
+ </div>
+ <StatusPill status={status} />
+ </div>
+
+ {/* Visibility hero metric */}
+ <div className="rounded-lg border bg-muted/30 p-3">
+ <div className="flex items-end justify-between gap-3">
+ <div>
+ <p className="text-[10px] uppercase tracking-wide text-muted-foreground">
+ Visibility · 7d
+ </p>
+ <div className="flex items-baseline gap-2 mt-0.5">
+ <span className="text-2xl font-bold tabular-nums">
+ {visibility}
+ <span className="text-base font-medium text-muted-foreground">
+ %
+ </span>
+ </span>
+ {summary && summary.visibilityDelta !== 0 && (
+ <span
+ className={cn(
+ "flex items-center gap-0.5 text-xs font-medium tabular-nums",
+ trendPositive
+ ? "text-emerald-600 dark:text-emerald-400"
+ : "text-red-500",
+ )}
+ >
+ {trendPositive ? (
+ <TrendingUp className="h-3 w-3" />
+ ) : (
+ <TrendingDown className="h-3 w-3" />
+ )}
+ {trendPositive ? "+" : ""}
+ {delta}%
+ </span>
+ )}
+ </div>
+ </div>
+ <div className="flex-1 max-w-[100px] text-emerald-500">
+ <Sparkline data={trend} positive={trendPositive} />
+ </div>
+ </div>
+ </div>
+
+ {/* Compact stat strip */}
+ <div className="grid grid-cols-3 gap-2 text-center">
+ <div className="rounded-md border bg-card px-2 py-1.5">
+ <p className="text-base font-semibold tabular-nums leading-none">
+ {prompts}
+ </p>
+ <p className="mt-1 text-[10px] uppercase tracking-wide text-muted-foreground">
+ Prompts
+ </p>
+ </div>
+ <div className="rounded-md border bg-card px-2 py-1.5">
+ <p className="text-base font-semibold tabular-nums leading-none">
+ {mentions}
+ </p>
+ <p className="mt-1 text-[10px] uppercase tracking-wide text-muted-foreground">
+ Mentions
+ </p>
+ </div>
+ <div className="rounded-md border bg-card px-2 py-1.5">
+ <p className="text-base font-semibold tabular-nums leading-none">
+ {trafficVisits >= 1000
+ ? `${(trafficVisits / 1000).toFixed(1)}k`
+ : trafficVisits}
+ </p>
+ <p className="mt-1 text-[10px] uppercase tracking-wide text-muted-foreground">
+ Visits
+ </p>
+ </div>
+ </div>
+
+ {/* CTA */}
+ <Button
+ size="sm"
+ className="w-full gap-1.5"
+ onClick={() => handleSelectAndGo("/dashboard/insights")}
+ >
+ <BarChart3 className="h-3.5 w-3.5" />
+ {t("card.viewInsights")}
+ <ArrowUpRight className="h-3.5 w-3.5 ml-auto" />
+ </Button>
+ </div>
+ </div>
+ );
+}
diff --git a/web/src/components/dashboard/prompt-suggestion-card.tsx b/web/src/components/dashboard/prompt-suggestion-card.tsx
new file mode 100644
index 000000000..bebc6981a
--- /dev/null
+++ b/web/src/components/dashboard/prompt-suggestion-card.tsx
@@ -0,0 +1,451 @@
+'use client';
+
+import { memo, useState } from 'react';
+import { Badge } from '@/components/ui/badge';
+import { Button } from '@/components/ui/button';
+import { Input } from '@/components/ui/input';
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from '@/components/ui/select';
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+ DialogTrigger,
+ DialogClose,
+} from '@/components/ui/dialog';
+import { cn } from '@/lib/utils';
+import { Check, Pencil, Trash2, X } from 'lucide-react';
+import {
+ MODEL_GROUPS,
+ ALL_MODELS,
+ SCRAPER_GROUPS,
+ ALL_SCRAPERS,
+} from '@/config/prompt-options';
+
+interface TopicOption {
+ id: string;
+ name: string;
+}
+
+interface PromptSuggestionCardProps {
+ text: string;
+ category: string;
+ isActive: boolean;
+ onToggle: () => void;
+ onTextChange: (text: string) => void;
+ onDelete?: () => void;
+ regions?: string[];
+ models?: string[];
+ platforms?: string[];
+ topics?: TopicOption[];
+ allowedScraperIds?: string[];
+ allowedModelIds?: string[];
+ onModelsChange?: (models: string[]) => void;
+ onPlatformsChange?: (platforms: string[]) => void;
+ onCategoryChange?: (category: string) => void;
+ mode?: 'review' | 'manage';
+}
+
+const TOPIC_COLOR_PALETTE = [
+ 'bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400',
+ 'bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-400',
+ 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400',
+ 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400',
+ 'bg-cyan-100 text-cyan-800 dark:bg-cyan-900/30 dark:text-cyan-400',
+ 'bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-400',
+ 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400',
+ 'bg-pink-100 text-pink-800 dark:bg-pink-900/30 dark:text-pink-400',
+ 'bg-indigo-100 text-indigo-800 dark:bg-indigo-900/30 dark:text-indigo-400',
+ 'bg-teal-100 text-teal-800 dark:bg-teal-900/30 dark:text-teal-400',
+];
+
+function getTopicColor(name: string): string {
+ let hash = 0;
+ for (let i = 0; i < name.length; i++) {
+ hash = name.charCodeAt(i) + ((hash << 5) - hash);
+ }
+ return TOPIC_COLOR_PALETTE[Math.abs(hash) % TOPIC_COLOR_PALETTE.length];
+}
+
+export const PromptSuggestionCard = memo(function PromptSuggestionCard({
+ text,
+ category,
+ isActive,
+ onToggle,
+ onTextChange,
+ onDelete,
+ regions,
+ models,
+ platforms,
+ topics,
+ allowedScraperIds,
+ allowedModelIds,
+ onModelsChange,
+ onPlatformsChange,
+ onCategoryChange,
+ mode = 'review',
+}: PromptSuggestionCardProps) {
+ const [isEditing, setIsEditing] = useState(false);
+ const [editText, setEditText] = useState(text);
+ const [editCategory, setEditCategory] = useState(category);
+ const [editModels, setEditModels] = useState<string[]>(models ?? []);
+ const [editPlatforms, setEditPlatforms] = useState<string[]>(platforms ?? []);
+
+ const visibleScrapers = allowedScraperIds
+ ? ALL_SCRAPERS.filter((s) => allowedScraperIds.includes(s.id))
+ : ALL_SCRAPERS;
+ const visibleModels = allowedModelIds
+ ? ALL_MODELS.filter((m) => allowedModelIds.includes(m.id))
+ : ALL_MODELS;
+ const hasAnySelection = editPlatforms.length > 0 || editModels.length > 0;
+
+ const handleSave = () => {
+ if (!editText.trim() || !hasAnySelection) return;
+ onTextChange(editText.trim());
+ if (onCategoryChange && editCategory !== category) onCategoryChange(editCategory);
+ if (onModelsChange) onModelsChange(editModels);
+ if (onPlatformsChange) onPlatformsChange(editPlatforms);
+ setIsEditing(false);
+ };
+
+ const handleCancel = () => {
+ setEditText(text);
+ setEditCategory(category);
+ setEditModels(models ?? []);
+ setEditPlatforms(platforms ?? []);
+ setIsEditing(false);
+ };
+
+ return (
+ <div
+ className={cn(
+ 'group flex items-start gap-3 rounded-lg border p-3 transition-colors',
+ isActive
+ ? 'border-border bg-card'
+ : 'border-border/50 bg-muted/30 opacity-60',
+ )}
+ >
+ {/* Toggle checkbox */}
+ <button
+ type="button"
+ onClick={onToggle}
+ className={cn(
+ 'mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded border-2 transition-colors',
+ isActive
+ ? 'border-primary bg-primary text-primary-foreground'
+ : 'border-muted-foreground/40',
+ )}
+ >
+ {isActive && <Check className="h-3 w-3" />}
+ </button>
+
+ {/* Content */}
+ <div className="flex-1 min-w-0">
+ {isEditing ? (
+ <div className="space-y-2">
+ <div className="flex items-center gap-2">
+ <Input
+ value={editText}
+ onChange={(e) => setEditText(e.target.value)}
+ className="h-8 text-sm"
+ autoFocus
+ onKeyDown={(e) => {
+ if (e.key === 'Enter') handleSave();
+ if (e.key === 'Escape') handleCancel();
+ }}
+ />
+ <Button
+ size="icon"
+ variant="ghost"
+ className="h-7 w-7 shrink-0"
+ onClick={handleSave}
+ disabled={!editText.trim() || !hasAnySelection}
+ >
+ <Check className="h-3.5 w-3.5" />
+ </Button>
+ <Button
+ size="icon"
+ variant="ghost"
+ className="h-7 w-7 shrink-0"
+ onClick={handleCancel}
+ >
+ <X className="h-3.5 w-3.5" />
+ </Button>
+ </div>
+
+ {mode === 'manage' && (
+ <div className="grid gap-2 sm:grid-cols-2">
+ {/* Topic */}
+ {onCategoryChange && topics && topics.length > 0 && (
+ <div>
+ <label className="mb-1.5 block text-xs font-medium text-muted-foreground">
+ Topic
+ </label>
+ <Select value={editCategory} onValueChange={(v) => v && setEditCategory(v)}>
+ <SelectTrigger className="w-full">
+ <SelectValue placeholder="Select a topic" />
+ </SelectTrigger>
+ <SelectContent>
+ {topics.map((t) => (
+ <SelectItem key={t.id} value={t.name}>
+ {t.name}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+ )}
+
+ {/* Platform & Models — combined select */}
+ {(onModelsChange || onPlatformsChange) && (
+ <div>
+ <label className="mb-1.5 block text-xs font-medium text-muted-foreground">
+ Platform & Models
+ </label>
+ <Select
+ value="__placeholder__"
+ onValueChange={(v) => {
+ if (!v || v === '__placeholder__') return;
+ if (
+ visibleModels.some((m) => m.id === v) &&
+ !editModels.includes(v)
+ ) {
+ setEditModels((prev) => [...prev, v]);
+ } else if (
+ visibleScrapers.some((s) => s.id === v) &&
+ !editPlatforms.includes(v)
+ ) {
+ setEditPlatforms((prev) => [...prev, v]);
+ }
+ }}
+ >
+ <SelectTrigger className="w-full">
+ <span className="truncate text-muted-foreground">
+ {editModels.length + editPlatforms.length > 0
+ ? `${editModels.length + editPlatforms.length} selected`
+ : 'Select platform & models'}
+ </span>
+ </SelectTrigger>
+ <SelectContent>
+ {SCRAPER_GROUPS.map((group) => {
+ const scrapers = group.scrapers.filter((s) =>
+ visibleScrapers.some((vs) => vs.id === s.id),
+ );
+ if (scrapers.length === 0) return null;
+ return (
+ <div key={group.provider}>
+ <div className="px-2 py-1.5 text-xs font-semibold text-muted-foreground">
+ {group.provider} (Scraper)
+ </div>
+ {scrapers.map((s) => (
+ <SelectItem
+ key={s.id}
+ value={s.id}
+ disabled={editPlatforms.includes(s.id)}
+ >
+ <div>
+ <div>{s.label}</div>
+ <div className="text-[10px] text-muted-foreground font-mono">
+ {s.id}
+ </div>
+ </div>
+ </SelectItem>
+ ))}
+ </div>
+ );
+ })}
+ {MODEL_GROUPS.map((group) => {
+ const groupModels = group.models.filter((m) =>
+ visibleModels.some((vm) => vm.id === m.id),
+ );
+ if (groupModels.length === 0) return null;
+ return (
+ <div key={group.provider}>
+ <div className="px-2 py-1.5 text-xs font-semibold text-muted-foreground">
+ {group.provider} (API)
+ </div>
+ {groupModels.map((m) => (
+ <SelectItem
+ key={m.id}
+ value={m.id}
+ disabled={editModels.includes(m.id)}
+ >
+ <div>
+ <div>{m.label}</div>
+ <div className="text-[10px] text-muted-foreground font-mono">
+ {m.id}
+ </div>
+ </div>
+ </SelectItem>
+ ))}
+ </div>
+ );
+ })}
+ </SelectContent>
+ </Select>
+ {(editModels.length > 0 || editPlatforms.length > 0) && (
+ <div className="mt-1.5 flex flex-wrap gap-1">
+ {editPlatforms.map((id) => {
+ const s = ALL_SCRAPERS.find((as_) => as_.id === id);
+ return (
+ <Badge
+ key={id}
+ variant="outline"
+ className="gap-1 text-xs"
+ >
+ {s?.label ?? id}
+ <button
+ type="button"
+ onClick={() =>
+ setEditPlatforms((p) =>
+ p.filter((i) => i !== id),
+ )
+ }
+ >
+ <X className="h-3 w-3" />
+ </button>
+ </Badge>
+ );
+ })}
+ {editModels.map((id) => {
+ const m = ALL_MODELS.find((am) => am.id === id);
+ return (
+ <Badge
+ key={id}
+ variant="secondary"
+ className="gap-1 text-xs"
+ >
+ {m?.label ?? id}
+ <button
+ type="button"
+ onClick={() =>
+ setEditModels((p) =>
+ p.filter((i) => i !== id),
+ )
+ }
+ >
+ <X className="h-3 w-3" />
+ </button>
+ </Badge>
+ );
+ })}
+ </div>
+ )}
+ </div>
+ )}
+
+ </div>
+ )}
+ </div>
+ ) : (
+ <div className="flex items-start justify-between gap-2">
+ <p className="text-sm leading-relaxed">{text}</p>
+ <div className="flex shrink-0 items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity">
+ <Button
+ size="icon"
+ variant="ghost"
+ className="h-7 w-7"
+ onClick={() => setIsEditing(true)}
+ >
+ <Pencil className="h-3 w-3" />
+ </Button>
+ {mode === 'manage' && onDelete && (
+ <Dialog>
+ <DialogTrigger
+ render={
+ <Button
+ size="icon"
+ variant="ghost"
+ className="h-7 w-7 text-destructive hover:text-destructive"
+ />
+ }
+ >
+ <Trash2 className="h-3 w-3" />
+ </DialogTrigger>
+ <DialogContent className="sm:max-w-sm">
+ <DialogHeader>
+ <DialogTitle>Delete Prompt</DialogTitle>
+ <DialogDescription>
+ Are you sure you want to delete this prompt? This action
+ cannot be undone.
+ </DialogDescription>
+ </DialogHeader>
+ <p className="rounded-md bg-muted p-3 text-sm text-muted-foreground line-clamp-2">
+ {text}
+ </p>
+ <DialogFooter>
+ <DialogClose render={<Button variant="outline" />}>
+ Cancel
+ </DialogClose>
+ <DialogClose
+ render={
+ <Button variant="destructive" onClick={onDelete} />
+ }
+ >
+ Delete
+ </DialogClose>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ )}
+ </div>
+ </div>
+ )}
+ <div className="mt-1.5 flex flex-wrap gap-1">
+ <Badge
+ variant="secondary"
+ className={cn(
+ 'text-[10px] font-medium uppercase tracking-wider',
+ getTopicColor(category),
+ )}
+ >
+ {category}
+ </Badge>
+ {regions &&
+ regions.length > 0 &&
+ regions.map((r) => (
+ <Badge key={r} variant="outline" className="text-[10px]">
+ {r}
+ </Badge>
+ ))}
+ {models &&
+ models.length > 0 &&
+ models.map((m) => {
+ const model = ALL_MODELS.find((am) => am.id === m);
+ return (
+ <Badge
+ key={m}
+ variant="outline"
+ className="text-[10px] border-primary/30 text-primary"
+ >
+ {model?.label ?? m}
+ </Badge>
+ );
+ })}
+ {platforms &&
+ platforms.length > 0 &&
+ platforms.map((p) => {
+ const scraper = ALL_SCRAPERS.find((as_) => as_.id === p);
+ return (
+ <Badge
+ key={p}
+ variant="outline"
+ className="text-[10px] border-primary/30 text-primary"
+ >
+ {scraper?.label ?? p}
+ </Badge>
+ );
+ })}
+ </div>
+ </div>
+ </div>
+ );
+});
diff --git a/web/src/components/layout/brand-switcher.tsx b/web/src/components/layout/brand-switcher.tsx
new file mode 100644
index 000000000..7252dec8b
--- /dev/null
+++ b/web/src/components/layout/brand-switcher.tsx
@@ -0,0 +1,138 @@
+"use client";
+
+import { useTranslations } from "next-intl";
+import { useRouter } from "@/i18n/navigation";
+import { useBrandStore } from "@/stores/use-brand-store";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuGroup,
+ DropdownMenuItem,
+ DropdownMenuLabel,
+ DropdownMenuSeparator,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
+import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
+import { cn } from "@/lib/utils";
+import { Check, ChevronsUpDown, Plus } from "lucide-react";
+
+interface BrandSwitcherProps {
+ collapsed?: boolean;
+}
+
+export function BrandSwitcher({ collapsed = false }: BrandSwitcherProps) {
+ const t = useTranslations("brands");
+ const router = useRouter();
+ const { brands, activeBrandId, setActiveBrand } = useBrandStore();
+
+ const activeBrand = brands.find((b) => b.id === activeBrandId) ?? null;
+
+ const initials = (name: string) =>
+ name
+ .split(" ")
+ .map((w) => w[0])
+ .join("")
+ .toUpperCase()
+ .slice(0, 2);
+
+ if (brands.length === 0) {
+ return (
+ <button
+ onClick={() => router.push("/dashboard/brands/new")}
+ className={cn(
+ "flex w-full items-center gap-2 rounded-md border border-dashed px-2 py-2 text-sm text-muted-foreground transition-colors hover:border-primary hover:text-primary",
+ collapsed && "justify-center px-0"
+ )}
+ title={collapsed ? t("addBrand") : undefined}
+ >
+ <Plus className="h-4 w-4 shrink-0" />
+ {!collapsed && (
+ <span className="truncate text-xs">{t("addBrand")}</span>
+ )}
+ </button>
+ );
+ }
+
+ return (
+ <DropdownMenu>
+ <DropdownMenuTrigger
+ className={cn(
+ "flex w-full items-center gap-2 rounded-md px-2 py-2 text-sm transition-colors hover:bg-accent focus-visible:outline-none",
+ collapsed && "justify-center px-0"
+ )}
+ aria-label={t("switchBrand")}
+ >
+ <Avatar className="h-6 w-6 shrink-0 rounded-md">
+ <AvatarImage src={activeBrand?.logoUrl} alt={activeBrand?.name} />
+ <AvatarFallback className="rounded-md bg-primary text-primary-foreground text-xs font-semibold">
+ {activeBrand ? initials(activeBrand.name) : "?"}
+ </AvatarFallback>
+ </Avatar>
+
+ {!collapsed && (
+ <>
+ <span className="flex-1 truncate text-left text-sm font-medium">
+ {activeBrand?.name ?? t("selectBrand")}
+ </span>
+ <ChevronsUpDown className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
+ </>
+ )}
+ </DropdownMenuTrigger>
+
+ <DropdownMenuContent
+ className="w-56"
+ align="start"
+ side="bottom"
+ sideOffset={4}
+ >
+ <DropdownMenuGroup>
+ <DropdownMenuLabel className="text-xs text-muted-foreground">
+ {t("switchBrand")}
+ </DropdownMenuLabel>
+ </DropdownMenuGroup>
+ <DropdownMenuSeparator />
+
+ {brands.map((brand) => {
+ const isActive = brand.id === activeBrandId;
+ const primaryDomain = brand.domains.find((d) => d.isPrimary);
+
+ return (
+ <DropdownMenuItem
+ key={brand.id}
+ onClick={() => setActiveBrand(brand.id)}
+ className="flex items-center gap-2"
+ >
+ <Avatar className="h-5 w-5 shrink-0 rounded-md">
+ <AvatarImage src={brand.logoUrl} alt={brand.name} />
+ <AvatarFallback className="rounded-md bg-primary/10 text-primary text-xs font-semibold">
+ {initials(brand.name)}
+ </AvatarFallback>
+ </Avatar>
+ <div className="flex-1 overflow-hidden">
+ <p className="truncate text-sm font-medium">{brand.name}</p>
+ {primaryDomain && (
+ <p className="truncate text-xs text-muted-foreground">
+ {primaryDomain.domain}
+ </p>
+ )}
+ </div>
+ {isActive && <Check className="h-3.5 w-3.5 shrink-0 text-primary" />}
+ </DropdownMenuItem>
+ );
+ })}
+
+ <DropdownMenuSeparator />
+
+ <DropdownMenuItem
+ onClick={() => router.push("/dashboard/brands")}
+ className="flex items-center gap-2 text-muted-foreground"
+ >
+ <div className="flex h-5 w-5 shrink-0 items-center justify-center rounded-md border">
+ <Plus className="h-3 w-3" />
+ </div>
+ <span className="text-sm">{t("addBrand")}</span>
+ </DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ );
+}
diff --git a/web/src/components/layout/header.tsx b/web/src/components/layout/header.tsx
new file mode 100644
index 000000000..46b3cf234
--- /dev/null
+++ b/web/src/components/layout/header.tsx
@@ -0,0 +1,103 @@
+"use client";
+
+import { useTranslations } from "next-intl";
+import { useRouter } from "@/i18n/navigation";
+import { createClient } from "@/lib/supabase/client";
+import { Button } from "@/components/ui/button";
+import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuLabel,
+ DropdownMenuSeparator,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
+import { LogOut, Settings } from "lucide-react";
+import type { User as SupabaseUser } from "@supabase/supabase-js";
+
+interface HeaderProps {
+ user: SupabaseUser | null;
+}
+
+export function Header({ user }: HeaderProps) {
+ const t = useTranslations("auth");
+ const router = useRouter();
+
+ async function handleSignOut() {
+ const supabase = createClient();
+ await supabase.auth.signOut();
+ router.push("/sign-in");
+ router.refresh();
+ }
+
+ const initials = user?.user_metadata?.full_name
+ ? user.user_metadata.full_name
+ .split(" ")
+ .map((n: string) => n[0])
+ .join("")
+ .toUpperCase()
+ .slice(0, 2)
+ : user?.email?.[0]?.toUpperCase() ?? "U";
+
+ return (
+ <header className="flex h-16 items-center justify-between border-b bg-card px-6">
+ <div className="flex items-center gap-4">
+ {/* Breadcrumb / page title slot — filled by each page */}
+ <div id="page-title" />
+ </div>
+
+ <div className="flex items-center gap-3">
+ <DropdownMenu>
+ <DropdownMenuTrigger
+ render={
+ <Button
+ variant="ghost"
+ className="relative h-9 w-9 rounded-full"
+ size="icon"
+ />
+ }
+ >
+ <Avatar className="h-9 w-9">
+ <AvatarImage
+ src={user?.user_metadata?.avatar_url}
+ alt={user?.user_metadata?.full_name ?? user?.email}
+ />
+ <AvatarFallback className="text-xs font-semibold">
+ {initials}
+ </AvatarFallback>
+ </Avatar>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end" className="w-56">
+ <DropdownMenuLabel className="font-normal">
+ <div className="flex flex-col gap-1">
+ <p className="text-sm font-medium">
+ {user?.user_metadata?.full_name ?? "Account"}
+ </p>
+ <p className="text-xs text-muted-foreground truncate">
+ {user?.email}
+ </p>
+ </div>
+ </DropdownMenuLabel>
+ <DropdownMenuSeparator />
+ <DropdownMenuItem
+ className="flex items-center gap-2 cursor-pointer"
+ onClick={() => (window.location.href = "/dashboard/settings")}
+ >
+ <Settings className="h-4 w-4" />
+ Settings
+ </DropdownMenuItem>
+ <DropdownMenuSeparator />
+ <DropdownMenuItem
+ onClick={handleSignOut}
+ className="flex items-center gap-2 text-destructive focus:text-destructive cursor-pointer"
+ >
+ <LogOut className="h-4 w-4" />
+ {t("signOut")}
+ </DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ </div>
+ </header>
+ );
+}
diff --git a/web/src/components/layout/mobile-nav.tsx b/web/src/components/layout/mobile-nav.tsx
new file mode 100644
index 000000000..d4d59029f
--- /dev/null
+++ b/web/src/components/layout/mobile-nav.tsx
@@ -0,0 +1,128 @@
+'use client';
+
+import { useState } from 'react';
+import { useTranslations } from 'next-intl';
+import { usePathname, Link } from '@/i18n/navigation';
+import { dashboardNav } from '@/config/dashboard';
+import { useFeatureGate } from '@/hooks/use-feature-gate';
+import { siteConfig } from '@/config/site';
+import { cn } from '@/lib/utils';
+import { Button } from '@/components/ui/button';
+import { Badge } from '@/components/ui/badge';
+import { Sheet, SheetContent, SheetTrigger } from '@/components/ui/sheet';
+import { useBrandStore } from '@/stores/use-brand-store';
+import { Crown, Menu, MessageSquareText } from 'lucide-react';
+
+export function MobileNav() {
+ const [open, setOpen] = useState(false);
+ const pathname = usePathname();
+ const t = useTranslations('nav');
+ const tBrands = useTranslations('brands');
+ const { canUse, requiredPlanFor, isCloud } = useFeatureGate();
+ const { activeBrandId } = useBrandStore();
+
+ const getLabel = (title: string): string => {
+ const map: Record<string, string> = {
+ Overview: t('overview'),
+ Brands: tBrands('title'),
+ 'Answer Engine Insights': t('insights'),
+ 'AI Traffic Analytics': t('traffic'),
+ Prompts: t('prompts'),
+ 'Content Optimization': t('content'),
+ Competitors: t('competitors'),
+ Citations: t('citations'),
+ Reports: t('reports'),
+ Settings: t('settings'),
+ };
+ return map[title] ?? title;
+ };
+
+ return (
+ <Sheet open={open} onOpenChange={setOpen}>
+ <SheetTrigger
+ render={<Button variant="ghost" size="icon" className="md:hidden" />}
+ >
+ <Menu className="h-5 w-5" />
+ <span className="sr-only">Toggle menu</span>
+ </SheetTrigger>
+ <SheetContent side="left" className="w-64 p-0">
+ <div className="flex h-16 items-center border-b px-4">
+ <span className="font-semibold">{siteConfig.name}</span>
+ </div>
+ <nav className="space-y-0.5 p-3">
+ {activeBrandId && (
+ <Link
+ href={`/dashboard/brands/${activeBrandId}/prompts`}
+ onClick={() => setOpen(false)}
+ >
+ <span
+ className={cn(
+ 'flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors',
+ pathname.includes(`/brands/${activeBrandId}/prompts`)
+ ? 'bg-primary/10 text-primary'
+ : 'text-muted-foreground hover:bg-accent hover:text-accent-foreground',
+ )}
+ >
+ <MessageSquareText className="h-4 w-4 shrink-0" />
+ Prompts
+ </span>
+ </Link>
+ )}
+ {dashboardNav.flatMap((group) =>
+ group.items.map((item) => {
+ const isActive =
+ item.href === '/dashboard'
+ ? pathname === '/dashboard'
+ : pathname.startsWith(item.href);
+ const label = getLabel(item.title);
+
+ const isLocked =
+ isCloud &&
+ item.requiredFeature != null &&
+ !canUse(item.requiredFeature);
+
+ if (isLocked) {
+ return (
+ <span
+ key={item.href}
+ className="flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium text-muted-foreground/50 cursor-not-allowed"
+ >
+ <item.icon className="h-4 w-4 shrink-0" />
+ <span className="flex-1">{label}</span>
+ <Badge
+ variant="outline"
+ className="h-5 gap-0.5 px-1.5 text-[10px] font-normal"
+ >
+ <Crown className="h-2.5 w-2.5" />
+ {requiredPlanFor(item.requiredFeature!)}
+ </Badge>
+ </span>
+ );
+ }
+
+ return (
+ <Link
+ key={item.href}
+ href={item.href}
+ onClick={() => setOpen(false)}
+ >
+ <span
+ className={cn(
+ 'flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors',
+ isActive
+ ? 'bg-primary/10 text-primary'
+ : 'text-muted-foreground hover:bg-accent hover:text-accent-foreground',
+ )}
+ >
+ <item.icon className="h-4 w-4 shrink-0" />
+ {label}
+ </span>
+ </Link>
+ );
+ }),
+ )}
+ </nav>
+ </SheetContent>
+ </Sheet>
+ );
+}
diff --git a/web/src/components/layout/sidebar-error-boundary.tsx b/web/src/components/layout/sidebar-error-boundary.tsx
new file mode 100644
index 000000000..734ac4c58
--- /dev/null
+++ b/web/src/components/layout/sidebar-error-boundary.tsx
@@ -0,0 +1,44 @@
+"use client";
+
+import React from "react";
+
+interface Props {
+ children: React.ReactNode;
+}
+
+interface State {
+ hasError: boolean;
+}
+
+export class SidebarErrorBoundary extends React.Component<Props, State> {
+ constructor(props: Props) {
+ super(props);
+ this.state = { hasError: false };
+ }
+
+ static getDerivedStateFromError(): State {
+ return { hasError: true };
+ }
+
+ componentDidCatch() {
+ setTimeout(() => this.setState({ hasError: false }), 1000);
+ }
+
+ render() {
+ if (this.state.hasError) {
+ return (
+ <aside className="relative flex h-full w-60 flex-col border-r bg-card">
+ <div className="flex h-16 items-center border-b px-3">
+ <div className="flex items-center gap-2">
+ <div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-primary text-primary-foreground text-sm font-bold">
+ A
+ </div>
+ </div>
+ </div>
+ </aside>
+ );
+ }
+
+ return this.props.children;
+ }
+}
diff --git a/web/src/components/layout/sidebar.tsx b/web/src/components/layout/sidebar.tsx
new file mode 100644
index 000000000..8eea840d5
--- /dev/null
+++ b/web/src/components/layout/sidebar.tsx
@@ -0,0 +1,187 @@
+'use client';
+
+import Image from 'next/image';
+import { useTheme } from 'next-themes';
+import { useEffect, useState } from 'react';
+import { useTranslations } from 'next-intl';
+import { usePathname, Link } from '@/i18n/navigation';
+import { dashboardNav } from '@/config/dashboard';
+import { useSidebarStore } from '@/stores/use-sidebar-store';
+import { useFeatureGate } from '@/hooks/use-feature-gate';
+import { siteConfig } from '@/config/site';
+import { cn } from '@/lib/utils';
+import { Button } from '@/components/ui/button';
+import { Badge } from '@/components/ui/badge';
+import { ScrollArea } from '@/components/ui/scroll-area';
+import { Separator } from '@/components/ui/separator';
+import { BrandSwitcher } from '@/components/layout/brand-switcher';
+import {
+ Crown,
+ Lock,
+ PanelLeftClose,
+ PanelLeftOpen,
+} from 'lucide-react';
+
+export function Sidebar() {
+ const pathname = usePathname();
+ const { isCollapsed, toggleCollapse } = useSidebarStore();
+ const t = useTranslations('nav');
+ const tBrands = useTranslations('brands');
+ const { canUse, requiredPlanFor, isCloud } = useFeatureGate();
+ const { resolvedTheme } = useTheme();
+ const [mounted, setMounted] = useState(false);
+ useEffect(() => setMounted(true), []);
+ const logoSrc =
+ mounted && resolvedTheme === 'dark' ? '/logo_dark.svg' : '/logo_light.svg';
+
+ const navKeyMap: Record<string, () => string> = {
+ Overview: () => t('overview'),
+ Brands: () => tBrands('title'),
+ 'Answer Engine Insights': () => t('insights'),
+ 'AI Traffic Analytics': () => t('traffic'),
+ Prompts: () => t('prompts'),
+ Topics: () => t('topics'),
+ 'Content Optimization': () => t('content'),
+ Competitors: () => t('competitors'),
+ Citations: () => t('citations'),
+ Reports: () => t('reports'),
+ Settings: () => t('settings'),
+ };
+
+ return (
+ <aside
+ className={cn(
+ 'relative flex h-full flex-col border-r bg-card transition-all duration-300',
+ isCollapsed ? 'w-16' : 'w-60',
+ )}
+ >
+ {/* Logo */}
+ <div className="flex h-16 items-center border-b px-3">
+ <Link
+ href="/dashboard"
+ className="flex items-center gap-2 overflow-hidden"
+ >
+ <Image
+ src={logoSrc}
+ alt={siteConfig.name}
+ width={24}
+ height={24}
+ className="h-6 w-6 shrink-0"
+ priority
+ />
+ {!isCollapsed && (
+ <span className="truncate font-semibold">{siteConfig.name}</span>
+ )}
+ </Link>
+ </div>
+
+ {/* Brand Switcher */}
+ <div
+ className={cn('border-b px-2 py-2', isCollapsed && 'px-1')}
+ >
+ <BrandSwitcher collapsed={isCollapsed} />
+ </div>
+
+ {/* Nav */}
+ <ScrollArea className="flex-1 px-2 py-3">
+ {dashboardNav.map((group, i) => (
+ <div key={i} className="mb-4">
+ {group.title && !isCollapsed && (
+ <p className="mb-1 px-2 text-xs font-medium uppercase tracking-wider text-muted-foreground">
+ {group.title}
+ </p>
+ )}
+ {group.title && isCollapsed && i > 0 && (
+ <Separator className="my-2" />
+ )}
+ <nav className="space-y-0.5">
+ {group.items.map((item) => {
+ const isActive =
+ item.href === '/dashboard'
+ ? pathname === '/dashboard'
+ : pathname.startsWith(item.href);
+ const labelFn = navKeyMap[item.title];
+ const label = labelFn ? labelFn() : item.title;
+
+ const isLocked =
+ isCloud &&
+ item.requiredFeature != null &&
+ !canUse(item.requiredFeature);
+
+ if (isLocked) {
+ return (
+ <span
+ key={item.href}
+ className={cn(
+ 'flex items-center gap-3 rounded-md px-2 py-2 text-sm font-medium text-muted-foreground/50 cursor-not-allowed',
+ isCollapsed && 'justify-center',
+ )}
+ title={
+ isCollapsed
+ ? `${label} (${requiredPlanFor(item.requiredFeature!)})`
+ : undefined
+ }
+ >
+ <item.icon className="h-4 w-4 shrink-0" />
+ {!isCollapsed && (
+ <>
+ <span className="flex-1 truncate">{label}</span>
+ <Badge
+ variant="outline"
+ className="ml-auto h-5 gap-0.5 px-1.5 text-[10px] font-normal shrink-0"
+ >
+ <Crown className="h-2.5 w-2.5" />
+ {requiredPlanFor(item.requiredFeature!)}
+ </Badge>
+ </>
+ )}
+ {isCollapsed && (
+ <Lock className="absolute right-1 top-1 h-2.5 w-2.5 text-muted-foreground/40" />
+ )}
+ </span>
+ );
+ }
+
+ return (
+ <Link key={item.href} href={item.href}>
+ <span
+ className={cn(
+ 'flex items-center gap-3 rounded-md px-2 py-2 text-sm font-medium transition-colors',
+ isActive
+ ? 'bg-primary/10 text-primary'
+ : 'text-muted-foreground hover:bg-accent hover:text-accent-foreground',
+ isCollapsed && 'justify-center',
+ )}
+ title={isCollapsed ? label : undefined}
+ >
+ <item.icon className="h-4 w-4 shrink-0" />
+ {!isCollapsed && (
+ <span className="truncate">{label}</span>
+ )}
+ </span>
+ </Link>
+ );
+ })}
+ </nav>
+ </div>
+ ))}
+ </ScrollArea>
+
+ {/* Collapse toggle */}
+ <div className="border-t p-2">
+ <Button
+ variant="ghost"
+ size="icon"
+ className="w-full"
+ onClick={toggleCollapse}
+ >
+ {isCollapsed ? (
+ <PanelLeftOpen className="h-4 w-4" />
+ ) : (
+ <PanelLeftClose className="h-4 w-4" />
+ )}
+ </Button>
+ </div>
+ </aside>
+ );
+}
diff --git a/web/src/components/marketing/marketing-footer.tsx b/web/src/components/marketing/marketing-footer.tsx
new file mode 100644
index 000000000..4af61e790
--- /dev/null
+++ b/web/src/components/marketing/marketing-footer.tsx
@@ -0,0 +1,30 @@
+import { Link } from "@/i18n/navigation";
+import { siteConfig } from "@/config/site";
+
+export function MarketingFooter() {
+ return (
+ <footer className="border-t py-8">
+ <div className="container flex flex-col items-center justify-between gap-4 md:flex-row">
+ <p className="text-sm text-muted-foreground">
+ &copy; {new Date().getFullYear()} {siteConfig.name}. Open source under MIT license.
+ </p>
+ <div className="flex items-center gap-4 text-sm text-muted-foreground">
+ <Link href="/terms" className="hover:text-foreground transition-colors">
+ Terms
+ </Link>
+ <Link href="/privacy" className="hover:text-foreground transition-colors">
+ Privacy
+ </Link>
+ <a
+ href={siteConfig.links.github}
+ target="_blank"
+ rel="noopener noreferrer"
+ className="hover:text-foreground transition-colors"
+ >
+ GitHub
+ </a>
+ </div>
+ </div>
+ </footer>
+ );
+}
diff --git a/web/src/components/marketing/marketing-header.tsx b/web/src/components/marketing/marketing-header.tsx
new file mode 100644
index 000000000..f23968d84
--- /dev/null
+++ b/web/src/components/marketing/marketing-header.tsx
@@ -0,0 +1,31 @@
+import { useTranslations } from "next-intl";
+import { Link } from "@/i18n/navigation";
+import { Button } from "@/components/ui/button";
+import { siteConfig } from "@/config/site";
+
+export function MarketingHeader() {
+ const t = useTranslations("auth");
+
+ return (
+ <header className="sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
+ <div className="container flex h-16 items-center justify-between">
+ <Link href="/sign-in" className="flex items-center gap-2">
+ <span className="text-xl font-bold tracking-tight">
+ {siteConfig.name}
+ </span>
+ </Link>
+
+ <div className="flex items-center gap-3">
+ <Link href="/sign-in">
+ <Button variant="ghost" size="sm">
+ {t("signIn")}
+ </Button>
+ </Link>
+ <Link href="/sign-up">
+ <Button size="sm">{t("createAccount")}</Button>
+ </Link>
+ </div>
+ </div>
+ </header>
+ );
+}
diff --git a/web/src/components/providers/auth-provider.tsx b/web/src/components/providers/auth-provider.tsx
new file mode 100644
index 000000000..c282a3a39
--- /dev/null
+++ b/web/src/components/providers/auth-provider.tsx
@@ -0,0 +1,20 @@
+"use client";
+
+import { useEffect } from "react";
+import type { User } from "@supabase/supabase-js";
+import { useAuthStore } from "@/stores/use-auth-store";
+
+interface AuthProviderProps {
+ user: User | null;
+}
+
+export function AuthProvider({ user }: AuthProviderProps) {
+ const { setUser, setLoading } = useAuthStore();
+
+ useEffect(() => {
+ setUser(user);
+ setLoading(false);
+ }, [user, setUser, setLoading]);
+
+ return null;
+}
diff --git a/web/src/components/providers/brand-guard.tsx b/web/src/components/providers/brand-guard.tsx
new file mode 100644
index 000000000..095b1bb57
--- /dev/null
+++ b/web/src/components/providers/brand-guard.tsx
@@ -0,0 +1,154 @@
+"use client";
+
+import { useSyncExternalStore, useCallback } from "react";
+import { useBrandStore } from "@/stores/use-brand-store";
+import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
+import { Button } from "@/components/ui/button";
+import { Card, CardContent } from "@/components/ui/card";
+import { Skeleton } from "@/components/ui/skeleton";
+import { Link } from "@/i18n/navigation";
+import { Building2, Plus, ChevronRight } from "lucide-react";
+import { usePathname } from "@/i18n/navigation";
+
+const BRAND_EXEMPT_PATHS = [
+ "/dashboard/brands",
+ "/dashboard/settings",
+ "/dashboard/onboarding",
+];
+
+function isExempt(pathname: string) {
+ return BRAND_EXEMPT_PATHS.some(
+ (p) => pathname === p || pathname.startsWith(p + "/"),
+ );
+}
+
+const emptySubscribe = () => () => {};
+
+export function BrandGuard({ children }: { children: React.ReactNode }) {
+ const pathname = usePathname();
+ const brands = useBrandStore((s) => s.brands);
+ const activeBrandId = useBrandStore((s) => s.activeBrandId);
+ const setActiveBrand = useBrandStore((s) => s.setActiveBrand);
+ const hydrated = useSyncExternalStore(
+ emptySubscribe,
+ useCallback(() => true, []),
+ useCallback(() => false, []),
+ );
+
+ if (isExempt(pathname)) {
+ return <>{children}</>;
+ }
+
+ if (!hydrated) {
+ return <BrandGuardSkeleton />;
+ }
+
+ if (brands.length === 0) {
+ return <NoBrandsState />;
+ }
+
+ const activeBrand = brands.find((b) => b.id === activeBrandId);
+
+ if (!activeBrand) {
+ return (
+ <BrandSelector
+ brands={brands}
+ onSelect={(id) => setActiveBrand(id)}
+ />
+ );
+ }
+
+ return <>{children}</>;
+}
+
+function BrandGuardSkeleton() {
+ return (
+ <div className="space-y-6">
+ <div className="space-y-2">
+ <Skeleton className="h-8 w-64" />
+ <Skeleton className="h-4 w-80" />
+ </div>
+ <div className="grid grid-cols-2 gap-4 sm:grid-cols-4">
+ {Array.from({ length: 4 }).map((_, i) => (
+ <Card key={i}>
+ <CardContent className="pt-6 space-y-2">
+ <Skeleton className="h-4 w-24" />
+ <Skeleton className="h-8 w-16" />
+ </CardContent>
+ </Card>
+ ))}
+ </div>
+ </div>
+ );
+}
+
+function NoBrandsState() {
+ return (
+ <div className="flex flex-col items-center justify-center py-24 text-center">
+ <div className="mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-muted">
+ <Building2 className="h-8 w-8 text-muted-foreground" />
+ </div>
+ <h2 className="text-xl font-semibold">No brands yet</h2>
+ <p className="mt-2 max-w-sm text-sm text-muted-foreground">
+ Create your first brand to start tracking how AI engines talk about you.
+ </p>
+ <Link href="/dashboard/brands/new" className="mt-6">
+ <Button className="gap-2">
+ <Plus className="h-4 w-4" />
+ Create Brand
+ </Button>
+ </Link>
+ </div>
+ );
+}
+
+function BrandSelector({
+ brands,
+ onSelect,
+}: {
+ brands: { id: string; name: string; logoUrl?: string }[];
+ onSelect: (id: string) => void;
+}) {
+ const initials = (name: string) =>
+ name
+ .split(" ")
+ .map((w) => w[0])
+ .join("")
+ .toUpperCase()
+ .slice(0, 2);
+
+ return (
+ <div className="flex flex-col items-center justify-center py-24 text-center">
+ <div className="mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-muted">
+ <Building2 className="h-8 w-8 text-muted-foreground" />
+ </div>
+ <h2 className="text-xl font-semibold">Select a brand</h2>
+ <p className="mt-2 max-w-sm text-sm text-muted-foreground">
+ Choose which brand you want to work with.
+ </p>
+
+ <div className="mt-8 grid w-full max-w-md gap-3">
+ {brands.map((brand) => (
+ <Card
+ key={brand.id}
+ className="cursor-pointer transition-colors hover:bg-accent"
+ onClick={() => onSelect(brand.id)}
+ >
+ <CardContent className="flex items-center gap-3 p-4">
+ <Avatar className="h-9 w-9 rounded-md">
+ <AvatarImage src={brand.logoUrl} alt={brand.name} />
+ <AvatarFallback className="rounded-md bg-primary text-primary-foreground text-sm font-semibold">
+ {initials(brand.name)}
+ </AvatarFallback>
+ </Avatar>
+ <span className="flex-1 text-left text-sm font-medium">
+ {brand.name}
+ </span>
+ <ChevronRight className="h-4 w-4 text-muted-foreground" />
+ </CardContent>
+ </Card>
+ ))}
+ </div>
+ </div>
+ );
+}
diff --git a/web/src/components/providers/brand-loader.tsx b/web/src/components/providers/brand-loader.tsx
new file mode 100644
index 000000000..7468f72cb
--- /dev/null
+++ b/web/src/components/providers/brand-loader.tsx
@@ -0,0 +1,23 @@
+"use client";
+
+import { useEffect } from "react";
+import { useBrandStore } from "@/stores/use-brand-store";
+import type { Brand } from "@/types";
+
+interface BrandLoaderProps {
+ brands: Brand[];
+}
+
+/**
+ * Hydrates the brand store with server-fetched brands on mount.
+ * Placed in the dashboard layout so brands are always available.
+ */
+export function BrandLoader({ brands }: BrandLoaderProps) {
+ const setBrands = useBrandStore((s) => s.setBrands);
+
+ useEffect(() => {
+ setBrands(brands);
+ }, [brands, setBrands]);
+
+ return null;
+}
diff --git a/web/src/components/providers/font-provider.tsx b/web/src/components/providers/font-provider.tsx
new file mode 100644
index 000000000..6673e78dc
--- /dev/null
+++ b/web/src/components/providers/font-provider.tsx
@@ -0,0 +1,17 @@
+"use client";
+
+import { useEffect } from "react";
+import { useFontStore, FONT_OPTIONS } from "@/stores/use-font-store";
+
+export function FontProvider() {
+ const font = useFontStore((s) => s.font);
+
+ useEffect(() => {
+ const option = FONT_OPTIONS.find((o) => o.key === font);
+ if (option) {
+ document.documentElement.style.setProperty("--font-sans", option.family);
+ }
+ }, [font]);
+
+ return null;
+}
diff --git a/web/src/components/providers/plan-provider.tsx b/web/src/components/providers/plan-provider.tsx
new file mode 100644
index 000000000..e8296749b
--- /dev/null
+++ b/web/src/components/providers/plan-provider.tsx
@@ -0,0 +1,35 @@
+"use client";
+
+import { createContext, useContext } from "react";
+import type { PlanId } from "@/config/plans";
+
+interface PlanContextValue {
+ planId: PlanId;
+ isCloud: boolean;
+}
+
+const PlanContext = createContext<PlanContextValue>({
+ planId: "self_hosted",
+ isCloud: false,
+});
+
+export function PlanProvider({
+ planId,
+ children,
+}: {
+ planId: PlanId;
+ children: React.ReactNode;
+}) {
+ const isCloud = process.env.NEXT_PUBLIC_IS_CLOUD === "true";
+ const effectivePlan: PlanId = isCloud ? planId : "self_hosted";
+
+ return (
+ <PlanContext.Provider value={{ planId: effectivePlan, isCloud }}>
+ {children}
+ </PlanContext.Provider>
+ );
+}
+
+export function usePlanContext() {
+ return useContext(PlanContext);
+}
diff --git a/web/src/components/settings/billing-section.tsx b/web/src/components/settings/billing-section.tsx
new file mode 100644
index 000000000..ceb54afee
--- /dev/null
+++ b/web/src/components/settings/billing-section.tsx
@@ -0,0 +1,217 @@
+"use client";
+
+import { useEffect, useState } from "react";
+import { useTranslations } from "next-intl";
+import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
+import { Badge } from "@/components/ui/badge";
+import { Separator } from "@/components/ui/separator";
+import { Skeleton } from "@/components/ui/skeleton";
+import { PlanSwitcher } from "@/components/settings/plan-switcher";
+import { InvoiceList } from "@/components/settings/invoice-list";
+import { usePlanContext } from "@/components/providers/plan-provider";
+import { createClient } from "@/lib/supabase/client";
+import { PLANS, type PlanId } from "@/config/plans";
+
+interface SubscriptionData {
+ planId: string;
+ status: string;
+ currentPeriodEnd: string | null;
+ cancelAtPeriodEnd: boolean;
+ priceAmount: number | null;
+ interval: string | null;
+}
+
+function statusVariant(status: string) {
+ switch (status) {
+ case "active":
+ return "default" as const;
+ case "trialing":
+ return "secondary" as const;
+ case "past_due":
+ return "destructive" as const;
+ case "canceled":
+ return "destructive" as const;
+ default:
+ return "outline" as const;
+ }
+}
+
+function statusLabel(status: string) {
+ switch (status) {
+ case "active":
+ return "Active";
+ case "trialing":
+ return "Trial";
+ case "past_due":
+ return "Past Due";
+ case "canceled":
+ return "Canceled";
+ default:
+ return status;
+ }
+}
+
+export function BillingSection() {
+ const t = useTranslations("settings");
+ const { planId: contextPlanId } = usePlanContext();
+ const [subscription, setSubscription] = useState<SubscriptionData | null>(null);
+ const [loading, setLoading] = useState(true);
+
+ useEffect(() => {
+ async function loadSubscription() {
+ try {
+ // First: load org data directly from Supabase (reliable, no API route auth issues)
+ const supabase = createClient();
+ const { data: { user } } = await supabase.auth.getUser();
+ if (!user) return;
+
+ const { data: profile } = await supabase
+ .from("profiles")
+ .select("organization_id")
+ .eq("id", user.id)
+ .single();
+
+ if (!profile?.organization_id) return;
+
+ const { data: org } = await supabase
+ .from("organizations")
+ .select("plan, subscription_status, subscription_ends_at")
+ .eq("id", profile.organization_id)
+ .single();
+
+ if (!org) return;
+
+ const plan = PLANS[(org.plan as PlanId) ?? "starter"] ?? PLANS.starter;
+
+ setSubscription({
+ planId: org.plan ?? "starter",
+ status: (org.subscription_status as string) ?? "active",
+ currentPeriodEnd: (org.subscription_ends_at as string) ?? null,
+ cancelAtPeriodEnd: false,
+ priceAmount: plan.pricing?.monthly ?? null,
+ interval: "month",
+ });
+
+ // Then: try to enrich with live Stripe data (cancel status etc.)
+ const res = await fetch("/api/stripe/subscription");
+ if (res.ok) {
+ const stripeData = await res.json();
+ if (stripeData && !stripeData.error) {
+ setSubscription(stripeData);
+ }
+ }
+ } catch {
+ // If everything fails, use context planId as last resort
+ const plan = PLANS[contextPlanId] ?? PLANS.starter;
+ setSubscription({
+ planId: contextPlanId,
+ status: "active",
+ currentPeriodEnd: null,
+ cancelAtPeriodEnd: false,
+ priceAmount: plan.pricing?.monthly ?? null,
+ interval: "month",
+ });
+ } finally {
+ setLoading(false);
+ }
+ }
+
+ loadSubscription();
+ }, [contextPlanId]);
+
+ if (loading) {
+ return (
+ <div className="space-y-6">
+ <Card>
+ <CardHeader>
+ <Skeleton className="h-6 w-32" />
+ <Skeleton className="h-4 w-48" />
+ </CardHeader>
+ <CardContent className="space-y-3">
+ <Skeleton className="h-10 w-full" />
+ <Skeleton className="h-10 w-full" />
+ </CardContent>
+ </Card>
+ </div>
+ );
+ }
+
+ if (!subscription) {
+ return (
+ <Card>
+ <CardHeader>
+ <CardTitle>{t("billing")}</CardTitle>
+ <CardDescription>{t("billingDescription")}</CardDescription>
+ </CardHeader>
+ <CardContent>
+ <p className="text-sm text-muted-foreground">{t("noSubscription")}</p>
+ </CardContent>
+ </Card>
+ );
+ }
+
+ const plan = PLANS[subscription.planId as PlanId] ?? PLANS.starter;
+
+ return (
+ <div className="space-y-6">
+ {/* Current Plan */}
+ <Card>
+ <CardHeader>
+ <CardTitle>{t("currentPlan")}</CardTitle>
+ <CardDescription>{t("billingDescription")}</CardDescription>
+ </CardHeader>
+ <CardContent className="space-y-4">
+ <div className="flex items-center gap-3">
+ <span className="text-lg font-semibold">{plan.name}</span>
+ <Badge variant={statusVariant(subscription.status)}>
+ {statusLabel(subscription.status)}
+ </Badge>
+ </div>
+
+ {subscription.priceAmount != null && (
+ <p className="text-sm text-muted-foreground">
+ ${subscription.priceAmount}/{subscription.interval === "year" ? t("year") : t("month")}
+ </p>
+ )}
+
+ {subscription.currentPeriodEnd && !subscription.cancelAtPeriodEnd && (
+ <p className="text-sm text-muted-foreground">
+ {t("renewsOn", {
+ date: new Date(subscription.currentPeriodEnd).toLocaleDateString("en-US", {
+ year: "numeric",
+ month: "long",
+ day: "numeric",
+ }),
+ })}
+ </p>
+ )}
+ </CardContent>
+ </Card>
+
+ {/* Plan Switcher */}
+ <Card>
+ <CardHeader>
+ <CardTitle>{t("changePlan")}</CardTitle>
+ </CardHeader>
+ <CardContent>
+ <PlanSwitcher
+ subscription={subscription}
+ onUpdate={(data) => setSubscription({ ...subscription, ...data })}
+ />
+ </CardContent>
+ </Card>
+
+ <Separator />
+
+ {/* Invoices */}
+ <Card>
+ <CardHeader>
+ <CardTitle>{t("invoices")}</CardTitle>
+ </CardHeader>
+ <CardContent>
+ <InvoiceList />
+ </CardContent>
+ </Card>
+ </div>
+ );
+}
diff --git a/web/src/components/settings/font-switch.tsx b/web/src/components/settings/font-switch.tsx
new file mode 100644
index 000000000..2b624e165
--- /dev/null
+++ b/web/src/components/settings/font-switch.tsx
@@ -0,0 +1,50 @@
+"use client";
+
+import { useSyncExternalStore, useCallback } from "react";
+import { Button } from "@/components/ui/button";
+import { cn } from "@/lib/utils";
+import { useFontStore, FONT_OPTIONS } from "@/stores/use-font-store";
+import { Type } from "lucide-react";
+
+const emptySubscribe = () => () => {};
+
+export function FontSwitch() {
+ const { font, setFont } = useFontStore();
+ const mounted = useSyncExternalStore(
+ emptySubscribe,
+ useCallback(() => true, []),
+ useCallback(() => false, []),
+ );
+
+ if (!mounted) {
+ return (
+ <div className="flex flex-wrap gap-2">
+ {FONT_OPTIONS.map((opt) => (
+ <div
+ key={opt.key}
+ className="rounded-md bg-muted/50 px-4 py-2 text-sm text-muted-foreground"
+ >
+ {opt.label}
+ </div>
+ ))}
+ </div>
+ );
+ }
+
+ return (
+ <div className="flex flex-wrap gap-2">
+ {FONT_OPTIONS.map((opt) => (
+ <Button
+ key={opt.key}
+ variant={font === opt.key ? "secondary" : "ghost"}
+ size="sm"
+ className={cn("gap-2", font === opt.key && "shadow-sm")}
+ onClick={() => setFont(opt.key)}
+ >
+ <Type className="h-4 w-4" />
+ {opt.label}
+ </Button>
+ ))}
+ </div>
+ );
+}
diff --git a/web/src/components/settings/invoice-list.tsx b/web/src/components/settings/invoice-list.tsx
new file mode 100644
index 000000000..1d5e20eae
--- /dev/null
+++ b/web/src/components/settings/invoice-list.tsx
@@ -0,0 +1,129 @@
+"use client";
+
+import { useEffect, useState } from "react";
+import { useTranslations } from "next-intl";
+import { Download } from "lucide-react";
+import {
+ Table,
+ TableBody,
+ TableCell,
+ TableHead,
+ TableHeader,
+ TableRow,
+} from "@/components/ui/table";
+import { Badge } from "@/components/ui/badge";
+import { Skeleton } from "@/components/ui/skeleton";
+
+interface Invoice {
+ id: string;
+ number: string | null;
+ date: string | null;
+ amount: number;
+ currency: string;
+ status: string | null;
+ pdfUrl: string | null;
+}
+
+export function InvoiceList() {
+ const t = useTranslations("settings");
+ const [invoices, setInvoices] = useState<Invoice[]>([]);
+ const [loading, setLoading] = useState(true);
+
+ useEffect(() => {
+ fetch("/api/stripe/invoices")
+ .then((r) => r.json())
+ .then((data) => {
+ if (Array.isArray(data)) setInvoices(data);
+ })
+ .finally(() => setLoading(false));
+ }, []);
+
+ if (loading) {
+ return (
+ <div className="space-y-3">
+ {Array.from({ length: 3 }).map((_, i) => (
+ <Skeleton key={i} className="h-10 w-full" />
+ ))}
+ </div>
+ );
+ }
+
+ if (invoices.length === 0) {
+ return (
+ <p className="text-sm text-muted-foreground">{t("noInvoices")}</p>
+ );
+ }
+
+ function formatCurrency(amount: number, currency: string) {
+ return new Intl.NumberFormat("en-US", {
+ style: "currency",
+ currency: currency.toUpperCase(),
+ }).format(amount);
+ }
+
+ function statusVariant(status: string | null) {
+ switch (status) {
+ case "paid":
+ return "default" as const;
+ case "open":
+ return "secondary" as const;
+ case "uncollectible":
+ case "void":
+ return "destructive" as const;
+ default:
+ return "outline" as const;
+ }
+ }
+
+ return (
+ <Table>
+ <TableHeader>
+ <TableRow>
+ <TableHead>{t("invoiceNumber")}</TableHead>
+ <TableHead>{t("invoiceDate")}</TableHead>
+ <TableHead>{t("invoiceAmount")}</TableHead>
+ <TableHead>{t("invoiceStatus")}</TableHead>
+ <TableHead className="text-right">{t("invoiceDownload")}</TableHead>
+ </TableRow>
+ </TableHeader>
+ <TableBody>
+ {invoices.map((inv) => (
+ <TableRow key={inv.id}>
+ <TableCell className="font-medium">
+ {inv.number ?? "—"}
+ </TableCell>
+ <TableCell>
+ {inv.date
+ ? new Date(inv.date).toLocaleDateString("en-US", {
+ year: "numeric",
+ month: "short",
+ day: "numeric",
+ })
+ : "—"}
+ </TableCell>
+ <TableCell>{formatCurrency(inv.amount, inv.currency)}</TableCell>
+ <TableCell>
+ <Badge variant={statusVariant(inv.status)}>
+ {inv.status ?? "unknown"}
+ </Badge>
+ </TableCell>
+ <TableCell className="text-right">
+ {inv.pdfUrl ? (
+ <a
+ href={inv.pdfUrl}
+ target="_blank"
+ rel="noopener noreferrer"
+ className="inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"
+ >
+ <Download className="h-4 w-4" />
+ </a>
+ ) : (
+ "—"
+ )}
+ </TableCell>
+ </TableRow>
+ ))}
+ </TableBody>
+ </Table>
+ );
+}
diff --git a/web/src/components/settings/plan-switcher.tsx b/web/src/components/settings/plan-switcher.tsx
new file mode 100644
index 000000000..abbb04b1c
--- /dev/null
+++ b/web/src/components/settings/plan-switcher.tsx
@@ -0,0 +1,302 @@
+"use client";
+
+import { useState } from "react";
+import { useTranslations } from "next-intl";
+import { toast } from "sonner";
+import { Check, ArrowUp, ArrowDown, Mail } from "lucide-react";
+import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
+import { Button } from "@/components/ui/button";
+import { Badge } from "@/components/ui/badge";
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+ DialogTrigger,
+} from "@/components/ui/dialog";
+import { PLANS, SUBSCRIBABLE_PLANS, type PlanId } from "@/config/plans";
+import { ALL_SCRAPERS } from "@/config/prompt-options";
+
+interface SubscriptionData {
+ planId: string;
+ status: string;
+ currentPeriodEnd: string | null;
+ cancelAtPeriodEnd: boolean;
+ priceAmount: number | null;
+ interval: string | null;
+}
+
+interface PlanSwitcherProps {
+ subscription: SubscriptionData;
+ onUpdate: (data: SubscriptionData) => void;
+}
+
+export function PlanSwitcher({ subscription, onUpdate }: PlanSwitcherProps) {
+ const t = useTranslations("settings");
+ const [loading, setLoading] = useState(false);
+ const [cancelLoading, setCancelLoading] = useState(false);
+ const [changePlanOpen, setChangePlanOpen] = useState(false);
+ const [cancelOpen, setCancelOpen] = useState(false);
+ const [selectedPlan, setSelectedPlan] = useState<PlanId | null>(null);
+
+ const currentPlanId = subscription.planId as PlanId;
+
+ async function handleChangePlan() {
+ if (!selectedPlan) return;
+ setLoading(true);
+ try {
+ const res = await fetch("/api/stripe/subscription", {
+ method: "PATCH",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({ newPlanId: selectedPlan }),
+ });
+ if (!res.ok) {
+ const err = await res.json();
+ throw new Error(err.error || "Failed to change plan");
+ }
+ const data = await res.json();
+ onUpdate(data);
+ toast.success(t("planChanged"));
+ setChangePlanOpen(false);
+ } catch (err) {
+ toast.error(err instanceof Error ? err.message : "Failed to change plan");
+ } finally {
+ setLoading(false);
+ }
+ }
+
+ async function handleCancel() {
+ setCancelLoading(true);
+ try {
+ const res = await fetch("/api/stripe/subscription", { method: "DELETE" });
+ if (!res.ok) {
+ const err = await res.json();
+ throw new Error(err.error || "Failed to cancel");
+ }
+ const data = await res.json();
+ onUpdate({
+ ...subscription,
+ cancelAtPeriodEnd: data.cancelAtPeriodEnd,
+ currentPeriodEnd: data.currentPeriodEnd,
+ });
+ toast.success(t("subscriptionCanceled"));
+ setCancelOpen(false);
+ } catch (err) {
+ toast.error(err instanceof Error ? err.message : "Failed to cancel");
+ } finally {
+ setCancelLoading(false);
+ }
+ }
+
+ async function handleReactivate() {
+ setLoading(true);
+ try {
+ const res = await fetch("/api/stripe/subscription", {
+ method: "PATCH",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({ reactivate: true }),
+ });
+ if (!res.ok) {
+ const err = await res.json();
+ throw new Error(err.error || "Failed to reactivate");
+ }
+ const data = await res.json();
+ onUpdate({
+ ...subscription,
+ cancelAtPeriodEnd: false,
+ status: data.status,
+ currentPeriodEnd: data.currentPeriodEnd,
+ });
+ toast.success(t("subscriptionReactivated"));
+ } catch (err) {
+ toast.error(err instanceof Error ? err.message : "Failed to reactivate");
+ } finally {
+ setLoading(false);
+ }
+ }
+
+ function isUpgrade(targetPlan: PlanId): boolean {
+ const order = SUBSCRIBABLE_PLANS;
+ return order.indexOf(targetPlan) > order.indexOf(currentPlanId);
+ }
+
+ return (
+ <div className="space-y-4">
+ {/* Plan cards */}
+ <div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
+ {SUBSCRIBABLE_PLANS.map((planId) => {
+ const plan = PLANS[planId];
+ const isCurrent = planId === currentPlanId;
+ const upgrade = isUpgrade(planId);
+
+ return (
+ <Card
+ key={planId}
+ className={isCurrent ? "border-primary" : undefined}
+ >
+ <CardHeader className="pb-3">
+ <div className="flex items-center justify-between">
+ <CardTitle className="text-base">{plan.name}</CardTitle>
+ {isCurrent && (
+ <Badge variant="default">
+ <Check className="mr-1 h-3 w-3" />
+ {t("currentPlan")}
+ </Badge>
+ )}
+ </div>
+ <p className="text-sm text-muted-foreground">{plan.tagline}</p>
+ </CardHeader>
+ <CardContent>
+ <div className="mb-4">
+ <span className="text-2xl font-bold">
+ ${plan.pricing?.monthly}
+ </span>
+ <span className="text-sm text-muted-foreground">
+ /{t("month")}
+ </span>
+ </div>
+
+ <ul className="mb-4 space-y-1 text-sm text-muted-foreground">
+ <li>{plan.limits.maxBrands === -1 ? t("unlimited") : plan.limits.maxBrands} {t("brands")}</li>
+ <li>{plan.limits.maxPrompts === -1 ? t("unlimited") : plan.limits.maxPrompts} {t("prompts")}</li>
+ <li>
+ {plan.limits.maxPlatforms} {t("platforms")}
+ {plan.limits.allowedScrapers && plan.limits.allowedScrapers.length > 0 && (
+ <span className="text-xs text-muted-foreground/70">
+ {" "}({plan.limits.allowedScrapers.map((id) => {
+ const s = ALL_SCRAPERS.find((s) => s.id === id);
+ return s ? s.label.replace(/\s*\(Web\)/i, "") : id;
+ }).join(" & ")})
+ </span>
+ )}
+ </li>
+ <li>{plan.limits.maxTeamMembers === -1 ? t("unlimited") : plan.limits.maxTeamMembers} {t("teamMembers")}</li>
+ </ul>
+
+ {!isCurrent && (
+ <Dialog open={changePlanOpen && selectedPlan === planId} onOpenChange={(open) => {
+ setChangePlanOpen(open);
+ if (open) setSelectedPlan(planId);
+ }}>
+ <DialogTrigger
+ render={
+ <Button
+ className="w-full"
+ variant={upgrade ? "default" : "outline"}
+ />
+ }
+ >
+ {upgrade ? (
+ <>
+ <ArrowUp className="mr-1 h-4 w-4" />
+ {t("upgradeTo", { plan: plan.name })}
+ </>
+ ) : (
+ <>
+ <ArrowDown className="mr-1 h-4 w-4" />
+ {t("downgradeTo", { plan: plan.name })}
+ </>
+ )}
+ </DialogTrigger>
+ <DialogContent className="max-w-md">
+ <DialogHeader>
+ <DialogTitle>
+ {t("changePlanConfirmTitle", { plan: plan.name })}
+ </DialogTitle>
+ <DialogDescription>
+ {t("changePlanConfirmDescription", {
+ plan: plan.name,
+ price: String(plan.pricing?.monthly),
+ })}
+ </DialogDescription>
+ </DialogHeader>
+ <DialogFooter>
+ <Button
+ onClick={handleChangePlan}
+ disabled={loading}
+ >
+ {loading ? t("processing") : t("changePlanConfirm")}
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ )}
+ </CardContent>
+ </Card>
+ );
+ })}
+ </div>
+
+ {/* Enterprise / Custom Plan CTA */}
+ <div className="flex items-center justify-between gap-4 rounded-lg border bg-muted/30 p-5">
+ <div>
+ <p className="text-sm font-medium">{t("needCustomPlan")}</p>
+ <p className="text-xs text-muted-foreground">
+ {t("customPlanDescription")}
+ </p>
+ </div>
+ <a
+ href="mailto:[email protected]"
+ className="inline-flex shrink-0 items-center justify-center rounded-md border bg-background px-5 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground"
+ >
+ <Mail className="mr-2 h-4 w-4" />
+ {t("contactUs")}
+ </a>
+ </div>
+
+ {/* Cancel / Reactivate */}
+ {subscription.cancelAtPeriodEnd ? (
+ <div className="flex items-center justify-between rounded-lg border border-destructive/20 bg-destructive/5 p-4">
+ <div>
+ <p className="text-sm font-medium">{t("cancelsOn", {
+ date: subscription.currentPeriodEnd
+ ? new Date(subscription.currentPeriodEnd).toLocaleDateString("en-US", {
+ year: "numeric",
+ month: "long",
+ day: "numeric",
+ })
+ : "",
+ })}</p>
+ </div>
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={handleReactivate}
+ disabled={loading}
+ >
+ {t("reactivate")}
+ </Button>
+ </div>
+ ) : (
+ <Dialog open={cancelOpen} onOpenChange={setCancelOpen}>
+ <DialogTrigger
+ render={
+ <Button variant="ghost" className="text-destructive hover:text-destructive" />
+ }
+ >
+ {t("cancelSubscription")}
+ </DialogTrigger>
+ <DialogContent className="max-w-md">
+ <DialogHeader>
+ <DialogTitle>{t("cancelConfirmTitle")}</DialogTitle>
+ <DialogDescription>
+ {t("cancelConfirmDescription")}
+ </DialogDescription>
+ </DialogHeader>
+ <DialogFooter>
+ <Button
+ variant="destructive"
+ onClick={handleCancel}
+ disabled={cancelLoading}
+ >
+ {cancelLoading ? t("processing") : t("cancelConfirm")}
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ )}
+ </div>
+ );
+}
diff --git a/web/src/components/settings/team-section.tsx b/web/src/components/settings/team-section.tsx
new file mode 100644
index 000000000..2af70b1cb
--- /dev/null
+++ b/web/src/components/settings/team-section.tsx
@@ -0,0 +1,594 @@
+"use client";
+
+import { useCallback, useEffect, useState } from "react";
+import { useTranslations } from "next-intl";
+import { toast } from "sonner";
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
+import { Button } from "@/components/ui/button";
+import { Input } from "@/components/ui/input";
+import { Label } from "@/components/ui/label";
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from "@/components/ui/select";
+import {
+ Dialog,
+ DialogClose,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+ DialogTrigger,
+} from "@/components/ui/dialog";
+import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
+import { Badge } from "@/components/ui/badge";
+import { Skeleton } from "@/components/ui/skeleton";
+import {
+ listMembers,
+ listInvitations,
+ inviteMember,
+ revokeInvitation,
+ resendInvitation,
+ updateMemberRole,
+ removeMember,
+ getTeamInfo,
+ type TeamMember,
+ type TeamInvitation,
+ type TeamInfo,
+ type TeamRole,
+} from "@/lib/actions/team";
+import {
+ ArrowUpRight,
+ Copy,
+ Loader2,
+ Lock,
+ Mail,
+ MoreHorizontal,
+ RefreshCw,
+ Trash2,
+ UserPlus,
+} from "lucide-react";
+import { useRouter } from "@/i18n/navigation";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
+
+const ROLE_OPTIONS: { value: TeamRole; label: string }[] = [
+ { value: "admin", label: "Admin" },
+ { value: "manager", label: "Manager" },
+ { value: "analyst", label: "Analyst" },
+ { value: "agency_partner", label: "Agency Partner" },
+];
+
+function roleLabel(role: TeamRole): string {
+ return ROLE_OPTIONS.find((r) => r.value === role)?.label ?? role;
+}
+
+function initials(name: string | null, email: string): string {
+ const source = name?.trim() || email;
+ return source
+ .split(/\s+/)
+ .map((p) => p[0] ?? "")
+ .slice(0, 2)
+ .join("")
+ .toUpperCase();
+}
+
+export function TeamSection() {
+ const t = useTranslations("settings");
+ const router = useRouter();
+ const [members, setMembers] = useState<TeamMember[]>([]);
+ const [invitations, setInvitations] = useState<TeamInvitation[]>([]);
+ const [info, setInfo] = useState<TeamInfo | null>(null);
+ const [isLoading, setIsLoading] = useState(true);
+ const [currentRole, setCurrentRole] = useState<TeamRole | null>(null);
+
+ const loadData = useCallback(async () => {
+ try {
+ const [m, i, inf] = await Promise.all([
+ listMembers(),
+ listInvitations(),
+ getTeamInfo(),
+ ]);
+ setMembers(m);
+ setInvitations(i);
+ setInfo(inf);
+ const me = m.find((mem) => mem.isCurrentUser);
+ setCurrentRole(me?.role ?? null);
+ } catch (error) {
+ toast.error(
+ error instanceof Error ? error.message : "Failed to load team",
+ );
+ } finally {
+ setIsLoading(false);
+ }
+ }, []);
+
+ useEffect(() => {
+ loadData();
+ }, [loadData]);
+
+ const isAdmin = currentRole === "admin";
+ const seatsLabel = info
+ ? info.maxTeamMembers === -1
+ ? `${info.seatsUsed} seat${info.seatsUsed === 1 ? "" : "s"} used`
+ : `${info.seatsUsed} of ${info.maxTeamMembers} seats used`
+ : null;
+
+ return (
+ <div className="space-y-6">
+ <Card>
+ <CardHeader className="flex flex-row items-start justify-between space-y-0">
+ <div>
+ <CardTitle>{t("team")}</CardTitle>
+ <CardDescription>
+ Manage team members and their access.
+ {seatsLabel && (
+ <span className="ml-1 text-foreground">· {seatsLabel}</span>
+ )}
+ </CardDescription>
+ </div>
+ {isAdmin && info && (
+ <InviteDialog
+ canInvite={info.canInvite}
+ onInvited={() => {
+ loadData();
+ }}
+ />
+ )}
+ </CardHeader>
+ <CardContent>
+ {isLoading ? (
+ <div className="space-y-3">
+ <Skeleton className="h-14 w-full" />
+ <Skeleton className="h-14 w-full" />
+ </div>
+ ) : (
+ <>
+ <div className="space-y-1">
+ {members.map((member) => (
+ <MemberRow
+ key={member.userId}
+ member={member}
+ isAdmin={isAdmin}
+ onChanged={loadData}
+ />
+ ))}
+ </div>
+ {isAdmin && info && !info.canInvite && (
+ <div className="mt-4 flex items-start gap-3 rounded-lg border border-amber-200 bg-amber-50 p-3 dark:border-amber-900/50 dark:bg-amber-950/30">
+ <Lock className="mt-0.5 h-4 w-4 shrink-0 text-amber-600 dark:text-amber-500" />
+ <div className="flex-1 text-sm">
+ <p className="font-medium text-amber-900 dark:text-amber-200">
+ Seat limit reached
+ </p>
+ <p className="text-amber-800/80 dark:text-amber-300/80">
+ Your {info.planName} plan includes {info.maxTeamMembers}{" "}
+ seat{info.maxTeamMembers === 1 ? "" : "s"}. Upgrade to
+ invite more teammates.
+ </p>
+ </div>
+ <Button
+ size="sm"
+ variant="outline"
+ onClick={() => router.push("/dashboard/settings?tab=billing")}
+ >
+ Upgrade
+ <ArrowUpRight className="ml-1 h-3.5 w-3.5" />
+ </Button>
+ </div>
+ )}
+ </>
+ )}
+ </CardContent>
+ </Card>
+
+ {invitations.length > 0 && (
+ <Card>
+ <CardHeader>
+ <CardTitle>Pending invitations</CardTitle>
+ <CardDescription>
+ Invitations that haven&apos;t been accepted yet.
+ </CardDescription>
+ </CardHeader>
+ <CardContent>
+ <div className="space-y-1">
+ {invitations.map((inv) => (
+ <InvitationRow
+ key={inv.id}
+ invitation={inv}
+ isAdmin={isAdmin}
+ onChanged={loadData}
+ />
+ ))}
+ </div>
+ </CardContent>
+ </Card>
+ )}
+ </div>
+ );
+}
+
+function MemberRow({
+ member,
+ isAdmin,
+ onChanged,
+}: {
+ member: TeamMember;
+ isAdmin: boolean;
+ onChanged: () => void;
+}) {
+ const [pendingRole, setPendingRole] = useState<TeamRole | null>(null);
+ const [removing, setRemoving] = useState(false);
+ const [removeDialogOpen, setRemoveDialogOpen] = useState(false);
+
+ const canEdit = isAdmin && !member.isCurrentUser;
+
+ async function handleRoleChange(role: TeamRole) {
+ if (role === member.role) return;
+ setPendingRole(role);
+ try {
+ await updateMemberRole(member.userId, role);
+ toast.success("Role updated");
+ onChanged();
+ } catch (error) {
+ toast.error(
+ error instanceof Error ? error.message : "Failed to update role",
+ );
+ } finally {
+ setPendingRole(null);
+ }
+ }
+
+ async function handleRemove() {
+ setRemoving(true);
+ try {
+ await removeMember(member.userId);
+ toast.success("Member removed");
+ setRemoveDialogOpen(false);
+ onChanged();
+ } catch (error) {
+ toast.error(
+ error instanceof Error ? error.message : "Failed to remove member",
+ );
+ } finally {
+ setRemoving(false);
+ }
+ }
+
+ return (
+ <div className="flex items-center gap-3 rounded-lg border border-transparent px-3 py-2 hover:bg-muted/50">
+ <Avatar>
+ {member.avatarUrl && <AvatarImage src={member.avatarUrl} />}
+ <AvatarFallback>{initials(member.fullName, member.email)}</AvatarFallback>
+ </Avatar>
+ <div className="min-w-0 flex-1">
+ <div className="flex items-center gap-2">
+ <span className="truncate text-sm font-medium">
+ {member.fullName || member.email}
+ </span>
+ {member.isCurrentUser && (
+ <Badge variant="secondary" className="text-xs">
+ You
+ </Badge>
+ )}
+ </div>
+ {member.fullName && (
+ <p className="truncate text-xs text-muted-foreground">
+ {member.email}
+ </p>
+ )}
+ </div>
+
+ {canEdit ? (
+ <Select
+ value={member.role}
+ onValueChange={(v) => handleRoleChange(v as TeamRole)}
+ disabled={pendingRole !== null}
+ >
+ <SelectTrigger size="sm" className="w-36">
+ {pendingRole ? (
+ <Loader2 className="h-3 w-3 animate-spin" />
+ ) : (
+ <SelectValue />
+ )}
+ </SelectTrigger>
+ <SelectContent>
+ {ROLE_OPTIONS.map((opt) => (
+ <SelectItem key={opt.value} value={opt.value}>
+ {opt.label}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ ) : (
+ <Badge variant="outline">{roleLabel(member.role)}</Badge>
+ )}
+
+ {canEdit && (
+ <Dialog open={removeDialogOpen} onOpenChange={setRemoveDialogOpen}>
+ <DialogTrigger
+ render={
+ <Button variant="ghost" size="icon-sm">
+ <Trash2 className="h-4 w-4" />
+ </Button>
+ }
+ />
+ <DialogContent>
+ <DialogHeader>
+ <DialogTitle>Remove team member?</DialogTitle>
+ <DialogDescription>
+ {member.fullName || member.email} will lose access to this
+ organization. This cannot be undone.
+ </DialogDescription>
+ </DialogHeader>
+ <DialogFooter>
+ <DialogClose render={<Button variant="outline" />}>
+ Cancel
+ </DialogClose>
+ <Button
+ variant="destructive"
+ onClick={handleRemove}
+ disabled={removing}
+ >
+ {removing ? (
+ <>
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ Removing...
+ </>
+ ) : (
+ "Remove member"
+ )}
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ )}
+ </div>
+ );
+}
+
+function InvitationRow({
+ invitation,
+ isAdmin,
+ onChanged,
+}: {
+ invitation: TeamInvitation;
+ isAdmin: boolean;
+ onChanged: () => void;
+}) {
+ const [busy, setBusy] = useState<"revoke" | "resend" | null>(null);
+
+ async function handleRevoke() {
+ setBusy("revoke");
+ try {
+ await revokeInvitation(invitation.id);
+ toast.success("Invitation revoked");
+ onChanged();
+ } catch (error) {
+ toast.error(
+ error instanceof Error ? error.message : "Failed to revoke invitation",
+ );
+ } finally {
+ setBusy(null);
+ }
+ }
+
+ async function handleResend() {
+ setBusy("resend");
+ try {
+ const { inviteLink } = await resendInvitation(invitation.id);
+ await navigator.clipboard.writeText(inviteLink).catch(() => {});
+ toast.success("Invitation resent (link copied)");
+ onChanged();
+ } catch (error) {
+ toast.error(
+ error instanceof Error ? error.message : "Failed to resend invitation",
+ );
+ } finally {
+ setBusy(null);
+ }
+ }
+
+ const expired = new Date(invitation.expiresAt).getTime() < Date.now();
+
+ return (
+ <div className="flex items-center gap-3 rounded-lg border border-transparent px-3 py-2 hover:bg-muted/50">
+ <div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted">
+ <Mail className="h-4 w-4 text-muted-foreground" />
+ </div>
+ <div className="min-w-0 flex-1">
+ <p className="truncate text-sm font-medium">{invitation.email}</p>
+ <p className="text-xs text-muted-foreground">
+ {expired
+ ? "Expired"
+ : `Expires ${new Date(invitation.expiresAt).toLocaleDateString()}`}
+ </p>
+ </div>
+ <Badge variant="outline">{roleLabel(invitation.role)}</Badge>
+ {isAdmin && (
+ <DropdownMenu>
+ <DropdownMenuTrigger
+ render={
+ <Button variant="ghost" size="icon-sm" disabled={busy !== null}>
+ {busy ? (
+ <Loader2 className="h-4 w-4 animate-spin" />
+ ) : (
+ <MoreHorizontal className="h-4 w-4" />
+ )}
+ </Button>
+ }
+ />
+ <DropdownMenuContent align="end">
+ <DropdownMenuItem onClick={handleResend}>
+ <RefreshCw className="mr-2 h-4 w-4" />
+ Resend invite
+ </DropdownMenuItem>
+ <DropdownMenuItem
+ onClick={handleRevoke}
+ className="text-destructive focus:text-destructive"
+ >
+ <Trash2 className="mr-2 h-4 w-4" />
+ Revoke
+ </DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ )}
+ </div>
+ );
+}
+
+function InviteDialog({
+ canInvite,
+ onInvited,
+}: {
+ canInvite: boolean;
+ onInvited: () => void;
+}) {
+ const [open, setOpen] = useState(false);
+ const [email, setEmail] = useState("");
+ const [role, setRole] = useState<TeamRole>("analyst");
+ const [submitting, setSubmitting] = useState(false);
+ const [inviteLink, setInviteLink] = useState<string | null>(null);
+
+ function reset() {
+ setEmail("");
+ setRole("analyst");
+ setInviteLink(null);
+ }
+
+ async function handleSubmit() {
+ if (!email.trim()) {
+ toast.error("Email is required");
+ return;
+ }
+ setSubmitting(true);
+ try {
+ const { inviteLink: link } = await inviteMember(email.trim(), role);
+ setInviteLink(link);
+ toast.success("Invitation sent");
+ onInvited();
+ } catch (error) {
+ toast.error(
+ error instanceof Error ? error.message : "Failed to send invitation",
+ );
+ } finally {
+ setSubmitting(false);
+ }
+ }
+
+ async function copyLink() {
+ if (!inviteLink) return;
+ await navigator.clipboard.writeText(inviteLink).catch(() => {});
+ toast.success("Link copied");
+ }
+
+ return (
+ <Dialog
+ open={open}
+ onOpenChange={(o) => {
+ setOpen(o);
+ if (!o) reset();
+ }}
+ >
+ <DialogTrigger
+ render={
+ <Button size="sm" disabled={!canInvite}>
+ <UserPlus className="mr-2 h-4 w-4" />
+ Invite member
+ </Button>
+ }
+ />
+ <DialogContent>
+ <DialogHeader>
+ <DialogTitle>Invite a team member</DialogTitle>
+ <DialogDescription>
+ They&apos;ll receive an email with a link to join your organization.
+ </DialogDescription>
+ </DialogHeader>
+
+ {inviteLink ? (
+ <div className="space-y-3">
+ <p className="text-sm text-muted-foreground">
+ Invitation sent. You can also share this link directly:
+ </p>
+ <div className="flex items-center gap-2">
+ <Input readOnly value={inviteLink} className="flex-1 text-xs" />
+ <Button variant="outline" size="sm" onClick={copyLink}>
+ <Copy className="h-4 w-4" />
+ </Button>
+ </div>
+ </div>
+ ) : (
+ <div className="space-y-4">
+ <div className="space-y-2">
+ <Label htmlFor="invite-email">Email</Label>
+ <Input
+ id="invite-email"
+ type="email"
+ placeholder="[email protected]"
+ value={email}
+ onChange={(e) => setEmail(e.target.value)}
+ disabled={submitting}
+ />
+ </div>
+ <div className="space-y-2">
+ <Label htmlFor="invite-role">Role</Label>
+ <Select
+ value={role}
+ onValueChange={(v) => setRole(v as TeamRole)}
+ disabled={submitting}
+ >
+ <SelectTrigger className="w-full">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ {ROLE_OPTIONS.map((opt) => (
+ <SelectItem key={opt.value} value={opt.value}>
+ {opt.label}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+ </div>
+ )}
+
+ <DialogFooter>
+ {inviteLink ? (
+ <DialogClose render={<Button />}>Done</DialogClose>
+ ) : (
+ <>
+ <DialogClose render={<Button variant="outline" />}>
+ Cancel
+ </DialogClose>
+ <Button onClick={handleSubmit} disabled={submitting}>
+ {submitting ? (
+ <>
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ Sending...
+ </>
+ ) : (
+ "Send invitation"
+ )}
+ </Button>
+ </>
+ )}
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ );
+}
diff --git a/web/src/components/settings/theme-switch.tsx b/web/src/components/settings/theme-switch.tsx
new file mode 100644
index 000000000..ffbcea226
--- /dev/null
+++ b/web/src/components/settings/theme-switch.tsx
@@ -0,0 +1,54 @@
+"use client";
+
+import { useSyncExternalStore, useCallback } from "react";
+import { useTheme } from "next-themes";
+import { Button } from "@/components/ui/button";
+import { Moon, Sun } from "lucide-react";
+import { cn } from "@/lib/utils";
+
+const emptySubscribe = () => () => {};
+
+export function ThemeSwitch() {
+ const { theme, setTheme } = useTheme();
+ const mounted = useSyncExternalStore(
+ emptySubscribe,
+ useCallback(() => true, []),
+ useCallback(() => false, []),
+ );
+
+ if (!mounted) {
+ return (
+ <div className="flex rounded-lg border bg-muted p-1">
+ <div className="flex-1 rounded-md bg-muted/50 py-2 text-center text-sm text-muted-foreground">
+ Light
+ </div>
+ <div className="flex-1 rounded-md py-2 text-center text-sm text-muted-foreground">
+ Dark
+ </div>
+ </div>
+ );
+ }
+
+ return (
+ <div className="flex rounded-lg border bg-muted p-1">
+ <Button
+ variant={theme === "light" ? "secondary" : "ghost"}
+ size="sm"
+ className={cn("flex-1 gap-2", theme === "light" && "shadow-sm")}
+ onClick={() => setTheme("light")}
+ >
+ <Sun className="h-4 w-4" />
+ Light
+ </Button>
+ <Button
+ variant={theme === "dark" ? "secondary" : "ghost"}
+ size="sm"
+ className={cn("flex-1 gap-2", theme === "dark" && "shadow-sm")}
+ onClick={() => setTheme("dark")}
+ >
+ <Moon className="h-4 w-4" />
+ Dark
+ </Button>
+ </div>
+ );
+}
diff --git a/web/src/components/team/accept-invitation-card.tsx b/web/src/components/team/accept-invitation-card.tsx
new file mode 100644
index 000000000..80154f052
--- /dev/null
+++ b/web/src/components/team/accept-invitation-card.tsx
@@ -0,0 +1,138 @@
+"use client";
+
+import { useState } from "react";
+import { useRouter } from "@/i18n/navigation";
+import { createClient } from "@/lib/supabase/client";
+import { acceptInvitation, type TeamRole } from "@/lib/actions/team";
+import { Button } from "@/components/ui/button";
+import { toast } from "sonner";
+import { Loader2, Users } from "lucide-react";
+
+interface Props {
+ token: string;
+ organizationName: string;
+ email: string;
+ role: TeamRole;
+ currentUserEmail: string;
+ emailMatches: boolean;
+}
+
+function roleLabel(role: TeamRole): string {
+ switch (role) {
+ case "admin":
+ return "Admin";
+ case "manager":
+ return "Manager";
+ case "analyst":
+ return "Analyst";
+ case "agency_partner":
+ return "Agency Partner";
+ }
+}
+
+export function AcceptInvitationCard({
+ token,
+ organizationName,
+ email,
+ role,
+ currentUserEmail,
+ emailMatches,
+}: Props) {
+ const router = useRouter();
+ const [isAccepting, setIsAccepting] = useState(false);
+ const [isSwitching, setIsSwitching] = useState(false);
+
+ async function handleAccept() {
+ setIsAccepting(true);
+ try {
+ await acceptInvitation(token);
+ toast.success(`Welcome to ${organizationName}!`);
+ router.push("/dashboard");
+ router.refresh();
+ } catch (error) {
+ toast.error(
+ error instanceof Error ? error.message : "Failed to accept invitation",
+ );
+ setIsAccepting(false);
+ }
+ }
+
+ async function handleSwitchAccount() {
+ setIsSwitching(true);
+ const supabase = createClient();
+ await supabase.auth.signOut();
+ router.push(
+ `/sign-up?invite=${token}&email=${encodeURIComponent(email)}&next=${encodeURIComponent(
+ `/invite/${token}`,
+ )}`,
+ );
+ router.refresh();
+ }
+
+ return (
+ <div className="rounded-xl border bg-card p-6 shadow-sm">
+ <div className="mb-6 text-center">
+ <div className="mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-primary/10">
+ <Users className="h-6 w-6 text-primary" />
+ </div>
+ <h1 className="text-xl font-semibold tracking-tight">
+ Join {organizationName}
+ </h1>
+ <p className="mt-2 text-sm text-muted-foreground">
+ You&apos;ve been invited to join as{" "}
+ <span className="font-medium text-foreground">{roleLabel(role)}</span>
+ </p>
+ </div>
+
+ <div className="space-y-3 rounded-lg border bg-muted/30 p-3 text-sm">
+ <div className="flex justify-between">
+ <span className="text-muted-foreground">Invited email</span>
+ <span className="font-medium">{email}</span>
+ </div>
+ <div className="flex justify-between">
+ <span className="text-muted-foreground">Signed in as</span>
+ <span className="font-medium">{currentUserEmail}</span>
+ </div>
+ </div>
+
+ {!emailMatches ? (
+ <div className="mt-6 space-y-3">
+ <p className="text-sm text-destructive">
+ This invitation was sent to{" "}
+ <span className="font-medium">{email}</span>, but you&apos;re signed
+ in as {currentUserEmail}. Please switch accounts to continue.
+ </p>
+ <Button
+ onClick={handleSwitchAccount}
+ disabled={isSwitching}
+ className="w-full"
+ >
+ {isSwitching ? (
+ <>
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ Switching...
+ </>
+ ) : (
+ "Sign out and use correct account"
+ )}
+ </Button>
+ </div>
+ ) : (
+ <Button
+ onClick={handleAccept}
+ disabled={isAccepting}
+ className="mt-6 w-full"
+ >
+ {isAccepting ? (
+ <>
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ Joining...
+ </>
+ ) : (
+ `Accept and join ${organizationName}`
+ )}
+ </Button>
+ )}
+ </div>
+ );
+}
diff --git a/web/src/components/ui/avatar.tsx b/web/src/components/ui/avatar.tsx
new file mode 100644
index 000000000..e4fed865c
--- /dev/null
+++ b/web/src/components/ui/avatar.tsx
@@ -0,0 +1,109 @@
+"use client"
+
+import * as React from "react"
+import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar"
+
+import { cn } from "@/lib/utils"
+
+function Avatar({
+ className,
+ size = "default",
+ ...props
+}: AvatarPrimitive.Root.Props & {
+ size?: "default" | "sm" | "lg"
+}) {
+ return (
+ <AvatarPrimitive.Root
+ data-slot="avatar"
+ data-size={size}
+ className={cn(
+ "group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function AvatarImage({ className, ...props }: AvatarPrimitive.Image.Props) {
+ return (
+ <AvatarPrimitive.Image
+ data-slot="avatar-image"
+ className={cn(
+ "aspect-square size-full rounded-full object-cover",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function AvatarFallback({
+ className,
+ ...props
+}: AvatarPrimitive.Fallback.Props) {
+ return (
+ <AvatarPrimitive.Fallback
+ data-slot="avatar-fallback"
+ className={cn(
+ "flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function AvatarBadge({ className, ...props }: React.ComponentProps<"span">) {
+ return (
+ <span
+ data-slot="avatar-badge"
+ className={cn(
+ "absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none",
+ "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
+ "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
+ "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function AvatarGroup({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="avatar-group"
+ className={cn(
+ "group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function AvatarGroupCount({
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="avatar-group-count"
+ className={cn(
+ "relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+export {
+ Avatar,
+ AvatarImage,
+ AvatarFallback,
+ AvatarGroup,
+ AvatarGroupCount,
+ AvatarBadge,
+}
diff --git a/web/src/components/ui/badge.tsx b/web/src/components/ui/badge.tsx
new file mode 100644
index 000000000..b20959dd7
--- /dev/null
+++ b/web/src/components/ui/badge.tsx
@@ -0,0 +1,52 @@
+import { mergeProps } from "@base-ui/react/merge-props"
+import { useRender } from "@base-ui/react/use-render"
+import { cva, type VariantProps } from "class-variance-authority"
+
+import { cn } from "@/lib/utils"
+
+const badgeVariants = cva(
+ "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
+ {
+ variants: {
+ variant: {
+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
+ secondary:
+ "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
+ destructive:
+ "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
+ outline:
+ "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
+ ghost:
+ "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
+ link: "text-primary underline-offset-4 hover:underline",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ },
+ }
+)
+
+function Badge({
+ className,
+ variant = "default",
+ render,
+ ...props
+}: useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>) {
+ return useRender({
+ defaultTagName: "span",
+ props: mergeProps<"span">(
+ {
+ className: cn(badgeVariants({ variant }), className),
+ },
+ props
+ ),
+ render,
+ state: {
+ slot: "badge",
+ variant,
+ },
+ })
+}
+
+export { Badge, badgeVariants }
diff --git a/src/components/ui/button.tsx b/web/src/components/ui/button.tsx
similarity index 81%
rename from src/components/ui/button.tsx
rename to web/src/components/ui/button.tsx
index 9710b0a8a..712033606 100644
--- a/src/components/ui/button.tsx
+++ b/web/src/components/ui/button.tsx
@@ -6,7 +6,7 @@ import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "@/lib/utils"
const buttonVariants = cva(
- "group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
+ "group/button inline-flex shrink-0 cursor-pointer items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
{
variants: {
variant: {
diff --git a/web/src/components/ui/card.tsx b/web/src/components/ui/card.tsx
new file mode 100644
index 000000000..9bd5a2544
--- /dev/null
+++ b/web/src/components/ui/card.tsx
@@ -0,0 +1,103 @@
+import * as React from "react"
+
+import { cn } from "@/lib/utils"
+
+function Card({
+ className,
+ size = "default",
+ ...props
+}: React.ComponentProps<"div"> & { size?: "default" | "sm" }) {
+ return (
+ <div
+ data-slot="card"
+ data-size={size}
+ className={cn(
+ "group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="card-header"
+ className={cn(
+ "group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="card-title"
+ className={cn(
+ "text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="card-description"
+ className={cn("text-sm text-muted-foreground", className)}
+ {...props}
+ />
+ )
+}
+
+function CardAction({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="card-action"
+ className={cn(
+ "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function CardContent({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="card-content"
+ className={cn("px-4 group-data-[size=sm]/card:px-3", className)}
+ {...props}
+ />
+ )
+}
+
+function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="card-footer"
+ className={cn(
+ "flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+export {
+ Card,
+ CardHeader,
+ CardFooter,
+ CardTitle,
+ CardAction,
+ CardDescription,
+ CardContent,
+}
diff --git a/web/src/components/ui/checkbox.tsx b/web/src/components/ui/checkbox.tsx
new file mode 100644
index 000000000..0f5cfae90
--- /dev/null
+++ b/web/src/components/ui/checkbox.tsx
@@ -0,0 +1,28 @@
+"use client"
+
+import * as React from "react"
+import * as CheckboxPrimitive from "@radix-ui/react-checkbox"
+import { CheckIcon } from "lucide-react"
+import { cn } from "@/lib/utils"
+
+function Checkbox({
+ className,
+ ...props
+}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {
+ return (
+ <CheckboxPrimitive.Root
+ data-slot="checkbox"
+ className={cn(
+ "peer h-4 w-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-foreground",
+ className
+ )}
+ {...props}
+ >
+ <CheckboxPrimitive.Indicator className="flex items-center justify-center text-current transition-none">
+ <CheckIcon className="h-3.5 w-3.5" />
+ </CheckboxPrimitive.Indicator>
+ </CheckboxPrimitive.Root>
+ )
+}
+
+export { Checkbox }
diff --git a/web/src/components/ui/code-block.tsx b/web/src/components/ui/code-block.tsx
new file mode 100644
index 000000000..4907f8db2
--- /dev/null
+++ b/web/src/components/ui/code-block.tsx
@@ -0,0 +1,93 @@
+"use client"
+
+import { cn } from "@/lib/utils"
+import React, { useEffect, useState } from "react"
+import { codeToHtml } from "shiki"
+
+export type CodeBlockProps = {
+ children?: React.ReactNode
+ className?: string
+} & React.HTMLProps<HTMLDivElement>
+
+function CodeBlock({ children, className, ...props }: CodeBlockProps) {
+ return (
+ <div
+ className={cn(
+ "not-prose flex w-full flex-col overflow-clip border",
+ "border-border bg-card text-card-foreground rounded-xl",
+ className
+ )}
+ {...props}
+ >
+ {children}
+ </div>
+ )
+}
+
+export type CodeBlockCodeProps = {
+ code: string
+ language?: string
+ theme?: string
+ className?: string
+} & React.HTMLProps<HTMLDivElement>
+
+function CodeBlockCode({
+ code,
+ language = "tsx",
+ theme = "github-light",
+ className,
+ ...props
+}: CodeBlockCodeProps) {
+ const [highlightedHtml, setHighlightedHtml] = useState<string | null>(null)
+
+ useEffect(() => {
+ async function highlight() {
+ if (!code) {
+ setHighlightedHtml("<pre><code></code></pre>")
+ return
+ }
+
+ const html = await codeToHtml(code, { lang: language, theme })
+ setHighlightedHtml(html)
+ }
+ highlight()
+ }, [code, language, theme])
+
+ const classNames = cn(
+ "w-full overflow-x-auto text-[13px] [&>pre]:px-4 [&>pre]:py-4",
+ className
+ )
+
+ return highlightedHtml ? (
+ <div
+ className={classNames}
+ dangerouslySetInnerHTML={{ __html: highlightedHtml }}
+ {...props}
+ />
+ ) : (
+ <div className={classNames} {...props}>
+ <pre>
+ <code>{code}</code>
+ </pre>
+ </div>
+ )
+}
+
+export type CodeBlockGroupProps = React.HTMLAttributes<HTMLDivElement>
+
+function CodeBlockGroup({
+ children,
+ className,
+ ...props
+}: CodeBlockGroupProps) {
+ return (
+ <div
+ className={cn("flex items-center justify-between", className)}
+ {...props}
+ >
+ {children}
+ </div>
+ )
+}
+
+export { CodeBlockGroup, CodeBlockCode, CodeBlock }
diff --git a/web/src/components/ui/dialog.tsx b/web/src/components/ui/dialog.tsx
new file mode 100644
index 000000000..5ca40eee4
--- /dev/null
+++ b/web/src/components/ui/dialog.tsx
@@ -0,0 +1,157 @@
+"use client"
+
+import * as React from "react"
+import { Dialog as DialogPrimitive } from "@base-ui/react/dialog"
+
+import { cn } from "@/lib/utils"
+import { Button } from "@/components/ui/button"
+import { XIcon } from "lucide-react"
+
+function Dialog({ ...props }: DialogPrimitive.Root.Props) {
+ return <DialogPrimitive.Root data-slot="dialog" {...props} />
+}
+
+function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props) {
+ return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />
+}
+
+function DialogPortal({ ...props }: DialogPrimitive.Portal.Props) {
+ return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />
+}
+
+function DialogClose({ ...props }: DialogPrimitive.Close.Props) {
+ return <DialogPrimitive.Close data-slot="dialog-close" {...props} />
+}
+
+function DialogOverlay({
+ className,
+ ...props
+}: DialogPrimitive.Backdrop.Props) {
+ return (
+ <DialogPrimitive.Backdrop
+ data-slot="dialog-overlay"
+ className={cn(
+ "fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function DialogContent({
+ className,
+ children,
+ showCloseButton = true,
+ ...props
+}: DialogPrimitive.Popup.Props & {
+ showCloseButton?: boolean
+}) {
+ return (
+ <DialogPortal>
+ <DialogOverlay />
+ <DialogPrimitive.Popup
+ data-slot="dialog-content"
+ className={cn(
+ "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] sm:max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-sm ring-1 ring-foreground/10 duration-100 outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
+ className
+ )}
+ {...props}
+ >
+ {children}
+ {showCloseButton && (
+ <DialogPrimitive.Close
+ data-slot="dialog-close"
+ render={
+ <Button
+ variant="ghost"
+ className="absolute top-2 right-2"
+ size="icon-sm"
+ />
+ }
+ >
+ <XIcon
+ />
+ <span className="sr-only">Close</span>
+ </DialogPrimitive.Close>
+ )}
+ </DialogPrimitive.Popup>
+ </DialogPortal>
+ )
+}
+
+function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="dialog-header"
+ className={cn("flex flex-col gap-2", className)}
+ {...props}
+ />
+ )
+}
+
+function DialogFooter({
+ className,
+ showCloseButton = false,
+ children,
+ ...props
+}: React.ComponentProps<"div"> & {
+ showCloseButton?: boolean
+}) {
+ return (
+ <div
+ data-slot="dialog-footer"
+ className={cn(
+ "-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",
+ className
+ )}
+ {...props}
+ >
+ {children}
+ {showCloseButton && (
+ <DialogPrimitive.Close render={<Button variant="outline" />}>
+ Close
+ </DialogPrimitive.Close>
+ )}
+ </div>
+ )
+}
+
+function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {
+ return (
+ <DialogPrimitive.Title
+ data-slot="dialog-title"
+ className={cn("text-base leading-none font-medium", className)}
+ {...props}
+ />
+ )
+}
+
+function DialogDescription({
+ className,
+ ...props
+}: DialogPrimitive.Description.Props) {
+ return (
+ <DialogPrimitive.Description
+ data-slot="dialog-description"
+ className={cn(
+ "text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+export {
+ Dialog,
+ DialogClose,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogOverlay,
+ DialogPortal,
+ DialogTitle,
+ DialogTrigger,
+}
diff --git a/web/src/components/ui/dropdown-menu.tsx b/web/src/components/ui/dropdown-menu.tsx
new file mode 100644
index 000000000..a126ca7d6
--- /dev/null
+++ b/web/src/components/ui/dropdown-menu.tsx
@@ -0,0 +1,271 @@
+"use client"
+
+import * as React from "react"
+import { Menu as MenuPrimitive } from "@base-ui/react/menu"
+
+import { cn } from "@/lib/utils"
+import { ChevronRightIcon, CheckIcon } from "lucide-react"
+
+function DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {
+ return <MenuPrimitive.Root data-slot="dropdown-menu" {...props} />
+}
+
+function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props) {
+ return <MenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
+}
+
+function DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props) {
+ return <MenuPrimitive.Trigger data-slot="dropdown-menu-trigger" {...props} />
+}
+
+function DropdownMenuContent({
+ align = "start",
+ alignOffset = 0,
+ side = "bottom",
+ sideOffset = 4,
+ className,
+ ...props
+}: MenuPrimitive.Popup.Props &
+ Pick<
+ MenuPrimitive.Positioner.Props,
+ "align" | "alignOffset" | "side" | "sideOffset"
+ >) {
+ return (
+ <MenuPrimitive.Portal>
+ <MenuPrimitive.Positioner
+ className="isolate z-50 outline-none"
+ align={align}
+ alignOffset={alignOffset}
+ side={side}
+ sideOffset={sideOffset}
+ >
+ <MenuPrimitive.Popup
+ data-slot="dropdown-menu-content"
+ className={cn("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", className )}
+ {...props}
+ />
+ </MenuPrimitive.Positioner>
+ </MenuPrimitive.Portal>
+ )
+}
+
+function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props) {
+ return <MenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
+}
+
+function DropdownMenuLabel({
+ className,
+ inset,
+ ...props
+}: MenuPrimitive.GroupLabel.Props & {
+ inset?: boolean
+}) {
+ return (
+ <MenuPrimitive.GroupLabel
+ data-slot="dropdown-menu-label"
+ data-inset={inset}
+ className={cn(
+ "px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function DropdownMenuItem({
+ className,
+ inset,
+ variant = "default",
+ ...props
+}: MenuPrimitive.Item.Props & {
+ inset?: boolean
+ variant?: "default" | "destructive"
+}) {
+ return (
+ <MenuPrimitive.Item
+ data-slot="dropdown-menu-item"
+ data-inset={inset}
+ data-variant={variant}
+ className={cn(
+ "group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props) {
+ return <MenuPrimitive.SubmenuRoot data-slot="dropdown-menu-sub" {...props} />
+}
+
+function DropdownMenuSubTrigger({
+ className,
+ inset,
+ children,
+ ...props
+}: MenuPrimitive.SubmenuTrigger.Props & {
+ inset?: boolean
+}) {
+ return (
+ <MenuPrimitive.SubmenuTrigger
+ data-slot="dropdown-menu-sub-trigger"
+ data-inset={inset}
+ className={cn(
+ "flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
+ className
+ )}
+ {...props}
+ >
+ {children}
+ <ChevronRightIcon className="ml-auto" />
+ </MenuPrimitive.SubmenuTrigger>
+ )
+}
+
+function DropdownMenuSubContent({
+ align = "start",
+ alignOffset = -3,
+ side = "right",
+ sideOffset = 0,
+ className,
+ ...props
+}: React.ComponentProps<typeof DropdownMenuContent>) {
+ return (
+ <DropdownMenuContent
+ data-slot="dropdown-menu-sub-content"
+ className={cn(
+ "w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
+ className
+ )}
+ align={align}
+ alignOffset={alignOffset}
+ side={side}
+ sideOffset={sideOffset}
+ {...props}
+ />
+ )
+}
+
+function DropdownMenuCheckboxItem({
+ className,
+ children,
+ checked,
+ inset,
+ ...props
+}: MenuPrimitive.CheckboxItem.Props & {
+ inset?: boolean
+}) {
+ return (
+ <MenuPrimitive.CheckboxItem
+ data-slot="dropdown-menu-checkbox-item"
+ data-inset={inset}
+ className={cn(
+ "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
+ className
+ )}
+ checked={checked}
+ {...props}
+ >
+ <span
+ className="pointer-events-none absolute right-2 flex items-center justify-center"
+ data-slot="dropdown-menu-checkbox-item-indicator"
+ >
+ <MenuPrimitive.CheckboxItemIndicator>
+ <CheckIcon
+ />
+ </MenuPrimitive.CheckboxItemIndicator>
+ </span>
+ {children}
+ </MenuPrimitive.CheckboxItem>
+ )
+}
+
+function DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props) {
+ return (
+ <MenuPrimitive.RadioGroup
+ data-slot="dropdown-menu-radio-group"
+ {...props}
+ />
+ )
+}
+
+function DropdownMenuRadioItem({
+ className,
+ children,
+ inset,
+ ...props
+}: MenuPrimitive.RadioItem.Props & {
+ inset?: boolean
+}) {
+ return (
+ <MenuPrimitive.RadioItem
+ data-slot="dropdown-menu-radio-item"
+ data-inset={inset}
+ className={cn(
+ "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
+ className
+ )}
+ {...props}
+ >
+ <span
+ className="pointer-events-none absolute right-2 flex items-center justify-center"
+ data-slot="dropdown-menu-radio-item-indicator"
+ >
+ <MenuPrimitive.RadioItemIndicator>
+ <CheckIcon
+ />
+ </MenuPrimitive.RadioItemIndicator>
+ </span>
+ {children}
+ </MenuPrimitive.RadioItem>
+ )
+}
+
+function DropdownMenuSeparator({
+ className,
+ ...props
+}: MenuPrimitive.Separator.Props) {
+ return (
+ <MenuPrimitive.Separator
+ data-slot="dropdown-menu-separator"
+ className={cn("-mx-1 my-1 h-px bg-border", className)}
+ {...props}
+ />
+ )
+}
+
+function DropdownMenuShortcut({
+ className,
+ ...props
+}: React.ComponentProps<"span">) {
+ return (
+ <span
+ data-slot="dropdown-menu-shortcut"
+ className={cn(
+ "ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+export {
+ DropdownMenu,
+ DropdownMenuPortal,
+ DropdownMenuTrigger,
+ DropdownMenuContent,
+ DropdownMenuGroup,
+ DropdownMenuLabel,
+ DropdownMenuItem,
+ DropdownMenuCheckboxItem,
+ DropdownMenuRadioGroup,
+ DropdownMenuRadioItem,
+ DropdownMenuSeparator,
+ DropdownMenuShortcut,
+ DropdownMenuSub,
+ DropdownMenuSubTrigger,
+ DropdownMenuSubContent,
+}
diff --git a/web/src/components/ui/input.tsx b/web/src/components/ui/input.tsx
new file mode 100644
index 000000000..7d21babba
--- /dev/null
+++ b/web/src/components/ui/input.tsx
@@ -0,0 +1,20 @@
+import * as React from "react"
+import { Input as InputPrimitive } from "@base-ui/react/input"
+
+import { cn } from "@/lib/utils"
+
+function Input({ className, type, ...props }: React.ComponentProps<"input">) {
+ return (
+ <InputPrimitive
+ type={type}
+ data-slot="input"
+ className={cn(
+ "h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+export { Input }
diff --git a/web/src/components/ui/label.tsx b/web/src/components/ui/label.tsx
new file mode 100644
index 000000000..74da65c33
--- /dev/null
+++ b/web/src/components/ui/label.tsx
@@ -0,0 +1,20 @@
+"use client"
+
+import * as React from "react"
+
+import { cn } from "@/lib/utils"
+
+function Label({ className, ...props }: React.ComponentProps<"label">) {
+ return (
+ <label
+ data-slot="label"
+ className={cn(
+ "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+export { Label }
diff --git a/web/src/components/ui/markdown.tsx b/web/src/components/ui/markdown.tsx
new file mode 100644
index 000000000..6fda0f39f
--- /dev/null
+++ b/web/src/components/ui/markdown.tsx
@@ -0,0 +1,110 @@
+import { cn } from "@/lib/utils"
+import { marked } from "marked"
+import { memo, useId, useMemo } from "react"
+import ReactMarkdown, { Components } from "react-markdown"
+import remarkBreaks from "remark-breaks"
+import remarkGfm from "remark-gfm"
+import { CodeBlock, CodeBlockCode } from "./code-block"
+
+export type MarkdownProps = {
+ children: string
+ id?: string
+ className?: string
+ components?: Partial<Components>
+}
+
+function parseMarkdownIntoBlocks(markdown: string): string[] {
+ const tokens = marked.lexer(markdown)
+ return tokens.map((token) => token.raw)
+}
+
+function extractLanguage(className?: string): string {
+ if (!className) return "plaintext"
+ const match = className.match(/language-(\w+)/)
+ return match ? match[1] : "plaintext"
+}
+
+const INITIAL_COMPONENTS: Partial<Components> = {
+ code: function CodeComponent({ className, children, ...props }) {
+ const isInline =
+ !props.node?.position?.start.line ||
+ props.node?.position?.start.line === props.node?.position?.end.line
+
+ if (isInline) {
+ return (
+ <span
+ className={cn(
+ "bg-primary-foreground rounded-sm px-1 font-mono text-sm",
+ className
+ )}
+ {...props}
+ >
+ {children}
+ </span>
+ )
+ }
+
+ const language = extractLanguage(className)
+
+ return (
+ <CodeBlock className={className}>
+ <CodeBlockCode code={children as string} language={language} />
+ </CodeBlock>
+ )
+ },
+ pre: function PreComponent({ children }) {
+ return <>{children}</>
+ },
+}
+
+const MemoizedMarkdownBlock = memo(
+ function MarkdownBlock({
+ content,
+ components = INITIAL_COMPONENTS,
+ }: {
+ content: string
+ components?: Partial<Components>
+ }) {
+ return (
+ <ReactMarkdown
+ remarkPlugins={[remarkGfm, remarkBreaks]}
+ components={components}
+ >
+ {content}
+ </ReactMarkdown>
+ )
+ },
+ function propsAreEqual(prevProps, nextProps) {
+ return prevProps.content === nextProps.content
+ }
+)
+
+MemoizedMarkdownBlock.displayName = "MemoizedMarkdownBlock"
+
+function MarkdownComponent({
+ children,
+ id,
+ className,
+ components = INITIAL_COMPONENTS,
+}: MarkdownProps) {
+ const generatedId = useId()
+ const blockId = id ?? generatedId
+ const blocks = useMemo(() => parseMarkdownIntoBlocks(children), [children])
+
+ return (
+ <div className={className}>
+ {blocks.map((block, index) => (
+ <MemoizedMarkdownBlock
+ key={`${blockId}-block-${index}`}
+ content={block}
+ components={components}
+ />
+ ))}
+ </div>
+ )
+}
+
+const Markdown = memo(MarkdownComponent)
+Markdown.displayName = "Markdown"
+
+export { Markdown }
diff --git a/web/src/components/ui/scroll-area.tsx b/web/src/components/ui/scroll-area.tsx
new file mode 100644
index 000000000..84c1e9fbb
--- /dev/null
+++ b/web/src/components/ui/scroll-area.tsx
@@ -0,0 +1,55 @@
+"use client"
+
+import * as React from "react"
+import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area"
+
+import { cn } from "@/lib/utils"
+
+function ScrollArea({
+ className,
+ children,
+ ...props
+}: ScrollAreaPrimitive.Root.Props) {
+ return (
+ <ScrollAreaPrimitive.Root
+ data-slot="scroll-area"
+ className={cn("relative", className)}
+ {...props}
+ >
+ <ScrollAreaPrimitive.Viewport
+ data-slot="scroll-area-viewport"
+ className="size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1"
+ >
+ {children}
+ </ScrollAreaPrimitive.Viewport>
+ <ScrollBar />
+ <ScrollAreaPrimitive.Corner />
+ </ScrollAreaPrimitive.Root>
+ )
+}
+
+function ScrollBar({
+ className,
+ orientation = "vertical",
+ ...props
+}: ScrollAreaPrimitive.Scrollbar.Props) {
+ return (
+ <ScrollAreaPrimitive.Scrollbar
+ data-slot="scroll-area-scrollbar"
+ data-orientation={orientation}
+ orientation={orientation}
+ className={cn(
+ "flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",
+ className
+ )}
+ {...props}
+ >
+ <ScrollAreaPrimitive.Thumb
+ data-slot="scroll-area-thumb"
+ className="relative flex-1 rounded-full bg-border"
+ />
+ </ScrollAreaPrimitive.Scrollbar>
+ )
+}
+
+export { ScrollArea, ScrollBar }
diff --git a/web/src/components/ui/select.tsx b/web/src/components/ui/select.tsx
new file mode 100644
index 000000000..e8021f5f2
--- /dev/null
+++ b/web/src/components/ui/select.tsx
@@ -0,0 +1,201 @@
+"use client"
+
+import * as React from "react"
+import { Select as SelectPrimitive } from "@base-ui/react/select"
+
+import { cn } from "@/lib/utils"
+import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react"
+
+const Select = SelectPrimitive.Root
+
+function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {
+ return (
+ <SelectPrimitive.Group
+ data-slot="select-group"
+ className={cn("scroll-my-1 p-1", className)}
+ {...props}
+ />
+ )
+}
+
+function SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {
+ return (
+ <SelectPrimitive.Value
+ data-slot="select-value"
+ className={cn("flex flex-1 text-left", className)}
+ {...props}
+ />
+ )
+}
+
+function SelectTrigger({
+ className,
+ size = "default",
+ children,
+ ...props
+}: SelectPrimitive.Trigger.Props & {
+ size?: "sm" | "default"
+}) {
+ return (
+ <SelectPrimitive.Trigger
+ data-slot="select-trigger"
+ data-size={size}
+ className={cn(
+ "flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
+ className
+ )}
+ {...props}
+ >
+ {children}
+ <SelectPrimitive.Icon
+ render={
+ <ChevronDownIcon className="pointer-events-none size-4 text-muted-foreground" />
+ }
+ />
+ </SelectPrimitive.Trigger>
+ )
+}
+
+function SelectContent({
+ className,
+ children,
+ side = "bottom",
+ sideOffset = 4,
+ align = "center",
+ alignOffset = 0,
+ alignItemWithTrigger = true,
+ ...props
+}: SelectPrimitive.Popup.Props &
+ Pick<
+ SelectPrimitive.Positioner.Props,
+ "align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger"
+ >) {
+ return (
+ <SelectPrimitive.Portal>
+ <SelectPrimitive.Positioner
+ side={side}
+ sideOffset={sideOffset}
+ align={align}
+ alignOffset={alignOffset}
+ alignItemWithTrigger={alignItemWithTrigger}
+ className="isolate z-50"
+ >
+ <SelectPrimitive.Popup
+ data-slot="select-content"
+ data-align-trigger={alignItemWithTrigger}
+ className={cn("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className )}
+ {...props}
+ >
+ <SelectScrollUpButton />
+ <SelectPrimitive.List>{children}</SelectPrimitive.List>
+ <SelectScrollDownButton />
+ </SelectPrimitive.Popup>
+ </SelectPrimitive.Positioner>
+ </SelectPrimitive.Portal>
+ )
+}
+
+function SelectLabel({
+ className,
+ ...props
+}: SelectPrimitive.GroupLabel.Props) {
+ return (
+ <SelectPrimitive.GroupLabel
+ data-slot="select-label"
+ className={cn("px-1.5 py-1 text-xs text-muted-foreground", className)}
+ {...props}
+ />
+ )
+}
+
+function SelectItem({
+ className,
+ children,
+ ...props
+}: SelectPrimitive.Item.Props) {
+ return (
+ <SelectPrimitive.Item
+ data-slot="select-item"
+ className={cn(
+ "relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
+ className
+ )}
+ {...props}
+ >
+ <SelectPrimitive.ItemText className="flex flex-1 shrink-0 gap-2 whitespace-nowrap">
+ {children}
+ </SelectPrimitive.ItemText>
+ <SelectPrimitive.ItemIndicator
+ render={
+ <span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center" />
+ }
+ >
+ <CheckIcon className="pointer-events-none" />
+ </SelectPrimitive.ItemIndicator>
+ </SelectPrimitive.Item>
+ )
+}
+
+function SelectSeparator({
+ className,
+ ...props
+}: SelectPrimitive.Separator.Props) {
+ return (
+ <SelectPrimitive.Separator
+ data-slot="select-separator"
+ className={cn("pointer-events-none -mx-1 my-1 h-px bg-border", className)}
+ {...props}
+ />
+ )
+}
+
+function SelectScrollUpButton({
+ className,
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {
+ return (
+ <SelectPrimitive.ScrollUpArrow
+ data-slot="select-scroll-up-button"
+ className={cn(
+ "top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
+ className
+ )}
+ {...props}
+ >
+ <ChevronUpIcon
+ />
+ </SelectPrimitive.ScrollUpArrow>
+ )
+}
+
+function SelectScrollDownButton({
+ className,
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {
+ return (
+ <SelectPrimitive.ScrollDownArrow
+ data-slot="select-scroll-down-button"
+ className={cn(
+ "bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
+ className
+ )}
+ {...props}
+ >
+ <ChevronDownIcon
+ />
+ </SelectPrimitive.ScrollDownArrow>
+ )
+}
+
+export {
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectLabel,
+ SelectScrollDownButton,
+ SelectScrollUpButton,
+ SelectSeparator,
+ SelectTrigger,
+ SelectValue,
+}
diff --git a/web/src/components/ui/separator.tsx b/web/src/components/ui/separator.tsx
new file mode 100644
index 000000000..6e1369e43
--- /dev/null
+++ b/web/src/components/ui/separator.tsx
@@ -0,0 +1,25 @@
+"use client"
+
+import { Separator as SeparatorPrimitive } from "@base-ui/react/separator"
+
+import { cn } from "@/lib/utils"
+
+function Separator({
+ className,
+ orientation = "horizontal",
+ ...props
+}: SeparatorPrimitive.Props) {
+ return (
+ <SeparatorPrimitive
+ data-slot="separator"
+ orientation={orientation}
+ className={cn(
+ "shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+export { Separator }
diff --git a/web/src/components/ui/sheet.tsx b/web/src/components/ui/sheet.tsx
new file mode 100644
index 000000000..727cc4db3
--- /dev/null
+++ b/web/src/components/ui/sheet.tsx
@@ -0,0 +1,135 @@
+"use client"
+
+import * as React from "react"
+import { Dialog as SheetPrimitive } from "@base-ui/react/dialog"
+
+import { cn } from "@/lib/utils"
+import { Button } from "@/components/ui/button"
+import { XIcon } from "lucide-react"
+
+function Sheet({ ...props }: SheetPrimitive.Root.Props) {
+ return <SheetPrimitive.Root data-slot="sheet" {...props} />
+}
+
+function SheetTrigger({ ...props }: SheetPrimitive.Trigger.Props) {
+ return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />
+}
+
+function SheetClose({ ...props }: SheetPrimitive.Close.Props) {
+ return <SheetPrimitive.Close data-slot="sheet-close" {...props} />
+}
+
+function SheetPortal({ ...props }: SheetPrimitive.Portal.Props) {
+ return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />
+}
+
+function SheetOverlay({ className, ...props }: SheetPrimitive.Backdrop.Props) {
+ return (
+ <SheetPrimitive.Backdrop
+ data-slot="sheet-overlay"
+ className={cn(
+ "fixed inset-0 z-50 bg-black/10 duration-100 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function SheetContent({
+ className,
+ children,
+ side = "right",
+ showCloseButton = true,
+ ...props
+}: SheetPrimitive.Popup.Props & {
+ side?: "top" | "right" | "bottom" | "left"
+ showCloseButton?: boolean
+}) {
+ return (
+ <SheetPortal>
+ <SheetOverlay />
+ <SheetPrimitive.Popup
+ data-slot="sheet-content"
+ data-side={side}
+ className={cn(
+ "fixed z-50 flex flex-col gap-4 bg-background bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",
+ className
+ )}
+ {...props}
+ >
+ {children}
+ {showCloseButton && (
+ <SheetPrimitive.Close
+ data-slot="sheet-close"
+ render={
+ <Button
+ variant="ghost"
+ className="absolute top-3 right-3"
+ size="icon-sm"
+ />
+ }
+ >
+ <XIcon
+ />
+ <span className="sr-only">Close</span>
+ </SheetPrimitive.Close>
+ )}
+ </SheetPrimitive.Popup>
+ </SheetPortal>
+ )
+}
+
+function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="sheet-header"
+ className={cn("flex flex-col gap-0.5 p-4", className)}
+ {...props}
+ />
+ )
+}
+
+function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="sheet-footer"
+ className={cn("mt-auto flex flex-col gap-2 p-4", className)}
+ {...props}
+ />
+ )
+}
+
+function SheetTitle({ className, ...props }: SheetPrimitive.Title.Props) {
+ return (
+ <SheetPrimitive.Title
+ data-slot="sheet-title"
+ className={cn("text-base font-medium text-foreground", className)}
+ {...props}
+ />
+ )
+}
+
+function SheetDescription({
+ className,
+ ...props
+}: SheetPrimitive.Description.Props) {
+ return (
+ <SheetPrimitive.Description
+ data-slot="sheet-description"
+ className={cn("text-sm text-muted-foreground", className)}
+ {...props}
+ />
+ )
+}
+
+export {
+ Sheet,
+ SheetTrigger,
+ SheetClose,
+ SheetContent,
+ SheetHeader,
+ SheetFooter,
+ SheetTitle,
+ SheetDescription,
+}
diff --git a/web/src/components/ui/skeleton.tsx b/web/src/components/ui/skeleton.tsx
new file mode 100644
index 000000000..0118624f6
--- /dev/null
+++ b/web/src/components/ui/skeleton.tsx
@@ -0,0 +1,13 @@
+import { cn } from "@/lib/utils"
+
+function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="skeleton"
+ className={cn("animate-pulse rounded-md bg-muted", className)}
+ {...props}
+ />
+ )
+}
+
+export { Skeleton }
diff --git a/web/src/components/ui/sonner.tsx b/web/src/components/ui/sonner.tsx
new file mode 100644
index 000000000..9280ee52f
--- /dev/null
+++ b/web/src/components/ui/sonner.tsx
@@ -0,0 +1,49 @@
+"use client"
+
+import { useTheme } from "next-themes"
+import { Toaster as Sonner, type ToasterProps } from "sonner"
+import { CircleCheckIcon, InfoIcon, TriangleAlertIcon, OctagonXIcon, Loader2Icon } from "lucide-react"
+
+const Toaster = ({ ...props }: ToasterProps) => {
+ const { theme = "system" } = useTheme()
+
+ return (
+ <Sonner
+ theme={theme as ToasterProps["theme"]}
+ className="toaster group"
+ icons={{
+ success: (
+ <CircleCheckIcon className="size-4" />
+ ),
+ info: (
+ <InfoIcon className="size-4" />
+ ),
+ warning: (
+ <TriangleAlertIcon className="size-4" />
+ ),
+ error: (
+ <OctagonXIcon className="size-4" />
+ ),
+ loading: (
+ <Loader2Icon className="size-4 animate-spin" />
+ ),
+ }}
+ style={
+ {
+ "--normal-bg": "var(--popover)",
+ "--normal-text": "var(--popover-foreground)",
+ "--normal-border": "var(--border)",
+ "--border-radius": "var(--radius)",
+ } as React.CSSProperties
+ }
+ toastOptions={{
+ classNames: {
+ toast: "cn-toast",
+ },
+ }}
+ {...props}
+ />
+ )
+}
+
+export { Toaster }
diff --git a/web/src/components/ui/table.tsx b/web/src/components/ui/table.tsx
new file mode 100644
index 000000000..8dc13aee3
--- /dev/null
+++ b/web/src/components/ui/table.tsx
@@ -0,0 +1,116 @@
+"use client"
+
+import * as React from "react"
+
+import { cn } from "@/lib/utils"
+
+function Table({ className, ...props }: React.ComponentProps<"table">) {
+ return (
+ <div
+ data-slot="table-container"
+ className="relative w-full overflow-x-auto"
+ >
+ <table
+ data-slot="table"
+ className={cn("w-full caption-bottom text-sm", className)}
+ {...props}
+ />
+ </div>
+ )
+}
+
+function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
+ return (
+ <thead
+ data-slot="table-header"
+ className={cn("[&_tr]:border-b", className)}
+ {...props}
+ />
+ )
+}
+
+function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
+ return (
+ <tbody
+ data-slot="table-body"
+ className={cn("[&_tr:last-child]:border-0", className)}
+ {...props}
+ />
+ )
+}
+
+function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
+ return (
+ <tfoot
+ data-slot="table-footer"
+ className={cn(
+ "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
+ return (
+ <tr
+ data-slot="table-row"
+ className={cn(
+ "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function TableHead({ className, ...props }: React.ComponentProps<"th">) {
+ return (
+ <th
+ data-slot="table-head"
+ className={cn(
+ "h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function TableCell({ className, ...props }: React.ComponentProps<"td">) {
+ return (
+ <td
+ data-slot="table-cell"
+ className={cn(
+ "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function TableCaption({
+ className,
+ ...props
+}: React.ComponentProps<"caption">) {
+ return (
+ <caption
+ data-slot="table-caption"
+ className={cn("mt-4 text-sm text-muted-foreground", className)}
+ {...props}
+ />
+ )
+}
+
+export {
+ Table,
+ TableHeader,
+ TableBody,
+ TableFooter,
+ TableHead,
+ TableRow,
+ TableCell,
+ TableCaption,
+}
diff --git a/web/src/components/ui/tabs.tsx b/web/src/components/ui/tabs.tsx
new file mode 100644
index 000000000..56c428888
--- /dev/null
+++ b/web/src/components/ui/tabs.tsx
@@ -0,0 +1,82 @@
+"use client"
+
+import { Tabs as TabsPrimitive } from "@base-ui/react/tabs"
+import { cva, type VariantProps } from "class-variance-authority"
+
+import { cn } from "@/lib/utils"
+
+function Tabs({
+ className,
+ orientation = "horizontal",
+ ...props
+}: TabsPrimitive.Root.Props) {
+ return (
+ <TabsPrimitive.Root
+ data-slot="tabs"
+ data-orientation={orientation}
+ className={cn(
+ "group/tabs flex gap-2 data-horizontal:flex-col",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+const tabsListVariants = cva(
+ "group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",
+ {
+ variants: {
+ variant: {
+ default: "bg-muted",
+ line: "gap-1 bg-transparent",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ },
+ }
+)
+
+function TabsList({
+ className,
+ variant = "default",
+ ...props
+}: TabsPrimitive.List.Props & VariantProps<typeof tabsListVariants>) {
+ return (
+ <TabsPrimitive.List
+ data-slot="tabs-list"
+ data-variant={variant}
+ className={cn(tabsListVariants({ variant }), className)}
+ {...props}
+ />
+ )
+}
+
+function TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props) {
+ return (
+ <TabsPrimitive.Tab
+ data-slot="tabs-trigger"
+ className={cn(
+ "relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
+ "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent",
+ "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground",
+ "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function TabsContent({ className, ...props }: TabsPrimitive.Panel.Props) {
+ return (
+ <TabsPrimitive.Panel
+ data-slot="tabs-content"
+ className={cn("flex-1 text-sm outline-none", className)}
+ {...props}
+ />
+ )
+}
+
+export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants }
diff --git a/web/src/components/ui/textarea.tsx b/web/src/components/ui/textarea.tsx
new file mode 100644
index 000000000..04d27f7d1
--- /dev/null
+++ b/web/src/components/ui/textarea.tsx
@@ -0,0 +1,18 @@
+import * as React from "react"
+
+import { cn } from "@/lib/utils"
+
+function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
+ return (
+ <textarea
+ data-slot="textarea"
+ className={cn(
+ "flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+export { Textarea }
diff --git a/web/src/components/ui/upgrade-badge.tsx b/web/src/components/ui/upgrade-badge.tsx
new file mode 100644
index 000000000..6b77d8e20
--- /dev/null
+++ b/web/src/components/ui/upgrade-badge.tsx
@@ -0,0 +1,40 @@
+"use client";
+
+import { useFeatureGate } from "@/hooks/use-feature-gate";
+import type { Feature } from "@/config/plans";
+import { Badge } from "@/components/ui/badge";
+import { Crown } from "lucide-react";
+
+interface UpgradeBadgeProps {
+ feature: Feature;
+ className?: string;
+}
+
+export function UpgradeBadge({ feature, className }: UpgradeBadgeProps) {
+ const { canUse, requiredPlanFor, isCloud } = useFeatureGate();
+
+ if (!isCloud || canUse(feature)) return null;
+
+ return (
+ <Badge variant="outline" className={className}>
+ <Crown className="mr-1 h-3 w-3" />
+ {requiredPlanFor(feature)}
+ </Badge>
+ );
+}
+
+interface FeatureGateProps {
+ feature: Feature;
+ children: React.ReactNode;
+ fallback?: React.ReactNode;
+}
+
+export function FeatureGate({ feature, children, fallback }: FeatureGateProps) {
+ const { canUse } = useFeatureGate();
+
+ if (canUse(feature)) {
+ return <>{children}</>;
+ }
+
+ return fallback ? <>{fallback}</> : null;
+}
diff --git a/web/src/config/dashboard.ts b/web/src/config/dashboard.ts
new file mode 100644
index 000000000..0b0dd9e2d
--- /dev/null
+++ b/web/src/config/dashboard.ts
@@ -0,0 +1,97 @@
+import {
+ BarChart3,
+ Building2,
+ FileText,
+ Globe,
+ LineChart,
+ Quote,
+ Settings,
+ Tag,
+ Users,
+} from "lucide-react";
+import type { Feature } from "@/config/plans";
+
+export interface NavItem {
+ title: string;
+ href: string;
+ icon: React.ComponentType<{ className?: string }>;
+ badge?: string;
+ disabled?: boolean;
+ requiredFeature?: Feature;
+}
+
+export interface NavGroup {
+ title?: string;
+ items: NavItem[];
+}
+
+export const dashboardNav: NavGroup[] = [
+ {
+ items: [
+ {
+ title: "Brands",
+ href: "/dashboard/brands",
+ icon: Building2,
+ },
+ ],
+ },
+ {
+ title: "Analytics",
+ items: [
+ {
+ title: "Answer Engine Insights",
+ href: "/dashboard/insights",
+ icon: BarChart3,
+ requiredFeature: "basic_insights",
+ },
+ {
+ title: "Topics",
+ href: "/dashboard/topics",
+ icon: Tag,
+ },
+ {
+ title: "Prompts",
+ href: "/dashboard/prompts",
+ icon: Globe,
+ },
+ {
+ title: "Citations",
+ href: "/dashboard/citations",
+ icon: Quote,
+ },
+ {
+ title: "AI Traffic Analytics",
+ href: "/dashboard/traffic",
+ icon: LineChart,
+ requiredFeature: "advanced_analytics",
+ },
+ {
+ title: "Competitors",
+ href: "/dashboard/competitors",
+ icon: Users,
+ requiredFeature: "competitor_tracking",
+ },
+ ],
+ },
+ {
+ title: "Optimization",
+ items: [
+ {
+ title: "Content Optimization",
+ href: "/dashboard/content",
+ icon: FileText,
+ requiredFeature: "content_optimization",
+ },
+ ],
+ },
+ {
+ title: "System",
+ items: [
+ {
+ title: "Settings",
+ href: "/dashboard/settings",
+ icon: Settings,
+ },
+ ],
+ },
+];
diff --git a/web/src/config/plans.ts b/web/src/config/plans.ts
new file mode 100644
index 000000000..3d0ec3c69
--- /dev/null
+++ b/web/src/config/plans.ts
@@ -0,0 +1,200 @@
+export const FEATURES = [
+ "basic_insights",
+ "advanced_analytics",
+ "prompt_suggestions",
+ "prompt_volumes",
+ "daily_monitoring",
+ "competitor_tracking",
+ "content_optimization",
+ "custom_reports",
+ "api_access",
+ "white_label",
+ "sso_saml",
+] as const;
+
+export type Feature = (typeof FEATURES)[number];
+
+export type PlanId = "self_hosted" | "starter" | "growth" | "enterprise";
+
+export interface PlanLimits {
+ maxBrands: number;
+ maxPrompts: number;
+ maxPlatforms: number;
+ maxTeamMembers: number;
+ maxDomainsPerBrand: number;
+ maxVolumeAnalyses: number;
+ maxDailyOnDemand: number;
+ onDemandCooldownMinutes: number;
+ features: readonly Feature[];
+ /** If set, only these scraper IDs are available. Undefined = all. */
+ allowedScrapers?: readonly string[];
+ /** If set, only these model IDs are available. Undefined = all, [] = none. */
+ allowedModels?: readonly string[];
+}
+
+export interface PlanPricing {
+ monthly: number;
+}
+
+export interface Plan {
+ id: PlanId;
+ name: string;
+ tagline: string;
+ pricing: PlanPricing | null;
+ limits: PlanLimits;
+ highlighted?: boolean;
+}
+
+export const PLANS: Record<PlanId, Plan> = {
+ self_hosted: {
+ id: "self_hosted",
+ name: "Self-Hosted",
+ tagline: "Full control on your own infrastructure",
+ pricing: null,
+ limits: {
+ maxBrands: -1,
+ maxPrompts: -1,
+ maxPlatforms: 8,
+ maxTeamMembers: -1,
+ maxDomainsPerBrand: -1,
+ maxVolumeAnalyses: -1,
+ maxDailyOnDemand: -1,
+ onDemandCooldownMinutes: 0,
+ features: [
+ "basic_insights",
+ "prompt_suggestions",
+ "prompt_volumes",
+ "advanced_analytics",
+ "daily_monitoring",
+ "competitor_tracking",
+ "content_optimization",
+ "custom_reports",
+ "api_access",
+ ],
+ },
+ },
+ starter: {
+ id: "starter",
+ name: "Starter",
+ tagline: "Track your brand across AI platforms",
+ pricing: { monthly: 49 },
+ limits: {
+ maxBrands: 1,
+ maxPrompts: 50,
+ maxPlatforms: 2,
+ maxTeamMembers: 1,
+ maxDomainsPerBrand: 3,
+ maxVolumeAnalyses: 4,
+ maxDailyOnDemand: 3,
+ onDemandCooldownMinutes: 15,
+ allowedScrapers: ["chatgpt-web", "perplexity-web"],
+ allowedModels: [],
+ features: [
+ "basic_insights",
+ "advanced_analytics",
+ "prompt_suggestions",
+ "prompt_volumes",
+ "daily_monitoring",
+ "competitor_tracking",
+ "content_optimization",
+ "custom_reports",
+ "api_access",
+ ],
+ },
+ },
+ growth: {
+ id: "growth",
+ name: "Growth",
+ tagline: "For brands that need deep insights",
+ pricing: { monthly: 249 },
+ highlighted: true,
+ limits: {
+ maxBrands: 4,
+ maxPrompts: 200,
+ maxPlatforms: 8,
+ maxTeamMembers: 3,
+ maxDomainsPerBrand: 10,
+ maxVolumeAnalyses: 10,
+ maxDailyOnDemand: 10,
+ onDemandCooldownMinutes: 5,
+ features: [
+ "basic_insights",
+ "prompt_suggestions",
+ "prompt_volumes",
+ "advanced_analytics",
+ "daily_monitoring",
+ "competitor_tracking",
+ "content_optimization",
+ "custom_reports",
+ "api_access",
+ ],
+ },
+ },
+ enterprise: {
+ id: "enterprise",
+ name: "Enterprise",
+ tagline: "For agencies and large teams at scale",
+ pricing: null,
+ limits: {
+ maxBrands: -1,
+ maxPrompts: -1,
+ maxPlatforms: 8,
+ maxTeamMembers: -1,
+ maxDomainsPerBrand: -1,
+ maxVolumeAnalyses: -1,
+ maxDailyOnDemand: -1,
+ onDemandCooldownMinutes: 0,
+ features: [
+ "basic_insights",
+ "prompt_suggestions",
+ "prompt_volumes",
+ "advanced_analytics",
+ "daily_monitoring",
+ "competitor_tracking",
+ "content_optimization",
+ "custom_reports",
+ "api_access",
+ "white_label",
+ "sso_saml",
+ ],
+ },
+ },
+} as const;
+
+export const PLAN_ORDER: PlanId[] = ["starter", "growth", "enterprise"];
+
+export const SUBSCRIBABLE_PLANS: PlanId[] = ["starter", "growth"];
+
+/**
+ * Self-hosted instances bypass all limits.
+ * Cloud is determined by NEXT_PUBLIC_IS_CLOUD env var.
+ */
+export function isCloud(): boolean {
+ return process.env.NEXT_PUBLIC_IS_CLOUD === "true";
+}
+
+export function getPlan(planId: string | null | undefined): Plan {
+ if (!isCloud()) return PLANS.self_hosted;
+ return PLANS[(planId as PlanId) ?? "starter"] ?? PLANS.starter;
+}
+
+export function hasFeature(plan: Plan, feature: Feature): boolean {
+ return plan.limits.features.includes(feature);
+}
+
+export function isWithinLimit(
+ plan: Plan,
+ key: keyof Omit<PlanLimits, "features" | "allowedScrapers" | "allowedModels">,
+ currentCount: number,
+): boolean {
+ const limit = plan.limits[key];
+ if (limit === -1) return true;
+ return currentCount < limit;
+}
+
+export function getMinimumPlanForFeature(feature: Feature): PlanId {
+ for (const id of PLAN_ORDER) {
+ if (PLANS[id].limits.features.includes(feature)) return id;
+ }
+ return "enterprise";
+}
diff --git a/web/src/config/prompt-options.ts b/web/src/config/prompt-options.ts
new file mode 100644
index 000000000..c44e9f815
--- /dev/null
+++ b/web/src/config/prompt-options.ts
@@ -0,0 +1,72 @@
+export const REGIONS = [
+ { code: 'US', label: 'United States' },
+ { code: 'GB', label: 'United Kingdom' },
+ { code: 'DE', label: 'Germany' },
+ { code: 'FR', label: 'France' },
+ { code: 'TR', label: 'Turkey' },
+ { code: 'JP', label: 'Japan' },
+ { code: 'BR', label: 'Brazil' },
+ { code: 'IN', label: 'India' },
+ { code: 'AU', label: 'Australia' },
+ { code: 'CA', label: 'Canada' },
+ { code: 'NL', label: 'Netherlands' },
+ { code: 'IT', label: 'Italy' },
+ { code: 'ES', label: 'Spain' },
+ { code: 'KR', label: 'South Korea' },
+ { code: 'SE', label: 'Sweden' },
+ { code: 'MX', label: 'Mexico' },
+ { code: 'SG', label: 'Singapore' },
+ { code: 'AE', label: 'United Arab Emirates' },
+] as const;
+
+export type RegionCode = (typeof REGIONS)[number]['code'];
+
+export const LANGUAGES = [
+ { code: 'en', label: 'English (en)' },
+ { code: 'de', label: 'German (de)' },
+ { code: 'fr', label: 'French (fr)' },
+ { code: 'es', label: 'Spanish (es)' },
+ { code: 'tr', label: 'Turkish (tr)' },
+ { code: 'ja', label: 'Japanese (ja)' },
+ { code: 'pt', label: 'Portuguese (pt)' },
+ { code: 'hi', label: 'Hindi (hi)' },
+ { code: 'ko', label: 'Korean (ko)' },
+ { code: 'it', label: 'Italian (it)' },
+ { code: 'nl', label: 'Dutch (nl)' },
+ { code: 'sv', label: 'Swedish (sv)' },
+ { code: 'ar', label: 'Arabic (ar)' },
+] as const;
+
+export type LanguageCode = (typeof LANGUAGES)[number]['code'];
+
+export const MODEL_GROUPS = [
+ {
+ provider: 'Claude',
+ models: [
+ { id: 'claude-sonnet-4-6', label: 'Claude Sonnet 4.6' },
+ ],
+ },
+] as const;
+
+export const ALL_MODELS = MODEL_GROUPS.flatMap((g) =>
+ g.models.map((m) => ({ ...m, provider: g.provider })),
+);
+
+export const SCRAPER_GROUPS = [
+ {
+ provider: 'Cloro',
+ scrapers: [
+ { id: 'chatgpt-web', label: 'ChatGPT (Web)', platform: 'chatgpt' },
+ { id: 'google-aio', label: 'Google AI Overview', platform: 'google-ai-overviews' },
+ { id: 'google-aimode', label: 'Google AI Mode', platform: 'google-ai-mode' },
+ { id: 'copilot-web', label: 'Microsoft Copilot', platform: 'copilot' },
+ { id: 'grok-web', label: 'Grok', platform: 'grok' },
+ { id: 'perplexity-web', label: 'Perplexity', platform: 'perplexity' },
+ { id: 'gemini-web', label: 'Google Gemini', platform: 'gemini' },
+ ],
+ },
+] as const;
+
+export const ALL_SCRAPERS = SCRAPER_GROUPS.flatMap((g) =>
+ g.scrapers.map((s) => ({ ...s, provider: g.provider })),
+);
diff --git a/web/src/config/site.ts b/web/src/config/site.ts
new file mode 100644
index 000000000..7c16c0b56
--- /dev/null
+++ b/web/src/config/site.ts
@@ -0,0 +1,13 @@
+export const siteConfig = {
+ name: "Ansvisor",
+ description:
+ "Monitor, analyze, and optimize your brand's visibility in AI-powered search engines like ChatGPT, Perplexity, Gemini, and more.",
+ url: "https://ansvisor.com",
+ ogImage: "https://ansvisor.com/og.jpg",
+ links: {
+ github: "https://github.com/your-org/ansvisor",
+ docs: "https://docs.ansvisor.com",
+ },
+} as const;
+
+export type SiteConfig = typeof siteConfig;
diff --git a/web/src/hooks/use-feature-gate.ts b/web/src/hooks/use-feature-gate.ts
new file mode 100644
index 000000000..c58b04473
--- /dev/null
+++ b/web/src/hooks/use-feature-gate.ts
@@ -0,0 +1,42 @@
+"use client";
+
+import { usePlanContext } from "@/components/providers/plan-provider";
+import {
+ type Feature,
+ type PlanLimits,
+ PLANS,
+ hasFeature,
+ isWithinLimit,
+ getMinimumPlanForFeature,
+} from "@/config/plans";
+
+export function useFeatureGate() {
+ const { planId, isCloud } = usePlanContext();
+ const plan = PLANS[planId] ?? PLANS.starter;
+
+ return {
+ planId,
+ planName: plan.name,
+ isCloud,
+
+ canUse(feature: Feature): boolean {
+ return hasFeature(plan, feature);
+ },
+
+ withinLimit(
+ key: keyof Omit<PlanLimits, "features" | "allowedScrapers" | "allowedModels">,
+ currentCount: number,
+ ): boolean {
+ return isWithinLimit(plan, key, currentCount);
+ },
+
+ getLimit(key: keyof Omit<PlanLimits, "features" | "allowedScrapers" | "allowedModels">): number {
+ return plan.limits[key];
+ },
+
+ requiredPlanFor(feature: Feature): string {
+ const minPlan = getMinimumPlanForFeature(feature);
+ return PLANS[minPlan].name;
+ },
+ };
+}
diff --git a/web/src/i18n/navigation.ts b/web/src/i18n/navigation.ts
new file mode 100644
index 000000000..2c786c54d
--- /dev/null
+++ b/web/src/i18n/navigation.ts
@@ -0,0 +1,5 @@
+import { createNavigation } from "next-intl/navigation";
+import { routing } from "./routing";
+
+export const { Link, redirect, usePathname, useRouter, getPathname } =
+ createNavigation(routing);
diff --git a/web/src/i18n/request.ts b/web/src/i18n/request.ts
new file mode 100644
index 000000000..04d1c5af4
--- /dev/null
+++ b/web/src/i18n/request.ts
@@ -0,0 +1,15 @@
+import { getRequestConfig } from "next-intl/server";
+import { routing } from "./routing";
+
+export default getRequestConfig(async ({ requestLocale }) => {
+ let locale = await requestLocale;
+
+ if (!locale || !routing.locales.includes(locale as "en")) {
+ locale = routing.defaultLocale;
+ }
+
+ return {
+ locale,
+ messages: (await import(`../../messages/${locale}.json`)).default,
+ };
+});
diff --git a/web/src/i18n/routing.ts b/web/src/i18n/routing.ts
new file mode 100644
index 000000000..a0c903600
--- /dev/null
+++ b/web/src/i18n/routing.ts
@@ -0,0 +1,9 @@
+import { defineRouting } from "next-intl/routing";
+
+export const routing = defineRouting({
+ locales: ["en"],
+ defaultLocale: "en",
+ localePrefix: "as-needed",
+});
+
+export type Locale = (typeof routing.locales)[number];
diff --git a/web/src/lib/actions/brand-domain.ts b/web/src/lib/actions/brand-domain.ts
new file mode 100644
index 000000000..2a08dc7eb
--- /dev/null
+++ b/web/src/lib/actions/brand-domain.ts
@@ -0,0 +1,108 @@
+'use server';
+
+import { createClient } from '@/lib/supabase/server';
+import { revalidatePath } from 'next/cache';
+import type { BrandDomain } from '@/types';
+
+function mapDomainRow(d: Record<string, unknown>): BrandDomain {
+ return {
+ id: d.id as string,
+ brandId: d.brand_id as string,
+ domain: d.domain as string,
+ country: (d.country as string | null) ?? undefined,
+ isPrimary: d.is_primary as boolean,
+ };
+}
+
+export async function addDomain(
+ brandId: string,
+ data: { domain: string; country?: string; isPrimary: boolean },
+): Promise<BrandDomain> {
+ const supabase = await createClient();
+
+ const { data: domain, error } = await supabase
+ .from('brand_domains')
+ .insert({
+ brand_id: brandId,
+ domain: data.domain.trim(),
+ country: data.country?.trim() || null,
+ is_primary: data.isPrimary,
+ })
+ .select()
+ .single();
+
+ if (error || !domain)
+ throw new Error(error?.message ?? 'Failed to add domain');
+
+ revalidatePath('/dashboard/brands');
+ return mapDomainRow(domain as Record<string, unknown>);
+}
+
+export async function updateDomain(
+ id: string,
+ data: { domain?: string; country?: string | null; isPrimary?: boolean },
+): Promise<BrandDomain> {
+ const supabase = await createClient();
+
+ const payload: Record<string, unknown> = {};
+ if (data.domain !== undefined) payload.domain = data.domain.trim();
+ if ('country' in data) payload.country = data.country?.trim() || null;
+ if (data.isPrimary !== undefined) payload.is_primary = data.isPrimary;
+
+ const { data: domain, error } = await supabase
+ .from('brand_domains')
+ .update(payload)
+ .eq('id', id)
+ .select()
+ .single();
+
+ if (error || !domain)
+ throw new Error(error?.message ?? 'Failed to update domain');
+
+ revalidatePath('/dashboard/brands');
+ return mapDomainRow(domain as Record<string, unknown>);
+}
+
+export async function removeDomain(id: string): Promise<void> {
+ const supabase = await createClient();
+
+ const { error } = await supabase.from('brand_domains').delete().eq('id', id);
+
+ if (error) throw new Error(error.message);
+ revalidatePath('/dashboard/brands');
+}
+
+/**
+ * Replace all domains for a brand with the provided list.
+ * Used by the DomainsTab save action.
+ */
+export async function syncDomains(
+ brandId: string,
+ domains: { domain: string; country?: string; isPrimary: boolean }[],
+): Promise<BrandDomain[]> {
+ const supabase = await createClient();
+
+ await supabase.from('brand_domains').delete().eq('brand_id', brandId);
+
+ if (domains.length === 0) {
+ revalidatePath('/dashboard/brands');
+ return [];
+ }
+
+ const { data: inserted, error } = await supabase
+ .from('brand_domains')
+ .insert(
+ domains.map((d) => ({
+ brand_id: brandId,
+ domain: d.domain.trim(),
+ country: d.country?.trim() || null,
+ is_primary: d.isPrimary,
+ })),
+ )
+ .select();
+
+ if (error) throw new Error(error.message);
+
+ revalidatePath('/dashboard/brands');
+ return ((inserted as Record<string, unknown>[]) ?? []).map(mapDomainRow);
+}
diff --git a/web/src/lib/actions/brand-platform.ts b/web/src/lib/actions/brand-platform.ts
new file mode 100644
index 000000000..5b4c17aa9
--- /dev/null
+++ b/web/src/lib/actions/brand-platform.ts
@@ -0,0 +1,120 @@
+'use server';
+
+import { createClient } from '@/lib/supabase/server';
+import { revalidatePath } from 'next/cache';
+import { enforceFeature, enforceLimit } from '@/lib/guards/plan-guard';
+import type { AIPlatform, BrandPlatform, CheckFrequency } from '@/types';
+
+function mapRow(row: Record<string, unknown>): BrandPlatform {
+ return {
+ id: row.id as string,
+ brandId: row.brand_id as string,
+ platform: row.platform as AIPlatform,
+ isEnabled: row.is_enabled as boolean,
+ checkFrequency: row.check_frequency as CheckFrequency,
+ apiModel: (row.api_model as string | null) ?? undefined,
+ lastCheckedAt: (row.last_checked_at as string | null) ?? undefined,
+ createdAt: row.created_at as string,
+ updatedAt: row.updated_at as string,
+ };
+}
+
+export async function getBrandPlatforms(
+ brandId: string,
+): Promise<BrandPlatform[]> {
+ const supabase = await createClient();
+
+ const { data, error } = await supabase
+ .from('brand_platforms')
+ .select('*')
+ .eq('brand_id', brandId)
+ .order('created_at', { ascending: true });
+
+ if (error) throw new Error(error.message);
+ return (data ?? []).map((r) => mapRow(r as Record<string, unknown>));
+}
+
+export async function syncBrandPlatforms(
+ brandId: string,
+ platforms: {
+ platform: AIPlatform;
+ isEnabled: boolean;
+ checkFrequency: CheckFrequency;
+ apiModel?: string;
+ }[],
+): Promise<BrandPlatform[]> {
+ const supabase = await createClient();
+
+ const { data: brand } = await supabase
+ .from('brands')
+ .select('organization_id')
+ .eq('id', brandId)
+ .single();
+
+ if (brand) {
+ const enabledCount = platforms.filter((p) => p.isEnabled).length;
+ await enforceLimit(brand.organization_id, 'maxPlatforms', enabledCount - 1);
+
+ const hasDailyFreq = platforms.some((p) => p.checkFrequency === 'daily');
+ if (hasDailyFreq) {
+ await enforceFeature(brand.organization_id, 'daily_monitoring');
+ }
+ }
+
+ const { error: deleteError } = await supabase
+ .from('brand_platforms')
+ .delete()
+ .eq('brand_id', brandId);
+
+ if (deleteError) throw new Error(deleteError.message);
+
+ if (platforms.length === 0) {
+ revalidatePath('/dashboard/brands');
+ return [];
+ }
+
+ const { data, error } = await supabase
+ .from('brand_platforms')
+ .insert(
+ platforms.map((p) => ({
+ brand_id: brandId,
+ platform: p.platform,
+ is_enabled: p.isEnabled,
+ check_frequency: p.checkFrequency,
+ api_model: p.apiModel || null,
+ })),
+ )
+ .select();
+
+ if (error) throw new Error(error.message);
+
+ revalidatePath('/dashboard/brands');
+ return (data ?? []).map((r) => mapRow(r as Record<string, unknown>));
+}
+
+export async function updateBrandPlatform(
+ id: string,
+ updates: { isEnabled?: boolean; checkFrequency?: CheckFrequency; apiModel?: string },
+): Promise<BrandPlatform> {
+ const supabase = await createClient();
+
+ const payload: Record<string, unknown> = {};
+ if (updates.isEnabled !== undefined) payload.is_enabled = updates.isEnabled;
+ if (updates.checkFrequency !== undefined)
+ payload.check_frequency = updates.checkFrequency;
+ if (updates.apiModel !== undefined)
+ payload.api_model = updates.apiModel || null;
+
+ const { data, error } = await supabase
+ .from('brand_platforms')
+ .update(payload)
+ .eq('id', id)
+ .select()
+ .single();
+
+ if (error || !data)
+ throw new Error(error?.message ?? 'Failed to update platform');
+
+ revalidatePath('/dashboard/brands');
+ return mapRow(data as Record<string, unknown>);
+}
diff --git a/web/src/lib/actions/brand.ts b/web/src/lib/actions/brand.ts
new file mode 100644
index 000000000..0b11c25d1
--- /dev/null
+++ b/web/src/lib/actions/brand.ts
@@ -0,0 +1,338 @@
+'use server';
+
+import { createClient } from '@/lib/supabase/server';
+import { revalidatePath } from 'next/cache';
+import { enforceLimit } from '@/lib/guards/plan-guard';
+import type { Brand, BrandDomain } from '@/types';
+
+function slugify(text: string): string {
+ return text
+ .toLowerCase()
+ .trim()
+ .replace(/\s+/g, '-')
+ .replace(/[^a-z0-9-]/g, '')
+ .replace(/-+/g, '-')
+ .replace(/^-|-$/g, '');
+}
+
+function mapDomainRow(d: Record<string, unknown>): BrandDomain {
+ return {
+ id: d.id as string,
+ brandId: d.brand_id as string,
+ domain: d.domain as string,
+ country: (d.country as string | null) ?? undefined,
+ isPrimary: d.is_primary as boolean,
+ };
+}
+
+function mapBrandRow(
+ brand: Record<string, unknown>,
+ domains: Record<string, unknown>[],
+): Brand {
+ return {
+ id: brand.id as string,
+ organizationId: brand.organization_id as string,
+ name: brand.name as string,
+ slug: brand.slug as string,
+ logoUrl: (brand.logo_url as string | null) ?? undefined,
+ industry: (brand.industry as string | null) ?? undefined,
+ description: (brand.description as string | null) ?? undefined,
+ region: (brand.region as string | null) ?? undefined,
+ language: (brand.language as string | null) ?? undefined,
+ trackingCode: (brand.tracking_code as string | null) ?? undefined,
+ domains: domains.map(mapDomainRow),
+ createdAt: brand.created_at as string,
+ updatedAt: brand.updated_at as string,
+ };
+}
+
+export async function getBrands(organizationId: string): Promise<Brand[]> {
+ const supabase = await createClient();
+
+ const { data, error } = await supabase
+ .from('brands')
+ .select('*, brand_domains(*)')
+ .eq('organization_id', organizationId)
+ .order('created_at', { ascending: false });
+
+ if (error) throw new Error(error.message);
+
+ return (data ?? []).map((b) =>
+ mapBrandRow(
+ b as Record<string, unknown>,
+ (b.brand_domains as Record<string, unknown>[]) ?? [],
+ ),
+ );
+}
+
+export async function getBrandById(id: string): Promise<Brand | null> {
+ const supabase = await createClient();
+
+ const { data, error } = await supabase
+ .from('brands')
+ .select('*, brand_domains(*)')
+ .eq('id', id)
+ .single();
+
+ if (error || !data) return null;
+
+ return mapBrandRow(
+ data as Record<string, unknown>,
+ (data.brand_domains as Record<string, unknown>[]) ?? [],
+ );
+}
+
+interface CreateBrandInput {
+ organizationId: string;
+ name: string;
+ logoUrl?: string;
+ industry?: string;
+ description?: string;
+ region?: string;
+ language?: string;
+ domains: { domain: string; country?: string; isPrimary: boolean }[];
+}
+
+export async function createBrand(input: CreateBrandInput): Promise<Brand> {
+ const supabase = await createClient();
+
+ const { count } = await supabase
+ .from('brands')
+ .select('id', { count: 'exact', head: true })
+ .eq('organization_id', input.organizationId);
+
+ await enforceLimit(input.organizationId, 'maxBrands', count ?? 0);
+
+ const slug = slugify(input.name) || `brand-${Date.now()}`;
+
+ const { data: brand, error } = await supabase
+ .from('brands')
+ .insert({
+ organization_id: input.organizationId,
+ name: input.name.trim(),
+ slug,
+ logo_url: input.logoUrl || null,
+ industry: input.industry || null,
+ description: input.description || null,
+ region: input.region || 'US',
+ language: input.language || 'en',
+ })
+ .select()
+ .single();
+
+ if (error || !brand)
+ throw new Error(error?.message ?? 'Failed to create brand');
+
+ let insertedDomains: Record<string, unknown>[] = [];
+
+ if (input.domains.length > 0) {
+ const { data: domains, error: domainError } = await supabase
+ .from('brand_domains')
+ .insert(
+ input.domains.map((d) => ({
+ brand_id: brand.id,
+ domain: d.domain.trim(),
+ country: d.country?.trim() || null,
+ is_primary: d.isPrimary,
+ })),
+ )
+ .select();
+
+ if (domainError) throw new Error(domainError.message);
+ insertedDomains = (domains as Record<string, unknown>[]) ?? [];
+ }
+
+ revalidatePath('/dashboard/brands');
+ return mapBrandRow(brand as Record<string, unknown>, insertedDomains);
+}
+
+interface UpdateBrandInput {
+ name?: string;
+ logoUrl?: string | null;
+ industry?: string | null;
+ description?: string | null;
+}
+
+export async function updateBrand(
+ id: string,
+ updates: UpdateBrandInput,
+): Promise<Brand> {
+ const supabase = await createClient();
+
+ const payload: Record<string, unknown> = {};
+ if (updates.name !== undefined) {
+ payload.name = updates.name.trim();
+ payload.slug = slugify(updates.name) || `brand-${Date.now()}`;
+ }
+ if ('logoUrl' in updates) payload.logo_url = updates.logoUrl ?? null;
+ if ('industry' in updates) payload.industry = updates.industry ?? null;
+ if ('description' in updates)
+ payload.description = updates.description ?? null;
+
+ const { data, error } = await supabase
+ .from('brands')
+ .update(payload)
+ .eq('id', id)
+ .select('*, brand_domains(*)')
+ .single();
+
+ if (error || !data)
+ throw new Error(error?.message ?? 'Failed to update brand');
+
+ revalidatePath('/dashboard/brands');
+ return mapBrandRow(
+ data as Record<string, unknown>,
+ (data.brand_domains as Record<string, unknown>[]) ?? [],
+ );
+}
+
+export async function deleteBrand(id: string): Promise<void> {
+ const supabase = await createClient();
+
+ const { error } = await supabase.from('brands').delete().eq('id', id);
+
+ if (error) throw new Error(error.message);
+ revalidatePath('/dashboard/brands');
+}
+
+export interface BrandCardSummary {
+ brandId: string;
+ visibility7d: number;
+ visibilityDelta: number;
+ mentions7d: number;
+ promptCount: number;
+ trafficVisits7d: number;
+ trend: number[];
+ status: 'healthy' | 'declining' | 'no-prompts' | 'no-data';
+}
+
+export async function getBrandsCardSummary(
+ brandIds: string[],
+): Promise<Record<string, BrandCardSummary>> {
+ if (brandIds.length === 0) return {};
+ const supabase = await createClient();
+
+ const now = Date.now();
+ const since14d = new Date(now - 14 * 86400000).toISOString();
+
+ const [resultsResp, promptsResp, trafficResp] = await Promise.all([
+ supabase
+ .from('prompt_results')
+ .select('brand_id, visibility_score, mention_count, created_at')
+ .in('brand_id', brandIds)
+ .gte('created_at', since14d),
+ supabase
+ .from('prompts')
+ .select('id, prompt_sets!inner(brand_id)')
+ .in('prompt_sets.brand_id', brandIds)
+ .eq('is_active', true),
+ supabase
+ .from('ai_traffic_logs')
+ .select('brand_id, created_at')
+ .in('brand_id', brandIds)
+ .gte('created_at', new Date(now - 7 * 86400000).toISOString()),
+ ]);
+
+ const results = resultsResp.data ?? [];
+ const prompts = promptsResp.data ?? [];
+ const traffic = trafficResp.data ?? [];
+
+ const summary: Record<string, BrandCardSummary> = {};
+ for (const id of brandIds) {
+ summary[id] = {
+ brandId: id,
+ visibility7d: 0,
+ visibilityDelta: 0,
+ mentions7d: 0,
+ promptCount: 0,
+ trafficVisits7d: 0,
+ trend: Array.from({ length: 7 }, () => 0),
+ status: 'no-prompts',
+ };
+ }
+
+ // Prompt counts
+ for (const row of prompts) {
+ const brandId = (row.prompt_sets as { brand_id?: string } | null)?.brand_id;
+ if (brandId && summary[brandId]) summary[brandId].promptCount += 1;
+ }
+
+ // Traffic visits (last 7d)
+ for (const row of traffic) {
+ const bid = row.brand_id as string;
+ if (summary[bid]) summary[bid].trafficVisits7d += 1;
+ }
+
+ // Visibility + mentions split into current 7d / previous 7d
+ const cutoff = now - 7 * 86400000;
+ type Bucket = { count: number; sum: number; mentions: number };
+ const buckets: Record<string, { current: Bucket; prev: Bucket }> = {};
+ const dailyByBrand: Record<string, Record<string, Bucket>> = {};
+
+ for (const id of brandIds) {
+ buckets[id] = {
+ current: { count: 0, sum: 0, mentions: 0 },
+ prev: { count: 0, sum: 0, mentions: 0 },
+ };
+ dailyByBrand[id] = {};
+ }
+
+ for (const row of results) {
+ const bid = row.brand_id as string;
+ if (!buckets[bid]) continue;
+ const ts = new Date(row.created_at as string).getTime();
+ const score = Number(row.visibility_score) || 0;
+ const mentions = Number(row.mention_count) || 0;
+ if (ts >= cutoff) {
+ buckets[bid].current.count += 1;
+ buckets[bid].current.sum += score;
+ buckets[bid].current.mentions += mentions > 0 ? 1 : 0;
+
+ const dayKey = (row.created_at as string).slice(0, 10);
+ const day = dailyByBrand[bid][dayKey] ?? {
+ count: 0,
+ sum: 0,
+ mentions: 0,
+ };
+ day.count += 1;
+ day.sum += score;
+ dailyByBrand[bid][dayKey] = day;
+ } else {
+ buckets[bid].prev.count += 1;
+ buckets[bid].prev.sum += score;
+ buckets[bid].prev.mentions += mentions > 0 ? 1 : 0;
+ }
+ }
+
+ // Build 7-day trend array per brand (oldest → newest)
+ const dayKeys = Array.from({ length: 7 }, (_, i) => {
+ const d = new Date(now - (6 - i) * 86400000);
+ return d.toISOString().slice(0, 10);
+ });
+
+ for (const id of brandIds) {
+ const b = buckets[id];
+ const cur = b.current.count > 0 ? b.current.sum / b.current.count : 0;
+ const prev = b.prev.count > 0 ? b.prev.sum / b.prev.count : 0;
+ summary[id].visibility7d = Math.round(cur);
+ summary[id].visibilityDelta =
+ prev > 0 ? Math.round(((cur - prev) / prev) * 100) : 0;
+ summary[id].mentions7d = b.current.mentions;
+ summary[id].trend = dayKeys.map((k) => {
+ const d = dailyByBrand[id][k];
+ return d && d.count > 0 ? Math.round(d.sum / d.count) : 0;
+ });
+
+ if (summary[id].promptCount === 0) {
+ summary[id].status = 'no-prompts';
+ } else if (b.current.count === 0) {
+ summary[id].status = 'no-data';
+ } else if (summary[id].visibilityDelta < -10) {
+ summary[id].status = 'declining';
+ } else {
+ summary[id].status = 'healthy';
+ }
+ }
+
+ return summary;
+}
diff --git a/web/src/lib/actions/citations.ts b/web/src/lib/actions/citations.ts
new file mode 100644
index 000000000..236dcfcf7
--- /dev/null
+++ b/web/src/lib/actions/citations.ts
@@ -0,0 +1,361 @@
+'use server';
+
+import { createClient } from '@/lib/supabase/server';
+import type { Citation } from '@/types';
+import {
+ classifyDomain,
+ extractHostname,
+ normalizeDomain,
+ type SourceCategory,
+ SOURCE_CATEGORIES,
+} from '@/lib/citations/classify';
+import { classifyArticleType } from '@/lib/citations/article-type';
+
+// ─── Types ────────────────────────────────────────────────────────────────────
+
+export type CitationsDatePreset =
+ | '24h'
+ | '7d'
+ | '30d'
+ | '90d'
+ | 'all'
+ | 'custom';
+
+export interface CitationsFilters {
+ datePreset: CitationsDatePreset;
+ dateFrom?: string;
+ dateTo?: string;
+ platforms?: string[];
+ topicIds?: string[];
+ regions?: string[];
+ excludeOwnDomain?: boolean;
+ competitorOnly?: boolean;
+}
+
+export interface CitationArticleTypeCount {
+ type: string;
+ count: number;
+}
+
+export interface CitationDomainRow {
+ domain: string;
+ category: SourceCategory;
+ models: string[];
+ totalCitations: number;
+ avgCitationsPerResult: number;
+ resultsCiting: number;
+ usagePct: number;
+ articleTypes: CitationArticleTypeCount[];
+}
+
+export interface CitationUrlRow {
+ url: string;
+ domain: string;
+ category: SourceCategory;
+ title: string;
+ models: string[];
+ totalCitations: number;
+ resultsCiting: number;
+ usagePct: number;
+ articleType: string | null;
+}
+
+export interface CitationsSourceBreakdown {
+ category: SourceCategory;
+ count: number;
+ pct: number;
+}
+
+export interface CitationsOverview {
+ rows: CitationDomainRow[];
+ urlRows: CitationUrlRow[];
+ totals: {
+ domains: number;
+ urls: number;
+ citations: number;
+ results: number;
+ avgCitationsPerResult: number;
+ };
+ sourceTypeBreakdown: CitationsSourceBreakdown[];
+}
+
+// ─── Helpers ──────────────────────────────────────────────────────────────────
+
+function resolveDateRange(
+ filters: CitationsFilters,
+): { from?: string; to?: string } {
+ if (filters.datePreset === 'custom') {
+ return { from: filters.dateFrom, to: filters.dateTo };
+ }
+ if (filters.datePreset === 'all') {
+ return {};
+ }
+ const to = new Date();
+ const from = new Date();
+ switch (filters.datePreset) {
+ case '24h':
+ from.setHours(from.getHours() - 24);
+ break;
+ case '7d':
+ from.setDate(from.getDate() - 7);
+ break;
+ case '30d':
+ from.setDate(from.getDate() - 30);
+ break;
+ case '90d':
+ from.setDate(from.getDate() - 90);
+ break;
+ }
+ return { from: from.toISOString(), to: to.toISOString() };
+}
+
+// ─── Main action ──────────────────────────────────────────────────────────────
+
+export async function getCitationsOverview(
+ brandId: string,
+ filters: CitationsFilters,
+): Promise<CitationsOverview> {
+ const supabase = await createClient();
+
+ // 1. Load brand's own domains.
+ const { data: brandDomainRows } = await supabase
+ .from('brand_domains')
+ .select('domain')
+ .eq('brand_id', brandId);
+ const brandDomains = (brandDomainRows ?? [])
+ .map((r) => normalizeDomain((r as { domain: string }).domain))
+ .filter(Boolean);
+
+ // 2. Load competitor domains.
+ const { data: competitorRows } = await supabase
+ .from('competitors')
+ .select('domain')
+ .eq('brand_id', brandId);
+ const competitorDomains = (competitorRows ?? [])
+ .map((r) => normalizeDomain((r as { domain: string }).domain))
+ .filter(Boolean);
+
+ const classifyCtx = { brandDomains, competitorDomains };
+
+ // 3. Build filtered prompt_results query.
+ let query = supabase
+ .from('prompt_results')
+ .select(
+ 'id, prompt_id, platform, model_used, region, created_at, citations, citation_count',
+ )
+ .eq('brand_id', brandId);
+
+ const { from, to } = resolveDateRange(filters);
+ if (from) query = query.gte('created_at', from);
+ if (to) query = query.lte('created_at', to);
+ if (filters.platforms && filters.platforms.length > 0) {
+ query = query.in('platform', filters.platforms);
+ }
+ if (filters.regions && filters.regions.length > 0) {
+ query = query.in('region', filters.regions);
+ }
+
+ if (filters.topicIds && filters.topicIds.length > 0) {
+ const { data: topicPrompts } = await supabase
+ .from('prompts')
+ .select('id')
+ .in('topic_id', filters.topicIds);
+ const topicPromptIds = ((topicPrompts ?? []) as { id: string }[]).map(
+ (p) => p.id,
+ );
+ query = query.in(
+ 'prompt_id',
+ topicPromptIds.length > 0
+ ? topicPromptIds
+ : ['00000000-0000-0000-0000-000000000000'],
+ );
+ }
+
+ const { data: rows, error } = await query;
+ if (error) throw new Error(error.message);
+
+ const results = (rows ?? []) as Array<{
+ id: string;
+ prompt_id: string;
+ platform: string | null;
+ model_used: string | null;
+ region: string | null;
+ created_at: string;
+ citations: Citation[] | null;
+ }>;
+
+ // 4. Aggregate in memory.
+ interface DomainAgg {
+ domain: string;
+ category: SourceCategory;
+ totalCitations: number;
+ resultsCiting: Set<string>;
+ models: Set<string>;
+ articleTypeCounts: Map<string, number>;
+ }
+ interface UrlAgg {
+ url: string;
+ domain: string;
+ category: SourceCategory;
+ title: string;
+ totalCitations: number;
+ resultsCiting: Set<string>;
+ models: Set<string>;
+ articleType: string | null;
+ }
+
+ const domainMap = new Map<string, DomainAgg>();
+ const urlMap = new Map<string, UrlAgg>();
+ let totalCitations = 0;
+
+ for (const result of results) {
+ const citations = Array.isArray(result.citations) ? result.citations : [];
+ const modelKey = result.model_used || result.platform || '';
+
+ for (const cite of citations) {
+ const host = extractHostname(cite.url);
+ if (!host) continue;
+
+ const category = classifyDomain(host, classifyCtx);
+ if (filters.excludeOwnDomain && category === 'you') continue;
+ if (filters.competitorOnly && category !== 'competitor') continue;
+
+ totalCitations += 1;
+
+ // Domain aggregation.
+ const existingDomain = domainMap.get(host) ?? {
+ domain: host,
+ category,
+ totalCitations: 0,
+ resultsCiting: new Set<string>(),
+ models: new Set<string>(),
+ articleTypeCounts: new Map<string, number>(),
+ };
+ existingDomain.totalCitations += 1;
+ existingDomain.resultsCiting.add(result.id);
+ if (modelKey) existingDomain.models.add(modelKey);
+ const articleType = classifyArticleType(cite.url, cite.title);
+ if (articleType) {
+ existingDomain.articleTypeCounts.set(
+ articleType,
+ (existingDomain.articleTypeCounts.get(articleType) ?? 0) + 1,
+ );
+ }
+ domainMap.set(host, existingDomain);
+
+ // URL aggregation (strip query/fragment and trailing slash for dedupe).
+ let normalizedUrl = cite.url;
+ try {
+ const parsed = new URL(cite.url);
+ parsed.search = '';
+ parsed.hash = '';
+ normalizedUrl = parsed.toString().replace(/\/$/, '');
+ } catch {
+ // leave as-is
+ }
+ const existingUrl = urlMap.get(normalizedUrl) ?? {
+ url: normalizedUrl,
+ domain: host,
+ category,
+ title: cite.title || '',
+ totalCitations: 0,
+ resultsCiting: new Set<string>(),
+ models: new Set<string>(),
+ articleType,
+ };
+ existingUrl.totalCitations += 1;
+ existingUrl.resultsCiting.add(result.id);
+ if (modelKey) existingUrl.models.add(modelKey);
+ if (!existingUrl.title && cite.title) existingUrl.title = cite.title;
+ urlMap.set(normalizedUrl, existingUrl);
+ }
+ }
+
+ const totalResults = results.length;
+
+ // 5. Build output arrays.
+ const rowsOut: CitationDomainRow[] = Array.from(domainMap.values())
+ .map((agg) => {
+ const resultsCiting = agg.resultsCiting.size;
+ const articleTypes = Array.from(agg.articleTypeCounts.entries())
+ .map(([type, count]) => ({ type, count }))
+ .sort((a, b) => b.count - a.count)
+ .slice(0, 3);
+ return {
+ domain: agg.domain,
+ category: agg.category,
+ models: Array.from(agg.models).sort(),
+ totalCitations: agg.totalCitations,
+ avgCitationsPerResult:
+ resultsCiting > 0
+ ? Math.round((agg.totalCitations / resultsCiting) * 10) / 10
+ : 0,
+ resultsCiting,
+ usagePct:
+ totalResults > 0
+ ? Math.round((resultsCiting / totalResults) * 1000) / 10
+ : 0,
+ articleTypes,
+ };
+ })
+ .sort((a, b) => b.totalCitations - a.totalCitations);
+
+ const urlRowsOut: CitationUrlRow[] = Array.from(urlMap.values())
+ .map((agg) => {
+ const resultsCiting = agg.resultsCiting.size;
+ return {
+ url: agg.url,
+ domain: agg.domain,
+ category: agg.category,
+ title: agg.title,
+ models: Array.from(agg.models).sort(),
+ totalCitations: agg.totalCitations,
+ resultsCiting,
+ usagePct:
+ totalResults > 0
+ ? Math.round((resultsCiting / totalResults) * 1000) / 10
+ : 0,
+ articleType: agg.articleType,
+ };
+ })
+ .sort((a, b) => b.totalCitations - a.totalCitations);
+
+ // 6. Source type breakdown (all categories, even with zero).
+ const categoryCounts = new Map<SourceCategory, number>();
+ for (const row of rowsOut) {
+ categoryCounts.set(
+ row.category,
+ (categoryCounts.get(row.category) ?? 0) + 1,
+ );
+ }
+ const totalDomains = rowsOut.length;
+ const sourceTypeBreakdown: CitationsSourceBreakdown[] = SOURCE_CATEGORIES.map(
+ (category) => {
+ const count = categoryCounts.get(category) ?? 0;
+ return {
+ category,
+ count,
+ pct:
+ totalDomains > 0
+ ? Math.round((count / totalDomains) * 1000) / 10
+ : 0,
+ };
+ },
+ ).filter((b) => b.count > 0);
+
+ return {
+ rows: rowsOut,
+ urlRows: urlRowsOut,
+ totals: {
+ domains: rowsOut.length,
+ urls: urlRowsOut.length,
+ citations: totalCitations,
+ results: totalResults,
+ avgCitationsPerResult:
+ totalResults > 0
+ ? Math.round((totalCitations / totalResults) * 10) / 10
+ : 0,
+ },
+ sourceTypeBreakdown,
+ };
+}
diff --git a/web/src/lib/actions/competitor.ts b/web/src/lib/actions/competitor.ts
new file mode 100644
index 000000000..6883eb0b6
--- /dev/null
+++ b/web/src/lib/actions/competitor.ts
@@ -0,0 +1,58 @@
+'use server';
+
+import { createClient } from '@/lib/supabase/server';
+import { revalidatePath } from 'next/cache';
+import type { Competitor } from '@/types';
+
+function mapRow(row: Record<string, unknown>): Competitor {
+ return {
+ id: row.id as string,
+ brandId: row.brand_id as string,
+ name: row.name as string,
+ domain: (row.domain as string) ?? '',
+ };
+}
+
+export async function getCompetitors(brandId: string): Promise<Competitor[]> {
+ const supabase = await createClient();
+
+ const { data, error } = await supabase
+ .from('competitors')
+ .select('*')
+ .eq('brand_id', brandId)
+ .order('created_at', { ascending: true });
+
+ if (error) throw new Error(error.message);
+ return (data ?? []).map((r) => mapRow(r as Record<string, unknown>));
+}
+
+export async function addCompetitor(
+ brandId: string,
+ input: { name: string; domain: string },
+): Promise<Competitor> {
+ const supabase = await createClient();
+
+ const { data, error } = await supabase
+ .from('competitors')
+ .insert({
+ brand_id: brandId,
+ name: input.name.trim(),
+ domain: input.domain.trim().replace(/^https?:\/\//, '').replace(/\/+$/, ''),
+ })
+ .select()
+ .single();
+
+ if (error || !data) throw new Error(error?.message ?? 'Failed to add competitor');
+
+ revalidatePath('/dashboard/brands');
+ return mapRow(data as Record<string, unknown>);
+}
+
+export async function deleteCompetitor(id: string): Promise<void> {
+ const supabase = await createClient();
+
+ const { error } = await supabase.from('competitors').delete().eq('id', id);
+ if (error) throw new Error(error.message);
+
+ revalidatePath('/dashboard/brands');
+}
diff --git a/web/src/lib/actions/content.ts b/web/src/lib/actions/content.ts
new file mode 100644
index 000000000..d759cdedb
--- /dev/null
+++ b/web/src/lib/actions/content.ts
@@ -0,0 +1,324 @@
+'use server';
+
+import { createClient } from '@/lib/supabase/server';
+import type { ContentBrief, ContentOpportunity, WebhookConfig } from '@/types';
+
+const AEO_SERVER_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost';
+
+async function getSession() {
+ const supabase = await createClient();
+ const { data: { session } } = await supabase.auth.getSession();
+ if (!session) throw new Error('Not authenticated');
+ return session;
+}
+
+export async function generateOpportunities(
+ brandId: string,
+): Promise<{ jobId: string }> {
+ const session = await getSession();
+
+ const res = await fetch(`${AEO_SERVER_URL}/api/content/generate`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: `Bearer ${session.access_token}`,
+ },
+ body: JSON.stringify({ brandId }),
+ });
+
+ if (!res.ok) {
+ const body = await res.json().catch(() => ({}));
+ throw new Error(body.error || `Server error: ${res.status}`);
+ }
+
+ const data = await res.json();
+ return { jobId: data.jobId };
+}
+
+export interface GenerationJobStatus {
+ status: 'waiting' | 'active' | 'completed' | 'failed' | 'delayed' | 'not_found';
+ progress: { phase: string; message: string } | null;
+ result: { generated: number } | null;
+ failedReason: string | null;
+}
+
+export async function getGenerationJobStatus(jobId: string): Promise<GenerationJobStatus> {
+ const session = await getSession();
+
+ const controller = new AbortController();
+ const timeout = setTimeout(() => controller.abort(), 10_000);
+
+ try {
+ const res = await fetch(`${AEO_SERVER_URL}/api/content/job/${jobId}`, {
+ headers: { Authorization: `Bearer ${session.access_token}` },
+ signal: controller.signal,
+ });
+
+ if (!res.ok) {
+ return { status: 'not_found', progress: null, result: null, failedReason: null };
+ }
+
+ const data = await res.json();
+ return {
+ status: data.status ?? 'not_found',
+ progress: data.progress && typeof data.progress === 'object' && data.progress.phase
+ ? data.progress
+ : null,
+ result: data.result ?? null,
+ failedReason: data.failedReason ?? null,
+ };
+ } catch {
+ return { status: 'not_found', progress: null, result: null, failedReason: null };
+ } finally {
+ clearTimeout(timeout);
+ }
+}
+
+export async function getOpportunities(
+ brandId: string,
+ filters?: {
+ status?: string;
+ impact?: string;
+ type?: string;
+ limit?: number;
+ offset?: number;
+ sort?: string;
+ },
+): Promise<{ opportunities: ContentOpportunity[]; total: number }> {
+ const session = await getSession();
+
+ const params = new URLSearchParams();
+ if (filters?.status) params.set('status', filters.status);
+ if (filters?.impact) params.set('impact', filters.impact);
+ if (filters?.type) params.set('type', filters.type);
+ if (filters?.limit) params.set('limit', String(filters.limit));
+ if (filters?.offset) params.set('offset', String(filters.offset));
+ if (filters?.sort) params.set('sort', filters.sort);
+
+ const qs = params.toString();
+ const url = `${AEO_SERVER_URL}/api/content/brand/${brandId}${qs ? `?${qs}` : ''}`;
+
+ const res = await fetch(url, {
+ method: 'GET',
+ headers: { Authorization: `Bearer ${session.access_token}` },
+ });
+
+ if (!res.ok) {
+ const body = await res.json().catch(() => ({}));
+ throw new Error(body.error || `Server error: ${res.status}`);
+ }
+
+ return res.json();
+}
+
+export async function getOpportunity(id: string): Promise<ContentOpportunity> {
+ const session = await getSession();
+
+ const res = await fetch(`${AEO_SERVER_URL}/api/content/${id}`, {
+ method: 'GET',
+ headers: { Authorization: `Bearer ${session.access_token}` },
+ });
+
+ if (!res.ok) {
+ const body = await res.json().catch(() => ({}));
+ throw new Error(body.error || `Server error: ${res.status}`);
+ }
+
+ return res.json();
+}
+
+export async function generateBrief(
+ opportunityId: string,
+): Promise<ContentBrief> {
+ const session = await getSession();
+
+ const res = await fetch(`${AEO_SERVER_URL}/api/content/${opportunityId}/brief`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: `Bearer ${session.access_token}`,
+ },
+ body: JSON.stringify({}),
+ });
+
+ if (!res.ok) {
+ const body = await res.json().catch(() => ({}));
+ throw new Error(body.error || `Server error: ${res.status}`);
+ }
+
+ const data = await res.json();
+ return data.brief;
+}
+
+export async function updateOpportunityStatus(
+ id: string,
+ status: string,
+): Promise<ContentOpportunity> {
+ const session = await getSession();
+
+ const res = await fetch(`${AEO_SERVER_URL}/api/content/${id}/status`, {
+ method: 'PATCH',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: `Bearer ${session.access_token}`,
+ },
+ body: JSON.stringify({ status }),
+ });
+
+ if (!res.ok) {
+ const body = await res.json().catch(() => ({}));
+ throw new Error(body.error || `Server error: ${res.status}`);
+ }
+
+ return res.json();
+}
+
+export async function sendToWebhook(
+ id: string,
+): Promise<{ success: boolean; webhookStatus: number; opportunityStatus: string }> {
+ const session = await getSession();
+
+ const res = await fetch(`${AEO_SERVER_URL}/api/content/${id}/send-webhook`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: `Bearer ${session.access_token}`,
+ },
+ });
+
+ if (!res.ok) {
+ const body = await res.json().catch(() => ({}));
+ throw new Error(body.error || `Server error: ${res.status}`);
+ }
+
+ return res.json();
+}
+
+export async function testWebhook(
+ webhookUrl: string,
+ webhookSecret?: string,
+): Promise<{ success: boolean; status: number; error?: string }> {
+ const session = await getSession();
+
+ const res = await fetch(`${AEO_SERVER_URL}/api/content/webhook-test`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: `Bearer ${session.access_token}`,
+ },
+ body: JSON.stringify({ webhookUrl, webhookSecret }),
+ });
+
+ if (!res.ok) {
+ const body = await res.json().catch(() => ({}));
+ throw new Error(body.error || `Server error: ${res.status}`);
+ }
+
+ return res.json();
+}
+
+export async function bulkUpdateStatus(
+ ids: string[],
+ status: string,
+): Promise<{ updated: number }> {
+ const session = await getSession();
+
+ const res = await fetch(`${AEO_SERVER_URL}/api/content/bulk/status`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: `Bearer ${session.access_token}`,
+ },
+ body: JSON.stringify({ ids, status }),
+ });
+
+ if (!res.ok) {
+ const body = await res.json().catch(() => ({}));
+ throw new Error(body.error || `Server error: ${res.status}`);
+ }
+
+ return res.json();
+}
+
+export async function bulkSendToWebhook(
+ ids: string[],
+): Promise<{ sent: number; failed: number }> {
+ const session = await getSession();
+
+ const res = await fetch(`${AEO_SERVER_URL}/api/content/bulk/send-webhook`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: `Bearer ${session.access_token}`,
+ },
+ body: JSON.stringify({ ids }),
+ });
+
+ if (!res.ok) {
+ const body = await res.json().catch(() => ({}));
+ throw new Error(body.error || `Server error: ${res.status}`);
+ }
+
+ return res.json();
+}
+
+export async function getWebhookConfig(brandId: string): Promise<WebhookConfig | null> {
+ const supabase = await createClient();
+ const { data } = await supabase
+ .from('webhook_configs')
+ .select('*')
+ .eq('brand_id', brandId)
+ .limit(1)
+ .single();
+
+ if (!data) return null;
+
+ return {
+ id: data.id,
+ brandId: data.brand_id,
+ name: data.name,
+ webhookUrl: data.webhook_url,
+ webhookSecret: data.webhook_secret || undefined,
+ events: data.events || [],
+ isActive: data.is_active ?? false,
+ createdAt: data.created_at ?? new Date().toISOString(),
+ updatedAt: data.updated_at ?? new Date().toISOString(),
+ };
+}
+
+export async function saveWebhookConfig(
+ brandId: string,
+ config: { webhookUrl: string; webhookSecret?: string; isActive?: boolean },
+): Promise<WebhookConfig> {
+ const supabase = await createClient();
+
+ const { data, error } = await supabase
+ .from('webhook_configs')
+ .upsert(
+ {
+ brand_id: brandId,
+ name: 'Default',
+ webhook_url: config.webhookUrl,
+ webhook_secret: config.webhookSecret || null,
+ is_active: config.isActive ?? true,
+ updated_at: new Date().toISOString(),
+ },
+ { onConflict: 'brand_id,name' },
+ )
+ .select()
+ .single();
+
+ if (error) throw new Error(error.message);
+
+ return {
+ id: data.id,
+ brandId: data.brand_id,
+ name: data.name,
+ webhookUrl: data.webhook_url,
+ webhookSecret: data.webhook_secret || undefined,
+ events: data.events || [],
+ isActive: data.is_active ?? false,
+ createdAt: data.created_at ?? new Date().toISOString(),
+ updatedAt: data.updated_at ?? new Date().toISOString(),
+ };
+}
diff --git a/web/src/lib/actions/organization.ts b/web/src/lib/actions/organization.ts
new file mode 100644
index 000000000..2db2e7c3e
--- /dev/null
+++ b/web/src/lib/actions/organization.ts
@@ -0,0 +1,73 @@
+'use server';
+
+import { createClient } from '@/lib/supabase/server';
+import { revalidatePath } from 'next/cache';
+
+function slugify(text: string): string {
+ return text
+ .toLowerCase()
+ .trim()
+ .replace(/\s+/g, '-')
+ .replace(/[^a-z0-9-]/g, '')
+ .replace(/-+/g, '-')
+ .replace(/^-|-$/g, '');
+}
+
+export async function createOrganization(name: string) {
+ const supabase = await createClient();
+
+ const {
+ data: { user },
+ error: authError,
+ } = await supabase.auth.getUser();
+
+ if (!user || authError) throw new Error('Unauthorized');
+
+ let slug = slugify(name);
+ if (!slug) slug = `org-${Date.now()}`;
+
+ const { data: existing } = await supabase
+ .from('organizations')
+ .select('id')
+ .eq('slug', slug)
+ .maybeSingle();
+
+ if (existing) slug = `${slug}-${Date.now()}`;
+
+ const { data: org, error } = await supabase
+ .from('organizations')
+ .insert({ name: name.trim(), slug })
+ .select()
+ .single();
+
+ if (error || !org)
+ throw new Error(error?.message ?? 'Failed to create organization');
+
+ const { error: profileError } = await supabase
+ .from('profiles')
+ .update({ organization_id: org.id })
+ .eq('id', user.id);
+
+ if (profileError) throw new Error(profileError.message);
+
+ revalidatePath('/dashboard');
+ return org;
+}
+
+export async function getMyProfile() {
+ const supabase = await createClient();
+
+ const {
+ data: { user },
+ } = await supabase.auth.getUser();
+
+ if (!user) return null;
+
+ const { data: profile } = await supabase
+ .from('profiles')
+ .select('*, organizations(*)')
+ .eq('id', user.id)
+ .single();
+
+ return profile;
+}
diff --git a/web/src/lib/actions/prompt-suggestions.ts b/web/src/lib/actions/prompt-suggestions.ts
new file mode 100644
index 000000000..837ed1020
--- /dev/null
+++ b/web/src/lib/actions/prompt-suggestions.ts
@@ -0,0 +1,198 @@
+'use server';
+
+import { revalidatePath } from 'next/cache';
+import { createClient } from '@/lib/supabase/server';
+import { addPromptToSet } from '@/lib/actions/prompt';
+
+const AEO_SERVER_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost';
+
+export interface PromptSuggestion {
+ id: string;
+ brandId: string;
+ suggestedText: string;
+ topicName: string | null;
+ topicId: string | null;
+ reason: string | null;
+ estVolume: number | null;
+ source: 'llm' | 'heuristic';
+ status: 'new' | 'added' | 'dismissed';
+ generatedAt: string;
+ expiresAt: string;
+}
+
+interface SuggestionRow {
+ id: string;
+ brand_id: string;
+ suggested_text: string;
+ topic_name: string | null;
+ topic_id: string | null;
+ reason: string | null;
+ est_volume: number | null;
+ source: 'llm' | 'heuristic';
+ status: 'new' | 'added' | 'dismissed';
+ generated_at: string;
+ expires_at: string;
+}
+
+function mapRow(row: SuggestionRow): PromptSuggestion {
+ return {
+ id: row.id,
+ brandId: row.brand_id,
+ suggestedText: row.suggested_text,
+ topicName: row.topic_name,
+ topicId: row.topic_id,
+ reason: row.reason,
+ estVolume: row.est_volume,
+ source: row.source,
+ status: row.status,
+ generatedAt: row.generated_at,
+ expiresAt: row.expires_at,
+ };
+}
+
+async function getSession() {
+ const supabase = await createClient();
+ const {
+ data: { session },
+ } = await supabase.auth.getSession();
+ if (!session) throw new Error('Not authenticated');
+ return session;
+}
+
+export async function getPromptSuggestions(
+ brandId: string,
+): Promise<{ suggestions: PromptSuggestion[]; stale: boolean }> {
+ const session = await getSession();
+ const res = await fetch(
+ `${AEO_SERVER_URL}/api/prompts/suggestions/${brandId}`,
+ {
+ headers: { Authorization: `Bearer ${session.access_token}` },
+ cache: 'no-store',
+ },
+ );
+ if (!res.ok) {
+ const body = await res.json().catch(() => ({}));
+ throw new Error(body.error || `Server error: ${res.status}`);
+ }
+ const data = (await res.json()) as {
+ suggestions: SuggestionRow[];
+ stale: boolean;
+ };
+ return {
+ suggestions: data.suggestions.map(mapRow),
+ stale: data.stale,
+ };
+}
+
+export async function refreshPromptSuggestions(
+ brandId: string,
+): Promise<PromptSuggestion[]> {
+ const session = await getSession();
+ const res = await fetch(
+ `${AEO_SERVER_URL}/api/prompts/suggestions/${brandId}/refresh`,
+ {
+ method: 'POST',
+ headers: { Authorization: `Bearer ${session.access_token}` },
+ },
+ );
+ if (!res.ok) {
+ const body = await res.json().catch(() => ({}));
+ throw new Error(body.error || `Server error: ${res.status}`);
+ }
+ const data = (await res.json()) as { suggestions: SuggestionRow[] };
+ return data.suggestions.map(mapRow);
+}
+
+export async function dismissSuggestion(
+ suggestionId: string,
+): Promise<{ success: boolean }> {
+ const session = await getSession();
+ const res = await fetch(
+ `${AEO_SERVER_URL}/api/prompts/suggestions/${suggestionId}/dismiss`,
+ {
+ method: 'POST',
+ headers: { Authorization: `Bearer ${session.access_token}` },
+ },
+ );
+ if (!res.ok) {
+ const body = await res.json().catch(() => ({}));
+ throw new Error(body.error || `Server error: ${res.status}`);
+ }
+ return res.json();
+}
+
+export async function acceptSuggestion(
+ suggestionId: string,
+ options?: { platforms?: string[]; models?: string[] },
+): Promise<{ promptId: string }> {
+ const session = await getSession();
+ const supabase = await createClient();
+
+ const { data: row, error: rowErr } = await supabase
+ .from('prompt_suggestions')
+ .select('id, brand_id, suggested_text, topic_name')
+ .eq('id', suggestionId)
+ .eq('status', 'new')
+ .single();
+ if (rowErr || !row) {
+ throw new Error('Suggestion not found or already processed');
+ }
+
+ const { data: ps, error: psErr } = await supabase
+ .from('prompt_sets')
+ .select('id')
+ .eq('brand_id', row.brand_id)
+ .order('created_at', { ascending: true })
+ .limit(1)
+ .maybeSingle();
+ if (psErr || !ps) {
+ throw new Error('No prompt set exists for this brand. Create one first.');
+ }
+
+ const { data: defaults } = await supabase
+ .from('prompts')
+ .select('platforms, models')
+ .eq('prompt_set_id', ps.id)
+ .eq('is_active', true)
+ .order('created_at', { ascending: false })
+ .limit(1)
+ .maybeSingle();
+
+ const platforms =
+ options?.platforms ??
+ (Array.isArray(defaults?.platforms) && defaults!.platforms.length > 0
+ ? (defaults!.platforms as string[])
+ : ['chatgpt-web']);
+ const models =
+ options?.models ??
+ (Array.isArray(defaults?.models) ? (defaults!.models as string[]) : []);
+
+ const created = await addPromptToSet({
+ promptSetId: ps.id,
+ text: row.suggested_text,
+ category: row.topic_name ?? undefined,
+ platforms,
+ models,
+ });
+
+ const ack = await fetch(
+ `${AEO_SERVER_URL}/api/prompts/suggestions/${suggestionId}/accept`,
+ {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: `Bearer ${session.access_token}`,
+ },
+ body: JSON.stringify({ promptId: created.id }),
+ },
+ );
+ if (!ack.ok) {
+ console.error(
+ '[prompt-suggestions] accept ack failed:',
+ await ack.text().catch(() => ''),
+ );
+ }
+
+ revalidatePath('/dashboard/prompts');
+ return { promptId: created.id };
+}
diff --git a/web/src/lib/actions/prompt.ts b/web/src/lib/actions/prompt.ts
new file mode 100644
index 000000000..36f68bee6
--- /dev/null
+++ b/web/src/lib/actions/prompt.ts
@@ -0,0 +1,369 @@
+'use server';
+
+import { createClient } from '@/lib/supabase/server';
+import { revalidatePath } from 'next/cache';
+import type { PromptSet, Prompt, AIPlatform } from '@/types';
+import { enforceLimit, getOrgPlan } from '@/lib/guards/plan-guard';
+import { ALL_MODELS, ALL_SCRAPERS } from '@/config/prompt-options';
+import type { Plan } from '@/config/plans';
+
+function filterByPlan(plan: Plan, platforms: string[], models: string[]) {
+ const allowedScrapers = plan.limits.allowedScrapers
+ ? new Set(plan.limits.allowedScrapers)
+ : new Set(ALL_SCRAPERS.map((s) => s.id));
+ const allowedModels = plan.limits.allowedModels
+ ? new Set(plan.limits.allowedModels)
+ : new Set(ALL_MODELS.map((m) => m.id));
+ return {
+ platforms: platforms.filter((p) => allowedScrapers.has(p)),
+ models: models.filter((m) => allowedModels.has(m)),
+ };
+}
+
+// ─── Row Mappers ──────────────────────────────────────────────────────────────
+
+function mapPromptRow(row: Record<string, unknown>): Prompt {
+ return {
+ id: row.id as string,
+ promptSetId: row.prompt_set_id as string,
+ text: row.text as string,
+ category: (row.category as string | null) ?? undefined,
+ platforms: ((row.platforms as string[]) ?? []) as AIPlatform[],
+ regions: (row.regions as string[]) ?? [],
+ models: (row.models as string[]) ?? [],
+ isActive: row.is_active as boolean,
+ createdAt: row.created_at as string,
+ };
+}
+
+function mapPromptSetRow(
+ set: Record<string, unknown>,
+ prompts: Record<string, unknown>[],
+): PromptSet {
+ return {
+ id: set.id as string,
+ brandId: set.brand_id as string,
+ name: set.name as string,
+ prompts: prompts.map(mapPromptRow),
+ createdAt: set.created_at as string,
+ updatedAt: set.updated_at as string,
+ };
+}
+
+async function getOrgPromptCount(
+ supabase: Awaited<ReturnType<typeof createClient>>,
+ organizationId: string,
+): Promise<number> {
+ const { count } = await supabase
+ .from('prompts')
+ .select('id, prompt_sets!inner(brand_id, brands!inner(organization_id))', {
+ count: 'exact',
+ head: true,
+ })
+ .eq('prompt_sets.brands.organization_id', organizationId);
+
+ return count ?? 0;
+}
+
+async function getBrandContext(
+ supabase: Awaited<ReturnType<typeof createClient>>,
+ brandId: string,
+): Promise<{ organizationId: string; region: string }> {
+ const { data } = await supabase
+ .from('brands')
+ .select('organization_id, region')
+ .eq('id', brandId)
+ .single();
+
+ if (!data?.organization_id) throw new Error('Brand not found');
+ return {
+ organizationId: data.organization_id as string,
+ region: (data.region as string | null) ?? 'US',
+ };
+}
+
+async function resolveTopicId(
+ supabase: Awaited<ReturnType<typeof createClient>>,
+ brandId: string,
+ category: string | null | undefined,
+): Promise<string | null> {
+ if (!category) return null;
+ const { data } = await supabase
+ .from('topics')
+ .select('id')
+ .eq('brand_id', brandId)
+ .eq('name', category)
+ .limit(1)
+ .maybeSingle();
+ return (data?.id as string) ?? null;
+}
+
+// ─── Actions ──────────────────────────────────────────────────────────────────
+
+export async function getPromptSets(brandId: string): Promise<PromptSet[]> {
+ const supabase = await createClient();
+
+ const { data, error } = await supabase
+ .from('prompt_sets')
+ .select('*, prompts(*)')
+ .eq('brand_id', brandId)
+ .order('created_at', { ascending: false });
+
+ if (error) throw new Error(error.message);
+
+ return (data ?? []).map((ps) =>
+ mapPromptSetRow(
+ ps as Record<string, unknown>,
+ (ps.prompts as Record<string, unknown>[]) ?? [],
+ ),
+ );
+}
+
+interface SavePromptSetInput {
+ brandId: string;
+ name: string;
+ prompts: {
+ text: string;
+ category?: string;
+ platforms: string[];
+ models?: string[];
+ isActive?: boolean;
+ }[];
+}
+
+export async function savePromptSet(input: SavePromptSetInput): Promise<PromptSet> {
+ const supabase = await createClient();
+
+ const { organizationId: orgId, region: brandRegion } = await getBrandContext(
+ supabase,
+ input.brandId,
+ );
+ const plan = await getOrgPlan(orgId);
+
+ // Count existing prompts for this org, excluding prompts that belong
+ // to this brand (they will be replaced below)
+ const totalOrgPrompts = await getOrgPromptCount(supabase, orgId);
+
+ const { count: brandPromptCount } = await supabase
+ .from('prompts')
+ .select('id, prompt_sets!inner(brand_id)', { count: 'exact', head: true })
+ .eq('prompt_sets.brand_id', input.brandId);
+
+ const otherPrompts = totalOrgPrompts - (brandPromptCount ?? 0);
+ await enforceLimit(orgId, 'maxPrompts', otherPrompts + input.prompts.length - 1);
+
+ // Delete existing prompt sets for this brand to avoid duplicates
+ // (e.g. user navigated back during onboarding and re-submitted)
+ const { data: existing } = await supabase
+ .from('prompt_sets')
+ .select('id')
+ .eq('brand_id', input.brandId);
+
+ if (existing && existing.length > 0) {
+ const existingIds = existing.map((ps) => ps.id);
+ await supabase.from('prompts').delete().in('prompt_set_id', existingIds);
+ await supabase.from('prompt_sets').delete().eq('brand_id', input.brandId);
+ }
+
+ // Insert the prompt set
+ const { data: set, error: setError } = await supabase
+ .from('prompt_sets')
+ .insert({
+ brand_id: input.brandId,
+ name: input.name,
+ })
+ .select()
+ .single();
+
+ if (setError || !set) {
+ throw new Error(setError?.message ?? 'Failed to create prompt set');
+ }
+
+ // Insert prompts
+ let insertedPrompts: Record<string, unknown>[] = [];
+
+ if (input.prompts.length > 0) {
+ const categories = [...new Set(input.prompts.map((p) => p.category).filter(Boolean))] as string[];
+ const topicIdMap = new Map<string, string>();
+ await Promise.all(
+ categories.map(async (cat) => {
+ const tid = await resolveTopicId(supabase, input.brandId, cat);
+ if (tid) topicIdMap.set(cat, tid);
+ }),
+ );
+
+ const { data: prompts, error: promptError } = await supabase
+ .from('prompts')
+ .insert(
+ input.prompts.map((p) => {
+ const filtered = filterByPlan(plan, p.platforms, p.models ?? []);
+ if (filtered.platforms.length === 0 && filtered.models.length === 0) {
+ throw new Error(
+ 'At least one platform or model must be selected for each prompt.',
+ );
+ }
+ return {
+ prompt_set_id: set.id,
+ text: p.text,
+ category: p.category || null,
+ topic_id: (p.category && topicIdMap.get(p.category)) || null,
+ platforms: filtered.platforms,
+ regions: [brandRegion],
+ models: filtered.models,
+ is_active: p.isActive ?? true,
+ };
+ }),
+ )
+ .select();
+
+ if (promptError) throw new Error(promptError.message);
+ insertedPrompts = (prompts as Record<string, unknown>[]) ?? [];
+ }
+
+ revalidatePath('/dashboard/brands');
+
+ return mapPromptSetRow(set as Record<string, unknown>, insertedPrompts);
+}
+
+export async function updatePrompt(
+ id: string,
+ updates: {
+ text?: string;
+ category?: string;
+ platforms?: string[];
+ models?: string[];
+ isActive?: boolean;
+ },
+): Promise<Prompt> {
+ const supabase = await createClient();
+
+ const payload: Record<string, unknown> = {};
+ if (updates.text !== undefined) payload.text = updates.text;
+ if (updates.category !== undefined) payload.category = updates.category || null;
+ if (updates.isActive !== undefined) payload.is_active = updates.isActive;
+
+ if (updates.category !== undefined) {
+ const { data: promptWithBrand } = await supabase
+ .from('prompts')
+ .select('prompt_sets!inner(brand_id)')
+ .eq('id', id)
+ .single();
+ const brandId = (promptWithBrand?.prompt_sets as { brand_id: string })?.brand_id;
+ if (brandId) {
+ payload.topic_id = await resolveTopicId(supabase, brandId, updates.category);
+ }
+ }
+
+ if (updates.platforms !== undefined || updates.models !== undefined) {
+ const { data: promptRow } = await supabase
+ .from('prompts')
+ .select('prompt_sets!inner(brands!inner(organization_id))')
+ .eq('id', id)
+ .single();
+ const orgId = (
+ (promptRow?.prompt_sets as { brands: { organization_id: string } })
+ ?.brands?.organization_id
+ );
+ if (!orgId) throw new Error('Prompt not found');
+
+ const plan = await getOrgPlan(orgId);
+ const filtered = filterByPlan(
+ plan,
+ updates.platforms ?? [],
+ updates.models ?? [],
+ );
+ if (filtered.platforms.length === 0 && filtered.models.length === 0) {
+ throw new Error(
+ 'At least one platform or model must be selected.',
+ );
+ }
+ if (updates.platforms !== undefined) payload.platforms = filtered.platforms;
+ if (updates.models !== undefined) payload.models = filtered.models;
+ }
+
+ const { data, error } = await supabase
+ .from('prompts')
+ .update(payload)
+ .eq('id', id)
+ .select()
+ .single();
+
+ if (error || !data) {
+ throw new Error(error?.message ?? 'Failed to update prompt');
+ }
+
+ return mapPromptRow(data as Record<string, unknown>);
+}
+
+interface AddPromptInput {
+ promptSetId: string;
+ text: string;
+ category?: string;
+ platforms: string[];
+ models?: string[];
+}
+
+export async function addPromptToSet(input: AddPromptInput): Promise<Prompt> {
+ const supabase = await createClient();
+
+ const { data: ps } = await supabase
+ .from('prompt_sets')
+ .select('brand_id')
+ .eq('id', input.promptSetId)
+ .single();
+
+ if (!ps?.brand_id) throw new Error('Prompt set not found');
+
+ const { organizationId: orgId, region: brandRegion } = await getBrandContext(
+ supabase,
+ ps.brand_id as string,
+ );
+ const currentCount = await getOrgPromptCount(supabase, orgId);
+ await enforceLimit(orgId, 'maxPrompts', currentCount);
+
+ const plan = await getOrgPlan(orgId);
+ const filtered = filterByPlan(plan, input.platforms, input.models ?? []);
+ if (filtered.platforms.length === 0 && filtered.models.length === 0) {
+ throw new Error('At least one platform or model must be selected.');
+ }
+
+ const topicId = await resolveTopicId(supabase, ps.brand_id as string, input.category);
+
+ const { data, error } = await supabase
+ .from('prompts')
+ .insert({
+ prompt_set_id: input.promptSetId,
+ text: input.text,
+ category: input.category || null,
+ topic_id: topicId,
+ platforms: filtered.platforms,
+ regions: [brandRegion],
+ models: filtered.models,
+ is_active: true,
+ })
+ .select()
+ .single();
+
+ if (error || !data) {
+ throw new Error(error?.message ?? 'Failed to add prompt');
+ }
+
+ revalidatePath('/dashboard/brands');
+ return mapPromptRow(data as Record<string, unknown>);
+}
+
+export async function deletePrompt(id: string): Promise<void> {
+ const supabase = await createClient();
+
+ const { error } = await supabase.from('prompts').delete().eq('id', id);
+ if (error) throw new Error(error.message);
+}
+
+export async function deletePromptSet(id: string): Promise<void> {
+ const supabase = await createClient();
+
+ const { error } = await supabase.from('prompt_sets').delete().eq('id', id);
+ if (error) throw new Error(error.message);
+
+ revalidatePath('/dashboard/brands');
+}
diff --git a/web/src/lib/actions/team.ts b/web/src/lib/actions/team.ts
new file mode 100644
index 000000000..1c39579a7
--- /dev/null
+++ b/web/src/lib/actions/team.ts
@@ -0,0 +1,423 @@
+'use server';
+
+import { randomBytes } from 'crypto';
+import { revalidatePath } from 'next/cache';
+import { createClient } from '@/lib/supabase/server';
+import { supabaseAdmin } from '@/lib/supabase/admin';
+import { enforceLimit, getOrgPlan } from '@/lib/guards/plan-guard';
+
+export type TeamRole = 'admin' | 'manager' | 'analyst' | 'agency_partner';
+
+export interface TeamMember {
+ userId: string;
+ email: string;
+ fullName: string | null;
+ avatarUrl: string | null;
+ role: TeamRole;
+ createdAt: string;
+ isCurrentUser: boolean;
+}
+
+export interface TeamInvitation {
+ id: string;
+ email: string;
+ role: TeamRole;
+ status: 'pending' | 'accepted' | 'expired' | 'revoked';
+ invitedBy: string | null;
+ expiresAt: string;
+ createdAt: string;
+ acceptedAt: string | null;
+}
+
+export interface TeamInfo {
+ memberCount: number;
+ pendingCount: number;
+ seatsUsed: number;
+ maxTeamMembers: number;
+ canInvite: boolean;
+ planName: string;
+}
+
+async function getCurrentUserAndOrg() {
+ const supabase = await createClient();
+ const {
+ data: { user },
+ } = await supabase.auth.getUser();
+
+ if (!user) throw new Error('Unauthorized');
+
+ const { data: profile } = await supabase
+ .from('profiles')
+ .select('id, role, organization_id')
+ .eq('id', user.id)
+ .single();
+
+ if (!profile?.organization_id) throw new Error('No organization');
+
+ return {
+ user,
+ profile: profile as { id: string; role: TeamRole; organization_id: string },
+ };
+}
+
+async function requireAdmin() {
+ const { user, profile } = await getCurrentUserAndOrg();
+ if (profile.role !== 'admin') {
+ throw new Error('Only admins can manage team members');
+ }
+ return { user, profile };
+}
+
+export async function getTeamInfo(): Promise<TeamInfo> {
+ const { profile } = await getCurrentUserAndOrg();
+
+ const [{ count: memberCount }, { count: pendingCount }, plan] =
+ await Promise.all([
+ supabaseAdmin
+ .from('profiles')
+ .select('*', { count: 'exact', head: true })
+ .eq('organization_id', profile.organization_id),
+ supabaseAdmin
+ .from('invitations')
+ .select('*', { count: 'exact', head: true })
+ .eq('organization_id', profile.organization_id)
+ .eq('status', 'pending'),
+ getOrgPlan(profile.organization_id),
+ ]);
+
+ const mc = memberCount ?? 0;
+ const pc = pendingCount ?? 0;
+ const seatsUsed = mc + pc;
+ const max = plan.limits.maxTeamMembers;
+ const canInvite = max === -1 || seatsUsed < max;
+
+ return {
+ memberCount: mc,
+ pendingCount: pc,
+ seatsUsed,
+ maxTeamMembers: max,
+ canInvite,
+ planName: plan.name,
+ };
+}
+
+export async function listMembers(): Promise<TeamMember[]> {
+ const { user, profile } = await getCurrentUserAndOrg();
+
+ const { data, error } = await supabaseAdmin
+ .from('profiles')
+ .select('id, full_name, avatar_url, role, created_at')
+ .eq('organization_id', profile.organization_id)
+ .order('created_at', { ascending: true });
+
+ if (error) throw new Error(error.message);
+
+ const userIds = (data ?? []).map((p) => p.id as string);
+ if (userIds.length === 0) return [];
+
+ const emailMap = new Map<string, string>();
+ for (const uid of userIds) {
+ const { data: authUser } = await supabaseAdmin.auth.admin.getUserById(uid);
+ if (authUser?.user?.email) emailMap.set(uid, authUser.user.email);
+ }
+
+ return (data ?? []).map((p) => ({
+ userId: p.id as string,
+ email: emailMap.get(p.id as string) ?? '',
+ fullName: (p.full_name as string | null) ?? null,
+ avatarUrl: (p.avatar_url as string | null) ?? null,
+ role: p.role as TeamRole,
+ createdAt: p.created_at as string,
+ isCurrentUser: p.id === user.id,
+ }));
+}
+
+export async function listInvitations(): Promise<TeamInvitation[]> {
+ const { profile } = await getCurrentUserAndOrg();
+ const supabase = await createClient();
+
+ const { data, error } = await supabase
+ .from('invitations')
+ .select('*')
+ .eq('organization_id', profile.organization_id)
+ .eq('status', 'pending')
+ .order('created_at', { ascending: false });
+
+ if (error) throw new Error(error.message);
+
+ return (data ?? []).map((i) => ({
+ id: i.id as string,
+ email: i.email as string,
+ role: i.role as TeamRole,
+ status: i.status as TeamInvitation['status'],
+ invitedBy: (i.invited_by as string | null) ?? null,
+ expiresAt: i.expires_at as string,
+ createdAt: i.created_at as string,
+ acceptedAt: (i.accepted_at as string | null) ?? null,
+ }));
+}
+
+export async function inviteMember(email: string, role: TeamRole) {
+ const { user, profile } = await requireAdmin();
+ const normalizedEmail = email.trim().toLowerCase();
+
+ if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(normalizedEmail)) {
+ throw new Error('Invalid email address');
+ }
+
+ const [{ count: memberCount }, { count: inviteCount }] = await Promise.all([
+ supabaseAdmin
+ .from('profiles')
+ .select('*', { count: 'exact', head: true })
+ .eq('organization_id', profile.organization_id),
+ supabaseAdmin
+ .from('invitations')
+ .select('*', { count: 'exact', head: true })
+ .eq('organization_id', profile.organization_id)
+ .eq('status', 'pending'),
+ ]);
+
+ const total = (memberCount ?? 0) + (inviteCount ?? 0);
+ await enforceLimit(profile.organization_id, 'maxTeamMembers', total);
+
+ const { data: existingMember } = await supabaseAdmin
+ .from('profiles')
+ .select('id')
+ .eq('organization_id', profile.organization_id)
+ .limit(1);
+
+ if (existingMember && existingMember.length > 0) {
+ const { data: authUsers } =
+ await supabaseAdmin.auth.admin.listUsers({ page: 1, perPage: 200 });
+ const matched = authUsers?.users?.find(
+ (u) => u.email?.toLowerCase() === normalizedEmail,
+ );
+ if (matched) {
+ const { data: matchedProfile } = await supabaseAdmin
+ .from('profiles')
+ .select('organization_id')
+ .eq('id', matched.id)
+ .maybeSingle();
+ if (matchedProfile?.organization_id === profile.organization_id) {
+ throw new Error('This user is already a member of your team');
+ }
+ }
+ }
+
+ const token = randomBytes(32).toString('hex');
+ const appUrl = process.env.NEXT_PUBLIC_APP_URL || 'http://localhost:3000';
+ const inviteLink = `${appUrl}/invite/${token}`;
+
+ const { data: invitation, error: insertError } = await supabaseAdmin
+ .from('invitations')
+ .insert({
+ organization_id: profile.organization_id,
+ email: normalizedEmail,
+ role,
+ token,
+ invited_by: user.id,
+ })
+ .select()
+ .single();
+
+ if (insertError) {
+ if (insertError.code === '23505') {
+ throw new Error('A pending invitation already exists for this email');
+ }
+ throw new Error(insertError.message);
+ }
+
+ try {
+ await supabaseAdmin.auth.admin.inviteUserByEmail(normalizedEmail, {
+ redirectTo: inviteLink,
+ data: { invitation_token: token },
+ });
+ } catch {
+ // Supabase may fail if user already has an account; we still keep the
+ // invitation row so that the direct link works.
+ }
+
+ revalidatePath('/dashboard/settings');
+ return { invitation, inviteLink };
+}
+
+export async function revokeInvitation(invitationId: string) {
+ const { profile } = await requireAdmin();
+ const supabase = await createClient();
+
+ const { error } = await supabase
+ .from('invitations')
+ .update({ status: 'revoked' })
+ .eq('id', invitationId)
+ .eq('organization_id', profile.organization_id);
+
+ if (error) throw new Error(error.message);
+ revalidatePath('/dashboard/settings');
+}
+
+export async function resendInvitation(invitationId: string) {
+ const { profile } = await requireAdmin();
+
+ const { data: invitation, error } = await supabaseAdmin
+ .from('invitations')
+ .select('*')
+ .eq('id', invitationId)
+ .eq('organization_id', profile.organization_id)
+ .single();
+
+ if (error || !invitation) throw new Error('Invitation not found');
+ if (invitation.status !== 'pending') {
+ throw new Error('Only pending invitations can be resent');
+ }
+
+ const appUrl = process.env.NEXT_PUBLIC_APP_URL || 'http://localhost:3000';
+ const inviteLink = `${appUrl}/invite/${invitation.token}`;
+
+ const newExpiresAt = new Date(
+ Date.now() + 7 * 24 * 60 * 60 * 1000,
+ ).toISOString();
+ await supabaseAdmin
+ .from('invitations')
+ .update({ expires_at: newExpiresAt })
+ .eq('id', invitationId);
+
+ try {
+ await supabaseAdmin.auth.admin.inviteUserByEmail(invitation.email as string, {
+ redirectTo: inviteLink,
+ data: { invitation_token: invitation.token },
+ });
+ } catch {
+ // Ignore: link is still valid regardless of email delivery outcome.
+ }
+
+ revalidatePath('/dashboard/settings');
+ return { inviteLink };
+}
+
+export async function updateMemberRole(userId: string, role: TeamRole) {
+ const { user, profile } = await requireAdmin();
+
+ if (userId === user.id) {
+ throw new Error('You cannot change your own role');
+ }
+
+ const { error } = await supabaseAdmin
+ .from('profiles')
+ .update({ role })
+ .eq('id', userId)
+ .eq('organization_id', profile.organization_id);
+
+ if (error) throw new Error(error.message);
+ revalidatePath('/dashboard/settings');
+}
+
+export async function removeMember(userId: string) {
+ const { user, profile } = await requireAdmin();
+
+ if (userId === user.id) {
+ throw new Error('You cannot remove yourself from the team');
+ }
+
+ const { error } = await supabaseAdmin
+ .from('profiles')
+ .update({ organization_id: null })
+ .eq('id', userId)
+ .eq('organization_id', profile.organization_id);
+
+ if (error) throw new Error(error.message);
+ revalidatePath('/dashboard/settings');
+}
+
+export interface AcceptInvitationResult {
+ organizationId: string;
+ role: TeamRole;
+}
+
+export async function acceptInvitation(
+ token: string,
+): Promise<AcceptInvitationResult> {
+ const supabase = await createClient();
+ const {
+ data: { user },
+ } = await supabase.auth.getUser();
+
+ if (!user) throw new Error('You must be signed in to accept an invitation');
+
+ const { data: invitation, error } = await supabaseAdmin
+ .from('invitations')
+ .select('*')
+ .eq('token', token)
+ .maybeSingle();
+
+ if (error || !invitation) throw new Error('Invitation not found');
+
+ if (invitation.status !== 'pending') {
+ throw new Error('This invitation is no longer valid');
+ }
+
+ const expiresAt = new Date(invitation.expires_at as string);
+ if (expiresAt.getTime() < Date.now()) {
+ await supabaseAdmin
+ .from('invitations')
+ .update({ status: 'expired' })
+ .eq('id', invitation.id);
+ throw new Error('This invitation has expired');
+ }
+
+ const inviteEmail = (invitation.email as string).toLowerCase();
+ const userEmail = user.email?.toLowerCase() ?? '';
+ if (inviteEmail !== userEmail) {
+ throw new Error(
+ `This invitation was sent to ${inviteEmail}. Please sign in with that email.`,
+ );
+ }
+
+ const { error: profileErr } = await supabaseAdmin
+ .from('profiles')
+ .update({
+ organization_id: invitation.organization_id,
+ role: invitation.role,
+ onboarding_completed: true,
+ })
+ .eq('id', user.id);
+
+ if (profileErr) throw new Error(profileErr.message);
+
+ await supabaseAdmin
+ .from('invitations')
+ .update({
+ status: 'accepted',
+ accepted_at: new Date().toISOString(),
+ })
+ .eq('id', invitation.id);
+
+ revalidatePath('/dashboard');
+
+ return {
+ organizationId: invitation.organization_id as string,
+ role: invitation.role as TeamRole,
+ };
+}
+
+export async function getInvitationByToken(token: string) {
+ const { data, error } = await supabaseAdmin
+ .from('invitations')
+ .select(
+ 'id, email, role, status, expires_at, organization_id, organizations(name)',
+ )
+ .eq('token', token)
+ .maybeSingle();
+
+ if (error || !data) return null;
+
+ return {
+ id: data.id as string,
+ email: data.email as string,
+ role: data.role as TeamRole,
+ status: data.status as TeamInvitation['status'],
+ expiresAt: data.expires_at as string,
+ organizationId: data.organization_id as string,
+ organizationName:
+ (data.organizations as unknown as { name: string } | null)?.name ?? null,
+ };
+}
diff --git a/web/src/lib/actions/topic.ts b/web/src/lib/actions/topic.ts
new file mode 100644
index 000000000..685379b45
--- /dev/null
+++ b/web/src/lib/actions/topic.ts
@@ -0,0 +1,390 @@
+'use server';
+
+import { createClient } from '@/lib/supabase/server';
+import type { CompetitorMention, Topic } from '@/types';
+
+function mapTopicRow(row: Record<string, unknown>): Topic {
+ return {
+ id: row.id as string,
+ brandId: row.brand_id as string,
+ name: row.name as string,
+ isActive: row.is_active as boolean,
+ createdAt: row.created_at as string,
+ };
+}
+
+export async function createTopics(
+ brandId: string,
+ names: string[],
+): Promise<Topic[]> {
+ const supabase = await createClient();
+
+ // Remove existing topics for this brand to avoid duplicates
+ // (e.g. user navigated back and re-submitted)
+ await supabase.from('topics').delete().eq('brand_id', brandId);
+
+ const rows = names.map((name) => ({
+ brand_id: brandId,
+ name: name.trim(),
+ }));
+
+ const { data, error } = await supabase
+ .from('topics')
+ .insert(rows)
+ .select();
+
+ if (error) throw new Error(error.message);
+ return (data ?? []).map((r) => mapTopicRow(r as Record<string, unknown>));
+}
+
+export async function getTopics(brandId: string): Promise<Topic[]> {
+ const supabase = await createClient();
+
+ const { data, error } = await supabase
+ .from('topics')
+ .select('*')
+ .eq('brand_id', brandId)
+ .eq('is_active', true)
+ .order('created_at', { ascending: true });
+
+ if (error) throw new Error(error.message);
+ return (data ?? []).map((r) => mapTopicRow(r as Record<string, unknown>));
+}
+
+export async function createTopic(
+ brandId: string,
+ name: string,
+): Promise<Topic> {
+ const supabase = await createClient();
+
+ const { data, error } = await supabase
+ .from('topics')
+ .insert({ brand_id: brandId, name: name.trim() })
+ .select()
+ .single();
+
+ if (error) throw new Error(error.message);
+ return mapTopicRow(data as Record<string, unknown>);
+}
+
+export async function updateTopic(
+ topicId: string,
+ name: string,
+): Promise<Topic> {
+ const supabase = await createClient();
+
+ const { data, error } = await supabase
+ .from('topics')
+ .update({ name: name.trim() })
+ .eq('id', topicId)
+ .select()
+ .single();
+
+ if (error) throw new Error(error.message);
+ return mapTopicRow(data as Record<string, unknown>);
+}
+
+export async function getPromptCountByTopic(
+ brandId: string,
+ topicName: string,
+): Promise<number> {
+ const supabase = await createClient();
+
+ const { data: sets } = await supabase
+ .from('prompt_sets')
+ .select('id')
+ .eq('brand_id', brandId);
+
+ if (!sets || sets.length === 0) return 0;
+
+ const setIds = sets.map((s) => s.id as string);
+ const { count, error } = await supabase
+ .from('prompts')
+ .select('id', { count: 'exact', head: true })
+ .in('prompt_set_id', setIds)
+ .eq('category', topicName);
+
+ if (error) throw new Error(error.message);
+ return count ?? 0;
+}
+
+// ─── Topic Analytics ────────────────────────────────────────────────────────
+
+export interface TopicOverviewRow {
+ id: string;
+ name: string;
+ promptCount: number;
+ avgVisibilityScore: number;
+ visibilityChange: number | null;
+ totalMentions: number;
+ totalCitations: number;
+ shareOfVoice: number;
+ topCompetitor: { name: string; sov: number } | null;
+ lastRunAt: string | null;
+ trendSparkline: number[];
+}
+
+export interface TopicOverviewSummary {
+ topics: TopicOverviewRow[];
+ unassignedPromptCount: number;
+}
+
+/**
+ * Aggregate per-topic analytics for a brand.
+ * Looks at last 30 days of prompt_results and derives visibility, mentions,
+ * citations, SoV, top competitor and a short sparkline per topic.
+ * Change is computed as (current 7d avg) - (previous 7d avg) to mirror
+ * the logic used by Insights KPI cards.
+ */
+export async function getTopicsOverview(
+ brandId: string,
+): Promise<TopicOverviewSummary> {
+ const supabase = await createClient();
+
+ const now = Date.now();
+ const since30d = new Date(now - 30 * 24 * 60 * 60 * 1000).toISOString();
+ const curFrom = new Date(now - 7 * 24 * 60 * 60 * 1000).getTime();
+ const prevFrom = new Date(now - 14 * 24 * 60 * 60 * 1000).getTime();
+
+ const [topicsRes, promptsRes, resultsRes] = await Promise.all([
+ supabase
+ .from('topics')
+ .select('id, name, created_at')
+ .eq('brand_id', brandId)
+ .eq('is_active', true)
+ .order('created_at', { ascending: true }),
+ supabase
+ .from('prompts')
+ .select('id, topic_id, prompt_set_id')
+ .eq('is_active', true),
+ supabase
+ .from('prompt_results')
+ .select(
+ 'prompt_id, created_at, visibility_score, mention_count, citation_count, competitor_mentions',
+ )
+ .eq('brand_id', brandId)
+ .gte('created_at', since30d),
+ ]);
+
+ if (topicsRes.error) throw new Error(topicsRes.error.message);
+ if (promptsRes.error) throw new Error(promptsRes.error.message);
+ if (resultsRes.error) throw new Error(resultsRes.error.message);
+
+ const topics = (topicsRes.data ?? []) as {
+ id: string;
+ name: string;
+ created_at: string;
+ }[];
+ const allPrompts = (promptsRes.data ?? []) as unknown as {
+ id: string;
+ topic_id: string | null;
+ prompt_set_id: string;
+ }[];
+ const results = (resultsRes.data ?? []) as Record<string, unknown>[];
+
+ // Restrict prompts to those owned by this brand's prompt_sets
+ const { data: brandSets } = await supabase
+ .from('prompt_sets')
+ .select('id')
+ .eq('brand_id', brandId);
+ const brandSetIds = new Set(
+ ((brandSets ?? []) as { id: string }[]).map((s) => s.id),
+ );
+ const prompts = allPrompts.filter((p) => brandSetIds.has(p.prompt_set_id));
+
+ const promptTopicMap = new Map<string, string | null>();
+ for (const p of prompts) promptTopicMap.set(p.id, p.topic_id);
+
+ interface Agg {
+ curScoreSum: number;
+ curCount: number;
+ prevScoreSum: number;
+ prevCount: number;
+ allScoreSum: number;
+ allCount: number;
+ totalMentions: number;
+ totalCitations: number;
+ brandMentions: number;
+ compMentions: number;
+ lastRunAt: number;
+ competitors: Map<string, { name: string; sov: number }>;
+ daily: Map<string, { sum: number; count: number }>;
+ }
+ const emptyAgg = (): Agg => ({
+ curScoreSum: 0,
+ curCount: 0,
+ prevScoreSum: 0,
+ prevCount: 0,
+ allScoreSum: 0,
+ allCount: 0,
+ totalMentions: 0,
+ totalCitations: 0,
+ brandMentions: 0,
+ compMentions: 0,
+ lastRunAt: 0,
+ competitors: new Map(),
+ daily: new Map(),
+ });
+
+ const aggByTopic = new Map<string, Agg>();
+ let unassignedPromptCount = 0;
+ for (const p of prompts) {
+ if (!p.topic_id) {
+ unassignedPromptCount += 1;
+ continue;
+ }
+ if (!aggByTopic.has(p.topic_id)) aggByTopic.set(p.topic_id, emptyAgg());
+ }
+
+ const promptCountByTopic = new Map<string, number>();
+ for (const p of prompts) {
+ if (!p.topic_id) continue;
+ promptCountByTopic.set(
+ p.topic_id,
+ (promptCountByTopic.get(p.topic_id) ?? 0) + 1,
+ );
+ }
+
+ for (const row of results) {
+ const promptId = row.prompt_id as string;
+ const topicId = promptTopicMap.get(promptId);
+ if (!topicId) continue;
+
+ const agg = aggByTopic.get(topicId);
+ if (!agg) continue;
+
+ const createdAt = row.created_at as string;
+ const ts = new Date(createdAt).getTime();
+ const score = (row.visibility_score as number) ?? 0;
+ const mentions = (row.mention_count as number) ?? 0;
+ const citations = (row.citation_count as number) ?? 0;
+
+ agg.allScoreSum += score;
+ agg.allCount += 1;
+ agg.totalMentions += mentions;
+ agg.totalCitations += citations;
+ agg.brandMentions += mentions;
+ if (ts > agg.lastRunAt) agg.lastRunAt = ts;
+
+ if (ts >= curFrom) {
+ agg.curScoreSum += score;
+ agg.curCount += 1;
+ } else if (ts >= prevFrom) {
+ agg.prevScoreSum += score;
+ agg.prevCount += 1;
+ }
+
+ const day = createdAt.slice(0, 10);
+ const d = agg.daily.get(day) ?? { sum: 0, count: 0 };
+ d.sum += score;
+ d.count += 1;
+ agg.daily.set(day, d);
+
+ const compMentions = (row.competitor_mentions as CompetitorMention[] | null) ?? [];
+ const compTotalsForRow = new Map<string, { name: string; mentions: number }>();
+ for (const cm of compMentions) {
+ agg.compMentions += cm.mention_count;
+ const existing = compTotalsForRow.get(cm.competitor_id) ?? {
+ name: cm.name,
+ mentions: 0,
+ };
+ existing.mentions += cm.mention_count;
+ compTotalsForRow.set(cm.competitor_id, existing);
+ }
+ for (const [compId, info] of compTotalsForRow) {
+ const ec = agg.competitors.get(compId) ?? { name: info.name, sov: 0 };
+ ec.sov += info.mentions;
+ agg.competitors.set(compId, ec);
+ }
+ }
+
+ const rows: TopicOverviewRow[] = topics.map((t) => {
+ const agg = aggByTopic.get(t.id) ?? emptyAgg();
+ const promptCount = promptCountByTopic.get(t.id) ?? 0;
+
+ const avg = agg.allCount > 0 ? Math.round(agg.allScoreSum / agg.allCount) : 0;
+ const change =
+ agg.curCount > 0 && agg.prevCount > 0
+ ? Math.round(
+ (agg.curScoreSum / agg.curCount -
+ agg.prevScoreSum / agg.prevCount) *
+ 10,
+ ) / 10
+ : null;
+
+ const totalForSov = agg.brandMentions + agg.compMentions;
+ const shareOfVoice =
+ totalForSov > 0
+ ? Math.round((agg.brandMentions / totalForSov) * 1000) / 10
+ : 0;
+
+ let topCompetitor: TopicOverviewRow['topCompetitor'] = null;
+ if (totalForSov > 0 && agg.competitors.size > 0) {
+ let best: { name: string; sov: number } | null = null;
+ for (const c of agg.competitors.values()) {
+ const pct = Math.round((c.sov / totalForSov) * 1000) / 10;
+ if (!best || pct > best.sov) best = { name: c.name, sov: pct };
+ }
+ topCompetitor = best;
+ }
+
+ const sparklineDays: number[] = [];
+ const todayMs = now;
+ for (let i = 13; i >= 0; i--) {
+ const d = new Date(todayMs - i * 24 * 60 * 60 * 1000);
+ const key = d.toISOString().slice(0, 10);
+ const bucket = agg.daily.get(key);
+ sparklineDays.push(
+ bucket && bucket.count > 0 ? Math.round(bucket.sum / bucket.count) : 0,
+ );
+ }
+
+ return {
+ id: t.id,
+ name: t.name,
+ promptCount,
+ avgVisibilityScore: avg,
+ visibilityChange: change,
+ totalMentions: agg.totalMentions,
+ totalCitations: agg.totalCitations,
+ shareOfVoice,
+ topCompetitor,
+ lastRunAt: agg.lastRunAt > 0 ? new Date(agg.lastRunAt).toISOString() : null,
+ trendSparkline: sparklineDays,
+ };
+ });
+
+ return { topics: rows, unassignedPromptCount };
+}
+
+export async function deleteTopic(topicId: string): Promise<void> {
+ const supabase = await createClient();
+
+ // Fetch topic to get name and brand_id
+ const { data: topic, error: fetchErr } = await supabase
+ .from('topics')
+ .select('name, brand_id')
+ .eq('id', topicId)
+ .single();
+
+ if (fetchErr) throw new Error(fetchErr.message);
+
+ // Clear category on prompts that belong to this brand and use this topic name
+ const { data: sets } = await supabase
+ .from('prompt_sets')
+ .select('id')
+ .eq('brand_id', topic.brand_id as string);
+
+ if (sets && sets.length > 0) {
+ const setIds = sets.map((s) => s.id as string);
+ await supabase
+ .from('prompts')
+ .update({ category: null })
+ .in('prompt_set_id', setIds)
+ .eq('category', topic.name as string);
+ }
+
+ // Delete the topic
+ const { error } = await supabase.from('topics').delete().eq('id', topicId);
+ if (error) throw new Error(error.message);
+}
diff --git a/web/src/lib/actions/tracking.ts b/web/src/lib/actions/tracking.ts
new file mode 100644
index 000000000..4557ff69e
--- /dev/null
+++ b/web/src/lib/actions/tracking.ts
@@ -0,0 +1,1972 @@
+'use server';
+
+import { createClient } from '@/lib/supabase/server';
+import type {
+ PromptResult,
+ AIPlatform,
+ Sentiment,
+ Citation,
+ CompetitorMention,
+} from '@/types';
+
+function mapResultRow(row: Record<string, unknown>): PromptResult {
+ return {
+ id: row.id as string,
+ promptId: row.prompt_id as string,
+ brandId: row.brand_id as string,
+ platform: row.platform as AIPlatform,
+ response: row.response as string,
+ citations: (row.citations as Citation[]) ?? [],
+ mentionCount: row.mention_count as number,
+ citationCount: row.citation_count as number,
+ sentiment: row.sentiment as Sentiment,
+ visibilityScore: row.visibility_score as number,
+ modelUsed: (row.model_used as string | null) ?? undefined,
+ region: (row.region as string | null) ?? undefined,
+ competitorMentions:
+ (row.competitor_mentions as CompetitorMention[] | null) ?? undefined,
+ createdAt: row.created_at as string,
+ };
+}
+
+export interface PromptResultWithText extends PromptResult {
+ promptText: string;
+ promptCategory?: string;
+ topicId?: string;
+ topicName?: string;
+}
+
+export interface PromptDetailData {
+ prompt: {
+ id: string;
+ brandId: string;
+ text: string;
+ category?: string;
+ topicId?: string;
+ topicName?: string;
+ isActive: boolean;
+ createdAt: string;
+ };
+ summary: {
+ avgVisibilityScore: number;
+ totalMentions: number;
+ totalCitations: number;
+ totalResults: number;
+ lastCheckedAt: string | null;
+ };
+ results: PromptResultWithText[];
+}
+
+export interface InsightsSummary {
+ avgVisibilityScore: number;
+ totalMentions: number;
+ totalCitations: number;
+ positiveSentimentPct: number;
+ totalResults: number;
+ lastCheckedAt: string | null;
+ platformBreakdown: {
+ platform: string;
+ avgScore: number;
+ resultCount: number;
+ }[];
+ visibilityChange: number | null;
+ mentionsChange: number | null;
+ citationsChange: number | null;
+ sentimentChange: number | null;
+}
+
+/**
+ * Build a filtered query on prompt_results for a brand.
+ */
+async function buildResultsQuery(
+ brandId: string,
+ opts?: {
+ platform?: string;
+ model?: string;
+ region?: string;
+ dateFrom?: string;
+ dateTo?: string;
+ promptId?: string;
+ topicId?: string;
+ },
+) {
+ const supabase = await createClient();
+ let query = supabase
+ .from('prompt_results')
+ .select('*')
+ .eq('brand_id', brandId);
+
+ if (opts?.platform) query = query.eq('platform', opts.platform);
+ if (opts?.model) query = query.eq('model_used', opts.model);
+ if (opts?.region) query = query.eq('region', opts.region);
+ if (opts?.dateFrom) query = query.gte('created_at', opts.dateFrom);
+ if (opts?.dateTo) query = query.lte('created_at', opts.dateTo);
+ if (opts?.promptId) query = query.eq('prompt_id', opts.promptId);
+
+ if (opts?.topicId) {
+ const { data: topicPrompts } = await supabase
+ .from('prompts')
+ .select('id')
+ .eq('topic_id', opts.topicId);
+ const topicPromptIds = ((topicPrompts ?? []) as { id: string }[]).map(
+ (p) => p.id,
+ );
+ // Use a sentinel that matches nothing when the topic has no prompts so results are empty.
+ query = query.in(
+ 'prompt_id',
+ topicPromptIds.length > 0
+ ? topicPromptIds
+ : ['00000000-0000-0000-0000-000000000000'],
+ );
+ }
+
+ return { supabase, query };
+}
+
+/**
+ * Fetch prompt results for a brand with proper date filtering.
+ */
+export async function getPromptResults(
+ brandId: string,
+ opts?: {
+ limit?: number;
+ offset?: number;
+ platform?: string;
+ model?: string;
+ region?: string;
+ dateFrom?: string;
+ dateTo?: string;
+ promptId?: string;
+ topicId?: string;
+ },
+): Promise<{ results: PromptResultWithText[]; total: number }> {
+ const { supabase, query } = await buildResultsQuery(brandId, opts);
+
+ const { data: allRows, error } = await query.order('created_at', {
+ ascending: false,
+ });
+ if (error) throw new Error(error.message);
+
+ const rows = (allRows ?? []) as Record<string, unknown>[];
+
+ const promptIds = [...new Set(rows.map((r) => r.prompt_id as string))];
+ const { data: promptRows } =
+ promptIds.length > 0
+ ? await supabase
+ .from('prompts')
+ .select('id, text, category, topic_id')
+ .in('id', promptIds)
+ : { data: [] };
+
+ const promptRowsRaw = (promptRows ?? []) as unknown as Record<
+ string,
+ unknown
+ >[];
+
+ const topicIds = [
+ ...new Set(
+ promptRowsRaw
+ .map((p) => p.topic_id as string | null)
+ .filter(Boolean) as string[],
+ ),
+ ];
+ const { data: topicRows } =
+ topicIds.length > 0
+ ? await supabase.from('topics').select('id, name').in('id', topicIds)
+ : { data: [] };
+ const topicMap = new Map(
+ ((topicRows ?? []) as Record<string, unknown>[]).map((t) => [
+ t.id as string,
+ t.name as string,
+ ]),
+ );
+
+ const promptMap = new Map(
+ promptRowsRaw.map((p) => [
+ p.id as string,
+ {
+ text: p.text as string,
+ category: p.category as string | null,
+ topicId: p.topic_id as string | null,
+ },
+ ]),
+ );
+
+ const limit = opts?.limit ?? 50;
+ const offset = opts?.offset ?? 0;
+ const paged = rows.slice(offset, offset + limit);
+
+ const results = paged.map((r) => {
+ const pm = promptMap.get(r.prompt_id as string);
+ return {
+ ...mapResultRow(r),
+ promptText: (pm?.text as string) ?? '',
+ promptCategory: (pm?.category as string | null) ?? undefined,
+ topicId: (pm?.topicId as string | null) ?? undefined,
+ topicName: pm?.topicId
+ ? (topicMap.get(pm.topicId) ??
+ (pm?.category as string | null) ??
+ undefined)
+ : ((pm?.category as string | null) ?? undefined),
+ };
+ });
+
+ return { results, total: rows.length };
+}
+
+/**
+ * Fetch a single prompt result by its ID, joining prompt text.
+ */
+export async function getPromptResultById(
+ resultId: string,
+): Promise<PromptResultWithText | null> {
+ const supabase = await createClient();
+
+ const { data, error } = await supabase
+ .from('prompt_results')
+ .select('*')
+ .eq('id', resultId)
+ .single();
+
+ if (error || !data) return null;
+
+ const row = data as Record<string, unknown>;
+ const { data: promptData } = await supabase
+ .from('prompts')
+ .select('text, category, topic_id')
+ .eq('id', row.prompt_id as string)
+ .single();
+
+ const prompt = promptData as unknown as Record<string, unknown> | null;
+
+ let topicName: string | undefined;
+ if (prompt?.topic_id) {
+ const { data: topic } = await supabase
+ .from('topics')
+ .select('name')
+ .eq('id', prompt.topic_id as string)
+ .single();
+ topicName = (topic?.name as string) ?? undefined;
+ }
+ if (!topicName && prompt?.category) {
+ topicName = prompt.category as string;
+ }
+
+ return {
+ ...mapResultRow(row),
+ promptText: (prompt?.text as string) ?? '',
+ promptCategory: (prompt?.category as string | null) ?? undefined,
+ topicId: (prompt?.topic_id as string | null) ?? undefined,
+ topicName,
+ };
+}
+
+/**
+ * Fetch one prompt and its recent tracking results for the prompt detail page.
+ */
+export async function getPromptDetail(
+ promptId: string,
+ opts?: { limit?: number },
+): Promise<PromptDetailData | null> {
+ const supabase = await createClient();
+
+ const { data: promptData, error: promptError } = await supabase
+ .from('prompts')
+ .select(
+ 'id, prompt_set_id, text, category, topic_id, is_active, created_at',
+ )
+ .eq('id', promptId)
+ .single();
+
+ if (promptError || !promptData) return null;
+
+ const prompt = promptData as unknown as Record<string, unknown>;
+ const promptSetId = prompt.prompt_set_id as string;
+
+ const { data: promptSetData } = await supabase
+ .from('prompt_sets')
+ .select('brand_id')
+ .eq('id', promptSetId)
+ .single();
+
+ const brandId = (promptSetData?.brand_id as string | undefined) ?? '';
+
+ let topicName: string | undefined;
+ if (prompt.topic_id) {
+ const { data: topic } = await supabase
+ .from('topics')
+ .select('name')
+ .eq('id', prompt.topic_id as string)
+ .single();
+ topicName = (topic?.name as string) ?? undefined;
+ }
+ if (!topicName && prompt.category) {
+ topicName = prompt.category as string;
+ }
+
+ const { data: resultRows, error: resultError } = await supabase
+ .from('prompt_results')
+ .select('*')
+ .eq('prompt_id', promptId)
+ .order('created_at', { ascending: false })
+ .limit(opts?.limit ?? 500);
+
+ if (resultError) throw new Error(resultError.message);
+
+ const rows = (resultRows ?? []) as unknown as Record<string, unknown>[];
+ const results: PromptResultWithText[] = rows.map((row) => ({
+ ...mapResultRow(row),
+ promptText: prompt.text as string,
+ promptCategory: (prompt.category as string | null) ?? undefined,
+ topicId: (prompt.topic_id as string | null) ?? undefined,
+ topicName,
+ }));
+
+ const totalResults = results.length;
+ const avgVisibilityScore =
+ totalResults > 0
+ ? Math.round(
+ results.reduce((sum, row) => sum + row.visibilityScore, 0) /
+ totalResults,
+ )
+ : 0;
+
+ return {
+ prompt: {
+ id: prompt.id as string,
+ brandId,
+ text: prompt.text as string,
+ category: (prompt.category as string | null) ?? undefined,
+ topicId: (prompt.topic_id as string | null) ?? undefined,
+ topicName,
+ isActive: Boolean(prompt.is_active),
+ createdAt: prompt.created_at as string,
+ },
+ summary: {
+ avgVisibilityScore,
+ totalMentions: results.reduce((sum, row) => sum + row.mentionCount, 0),
+ totalCitations: results.reduce((sum, row) => sum + row.citationCount, 0),
+ totalResults,
+ lastCheckedAt: results[0]?.createdAt ?? null,
+ },
+ results,
+ };
+}
+
+/**
+ * Compute aggregated insights for a brand with proper date filtering.
+ */
+export async function getInsightsSummary(
+ brandId: string,
+ opts?: {
+ model?: string;
+ region?: string;
+ dateFrom?: string;
+ dateTo?: string;
+ topicId?: string;
+ },
+): Promise<InsightsSummary> {
+ const { query } = await buildResultsQuery(brandId, opts);
+
+ const { data: results, error } = await query;
+ if (error) throw new Error(error.message);
+
+ const rows = (results ?? []) as Record<string, unknown>[];
+
+ if (rows.length === 0) {
+ return {
+ avgVisibilityScore: 0,
+ totalMentions: 0,
+ totalCitations: 0,
+ positiveSentimentPct: 0,
+ totalResults: 0,
+ lastCheckedAt: null,
+ platformBreakdown: [],
+ visibilityChange: null,
+ mentionsChange: null,
+ citationsChange: null,
+ sentimentChange: null,
+ };
+ }
+
+ const totalResults = rows.length;
+ const avgVisibilityScore = Math.round(
+ rows.reduce((s, r) => s + (r.visibility_score as number), 0) / totalResults,
+ );
+ const totalMentions = rows.reduce(
+ (s, r) => s + (r.mention_count as number),
+ 0,
+ );
+ const totalCitations = rows.reduce(
+ (s, r) => s + (r.citation_count as number),
+ 0,
+ );
+ const positiveCount = rows.filter((r) => r.sentiment === 'positive').length;
+ const positiveSentimentPct = Math.round((positiveCount / totalResults) * 100);
+
+ const lastCheckedAt =
+ rows
+ .map((r) => r.created_at as string)
+ .sort()
+ .pop() ?? null;
+
+ const modelMap = new Map<string, { totalScore: number; count: number }>();
+ for (const r of rows) {
+ const m = (r.model_used as string) || 'unknown';
+ const existing = modelMap.get(m) ?? { totalScore: 0, count: 0 };
+ existing.totalScore += r.visibility_score as number;
+ existing.count += 1;
+ modelMap.set(m, existing);
+ }
+
+ const platformBreakdown = Array.from(modelMap.entries()).map(
+ ([model, data]) => ({
+ platform: model,
+ avgScore: Math.round(data.totalScore / data.count),
+ resultCount: data.count,
+ }),
+ );
+
+ // --- Previous period comparison ---
+ let visibilityChange: number | null = null;
+ let mentionsChange: number | null = null;
+ let citationsChange: number | null = null;
+ let sentimentChange: number | null = null;
+
+ {
+ let currentFrom: Date;
+ let currentTo: Date;
+
+ if (opts?.dateFrom) {
+ currentFrom = new Date(opts.dateFrom);
+ currentTo = opts.dateTo ? new Date(opts.dateTo) : new Date();
+ } else {
+ currentTo = new Date();
+ currentFrom = new Date();
+ currentFrom.setDate(currentFrom.getDate() - 7);
+ }
+
+ const duration = currentTo.getTime() - currentFrom.getTime();
+ const prevFrom = new Date(currentFrom.getTime() - duration);
+
+ const currentFilterOpts = opts?.dateFrom
+ ? opts
+ : { ...opts, dateFrom: currentFrom.toISOString() };
+
+ const { query: curQuery } = await buildResultsQuery(
+ brandId,
+ currentFilterOpts,
+ );
+ const { data: curResults } = await curQuery;
+ const curRows = (curResults ?? []) as Record<string, unknown>[];
+
+ const { query: prevQuery } = await buildResultsQuery(brandId, {
+ ...opts,
+ dateFrom: prevFrom.toISOString(),
+ dateTo: currentFrom.toISOString(),
+ });
+
+ const { data: prevResults } = await prevQuery;
+ const prevRows = (prevResults ?? []) as Record<string, unknown>[];
+
+ if (curRows.length > 0 && prevRows.length > 0) {
+ const curTotal = curRows.length;
+ const curAvgVis = Math.round(
+ curRows.reduce((s, r) => s + (r.visibility_score as number), 0) /
+ curTotal,
+ );
+ const curMentions = curRows.reduce(
+ (s, r) => s + (r.mention_count as number),
+ 0,
+ );
+ const curCitations = curRows.reduce(
+ (s, r) => s + (r.citation_count as number),
+ 0,
+ );
+ const curPositive = curRows.filter(
+ (r) => r.sentiment === 'positive',
+ ).length;
+ const curSentimentPct = Math.round((curPositive / curTotal) * 100);
+
+ const prevTotal = prevRows.length;
+ const prevAvgVis = Math.round(
+ prevRows.reduce((s, r) => s + (r.visibility_score as number), 0) /
+ prevTotal,
+ );
+ const prevMentions = prevRows.reduce(
+ (s, r) => s + (r.mention_count as number),
+ 0,
+ );
+ const prevCitations = prevRows.reduce(
+ (s, r) => s + (r.citation_count as number),
+ 0,
+ );
+ const prevPositive = prevRows.filter(
+ (r) => r.sentiment === 'positive',
+ ).length;
+ const prevSentimentPct = Math.round((prevPositive / prevTotal) * 100);
+
+ visibilityChange = curAvgVis - prevAvgVis;
+ mentionsChange =
+ curMentions > 0 && prevMentions > 0
+ ? Math.round(((curMentions - prevMentions) / prevMentions) * 100)
+ : curMentions - prevMentions;
+ citationsChange =
+ curCitations > 0 && prevCitations > 0
+ ? Math.round(((curCitations - prevCitations) / prevCitations) * 100)
+ : curCitations - prevCitations;
+ sentimentChange = curSentimentPct - prevSentimentPct;
+ }
+ }
+
+ return {
+ avgVisibilityScore,
+ totalMentions,
+ totalCitations,
+ positiveSentimentPct,
+ totalResults,
+ lastCheckedAt,
+ platformBreakdown,
+ visibilityChange,
+ mentionsChange,
+ citationsChange,
+ sentimentChange,
+ };
+}
+
+/**
+ * Trigger a tracking check via the aeo-server API.
+ * Pass promptId to run a single prompt instead of all.
+ */
+export async function triggerTrackingCheck(
+ brandId: string,
+ opts?: { promptId?: string },
+): Promise<{ jobId: string }> {
+ const supabase = await createClient();
+
+ const {
+ data: { session },
+ } = await supabase.auth.getSession();
+ if (!session) throw new Error('Not authenticated');
+
+ const serverUrl = process.env.NEXT_PUBLIC_API_URL || 'http://localhost';
+
+ const payload: Record<string, string> = { brandId };
+ if (opts?.promptId) payload.promptId = opts.promptId;
+
+ const res = await fetch(`${serverUrl}/api/tracking/check`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: `Bearer ${session.access_token}`,
+ },
+ body: JSON.stringify(payload),
+ });
+
+ if (!res.ok) {
+ const body = await res.json().catch(() => ({}));
+ throw new Error(body.message || `Server error: ${res.status}`);
+ }
+
+ const data = await res.json();
+ return { jobId: data.jobId };
+}
+
+export interface TrackingJobStatus {
+ status:
+ | 'waiting'
+ | 'active'
+ | 'completed'
+ | 'failed'
+ | 'delayed'
+ | 'not_found';
+ progress: {
+ current: number;
+ total: number;
+ promptText?: string;
+ model?: string;
+ region?: string;
+ platform?: string;
+ } | null;
+ result: { resultCount: number } | null;
+ failedReason: string | null;
+}
+
+/**
+ * Poll a tracking job's status from the aeo-server.
+ */
+export async function getJobStatus(jobId: string): Promise<TrackingJobStatus> {
+ const supabase = await createClient();
+ const {
+ data: { session },
+ } = await supabase.auth.getSession();
+ if (!session) throw new Error('Not authenticated');
+
+ const serverUrl = process.env.NEXT_PUBLIC_API_URL || 'http://localhost';
+
+ const controller = new AbortController();
+ const timeout = setTimeout(() => controller.abort(), 10_000);
+
+ try {
+ const res = await fetch(`${serverUrl}/api/tracking/job/${jobId}`, {
+ headers: { Authorization: `Bearer ${session.access_token}` },
+ signal: controller.signal,
+ });
+
+ if (!res.ok) {
+ return {
+ status: 'not_found',
+ progress: null,
+ result: null,
+ failedReason: null,
+ };
+ }
+
+ const data = await res.json();
+ return {
+ status: data.status ?? 'not_found',
+ progress:
+ data.progress &&
+ typeof data.progress === 'object' &&
+ data.progress.total
+ ? data.progress
+ : null,
+ result: data.result ?? null,
+ failedReason: data.failedReason ?? null,
+ };
+ } catch {
+ return {
+ status: 'not_found',
+ progress: null,
+ result: null,
+ failedReason: null,
+ };
+ } finally {
+ clearTimeout(timeout);
+ }
+}
+
+/**
+ * Cancel/stop an active tracking job.
+ */
+export async function cancelTrackingJob(jobId: string): Promise<void> {
+ const supabase = await createClient();
+ const {
+ data: { session },
+ } = await supabase.auth.getSession();
+ if (!session) throw new Error('Not authenticated');
+
+ const serverUrl = process.env.NEXT_PUBLIC_API_URL || 'http://localhost';
+
+ await fetch(`${serverUrl}/api/tracking/job/${jobId}`, {
+ method: 'DELETE',
+ headers: { Authorization: `Bearer ${session.access_token}` },
+ });
+}
+
+export interface PromptVisibilitySummary {
+ avgVisibility: number;
+ totalMentions: number;
+ runs: number;
+ lastRunAt: string;
+}
+
+/**
+ * Aggregate visibility + mention stats per prompt for a brand, over the
+ * last N days (default 30). Used by the All Prompts tab to show a quick
+ * health column next to each prompt.
+ *
+ * Returns a map keyed by prompt_id. Prompts without any runs in the window
+ * simply won't appear in the map (callers should render "—").
+ */
+export async function getPromptVisibilitySummaries(
+ brandId: string,
+ opts?: { days?: number },
+): Promise<Record<string, PromptVisibilitySummary>> {
+ const supabase = await createClient();
+ const days = opts?.days ?? 30;
+ const since = new Date(Date.now() - days * 24 * 60 * 60 * 1000).toISOString();
+
+ const { data, error } = await supabase
+ .from('prompt_results')
+ .select('prompt_id, visibility_score, mention_count, created_at')
+ .eq('brand_id', brandId)
+ .gte('created_at', since);
+
+ if (error) throw new Error(error.message);
+
+ const acc: Record<
+ string,
+ { sumVis: number; sumMentions: number; runs: number; lastRunAt: string }
+ > = {};
+
+ for (const r of (data ?? []) as Record<string, unknown>[]) {
+ const pid = r.prompt_id as string;
+ if (!pid) continue;
+ const vis = (r.visibility_score as number) ?? 0;
+ const mentions = (r.mention_count as number) ?? 0;
+ const createdAt = r.created_at as string;
+ const existing = acc[pid];
+ if (existing) {
+ existing.sumVis += vis;
+ existing.sumMentions += mentions;
+ existing.runs += 1;
+ if (createdAt > existing.lastRunAt) existing.lastRunAt = createdAt;
+ } else {
+ acc[pid] = {
+ sumVis: vis,
+ sumMentions: mentions,
+ runs: 1,
+ lastRunAt: createdAt,
+ };
+ }
+ }
+
+ const result: Record<string, PromptVisibilitySummary> = {};
+ for (const [pid, v] of Object.entries(acc)) {
+ result[pid] = {
+ avgVisibility: v.runs > 0 ? v.sumVis / v.runs : 0,
+ totalMentions: v.sumMentions,
+ runs: v.runs,
+ lastRunAt: v.lastRunAt,
+ };
+ }
+ return result;
+}
+
+/**
+ * Fetch active prompts for a brand (for the prompt selector).
+ */
+export async function getBrandPrompts(
+ brandId: string,
+): Promise<
+ { id: string; text: string; category?: string; platforms: string[] }[]
+> {
+ const supabase = await createClient();
+
+ const { data: promptSets } = await supabase
+ .from('prompt_sets')
+ .select('id')
+ .eq('brand_id', brandId);
+
+ if (!promptSets || promptSets.length === 0) return [];
+
+ const setIds = promptSets.map((s) => s.id);
+
+ const { data: prompts, error } = await supabase
+ .from('prompts')
+ .select('id, text, category, platforms')
+ .in('prompt_set_id', setIds)
+ .eq('is_active', true)
+ .order('created_at', { ascending: false });
+
+ if (error) throw new Error(error.message);
+
+ return (prompts ?? []).map((p) => ({
+ id: p.id as string,
+ text: p.text as string,
+ category: (p.category as string | null) ?? undefined,
+ platforms: (p.platforms as string[]) ?? [],
+ }));
+}
+
+export interface CompetitorComparisonEntry {
+ name: string;
+ avgVisibilityScore: number;
+ /**
+ * Percentage change of the average visibility score versus the previous
+ * comparable window (e.g. last 7 days vs the 7 days before that).
+ * `null` when there is no comparable previous-period value.
+ */
+ change: number | null;
+ totalMentions: number;
+ totalCitations: number;
+ resultCount: number;
+ isOwnBrand: boolean;
+}
+
+export interface ProviderComparisonRow {
+ provider: string;
+ [brandName: string]: string | number;
+}
+
+export interface CompetitorComparisonData {
+ brands: CompetitorComparisonEntry[];
+ providerRows: ProviderComparisonRow[];
+}
+
+const MODEL_TO_PROVIDER: Record<string, string> = {
+ 'gpt-5-chat-latest': 'ChatGPT',
+ 'gpt-5-mini': 'ChatGPT',
+ 'gpt-4o': 'ChatGPT',
+ 'claude-sonnet-4-6': 'Claude',
+ 'claude-opus-4-6': 'Claude',
+ 'gemini-2.5-pro': 'Gemini',
+ 'gemini-2.5-flash': 'Gemini',
+};
+
+const SCRAPER_PROVIDER: Record<string, string> = {
+ chatgpt: 'ChatGPT',
+ 'chatgpt-web': 'ChatGPT',
+ 'google-aio': 'Google AI Overview',
+ 'google-aimode': 'Google AI Mode',
+ 'copilot-web': 'Microsoft Copilot',
+ 'grok-web': 'Grok',
+ 'perplexity-web': 'Perplexity',
+ 'gemini-web': 'Gemini',
+};
+
+function resolveProvider(
+ modelUsed: string | null | undefined,
+ platform?: string | null,
+): string {
+ if (platform && SCRAPER_PROVIDER[platform]) return SCRAPER_PROVIDER[platform];
+ if (!modelUsed) return 'Unknown';
+ const mapped = MODEL_TO_PROVIDER[modelUsed];
+ if (mapped) return mapped;
+ if (modelUsed.startsWith('gpt-')) return 'ChatGPT';
+ if (modelUsed.startsWith('claude-')) return 'Claude';
+ if (modelUsed.startsWith('gemini-')) return 'Gemini';
+ if (modelUsed.startsWith('sonar')) return 'Perplexity';
+ if (modelUsed.startsWith('grok')) return 'Grok';
+ return modelUsed;
+}
+
+/**
+ * Aggregate competitor comparison data from prompt results.
+ * Returns both flat brand scores and per-provider breakdown.
+ */
+export async function getCompetitorComparison(
+ brandId: string,
+ opts?: {
+ model?: string;
+ region?: string;
+ dateFrom?: string;
+ dateTo?: string;
+ topicId?: string;
+ },
+): Promise<CompetitorComparisonData> {
+ const supabase = await createClient();
+
+ const { data: brand } = await supabase
+ .from('brands')
+ .select('name')
+ .eq('id', brandId)
+ .single();
+
+ const { query } = await buildResultsQuery(brandId, opts);
+ const { data: results, error } = await query;
+ if (error) throw new Error(error.message);
+
+ const rows = (results ?? []) as Record<string, unknown>[];
+ if (rows.length === 0) return { brands: [], providerRows: [] };
+
+ // --- Current vs previous period for change calculation ---
+ // The displayed avg/totals come from `rows` (respects the selected preset),
+ // but the ↑/↓ delta always compares a fixed "current" window to the window
+ // immediately before it so the arrow reflects recent momentum (mirrors
+ // getInsightsSummary's KPI change logic).
+ let curBrandAvg: number | null = null;
+ let prevBrandAvg: number | null = null;
+ const curCompAvg = new Map<string, number>();
+ const prevCompAvg = new Map<string, number>();
+
+ {
+ let currentFrom: Date;
+ let currentTo: Date;
+
+ if (opts?.dateFrom) {
+ currentFrom = new Date(opts.dateFrom);
+ currentTo = opts.dateTo ? new Date(opts.dateTo) : new Date();
+ } else {
+ currentTo = new Date();
+ currentFrom = new Date();
+ currentFrom.setDate(currentFrom.getDate() - 7);
+ }
+
+ const duration = currentTo.getTime() - currentFrom.getTime();
+ const prevFrom = new Date(currentFrom.getTime() - duration);
+
+ const currentFilterOpts = opts?.dateFrom
+ ? opts
+ : { ...opts, dateFrom: currentFrom.toISOString() };
+
+ const [curRes, prevRes] = await Promise.all([
+ (async () => {
+ const { query: curQuery } = await buildResultsQuery(
+ brandId,
+ currentFilterOpts,
+ );
+ return curQuery;
+ })(),
+ (async () => {
+ const { query: prevQuery } = await buildResultsQuery(brandId, {
+ ...opts,
+ dateFrom: prevFrom.toISOString(),
+ dateTo: currentFrom.toISOString(),
+ });
+ return prevQuery;
+ })(),
+ ]);
+
+ const curRows = (curRes.data ?? []) as Record<string, unknown>[];
+ const prevRows = (prevRes.data ?? []) as Record<string, unknown>[];
+
+ if (curRows.length > 0) {
+ const curTotal = curRows.reduce(
+ (s, r) => s + (r.visibility_score as number),
+ 0,
+ );
+ curBrandAvg = curTotal / curRows.length;
+
+ const curCompMap = new Map<
+ string,
+ { totalScore: number; count: number }
+ >();
+ for (const row of curRows) {
+ const mentions =
+ (row.competitor_mentions as CompetitorMention[] | null) ?? [];
+ for (const cm of mentions) {
+ const ex = curCompMap.get(cm.competitor_id) ?? {
+ totalScore: 0,
+ count: 0,
+ };
+ ex.totalScore += cm.visibility_score;
+ ex.count += 1;
+ curCompMap.set(cm.competitor_id, ex);
+ }
+ }
+ for (const [id, d] of curCompMap) {
+ curCompAvg.set(id, d.totalScore / d.count);
+ }
+ }
+
+ if (prevRows.length > 0) {
+ const prevTotal = prevRows.reduce(
+ (s, r) => s + (r.visibility_score as number),
+ 0,
+ );
+ prevBrandAvg = prevTotal / prevRows.length;
+
+ const prevCompMap = new Map<
+ string,
+ { totalScore: number; count: number }
+ >();
+ for (const row of prevRows) {
+ const mentions =
+ (row.competitor_mentions as CompetitorMention[] | null) ?? [];
+ for (const cm of mentions) {
+ const ex = prevCompMap.get(cm.competitor_id) ?? {
+ totalScore: 0,
+ count: 0,
+ };
+ ex.totalScore += cm.visibility_score;
+ ex.count += 1;
+ prevCompMap.set(cm.competitor_id, ex);
+ }
+ }
+ for (const [id, d] of prevCompMap) {
+ prevCompAvg.set(id, d.totalScore / d.count);
+ }
+ }
+ }
+
+ const brandName = (brand?.name as string) ?? 'Your Brand';
+
+ // --- Flat brand-level aggregates ---
+ const brandTotalScore = rows.reduce(
+ (s, r) => s + (r.visibility_score as number),
+ 0,
+ );
+ const brandTotalMentions = rows.reduce(
+ (s, r) => s + (r.mention_count as number),
+ 0,
+ );
+ const brandTotalCitations = rows.reduce(
+ (s, r) => s + (r.citation_count as number),
+ 0,
+ );
+ const brandAvg = Math.round(brandTotalScore / rows.length);
+
+ // Percentage change relative to the previous-period value.
+ // Null when no comparable previous value exists (or growth from 0 → x is undefined).
+ const pctChange = (
+ cur: number | null,
+ prev: number | null,
+ ): number | null => {
+ if (cur === null || prev === null) return null;
+ if (prev === 0) return cur === 0 ? 0 : null;
+ return Math.round(((cur - prev) / prev) * 1000) / 10;
+ };
+
+ const entries: CompetitorComparisonEntry[] = [
+ {
+ name: brandName,
+ avgVisibilityScore: brandAvg,
+ change: pctChange(curBrandAvg, prevBrandAvg),
+ totalMentions: brandTotalMentions,
+ totalCitations: brandTotalCitations,
+ resultCount: rows.length,
+ isOwnBrand: true,
+ },
+ ];
+
+ const compMap = new Map<
+ string,
+ {
+ id: string;
+ name: string;
+ totalScore: number;
+ totalMentions: number;
+ totalCitations: number;
+ count: number;
+ }
+ >();
+
+ for (const row of rows) {
+ const mentions =
+ (row.competitor_mentions as CompetitorMention[] | null) ?? [];
+ for (const cm of mentions) {
+ const existing = compMap.get(cm.competitor_id) ?? {
+ id: cm.competitor_id,
+ name: cm.name,
+ totalScore: 0,
+ totalMentions: 0,
+ totalCitations: 0,
+ count: 0,
+ };
+ existing.totalScore += cm.visibility_score;
+ existing.totalMentions += cm.mention_count;
+ existing.totalCitations += cm.citation_count;
+ existing.count += 1;
+ compMap.set(cm.competitor_id, existing);
+ }
+ }
+
+ for (const [, data] of compMap) {
+ const avg = Math.round(data.totalScore / data.count);
+ const cur = curCompAvg.get(data.id);
+ const prev = prevCompAvg.get(data.id);
+ entries.push({
+ name: data.name,
+ avgVisibilityScore: avg,
+ change: pctChange(cur ?? null, prev ?? null),
+ totalMentions: data.totalMentions,
+ totalCitations: data.totalCitations,
+ resultCount: data.count,
+ isOwnBrand: false,
+ });
+ }
+
+ entries.sort((a, b) => b.avgVisibilityScore - a.avgVisibilityScore);
+
+ // --- Per-provider breakdown ---
+ // brand: { provider -> { totalScore, count } }
+ type Agg = { totalScore: number; count: number };
+ const brandByProvider = new Map<string, Agg>();
+ const compByProvider = new Map<string, Map<string, Agg>>(); // compName -> provider -> agg
+
+ for (const row of rows) {
+ const provider = resolveProvider(
+ row.model_used as string | null,
+ row.platform as string | null,
+ );
+ const score = row.visibility_score as number;
+
+ const bp = brandByProvider.get(provider) ?? { totalScore: 0, count: 0 };
+ bp.totalScore += score;
+ bp.count += 1;
+ brandByProvider.set(provider, bp);
+
+ const mentions =
+ (row.competitor_mentions as CompetitorMention[] | null) ?? [];
+ for (const cm of mentions) {
+ if (!compByProvider.has(cm.name)) compByProvider.set(cm.name, new Map());
+ const pm = compByProvider.get(cm.name)!;
+ const cp = pm.get(provider) ?? { totalScore: 0, count: 0 };
+ cp.totalScore += cm.visibility_score;
+ cp.count += 1;
+ pm.set(provider, cp);
+ }
+ }
+
+ const allProviders = new Set<string>();
+ for (const p of brandByProvider.keys()) allProviders.add(p);
+ for (const pm of compByProvider.values()) {
+ for (const p of pm.keys()) allProviders.add(p);
+ }
+
+ const providerRows: ProviderComparisonRow[] = [...allProviders]
+ .sort()
+ .map((provider) => {
+ const row: ProviderComparisonRow = { provider };
+
+ const bp = brandByProvider.get(provider);
+ row[brandName] = bp ? Math.round(bp.totalScore / bp.count) : 0;
+
+ for (const [compName, pm] of compByProvider) {
+ const cp = pm.get(provider);
+ row[compName] = cp ? Math.round(cp.totalScore / cp.count) : 0;
+ }
+
+ return row;
+ });
+
+ return { brands: entries, providerRows };
+}
+
+// ─── Share of Voice ─────────────────────────────────────────────────────────
+
+export interface SoVByPlatform {
+ provider: string;
+ brandMentions: number;
+ competitorMentions: number;
+ sov: number;
+}
+
+export interface SoVTrendPoint {
+ date: string;
+ brandSov: number;
+ competitorSov: number;
+}
+
+export interface ShareOfVoiceData {
+ overallSov: number;
+ overallSovChange: number | null;
+ byPlatform: SoVByPlatform[];
+ trend: SoVTrendPoint[];
+}
+
+export async function getShareOfVoiceData(
+ brandId: string,
+ opts?: {
+ model?: string;
+ region?: string;
+ dateFrom?: string;
+ dateTo?: string;
+ topicId?: string;
+ },
+): Promise<ShareOfVoiceData> {
+ const { query } = await buildResultsQuery(brandId, opts);
+ const { data: results, error } = await query;
+ if (error) throw new Error(error.message);
+
+ const rows = (results ?? []) as Record<string, unknown>[];
+
+ if (rows.length === 0) {
+ return { overallSov: 0, overallSovChange: null, byPlatform: [], trend: [] };
+ }
+
+ // --- Overall + by-platform aggregation ---
+ let totalBrandMentions = 0;
+ let totalCompMentions = 0;
+
+ type ProviderAgg = { brandMentions: number; competitorMentions: number };
+ const providerMap = new Map<string, ProviderAgg>();
+
+ type DayAgg = { brandMentions: number; competitorMentions: number };
+ const dayMap = new Map<string, DayAgg>();
+
+ for (const row of rows) {
+ const provider = resolveProvider(
+ row.model_used as string | null,
+ row.platform as string | null,
+ );
+ const brandM = row.mention_count as number;
+ totalBrandMentions += brandM;
+
+ const pa = providerMap.get(provider) ?? {
+ brandMentions: 0,
+ competitorMentions: 0,
+ };
+ pa.brandMentions += brandM;
+
+ const mentions =
+ (row.competitor_mentions as CompetitorMention[] | null) ?? [];
+ let rowCompMentions = 0;
+ for (const cm of mentions) {
+ rowCompMentions += cm.mention_count;
+ }
+ totalCompMentions += rowCompMentions;
+ pa.competitorMentions += rowCompMentions;
+ providerMap.set(provider, pa);
+
+ // Daily aggregation
+ const day = (row.created_at as string).slice(0, 10);
+ const da = dayMap.get(day) ?? { brandMentions: 0, competitorMentions: 0 };
+ da.brandMentions += brandM;
+ da.competitorMentions += rowCompMentions;
+ dayMap.set(day, da);
+ }
+
+ const totalAll = totalBrandMentions + totalCompMentions;
+ const overallSov =
+ totalAll > 0 ? Math.round((totalBrandMentions / totalAll) * 1000) / 10 : 0;
+
+ // --- By platform ---
+ const byPlatform: SoVByPlatform[] = [...providerMap.entries()]
+ .map(([provider, agg]) => {
+ const total = agg.brandMentions + agg.competitorMentions;
+ return {
+ provider,
+ brandMentions: agg.brandMentions,
+ competitorMentions: agg.competitorMentions,
+ sov:
+ total > 0 ? Math.round((agg.brandMentions / total) * 1000) / 10 : 0,
+ };
+ })
+ .sort((a, b) => b.sov - a.sov);
+
+ // --- Trend ---
+ const sortedDays = [...dayMap.keys()].sort();
+ const trend: SoVTrendPoint[] = sortedDays.map((day) => {
+ const d = dayMap.get(day)!;
+ const total = d.brandMentions + d.competitorMentions;
+ const brandSov =
+ total > 0 ? Math.round((d.brandMentions / total) * 1000) / 10 : 0;
+ const competitorSov =
+ total > 0 ? Math.round((d.competitorMentions / total) * 1000) / 10 : 0;
+ const dateObj = new Date(day + 'T00:00:00');
+ const label = dateObj.toLocaleDateString('en-US', {
+ month: 'short',
+ day: 'numeric',
+ });
+ return { date: label, brandSov, competitorSov };
+ });
+
+ // --- Previous period delta ---
+ let overallSovChange: number | null = null;
+
+ {
+ let currentFrom: Date;
+ let currentTo: Date;
+
+ if (opts?.dateFrom) {
+ currentFrom = new Date(opts.dateFrom);
+ currentTo = opts.dateTo ? new Date(opts.dateTo) : new Date();
+ } else {
+ currentTo = new Date();
+ currentFrom = new Date();
+ currentFrom.setDate(currentFrom.getDate() - 7);
+ }
+
+ const duration = currentTo.getTime() - currentFrom.getTime();
+ const prevFrom = new Date(currentFrom.getTime() - duration);
+
+ const { query: prevQuery } = await buildResultsQuery(brandId, {
+ ...opts,
+ dateFrom: prevFrom.toISOString(),
+ dateTo: currentFrom.toISOString(),
+ });
+
+ const { data: prevResults } = await prevQuery;
+ const prevRows = (prevResults ?? []) as Record<string, unknown>[];
+
+ if (prevRows.length > 0) {
+ let prevBrandM = 0;
+ let prevCompM = 0;
+ for (const row of prevRows) {
+ prevBrandM += row.mention_count as number;
+ const cms =
+ (row.competitor_mentions as CompetitorMention[] | null) ?? [];
+ for (const cm of cms) prevCompM += cm.mention_count;
+ }
+ const prevTotal = prevBrandM + prevCompM;
+ const prevSov =
+ prevTotal > 0 ? Math.round((prevBrandM / prevTotal) * 1000) / 10 : 0;
+ overallSovChange = Math.round((overallSov - prevSov) * 10) / 10;
+ }
+ }
+
+ return { overallSov, overallSovChange, byPlatform, trend };
+}
+
+export interface VisibilityTrendPoint {
+ date: string;
+ score: number;
+ competitors: number | null;
+}
+
+/**
+ * Fetch daily visibility score trend for a brand (and avg competitor score).
+ * Queries ALL prompt_results (not deduplicated) to build a time-series.
+ */
+export async function getVisibilityTrend(
+ brandId: string,
+ opts?: {
+ model?: string;
+ region?: string;
+ dateFrom?: string;
+ dateTo?: string;
+ topicId?: string;
+ },
+): Promise<VisibilityTrendPoint[]> {
+ const supabase = await createClient();
+
+ let query = supabase
+ .from('prompt_results')
+ .select('created_at, visibility_score, competitor_mentions')
+ .eq('brand_id', brandId)
+ .order('created_at', { ascending: true });
+
+ if (opts?.model) query = query.eq('model_used', opts.model);
+ if (opts?.region) query = query.eq('region', opts.region);
+ if (opts?.dateFrom) query = query.gte('created_at', opts.dateFrom);
+ if (opts?.dateTo) query = query.lte('created_at', opts.dateTo);
+
+ if (opts?.topicId) {
+ const { data: topicPrompts } = await supabase
+ .from('prompts')
+ .select('id')
+ .eq('topic_id', opts.topicId);
+ const ids = ((topicPrompts ?? []) as { id: string }[]).map((p) => p.id);
+ query = query.in(
+ 'prompt_id',
+ ids.length > 0 ? ids : ['00000000-0000-0000-0000-000000000000'],
+ );
+ }
+
+ const { data, error } = await query;
+ if (error) throw new Error(error.message);
+ if (!data || data.length === 0) return [];
+
+ const rows = data as Record<string, unknown>[];
+
+ // Group by day (YYYY-MM-DD)
+ const dayMap = new Map<
+ string,
+ {
+ totalScore: number;
+ count: number;
+ compTotalScore: number;
+ compCount: number;
+ }
+ >();
+
+ for (const row of rows) {
+ const day = (row.created_at as string).slice(0, 10);
+ const entry = dayMap.get(day) ?? {
+ totalScore: 0,
+ count: 0,
+ compTotalScore: 0,
+ compCount: 0,
+ };
+ entry.totalScore += row.visibility_score as number;
+ entry.count += 1;
+
+ const mentions =
+ (row.competitor_mentions as CompetitorMention[] | null) ?? [];
+ for (const cm of mentions) {
+ entry.compTotalScore += cm.visibility_score;
+ entry.compCount += 1;
+ }
+
+ dayMap.set(day, entry);
+ }
+
+ const points: VisibilityTrendPoint[] = [];
+ const sortedDays = [...dayMap.keys()].sort();
+
+ for (const day of sortedDays) {
+ const d = dayMap.get(day)!;
+ const dateObj = new Date(day + 'T00:00:00');
+ const label = dateObj.toLocaleDateString('en-US', {
+ month: 'short',
+ day: 'numeric',
+ });
+
+ points.push({
+ date: label,
+ score: Math.round(d.totalScore / d.count),
+ competitors:
+ d.compCount > 0 ? Math.round(d.compTotalScore / d.compCount) : null,
+ });
+ }
+
+ return points;
+}
+
+// ─── Head-to-Head Competitor Comparison ─────────────────────────────────────
+
+export interface HeadToHeadPromptRow {
+ resultId: string;
+ promptId: string;
+ promptText: string;
+ promptCategory?: string;
+ brandScore: number;
+ competitorScore: number;
+ diff: number;
+ platform: string;
+ modelUsed: string;
+ region?: string;
+ response: string;
+ citations: Citation[];
+ sentiment: Sentiment;
+ brandMentionCount: number;
+ brandCitationCount: number;
+ compMentionCount: number;
+ compCitationCount: number;
+ createdAt: string;
+}
+
+export interface HeadToHeadPlatformRow {
+ platform: string;
+ brandScore: number;
+ competitorScore: number;
+ diff: number;
+}
+
+export interface HeadToHeadData {
+ promptRows: HeadToHeadPromptRow[];
+ platformRows: HeadToHeadPlatformRow[];
+ brandAvg: number;
+ competitorAvg: number;
+ gaps: HeadToHeadPromptRow[];
+ strengths: HeadToHeadPromptRow[];
+}
+
+/**
+ * Compare a brand vs a single competitor prompt-by-prompt.
+ * Returns per-prompt scores, per-platform breakdown, gaps and strengths.
+ */
+export async function getHeadToHeadComparison(
+ brandId: string,
+ competitorId: string,
+): Promise<HeadToHeadData> {
+ const supabase = await createClient();
+
+ const { data: results, error } = await supabase
+ .from('prompt_results')
+ .select('*')
+ .eq('brand_id', brandId)
+ .order('created_at', { ascending: false });
+
+ if (error) throw new Error(error.message);
+ const rows = (results ?? []) as Record<string, unknown>[];
+ if (rows.length === 0) {
+ return {
+ promptRows: [],
+ platformRows: [],
+ brandAvg: 0,
+ competitorAvg: 0,
+ gaps: [],
+ strengths: [],
+ };
+ }
+
+ const promptIds = [...new Set(rows.map((r) => r.prompt_id as string))];
+ const { data: promptData } =
+ promptIds.length > 0
+ ? await supabase
+ .from('prompts')
+ .select('id, text, category')
+ .in('id', promptIds)
+ : { data: [] };
+ const promptMap = new Map(
+ (promptData ?? []).map((p) => [
+ p.id,
+ {
+ text: p.text as string,
+ category: (p.category as string | null) ?? undefined,
+ },
+ ]),
+ );
+
+ const promptRows: HeadToHeadPromptRow[] = [];
+
+ type PlatAgg = {
+ brandTotal: number;
+ brandCount: number;
+ compTotal: number;
+ compCount: number;
+ };
+ const platMap = new Map<string, PlatAgg>();
+
+ let brandTotalScore = 0;
+ let brandCount = 0;
+ let compTotalScore = 0;
+ let compCount = 0;
+
+ for (const row of rows) {
+ const brandScore = row.visibility_score as number;
+ const platform = resolveProvider(
+ row.model_used as string | null,
+ row.platform as string | null,
+ );
+ const mentions =
+ (row.competitor_mentions as CompetitorMention[] | null) ?? [];
+ const comp = mentions.find((cm) => cm.competitor_id === competitorId);
+ const compScore = comp?.visibility_score ?? 0;
+
+ const pm = promptMap.get(row.prompt_id as string);
+
+ const modelUsed = (row.model_used as string | null) ?? '';
+
+ promptRows.push({
+ resultId: row.id as string,
+ promptId: row.prompt_id as string,
+ promptText: pm?.text ?? '',
+ promptCategory: pm?.category,
+ brandScore,
+ competitorScore: compScore,
+ diff: brandScore - compScore,
+ platform,
+ modelUsed,
+ region: (row.region as string | null) ?? undefined,
+ response: (row.response as string) ?? '',
+ citations: (row.citations as Citation[]) ?? [],
+ sentiment: (row.sentiment as Sentiment) ?? 'neutral',
+ brandMentionCount: row.mention_count as number,
+ brandCitationCount: row.citation_count as number,
+ compMentionCount: comp?.mention_count ?? 0,
+ compCitationCount: comp?.citation_count ?? 0,
+ createdAt: row.created_at as string,
+ });
+
+ brandTotalScore += brandScore;
+ brandCount += 1;
+ if (comp) {
+ compTotalScore += compScore;
+ compCount += 1;
+ }
+
+ const pa = platMap.get(platform) ?? {
+ brandTotal: 0,
+ brandCount: 0,
+ compTotal: 0,
+ compCount: 0,
+ };
+ pa.brandTotal += brandScore;
+ pa.brandCount += 1;
+ if (comp) {
+ pa.compTotal += compScore;
+ pa.compCount += 1;
+ }
+ platMap.set(platform, pa);
+ }
+
+ const platformRows: HeadToHeadPlatformRow[] = [...platMap.entries()]
+ .map(([platform, a]) => {
+ const bs = a.brandCount > 0 ? Math.round(a.brandTotal / a.brandCount) : 0;
+ const cs = a.compCount > 0 ? Math.round(a.compTotal / a.compCount) : 0;
+ return { platform, brandScore: bs, competitorScore: cs, diff: bs - cs };
+ })
+ .sort((a, b) => a.platform.localeCompare(b.platform));
+
+ const brandAvg =
+ brandCount > 0 ? Math.round(brandTotalScore / brandCount) : 0;
+ const competitorAvg =
+ compCount > 0 ? Math.round(compTotalScore / compCount) : 0;
+
+ const sorted = [...promptRows].sort((a, b) => a.diff - b.diff);
+ const gaps = sorted.filter((r) => r.diff < 0).slice(0, 10);
+ const strengths = sorted
+ .filter((r) => r.diff > 0)
+ .reverse()
+ .slice(0, 10);
+
+ return { promptRows, platformRows, brandAvg, competitorAvg, gaps, strengths };
+}
+
+// ─── Insights Metric Breakdown (Root-Cause Drilldown) ─────────────────────────
+
+export type BreakdownMetric = 'mentions' | 'visibility';
+
+/**
+ * Human-readable platform/scraper slugs used across the Insights UI.
+ * Kept in sync with the mapping in insights/page.tsx so drill-down narratives
+ * read like the rest of the dashboard ("Gemini" instead of "gemini-web").
+ */
+const BREAKDOWN_PLATFORM_LABELS: Record<string, string> = {
+ chatgpt: 'ChatGPT',
+ 'chatgpt-web': 'ChatGPT',
+ gemini: 'Gemini',
+ 'gemini-web': 'Google Gemini',
+ perplexity: 'Perplexity',
+ 'perplexity-web': 'Perplexity',
+ claude: 'Claude',
+ grok: 'Grok',
+ 'grok-web': 'Grok',
+ copilot: 'Copilot',
+ 'copilot-web': 'Microsoft Copilot',
+ 'meta-ai': 'Meta AI',
+ 'google-aio': 'Google AI Overview',
+ 'google-ai-overviews': 'Google AI Overview',
+ 'google-aimode': 'Google AI Mode',
+ 'google-ai-mode': 'Google AI Mode',
+};
+
+function formatPlatformLabel(slug: string): string {
+ return BREAKDOWN_PLATFORM_LABELS[slug] ?? slug;
+}
+
+export interface BreakdownRow {
+ /** Unique identifier for the row: prompt_id / platform name / topic_id. */
+ id: string;
+ /** Display label: prompt text / platform name / topic name. */
+ label: string;
+ /** Optional secondary label (e.g. topic name for a prompt). */
+ sublabel?: string;
+ /** Metric value in the current window. */
+ cur: number;
+ /** Metric value in the previous window. */
+ prev: number;
+ /** Absolute change (cur - prev). */
+ delta: number;
+ /** Percentage change. Null when previous is zero (use delta instead). */
+ deltaPct: number | null;
+ /** Number of result rows that contributed in the current window. */
+ curRuns: number;
+ /** Number of result rows that contributed in the previous window. */
+ prevRuns: number;
+}
+
+export interface InsightsBreakdown {
+ metric: BreakdownMetric;
+ curTotal: number;
+ prevTotal: number;
+ delta: number;
+ deltaPct: number | null;
+ /** Number of full calendar days covered by each comparison window. */
+ windowDays: number;
+ byPrompt: BreakdownRow[];
+ byPlatform: BreakdownRow[];
+ byTopic: BreakdownRow[];
+ /** One-line rule-based root-cause summary for the drop/rise. */
+ rootCause: string;
+}
+
+/** Aggregate a metric over a set of raw prompt_results rows. */
+function aggregateMetric(
+ rows: Array<{
+ mention_count: number;
+ visibility_score: number;
+ }>,
+ metric: BreakdownMetric,
+): { value: number; runs: number } {
+ if (metric === 'visibility') {
+ if (rows.length === 0) return { value: 0, runs: 0 };
+ const sum = rows.reduce((s, r) => s + (r.visibility_score ?? 0), 0);
+ return {
+ value: Math.round((sum / rows.length) * 10) / 10,
+ runs: rows.length,
+ };
+ }
+ const value = rows.reduce((s, r) => s + (r.mention_count ?? 0), 0);
+ return { value, runs: rows.length };
+}
+
+function computeDelta(
+ cur: number,
+ prev: number,
+ metric: BreakdownMetric,
+): { delta: number; deltaPct: number | null } {
+ if (metric === 'visibility') {
+ return {
+ delta: Math.round((cur - prev) * 10) / 10,
+ deltaPct: null,
+ };
+ }
+ const delta = cur - prev;
+ const deltaPct = prev > 0 ? Math.round((delta / prev) * 100) : null;
+ return { delta, deltaPct };
+}
+
+/**
+ * Returns a per-prompt / per-platform / per-topic breakdown comparing the
+ * current window with the previous window of equal duration.
+ *
+ * Used by the Insights KPI drill-down Sheet to surface which entities drove a
+ * metric change (e.g. "Mentions dropped 12% because prompt X lost 84 mentions
+ * on ChatGPT"). Windows mirror `getInsightsSummary` — when `dateFrom` is
+ * provided the current window spans [dateFrom, dateTo ?? now] and the previous
+ * window has the same length immediately before; otherwise both are 7 days.
+ */
+export async function getInsightsBreakdown(
+ brandId: string,
+ metric: BreakdownMetric,
+ opts?: {
+ model?: string;
+ region?: string;
+ dateFrom?: string;
+ dateTo?: string;
+ topicId?: string;
+ },
+): Promise<InsightsBreakdown> {
+ const supabase = await createClient();
+
+ let currentFrom: Date;
+ let currentTo: Date;
+
+ if (opts?.dateFrom) {
+ currentFrom = new Date(opts.dateFrom);
+ currentTo = opts.dateTo ? new Date(opts.dateTo) : new Date();
+ } else {
+ currentTo = new Date();
+ currentFrom = new Date();
+ currentFrom.setDate(currentFrom.getDate() - 7);
+ }
+
+ const duration = currentTo.getTime() - currentFrom.getTime();
+ const prevFrom = new Date(currentFrom.getTime() - duration);
+ const prevTo = currentFrom;
+ const windowDays = Math.max(1, Math.round(duration / (24 * 60 * 60 * 1000)));
+
+ const { query: curQuery } = await buildResultsQuery(brandId, {
+ ...opts,
+ dateFrom: currentFrom.toISOString(),
+ dateTo: currentTo.toISOString(),
+ });
+ const { query: prevQuery } = await buildResultsQuery(brandId, {
+ ...opts,
+ dateFrom: prevFrom.toISOString(),
+ dateTo: prevTo.toISOString(),
+ });
+
+ const [curRes, prevRes] = await Promise.all([curQuery, prevQuery]);
+ if (curRes.error) throw new Error(curRes.error.message);
+ if (prevRes.error) throw new Error(prevRes.error.message);
+
+ type Row = {
+ prompt_id: string;
+ platform: string;
+ mention_count: number;
+ visibility_score: number;
+ };
+ const curRows = (curRes.data ?? []) as unknown as Row[];
+ const prevRows = (prevRes.data ?? []) as unknown as Row[];
+
+ const allPromptIds = new Set<string>();
+ for (const r of curRows) allPromptIds.add(r.prompt_id);
+ for (const r of prevRows) allPromptIds.add(r.prompt_id);
+
+ // Resolve prompt text + topic for every participating prompt.
+ const { data: promptRowsRaw } =
+ allPromptIds.size > 0
+ ? await supabase
+ .from('prompts')
+ .select('id, text, topic_id')
+ .in('id', [...allPromptIds])
+ : { data: [] as unknown[] };
+
+ const promptInfo = new Map<
+ string,
+ { text: string; topicId: string | null }
+ >();
+ const topicIds = new Set<string>();
+ for (const p of (promptRowsRaw ?? []) as Array<{
+ id: string;
+ text: string;
+ topic_id: string | null;
+ }>) {
+ promptInfo.set(p.id, { text: p.text, topicId: p.topic_id });
+ if (p.topic_id) topicIds.add(p.topic_id);
+ }
+
+ const { data: topicRowsRaw } =
+ topicIds.size > 0
+ ? await supabase
+ .from('topics')
+ .select('id, name')
+ .in('id', [...topicIds])
+ : { data: [] as unknown[] };
+
+ const topicNameById = new Map<string, string>();
+ for (const t of (topicRowsRaw ?? []) as Array<{ id: string; name: string }>) {
+ topicNameById.set(t.id, t.name);
+ }
+
+ // ─── Group rows by prompt / platform / topic ────────────────────────────────
+ function groupBy<K extends string>(rows: Row[], keyFn: (r: Row) => K) {
+ const m = new Map<K, Row[]>();
+ for (const r of rows) {
+ const k = keyFn(r);
+ const arr = m.get(k) ?? [];
+ arr.push(r);
+ m.set(k, arr);
+ }
+ return m;
+ }
+
+ function mergeKeys<K>(a: Map<K, unknown>, b: Map<K, unknown>): K[] {
+ const s = new Set<K>();
+ for (const k of a.keys()) s.add(k);
+ for (const k of b.keys()) s.add(k);
+ return [...s];
+ }
+
+ function buildRows(
+ curMap: Map<string, Row[]>,
+ prevMap: Map<string, Row[]>,
+ resolver: (key: string) => { id: string; label: string; sublabel?: string },
+ ): BreakdownRow[] {
+ const keys = mergeKeys(curMap, prevMap);
+ const rows: BreakdownRow[] = keys.map((key) => {
+ const curAgg = aggregateMetric(curMap.get(key) ?? [], metric);
+ const prevAgg = aggregateMetric(prevMap.get(key) ?? [], metric);
+ const { delta, deltaPct } = computeDelta(
+ curAgg.value,
+ prevAgg.value,
+ metric,
+ );
+ const { id, label, sublabel } = resolver(key);
+ return {
+ id,
+ label,
+ sublabel,
+ cur: curAgg.value,
+ prev: prevAgg.value,
+ delta,
+ deltaPct,
+ curRuns: curAgg.runs,
+ prevRuns: prevAgg.runs,
+ };
+ });
+ // Sort: biggest drops first, then biggest gains, untouched rows last.
+ rows.sort((a, b) => a.delta - b.delta);
+ return rows;
+ }
+
+ const curByPrompt = groupBy(curRows, (r) => r.prompt_id);
+ const prevByPrompt = groupBy(prevRows, (r) => r.prompt_id);
+ const byPrompt = buildRows(curByPrompt, prevByPrompt, (pid) => {
+ const info = promptInfo.get(pid);
+ const topicName = info?.topicId
+ ? topicNameById.get(info.topicId)
+ : undefined;
+ return {
+ id: pid,
+ label: info?.text ?? 'Unknown prompt',
+ sublabel: topicName,
+ };
+ });
+
+ const curByPlatform = groupBy(curRows, (r) => r.platform);
+ const prevByPlatform = groupBy(prevRows, (r) => r.platform);
+ const byPlatform = buildRows(curByPlatform, prevByPlatform, (plat) => ({
+ id: plat,
+ label: formatPlatformLabel(plat),
+ }));
+
+ const curByTopic = groupBy(curRows, (r) => {
+ const info = promptInfo.get(r.prompt_id);
+ return info?.topicId ?? '__uncategorized__';
+ });
+ const prevByTopic = groupBy(prevRows, (r) => {
+ const info = promptInfo.get(r.prompt_id);
+ return info?.topicId ?? '__uncategorized__';
+ });
+ const byTopic = buildRows(curByTopic, prevByTopic, (tid) => ({
+ id: tid,
+ label:
+ tid === '__uncategorized__'
+ ? 'Uncategorized'
+ : (topicNameById.get(tid) ?? 'Unknown topic'),
+ }));
+
+ // ─── Totals + root-cause summary ────────────────────────────────────────────
+ const curTotalAgg = aggregateMetric(curRows, metric);
+ const prevTotalAgg = aggregateMetric(prevRows, metric);
+ const { delta: totalDelta, deltaPct: totalDeltaPct } = computeDelta(
+ curTotalAgg.value,
+ prevTotalAgg.value,
+ metric,
+ );
+
+ const metricLabel =
+ metric === 'visibility'
+ ? 'Visibility'
+ : metric === 'mentions'
+ ? 'Mentions'
+ : 'Citations';
+
+ const isDrop = totalDelta < 0;
+ const isFlat = totalDelta === 0;
+
+ // Select the biggest contributor in the same direction as the overall change.
+ // `buildRows` sorts ascending by delta so byPrompt[0] is the largest drop and
+ // byPrompt[last] is the largest gain.
+ const topPrompt = isDrop ? byPrompt[0] : byPrompt[byPrompt.length - 1];
+ const topPlatform = isDrop
+ ? byPlatform[0]
+ : byPlatform[byPlatform.length - 1];
+
+ const promptContributes =
+ !!topPrompt && (isDrop ? topPrompt.delta < 0 : topPrompt.delta > 0);
+ const platformContributes =
+ !!topPlatform && (isDrop ? topPlatform.delta < 0 : topPlatform.delta > 0);
+
+ let rootCause: string;
+ if (isFlat) {
+ rootCause = `${metricLabel} held steady vs the previous ${windowDays}-day window.`;
+ } else if (!promptContributes) {
+ const dir = totalDelta > 0 ? 'rose' : 'fell';
+ const magnitude = formatTotalMagnitude(totalDelta, totalDeltaPct, metric);
+ rootCause = `${metricLabel} ${dir} ${magnitude} vs the previous ${windowDays}d — the change is spread evenly across prompts, no single driver.`;
+ } else {
+ const headline = isDrop ? 'Biggest drop' : 'Biggest gain';
+ const promptClause = `"${truncate(topPrompt!.label, 60)}" ${formatContribution(topPrompt!, metric)}`;
+ const platformClause = platformContributes
+ ? ` Top platform ${isDrop ? 'drop' : 'gain'}: ${topPlatform!.label} ${formatContribution(topPlatform!, metric)}.`
+ : '';
+ rootCause = `${headline}: ${promptClause}.${platformClause}`;
+ }
+
+ return {
+ metric,
+ curTotal: curTotalAgg.value,
+ prevTotal: prevTotalAgg.value,
+ delta: totalDelta,
+ deltaPct: totalDeltaPct,
+ windowDays,
+ byPrompt,
+ byPlatform,
+ byTopic,
+ rootCause,
+ };
+}
+
+function truncate(s: string, max: number): string {
+ return s.length > max ? `${s.slice(0, max - 1)}…` : s;
+}
+
+/**
+ * Format a single contributor's delta as a human sentence fragment, e.g.:
+ * - mentions: "lost 84 mentions (−38%)" or "gained 12 mentions"
+ * - citations: "lost 7 citations (−15%)"
+ * - visibility: "dropped 2.1 pts" or "rose 2.1 pts"
+ */
+function formatContribution(
+ row: BreakdownRow,
+ metric: BreakdownMetric,
+): string {
+ const isLoss = row.delta < 0;
+ const abs = Math.abs(row.delta);
+
+ if (metric === 'visibility') {
+ const verb = isLoss ? 'dropped' : 'rose';
+ const value = Math.round(abs * 10) / 10;
+ return `${verb} ${value} pts`;
+ }
+
+ const verb = isLoss ? 'lost' : 'gained';
+ const core = `${verb} ${abs.toLocaleString('en-US')} mentions`;
+ if (row.deltaPct === null) return core;
+ const sign = row.deltaPct < 0 ? '−' : '+';
+ return `${core} (${sign}${Math.abs(row.deltaPct)}%)`;
+}
+
+function formatTotalMagnitude(
+ delta: number,
+ deltaPct: number | null,
+ metric: BreakdownMetric,
+): string {
+ const abs = Math.abs(delta);
+ if (metric === 'visibility') {
+ return `${Math.round(abs * 10) / 10} pts`;
+ }
+ const core = `${abs.toLocaleString('en-US')} mentions`;
+ if (deltaPct === null) return core;
+ const sign = deltaPct < 0 ? '−' : '+';
+ return `${core} (${sign}${Math.abs(deltaPct)}%)`;
+}
diff --git a/web/src/lib/actions/traffic.ts b/web/src/lib/actions/traffic.ts
new file mode 100644
index 000000000..4d0e9b913
--- /dev/null
+++ b/web/src/lib/actions/traffic.ts
@@ -0,0 +1,206 @@
+'use server';
+
+import { createClient } from '@/lib/supabase/server';
+
+export interface TrafficLog {
+ id: string;
+ brandId: string;
+ url: string;
+ referrer: string | null;
+ sourcePlatform: string | null;
+ country: string | null;
+ language: string | null;
+ screen: string | null;
+ createdAt: string;
+}
+
+export interface TrafficSummary {
+ totalVisits: number;
+ totalVisitsPrev: number;
+ platformBreakdown: { platform: string; visits: number; visitsPrev: number }[];
+ topPages: { url: string; visits: number; visitsPrev: number }[];
+}
+
+export interface TrafficTrendPoint {
+ date: string;
+ [platform: string]: string | number;
+}
+
+function mapLogRow(row: Record<string, unknown>): TrafficLog {
+ return {
+ id: row.id as string,
+ brandId: row.brand_id as string,
+ url: row.url as string,
+ referrer: row.referrer as string | null,
+ sourcePlatform: row.source_platform as string | null,
+ country: row.country as string | null,
+ language: row.language as string | null,
+ screen: row.screen as string | null,
+ createdAt: row.created_at as string,
+ };
+}
+
+function getDateRange(days: number): { from: string; to: string; prevFrom: string; prevTo: string } {
+ const now = new Date();
+ const to = now.toISOString();
+ const from = new Date(now.getTime() - days * 86400000).toISOString();
+ const prevTo = from;
+ const prevFrom = new Date(now.getTime() - days * 2 * 86400000).toISOString();
+ return { from, to, prevFrom, prevTo };
+}
+
+export async function getTrafficSummary(
+ brandId: string,
+ days = 7,
+): Promise<TrafficSummary> {
+ const supabase = await createClient();
+ const { from, prevFrom, prevTo } = getDateRange(days);
+
+ // Current period
+ const { data: current } = await supabase
+ .from('ai_traffic_logs')
+ .select('source_platform, url')
+ .eq('brand_id', brandId)
+ .gte('created_at', from);
+
+ // Previous period
+ const { data: previous } = await supabase
+ .from('ai_traffic_logs')
+ .select('source_platform, url')
+ .eq('brand_id', brandId)
+ .gte('created_at', prevFrom)
+ .lt('created_at', prevTo);
+
+ const rows = current ?? [];
+ const prevRows = previous ?? [];
+
+ // Platform breakdown
+ const platformMap = new Map<string, number>();
+ const platformMapPrev = new Map<string, number>();
+
+ for (const r of rows) {
+ const p = (r.source_platform as string) || 'unknown';
+ platformMap.set(p, (platformMap.get(p) ?? 0) + 1);
+ }
+ for (const r of prevRows) {
+ const p = (r.source_platform as string) || 'unknown';
+ platformMapPrev.set(p, (platformMapPrev.get(p) ?? 0) + 1);
+ }
+
+ const allPlatforms = new Set([...platformMap.keys(), ...platformMapPrev.keys()]);
+ const platformBreakdown = Array.from(allPlatforms)
+ .map((platform) => ({
+ platform,
+ visits: platformMap.get(platform) ?? 0,
+ visitsPrev: platformMapPrev.get(platform) ?? 0,
+ }))
+ .sort((a, b) => b.visits - a.visits);
+
+ // Top pages
+ const pageMap = new Map<string, number>();
+ const pageMapPrev = new Map<string, number>();
+
+ for (const r of rows) {
+ const url = r.url as string;
+ try {
+ const path = new URL(url).pathname;
+ pageMap.set(path, (pageMap.get(path) ?? 0) + 1);
+ } catch {
+ pageMap.set(url, (pageMap.get(url) ?? 0) + 1);
+ }
+ }
+ for (const r of prevRows) {
+ const url = r.url as string;
+ try {
+ const path = new URL(url).pathname;
+ pageMapPrev.set(path, (pageMapPrev.get(path) ?? 0) + 1);
+ } catch {
+ pageMapPrev.set(url, (pageMapPrev.get(url) ?? 0) + 1);
+ }
+ }
+
+ const topPages = Array.from(pageMap.entries())
+ .map(([url, visits]) => ({
+ url,
+ visits,
+ visitsPrev: pageMapPrev.get(url) ?? 0,
+ }))
+ .sort((a, b) => b.visits - a.visits)
+ .slice(0, 10);
+
+ return {
+ totalVisits: rows.length,
+ totalVisitsPrev: prevRows.length,
+ platformBreakdown,
+ topPages,
+ };
+}
+
+export async function getTrafficTrend(
+ brandId: string,
+ days = 7,
+): Promise<TrafficTrendPoint[]> {
+ const supabase = await createClient();
+ const from = new Date(Date.now() - days * 86400000).toISOString();
+
+ const { data } = await supabase
+ .from('ai_traffic_logs')
+ .select('source_platform, created_at')
+ .eq('brand_id', brandId)
+ .gte('created_at', from)
+ .order('created_at', { ascending: true });
+
+ const rows = data ?? [];
+
+ // Group by day + platform
+ const dayMap = new Map<string, Map<string, number>>();
+ const allPlatforms = new Set<string>();
+
+ for (const r of rows) {
+ const day = (r.created_at as string).slice(0, 10);
+ const platform = (r.source_platform as string) || 'unknown';
+ allPlatforms.add(platform);
+
+ if (!dayMap.has(day)) dayMap.set(day, new Map());
+ const dm = dayMap.get(day)!;
+ dm.set(platform, (dm.get(platform) ?? 0) + 1);
+ }
+
+ // Fill missing days
+ const result: TrafficTrendPoint[] = [];
+ for (let i = days - 1; i >= 0; i--) {
+ const d = new Date(Date.now() - i * 86400000);
+ const day = d.toISOString().slice(0, 10);
+ const dm = dayMap.get(day);
+ const point: TrafficTrendPoint = { date: day };
+ for (const p of allPlatforms) {
+ point[p] = dm?.get(p) ?? 0;
+ }
+ result.push(point);
+ }
+
+ return result;
+}
+
+export async function getTrafficLogs(
+ brandId: string,
+ opts?: { limit?: number; offset?: number },
+): Promise<{ logs: TrafficLog[]; total: number }> {
+ const supabase = await createClient();
+ const limit = opts?.limit ?? 20;
+ const offset = opts?.offset ?? 0;
+
+ const { data, error, count } = await supabase
+ .from('ai_traffic_logs')
+ .select('*', { count: 'exact' })
+ .eq('brand_id', brandId)
+ .order('created_at', { ascending: false })
+ .range(offset, offset + limit - 1);
+
+ if (error) throw new Error(error.message);
+
+ return {
+ logs: (data ?? []).map((r) => mapLogRow(r as Record<string, unknown>)),
+ total: count ?? 0,
+ };
+}
diff --git a/web/src/lib/actions/volumes.ts b/web/src/lib/actions/volumes.ts
new file mode 100644
index 000000000..7e3b6fd7f
--- /dev/null
+++ b/web/src/lib/actions/volumes.ts
@@ -0,0 +1,132 @@
+'use server';
+
+import { createClient } from '@/lib/supabase/server';
+import type { PromptVolume } from '@/types';
+
+export interface VolumeQuota {
+ used: number;
+ limit: number;
+ remaining: number;
+}
+
+const AEO_SERVER_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost';
+
+/**
+ * Analyze a single prompt's volume via the aeo-server API.
+ * On first call: LLM extracts intent + keywords, then fetches volumes.
+ * On subsequent calls: reuses saved keywords, only refreshes volumes.
+ * Pass force=true to re-generate keywords via LLM.
+ */
+export async function analyzePromptVolume(
+ promptId: string,
+ promptText: string,
+ locationCode?: number,
+ languageCode?: string,
+ force?: boolean,
+): Promise<PromptVolume> {
+ const supabase = await createClient();
+ const { data: { session } } = await supabase.auth.getSession();
+ if (!session) throw new Error('Not authenticated');
+
+ const res = await fetch(`${AEO_SERVER_URL}/api/volumes/analyze`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: `Bearer ${session.access_token}`,
+ },
+ body: JSON.stringify({ promptId, promptText, locationCode, languageCode, force }),
+ });
+
+ if (!res.ok) {
+ const body = await res.json().catch(() => ({}));
+ throw new Error(body.error || `Server error: ${res.status}`);
+ }
+
+ return res.json();
+}
+
+/**
+ * Analyze multiple prompts in batch.
+ * Uses saved keywords when available, calls LLM only for new prompts.
+ * Pass force=true to re-generate all keywords via LLM.
+ */
+export async function analyzePromptVolumesBatch(
+ prompts: { promptId: string; promptText: string }[],
+ locationCode?: number,
+ languageCode?: string,
+ force?: boolean,
+): Promise<{ results: (PromptVolume & { error?: string })[]; remaining?: number }> {
+ const supabase = await createClient();
+ const { data: { session } } = await supabase.auth.getSession();
+ if (!session) throw new Error('Not authenticated');
+
+ const res = await fetch(`${AEO_SERVER_URL}/api/volumes/analyze-batch`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: `Bearer ${session.access_token}`,
+ },
+ body: JSON.stringify({ prompts, locationCode, languageCode, force }),
+ });
+
+ if (!res.ok) {
+ const body = await res.json().catch(() => ({}));
+ throw new Error(body.error || `Server error: ${res.status}`);
+ }
+
+ return res.json();
+}
+
+/**
+ * Refresh Google volumes for all prompts that already have saved keywords.
+ * Does NOT call LLM — only re-fetches DataForSEO volumes using existing keywords.
+ */
+export async function refreshVolumes(
+ brandId: string,
+ locationCode?: number,
+ languageCode?: string,
+): Promise<{ results: PromptVolume[]; refreshed: number; remaining?: number }> {
+ const supabase = await createClient();
+ const { data: { session } } = await supabase.auth.getSession();
+ if (!session) throw new Error('Not authenticated');
+
+ const res = await fetch(`${AEO_SERVER_URL}/api/volumes/refresh`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: `Bearer ${session.access_token}`,
+ },
+ body: JSON.stringify({ brandId, locationCode, languageCode }),
+ });
+
+ if (!res.ok) {
+ const body = await res.json().catch(() => ({}));
+ throw new Error(body.error || `Server error: ${res.status}`);
+ }
+
+ return res.json();
+}
+
+/**
+ * Get all prompt volumes for a brand via the aeo-server API.
+ */
+export async function getPromptVolumes(brandId: string): Promise<{ volumes: PromptVolume[]; quota: VolumeQuota }> {
+ const supabase = await createClient();
+ const { data: { session } } = await supabase.auth.getSession();
+ if (!session) throw new Error('Not authenticated');
+
+ const res = await fetch(`${AEO_SERVER_URL}/api/volumes/brand/${brandId}`, {
+ method: 'GET',
+ headers: {
+ Authorization: `Bearer ${session.access_token}`,
+ },
+ });
+
+ if (!res.ok) {
+ const body = await res.json().catch(() => ({}));
+ throw new Error(body.error || `Server error: ${res.status}`);
+ }
+
+ const data = await res.json();
+ return { volumes: data.volumes, quota: data.quota };
+}
diff --git a/web/src/lib/citations/article-type.ts b/web/src/lib/citations/article-type.ts
new file mode 100644
index 000000000..aa8232e52
--- /dev/null
+++ b/web/src/lib/citations/article-type.ts
@@ -0,0 +1,104 @@
+/**
+ * Best-effort article type classification based on URL path + title keywords.
+ *
+ * Returns `null` when no rule matches. This is a cheap heuristic intended to
+ * fill the "Popular Article Types" column until a proper AI enrichment
+ * pipeline is in place; the result is typically correct for ~60-70% of
+ * listicles, comparisons, and reviews from mainstream publishers.
+ */
+
+export type ArticleType =
+ | 'Topic Guide'
+ | 'How-to Guide'
+ | 'Review'
+ | 'Ranked List'
+ | 'Comparison';
+
+export const ARTICLE_TYPE_LABELS: Record<ArticleType, string> = {
+ 'Topic Guide': 'Topic Guide',
+ 'How-to Guide': 'How-to Guide',
+ Review: 'Review',
+ 'Ranked List': 'Ranked List',
+ Comparison: 'Comparison',
+};
+
+interface Rule {
+ type: ArticleType;
+ patterns: RegExp[];
+}
+
+// Order matters. First match wins — more specific rules (comparison,
+// how-to) come before broader ones (topic guide).
+const RULES: Rule[] = [
+ {
+ type: 'Comparison',
+ patterns: [
+ /[-_/]vs[-_/]/i,
+ /\bvs\.?\b/i,
+ /[-_/]compared[-_/]/i,
+ /\bcompared\b/i,
+ /[-_/]comparison[-_/]/i,
+ /[-_/]head-to-head[-_/]/i,
+ ],
+ },
+ {
+ type: 'How-to Guide',
+ patterns: [
+ /[-_/]how-to[-_/]/i,
+ /^how-to-/i,
+ /[-_/]how-do-i[-_/]/i,
+ /[-_/]tutorial[-_/]/i,
+ /[-_/]step-by-step[-_/]/i,
+ ],
+ },
+ {
+ type: 'Review',
+ patterns: [
+ /[-_/]review[-_/]/i,
+ /[-_/]reviewed[-_/]/i,
+ /[-_/]reviews[-_/]/i,
+ /-review(?:-|\.|$)/i,
+ ],
+ },
+ {
+ type: 'Ranked List',
+ patterns: [
+ /[-_/]best-/i,
+ /^best-/i,
+ /[-_/]top-\d+/i,
+ /[-_/]top\d+/i,
+ /[-_/]ranking[-_/]/i,
+ /[-_/]rankings[-_/]/i,
+ /[-_/]ranked[-_/]/i,
+ ],
+ },
+ {
+ type: 'Topic Guide',
+ patterns: [
+ /[-_/]guide[-_/]/i,
+ /[-_/]guide-to[-_/]/i,
+ /[-_/]complete-guide[-_/]/i,
+ /[-_/]ultimate-guide[-_/]/i,
+ /[-_/]beginners-guide[-_/]/i,
+ /[-_/]explained[-_/]/i,
+ /[-_/]what-is[-_/]/i,
+ ],
+ },
+];
+
+/**
+ * Classify a citation by URL + optional title. Returns null if no rule
+ * matches.
+ */
+export function classifyArticleType(
+ url: string,
+ title?: string,
+): ArticleType | null {
+ const corpus = `${url ?? ''} ${title ?? ''}`;
+ for (const rule of RULES) {
+ if (rule.patterns.some((p) => p.test(corpus))) {
+ return rule.type;
+ }
+ }
+ return null;
+}
diff --git a/web/src/lib/citations/classify.ts b/web/src/lib/citations/classify.ts
new file mode 100644
index 000000000..6a214be91
--- /dev/null
+++ b/web/src/lib/citations/classify.ts
@@ -0,0 +1,223 @@
+/**
+ * Source category classification for citation domains.
+ *
+ * Pure, synchronous heuristic. No network I/O. Order matters: the first
+ * matching rule wins — `you` and `competitor` always take precedence over
+ * content-type categories like `editorial` or `review`.
+ */
+
+export type SourceCategory =
+ | 'you'
+ | 'competitor'
+ | 'forum'
+ | 'social'
+ | 'review'
+ | 'institutional'
+ | 'editorial'
+ | 'other';
+
+export const SOURCE_CATEGORIES: SourceCategory[] = [
+ 'you',
+ 'competitor',
+ 'editorial',
+ 'forum',
+ 'social',
+ 'review',
+ 'institutional',
+ 'other',
+];
+
+export const SOURCE_CATEGORY_LABELS: Record<SourceCategory, string> = {
+ you: 'You',
+ competitor: 'Competitor',
+ editorial: 'Editorial',
+ forum: 'Forum',
+ social: 'Social',
+ review: 'Review',
+ institutional: 'Institutional',
+ other: 'Other',
+};
+
+// Suffix-based matching (matches the domain or any subdomain of it).
+const FORUM_DOMAINS = [
+ 'reddit.com',
+ 'quora.com',
+ 'stackexchange.com',
+ 'stackoverflow.com',
+ 'ycombinator.com',
+ 'discourse.org',
+ 'mumsnet.com',
+ 'mbworld.org',
+ 'bimmerpost.com',
+ 'rennlist.com',
+ 'teslamotorsclub.com',
+];
+
+const SOCIAL_DOMAINS = [
+ 'youtube.com',
+ 'youtu.be',
+ 'twitter.com',
+ 'x.com',
+ 'facebook.com',
+ 'linkedin.com',
+ 'instagram.com',
+ 'tiktok.com',
+ 'pinterest.com',
+ 'threads.net',
+ 'medium.com',
+ 'substack.com',
+];
+
+const REVIEW_DOMAINS = [
+ 'trustpilot.com',
+ 'tripadvisor.com',
+ 'g2.com',
+ 'capterra.com',
+ 'consumerreports.org',
+ 'yelp.com',
+ 'sitejabber.com',
+ 'bbb.org',
+];
+
+const INSTITUTIONAL_DOMAINS = [
+ 'wikipedia.org',
+ 'who.int',
+ 'europa.eu',
+ 'un.org',
+ 'worldbank.org',
+ 'imf.org',
+ 'oecd.org',
+ 'nih.gov',
+ 'cdc.gov',
+ 'iihs.org',
+ 'nhtsa.gov',
+ 'epa.gov',
+];
+
+// Curated list of well-known editorial / news / magazine sites.
+// Intentionally small — anything unknown falls into `other`.
+const EDITORIAL_DOMAINS = [
+ 'nytimes.com',
+ 'wsj.com',
+ 'ft.com',
+ 'bloomberg.com',
+ 'reuters.com',
+ 'bbc.com',
+ 'bbc.co.uk',
+ 'cnn.com',
+ 'theguardian.com',
+ 'washingtonpost.com',
+ 'forbes.com',
+ 'businessinsider.com',
+ 'fortune.com',
+ 'economist.com',
+ 'time.com',
+ 'newyorker.com',
+ 'theatlantic.com',
+ 'theverge.com',
+ 'wired.com',
+ 'techcrunch.com',
+ 'engadget.com',
+ 'arstechnica.com',
+ 'cnet.com',
+ 'zdnet.com',
+ 'gizmodo.com',
+ 'mashable.com',
+ 'vox.com',
+ 'axios.com',
+ 'politico.com',
+ 'npr.org',
+ 'cbsnews.com',
+ 'nbcnews.com',
+ 'abcnews.go.com',
+ 'foxnews.com',
+ 'aljazeera.com',
+ 'dw.com',
+ 'reviewgeek.com',
+ 'motortrend.com',
+ 'caranddriver.com',
+ 'roadandtrack.com',
+ 'autoblog.com',
+ 'autocar.co.uk',
+ 'top10.com',
+ 'thedrive.com',
+ 'hemmings.com',
+ 'engadget.com',
+ 'digitaltrends.com',
+ 'tomsguide.com',
+ 'pcmag.com',
+ 'lifewire.com',
+ 'topgear.com',
+ 'jalopnik.com',
+ 'insideevs.com',
+ 'electrek.co',
+];
+
+const INSTITUTIONAL_TLD_PATTERN = /\.(edu|gov|mil)(\.[a-z]{2,3})?$/i;
+const INSTITUTIONAL_GENERIC_PATTERN = /\.(ac|edu|gov)\.[a-z]{2}$/i;
+
+function matchesSuffix(domain: string, list: string[]): boolean {
+ const d = domain.toLowerCase();
+ return list.some((entry) => d === entry || d.endsWith(`.${entry}`));
+}
+
+export interface ClassifyContext {
+ brandDomains: string[];
+ competitorDomains: string[];
+}
+
+/**
+ * Extract a normalized hostname ("www.FOO.com/bar" → "foo.com") from a raw
+ * URL string. Returns null for inputs that can't be parsed.
+ */
+export function extractHostname(rawUrl: string): string | null {
+ if (!rawUrl) return null;
+ try {
+ const url = new URL(rawUrl.trim());
+ let host = url.hostname.toLowerCase();
+ if (host.startsWith('www.')) host = host.slice(4);
+ return host || null;
+ } catch {
+ // Some citations come in as bare hostnames or stripped strings. Try to
+ // recover a hostname-like token.
+ const match = rawUrl.match(/^(?:https?:\/\/)?(?:www\.)?([^/\s?#]+)/i);
+ return match ? match[1].toLowerCase() : null;
+ }
+}
+
+/**
+ * Normalize a user-entered domain ("https://www.Foo.com/x" or "foo.COM/") to
+ * its bare hostname ("foo.com"). Useful when loading brand / competitor
+ * domains from the database.
+ */
+export function normalizeDomain(raw: string | null | undefined): string {
+ if (!raw) return '';
+ const host = extractHostname(raw) ?? raw.trim().toLowerCase();
+ return host.replace(/\/+$/, '');
+}
+
+export function classifyDomain(
+ domain: string,
+ ctx: ClassifyContext,
+): SourceCategory {
+ const d = domain.toLowerCase();
+
+ if (ctx.brandDomains.length > 0 && matchesSuffix(d, ctx.brandDomains)) {
+ return 'you';
+ }
+ if (
+ ctx.competitorDomains.length > 0 &&
+ matchesSuffix(d, ctx.competitorDomains)
+ ) {
+ return 'competitor';
+ }
+ if (matchesSuffix(d, FORUM_DOMAINS)) return 'forum';
+ if (matchesSuffix(d, SOCIAL_DOMAINS)) return 'social';
+ if (matchesSuffix(d, REVIEW_DOMAINS)) return 'review';
+ if (matchesSuffix(d, INSTITUTIONAL_DOMAINS)) return 'institutional';
+ if (INSTITUTIONAL_TLD_PATTERN.test(d)) return 'institutional';
+ if (INSTITUTIONAL_GENERIC_PATTERN.test(d)) return 'institutional';
+ if (matchesSuffix(d, EDITORIAL_DOMAINS)) return 'editorial';
+
+ return 'other';
+}
diff --git a/web/src/lib/favicon.ts b/web/src/lib/favicon.ts
new file mode 100644
index 000000000..c2c7a1ef7
--- /dev/null
+++ b/web/src/lib/favicon.ts
@@ -0,0 +1,9 @@
+/**
+ * Returns a high-quality favicon URL for a given domain
+ * using Google's public favicon service.
+ */
+export function getFaviconUrl(domain: string, size: number = 128): string {
+ const clean = domain.replace(/^https?:\/\//, "").replace(/\/.*$/, "").trim();
+ if (!clean) return "";
+ return `https://www.google.com/s2/favicons?domain=${encodeURIComponent(clean)}&sz=${size}`;
+}
diff --git a/web/src/lib/guards/plan-guard.ts b/web/src/lib/guards/plan-guard.ts
new file mode 100644
index 000000000..8fe3351cc
--- /dev/null
+++ b/web/src/lib/guards/plan-guard.ts
@@ -0,0 +1,76 @@
+import { createClient } from "@/lib/supabase/server";
+import {
+ type Feature,
+ type Plan,
+ type PlanLimits,
+ getPlan,
+ hasFeature,
+ isCloud,
+ isWithinLimit,
+} from "@/config/plans";
+
+export async function getOrgPlan(organizationId: string): Promise<Plan> {
+ if (!isCloud()) return getPlan("self_hosted");
+
+ const supabase = await createClient();
+ const { data } = await supabase
+ .from("organizations")
+ .select("plan, subscription_status, plan_overrides")
+ .eq("id", organizationId)
+ .single();
+
+ if (data?.subscription_status !== "active") {
+ return getPlan("starter");
+ }
+
+ const plan = getPlan(data?.plan);
+
+ // Enterprise orgs can have custom limit overrides
+ if (data?.plan === "enterprise" && data.plan_overrides) {
+ const overrides = data.plan_overrides as Record<string, unknown>;
+ return {
+ ...plan,
+ limits: { ...plan.limits, ...overrides } as typeof plan.limits,
+ };
+ }
+
+ return plan;
+}
+
+export class PlanLimitError extends Error {
+ public readonly requiredPlan: string;
+
+ constructor(message: string, requiredPlan: string) {
+ super(message);
+ this.name = "PlanLimitError";
+ this.requiredPlan = requiredPlan;
+ }
+}
+
+export async function enforceFeature(
+ organizationId: string,
+ feature: Feature,
+): Promise<void> {
+ const plan = await getOrgPlan(organizationId);
+ if (!hasFeature(plan, feature)) {
+ throw new PlanLimitError(
+ `This feature requires a higher plan.`,
+ plan.name,
+ );
+ }
+}
+
+export async function enforceLimit(
+ organizationId: string,
+ key: keyof Omit<PlanLimits, "features" | "allowedScrapers" | "allowedModels">,
+ currentCount: number,
+): Promise<void> {
+ const plan = await getOrgPlan(organizationId);
+ if (!isWithinLimit(plan, key, currentCount)) {
+ const limit = plan.limits[key];
+ throw new PlanLimitError(
+ `Plan limit reached: maximum ${limit} for ${key}. Upgrade to increase.`,
+ plan.name,
+ );
+ }
+}
diff --git a/web/src/lib/prompt-volume-clusters.ts b/web/src/lib/prompt-volume-clusters.ts
new file mode 100644
index 000000000..0f7295500
--- /dev/null
+++ b/web/src/lib/prompt-volume-clusters.ts
@@ -0,0 +1,63 @@
+import type { PromptVolume } from '@/types';
+
+export interface PromptVolumeCluster {
+ keyword: string;
+ volume: number;
+ estimatedAiVolume: number;
+ occurrences: number;
+ prompts: {
+ id: string;
+ text: string;
+ intent: string;
+ volume: number;
+ estimatedAiVolume: number;
+ }[];
+}
+
+export function aggregatePromptVolumeClusters(
+ volumes: PromptVolume[],
+): PromptVolumeCluster[] {
+ const merged = new Map<string, PromptVolumeCluster>();
+
+ for (const v of volumes) {
+ for (const kw of v.keywords) {
+ const normalized = kw.trim().toLowerCase();
+ if (!normalized) continue;
+
+ const volume = v.googleVolumes[kw] ?? 0;
+ const estimatedAiVolume = Math.round(volume * v.aiVolumeMultiplier);
+ const existing = merged.get(normalized);
+
+ if (existing) {
+ existing.volume += volume;
+ existing.estimatedAiVolume += estimatedAiVolume;
+ existing.occurrences += 1;
+ existing.prompts.push({
+ id: v.promptId,
+ text: v.promptText,
+ intent: v.intent,
+ volume,
+ estimatedAiVolume,
+ });
+ } else {
+ merged.set(normalized, {
+ keyword: kw,
+ volume,
+ estimatedAiVolume,
+ occurrences: 1,
+ prompts: [
+ {
+ id: v.promptId,
+ text: v.promptText,
+ intent: v.intent,
+ volume,
+ estimatedAiVolume,
+ },
+ ],
+ });
+ }
+ }
+ }
+
+ return Array.from(merged.values()).sort((a, b) => b.volume - a.volume);
+}
diff --git a/web/src/lib/stripe.ts b/web/src/lib/stripe.ts
new file mode 100644
index 000000000..55ac3b81a
--- /dev/null
+++ b/web/src/lib/stripe.ts
@@ -0,0 +1,12 @@
+import Stripe from 'stripe';
+
+export const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);
+
+export const PRICE_IDS = {
+ starter: {
+ monthly: process.env.STRIPE_STARTER_MONTHLY_PRICE_ID!,
+ },
+ growth: {
+ monthly: process.env.STRIPE_GROWTH_MONTHLY_PRICE_ID!,
+ },
+} as const;
diff --git a/web/src/lib/supabase/admin.ts b/web/src/lib/supabase/admin.ts
new file mode 100644
index 000000000..63ec60bcf
--- /dev/null
+++ b/web/src/lib/supabase/admin.ts
@@ -0,0 +1,6 @@
+import { createClient } from '@supabase/supabase-js';
+
+export const supabaseAdmin = createClient(
+ process.env.NEXT_PUBLIC_SUPABASE_URL!,
+ process.env.SUPABASE_SERVICE_ROLE_KEY!,
+);
diff --git a/web/src/lib/supabase/client.ts b/web/src/lib/supabase/client.ts
new file mode 100644
index 000000000..f91119aec
--- /dev/null
+++ b/web/src/lib/supabase/client.ts
@@ -0,0 +1,9 @@
+import { createBrowserClient } from "@supabase/ssr";
+import type { Database } from "@/types/supabase";
+
+export function createClient() {
+ return createBrowserClient<Database>(
+ process.env.NEXT_PUBLIC_SUPABASE_URL!,
+ process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!
+ );
+}
diff --git a/web/src/lib/supabase/middleware.ts b/web/src/lib/supabase/middleware.ts
new file mode 100644
index 000000000..a81266440
--- /dev/null
+++ b/web/src/lib/supabase/middleware.ts
@@ -0,0 +1,34 @@
+import { createServerClient } from "@supabase/ssr";
+import { type NextRequest, NextResponse } from "next/server";
+import type { Database } from "@/types/supabase";
+
+export async function updateSession(request: NextRequest) {
+ let supabaseResponse = NextResponse.next({ request });
+
+ const supabase = createServerClient<Database>(
+ process.env.NEXT_PUBLIC_SUPABASE_URL!,
+ process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
+ {
+ cookies: {
+ getAll() {
+ return request.cookies.getAll();
+ },
+ setAll(cookiesToSet) {
+ cookiesToSet.forEach(({ name, value }) =>
+ request.cookies.set(name, value)
+ );
+ supabaseResponse = NextResponse.next({ request });
+ cookiesToSet.forEach(({ name, value, options }) =>
+ supabaseResponse.cookies.set(name, value, options)
+ );
+ },
+ },
+ }
+ );
+
+ const {
+ data: { user },
+ } = await supabase.auth.getUser();
+
+ return { supabaseResponse, user };
+}
diff --git a/web/src/lib/supabase/server.ts b/web/src/lib/supabase/server.ts
new file mode 100644
index 000000000..bf2d73c60
--- /dev/null
+++ b/web/src/lib/supabase/server.ts
@@ -0,0 +1,28 @@
+import { createServerClient } from "@supabase/ssr";
+import { cookies } from "next/headers";
+import type { Database } from "@/types/supabase";
+
+export async function createClient() {
+ const cookieStore = await cookies();
+
+ return createServerClient<Database>(
+ process.env.NEXT_PUBLIC_SUPABASE_URL!,
+ process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
+ {
+ cookies: {
+ getAll() {
+ return cookieStore.getAll();
+ },
+ setAll(cookiesToSet) {
+ try {
+ cookiesToSet.forEach(({ name, value, options }) =>
+ cookieStore.set(name, value, options)
+ );
+ } catch {
+ // setAll called from a Server Component — safe to ignore
+ }
+ },
+ },
+ }
+ );
+}
diff --git a/web/src/lib/tracking-job-store.ts b/web/src/lib/tracking-job-store.ts
new file mode 100644
index 000000000..d6da58545
--- /dev/null
+++ b/web/src/lib/tracking-job-store.ts
@@ -0,0 +1,34 @@
+const TRACKING_STORAGE_KEY = 'aeo:tracking-job';
+
+export interface TrackingJob {
+ jobId: string;
+ brandId: string;
+ startedAt: number;
+}
+
+export function saveTrackingJob(job: TrackingJob) {
+ try {
+ localStorage.setItem(TRACKING_STORAGE_KEY, JSON.stringify(job));
+ } catch {}
+}
+
+export function loadTrackingJob(): TrackingJob | null {
+ try {
+ const raw = localStorage.getItem(TRACKING_STORAGE_KEY);
+ if (!raw) return null;
+ const job = JSON.parse(raw) as TrackingJob;
+ if (Date.now() - job.startedAt > 10 * 60 * 1000) {
+ localStorage.removeItem(TRACKING_STORAGE_KEY);
+ return null;
+ }
+ return job;
+ } catch {
+ return null;
+ }
+}
+
+export function clearTrackingJob() {
+ try {
+ localStorage.removeItem(TRACKING_STORAGE_KEY);
+ } catch {}
+}
diff --git a/src/lib/utils.ts b/web/src/lib/utils.ts
similarity index 100%
rename from src/lib/utils.ts
rename to web/src/lib/utils.ts
diff --git a/web/src/proxy.ts b/web/src/proxy.ts
new file mode 100644
index 000000000..4902cf9b2
--- /dev/null
+++ b/web/src/proxy.ts
@@ -0,0 +1,70 @@
+import createMiddleware from "next-intl/middleware";
+import { type NextRequest, NextResponse } from "next/server";
+import { routing } from "@/i18n/routing";
+import { updateSession } from "@/lib/supabase/middleware";
+
+const intlMiddleware = createMiddleware(routing);
+
+const protectedPathnames = ["/dashboard"];
+const authPathnames = ["/sign-in", "/sign-up"];
+
+function isProtected(pathname: string): boolean {
+ return protectedPathnames.some(
+ (p) => pathname === p || pathname.startsWith(`${p}/`)
+ );
+}
+
+function isAuthRoute(pathname: string): boolean {
+ return authPathnames.some(
+ (p) => pathname === p || pathname.startsWith(`${p}/`)
+ );
+}
+
+export async function proxy(request: NextRequest) {
+ const { pathname } = request.nextUrl;
+
+ const pathnameWithoutLocale = pathname.replace(/^\/(en)/, "") || "/";
+
+ let supabaseResponse: NextResponse | undefined;
+ let user: { id: string } | null = null;
+
+ try {
+ const session = await updateSession(request);
+ supabaseResponse = session.supabaseResponse;
+ user = session.user;
+ } catch {
+ // Supabase session refresh failed — continue without auth context
+ // so next-intl locale routing still works
+ }
+
+ if (pathnameWithoutLocale === "/") {
+ const target = user ? "/dashboard" : "/sign-in";
+ return NextResponse.redirect(new URL(target, request.url));
+ }
+
+ if (isProtected(pathnameWithoutLocale) && !user) {
+ const signInUrl = new URL("/sign-in", request.url);
+ signInUrl.searchParams.set("redirectTo", pathname);
+ return NextResponse.redirect(signInUrl);
+ }
+
+ if (isAuthRoute(pathnameWithoutLocale) && user) {
+ return NextResponse.redirect(new URL("/dashboard", request.url));
+ }
+
+ const intlResponse = intlMiddleware(request);
+
+ if (supabaseResponse) {
+ supabaseResponse.cookies.getAll().forEach((cookie) => {
+ intlResponse.cookies.set(cookie.name, cookie.value, cookie);
+ });
+ }
+
+ return intlResponse;
+}
+
+export const config = {
+ matcher: [
+ "/((?!api|_next|_vercel|.*\\..*).*)",
+ ],
+};
diff --git a/web/src/stores/use-auth-store.ts b/web/src/stores/use-auth-store.ts
new file mode 100644
index 000000000..f0ebd71d3
--- /dev/null
+++ b/web/src/stores/use-auth-store.ts
@@ -0,0 +1,22 @@
+import { create } from "zustand";
+import type { User, Session } from "@supabase/supabase-js";
+
+interface AuthStore {
+ user: User | null;
+ session: Session | null;
+ isLoading: boolean;
+ setUser: (user: User | null) => void;
+ setSession: (session: Session | null) => void;
+ setLoading: (isLoading: boolean) => void;
+ reset: () => void;
+}
+
+export const useAuthStore = create<AuthStore>((set) => ({
+ user: null,
+ session: null,
+ isLoading: true,
+ setUser: (user) => set({ user }),
+ setSession: (session) => set({ session }),
+ setLoading: (isLoading) => set({ isLoading }),
+ reset: () => set({ user: null, session: null, isLoading: false }),
+}));
diff --git a/web/src/stores/use-brand-store.ts b/web/src/stores/use-brand-store.ts
new file mode 100644
index 000000000..fefe9292d
--- /dev/null
+++ b/web/src/stores/use-brand-store.ts
@@ -0,0 +1,69 @@
+import { create } from "zustand";
+import { persist } from "zustand/middleware";
+import type { Brand } from "@/types";
+
+interface BrandStore {
+ brands: Brand[];
+ activeBrandId: string | null;
+ setBrands: (brands: Brand[]) => void;
+ addBrand: (brand: Brand) => void;
+ updateBrand: (id: string, updates: Partial<Brand>) => void;
+ removeBrand: (id: string) => void;
+ setActiveBrand: (id: string) => void;
+ getActiveBrand: () => Brand | null;
+}
+
+export const useBrandStore = create<BrandStore>()(
+ persist(
+ (set, get) => ({
+ brands: [],
+ activeBrandId: null,
+
+ setBrands: (brands) =>
+ set({
+ brands,
+ activeBrandId:
+ brands.length > 0 ? (get().activeBrandId ?? brands[0].id) : null,
+ }),
+
+ addBrand: (brand) =>
+ set((state) => ({
+ brands: [...state.brands, brand],
+ activeBrandId: state.activeBrandId ?? brand.id,
+ })),
+
+ updateBrand: (id, updates) =>
+ set((state) => ({
+ brands: state.brands.map((b) =>
+ b.id === id ? { ...b, ...updates } : b
+ ),
+ })),
+
+ removeBrand: (id) =>
+ set((state) => {
+ const remaining = state.brands.filter((b) => b.id !== id);
+ return {
+ brands: remaining,
+ activeBrandId:
+ state.activeBrandId === id
+ ? (remaining[0]?.id ?? null)
+ : state.activeBrandId,
+ };
+ }),
+
+ setActiveBrand: (id) => set({ activeBrandId: id }),
+
+ getActiveBrand: () => {
+ const { brands, activeBrandId } = get();
+ return brands.find((b) => b.id === activeBrandId) ?? null;
+ },
+ }),
+ {
+ name: "brand-store",
+ partialize: (state) => ({
+ activeBrandId: state.activeBrandId,
+ brands: state.brands,
+ }),
+ }
+ )
+);
diff --git a/web/src/stores/use-font-store.ts b/web/src/stores/use-font-store.ts
new file mode 100644
index 000000000..b4d686d99
--- /dev/null
+++ b/web/src/stores/use-font-store.ts
@@ -0,0 +1,27 @@
+import { create } from "zustand";
+import { persist } from "zustand/middleware";
+
+export type FontKey = "geist" | "inter" | "jakarta";
+
+interface FontStore {
+ font: FontKey;
+ setFont: (font: FontKey) => void;
+}
+
+export const FONT_OPTIONS: { key: FontKey; label: string; family: string }[] = [
+ { key: "geist", label: "Geist", family: "'Geist', ui-sans-serif, system-ui, sans-serif" },
+ { key: "inter", label: "Inter", family: "'Inter', ui-sans-serif, system-ui, sans-serif" },
+ { key: "jakarta", label: "Plus Jakarta Sans", family: "'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif" },
+];
+
+export const useFontStore = create<FontStore>()(
+ persist(
+ (set) => ({
+ font: "inter",
+ setFont: (font) => set({ font }),
+ }),
+ {
+ name: "font-store",
+ }
+ )
+);
diff --git a/web/src/stores/use-sidebar-store.ts b/web/src/stores/use-sidebar-store.ts
new file mode 100644
index 000000000..3d5cc9667
--- /dev/null
+++ b/web/src/stores/use-sidebar-store.ts
@@ -0,0 +1,28 @@
+import { create } from "zustand";
+import { persist } from "zustand/middleware";
+
+interface SidebarStore {
+ isOpen: boolean;
+ isCollapsed: boolean;
+ toggle: () => void;
+ open: () => void;
+ close: () => void;
+ toggleCollapse: () => void;
+}
+
+export const useSidebarStore = create<SidebarStore>()(
+ persist(
+ (set) => ({
+ isOpen: true,
+ isCollapsed: false,
+ toggle: () => set((state) => ({ isOpen: !state.isOpen })),
+ open: () => set({ isOpen: true }),
+ close: () => set({ isOpen: false }),
+ toggleCollapse: () =>
+ set((state) => ({ isCollapsed: !state.isCollapsed })),
+ }),
+ {
+ name: "sidebar-store",
+ }
+ )
+);
diff --git a/web/src/types/index.ts b/web/src/types/index.ts
new file mode 100644
index 000000000..06cfc99e3
--- /dev/null
+++ b/web/src/types/index.ts
@@ -0,0 +1,259 @@
+export interface Organization {
+ id: string;
+ name: string;
+ slug: string;
+ plan: string;
+ subscriptionStatus: string;
+ stripeCustomerId?: string;
+ stripeSubscriptionId?: string;
+ subscriptionEndsAt?: string;
+ createdAt: string;
+ updatedAt: string;
+}
+
+export interface Brand {
+ id: string;
+ organizationId: string;
+ name: string;
+ slug: string;
+ logoUrl?: string;
+ industry?: string;
+ description?: string;
+ region?: string;
+ language?: string;
+ trackingCode?: string;
+ domains: BrandDomain[];
+ createdAt: string;
+ updatedAt: string;
+}
+
+export interface BrandDomain {
+ id: string;
+ brandId: string;
+ domain: string;
+ country?: string;
+ isPrimary: boolean;
+}
+
+/** @deprecated Use Brand + BrandDomain instead */
+export interface Project {
+ id: string;
+ organizationId: string;
+ brandId?: string;
+ name: string;
+ domain: string;
+ createdAt: string;
+ updatedAt: string;
+}
+
+export interface PromptSet {
+ id: string;
+ brandId: string;
+ name: string;
+ prompts: Prompt[];
+ createdAt: string;
+ updatedAt: string;
+}
+
+export interface Prompt {
+ id: string;
+ promptSetId: string;
+ text: string;
+ category?: string;
+ topicId?: string;
+ platforms: AIPlatform[];
+ regions: string[];
+ models: string[];
+ isActive: boolean;
+ createdAt: string;
+}
+
+export interface Topic {
+ id: string;
+ brandId: string;
+ name: string;
+ isActive: boolean;
+ createdAt: string;
+}
+
+export type AIPlatform =
+ | "chatgpt"
+ | "gemini"
+ | "claude"
+ | "perplexity"
+ | "grok"
+ | "meta-ai"
+ | "copilot"
+ | "google-ai-overviews"
+ | "google-ai-mode"
+ | "chatgpt-web"
+ | "google-aio"
+ | "google-aimode"
+ | "copilot-web"
+ | "grok-web"
+ | "perplexity-web"
+ | "gemini-web";
+
+export type CheckFrequency = "daily" | "weekly" | "monthly";
+
+export interface BrandPlatform {
+ id: string;
+ brandId: string;
+ platform: AIPlatform;
+ isEnabled: boolean;
+ checkFrequency: CheckFrequency;
+ apiModel?: string;
+ lastCheckedAt?: string;
+ createdAt: string;
+ updatedAt: string;
+}
+
+export type Sentiment = "positive" | "neutral" | "negative";
+
+export interface Citation {
+ url: string;
+ title: string;
+ startIndex: number;
+ endIndex: number;
+}
+
+export interface PromptResult {
+ id: string;
+ promptId: string;
+ brandId: string;
+ platform: AIPlatform;
+ response: string;
+ citations: Citation[];
+ mentionCount: number;
+ citationCount: number;
+ sentiment: Sentiment;
+ visibilityScore: number;
+ modelUsed?: string;
+ region?: string;
+ competitorMentions?: CompetitorMention[];
+ createdAt: string;
+}
+
+export interface CompetitorMention {
+ competitor_id: string;
+ name: string;
+ domain: string;
+ mention_count: number;
+ citation_count: number;
+ visibility_score: number;
+}
+
+export interface Competitor {
+ id: string;
+ brandId: string;
+ name: string;
+ domain: string;
+}
+
+export interface PromptVolume {
+ id: string;
+ promptId: string;
+ promptText: string;
+ promptCategory: string;
+ intent: string;
+ keywords: string[];
+ googleVolumes: Record<string, number>;
+ totalGoogleVolume: number;
+ aiVolumeMultiplier: number;
+ estAiVolume: number;
+ locationCode?: number;
+ languageCode?: string;
+ fetchedAt: string;
+}
+
+export type ContentOpportunityStatus =
+ | "new"
+ | "sent"
+ | "in_progress"
+ | "done"
+ | "dismissed";
+
+export type ContentOpportunityImpact = "high" | "medium" | "low";
+
+export type ContentOpportunityType = "owned" | "earned";
+
+export interface ContentOpportunitySourceData {
+ promptText?: string;
+ estAiVolume?: number;
+ visibilityScore?: number;
+ competitorGap?: number;
+ intent?: string;
+ keywords?: string[];
+ competitorsCited?: string[];
+}
+
+export interface ContentBrief {
+ suggestedTitle: string;
+ contentType: string;
+ targetWordCount: number;
+ outline: { heading: string; keyPoints: string[] }[];
+ targetKeywords: string[];
+ competitorInsights: string;
+ callToAction: string;
+}
+
+export interface ContentOpportunity {
+ id: string;
+ brandId: string;
+ promptId?: string;
+ title: string;
+ description?: string;
+ type: ContentOpportunityType;
+ impact: ContentOpportunityImpact;
+ opportunityScore: number;
+ status: ContentOpportunityStatus;
+ sourceData: ContentOpportunitySourceData;
+ brief?: ContentBrief;
+ webhookSentAt?: string;
+ webhookResponse?: Record<string, unknown>;
+ createdAt: string;
+ updatedAt: string;
+}
+
+export interface WebhookConfig {
+ id: string;
+ brandId: string;
+ name: string;
+ webhookUrl: string;
+ webhookSecret?: string;
+ events: string[];
+ isActive: boolean;
+ createdAt: string;
+ updatedAt: string;
+}
+
+export type UserRole = "admin" | "manager" | "analyst" | "agency_partner";
+
+export interface UserProfile {
+ id: string;
+ email: string;
+ fullName?: string;
+ avatarUrl?: string;
+ role: UserRole;
+ organizationId?: string;
+}
+
+export const INDUSTRIES = [
+ "Technology",
+ "E-commerce & Retail",
+ "Finance & Banking",
+ "Healthcare",
+ "Travel & Hospitality",
+ "Media & Entertainment",
+ "Education",
+ "Food & Beverage",
+ "Automotive",
+ "Fashion & Apparel",
+ "Real Estate",
+ "Consumer Goods",
+ "B2B Software (SaaS)",
+ "Telecommunications",
+ "Other",
+] as const;
+
+export type Industry = (typeof INDUSTRIES)[number];
diff --git a/web/src/types/supabase.ts b/web/src/types/supabase.ts
new file mode 100644
index 000000000..c28948349
--- /dev/null
+++ b/web/src/types/supabase.ts
@@ -0,0 +1,972 @@
+export type Json =
+ | string
+ | number
+ | boolean
+ | null
+ | { [key: string]: Json | undefined }
+ | Json[];
+
+export type Database = {
+ // Allows to automatically instantiate createClient with right options
+ // instead of createClient<Database, { PostgrestVersion: 'XX' }>(URL, KEY)
+ __InternalSupabase: {
+ PostgrestVersion: '14.1';
+ };
+ public: {
+ Tables: {
+ ai_traffic_logs: {
+ Row: {
+ brand_id: string;
+ country: string | null;
+ created_at: string;
+ id: string;
+ ip_address: string | null;
+ language: string | null;
+ referrer: string | null;
+ screen: string | null;
+ source_platform: string | null;
+ url: string;
+ user_agent: string | null;
+ };
+ Insert: {
+ brand_id: string;
+ country?: string | null;
+ created_at?: string;
+ id?: string;
+ ip_address?: string | null;
+ language?: string | null;
+ referrer?: string | null;
+ screen?: string | null;
+ source_platform?: string | null;
+ url: string;
+ user_agent?: string | null;
+ };
+ Update: {
+ brand_id?: string;
+ country?: string | null;
+ created_at?: string;
+ id?: string;
+ ip_address?: string | null;
+ language?: string | null;
+ referrer?: string | null;
+ screen?: string | null;
+ source_platform?: string | null;
+ url?: string;
+ user_agent?: string | null;
+ };
+ Relationships: [
+ {
+ foreignKeyName: 'ai_traffic_logs_brand_id_fkey';
+ columns: ['brand_id'];
+ isOneToOne: false;
+ referencedRelation: 'brands';
+ referencedColumns: ['id'];
+ },
+ ];
+ };
+ brand_domains: {
+ Row: {
+ brand_id: string;
+ country: string | null;
+ created_at: string;
+ domain: string;
+ id: string;
+ is_primary: boolean;
+ };
+ Insert: {
+ brand_id: string;
+ country?: string | null;
+ created_at?: string;
+ domain: string;
+ id?: string;
+ is_primary?: boolean;
+ };
+ Update: {
+ brand_id?: string;
+ country?: string | null;
+ created_at?: string;
+ domain?: string;
+ id?: string;
+ is_primary?: boolean;
+ };
+ Relationships: [
+ {
+ foreignKeyName: 'brand_domains_brand_id_fkey';
+ columns: ['brand_id'];
+ isOneToOne: false;
+ referencedRelation: 'brands';
+ referencedColumns: ['id'];
+ },
+ ];
+ };
+ brand_platforms: {
+ Row: {
+ api_model: string | null;
+ brand_id: string;
+ check_frequency: string;
+ created_at: string;
+ id: string;
+ is_enabled: boolean;
+ last_checked_at: string | null;
+ platform: string;
+ updated_at: string;
+ };
+ Insert: {
+ api_model?: string | null;
+ brand_id: string;
+ check_frequency?: string;
+ created_at?: string;
+ id?: string;
+ is_enabled?: boolean;
+ last_checked_at?: string | null;
+ platform: string;
+ updated_at?: string;
+ };
+ Update: {
+ api_model?: string | null;
+ brand_id?: string;
+ check_frequency?: string;
+ created_at?: string;
+ id?: string;
+ is_enabled?: boolean;
+ last_checked_at?: string | null;
+ platform?: string;
+ updated_at?: string;
+ };
+ Relationships: [
+ {
+ foreignKeyName: 'brand_platforms_brand_id_fkey';
+ columns: ['brand_id'];
+ isOneToOne: false;
+ referencedRelation: 'brands';
+ referencedColumns: ['id'];
+ },
+ ];
+ };
+ brands: {
+ Row: {
+ created_at: string;
+ description: string | null;
+ id: string;
+ industry: string | null;
+ language: string | null;
+ logo_url: string | null;
+ name: string;
+ organization_id: string;
+ region: string | null;
+ slug: string;
+ tracking_code: string;
+ updated_at: string;
+ };
+ Insert: {
+ created_at?: string;
+ description?: string | null;
+ id?: string;
+ industry?: string | null;
+ language?: string | null;
+ logo_url?: string | null;
+ name: string;
+ organization_id: string;
+ region?: string | null;
+ slug: string;
+ tracking_code?: string;
+ updated_at?: string;
+ };
+ Update: {
+ created_at?: string;
+ description?: string | null;
+ id?: string;
+ industry?: string | null;
+ language?: string | null;
+ logo_url?: string | null;
+ name?: string;
+ organization_id?: string;
+ region?: string | null;
+ slug?: string;
+ tracking_code?: string;
+ updated_at?: string;
+ };
+ Relationships: [
+ {
+ foreignKeyName: 'brands_organization_id_fkey';
+ columns: ['organization_id'];
+ isOneToOne: false;
+ referencedRelation: 'organizations';
+ referencedColumns: ['id'];
+ },
+ ];
+ };
+ competitors: {
+ Row: {
+ brand_id: string;
+ created_at: string;
+ domain: string;
+ id: string;
+ name: string;
+ };
+ Insert: {
+ brand_id: string;
+ created_at?: string;
+ domain?: string;
+ id?: string;
+ name: string;
+ };
+ Update: {
+ brand_id?: string;
+ created_at?: string;
+ domain?: string;
+ id?: string;
+ name?: string;
+ };
+ Relationships: [
+ {
+ foreignKeyName: 'competitors_brand_id_fkey';
+ columns: ['brand_id'];
+ isOneToOne: false;
+ referencedRelation: 'brands';
+ referencedColumns: ['id'];
+ },
+ ];
+ };
+ content_opportunities: {
+ Row: {
+ brand_id: string;
+ created_at: string | null;
+ description: string | null;
+ id: string;
+ impact: string;
+ opportunity_score: number | null;
+ prompt_id: string | null;
+ source_data: Json | null;
+ status: string;
+ title: string;
+ type: string;
+ updated_at: string | null;
+ webhook_response: Json | null;
+ webhook_sent_at: string | null;
+ };
+ Insert: {
+ brand_id: string;
+ created_at?: string | null;
+ description?: string | null;
+ id?: string;
+ impact?: string;
+ opportunity_score?: number | null;
+ prompt_id?: string | null;
+ source_data?: Json | null;
+ status?: string;
+ title: string;
+ type?: string;
+ updated_at?: string | null;
+ webhook_response?: Json | null;
+ webhook_sent_at?: string | null;
+ };
+ Update: {
+ brand_id?: string;
+ created_at?: string | null;
+ description?: string | null;
+ id?: string;
+ impact?: string;
+ opportunity_score?: number | null;
+ prompt_id?: string | null;
+ source_data?: Json | null;
+ status?: string;
+ title?: string;
+ type?: string;
+ updated_at?: string | null;
+ webhook_response?: Json | null;
+ webhook_sent_at?: string | null;
+ };
+ Relationships: [
+ {
+ foreignKeyName: 'content_opportunities_brand_id_fkey';
+ columns: ['brand_id'];
+ isOneToOne: false;
+ referencedRelation: 'brands';
+ referencedColumns: ['id'];
+ },
+ {
+ foreignKeyName: 'content_opportunities_prompt_id_fkey';
+ columns: ['prompt_id'];
+ isOneToOne: false;
+ referencedRelation: 'prompts';
+ referencedColumns: ['id'];
+ },
+ ];
+ };
+ invitations: {
+ Row: {
+ accepted_at: string | null;
+ created_at: string;
+ email: string;
+ expires_at: string;
+ id: string;
+ invited_by: string;
+ organization_id: string;
+ role: Database['public']['Enums']['user_role'];
+ status: Database['public']['Enums']['invitation_status'];
+ token: string;
+ };
+ Insert: {
+ accepted_at?: string | null;
+ created_at?: string;
+ email: string;
+ expires_at?: string;
+ id?: string;
+ invited_by: string;
+ organization_id: string;
+ role?: Database['public']['Enums']['user_role'];
+ status?: Database['public']['Enums']['invitation_status'];
+ token: string;
+ };
+ Update: {
+ accepted_at?: string | null;
+ created_at?: string;
+ email?: string;
+ expires_at?: string;
+ id?: string;
+ invited_by?: string;
+ organization_id?: string;
+ role?: Database['public']['Enums']['user_role'];
+ status?: Database['public']['Enums']['invitation_status'];
+ token?: string;
+ };
+ Relationships: [
+ {
+ foreignKeyName: 'invitations_organization_id_fkey';
+ columns: ['organization_id'];
+ isOneToOne: false;
+ referencedRelation: 'organizations';
+ referencedColumns: ['id'];
+ },
+ ];
+ };
+ organizations: {
+ Row: {
+ created_at: string;
+ id: string;
+ name: string;
+ plan: string;
+ plan_overrides: Record<string, unknown> | null;
+ slug: string;
+ stripe_customer_id: string | null;
+ stripe_subscription_id: string | null;
+ subscription_ends_at: string | null;
+ subscription_status: string;
+ updated_at: string;
+ };
+ Insert: {
+ created_at?: string;
+ id?: string;
+ name: string;
+ plan?: string;
+ plan_overrides?: Record<string, unknown> | null;
+ slug: string;
+ stripe_customer_id?: string | null;
+ stripe_subscription_id?: string | null;
+ subscription_ends_at?: string | null;
+ subscription_status?: string;
+ updated_at?: string;
+ };
+ Update: {
+ created_at?: string;
+ id?: string;
+ name?: string;
+ plan?: string;
+ plan_overrides?: Record<string, unknown> | null;
+ slug?: string;
+ stripe_customer_id?: string | null;
+ stripe_subscription_id?: string | null;
+ subscription_ends_at?: string | null;
+ subscription_status?: string;
+ updated_at?: string;
+ };
+ Relationships: [];
+ };
+ profiles: {
+ Row: {
+ avatar_url: string | null;
+ created_at: string;
+ full_name: string | null;
+ id: string;
+ onboarding_completed: boolean;
+ organization_id: string | null;
+ role: Database['public']['Enums']['user_role'];
+ updated_at: string;
+ };
+ Insert: {
+ avatar_url?: string | null;
+ created_at?: string;
+ full_name?: string | null;
+ id: string;
+ onboarding_completed?: boolean;
+ organization_id?: string | null;
+ role?: Database['public']['Enums']['user_role'];
+ updated_at?: string;
+ };
+ Update: {
+ avatar_url?: string | null;
+ created_at?: string;
+ full_name?: string | null;
+ id?: string;
+ onboarding_completed?: boolean;
+ organization_id?: string | null;
+ role?: Database['public']['Enums']['user_role'];
+ updated_at?: string;
+ };
+ Relationships: [
+ {
+ foreignKeyName: 'profiles_organization_id_fkey';
+ columns: ['organization_id'];
+ isOneToOne: false;
+ referencedRelation: 'organizations';
+ referencedColumns: ['id'];
+ },
+ ];
+ };
+ prompt_results: {
+ Row: {
+ brand_id: string;
+ citation_count: number;
+ citations: Json;
+ competitor_mentions: Json;
+ created_at: string;
+ id: string;
+ mention_count: number;
+ model_used: string | null;
+ platform: string;
+ prompt_id: string;
+ region: string | null;
+ response: string;
+ sentiment: string;
+ visibility_score: number;
+ };
+ Insert: {
+ brand_id: string;
+ citation_count?: number;
+ citations?: Json;
+ competitor_mentions?: Json;
+ created_at?: string;
+ id?: string;
+ mention_count?: number;
+ model_used?: string | null;
+ platform: string;
+ prompt_id: string;
+ region?: string | null;
+ response?: string;
+ sentiment?: string;
+ visibility_score?: number;
+ };
+ Update: {
+ brand_id?: string;
+ citation_count?: number;
+ citations?: Json;
+ competitor_mentions?: Json;
+ created_at?: string;
+ id?: string;
+ mention_count?: number;
+ model_used?: string | null;
+ platform?: string;
+ prompt_id?: string;
+ region?: string | null;
+ response?: string;
+ sentiment?: string;
+ visibility_score?: number;
+ };
+ Relationships: [
+ {
+ foreignKeyName: 'prompt_results_brand_id_fkey';
+ columns: ['brand_id'];
+ isOneToOne: false;
+ referencedRelation: 'brands';
+ referencedColumns: ['id'];
+ },
+ {
+ foreignKeyName: 'prompt_results_prompt_id_fkey';
+ columns: ['prompt_id'];
+ isOneToOne: false;
+ referencedRelation: 'prompts';
+ referencedColumns: ['id'];
+ },
+ ];
+ };
+ prompt_sets: {
+ Row: {
+ brand_id: string;
+ created_at: string;
+ id: string;
+ name: string;
+ updated_at: string;
+ };
+ Insert: {
+ brand_id: string;
+ created_at?: string;
+ id?: string;
+ name: string;
+ updated_at?: string;
+ };
+ Update: {
+ brand_id?: string;
+ created_at?: string;
+ id?: string;
+ name?: string;
+ updated_at?: string;
+ };
+ Relationships: [
+ {
+ foreignKeyName: 'prompt_sets_brand_id_fkey';
+ columns: ['brand_id'];
+ isOneToOne: false;
+ referencedRelation: 'brands';
+ referencedColumns: ['id'];
+ },
+ ];
+ };
+ prompt_suggestions: {
+ Row: {
+ added_prompt_id: string | null;
+ brand_id: string;
+ created_at: string;
+ est_volume: number | null;
+ expires_at: string;
+ generated_at: string;
+ id: string;
+ reason: string | null;
+ source: string;
+ status: string;
+ suggested_text: string;
+ topic_id: string | null;
+ topic_name: string | null;
+ updated_at: string;
+ };
+ Insert: {
+ added_prompt_id?: string | null;
+ brand_id: string;
+ created_at?: string;
+ est_volume?: number | null;
+ expires_at?: string;
+ generated_at?: string;
+ id?: string;
+ reason?: string | null;
+ source?: string;
+ status?: string;
+ suggested_text: string;
+ topic_id?: string | null;
+ topic_name?: string | null;
+ updated_at?: string;
+ };
+ Update: {
+ added_prompt_id?: string | null;
+ brand_id?: string;
+ created_at?: string;
+ est_volume?: number | null;
+ expires_at?: string;
+ generated_at?: string;
+ id?: string;
+ reason?: string | null;
+ source?: string;
+ status?: string;
+ suggested_text?: string;
+ topic_id?: string | null;
+ topic_name?: string | null;
+ updated_at?: string;
+ };
+ Relationships: [
+ {
+ foreignKeyName: 'prompt_suggestions_added_prompt_id_fkey';
+ columns: ['added_prompt_id'];
+ isOneToOne: false;
+ referencedRelation: 'prompts';
+ referencedColumns: ['id'];
+ },
+ {
+ foreignKeyName: 'prompt_suggestions_brand_id_fkey';
+ columns: ['brand_id'];
+ isOneToOne: false;
+ referencedRelation: 'brands';
+ referencedColumns: ['id'];
+ },
+ {
+ foreignKeyName: 'prompt_suggestions_topic_id_fkey';
+ columns: ['topic_id'];
+ isOneToOne: false;
+ referencedRelation: 'topics';
+ referencedColumns: ['id'];
+ },
+ ];
+ };
+ prompt_volumes: {
+ Row: {
+ ai_volume_multiplier: number;
+ created_at: string | null;
+ est_ai_volume: number;
+ fetched_at: string | null;
+ google_volumes: Json;
+ id: string;
+ intent: string;
+ keywords: Json;
+ language_code: string | null;
+ location_code: number | null;
+ prompt_id: string;
+ total_google_volume: number;
+ };
+ Insert: {
+ ai_volume_multiplier: number;
+ created_at?: string | null;
+ est_ai_volume: number;
+ fetched_at?: string | null;
+ google_volumes: Json;
+ id?: string;
+ intent: string;
+ keywords: Json;
+ language_code?: string | null;
+ location_code?: number | null;
+ prompt_id: string;
+ total_google_volume: number;
+ };
+ Update: {
+ ai_volume_multiplier?: number;
+ created_at?: string | null;
+ est_ai_volume?: number;
+ fetched_at?: string | null;
+ google_volumes?: Json;
+ id?: string;
+ intent?: string;
+ keywords?: Json;
+ language_code?: string | null;
+ location_code?: number | null;
+ prompt_id?: string;
+ total_google_volume?: number;
+ };
+ Relationships: [
+ {
+ foreignKeyName: 'prompt_volumes_prompt_id_fkey';
+ columns: ['prompt_id'];
+ isOneToOne: true;
+ referencedRelation: 'prompts';
+ referencedColumns: ['id'];
+ },
+ ];
+ };
+ prompts: {
+ Row: {
+ category: string | null;
+ created_at: string;
+ id: string;
+ is_active: boolean;
+ models: string[];
+ platforms: string[];
+ prompt_set_id: string;
+ regions: string[];
+ text: string;
+ };
+ Insert: {
+ category?: string | null;
+ created_at?: string;
+ id?: string;
+ is_active?: boolean;
+ models?: string[];
+ platforms?: string[];
+ prompt_set_id: string;
+ regions?: string[];
+ text: string;
+ };
+ Update: {
+ category?: string | null;
+ created_at?: string;
+ id?: string;
+ is_active?: boolean;
+ models?: string[];
+ platforms?: string[];
+ prompt_set_id?: string;
+ regions?: string[];
+ text?: string;
+ };
+ Relationships: [
+ {
+ foreignKeyName: 'prompts_prompt_set_id_fkey';
+ columns: ['prompt_set_id'];
+ isOneToOne: false;
+ referencedRelation: 'prompt_sets';
+ referencedColumns: ['id'];
+ },
+ ];
+ };
+ topics: {
+ Row: {
+ brand_id: string;
+ created_at: string;
+ id: string;
+ is_active: boolean;
+ name: string;
+ };
+ Insert: {
+ brand_id: string;
+ created_at?: string;
+ id?: string;
+ is_active?: boolean;
+ name: string;
+ };
+ Update: {
+ brand_id?: string;
+ created_at?: string;
+ id?: string;
+ is_active?: boolean;
+ name?: string;
+ };
+ Relationships: [
+ {
+ foreignKeyName: 'topics_brand_id_fkey';
+ columns: ['brand_id'];
+ isOneToOne: false;
+ referencedRelation: 'brands';
+ referencedColumns: ['id'];
+ },
+ ];
+ };
+ webhook_configs: {
+ Row: {
+ brand_id: string;
+ created_at: string | null;
+ events: string[] | null;
+ id: string;
+ is_active: boolean | null;
+ name: string;
+ updated_at: string | null;
+ webhook_secret: string | null;
+ webhook_url: string;
+ };
+ Insert: {
+ brand_id: string;
+ created_at?: string | null;
+ events?: string[] | null;
+ id?: string;
+ is_active?: boolean | null;
+ name?: string;
+ updated_at?: string | null;
+ webhook_secret?: string | null;
+ webhook_url: string;
+ };
+ Update: {
+ brand_id?: string;
+ created_at?: string | null;
+ events?: string[] | null;
+ id?: string;
+ is_active?: boolean | null;
+ name?: string;
+ updated_at?: string | null;
+ webhook_secret?: string | null;
+ webhook_url?: string;
+ };
+ Relationships: [
+ {
+ foreignKeyName: 'webhook_configs_brand_id_fkey';
+ columns: ['brand_id'];
+ isOneToOne: false;
+ referencedRelation: 'brands';
+ referencedColumns: ['id'];
+ },
+ ];
+ };
+ };
+ Views: {
+ [_ in never]: never;
+ };
+ Functions: {
+ get_latest_prompt_results:
+ | {
+ Args: { p_brand_id: string; p_platform?: string };
+ Returns: {
+ brand_id: string;
+ citation_count: number;
+ citations: Json;
+ competitor_mentions: Json;
+ created_at: string;
+ id: string;
+ mention_count: number;
+ model_used: string | null;
+ platform: string;
+ prompt_id: string;
+ region: string | null;
+ response: string;
+ sentiment: string;
+ visibility_score: number;
+ }[];
+ SetofOptions: {
+ from: '*';
+ to: 'prompt_results';
+ isOneToOne: false;
+ isSetofReturn: true;
+ };
+ }
+ | {
+ Args: {
+ p_brand_id: string;
+ p_date_from?: string;
+ p_date_to?: string;
+ p_model?: string;
+ p_platform?: string;
+ p_region?: string;
+ };
+ Returns: {
+ brand_id: string;
+ citation_count: number;
+ citations: Json;
+ competitor_mentions: Json;
+ created_at: string;
+ id: string;
+ mention_count: number;
+ model_used: string | null;
+ platform: string;
+ prompt_id: string;
+ region: string | null;
+ response: string;
+ sentiment: string;
+ visibility_score: number;
+ }[];
+ SetofOptions: {
+ from: '*';
+ to: 'prompt_results';
+ isOneToOne: false;
+ isSetofReturn: true;
+ };
+ };
+ };
+ Enums: {
+ invitation_status: 'pending' | 'accepted' | 'expired' | 'revoked';
+ user_role: 'admin' | 'manager' | 'analyst' | 'agency_partner';
+ };
+ CompositeTypes: {
+ [_ in never]: never;
+ };
+ };
+};
+
+type DatabaseWithoutInternals = Omit<Database, '__InternalSupabase'>;
+
+type DefaultSchema = DatabaseWithoutInternals[Extract<
+ keyof Database,
+ 'public'
+>];
+
+export type Tables<
+ DefaultSchemaTableNameOrOptions extends
+ | keyof (DefaultSchema['Tables'] & DefaultSchema['Views'])
+ | { schema: keyof DatabaseWithoutInternals },
+ TableName extends DefaultSchemaTableNameOrOptions extends {
+ schema: keyof DatabaseWithoutInternals;
+ }
+ ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Tables'] &
+ DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Views'])
+ : never = never,
+> = DefaultSchemaTableNameOrOptions extends {
+ schema: keyof DatabaseWithoutInternals;
+}
+ ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Tables'] &
+ DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Views'])[TableName] extends {
+ Row: infer R;
+ }
+ ? R
+ : never
+ : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema['Tables'] &
+ DefaultSchema['Views'])
+ ? (DefaultSchema['Tables'] &
+ DefaultSchema['Views'])[DefaultSchemaTableNameOrOptions] extends {
+ Row: infer R;
+ }
+ ? R
+ : never
+ : never;
+
+export type TablesInsert<
+ DefaultSchemaTableNameOrOptions extends
+ | keyof DefaultSchema['Tables']
+ | { schema: keyof DatabaseWithoutInternals },
+ TableName extends DefaultSchemaTableNameOrOptions extends {
+ schema: keyof DatabaseWithoutInternals;
+ }
+ ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Tables']
+ : never = never,
+> = DefaultSchemaTableNameOrOptions extends {
+ schema: keyof DatabaseWithoutInternals;
+}
+ ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Tables'][TableName] extends {
+ Insert: infer I;
+ }
+ ? I
+ : never
+ : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema['Tables']
+ ? DefaultSchema['Tables'][DefaultSchemaTableNameOrOptions] extends {
+ Insert: infer I;
+ }
+ ? I
+ : never
+ : never;
+
+export type TablesUpdate<
+ DefaultSchemaTableNameOrOptions extends
+ | keyof DefaultSchema['Tables']
+ | { schema: keyof DatabaseWithoutInternals },
+ TableName extends DefaultSchemaTableNameOrOptions extends {
+ schema: keyof DatabaseWithoutInternals;
+ }
+ ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Tables']
+ : never = never,
+> = DefaultSchemaTableNameOrOptions extends {
+ schema: keyof DatabaseWithoutInternals;
+}
+ ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions['schema']]['Tables'][TableName] extends {
+ Update: infer U;
+ }
+ ? U
+ : never
+ : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema['Tables']
+ ? DefaultSchema['Tables'][DefaultSchemaTableNameOrOptions] extends {
+ Update: infer U;
+ }
+ ? U
+ : never
+ : never;
+
+export type Enums<
+ DefaultSchemaEnumNameOrOptions extends
+ | keyof DefaultSchema['Enums']
+ | { schema: keyof DatabaseWithoutInternals },
+ EnumName extends DefaultSchemaEnumNameOrOptions extends {
+ schema: keyof DatabaseWithoutInternals;
+ }
+ ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions['schema']]['Enums']
+ : never = never,
+> = DefaultSchemaEnumNameOrOptions extends {
+ schema: keyof DatabaseWithoutInternals;
+}
+ ? DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions['schema']]['Enums'][EnumName]
+ : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema['Enums']
+ ? DefaultSchema['Enums'][DefaultSchemaEnumNameOrOptions]
+ : never;
+
+export type CompositeTypes<
+ PublicCompositeTypeNameOrOptions extends
+ | keyof DefaultSchema['CompositeTypes']
+ | { schema: keyof DatabaseWithoutInternals },
+ CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
+ schema: keyof DatabaseWithoutInternals;
+ }
+ ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions['schema']]['CompositeTypes']
+ : never = never,
+> = PublicCompositeTypeNameOrOptions extends {
+ schema: keyof DatabaseWithoutInternals;
+}
+ ? DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions['schema']]['CompositeTypes'][CompositeTypeName]
+ : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema['CompositeTypes']
+ ? DefaultSchema['CompositeTypes'][PublicCompositeTypeNameOrOptions]
+ : never;
+
+export const Constants = {
+ public: {
+ Enums: {
+ invitation_status: ['pending', 'accepted', 'expired', 'revoked'],
+ user_role: ['admin', 'manager', 'analyst', 'agency_partner'],
+ },
+ },
+} as const;
diff --git a/tsconfig.json b/web/tsconfig.json
similarity index 100%
rename from tsconfig.json
rename to web/tsconfig.json
diff --git a/web/vercel.json b/web/vercel.json
new file mode 100644
index 000000000..c46b2a574
--- /dev/null
+++ b/web/vercel.json
@@ -0,0 +1,8 @@
+{
+ "crons": [
+ {
+ "path": "/api/cron/daily-tracking",
+ "schedule": "45 15 * * *"
+ }
+ ]
+}
diff --git a/yarn.lock b/web/yarn.lock
similarity index 57%
rename from yarn.lock
rename to web/yarn.lock
index 277cd2401..d3fb8a38d 100644
--- a/yarn.lock
+++ b/web/yarn.lock
@@ -4,12 +4,12 @@
"@alloc/quick-lru@^5.2.0":
version "5.2.0"
- resolved "https://registry.yarnpkg.com/@alloc/quick-lru/-/quick-lru-5.2.0.tgz#7bf68b20c0a350f936915fcae06f58e32007ce30"
+ resolved "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz"
integrity sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==
"@antfu/ni@^25.0.0":
version "25.0.0"
- resolved "https://registry.yarnpkg.com/@antfu/ni/-/ni-25.0.0.tgz#2bf6834237e848a994b07fc311acad8d5da179a6"
+ resolved "https://registry.npmjs.org/@antfu/ni/-/ni-25.0.0.tgz"
integrity sha512-9q/yCljni37pkMr4sPrI3G4jqdIk074+iukc5aFJl7kmDCCsiJrbZ6zKxnES1Gwg+i9RcDZwvktl23puGslmvA==
dependencies:
ansis "^4.0.0"
@@ -19,7 +19,7 @@
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.28.6", "@babel/code-frame@^7.29.0":
version "7.29.0"
- resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.29.0.tgz#7cd7a59f15b3cc0dcd803038f7792712a7d0b15c"
+ resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz"
integrity sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==
dependencies:
"@babel/helper-validator-identifier" "^7.28.5"
@@ -28,12 +28,12 @@
"@babel/compat-data@^7.28.6":
version "7.29.0"
- resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.29.0.tgz#00d03e8c0ac24dd9be942c5370990cbe1f17d88d"
+ resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz"
integrity sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==
-"@babel/core@^7.24.4", "@babel/core@^7.28.0":
+"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.24.4", "@babel/core@^7.28.0":
version "7.29.0"
- resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.29.0.tgz#5286ad785df7f79d656e88ce86e650d16ca5f322"
+ resolved "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz"
integrity sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==
dependencies:
"@babel/code-frame" "^7.29.0"
@@ -54,7 +54,7 @@
"@babel/generator@^7.29.0":
version "7.29.1"
- resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.29.1.tgz#d09876290111abbb00ef962a7b83a5307fba0d50"
+ resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz"
integrity sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==
dependencies:
"@babel/parser" "^7.29.0"
@@ -65,14 +65,14 @@
"@babel/helper-annotate-as-pure@^7.27.3":
version "7.27.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz#f31fd86b915fc4daf1f3ac6976c59be7084ed9c5"
+ resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz"
integrity sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==
dependencies:
"@babel/types" "^7.27.3"
"@babel/helper-compilation-targets@^7.28.6":
version "7.28.6"
- resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz#32c4a3f41f12ed1532179b108a4d746e105c2b25"
+ resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz"
integrity sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==
dependencies:
"@babel/compat-data" "^7.28.6"
@@ -83,7 +83,7 @@
"@babel/helper-create-class-features-plugin@^7.28.6":
version "7.28.6"
- resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.6.tgz#611ff5482da9ef0db6291bcd24303400bca170fb"
+ resolved "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.6.tgz"
integrity sha512-dTOdvsjnG3xNT9Y0AUg1wAl38y+4Rl4sf9caSQZOXdNqVn+H+HbbJ4IyyHaIqNR6SW9oJpA/RuRjsjCw2IdIow==
dependencies:
"@babel/helper-annotate-as-pure" "^7.27.3"
@@ -96,12 +96,12 @@
"@babel/helper-globals@^7.28.0":
version "7.28.0"
- resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674"
+ resolved "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz"
integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==
"@babel/helper-member-expression-to-functions@^7.28.5":
version "7.28.5"
- resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.28.5.tgz#f3e07a10be37ed7a63461c63e6929575945a6150"
+ resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.28.5.tgz"
integrity sha512-cwM7SBRZcPCLgl8a7cY0soT1SptSzAlMH39vwiRpOQkJlh53r5hdHwLSCZpQdVLT39sZt+CRpNwYG4Y2v77atg==
dependencies:
"@babel/traverse" "^7.28.5"
@@ -109,7 +109,7 @@
"@babel/helper-module-imports@^7.28.6":
version "7.28.6"
- resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz#60632cbd6ffb70b22823187201116762a03e2d5c"
+ resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz"
integrity sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==
dependencies:
"@babel/traverse" "^7.28.6"
@@ -117,7 +117,7 @@
"@babel/helper-module-transforms@^7.28.6":
version "7.28.6"
- resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz#9312d9d9e56edc35aeb6e95c25d4106b50b9eb1e"
+ resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz"
integrity sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==
dependencies:
"@babel/helper-module-imports" "^7.28.6"
@@ -126,19 +126,19 @@
"@babel/helper-optimise-call-expression@^7.27.1":
version "7.27.1"
- resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.27.1.tgz#c65221b61a643f3e62705e5dd2b5f115e35f9200"
+ resolved "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.27.1.tgz"
integrity sha512-URMGH08NzYFhubNSGJrpUEphGKQwMQYBySzat5cAByY1/YgIRkULnIy3tAMeszlL/so2HbeilYloUmSpd7GdVw==
dependencies:
"@babel/types" "^7.27.1"
"@babel/helper-plugin-utils@^7.27.1", "@babel/helper-plugin-utils@^7.28.6":
version "7.28.6"
- resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz#6f13ea251b68c8532e985fd532f28741a8af9ac8"
+ resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz"
integrity sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==
"@babel/helper-replace-supers@^7.28.6":
version "7.28.6"
- resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.28.6.tgz#94aa9a1d7423a00aead3f204f78834ce7d53fe44"
+ resolved "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.28.6.tgz"
integrity sha512-mq8e+laIk94/yFec3DxSjCRD2Z0TAjhVbEJY3UQrlwVo15Lmt7C2wAUbK4bjnTs4APkwsYLTahXRraQXhb1WCg==
dependencies:
"@babel/helper-member-expression-to-functions" "^7.28.5"
@@ -147,7 +147,7 @@
"@babel/helper-skip-transparent-expression-wrappers@^7.27.1":
version "7.27.1"
- resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.27.1.tgz#62bb91b3abba8c7f1fec0252d9dbea11b3ee7a56"
+ resolved "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.27.1.tgz"
integrity sha512-Tub4ZKEXqbPjXgWLl2+3JpQAYBJ8+ikpQ2Ocj/q/r0LwE3UhENh7EUabyHjz2kCEsrRY83ew2DQdHluuiDQFzg==
dependencies:
"@babel/traverse" "^7.27.1"
@@ -155,22 +155,22 @@
"@babel/helper-string-parser@^7.27.1":
version "7.27.1"
- resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687"
+ resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz"
integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==
"@babel/helper-validator-identifier@^7.28.5":
version "7.28.5"
- resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz#010b6938fab7cb7df74aa2bbc06aa503b8fe5fb4"
+ resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz"
integrity sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==
"@babel/helper-validator-option@^7.27.1":
version "7.27.1"
- resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f"
+ resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz"
integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==
"@babel/helpers@^7.28.6":
version "7.28.6"
- resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.28.6.tgz#fca903a313ae675617936e8998b814c415cbf5d7"
+ resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.6.tgz"
integrity sha512-xOBvwq86HHdB7WUDTfKfT/Vuxh7gElQ+Sfti2Cy6yIWNW05P8iUslOVcZ4/sKbE+/jQaukQAdz/gf3724kYdqw==
dependencies:
"@babel/template" "^7.28.6"
@@ -178,28 +178,28 @@
"@babel/parser@^7.24.4", "@babel/parser@^7.28.0", "@babel/parser@^7.28.6", "@babel/parser@^7.29.0":
version "7.29.0"
- resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.29.0.tgz#669ef345add7d057e92b7ed15f0bac07611831b6"
+ resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.29.0.tgz"
integrity sha512-IyDgFV5GeDUVX4YdF/3CPULtVGSXXMLh1xVIgdCgxApktqnQV0r7/8Nqthg+8YLGaAtdyIlo2qIdZrbCv4+7ww==
dependencies:
"@babel/types" "^7.29.0"
"@babel/plugin-syntax-jsx@^7.27.1":
version "7.28.6"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.28.6.tgz#f8ca28bbd84883b5fea0e447c635b81ba73997ee"
+ resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.28.6.tgz"
integrity sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w==
dependencies:
"@babel/helper-plugin-utils" "^7.28.6"
"@babel/plugin-syntax-typescript@^7.28.6":
version "7.28.6"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.28.6.tgz#c7b2ddf1d0a811145b1de800d1abd146af92e3a2"
+ resolved "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.28.6.tgz"
integrity sha512-+nDNmQye7nlnuuHDboPbGm00Vqg3oO8niRRL27/4LYHUsHYh0zJ1xWOz0uRwNFmM1Avzk8wZbc6rdiYhomzv/A==
dependencies:
"@babel/helper-plugin-utils" "^7.28.6"
"@babel/plugin-transform-modules-commonjs@^7.27.1":
version "7.28.6"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.28.6.tgz#c0232e0dfe66a734cc4ad0d5e75fc3321b6fdef1"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.28.6.tgz"
integrity sha512-jppVbf8IV9iWWwWTQIxJMAJCWBuuKx71475wHwYytrRGQ2CWiDvYlADQno3tcYpS/T2UUWFQp3nVtYfK/YBQrA==
dependencies:
"@babel/helper-module-transforms" "^7.28.6"
@@ -207,7 +207,7 @@
"@babel/plugin-transform-typescript@^7.28.0", "@babel/plugin-transform-typescript@^7.28.5":
version "7.28.6"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.28.6.tgz#1e93d96da8adbefdfdade1d4956f73afa201a158"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.28.6.tgz"
integrity sha512-0YWL2RFxOqEm9Efk5PvreamxPME8OyY0wM5wh5lHjF+VtVhdneCWGzZeSqzOfiobVqQaNCd2z0tQvnI9DaPWPw==
dependencies:
"@babel/helper-annotate-as-pure" "^7.27.3"
@@ -218,7 +218,7 @@
"@babel/preset-typescript@^7.27.1":
version "7.28.5"
- resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.28.5.tgz#540359efa3028236958466342967522fd8f2a60c"
+ resolved "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.28.5.tgz"
integrity sha512-+bQy5WOI2V6LJZpPVxY+yp66XdZ2yifu0Mc1aP5CQKgjn4QM5IN2i5fAZ4xKop47pr8rpVhiAeu+nDQa12C8+g==
dependencies:
"@babel/helper-plugin-utils" "^7.27.1"
@@ -229,12 +229,12 @@
"@babel/runtime@^7.28.6":
version "7.28.6"
- resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.28.6.tgz#d267a43cb1836dc4d182cce93ae75ba954ef6d2b"
+ resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.6.tgz"
integrity sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==
"@babel/template@^7.28.6":
version "7.28.6"
- resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.28.6.tgz#0e7e56ecedb78aeef66ce7972b082fce76a23e57"
+ resolved "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz"
integrity sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==
dependencies:
"@babel/code-frame" "^7.28.6"
@@ -243,7 +243,7 @@
"@babel/traverse@^7.27.1", "@babel/traverse@^7.28.5", "@babel/traverse@^7.28.6", "@babel/traverse@^7.29.0":
version "7.29.0"
- resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.29.0.tgz#f323d05001440253eead3c9c858adbe00b90310a"
+ resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz"
integrity sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==
dependencies:
"@babel/code-frame" "^7.29.0"
@@ -256,7 +256,7 @@
"@babel/types@^7.27.1", "@babel/types@^7.27.3", "@babel/types@^7.28.5", "@babel/types@^7.28.6", "@babel/types@^7.29.0":
version "7.29.0"
- resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.29.0.tgz#9f5b1e838c446e72cf3cd4b918152b8c605e37c7"
+ resolved "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz"
integrity sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==
dependencies:
"@babel/helper-string-parser" "^7.27.1"
@@ -264,7 +264,7 @@
"@base-ui/react@^1.2.0":
version "1.2.0"
- resolved "https://registry.yarnpkg.com/@base-ui/react/-/react-1.2.0.tgz#5cc6e813eb964e9d91917f6c54577c8de1bebe16"
+ resolved "https://registry.npmjs.org/@base-ui/react/-/react-1.2.0.tgz"
integrity sha512-O6aEQHcm+QyGTFY28xuwRD3SEJGZOBDpyjN2WvpfWYFVhg+3zfXPysAILqtM0C1kWC82MccOE/v1j+GHXE4qIw==
dependencies:
"@babel/runtime" "^7.28.6"
@@ -276,7 +276,7 @@
"@base-ui/[email protected]":
version "0.2.5"
- resolved "https://registry.yarnpkg.com/@base-ui/utils/-/utils-0.2.5.tgz#09ac6e73b7ff4a934c20b7541e654900b74d178a"
+ resolved "https://registry.npmjs.org/@base-ui/utils/-/utils-0.2.5.tgz"
integrity sha512-oYC7w0gp76RI5MxprlGLV0wze0SErZaRl3AAkeP3OnNB/UBMb6RqNf6ZSIlxOc9Qp68Ab3C2VOcJQyRs7Xc7Vw==
dependencies:
"@babel/runtime" "^7.28.6"
@@ -286,7 +286,7 @@
"@dotenvx/dotenvx@^1.48.4":
version "1.54.1"
- resolved "https://registry.yarnpkg.com/@dotenvx/dotenvx/-/dotenvx-1.54.1.tgz#a625bbb22597c5f295cb570a835a9dcb45d00619"
+ resolved "https://registry.npmjs.org/@dotenvx/dotenvx/-/dotenvx-1.54.1.tgz"
integrity sha512-41gU3q7v05GM92QPuPUf4CmUw+mmF8p4wLUh6MCRlxpCkJ9ByLcY9jUf6MwrMNmiKyG/rIckNxj9SCfmNCmCqw==
dependencies:
commander "^11.1.0"
@@ -301,46 +301,24 @@
"@ecies/ciphers@^0.2.5":
version "0.2.5"
- resolved "https://registry.yarnpkg.com/@ecies/ciphers/-/ciphers-0.2.5.tgz#754ff2f821645f0465d18a1a68198eb15d16c2a0"
+ resolved "https://registry.npmjs.org/@ecies/ciphers/-/ciphers-0.2.5.tgz"
integrity sha512-GalEZH4JgOMHYYcYmVqnFirFsjZHeoGMDt9IxEnM9F7GRUUyUksJ7Ou53L83WHJq3RWKD3AcBpo0iQh0oMpf8A==
-"@emnapi/core@^1.4.3", "@emnapi/core@^1.7.1", "@emnapi/core@^1.8.1":
- version "1.8.1"
- resolved "https://registry.yarnpkg.com/@emnapi/core/-/core-1.8.1.tgz#fd9efe721a616288345ffee17a1f26ac5dd01349"
- integrity sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg==
- dependencies:
- "@emnapi/wasi-threads" "1.1.0"
- tslib "^2.4.0"
-
-"@emnapi/runtime@^1.4.3", "@emnapi/runtime@^1.7.0", "@emnapi/runtime@^1.7.1", "@emnapi/runtime@^1.8.1":
- version "1.8.1"
- resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.8.1.tgz#550fa7e3c0d49c5fb175a116e8cd70614f9a22a5"
- integrity sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg==
- dependencies:
- tslib "^2.4.0"
-
-"@emnapi/[email protected]", "@emnapi/wasi-threads@^1.1.0":
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/@emnapi/wasi-threads/-/wasi-threads-1.1.0.tgz#60b2102fddc9ccb78607e4a3cf8403ea69be41bf"
- integrity sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==
- dependencies:
- tslib "^2.4.0"
-
"@eslint-community/eslint-utils@^4.8.0", "@eslint-community/eslint-utils@^4.9.1":
version "4.9.1"
- resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz#4e90af67bc51ddee6cdef5284edf572ec376b595"
+ resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz"
integrity sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==
dependencies:
eslint-visitor-keys "^3.4.3"
"@eslint-community/regexpp@^4.12.1", "@eslint-community/regexpp@^4.12.2":
version "4.12.2"
- resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.2.tgz#bccdf615bcf7b6e8db830ec0b8d21c9a25de597b"
+ resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz"
integrity sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==
"@eslint/config-array@^0.21.2":
version "0.21.2"
- resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.21.2.tgz#f29e22057ad5316cf23836cee9a34c81fffcb7e6"
+ resolved "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.2.tgz"
integrity sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==
dependencies:
"@eslint/object-schema" "^2.1.7"
@@ -349,21 +327,21 @@
"@eslint/config-helpers@^0.4.2":
version "0.4.2"
- resolved "https://registry.yarnpkg.com/@eslint/config-helpers/-/config-helpers-0.4.2.tgz#1bd006ceeb7e2e55b2b773ab318d300e1a66aeda"
+ resolved "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz"
integrity sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==
dependencies:
"@eslint/core" "^0.17.0"
"@eslint/core@^0.17.0":
version "0.17.0"
- resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.17.0.tgz#77225820413d9617509da9342190a2019e78761c"
+ resolved "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz"
integrity sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==
dependencies:
"@types/json-schema" "^7.0.15"
"@eslint/eslintrc@^3.3.5":
version "3.3.5"
- resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.3.5.tgz#c131793cfc1a7b96f24a83e0a8bbd4b881558c60"
+ resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.5.tgz"
integrity sha512-4IlJx0X0qftVsN5E+/vGujTRIFtwuLbNsVUe7TO6zYPDR1O6nFwvwhIKEKSrl6dZchmYBITazxKoUYOjdtjlRg==
dependencies:
ajv "^6.14.0"
@@ -378,17 +356,17 @@
"@eslint/[email protected]":
version "9.39.4"
- resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.39.4.tgz#a3f83bfc6fd9bf33a853dfacd0b49b398eb596c1"
+ resolved "https://registry.npmjs.org/@eslint/js/-/js-9.39.4.tgz"
integrity sha512-nE7DEIchvtiFTwBw4Lfbu59PG+kCofhjsKaCWzxTpt4lfRjRMqG6uMBzKXuEcyXhOHoUp9riAm7/aWYGhXZ9cw==
"@eslint/object-schema@^2.1.7":
version "2.1.7"
- resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.7.tgz#6e2126a1347e86a4dedf8706ec67ff8e107ebbad"
+ resolved "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz"
integrity sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==
"@eslint/plugin-kit@^0.4.1":
version "0.4.1"
- resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz#9779e3fd9b7ee33571a57435cf4335a1794a6cb2"
+ resolved "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz"
integrity sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==
dependencies:
"@eslint/core" "^0.17.0"
@@ -396,14 +374,14 @@
"@floating-ui/core@^1.7.5":
version "1.7.5"
- resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.7.5.tgz#d4af157a03330af5a60e69da7a4692507ada0622"
+ resolved "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.5.tgz"
integrity sha512-1Ih4WTWyw0+lKyFMcBHGbb5U5FtuHJuujoyyr5zTaWS5EYMeT6Jb2AuDeftsCsEuchO+mM2ij5+q9crhydzLhQ==
dependencies:
"@floating-ui/utils" "^0.2.11"
"@floating-ui/dom@^1.7.6":
version "1.7.6"
- resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.7.6.tgz#f915bba5abbb177e1f227cacee1b4d0634b187bf"
+ resolved "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.6.tgz"
integrity sha512-9gZSAI5XM36880PPMm//9dfiEngYoC6Am2izES1FF406YFsjvyBMmeJ2g4SAju3xWwtuynNRFL2s9hgxpLI5SQ==
dependencies:
"@floating-ui/core" "^1.7.5"
@@ -411,29 +389,71 @@
"@floating-ui/react-dom@^2.1.6":
version "2.1.8"
- resolved "https://registry.yarnpkg.com/@floating-ui/react-dom/-/react-dom-2.1.8.tgz#5fb5a20d10aafb9505f38c24f38d00c8e1598893"
+ resolved "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.8.tgz"
integrity sha512-cC52bHwM/n/CxS87FH0yWdngEZrjdtLW/qVruo68qg+prK7ZQ4YGdut2GyDVpoGeAYe/h899rVeOVm6Oi40k2A==
dependencies:
"@floating-ui/dom" "^1.7.6"
"@floating-ui/utils@^0.2.10", "@floating-ui/utils@^0.2.11":
version "0.2.11"
- resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.11.tgz#a269e055e40e2f45873bae9d1a2fdccbd314ea3f"
+ resolved "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.11.tgz"
integrity sha512-RiB/yIh78pcIxl6lLMG0CgBXAZ2Y0eVHqMPYugu+9U0AeT6YBeiJpf7lbdJNIugFP5SIjwNRgo4DhR1Qxi26Gg==
+"@formatjs/[email protected]":
+ version "3.1.1"
+ resolved "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-3.1.1.tgz"
+ integrity sha512-jhZbTwda+2tcNrs4kKvxrPLPjx8QsBCLCUgrrJ/S+G9YrGHWLhAyFMMBHJBnBoOwuLHd7L14FgYudviKaxkO2Q==
+ dependencies:
+ "@formatjs/fast-memoize" "3.1.0"
+ "@formatjs/intl-localematcher" "0.8.1"
+ decimal.js "^10.6.0"
+ tslib "^2.8.1"
+
+"@formatjs/fast-memoize@^3.1.0", "@formatjs/[email protected]":
+ version "3.1.0"
+ resolved "https://registry.npmjs.org/@formatjs/fast-memoize/-/fast-memoize-3.1.0.tgz"
+ integrity sha512-b5mvSWCI+XVKiz5WhnBCY3RJ4ZwfjAidU0yVlKa3d3MSgKmH1hC3tBGEAtYyN5mqL7N0G5x0BOUYyO8CEupWgg==
+ dependencies:
+ tslib "^2.8.1"
+
+"@formatjs/icu-messageformat-parser@^3.4.0", "@formatjs/[email protected]":
+ version "3.5.1"
+ resolved "https://registry.npmjs.org/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-3.5.1.tgz"
+ integrity sha512-sSDmSvmmoVQ92XqWb499KrIhv/vLisJU8ITFrx7T7NZHUmMY7EL9xgRowAosaljhqnj/5iufG24QrdzB6X3ItA==
+ dependencies:
+ "@formatjs/ecma402-abstract" "3.1.1"
+ "@formatjs/icu-skeleton-parser" "2.1.1"
+ tslib "^2.8.1"
+
+"@formatjs/[email protected]":
+ version "2.1.1"
+ resolved "https://registry.npmjs.org/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-2.1.1.tgz"
+ integrity sha512-PSFABlcNefjI6yyk8f7nyX1DC7NHmq6WaCHZLySEXBrXuLOB2f935YsnzuPjlz+ibhb9yWTdPeVX1OVcj24w2Q==
+ dependencies:
+ "@formatjs/ecma402-abstract" "3.1.1"
+ tslib "^2.8.1"
+
+"@formatjs/intl-localematcher@^0.8.1", "@formatjs/[email protected]":
+ version "0.8.1"
+ resolved "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.8.1.tgz"
+ integrity sha512-xwEuwQFdtSq1UKtQnyTZWC+eHdv7Uygoa+H2k/9uzBVQjDyp9r20LNDNKedWXll7FssT3GRHvqsdJGYSUWqYFA==
+ dependencies:
+ "@formatjs/fast-memoize" "3.1.0"
+ tslib "^2.8.1"
+
"@hono/node-server@^1.19.9":
version "1.19.11"
- resolved "https://registry.yarnpkg.com/@hono/node-server/-/node-server-1.19.11.tgz#dc419f0826dd2504e9fc86ad289d5636a0444e2f"
+ resolved "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.11.tgz"
integrity sha512-dr8/3zEaB+p0D2n/IUrlPF1HZm586qgJNXK1a9fhg/PzdtkK7Ksd5l312tJX2yBuALqDYBlG20QEbayqPyxn+g==
"@humanfs/core@^0.19.1":
version "0.19.1"
- resolved "https://registry.yarnpkg.com/@humanfs/core/-/core-0.19.1.tgz#17c55ca7d426733fe3c561906b8173c336b40a77"
+ resolved "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz"
integrity sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==
"@humanfs/node@^0.16.6":
version "0.16.7"
- resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.7.tgz#822cb7b3a12c5a240a24f621b5a2413e27a45f26"
+ resolved "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz"
integrity sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==
dependencies:
"@humanfs/core" "^0.19.1"
@@ -441,169 +461,39 @@
"@humanwhocodes/module-importer@^1.0.1":
version "1.0.1"
- resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c"
+ resolved "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz"
integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==
"@humanwhocodes/retry@^0.4.0", "@humanwhocodes/retry@^0.4.2":
version "0.4.3"
- resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.3.tgz#c2b9d2e374ee62c586d3adbea87199b1d7a7a6ba"
+ resolved "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz"
integrity sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==
"@img/colour@^1.0.0":
version "1.1.0"
- resolved "https://registry.yarnpkg.com/@img/colour/-/colour-1.1.0.tgz#b0c2c2fa661adf75effd6b4964497cd80010bb9d"
+ resolved "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz"
integrity sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==
version "0.34.5"
- resolved "https://registry.yarnpkg.com/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.5.tgz#6e0732dcade126b6670af7aa17060b926835ea86"
+ resolved "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.5.tgz"
integrity sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==
optionalDependencies:
"@img/sharp-libvips-darwin-arm64" "1.2.4"
- version "0.34.5"
- resolved "https://registry.yarnpkg.com/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.5.tgz#19bc1dd6eba6d5a96283498b9c9f401180ee9c7b"
- integrity sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==
- optionalDependencies:
- "@img/sharp-libvips-darwin-x64" "1.2.4"
-
version "1.2.4"
- resolved "https://registry.yarnpkg.com/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.4.tgz#2894c0cb87d42276c3889942e8e2db517a492c43"
+ resolved "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.4.tgz"
integrity sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==
- version "1.2.4"
- resolved "https://registry.yarnpkg.com/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.4.tgz#e63681f4539a94af9cd17246ed8881734386f8cc"
- integrity sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==
-
- version "1.2.4"
- resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.4.tgz#b1b288b36864b3bce545ad91fa6dadcf1a4ad318"
- integrity sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==
-
- version "1.2.4"
- resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.4.tgz#b9260dd1ebe6f9e3bdbcbdcac9d2ac125f35852d"
- integrity sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==
-
- version "1.2.4"
- resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.2.4.tgz#4b83ecf2a829057222b38848c7b022e7b4d07aa7"
- integrity sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==
-
- version "1.2.4"
- resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.2.4.tgz#880b4678009e5a2080af192332b00b0aaf8a48de"
- integrity sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==
-
- version "1.2.4"
- resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.2.4.tgz#74f343c8e10fad821b38f75ced30488939dc59ec"
- integrity sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==
-
- version "1.2.4"
- resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.2.4.tgz#df4183e8bd8410f7d61b66859a35edeab0a531ce"
- integrity sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==
-
- version "1.2.4"
- resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.2.4.tgz#c8d6b48211df67137541007ee8d1b7b1f8ca8e06"
- integrity sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==
-
- version "1.2.4"
- resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.2.4.tgz#be11c75bee5b080cbee31a153a8779448f919f75"
- integrity sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==
-
- version "0.34.5"
- resolved "https://registry.yarnpkg.com/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.5.tgz#7aa7764ef9c001f15e610546d42fce56911790cc"
- integrity sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==
- optionalDependencies:
- "@img/sharp-libvips-linux-arm64" "1.2.4"
-
- version "0.34.5"
- resolved "https://registry.yarnpkg.com/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.5.tgz#5fb0c3695dd12522d39c3ff7a6bc816461780a0d"
- integrity sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==
- optionalDependencies:
- "@img/sharp-libvips-linux-arm" "1.2.4"
-
- version "0.34.5"
- resolved "https://registry.yarnpkg.com/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.34.5.tgz#9c213a81520a20caf66978f3d4c07456ff2e0813"
- integrity sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==
- optionalDependencies:
- "@img/sharp-libvips-linux-ppc64" "1.2.4"
-
- version "0.34.5"
- resolved "https://registry.yarnpkg.com/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.34.5.tgz#cdd28182774eadbe04f62675a16aabbccb833f60"
- integrity sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==
- optionalDependencies:
- "@img/sharp-libvips-linux-riscv64" "1.2.4"
-
- version "0.34.5"
- resolved "https://registry.yarnpkg.com/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.5.tgz#93eac601b9f329bb27917e0e19098c722d630df7"
- integrity sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==
- optionalDependencies:
- "@img/sharp-libvips-linux-s390x" "1.2.4"
-
- version "0.34.5"
- resolved "https://registry.yarnpkg.com/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.5.tgz#55abc7cd754ffca5002b6c2b719abdfc846819a8"
- integrity sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==
- optionalDependencies:
- "@img/sharp-libvips-linux-x64" "1.2.4"
-
- version "0.34.5"
- resolved "https://registry.yarnpkg.com/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.5.tgz#d6515ee971bb62f73001a4829b9d865a11b77086"
- integrity sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==
- optionalDependencies:
- "@img/sharp-libvips-linuxmusl-arm64" "1.2.4"
-
- version "0.34.5"
- resolved "https://registry.yarnpkg.com/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.5.tgz#d97978aec7c5212f999714f2f5b736457e12ee9f"
- integrity sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==
- optionalDependencies:
- "@img/sharp-libvips-linuxmusl-x64" "1.2.4"
-
- version "0.34.5"
- resolved "https://registry.yarnpkg.com/@img/sharp-wasm32/-/sharp-wasm32-0.34.5.tgz#2f15803aa626f8c59dd7c9d0bbc766f1ab52cfa0"
- integrity sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==
- dependencies:
- "@emnapi/runtime" "^1.7.0"
-
- version "0.34.5"
- resolved "https://registry.yarnpkg.com/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.34.5.tgz#3706e9e3ac35fddfc1c87f94e849f1b75307ce0a"
- integrity sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==
-
- version "0.34.5"
- resolved "https://registry.yarnpkg.com/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.5.tgz#0b71166599b049e032f085fb9263e02f4e4788de"
- integrity sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==
-
- version "0.34.5"
- resolved "https://registry.yarnpkg.com/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.5.tgz#a81ffb00e69267cd0a1d626eaedb8a8430b2b2f8"
- integrity sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==
-
"@inquirer/ansi@^1.0.2":
version "1.0.2"
- resolved "https://registry.yarnpkg.com/@inquirer/ansi/-/ansi-1.0.2.tgz#674a4c4d81ad460695cb2a1fc69d78cd187f337e"
+ resolved "https://registry.npmjs.org/@inquirer/ansi/-/ansi-1.0.2.tgz"
integrity sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ==
"@inquirer/confirm@^5.0.0":
version "5.1.21"
- resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-5.1.21.tgz#610c4acd7797d94890a6e2dde2c98eb1e891dd12"
+ resolved "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.21.tgz"
integrity sha512-KR8edRkIsUayMXV+o3Gv+q4jlhENF9nMYUZs9PA2HzrXeHI8M5uDag70U7RJn9yyiMZSbtF5/UexBtAVtZGSbQ==
dependencies:
"@inquirer/core" "^10.3.2"
@@ -611,7 +501,7 @@
"@inquirer/core@^10.3.2":
version "10.3.2"
- resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-10.3.2.tgz#535979ff3ff4fe1e7cc4f83e2320504c743b7e20"
+ resolved "https://registry.npmjs.org/@inquirer/core/-/core-10.3.2.tgz"
integrity sha512-43RTuEbfP8MbKzedNqBrlhhNKVwoK//vUFNW3Q3vZ88BLcrs4kYpGg+B2mm5p2K/HfygoCxuKwJJiv8PbGmE0A==
dependencies:
"@inquirer/ansi" "^1.0.2"
@@ -625,17 +515,17 @@
"@inquirer/figures@^1.0.15":
version "1.0.15"
- resolved "https://registry.yarnpkg.com/@inquirer/figures/-/figures-1.0.15.tgz#dbb49ed80df11df74268023b496ac5d9acd22b3a"
+ resolved "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.15.tgz"
integrity sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g==
"@inquirer/type@^3.0.10":
version "3.0.10"
- resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-3.0.10.tgz#11ed564ec78432a200ea2601a212d24af8150d50"
+ resolved "https://registry.npmjs.org/@inquirer/type/-/type-3.0.10.tgz"
integrity sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==
"@jridgewell/gen-mapping@^0.3.12", "@jridgewell/gen-mapping@^0.3.5":
version "0.3.13"
- resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz#6342a19f44347518c93e43b1ac69deb3c4656a1f"
+ resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz"
integrity sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==
dependencies:
"@jridgewell/sourcemap-codec" "^1.5.0"
@@ -643,7 +533,7 @@
"@jridgewell/remapping@^2.3.5":
version "2.3.5"
- resolved "https://registry.yarnpkg.com/@jridgewell/remapping/-/remapping-2.3.5.tgz#375c476d1972947851ba1e15ae8f123047445aa1"
+ resolved "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz"
integrity sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==
dependencies:
"@jridgewell/gen-mapping" "^0.3.5"
@@ -651,17 +541,17 @@
"@jridgewell/resolve-uri@^3.1.0":
version "3.1.2"
- resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6"
+ resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz"
integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==
"@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.5.0", "@jridgewell/sourcemap-codec@^1.5.5":
version "1.5.5"
- resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba"
+ resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz"
integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==
"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.28":
version "0.3.31"
- resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0"
+ resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz"
integrity sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==
dependencies:
"@jridgewell/resolve-uri" "^3.1.0"
@@ -669,7 +559,7 @@
"@modelcontextprotocol/sdk@^1.26.0":
version "1.27.1"
- resolved "https://registry.yarnpkg.com/@modelcontextprotocol/sdk/-/sdk-1.27.1.tgz#a602cf823bf8a68e13e7112f50aeb02b09fb83b9"
+ resolved "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.27.1.tgz"
integrity sha512-sr6GbP+4edBwFndLbM60gf07z0FQ79gaExpnsjMGePXqFcSSb7t6iscpjk9DhFhwd+mTEQrzNafGP8/iGGFYaA==
dependencies:
"@hono/node-server" "^1.19.9"
@@ -692,7 +582,7 @@
"@mswjs/interceptors@^0.41.2":
version "0.41.3"
- resolved "https://registry.yarnpkg.com/@mswjs/interceptors/-/interceptors-0.41.3.tgz#d766dc1a168aa315a6a0b2d0f2e0cf1b74f23c82"
+ resolved "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.41.3.tgz"
integrity sha512-cXu86tF4VQVfwz8W1SPbhoRyHJkti6mjH/XJIxp40jhO4j2k1m4KYrEykxqWPkFF3vrK4rgQppBh//AwyGSXPA==
dependencies:
"@open-draft/deferred-promise" "^2.2.0"
@@ -702,109 +592,56 @@
outvariant "^1.4.3"
strict-event-emitter "^0.5.1"
-"@napi-rs/wasm-runtime@^0.2.11":
- version "0.2.12"
- resolved "https://registry.yarnpkg.com/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz#3e78a8b96e6c33a6c517e1894efbd5385a7cb6f2"
- integrity sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==
- dependencies:
- "@emnapi/core" "^1.4.3"
- "@emnapi/runtime" "^1.4.3"
- "@tybys/wasm-util" "^0.10.0"
-
-"@napi-rs/wasm-runtime@^1.1.1":
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.1.tgz#c3705ab549d176b8dc5172723d6156c3dc426af2"
- integrity sha512-p64ah1M1ld8xjWv3qbvFwHiFVWrq1yFvV4f7w+mzaqiR4IlSgkqhcRdHwsGgomwzBH51sRY4NEowLxnaBjcW/A==
- dependencies:
- "@emnapi/core" "^1.7.1"
- "@emnapi/runtime" "^1.7.1"
- "@tybys/wasm-util" "^0.10.1"
-
version "16.1.6"
- resolved "https://registry.yarnpkg.com/@next/env/-/env-16.1.6.tgz#0f85979498249a94ef606ef535042a831f905e89"
+ resolved "https://registry.npmjs.org/@next/env/-/env-16.1.6.tgz"
integrity sha512-N1ySLuZjnAtN3kFnwhAwPvZah8RJxKasD7x1f8shFqhncnWZn4JMfg37diLNuoHsLAlrDfM3g4mawVdtAG8XLQ==
version "16.1.6"
- resolved "https://registry.yarnpkg.com/@next/eslint-plugin-next/-/eslint-plugin-next-16.1.6.tgz#73b56b01c9db506998bd1e2d303c2605b0a1b7b0"
+ resolved "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-16.1.6.tgz"
integrity sha512-/Qq3PTagA6+nYVfryAtQ7/9FEr/6YVyvOtl6rZnGsbReGLf0jZU6gkpr1FuChAQpvV46a78p4cmHOVP8mbfSMQ==
dependencies:
fast-glob "3.3.1"
version "16.1.6"
- resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.1.6.tgz#fbe1e360efdcc9ebd0a10301518275bc59e12a91"
+ resolved "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.1.6.tgz"
integrity sha512-wTzYulosJr/6nFnqGW7FrG3jfUUlEf8UjGA0/pyypJl42ExdVgC6xJgcXQ+V8QFn6niSG2Pb8+MIG1mZr2vczw==
- version "16.1.6"
- resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-16.1.6.tgz#0e3781ef3abc8251c2a21addc733d9a87f44829b"
- integrity sha512-BLFPYPDO+MNJsiDWbeVzqvYd4NyuRrEYVB5k2N3JfWncuHAy2IVwMAOlVQDFjj+krkWzhY2apvmekMkfQR0CUQ==
-
- version "16.1.6"
- resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.1.6.tgz#b24511af2c6129f2deaf5c8c04d297fe09cd40d7"
- integrity sha512-OJYkCd5pj/QloBvoEcJ2XiMnlJkRv9idWA/j0ugSuA34gMT6f5b7vOiCQHVRpvStoZUknhl6/UxOXL4OwtdaBw==
-
- version "16.1.6"
- resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.1.6.tgz#9d4ed0565689fc6a867250f994736a5b8c542ccb"
- integrity sha512-S4J2v+8tT3NIO9u2q+S0G5KdvNDjXfAv06OhfOzNDaBn5rw84DGXWndOEB7d5/x852A20sW1M56vhC/tRVbccQ==
-
- version "16.1.6"
- resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-16.1.6.tgz#cc757f4384e7eab7d3dba704a97f737518bae0d2"
- integrity sha512-2eEBDkFlMMNQnkTyPBhQOAyn2qMxyG2eE7GPH2WIDGEpEILcBPI/jdSv4t6xupSP+ot/jkfrCShLAa7+ZUPcJQ==
-
- version "16.1.6"
- resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.1.6.tgz#ef1341740f29717deea7c6ec27ae6269386e20d1"
- integrity sha512-oicJwRlyOoZXVlxmIMaTq7f8pN9QNbdes0q2FXfRsPhfCi8n8JmOZJm5oo1pwDaFbnnD421rVU409M3evFbIqg==
-
- version "16.1.6"
- resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.1.6.tgz#fee8719242aecf9c39c3a66f1f73821f7884dd16"
- integrity sha512-gQmm8izDTPgs+DCWH22kcDmuUp7NyiJgEl18bcr8irXA5N2m2O+JQIr6f3ct42GOs9c0h8QF3L5SzIxcYAAXXw==
-
- version "16.1.6"
- resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.1.6.tgz#60c27323c30f35722b20fd6d62449fbb768e46d9"
- integrity sha512-NRfO39AIrzBnixKbjuo2YiYhB6o9d8v/ymU9m/Xk8cyVk+k7XylniXkHwjs4s70wedVffc6bQNbufk5v0xEm0A==
-
-"@noble/ciphers@^1.3.0":
+"@noble/ciphers@^1.0.0", "@noble/ciphers@^1.3.0":
version "1.3.0"
- resolved "https://registry.yarnpkg.com/@noble/ciphers/-/ciphers-1.3.0.tgz#f64b8ff886c240e644e5573c097f86e5b43676dc"
+ resolved "https://registry.npmjs.org/@noble/ciphers/-/ciphers-1.3.0.tgz"
integrity sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw==
"@noble/curves@^1.9.7":
version "1.9.7"
- resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.9.7.tgz#79d04b4758a43e4bca2cbdc62e7771352fa6b951"
+ resolved "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz"
integrity sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==
dependencies:
"@noble/hashes" "1.8.0"
-"@noble/[email protected]", "@noble/hashes@^1.8.0":
+"@noble/hashes@^1.8.0", "@noble/[email protected]":
version "1.8.0"
- resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.8.0.tgz#cee43d801fcef9644b11b8194857695acd5f815a"
+ resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz"
integrity sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==
"@nodelib/[email protected]":
version "2.1.5"
- resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
+ resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz"
integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==
dependencies:
"@nodelib/fs.stat" "2.0.5"
run-parallel "^1.1.9"
-"@nodelib/[email protected]", "@nodelib/fs.stat@^2.0.2":
+"@nodelib/fs.stat@^2.0.2", "@nodelib/[email protected]":
version "2.0.5"
- resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b"
+ resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz"
integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==
"@nodelib/fs.walk@^1.2.3":
version "1.2.8"
- resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a"
+ resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz"
integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==
dependencies:
"@nodelib/fs.scandir" "2.1.5"
@@ -812,17 +649,17 @@
"@nolyfill/[email protected]":
version "1.0.39"
- resolved "https://registry.yarnpkg.com/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz#3dc35ba0f1e66b403c00b39344f870298ebb1c8e"
+ resolved "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz"
integrity sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==
"@open-draft/deferred-promise@^2.2.0":
version "2.2.0"
- resolved "https://registry.yarnpkg.com/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz#4a822d10f6f0e316be4d67b4d4f8c9a124b073bd"
+ resolved "https://registry.npmjs.org/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz"
integrity sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==
"@open-draft/logger@^0.3.0":
version "0.3.0"
- resolved "https://registry.yarnpkg.com/@open-draft/logger/-/logger-0.3.0.tgz#2b3ab1242b360aa0adb28b85f5d7da1c133a0954"
+ resolved "https://registry.npmjs.org/@open-draft/logger/-/logger-0.3.0.tgz"
integrity sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==
dependencies:
is-node-process "^1.2.0"
@@ -830,34 +667,326 @@
"@open-draft/until@^2.0.0":
version "2.1.0"
- resolved "https://registry.yarnpkg.com/@open-draft/until/-/until-2.1.0.tgz#0acf32f470af2ceaf47f095cdecd40d68666efda"
+ resolved "https://registry.npmjs.org/@open-draft/until/-/until-2.1.0.tgz"
integrity sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==
+"@parcel/[email protected]":
+ version "2.5.6"
+ resolved "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.6.tgz"
+ integrity sha512-Z2ZdrnwyXvvvdtRHLmM4knydIdU9adO3D4n/0cVipF3rRiwP+3/sfzpAwA/qKFL6i1ModaabkU7IbpeMBgiVEA==
+
+"@parcel/watcher@^2.4.1":
+ version "2.5.6"
+ resolved "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.6.tgz"
+ integrity sha512-tmmZ3lQxAe/k/+rNnXQRawJ4NjxO2hqiOLTHvWchtGZULp4RyFeh6aU4XdOYBFe2KE1oShQTv4AblOs2iOrNnQ==
+ dependencies:
+ detect-libc "^2.0.3"
+ is-glob "^4.0.3"
+ node-addon-api "^7.0.0"
+ picomatch "^4.0.3"
+ optionalDependencies:
+ "@parcel/watcher-android-arm64" "2.5.6"
+ "@parcel/watcher-darwin-arm64" "2.5.6"
+ "@parcel/watcher-darwin-x64" "2.5.6"
+ "@parcel/watcher-freebsd-x64" "2.5.6"
+ "@parcel/watcher-linux-arm-glibc" "2.5.6"
+ "@parcel/watcher-linux-arm-musl" "2.5.6"
+ "@parcel/watcher-linux-arm64-glibc" "2.5.6"
+ "@parcel/watcher-linux-arm64-musl" "2.5.6"
+ "@parcel/watcher-linux-x64-glibc" "2.5.6"
+ "@parcel/watcher-linux-x64-musl" "2.5.6"
+ "@parcel/watcher-win32-arm64" "2.5.6"
+ "@parcel/watcher-win32-ia32" "2.5.6"
+ "@parcel/watcher-win32-x64" "2.5.6"
+
+"@radix-ui/[email protected]":
+ version "1.1.3"
+ resolved "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.3.tgz"
+ integrity sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg==
+
+"@radix-ui/react-checkbox@^1.3.3":
+ version "1.3.3"
+ resolved "https://registry.npmjs.org/@radix-ui/react-checkbox/-/react-checkbox-1.3.3.tgz"
+ integrity sha512-wBbpv+NQftHDdG86Qc0pIyXk5IR3tM8Vd0nWLKDcX8nNn4nXFOFwsKuqw2okA/1D/mpaAkmuyndrPJTYDNZtFw==
+ dependencies:
+ "@radix-ui/primitive" "1.1.3"
+ "@radix-ui/react-compose-refs" "1.1.2"
+ "@radix-ui/react-context" "1.1.2"
+ "@radix-ui/react-presence" "1.1.5"
+ "@radix-ui/react-primitive" "2.1.3"
+ "@radix-ui/react-use-controllable-state" "1.2.2"
+ "@radix-ui/react-use-previous" "1.1.1"
+ "@radix-ui/react-use-size" "1.1.1"
+
+"@radix-ui/[email protected]":
+ version "1.1.2"
+ resolved "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz"
+ integrity sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==
+
+"@radix-ui/[email protected]":
+ version "1.1.2"
+ resolved "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.2.tgz"
+ integrity sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==
+
+"@radix-ui/[email protected]":
+ version "1.1.5"
+ resolved "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.5.tgz"
+ integrity sha512-/jfEwNDdQVBCNvjkGit4h6pMOzq8bHkopq458dPt2lMjx+eBQUohZNG9A7DtO/O5ukSbxuaNGXMjHicgwy6rQQ==
+ dependencies:
+ "@radix-ui/react-compose-refs" "1.1.2"
+ "@radix-ui/react-use-layout-effect" "1.1.1"
+
+"@radix-ui/[email protected]":
+ version "2.1.3"
+ resolved "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.3.tgz"
+ integrity sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==
+ dependencies:
+ "@radix-ui/react-slot" "1.2.3"
+
+"@radix-ui/[email protected]":
+ version "1.2.3"
+ resolved "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz"
+ integrity sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==
+ dependencies:
+ "@radix-ui/react-compose-refs" "1.1.2"
+
+"@radix-ui/[email protected]":
+ version "1.2.2"
+ resolved "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.2.2.tgz"
+ integrity sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg==
+ dependencies:
+ "@radix-ui/react-use-effect-event" "0.0.2"
+ "@radix-ui/react-use-layout-effect" "1.1.1"
+
+"@radix-ui/[email protected]":
+ version "0.0.2"
+ resolved "https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.2.tgz"
+ integrity sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA==
+ dependencies:
+ "@radix-ui/react-use-layout-effect" "1.1.1"
+
+"@radix-ui/[email protected]":
+ version "1.1.1"
+ resolved "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.1.tgz"
+ integrity sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==
+
+"@radix-ui/[email protected]":
+ version "1.1.1"
+ resolved "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.1.tgz"
+ integrity sha512-2dHfToCj/pzca2Ck724OZ5L0EVrr3eHRNsG/b3xQJLA2hZpVCS99bLAX+hm1IHXDEnzU6by5z/5MIY794/a8NQ==
+
+"@radix-ui/[email protected]":
+ version "1.1.1"
+ resolved "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.1.tgz"
+ integrity sha512-ewrXRDTAqAXlkl6t/fkXWNAhFX9I+CkKlw6zjEwk86RSPKwZr3xpBRso655aqYafwtnbpHLj6toFzmd6xdVptQ==
+ dependencies:
+ "@radix-ui/react-use-layout-effect" "1.1.1"
+
+"@reduxjs/toolkit@^1.9.0 || 2.x.x":
+ version "2.11.2"
+ resolved "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-2.11.2.tgz"
+ integrity sha512-Kd6kAHTA6/nUpp8mySPqj3en3dm0tdMIgbttnQ1xFMVpufoj+ADi8pXLBsd4xzTRHQa7t/Jv8W5UnCuW4kuWMQ==
+ dependencies:
+ "@standard-schema/spec" "^1.0.0"
+ "@standard-schema/utils" "^0.3.0"
+ immer "^11.0.0"
+ redux "^5.0.1"
+ redux-thunk "^3.1.0"
+ reselect "^5.1.0"
+
"@rtsao/scc@^1.1.0":
version "1.1.0"
- resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8"
+ resolved "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz"
integrity sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==
+"@schummar/[email protected]":
+ version "1.21.5"
+ resolved "https://registry.npmjs.org/@schummar/icu-type-parser/-/icu-type-parser-1.21.5.tgz"
+ integrity sha512-bXHSaW5jRTmke9Vd0h5P7BtWZG9Znqb8gSDxZnxaGSJnGwPLDPfS+3g0BKzeWqzgZPsIVZkM7m2tbo18cm5HBw==
+
"@sec-ant/readable-stream@^0.4.1":
version "0.4.1"
- resolved "https://registry.yarnpkg.com/@sec-ant/readable-stream/-/readable-stream-0.4.1.tgz#60de891bb126abfdc5410fdc6166aca065f10a0c"
+ resolved "https://registry.npmjs.org/@sec-ant/readable-stream/-/readable-stream-0.4.1.tgz"
integrity sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==
+"@shikijs/[email protected]":
+ version "4.0.2"
+ dependencies:
+ "@shikijs/primitive" "4.0.2"
+ "@shikijs/types" "4.0.2"
+ "@shikijs/vscode-textmate" "^10.0.2"
+ "@types/hast" "^3.0.4"
+ hast-util-to-html "^9.0.5"
+
+"@shikijs/[email protected]":
+ version "4.0.2"
+ dependencies:
+ "@shikijs/types" "4.0.2"
+ "@shikijs/vscode-textmate" "^10.0.2"
+ oniguruma-to-es "^4.3.4"
+
+"@shikijs/[email protected]":
+ version "4.0.2"
+ dependencies:
+ "@shikijs/types" "4.0.2"
+ "@shikijs/vscode-textmate" "^10.0.2"
+
+"@shikijs/[email protected]":
+ version "4.0.2"
+ dependencies:
+ "@shikijs/types" "4.0.2"
+
+"@shikijs/[email protected]":
+ version "4.0.2"
+ dependencies:
+ "@shikijs/types" "4.0.2"
+ "@shikijs/vscode-textmate" "^10.0.2"
+ "@types/hast" "^3.0.4"
+
+"@shikijs/[email protected]":
+ version "4.0.2"
+ dependencies:
+ "@shikijs/types" "4.0.2"
+
+"@shikijs/[email protected]":
+ version "4.0.2"
+ dependencies:
+ "@shikijs/vscode-textmate" "^10.0.2"
+ "@types/hast" "^3.0.4"
+
+"@shikijs/vscode-textmate@^10.0.2":
+ version "10.0.2"
+
"@sindresorhus/merge-streams@^4.0.0":
version "4.0.0"
- resolved "https://registry.yarnpkg.com/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz#abb11d99aeb6d27f1b563c38147a72d50058e339"
+ resolved "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz"
integrity sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==
+"@standard-schema/spec@^1.0.0":
+ version "1.1.0"
+ resolved "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz"
+ integrity sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==
+
+"@standard-schema/utils@^0.3.0":
+ version "0.3.0"
+ resolved "https://registry.npmjs.org/@standard-schema/utils/-/utils-0.3.0.tgz"
+ integrity sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g==
+
+"@stripe/stripe-js@^9.1.0":
+ version "9.1.0"
+ resolved "https://registry.npmjs.org/@stripe/stripe-js/-/stripe-js-9.1.0.tgz"
+ integrity sha512-v51LoEfZNiNS/5DcarWPCYgn24w4dqwwALR4GTbMW/N0DDzzj4DgYNoixX6PYvpt6uIJMucGUabn/BHhylggIQ==
+
+"@supabase/[email protected]":
+ version "2.99.0"
+ resolved "https://registry.npmjs.org/@supabase/auth-js/-/auth-js-2.99.0.tgz"
+ integrity sha512-tHiIST/OEoLmWBE+3X69xRY5srJM/lL86KltmMlIfDo9ePJLo14vQQV9T4NF+P+MoGhCwQL1GTmk51zuAFMXKw==
+ dependencies:
+ tslib "2.8.1"
+
+"@supabase/[email protected]":
+ version "2.99.0"
+ resolved "https://registry.npmjs.org/@supabase/functions-js/-/functions-js-2.99.0.tgz"
+ integrity sha512-zA9oad6EqGwMLLu2LfP1bXbqKcJGiotAdbdTfZG7YS7619YZQAEgejj9mp+E5vglKE1yMWbKK+S1J3PbuUtgLg==
+ dependencies:
+ tslib "2.8.1"
+
+"@supabase/[email protected]":
+ version "2.99.0"
+ resolved "https://registry.npmjs.org/@supabase/postgrest-js/-/postgrest-js-2.99.0.tgz"
+ integrity sha512-8qfOMi2pu9y0IQhUAeFqjrvR49G4ELGevXCWV9qAHXFQ/h2FFh0I8PYjFQj4rHcHSq6hrpozDnS1vbQU8NAQ/A==
+ dependencies:
+ tslib "2.8.1"
+
+"@supabase/[email protected]":
+ version "2.99.0"
+ resolved "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-2.99.0.tgz"
+ integrity sha512-7nFTZhNeANR7FvEY6PfWLCfE8dHqcaJd9SuR7IPEZvBPG9K4uEHMivpjZx4NWRSU7Eji7ZbKy2LG+cJ48DhwHg==
+ dependencies:
+ "@types/phoenix" "^1.6.6"
+ "@types/ws" "^8.18.1"
+ tslib "2.8.1"
+ ws "^8.18.2"
+
+"@supabase/ssr@^0.9.0":
+ version "0.9.0"
+ resolved "https://registry.npmjs.org/@supabase/ssr/-/ssr-0.9.0.tgz"
+ integrity sha512-UFY6otYV3yqCgV+AyHj80vNkTvbf1Gas2LW4dpbQ4ap6p6v3eB2oaDfcI99jsuJzwVBCFU4BJI+oDYyhNk1z0Q==
+ dependencies:
+ cookie "^1.0.2"
+
+"@supabase/[email protected]":
+ version "2.99.0"
+ resolved "https://registry.npmjs.org/@supabase/storage-js/-/storage-js-2.99.0.tgz"
+ integrity sha512-mAEEbfsght5EEALejYrwAP9k8sFBGjfMZT8n4SyMXk2iYuWVeRMs1kA/uKg0uDMctWdZ0bL+L4jZzksUJpCjMA==
+ dependencies:
+ iceberg-js "^0.8.1"
+ tslib "2.8.1"
+
+"@supabase/supabase-js@^2.97.0", "@supabase/supabase-js@^2.99.0":
+ version "2.99.0"
+ resolved "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-2.99.0.tgz"
+ integrity sha512-SP9Sn9tsHDB7N4u2gT13rdeZJewE4xibAxasG7vOz+fYi92+XkMMbWNx0uGK53zKTnAnvTs16isRooyBy4sn5w==
+ dependencies:
+ "@supabase/auth-js" "2.99.0"
+ "@supabase/functions-js" "2.99.0"
+ "@supabase/postgrest-js" "2.99.0"
+ "@supabase/realtime-js" "2.99.0"
+ "@supabase/storage-js" "2.99.0"
+
+ version "1.15.18"
+ resolved "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.15.18.tgz"
+ integrity sha512-+mIv7uBuSaywN3C9LNuWaX1jJJ3SKfiJuE6Lr3bd+/1Iv8oMU7oLBjYMluX1UrEPzwN2qCdY6Io0yVicABoCwQ==
+
+"@swc/core@^1.15.2":
+ version "1.15.18"
+ resolved "https://registry.npmjs.org/@swc/core/-/core-1.15.18.tgz"
+ integrity sha512-z87aF9GphWp//fnkRsqvtY+inMVPgYW3zSlXH1kJFvRT5H/wiAn+G32qW5l3oEk63KSF1x3Ov0BfHCObAmT8RA==
+ dependencies:
+ "@swc/counter" "^0.1.3"
+ "@swc/types" "^0.1.25"
+ optionalDependencies:
+ "@swc/core-darwin-arm64" "1.15.18"
+ "@swc/core-darwin-x64" "1.15.18"
+ "@swc/core-linux-arm-gnueabihf" "1.15.18"
+ "@swc/core-linux-arm64-gnu" "1.15.18"
+ "@swc/core-linux-arm64-musl" "1.15.18"
+ "@swc/core-linux-x64-gnu" "1.15.18"
+ "@swc/core-linux-x64-musl" "1.15.18"
+ "@swc/core-win32-arm64-msvc" "1.15.18"
+ "@swc/core-win32-ia32-msvc" "1.15.18"
+ "@swc/core-win32-x64-msvc" "1.15.18"
+
+"@swc/counter@^0.1.3":
+ version "0.1.3"
+ resolved "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz"
+ integrity sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==
+
+"@swc/helpers@>=0.5.17":
+ version "0.5.21"
+ resolved "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.21.tgz"
+ integrity sha512-jI/VAmtdjB/RnI8GTnokyX7Ug8c+g+ffD6QRLa6XQewtnGyukKkKSk3wLTM3b5cjt1jNh9x0jfVlagdN2gDKQg==
+ dependencies:
+ tslib "^2.8.0"
+
version "0.5.15"
- resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.15.tgz#79efab344c5819ecf83a43f3f9f811fc84b516d7"
+ resolved "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz"
integrity sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==
dependencies:
tslib "^2.8.0"
+"@swc/types@^0.1.25":
+ version "0.1.25"
+ resolved "https://registry.npmjs.org/@swc/types/-/types-0.1.25.tgz"
+ integrity sha512-iAoY/qRhNH8a/hBvm3zKj9qQ4oc2+3w1unPJa2XvTK3XjeLXtzcCingVPw/9e5mn1+0yPqxcBGp9Jf0pkfMb1g==
+ dependencies:
+ "@swc/counter" "^0.1.3"
+
"@tailwindcss/[email protected]":
version "4.2.1"
- resolved "https://registry.yarnpkg.com/@tailwindcss/node/-/node-4.2.1.tgz#e963ac242a885353a4660e7e3e9c695cde7d3fc9"
+ resolved "https://registry.npmjs.org/@tailwindcss/node/-/node-4.2.1.tgz"
integrity sha512-jlx6sLk4EOwO6hHe1oCGm1Q4AN/s0rSrTTPBGPM0/RQ6Uylwq17FuU8IeJJKEjtc6K6O07zsvP+gDO6MMWo7pg==
dependencies:
"@jridgewell/remapping" "^2.3.5"
@@ -868,76 +997,14 @@
source-map-js "^1.2.1"
tailwindcss "4.2.1"
-"@tailwindcss/[email protected]":
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.2.1.tgz#a7c24919b607e7f884e6ab97799d12c7fb5b47bd"
- integrity sha512-eZ7G1Zm5EC8OOKaesIKuw77jw++QJ2lL9N+dDpdQiAB/c/B2wDh0QPFHbkBVrXnwNugvrbJFk1gK2SsVjwWReg==
-
"@tailwindcss/[email protected]":
version "4.2.1"
- resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.2.1.tgz#6f6e91ff0e1b5476cc0dad0da1ea8474f4563212"
+ resolved "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.2.1.tgz"
integrity sha512-q/LHkOstoJ7pI1J0q6djesLzRvQSIfEto148ppAd+BVQK0JYjQIFSK3JgYZJa+Yzi0DDa52ZsQx2rqytBnf8Hw==
-"@tailwindcss/[email protected]":
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.2.1.tgz#1e59ef0665f6cb9e658bf0ebcb3cb50f21b2c175"
- integrity sha512-/f/ozlaXGY6QLbpvd/kFTro2l18f7dHKpB+ieXz+Cijl4Mt9AI2rTrpq7V+t04nK+j9XBQHnSMdeQRhbGyt6fw==
-
-"@tailwindcss/[email protected]":
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.2.1.tgz#6b0c75e9dac7f1a241cb9a5eaa89f0d9664835b6"
- integrity sha512-5e/AkgYJT/cpbkys/OU2Ei2jdETCLlifwm7ogMC7/hksI2fC3iiq6OcXwjibcIjPung0kRtR3TxEITkqgn0TcA==
-
-"@tailwindcss/[email protected]":
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.2.1.tgz#717044d8fe746b1f0760485946c0c9a900174f7b"
- integrity sha512-Uny1EcVTTmerCKt/1ZuKTkb0x8ZaiuYucg2/kImO5A5Y/kBz41/+j0gxUZl+hTF3xkWpDmHX+TaWhOtba2Fyuw==
-
-"@tailwindcss/[email protected]":
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.2.1.tgz#f544b0faf166d80791347911b2dd4372a893129d"
- integrity sha512-CTrwomI+c7n6aSSQlsPL0roRiNMDQ/YzMD9EjcR+H4f0I1SQ8QqIuPnsVp7QgMkC1Qi8rtkekLkOFjo7OlEFRQ==
-
-"@tailwindcss/[email protected]":
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.2.1.tgz#9fbaf8dc00b858a2b955526abb15d88f5678d1ef"
- integrity sha512-WZA0CHRL/SP1TRbA5mp9htsppSEkWuQ4KsSUumYQnyl8ZdT39ntwqmz4IUHGN6p4XdSlYfJwM4rRzZLShHsGAQ==
-
-"@tailwindcss/[email protected]":
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.2.1.tgz#6ab4e6b8d308d037a1155b8443df5941dbfa6aa1"
- integrity sha512-qMFzxI2YlBOLW5PhblzuSWlWfwLHaneBE0xHzLrBgNtqN6mWfs+qYbhryGSXQjFYB1Dzf5w+LN5qbUTPhW7Y5g==
-
-"@tailwindcss/[email protected]":
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.2.1.tgz#52c55593394dff85f1fa88172f69f8fdcde182b6"
- integrity sha512-5r1X2FKnCMUPlXTWRYpHdPYUY6a1Ar/t7P24OuiEdEOmms5lyqjDRvVY1yy9Rmioh+AunQ0rWiOTPE8F9A3v5g==
-
-"@tailwindcss/[email protected]":
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.2.1.tgz#7401e35f881d3654b6180badd1243d75a2702ea5"
- integrity sha512-MGFB5cVPvshR85MTJkEvqDUnuNoysrsRxd6vnk1Lf2tbiqNlXpHYZqkqOQalydienEWOHHFyyuTSYRsLfxFJ2Q==
- dependencies:
- "@emnapi/core" "^1.8.1"
- "@emnapi/runtime" "^1.8.1"
- "@emnapi/wasi-threads" "^1.1.0"
- "@napi-rs/wasm-runtime" "^1.1.1"
- "@tybys/wasm-util" "^0.10.1"
- tslib "^2.8.1"
-
-"@tailwindcss/[email protected]":
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.2.1.tgz#63a502e7b696dcd976aa356b94ce0f4f8f832c44"
- integrity sha512-YlUEHRHBGnCMh4Nj4GnqQyBtsshUPdiNroZj8VPkvTZSoHsilRCwXcVKnG9kyi0ZFAS/3u+qKHBdDc81SADTRA==
-
-"@tailwindcss/[email protected]":
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.2.1.tgz#8cc59b28ebc4dc866c0c14d7057f07f0ed04c4a8"
- integrity sha512-rbO34G5sMWWyrN/idLeVxAZgAKWrn5LiR3/I90Q9MkA67s6T1oB0xtTe+0heoBvHSpbU9Mk7i6uwJnpo4u21XQ==
-
"@tailwindcss/[email protected]":
version "4.2.1"
- resolved "https://registry.yarnpkg.com/@tailwindcss/oxide/-/oxide-4.2.1.tgz#43ae4217268a7e8b4736f1c056d0ef6f393c79d3"
+ resolved "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.2.1.tgz"
integrity sha512-yv9jeEFWnjKCI6/T3Oq50yQEOqmpmpfzG1hcZsAOaXFQPfzWprWrlHSdGPEF3WQTi8zu8ohC9Mh9J470nT5pUw==
optionalDependencies:
"@tailwindcss/oxide-android-arm64" "4.2.1"
@@ -955,7 +1022,7 @@
"@tailwindcss/postcss@^4":
version "4.2.1"
- resolved "https://registry.yarnpkg.com/@tailwindcss/postcss/-/postcss-4.2.1.tgz#efce3b23608b23324ed4848ff1aae657adfe0c5f"
+ resolved "https://registry.npmjs.org/@tailwindcss/postcss/-/postcss-4.2.1.tgz"
integrity sha512-OEwGIBnXnj7zJeonOh6ZG9woofIjGrd2BORfvE5p9USYKDCZoQmfqLcfNiRWoJlRWLdNPn2IgVZuWAOM4iTYMw==
dependencies:
"@alloc/quick-lru" "^5.2.0"
@@ -964,69 +1031,173 @@
postcss "^8.5.6"
tailwindcss "4.2.1"
+"@tailwindcss/typography@^0.5.19":
+ version "0.5.19"
+ resolved "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.19.tgz"
+ integrity sha512-w31dd8HOx3k9vPtcQh5QHP9GwKcgbMp87j58qi6xgiBnFFtKEAgCWnDw4qUT8aHwkCp8bKvb/KGKWWHedP0AAg==
+ dependencies:
+ postcss-selector-parser "6.0.10"
+
"@ts-morph/common@~0.27.0":
version "0.27.0"
- resolved "https://registry.yarnpkg.com/@ts-morph/common/-/common-0.27.0.tgz#e83a1bd7cbac054045c6246a7c4c99eab7692d46"
+ resolved "https://registry.npmjs.org/@ts-morph/common/-/common-0.27.0.tgz"
integrity sha512-Wf29UqxWDpc+i61k3oIOzcUfQt79PIT9y/MWfAGlrkjg6lBC1hwDECLXPVJAhWjiGbfBCxZd65F/LIZF3+jeJQ==
dependencies:
fast-glob "^3.3.3"
minimatch "^10.0.1"
path-browserify "^1.0.1"
-"@tybys/wasm-util@^0.10.0", "@tybys/wasm-util@^0.10.1":
- version "0.10.1"
- resolved "https://registry.yarnpkg.com/@tybys/wasm-util/-/wasm-util-0.10.1.tgz#ecddd3205cf1e2d5274649ff0eedd2991ed7f414"
- integrity sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==
+"@types/d3-array@^3.0.3":
+ version "3.2.2"
+ resolved "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz"
+ integrity sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==
+
+"@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==
+
+"@types/d3-ease@^3.0.0":
+ version "3.0.2"
+ resolved "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz"
+ integrity sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==
+
+"@types/d3-interpolate@^3.0.1":
+ version "3.0.4"
+ resolved "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz"
+ integrity sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==
dependencies:
- tslib "^2.4.0"
+ "@types/d3-color" "*"
+
+"@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==
+
+"@types/d3-scale@^4.0.2":
+ version "4.0.9"
+ resolved "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.9.tgz"
+ integrity sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==
+ dependencies:
+ "@types/d3-time" "*"
+
+"@types/d3-shape@^3.1.0":
+ version "3.1.8"
+ resolved "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.8.tgz"
+ integrity sha512-lae0iWfcDeR7qt7rA88BNiqdvPS5pFVPpo5OfjElwNaT2yyekbM0C9vK+yqBqEmHr6lDkRnYNoTBYlAgJa7a4w==
+ dependencies:
+ "@types/d3-path" "*"
+
+"@types/d3-time@*", "@types/d3-time@^3.0.0":
+ version "3.0.4"
+ resolved "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz"
+ integrity sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==
+
+"@types/d3-timer@^3.0.0":
+ version "3.0.2"
+ resolved "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz"
+ integrity sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==
-"@types/estree@^1.0.6":
+"@types/debug@^4.0.0":
+ version "4.1.13"
+ dependencies:
+ "@types/ms" "*"
+
+"@types/estree-jsx@^1.0.0":
+ version "1.0.5"
+ dependencies:
+ "@types/estree" "*"
+
+"@types/estree@*", "@types/estree@^1.0.0", "@types/estree@^1.0.6":
version "1.0.8"
- resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.8.tgz#958b91c991b1867ced318bedea0e215ee050726e"
+ resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz"
integrity sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==
+"@types/hast@^3.0.0", "@types/hast@^3.0.4":
+ version "3.0.4"
+ dependencies:
+ "@types/unist" "*"
+
"@types/json-schema@^7.0.15":
version "7.0.15"
- resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841"
+ resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz"
integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==
"@types/json5@^0.0.29":
version "0.0.29"
- resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
+ resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz"
integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==
-"@types/node@^20":
+"@types/mdast@^4.0.0":
+ version "4.0.4"
+ dependencies:
+ "@types/unist" "*"
+
+"@types/ms@*":
+ version "2.1.0"
+
+"@types/node@*":
+ version "25.3.5"
+ resolved "https://registry.npmjs.org/@types/node/-/node-25.3.5.tgz"
+ integrity sha512-oX8xrhvpiyRCQkG1MFchB09f+cXftgIXb3a7UUa4Y3wpmZPw5tyZGTLWhlESOLq1Rq6oDlc8npVU2/9xiCuXMA==
+ dependencies:
+ undici-types "~7.18.0"
+
+"@types/node@^20", "@types/node@>=18":
version "20.19.37"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-20.19.37.tgz#b4fb4033408dd97becce63ec932c9ec57a9e2919"
+ resolved "https://registry.npmjs.org/@types/node/-/node-20.19.37.tgz"
integrity sha512-8kzdPJ3FsNsVIurqBs7oodNnCEVbni9yUEkaHbgptDACOPW04jimGagZ51E6+lXUwJjgnBw+hyko/lkFWCldqw==
dependencies:
undici-types "~6.21.0"
-"@types/react-dom@^19":
+"@types/phoenix@^1.6.6":
+ version "1.6.7"
+ resolved "https://registry.npmjs.org/@types/phoenix/-/phoenix-1.6.7.tgz"
+ integrity sha512-oN9ive//QSBkf19rfDv45M7eZPi0eEXylht2OLEXicu5b4KoQ1OzXIw+xDSGWxSxe1JmepRR/ZH283vsu518/Q==
+
+"@types/react-dom@*", "@types/react-dom@^19":
version "19.2.3"
- resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.2.3.tgz#c1e305d15a52a3e508d54dca770d202cb63abf2c"
+ resolved "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz"
integrity sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==
-"@types/react@^19":
+"@types/react@*", "@types/react@^17 || ^18 || ^19", "@types/react@^18.2.25 || ^19", "@types/react@^19", "@types/react@^19.2.0", "@types/react@>=18", "@types/react@>=18.0.0":
version "19.2.14"
- resolved "https://registry.yarnpkg.com/@types/react/-/react-19.2.14.tgz#39604929b5e3957e3a6fa0001dafb17c7af70bad"
+ resolved "https://registry.npmjs.org/@types/react/-/react-19.2.14.tgz"
integrity sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==
dependencies:
csstype "^3.2.2"
"@types/statuses@^2.0.6":
version "2.0.6"
- resolved "https://registry.yarnpkg.com/@types/statuses/-/statuses-2.0.6.tgz#66748315cc9a96d63403baa8671b2c124f8633aa"
+ resolved "https://registry.npmjs.org/@types/statuses/-/statuses-2.0.6.tgz"
integrity sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA==
+"@types/unist@*", "@types/unist@^3.0.0":
+ version "3.0.3"
+
+"@types/unist@^2.0.0":
+ version "2.0.11"
+
+"@types/use-sync-external-store@^0.0.6":
+ version "0.0.6"
+ resolved "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.6.tgz"
+ integrity sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==
+
"@types/validate-npm-package-name@^4.0.2":
version "4.0.2"
- resolved "https://registry.yarnpkg.com/@types/validate-npm-package-name/-/validate-npm-package-name-4.0.2.tgz#df0f7dac25df7761f7476605ddac54cb1abda26e"
+ resolved "https://registry.npmjs.org/@types/validate-npm-package-name/-/validate-npm-package-name-4.0.2.tgz"
integrity sha512-lrpDziQipxCEeK5kWxvljWYhUvOiB2A9izZd9B2AFarYAkqZshb4lPbRs7zKEic6eGtH8V/2qJW+dPp9OtF6bw==
+"@types/ws@^8.18.1":
+ version "8.18.1"
+ resolved "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz"
+ integrity sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==
+ dependencies:
+ "@types/node" "*"
+
"@typescript-eslint/[email protected]":
version "8.56.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.56.1.tgz#b1ce606d87221daec571e293009675992f0aae76"
+ resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.56.1.tgz"
integrity sha512-Jz9ZztpB37dNC+HU2HI28Bs9QXpzCz+y/twHOwhyrIRdbuVDxSytJNDl6z/aAKlaRIwC7y8wJdkBv7FxYGgi0A==
dependencies:
"@eslint-community/regexpp" "^4.12.2"
@@ -1038,9 +1209,9 @@
natural-compare "^1.4.0"
ts-api-utils "^2.4.0"
-"@typescript-eslint/[email protected]":
+"@typescript-eslint/parser@^8.56.1", "@typescript-eslint/[email protected]":
version "8.56.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.56.1.tgz#21d13b3d456ffb08614c1d68bb9a4f8d9237cdc7"
+ resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.56.1.tgz"
integrity sha512-klQbnPAAiGYFyI02+znpBRLyjL4/BrBd0nyWkdC0s/6xFLkXYQ8OoRrSkqacS1ddVxf/LDyODIKbQ5TgKAf/Fg==
dependencies:
"@typescript-eslint/scope-manager" "8.56.1"
@@ -1051,7 +1222,7 @@
"@typescript-eslint/[email protected]":
version "8.56.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.56.1.tgz#65c8d645f028b927bfc4928593b54e2ecd809244"
+ resolved "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.56.1.tgz"
integrity sha512-TAdqQTzHNNvlVFfR+hu2PDJrURiwKsUvxFn1M0h95BB8ah5jejas08jUWG4dBA68jDMI988IvtfdAI53JzEHOQ==
dependencies:
"@typescript-eslint/tsconfig-utils" "^8.56.1"
@@ -1060,20 +1231,20 @@
"@typescript-eslint/[email protected]":
version "8.56.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.56.1.tgz#254df93b5789a871351335dd23e20bc164060f24"
+ resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.56.1.tgz"
integrity sha512-YAi4VDKcIZp0O4tz/haYKhmIDZFEUPOreKbfdAN3SzUDMcPhJ8QI99xQXqX+HoUVq8cs85eRKnD+rne2UAnj2w==
dependencies:
"@typescript-eslint/types" "8.56.1"
"@typescript-eslint/visitor-keys" "8.56.1"
-"@typescript-eslint/[email protected]", "@typescript-eslint/tsconfig-utils@^8.56.1":
+"@typescript-eslint/tsconfig-utils@^8.56.1", "@typescript-eslint/[email protected]":
version "8.56.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.56.1.tgz#1afa830b0fada5865ddcabdc993b790114a879b7"
+ resolved "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.56.1.tgz"
integrity sha512-qOtCYzKEeyr3aR9f28mPJqBty7+DBqsdd63eO0yyDwc6vgThj2UjWfJIcsFeSucYydqcuudMOprZ+x1SpF3ZuQ==
"@typescript-eslint/[email protected]":
version "8.56.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.56.1.tgz#7a6c4fabf225d674644931e004302cbbdd2f2e24"
+ resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.56.1.tgz"
integrity sha512-yB/7dxi7MgTtGhZdaHCemf7PuwrHMenHjmzgUW1aJpO+bBU43OycnM3Wn+DdvDO/8zzA9HlhaJ0AUGuvri4oGg==
dependencies:
"@typescript-eslint/types" "8.56.1"
@@ -1082,14 +1253,14 @@
debug "^4.4.3"
ts-api-utils "^2.4.0"
-"@typescript-eslint/[email protected]", "@typescript-eslint/types@^8.56.1":
+"@typescript-eslint/types@^8.56.1", "@typescript-eslint/[email protected]":
version "8.56.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.56.1.tgz#975e5942bf54895291337c91b9191f6eb0632ab9"
+ resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.56.1.tgz"
integrity sha512-dbMkdIUkIkchgGDIv7KLUpa0Mda4IYjo4IAMJUZ+3xNoUXxMsk9YtKpTHSChRS85o+H9ftm51gsK1dZReY9CVw==
"@typescript-eslint/[email protected]":
version "8.56.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.56.1.tgz#3b9e57d8129a860c50864c42188f761bdef3eab0"
+ resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.56.1.tgz"
integrity sha512-qzUL1qgalIvKWAf9C1HpvBjif+Vm6rcT5wZd4VoMb9+Km3iS3Cv9DY6dMRMDtPnwRAFyAi7YXJpTIEXLvdfPxg==
dependencies:
"@typescript-eslint/project-service" "8.56.1"
@@ -1104,7 +1275,7 @@
"@typescript-eslint/[email protected]":
version "8.56.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.56.1.tgz#5a86acaf9f1b4c4a85a42effb217f73059f6deb7"
+ resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.56.1.tgz"
integrity sha512-HPAVNIME3tABJ61siYlHzSWCGtOoeP2RTIaHXFMPqjrQKCGB9OgUVdiNgH7TJS2JNIQ5qQ4RsAUDuGaGme/KOA==
dependencies:
"@eslint-community/eslint-utils" "^4.9.1"
@@ -1114,112 +1285,23 @@
"@typescript-eslint/[email protected]":
version "8.56.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.56.1.tgz#50e03475c33a42d123dc99e63acf1841c0231f87"
+ resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.56.1.tgz"
integrity sha512-KiROIzYdEV85YygXw6BI/Dx4fnBlFQu6Mq4QE4MOH9fFnhohw6wX/OAvDY2/C+ut0I3RSPKenvZJIVYqJNkhEw==
dependencies:
"@typescript-eslint/types" "8.56.1"
eslint-visitor-keys "^5.0.0"
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.11.1.tgz#9f5b04503088e6a354295e8ea8fe3cb99e43af81"
- integrity sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==
-
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.11.1.tgz#7414885431bd7178b989aedc4d25cccb3865bc9f"
- integrity sha512-lCxkVtb4wp1v+EoN+HjIG9cIIzPkX5OtM03pQYkG+U5O/wL53LC4QbIeazgiKqluGeVEeBlZahHalCaBvU1a2g==
+"@ungap/structured-clone@^1.0.0":
+ version "1.3.0"
version "1.11.1"
- resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.11.1.tgz#b4a8556f42171fb9c9f7bac8235045e82aa0cbdf"
+ resolved "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.11.1.tgz"
integrity sha512-gPVA1UjRu1Y/IsB/dQEsp2V1pm44Of6+LWvbLc9SDk1c2KhhDRDBUkQCYVWe6f26uJb3fOK8saWMgtX8IrMk3g==
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.11.1.tgz#fd4d81257b13f4d1a083890a6a17c00de571f0dc"
- integrity sha512-cFzP7rWKd3lZaCsDze07QX1SC24lO8mPty9vdP+YVa3MGdVgPmFc59317b2ioXtgCMKGiCLxJ4HQs62oz6GfRQ==
-
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.11.1.tgz#d2513084d0f37c407757e22f32bd924a78cfd99b"
- integrity sha512-fqtGgak3zX4DCB6PFpsH5+Kmt/8CIi4Bry4rb1ho6Av2QHTREM+47y282Uqiu3ZRF5IQioJQ5qWRV6jduA+iGw==
-
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.11.1.tgz#844d2605d057488d77fab09705f2866b86164e0a"
- integrity sha512-u92mvlcYtp9MRKmP+ZvMmtPN34+/3lMHlyMj7wXJDeXxuM0Vgzz0+PPJNsro1m3IZPYChIkn944wW8TYgGKFHw==
-
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.11.1.tgz#204892995cefb6bd1d017d52d097193bc61ddad3"
- integrity sha512-cINaoY2z7LVCrfHkIcmvj7osTOtm6VVT16b5oQdS4beibX2SYBwgYLmqhBjA1t51CarSaBuX5YNsWLjsqfW5Cw==
-
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.11.1.tgz#023eb0c3aac46066a10be7a3f362e7b34f3bdf9d"
- integrity sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==
-
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.11.1.tgz#9e6f9abb06424e3140a60ac996139786f5d99be0"
- integrity sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==
-
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.11.1.tgz#b111417f17c9d1b02efbec8e08398f0c5527bb44"
- integrity sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==
-
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.11.1.tgz#92ffbf02748af3e99873945c9a8a5ead01d508a9"
- integrity sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==
-
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.11.1.tgz#0bec6f1258fc390e6b305e9ff44256cb207de165"
- integrity sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==
-
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.11.1.tgz#577843a084c5952f5906770633ccfb89dac9bc94"
- integrity sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==
-
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.11.1.tgz#36fb318eebdd690f6da32ac5e0499a76fa881935"
- integrity sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==
-
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.11.1.tgz#bfb9af75f783f98f6a22c4244214efe4df1853d6"
- integrity sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==
-
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.11.1.tgz#752c359dd875684b27429500d88226d7cc72f71d"
- integrity sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==
- dependencies:
- "@napi-rs/wasm-runtime" "^0.2.11"
-
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.11.1.tgz#ce5735e600e4c2fbb409cd051b3b7da4a399af35"
- integrity sha512-nRcz5Il4ln0kMhfL8S3hLkxI85BXs3o8EYoattsJNdsX4YUU89iOkVn7g0VHSRxFuVMdM4Q1jEpIId1Ihim/Uw==
-
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.11.1.tgz#72fc57bc7c64ec5c3de0d64ee0d1810317bc60a6"
- integrity sha512-DCEI6t5i1NmAZp6pFonpD5m7i6aFrpofcp4LA2i8IIq60Jyo28hamKBxNrZcyOwVOZkgsRp9O2sXWBWP8MnvIQ==
-
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.11.1.tgz#538b1e103bf8d9864e7b85cc96fa8d6fb6c40777"
- integrity sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g==
-
accepts@^2.0.0:
version "2.0.0"
- resolved "https://registry.yarnpkg.com/accepts/-/accepts-2.0.0.tgz#bbcf4ba5075467f3f2131eab3cffc73c2f5d7895"
+ resolved "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz"
integrity sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==
dependencies:
mime-types "^3.0.0"
@@ -1227,29 +1309,29 @@ accepts@^2.0.0:
acorn-jsx@^5.3.2:
version "5.3.2"
- resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937"
+ resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz"
integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==
-acorn@^8.15.0:
+"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8.15.0:
version "8.16.0"
- resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.16.0.tgz#4ce79c89be40afe7afe8f3adb902a1f1ce9ac08a"
+ resolved "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz"
integrity sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==
agent-base@^7.1.2:
version "7.1.4"
- resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.4.tgz#e3cd76d4c548ee895d3c3fd8dc1f6c5b9032e7a8"
+ resolved "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz"
integrity sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==
ajv-formats@^3.0.1:
version "3.0.1"
- resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-3.0.1.tgz#3d5dc762bca17679c3c2ea7e90ad6b7532309578"
+ resolved "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz"
integrity sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==
dependencies:
ajv "^8.0.0"
ajv@^6.14.0:
version "6.14.0"
- resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.14.0.tgz#fd067713e228210636ebb08c60bd3765d6dbe73a"
+ resolved "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz"
integrity sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==
dependencies:
fast-deep-equal "^3.1.1"
@@ -1259,7 +1341,7 @@ ajv@^6.14.0:
ajv@^8.0.0, ajv@^8.17.1:
version "8.18.0"
- resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.18.0.tgz#8864186b6738d003eb3a933172bb3833e10cefbc"
+ resolved "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz"
integrity sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==
dependencies:
fast-deep-equal "^3.1.3"
@@ -1269,39 +1351,39 @@ ajv@^8.0.0, ajv@^8.17.1:
ansi-regex@^5.0.1:
version "5.0.1"
- resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
+ resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz"
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
ansi-regex@^6.2.2:
version "6.2.2"
- resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.2.2.tgz#60216eea464d864597ce2832000738a0589650c1"
+ resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz"
integrity sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==
ansi-styles@^4.0.0, ansi-styles@^4.1.0:
version "4.3.0"
- resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
+ resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz"
integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
dependencies:
color-convert "^2.0.1"
ansis@^4.0.0:
version "4.2.0"
- resolved "https://registry.yarnpkg.com/ansis/-/ansis-4.2.0.tgz#2e6e61c46b11726ac67f78785385618b9e658780"
+ resolved "https://registry.npmjs.org/ansis/-/ansis-4.2.0.tgz"
integrity sha512-HqZ5rWlFjGiV0tDm3UxxgNRqsOTniqoKZu0pIAfh7TZQMGuZK+hH0drySty0si0QXj1ieop4+SkSfPZBPPkHig==
argparse@^2.0.1:
version "2.0.1"
- resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
+ resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz"
integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
aria-query@^5.3.2:
version "5.3.2"
- resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.3.2.tgz#93f81a43480e33a338f19163a3d10a50c01dcd59"
+ resolved "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz"
integrity sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==
array-buffer-byte-length@^1.0.1, array-buffer-byte-length@^1.0.2:
version "1.0.2"
- resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz#384d12a37295aec3769ab022ad323a18a51ccf8b"
+ resolved "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz"
integrity sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==
dependencies:
call-bound "^1.0.3"
@@ -1309,7 +1391,7 @@ array-buffer-byte-length@^1.0.1, array-buffer-byte-length@^1.0.2:
array-includes@^3.1.6, array-includes@^3.1.8, array-includes@^3.1.9:
version "3.1.9"
- resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.9.tgz#1f0ccaa08e90cdbc3eb433210f903ad0f17c3f3a"
+ resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz"
integrity sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==
dependencies:
call-bind "^1.0.8"
@@ -1323,7 +1405,7 @@ array-includes@^3.1.6, array-includes@^3.1.8, array-includes@^3.1.9:
array.prototype.findlast@^1.2.5:
version "1.2.5"
- resolved "https://registry.yarnpkg.com/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz#3e4fbcb30a15a7f5bf64cf2faae22d139c2e4904"
+ resolved "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz"
integrity sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==
dependencies:
call-bind "^1.0.7"
@@ -1335,7 +1417,7 @@ array.prototype.findlast@^1.2.5:
array.prototype.findlastindex@^1.2.6:
version "1.2.6"
- resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz#cfa1065c81dcb64e34557c9b81d012f6a421c564"
+ resolved "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz"
integrity sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==
dependencies:
call-bind "^1.0.8"
@@ -1348,7 +1430,7 @@ array.prototype.findlastindex@^1.2.6:
array.prototype.flat@^1.3.1, array.prototype.flat@^1.3.3:
version "1.3.3"
- resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz#534aaf9e6e8dd79fb6b9a9917f839ef1ec63afe5"
+ resolved "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz"
integrity sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==
dependencies:
call-bind "^1.0.8"
@@ -1358,7 +1440,7 @@ array.prototype.flat@^1.3.1, array.prototype.flat@^1.3.3:
array.prototype.flatmap@^1.3.2, array.prototype.flatmap@^1.3.3:
version "1.3.3"
- resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz#712cc792ae70370ae40586264629e33aab5dd38b"
+ resolved "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz"
integrity sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==
dependencies:
call-bind "^1.0.8"
@@ -1368,7 +1450,7 @@ array.prototype.flatmap@^1.3.2, array.prototype.flatmap@^1.3.3:
array.prototype.tosorted@^1.1.4:
version "1.1.4"
- resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz#fe954678ff53034e717ea3352a03f0b0b86f7ffc"
+ resolved "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz"
integrity sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==
dependencies:
call-bind "^1.0.7"
@@ -1379,7 +1461,7 @@ array.prototype.tosorted@^1.1.4:
arraybuffer.prototype.slice@^1.0.4:
version "1.0.4"
- resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz#9d760d84dbdd06d0cbf92c8849615a1a7ab3183c"
+ resolved "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz"
integrity sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==
dependencies:
array-buffer-byte-length "^1.0.1"
@@ -1392,56 +1474,59 @@ arraybuffer.prototype.slice@^1.0.4:
ast-types-flow@^0.0.8:
version "0.0.8"
- resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.8.tgz#0a85e1c92695769ac13a428bb653e7538bea27d6"
+ resolved "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz"
integrity sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==
ast-types@^0.16.1:
version "0.16.1"
- resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.16.1.tgz#7a9da1617c9081bc121faafe91711b4c8bb81da2"
+ resolved "https://registry.npmjs.org/ast-types/-/ast-types-0.16.1.tgz"
integrity sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==
dependencies:
tslib "^2.0.1"
async-function@^1.0.0:
version "1.0.0"
- resolved "https://registry.yarnpkg.com/async-function/-/async-function-1.0.0.tgz#509c9fca60eaf85034c6829838188e4e4c8ffb2b"
+ resolved "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz"
integrity sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==
available-typed-arrays@^1.0.7:
version "1.0.7"
- resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846"
+ resolved "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz"
integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==
dependencies:
possible-typed-array-names "^1.0.0"
axe-core@^4.10.0:
version "4.11.1"
- resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.11.1.tgz#052ff9b2cbf543f5595028b583e4763b40c78ea7"
+ resolved "https://registry.npmjs.org/axe-core/-/axe-core-4.11.1.tgz"
integrity sha512-BASOg+YwO2C+346x3LZOeoovTIoTrRqEsqMa6fmfAV0P+U9mFr9NsyOEpiYvFjbc64NMrSswhV50WdXzdb/Z5A==
axobject-query@^4.1.0:
version "4.1.0"
- resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-4.1.0.tgz#28768c76d0e3cff21bc62a9e2d0b6ac30042a1ee"
+ resolved "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz"
integrity sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==
+bail@^2.0.0:
+ version "2.0.2"
+
balanced-match@^1.0.0:
version "1.0.2"
- resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
+ resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz"
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
balanced-match@^4.0.2:
version "4.0.4"
- resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-4.0.4.tgz#bfb10662feed8196a2c62e7c68e17720c274179a"
+ resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz"
integrity sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==
baseline-browser-mapping@^2.8.3, baseline-browser-mapping@^2.9.0:
version "2.10.0"
- resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.10.0.tgz#5b09935025bf8a80e29130251e337c6a7fc8cbb9"
+ resolved "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.0.tgz"
integrity sha512-lIyg0szRfYbiy67j9KN8IyeD7q7hcmqnJ1ddWmNt19ItGpNN64mnllmxUNFIOdOm6by97jlL6wfpTTJrmnjWAA==
body-parser@^2.2.1:
version "2.2.2"
- resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-2.2.2.tgz#1a32cdb966beaf68de50a9dfbe5b58f83cb8890c"
+ resolved "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz"
integrity sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==
dependencies:
bytes "^3.1.2"
@@ -1456,7 +1541,7 @@ body-parser@^2.2.1:
brace-expansion@^1.1.7:
version "1.1.12"
- resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843"
+ resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz"
integrity sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==
dependencies:
balanced-match "^1.0.0"
@@ -1464,21 +1549,21 @@ brace-expansion@^1.1.7:
brace-expansion@^5.0.2:
version "5.0.4"
- resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-5.0.4.tgz#614daaecd0a688f660bbbc909a8748c3d80d4336"
+ resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz"
integrity sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==
dependencies:
balanced-match "^4.0.2"
braces@^3.0.3:
version "3.0.3"
- resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
+ resolved "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz"
integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==
dependencies:
fill-range "^7.1.1"
-browserslist@^4.24.0, browserslist@^4.26.2:
+browserslist@^4.24.0, browserslist@^4.26.2, "browserslist@>= 4.21.0":
version "4.28.1"
- resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.28.1.tgz#7f534594628c53c63101079e27e40de490456a95"
+ resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz"
integrity sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==
dependencies:
baseline-browser-mapping "^2.9.0"
@@ -1489,19 +1574,19 @@ browserslist@^4.24.0, browserslist@^4.26.2:
bundle-name@^4.1.0:
version "4.1.0"
- resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-4.1.0.tgz#f3b96b34160d6431a19d7688135af7cfb8797889"
+ resolved "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz"
integrity sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==
dependencies:
run-applescript "^7.0.0"
bytes@^3.1.2, bytes@~3.1.2:
version "3.1.2"
- resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5"
+ resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz"
integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==
call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2:
version "1.0.2"
- resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6"
+ resolved "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz"
integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==
dependencies:
es-errors "^1.3.0"
@@ -1509,7 +1594,7 @@ call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1, call-bind-apply-
call-bind@^1.0.7, call-bind@^1.0.8:
version "1.0.8"
- resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.8.tgz#0736a9660f537e3388826f440d5ec45f744eaa4c"
+ resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz"
integrity sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==
dependencies:
call-bind-apply-helpers "^1.0.0"
@@ -1519,7 +1604,7 @@ call-bind@^1.0.7, call-bind@^1.0.8:
call-bound@^1.0.2, call-bound@^1.0.3, call-bound@^1.0.4:
version "1.0.4"
- resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.4.tgz#238de935d2a2a692928c538c7ccfa91067fd062a"
+ resolved "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz"
integrity sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==
dependencies:
call-bind-apply-helpers "^1.0.2"
@@ -1527,17 +1612,20 @@ call-bound@^1.0.2, call-bound@^1.0.3, call-bound@^1.0.4:
callsites@^3.0.0:
version "3.1.0"
- resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
+ resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz"
integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
caniuse-lite@^1.0.30001579, caniuse-lite@^1.0.30001759:
version "1.0.30001777"
- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001777.tgz#028f21e4b2718d138b55e692583e6810ccf60691"
+ resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001777.tgz"
integrity sha512-tmN+fJxroPndC74efCdp12j+0rk0RHwV5Jwa1zWaFVyw2ZxAuPeG8ZgWC3Wz7uSjT3qMRQ5XHZ4COgQmsCMJAQ==
+ccount@^2.0.0:
+ version "2.0.1"
+
chalk@^4.0.0:
version "4.1.2"
- resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
+ resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz"
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
dependencies:
ansi-styles "^4.1.0"
@@ -1545,41 +1633,53 @@ chalk@^4.0.0:
chalk@^5.3.0:
version "5.6.2"
- resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.6.2.tgz#b1238b6e23ea337af71c7f8a295db5af0c158aea"
+ resolved "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz"
integrity sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==
+character-entities-html4@^2.0.0:
+ version "2.1.0"
+
+character-entities-legacy@^3.0.0:
+ version "3.0.0"
+
+character-entities@^2.0.0:
+ version "2.0.2"
+
+character-reference-invalid@^2.0.0:
+ version "2.0.1"
+
class-variance-authority@^0.7.1:
version "0.7.1"
- resolved "https://registry.yarnpkg.com/class-variance-authority/-/class-variance-authority-0.7.1.tgz#4008a798a0e4553a781a57ac5177c9fb5d043787"
+ resolved "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.1.tgz"
integrity sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==
dependencies:
clsx "^2.1.1"
cli-cursor@^5.0.0:
version "5.0.0"
- resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-5.0.0.tgz#24a4831ecf5a6b01ddeb32fb71a4b2088b0dce38"
+ resolved "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz"
integrity sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==
dependencies:
restore-cursor "^5.0.0"
cli-spinners@^2.9.2:
version "2.9.2"
- resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41"
+ resolved "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz"
integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==
cli-width@^4.1.0:
version "4.1.0"
- resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-4.1.0.tgz#42daac41d3c254ef38ad8ac037672130173691c5"
+ resolved "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz"
integrity sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==
version "0.0.1"
- resolved "https://registry.yarnpkg.com/client-only/-/client-only-0.0.1.tgz#38bba5d403c41ab150bff64a95c85013cf73bca1"
+ resolved "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz"
integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==
cliui@^8.0.1:
version "8.0.1"
- resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa"
+ resolved "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz"
integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==
dependencies:
string-width "^4.2.0"
@@ -1588,74 +1688,77 @@ cliui@^8.0.1:
clsx@^2.1.1:
version "2.1.1"
- resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.1.1.tgz#eed397c9fd8bd882bfb18deab7102049a2f32999"
+ resolved "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz"
integrity sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==
code-block-writer@^13.0.3:
version "13.0.3"
- resolved "https://registry.yarnpkg.com/code-block-writer/-/code-block-writer-13.0.3.tgz#90f8a84763a5012da7af61319dd638655ae90b5b"
+ resolved "https://registry.npmjs.org/code-block-writer/-/code-block-writer-13.0.3.tgz"
integrity sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg==
color-convert@^2.0.1:
version "2.0.1"
- resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
+ resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz"
integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
dependencies:
color-name "~1.1.4"
color-name@~1.1.4:
version "1.1.4"
- resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
+ resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
+comma-separated-tokens@^2.0.0:
+ version "2.0.3"
+
commander@^11.1.0:
version "11.1.0"
- resolved "https://registry.yarnpkg.com/commander/-/commander-11.1.0.tgz#62fdce76006a68e5c1ab3314dc92e800eb83d906"
+ resolved "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz"
integrity sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==
commander@^14.0.0:
version "14.0.3"
- resolved "https://registry.yarnpkg.com/commander/-/commander-14.0.3.tgz#425d79b48f9af82fcd9e4fc1ea8af6c5ec07bbc2"
+ resolved "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz"
integrity sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==
version "0.0.1"
- resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
+ resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz"
integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
content-disposition@^1.0.0:
version "1.0.1"
- resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-1.0.1.tgz#a8b7bbeb2904befdfb6787e5c0c086959f605f9b"
+ resolved "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz"
integrity sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==
content-type@^1.0.5:
version "1.0.5"
- resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918"
+ resolved "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz"
integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==
convert-source-map@^2.0.0:
version "2.0.0"
- resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a"
+ resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz"
integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==
cookie-signature@^1.2.1:
version "1.2.2"
- resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.2.2.tgz#57c7fc3cc293acab9fec54d73e15690ebe4a1793"
+ resolved "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz"
integrity sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==
cookie@^0.7.1:
version "0.7.2"
- resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.2.tgz#556369c472a2ba910f2979891b526b3436237ed7"
+ resolved "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz"
integrity sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==
cookie@^1.0.2:
version "1.1.1"
- resolved "https://registry.yarnpkg.com/cookie/-/cookie-1.1.1.tgz#3bb9bdfc82369db9c2f69c93c9c3ceb310c88b3c"
+ resolved "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz"
integrity sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==
cors@^2.8.5:
version "2.8.6"
- resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.6.tgz#ff5dd69bd95e547503820d29aba4f8faf8dfec96"
+ resolved "https://registry.npmjs.org/cors/-/cors-2.8.6.tgz"
integrity sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==
dependencies:
object-assign "^4"
@@ -1663,7 +1766,7 @@ cors@^2.8.5:
cosmiconfig@^9.0.0:
version "9.0.1"
- resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-9.0.1.tgz#df110631a8547b5d1a98915271986f06e3011379"
+ resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.1.tgz"
integrity sha512-hr4ihw+DBqcvrsEDioRO31Z17x71pUYoNe/4h6Z0wB72p7MU7/9gH8Q3s12NFhHPfYBBOV3qyfUxmr/Yn3shnQ==
dependencies:
env-paths "^2.2.1"
@@ -1673,7 +1776,7 @@ cosmiconfig@^9.0.0:
cross-spawn@^7.0.3, cross-spawn@^7.0.5, cross-spawn@^7.0.6:
version "7.0.6"
- resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f"
+ resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz"
integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==
dependencies:
path-key "^3.1.0"
@@ -1682,27 +1785,98 @@ cross-spawn@^7.0.3, cross-spawn@^7.0.5, cross-spawn@^7.0.6:
cssesc@^3.0.0:
version "3.0.0"
- resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee"
+ resolved "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz"
integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==
csstype@^3.2.2:
version "3.2.3"
- resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.2.3.tgz#ec48c0f3e993e50648c86da559e2610995cf989a"
+ resolved "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz"
integrity sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==
+d3-array@^3.1.6, "d3-array@2 - 3", "[email protected] - 3":
+ version "3.2.4"
+ resolved "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz"
+ integrity sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==
+ dependencies:
+ internmap "1 - 2"
+
+"d3-color@1 - 3":
+ version "3.1.0"
+ resolved "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz"
+ integrity sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==
+
+d3-ease@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz"
+ integrity sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==
+
+"d3-format@1 - 3":
+ version "3.1.2"
+ resolved "https://registry.npmjs.org/d3-format/-/d3-format-3.1.2.tgz"
+ integrity sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==
+
+d3-interpolate@^3.0.1, "[email protected] - 3":
+ version "3.0.1"
+ resolved "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz"
+ integrity sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==
+ dependencies:
+ d3-color "1 - 3"
+
+d3-path@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz"
+ integrity sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==
+
+d3-scale@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz"
+ integrity sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==
+ 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"
+
+d3-shape@^3.1.0:
+ version "3.2.0"
+ resolved "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz"
+ integrity sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==
+ dependencies:
+ d3-path "^3.1.0"
+
+"d3-time-format@2 - 4":
+ version "4.1.0"
+ resolved "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz"
+ integrity sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==
+ dependencies:
+ d3-time "1 - 3"
+
+d3-time@^3.0.0, "d3-time@1 - 3", "[email protected] - 3":
+ version "3.1.0"
+ resolved "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz"
+ integrity sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==
+ dependencies:
+ d3-array "2 - 3"
+
+d3-timer@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz"
+ integrity sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==
+
damerau-levenshtein@^1.0.8:
version "1.0.8"
- resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz#b43d286ccbd36bc5b2f7ed41caf2d0aba1f8a6e7"
+ resolved "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz"
integrity sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==
data-uri-to-buffer@^4.0.0:
version "4.0.1"
- resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e"
+ resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz"
integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==
data-view-buffer@^1.0.2:
version "1.0.2"
- resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.2.tgz#211a03ba95ecaf7798a8c7198d79536211f88570"
+ resolved "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz"
integrity sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==
dependencies:
call-bound "^1.0.3"
@@ -1711,7 +1885,7 @@ data-view-buffer@^1.0.2:
data-view-byte-length@^1.0.2:
version "1.0.2"
- resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz#9e80f7ca52453ce3e93d25a35318767ea7704735"
+ resolved "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz"
integrity sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==
dependencies:
call-bound "^1.0.3"
@@ -1720,50 +1894,65 @@ data-view-byte-length@^1.0.2:
data-view-byte-offset@^1.0.1:
version "1.0.1"
- resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz#068307f9b71ab76dbbe10291389e020856606191"
+ resolved "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz"
integrity sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==
dependencies:
call-bound "^1.0.2"
es-errors "^1.3.0"
is-data-view "^1.0.1"
-debug@4, debug@^4.1.0, debug@^4.3.1, debug@^4.3.2, debug@^4.4.0, debug@^4.4.3:
+debug@^3.2.7:
+ version "3.2.7"
+ resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz"
+ integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==
+ dependencies:
+ ms "^2.1.1"
+
+debug@^4.0.0, debug@^4.1.0, debug@^4.3.1, debug@^4.3.2, debug@^4.4.0, debug@^4.4.3, debug@4:
version "4.4.3"
- resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a"
+ resolved "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz"
integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==
dependencies:
ms "^2.1.3"
-debug@^3.2.7:
- version "3.2.7"
- resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a"
- integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==
+decimal.js-light@^2.5.1:
+ version "2.5.1"
+ resolved "https://registry.npmjs.org/decimal.js-light/-/decimal.js-light-2.5.1.tgz"
+ integrity sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==
+
+decimal.js@^10.6.0:
+ version "10.6.0"
+ resolved "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz"
+ integrity sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==
+
+decode-named-character-reference@^1.0.0:
+ version "1.3.0"
dependencies:
- ms "^2.1.1"
+ character-entities "^2.0.0"
dedent@^1.6.0:
version "1.7.2"
- resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.7.2.tgz#34e2264ab538301e27cf7b07bf2369c19baa8dd9"
+ resolved "https://registry.npmjs.org/dedent/-/dedent-1.7.2.tgz"
integrity sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA==
deep-is@^0.1.3:
version "0.1.4"
- resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831"
+ resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz"
integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==
deepmerge@^4.3.1:
version "4.3.1"
- resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a"
+ resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz"
integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==
default-browser-id@^5.0.0:
version "5.0.1"
- resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-5.0.1.tgz#f7a7ccb8f5104bf8e0f71ba3b1ccfa5eafdb21e8"
+ resolved "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.1.tgz"
integrity sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==
default-browser@^5.4.0:
version "5.5.0"
- resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-5.5.0.tgz#2792e886f2422894545947cc80e1a444496c5976"
+ resolved "https://registry.npmjs.org/default-browser/-/default-browser-5.5.0.tgz"
integrity sha512-H9LMLr5zwIbSxrmvikGuI/5KGhZ8E2zH3stkMgM5LpOWDutGM2JZaj460Udnf1a+946zc7YBgrqEWwbk7zHvGw==
dependencies:
bundle-name "^4.1.0"
@@ -1771,7 +1960,7 @@ default-browser@^5.4.0:
define-data-property@^1.0.1, define-data-property@^1.1.4:
version "1.1.4"
- resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e"
+ resolved "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz"
integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==
dependencies:
es-define-property "^1.0.0"
@@ -1780,12 +1969,12 @@ define-data-property@^1.0.1, define-data-property@^1.1.4:
define-lazy-prop@^3.0.0:
version "3.0.0"
- resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz#dbb19adfb746d7fc6d734a06b72f4a00d021255f"
+ resolved "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz"
integrity sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==
define-properties@^1.1.3, define-properties@^1.2.1:
version "1.2.1"
- resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c"
+ resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz"
integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==
dependencies:
define-data-property "^1.0.1"
@@ -1794,34 +1983,42 @@ define-properties@^1.1.3, define-properties@^1.2.1:
depd@^2.0.0, depd@~2.0.0:
version "2.0.0"
- resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df"
+ resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz"
integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==
+dequal@^2.0.0:
+ version "2.0.3"
+
detect-libc@^2.0.3, detect-libc@^2.1.2:
version "2.1.2"
- resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.1.2.tgz#689c5dcdc1900ef5583a4cb9f6d7b473742074ad"
+ resolved "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz"
integrity sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==
+devlop@^1.0.0, devlop@^1.1.0:
+ version "1.1.0"
+ dependencies:
+ dequal "^2.0.0"
+
diff@^8.0.2:
version "8.0.3"
- resolved "https://registry.yarnpkg.com/diff/-/diff-8.0.3.tgz#c7da3d9e0e8c283bb548681f8d7174653720c2d5"
+ resolved "https://registry.npmjs.org/diff/-/diff-8.0.3.tgz"
integrity sha512-qejHi7bcSD4hQAZE0tNAawRK1ZtafHDmMTMkrrIGgSLl7hTnQHmKCeB45xAcbfTqK2zowkM3j3bHt/4b/ARbYQ==
doctrine@^2.1.0:
version "2.1.0"
- resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d"
+ resolved "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz"
integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==
dependencies:
esutils "^2.0.2"
dotenv@^17.2.1:
version "17.3.1"
- resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-17.3.1.tgz#2706f5b0165e45a1503348187b8468f87fe6aae2"
+ resolved "https://registry.npmjs.org/dotenv/-/dotenv-17.3.1.tgz"
integrity sha512-IO8C/dzEb6O3F9/twg6ZLXz164a2fhTnEWb95H23Dm4OuN+92NmEAlTrupP9VW6Jm3sO26tQlqyvyi4CsnY9GA==
dunder-proto@^1.0.0, dunder-proto@^1.0.1:
version "1.0.1"
- resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a"
+ resolved "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz"
integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==
dependencies:
call-bind-apply-helpers "^1.0.1"
@@ -1830,7 +2027,7 @@ dunder-proto@^1.0.0, dunder-proto@^1.0.1:
eciesjs@^0.4.10:
version "0.4.18"
- resolved "https://registry.yarnpkg.com/eciesjs/-/eciesjs-0.4.18.tgz#5f1a40b2171a1fdd97854bdfc31620bb8a1dbbbe"
+ resolved "https://registry.npmjs.org/eciesjs/-/eciesjs-0.4.18.tgz"
integrity sha512-wG99Zcfcys9fZux7Cft8BAX/YrOJLJSZ3jyYPfhZHqN2E+Ffx+QXBDsv3gubEgPtV6dTzJMSQUwk1H98/t/0wQ==
dependencies:
"@ecies/ciphers" "^0.2.5"
@@ -1840,37 +2037,37 @@ eciesjs@^0.4.10:
version "1.1.1"
- resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
+ resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==
electron-to-chromium@^1.5.263:
version "1.5.307"
- resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.307.tgz#09f8973100c39fb0d003b890393cd1d58932b1c8"
+ resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.307.tgz"
integrity sha512-5z3uFKBWjiNR44nFcYdkcXjKMbg5KXNdciu7mhTPo9tB7NbqSNP2sSnGR+fqknZSCwKkBN+oxiiajWs4dT6ORg==
emoji-regex@^10.3.0:
version "10.6.0"
- resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.6.0.tgz#bf3d6e8f7f8fd22a65d9703475bc0147357a6b0d"
+ resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz"
integrity sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==
emoji-regex@^8.0.0:
version "8.0.0"
- resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
+ resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz"
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
emoji-regex@^9.2.2:
version "9.2.2"
- resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72"
+ resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz"
integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==
encodeurl@^2.0.0:
version "2.0.0"
- resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58"
+ resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz"
integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==
enhanced-resolve@^5.19.0:
version "5.20.0"
- resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.20.0.tgz#323c2a70d2aa7fb4bdfd6d3c24dfc705c581295d"
+ resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.20.0.tgz"
integrity sha512-/ce7+jQ1PQ6rVXwe+jKEg5hW5ciicHwIQUagZkp6IufBoY3YDgdTTY1azVs0qoRgVmvsNB+rbjLJxDAeHHtwsQ==
dependencies:
graceful-fs "^4.2.4"
@@ -1878,19 +2075,19 @@ enhanced-resolve@^5.19.0:
env-paths@^2.2.1:
version "2.2.1"
- resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2"
+ resolved "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz"
integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==
error-ex@^1.3.1:
version "1.3.4"
- resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.4.tgz#b3a8d8bb6f92eecc1629e3e27d3c8607a8a32414"
+ resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz"
integrity sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==
dependencies:
is-arrayish "^0.2.1"
es-abstract@^1.17.5, es-abstract@^1.23.2, es-abstract@^1.23.3, es-abstract@^1.23.5, es-abstract@^1.23.6, es-abstract@^1.23.9, es-abstract@^1.24.0, es-abstract@^1.24.1:
version "1.24.1"
- resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.24.1.tgz#f0c131ed5ea1bb2411134a8dd94def09c46c7899"
+ resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.1.tgz"
integrity sha512-zHXBLhP+QehSSbsS9Pt23Gg964240DPd6QCf8WpkqEXxQ7fhdZzYsocOr5u7apWonsS5EjZDmTF+/slGMyasvw==
dependencies:
array-buffer-byte-length "^1.0.2"
@@ -1950,17 +2147,17 @@ es-abstract@^1.17.5, es-abstract@^1.23.2, es-abstract@^1.23.3, es-abstract@^1.23
es-define-property@^1.0.0, es-define-property@^1.0.1:
version "1.0.1"
- resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa"
+ resolved "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz"
integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==
es-errors@^1.3.0:
version "1.3.0"
- resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f"
+ resolved "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz"
integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==
es-iterator-helpers@^1.2.1:
version "1.2.2"
- resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.2.2.tgz#d979a9f686e2b0b72f88dbead7229924544720bc"
+ resolved "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.2.2.tgz"
integrity sha512-BrUQ0cPTB/IwXj23HtwHjS9n7O4h9FX94b4xc5zlTHxeLgTAdzYUDyy6KdExAl9lbN5rtfe44xpjpmj9grxs5w==
dependencies:
call-bind "^1.0.8"
@@ -1982,14 +2179,14 @@ es-iterator-helpers@^1.2.1:
es-object-atoms@^1.0.0, es-object-atoms@^1.1.1:
version "1.1.1"
- resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1"
+ resolved "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz"
integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==
dependencies:
es-errors "^1.3.0"
es-set-tostringtag@^2.1.0:
version "2.1.0"
- resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz#f31dbbe0c183b00a6d26eb6325c810c0fd18bd4d"
+ resolved "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz"
integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==
dependencies:
es-errors "^1.3.0"
@@ -1999,38 +2196,46 @@ es-set-tostringtag@^2.1.0:
es-shim-unscopables@^1.0.2, es-shim-unscopables@^1.1.0:
version "1.1.0"
- resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz#438df35520dac5d105f3943d927549ea3b00f4b5"
+ resolved "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz"
integrity sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==
dependencies:
hasown "^2.0.2"
es-to-primitive@^1.3.0:
version "1.3.0"
- resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.3.0.tgz#96c89c82cc49fd8794a24835ba3e1ff87f214e18"
+ resolved "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz"
integrity sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==
dependencies:
is-callable "^1.2.7"
is-date-object "^1.0.5"
is-symbol "^1.0.4"
+es-toolkit@^1.39.3:
+ version "1.45.1"
+ resolved "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.45.1.tgz"
+ integrity sha512-/jhoOj/Fx+A+IIyDNOvO3TItGmlMKhtX8ISAHKE90c4b/k1tqaqEZ+uUqfpU8DMnW5cgNJv606zS55jGvza0Xw==
+
escalade@^3.1.1, escalade@^3.2.0:
version "3.2.0"
- resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5"
+ resolved "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz"
integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==
escape-html@^1.0.3:
version "1.0.3"
- resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
+ resolved "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz"
integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==
escape-string-regexp@^4.0.0:
version "4.0.0"
- resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
+ resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz"
integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
+escape-string-regexp@^5.0.0:
+ version "5.0.0"
+
version "16.1.6"
- resolved "https://registry.yarnpkg.com/eslint-config-next/-/eslint-config-next-16.1.6.tgz#75dd33bf32eb34b1e5be59f546e3c808429bab41"
+ resolved "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-16.1.6.tgz"
integrity sha512-vKq40io2B0XtkkNDYyleATwblNt8xuh3FWp8SpSz3pt7P01OkBFlKsJZ2mWt5WsCySlDQLckb1zMY9yE9Qy0LA==
dependencies:
"@next/eslint-plugin-next" "16.1.6"
@@ -2045,7 +2250,7 @@ [email protected]:
eslint-import-resolver-node@^0.3.6, eslint-import-resolver-node@^0.3.9:
version "0.3.9"
- resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac"
+ resolved "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz"
integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==
dependencies:
debug "^3.2.7"
@@ -2054,7 +2259,7 @@ eslint-import-resolver-node@^0.3.6, eslint-import-resolver-node@^0.3.9:
eslint-import-resolver-typescript@^3.5.2:
version "3.10.1"
- resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.10.1.tgz#23dac32efa86a88e2b8232eb244ac499ad636db2"
+ resolved "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.10.1.tgz"
integrity sha512-A1rHYb06zjMGAxdLSkN2fXPBwuSaQ0iO5M/hdyS0Ajj1VBaRp0sPD3dn1FhME3c/JluGFbwSxyCfqdSbtQLAHQ==
dependencies:
"@nolyfill/is-core-module" "1.0.39"
@@ -2067,14 +2272,14 @@ eslint-import-resolver-typescript@^3.5.2:
eslint-module-utils@^2.12.1:
version "2.12.1"
- resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz#f76d3220bfb83c057651359295ab5854eaad75ff"
+ resolved "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz"
integrity sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==
dependencies:
debug "^3.2.7"
-eslint-plugin-import@^2.32.0:
+eslint-plugin-import@*, eslint-plugin-import@^2.32.0:
version "2.32.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz#602b55faa6e4caeaa5e970c198b5c00a37708980"
+ resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz"
integrity sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==
dependencies:
"@rtsao/scc" "^1.1.0"
@@ -2099,7 +2304,7 @@ eslint-plugin-import@^2.32.0:
eslint-plugin-jsx-a11y@^6.10.0:
version "6.10.2"
- resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz#d2812bb23bf1ab4665f1718ea442e8372e638483"
+ resolved "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz"
integrity sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==
dependencies:
aria-query "^5.3.2"
@@ -2120,7 +2325,7 @@ eslint-plugin-jsx-a11y@^6.10.0:
eslint-plugin-react-hooks@^7.0.0:
version "7.0.1"
- resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-7.0.1.tgz#66e258db58ece50723ef20cc159f8aa908219169"
+ resolved "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-7.0.1.tgz"
integrity sha512-O0d0m04evaNzEPoSW+59Mezf8Qt0InfgGIBJnpC0h3NH/WjUAR7BIKUfysC6todmtiZ/A0oUVS8Gce0WhBrHsA==
dependencies:
"@babel/core" "^7.24.4"
@@ -2131,7 +2336,7 @@ eslint-plugin-react-hooks@^7.0.0:
eslint-plugin-react@^7.37.0:
version "7.37.5"
- resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz#2975511472bdda1b272b34d779335c9b0e877065"
+ resolved "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz"
integrity sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==
dependencies:
array-includes "^3.1.8"
@@ -2155,7 +2360,7 @@ eslint-plugin-react@^7.37.0:
eslint-scope@^8.4.0:
version "8.4.0"
- resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.4.0.tgz#88e646a207fad61436ffa39eb505147200655c82"
+ resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz"
integrity sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==
dependencies:
esrecurse "^4.3.0"
@@ -2163,22 +2368,22 @@ eslint-scope@^8.4.0:
eslint-visitor-keys@^3.4.3:
version "3.4.3"
- resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800"
+ resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz"
integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==
eslint-visitor-keys@^4.2.1:
version "4.2.1"
- resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz#4cfea60fe7dd0ad8e816e1ed026c1d5251b512c1"
+ resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz"
integrity sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==
eslint-visitor-keys@^5.0.0:
version "5.0.1"
- resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz#9e3c9489697824d2d4ce3a8ad12628f91e9f59be"
+ resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz"
integrity sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==
-eslint@^9:
+eslint@*, "eslint@^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9", "eslint@^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9", "eslint@^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7", "eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0", "eslint@^6.0.0 || ^7.0.0 || >=8.0.0", "eslint@^8.57.0 || ^9.0.0 || ^10.0.0", eslint@^9, eslint@>=9.0.0:
version "9.39.4"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.39.4.tgz#855da1b2e2ad66dc5991195f35e262bcec8117b5"
+ resolved "https://registry.npmjs.org/eslint/-/eslint-9.39.4.tgz"
integrity sha512-XoMjdBOwe/esVgEvLmNsD3IRHkm7fbKIUGvrleloJXUZgDHig2IPWNniv+GwjyJXzuNqVjlr5+4yVUZjycJwfQ==
dependencies:
"@eslint-community/eslint-utils" "^4.8.0"
@@ -2218,7 +2423,7 @@ eslint@^9:
espree@^10.0.1, espree@^10.4.0:
version "10.4.0"
- resolved "https://registry.yarnpkg.com/espree/-/espree-10.4.0.tgz#d54f4949d4629005a1fa168d937c3ff1f7e2a837"
+ resolved "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz"
integrity sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==
dependencies:
acorn "^8.15.0"
@@ -2227,53 +2432,61 @@ espree@^10.0.1, espree@^10.4.0:
esprima@~4.0.0:
version "4.0.1"
- resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
+ resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz"
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
esquery@^1.5.0:
version "1.7.0"
- resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.7.0.tgz#08d048f261f0ddedb5bae95f46809463d9c9496d"
+ resolved "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz"
integrity sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==
dependencies:
estraverse "^5.1.0"
esrecurse@^4.3.0:
version "4.3.0"
- resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921"
+ resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz"
integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==
dependencies:
estraverse "^5.2.0"
estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0:
version "5.3.0"
- resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123"
+ resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz"
integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==
+estree-util-is-identifier-name@^3.0.0:
+ version "3.0.0"
+
esutils@^2.0.2:
version "2.0.3"
- resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
+ resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz"
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
etag@^1.8.1:
version "1.8.1"
- resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
+ resolved "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz"
integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==
+eventemitter3@^5.0.1:
+ version "5.0.4"
+ resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz"
+ integrity sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==
+
eventsource-parser@^3.0.0, eventsource-parser@^3.0.1:
version "3.0.6"
- resolved "https://registry.yarnpkg.com/eventsource-parser/-/eventsource-parser-3.0.6.tgz#292e165e34cacbc936c3c92719ef326d4aeb4e90"
+ resolved "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.6.tgz"
integrity sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg==
eventsource@^3.0.2:
version "3.0.7"
- resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-3.0.7.tgz#1157622e2f5377bb6aef2114372728ba0c156989"
+ resolved "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz"
integrity sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==
dependencies:
eventsource-parser "^3.0.1"
execa@^5.1.1:
version "5.1.1"
- resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd"
+ resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz"
integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==
dependencies:
cross-spawn "^7.0.3"
@@ -2288,7 +2501,7 @@ execa@^5.1.1:
execa@^9.6.0:
version "9.6.1"
- resolved "https://registry.yarnpkg.com/execa/-/execa-9.6.1.tgz#5b90acedc6bdc0fa9b9a6ddf8f9cbb0c75a7c471"
+ resolved "https://registry.npmjs.org/execa/-/execa-9.6.1.tgz"
integrity sha512-9Be3ZoN4LmYR90tUoVu2te2BsbzHfhJyfEiAVfz7N5/zv+jduIfLrV2xdQXOHbaD6KgpGdO9PRPM1Y4Q9QkPkA==
dependencies:
"@sindresorhus/merge-streams" "^4.0.0"
@@ -2306,14 +2519,14 @@ execa@^9.6.0:
express-rate-limit@^8.2.1:
version "8.3.1"
- resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-8.3.1.tgz#0aaba098eadd40f6737f30a98e6b16fa1a29edfb"
+ resolved "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.3.1.tgz"
integrity sha512-D1dKN+cmyPWuvB+G2SREQDzPY1agpBIcTa9sJxOPMCNeH3gwzhqJRDWCXW3gg0y//+LQ/8j52JbMROWyrKdMdw==
dependencies:
ip-address "10.1.0"
-express@^5.2.1:
+express@^5.2.1, "express@>= 4.11":
version "5.2.1"
- resolved "https://registry.yarnpkg.com/express/-/express-5.2.1.tgz#8f21d15b6d327f92b4794ecf8cb08a72f956ac04"
+ resolved "https://registry.npmjs.org/express/-/express-5.2.1.tgz"
integrity sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==
dependencies:
accepts "^2.0.0"
@@ -2345,63 +2558,66 @@ express@^5.2.1:
type-is "^2.0.1"
vary "^1.1.2"
+extend@^3.0.0:
+ version "3.0.2"
+
fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
version "3.1.3"
- resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
+ resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz"
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
- version "3.3.1"
- resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4"
- integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==
+fast-glob@^3.3.3:
+ version "3.3.3"
+ resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz"
+ integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==
dependencies:
"@nodelib/fs.stat" "^2.0.2"
"@nodelib/fs.walk" "^1.2.3"
glob-parent "^5.1.2"
merge2 "^1.3.0"
- micromatch "^4.0.4"
+ micromatch "^4.0.8"
-fast-glob@^3.3.3:
- version "3.3.3"
- resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818"
- integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==
+ version "3.3.1"
+ resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz"
+ integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==
dependencies:
"@nodelib/fs.stat" "^2.0.2"
"@nodelib/fs.walk" "^1.2.3"
glob-parent "^5.1.2"
merge2 "^1.3.0"
- micromatch "^4.0.8"
+ micromatch "^4.0.4"
fast-json-stable-stringify@^2.0.0:
version "2.1.0"
- resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
+ resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz"
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
fast-levenshtein@^2.0.6:
version "2.0.6"
- resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
+ resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz"
integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==
fast-uri@^3.0.1:
version "3.1.0"
- resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.1.0.tgz#66eecff6c764c0df9b762e62ca7edcfb53b4edfa"
+ resolved "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz"
integrity sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==
fastq@^1.6.0:
version "1.20.1"
- resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.20.1.tgz#ca750a10dc925bc8b18839fd203e3ef4b3ced675"
+ resolved "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz"
integrity sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==
dependencies:
reusify "^1.0.4"
fdir@^6.2.0, fdir@^6.5.0:
version "6.5.0"
- resolved "https://registry.yarnpkg.com/fdir/-/fdir-6.5.0.tgz#ed2ab967a331ade62f18d077dae192684d50d350"
+ resolved "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz"
integrity sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==
fetch-blob@^3.1.2, fetch-blob@^3.1.4:
version "3.2.0"
- resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9"
+ resolved "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz"
integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==
dependencies:
node-domexception "^1.0.0"
@@ -2409,28 +2625,28 @@ fetch-blob@^3.1.2, fetch-blob@^3.1.4:
figures@^6.1.0:
version "6.1.0"
- resolved "https://registry.yarnpkg.com/figures/-/figures-6.1.0.tgz#935479f51865fa7479f6fa94fc6fc7ac14e62c4a"
+ resolved "https://registry.npmjs.org/figures/-/figures-6.1.0.tgz"
integrity sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==
dependencies:
is-unicode-supported "^2.0.0"
file-entry-cache@^8.0.0:
version "8.0.0"
- resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f"
+ resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz"
integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==
dependencies:
flat-cache "^4.0.0"
fill-range@^7.1.1:
version "7.1.1"
- resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292"
+ resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz"
integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==
dependencies:
to-regex-range "^5.0.1"
finalhandler@^2.1.0:
version "2.1.1"
- resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-2.1.1.tgz#a2c517a6559852bcdb06d1f8bd7f51b68fad8099"
+ resolved "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz"
integrity sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==
dependencies:
debug "^4.4.0"
@@ -2442,7 +2658,7 @@ finalhandler@^2.1.0:
find-up@^5.0.0:
version "5.0.0"
- resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc"
+ resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz"
integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==
dependencies:
locate-path "^6.0.0"
@@ -2450,7 +2666,7 @@ find-up@^5.0.0:
flat-cache@^4.0.0:
version "4.0.1"
- resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c"
+ resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz"
integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==
dependencies:
flatted "^3.2.9"
@@ -2458,36 +2674,45 @@ flat-cache@^4.0.0:
flatted@^3.2.9:
version "3.4.1"
- resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.4.1.tgz#84ccd9579e76e9cc0d246c11d8be0beb019143e6"
+ resolved "https://registry.npmjs.org/flatted/-/flatted-3.4.1.tgz"
integrity sha512-IxfVbRFVlV8V/yRaGzk0UVIcsKKHMSfYw66T/u4nTwlWteQePsxe//LjudR1AMX4tZW3WFCh3Zqa/sjlqpbURQ==
for-each@^0.3.3, for-each@^0.3.5:
version "0.3.5"
- resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.5.tgz#d650688027826920feeb0af747ee7b9421a41d47"
+ resolved "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz"
integrity sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==
dependencies:
is-callable "^1.2.7"
formdata-polyfill@^4.0.10:
version "4.0.10"
- resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423"
+ resolved "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz"
integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==
dependencies:
fetch-blob "^3.1.2"
version "0.2.0"
- resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811"
+ resolved "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz"
integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==
+framer-motion@^12.35.2:
+ version "12.35.2"
+ resolved "https://registry.npmjs.org/framer-motion/-/framer-motion-12.35.2.tgz"
+ integrity sha512-dhfuEMaNo0hc+AEqyHiIfiJRNb9U9UQutE9FoKm5pjf7CMitp9xPEF1iWZihR1q86LBmo6EJ7S8cN8QXEy49AA==
+ dependencies:
+ motion-dom "^12.35.2"
+ motion-utils "^12.29.2"
+ tslib "^2.4.0"
+
fresh@^2.0.0:
version "2.0.0"
- resolved "https://registry.yarnpkg.com/fresh/-/fresh-2.0.0.tgz#8dd7df6a1b3a1b3a5cf186c05a5dd267622635a4"
+ resolved "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz"
integrity sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==
fs-extra@^11.3.1:
version "11.3.4"
- resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.3.4.tgz#ab6934eca8bcf6f7f6b82742e33591f86301d6fc"
+ resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.4.tgz"
integrity sha512-CTXd6rk/M3/ULNQj8FBqBWHYBVYybQ3VPBw0xGKFe3tuH7ytT6ACnvzpIQ3UZtB8yvUKC2cXn1a+x+5EVQLovA==
dependencies:
graceful-fs "^4.2.0"
@@ -2496,12 +2721,12 @@ fs-extra@^11.3.1:
function-bind@^1.1.2:
version "1.1.2"
- resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c"
+ resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz"
integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==
function.prototype.name@^1.1.6, function.prototype.name@^1.1.8:
version "1.1.8"
- resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.8.tgz#e68e1df7b259a5c949eeef95cdbde53edffabb78"
+ resolved "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz"
integrity sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==
dependencies:
call-bind "^1.0.8"
@@ -2513,42 +2738,42 @@ function.prototype.name@^1.1.6, function.prototype.name@^1.1.8:
functions-have-names@^1.2.3:
version "1.2.3"
- resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834"
+ resolved "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz"
integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==
fuzzysort@^3.1.0:
version "3.1.0"
- resolved "https://registry.yarnpkg.com/fuzzysort/-/fuzzysort-3.1.0.tgz#4d7832d8fa48ad381753eaa7a7aae9927bdc10a8"
+ resolved "https://registry.npmjs.org/fuzzysort/-/fuzzysort-3.1.0.tgz"
integrity sha512-sR9BNCjBg6LNgwvxlBd0sBABvQitkLzoVY9MYYROQVX/FvfJ4Mai9LsGhDgd8qYdds0bY77VzYd5iuB+v5rwQQ==
fzf@^0.5.2:
version "0.5.2"
- resolved "https://registry.yarnpkg.com/fzf/-/fzf-0.5.2.tgz#a0561b12082c3401b4240cfb7d76085d7aeb68ff"
+ resolved "https://registry.npmjs.org/fzf/-/fzf-0.5.2.tgz"
integrity sha512-Tt4kuxLXFKHy8KT40zwsUPUkg1CrsgY25FxA2U/j/0WgEDCk3ddc/zLTCCcbSHX9FcKtLuVaDGtGE/STWC+j3Q==
generator-function@^2.0.0:
version "2.0.1"
- resolved "https://registry.yarnpkg.com/generator-function/-/generator-function-2.0.1.tgz#0e75dd410d1243687a0ba2e951b94eedb8f737a2"
+ resolved "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz"
integrity sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==
gensync@^1.0.0-beta.2:
version "1.0.0-beta.2"
- resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
+ resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz"
integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==
get-caller-file@^2.0.5:
version "2.0.5"
- resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
+ resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz"
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
get-east-asian-width@^1.0.0:
version "1.5.0"
- resolved "https://registry.yarnpkg.com/get-east-asian-width/-/get-east-asian-width-1.5.0.tgz#ce7008fe345edcf5497a6f557cfa54bc318a9ce7"
+ resolved "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.5.0.tgz"
integrity sha512-CQ+bEO+Tva/qlmw24dCejulK5pMzVnUOFOijVogd3KQs07HnRIgp8TGipvCCRT06xeYEbpbgwaCxglFyiuIcmA==
get-intrinsic@^1.2.4, get-intrinsic@^1.2.5, get-intrinsic@^1.2.6, get-intrinsic@^1.2.7, get-intrinsic@^1.3.0:
version "1.3.0"
- resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01"
+ resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz"
integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==
dependencies:
call-bind-apply-helpers "^1.0.2"
@@ -2564,12 +2789,12 @@ get-intrinsic@^1.2.4, get-intrinsic@^1.2.5, get-intrinsic@^1.2.6, get-intrinsic@
get-own-enumerable-keys@^1.0.0:
version "1.0.0"
- resolved "https://registry.yarnpkg.com/get-own-enumerable-keys/-/get-own-enumerable-keys-1.0.0.tgz#59bbda0f7e7469c8c74086e08f79f1381b203899"
+ resolved "https://registry.npmjs.org/get-own-enumerable-keys/-/get-own-enumerable-keys-1.0.0.tgz"
integrity sha512-PKsK2FSrQCyxcGHsGrLDcK0lx+0Ke+6e8KFFozA9/fIQLhQzPaRvJFdcz7+Axg3jUH/Mq+NI4xa5u/UT2tQskA==
get-proto@^1.0.0, get-proto@^1.0.1:
version "1.0.1"
- resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1"
+ resolved "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz"
integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==
dependencies:
dunder-proto "^1.0.1"
@@ -2577,12 +2802,12 @@ get-proto@^1.0.0, get-proto@^1.0.1:
get-stream@^6.0.0:
version "6.0.1"
- resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7"
+ resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz"
integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==
get-stream@^9.0.0:
version "9.0.1"
- resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-9.0.1.tgz#95157d21df8eb90d1647102b63039b1df60ebd27"
+ resolved "https://registry.npmjs.org/get-stream/-/get-stream-9.0.1.tgz"
integrity sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==
dependencies:
"@sec-ant/readable-stream" "^0.4.1"
@@ -2590,7 +2815,7 @@ get-stream@^9.0.0:
get-symbol-description@^1.1.0:
version "1.1.0"
- resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.1.0.tgz#7bdd54e0befe8ffc9f3b4e203220d9f1e881b6ee"
+ resolved "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz"
integrity sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==
dependencies:
call-bound "^1.0.3"
@@ -2599,38 +2824,38 @@ get-symbol-description@^1.1.0:
get-tsconfig@^4.10.0:
version "4.13.6"
- resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.13.6.tgz#2fbfda558a98a691a798f123afd95915badce876"
+ resolved "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.6.tgz"
integrity sha512-shZT/QMiSHc/YBLxxOkMtgSid5HFoauqCE3/exfsEcwg1WkeqjG+V40yBbBrsD+jW2HDXcs28xOfcbm2jI8Ddw==
dependencies:
resolve-pkg-maps "^1.0.0"
glob-parent@^5.1.2:
version "5.1.2"
- resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
+ resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz"
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
dependencies:
is-glob "^4.0.1"
glob-parent@^6.0.2:
version "6.0.2"
- resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3"
+ resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz"
integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==
dependencies:
is-glob "^4.0.3"
- version "16.4.0"
- resolved "https://registry.yarnpkg.com/globals/-/globals-16.4.0.tgz#574bc7e72993d40cf27cf6c241f324ee77808e51"
- integrity sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw==
-
globals@^14.0.0:
version "14.0.0"
- resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e"
+ resolved "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz"
integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==
+ version "16.4.0"
+ resolved "https://registry.npmjs.org/globals/-/globals-16.4.0.tgz"
+ integrity sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw==
+
globalthis@^1.0.4:
version "1.0.4"
- resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.4.tgz#7430ed3a975d97bfb59bcce41f5cabbafa651236"
+ resolved "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz"
integrity sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==
dependencies:
define-properties "^1.2.1"
@@ -2638,87 +2863,132 @@ globalthis@^1.0.4:
gopd@^1.0.1, gopd@^1.2.0:
version "1.2.0"
- resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1"
+ resolved "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz"
integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==
graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4:
version "4.2.11"
- resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
+ resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz"
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
graphql@^16.12.0:
version "16.13.1"
- resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.13.1.tgz#38ae5c76fbc4a009e0004dca6c76c370a1da7b54"
+ resolved "https://registry.npmjs.org/graphql/-/graphql-16.13.1.tgz"
integrity sha512-gGgrVCoDKlIZ8fIqXBBb0pPKqDgki0Z/FSKNiQzSGj2uEYHr1tq5wmBegGwJx6QB5S5cM0khSBpi/JFHMCvsmQ==
has-bigints@^1.0.2:
version "1.1.0"
- resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.1.0.tgz#28607e965ac967e03cd2a2c70a2636a1edad49fe"
+ resolved "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz"
integrity sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==
has-flag@^4.0.0:
version "4.0.0"
- resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
+ resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz"
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.2:
version "1.0.2"
- resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854"
+ resolved "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz"
integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==
dependencies:
es-define-property "^1.0.0"
has-proto@^1.2.0:
version "1.2.0"
- resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.2.0.tgz#5de5a6eabd95fdffd9818b43055e8065e39fe9d5"
+ resolved "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz"
integrity sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==
dependencies:
dunder-proto "^1.0.0"
has-symbols@^1.0.3, has-symbols@^1.1.0:
version "1.1.0"
- resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338"
+ resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz"
integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==
has-tostringtag@^1.0.2:
version "1.0.2"
- resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc"
+ resolved "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz"
integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==
dependencies:
has-symbols "^1.0.3"
hasown@^2.0.2:
version "2.0.2"
- resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003"
+ resolved "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz"
integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==
dependencies:
function-bind "^1.1.2"
+hast-util-to-html@^9.0.5:
+ version "9.0.5"
+ dependencies:
+ "@types/hast" "^3.0.0"
+ "@types/unist" "^3.0.0"
+ ccount "^2.0.0"
+ comma-separated-tokens "^2.0.0"
+ hast-util-whitespace "^3.0.0"
+ html-void-elements "^3.0.0"
+ mdast-util-to-hast "^13.0.0"
+ property-information "^7.0.0"
+ space-separated-tokens "^2.0.0"
+ stringify-entities "^4.0.0"
+ zwitch "^2.0.4"
+
+hast-util-to-jsx-runtime@^2.0.0:
+ version "2.3.6"
+ dependencies:
+ "@types/estree" "^1.0.0"
+ "@types/hast" "^3.0.0"
+ "@types/unist" "^3.0.0"
+ comma-separated-tokens "^2.0.0"
+ devlop "^1.0.0"
+ estree-util-is-identifier-name "^3.0.0"
+ hast-util-whitespace "^3.0.0"
+ mdast-util-mdx-expression "^2.0.0"
+ mdast-util-mdx-jsx "^3.0.0"
+ mdast-util-mdxjs-esm "^2.0.0"
+ property-information "^7.0.0"
+ space-separated-tokens "^2.0.0"
+ style-to-js "^1.0.0"
+ unist-util-position "^5.0.0"
+ vfile-message "^4.0.0"
+
+hast-util-whitespace@^3.0.0:
+ version "3.0.0"
+ dependencies:
+ "@types/hast" "^3.0.0"
+
headers-polyfill@^4.0.2:
version "4.0.3"
- resolved "https://registry.yarnpkg.com/headers-polyfill/-/headers-polyfill-4.0.3.tgz#922a0155de30ecc1f785bcf04be77844ca95ad07"
+ resolved "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-4.0.3.tgz"
integrity sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==
version "0.25.1"
- resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.25.1.tgz#6aeec17d1983b4eabf69721f3aa3eb705b17f480"
+ resolved "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.25.1.tgz"
integrity sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==
hermes-parser@^0.25.1:
version "0.25.1"
- resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.25.1.tgz#5be0e487b2090886c62bd8a11724cd766d5f54d1"
+ resolved "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.25.1.tgz"
integrity sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==
dependencies:
hermes-estree "0.25.1"
-hono@^4.11.4:
+hono@^4, hono@^4.11.4:
version "4.12.5"
- resolved "https://registry.yarnpkg.com/hono/-/hono-4.12.5.tgz#8c16209b35040025d3f110d18f3b821de6cab00f"
+ resolved "https://registry.npmjs.org/hono/-/hono-4.12.5.tgz"
integrity sha512-3qq+FUBtlTHhtYxbxheZgY8NIFnkkC/MR8u5TTsr7YZ3wixryQ3cCwn3iZbg8p8B88iDBBAYSfZDS75t8MN7Vg==
+html-url-attributes@^3.0.0:
+ version "3.0.1"
+
+html-void-elements@^3.0.0:
+ version "3.0.0"
+
http-errors@^2.0.0, http-errors@^2.0.1, http-errors@~2.0.1:
version "2.0.1"
- resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.1.tgz#36d2f65bc909c8790018dd36fb4d93da6caae06b"
+ resolved "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz"
integrity sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==
dependencies:
depd "~2.0.0"
@@ -2729,7 +2999,7 @@ http-errors@^2.0.0, http-errors@^2.0.1, http-errors@~2.0.1:
https-proxy-agent@^7.0.6:
version "7.0.6"
- resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz#da8dfeac7da130b05c2ba4b59c9b6cd66611a6b9"
+ resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz"
integrity sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==
dependencies:
agent-base "^7.1.2"
@@ -2737,34 +3007,56 @@ https-proxy-agent@^7.0.6:
human-signals@^2.1.0:
version "2.1.0"
- resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
+ resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz"
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==
human-signals@^8.0.1:
version "8.0.1"
- resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-8.0.1.tgz#f08bb593b6d1db353933d06156cedec90abe51fb"
+ resolved "https://registry.npmjs.org/human-signals/-/human-signals-8.0.1.tgz"
integrity sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ==
+iceberg-js@^0.8.1:
+ version "0.8.1"
+ resolved "https://registry.npmjs.org/iceberg-js/-/iceberg-js-0.8.1.tgz"
+ integrity sha512-1dhVQZXhcHje7798IVM+xoo/1ZdVfzOMIc8/rgVSijRK38EDqOJoGula9N/8ZI5RD8QTxNQtK/Gozpr+qUqRRA==
+
iconv-lite@^0.7.0, iconv-lite@~0.7.0:
version "0.7.2"
- resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.7.2.tgz#d0bdeac3f12b4835b7359c2ad89c422a4d1cc72e"
+ resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz"
integrity sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==
dependencies:
safer-buffer ">= 2.1.2 < 3.0.0"
+icu-minify@^4.8.3:
+ version "4.8.3"
+ resolved "https://registry.npmjs.org/icu-minify/-/icu-minify-4.8.3.tgz"
+ integrity sha512-65Av7FLosNk7bPbmQx5z5XG2Y3T2GFppcjiXh4z1idHeVgQxlDpAmkGoYI0eFzAvrOnjpWTL5FmPDhsdfRMPEA==
+ dependencies:
+ "@formatjs/icu-messageformat-parser" "^3.4.0"
+
ignore@^5.2.0, ignore@^5.3.0:
version "5.3.2"
- resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5"
+ resolved "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz"
integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==
ignore@^7.0.5:
version "7.0.5"
- resolved "https://registry.yarnpkg.com/ignore/-/ignore-7.0.5.tgz#4cb5f6cd7d4c7ab0365738c7aea888baa6d7efd9"
+ resolved "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz"
integrity sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==
+immer@^10.1.1, immer@>=9.0.6:
+ version "10.2.0"
+ resolved "https://registry.npmjs.org/immer/-/immer-10.2.0.tgz"
+ integrity sha512-d/+XTN3zfODyjr89gM3mPq1WNX2B8pYsu7eORitdwyA2sBubnTl3laYlBk4sXY5FUa5qTZGBDPJICVbvqzjlbw==
+
+immer@^11.0.0:
+ version "11.1.4"
+ resolved "https://registry.npmjs.org/immer/-/immer-11.1.4.tgz"
+ integrity sha512-XREFCPo6ksxVzP4E0ekD5aMdf8WMwmdNaz6vuvxgI40UaEiu6q3p8X52aU6GdyvLY3XXX/8R7JOTXStz/nBbRw==
+
import-fresh@^3.2.1, import-fresh@^3.3.0:
version "3.3.1"
- resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.1.tgz#9cecb56503c0ada1f2741dbbd6546e4b13b57ccf"
+ resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz"
integrity sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==
dependencies:
parent-module "^1.0.0"
@@ -2772,36 +3064,63 @@ import-fresh@^3.2.1, import-fresh@^3.3.0:
imurmurhash@^0.1.4:
version "0.1.4"
- resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
+ resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz"
integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==
inherits@~2.0.4:
version "2.0.4"
- resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
+ resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
+ version "0.2.7"
+
internal-slot@^1.1.0:
version "1.1.0"
- resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.1.0.tgz#1eac91762947d2f7056bc838d93e13b2e9604961"
+ resolved "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz"
integrity sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==
dependencies:
es-errors "^1.3.0"
hasown "^2.0.2"
side-channel "^1.1.0"
+"internmap@1 - 2":
+ version "2.0.3"
+ resolved "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz"
+ integrity sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==
+
+intl-messageformat@^11.1.0:
+ version "11.1.2"
+ resolved "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-11.1.2.tgz"
+ integrity sha512-ucSrQmZGAxfiBHfBRXW/k7UC8MaGFlEj4Ry1tKiDcmgwQm1y3EDl40u+4VNHYomxJQMJi9NEI3riDRlth96jKg==
+ dependencies:
+ "@formatjs/ecma402-abstract" "3.1.1"
+ "@formatjs/fast-memoize" "3.1.0"
+ "@formatjs/icu-messageformat-parser" "3.5.1"
+ tslib "^2.8.1"
+
version "10.1.0"
- resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-10.1.0.tgz#d8dcffb34d0e02eb241427444a6e23f5b0595aa4"
+ resolved "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz"
integrity sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==
version "1.9.1"
- resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3"
+ resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz"
integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==
+is-alphabetical@^2.0.0:
+ version "2.0.1"
+
+is-alphanumerical@^2.0.0:
+ version "2.0.1"
+ dependencies:
+ is-alphabetical "^2.0.0"
+ is-decimal "^2.0.0"
+
is-array-buffer@^3.0.4, is-array-buffer@^3.0.5:
version "3.0.5"
- resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.5.tgz#65742e1e687bd2cc666253068fd8707fe4d44280"
+ resolved "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz"
integrity sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==
dependencies:
call-bind "^1.0.8"
@@ -2810,12 +3129,12 @@ is-array-buffer@^3.0.4, is-array-buffer@^3.0.5:
is-arrayish@^0.2.1:
version "0.2.1"
- resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
+ resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz"
integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==
is-async-function@^2.0.0:
version "2.1.1"
- resolved "https://registry.yarnpkg.com/is-async-function/-/is-async-function-2.1.1.tgz#3e69018c8e04e73b738793d020bfe884b9fd3523"
+ resolved "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz"
integrity sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==
dependencies:
async-function "^1.0.0"
@@ -2826,14 +3145,14 @@ is-async-function@^2.0.0:
is-bigint@^1.1.0:
version "1.1.0"
- resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.1.0.tgz#dda7a3445df57a42583db4228682eba7c4170672"
+ resolved "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz"
integrity sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==
dependencies:
has-bigints "^1.0.2"
is-boolean-object@^1.2.1:
version "1.2.2"
- resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.2.2.tgz#7067f47709809a393c71ff5bb3e135d8a9215d9e"
+ resolved "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz"
integrity sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==
dependencies:
call-bound "^1.0.3"
@@ -2841,26 +3160,26 @@ is-boolean-object@^1.2.1:
is-bun-module@^2.0.0:
version "2.0.0"
- resolved "https://registry.yarnpkg.com/is-bun-module/-/is-bun-module-2.0.0.tgz#4d7859a87c0fcac950c95e666730e745eae8bddd"
+ resolved "https://registry.npmjs.org/is-bun-module/-/is-bun-module-2.0.0.tgz"
integrity sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==
dependencies:
semver "^7.7.1"
is-callable@^1.2.7:
version "1.2.7"
- resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055"
+ resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz"
integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==
is-core-module@^2.13.0, is-core-module@^2.16.1:
version "2.16.1"
- resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4"
+ resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz"
integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==
dependencies:
hasown "^2.0.2"
is-data-view@^1.0.1, is-data-view@^1.0.2:
version "1.0.2"
- resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.2.tgz#bae0a41b9688986c2188dda6657e56b8f9e63b8e"
+ resolved "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz"
integrity sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==
dependencies:
call-bound "^1.0.2"
@@ -2869,37 +3188,40 @@ is-data-view@^1.0.1, is-data-view@^1.0.2:
is-date-object@^1.0.5, is-date-object@^1.1.0:
version "1.1.0"
- resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.1.0.tgz#ad85541996fc7aa8b2729701d27b7319f95d82f7"
+ resolved "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz"
integrity sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==
dependencies:
call-bound "^1.0.2"
has-tostringtag "^1.0.2"
+is-decimal@^2.0.0:
+ version "2.0.1"
+
is-docker@^3.0.0:
version "3.0.0"
- resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200"
+ resolved "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz"
integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==
is-extglob@^2.1.1:
version "2.1.1"
- resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
+ resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz"
integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==
is-finalizationregistry@^1.1.0:
version "1.1.1"
- resolved "https://registry.yarnpkg.com/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz#eefdcdc6c94ddd0674d9c85887bf93f944a97c90"
+ resolved "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz"
integrity sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==
dependencies:
call-bound "^1.0.3"
is-fullwidth-code-point@^3.0.0:
version "3.0.0"
- resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
+ resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz"
integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
is-generator-function@^1.0.10:
version "1.1.2"
- resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.1.2.tgz#ae3b61e3d5ea4e4839b90bad22b02335051a17d5"
+ resolved "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz"
integrity sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==
dependencies:
call-bound "^1.0.4"
@@ -2910,46 +3232,49 @@ is-generator-function@^1.0.10:
is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3:
version "4.0.3"
- resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
+ resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz"
integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
dependencies:
is-extglob "^2.1.1"
+is-hexadecimal@^2.0.0:
+ version "2.0.1"
+
is-in-ssh@^1.0.0:
version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-in-ssh/-/is-in-ssh-1.0.0.tgz#8eb73c1cabba77748d389588eeea132a63057622"
+ resolved "https://registry.npmjs.org/is-in-ssh/-/is-in-ssh-1.0.0.tgz"
integrity sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw==
is-inside-container@^1.0.0:
version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4"
+ resolved "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz"
integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==
dependencies:
is-docker "^3.0.0"
is-interactive@^2.0.0:
version "2.0.0"
- resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-2.0.0.tgz#40c57614593826da1100ade6059778d597f16e90"
+ resolved "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz"
integrity sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==
is-map@^2.0.3:
version "2.0.3"
- resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.3.tgz#ede96b7fe1e270b3c4465e3a465658764926d62e"
+ resolved "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz"
integrity sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==
is-negative-zero@^2.0.3:
version "2.0.3"
- resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747"
+ resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz"
integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==
is-node-process@^1.2.0:
version "1.2.0"
- resolved "https://registry.yarnpkg.com/is-node-process/-/is-node-process-1.2.0.tgz#ea02a1b90ddb3934a19aea414e88edef7e11d134"
+ resolved "https://registry.npmjs.org/is-node-process/-/is-node-process-1.2.0.tgz"
integrity sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==
is-number-object@^1.1.1:
version "1.1.1"
- resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.1.1.tgz#144b21e95a1bc148205dcc2814a9134ec41b2541"
+ resolved "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz"
integrity sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==
dependencies:
call-bound "^1.0.3"
@@ -2957,27 +3282,27 @@ is-number-object@^1.1.1:
is-number@^7.0.0:
version "7.0.0"
- resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
+ resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz"
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
is-obj@^3.0.0:
version "3.0.0"
- resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-3.0.0.tgz#b0889f1f9f8cb87e87df53a8d1230a2250f8b9be"
+ resolved "https://registry.npmjs.org/is-obj/-/is-obj-3.0.0.tgz"
integrity sha512-IlsXEHOjtKhpN8r/tRFj2nDyTmHvcfNeu/nrRIcXE17ROeatXchkojffa1SpdqW4cr/Fj6QkEf/Gn4zf6KKvEQ==
-is-plain-obj@^4.1.0:
+is-plain-obj@^4.0.0, is-plain-obj@^4.1.0:
version "4.1.0"
- resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-4.1.0.tgz#d65025edec3657ce032fd7db63c97883eaed71f0"
+ resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz"
integrity sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==
is-promise@^4.0.0:
version "4.0.0"
- resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-4.0.0.tgz#42ff9f84206c1991d26debf520dd5c01042dd2f3"
+ resolved "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz"
integrity sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==
is-regex@^1.2.1:
version "1.2.1"
- resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.2.1.tgz#76d70a3ed10ef9be48eb577887d74205bf0cad22"
+ resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz"
integrity sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==
dependencies:
call-bound "^1.0.2"
@@ -2987,34 +3312,34 @@ is-regex@^1.2.1:
is-regexp@^3.1.0:
version "3.1.0"
- resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-3.1.0.tgz#0235eab9cda5b83f96ac4a263d8c32c9d5ad7422"
+ resolved "https://registry.npmjs.org/is-regexp/-/is-regexp-3.1.0.tgz"
integrity sha512-rbku49cWloU5bSMI+zaRaXdQHXnthP6DZ/vLnfdSKyL4zUzuWnomtOEiZZOd+ioQ+avFo/qau3KPTc7Fjy1uPA==
is-set@^2.0.3:
version "2.0.3"
- resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.3.tgz#8ab209ea424608141372ded6e0cb200ef1d9d01d"
+ resolved "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz"
integrity sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==
is-shared-array-buffer@^1.0.4:
version "1.0.4"
- resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz#9b67844bd9b7f246ba0708c3a93e34269c774f6f"
+ resolved "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz"
integrity sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==
dependencies:
call-bound "^1.0.3"
is-stream@^2.0.0:
version "2.0.1"
- resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077"
+ resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz"
integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==
is-stream@^4.0.1:
version "4.0.1"
- resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-4.0.1.tgz#375cf891e16d2e4baec250b85926cffc14720d9b"
+ resolved "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz"
integrity sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==
is-string@^1.1.1:
version "1.1.1"
- resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.1.1.tgz#92ea3f3d5c5b6e039ca8677e5ac8d07ea773cbb9"
+ resolved "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz"
integrity sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==
dependencies:
call-bound "^1.0.3"
@@ -3022,7 +3347,7 @@ is-string@^1.1.1:
is-symbol@^1.0.4, is-symbol@^1.1.1:
version "1.1.1"
- resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.1.1.tgz#f47761279f532e2b05a7024a7506dbbedacd0634"
+ resolved "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz"
integrity sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==
dependencies:
call-bound "^1.0.2"
@@ -3031,36 +3356,36 @@ is-symbol@^1.0.4, is-symbol@^1.1.1:
is-typed-array@^1.1.13, is-typed-array@^1.1.14, is-typed-array@^1.1.15:
version "1.1.15"
- resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.15.tgz#4bfb4a45b61cee83a5a46fba778e4e8d59c0ce0b"
+ resolved "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz"
integrity sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==
dependencies:
which-typed-array "^1.1.16"
is-unicode-supported@^1.3.0:
version "1.3.0"
- resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz#d824984b616c292a2e198207d4a609983842f714"
+ resolved "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz"
integrity sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==
is-unicode-supported@^2.0.0:
version "2.1.0"
- resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz#09f0ab0de6d3744d48d265ebb98f65d11f2a9b3a"
+ resolved "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz"
integrity sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==
is-weakmap@^2.0.2:
version "2.0.2"
- resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.2.tgz#bf72615d649dfe5f699079c54b83e47d1ae19cfd"
+ resolved "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz"
integrity sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==
is-weakref@^1.0.2, is-weakref@^1.1.1:
version "1.1.1"
- resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.1.1.tgz#eea430182be8d64174bd96bffbc46f21bf3f9293"
+ resolved "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz"
integrity sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==
dependencies:
call-bound "^1.0.3"
is-weakset@^2.0.3:
version "2.0.4"
- resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.4.tgz#c9f5deb0bc1906c6d6f1027f284ddf459249daca"
+ resolved "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz"
integrity sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==
dependencies:
call-bound "^1.0.3"
@@ -3068,29 +3393,29 @@ is-weakset@^2.0.3:
is-wsl@^3.1.0:
version "3.1.1"
- resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-3.1.1.tgz#327897b26832a3eb117da6c27492d04ca132594f"
+ resolved "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.1.tgz"
integrity sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==
dependencies:
is-inside-container "^1.0.0"
isarray@^2.0.5:
version "2.0.5"
- resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723"
+ resolved "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz"
integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==
isexe@^2.0.0:
version "2.0.0"
- resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
+ resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz"
integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==
isexe@^3.1.1:
version "3.1.5"
- resolved "https://registry.yarnpkg.com/isexe/-/isexe-3.1.5.tgz#42e368f68d5e10dadfee4fda7b550bc2d8892dc9"
+ resolved "https://registry.npmjs.org/isexe/-/isexe-3.1.5.tgz"
integrity sha512-6B3tLtFqtQS4ekarvLVMZ+X+VlvQekbe4taUkf/rhVO3d/h0M2rfARm/pXLcPEsjjMsFgrFgSrhQIxcSVrBz8w==
iterator.prototype@^1.1.5:
version "1.1.5"
- resolved "https://registry.yarnpkg.com/iterator.prototype/-/iterator.prototype-1.1.5.tgz#12c959a29de32de0aa3bbbb801f4d777066dae39"
+ resolved "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz"
integrity sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==
dependencies:
define-data-property "^1.1.4"
@@ -3100,78 +3425,78 @@ iterator.prototype@^1.1.5:
has-symbols "^1.1.0"
set-function-name "^2.0.2"
-jiti@^2.6.1:
+jiti@*, jiti@^2.6.1:
version "2.6.1"
- resolved "https://registry.yarnpkg.com/jiti/-/jiti-2.6.1.tgz#178ef2fc9a1a594248c20627cd820187a4d78d92"
+ resolved "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz"
integrity sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==
jose@^6.1.3:
version "6.2.1"
- resolved "https://registry.yarnpkg.com/jose/-/jose-6.2.1.tgz#7a6b1de83816deaee9055a558e1278a7b2b9ea1b"
+ resolved "https://registry.npmjs.org/jose/-/jose-6.2.1.tgz"
integrity sha512-jUaKr1yrbfaImV7R2TN/b3IcZzsw38/chqMpo2XJ7i2F8AfM/lA4G1goC3JVEwg0H7UldTmSt3P68nt31W7/mw==
"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
version "4.0.0"
- resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
+ resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
js-yaml@^4.1.0, js-yaml@^4.1.1:
version "4.1.1"
- resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.1.tgz#854c292467705b699476e1a2decc0c8a3458806b"
+ resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz"
integrity sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==
dependencies:
argparse "^2.0.1"
jsesc@^3.0.2:
version "3.1.0"
- resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d"
+ resolved "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz"
integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==
version "3.0.1"
- resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13"
+ resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz"
integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==
json-parse-even-better-errors@^2.3.0:
version "2.3.1"
- resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d"
+ resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz"
integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==
json-schema-traverse@^0.4.1:
version "0.4.1"
- resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
+ resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz"
integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
json-schema-traverse@^1.0.0:
version "1.0.0"
- resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2"
+ resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz"
integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==
json-schema-typed@^8.0.2:
version "8.0.2"
- resolved "https://registry.yarnpkg.com/json-schema-typed/-/json-schema-typed-8.0.2.tgz#e98ee7b1899ff4a184534d1f167c288c66bbeff4"
+ resolved "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-8.0.2.tgz"
integrity sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==
json-stable-stringify-without-jsonify@^1.0.1:
version "1.0.1"
- resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
+ resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz"
integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==
json5@^1.0.2:
version "1.0.2"
- resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593"
+ resolved "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz"
integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==
dependencies:
minimist "^1.2.0"
json5@^2.2.2, json5@^2.2.3:
version "2.2.3"
- resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283"
+ resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz"
integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==
jsonfile@^6.0.1:
version "6.2.0"
- resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.2.0.tgz#7c265bd1b65de6977478300087c99f1c84383f62"
+ resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz"
integrity sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==
dependencies:
universalify "^2.0.0"
@@ -3180,7 +3505,7 @@ jsonfile@^6.0.1:
"jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.3.5:
version "3.3.5"
- resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz#4766bd05a8e2a11af222becd19e15575e52a853a"
+ resolved "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz"
integrity sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==
dependencies:
array-includes "^3.1.6"
@@ -3190,99 +3515,49 @@ jsonfile@^6.0.1:
keyv@^4.5.4:
version "4.5.4"
- resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93"
+ resolved "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz"
integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==
dependencies:
json-buffer "3.0.1"
kleur@^3.0.3:
version "3.0.3"
- resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e"
+ resolved "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz"
integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==
kleur@^4.1.5:
version "4.1.5"
- resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780"
+ resolved "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz"
integrity sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==
language-subtag-registry@^0.3.20:
version "0.3.23"
- resolved "https://registry.yarnpkg.com/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz#23529e04d9e3b74679d70142df3fd2eb6ec572e7"
+ resolved "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz"
integrity sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==
language-tags@^1.0.9:
version "1.0.9"
- resolved "https://registry.yarnpkg.com/language-tags/-/language-tags-1.0.9.tgz#1ffdcd0ec0fafb4b1be7f8b11f306ad0f9c08777"
+ resolved "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz"
integrity sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==
dependencies:
language-subtag-registry "^0.3.20"
levn@^0.4.1:
version "0.4.1"
- resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade"
+ resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz"
integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==
- dependencies:
- prelude-ls "^1.2.1"
- type-check "~0.4.0"
-
- version "1.31.1"
- resolved "https://registry.yarnpkg.com/lightningcss-android-arm64/-/lightningcss-android-arm64-1.31.1.tgz#609ff48332adff452a8157a7c2842fd692a8eac4"
- integrity sha512-HXJF3x8w9nQ4jbXRiNppBCqeZPIAfUo8zE/kOEGbW5NZvGc/K7nMxbhIr+YlFlHW5mpbg/YFPdbnCh1wAXCKFg==
-
- version "1.31.1"
- resolved "https://registry.yarnpkg.com/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.31.1.tgz#a13da040a7929582bab3ace9a67bdc146e99fc2d"
- integrity sha512-02uTEqf3vIfNMq3h/z2cJfcOXnQ0GRwQrkmPafhueLb2h7mqEidiCzkE4gBMEH65abHRiQvhdcQ+aP0D0g67sg==
-
- version "1.31.1"
- resolved "https://registry.yarnpkg.com/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.31.1.tgz#f7482c311273571ec0c2bd8277c1f5f6e90e03a4"
- integrity sha512-1ObhyoCY+tGxtsz1lSx5NXCj3nirk0Y0kB/g8B8DT+sSx4G9djitg9ejFnjb3gJNWo7qXH4DIy2SUHvpoFwfTA==
-
- version "1.31.1"
- resolved "https://registry.yarnpkg.com/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.31.1.tgz#91df1bb290f1cb7bb2af832d7d0d8809225e0124"
- integrity sha512-1RINmQKAItO6ISxYgPwszQE1BrsVU5aB45ho6O42mu96UiZBxEXsuQ7cJW4zs4CEodPUioj/QrXW1r9pLUM74A==
-
- version "1.31.1"
- resolved "https://registry.yarnpkg.com/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.31.1.tgz#c3cad5ae8b70045f21600dc95295ab6166acf57e"
- integrity sha512-OOCm2//MZJ87CdDK62rZIu+aw9gBv4azMJuA8/KB74wmfS3lnC4yoPHm0uXZ/dvNNHmnZnB8XLAZzObeG0nS1g==
-
- version "1.31.1"
- resolved "https://registry.yarnpkg.com/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.31.1.tgz#a5c4f6a5ac77447093f61b209c0bd7fef1f0a3e3"
- integrity sha512-WKyLWztD71rTnou4xAD5kQT+982wvca7E6QoLpoawZ1gP9JM0GJj4Tp5jMUh9B3AitHbRZ2/H3W5xQmdEOUlLg==
-
- version "1.31.1"
- resolved "https://registry.yarnpkg.com/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.31.1.tgz#af26ab8f829b727ada0a200938a6c8796ff36900"
- integrity sha512-mVZ7Pg2zIbe3XlNbZJdjs86YViQFoJSpc41CbVmKBPiGmC4YrfeOyz65ms2qpAobVd7WQsbW4PdsSJEMymyIMg==
-
- version "1.31.1"
- resolved "https://registry.yarnpkg.com/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.31.1.tgz#a891d44e84b71c0d88959feb9a7522bbf61450ee"
- integrity sha512-xGlFWRMl+0KvUhgySdIaReQdB4FNudfUTARn7q0hh/V67PVGCs3ADFjw+6++kG1RNd0zdGRlEKa+T13/tQjPMA==
-
- version "1.31.1"
- resolved "https://registry.yarnpkg.com/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.31.1.tgz#8c8b21def851f4d477fa897b80cb3db2b650bc6e"
- integrity sha512-eowF8PrKHw9LpoZii5tdZwnBcYDxRw2rRCyvAXLi34iyeYfqCQNA9rmUM0ce62NlPhCvof1+9ivRaTY6pSKDaA==
-
- version "1.31.1"
- resolved "https://registry.yarnpkg.com/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.31.1.tgz#79000fb8c57e94a91b8fc643e74d5a54407d7080"
- integrity sha512-aJReEbSEQzx1uBlQizAOBSjcmr9dCdL3XuC/6HLXAxmtErsj2ICo5yYggg1qOODQMtnjNQv2UHb9NpOuFtYe4w==
+ dependencies:
+ prelude-ls "^1.2.1"
+ type-check "~0.4.0"
version "1.31.1"
- resolved "https://registry.yarnpkg.com/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.31.1.tgz#7f025274c81c7d659829731e09c8b6f442209837"
- integrity sha512-I9aiFrbd7oYHwlnQDqr1Roz+fTz61oDDJX7n9tYF9FJymH1cIN1DtKw3iYt6b8WZgEjoNwVSncwF4wx/ZedMhw==
+ resolved "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.31.1.tgz"
+ integrity sha512-02uTEqf3vIfNMq3h/z2cJfcOXnQ0GRwQrkmPafhueLb2h7mqEidiCzkE4gBMEH65abHRiQvhdcQ+aP0D0g67sg==
version "1.31.1"
- resolved "https://registry.yarnpkg.com/lightningcss/-/lightningcss-1.31.1.tgz#1a19dd327b547a7eda1d5c296ebe1e72df5a184b"
+ resolved "https://registry.npmjs.org/lightningcss/-/lightningcss-1.31.1.tgz"
integrity sha512-l51N2r93WmGUye3WuFoN5k10zyvrVs0qfKBhyC5ogUQ6Ew6JUSswh78mbSO+IU3nTWsyOArqPCcShdQSadghBQ==
dependencies:
detect-libc "^2.0.3"
@@ -3301,83 +3576,467 @@ [email protected]:
lines-and-columns@^1.1.6:
version "1.2.4"
- resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"
+ resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz"
integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==
locate-path@^6.0.0:
version "6.0.0"
- resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286"
+ resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz"
integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==
dependencies:
p-locate "^5.0.0"
lodash.merge@^4.6.2:
version "4.6.2"
- resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
+ resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz"
integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
log-symbols@^6.0.0:
version "6.0.0"
- resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-6.0.0.tgz#bb95e5f05322651cac30c0feb6404f9f2a8a9439"
+ resolved "https://registry.npmjs.org/log-symbols/-/log-symbols-6.0.0.tgz"
integrity sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==
dependencies:
chalk "^5.3.0"
is-unicode-supported "^1.3.0"
+longest-streak@^3.0.0:
+ version "3.1.0"
+
loose-envify@^1.4.0:
version "1.4.0"
- resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
+ resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz"
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
dependencies:
js-tokens "^3.0.0 || ^4.0.0"
lru-cache@^5.1.1:
version "5.1.1"
- resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
+ resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz"
integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==
dependencies:
yallist "^3.0.2"
lucide-react@^0.577.0:
version "0.577.0"
- resolved "https://registry.yarnpkg.com/lucide-react/-/lucide-react-0.577.0.tgz#8ae89edd8415f99c6319a38b40d9c513f6fa5062"
+ resolved "https://registry.npmjs.org/lucide-react/-/lucide-react-0.577.0.tgz"
integrity sha512-4LjoFv2eEPwYDPg/CUdBJQSDfPyzXCRrVW1X7jrx/trgxnxkHFjnVZINbzvzxjN70dxychOfg+FTYwBiS3pQ5A==
magic-string@^0.30.21:
version "0.30.21"
- resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.21.tgz#56763ec09a0fa8091df27879fd94d19078c00d91"
+ resolved "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz"
integrity sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==
dependencies:
"@jridgewell/sourcemap-codec" "^1.5.5"
+markdown-table@^3.0.0:
+ version "3.0.4"
+
+marked@^18.0.0:
+ version "18.0.0"
+ resolved "https://registry.npmjs.org/marked/-/marked-18.0.0.tgz"
+ integrity sha512-2e7Qiv/HJSXj8rDEpgTvGKsP8yYtI9xXHKDnrftrmnrJPaFNM7VRb2YCzWaX4BP1iCJ/XPduzDJZMFoqTCcIMA==
+
math-intrinsics@^1.1.0:
version "1.1.0"
- resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9"
+ resolved "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz"
integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==
+mdast-util-find-and-replace@^3.0.0:
+ version "3.0.2"
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ escape-string-regexp "^5.0.0"
+ unist-util-is "^6.0.0"
+ unist-util-visit-parents "^6.0.0"
+
+mdast-util-from-markdown@^2.0.0:
+ version "2.0.3"
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ "@types/unist" "^3.0.0"
+ decode-named-character-reference "^1.0.0"
+ devlop "^1.0.0"
+ mdast-util-to-string "^4.0.0"
+ micromark "^4.0.0"
+ micromark-util-decode-numeric-character-reference "^2.0.0"
+ micromark-util-decode-string "^2.0.0"
+ micromark-util-normalize-identifier "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+ unist-util-stringify-position "^4.0.0"
+
+mdast-util-gfm-autolink-literal@^2.0.0:
+ version "2.0.1"
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ ccount "^2.0.0"
+ devlop "^1.0.0"
+ mdast-util-find-and-replace "^3.0.0"
+ micromark-util-character "^2.0.0"
+
+mdast-util-gfm-footnote@^2.0.0:
+ version "2.1.0"
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ devlop "^1.1.0"
+ mdast-util-from-markdown "^2.0.0"
+ mdast-util-to-markdown "^2.0.0"
+ micromark-util-normalize-identifier "^2.0.0"
+
+mdast-util-gfm-strikethrough@^2.0.0:
+ version "2.0.0"
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ mdast-util-from-markdown "^2.0.0"
+ mdast-util-to-markdown "^2.0.0"
+
+mdast-util-gfm-table@^2.0.0:
+ version "2.0.0"
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ devlop "^1.0.0"
+ markdown-table "^3.0.0"
+ mdast-util-from-markdown "^2.0.0"
+ mdast-util-to-markdown "^2.0.0"
+
+mdast-util-gfm-task-list-item@^2.0.0:
+ version "2.0.0"
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ devlop "^1.0.0"
+ mdast-util-from-markdown "^2.0.0"
+ mdast-util-to-markdown "^2.0.0"
+
+mdast-util-gfm@^3.0.0:
+ version "3.1.0"
+ dependencies:
+ mdast-util-from-markdown "^2.0.0"
+ mdast-util-gfm-autolink-literal "^2.0.0"
+ mdast-util-gfm-footnote "^2.0.0"
+ mdast-util-gfm-strikethrough "^2.0.0"
+ mdast-util-gfm-table "^2.0.0"
+ mdast-util-gfm-task-list-item "^2.0.0"
+ mdast-util-to-markdown "^2.0.0"
+
+mdast-util-mdx-expression@^2.0.0:
+ version "2.0.1"
+ dependencies:
+ "@types/estree-jsx" "^1.0.0"
+ "@types/hast" "^3.0.0"
+ "@types/mdast" "^4.0.0"
+ devlop "^1.0.0"
+ mdast-util-from-markdown "^2.0.0"
+ mdast-util-to-markdown "^2.0.0"
+
+mdast-util-mdx-jsx@^3.0.0:
+ version "3.2.0"
+ dependencies:
+ "@types/estree-jsx" "^1.0.0"
+ "@types/hast" "^3.0.0"
+ "@types/mdast" "^4.0.0"
+ "@types/unist" "^3.0.0"
+ ccount "^2.0.0"
+ devlop "^1.1.0"
+ mdast-util-from-markdown "^2.0.0"
+ mdast-util-to-markdown "^2.0.0"
+ parse-entities "^4.0.0"
+ stringify-entities "^4.0.0"
+ unist-util-stringify-position "^4.0.0"
+ vfile-message "^4.0.0"
+
+mdast-util-mdxjs-esm@^2.0.0:
+ version "2.0.1"
+ dependencies:
+ "@types/estree-jsx" "^1.0.0"
+ "@types/hast" "^3.0.0"
+ "@types/mdast" "^4.0.0"
+ devlop "^1.0.0"
+ mdast-util-from-markdown "^2.0.0"
+ mdast-util-to-markdown "^2.0.0"
+
+mdast-util-newline-to-break@^2.0.0:
+ version "2.0.0"
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ mdast-util-find-and-replace "^3.0.0"
+
+mdast-util-phrasing@^4.0.0:
+ version "4.1.0"
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ unist-util-is "^6.0.0"
+
+mdast-util-to-hast@^13.0.0:
+ version "13.2.1"
+ dependencies:
+ "@types/hast" "^3.0.0"
+ "@types/mdast" "^4.0.0"
+ "@ungap/structured-clone" "^1.0.0"
+ devlop "^1.0.0"
+ micromark-util-sanitize-uri "^2.0.0"
+ trim-lines "^3.0.0"
+ unist-util-position "^5.0.0"
+ unist-util-visit "^5.0.0"
+ vfile "^6.0.0"
+
+mdast-util-to-markdown@^2.0.0:
+ version "2.1.2"
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ "@types/unist" "^3.0.0"
+ longest-streak "^3.0.0"
+ mdast-util-phrasing "^4.0.0"
+ mdast-util-to-string "^4.0.0"
+ micromark-util-classify-character "^2.0.0"
+ micromark-util-decode-string "^2.0.0"
+ unist-util-visit "^5.0.0"
+ zwitch "^2.0.0"
+
+mdast-util-to-string@^4.0.0:
+ version "4.0.0"
+ dependencies:
+ "@types/mdast" "^4.0.0"
+
media-typer@^1.1.0:
version "1.1.0"
- resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-1.1.0.tgz#6ab74b8f2d3320f2064b2a87a38e7931ff3a5561"
+ resolved "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz"
integrity sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==
merge-descriptors@^2.0.0:
version "2.0.0"
- resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-2.0.0.tgz#ea922f660635a2249ee565e0449f951e6b603808"
+ resolved "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz"
integrity sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==
merge-stream@^2.0.0:
version "2.0.0"
- resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
+ resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz"
integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==
merge2@^1.3.0:
version "1.4.1"
- resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
+ resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz"
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
+micromark-core-commonmark@^2.0.0:
+ version "2.0.3"
+ dependencies:
+ decode-named-character-reference "^1.0.0"
+ devlop "^1.0.0"
+ micromark-factory-destination "^2.0.0"
+ micromark-factory-label "^2.0.0"
+ micromark-factory-space "^2.0.0"
+ micromark-factory-title "^2.0.0"
+ micromark-factory-whitespace "^2.0.0"
+ micromark-util-character "^2.0.0"
+ micromark-util-chunked "^2.0.0"
+ micromark-util-classify-character "^2.0.0"
+ micromark-util-html-tag-name "^2.0.0"
+ micromark-util-normalize-identifier "^2.0.0"
+ micromark-util-resolve-all "^2.0.0"
+ micromark-util-subtokenize "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-extension-gfm-autolink-literal@^2.0.0:
+ version "2.1.0"
+ dependencies:
+ micromark-util-character "^2.0.0"
+ micromark-util-sanitize-uri "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-extension-gfm-footnote@^2.0.0:
+ version "2.1.0"
+ dependencies:
+ devlop "^1.0.0"
+ micromark-core-commonmark "^2.0.0"
+ micromark-factory-space "^2.0.0"
+ micromark-util-character "^2.0.0"
+ micromark-util-normalize-identifier "^2.0.0"
+ micromark-util-sanitize-uri "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-extension-gfm-strikethrough@^2.0.0:
+ version "2.1.0"
+ dependencies:
+ devlop "^1.0.0"
+ micromark-util-chunked "^2.0.0"
+ micromark-util-classify-character "^2.0.0"
+ micromark-util-resolve-all "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-extension-gfm-table@^2.0.0:
+ version "2.1.1"
+ dependencies:
+ devlop "^1.0.0"
+ micromark-factory-space "^2.0.0"
+ micromark-util-character "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-extension-gfm-tagfilter@^2.0.0:
+ version "2.0.0"
+ dependencies:
+ micromark-util-types "^2.0.0"
+
+micromark-extension-gfm-task-list-item@^2.0.0:
+ version "2.1.0"
+ dependencies:
+ devlop "^1.0.0"
+ micromark-factory-space "^2.0.0"
+ micromark-util-character "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-extension-gfm@^3.0.0:
+ version "3.0.0"
+ dependencies:
+ micromark-extension-gfm-autolink-literal "^2.0.0"
+ micromark-extension-gfm-footnote "^2.0.0"
+ micromark-extension-gfm-strikethrough "^2.0.0"
+ micromark-extension-gfm-table "^2.0.0"
+ micromark-extension-gfm-tagfilter "^2.0.0"
+ micromark-extension-gfm-task-list-item "^2.0.0"
+ micromark-util-combine-extensions "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-factory-destination@^2.0.0:
+ version "2.0.1"
+ dependencies:
+ micromark-util-character "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-factory-label@^2.0.0:
+ version "2.0.1"
+ dependencies:
+ devlop "^1.0.0"
+ micromark-util-character "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-factory-space@^2.0.0:
+ version "2.0.1"
+ dependencies:
+ micromark-util-character "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-factory-title@^2.0.0:
+ version "2.0.1"
+ dependencies:
+ micromark-factory-space "^2.0.0"
+ micromark-util-character "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-factory-whitespace@^2.0.0:
+ version "2.0.1"
+ dependencies:
+ micromark-factory-space "^2.0.0"
+ micromark-util-character "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-util-character@^2.0.0:
+ version "2.1.1"
+ dependencies:
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-util-chunked@^2.0.0:
+ version "2.0.1"
+ dependencies:
+ micromark-util-symbol "^2.0.0"
+
+micromark-util-classify-character@^2.0.0:
+ version "2.0.1"
+ dependencies:
+ micromark-util-character "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-util-combine-extensions@^2.0.0:
+ version "2.0.1"
+ dependencies:
+ micromark-util-chunked "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-util-decode-numeric-character-reference@^2.0.0:
+ version "2.0.2"
+ dependencies:
+ micromark-util-symbol "^2.0.0"
+
+micromark-util-decode-string@^2.0.0:
+ version "2.0.1"
+ dependencies:
+ decode-named-character-reference "^1.0.0"
+ micromark-util-character "^2.0.0"
+ micromark-util-decode-numeric-character-reference "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+
+micromark-util-encode@^2.0.0:
+ version "2.0.1"
+
+micromark-util-html-tag-name@^2.0.0:
+ version "2.0.1"
+
+micromark-util-normalize-identifier@^2.0.0:
+ version "2.0.1"
+ dependencies:
+ micromark-util-symbol "^2.0.0"
+
+micromark-util-resolve-all@^2.0.0:
+ version "2.0.1"
+ dependencies:
+ micromark-util-types "^2.0.0"
+
+micromark-util-sanitize-uri@^2.0.0:
+ version "2.0.1"
+ dependencies:
+ micromark-util-character "^2.0.0"
+ micromark-util-encode "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+
+micromark-util-subtokenize@^2.0.0:
+ version "2.1.0"
+ dependencies:
+ devlop "^1.0.0"
+ micromark-util-chunked "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-util-symbol@^2.0.0:
+ version "2.0.1"
+
+micromark-util-types@^2.0.0:
+ version "2.0.2"
+
+micromark@^4.0.0:
+ version "4.0.2"
+ dependencies:
+ "@types/debug" "^4.0.0"
+ debug "^4.0.0"
+ decode-named-character-reference "^1.0.0"
+ devlop "^1.0.0"
+ micromark-core-commonmark "^2.0.0"
+ micromark-factory-space "^2.0.0"
+ micromark-util-character "^2.0.0"
+ micromark-util-chunked "^2.0.0"
+ micromark-util-combine-extensions "^2.0.0"
+ micromark-util-decode-numeric-character-reference "^2.0.0"
+ micromark-util-encode "^2.0.0"
+ micromark-util-normalize-identifier "^2.0.0"
+ micromark-util-resolve-all "^2.0.0"
+ micromark-util-sanitize-uri "^2.0.0"
+ micromark-util-subtokenize "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
micromatch@^4.0.4, micromatch@^4.0.8:
version "4.0.8"
- resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202"
+ resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz"
integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==
dependencies:
braces "^3.0.3"
@@ -3385,53 +4044,72 @@ micromatch@^4.0.4, micromatch@^4.0.8:
mime-db@^1.54.0:
version "1.54.0"
- resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.54.0.tgz#cddb3ee4f9c64530dff640236661d42cb6a314f5"
+ resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz"
integrity sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==
mime-types@^3.0.0, mime-types@^3.0.2:
version "3.0.2"
- resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-3.0.2.tgz#39002d4182575d5af036ffa118100f2524b2e2ab"
+ resolved "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz"
integrity sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==
dependencies:
mime-db "^1.54.0"
mimic-fn@^2.1.0:
version "2.1.0"
- resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
+ resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz"
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
mimic-function@^5.0.0:
version "5.0.1"
- resolved "https://registry.yarnpkg.com/mimic-function/-/mimic-function-5.0.1.tgz#acbe2b3349f99b9deaca7fb70e48b83e94e67076"
+ resolved "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz"
integrity sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==
-minimatch@^10.0.1, minimatch@^10.2.2:
+minimatch@^10.0.1:
+ version "10.2.4"
+ resolved "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz"
+ integrity sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==
+ dependencies:
+ brace-expansion "^5.0.2"
+
+minimatch@^10.2.2:
version "10.2.4"
- resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-10.2.4.tgz#465b3accbd0218b8281f5301e27cedc697f96fde"
+ resolved "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz"
integrity sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==
dependencies:
brace-expansion "^5.0.2"
minimatch@^3.1.2, minimatch@^3.1.5:
version "3.1.5"
- resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.5.tgz#580c88f8d5445f2bd6aa8f3cadefa0de79fbd69e"
+ resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz"
integrity sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==
dependencies:
brace-expansion "^1.1.7"
minimist@^1.2.0, minimist@^1.2.6:
version "1.2.8"
- resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
+ resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz"
integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
+motion-dom@^12.35.2:
+ version "12.35.2"
+ resolved "https://registry.npmjs.org/motion-dom/-/motion-dom-12.35.2.tgz"
+ integrity sha512-pWXFMTwvGDbx1Fe9YL5HZebv2NhvGBzRtiNUv58aoK7+XrsuaydQ0JGRKK2r+bTKlwgSWwWxHbP5249Qr/BNpg==
+ dependencies:
+ motion-utils "^12.29.2"
+
+motion-utils@^12.29.2:
+ version "12.29.2"
+ resolved "https://registry.npmjs.org/motion-utils/-/motion-utils-12.29.2.tgz"
+ integrity sha512-G3kc34H2cX2gI63RqU+cZq+zWRRPSsNIOjpdl9TN4AQwC4sgwYPl/Q/Obf/d53nOm569T0fYK+tcoSV50BWx8A==
+
ms@^2.1.1, ms@^2.1.3:
version "2.1.3"
- resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
+ resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
msw@^2.10.4:
version "2.12.10"
- resolved "https://registry.yarnpkg.com/msw/-/msw-2.12.10.tgz#6d3ca80f6d13715d2b65da03f9f07b46647c3e20"
+ resolved "https://registry.npmjs.org/msw/-/msw-2.12.10.tgz"
integrity sha512-G3VUymSE0/iegFnuipujpwyTM2GuZAKXNeerUSrG2+Eg391wW63xFs5ixWsK9MWzr1AGoSkYGmyAzNgbR3+urw==
dependencies:
"@inquirer/confirm" "^5.0.0"
@@ -3455,32 +4133,56 @@ msw@^2.10.4:
mute-stream@^2.0.0:
version "2.0.0"
- resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-2.0.0.tgz#a5446fc0c512b71c83c44d908d5c7b7b4c493b2b"
+ resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz"
integrity sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==
nanoid@^3.3.11, nanoid@^3.3.6:
version "3.3.11"
- resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.11.tgz#4f4f112cefbe303202f2199838128936266d185b"
+ resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz"
integrity sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==
napi-postinstall@^0.3.0:
version "0.3.4"
- resolved "https://registry.yarnpkg.com/napi-postinstall/-/napi-postinstall-0.3.4.tgz#7af256d6588b5f8e952b9190965d6b019653bbb9"
+ resolved "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz"
integrity sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==
natural-compare@^1.4.0:
version "1.4.0"
- resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
+ resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz"
integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==
negotiator@^1.0.0:
version "1.0.0"
- resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-1.0.0.tgz#b6c91bb47172d69f93cfd7c357bbb529019b5f6a"
+ resolved "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz"
integrity sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==
+next-intl-swc-plugin-extractor@^4.8.3:
+ version "4.8.3"
+ resolved "https://registry.npmjs.org/next-intl-swc-plugin-extractor/-/next-intl-swc-plugin-extractor-4.8.3.tgz"
+ integrity sha512-YcaT+R9z69XkGhpDarVFWUprrCMbxgIQYPUaXoE6LGVnLjGdo8hu3gL6bramDVjNKViYY8a/pXPy7Bna0mXORg==
+
+next-intl@^4.8.3:
+ version "4.8.3"
+ resolved "https://registry.npmjs.org/next-intl/-/next-intl-4.8.3.tgz"
+ integrity sha512-PvdBDWg+Leh7BR7GJUQbCDVVaBRn37GwDBWc9sv0rVQOJDQ5JU1rVzx9EEGuOGYo0DHAl70++9LQ7HxTawdL7w==
+ dependencies:
+ "@formatjs/intl-localematcher" "^0.8.1"
+ "@parcel/watcher" "^2.4.1"
+ "@swc/core" "^1.15.2"
+ icu-minify "^4.8.3"
+ negotiator "^1.0.0"
+ next-intl-swc-plugin-extractor "^4.8.3"
+ po-parser "^2.1.1"
+ use-intl "^4.8.3"
+
+next-themes@^0.4.6:
+ version "0.4.6"
+ resolved "https://registry.npmjs.org/next-themes/-/next-themes-0.4.6.tgz"
+ integrity sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA==
+
+"next@^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", [email protected]:
version "16.1.6"
- resolved "https://registry.yarnpkg.com/next/-/next-16.1.6.tgz#24a861371cbe211be7760d9a89ddf2415e3824de"
+ resolved "https://registry.npmjs.org/next/-/next-16.1.6.tgz"
integrity sha512-hkyRkcu5x/41KoqnROkfTm2pZVbKxvbZRuNvKXLRXxs3VfyO0WhY50TQS40EuKO9SW3rBj/sF3WbVwDACeMZyw==
dependencies:
"@next/env" "16.1.6"
@@ -3500,14 +4202,19 @@ [email protected]:
"@next/swc-win32-x64-msvc" "16.1.6"
sharp "^0.34.4"
+node-addon-api@^7.0.0:
+ version "7.1.1"
+ resolved "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz"
+ integrity sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==
+
node-domexception@^1.0.0:
version "1.0.0"
- resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5"
+ resolved "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz"
integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==
node-exports-info@^1.6.0:
version "1.6.0"
- resolved "https://registry.yarnpkg.com/node-exports-info/-/node-exports-info-1.6.0.tgz#1aedafb01a966059c9a5e791a94a94d93f5c2a13"
+ resolved "https://registry.npmjs.org/node-exports-info/-/node-exports-info-1.6.0.tgz"
integrity sha512-pyFS63ptit/P5WqUkt+UUfe+4oevH+bFeIiPPdfb0pFeYEu/1ELnJu5l+5EcTKYL5M7zaAa7S8ddywgXypqKCw==
dependencies:
array.prototype.flatmap "^1.3.3"
@@ -3517,7 +4224,7 @@ node-exports-info@^1.6.0:
node-fetch@^3.3.2:
version "3.3.2"
- resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b"
+ resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz"
integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==
dependencies:
data-uri-to-buffer "^4.0.0"
@@ -3526,19 +4233,19 @@ node-fetch@^3.3.2:
node-releases@^2.0.27:
version "2.0.36"
- resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.36.tgz#99fd6552aaeda9e17c4713b57a63964a2e325e9d"
+ resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.36.tgz"
integrity sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA==
npm-run-path@^4.0.1:
version "4.0.1"
- resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea"
+ resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz"
integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==
dependencies:
path-key "^3.0.0"
npm-run-path@^6.0.0:
version "6.0.0"
- resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-6.0.0.tgz#25cfdc4eae04976f3349c0b1afc089052c362537"
+ resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-6.0.0.tgz"
integrity sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==
dependencies:
path-key "^4.0.0"
@@ -3546,27 +4253,27 @@ npm-run-path@^6.0.0:
object-assign@^4, object-assign@^4.1.1:
version "4.1.1"
- resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
+ resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz"
integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
object-inspect@^1.13.3, object-inspect@^1.13.4:
version "1.13.4"
- resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.4.tgz#8375265e21bc20d0fa582c22e1b13485d6e00213"
+ resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz"
integrity sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==
object-keys@^1.1.1:
version "1.1.1"
- resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"
+ resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz"
integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==
version "1.1.33"
- resolved "https://registry.yarnpkg.com/object-treeify/-/object-treeify-1.1.33.tgz#f06fece986830a3cba78ddd32d4c11d1f76cdf40"
+ resolved "https://registry.npmjs.org/object-treeify/-/object-treeify-1.1.33.tgz"
integrity sha512-EFVjAYfzWqWsBMRHPMAXLCDIJnpMhdWAqR7xG6M6a2cs6PMFpl/+Z20w9zDW4vkxOFfddegBKq9Rehd0bxWE7A==
object.assign@^4.1.4, object.assign@^4.1.7:
version "4.1.7"
- resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.7.tgz#8c14ca1a424c6a561b0bb2a22f66f5049a945d3d"
+ resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz"
integrity sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==
dependencies:
call-bind "^1.0.8"
@@ -3578,7 +4285,7 @@ object.assign@^4.1.4, object.assign@^4.1.7:
object.entries@^1.1.9:
version "1.1.9"
- resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.9.tgz#e4770a6a1444afb61bd39f984018b5bede25f8b3"
+ resolved "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz"
integrity sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==
dependencies:
call-bind "^1.0.8"
@@ -3588,7 +4295,7 @@ object.entries@^1.1.9:
object.fromentries@^2.0.8:
version "2.0.8"
- resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65"
+ resolved "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz"
integrity sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==
dependencies:
call-bind "^1.0.7"
@@ -3598,7 +4305,7 @@ object.fromentries@^2.0.8:
object.groupby@^1.0.3:
version "1.0.3"
- resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.3.tgz#9b125c36238129f6f7b61954a1e7176148d5002e"
+ resolved "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz"
integrity sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==
dependencies:
call-bind "^1.0.7"
@@ -3607,7 +4314,7 @@ object.groupby@^1.0.3:
object.values@^1.1.6, object.values@^1.2.1:
version "1.2.1"
- resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.1.tgz#deed520a50809ff7f75a7cfd4bc64c7a038c6216"
+ resolved "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz"
integrity sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==
dependencies:
call-bind "^1.0.8"
@@ -3617,35 +4324,45 @@ object.values@^1.1.6, object.values@^1.2.1:
on-finished@^2.4.1:
version "2.4.1"
- resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f"
+ resolved "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz"
integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==
dependencies:
ee-first "1.1.1"
once@^1.4.0:
version "1.4.0"
- resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
+ resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz"
integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
dependencies:
wrappy "1"
onetime@^5.1.2:
version "5.1.2"
- resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e"
+ resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz"
integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==
dependencies:
mimic-fn "^2.1.0"
onetime@^7.0.0:
version "7.0.0"
- resolved "https://registry.yarnpkg.com/onetime/-/onetime-7.0.0.tgz#9f16c92d8c9ef5120e3acd9dd9957cceecc1ab60"
+ resolved "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz"
integrity sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==
dependencies:
mimic-function "^5.0.0"
+oniguruma-parser@^0.12.1:
+ version "0.12.1"
+
+oniguruma-to-es@^4.3.4:
+ version "4.3.5"
+ dependencies:
+ oniguruma-parser "^0.12.1"
+ regex "^6.1.0"
+ regex-recursion "^6.0.2"
+
open@^11.0.0:
version "11.0.0"
- resolved "https://registry.yarnpkg.com/open/-/open-11.0.0.tgz#897e6132f994d3554cbcf72e0df98f176a7e5f62"
+ resolved "https://registry.npmjs.org/open/-/open-11.0.0.tgz"
integrity sha512-smsWv2LzFjP03xmvFoJ331ss6h+jixfA4UUV/Bsiyuu4YJPfN+FIQGOIiv4w9/+MoHkfkJ22UIaQWRVFRfH6Vw==
dependencies:
default-browser "^5.4.0"
@@ -3657,7 +4374,7 @@ open@^11.0.0:
optionator@^0.9.3:
version "0.9.4"
- resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734"
+ resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz"
integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==
dependencies:
deep-is "^0.1.3"
@@ -3669,7 +4386,7 @@ optionator@^0.9.3:
ora@^8.2.0:
version "8.2.0"
- resolved "https://registry.yarnpkg.com/ora/-/ora-8.2.0.tgz#8fbbb7151afe33b540dd153f171ffa8bd38e9861"
+ resolved "https://registry.npmjs.org/ora/-/ora-8.2.0.tgz"
integrity sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==
dependencies:
chalk "^5.3.0"
@@ -3684,12 +4401,12 @@ ora@^8.2.0:
outvariant@^1.4.0, outvariant@^1.4.3:
version "1.4.3"
- resolved "https://registry.yarnpkg.com/outvariant/-/outvariant-1.4.3.tgz#221c1bfc093e8fec7075497e7799fdbf43d14873"
+ resolved "https://registry.npmjs.org/outvariant/-/outvariant-1.4.3.tgz"
integrity sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==
own-keys@^1.0.1:
version "1.0.1"
- resolved "https://registry.yarnpkg.com/own-keys/-/own-keys-1.0.1.tgz#e4006910a2bf913585289676eebd6f390cf51358"
+ resolved "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz"
integrity sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==
dependencies:
get-intrinsic "^1.2.6"
@@ -3698,33 +4415,44 @@ own-keys@^1.0.1:
p-limit@^3.0.2:
version "3.1.0"
- resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b"
+ resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz"
integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==
dependencies:
yocto-queue "^0.1.0"
p-locate@^5.0.0:
version "5.0.0"
- resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834"
+ resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz"
integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==
dependencies:
p-limit "^3.0.2"
package-manager-detector@^1.3.0:
version "1.6.0"
- resolved "https://registry.yarnpkg.com/package-manager-detector/-/package-manager-detector-1.6.0.tgz#70d0cf0aa02c877eeaf66c4d984ede0be9130734"
+ resolved "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.6.0.tgz"
integrity sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA==
parent-module@^1.0.0:
version "1.0.1"
- resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2"
+ resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz"
integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==
dependencies:
callsites "^3.0.0"
+parse-entities@^4.0.0:
+ version "4.0.2"
+ dependencies:
+ "@types/unist" "^2.0.0"
+ character-entities-legacy "^3.0.0"
+ character-reference-invalid "^2.0.0"
+ decode-named-character-reference "^1.0.0"
+ is-alphanumerical "^2.0.0"
+ is-decimal "^2.0.0"
+ is-hexadecimal "^2.0.0"
+
parse-json@^5.2.0:
version "5.2.0"
- resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd"
+ resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz"
integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==
dependencies:
"@babel/code-frame" "^7.0.0"
@@ -3734,120 +4462,133 @@ parse-json@^5.2.0:
parse-ms@^4.0.0:
version "4.0.0"
- resolved "https://registry.yarnpkg.com/parse-ms/-/parse-ms-4.0.0.tgz#c0c058edd47c2a590151a718990533fd62803df4"
+ resolved "https://registry.npmjs.org/parse-ms/-/parse-ms-4.0.0.tgz"
integrity sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==
parseurl@^1.3.3:
version "1.3.3"
- resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
+ resolved "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz"
integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==
path-browserify@^1.0.1:
version "1.0.1"
- resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd"
+ resolved "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz"
integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==
path-exists@^4.0.0:
version "4.0.0"
- resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
+ resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz"
integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==
path-key@^3.0.0, path-key@^3.1.0:
version "3.1.1"
- resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
+ resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz"
integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
path-key@^4.0.0:
version "4.0.0"
- resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18"
+ resolved "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz"
integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==
path-parse@^1.0.7:
version "1.0.7"
- resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
+ resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz"
integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
path-to-regexp@^6.3.0:
version "6.3.0"
- resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.3.0.tgz#2b6a26a337737a8e1416f9272ed0766b1c0389f4"
+ resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz"
integrity sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==
path-to-regexp@^8.0.0:
version "8.3.0"
- resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-8.3.0.tgz#aa818a6981f99321003a08987d3cec9c3474cd1f"
+ resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz"
integrity sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==
picocolors@^1.0.0, picocolors@^1.1.1:
version "1.1.1"
- resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b"
+ resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz"
integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==
picomatch@^2.3.1:
version "2.3.1"
- resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
+ resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz"
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
-picomatch@^4.0.2, picomatch@^4.0.3:
+"picomatch@^3 || ^4", picomatch@^4.0.2, picomatch@^4.0.3:
version "4.0.3"
- resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.3.tgz#796c76136d1eead715db1e7bad785dedd695a042"
+ resolved "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz"
integrity sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==
pkce-challenge@^5.0.0:
version "5.0.1"
- resolved "https://registry.yarnpkg.com/pkce-challenge/-/pkce-challenge-5.0.1.tgz#3b4446865b17b1745e9ace2016a31f48ddf6230d"
+ resolved "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.1.tgz"
integrity sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==
+po-parser@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.npmjs.org/po-parser/-/po-parser-2.1.1.tgz"
+ integrity sha512-ECF4zHLbUItpUgE3OTtLKlPjeBN+fKEczj2zYjDfCGOzicNs0GK3Vg2IoAYwx7LH/XYw43fZQP6xnZ4TkNxSLQ==
+
possible-typed-array-names@^1.0.0:
version "1.1.0"
- resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz#93e3582bc0e5426586d9d07b79ee40fc841de4ae"
+ resolved "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz"
integrity sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==
postcss-selector-parser@^7.1.0:
version "7.1.1"
- resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz#e75d2e0d843f620e5df69076166f4e16f891cb9f"
+ resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz"
integrity sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==
dependencies:
cssesc "^3.0.0"
util-deprecate "^1.0.2"
- version "8.4.31"
- resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.31.tgz#92b451050a9f914da6755af352bdc0192508656d"
- integrity sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==
+ version "6.0.10"
+ resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz"
+ integrity sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==
dependencies:
- nanoid "^3.3.6"
- picocolors "^1.0.0"
- source-map-js "^1.0.2"
+ cssesc "^3.0.0"
+ util-deprecate "^1.0.2"
postcss@^8.5.6:
version "8.5.8"
- resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.5.8.tgz#6230ecc8fb02e7a0f6982e53990937857e13f399"
+ resolved "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz"
integrity sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==
dependencies:
nanoid "^3.3.11"
picocolors "^1.1.1"
source-map-js "^1.2.1"
+ version "8.4.31"
+ resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz"
+ integrity sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==
+ dependencies:
+ nanoid "^3.3.6"
+ picocolors "^1.0.0"
+ source-map-js "^1.0.2"
+
powershell-utils@^0.1.0:
version "0.1.0"
- resolved "https://registry.yarnpkg.com/powershell-utils/-/powershell-utils-0.1.0.tgz#5a42c9a824fb4f2f251ccb41aaae73314f5d6ac2"
+ resolved "https://registry.npmjs.org/powershell-utils/-/powershell-utils-0.1.0.tgz"
integrity sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A==
prelude-ls@^1.2.1:
version "1.2.1"
- resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
+ resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
pretty-ms@^9.2.0:
version "9.3.0"
- resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-9.3.0.tgz#dd2524fcb3c326b4931b2272dfd1e1a8ed9a9f5a"
+ resolved "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.3.0.tgz"
integrity sha512-gjVS5hOP+M3wMm5nmNOucbIrqudzs9v/57bWRHQWLYklXqoXKrVfYW2W9+glfGsqtPgpiz5WwyEEB+ksXIx3gQ==
dependencies:
parse-ms "^4.0.0"
prompts@^2.4.2:
version "2.4.2"
- resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069"
+ resolved "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz"
integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==
dependencies:
kleur "^3.0.3"
@@ -3855,16 +4596,19 @@ prompts@^2.4.2:
prop-types@^15.8.1:
version "15.8.1"
- resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
+ resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz"
integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
dependencies:
loose-envify "^1.4.0"
object-assign "^4.1.1"
react-is "^16.13.1"
+property-information@^7.0.0:
+ version "7.1.0"
+
proxy-addr@^2.0.7:
version "2.0.7"
- resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025"
+ resolved "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz"
integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==
dependencies:
forwarded "0.2.0"
@@ -3872,29 +4616,29 @@ proxy-addr@^2.0.7:
punycode@^2.1.0:
version "2.3.1"
- resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5"
+ resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz"
integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==
qs@^6.14.0, qs@^6.14.1:
version "6.15.0"
- resolved "https://registry.yarnpkg.com/qs/-/qs-6.15.0.tgz#db8fd5d1b1d2d6b5b33adaf87429805f1909e7b3"
+ resolved "https://registry.npmjs.org/qs/-/qs-6.15.0.tgz"
integrity sha512-mAZTtNCeetKMH+pSjrb76NAM8V9a05I9aBZOHztWy/UqcJdQYNsf59vrRKWnojAT9Y+GbIvoTBC++CPHqpDBhQ==
dependencies:
side-channel "^1.1.0"
queue-microtask@^1.2.2:
version "1.2.3"
- resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
+ resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz"
integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==
range-parser@^1.2.1:
version "1.2.1"
- resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
+ resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz"
integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
raw-body@^3.0.0, raw-body@^3.0.1:
version "3.0.2"
- resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-3.0.2.tgz#3e3ada5ae5568f9095d84376fd3a49b8fb000a51"
+ resolved "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz"
integrity sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==
dependencies:
bytes "~3.1.2"
@@ -3902,26 +4646,56 @@ raw-body@^3.0.0, raw-body@^3.0.1:
iconv-lite "~0.7.0"
unpipe "~1.0.0"
+"react-dom@^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom@^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc", "react-dom@^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom@^17 || ^18 || ^19", "react-dom@^18.0.0 || ^19.0.0", "react-dom@^18.0.0 || ^19.0.0 || ^19.0.0-rc", "react-dom@^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", react-dom@>=16.8.0, [email protected]:
version "19.2.3"
- resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.2.3.tgz#f0b61d7e5c4a86773889fcc1853af3ed5f215b17"
+ resolved "https://registry.npmjs.org/react-dom/-/react-dom-19.2.3.tgz"
integrity sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==
dependencies:
scheduler "^0.27.0"
react-is@^16.13.1:
version "16.13.1"
- resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
+ resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
+"react-is@^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", react-is@^19.2.4:
+ version "19.2.4"
+ resolved "https://registry.npmjs.org/react-is/-/react-is-19.2.4.tgz"
+ integrity sha512-W+EWGn2v0ApPKgKKCy/7s7WHXkboGcsrXE+2joLyVxkbyVQfO3MUEaUQDHoSmb8TFFrSKYa9mw64WZHNHSDzYA==
+
+react-markdown@^10.1.0:
+ version "10.1.0"
+ resolved "https://registry.npmjs.org/react-markdown/-/react-markdown-10.1.0.tgz"
+ integrity sha512-qKxVopLT/TyA6BX3Ue5NwabOsAzm0Q7kAPwq6L+wWDwisYs7R8vZ0nRXqq6rkueboxpkjvLGU9fWifiX/ZZFxQ==
+ dependencies:
+ "@types/hast" "^3.0.0"
+ "@types/mdast" "^4.0.0"
+ devlop "^1.0.0"
+ hast-util-to-jsx-runtime "^2.0.0"
+ html-url-attributes "^3.0.0"
+ mdast-util-to-hast "^13.0.0"
+ remark-parse "^11.0.0"
+ remark-rehype "^11.0.0"
+ unified "^11.0.0"
+ unist-util-visit "^5.0.0"
+ vfile "^6.0.0"
+
+"react-redux@^7.2.1 || ^8.1.3 || ^9.0.0", "[email protected] || 9.x.x":
+ version "9.2.0"
+ resolved "https://registry.npmjs.org/react-redux/-/react-redux-9.2.0.tgz"
+ integrity sha512-ROY9fvHhwOD9ySfrF0wmvu//bKCQ6AeZZq1nJNtbDC+kk5DuSuNX/n6YWYF/SYy7bSba4D4FSz8DJeKY/S/r+g==
+ dependencies:
+ "@types/use-sync-external-store" "^0.0.6"
+ use-sync-external-store "^1.4.0"
+
+"react@^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react@^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc", "react@^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react@^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react@^16.8.0 || ^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0 || ^19.0.0", "react@^16.9.0 || ^17.0.0 || ^18 || ^19", "react@^17 || ^18 || ^19", "react@^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0 || ^19.0.0", "react@^18.0 || ^19", "react@^18.0.0 || ^19.0.0", "react@^18.0.0 || ^19.0.0 || ^19.0.0-rc", "react@^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", react@^19.2.3, "react@>= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0", react@>=16.8.0, react@>=18, react@>=18.0.0, [email protected]:
version "19.2.3"
- resolved "https://registry.yarnpkg.com/react/-/react-19.2.3.tgz#d83e5e8e7a258cf6b4fe28640515f99b87cd19b8"
+ resolved "https://registry.npmjs.org/react/-/react-19.2.3.tgz"
integrity sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==
recast@^0.23.11:
version "0.23.11"
- resolved "https://registry.yarnpkg.com/recast/-/recast-0.23.11.tgz#8885570bb28cf773ba1dc600da7f502f7883f73f"
+ resolved "https://registry.npmjs.org/recast/-/recast-0.23.11.tgz"
integrity sha512-YTUo+Flmw4ZXiWfQKGcwwc11KnoRAYgzAE2E7mXKCjSviTKShtxBsN6YUUBB2gtaBzKzeKunxhUwNHQuRryhWA==
dependencies:
ast-types "^0.16.1"
@@ -3930,9 +4704,36 @@ recast@^0.23.11:
tiny-invariant "^1.3.3"
tslib "^2.0.1"
+recharts@^3.8.0:
+ version "3.8.0"
+ resolved "https://registry.npmjs.org/recharts/-/recharts-3.8.0.tgz"
+ integrity sha512-Z/m38DX3L73ExO4Tpc9/iZWHmHnlzWG4njQbxsF5aSjwqmHNDDIm0rdEBArkwsBvR8U6EirlEHiQNYWCVh9sGQ==
+ dependencies:
+ "@reduxjs/toolkit" "^1.9.0 || 2.x.x"
+ clsx "^2.1.1"
+ decimal.js-light "^2.5.1"
+ es-toolkit "^1.39.3"
+ eventemitter3 "^5.0.1"
+ immer "^10.1.1"
+ react-redux "8.x.x || 9.x.x"
+ reselect "5.1.1"
+ tiny-invariant "^1.3.3"
+ use-sync-external-store "^1.2.2"
+ victory-vendor "^37.0.2"
+
+redux-thunk@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.npmjs.org/redux-thunk/-/redux-thunk-3.1.0.tgz"
+ integrity sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw==
+
+redux@^5.0.0, redux@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz"
+ integrity sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==
+
reflect.getprototypeof@^1.0.6, reflect.getprototypeof@^1.0.9:
version "1.0.10"
- resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz#c629219e78a3316d8b604c765ef68996964e7bf9"
+ resolved "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz"
integrity sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==
dependencies:
call-bind "^1.0.8"
@@ -3944,9 +4745,22 @@ reflect.getprototypeof@^1.0.6, reflect.getprototypeof@^1.0.9:
get-proto "^1.0.1"
which-builtin-type "^1.2.1"
+regex-recursion@^6.0.2:
+ version "6.0.2"
+ dependencies:
+ regex-utilities "^2.3.0"
+
+regex-utilities@^2.3.0:
+ version "2.3.0"
+
+regex@^6.1.0:
+ version "6.1.0"
+ dependencies:
+ regex-utilities "^2.3.0"
+
regexp.prototype.flags@^1.5.3, regexp.prototype.flags@^1.5.4:
version "1.5.4"
- resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz#1ad6c62d44a259007e55b3970e00f746efbcaa19"
+ resolved "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz"
integrity sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==
dependencies:
call-bind "^1.0.8"
@@ -3956,34 +4770,79 @@ regexp.prototype.flags@^1.5.3, regexp.prototype.flags@^1.5.4:
gopd "^1.2.0"
set-function-name "^2.0.2"
+remark-breaks@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.npmjs.org/remark-breaks/-/remark-breaks-4.0.0.tgz"
+ integrity sha512-IjEjJOkH4FuJvHZVIW0QCDWxcG96kCq7An/KVH2NfJe6rKZU2AsHeB3OEjPNRxi4QC34Xdx7I2KGYn6IpT7gxQ==
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ mdast-util-newline-to-break "^2.0.0"
+ unified "^11.0.0"
+
+remark-gfm@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.npmjs.org/remark-gfm/-/remark-gfm-4.0.1.tgz"
+ integrity sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg==
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ mdast-util-gfm "^3.0.0"
+ micromark-extension-gfm "^3.0.0"
+ remark-parse "^11.0.0"
+ remark-stringify "^11.0.0"
+ unified "^11.0.0"
+
+remark-parse@^11.0.0:
+ version "11.0.0"
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ mdast-util-from-markdown "^2.0.0"
+ micromark-util-types "^2.0.0"
+ unified "^11.0.0"
+
+remark-rehype@^11.0.0:
+ version "11.1.2"
+ dependencies:
+ "@types/hast" "^3.0.0"
+ "@types/mdast" "^4.0.0"
+ mdast-util-to-hast "^13.0.0"
+ unified "^11.0.0"
+ vfile "^6.0.0"
+
+remark-stringify@^11.0.0:
+ version "11.0.0"
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ mdast-util-to-markdown "^2.0.0"
+ unified "^11.0.0"
+
require-directory@^2.1.1:
version "2.1.1"
- resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
+ resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz"
integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==
require-from-string@^2.0.2:
version "2.0.2"
- resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909"
+ resolved "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz"
integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==
-reselect@^5.1.1:
+reselect@^5.1.0, reselect@^5.1.1, [email protected]:
version "5.1.1"
- resolved "https://registry.yarnpkg.com/reselect/-/reselect-5.1.1.tgz#c766b1eb5d558291e5e550298adb0becc24bb72e"
+ resolved "https://registry.npmjs.org/reselect/-/reselect-5.1.1.tgz"
integrity sha512-K/BG6eIky/SBpzfHZv/dd+9JBFiS4SWV7FIujVyJRux6e45+73RaUHXLmIR1f7WOMaQ0U1km6qwklRQxpJJY0w==
resolve-from@^4.0.0:
version "4.0.0"
- resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
+ resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz"
integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
resolve-pkg-maps@^1.0.0:
version "1.0.0"
- resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f"
+ resolved "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz"
integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==
resolve@^1.22.4:
version "1.22.11"
- resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.11.tgz#aad857ce1ffb8bfa9b0b1ac29f1156383f68c262"
+ resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz"
integrity sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==
dependencies:
is-core-module "^2.16.1"
@@ -3992,7 +4851,7 @@ resolve@^1.22.4:
resolve@^2.0.0-next.5:
version "2.0.0-next.6"
- resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.6.tgz#b3961812be69ace7b3bc35d5bf259434681294af"
+ resolved "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.6.tgz"
integrity sha512-3JmVl5hMGtJ3kMmB3zi3DL25KfkCEyy3Tw7Gmw7z5w8M9WlwoPFnIvwChzu1+cF3iaK3sp18hhPz8ANeimdJfA==
dependencies:
es-errors "^1.3.0"
@@ -4004,7 +4863,7 @@ resolve@^2.0.0-next.5:
restore-cursor@^5.0.0:
version "5.1.0"
- resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-5.1.0.tgz#0766d95699efacb14150993f55baf0953ea1ebe7"
+ resolved "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz"
integrity sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==
dependencies:
onetime "^7.0.0"
@@ -4012,17 +4871,17 @@ restore-cursor@^5.0.0:
rettime@^0.10.1:
version "0.10.1"
- resolved "https://registry.yarnpkg.com/rettime/-/rettime-0.10.1.tgz#cc8bb9870343f282b182e5a276899c08b94914be"
+ resolved "https://registry.npmjs.org/rettime/-/rettime-0.10.1.tgz"
integrity sha512-uyDrIlUEH37cinabq0AX4QbgV4HbFZ/gqoiunWQ1UqBtRvTTytwhNYjE++pO/MjPTZL5KQCf2bEoJ/BJNVQ5Kw==
reusify@^1.0.4:
version "1.1.0"
- resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.1.0.tgz#0fe13b9522e1473f51b558ee796e08f11f9b489f"
+ resolved "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz"
integrity sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==
router@^2.2.0:
version "2.2.0"
- resolved "https://registry.yarnpkg.com/router/-/router-2.2.0.tgz#019be620b711c87641167cc79b99090f00b146ef"
+ resolved "https://registry.npmjs.org/router/-/router-2.2.0.tgz"
integrity sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==
dependencies:
debug "^4.4.0"
@@ -4033,19 +4892,19 @@ router@^2.2.0:
run-applescript@^7.0.0:
version "7.1.0"
- resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-7.1.0.tgz#2e9e54c4664ec3106c5b5630e249d3d6595c4911"
+ resolved "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz"
integrity sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==
run-parallel@^1.1.9:
version "1.2.0"
- resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee"
+ resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz"
integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==
dependencies:
queue-microtask "^1.2.2"
safe-array-concat@^1.1.3:
version "1.1.3"
- resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.3.tgz#c9e54ec4f603b0bbb8e7e5007a5ee7aecd1538c3"
+ resolved "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz"
integrity sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==
dependencies:
call-bind "^1.0.8"
@@ -4056,7 +4915,7 @@ safe-array-concat@^1.1.3:
safe-push-apply@^1.0.0:
version "1.0.0"
- resolved "https://registry.yarnpkg.com/safe-push-apply/-/safe-push-apply-1.0.0.tgz#01850e981c1602d398c85081f360e4e6d03d27f5"
+ resolved "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz"
integrity sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==
dependencies:
es-errors "^1.3.0"
@@ -4064,7 +4923,7 @@ safe-push-apply@^1.0.0:
safe-regex-test@^1.0.3, safe-regex-test@^1.1.0:
version "1.1.0"
- resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.1.0.tgz#7f87dfb67a3150782eaaf18583ff5d1711ac10c1"
+ resolved "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz"
integrity sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==
dependencies:
call-bound "^1.0.2"
@@ -4073,27 +4932,32 @@ safe-regex-test@^1.0.3, safe-regex-test@^1.1.0:
"safer-buffer@>= 2.1.2 < 3.0.0":
version "2.1.2"
- resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
+ resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz"
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
scheduler@^0.27.0:
version "0.27.0"
- resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.27.0.tgz#0c4ef82d67d1e5c1e359e8fc76d3a87f045fe5bd"
+ resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz"
integrity sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==
semver@^6.3.1:
version "6.3.1"
- resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
+ resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz"
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
-semver@^7.7.1, semver@^7.7.3:
+semver@^7.7.1:
+ version "7.7.4"
+ resolved "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz"
+ integrity sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==
+
+semver@^7.7.3:
version "7.7.4"
- resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.4.tgz#28464e36060e991fa7a11d0279d2d3f3b57a7e8a"
+ resolved "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz"
integrity sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==
send@^1.1.0, send@^1.2.0:
version "1.2.1"
- resolved "https://registry.yarnpkg.com/send/-/send-1.2.1.tgz#9eab743b874f3550f40a26867bf286ad60d3f3ed"
+ resolved "https://registry.npmjs.org/send/-/send-1.2.1.tgz"
integrity sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==
dependencies:
debug "^4.4.3"
@@ -4110,7 +4974,7 @@ send@^1.1.0, send@^1.2.0:
serve-static@^2.2.0:
version "2.2.1"
- resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-2.2.1.tgz#7f186a4a4e5f5b663ad7a4294ff1bf37cf0e98a9"
+ resolved "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz"
integrity sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==
dependencies:
encodeurl "^2.0.0"
@@ -4120,7 +4984,7 @@ serve-static@^2.2.0:
set-function-length@^1.2.2:
version "1.2.2"
- resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449"
+ resolved "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz"
integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==
dependencies:
define-data-property "^1.1.4"
@@ -4132,7 +4996,7 @@ set-function-length@^1.2.2:
set-function-name@^2.0.2:
version "2.0.2"
- resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985"
+ resolved "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz"
integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==
dependencies:
define-data-property "^1.1.4"
@@ -4142,7 +5006,7 @@ set-function-name@^2.0.2:
set-proto@^1.0.0:
version "1.0.0"
- resolved "https://registry.yarnpkg.com/set-proto/-/set-proto-1.0.0.tgz#0760dbcff30b2d7e801fd6e19983e56da337565e"
+ resolved "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz"
integrity sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==
dependencies:
dunder-proto "^1.0.1"
@@ -4151,12 +5015,12 @@ set-proto@^1.0.0:
setprototypeof@~1.2.0:
version "1.2.0"
- resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424"
+ resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz"
integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==
shadcn@^4.0.2:
version "4.0.2"
- resolved "https://registry.yarnpkg.com/shadcn/-/shadcn-4.0.2.tgz#ebfb2059b19bf383491442675ed2ee66cd0938e9"
+ resolved "https://registry.npmjs.org/shadcn/-/shadcn-4.0.2.tgz"
integrity sha512-U6BxywcVt5Vy+iLdjoyWTPcuz2RQNad09tjJsW8hyKtxlx7VAvzHIvoNxvXN+gxWt/HX8kt/cVNk8AXcmPUaNQ==
dependencies:
"@antfu/ni" "^25.0.0"
@@ -4197,7 +5061,7 @@ shadcn@^4.0.2:
sharp@^0.34.4:
version "0.34.5"
- resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.34.5.tgz#b6f148e4b8c61f1797bde11a9d1cfebbae2c57b0"
+ resolved "https://registry.npmjs.org/sharp/-/sharp-0.34.5.tgz"
integrity sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==
dependencies:
"@img/colour" "^1.0.0"
@@ -4231,19 +5095,33 @@ sharp@^0.34.4:
shebang-command@^2.0.0:
version "2.0.0"
- resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
+ resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz"
integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==
dependencies:
shebang-regex "^3.0.0"
shebang-regex@^3.0.0:
version "3.0.0"
- resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
+ resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz"
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
+shiki@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.npmjs.org/shiki/-/shiki-4.0.2.tgz"
+ integrity sha512-eAVKTMedR5ckPo4xne/PjYQYrU3qx78gtJZ+sHlXEg5IHhhoQhMfZVzetTYuaJS0L2Ef3AcCRzCHV8T0WI6nIQ==
+ dependencies:
+ "@shikijs/core" "4.0.2"
+ "@shikijs/engine-javascript" "4.0.2"
+ "@shikijs/engine-oniguruma" "4.0.2"
+ "@shikijs/langs" "4.0.2"
+ "@shikijs/themes" "4.0.2"
+ "@shikijs/types" "4.0.2"
+ "@shikijs/vscode-textmate" "^10.0.2"
+ "@types/hast" "^3.0.4"
+
side-channel-list@^1.0.0:
version "1.0.0"
- resolved "https://registry.yarnpkg.com/side-channel-list/-/side-channel-list-1.0.0.tgz#10cb5984263115d3b7a0e336591e290a830af8ad"
+ resolved "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz"
integrity sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==
dependencies:
es-errors "^1.3.0"
@@ -4251,7 +5129,7 @@ side-channel-list@^1.0.0:
side-channel-map@^1.0.1:
version "1.0.1"
- resolved "https://registry.yarnpkg.com/side-channel-map/-/side-channel-map-1.0.1.tgz#d6bb6b37902c6fef5174e5f533fab4c732a26f42"
+ resolved "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz"
integrity sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==
dependencies:
call-bound "^1.0.2"
@@ -4261,7 +5139,7 @@ side-channel-map@^1.0.1:
side-channel-weakmap@^1.0.2:
version "1.0.2"
- resolved "https://registry.yarnpkg.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz#11dda19d5368e40ce9ec2bdc1fb0ecbc0790ecea"
+ resolved "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz"
integrity sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==
dependencies:
call-bound "^1.0.2"
@@ -4272,7 +5150,7 @@ side-channel-weakmap@^1.0.2:
side-channel@^1.1.0:
version "1.1.0"
- resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.1.0.tgz#c3fcff9c4da932784873335ec9765fa94ff66bc9"
+ resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz"
integrity sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==
dependencies:
es-errors "^1.3.0"
@@ -4283,47 +5161,55 @@ side-channel@^1.1.0:
signal-exit@^3.0.3:
version "3.0.7"
- resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"
+ resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz"
integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==
signal-exit@^4.1.0:
version "4.1.0"
- resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04"
+ resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz"
integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==
sisteransi@^1.0.5:
version "1.0.5"
- resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed"
+ resolved "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz"
integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==
+sonner@^2.0.7:
+ version "2.0.7"
+ resolved "https://registry.npmjs.org/sonner/-/sonner-2.0.7.tgz"
+ integrity sha512-W6ZN4p58k8aDKA4XPcx2hpIQXBRAgyiWVkYhT7CvK6D3iAu7xjvVyhQHg2/iaKJZ1XVJ4r7XuwGL+WGEK37i9w==
+
source-map-js@^1.0.2, source-map-js@^1.2.1:
version "1.2.1"
- resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46"
+ resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz"
integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==
source-map@~0.6.1:
version "0.6.1"
- resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
+ resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
+space-separated-tokens@^2.0.0:
+ version "2.0.2"
+
stable-hash@^0.0.5:
version "0.0.5"
- resolved "https://registry.yarnpkg.com/stable-hash/-/stable-hash-0.0.5.tgz#94e8837aaeac5b4d0f631d2972adef2924b40269"
+ resolved "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.5.tgz"
integrity sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==
statuses@^2.0.1, statuses@^2.0.2, statuses@~2.0.2:
version "2.0.2"
- resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.2.tgz#8f75eecef765b5e1cfcdc080da59409ed424e382"
+ resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz"
integrity sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==
stdin-discarder@^0.2.2:
version "0.2.2"
- resolved "https://registry.yarnpkg.com/stdin-discarder/-/stdin-discarder-0.2.2.tgz#390037f44c4ae1a1ae535c5fe38dc3aba8d997be"
+ resolved "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz"
integrity sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==
stop-iteration-iterator@^1.1.0:
version "1.1.0"
- resolved "https://registry.yarnpkg.com/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz#f481ff70a548f6124d0312c3aa14cbfa7aa542ad"
+ resolved "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz"
integrity sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==
dependencies:
es-errors "^1.3.0"
@@ -4331,12 +5217,12 @@ stop-iteration-iterator@^1.1.0:
strict-event-emitter@^0.5.1:
version "0.5.1"
- resolved "https://registry.yarnpkg.com/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz#1602ece81c51574ca39c6815e09f1a3e8550bd93"
+ resolved "https://registry.npmjs.org/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz"
integrity sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==
string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
- resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
+ resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
@@ -4345,7 +5231,7 @@ string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
string-width@^7.2.0:
version "7.2.0"
- resolved "https://registry.yarnpkg.com/string-width/-/string-width-7.2.0.tgz#b5bb8e2165ce275d4d43476dd2700ad9091db6dc"
+ resolved "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz"
integrity sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==
dependencies:
emoji-regex "^10.3.0"
@@ -4354,7 +5240,7 @@ string-width@^7.2.0:
string.prototype.includes@^2.0.1:
version "2.0.1"
- resolved "https://registry.yarnpkg.com/string.prototype.includes/-/string.prototype.includes-2.0.1.tgz#eceef21283640761a81dbe16d6c7171a4edf7d92"
+ resolved "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.1.tgz"
integrity sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==
dependencies:
call-bind "^1.0.7"
@@ -4363,7 +5249,7 @@ string.prototype.includes@^2.0.1:
string.prototype.matchall@^4.0.12:
version "4.0.12"
- resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz#6c88740e49ad4956b1332a911e949583a275d4c0"
+ resolved "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz"
integrity sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==
dependencies:
call-bind "^1.0.8"
@@ -4382,7 +5268,7 @@ string.prototype.matchall@^4.0.12:
string.prototype.repeat@^1.0.0:
version "1.0.0"
- resolved "https://registry.yarnpkg.com/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz#e90872ee0308b29435aa26275f6e1b762daee01a"
+ resolved "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz"
integrity sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==
dependencies:
define-properties "^1.1.3"
@@ -4390,7 +5276,7 @@ string.prototype.repeat@^1.0.0:
string.prototype.trim@^1.2.10:
version "1.2.10"
- resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz#40b2dd5ee94c959b4dcfb1d65ce72e90da480c81"
+ resolved "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz"
integrity sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==
dependencies:
call-bind "^1.0.8"
@@ -4403,7 +5289,7 @@ string.prototype.trim@^1.2.10:
string.prototype.trimend@^1.0.9:
version "1.0.9"
- resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz#62e2731272cd285041b36596054e9f66569b6942"
+ resolved "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz"
integrity sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==
dependencies:
call-bind "^1.0.8"
@@ -4413,16 +5299,22 @@ string.prototype.trimend@^1.0.9:
string.prototype.trimstart@^1.0.8:
version "1.0.8"
- resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde"
+ resolved "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz"
integrity sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==
dependencies:
call-bind "^1.0.7"
define-properties "^1.2.1"
es-object-atoms "^1.0.0"
+stringify-entities@^4.0.0:
+ version "4.0.4"
+ dependencies:
+ character-entities-html4 "^2.0.0"
+ character-entities-legacy "^3.0.0"
+
stringify-object@^5.0.0:
version "5.0.0"
- resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-5.0.0.tgz#d5b05649fedaf8860640471641f70906fea7f351"
+ resolved "https://registry.npmjs.org/stringify-object/-/stringify-object-5.0.0.tgz"
integrity sha512-zaJYxz2FtcMb4f+g60KsRNFOpVMUyuJgA51Zi5Z1DOTC3S59+OQiVOzE9GZt0x72uBGWKsQIuBKeF9iusmKFsg==
dependencies:
get-own-enumerable-keys "^1.0.0"
@@ -4431,95 +5323,110 @@ stringify-object@^5.0.0:
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
- resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
+ resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"
strip-ansi@^7.1.0:
version "7.2.0"
- resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.2.0.tgz#d22a269522836a627af8d04b5c3fd2c7fa3e32e3"
+ resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz"
integrity sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==
dependencies:
ansi-regex "^6.2.2"
strip-bom@^3.0.0:
version "3.0.0"
- resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
+ resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz"
integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==
strip-final-newline@^2.0.0:
version "2.0.0"
- resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad"
+ resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz"
integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==
strip-final-newline@^4.0.0:
version "4.0.0"
- resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-4.0.0.tgz#35a369ec2ac43df356e3edd5dcebb6429aa1fa5c"
+ resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-4.0.0.tgz"
integrity sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==
strip-json-comments@^3.1.1:
version "3.1.1"
- resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
+ resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz"
integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==
+stripe@^22.0.0:
+ version "22.0.0"
+ resolved "https://registry.npmjs.org/stripe/-/stripe-22.0.0.tgz"
+ integrity sha512-q1UgXXpSfZCmkyzZEh3vFEWT7+ajuaFGqaP9Tsi2NMtwlkigIWNr+KBIUQqtNeNEsreDKgdn+BP5HRW9JDj22Q==
+
+style-to-js@^1.0.0:
+ version "1.1.21"
+ dependencies:
+ style-to-object "1.0.14"
+
+ version "1.0.14"
+ dependencies:
+ inline-style-parser "0.2.7"
+
version "5.1.6"
- resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.1.6.tgz#83b90c077e6c6a80f7f5e8781d0f311b2fe41499"
+ resolved "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.6.tgz"
integrity sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==
dependencies:
client-only "0.0.1"
supports-color@^7.1.0:
version "7.2.0"
- resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da"
+ resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz"
integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
dependencies:
has-flag "^4.0.0"
supports-preserve-symlinks-flag@^1.0.0:
version "1.0.0"
- resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09"
+ resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz"
integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==
tabbable@^6.4.0:
version "6.4.0"
- resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-6.4.0.tgz#36eb7a06d80b3924a22095daf45740dea3bf5581"
+ resolved "https://registry.npmjs.org/tabbable/-/tabbable-6.4.0.tgz"
integrity sha512-05PUHKSNE8ou2dwIxTngl4EzcnsCDZGJ/iCLtDflR/SHB/ny14rXc+qU5P4mG9JkusiV7EivzY9Mhm55AzAvCg==
tagged-tag@^1.0.0:
version "1.0.0"
- resolved "https://registry.yarnpkg.com/tagged-tag/-/tagged-tag-1.0.0.tgz#a0b5917c2864cba54841495abfa3f6b13edcf4d6"
+ resolved "https://registry.npmjs.org/tagged-tag/-/tagged-tag-1.0.0.tgz"
integrity sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==
tailwind-merge@^3.0.1, tailwind-merge@^3.5.0:
version "3.5.0"
- resolved "https://registry.yarnpkg.com/tailwind-merge/-/tailwind-merge-3.5.0.tgz#06502f4496ba15151445d97d916a26564d50d1ca"
+ resolved "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.5.0.tgz"
integrity sha512-I8K9wewnVDkL1NTGoqWmVEIlUcB9gFriAEkXkfCjX5ib8ezGxtR3xD7iZIxrfArjEsH7F1CHD4RFUtxefdqV/A==
[email protected], tailwindcss@^4:
+tailwindcss@^4, "tailwindcss@>=3.0.0 || insiders || >=4.0.0-alpha.20 || >=4.0.0-beta.1", [email protected]:
version "4.2.1"
- resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-4.2.1.tgz#018c4720b58baf98a6bf56b0a12aa797c6cfef1d"
+ resolved "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.2.1.tgz"
integrity sha512-/tBrSQ36vCleJkAOsy9kbNTgaxvGbyOamC30PRePTQe/o1MFwEKHQk4Cn7BNGaPtjp+PuUrByJehM1hgxfq4sw==
tapable@^2.3.0:
version "2.3.0"
- resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.3.0.tgz#7e3ea6d5ca31ba8e078b560f0d83ce9a14aa8be6"
+ resolved "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz"
integrity sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==
tiny-invariant@^1.3.3:
version "1.3.3"
- resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.3.tgz#46680b7a873a0d5d10005995eb90a70d74d60127"
+ resolved "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz"
integrity sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==
tinyexec@^1.0.1:
version "1.0.2"
- resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-1.0.2.tgz#bdd2737fe2ba40bd6f918ae26642f264b99ca251"
+ resolved "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.2.tgz"
integrity sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==
tinyglobby@^0.2.13, tinyglobby@^0.2.15:
version "0.2.15"
- resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.15.tgz#e228dd1e638cea993d2fdb4fcd2d4602a79951c2"
+ resolved "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz"
integrity sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==
dependencies:
fdir "^6.5.0"
@@ -4527,43 +5434,49 @@ tinyglobby@^0.2.13, tinyglobby@^0.2.15:
tldts-core@^7.0.25:
version "7.0.25"
- resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-7.0.25.tgz#eaee57facdfb5528383d961f5586d49784519de5"
+ resolved "https://registry.npmjs.org/tldts-core/-/tldts-core-7.0.25.tgz"
integrity sha512-ZjCZK0rppSBu7rjHYDYsEaMOIbbT+nWF57hKkv4IUmZWBNrBWBOjIElc0mKRgLM8bm7x/BBlof6t2gi/Oq/Asw==
tldts@^7.0.5:
version "7.0.25"
- resolved "https://registry.yarnpkg.com/tldts/-/tldts-7.0.25.tgz#e9034876e09b2ad92db547a9307ae6fa65400f8d"
+ resolved "https://registry.npmjs.org/tldts/-/tldts-7.0.25.tgz"
integrity sha512-keinCnPbwXEUG3ilrWQZU+CqcTTzHq9m2HhoUP2l7Xmi8l1LuijAXLpAJ5zRW+ifKTNscs4NdCkfkDCBYm352w==
dependencies:
tldts-core "^7.0.25"
to-regex-range@^5.0.1:
version "5.0.1"
- resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
+ resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz"
integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
dependencies:
is-number "^7.0.0"
toidentifier@~1.0.1:
version "1.0.1"
- resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35"
+ resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz"
integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==
tough-cookie@^6.0.0:
version "6.0.0"
- resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-6.0.0.tgz#11e418b7864a2c0d874702bc8ce0f011261940e5"
+ resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.0.tgz"
integrity sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w==
dependencies:
tldts "^7.0.5"
+trim-lines@^3.0.0:
+ version "3.0.1"
+
+trough@^2.0.0:
+ version "2.2.0"
+
ts-api-utils@^2.4.0:
version "2.4.0"
- resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.4.0.tgz#2690579f96d2790253bdcf1ca35d569ad78f9ad8"
+ resolved "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.4.0.tgz"
integrity sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==
ts-morph@^26.0.0:
version "26.0.0"
- resolved "https://registry.yarnpkg.com/ts-morph/-/ts-morph-26.0.0.tgz#d435ccac9421d4615fde8be86fee782f18cd9f73"
+ resolved "https://registry.npmjs.org/ts-morph/-/ts-morph-26.0.0.tgz"
integrity sha512-ztMO++owQnz8c/gIENcM9XfCEzgoGphTv+nKpYNM1bgsdOVC/jRZuEBf6N+mLLDNg68Kl+GgUZfOySaRiG1/Ug==
dependencies:
"@ts-morph/common" "~0.27.0"
@@ -4571,7 +5484,7 @@ ts-morph@^26.0.0:
tsconfig-paths@^3.15.0:
version "3.15.0"
- resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4"
+ resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz"
integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==
dependencies:
"@types/json5" "^0.0.29"
@@ -4581,40 +5494,40 @@ tsconfig-paths@^3.15.0:
tsconfig-paths@^4.2.0:
version "4.2.0"
- resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz#ef78e19039133446d244beac0fd6a1632e2d107c"
+ resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz"
integrity sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==
dependencies:
json5 "^2.2.2"
minimist "^1.2.6"
strip-bom "^3.0.0"
-tslib@^2.0.1, tslib@^2.4.0, tslib@^2.8.0, tslib@^2.8.1:
+tslib@^2.0.1, tslib@^2.4.0, tslib@^2.8.0, tslib@^2.8.1, [email protected]:
version "2.8.1"
- resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f"
+ resolved "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz"
integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==
tw-animate-css@^1.4.0:
version "1.4.0"
- resolved "https://registry.yarnpkg.com/tw-animate-css/-/tw-animate-css-1.4.0.tgz#b4a06f68244cba39428aa47e65e6e4c0babc21ee"
+ resolved "https://registry.npmjs.org/tw-animate-css/-/tw-animate-css-1.4.0.tgz"
integrity sha512-7bziOlRqH0hJx80h/3mbicLW7o8qLsH5+RaLR2t+OHM3D0JlWGODQKQ4cxbK7WlvmUxpcj6Kgu6EKqjrGFe3QQ==
type-check@^0.4.0, type-check@~0.4.0:
version "0.4.0"
- resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"
+ resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz"
integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==
dependencies:
prelude-ls "^1.2.1"
type-fest@^5.2.0:
version "5.4.4"
- resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-5.4.4.tgz#577f165b5ecb44cfc686559cc54ca77f62aa374d"
+ resolved "https://registry.npmjs.org/type-fest/-/type-fest-5.4.4.tgz"
integrity sha512-JnTrzGu+zPV3aXIUhnyWJj4z/wigMsdYajGLIYakqyOW1nPllzXEJee0QQbHj+CTIQtXGlAjuK0UY+2xTyjVAw==
dependencies:
tagged-tag "^1.0.0"
type-is@^2.0.1:
version "2.0.1"
- resolved "https://registry.yarnpkg.com/type-is/-/type-is-2.0.1.tgz#64f6cf03f92fce4015c2b224793f6bdd4b068c97"
+ resolved "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz"
integrity sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==
dependencies:
content-type "^1.0.5"
@@ -4623,7 +5536,7 @@ type-is@^2.0.1:
typed-array-buffer@^1.0.3:
version "1.0.3"
- resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz#a72395450a4869ec033fd549371b47af3a2ee536"
+ resolved "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz"
integrity sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==
dependencies:
call-bound "^1.0.3"
@@ -4632,7 +5545,7 @@ typed-array-buffer@^1.0.3:
typed-array-byte-length@^1.0.3:
version "1.0.3"
- resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz#8407a04f7d78684f3d252aa1a143d2b77b4160ce"
+ resolved "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz"
integrity sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==
dependencies:
call-bind "^1.0.8"
@@ -4643,7 +5556,7 @@ typed-array-byte-length@^1.0.3:
typed-array-byte-offset@^1.0.4:
version "1.0.4"
- resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz#ae3698b8ec91a8ab945016108aef00d5bff12355"
+ resolved "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz"
integrity sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==
dependencies:
available-typed-arrays "^1.0.7"
@@ -4656,7 +5569,7 @@ typed-array-byte-offset@^1.0.4:
typed-array-length@^1.0.7:
version "1.0.7"
- resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.7.tgz#ee4deff984b64be1e118b0de8c9c877d5ce73d3d"
+ resolved "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz"
integrity sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==
dependencies:
call-bind "^1.0.7"
@@ -4668,7 +5581,7 @@ typed-array-length@^1.0.7:
typescript-eslint@^8.46.0:
version "8.56.1"
- resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.56.1.tgz#15a9fcc5d2150a0d981772bb36f127a816fe103f"
+ resolved "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.56.1.tgz"
integrity sha512-U4lM6pjmBX7J5wk4szltF7I1cGBHXZopnAXCMXb3+fZ3B/0Z3hq3wS/CCUB2NZBNAExK92mCU2tEohWuwVMsDQ==
dependencies:
"@typescript-eslint/eslint-plugin" "8.56.1"
@@ -4676,14 +5589,14 @@ typescript-eslint@^8.46.0:
"@typescript-eslint/typescript-estree" "8.56.1"
"@typescript-eslint/utils" "8.56.1"
-typescript@^5:
+typescript@^5, typescript@^5.0.0, "typescript@>= 4.8.x", typescript@>=3.3.1, typescript@>=4.8.4, "typescript@>=4.8.4 <6.0.0", typescript@>=4.9.5:
version "5.9.3"
- resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f"
+ resolved "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz"
integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==
unbox-primitive@^1.1.0:
version "1.1.0"
- resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.1.0.tgz#8d9d2c9edeea8460c7f35033a88867944934d1e2"
+ resolved "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz"
integrity sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==
dependencies:
call-bound "^1.0.3"
@@ -4693,27 +5606,71 @@ unbox-primitive@^1.1.0:
undici-types@~6.21.0:
version "6.21.0"
- resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb"
+ resolved "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz"
integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==
+undici-types@~7.18.0:
+ version "7.18.2"
+ resolved "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz"
+ integrity sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==
+
unicorn-magic@^0.3.0:
version "0.3.0"
- resolved "https://registry.yarnpkg.com/unicorn-magic/-/unicorn-magic-0.3.0.tgz#4efd45c85a69e0dd576d25532fbfa22aa5c8a104"
+ resolved "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz"
integrity sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==
+unified@^11.0.0:
+ version "11.0.5"
+ dependencies:
+ "@types/unist" "^3.0.0"
+ bail "^2.0.0"
+ devlop "^1.0.0"
+ extend "^3.0.0"
+ is-plain-obj "^4.0.0"
+ trough "^2.0.0"
+ vfile "^6.0.0"
+
+unist-util-is@^6.0.0:
+ version "6.0.1"
+ dependencies:
+ "@types/unist" "^3.0.0"
+
+unist-util-position@^5.0.0:
+ version "5.0.0"
+ dependencies:
+ "@types/unist" "^3.0.0"
+
+unist-util-stringify-position@^4.0.0:
+ version "4.0.0"
+ dependencies:
+ "@types/unist" "^3.0.0"
+
+unist-util-visit-parents@^6.0.0:
+ version "6.0.2"
+ dependencies:
+ "@types/unist" "^3.0.0"
+ unist-util-is "^6.0.0"
+
+unist-util-visit@^5.0.0:
+ version "5.1.0"
+ dependencies:
+ "@types/unist" "^3.0.0"
+ unist-util-is "^6.0.0"
+ unist-util-visit-parents "^6.0.0"
+
universalify@^2.0.0:
version "2.0.1"
- resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d"
+ resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz"
integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==
unpipe@~1.0.0:
version "1.0.0"
- resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
+ resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==
unrs-resolver@^1.6.2:
version "1.11.1"
- resolved "https://registry.yarnpkg.com/unrs-resolver/-/unrs-resolver-1.11.1.tgz#be9cd8686c99ef53ecb96df2a473c64d304048a9"
+ resolved "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.11.1.tgz"
integrity sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==
dependencies:
napi-postinstall "^0.3.0"
@@ -4740,12 +5697,12 @@ unrs-resolver@^1.6.2:
until-async@^3.0.2:
version "3.0.2"
- resolved "https://registry.yarnpkg.com/until-async/-/until-async-3.0.2.tgz#447f1531fdd7bb2b4c7a98869bdb1a4c2a23865f"
+ resolved "https://registry.npmjs.org/until-async/-/until-async-3.0.2.tgz"
integrity sha512-IiSk4HlzAMqTUseHHe3VhIGyuFmN90zMTpD3Z3y8jeQbzLIq500MVM7Jq2vUAnTKAFPJrqwkzr6PoTcPhGcOiw==
update-browserslist-db@^1.2.0:
version "1.2.3"
- resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz#64d76db58713136acbeb4c49114366cc6cc2e80d"
+ resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz"
integrity sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==
dependencies:
escalade "^3.2.0"
@@ -4753,39 +5710,81 @@ update-browserslist-db@^1.2.0:
uri-js@^4.2.2:
version "4.4.1"
- resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e"
+ resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz"
integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==
dependencies:
punycode "^2.1.0"
-use-sync-external-store@^1.6.0:
+use-intl@^4.8.3:
+ version "4.8.3"
+ resolved "https://registry.npmjs.org/use-intl/-/use-intl-4.8.3.tgz"
+ integrity sha512-nLxlC/RH+le6g3amA508Itnn/00mE+J22ui21QhOWo5V9hCEC43+WtnRAITbJW0ztVZphev5X9gvOf2/Dk9PLA==
+ dependencies:
+ "@formatjs/fast-memoize" "^3.1.0"
+ "@schummar/icu-type-parser" "1.21.5"
+ icu-minify "^4.8.3"
+ intl-messageformat "^11.1.0"
+
+use-sync-external-store@^1.2.2, use-sync-external-store@^1.4.0, use-sync-external-store@^1.6.0, use-sync-external-store@>=1.2.0:
version "1.6.0"
- resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz#b174bfa65cb2b526732d9f2ac0a408027876f32d"
+ resolved "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz"
integrity sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==
util-deprecate@^1.0.2:
version "1.0.2"
- resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
+ resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
validate-npm-package-name@^7.0.1:
version "7.0.2"
- resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-7.0.2.tgz#e57c3d721a4c8bbff454a246e7f7da811559ea0d"
+ resolved "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-7.0.2.tgz"
integrity sha512-hVDIBwsRruT73PbK7uP5ebUt+ezEtCmzZz3F59BSr2F6OVFnJ/6h8liuvdLrQ88Xmnk6/+xGGuq+pG9WwTuy3A==
vary@^1, vary@^1.1.2:
version "1.1.2"
- resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
+ resolved "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz"
integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==
+vfile-message@^4.0.0:
+ version "4.0.3"
+ dependencies:
+ "@types/unist" "^3.0.0"
+ unist-util-stringify-position "^4.0.0"
+
+vfile@^6.0.0:
+ version "6.0.3"
+ dependencies:
+ "@types/unist" "^3.0.0"
+ vfile-message "^4.0.0"
+
+victory-vendor@^37.0.2:
+ version "37.3.6"
+ resolved "https://registry.npmjs.org/victory-vendor/-/victory-vendor-37.3.6.tgz"
+ integrity sha512-SbPDPdDBYp+5MJHhBCAyI7wKM3d5ivekigc2Dk2s7pgbZ9wIgIBYGVw4zGHBml/qTFbexrofXW6Gu4noGxrOwQ==
+ 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"
+
web-streams-polyfill@^3.0.3:
version "3.3.3"
- resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b"
+ resolved "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz"
integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==
which-boxed-primitive@^1.1.0, which-boxed-primitive@^1.1.1:
version "1.1.1"
- resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz#d76ec27df7fa165f18d5808374a5fe23c29b176e"
+ resolved "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz"
integrity sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==
dependencies:
is-bigint "^1.1.0"
@@ -4796,7 +5795,7 @@ which-boxed-primitive@^1.1.0, which-boxed-primitive@^1.1.1:
which-builtin-type@^1.2.1:
version "1.2.1"
- resolved "https://registry.yarnpkg.com/which-builtin-type/-/which-builtin-type-1.2.1.tgz#89183da1b4907ab089a6b02029cc5d8d6574270e"
+ resolved "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz"
integrity sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==
dependencies:
call-bound "^1.0.2"
@@ -4815,7 +5814,7 @@ which-builtin-type@^1.2.1:
which-collection@^1.0.2:
version "1.0.2"
- resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.2.tgz#627ef76243920a107e7ce8e96191debe4b16c2a0"
+ resolved "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz"
integrity sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==
dependencies:
is-map "^2.0.3"
@@ -4825,7 +5824,7 @@ which-collection@^1.0.2:
which-typed-array@^1.1.16, which-typed-array@^1.1.19:
version "1.1.20"
- resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.20.tgz#3fdb7adfafe0ea69157b1509f3a1cd892bd1d122"
+ resolved "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.20.tgz"
integrity sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg==
dependencies:
available-typed-arrays "^1.0.7"
@@ -4838,26 +5837,26 @@ which-typed-array@^1.1.16, which-typed-array@^1.1.19:
which@^2.0.1:
version "2.0.2"
- resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
+ resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz"
integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
dependencies:
isexe "^2.0.0"
which@^4.0.0:
version "4.0.0"
- resolved "https://registry.yarnpkg.com/which/-/which-4.0.0.tgz#cd60b5e74503a3fbcfbf6cd6b4138a8bae644c1a"
+ resolved "https://registry.npmjs.org/which/-/which-4.0.0.tgz"
integrity sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==
dependencies:
isexe "^3.1.1"
word-wrap@^1.2.5:
version "1.2.5"
- resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34"
+ resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz"
integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==
wrap-ansi@^6.2.0:
version "6.2.0"
- resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53"
+ resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz"
integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==
dependencies:
ansi-styles "^4.0.0"
@@ -4866,7 +5865,7 @@ wrap-ansi@^6.2.0:
wrap-ansi@^7.0.0:
version "7.0.0"
- resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
+ resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
@@ -4875,12 +5874,17 @@ wrap-ansi@^7.0.0:
wrappy@1:
version "1.0.2"
- resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+ resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz"
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
+ws@^8.18.2:
+ version "8.19.0"
+ resolved "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz"
+ integrity sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==
+
wsl-utils@^0.3.0:
version "0.3.1"
- resolved "https://registry.yarnpkg.com/wsl-utils/-/wsl-utils-0.3.1.tgz#9479836ddf03be267aad3abfc3cb1f6e0c9f1ed1"
+ resolved "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.3.1.tgz"
integrity sha512-g/eziiSUNBSsdDJtCLB8bdYEUMj4jR7AGeUo96p/3dTafgjHhpF4RiCFPiRILwjQoDXx5MqkBr4fwWtR3Ky4Wg==
dependencies:
is-wsl "^3.1.0"
@@ -4888,22 +5892,22 @@ wsl-utils@^0.3.0:
y18n@^5.0.5:
version "5.0.8"
- resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
+ resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz"
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
yallist@^3.0.2:
version "3.1.1"
- resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"
+ resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz"
integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==
yargs-parser@^21.1.1:
version "21.1.1"
- resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
+ resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz"
integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==
yargs@^17.7.2:
version "17.7.2"
- resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269"
+ resolved "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz"
integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==
dependencies:
cliui "^8.0.1"
@@ -4916,35 +5920,48 @@ yargs@^17.7.2:
yocto-queue@^0.1.0:
version "0.1.0"
- resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
+ resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz"
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
yoctocolors-cjs@^2.1.3:
version "2.1.3"
- resolved "https://registry.yarnpkg.com/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz#7e4964ea8ec422b7a40ac917d3a344cfd2304baa"
+ resolved "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz"
integrity sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==
yoctocolors@^2.1.1:
version "2.1.2"
- resolved "https://registry.yarnpkg.com/yoctocolors/-/yoctocolors-2.1.2.tgz#d795f54d173494e7d8db93150cec0ed7f678c83a"
+ resolved "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.2.tgz"
integrity sha512-CzhO+pFNo8ajLM2d2IW/R93ipy99LWjtwblvC1RsoSUMZgyLbYFr221TnSNT7GjGdYui6P459mw9JH/g/zW2ug==
zod-to-json-schema@^3.24.6, zod-to-json-schema@^3.25.1:
version "3.25.1"
- resolved "https://registry.yarnpkg.com/zod-to-json-schema/-/zod-to-json-schema-3.25.1.tgz#7f24962101a439ddade2bf1aeab3c3bfec7d84ba"
+ resolved "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.1.tgz"
integrity sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA==
"zod-validation-error@^3.5.0 || ^4.0.0":
version "4.0.2"
- resolved "https://registry.yarnpkg.com/zod-validation-error/-/zod-validation-error-4.0.2.tgz#bc605eba49ce0fcd598c127fee1c236be3f22918"
+ resolved "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-4.0.2.tgz"
integrity sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==
-zod@^3.24.1:
+zod@^3.24.1, "zod@^3.25 || ^4":
version "3.25.76"
- resolved "https://registry.yarnpkg.com/zod/-/zod-3.25.76.tgz#26841c3f6fd22a6a2760e7ccb719179768471e34"
+ resolved "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz"
integrity sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==
-"zod@^3.25 || ^4.0", "zod@^3.25.0 || ^4.0.0":
+"zod@^3.25 || ^4.0":
+ version "4.3.6"
+ resolved "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz"
+ integrity sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==
+
+"zod@^3.25.0 || ^4.0.0":
version "4.3.6"
- resolved "https://registry.yarnpkg.com/zod/-/zod-4.3.6.tgz#89c56e0aa7d2b05107d894412227087885ab112a"
+ resolved "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz"
integrity sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==
+
+zustand@^5.0.11:
+ version "5.0.11"
+ resolved "https://registry.npmjs.org/zustand/-/zustand-5.0.11.tgz"
+ integrity sha512-fdZY+dk7zn/vbWNCYmzZULHRrss0jx5pPFiOuMZ/5HJN6Yv3u+1Wswy/4MpZEkEGhtNH+pwxZB8OKgUBPzYAGg==
+
+zwitch@^2.0.0, zwitch@^2.0.4:
+ version "2.0.4"