Skip to content

CanvasAnvil is an open source AI diagram maker and flowchart generator - an infinite-canvas diagram editor and self-hosted drawio alternative that writes editable .drawio files. Text to diagram, then fix nodes, layout and labels in place. Also AI presentations, interior design CAD/BOM, posters and infographics.

Initial commit

codingFeng1010f7c2a05efa3
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..54f07af
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,24 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
+node_modules
+dist
+dist-ssr
+*.local
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+.idea
+.DS_Store
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
\ No newline at end of file
diff --git a/.trae/skills/frontend-designer/SKILL.md b/.trae/skills/frontend-designer/SKILL.md
new file mode 100644
index 0000000..ea94b59
--- /dev/null
+++ b/.trae/skills/frontend-designer/SKILL.md
@@ -0,0 +1,44 @@
+---
+name: "frontend-designer"
+description: "Generates beautiful, modern UI designs using Tailwind CSS and React. Invoke when user asks to improve UI, style, layout, or visual appearance of the application."
+---
+
+# Frontend Designer
+
+This skill focuses on creating high-quality, modern, and accessible user interfaces.
+
+## Capabilities
+
+- **Tailwind CSS Mastery**: Use advanced Tailwind utility classes for layout, typography, colors, and effects.
+- **Component Design**: Create reusable, composable React components.
+- **Responsive Design**: Ensure layouts work seamlessly across mobile, tablet, and desktop.
+- **Accessibility**: Implement ARIA attributes and keyboard navigation.
+- **Animation**: Use CSS transitions and animations for delightful micro-interactions.
+
+## Guidelines
+
+1. **Modern Aesthetic**: Prefer clean, minimal, and whitespace-generous designs (e.g., shadcn/ui style).
+2. **Color Palette**: Use semantic color names (bg-background, text-foreground) for dark mode support.
+3. **Typography**: Use clear, legible font stacks.
+4. **Icons**: Use Lucide React icons for visual cues.
+5. **Feedback**: Provide visual feedback for interactions (hover, focus, active states).
+
+## Example: Creating a Card Component
+
+```tsx
+import { cn } from "@/lib/utils";
+
+interface CardProps extends React.HTMLAttributes<HTMLDivElement> {}
+
+export function Card({ className, ...props }: CardProps) {
+ return (
+ <div
+ className={cn(
+ "rounded-xl border bg-card text-card-foreground shadow-sm",
+ className
+ )}
+ {...props}
+ />
+ );
+}
+```
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..7515059
--- /dev/null
+++ b/README.md
@@ -0,0 +1,57 @@
+# React + TypeScript + Vite
+
+This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
+
+Currently, two official plugins are available:
+
+- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
+- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
+
+## Expanding the ESLint configuration
+
+If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
+
+```js
+export default tseslint.config({
+ extends: [
+ // Remove ...tseslint.configs.recommended and replace with this
+ ...tseslint.configs.recommendedTypeChecked,
+ // Alternatively, use this for stricter rules
+ ...tseslint.configs.strictTypeChecked,
+ // Optionally, add this for stylistic rules
+ ...tseslint.configs.stylisticTypeChecked,
+ ],
+ languageOptions: {
+ // other options...
+ parserOptions: {
+ project: ['./tsconfig.node.json', './tsconfig.app.json'],
+ tsconfigRootDir: import.meta.dirname,
+ },
+ },
+})
+```
+
+You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
+
+```js
+// eslint.config.js
+import reactX from 'eslint-plugin-react-x'
+import reactDom from 'eslint-plugin-react-dom'
+
+export default tseslint.config({
+ extends: [
+ // other configs...
+ // Enable lint rules for React
+ reactX.configs['recommended-typescript'],
+ // Enable lint rules for React DOM
+ reactDom.configs.recommended,
+ ],
+ languageOptions: {
+ // other options...
+ parserOptions: {
+ project: ['./tsconfig.node.json', './tsconfig.app.json'],
+ tsconfigRootDir: import.meta.dirname,
+ },
+ },
+})
+```
diff --git a/docs/product-requirements-document.md b/docs/product-requirements-document.md
new file mode 100644
index 0000000..bbe74c1
--- /dev/null
+++ b/docs/product-requirements-document.md
@@ -0,0 +1,111 @@
+## 1. 产品概述
+
+统一AI工作空间是一个集成多种工作模式的协作平台,通过分屏布局将工作区与AI聊天面板结合,为用户提供流程图设计、CAD绘图和PPT制作的无缝体验。
+
+该产品主要解决设计师、工程师和项目管理者在多工具间切换的效率问题,通过AI驱动的聊天界面统一控制各种工作模式,提升工作流程的连贯性和智能化水平。
+
+## 2. 核心功能
+
+### 2.1 用户角色
+
+| 角色 | 注册方式 | 核心权限 |
+|------|----------|----------|
+| 普通用户 | 邮箱注册 | 使用基础工作模式,保存项目 |
+| 高级用户 | 邀请码升级 | 导出高级格式,团队协作,AI增强功能 |
+
+### 2.2 功能模块
+
+统一AI工作空间包含以下核心页面:
+
+1. **主工作区**:分屏布局,左侧工作区域,右侧聊天面板
+2. **模式切换栏**:流程图模式、CAD模式、PPT模式的快速切换
+3. **项目管理**:项目列表、新建、保存、导出功能
+
+### 2.3 页面详情
+
+| 页面名称 | 模块名称 | 功能描述 |
+|----------|----------|----------|
+| 主工作区 | 分屏布局 | 实现可调整大小的左右分屏,左侧占60%显示工作区,右侧40%显示聊天面板 |
+| 主工作区 | 模式切换 | 提供三种工作模式的图标切换按钮,支持快捷键切换 |
+| 流程图模式 | draw.io集成 | 嵌入draw.io编辑器,支持节点选择和边选择,点击"添加到聊天"发送XML片段 |
+| CAD模式 | SVG渲染器 | 加载和显示2D CAD文件(SVG格式),支持元素点击选择,发送Python/CAD代码片段 |
+| PPT模式 | 图片序列 | 按顺序显示多张图片,支持前后翻页,缩略图预览 |
+| 聊天面板 | 消息列表 | 显示用户与AI的对话历史,支持消息时间戳和发送者标识 |
+| 聊天面板 | 输入框 | 支持多行文本输入,发送按钮,清空聊天记录功能 |
+| 项目管理 | 文件操作 | 新建项目、打开项目、保存项目、导出为不同格式 |
+
+## 3. 核心流程
+
+用户进入主工作区后,可以通过顶部工具栏选择工作模式:
+
+**流程图模式流程**:
+1. 用户选择流程图模式,加载draw.io编辑器
+2. 在左侧绘制流程图,选择节点或连接线
+3. 点击"添加到聊天"按钮,将选中元素的XML数据发送到右侧聊天面板
+4. 在聊天面板中与AI对话,AI根据流程图内容提供建议
+
+**CAD模式流程**:
+1. 用户切换到CAD模式,加载SVG文件
+2. 点击CAD图形中的元素进行选择
+3. 点击"添加到聊天",发送对应的Python/CAD代码片段
+4. AI分析代码并提供修改建议或生成相关代码
+
+**PPT模式流程**:
+1. 用户进入PPT模式,上传或选择图片序列
+2. 使用导航控件浏览不同页面
+3. 在聊天面板中描述需求,AI协助生成新的幻灯片内容
+
+```mermaid
+graph TD
+ A[登录页面] --> B[主工作区]
+ B --> C[模式选择]
+ C --> D[流程图模式]
+ C --> E[CAD模式]
+ C --> F[PPT模式]
+ D --> G[draw.io编辑器]
+ E --> H[SVG渲染器]
+ F --> I[图片序列展示]
+ G --> J[添加到聊天]
+ H --> J
+ I --> J
+ J --> K[AI聊天面板]
+ K --> L[生成建议]
+ L --> M[应用修改]
+```
+
+## 4. 用户界面设计
+
+### 4.1 设计风格
+
+- **主色调**:深蓝色(#1e40af)作为主色,浅灰色(#f3f4f6)作为背景
+- **按钮样式**:圆角矩形,悬停效果,主要操作为实心按钮,次要操作为边框按钮
+- **字体**:Inter字体族,标题18px,正文14px,小字12px
+- **布局风格**:卡片式布局,阴影效果,适当的间距和留白
+- **图标风格**:使用Lucide图标库,线条简洁,统一大小20x20px
+
+### 4.2 页面设计概述
+
+| 页面名称 | 模块名称 | UI元素 |
+|----------|----------|----------|
+| 主工作区 | 分屏布局 | 使用React Resizable Panels,支持拖拽调整比例,最小宽度限制 |
+| 主工作区 | 顶部工具栏 | 固定在顶部,包含模式切换按钮组,项目操作按钮,用户信息 |
+| 流程图模式 | 编辑器容器 | iframe嵌入draw.io,边框阴影,加载状态指示器 |
+| CAD模式 | SVG容器 | 自适应大小,支持缩放和平移,选中元素高亮显示 |
+| PPT模式 | 图片容器 | 居中显示,支持键盘左右箭头导航,底部缩略图条 |
+| 聊天面板 | 消息气泡 | 用户消息右对齐蓝色背景,AI消息左对齐白色背景 |
+| 聊天面板 | 输入区域 | 底部固定,包含文本框和发送按钮,支持Enter快捷键 |
+
+### 4.3 响应式设计
+
+采用桌面优先设计策略:
+- 最小支持宽度:1280px
+- 工作区与聊天面板比例可在40:60到80:20之间调整
+- 移动端采用堆叠布局,工作区在上,聊天面板在下
+- 触摸优化:增大点击区域,支持手势缩放
+
+### 4.4 交互细节
+
+- 模式切换使用平滑过渡动画,时长300ms
+- 添加到聊天按钮在选中元素后显示,带有脉冲动画提示
+- 聊天消息发送后显示打字指示器,模拟AI思考过程
+- 所有操作提供视觉反馈,成功/失败状态用颜色和图标区分
\ No newline at end of file
diff --git a/docs/technical-architecture-document.md b/docs/technical-architecture-document.md
new file mode 100644
index 0000000..6be6e7e
--- /dev/null
+++ b/docs/technical-architecture-document.md
@@ -0,0 +1,325 @@
+## 1. 架构设计
+
+```mermaid
+graph TD
+ A[用户浏览器] --> B[Next.js前端应用]
+ B --> C[React组件层]
+ C --> D[状态管理]
+ C --> E[UI组件库]
+
+ subgraph "前端层"
+ B
+ C
+ D
+ E
+ F[draw.io集成]
+ G[SVG处理器]
+ H[图片管理器]
+ end
+
+ subgraph "外部服务"
+ I[draw.io API]
+ J[AI服务API]
+ end
+
+ B --> F
+ B --> G
+ B --> H
+ F --> I
+ C --> J
+```
+
+## 2. 技术描述
+
+- **前端框架**: Next.js@14 + React@18 + TypeScript@5
+- **UI组件库**: shadcn/ui + Radix UI + Tailwind CSS@3
+- **图标库**: Lucide React
+- **布局管理**: React Resizable Panels
+- **状态管理**: Zustand
+- **构建工具**: Next.js内置构建系统
+- **包管理**: pnpm
+
+### 核心依赖
+```json
+{
+ "dependencies": {
+ "next": "^14.0.0",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
+ "@radix-ui/react-": "^latest",
+ "lucide-react": "^latest",
+ "react-resizable-panels": "^latest",
+ "zustand": "^latest",
+ "clsx": "^latest",
+ "tailwind-merge": "^latest"
+ },
+ "devDependencies": {
+ "typescript": "^5.0.0",
+ "@types/react": "^18.2.0",
+ "@types/react-dom": "^18.2.0",
+ "tailwindcss": "^3.3.0",
+ "autoprefixer": "^latest",
+ "postcss": "^latest"
+ }
+}
+```
+
+## 3. 路由定义
+
+| 路由 | 用途 |
+|------|------|
+| `/` | 主页,重定向到工作区 |
+| `/workspace` | 主工作区,包含分屏布局和模式切换 |
+| `/workspace/flowchart` | 流程图模式,集成draw.io编辑器 |
+| `/workspace/cad` | CAD模式,SVG渲染和交互 |
+| `/workspace/ppt` | PPT模式,图片序列展示 |
+| `/api/chat` | 聊天API,处理AI对话请求 |
+| `/api/project/save` | 项目保存API |
+| `/api/project/load` | 项目加载API |
+| `/api/project/export` | 项目导出API |
+
+## 4. 核心组件架构
+
+### 4.1 主布局组件
+```typescript
+interface MainLayoutProps {
+ children: React.ReactNode;
+ defaultLayout?: number[];
+ defaultCollapsed?: boolean;
+}
+
+interface PanelLayout {
+ leftPanel: number; // 百分比 40-80%
+ rightPanel: number; // 百分比 20-60%
+}
+```
+
+### 4.2 工作模式状态管理
+```typescript
+interface WorkspaceState {
+ currentMode: 'flowchart' | 'cad' | 'ppt';
+ isLoading: boolean;
+ selectedElements: SelectedElement[];
+ chatHistory: ChatMessage[];
+}
+
+interface SelectedElement {
+ id: string;
+ type: 'node' | 'edge' | 'cad-element' | 'slide';
+ data: any; // XML, Python代码, 图片数据等
+ timestamp: number;
+}
+
+interface ChatMessage {
+ id: string;
+ role: 'user' | 'assistant';
+ content: string;
+ timestamp: number;
+ mode?: string; // 关联的工作模式
+}
+```
+
+### 4.3 draw.io集成接口
+```typescript
+interface DrawIOIntegration {
+ embedUrl: string;
+ onElementSelect: (element: DrawElement) => void;
+ getSelectedXML: () => string;
+ addToChat: (xmlData: string) => void;
+}
+
+interface DrawElement {
+ id: string;
+ type: 'node' | 'edge';
+ label: string;
+ xmlData: string;
+ bounds: DOMRect;
+}
+```
+
+### 4.4 CAD模式接口
+```typescript
+interface CADViewerProps {
+ svgContent: string;
+ onElementClick: (element: CADElement) => void;
+ zoomLevel: number;
+ panOffset: { x: number; y: number };
+}
+
+interface CADElement {
+ id: string;
+ type: string; // 'line' | 'circle' | 'rectangle' | 'path'
+ properties: Record<string, any>;
+ pythonCode?: string;
+ cadCode?: string;
+}
+```
+
+### 4.5 PPT模式接口
+```typescript
+interface PPTViewerProps {
+ slides: Slide[];
+ currentSlide: number;
+ onSlideChange: (index: number) => void;
+ showThumbnails: boolean;
+}
+
+interface Slide {
+ id: string;
+ imageUrl: string;
+ title?: string;
+ notes?: string;
+ order: number;
+}
+```
+
+## 5. 状态管理设计
+
+```typescript
+// Zustand store结构
+interface AppStore {
+ // UI状态
+ sidebarCollapsed: boolean;
+ panelLayout: PanelLayout;
+ theme: 'light' | 'dark';
+
+ // 工作区状态
+ workspace: WorkspaceState;
+
+ // 项目状态
+ currentProject: Project | null;
+ unsavedChanges: boolean;
+
+ // 方法
+ setPanelLayout: (layout: PanelLayout) => void;
+ switchMode: (mode: WorkspaceMode) => void;
+ addToChat: (element: SelectedElement) => void;
+ sendMessage: (message: string) => Promise<void>;
+ saveProject: () => Promise<void>;
+}
+
+interface Project {
+ id: string;
+ name: string;
+ mode: WorkspaceMode;
+ data: any; // 模式特定的数据
+ createdAt: Date;
+ updatedAt: Date;
+}
+```
+
+## 6. 组件层次结构
+
+```
+src/
+├── app/
+│ ├── layout.tsx # 根布局
+│ ├── page.tsx # 主页
+│ └── workspace/
+│ ├── page.tsx # 工作区主页面
+│ └── [mode]/
+│ └── page.tsx # 特定模式页面
+├── components/
+│ ├── workspace/
+│ │ ├── MainLayout.tsx # 主布局组件
+│ │ ├── PanelLayout.tsx # 分屏布局组件
+│ │ ├── ModeSelector.tsx # 模式选择器
+│ │ ├── Toolbar.tsx # 工具栏
+│ │ └── StatusBar.tsx # 状态栏
+│ ├── flowchart/
+│ │ ├── DrawIOViewer.tsx # draw.io查看器
+│ │ ├── ElementSelector.tsx # 元素选择器
+│ │ └── XMLParser.ts # XML解析工具
+│ ├── cad/
+│ │ ├── SVGViewer.tsx # SVG查看器
+│ │ ├── ElementHighlighter.tsx # 元素高亮
+│ │ └── CodeGenerator.ts # 代码生成器
+│ ├── ppt/
+│ │ ├── SlideViewer.tsx # 幻灯片查看器
+│ │ ├── ThumbnailBar.tsx # 缩略图条
+│ │ └── ImageUploader.tsx # 图片上传器
+│ └── chat/
+│ ├── ChatPanel.tsx # 聊天面板
+│ ├── MessageList.tsx # 消息列表
+│ ├── MessageInput.tsx # 消息输入
+│ └── MessageBubble.tsx # 消息气泡
+├── lib/
+│ ├── hooks/ # 自定义hooks
+│ ├── utils/ # 工具函数
+│ └── stores/ # 状态管理
+└── types/ # TypeScript类型定义
+```
+
+## 7. 性能优化策略
+
+### 7.1 代码分割
+- 按工作模式进行代码分割,减少初始加载时间
+- 动态导入draw.io等大型依赖
+- 使用Next.js的自动代码分割功能
+
+### 7.2 缓存策略
+- 使用React.memo优化组件重渲染
+- 实现虚拟滚动处理大量聊天消息
+- 缓存解析后的SVG和XML数据
+
+### 7.3 加载优化
+- 图片懒加载和预加载策略
+- draw.io编辑器的异步加载
+- 骨架屏提升感知性能
+
+## 8. 错误处理
+
+### 8.1 错误边界
+```typescript
+interface ErrorBoundaryState {
+ hasError: boolean;
+ error: Error | null;
+ errorInfo: ErrorInfo | null;
+}
+```
+
+### 8.2 错误类型
+- 网络错误:API调用失败处理
+- 解析错误:XML/SVG解析失败
+- 集成错误:draw.io加载失败
+- 用户操作错误:文件格式不支持
+
+## 9. 安全性考虑
+
+### 9.1 XSS防护
+- 对用户输入进行转义
+- SVG内容的安全检查
+- iframe的沙箱属性配置
+
+### 9.2 CSRF防护
+- API请求使用CSRF token
+- 文件上传的安全验证
+- 跨域请求的正确配置
+
+## 10. 开发环境配置
+
+### 10.1 环境变量
+```env
+NEXT_PUBLIC_API_URL=http://localhost:3000/api
+NEXT_PUBLIC_DRAWIO_URL=https://embed.diagrams.net
+NEXT_PUBLIC_AI_SERVICE_URL=https://api.example.com
+```
+
+### 10.2 开发脚本
+```json
+{
+ "scripts": {
+ "dev": "next dev",
+ "build": "next build",
+ "start": "next start",
+ "lint": "next lint",
+ "type-check": "tsc --noEmit"
+ }
+}
+```
+
+### 10.3 构建配置
+- Next.js配置文件优化
+- Tailwind CSS配置
+- TypeScript严格模式启用
+- ESLint和Prettier代码规范
\ No newline at end of file
diff --git a/eslint.config.js b/eslint.config.js
new file mode 100644
index 0000000..092408a
--- /dev/null
+++ b/eslint.config.js
@@ -0,0 +1,28 @@
+import js from '@eslint/js'
+import globals from 'globals'
+import reactHooks from 'eslint-plugin-react-hooks'
+import reactRefresh from 'eslint-plugin-react-refresh'
+import tseslint from 'typescript-eslint'
+
+export default tseslint.config(
+ { ignores: ['dist'] },
+ {
+ extends: [js.configs.recommended, ...tseslint.configs.recommended],
+ files: ['**/*.{ts,tsx}'],
+ languageOptions: {
+ ecmaVersion: 2020,
+ globals: globals.browser,
+ },
+ plugins: {
+ 'react-hooks': reactHooks,
+ 'react-refresh': reactRefresh,
+ },
+ rules: {
+ ...reactHooks.configs.recommended.rules,
+ 'react-refresh/only-export-components': [
+ 'warn',
+ { allowConstantExport: true },
+ ],
+ },
+ },
+)
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..7650e18
--- /dev/null
+++ b/index.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8" />
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>My Trae Project</title>
+ <script type="module">
+ if (import.meta.hot?.on) {
+ import.meta.hot.on('vite:error', (error) => {
+ if (error.err) {
+ console.error(
+ [error.err.message, error.err.frame].filter(Boolean).join('\n'),
+ )
+ }
+ })
+ }
+ </script>
+ </head>
+ <body>
+ <div id="root"></div>
+ <script type="module" src="/src/main.tsx"></script>
+ </body>
+</html>
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..53a770a
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,7250 @@
+{
+ "name": "unified-ai-workspace",
+ "version": "0.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "unified-ai-workspace",
+ "version": "0.0.0",
+ "dependencies": {
+ "@radix-ui/react-collapsible": "^1.1.12",
+ "@radix-ui/react-context-menu": "^2.2.16",
+ "@radix-ui/react-dialog": "^1.1.15",
+ "@radix-ui/react-label": "^2.1.8",
+ "@radix-ui/react-scroll-area": "^1.2.10",
+ "@radix-ui/react-select": "^2.2.6",
+ "@radix-ui/react-slot": "^1.2.4",
+ "@radix-ui/react-tooltip": "^1.2.8",
+ "@radix-ui/react-use-controllable-state": "^1.2.2",
+ "class-variance-authority": "^0.7.1",
+ "clsx": "^2.1.1",
+ "framer-motion": "^12.28.1",
+ "lucide-react": "^0.511.0",
+ "motion": "^12.28.1",
+ "openai": "^6.16.0",
+ "pdf-lib": "^1.17.1",
+ "pptxgenjs": "^4.0.1",
+ "prism-react-renderer": "^2.4.1",
+ "react": "^18.3.1",
+ "react-dom": "^18.3.1",
+ "react-markdown": "^10.1.0",
+ "react-resizable-panels": "^4.4.1",
+ "react-router-dom": "^7.3.0",
+ "remark-gfm": "^4.0.1",
+ "sonner": "^2.0.7",
+ "tailwind-merge": "^3.4.0",
+ "tailwindcss-animate": "^1.0.7",
+ "three": "^0.161.0",
+ "unpdf": "^1.4.0",
+ "zustand": "^5.0.3"
+ },
+ "devDependencies": {
+ "@eslint/js": "^9.25.0",
+ "@tailwindcss/typography": "^0.5.19",
+ "@types/node": "^22.15.30",
+ "@types/react": "^18.3.12",
+ "@types/react-dom": "^18.3.1",
+ "@types/three": "^0.182.0",
+ "@vitejs/plugin-react": "^4.4.1",
+ "autoprefixer": "^10.4.23",
+ "babel-plugin-react-dev-locator": "^1.0.0",
+ "eslint": "^9.25.0",
+ "eslint-plugin-react-hooks": "^5.2.0",
+ "eslint-plugin-react-refresh": "^0.4.19",
+ "globals": "^16.0.0",
+ "postcss": "^8.5.6",
+ "tailwindcss": "^3.4.19",
+ "typescript": "~5.8.3",
+ "typescript-eslint": "^8.30.1",
+ "vite": "^6.3.5",
+ "vite-plugin-trae-solo-badge": "^1.0.0",
+ "vite-tsconfig-paths": "^5.1.4"
+ }
+ },
+ "node_modules/@alloc/quick-lru": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmmirror.com/@alloc/quick-lru/-/quick-lru-5.2.0.tgz",
+ "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@babel/code-frame": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.28.6.tgz",
+ "integrity": "sha512-JYgintcMjRiCvS8mMECzaEn+m3PfoQiyqukOMCCVQtoJGYJw8j/8LBJEiqkHLkfwCcs74E3pbAUFNg7d9VNJ+Q==",
+ "dev": true,
+ "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.28.6",
+ "resolved": "https://registry.npmmirror.com/@babel/compat-data/-/compat-data-7.28.6.tgz",
+ "integrity": "sha512-2lfu57JtzctfIrcGMz992hyLlByuzgIk58+hhGCxjKZ3rWI82NnVLjXcaTqkI2NvlcvOskZaiZ5kjUALo3Lpxg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/core": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmmirror.com/@babel/core/-/core-7.28.6.tgz",
+ "integrity": "sha512-H3mcG6ZDLTlYfaSNi0iOKkigqMFvkTKlGUYlD8GW7nNOYRrevuA46iTypPyv+06V3fEmvvazfntkBU34L0azAw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.28.6",
+ "@babel/generator": "^7.28.6",
+ "@babel/helper-compilation-targets": "^7.28.6",
+ "@babel/helper-module-transforms": "^7.28.6",
+ "@babel/helpers": "^7.28.6",
+ "@babel/parser": "^7.28.6",
+ "@babel/template": "^7.28.6",
+ "@babel/traverse": "^7.28.6",
+ "@babel/types": "^7.28.6",
+ "@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.28.6",
+ "resolved": "https://registry.npmmirror.com/@babel/generator/-/generator-7.28.6.tgz",
+ "integrity": "sha512-lOoVRwADj8hjf7al89tvQ2a1lf53Z+7tiXMgpZJL3maQPDxh0DgLMN62B2MKUOFcoodBHLMbDM6WAbKgNy5Suw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/parser": "^7.28.6",
+ "@babel/types": "^7.28.6",
+ "@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-compilation-targets": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmmirror.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz",
+ "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==",
+ "dev": true,
+ "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-globals": {
+ "version": "7.28.0",
+ "resolved": "https://registry.npmmirror.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz",
+ "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-module-imports": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmmirror.com/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz",
+ "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==",
+ "dev": true,
+ "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.npmmirror.com/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz",
+ "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==",
+ "dev": true,
+ "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-plugin-utils": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmmirror.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz",
+ "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-string-parser": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
+ "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-identifier": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz",
+ "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-option": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmmirror.com/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz",
+ "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helpers": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmmirror.com/@babel/helpers/-/helpers-7.28.6.tgz",
+ "integrity": "sha512-xOBvwq86HHdB7WUDTfKfT/Vuxh7gElQ+Sfti2Cy6yIWNW05P8iUslOVcZ4/sKbE+/jQaukQAdz/gf3724kYdqw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/template": "^7.28.6",
+ "@babel/types": "^7.28.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/parser": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.28.6.tgz",
+ "integrity": "sha512-TeR9zWR18BvbfPmGbLampPMW+uW1NZnJlRuuHso8i87QZNq2JRF9i6RgxRqtEq+wQGsS19NNTWr2duhnE49mfQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.28.6"
+ },
+ "bin": {
+ "parser": "bin/babel-parser.js"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-react-jsx-self": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.27.1.tgz",
+ "integrity": "sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-react-jsx-source": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.27.1.tgz",
+ "integrity": "sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/template": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmmirror.com/@babel/template/-/template-7.28.6.tgz",
+ "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==",
+ "dev": true,
+ "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.28.6",
+ "resolved": "https://registry.npmmirror.com/@babel/traverse/-/traverse-7.28.6.tgz",
+ "integrity": "sha512-fgWX62k02qtjqdSNTAGxmKYY/7FSL9WAS1o2Hu5+I5m9T0yxZzr4cnrfXQ/MX0rIifthCSs6FKTlzYbJcPtMNg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.28.6",
+ "@babel/generator": "^7.28.6",
+ "@babel/helper-globals": "^7.28.0",
+ "@babel/parser": "^7.28.6",
+ "@babel/template": "^7.28.6",
+ "@babel/types": "^7.28.6",
+ "debug": "^4.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/types": {
+ "version": "7.28.6",
+ "resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.28.6.tgz",
+ "integrity": "sha512-0ZrskXVEHSWIqZM/sQZ4EV3jZJXRkio/WCxaqKZP1g//CEWEPSfeZFcms4XeKBCHU0ZKnIkdJeU/kF+eRp5lBg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-string-parser": "^7.27.1",
+ "@babel/helper-validator-identifier": "^7.28.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@dimforge/rapier3d-compat": {
+ "version": "0.12.0",
+ "resolved": "https://registry.npmmirror.com/@dimforge/rapier3d-compat/-/rapier3d-compat-0.12.0.tgz",
+ "integrity": "sha512-uekIGetywIgopfD97oDL5PfeezkFpNhwlzlaEYNOA0N6ghdsOvh/HYjSMek5Q2O1PYvRSDFcqFVJl4r4ZBwOow==",
+ "dev": true,
+ "license": "Apache-2.0"
+ },
+ "node_modules/@esbuild/aix-ppc64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz",
+ "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.25.12.tgz",
+ "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz",
+ "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-x64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.25.12.tgz",
+ "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-arm64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz",
+ "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-x64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz",
+ "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz",
+ "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-x64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz",
+ "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz",
+ "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz",
+ "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ia32": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz",
+ "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-loong64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz",
+ "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-mips64el": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz",
+ "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ppc64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz",
+ "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-riscv64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz",
+ "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-s390x": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz",
+ "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-x64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz",
+ "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-arm64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz",
+ "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-x64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz",
+ "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-arm64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz",
+ "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-x64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz",
+ "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openharmony-arm64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz",
+ "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/sunos-x64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz",
+ "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-arm64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz",
+ "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-ia32": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz",
+ "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-x64": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz",
+ "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@eslint-community/eslint-utils": {
+ "version": "4.9.1",
+ "resolved": "https://registry.npmmirror.com/@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.npmmirror.com/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.npmmirror.com/@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.1",
+ "resolved": "https://registry.npmmirror.com/@eslint/config-array/-/config-array-0.21.1.tgz",
+ "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@eslint/object-schema": "^2.1.7",
+ "debug": "^4.3.1",
+ "minimatch": "^3.1.2"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ }
+ },
+ "node_modules/@eslint/config-helpers": {
+ "version": "0.4.2",
+ "resolved": "https://registry.npmmirror.com/@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.npmmirror.com/@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.3",
+ "resolved": "https://registry.npmmirror.com/@eslint/eslintrc/-/eslintrc-3.3.3.tgz",
+ "integrity": "sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ajv": "^6.12.4",
+ "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.2",
+ "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.npmmirror.com/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.2",
+ "resolved": "https://registry.npmmirror.com/@eslint/js/-/js-9.39.2.tgz",
+ "integrity": "sha512-q1mjIoW1VX4IvSocvM/vbTiveKC4k9eLrajNEuSsmjymSDEbpGddtpfOoN7YGAqBK3NG+uqo8ia4PDTt8buCYA==",
+ "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.npmmirror.com/@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.npmmirror.com/@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.3",
+ "resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.7.3.tgz",
+ "integrity": "sha512-sGnvb5dmrJaKEZ+LDIpguvdX3bDlEllmv4/ClQ9awcmCZrlx5jQyyMWFM5kBI+EyNOCDDiKk8il0zeuX3Zlg/w==",
+ "license": "MIT",
+ "dependencies": {
+ "@floating-ui/utils": "^0.2.10"
+ }
+ },
+ "node_modules/@floating-ui/dom": {
+ "version": "1.7.4",
+ "resolved": "https://registry.npmmirror.com/@floating-ui/dom/-/dom-1.7.4.tgz",
+ "integrity": "sha512-OOchDgh4F2CchOX94cRVqhvy7b3AFb+/rQXyswmzmGakRfkMgoWVjfnLWkRirfLEfuD4ysVW16eXzwt3jHIzKA==",
+ "license": "MIT",
+ "dependencies": {
+ "@floating-ui/core": "^1.7.3",
+ "@floating-ui/utils": "^0.2.10"
+ }
+ },
+ "node_modules/@floating-ui/react-dom": {
+ "version": "2.1.6",
+ "resolved": "https://registry.npmmirror.com/@floating-ui/react-dom/-/react-dom-2.1.6.tgz",
+ "integrity": "sha512-4JX6rEatQEvlmgU80wZyq9RT96HZJa88q8hp0pBd+LrczeDI4o6uA2M+uvxngVHo4Ihr8uibXxH6+70zhAFrVw==",
+ "license": "MIT",
+ "dependencies": {
+ "@floating-ui/dom": "^1.7.4"
+ },
+ "peerDependencies": {
+ "react": ">=16.8.0",
+ "react-dom": ">=16.8.0"
+ }
+ },
+ "node_modules/@floating-ui/utils": {
+ "version": "0.2.10",
+ "resolved": "https://registry.npmmirror.com/@floating-ui/utils/-/utils-0.2.10.tgz",
+ "integrity": "sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==",
+ "license": "MIT"
+ },
+ "node_modules/@humanfs/core": {
+ "version": "0.19.1",
+ "resolved": "https://registry.npmmirror.com/@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.npmmirror.com/@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.npmmirror.com/@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.npmmirror.com/@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/@jridgewell/gen-mapping": {
+ "version": "0.3.13",
+ "resolved": "https://registry.npmmirror.com/@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.npmmirror.com/@jridgewell/remapping/-/remapping-2.3.5.tgz",
+ "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.5",
+ "@jridgewell/trace-mapping": "^0.3.24"
+ }
+ },
+ "node_modules/@jridgewell/resolve-uri": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmmirror.com/@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.npmmirror.com/@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.npmmirror.com/@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/@nodelib/fs.scandir": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmmirror.com/@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.npmmirror.com/@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.npmmirror.com/@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/@pdf-lib/standard-fonts": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmmirror.com/@pdf-lib/standard-fonts/-/standard-fonts-1.0.0.tgz",
+ "integrity": "sha512-hU30BK9IUN/su0Mn9VdlVKsWBS6GyhVfqjwl1FjZN4TxP6cCw0jP2w7V3Hf5uX7M0AZJ16vey9yE0ny7Sa59ZA==",
+ "license": "MIT",
+ "dependencies": {
+ "pako": "^1.0.6"
+ }
+ },
+ "node_modules/@pdf-lib/upng": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmmirror.com/@pdf-lib/upng/-/upng-1.0.1.tgz",
+ "integrity": "sha512-dQK2FUMQtowVP00mtIksrlZhdFXQZPC+taih1q4CvPZ5vqdxR/LKBaFg0oAfzd1GlHZXXSPdQfzQnt+ViGvEIQ==",
+ "license": "MIT",
+ "dependencies": {
+ "pako": "^1.0.10"
+ }
+ },
+ "node_modules/@radix-ui/number": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/number/-/number-1.1.1.tgz",
+ "integrity": "sha512-MkKCwxlXTgz6CFoJx3pCwn07GKp36+aZyu/u2Ln2VrA5DcdyCZkASEDBTd8x5whTQQL5CiYf4prXKLcgQdv29g==",
+ "license": "MIT"
+ },
+ "node_modules/@radix-ui/primitive": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/primitive/-/primitive-1.1.3.tgz",
+ "integrity": "sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg==",
+ "license": "MIT"
+ },
+ "node_modules/@radix-ui/react-arrow": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-arrow/-/react-arrow-1.1.7.tgz",
+ "integrity": "sha512-F+M1tLhO+mlQaOWspE8Wstg+z6PwxwRd8oQ8IXceWz92kfAmalTRf0EjrouQeo7QssEPfCn05B4Ihs1K9WQ/7w==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-primitive": "2.1.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-collapsible": {
+ "version": "1.1.12",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-collapsible/-/react-collapsible-1.1.12.tgz",
+ "integrity": "sha512-Uu+mSh4agx2ib1uIGPP4/CKNULyajb3p92LsVXmH2EHVMTfZWpll88XJ0j4W0z3f8NK1eYl1+Mf/szHPmcHzyA==",
+ "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-id": "1.1.1",
+ "@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-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-collection": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-collection/-/react-collection-1.1.7.tgz",
+ "integrity": "sha512-Fh9rGN0MoI4ZFUNyfFVNU4y9LUz93u9/0K+yLgA2bwRojxM8JU1DyvvMBabnZPBgMWREAJvU2jjVzq+LrFUglw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@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-collection/node_modules/@radix-ui/react-slot": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmmirror.com/@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-compose-refs": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmmirror.com/@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.npmmirror.com/@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-context-menu": {
+ "version": "2.2.16",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-context-menu/-/react-context-menu-2.2.16.tgz",
+ "integrity": "sha512-O8morBEW+HsVG28gYDZPTrT9UUovQUlJue5YO836tiTJhuIWBm/zQHc7j388sHWtdH/xUZurK9olD2+pcqx5ww==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-menu": "2.1.16",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "@radix-ui/react-use-controllable-state": "1.2.2"
+ },
+ "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-dialog": {
+ "version": "1.1.15",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-dialog/-/react-dialog-1.1.15.tgz",
+ "integrity": "sha512-TCglVRtzlffRNxRMEyR36DGBLJpeusFcgMVD9PZEzAKnUs1lKCgX5u9BmC2Yg+LL9MgZDugFFs1Vl+Jp4t/PGw==",
+ "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-dismissable-layer": "1.1.11",
+ "@radix-ui/react-focus-guards": "1.1.3",
+ "@radix-ui/react-focus-scope": "1.1.7",
+ "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-portal": "1.1.9",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-slot": "1.2.3",
+ "@radix-ui/react-use-controllable-state": "1.2.2",
+ "aria-hidden": "^1.2.4",
+ "react-remove-scroll": "^2.6.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-dialog/node_modules/@radix-ui/react-slot": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmmirror.com/@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-direction": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-direction/-/react-direction-1.1.1.tgz",
+ "integrity": "sha512-1UEWRX6jnOA2y4H5WczZ44gOOjTEmlqv1uNW4GAJEO5+bauCBhv8snY65Iw5/VOS/ghKN9gr2KjnLKxrsvoMVw==",
+ "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-dismissable-layer": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.11.tgz",
+ "integrity": "sha512-Nqcp+t5cTB8BinFkZgXiMJniQH0PsUt2k51FUhbdfeKvc4ACcG2uQniY/8+h1Yv6Kza4Q7lD7PQV0z0oicE0Mg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "@radix-ui/react-use-escape-keydown": "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-focus-guards": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.3.tgz",
+ "integrity": "sha512-0rFg/Rj2Q62NCm62jZw0QX7a3sz6QCQU0LpZdNrJX8byRGaGVTqbrW9jAoIAHyMQqsNpeZ81YgSizOt5WXq0Pw==",
+ "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-focus-scope": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.7.tgz",
+ "integrity": "sha512-t2ODlkXBQyn7jkl6TNaw/MtVEVvIGelJDCG41Okq/KwUsJBwQ4XVZsHAVUkK4mBv3ewiAS3PGuUWuY2BoK4ZUw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-callback-ref": "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-id": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-id/-/react-id-1.1.1.tgz",
+ "integrity": "sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg==",
+ "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-label": {
+ "version": "2.1.8",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-label/-/react-label-2.1.8.tgz",
+ "integrity": "sha512-FmXs37I6hSBVDlO4y764TNz1rLgKwjJMQ0EGte6F3Cb3f4bIuHB/iLa/8I9VKkmOy+gNHq8rql3j686ACVV21A==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-primitive": "2.1.4"
+ },
+ "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-label/node_modules/@radix-ui/react-primitive": {
+ "version": "2.1.4",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-primitive/-/react-primitive-2.1.4.tgz",
+ "integrity": "sha512-9hQc4+GNVtJAIEPEqlYqW5RiYdrr8ea5XQ0ZOnD6fgru+83kqT15mq2OCcbe8KnjRZl5vF3ks69AKz3kh1jrhg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-slot": "1.2.4"
+ },
+ "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-menu": {
+ "version": "2.1.16",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-menu/-/react-menu-2.1.16.tgz",
+ "integrity": "sha512-72F2T+PLlphrqLcAotYPp0uJMr5SjP5SL01wfEspJbru5Zs5vQaSHb4VB3ZMJPimgHHCHG7gMOeOB9H3Hdmtxg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-collection": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-direction": "1.1.1",
+ "@radix-ui/react-dismissable-layer": "1.1.11",
+ "@radix-ui/react-focus-guards": "1.1.3",
+ "@radix-ui/react-focus-scope": "1.1.7",
+ "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-popper": "1.2.8",
+ "@radix-ui/react-portal": "1.1.9",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-roving-focus": "1.1.11",
+ "@radix-ui/react-slot": "1.2.3",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "aria-hidden": "^1.2.4",
+ "react-remove-scroll": "^2.6.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-menu/node_modules/@radix-ui/react-slot": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmmirror.com/@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-popper": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-popper/-/react-popper-1.2.8.tgz",
+ "integrity": "sha512-0NJQ4LFFUuWkE7Oxf0htBKS6zLkkjBH+hM1uk7Ng705ReR8m/uelduy1DBo0PyBXPKVnBA6YBlU94MBGXrSBCw==",
+ "license": "MIT",
+ "dependencies": {
+ "@floating-ui/react-dom": "^2.0.0",
+ "@radix-ui/react-arrow": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "@radix-ui/react-use-layout-effect": "1.1.1",
+ "@radix-ui/react-use-rect": "1.1.1",
+ "@radix-ui/react-use-size": "1.1.1",
+ "@radix-ui/rect": "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-portal": {
+ "version": "1.1.9",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-portal/-/react-portal-1.1.9.tgz",
+ "integrity": "sha512-bpIxvq03if6UNwXZ+HTK71JLh4APvnXntDc6XOX8UVq4XQOVl7lwok0AvIl+b8zgCw3fSaVTZMpAPPagXbKmHQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-primitive": "2.1.3",
+ "@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-presence": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmmirror.com/@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.npmmirror.com/@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-primitive/node_modules/@radix-ui/react-slot": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmmirror.com/@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-roving-focus": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.11.tgz",
+ "integrity": "sha512-7A6S9jSgm/S+7MdtNDSb+IU859vQqJ/QAtcYQcfFC6W8RS4IxIZDldLR0xqCFZ6DCyrQLjLPsxtTNch5jVA4lA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-collection": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-direction": "1.1.1",
+ "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "@radix-ui/react-use-controllable-state": "1.2.2"
+ },
+ "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-scroll-area": {
+ "version": "1.2.10",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-scroll-area/-/react-scroll-area-1.2.10.tgz",
+ "integrity": "sha512-tAXIa1g3sM5CGpVT0uIbUx/U3Gs5N8T52IICuCtObaos1S8fzsrPXG5WObkQN3S6NVl6wKgPhAIiBGbWnvc97A==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/number": "1.1.1",
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-direction": "1.1.1",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "@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-select": {
+ "version": "2.2.6",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-select/-/react-select-2.2.6.tgz",
+ "integrity": "sha512-I30RydO+bnn2PQztvo25tswPH+wFBjehVGtmagkU78yMdwTwVf12wnAOF+AeP8S2N8xD+5UPbGhkUfPyvT+mwQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/number": "1.1.1",
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-collection": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-direction": "1.1.1",
+ "@radix-ui/react-dismissable-layer": "1.1.11",
+ "@radix-ui/react-focus-guards": "1.1.3",
+ "@radix-ui/react-focus-scope": "1.1.7",
+ "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-popper": "1.2.8",
+ "@radix-ui/react-portal": "1.1.9",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-slot": "1.2.3",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "@radix-ui/react-use-controllable-state": "1.2.2",
+ "@radix-ui/react-use-layout-effect": "1.1.1",
+ "@radix-ui/react-use-previous": "1.1.1",
+ "@radix-ui/react-visually-hidden": "1.2.3",
+ "aria-hidden": "^1.2.4",
+ "react-remove-scroll": "^2.6.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-select/node_modules/@radix-ui/react-slot": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmmirror.com/@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-slot": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-slot/-/react-slot-1.2.4.tgz",
+ "integrity": "sha512-Jl+bCv8HxKnlTLVrcDE8zTMJ09R9/ukw4qBs/oZClOfoQk/cOTbDn+NceXfV7j09YPVQUryJPHurafcSg6EVKA==",
+ "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-tooltip": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-tooltip/-/react-tooltip-1.2.8.tgz",
+ "integrity": "sha512-tY7sVt1yL9ozIxvmbtN5qtmH2krXcBCfjEiCgKGLqunJHvgvZG2Pcl2oQ3kbcZARb1BGEHdkLzcYGO8ynVlieg==",
+ "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-dismissable-layer": "1.1.11",
+ "@radix-ui/react-id": "1.1.1",
+ "@radix-ui/react-popper": "1.2.8",
+ "@radix-ui/react-portal": "1.1.9",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-slot": "1.2.3",
+ "@radix-ui/react-use-controllable-state": "1.2.2",
+ "@radix-ui/react-visually-hidden": "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-tooltip/node_modules/@radix-ui/react-slot": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmmirror.com/@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-callback-ref": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.1.tgz",
+ "integrity": "sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg==",
+ "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-controllable-state": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmmirror.com/@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.npmmirror.com/@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-escape-keydown": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.1.tgz",
+ "integrity": "sha512-Il0+boE7w/XebUHyBjroE+DbByORGR9KKmITzbR7MyQ4akpORYP/ZmbhAr0DG7RmmBqoOnZdy2QlvajJ2QA59g==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-callback-ref": "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.npmmirror.com/@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.npmmirror.com/@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-rect": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-use-rect/-/react-use-rect-1.1.1.tgz",
+ "integrity": "sha512-QTYuDesS0VtuHNNvMh+CjlKJ4LJickCMUAqjlE3+j8w+RlRpwyX3apEQKGFzbZGdo7XNG1tXa+bQqIE7HIXT2w==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/rect": "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-size": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/@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/@radix-ui/react-visually-hidden": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.2.3.tgz",
+ "integrity": "sha512-pzJq12tEaaIhqjbzpCuv/OypJY/BPavOofm+dbab+MHLajy277+1lLm6JFcGgF5eskJ6mquGirhXY2GD/8u8Ug==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-primitive": "2.1.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/rect": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/@radix-ui/rect/-/rect-1.1.1.tgz",
+ "integrity": "sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw==",
+ "license": "MIT"
+ },
+ "node_modules/@rolldown/pluginutils": {
+ "version": "1.0.0-beta.27",
+ "resolved": "https://registry.npmmirror.com/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz",
+ "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@rollup/rollup-android-arm-eabi": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.55.3.tgz",
+ "integrity": "sha512-qyX8+93kK/7R5BEXPC2PjUt0+fS/VO2BVHjEHyIEWiYn88rcRBHmdLgoJjktBltgAf+NY7RfCGB1SoyKS/p9kg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-android-arm64": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.55.3.tgz",
+ "integrity": "sha512-6sHrL42bjt5dHQzJ12Q4vMKfN+kUnZ0atHHnv4V0Wd9JMTk7FDzSY35+7qbz3ypQYMBPANbpGK7JpnWNnhGt8g==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-arm64": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.55.3.tgz",
+ "integrity": "sha512-1ht2SpGIjEl2igJ9AbNpPIKzb1B5goXOcmtD0RFxnwNuMxqkR6AUaaErZz+4o+FKmzxcSNBOLrzsICZVNYa1Rw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-x64": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.55.3.tgz",
+ "integrity": "sha512-FYZ4iVunXxtT+CZqQoPVwPhH7549e/Gy7PIRRtq4t5f/vt54pX6eG9ebttRH6QSH7r/zxAFA4EZGlQ0h0FvXiA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-freebsd-arm64": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.55.3.tgz",
+ "integrity": "sha512-M/mwDCJ4wLsIgyxv2Lj7Len+UMHd4zAXu4GQ2UaCdksStglWhP61U3uowkaYBQBhVoNpwx5Hputo8eSqM7K82Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-freebsd-x64": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.55.3.tgz",
+ "integrity": "sha512-5jZT2c7jBCrMegKYTYTpni8mg8y3uY8gzeq2ndFOANwNuC/xJbVAoGKR9LhMDA0H3nIhvaqUoBEuJoICBudFrA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.55.3.tgz",
+ "integrity": "sha512-YeGUhkN1oA+iSPzzhEjVPS29YbViOr8s4lSsFaZKLHswgqP911xx25fPOyE9+khmN6W4VeM0aevbDp4kkEoHiA==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-musleabihf": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.55.3.tgz",
+ "integrity": "sha512-eo0iOIOvcAlWB3Z3eh8pVM8hZ0oVkK3AjEM9nSrkSug2l15qHzF3TOwT0747omI6+CJJvl7drwZepT+re6Fy/w==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-gnu": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.55.3.tgz",
+ "integrity": "sha512-DJay3ep76bKUDImmn//W5SvpjRN5LmK/ntWyeJs/dcnwiiHESd3N4uteK9FDLf0S0W8E6Y0sVRXpOCoQclQqNg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-musl": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.55.3.tgz",
+ "integrity": "sha512-BKKWQkY2WgJ5MC/ayvIJTHjy0JUGb5efaHCUiG/39sSUvAYRBaO3+/EK0AZT1RF3pSj86O24GLLik9mAYu0IJg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-loong64-gnu": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.55.3.tgz",
+ "integrity": "sha512-Q9nVlWtKAG7ISW80OiZGxTr6rYtyDSkauHUtvkQI6TNOJjFvpj4gcH+KaJihqYInnAzEEUetPQubRwHef4exVg==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-loong64-musl": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.55.3.tgz",
+ "integrity": "sha512-2H5LmhzrpC4fFRNwknzmmTvvyJPHwESoJgyReXeFoYYuIDfBhP29TEXOkCJE/KxHi27mj7wDUClNq78ue3QEBQ==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-ppc64-gnu": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.55.3.tgz",
+ "integrity": "sha512-9S542V0ie9LCTznPYlvaeySwBeIEa7rDBgLHKZ5S9DBgcqdJYburabm8TqiqG6mrdTzfV5uttQRHcbKff9lWtA==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-ppc64-musl": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.55.3.tgz",
+ "integrity": "sha512-ukxw+YH3XXpcezLgbJeasgxyTbdpnNAkrIlFGDl7t+pgCxZ89/6n1a+MxlY7CegU+nDgrgdqDelPRNQ/47zs0g==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-riscv64-gnu": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.55.3.tgz",
+ "integrity": "sha512-Iauw9UsTTvlF++FhghFJjqYxyXdggXsOqGpFBylaRopVpcbfyIIsNvkf9oGwfgIcf57z3m8+/oSYTo6HutBFNw==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-riscv64-musl": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.55.3.tgz",
+ "integrity": "sha512-3OqKAHSEQXKdq9mQ4eajqUgNIK27VZPW3I26EP8miIzuKzCJ3aW3oEn2pzF+4/Hj/Moc0YDsOtBgT5bZ56/vcA==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-s390x-gnu": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.55.3.tgz",
+ "integrity": "sha512-0CM8dSVzVIaqMcXIFej8zZrSFLnGrAE8qlNbbHfTw1EEPnFTg1U1ekI0JdzjPyzSfUsHWtodilQQG/RA55berA==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-gnu": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.55.3.tgz",
+ "integrity": "sha512-+fgJE12FZMIgBaKIAGd45rxf+5ftcycANJRWk8Vz0NnMTM5rADPGuRFTYar+Mqs560xuART7XsX2lSACa1iOmQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-musl": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.55.3.tgz",
+ "integrity": "sha512-tMD7NnbAolWPzQlJQJjVFh/fNH3K/KnA7K8gv2dJWCwwnaK6DFCYST1QXYWfu5V0cDwarWC8Sf/cfMHniNq21A==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-openbsd-x64": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.55.3.tgz",
+ "integrity": "sha512-u5KsqxOxjEeIbn7bUK1MPM34jrnPwjeqgyin4/N6e/KzXKfpE9Mi0nCxcQjaM9lLmPcHmn/xx1yOjgTMtu1jWQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-openharmony-arm64": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.55.3.tgz",
+ "integrity": "sha512-vo54aXwjpTtsAnb3ca7Yxs9t2INZg7QdXN/7yaoG7nPGbOBXYXQY41Km+S1Ov26vzOAzLcAjmMdjyEqS1JkVhw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-arm64-msvc": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.55.3.tgz",
+ "integrity": "sha512-HI+PIVZ+m+9AgpnY3pt6rinUdRYrGHvmVdsNQ4odNqQ/eRF78DVpMR7mOq7nW06QxpczibwBmeQzB68wJ+4W4A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-ia32-msvc": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.55.3.tgz",
+ "integrity": "sha512-vRByotbdMo3Wdi+8oC2nVxtc3RkkFKrGaok+a62AT8lz/YBuQjaVYAS5Zcs3tPzW43Vsf9J0wehJbUY5xRSekA==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-x64-gnu": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.55.3.tgz",
+ "integrity": "sha512-POZHq7UeuzMJljC5NjKi8vKMFN6/5EOqcX1yGntNLp7rUTpBAXQ1hW8kWPFxYLv07QMcNM75xqVLGPWQq6TKFA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-x64-msvc": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.55.3.tgz",
+ "integrity": "sha512-aPFONczE4fUFKNXszdvnd2GqKEYQdV5oEsIbKPujJmWlCI9zEsv1Otig8RKK+X9bed9gFUN6LAeN4ZcNuu4zjg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@tailwindcss/typography": {
+ "version": "0.5.19",
+ "resolved": "https://registry.npmmirror.com/@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.npmmirror.com/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/@tweenjs/tween.js": {
+ "version": "23.1.3",
+ "resolved": "https://registry.npmmirror.com/@tweenjs/tween.js/-/tween.js-23.1.3.tgz",
+ "integrity": "sha512-vJmvvwFxYuGnF2axRtPYocag6Clbb5YS7kLL+SO/TeVFzHqDIWrNKYtcsPMibjDx9O+bu+psAy9NKfWklassUA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/babel__core": {
+ "version": "7.20.5",
+ "resolved": "https://registry.npmmirror.com/@types/babel__core/-/babel__core-7.20.5.tgz",
+ "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/parser": "^7.20.7",
+ "@babel/types": "^7.20.7",
+ "@types/babel__generator": "*",
+ "@types/babel__template": "*",
+ "@types/babel__traverse": "*"
+ }
+ },
+ "node_modules/@types/babel__generator": {
+ "version": "7.27.0",
+ "resolved": "https://registry.npmmirror.com/@types/babel__generator/-/babel__generator-7.27.0.tgz",
+ "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.0.0"
+ }
+ },
+ "node_modules/@types/babel__template": {
+ "version": "7.4.4",
+ "resolved": "https://registry.npmmirror.com/@types/babel__template/-/babel__template-7.4.4.tgz",
+ "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/parser": "^7.1.0",
+ "@babel/types": "^7.0.0"
+ }
+ },
+ "node_modules/@types/babel__traverse": {
+ "version": "7.28.0",
+ "resolved": "https://registry.npmmirror.com/@types/babel__traverse/-/babel__traverse-7.28.0.tgz",
+ "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.28.2"
+ }
+ },
+ "node_modules/@types/debug": {
+ "version": "4.1.12",
+ "resolved": "https://registry.npmmirror.com/@types/debug/-/debug-4.1.12.tgz",
+ "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/ms": "*"
+ }
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.8.tgz",
+ "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
+ "license": "MIT"
+ },
+ "node_modules/@types/estree-jsx": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmmirror.com/@types/estree-jsx/-/estree-jsx-1.0.5.tgz",
+ "integrity": "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "*"
+ }
+ },
+ "node_modules/@types/hast": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmmirror.com/@types/hast/-/hast-3.0.4.tgz",
+ "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "*"
+ }
+ },
+ "node_modules/@types/json-schema": {
+ "version": "7.0.15",
+ "resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.15.tgz",
+ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/mdast": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmmirror.com/@types/mdast/-/mdast-4.0.4.tgz",
+ "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "*"
+ }
+ },
+ "node_modules/@types/ms": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmmirror.com/@types/ms/-/ms-2.1.0.tgz",
+ "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==",
+ "license": "MIT"
+ },
+ "node_modules/@types/node": {
+ "version": "22.19.7",
+ "resolved": "https://registry.npmmirror.com/@types/node/-/node-22.19.7.tgz",
+ "integrity": "sha512-MciR4AKGHWl7xwxkBa6xUGxQJ4VBOmPTF7sL+iGzuahOFaO0jHCsuEfS80pan1ef4gWId1oWOweIhrDEYLuaOw==",
+ "license": "MIT",
+ "dependencies": {
+ "undici-types": "~6.21.0"
+ }
+ },
+ "node_modules/@types/prismjs": {
+ "version": "1.26.5",
+ "resolved": "https://registry.npmmirror.com/@types/prismjs/-/prismjs-1.26.5.tgz",
+ "integrity": "sha512-AUZTa7hQ2KY5L7AmtSiqxlhWxb4ina0yd8hNbl4TWuqnv/pFP0nDMb3YrfSBf4hJVGLh2YEIBfKaBW/9UEl6IQ==",
+ "license": "MIT"
+ },
+ "node_modules/@types/prop-types": {
+ "version": "15.7.15",
+ "resolved": "https://registry.npmmirror.com/@types/prop-types/-/prop-types-15.7.15.tgz",
+ "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==",
+ "license": "MIT"
+ },
+ "node_modules/@types/react": {
+ "version": "18.3.27",
+ "resolved": "https://registry.npmmirror.com/@types/react/-/react-18.3.27.tgz",
+ "integrity": "sha512-cisd7gxkzjBKU2GgdYrTdtQx1SORymWyaAFhaxQPK9bYO9ot3Y5OikQRvY0VYQtvwjeQnizCINJAenh/V7MK2w==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/prop-types": "*",
+ "csstype": "^3.2.2"
+ }
+ },
+ "node_modules/@types/react-dom": {
+ "version": "18.3.7",
+ "resolved": "https://registry.npmmirror.com/@types/react-dom/-/react-dom-18.3.7.tgz",
+ "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==",
+ "devOptional": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "^18.0.0"
+ }
+ },
+ "node_modules/@types/stats.js": {
+ "version": "0.17.4",
+ "resolved": "https://registry.npmmirror.com/@types/stats.js/-/stats.js-0.17.4.tgz",
+ "integrity": "sha512-jIBvWWShCvlBqBNIZt0KAshWpvSjhkwkEu4ZUcASoAvhmrgAUI2t1dXrjSL4xXVLB4FznPrIsX3nKXFl/Dt4vA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/three": {
+ "version": "0.182.0",
+ "resolved": "https://registry.npmmirror.com/@types/three/-/three-0.182.0.tgz",
+ "integrity": "sha512-WByN9V3Sbwbe2OkWuSGyoqQO8Du6yhYaXtXLoA5FkKTUJorZ+yOHBZ35zUUPQXlAKABZmbYp5oAqpA4RBjtJ/Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@dimforge/rapier3d-compat": "~0.12.0",
+ "@tweenjs/tween.js": "~23.1.3",
+ "@types/stats.js": "*",
+ "@types/webxr": ">=0.5.17",
+ "@webgpu/types": "*",
+ "fflate": "~0.8.2",
+ "meshoptimizer": "~0.22.0"
+ }
+ },
+ "node_modules/@types/unist": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmmirror.com/@types/unist/-/unist-3.0.3.tgz",
+ "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==",
+ "license": "MIT"
+ },
+ "node_modules/@types/webxr": {
+ "version": "0.5.24",
+ "resolved": "https://registry.npmmirror.com/@types/webxr/-/webxr-0.5.24.tgz",
+ "integrity": "sha512-h8fgEd/DpoS9CBrjEQXR+dIDraopAEfu4wYVNY2tEPwk60stPWhvZMf4Foo5FakuQ7HFZoa8WceaWFervK2Ovg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@typescript-eslint/eslint-plugin": {
+ "version": "8.53.1",
+ "resolved": "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.53.1.tgz",
+ "integrity": "sha512-cFYYFZ+oQFi6hUnBTbLRXfTJiaQtYE3t4O692agbBl+2Zy+eqSKWtPjhPXJu1G7j4RLjKgeJPDdq3EqOwmX5Ag==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@eslint-community/regexpp": "^4.12.2",
+ "@typescript-eslint/scope-manager": "8.53.1",
+ "@typescript-eslint/type-utils": "8.53.1",
+ "@typescript-eslint/utils": "8.53.1",
+ "@typescript-eslint/visitor-keys": "8.53.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.53.1",
+ "eslint": "^8.57.0 || ^9.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.npmmirror.com/ignore/-/ignore-7.0.5.tgz",
+ "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/@typescript-eslint/parser": {
+ "version": "8.53.1",
+ "resolved": "https://registry.npmmirror.com/@typescript-eslint/parser/-/parser-8.53.1.tgz",
+ "integrity": "sha512-nm3cvFN9SqZGXjmw5bZ6cGmvJSyJPn0wU9gHAZZHDnZl2wF9PhHv78Xf06E0MaNk4zLVHL8hb2/c32XvyJOLQg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/scope-manager": "8.53.1",
+ "@typescript-eslint/types": "8.53.1",
+ "@typescript-eslint/typescript-estree": "8.53.1",
+ "@typescript-eslint/visitor-keys": "8.53.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",
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/project-service": {
+ "version": "8.53.1",
+ "resolved": "https://registry.npmmirror.com/@typescript-eslint/project-service/-/project-service-8.53.1.tgz",
+ "integrity": "sha512-WYC4FB5Ra0xidsmlPb+1SsnaSKPmS3gsjIARwbEkHkoWloQmuzcfypljaJcR78uyLA1h8sHdWWPHSLDI+MtNog==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/tsconfig-utils": "^8.53.1",
+ "@typescript-eslint/types": "^8.53.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.53.1",
+ "resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-8.53.1.tgz",
+ "integrity": "sha512-Lu23yw1uJMFY8cUeq7JlrizAgeQvWugNQzJp8C3x8Eo5Jw5Q2ykMdiiTB9vBVOOUBysMzmRRmUfwFrZuI2C4SQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/types": "8.53.1",
+ "@typescript-eslint/visitor-keys": "8.53.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.53.1",
+ "resolved": "https://registry.npmmirror.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.53.1.tgz",
+ "integrity": "sha512-qfvLXS6F6b1y43pnf0pPbXJ+YoXIC7HKg0UGZ27uMIemKMKA6XH2DTxsEDdpdN29D+vHV07x/pnlPNVLhdhWiA==",
+ "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.53.1",
+ "resolved": "https://registry.npmmirror.com/@typescript-eslint/type-utils/-/type-utils-8.53.1.tgz",
+ "integrity": "sha512-MOrdtNvyhy0rHyv0ENzub1d4wQYKb2NmIqG7qEqPWFW7Mpy2jzFC3pQ2yKDvirZB7jypm5uGjF2Qqs6OIqu47w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/types": "8.53.1",
+ "@typescript-eslint/typescript-estree": "8.53.1",
+ "@typescript-eslint/utils": "8.53.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",
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/types": {
+ "version": "8.53.1",
+ "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-8.53.1.tgz",
+ "integrity": "sha512-jr/swrr2aRmUAUjW5/zQHbMaui//vQlsZcJKijZf3M26bnmLj8LyZUpj8/Rd6uzaek06OWsqdofN/Thenm5O8A==",
+ "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.53.1",
+ "resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.53.1.tgz",
+ "integrity": "sha512-RGlVipGhQAG4GxV1s34O91cxQ/vWiHJTDHbXRr0li2q/BGg3RR/7NM8QDWgkEgrwQYCvmJV9ichIwyoKCQ+DTg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/project-service": "8.53.1",
+ "@typescript-eslint/tsconfig-utils": "8.53.1",
+ "@typescript-eslint/types": "8.53.1",
+ "@typescript-eslint/visitor-keys": "8.53.1",
+ "debug": "^4.4.3",
+ "minimatch": "^9.0.5",
+ "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/brace-expansion": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.2.tgz",
+ "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
+ "version": "9.0.5",
+ "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-9.0.5.tgz",
+ "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": {
+ "version": "7.7.3",
+ "resolved": "https://registry.npmmirror.com/semver/-/semver-7.7.3.tgz",
+ "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@typescript-eslint/utils": {
+ "version": "8.53.1",
+ "resolved": "https://registry.npmmirror.com/@typescript-eslint/utils/-/utils-8.53.1.tgz",
+ "integrity": "sha512-c4bMvGVWW4hv6JmDUEG7fSYlWOl3II2I4ylt0NM+seinYQlZMQIaKaXIIVJWt9Ofh6whrpM+EdDQXKXjNovvrg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.9.1",
+ "@typescript-eslint/scope-manager": "8.53.1",
+ "@typescript-eslint/types": "8.53.1",
+ "@typescript-eslint/typescript-estree": "8.53.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",
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/visitor-keys": {
+ "version": "8.53.1",
+ "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.53.1.tgz",
+ "integrity": "sha512-oy+wV7xDKFPRyNggmXuZQSBzvoLnpmJs+GhzRhPjrxl2b/jIlyjVokzm47CZCDUdXKr2zd7ZLodPfOBpOPyPlg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/types": "8.53.1",
+ "eslint-visitor-keys": "^4.2.1"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@ungap/structured-clone": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmmirror.com/@ungap/structured-clone/-/structured-clone-1.3.0.tgz",
+ "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==",
+ "license": "ISC"
+ },
+ "node_modules/@vitejs/plugin-react": {
+ "version": "4.7.0",
+ "resolved": "https://registry.npmmirror.com/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz",
+ "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/core": "^7.28.0",
+ "@babel/plugin-transform-react-jsx-self": "^7.27.1",
+ "@babel/plugin-transform-react-jsx-source": "^7.27.1",
+ "@rolldown/pluginutils": "1.0.0-beta.27",
+ "@types/babel__core": "^7.20.5",
+ "react-refresh": "^0.17.0"
+ },
+ "engines": {
+ "node": "^14.18.0 || >=16.0.0"
+ },
+ "peerDependencies": {
+ "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0"
+ }
+ },
+ "node_modules/@webgpu/types": {
+ "version": "0.1.69",
+ "resolved": "https://registry.npmmirror.com/@webgpu/types/-/types-0.1.69.tgz",
+ "integrity": "sha512-RPmm6kgRbI8e98zSD3RVACvnuktIja5+yLgDAkTmxLr90BEwdTXRQWNLF3ETTTyH/8mKhznZuN5AveXYFEsMGQ==",
+ "dev": true,
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/acorn": {
+ "version": "8.15.0",
+ "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.15.0.tgz",
+ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/acorn-jsx": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmmirror.com/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/ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "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-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/any-promise": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmmirror.com/any-promise/-/any-promise-1.3.0.tgz",
+ "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==",
+ "license": "MIT"
+ },
+ "node_modules/anymatch": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmmirror.com/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/arg": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmmirror.com/arg/-/arg-5.0.2.tgz",
+ "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==",
+ "license": "MIT"
+ },
+ "node_modules/argparse": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz",
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
+ "dev": true,
+ "license": "Python-2.0"
+ },
+ "node_modules/aria-hidden": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmmirror.com/aria-hidden/-/aria-hidden-1.2.6.tgz",
+ "integrity": "sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/autoprefixer": {
+ "version": "10.4.23",
+ "resolved": "https://registry.npmmirror.com/autoprefixer/-/autoprefixer-10.4.23.tgz",
+ "integrity": "sha512-YYTXSFulfwytnjAPlw8QHncHJmlvFKtczb8InXaAx9Q0LbfDnfEYDE55omerIJKihhmU61Ft+cAOSzQVaBUmeA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/autoprefixer"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "browserslist": "^4.28.1",
+ "caniuse-lite": "^1.0.30001760",
+ "fraction.js": "^5.3.4",
+ "picocolors": "^1.1.1",
+ "postcss-value-parser": "^4.2.0"
+ },
+ "bin": {
+ "autoprefixer": "bin/autoprefixer"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ },
+ "peerDependencies": {
+ "postcss": "^8.1.0"
+ }
+ },
+ "node_modules/babel-plugin-react-dev-locator": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmmirror.com/babel-plugin-react-dev-locator/-/babel-plugin-react-dev-locator-1.0.6.tgz",
+ "integrity": "sha512-XWi+6x6e4NvVwvOqwitci/BZU1xbNfNuL94kfT4kWfP/d9p3RYRVOrogs1Z1otlYfQUO07cy/20z8eY9blFSpw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/core": "^7.27.1",
+ "@babel/generator": "^7.27.1",
+ "@babel/parser": "^7.27.1",
+ "@babel/traverse": "^7.27.1",
+ "@babel/types": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
+ "node_modules/bail": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmmirror.com/bail/-/bail-2.0.2.tgz",
+ "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/baseline-browser-mapping": {
+ "version": "2.9.16",
+ "resolved": "https://registry.npmmirror.com/baseline-browser-mapping/-/baseline-browser-mapping-2.9.16.tgz",
+ "integrity": "sha512-KeUZdBuxngy825i8xvzaK1Ncnkx0tBmb3k8DkEuqjKRkmtvNTjey2ZsNeh8Dw4lfKvbCOu9oeNx2TKm2vHqcRw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "baseline-browser-mapping": "dist/cli.js"
+ }
+ },
+ "node_modules/binary-extensions": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmmirror.com/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/brace-expansion": {
+ "version": "1.1.12",
+ "resolved": "https://registry.npmmirror.com/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.npmmirror.com/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.npmmirror.com/browserslist/-/browserslist-4.28.1.tgz",
+ "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==",
+ "dev": true,
+ "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/callsites": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmmirror.com/callsites/-/callsites-3.1.0.tgz",
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/camelcase-css": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmmirror.com/camelcase-css/-/camelcase-css-2.0.1.tgz",
+ "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/caniuse-lite": {
+ "version": "1.0.30001765",
+ "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001765.tgz",
+ "integrity": "sha512-LWcNtSyZrakjECqmpP4qdg0MMGdN368D7X8XvvAqOcqMv0RxnlqVKZl2V6/mBR68oYMxOZPLw/gO7DuisMHUvQ==",
+ "dev": true,
+ "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",
+ "resolved": "https://registry.npmmirror.com/ccount/-/ccount-2.0.1.tgz",
+ "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmmirror.com/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/character-entities": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmmirror.com/character-entities/-/character-entities-2.0.2.tgz",
+ "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/character-entities-html4": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmmirror.com/character-entities-html4/-/character-entities-html4-2.1.0.tgz",
+ "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/character-entities-legacy": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmmirror.com/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz",
+ "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/character-reference-invalid": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmmirror.com/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz",
+ "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/chokidar": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmmirror.com/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/chokidar/node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmmirror.com/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/class-variance-authority": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmmirror.com/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/clsx": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmmirror.com/clsx/-/clsx-2.1.1.tgz",
+ "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/comma-separated-tokens": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmmirror.com/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz",
+ "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/commander": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmmirror.com/commander/-/commander-4.1.1.tgz",
+ "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/convert-source-map": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/convert-source-map/-/convert-source-map-2.0.0.tgz",
+ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/cookie": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/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/core-util-is": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz",
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
+ "license": "MIT"
+ },
+ "node_modules/cross-spawn": {
+ "version": "7.0.6",
+ "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-7.0.6.tgz",
+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
+ "dev": true,
+ "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.npmmirror.com/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.npmmirror.com/csstype/-/csstype-3.2.3.tgz",
+ "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
+ "license": "MIT"
+ },
+ "node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmmirror.com/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/decode-named-character-reference": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmmirror.com/decode-named-character-reference/-/decode-named-character-reference-1.3.0.tgz",
+ "integrity": "sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q==",
+ "license": "MIT",
+ "dependencies": {
+ "character-entities": "^2.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/deep-is": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmmirror.com/deep-is/-/deep-is-0.1.4.tgz",
+ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/dequal": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmmirror.com/dequal/-/dequal-2.0.3.tgz",
+ "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/detect-node-es": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmmirror.com/detect-node-es/-/detect-node-es-1.1.0.tgz",
+ "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==",
+ "license": "MIT"
+ },
+ "node_modules/devlop": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmmirror.com/devlop/-/devlop-1.1.0.tgz",
+ "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==",
+ "license": "MIT",
+ "dependencies": {
+ "dequal": "^2.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/didyoumean": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmmirror.com/didyoumean/-/didyoumean-1.2.2.tgz",
+ "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==",
+ "license": "Apache-2.0"
+ },
+ "node_modules/dlv": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmmirror.com/dlv/-/dlv-1.1.3.tgz",
+ "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==",
+ "license": "MIT"
+ },
+ "node_modules/electron-to-chromium": {
+ "version": "1.5.267",
+ "resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.5.267.tgz",
+ "integrity": "sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/esbuild": {
+ "version": "0.25.12",
+ "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.25.12.tgz",
+ "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.25.12",
+ "@esbuild/android-arm": "0.25.12",
+ "@esbuild/android-arm64": "0.25.12",
+ "@esbuild/android-x64": "0.25.12",
+ "@esbuild/darwin-arm64": "0.25.12",
+ "@esbuild/darwin-x64": "0.25.12",
+ "@esbuild/freebsd-arm64": "0.25.12",
+ "@esbuild/freebsd-x64": "0.25.12",
+ "@esbuild/linux-arm": "0.25.12",
+ "@esbuild/linux-arm64": "0.25.12",
+ "@esbuild/linux-ia32": "0.25.12",
+ "@esbuild/linux-loong64": "0.25.12",
+ "@esbuild/linux-mips64el": "0.25.12",
+ "@esbuild/linux-ppc64": "0.25.12",
+ "@esbuild/linux-riscv64": "0.25.12",
+ "@esbuild/linux-s390x": "0.25.12",
+ "@esbuild/linux-x64": "0.25.12",
+ "@esbuild/netbsd-arm64": "0.25.12",
+ "@esbuild/netbsd-x64": "0.25.12",
+ "@esbuild/openbsd-arm64": "0.25.12",
+ "@esbuild/openbsd-x64": "0.25.12",
+ "@esbuild/openharmony-arm64": "0.25.12",
+ "@esbuild/sunos-x64": "0.25.12",
+ "@esbuild/win32-arm64": "0.25.12",
+ "@esbuild/win32-ia32": "0.25.12",
+ "@esbuild/win32-x64": "0.25.12"
+ }
+ },
+ "node_modules/escalade": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmmirror.com/escalade/-/escalade-3.2.0.tgz",
+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmmirror.com/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.2",
+ "resolved": "https://registry.npmmirror.com/eslint/-/eslint-9.39.2.tgz",
+ "integrity": "sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.8.0",
+ "@eslint-community/regexpp": "^4.12.1",
+ "@eslint/config-array": "^0.21.1",
+ "@eslint/config-helpers": "^0.4.2",
+ "@eslint/core": "^0.17.0",
+ "@eslint/eslintrc": "^3.3.1",
+ "@eslint/js": "9.39.2",
+ "@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.12.4",
+ "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.2",
+ "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-plugin-react-hooks": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmmirror.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.2.0.tgz",
+ "integrity": "sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "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-refresh": {
+ "version": "0.4.26",
+ "resolved": "https://registry.npmmirror.com/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.26.tgz",
+ "integrity": "sha512-1RETEylht2O6FM/MvgnyvT+8K21wLqDNg4qD51Zj3guhjt433XbnnkVttHMyaVyAFD03QSV4LPS5iE3VQmO7XQ==",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "eslint": ">=8.40"
+ }
+ },
+ "node_modules/eslint-scope": {
+ "version": "8.4.0",
+ "resolved": "https://registry.npmmirror.com/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.npmmirror.com/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/espree": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmmirror.com/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/esquery": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmmirror.com/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.npmmirror.com/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.npmmirror.com/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",
+ "resolved": "https://registry.npmmirror.com/estree-util-is-identifier-name/-/estree-util-is-identifier-name-3.0.0.tgz",
+ "integrity": "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmmirror.com/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/extend": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmmirror.com/extend/-/extend-3.0.2.tgz",
+ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
+ "license": "MIT"
+ },
+ "node_modules/fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/fast-glob": {
+ "version": "3.3.3",
+ "resolved": "https://registry.npmmirror.com/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-glob/node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmmirror.com/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/fast-json-stable-stringify": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmmirror.com/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.npmmirror.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/fastq": {
+ "version": "1.20.1",
+ "resolved": "https://registry.npmmirror.com/fastq/-/fastq-1.20.1.tgz",
+ "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==",
+ "license": "ISC",
+ "dependencies": {
+ "reusify": "^1.0.4"
+ }
+ },
+ "node_modules/fflate": {
+ "version": "0.8.2",
+ "resolved": "https://registry.npmmirror.com/fflate/-/fflate-0.8.2.tgz",
+ "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/file-entry-cache": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmmirror.com/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.npmmirror.com/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/find-up": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmmirror.com/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.npmmirror.com/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.3.3",
+ "resolved": "https://registry.npmmirror.com/flatted/-/flatted-3.3.3.tgz",
+ "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/fraction.js": {
+ "version": "5.3.4",
+ "resolved": "https://registry.npmmirror.com/fraction.js/-/fraction.js-5.3.4.tgz",
+ "integrity": "sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/rawify"
+ }
+ },
+ "node_modules/framer-motion": {
+ "version": "12.28.1",
+ "resolved": "https://registry.npmmirror.com/framer-motion/-/framer-motion-12.28.1.tgz",
+ "integrity": "sha512-72GkO7DS4FfcSjf26wx0v+rzkW8Fhn4Djh04aDbuEg7NYG8X8MhJZc6/5weG/YeEgIP+fCo8FS2y1HnXH8k8fQ==",
+ "license": "MIT",
+ "dependencies": {
+ "motion-dom": "^12.28.1",
+ "motion-utils": "^12.27.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/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmmirror.com/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.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/gensync": {
+ "version": "1.0.0-beta.2",
+ "resolved": "https://registry.npmmirror.com/gensync/-/gensync-1.0.0-beta.2.tgz",
+ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/get-nonce": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmmirror.com/get-nonce/-/get-nonce-1.0.1.tgz",
+ "integrity": "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/glob-parent": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-6.0.2.tgz",
+ "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
+ "license": "ISC",
+ "dependencies": {
+ "is-glob": "^4.0.3"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/globals": {
+ "version": "16.5.0",
+ "resolved": "https://registry.npmmirror.com/globals/-/globals-16.5.0.tgz",
+ "integrity": "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/globrex": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmmirror.com/globrex/-/globrex-0.1.2.tgz",
+ "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/hasown": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmmirror.com/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-jsx-runtime": {
+ "version": "2.3.6",
+ "resolved": "https://registry.npmmirror.com/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.6.tgz",
+ "integrity": "sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz",
+ "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/html-url-attributes": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmmirror.com/html-url-attributes/-/html-url-attributes-3.0.1.tgz",
+ "integrity": "sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/https": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmmirror.com/https/-/https-1.0.0.tgz",
+ "integrity": "sha512-4EC57ddXrkaF0x83Oj8sM6SLQHAWXw90Skqu2M4AEWENZ3F02dFJE/GARA8igO79tcgYqGrD7ae4f5L3um2lgg==",
+ "license": "ISC"
+ },
+ "node_modules/ignore": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmmirror.com/ignore/-/ignore-5.3.2.tgz",
+ "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/image-size": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmmirror.com/image-size/-/image-size-1.2.1.tgz",
+ "integrity": "sha512-rH+46sQJ2dlwfjfhCyNx5thzrv+dtmBIhPHk0zgRUukHzZ/kRueTJXoYYsclBaKcSMBWuGbOFXtioLpzTb5euw==",
+ "license": "MIT",
+ "dependencies": {
+ "queue": "6.0.2"
+ },
+ "bin": {
+ "image-size": "bin/image-size.js"
+ },
+ "engines": {
+ "node": ">=16.x"
+ }
+ },
+ "node_modules/immediate": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmmirror.com/immediate/-/immediate-3.0.6.tgz",
+ "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==",
+ "license": "MIT"
+ },
+ "node_modules/import-fresh": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmmirror.com/import-fresh/-/import-fresh-3.3.1.tgz",
+ "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==",
+ "dev": true,
+ "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.npmmirror.com/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.npmmirror.com/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "license": "ISC"
+ },
+ "node_modules/inline-style-parser": {
+ "version": "0.2.7",
+ "resolved": "https://registry.npmmirror.com/inline-style-parser/-/inline-style-parser-0.2.7.tgz",
+ "integrity": "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA==",
+ "license": "MIT"
+ },
+ "node_modules/is-alphabetical": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmmirror.com/is-alphabetical/-/is-alphabetical-2.0.1.tgz",
+ "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/is-alphanumerical": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmmirror.com/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz",
+ "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==",
+ "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-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmmirror.com/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.npmmirror.com/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-decimal": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmmirror.com/is-decimal/-/is-decimal-2.0.1.tgz",
+ "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmmirror.com/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.npmmirror.com/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",
+ "resolved": "https://registry.npmmirror.com/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz",
+ "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "node_modules/is-plain-obj": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmmirror.com/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/isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
+ "license": "MIT"
+ },
+ "node_modules/isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/jiti": {
+ "version": "1.21.7",
+ "resolved": "https://registry.npmmirror.com/jiti/-/jiti-1.21.7.tgz",
+ "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==",
+ "license": "MIT",
+ "bin": {
+ "jiti": "bin/jiti.js"
+ }
+ },
+ "node_modules/js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmmirror.com/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.npmmirror.com/js-yaml/-/js-yaml-4.1.1.tgz",
+ "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "argparse": "^2.0.1"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ }
+ },
+ "node_modules/jsesc": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmmirror.com/jsesc/-/jsesc-3.1.0.tgz",
+ "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "jsesc": "bin/jsesc"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/json-buffer": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmmirror.com/json-buffer/-/json-buffer-3.0.1.tgz",
+ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/json-stable-stringify-without-jsonify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmmirror.com/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.npmmirror.com/json5/-/json5-2.2.3.tgz",
+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "json5": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/jszip": {
+ "version": "3.10.1",
+ "resolved": "https://registry.npmmirror.com/jszip/-/jszip-3.10.1.tgz",
+ "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==",
+ "license": "(MIT OR GPL-3.0-or-later)",
+ "dependencies": {
+ "lie": "~3.3.0",
+ "pako": "~1.0.2",
+ "readable-stream": "~2.3.6",
+ "setimmediate": "^1.0.5"
+ }
+ },
+ "node_modules/keyv": {
+ "version": "4.5.4",
+ "resolved": "https://registry.npmmirror.com/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/levn": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmmirror.com/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/lie": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmmirror.com/lie/-/lie-3.3.0.tgz",
+ "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==",
+ "license": "MIT",
+ "dependencies": {
+ "immediate": "~3.0.5"
+ }
+ },
+ "node_modules/lilconfig": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmmirror.com/lilconfig/-/lilconfig-3.1.3.tgz",
+ "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antonk52"
+ }
+ },
+ "node_modules/lines-and-columns": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmmirror.com/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.npmmirror.com/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.npmmirror.com/lodash.merge/-/lodash.merge-4.6.2.tgz",
+ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/longest-streak": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmmirror.com/longest-streak/-/longest-streak-3.1.0.tgz",
+ "integrity": "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/loose-envify": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmmirror.com/loose-envify/-/loose-envify-1.4.0.tgz",
+ "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
+ "license": "MIT",
+ "dependencies": {
+ "js-tokens": "^3.0.0 || ^4.0.0"
+ },
+ "bin": {
+ "loose-envify": "cli.js"
+ }
+ },
+ "node_modules/lru-cache": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-5.1.1.tgz",
+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "yallist": "^3.0.2"
+ }
+ },
+ "node_modules/lucide-react": {
+ "version": "0.511.0",
+ "resolved": "https://registry.npmmirror.com/lucide-react/-/lucide-react-0.511.0.tgz",
+ "integrity": "sha512-VK5a2ydJ7xm8GvBeKLS9mu1pVK6ucef9780JVUjw6bAjJL/QXnd4Y0p7SPeOUMC27YhzNCZvm5d/QX0Tp3rc0w==",
+ "license": "ISC",
+ "peerDependencies": {
+ "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0"
+ }
+ },
+ "node_modules/markdown-table": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmmirror.com/markdown-table/-/markdown-table-3.0.4.tgz",
+ "integrity": "sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/mdast-util-find-and-replace": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmmirror.com/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.2.tgz",
+ "integrity": "sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
+ "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/mdast-util-from-markdown": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmmirror.com/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.2.tgz",
+ "integrity": "sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/mdast-util-gfm/-/mdast-util-gfm-3.1.0.tgz",
+ "integrity": "sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-2.0.1.tgz",
+ "integrity": "sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-2.1.0.tgz",
+ "integrity": "sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-2.0.0.tgz",
+ "integrity": "sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/mdast-util-gfm-table/-/mdast-util-gfm-table-2.0.0.tgz",
+ "integrity": "sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-2.0.0.tgz",
+ "integrity": "sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.1.tgz",
+ "integrity": "sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.2.0.tgz",
+ "integrity": "sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-2.0.1.tgz",
+ "integrity": "sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==",
+ "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-phrasing": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmmirror.com/mdast-util-phrasing/-/mdast-util-phrasing-4.1.0.tgz",
+ "integrity": "sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/mdast-util-to-hast/-/mdast-util-to-hast-13.2.1.tgz",
+ "integrity": "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/mdast-util-to-markdown/-/mdast-util-to-markdown-2.1.2.tgz",
+ "integrity": "sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz",
+ "integrity": "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/merge2": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmmirror.com/merge2/-/merge2-1.4.1.tgz",
+ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/meshoptimizer": {
+ "version": "0.22.0",
+ "resolved": "https://registry.npmmirror.com/meshoptimizer/-/meshoptimizer-0.22.0.tgz",
+ "integrity": "sha512-IebiK79sqIy+E4EgOr+CAw+Ke8hAspXKzBd0JdgEmPHiAwmvEj2S4h1rfvo+o/BnfEYd/jAOg5IeeIjzlzSnDg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/micromark": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmmirror.com/micromark/-/micromark-4.0.2.tgz",
+ "integrity": "sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-core-commonmark/-/micromark-core-commonmark-2.0.3.tgz",
+ "integrity": "sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-extension-gfm/-/micromark-extension-gfm-3.0.0.tgz",
+ "integrity": "sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-2.1.0.tgz",
+ "integrity": "sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-2.1.0.tgz",
+ "integrity": "sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-2.1.0.tgz",
+ "integrity": "sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.1.tgz",
+ "integrity": "sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-2.0.0.tgz",
+ "integrity": "sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-2.1.0.tgz",
+ "integrity": "sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz",
+ "integrity": "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-factory-label/-/micromark-factory-label-2.0.1.tgz",
+ "integrity": "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz",
+ "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-factory-title/-/micromark-factory-title-2.0.1.tgz",
+ "integrity": "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.1.tgz",
+ "integrity": "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-util-character/-/micromark-util-character-2.1.1.tgz",
+ "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-util-chunked/-/micromark-util-chunked-2.0.1.tgz",
+ "integrity": "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-util-classify-character/-/micromark-util-classify-character-2.0.1.tgz",
+ "integrity": "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.1.tgz",
+ "integrity": "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.2.tgz",
+ "integrity": "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-util-decode-string/-/micromark-util-decode-string-2.0.1.tgz",
+ "integrity": "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz",
+ "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz",
+ "integrity": "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.1.tgz",
+ "integrity": "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.1.tgz",
+ "integrity": "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz",
+ "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-util-subtokenize/-/micromark-util-subtokenize-2.1.0.tgz",
+ "integrity": "sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz",
+ "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/micromark-util-types/-/micromark-util-types-2.0.2.tgz",
+ "integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==",
+ "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.npmmirror.com/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/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/motion": {
+ "version": "12.28.1",
+ "resolved": "https://registry.npmmirror.com/motion/-/motion-12.28.1.tgz",
+ "integrity": "sha512-qGq5+6r4IMivHbT2EUhCwxz2NgFBuba3sWDrxcHt06+nYqKMevYJiVh/N90nMRof+vIUpiq8C22ZeOXwkWWiZg==",
+ "license": "MIT",
+ "dependencies": {
+ "framer-motion": "^12.28.1",
+ "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/motion-dom": {
+ "version": "12.28.1",
+ "resolved": "https://registry.npmmirror.com/motion-dom/-/motion-dom-12.28.1.tgz",
+ "integrity": "sha512-xqgID69syDvXwFJnUd5bW6ajGUAr/qevRoUe/EqpsXUbVIopyWrAOiwQOhpgVQD+B7Ra60zTdj5gVkmwncebMg==",
+ "license": "MIT",
+ "dependencies": {
+ "motion-utils": "^12.27.2"
+ }
+ },
+ "node_modules/motion-utils": {
+ "version": "12.27.2",
+ "resolved": "https://registry.npmmirror.com/motion-utils/-/motion-utils-12.27.2.tgz",
+ "integrity": "sha512-B55gcoL85Mcdt2IEStY5EEAsrMSVE2sI14xQ/uAdPL+mfQxhKKFaEag9JmfxedJOR4vZpBGoPeC/Gm13I/4g5Q==",
+ "license": "MIT"
+ },
+ "node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/mz": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmmirror.com/mz/-/mz-2.7.0.tgz",
+ "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==",
+ "license": "MIT",
+ "dependencies": {
+ "any-promise": "^1.0.0",
+ "object-assign": "^4.0.1",
+ "thenify-all": "^1.0.0"
+ }
+ },
+ "node_modules/nanoid": {
+ "version": "3.3.11",
+ "resolved": "https://registry.npmmirror.com/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/natural-compare": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmmirror.com/natural-compare/-/natural-compare-1.4.0.tgz",
+ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/node-releases": {
+ "version": "2.0.27",
+ "resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.27.tgz",
+ "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/object-hash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmmirror.com/object-hash/-/object-hash-3.0.0.tgz",
+ "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/openai": {
+ "version": "6.16.0",
+ "resolved": "https://registry.npmmirror.com/openai/-/openai-6.16.0.tgz",
+ "integrity": "sha512-fZ1uBqjFUjXzbGc35fFtYKEOxd20kd9fDpFeqWtsOZWiubY8CZ1NAlXHW3iathaFvqmNtCWMIsosCuyeI7Joxg==",
+ "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/optionator": {
+ "version": "0.9.4",
+ "resolved": "https://registry.npmmirror.com/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/p-limit": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmmirror.com/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.npmmirror.com/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/pako": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmmirror.com/pako/-/pako-1.0.11.tgz",
+ "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==",
+ "license": "(MIT AND Zlib)"
+ },
+ "node_modules/parent-module": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmmirror.com/parent-module/-/parent-module-1.0.1.tgz",
+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "callsites": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/parse-entities": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmmirror.com/parse-entities/-/parse-entities-4.0.2.tgz",
+ "integrity": "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/@types/unist/-/unist-2.0.11.tgz",
+ "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==",
+ "license": "MIT"
+ },
+ "node_modules/path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmmirror.com/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.npmmirror.com/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-parse": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+ "license": "MIT"
+ },
+ "node_modules/pdf-lib": {
+ "version": "1.17.1",
+ "resolved": "https://registry.npmmirror.com/pdf-lib/-/pdf-lib-1.17.1.tgz",
+ "integrity": "sha512-V/mpyJAoTsN4cnP31vc0wfNA1+p20evqqnap0KLoRUN0Yk/p3wN52DOEsL4oBFcLdb76hlpKPtzJIgo67j/XLw==",
+ "license": "MIT",
+ "dependencies": {
+ "@pdf-lib/standard-fonts": "^1.0.0",
+ "@pdf-lib/upng": "^1.0.1",
+ "pako": "^1.0.11",
+ "tslib": "^1.11.1"
+ }
+ },
+ "node_modules/pdf-lib/node_modules/tslib": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz",
+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "license": "0BSD"
+ },
+ "node_modules/picocolors": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz",
+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
+ "license": "ISC"
+ },
+ "node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmmirror.com/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/pify": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmmirror.com/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/pirates": {
+ "version": "4.0.7",
+ "resolved": "https://registry.npmmirror.com/pirates/-/pirates-4.0.7.tgz",
+ "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/postcss": {
+ "version": "8.5.6",
+ "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.6.tgz",
+ "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
+ "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-import": {
+ "version": "15.1.0",
+ "resolved": "https://registry.npmmirror.com/postcss-import/-/postcss-import-15.1.0.tgz",
+ "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==",
+ "license": "MIT",
+ "dependencies": {
+ "postcss-value-parser": "^4.0.0",
+ "read-cache": "^1.0.0",
+ "resolve": "^1.1.7"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.0.0"
+ }
+ },
+ "node_modules/postcss-js": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmmirror.com/postcss-js/-/postcss-js-4.1.0.tgz",
+ "integrity": "sha512-oIAOTqgIo7q2EOwbhb8UalYePMvYoIeRY2YKntdpFQXNosSu3vLrniGgmH9OKs/qAkfoj5oB3le/7mINW1LCfw==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "camelcase-css": "^2.0.1"
+ },
+ "engines": {
+ "node": "^12 || ^14 || >= 16"
+ },
+ "peerDependencies": {
+ "postcss": "^8.4.21"
+ }
+ },
+ "node_modules/postcss-load-config": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmmirror.com/postcss-load-config/-/postcss-load-config-6.0.1.tgz",
+ "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "lilconfig": "^3.1.1"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "peerDependencies": {
+ "jiti": ">=1.21.0",
+ "postcss": ">=8.0.9",
+ "tsx": "^4.8.1",
+ "yaml": "^2.4.2"
+ },
+ "peerDependenciesMeta": {
+ "jiti": {
+ "optional": true
+ },
+ "postcss": {
+ "optional": true
+ },
+ "tsx": {
+ "optional": true
+ },
+ "yaml": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/postcss-nested": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmmirror.com/postcss-nested/-/postcss-nested-6.2.0.tgz",
+ "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "postcss-selector-parser": "^6.1.1"
+ },
+ "engines": {
+ "node": ">=12.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.14"
+ }
+ },
+ "node_modules/postcss-selector-parser": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmmirror.com/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz",
+ "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==",
+ "license": "MIT",
+ "dependencies": {
+ "cssesc": "^3.0.0",
+ "util-deprecate": "^1.0.2"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/postcss-value-parser": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmmirror.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
+ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
+ "license": "MIT"
+ },
+ "node_modules/pptxgenjs": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmmirror.com/pptxgenjs/-/pptxgenjs-4.0.1.tgz",
+ "integrity": "sha512-TeJISr8wouAuXw4C1F/mC33xbZs/FuEG6nH9FG1Zj+nuPcGMP5YRHl6X+j3HSUnS1f3at6k75ZZXPMZlA5Lj9A==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "^22.8.1",
+ "https": "^1.0.0",
+ "image-size": "^1.2.1",
+ "jszip": "^3.10.1"
+ }
+ },
+ "node_modules/prelude-ls": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmmirror.com/prelude-ls/-/prelude-ls-1.2.1.tgz",
+ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/prism-react-renderer": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmmirror.com/prism-react-renderer/-/prism-react-renderer-2.4.1.tgz",
+ "integrity": "sha512-ey8Ls/+Di31eqzUxC46h8MksNuGx/n0AAC8uKpwFau4RPDYLuE3EXTp8N8G2vX2N7UC/+IXeNUnlWBGGcAG+Ig==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/prismjs": "^1.26.0",
+ "clsx": "^2.0.0"
+ },
+ "peerDependencies": {
+ "react": ">=16.0.0"
+ }
+ },
+ "node_modules/process-nextick-args": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmmirror.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
+ "license": "MIT"
+ },
+ "node_modules/property-information": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmmirror.com/property-information/-/property-information-7.1.0.tgz",
+ "integrity": "sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/punycode": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.3.1.tgz",
+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/queue": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmmirror.com/queue/-/queue-6.0.2.tgz",
+ "integrity": "sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==",
+ "license": "MIT",
+ "dependencies": {
+ "inherits": "~2.0.3"
+ }
+ },
+ "node_modules/queue-microtask": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmmirror.com/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/react": {
+ "version": "18.3.1",
+ "resolved": "https://registry.npmmirror.com/react/-/react-18.3.1.tgz",
+ "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
+ "license": "MIT",
+ "dependencies": {
+ "loose-envify": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/react-dom": {
+ "version": "18.3.1",
+ "resolved": "https://registry.npmmirror.com/react-dom/-/react-dom-18.3.1.tgz",
+ "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",
+ "license": "MIT",
+ "dependencies": {
+ "loose-envify": "^1.1.0",
+ "scheduler": "^0.23.2"
+ },
+ "peerDependencies": {
+ "react": "^18.3.1"
+ }
+ },
+ "node_modules/react-markdown": {
+ "version": "10.1.0",
+ "resolved": "https://registry.npmmirror.com/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-refresh": {
+ "version": "0.17.0",
+ "resolved": "https://registry.npmmirror.com/react-refresh/-/react-refresh-0.17.0.tgz",
+ "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/react-remove-scroll": {
+ "version": "2.7.2",
+ "resolved": "https://registry.npmmirror.com/react-remove-scroll/-/react-remove-scroll-2.7.2.tgz",
+ "integrity": "sha512-Iqb9NjCCTt6Hf+vOdNIZGdTiH1QSqr27H/Ek9sv/a97gfueI/5h1s3yRi1nngzMUaOOToin5dI1dXKdXiF+u0Q==",
+ "license": "MIT",
+ "dependencies": {
+ "react-remove-scroll-bar": "^2.3.7",
+ "react-style-singleton": "^2.2.3",
+ "tslib": "^2.1.0",
+ "use-callback-ref": "^1.3.3",
+ "use-sidecar": "^1.1.3"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/react-remove-scroll-bar": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmmirror.com/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.8.tgz",
+ "integrity": "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==",
+ "license": "MIT",
+ "dependencies": {
+ "react-style-singleton": "^2.2.2",
+ "tslib": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/react-resizable-panels": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmmirror.com/react-resizable-panels/-/react-resizable-panels-4.4.1.tgz",
+ "integrity": "sha512-dpM9oI6rGlAq7VYDeafSRA1JmkJv8aNuKySR+tZLQQLfaeqTnQLSM52EcoI/QdowzsjVUCk6jViKS0xHWITVRQ==",
+ "license": "MIT",
+ "peerDependencies": {
+ "react": "^18.0.0 || ^19.0.0",
+ "react-dom": "^18.0.0 || ^19.0.0"
+ }
+ },
+ "node_modules/react-router": {
+ "version": "7.12.0",
+ "resolved": "https://registry.npmmirror.com/react-router/-/react-router-7.12.0.tgz",
+ "integrity": "sha512-kTPDYPFzDVGIIGNLS5VJykK0HfHLY5MF3b+xj0/tTyNYL1gF1qs7u67Z9jEhQk2sQ98SUaHxlG31g1JtF7IfVw==",
+ "license": "MIT",
+ "dependencies": {
+ "cookie": "^1.0.1",
+ "set-cookie-parser": "^2.6.0"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ },
+ "peerDependencies": {
+ "react": ">=18",
+ "react-dom": ">=18"
+ },
+ "peerDependenciesMeta": {
+ "react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/react-router-dom": {
+ "version": "7.12.0",
+ "resolved": "https://registry.npmmirror.com/react-router-dom/-/react-router-dom-7.12.0.tgz",
+ "integrity": "sha512-pfO9fiBcpEfX4Tx+iTYKDtPbrSLLCbwJ5EqP+SPYQu1VYCXdy79GSj0wttR0U4cikVdlImZuEZ/9ZNCgoaxwBA==",
+ "license": "MIT",
+ "dependencies": {
+ "react-router": "7.12.0"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ },
+ "peerDependencies": {
+ "react": ">=18",
+ "react-dom": ">=18"
+ }
+ },
+ "node_modules/react-style-singleton": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmmirror.com/react-style-singleton/-/react-style-singleton-2.2.3.tgz",
+ "integrity": "sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==",
+ "license": "MIT",
+ "dependencies": {
+ "get-nonce": "^1.0.0",
+ "tslib": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/read-cache": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmmirror.com/read-cache/-/read-cache-1.0.0.tgz",
+ "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==",
+ "license": "MIT",
+ "dependencies": {
+ "pify": "^2.3.0"
+ }
+ },
+ "node_modules/readable-stream": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-2.3.8.tgz",
+ "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
+ "license": "MIT",
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "node_modules/readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "license": "MIT",
+ "dependencies": {
+ "picomatch": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=8.10.0"
+ }
+ },
+ "node_modules/remark-gfm": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmmirror.com/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",
+ "resolved": "https://registry.npmmirror.com/remark-parse/-/remark-parse-11.0.0.tgz",
+ "integrity": "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/remark-rehype/-/remark-rehype-11.1.2.tgz",
+ "integrity": "sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/remark-stringify/-/remark-stringify-11.0.0.tgz",
+ "integrity": "sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==",
+ "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/resolve": {
+ "version": "1.22.11",
+ "resolved": "https://registry.npmmirror.com/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/resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmmirror.com/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/reusify": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmmirror.com/reusify/-/reusify-1.1.0.tgz",
+ "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",
+ "license": "MIT",
+ "engines": {
+ "iojs": ">=1.0.0",
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/rollup": {
+ "version": "4.55.3",
+ "resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.55.3.tgz",
+ "integrity": "sha512-y9yUpfQvetAjiDLtNMf1hL9NXchIJgWt6zIKeoB+tCd3npX08Eqfzg60V9DhIGVMtQ0AlMkFw5xa+AQ37zxnAA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "1.0.8"
+ },
+ "bin": {
+ "rollup": "dist/bin/rollup"
+ },
+ "engines": {
+ "node": ">=18.0.0",
+ "npm": ">=8.0.0"
+ },
+ "optionalDependencies": {
+ "@rollup/rollup-android-arm-eabi": "4.55.3",
+ "@rollup/rollup-android-arm64": "4.55.3",
+ "@rollup/rollup-darwin-arm64": "4.55.3",
+ "@rollup/rollup-darwin-x64": "4.55.3",
+ "@rollup/rollup-freebsd-arm64": "4.55.3",
+ "@rollup/rollup-freebsd-x64": "4.55.3",
+ "@rollup/rollup-linux-arm-gnueabihf": "4.55.3",
+ "@rollup/rollup-linux-arm-musleabihf": "4.55.3",
+ "@rollup/rollup-linux-arm64-gnu": "4.55.3",
+ "@rollup/rollup-linux-arm64-musl": "4.55.3",
+ "@rollup/rollup-linux-loong64-gnu": "4.55.3",
+ "@rollup/rollup-linux-loong64-musl": "4.55.3",
+ "@rollup/rollup-linux-ppc64-gnu": "4.55.3",
+ "@rollup/rollup-linux-ppc64-musl": "4.55.3",
+ "@rollup/rollup-linux-riscv64-gnu": "4.55.3",
+ "@rollup/rollup-linux-riscv64-musl": "4.55.3",
+ "@rollup/rollup-linux-s390x-gnu": "4.55.3",
+ "@rollup/rollup-linux-x64-gnu": "4.55.3",
+ "@rollup/rollup-linux-x64-musl": "4.55.3",
+ "@rollup/rollup-openbsd-x64": "4.55.3",
+ "@rollup/rollup-openharmony-arm64": "4.55.3",
+ "@rollup/rollup-win32-arm64-msvc": "4.55.3",
+ "@rollup/rollup-win32-ia32-msvc": "4.55.3",
+ "@rollup/rollup-win32-x64-gnu": "4.55.3",
+ "@rollup/rollup-win32-x64-msvc": "4.55.3",
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/run-parallel": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmmirror.com/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-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "license": "MIT"
+ },
+ "node_modules/scheduler": {
+ "version": "0.23.2",
+ "resolved": "https://registry.npmmirror.com/scheduler/-/scheduler-0.23.2.tgz",
+ "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",
+ "license": "MIT",
+ "dependencies": {
+ "loose-envify": "^1.1.0"
+ }
+ },
+ "node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/set-cookie-parser": {
+ "version": "2.7.2",
+ "resolved": "https://registry.npmmirror.com/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz",
+ "integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==",
+ "license": "MIT"
+ },
+ "node_modules/setimmediate": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmmirror.com/setimmediate/-/setimmediate-1.0.5.tgz",
+ "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==",
+ "license": "MIT"
+ },
+ "node_modules/shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmmirror.com/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/sonner": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmmirror.com/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-js": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmmirror.com/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",
+ "resolved": "https://registry.npmmirror.com/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz",
+ "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ }
+ },
+ "node_modules/stringify-entities": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmmirror.com/stringify-entities/-/stringify-entities-4.0.4.tgz",
+ "integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==",
+ "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/strip-json-comments": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmmirror.com/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/style-to-js": {
+ "version": "1.1.21",
+ "resolved": "https://registry.npmmirror.com/style-to-js/-/style-to-js-1.1.21.tgz",
+ "integrity": "sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ==",
+ "license": "MIT",
+ "dependencies": {
+ "style-to-object": "1.0.14"
+ }
+ },
+ "node_modules/style-to-object": {
+ "version": "1.0.14",
+ "resolved": "https://registry.npmmirror.com/style-to-object/-/style-to-object-1.0.14.tgz",
+ "integrity": "sha512-LIN7rULI0jBscWQYaSswptyderlarFkjQ+t79nzty8tcIAceVomEVlLzH5VP4Cmsv6MtKhs7qaAiwlcp+Mgaxw==",
+ "license": "MIT",
+ "dependencies": {
+ "inline-style-parser": "0.2.7"
+ }
+ },
+ "node_modules/sucrase": {
+ "version": "3.35.1",
+ "resolved": "https://registry.npmmirror.com/sucrase/-/sucrase-3.35.1.tgz",
+ "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==",
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.2",
+ "commander": "^4.0.0",
+ "lines-and-columns": "^1.1.6",
+ "mz": "^2.7.0",
+ "pirates": "^4.0.1",
+ "tinyglobby": "^0.2.11",
+ "ts-interface-checker": "^0.1.9"
+ },
+ "bin": {
+ "sucrase": "bin/sucrase",
+ "sucrase-node": "bin/sucrase-node"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmmirror.com/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.npmmirror.com/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/tailwind-merge": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmmirror.com/tailwind-merge/-/tailwind-merge-3.4.0.tgz",
+ "integrity": "sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/dcastil"
+ }
+ },
+ "node_modules/tailwindcss": {
+ "version": "3.4.19",
+ "resolved": "https://registry.npmmirror.com/tailwindcss/-/tailwindcss-3.4.19.tgz",
+ "integrity": "sha512-3ofp+LL8E+pK/JuPLPggVAIaEuhvIz4qNcf3nA1Xn2o/7fb7s/TYpHhwGDv1ZU3PkBluUVaF8PyCHcm48cKLWQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@alloc/quick-lru": "^5.2.0",
+ "arg": "^5.0.2",
+ "chokidar": "^3.6.0",
+ "didyoumean": "^1.2.2",
+ "dlv": "^1.1.3",
+ "fast-glob": "^3.3.2",
+ "glob-parent": "^6.0.2",
+ "is-glob": "^4.0.3",
+ "jiti": "^1.21.7",
+ "lilconfig": "^3.1.3",
+ "micromatch": "^4.0.8",
+ "normalize-path": "^3.0.0",
+ "object-hash": "^3.0.0",
+ "picocolors": "^1.1.1",
+ "postcss": "^8.4.47",
+ "postcss-import": "^15.1.0",
+ "postcss-js": "^4.0.1",
+ "postcss-load-config": "^4.0.2 || ^5.0 || ^6.0",
+ "postcss-nested": "^6.2.0",
+ "postcss-selector-parser": "^6.1.2",
+ "resolve": "^1.22.8",
+ "sucrase": "^3.35.0"
+ },
+ "bin": {
+ "tailwind": "lib/cli.js",
+ "tailwindcss": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/tailwindcss-animate": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmmirror.com/tailwindcss-animate/-/tailwindcss-animate-1.0.7.tgz",
+ "integrity": "sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==",
+ "license": "MIT",
+ "peerDependencies": {
+ "tailwindcss": ">=3.0.0 || insiders"
+ }
+ },
+ "node_modules/thenify": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmmirror.com/thenify/-/thenify-3.3.1.tgz",
+ "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==",
+ "license": "MIT",
+ "dependencies": {
+ "any-promise": "^1.0.0"
+ }
+ },
+ "node_modules/thenify-all": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmmirror.com/thenify-all/-/thenify-all-1.6.0.tgz",
+ "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==",
+ "license": "MIT",
+ "dependencies": {
+ "thenify": ">= 3.1.0 < 4"
+ },
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/three": {
+ "version": "0.161.0",
+ "resolved": "https://registry.npmmirror.com/three/-/three-0.161.0.tgz",
+ "integrity": "sha512-LC28VFtjbOyEu5b93K0bNRLw1rQlMJ85lilKsYj6dgTu+7i17W+JCCEbvrpmNHF1F3NAUqDSWq50UD7w9H2xQw==",
+ "license": "MIT"
+ },
+ "node_modules/tinyglobby": {
+ "version": "0.2.15",
+ "resolved": "https://registry.npmmirror.com/tinyglobby/-/tinyglobby-0.2.15.tgz",
+ "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==",
+ "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/tinyglobby/node_modules/fdir": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmmirror.com/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/tinyglobby/node_modules/picomatch": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-4.0.3.tgz",
+ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmmirror.com/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/trim-lines": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmmirror.com/trim-lines/-/trim-lines-3.0.1.tgz",
+ "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/trough": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmmirror.com/trough/-/trough-2.2.0.tgz",
+ "integrity": "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/ts-api-utils": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmmirror.com/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-interface-checker": {
+ "version": "0.1.13",
+ "resolved": "https://registry.npmmirror.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz",
+ "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==",
+ "license": "Apache-2.0"
+ },
+ "node_modules/tsconfck": {
+ "version": "3.1.6",
+ "resolved": "https://registry.npmmirror.com/tsconfck/-/tsconfck-3.1.6.tgz",
+ "integrity": "sha512-ks6Vjr/jEw0P1gmOVwutM3B7fWxoWBL2KRDb1JfqGVawBmO5UsvmWOQFGHBPl5yxYz4eERr19E6L7NMv+Fej4w==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "tsconfck": "bin/tsconfck.js"
+ },
+ "engines": {
+ "node": "^18 || >=20"
+ },
+ "peerDependencies": {
+ "typescript": "^5.0.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/tslib": {
+ "version": "2.8.1",
+ "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.1.tgz",
+ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+ "license": "0BSD"
+ },
+ "node_modules/type-check": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmmirror.com/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/typescript": {
+ "version": "5.8.3",
+ "resolved": "https://registry.npmmirror.com/typescript/-/typescript-5.8.3.tgz",
+ "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
+ "node_modules/typescript-eslint": {
+ "version": "8.53.1",
+ "resolved": "https://registry.npmmirror.com/typescript-eslint/-/typescript-eslint-8.53.1.tgz",
+ "integrity": "sha512-gB+EVQfP5RDElh9ittfXlhZJdjSU4jUSTyE2+ia8CYyNvet4ElfaLlAIqDvQV9JPknKx0jQH1racTYe/4LaLSg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/eslint-plugin": "8.53.1",
+ "@typescript-eslint/parser": "8.53.1",
+ "@typescript-eslint/typescript-estree": "8.53.1",
+ "@typescript-eslint/utils": "8.53.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",
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/undici-types": {
+ "version": "6.21.0",
+ "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-6.21.0.tgz",
+ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
+ "license": "MIT"
+ },
+ "node_modules/unified": {
+ "version": "11.0.5",
+ "resolved": "https://registry.npmmirror.com/unified/-/unified-11.0.5.tgz",
+ "integrity": "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/unist-util-is/-/unist-util-is-6.0.1.tgz",
+ "integrity": "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/unist-util-position/-/unist-util-position-5.0.0.tgz",
+ "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz",
+ "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unist-util-visit": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmmirror.com/unist-util-visit/-/unist-util-visit-5.0.0.tgz",
+ "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/unist-util-visit-parents/-/unist-util-visit-parents-6.0.2.tgz",
+ "integrity": "sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "unist-util-is": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unpdf": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmmirror.com/unpdf/-/unpdf-1.4.0.tgz",
+ "integrity": "sha512-TahIk0xdH/4jh/MxfclzU79g40OyxtP00VnEUZdEkJoYtXAHWLiir6t3FC6z3vDqQTzc2ZHcla6uEiVTNjejuA==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@napi-rs/canvas": "^0.1.69"
+ },
+ "peerDependenciesMeta": {
+ "@napi-rs/canvas": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/update-browserslist-db": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmmirror.com/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz",
+ "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==",
+ "dev": true,
+ "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.npmmirror.com/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-callback-ref": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmmirror.com/use-callback-ref/-/use-callback-ref-1.3.3.tgz",
+ "integrity": "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/use-sidecar": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmmirror.com/use-sidecar/-/use-sidecar-1.1.3.tgz",
+ "integrity": "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==",
+ "license": "MIT",
+ "dependencies": {
+ "detect-node-es": "^1.1.0",
+ "tslib": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
+ "license": "MIT"
+ },
+ "node_modules/vfile": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmmirror.com/vfile/-/vfile-6.0.3.tgz",
+ "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/vfile-message/-/vfile-message-4.0.3.tgz",
+ "integrity": "sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==",
+ "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/vite": {
+ "version": "6.4.1",
+ "resolved": "https://registry.npmmirror.com/vite/-/vite-6.4.1.tgz",
+ "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "esbuild": "^0.25.0",
+ "fdir": "^6.4.4",
+ "picomatch": "^4.0.2",
+ "postcss": "^8.5.3",
+ "rollup": "^4.34.9",
+ "tinyglobby": "^0.2.13"
+ },
+ "bin": {
+ "vite": "bin/vite.js"
+ },
+ "engines": {
+ "node": "^18.0.0 || ^20.0.0 || >=22.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/vitejs/vite?sponsor=1"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.3"
+ },
+ "peerDependencies": {
+ "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",
+ "jiti": ">=1.21.0",
+ "less": "*",
+ "lightningcss": "^1.21.0",
+ "sass": "*",
+ "sass-embedded": "*",
+ "stylus": "*",
+ "sugarss": "*",
+ "terser": "^5.16.0",
+ "tsx": "^4.8.1",
+ "yaml": "^2.4.2"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ },
+ "jiti": {
+ "optional": true
+ },
+ "less": {
+ "optional": true
+ },
+ "lightningcss": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "sass-embedded": {
+ "optional": true
+ },
+ "stylus": {
+ "optional": true
+ },
+ "sugarss": {
+ "optional": true
+ },
+ "terser": {
+ "optional": true
+ },
+ "tsx": {
+ "optional": true
+ },
+ "yaml": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/vite-plugin-trae-solo-badge": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmmirror.com/vite-plugin-trae-solo-badge/-/vite-plugin-trae-solo-badge-1.0.0.tgz",
+ "integrity": "sha512-vrNr4QmbcqqMeJPzHBqef70nqDzN6CQngFwuXTJMAgn3zMU4TWzvY0B3BRdjUjvg/BtvNJLlwu2cPKXTUjalHg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "^2.8.1"
+ },
+ "peerDependencies": {
+ "vite": ">=4.0.0"
+ }
+ },
+ "node_modules/vite-tsconfig-paths": {
+ "version": "5.1.4",
+ "resolved": "https://registry.npmmirror.com/vite-tsconfig-paths/-/vite-tsconfig-paths-5.1.4.tgz",
+ "integrity": "sha512-cYj0LRuLV2c2sMqhqhGpaO3LretdtMn/BVX4cPLanIZuwwrkVl+lK84E/miEXkCHWXuq65rhNN4rXsBcOB3S4w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.1.1",
+ "globrex": "^0.1.2",
+ "tsconfck": "^3.0.3"
+ },
+ "peerDependencies": {
+ "vite": "*"
+ },
+ "peerDependenciesMeta": {
+ "vite": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/vite/node_modules/fdir": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmmirror.com/fdir/-/fdir-6.5.0.tgz",
+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "picomatch": "^3 || ^4"
+ },
+ "peerDependenciesMeta": {
+ "picomatch": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/vite/node_modules/picomatch": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-4.0.3.tgz",
+ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmmirror.com/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "node-which": "bin/node-which"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/word-wrap": {
+ "version": "1.2.5",
+ "resolved": "https://registry.npmmirror.com/word-wrap/-/word-wrap-1.2.5.tgz",
+ "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/yallist": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmmirror.com/yallist/-/yallist-3.1.1.tgz",
+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/yocto-queue": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmmirror.com/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/zustand": {
+ "version": "5.0.10",
+ "resolved": "https://registry.npmmirror.com/zustand/-/zustand-5.0.10.tgz",
+ "integrity": "sha512-U1AiltS1O9hSy3rul+Ub82ut2fqIAefiSuwECWt6jlMVUGejvf+5omLcRBSzqbRagSM3hQZbtzdeRc6QVScXTg==",
+ "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",
+ "resolved": "https://registry.npmmirror.com/zwitch/-/zwitch-2.0.4.tgz",
+ "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ }
+ }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..9bc84e7
--- /dev/null
+++ b/package.json
@@ -0,0 +1,68 @@
+{
+ "name": "unified-ai-workspace",
+ "private": true,
+ "version": "0.0.0",
+ "type": "module",
+ "scripts": {
+ "dev": "vite",
+ "freecad:server": "node server/freecad-server.mjs",
+ "build": "tsc -b && vite build",
+ "lint": "eslint .",
+ "preview": "vite preview",
+ "check": "tsc -b --noEmit"
+ },
+ "dependencies": {
+ "@radix-ui/react-collapsible": "^1.1.12",
+ "@radix-ui/react-context-menu": "^2.2.16",
+ "@radix-ui/react-dialog": "^1.1.15",
+ "@radix-ui/react-label": "^2.1.8",
+ "@radix-ui/react-scroll-area": "^1.2.10",
+ "@radix-ui/react-select": "^2.2.6",
+ "@radix-ui/react-slot": "^1.2.4",
+ "@radix-ui/react-tooltip": "^1.2.8",
+ "@radix-ui/react-use-controllable-state": "^1.2.2",
+ "class-variance-authority": "^0.7.1",
+ "clsx": "^2.1.1",
+ "framer-motion": "^12.28.1",
+ "lucide-react": "^0.511.0",
+ "motion": "^12.28.1",
+ "openai": "^6.16.0",
+ "pdf-lib": "^1.17.1",
+ "pptxgenjs": "^4.0.1",
+ "prism-react-renderer": "^2.4.1",
+ "react": "^18.3.1",
+ "react-dom": "^18.3.1",
+ "react-markdown": "^10.1.0",
+ "react-resizable-panels": "^4.4.1",
+ "react-router-dom": "^7.3.0",
+ "remark-gfm": "^4.0.1",
+ "sonner": "^2.0.7",
+ "tailwind-merge": "^3.4.0",
+ "tailwindcss-animate": "^1.0.7",
+ "three": "^0.161.0",
+ "unpdf": "^1.4.0",
+ "zustand": "^5.0.3"
+ },
+ "devDependencies": {
+ "@eslint/js": "^9.25.0",
+ "@tailwindcss/typography": "^0.5.19",
+ "@types/node": "^22.15.30",
+ "@types/react": "^18.3.12",
+ "@types/react-dom": "^18.3.1",
+ "@types/three": "^0.182.0",
+ "@vitejs/plugin-react": "^4.4.1",
+ "autoprefixer": "^10.4.23",
+ "babel-plugin-react-dev-locator": "^1.0.0",
+ "eslint": "^9.25.0",
+ "eslint-plugin-react-hooks": "^5.2.0",
+ "eslint-plugin-react-refresh": "^0.4.19",
+ "globals": "^16.0.0",
+ "postcss": "^8.5.6",
+ "tailwindcss": "^3.4.19",
+ "typescript": "~5.8.3",
+ "typescript-eslint": "^8.30.1",
+ "vite": "^6.3.5",
+ "vite-plugin-trae-solo-badge": "^1.0.0",
+ "vite-tsconfig-paths": "^5.1.4"
+ }
+}
diff --git a/postcss.config.js b/postcss.config.js
new file mode 100644
index 0000000..1d8a859
--- /dev/null
+++ b/postcss.config.js
@@ -0,0 +1,10 @@
+/** WARNING: DON'T EDIT THIS FILE */
+/** WARNING: DON'T EDIT THIS FILE */
+/** WARNING: DON'T EDIT THIS FILE */
+
+export default {
+ plugins: {
+ tailwindcss: {},
+ autoprefixer: {},
+ },
+};
diff --git a/public/favicon.svg b/public/favicon.svg
new file mode 100644
index 0000000..c04c3c1
--- /dev/null
+++ b/public/favicon.svg
@@ -0,0 +1,4 @@
+<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect width="32" height="32" fill="#0A0B0D"/>
+<path d="M26.6677 23.7149H8.38057V20.6496H5.33301V8.38159H26.6677V23.7149ZM8.38057 20.6496H23.6201V11.4482H8.38057V20.6496ZM16.0011 16.0021L13.8461 18.1705L11.6913 16.0021L13.8461 13.8337L16.0011 16.0021ZM22.0963 16.0008L19.9414 18.1691L17.7865 16.0008L19.9414 13.8324L22.0963 16.0008Z" fill="#32F08C"/>
+</svg>
diff --git a/public/maliang.png b/public/maliang.png
new file mode 100644
index 0000000..4a24c08
Binary files /dev/null and b/public/maliang.png differ
diff --git a/public/pdf/GraphRAG_Global_Knowledge_Structure.pdf b/public/pdf/GraphRAG_Global_Knowledge_Structure.pdf
new file mode 100644
index 0000000..39e6a25
Binary files /dev/null and b/public/pdf/GraphRAG_Global_Knowledge_Structure.pdf differ
diff --git a/public/templates/template_academic.jpg b/public/templates/template_academic.jpg
new file mode 100644
index 0000000..ee3bb32
Binary files /dev/null and b/public/templates/template_academic.jpg differ
diff --git a/public/templates/template_b.png b/public/templates/template_b.png
new file mode 100644
index 0000000..5dc3c09
Binary files /dev/null and b/public/templates/template_b.png differ
diff --git a/public/templates/template_glass.png b/public/templates/template_glass.png
new file mode 100644
index 0000000..ab449c5
Binary files /dev/null and b/public/templates/template_glass.png differ
diff --git a/public/templates/template_s.png b/public/templates/template_s.png
new file mode 100644
index 0000000..3f0f551
Binary files /dev/null and b/public/templates/template_s.png differ
diff --git a/public/templates/template_vector_illustration.png b/public/templates/template_vector_illustration.png
new file mode 100644
index 0000000..134219b
Binary files /dev/null and b/public/templates/template_vector_illustration.png differ
diff --git a/public/templates/template_y.png b/public/templates/template_y.png
new file mode 100644
index 0000000..20e8403
Binary files /dev/null and b/public/templates/template_y.png differ
diff --git a/public/templates/unnamed.jpg b/public/templates/unnamed.jpg
new file mode 100644
index 0000000..1dece16
Binary files /dev/null and b/public/templates/unnamed.jpg differ
diff --git a/public/videos/maliang-draw.mp4 b/public/videos/maliang-draw.mp4
new file mode 100644
index 0000000..0dd77f4
Binary files /dev/null and b/public/videos/maliang-draw.mp4 differ
diff --git a/server/freecad-server.mjs b/server/freecad-server.mjs
new file mode 100644
index 0000000..3f32476
--- /dev/null
+++ b/server/freecad-server.mjs
@@ -0,0 +1,166 @@
+import http from "node:http"
+import { URL } from "node:url"
+import { promises as fs } from "node:fs"
+import path from "node:path"
+import os from "node:os"
+import { spawn } from "node:child_process"
+import { randomUUID } from "node:crypto"
+
+const PORT = Number(process.env.FREECAD_SERVER_PORT || 43110)
+const FREECAD_CMD = process.env.FREECAD_CMD || "E:\\freecad\\bin\\freecad.exe"
+const ROOT = path.join(os.tmpdir(), "freecad-runner")
+
+const setCors = (res) => {
+ res.setHeader("Access-Control-Allow-Origin", "*")
+ res.setHeader("Access-Control-Allow-Methods", "GET,POST,OPTIONS")
+ res.setHeader("Access-Control-Allow-Headers", "Content-Type")
+}
+
+const send = (res, status, body, headers = {}) => {
+ setCors(res)
+ Object.entries(headers).forEach(([k, v]) => res.setHeader(k, v))
+ res.statusCode = status
+ res.end(body)
+}
+
+const sendJson = (res, status, obj) => {
+ send(res, status, JSON.stringify(obj), { "Content-Type": "application/json; charset=utf-8" })
+}
+
+const readBody = (req) =>
+ new Promise((resolve, reject) => {
+ let data = ""
+ req.on("data", (chunk) => {
+ data += chunk
+ if (data.length > 5_000_000) {
+ req.destroy()
+ reject(new Error("Body too large"))
+ }
+ })
+ req.on("end", () => resolve(data))
+ req.on("error", reject)
+ })
+
+const getFreecadArgs = (exePath, scriptPath) => {
+ const base = path.basename(exePath).toLowerCase()
+ if (base.includes("freecadcmd")) return [scriptPath]
+ return ["-c", scriptPath]
+}
+
+const runFreecad = async (code) => {
+ const id = randomUUID()
+ const jobDir = path.join(ROOT, id)
+ await fs.mkdir(jobDir, { recursive: true })
+
+ const scriptPath = path.join(jobDir, "job.py")
+ const outputPath = path.join(jobDir, "model.stl")
+ const escapedOutputPath = outputPath.replace(/\\/g, "\\\\")
+
+ const scriptParts = [
+ "import os",
+ "import sys",
+ `output_path = r\"${escapedOutputPath}\"`,
+ code,
+ "import FreeCAD as App",
+ "import Mesh",
+ "doc = App.ActiveDocument",
+ "if doc is None:",
+ " doc = App.newDocument(\"Doc\")",
+ "doc.recompute()",
+ "objs = [o for o in doc.Objects if hasattr(o, \"Shape\") and not o.Shape.isNull()]",
+ "if len(objs) == 0:",
+ " raise Exception(\"No exportable objects\")",
+ "Mesh.export(objs, output_path)",
+ "print(\"EXPORT_OK:\" + output_path)",
+ ]
+ const pythonScript = scriptParts.join("\n")
+
+ await fs.writeFile(scriptPath, pythonScript, "utf-8")
+
+ const stdout = []
+ const stderr = []
+
+ const proc = spawn(FREECAD_CMD, getFreecadArgs(FREECAD_CMD, scriptPath), { windowsHide: true })
+
+ const timeoutMs = Number(process.env.FREECAD_TIMEOUT_MS || 120000)
+ const timeout = setTimeout(() => {
+ try {
+ proc.kill()
+ } catch {
+ }
+ }, timeoutMs)
+
+ const exitCode = await new Promise((resolve, reject) => {
+ proc.stdout.on("data", (d) => stdout.push(d.toString()))
+ proc.stderr.on("data", (d) => stderr.push(d.toString()))
+ proc.on("error", reject)
+ proc.on("close", resolve)
+ })
+
+ clearTimeout(timeout)
+
+ const exists = await fs.stat(outputPath).then(() => true).catch(() => false)
+ if (exitCode !== 0 || !exists) {
+ const err = stderr.join("") || stdout.join("") || "FreeCAD 执行失败"
+ throw new Error(err)
+ }
+
+ return { id }
+}
+
+const server = http.createServer(async (req, res) => {
+ if (!req.url) {
+ send(res, 404, "Not Found")
+ return
+ }
+
+ const url = new URL(req.url, "http://localhost")
+ const pathname = url.pathname
+
+ if (req.method === "OPTIONS") {
+ send(res, 204, "")
+ return
+ }
+
+ if (req.method === "POST" && pathname === "/api/freecad/run") {
+ try {
+ const body = await readBody(req)
+ const payload = JSON.parse(body || "{}")
+ const code = String(payload.code || "").trim()
+ if (!code) {
+ send(res, 400, "Missing code")
+ return
+ }
+ const result = await runFreecad(code)
+ sendJson(res, 200, { meshUrl: `/api/freecad/mesh/${result.id}` })
+ return
+ } catch (e) {
+ const message = e instanceof Error ? e.message : "FreeCAD 执行失败"
+ send(res, 500, message)
+ return
+ }
+ }
+
+ if (req.method === "GET" && pathname.startsWith("/api/freecad/mesh/")) {
+ const id = pathname.split("/").pop() || ""
+ if (!/^[a-zA-Z0-9_-]+$/.test(id)) {
+ send(res, 400, "Invalid id")
+ return
+ }
+ const filePath = path.join(ROOT, id, "model.stl")
+ try {
+ const data = await fs.readFile(filePath)
+ send(res, 200, data, { "Content-Type": "model/stl" })
+ return
+ } catch {
+ send(res, 404, "Not Found")
+ return
+ }
+ }
+
+ send(res, 404, "Not Found")
+})
+
+server.listen(PORT, () => {
+ console.log(`FreeCAD server listening on http://localhost:${PORT}`)
+})
diff --git a/src/App.tsx b/src/App.tsx
new file mode 100644
index 0000000..529b8e6
--- /dev/null
+++ b/src/App.tsx
@@ -0,0 +1,313 @@
+import React, { useState, useEffect, useRef } from 'react';
+import { ResizableHandle, ResizablePanel, ResizablePanelGroup, type PanelImperativeHandle } from "@/components/ui/resizable";
+import { ChatPanel } from '@/components/ChatPanel';
+import { FlowchartWorkspace } from '@/components/workspaces/FlowchartWorkspace';
+import { CadWorkspace } from '@/components/workspaces/CadWorkspace';
+import { PptWorkspace } from '@/components/workspaces/PptWorkspace';
+import { SettingsDialog } from '@/components/SettingsDialog';
+import { Layers, FileCode, Presentation, Layout } from 'lucide-react';
+import { cn } from '@/lib/utils';
+import { DRAWIO_SYSTEM_PROMPT, CAD_SYSTEM_PROMPT, PPT_SYSTEM_PROMPT } from '@/lib/system-prompts';
+import { getAIConfig, type ChatMessage } from '@/lib/ai-client';
+import { Toaster } from 'sonner';
+import { LandingPage } from '@/pages/LandingPage';
+import { HistoryItem } from '@/components/history-dialog';
+
+type WorkspaceType = 'flow' | 'cad' | 'ppt';
+
+const HISTORY_STORAGE_KEY = 'unified-ai-workspace-history';
+
+function App() {
+ const [showLanding, setShowLanding] = useState(true);
+ const [activeWorkspace, setActiveWorkspace] = useState<WorkspaceType>('flow');
+ const [attachments, setAttachments] = useState<{ id: string; type: 'xml' | 'python' | 'json'; content: string; name: string }[]>([]);
+
+ // Workspace specific states
+ const [generatedXml, setGeneratedXml] = useState<string | undefined>(undefined);
+ const [generatedCadCode, setGeneratedCadCode] = useState<string | undefined>(undefined);
+ const [pptIncomingEdit, setPptIncomingEdit] = useState<{ id: string; payload: string } | null>(null);
+
+ // Chat History Management (Per Workspace)
+ const [chatHistories, setChatHistories] = useState<Record<WorkspaceType, ChatMessage[]>>({
+ flow: [],
+ cad: [],
+ ppt: []
+ });
+
+ // Version History Management (Per Workspace)
+ const [versionHistories, setVersionHistories] = useState<Record<WorkspaceType, HistoryItem[]>>(() => {
+ if (typeof window !== 'undefined') {
+ const saved = localStorage.getItem(HISTORY_STORAGE_KEY);
+ if (saved) {
+ try {
+ return JSON.parse(saved);
+ } catch (e) {
+ console.error("Failed to parse history", e);
+ }
+ }
+ }
+ return { flow: [], cad: [], ppt: [] };
+ });
+
+ // Persist history
+ useEffect(() => {
+ localStorage.setItem(HISTORY_STORAGE_KEY, JSON.stringify(versionHistories));
+ }, [versionHistories]);
+
+ // Layout State
+ const [isChatCollapsed, setIsChatCollapsed] = useState(false);
+ const chatPanelRef = useRef<PanelImperativeHandle | null>(null);
+ const [pptReady, setPptReady] = useState(false);
+ const pptChatLocked = activeWorkspace === "ppt" && !pptReady;
+
+ useEffect(() => {
+ if (pptChatLocked && isChatCollapsed) {
+ setIsChatCollapsed(false);
+ chatPanelRef.current?.expand();
+ }
+ }, [pptChatLocked, isChatCollapsed]);
+
+ useEffect(() => {
+ if (activeWorkspace === "ppt" && !pptChatLocked) {
+ setIsChatCollapsed(false);
+ chatPanelRef.current?.expand();
+ }
+ }, [activeWorkspace, pptChatLocked]);
+
+ const handleToggleCollapse = () => {
+ if (pptChatLocked) return;
+ const panel = chatPanelRef.current;
+ if (panel) {
+ if (panel.isCollapsed?.() || isChatCollapsed) {
+ panel.expand();
+ setIsChatCollapsed(false);
+ } else {
+ panel.collapse();
+ setIsChatCollapsed(true);
+ }
+ }
+ };
+
+ const chatUi = (() => {
+ if (activeWorkspace === "flow") {
+ return {
+ title: "流程图助手",
+ placeholder: "描述流程…"
+ };
+ }
+ if (activeWorkspace === "cad") {
+ return {
+ title: "CAD 助手",
+ placeholder: "描述 CAD…"
+ };
+ }
+ if (activeWorkspace === "ppt") {
+ return {
+ title: "PPT 助手",
+ placeholder: "描述 PPT…"
+ };
+ }
+ return { title: "AI 助手", placeholder: undefined as any };
+ })();
+
+ const handleAddToChat = (code: string, type: 'xml' | 'python' | 'json' = 'xml', name: string = 'attachment') => {
+ setAttachments(prev => [
+ ...prev,
+ {
+ id: Math.random().toString(36).substring(7),
+ type,
+ content: code,
+ name
+ }
+ ]);
+ };
+
+ const getSystemPrompt = (type: WorkspaceType) => {
+ switch (type) {
+ case 'flow': return DRAWIO_SYSTEM_PROMPT;
+ case 'cad': return CAD_SYSTEM_PROMPT;
+ case 'ppt': return PPT_SYSTEM_PROMPT;
+ default: return DRAWIO_SYSTEM_PROMPT;
+ }
+ };
+
+ const handleMessagesChange = React.useCallback((msgs: ChatMessage[]) => {
+ setChatHistories(prev => {
+ if (prev[activeWorkspace] === msgs) return prev;
+ return { ...prev, [activeWorkspace]: msgs };
+ });
+ }, [activeWorkspace]);
+
+ const getChatModel = (type: WorkspaceType) => {
+ return undefined;
+ };
+
+ const addToHistory = (content: string, type: 'xml' | 'python' | 'json') => {
+ const newItem: HistoryItem = {
+ id: Date.now().toString(),
+ timestamp: Date.now(),
+ content,
+ type
+ };
+ setVersionHistories(prev => ({
+ ...prev,
+ [activeWorkspace]: [...prev[activeWorkspace], newItem]
+ }));
+ };
+
+ const handleRestore = (item: HistoryItem) => {
+ if (item.type === 'xml') setGeneratedXml(item.content);
+ if (item.type === 'python') setGeneratedCadCode(item.content);
+ if (item.type === 'json') setPptIncomingEdit({ id: `${Date.now()}`, payload: item.content });
+ };
+
+ if (showLanding) {
+ return <LandingPage onStart={() => setShowLanding(false)} />;
+ }
+
+ return (
+ <div className="h-screen w-screen flex flex-col bg-background overflow-hidden font-sans">
+ <Toaster position="top-center" richColors />
+ {/* Top Navigation Bar */}
+ <header className="h-14 border-b border-border/40 flex items-center px-6 justify-between bg-background/80 backdrop-blur-md supports-[backdrop-filter]:bg-background/60 z-50 shadow-sm">
+ <div className="flex items-center gap-2.5 font-semibold text-lg tracking-tight text-foreground/90 cursor-pointer" onClick={() => setShowLanding(true)}>
+ <div className="p-1.5 bg-blue-600/10 rounded-lg shadow-sm ring-1 ring-blue-600/20">
+ <Layout className="w-5 h-5 text-blue-600" />
+ </div>
+ <span>Unified AI Workspace</span>
+ </div>
+
+ <div className="flex items-center bg-muted/50 p-1 rounded-xl border border-border/50 shadow-inner">
+ <button
+ onClick={() => setActiveWorkspace('flow')}
+ className={cn(
+ "flex items-center gap-2 px-4 py-1.5 rounded-lg text-sm font-medium transition-all duration-300 ease-out",
+ activeWorkspace === 'flow'
+ ? "bg-background text-foreground shadow-sm ring-1 ring-border/50 scale-100"
+ : "text-muted-foreground hover:text-foreground hover:bg-background/50"
+ )}
+ >
+ <Layers className="w-4 h-4" />
+ 流程图
+ </button>
+ <button
+ onClick={() => setActiveWorkspace('cad')}
+ className={cn(
+ "flex items-center gap-2 px-4 py-1.5 rounded-lg text-sm font-medium transition-all duration-300 ease-out",
+ activeWorkspace === 'cad'
+ ? "bg-background text-foreground shadow-sm ring-1 ring-border/50 scale-100"
+ : "text-muted-foreground hover:text-foreground hover:bg-background/50"
+ )}
+ >
+ <FileCode className="w-4 h-4" />
+ CAD设计
+ </button>
+ <button
+ onClick={() => setActiveWorkspace('ppt')}
+ className={cn(
+ "flex items-center gap-2 px-4 py-1.5 rounded-lg text-sm font-medium transition-all duration-300 ease-out",
+ activeWorkspace === 'ppt'
+ ? "bg-background text-foreground shadow-sm ring-1 ring-border/50 scale-100"
+ : "text-muted-foreground hover:text-foreground hover:bg-background/50"
+ )}
+ >
+ <Presentation className="w-4 h-4" />
+ PPT演示
+ </button>
+ </div>
+
+ <div className="w-48 flex justify-end">
+ <SettingsDialog />
+ </div>
+ </header>
+
+ {/* Main Content Area */}
+ <div className="flex-1 overflow-hidden relative">
+ <ResizablePanelGroup orientation="horizontal" className="h-full" style={{ height: '100%' }}>
+ <ResizablePanel defaultSize={pptChatLocked ? "100%" : "68%"} minSize="30%">
+ <div className="h-full w-full relative bg-muted/20">
+ {activeWorkspace === 'flow' && (
+ <FlowchartWorkspace
+ initialXml={generatedXml}
+ onAddToChat={(code) => handleAddToChat(code, 'xml', 'diagram.xml')}
+ />
+ )}
+ {activeWorkspace === 'cad' && (
+ <CadWorkspace
+ code={generatedCadCode}
+ onAddToChat={(code) => handleAddToChat(code, 'python', 'script.py')}
+ />
+ )}
+ {activeWorkspace === 'ppt' && (
+ <PptWorkspace
+ onAddToChat={(code, name) => handleAddToChat(code, 'json', name)}
+ onPptReadyChange={setPptReady}
+ incomingEdit={pptIncomingEdit}
+ />
+ )}
+ </div>
+ </ResizablePanel>
+
+ {!pptChatLocked && (
+ <>
+ <ResizableHandle withHandle className="bg-border/50 hover:bg-primary/50 transition-colors w-1.5" />
+
+ <ResizablePanel
+ id="chat"
+ panelRef={chatPanelRef}
+ defaultSize="32%"
+ minSize="20%"
+ maxSize="70%"
+ collapsible={!pptChatLocked}
+ collapsedSize="56px"
+ onResize={(panelSize) => {
+ setIsChatCollapsed(panelSize.inPixels <= 80);
+ }}
+ className={cn("transition-all duration-300")}
+ >
+ <ChatPanel
+ key={activeWorkspace}
+ systemPrompt={getSystemPrompt(activeWorkspace)}
+ initialMessages={chatHistories[activeWorkspace]}
+ onMessagesChange={handleMessagesChange}
+ attachments={attachments}
+ chatModel={getChatModel(activeWorkspace)}
+ workspaceId={activeWorkspace}
+ mode={activeWorkspace === 'ppt' ? 'ppt_image' : 'text'}
+ hideHistoryButton={activeWorkspace === 'ppt'}
+ collapsed={isChatCollapsed}
+ collapseLocked={pptChatLocked}
+ title={chatUi.title}
+ inputPlaceholder={chatUi.placeholder}
+ onToggleCollapse={handleToggleCollapse}
+ onRemoveAttachment={(id) => setAttachments(prev => prev.filter(a => a.id !== id))}
+ history={versionHistories[activeWorkspace]}
+ onRestore={handleRestore}
+ onCodeAction={(code, type) => {
+ if (type === 'flow') {
+ setGeneratedXml(code);
+ addToHistory(code, 'xml');
+ } else if (type === 'cad') {
+ setGeneratedCadCode(code);
+ addToHistory(code, 'python');
+ } else if (type === 'ppt') {
+ try {
+ JSON.parse(code);
+ setPptIncomingEdit({ id: `${Date.now()}`, payload: code });
+ addToHistory(code, 'json');
+ } catch (e) {
+ console.error("Failed to parse PPT JSON", e);
+ }
+ }
+ }}
+ />
+ </ResizablePanel>
+ </>
+ )}
+ </ResizablePanelGroup>
+ </div>
+ </div>
+ );
+}
+
+export default App;
diff --git a/src/assets/react.svg b/src/assets/react.svg
new file mode 100644
index 0000000..6c87de9
--- /dev/null
+++ b/src/assets/react.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
\ No newline at end of file
diff --git a/src/components/ChatInput.tsx b/src/components/ChatInput.tsx
new file mode 100644
index 0000000..85f475c
--- /dev/null
+++ b/src/components/ChatInput.tsx
@@ -0,0 +1,206 @@
+import React, { useRef, useEffect, useState, useCallback } from 'react';
+import { Send, FileText, ImageIcon, Paperclip, X, Settings2 } from 'lucide-react';
+import { cn } from '@/lib/utils';
+import { Button } from '@/components/ui/button';
+import { ButtonWithTooltip } from '@/components/button-with-tooltip';
+import { FilePreviewList } from '@/components/file-preview-list';
+import { useFileProcessor } from '@/lib/use-file-processor';
+import { toast } from 'sonner';
+
+interface ChatInputProps {
+ input: string;
+ setInput: (value: string) => void;
+ onSubmit: () => void;
+ isLoading: boolean;
+ onStop?: () => void;
+ onFilesChange?: (files: File[]) => void;
+ files?: File[]; // Controlled files
+ onOpenGlobalConstraints?: () => void; // New prop for global constraints
+ placeholder?: string;
+}
+
+export function ChatInput({
+ input,
+ setInput,
+ onSubmit,
+ isLoading,
+ onStop,
+ onFilesChange,
+ files: controlledFiles,
+ onOpenGlobalConstraints,
+ placeholder
+}: ChatInputProps) {
+ const textareaRef = useRef<HTMLTextAreaElement>(null);
+ const fileInputRef = useRef<HTMLInputElement>(null);
+ const imageInputRef = useRef<HTMLInputElement>(null);
+
+ const { files, handleFileChange, setFiles, pdfData } = useFileProcessor();
+
+ // Sync controlled files if provided
+ useEffect(() => {
+ if (controlledFiles) {
+ setFiles(controlledFiles);
+ }
+ }, [controlledFiles, setFiles]);
+
+ // Notify parent when files change
+ useEffect(() => {
+ onFilesChange?.(files);
+ }, [files, onFilesChange]);
+
+ const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
+ if (e.key === 'Enter' && !e.shiftKey) {
+ e.preventDefault();
+ if (isLoading) onStop?.();
+ else onSubmit();
+ }
+ };
+
+ // Auto-resize textarea
+ useEffect(() => {
+ if (textareaRef.current) {
+ textareaRef.current.style.height = 'auto';
+ textareaRef.current.style.height = `${Math.min(textareaRef.current.scrollHeight, 200)}px`;
+ }
+ }, [input]);
+
+ const handlePaste = (e: React.ClipboardEvent) => {
+ const items = e.clipboardData.items;
+ const pastedFiles: File[] = [];
+
+ for (let i = 0; i < items.length; i++) {
+ if (items[i].kind === 'file') {
+ const file = items[i].getAsFile();
+ if (file) pastedFiles.push(file);
+ }
+ }
+
+ if (pastedFiles.length > 0) {
+ e.preventDefault();
+ handleFileChange([...files, ...pastedFiles]);
+ }
+ };
+
+ const handleDrop = (e: React.DragEvent) => {
+ e.preventDefault();
+ const droppedFiles = Array.from(e.dataTransfer.files);
+ if (droppedFiles.length > 0) {
+ handleFileChange([...files, ...droppedFiles]);
+ }
+ };
+
+ const handleImageUpload = () => imageInputRef.current?.click();
+ const handleFileUpload = () => fileInputRef.current?.click();
+
+ const onFileInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
+ if (e.target.files?.length) {
+ handleFileChange([...files, ...Array.from(e.target.files)]);
+ e.target.value = ''; // Reset
+ }
+ };
+
+ const removeFile = (fileToRemove: File) => {
+ setFiles(files.filter(f => f !== fileToRemove));
+ };
+
+ return (
+ <div
+ className="relative rounded-2xl border border-border/60 bg-background/70 backdrop-blur-xl shadow-[0_10px_40px_-18px_rgba(0,0,0,0.35)] focus-within:ring-2 focus-within:ring-primary/20 focus-within:border-primary transition-all duration-200"
+ onDragOver={(e) => e.preventDefault()}
+ onDrop={handleDrop}
+ >
+ <input
+ type="file"
+ multiple
+ accept="image/*"
+ className="hidden"
+ ref={imageInputRef}
+ onChange={onFileInputChange}
+ />
+ <input
+ type="file"
+ multiple
+ className="hidden"
+ ref={fileInputRef}
+ onChange={onFileInputChange}
+ />
+
+ {files.length > 0 && (
+ <div className="px-3 pt-3">
+ <FilePreviewList
+ files={files}
+ onRemoveFile={removeFile}
+ pdfData={pdfData}
+ />
+ </div>
+ )}
+
+ <div className="flex items-end gap-2 px-2 pb-1 pt-1">
+ <div className="flex-1 min-w-0 px-2">
+ <div className="relative">
+ <textarea
+ ref={textareaRef}
+ value={input}
+ onChange={(e) => setInput(e.target.value)}
+ onKeyDown={handleKeyDown}
+ onPaste={handlePaste}
+ placeholder={placeholder || "输入…"}
+ className={cn(
+ "w-full resize-none bg-transparent border-none px-2 py-2 focus:ring-0 transition-all outline-none text-[15px] leading-6 max-h-[360px] overflow-y-auto min-h-[44px]"
+ )}
+ rows={1}
+ />
+ </div>
+ </div>
+
+ <div className="flex items-center gap-1 pr-1">
+ {onOpenGlobalConstraints && (
+ <ButtonWithTooltip
+ tooltipContent="规则"
+ variant="ghost"
+ size="icon"
+ onClick={onOpenGlobalConstraints}
+ className="h-9 w-9 text-muted-foreground hover:text-primary rounded-lg mr-1"
+ >
+ <Settings2 className="w-4 h-4" />
+ </ButtonWithTooltip>
+ )}
+
+ <ButtonWithTooltip
+ tooltipContent="上传图片"
+ variant="ghost"
+ size="icon"
+ onClick={handleImageUpload}
+ className="h-9 w-9 text-muted-foreground hover:text-foreground rounded-lg"
+ >
+ <ImageIcon className="w-5 h-5" />
+ </ButtonWithTooltip>
+
+ <ButtonWithTooltip
+ tooltipContent="上传文件"
+ variant="ghost"
+ size="icon"
+ onClick={handleFileUpload}
+ className="h-9 w-9 text-muted-foreground hover:text-foreground rounded-lg"
+ >
+ <FileText className="w-5 h-5" />
+ </ButtonWithTooltip>
+
+ <Button
+ onClick={isLoading ? onStop : onSubmit}
+ disabled={isLoading ? !onStop : (!input.trim() && files.length === 0)}
+ size="icon"
+ className={cn(
+ "h-9 w-9 rounded-xl transition-all duration-200 ml-1",
+ (input.trim() || files.length > 0)
+ ? "bg-primary text-primary-foreground shadow-md hover:scale-105 hover:bg-primary/90"
+ : "bg-muted text-muted-foreground"
+ )}
+ >
+ {isLoading ? <X className="w-4 h-4" /> : <Send className="w-4 h-4" />}
+ </Button>
+ </div>
+ </div>
+ </div>
+ );
+}
diff --git a/src/components/ChatMessageDisplay.tsx b/src/components/ChatMessageDisplay.tsx
new file mode 100644
index 0000000..0e77ebe
--- /dev/null
+++ b/src/components/ChatMessageDisplay.tsx
@@ -0,0 +1,446 @@
+import React, { useRef, useEffect, useState, useCallback } from 'react';
+import {
+ Check,
+ ChevronDown,
+ ChevronUp,
+ Copy,
+ Cpu,
+ FileCode,
+ FileText,
+ Loader2,
+ Minus,
+ Pencil,
+ Plus,
+ RotateCcw,
+ ThumbsDown,
+ ThumbsUp,
+ X,
+} from "lucide-react";
+import ReactMarkdown from "react-markdown";
+import remarkGfm from 'remark-gfm';
+import { Reasoning, ReasoningContent, ReasoningTrigger } from "@/components/ai-elements/reasoning";
+import { ScrollArea } from "@/components/ui/scroll-area";
+import { CodeBlock } from "@/components/ui/code-block";
+import { cn } from "@/lib/utils";
+
+// Types
+export interface MessagePart {
+ type: 'text' | 'reasoning' | 'tool-call' | 'tool-result' | 'file';
+ text?: string;
+ toolName?: string;
+ toolCallId?: string;
+ state?: string;
+ input?: any;
+ output?: string;
+ url?: string; // for images
+}
+
+export interface UIMessage {
+ id: string;
+ role: 'user' | 'assistant' | 'system';
+ content: string; // Fallback
+ parts?: MessagePart[];
+}
+
+interface ChatMessageDisplayProps {
+ messages: UIMessage[];
+ setInput: (input: string) => void;
+ onRegenerate?: (messageIndex: number) => void;
+ onEditMessage?: (messageIndex: number, newText: string) => void;
+ status?: "streaming" | "submitted" | "idle" | "error" | "ready";
+ onDisplayChart?: (xml: string) => void; // Callback for diagram display
+}
+
+// Helper to split text content into regular text and file sections
+interface TextSection {
+ type: "text" | "file";
+ content: string;
+ filename?: string;
+ charCount?: number;
+ fileType?: "pdf" | "text";
+}
+
+function splitTextIntoFileSections(text: string): TextSection[] {
+ const sections: TextSection[] = [];
+ const filePattern = /\[(PDF|File):\s*([^\]]+)\]\n([\s\S]*?)(?=\n\n\[(PDF|File):|$)/g;
+ let lastIndex = 0;
+ let match;
+
+ while ((match = filePattern.exec(text)) !== null) {
+ const beforeText = text.slice(lastIndex, match.index).trim();
+ if (beforeText) {
+ sections.push({ type: "text", content: beforeText });
+ }
+
+ const fileType = match[1].toLowerCase() === "pdf" ? "pdf" : "text";
+ const filename = match[2].trim();
+ const fileContent = match[3].trim();
+ sections.push({
+ type: "file",
+ content: fileContent,
+ filename,
+ charCount: fileContent.length,
+ fileType,
+ });
+
+ lastIndex = match.index + match[0].length;
+ }
+
+ const remainingText = text.slice(lastIndex).trim();
+ if (remainingText) {
+ sections.push({ type: "text", content: remainingText });
+ }
+
+ if (sections.length === 0) {
+ sections.push({ type: "text", content: text });
+ }
+
+ return sections;
+}
+
+const getMessageTextContent = (message: UIMessage): string => {
+ if (message.parts && message.parts.length > 0) {
+ return message.parts
+ .filter((part) => part.type === "text")
+ .map((part) => part.text || "")
+ .join("\n");
+ }
+ return message.content || "";
+};
+
+const getUserOriginalText = (message: UIMessage): string => {
+ const fullText = getMessageTextContent(message);
+ const filePattern = /\n\n\[(PDF|File):\s*[^\]]+\]\n[\s\S]*$/;
+ return fullText.replace(filePattern, "").trim();
+};
+
+export function ChatMessageDisplay({
+ messages,
+ setInput,
+ onRegenerate,
+ onEditMessage,
+ status = "idle",
+ onDisplayChart
+}: ChatMessageDisplayProps) {
+ const scrollRootRef = useRef<HTMLDivElement>(null);
+ const messagesEndRef = useRef<HTMLDivElement>(null);
+ const [copiedMessageId, setCopiedMessageId] = useState<string | null>(null);
+ const [editingMessageId, setEditingMessageId] = useState<string | null>(null);
+ const editTextareaRef = useRef<HTMLTextAreaElement>(null);
+ const [editText, setEditText] = useState<string>("");
+ const [expandedPdfSections, setExpandedPdfSections] = useState<Record<string, boolean>>({});
+ const [isAtBottom, setIsAtBottom] = useState(true);
+
+ const copyMessageToClipboard = async (messageId: string, text: string) => {
+ try {
+ await navigator.clipboard.writeText(text);
+ setCopiedMessageId(messageId);
+ setTimeout(() => setCopiedMessageId(null), 2000);
+ } catch (err) {
+ console.error("Failed to copy:", err);
+ }
+ };
+
+ const getViewport = useCallback(() => {
+ const root = scrollRootRef.current;
+ if (!root) return null;
+ return root.querySelector('[data-radix-scroll-area-viewport]') as HTMLElement | null;
+ }, []);
+
+ const scrollToBottom = useCallback((behavior: ScrollBehavior = "auto") => {
+ const viewport = getViewport();
+ if (!viewport) return;
+ viewport.scrollTo({ top: viewport.scrollHeight, behavior });
+ }, [getViewport]);
+
+ useEffect(() => {
+ const viewport = getViewport();
+ if (!viewport) return;
+
+ const onScroll = () => {
+ const threshold = 48;
+ const distanceToBottom = viewport.scrollHeight - viewport.scrollTop - viewport.clientHeight;
+ setIsAtBottom(distanceToBottom <= threshold);
+ };
+
+ onScroll();
+ viewport.addEventListener("scroll", onScroll, { passive: true });
+ return () => viewport.removeEventListener("scroll", onScroll as any);
+ }, [getViewport]);
+
+ useEffect(() => {
+ if (!isAtBottom) return;
+ scrollToBottom(status === "streaming" ? "auto" : "smooth");
+ }, [messages, status, isAtBottom, scrollToBottom]);
+
+ useEffect(() => {
+ if (editingMessageId && editTextareaRef.current) {
+ editTextareaRef.current.focus();
+ }
+ }, [editingMessageId]);
+
+ // Handle Diagram Code Blocks
+ // We scan messages for XML blocks and trigger onDisplayChart if found
+ // This is a simplified version of tool calls for now
+ useEffect(() => {
+ const lastMessage = messages[messages.length - 1];
+ if (lastMessage && lastMessage.role === 'assistant' && onDisplayChart) {
+ const content = getMessageTextContent(lastMessage);
+ const match = content.match(/```xml\n([\s\S]*?)\n```/);
+ if (match && match[1]) {
+ // De-duplicate: only call if it's new or stable
+ // Since we don't track state here, we rely on parent or idempotency
+ // onDisplayChart(match[1]);
+ // Actually, let's not auto-call here to avoid loops.
+ // The parent (ChatPanel) handles parsing stream.
+ }
+ }
+ }, [messages, onDisplayChart]);
+
+ return (
+ <div ref={scrollRootRef} className="h-full w-full relative">
+ <ScrollArea className="h-full w-full scrollbar-thin">
+ <div className="py-4 px-4 space-y-6">
+ {messages.map((message, messageIndex) => {
+ const userMessageText = message.role === "user" ? getMessageTextContent(message) : "";
+ const isLastAssistantMessage = message.role === "assistant" && messageIndex === messages.length - 1;
+ const isLastUserMessage = message.role === "user" && messageIndex === messages.length - 1;
+ const isEditing = editingMessageId === message.id;
+
+ return (
+ <div
+ key={message.id}
+ className={`flex w-full ${message.role === "user" ? "justify-end" : "justify-start"}`}
+ >
+ <div className={cn("max-w-[95%] min-w-0 flex flex-col", message.role === "user" ? "items-end" : "items-start")}>
+ {/* Role Icon / Header */}
+ <div className="flex items-center gap-2 mb-1.5 px-1">
+ {message.role === 'assistant' ? (
+ <>
+ <div className="w-5 h-5 rounded-full bg-blue-600 flex items-center justify-center">
+ <Cpu className="w-3 h-3 text-white" />
+ </div>
+ <span className="text-xs font-medium text-muted-foreground">AI 助手</span>
+ </>
+ ) : (
+ <>
+ <span className="text-xs font-medium text-muted-foreground">You</span>
+ </>
+ )}
+ </div>
+
+ {/* Content Bubble */}
+ <div className={cn(
+ "relative px-4 py-3 text-sm leading-relaxed shadow-sm break-words overflow-hidden",
+ message.role === "user"
+ ? "bg-primary text-primary-foreground rounded-2xl rounded-tr-sm"
+ : "bg-white dark:bg-zinc-800 border border-border/40 text-foreground rounded-2xl rounded-tl-sm w-full"
+ )}>
+
+ {/* Reasoning Parts */}
+ {message.parts?.map((part, partIndex) => {
+ if (part.type === 'reasoning') {
+ const isLastPart = partIndex === (message.parts?.length ?? 0) - 1;
+ const isStreamingReasoning = status === "streaming" && isLastPart && isLastAssistantMessage;
+ return (
+ <Reasoning
+ key={`reasoning-${partIndex}`}
+ className="w-full"
+ isStreaming={isStreamingReasoning}
+ defaultOpen={isStreamingReasoning}
+ >
+ <ReasoningTrigger />
+ <ReasoningContent>{part.text || ''}</ReasoningContent>
+ </Reasoning>
+ );
+ }
+ return null;
+ })}
+
+ {/* Text Content */}
+ {(() => {
+ const text = getMessageTextContent(message);
+ if (!text) return null;
+
+ // Edit Mode
+ if (isEditing && message.role === "user") {
+ return (
+ <div className="flex flex-col gap-2 min-w-[300px]">
+ <textarea
+ ref={editTextareaRef}
+ value={editText}
+ onChange={(e) => setEditText(e.target.value)}
+ className="w-full px-3 py-2 text-sm rounded-md border border-input bg-background text-foreground resize-none focus:outline-none focus:ring-2 focus:ring-primary"
+ rows={4}
+ />
+ <div className="flex justify-end gap-2">
+ <button
+ onClick={() => setEditingMessageId(null)}
+ className="px-3 py-1 text-xs rounded bg-muted hover:bg-muted/80 text-foreground"
+ >
+ Cancel
+ </button>
+ <button
+ onClick={() => {
+ if (editText.trim() && onEditMessage) {
+ onEditMessage(messageIndex, editText.trim());
+ setEditingMessageId(null);
+ }
+ }}
+ className="px-3 py-1 text-xs rounded bg-primary hover:bg-primary/90 text-primary-foreground"
+ >
+ Save
+ </button>
+ </div>
+ </div>
+ );
+ }
+
+ // Regular Display
+ const sections = splitTextIntoFileSections(text);
+ return (
+ <div className={cn("space-y-3", message.role === "user" ? "text-primary-foreground dark:text-white" : "")}>
+ {sections.map((section, idx) => {
+ if (section.type === 'file') {
+ const key = `${message.id}-file-${idx}`;
+ const isExpanded = expandedPdfSections[key] || false;
+ return (
+ <div key={key} className="rounded-lg border border-border/50 bg-background/50 overflow-hidden">
+ <button
+ onClick={() => setExpandedPdfSections(prev => ({...prev, [key]: !isExpanded}))}
+ className="w-full flex items-center justify-between px-3 py-2 hover:bg-muted/50 transition-colors"
+ >
+ <div className="flex items-center gap-2">
+ {section.fileType === 'pdf' ? (
+ <FileText className="h-4 w-4 text-red-500" />
+ ) : (
+ <FileCode className="h-4 w-4 text-blue-500" />
+ )}
+ <span className="text-xs font-medium truncate max-w-[150px] text-foreground">{section.filename}</span>
+ <span className="text-[10px] text-muted-foreground">({section.charCount} chars)</span>
+ </div>
+ {isExpanded ? <ChevronUp className="h-4 w-4 text-foreground" /> : <ChevronDown className="h-4 w-4 text-foreground" />}
+ </button>
+ {isExpanded && (
+ <div className="px-3 py-2 border-t border-border/50 max-h-48 overflow-y-auto bg-muted/20">
+ <pre className="text-[10px] whitespace-pre-wrap text-muted-foreground font-mono">{section.content}</pre>
+ </div>
+ )}
+ </div>
+ );
+ }
+
+ // Render Markdown
+ // We need to handle code blocks specially to use our CodeBlock component
+ return (
+ <div key={idx} className={cn(
+ "prose prose-sm max-w-none break-words",
+ message.role === "user" ? "prose-invert" : "dark:prose-invert"
+ )}>
+ <ReactMarkdown
+ remarkPlugins={[remarkGfm]}
+ components={{
+ code({node, inline, className, children, ...props}: any) {
+ const match = /language-(\w+)/.exec(className || '')
+ // Check if this is the last message and currently streaming
+ // We only show spinner for the last code block of the last message if streaming
+ // But technically ReactMarkdown renders progressively.
+ // We can check if status is streaming and this is the assistant role.
+ const isStreaming = status === "streaming" && isLastAssistantMessage;
+
+ return !inline && match ? (
+ <CodeBlock
+ code={String(children).replace(/\n$/, '')}
+ language={match[1] as any}
+ isStreaming={isStreaming}
+ />
+ ) : (
+ <code className={className} {...props}>
+ {children}
+ </code>
+ )
+ }
+ }}
+ >
+ {section.content}
+ </ReactMarkdown>
+ </div>
+ );
+ })}
+ </div>
+ );
+ })()}
+
+ {/* Loading Indicator */}
+ {isLastAssistantMessage && status === "streaming" && (
+ <div className="mt-2 flex items-center gap-2 text-xs text-muted-foreground">
+ <Loader2 className="h-3 w-3 animate-spin" />
+ <span>Thinking...</span>
+ </div>
+ )}
+ </div>
+
+ {/* Actions */}
+ <div className="flex items-center gap-1 mt-1 opacity-0 group-hover:opacity-100 transition-opacity px-1">
+ {message.role === "user" && !isEditing && (
+ <>
+ <button
+ onClick={() => {
+ setEditingMessageId(message.id);
+ setEditText(getUserOriginalText(message));
+ }}
+ className="p-1 rounded hover:bg-muted text-muted-foreground"
+ title="Edit"
+ >
+ <Pencil className="h-3 w-3" />
+ </button>
+ <button
+ onClick={() => copyMessageToClipboard(message.id, getUserOriginalText(message))}
+ className="p-1 rounded hover:bg-muted text-muted-foreground"
+ title="Copy"
+ >
+ {copiedMessageId === message.id ? <Check className="h-3 w-3 text-green-500" /> : <Copy className="h-3 w-3" />}
+ </button>
+ </>
+ )}
+ {message.role === "assistant" && (
+ <>
+ <button
+ onClick={() => copyMessageToClipboard(message.id, getMessageTextContent(message))}
+ className="p-1 rounded hover:bg-muted text-muted-foreground"
+ title="Copy"
+ >
+ {copiedMessageId === message.id ? <Check className="h-3 w-3 text-green-500" /> : <Copy className="h-3 w-3" />}
+ </button>
+ {onRegenerate && isLastAssistantMessage && (
+ <button
+ onClick={() => onRegenerate(messageIndex)}
+ className="p-1 rounded hover:bg-muted text-muted-foreground"
+ title="Regenerate"
+ >
+ <RotateCcw className="h-3 w-3" />
+ </button>
+ )}
+ </>
+ )}
+ </div>
+ </div>
+ </div>
+ );
+ })}
+ <div ref={messagesEndRef} />
+ </div>
+ </ScrollArea>
+ {!isAtBottom && messages.length > 0 && (
+ <button
+ type="button"
+ onClick={() => scrollToBottom("smooth")}
+ className="absolute bottom-4 right-4 z-20 inline-flex items-center gap-1 rounded-full border border-border bg-background/90 backdrop-blur px-3 py-1.5 text-xs text-foreground shadow-md hover:bg-background"
+ >
+ <ChevronDown className="w-3.5 h-3.5" />
+ 回到底部
+ </button>
+ )}
+ </div>
+ );
+}
diff --git a/src/components/ChatPanel.tsx b/src/components/ChatPanel.tsx
new file mode 100644
index 0000000..359c2a7
--- /dev/null
+++ b/src/components/ChatPanel.tsx
@@ -0,0 +1,453 @@
+import React, { useState, useRef, useEffect } from 'react';
+import { Bot, Trash2, History, Settings2, SidebarClose, SidebarOpen } from 'lucide-react';
+import { cn } from '@/lib/utils';
+import { streamChatMessage, generateImage, ChatMessage, getAIConfig } from '@/lib/ai-client';
+import { DRAWIO_SYSTEM_PROMPT } from '@/lib/system-prompt';
+import { Button } from '@/components/ui/button';
+import { ChatInput } from '@/components/ChatInput';
+import { ChatMessageDisplay, UIMessage } from '@/components/ChatMessageDisplay';
+import { GlobalConstraintsDialog, STORAGE_GLOBAL_CONSTRAINTS_KEY } from '@/components/global-constraints-dialog';
+import { HistoryDialog, HistoryItem } from '@/components/history-dialog';
+import { ResetWarningModal } from '@/components/reset-warning-modal';
+import { useFileProcessor } from '@/lib/use-file-processor';
+
+interface Attachment {
+ id: string;
+ type: 'xml' | 'python' | 'json' | 'image' | 'text';
+ content: string;
+ name: string;
+}
+
+interface ChatPanelProps {
+ className?: string;
+ attachments?: Attachment[];
+ onRemoveAttachment?: (id: string) => void;
+ onCodeAction?: (code: string, type: 'flow' | 'cad' | 'ppt') => void;
+ systemPrompt?: string;
+ initialMessages?: ChatMessage[];
+ onMessagesChange?: (messages: ChatMessage[]) => void;
+ chatModel?: string;
+ workspaceId?: string;
+ mode?: 'text' | 'ppt_image';
+ hideHistoryButton?: boolean;
+ collapsed?: boolean;
+ onToggleCollapse?: () => void;
+ collapseLocked?: boolean;
+ title?: string;
+ inputPlaceholder?: string;
+ // History props
+ history?: HistoryItem[];
+ onRestore?: (item: HistoryItem) => void;
+}
+
+const STORAGE_KEY_PREFIX = 'chat_history_v2_';
+
+// Convert internal ChatMessage to UIMessage
+const toUIMessage = (msg: ChatMessage, index: number): UIMessage => ({
+ id: `msg-${index}-${Date.now()}`,
+ role: msg.role as any,
+ content: msg.content,
+ parts: [{ type: 'text', text: msg.content }]
+});
+
+export function ChatPanel({
+ className,
+ attachments = [],
+ onRemoveAttachment,
+ onCodeAction,
+ systemPrompt = DRAWIO_SYSTEM_PROMPT,
+ initialMessages = [],
+ onMessagesChange,
+ chatModel,
+ workspaceId = 'default',
+ mode = 'text',
+ hideHistoryButton = false,
+ collapsed = false,
+ onToggleCollapse,
+ collapseLocked = false,
+ title = "AI 助手",
+ inputPlaceholder,
+ history = [],
+ onRestore
+}: ChatPanelProps) {
+ // Persistence key
+ const storageKey = `${STORAGE_KEY_PREFIX}${workspaceId}`;
+
+ const [messages, setMessages] = useState<ChatMessage[]>(() => {
+ if (typeof window !== 'undefined') {
+ const saved = localStorage.getItem(storageKey);
+ if (saved) {
+ try {
+ return JSON.parse(saved);
+ } catch (e) {
+ console.error("Failed to parse chat history", e);
+ }
+ }
+ }
+ return initialMessages.length > 0 ? initialMessages : [
+ { role: 'assistant', content: '你好!我是你的 AI 助手。请告诉我你的需求。' }
+ ];
+ });
+
+ const [input, setInput] = useState('');
+ const [isLoading, setIsLoading] = useState(false);
+ const [showGlobalConstraints, setShowGlobalConstraints] = useState(false);
+ const [showHistory, setShowHistory] = useState(false);
+ const [showResetWarning, setShowResetWarning] = useState(false);
+
+ const [files, setFiles] = useState<File[]>([]);
+ const abortControllerRef = useRef<AbortController | null>(null);
+
+ // Persist messages
+ useEffect(() => {
+ localStorage.setItem(storageKey, JSON.stringify(messages));
+ onMessagesChange?.(messages);
+ }, [messages, storageKey, onMessagesChange]);
+
+ const clearHistory = () => {
+ const newMsgs: ChatMessage[] = [
+ { role: 'assistant', content: '你好!对话记录已清空。' }
+ ];
+ setMessages(newMsgs);
+ setShowResetWarning(false);
+ };
+
+ const handleSend = async () => {
+ if ((!input.trim() && files.length === 0 && attachments.length === 0) || isLoading) return;
+
+ let fullContent = input;
+
+ // Process files for prompt
+ const fileTexts: string[] = [];
+ for (const file of files) {
+ if (file.type.startsWith('image/')) {
+ fileTexts.push(`[Image: ${file.name}]`);
+ } else {
+ // Text/PDF
+ const { extractPdfText, extractTextFileContent, isPdfFile } = await import('@/lib/pdf-utils');
+ try {
+ let content = "";
+ if (isPdfFile(file)) {
+ content = await extractPdfText(file);
+ } else {
+ content = await extractTextFileContent(file);
+ }
+ fileTexts.push(`[${isPdfFile(file) ? 'PDF' : 'File'}: ${file.name}]\n${content}`);
+ } catch (e) {
+ console.error("Failed to read file", file.name, e);
+ fileTexts.push(`[File: ${file.name}] (Failed to read content)`);
+ }
+ }
+ }
+
+ const contextAttachmentsText = attachments.length > 0
+ ? attachments
+ .slice(0, 12)
+ .map((a, idx) => {
+ const header = `[Context ${idx + 1}: ${a.name} | ${a.type}]`;
+ const body = String(a.content || "").slice(0, 12000);
+ return `${header}\n\`\`\`${a.type}\n${body}\n\`\`\``;
+ })
+ .join("\n\n")
+ : "";
+
+ const parts = [fullContent, fileTexts.length > 0 ? fileTexts.join("\n\n") : "", contextAttachmentsText].filter(Boolean);
+ fullContent = parts.join("\n\n");
+
+ const userMessage: ChatMessage = { role: 'user', content: fullContent };
+
+ const newMessages = [...messages, userMessage];
+ setMessages(newMessages);
+ setInput('');
+ setFiles([]);
+
+ setIsLoading(true);
+ abortControllerRef.current?.abort();
+ const controller = new AbortController();
+ abortControllerRef.current = controller;
+
+ try {
+ if (mode === 'ppt_image') {
+ const parseSlideFromAttachments = () => {
+ const jsonAttachments = attachments.filter((a) => a.type === 'json');
+ for (let i = jsonAttachments.length - 1; i >= 0; i -= 1) {
+ const a = jsonAttachments[i];
+ try {
+ const parsed = JSON.parse(a.content);
+ if (parsed && typeof parsed === 'object' && typeof parsed.id === 'string') {
+ return {
+ id: String(parsed.id),
+ title: typeof parsed.title === 'string' ? parsed.title : '',
+ content: Array.isArray(parsed.content) ? parsed.content.map((x: any) => String(x)) : [],
+ description: typeof parsed.description === 'string' ? parsed.description : '',
+ imageUrl: typeof parsed.imageUrl === 'string' ? parsed.imageUrl : ''
+ };
+ }
+ } catch {
+ }
+ }
+ return null;
+ };
+
+ const slide = parseSlideFromAttachments();
+ if (!slide?.imageUrl) {
+ } else {
+ const prompt = `Edit a presentation slide image.
+${slide ? `Slide id: ${slide.id}\nSlide title: ${slide.title}\nBullets: ${(slide.content || []).join(" | ")}\nExisting description: ${slide.description || ""}\n` : ""}User instruction:
+${fullContent}
+
+Rules:
+- Keep the slide professional and readable.
+- Do not add watermark.
+- Avoid long paragraphs of text in the image.
+`;
+
+ setMessages(prev => [...prev, { role: 'assistant', content: '' }]);
+ const imageUrl = await generateImage(
+ { prompt, referenceImageUrl: slide?.imageUrl || undefined },
+ controller.signal
+ );
+
+ if (imageUrl) {
+ setMessages(prev => {
+ const last = prev[prev.length - 1];
+ if (last?.role === 'assistant') {
+ return [...prev.slice(0, -1), { role: 'assistant', content: `![slide](${imageUrl})` }];
+ }
+ return [...prev, { role: 'assistant', content: `![slide](${imageUrl})` }];
+ });
+
+ if (slide?.id) {
+ const payload = JSON.stringify({ slides: [{ id: slide.id, imageUrl, instruction: fullContent }] });
+ onCodeAction?.(payload, 'ppt');
+ }
+ } else {
+ setMessages(prev => {
+ const last = prev[prev.length - 1];
+ if (last?.role === 'assistant') {
+ return [...prev.slice(0, -1), { role: 'assistant', content: "未能生成图片,请重试。" }];
+ }
+ return [...prev, { role: 'assistant', content: "未能生成图片,请重试。" }];
+ });
+ }
+
+ return;
+ }
+ }
+
+ // Get Global Config
+ const config = getAIConfig();
+ // Load global constraints from storage (scoped by workspaceId)
+ const constraintsKey = workspaceId ? `${STORAGE_GLOBAL_CONSTRAINTS_KEY}-${workspaceId}` : STORAGE_GLOBAL_CONSTRAINTS_KEY;
+ const globalConstraints = typeof window !== 'undefined' ? localStorage.getItem(constraintsKey) || '' : '';
+ const globalSystemPrompt = config.systemPrompt || '';
+
+ const systemContent = [systemPrompt, globalSystemPrompt, globalConstraints].filter(Boolean).join('\n\n');
+
+ const apiMessages: ChatMessage[] = [
+ { role: 'system', content: systemContent },
+ ...newMessages
+ ];
+
+ setMessages(prev => [...prev, { role: 'assistant', content: '' }]);
+
+ let fullResponse = '';
+ await streamChatMessage(apiMessages, (chunk) => {
+ fullResponse = chunk;
+ setMessages(prev => {
+ const last = prev[prev.length - 1];
+ if (last.role === 'assistant') {
+ return [...prev.slice(0, -1), { role: 'assistant', content: chunk }];
+ }
+ return prev;
+ });
+ }, chatModel, controller.signal);
+
+ if (fullResponse) {
+ // Match XML
+ const xmlMatch = fullResponse.match(/```xml\n([\s\S]*?)\n```/);
+ if (xmlMatch && xmlMatch[1]) {
+ const xml = xmlMatch[1];
+ onCodeAction?.(xml, 'flow');
+ }
+
+ // Match Python
+ const pyMatch = fullResponse.match(/```python\n([\s\S]*?)\n```/);
+ if (pyMatch && pyMatch[1]) {
+ onCodeAction?.(pyMatch[1], 'cad');
+ }
+
+ // Match SVG (for CAD)
+ const svgMatch = fullResponse.match(/```svg\n([\s\S]*?)\n```/);
+ if (svgMatch && svgMatch[1]) {
+ onCodeAction?.(svgMatch[1], 'cad');
+ }
+
+ // Match JSON (PPT)
+ const jsonMatch = fullResponse.match(/```json\n([\s\S]*?)\n```/);
+ if (jsonMatch && jsonMatch[1]) {
+ onCodeAction?.(jsonMatch[1], 'ppt');
+ }
+ }
+
+ } catch (error) {
+ if ((error as any)?.name === "AbortError") {
+ setMessages(prev => {
+ const last = prev[prev.length - 1];
+ if (last?.role === 'assistant') {
+ const next = last.content ? `${last.content}\n\n(已中断)` : "(已中断)";
+ return [...prev.slice(0, -1), { role: 'assistant', content: next }];
+ }
+ return [...prev, { role: 'assistant', content: "(已中断)" }];
+ });
+ return;
+ }
+ setMessages(prev => {
+ const last = prev[prev.length - 1];
+ if (last.role === 'assistant' && !last.content) {
+ return [...prev.slice(0, -1), { role: 'assistant', content: "抱歉,遇到错误。请检查设置中的 API Key 是否正确。" }];
+ }
+ return [...prev, { role: 'assistant', content: "抱歉,遇到错误。请检查设置中的 API Key 是否正确。" }];
+ });
+ } finally {
+ setIsLoading(false);
+ abortControllerRef.current = null;
+ }
+ };
+
+ const handleStop = () => {
+ if (!isLoading) return;
+ abortControllerRef.current?.abort();
+ };
+
+ const uiMessages: UIMessage[] = messages.map((msg, idx) => ({
+ id: `msg-${idx}`,
+ role: msg.role as any,
+ content: msg.content,
+ parts: [{ type: 'text', text: msg.content }]
+ }));
+
+ if (collapsed) {
+ return (
+ <div className={cn("h-full border-l border-border bg-background flex flex-col items-center py-4 gap-4 w-full", className)}>
+ <Button variant="ghost" size="icon" onClick={onToggleCollapse} title="展开聊天">
+ <SidebarOpen className="w-5 h-5 text-muted-foreground" />
+ </Button>
+ <div className="flex-1" />
+ <Button variant="ghost" size="icon" onClick={() => setShowGlobalConstraints(true)} title="全局约束">
+ <Settings2 className="w-5 h-5 text-muted-foreground" />
+ </Button>
+ </div>
+ );
+ }
+
+ return (
+ <div className={cn("flex flex-col h-full bg-background border-l border-border", className)}>
+ {/* Header */}
+ <div className="h-14 px-6 border-b border-border flex items-center justify-between bg-background/50 backdrop-blur z-10">
+ <div className="flex items-center gap-2 font-medium">
+ <Bot className="w-5 h-5 text-primary" />
+ <span>{title}</span>
+ </div>
+ <div className="flex items-center gap-1">
+ {!hideHistoryButton && (
+ <Button
+ variant="ghost"
+ size="icon"
+ onClick={() => setShowHistory(true)}
+ className="h-8 w-8 text-muted-foreground hover:text-foreground"
+ title="版本历史"
+ >
+ <History className="w-4 h-4" />
+ </Button>
+ )}
+ <Button
+ variant="ghost"
+ size="icon"
+ onClick={() => setShowResetWarning(true)}
+ className="h-8 w-8 text-muted-foreground hover:text-destructive transition-colors"
+ title="清空对话"
+ >
+ <Trash2 className="w-4 h-4" />
+ </Button>
+ {onToggleCollapse && (
+ <Button
+ variant="ghost"
+ size="icon"
+ onClick={onToggleCollapse}
+ title={collapseLocked ? "PPT 生成完成前不能收起聊天" : "收起聊天"}
+ disabled={collapseLocked}
+ >
+ <SidebarClose className="w-4 h-4 text-muted-foreground" />
+ </Button>
+ )}
+ </div>
+ </div>
+
+ {/* Messages */}
+ <div className="flex-1 overflow-hidden relative">
+ <ChatMessageDisplay
+ messages={uiMessages}
+ setInput={setInput}
+ status={isLoading ? "streaming" : "idle"}
+ onDisplayChart={(xml) => onCodeAction?.(xml, 'flow')}
+ />
+ </div>
+
+ {/* Input */}
+ <div className="p-4 bg-background/50 backdrop-blur relative z-20">
+ {attachments.length > 0 && (
+ <div className="mb-3 flex flex-wrap gap-2">
+ {attachments.map((a) => (
+ <div
+ key={a.id}
+ className="flex items-center gap-2 rounded-full border border-border bg-muted/40 px-3 py-1 text-xs text-muted-foreground"
+ title={a.name}
+ >
+ <span className="max-w-[240px] truncate">{a.name}</span>
+ {onRemoveAttachment && (
+ <button
+ type="button"
+ onClick={() => onRemoveAttachment(a.id)}
+ className="text-muted-foreground/80 hover:text-foreground transition-colors"
+ >
+ ×
+ </button>
+ )}
+ </div>
+ ))}
+ </div>
+ )}
+ <ChatInput
+ input={input}
+ setInput={setInput}
+ onSubmit={handleSend}
+ isLoading={isLoading}
+ onStop={handleStop}
+ onFilesChange={setFiles}
+ files={files}
+ onOpenGlobalConstraints={() => setShowGlobalConstraints(true)}
+ placeholder={inputPlaceholder}
+ />
+ </div>
+
+ {/* Dialogs */}
+ <GlobalConstraintsDialog
+ open={showGlobalConstraints}
+ onOpenChange={setShowGlobalConstraints}
+ workspaceId={workspaceId}
+ />
+ <HistoryDialog
+ showHistory={showHistory}
+ onToggleHistory={setShowHistory}
+ history={history}
+ onRestore={(item) => onRestore && onRestore(item)}
+ />
+ <ResetWarningModal
+ open={showResetWarning}
+ onOpenChange={setShowResetWarning}
+ onClear={clearHistory}
+ />
+ </div>
+ );
+}
diff --git a/src/components/Empty.tsx b/src/components/Empty.tsx
new file mode 100644
index 0000000..8adbda3
--- /dev/null
+++ b/src/components/Empty.tsx
@@ -0,0 +1,8 @@
+import { cn } from '@/lib/utils'
+
+// Empty component
+export default function Empty() {
+ return (
+ <div className={cn('flex h-full items-center justify-center')}>Empty</div>
+ )
+}
diff --git a/src/components/SettingsDialog.tsx b/src/components/SettingsDialog.tsx
new file mode 100644
index 0000000..6ec8127
--- /dev/null
+++ b/src/components/SettingsDialog.tsx
@@ -0,0 +1,124 @@
+import React, { useState, useEffect } from 'react';
+import { createPortal } from 'react-dom';
+import { Settings, X, Save } from 'lucide-react';
+import { getAIConfig, saveAIConfig, AIConfig } from '@/lib/ai-client';
+import { Button } from '@/components/ui/button';
+import { cn } from '@/lib/utils';
+
+export function SettingsDialog() {
+ const [isOpen, setIsOpen] = useState(false);
+ const [config, setConfig] = useState<AIConfig>(getAIConfig());
+
+ // Reload config when dialog opens
+ useEffect(() => {
+ if (isOpen) {
+ setConfig(getAIConfig());
+ }
+ }, [isOpen]);
+
+ const handleSave = () => {
+ saveAIConfig(config);
+ setIsOpen(false);
+ // Reload page to ensure all components pick up new config (simplest way)
+ window.location.reload();
+ };
+
+ return (
+ <>
+ <Button
+ variant="ghost"
+ size="icon"
+ onClick={() => setIsOpen(true)}
+ className="text-muted-foreground hover:text-foreground"
+ title="设置"
+ >
+ <Settings className="w-5 h-5" />
+ </Button>
+
+ {isOpen && createPortal(
+ <div className="fixed inset-0 z-[100] flex items-center justify-center bg-black/40 backdrop-blur-sm p-4 animate-in fade-in duration-200">
+ <div className="bg-background rounded-xl shadow-2xl w-full max-w-md border border-border/50 flex flex-col max-h-[90vh] animate-in zoom-in-95 duration-200 overflow-hidden">
+ <div className="flex items-center justify-between p-6 border-b border-border/50 bg-muted/10">
+ <div>
+ <h2 className="text-lg font-semibold text-foreground tracking-tight">配置设置</h2>
+ <p className="text-xs text-muted-foreground mt-1">配置 AI 模型参数与 API 密钥</p>
+ </div>
+ <Button variant="ghost" size="icon" onClick={() => setIsOpen(false)} className="h-8 w-8 rounded-full hover:bg-muted/50">
+ <X className="w-4 h-4" />
+ </Button>
+ </div>
+
+ <div className="p-6 space-y-5 overflow-y-auto">
+ <div className="space-y-2">
+ <label className="text-sm font-medium text-foreground flex items-center gap-2">
+ API Key
+ <span className="text-xs text-muted-foreground font-normal">(Authorization)</span>
+ </label>
+ <input
+ type="password"
+ value={config.apiKey}
+ onChange={(e) => setConfig({...config, apiKey: e.target.value})}
+ className="flex h-10 w-full rounded-lg border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 transition-all shadow-sm"
+ placeholder="sk-..."
+ />
+ </div>
+
+ <div className="space-y-2">
+ <label className="text-sm font-medium text-foreground">Base URL</label>
+ <input
+ type="text"
+ value={config.baseUrl}
+ onChange={(e) => setConfig({...config, baseUrl: e.target.value})}
+ className="flex h-10 w-full rounded-lg border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 transition-all shadow-sm"
+ placeholder="https://api.example.com/v1"
+ />
+ </div>
+
+ <div className="grid grid-cols-1 gap-5 pt-2">
+ <div className="space-y-2">
+ <label className="text-sm font-medium text-foreground">对话模型 (Chat Model)</label>
+ <input
+ type="text"
+ value={config.chatModel}
+ onChange={(e) => setConfig({...config, chatModel: e.target.value})}
+ className="flex h-10 w-full rounded-lg border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 transition-all shadow-sm"
+ placeholder="gpt-3.5-turbo"
+ />
+ </div>
+
+ <div className="space-y-2">
+ <label className="text-sm font-medium text-foreground">绘图模型 (Image Model)</label>
+ <input
+ type="text"
+ value={config.imageModel}
+ onChange={(e) => setConfig({...config, imageModel: e.target.value})}
+ className="flex h-10 w-full rounded-lg border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 transition-all shadow-sm"
+ placeholder="gemini-2.5-flash-image-preview"
+ />
+ </div>
+ </div>
+ </div>
+
+ <div className="p-4 px-6 border-t border-border/50 flex justify-end gap-3 bg-muted/5">
+ <Button
+ variant="outline"
+ onClick={() => setIsOpen(false)}
+ className="rounded-lg hover:bg-muted"
+ >
+ 取消
+ </Button>
+ <Button
+ onClick={handleSave}
+ className="gap-2 rounded-lg shadow-sm"
+ >
+ <Save className="w-4 h-4" />
+ 保存并刷新
+ </Button>
+ </div>
+ </div>
+ </div>,
+ document.body
+ )}
+ </>
+ );
+}
diff --git a/src/components/ai-elements/reasoning.tsx b/src/components/ai-elements/reasoning.tsx
new file mode 100644
index 0000000..677b1d1
--- /dev/null
+++ b/src/components/ai-elements/reasoning.tsx
@@ -0,0 +1,181 @@
+import { useControllableState } from "@radix-ui/react-use-controllable-state"
+import { BrainIcon, ChevronDownIcon } from "lucide-react"
+import type { ComponentProps, ReactNode } from "react"
+import { createContext, memo, useContext, useEffect, useState } from "react"
+import {
+ Collapsible,
+ CollapsibleContent,
+ CollapsibleTrigger,
+} from "@/components/ui/collapsible"
+import { cn } from "@/lib/utils"
+import { Shimmer } from "./shimmer"
+
+type ReasoningContextValue = {
+ isStreaming: boolean
+ isOpen: boolean
+ setIsOpen: (open: boolean) => void
+ duration: number | undefined
+}
+
+const ReasoningContext = createContext<ReasoningContextValue | null>(null)
+
+export const useReasoning = () => {
+ const context = useContext(ReasoningContext)
+ if (!context) {
+ throw new Error("Reasoning components must be used within Reasoning")
+ }
+ return context
+}
+
+export type ReasoningProps = ComponentProps<typeof Collapsible> & {
+ isStreaming?: boolean
+ open?: boolean
+ defaultOpen?: boolean
+ onOpenChange?: (open: boolean) => void
+ duration?: number
+}
+
+const AUTO_CLOSE_DELAY = 1000
+const MS_IN_S = 1000
+
+export const Reasoning = memo(
+ ({
+ className,
+ isStreaming = false,
+ open,
+ defaultOpen = true,
+ onOpenChange,
+ duration: durationProp,
+ children,
+ ...props
+ }: ReasoningProps) => {
+ const [isOpen, setIsOpen] = useControllableState({
+ prop: open,
+ defaultProp: defaultOpen,
+ onChange: onOpenChange,
+ })
+ const [duration, setDuration] = useControllableState({
+ prop: durationProp,
+ defaultProp: undefined,
+ })
+
+ const [hasAutoClosed, setHasAutoClosed] = useState(false)
+ const [startTime, setStartTime] = useState<number | null>(null)
+
+ useEffect(() => {
+ if (isStreaming) {
+ if (startTime === null) {
+ setStartTime(Date.now())
+ }
+ } else if (startTime !== null) {
+ setDuration(Math.ceil((Date.now() - startTime) / MS_IN_S))
+ setStartTime(null)
+ }
+ }, [isStreaming, startTime, setDuration])
+
+ useEffect(() => {
+ if (defaultOpen && !isStreaming && isOpen && !hasAutoClosed) {
+ const timer = setTimeout(() => {
+ setIsOpen(false)
+ setHasAutoClosed(true)
+ }, AUTO_CLOSE_DELAY)
+
+ return () => clearTimeout(timer)
+ }
+ }, [isStreaming, isOpen, defaultOpen, setIsOpen, hasAutoClosed])
+
+ const handleOpenChange = (newOpen: boolean) => {
+ setIsOpen(newOpen)
+ }
+
+ return (
+ <ReasoningContext.Provider
+ value={{ isStreaming, isOpen, setIsOpen, duration }}
+ >
+ <Collapsible
+ className={cn("not-prose mb-4", className)}
+ onOpenChange={handleOpenChange}
+ open={isOpen}
+ {...props}
+ >
+ {children}
+ </Collapsible>
+ </ReasoningContext.Provider>
+ )
+ },
+)
+
+export type ReasoningTriggerProps = ComponentProps<
+ typeof CollapsibleTrigger
+> & {
+ getThinkingMessage?: (isStreaming: boolean, duration?: number) => ReactNode
+}
+
+const defaultGetThinkingMessage = (isStreaming: boolean, duration?: number) => {
+ if (isStreaming || duration === 0) {
+ return <Shimmer duration={1}>Thinking...</Shimmer>
+ }
+ if (duration === undefined) {
+ return <p>Thought for a few seconds</p>
+ }
+ return <p>Thought for {duration} seconds</p>
+}
+
+export const ReasoningTrigger = memo(
+ ({
+ className,
+ children,
+ getThinkingMessage = defaultGetThinkingMessage,
+ ...props
+ }: ReasoningTriggerProps) => {
+ const { isStreaming, isOpen, duration } = useReasoning()
+
+ return (
+ <CollapsibleTrigger
+ className={cn(
+ "flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",
+ className,
+ )}
+ {...props}
+ >
+ {children ?? (
+ <>
+ <BrainIcon className="size-4" />
+ {getThinkingMessage(isStreaming, duration)}
+ <ChevronDownIcon
+ className={cn(
+ "size-4 transition-transform",
+ isOpen ? "rotate-180" : "rotate-0",
+ )}
+ />
+ </>
+ )}
+ </CollapsibleTrigger>
+ )
+ },
+)
+
+export type ReasoningContentProps = ComponentProps<
+ typeof CollapsibleContent
+> & {
+ children: string
+}
+
+export const ReasoningContent = memo(
+ ({ className, children, ...props }: ReasoningContentProps) => (
+ <CollapsibleContent
+ className={cn(
+ "mt-4 text-sm",
+ "data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",
+ className,
+ )}
+ {...props}
+ >
+ <div className="whitespace-pre-wrap">{children}</div>
+ </CollapsibleContent>
+ ),
+)
+
+Reasoning.displayName = "Reasoning"
+ReasoningTrigger.displayName = "ReasoningTrigger"
+ReasoningContent.displayName = "ReasoningContent"
diff --git a/src/components/ai-elements/shimmer.tsx b/src/components/ai-elements/shimmer.tsx
new file mode 100644
index 0000000..e285cd7
--- /dev/null
+++ b/src/components/ai-elements/shimmer.tsx
@@ -0,0 +1,62 @@
+import { motion } from "framer-motion"
+import {
+ type CSSProperties,
+ type ElementType,
+ type JSX,
+ memo,
+ useMemo,
+} from "react"
+import { cn } from "@/lib/utils"
+
+export type TextShimmerProps = {
+ children: string
+ as?: ElementType
+ className?: string
+ duration?: number
+ spread?: number
+}
+
+const ShimmerComponent = ({
+ children,
+ as: Component = "p",
+ className,
+ duration = 2,
+ spread = 2,
+}: TextShimmerProps) => {
+ const MotionComponent = motion.create(
+ Component as keyof JSX.IntrinsicElements,
+ )
+
+ const dynamicSpread = useMemo(
+ () => (children?.length ?? 0) * spread,
+ [children, spread],
+ )
+
+ return (
+ <MotionComponent
+ animate={{ backgroundPosition: "0% center" }}
+ className={cn(
+ "relative inline-block bg-[length:250%_100%,auto] bg-clip-text text-transparent",
+ "[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]",
+ className,
+ )}
+ initial={{ backgroundPosition: "100% center" }}
+ style={
+ {
+ "--spread": `${dynamicSpread}px`,
+ backgroundImage:
+ "var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))",
+ } as CSSProperties
+ }
+ transition={{
+ repeat: Number.POSITIVE_INFINITY,
+ duration,
+ ease: "linear",
+ }}
+ >
+ {children}
+ </MotionComponent>
+ )
+}
+
+export const Shimmer = memo(ShimmerComponent)
diff --git a/src/components/button-with-tooltip.tsx b/src/components/button-with-tooltip.tsx
new file mode 100644
index 0000000..089b059
--- /dev/null
+++ b/src/components/button-with-tooltip.tsx
@@ -0,0 +1,36 @@
+import type { VariantProps } from "class-variance-authority"
+import type React from "react"
+import { Button, type buttonVariants } from "@/components/ui/button"
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+} from "@/components/ui/tooltip"
+
+interface ButtonWithTooltipProps
+ extends React.ComponentProps<"button">,
+ VariantProps<typeof buttonVariants> {
+ tooltipContent: string
+ children: React.ReactNode
+ asChild?: boolean
+}
+
+export function ButtonWithTooltip({
+ tooltipContent,
+ children,
+ ...buttonProps
+}: ButtonWithTooltipProps) {
+ return (
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button {...buttonProps}>{children}</Button>
+ </TooltipTrigger>
+ <TooltipContent className="max-w-xs text-wrap">
+ {tooltipContent}
+ </TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+ )
+}
diff --git a/src/components/error-toast.tsx b/src/components/error-toast.tsx
new file mode 100644
index 0000000..310d69c
--- /dev/null
+++ b/src/components/error-toast.tsx
@@ -0,0 +1,22 @@
+import { XCircle, X } from "lucide-react"
+import type React from "react"
+
+interface ErrorToastProps {
+ message: React.ReactNode
+ onDismiss: () => void
+}
+
+export function ErrorToast({ message, onDismiss }: ErrorToastProps) {
+ return (
+ <div className="flex items-start gap-3 bg-destructive/10 border border-destructive/20 text-destructive rounded-lg p-4 shadow-lg w-full max-w-md relative">
+ <XCircle className="h-5 w-5 shrink-0 mt-0.5" />
+ <div className="flex-1 text-sm font-medium">{message}</div>
+ <button
+ onClick={onDismiss}
+ className="absolute top-2 right-2 p-1 hover:bg-destructive/10 rounded-full transition-colors"
+ >
+ <X className="h-4 w-4" />
+ </button>
+ </div>
+ )
+}
diff --git a/src/components/file-preview-list.tsx b/src/components/file-preview-list.tsx
new file mode 100644
index 0000000..d7e5975
--- /dev/null
+++ b/src/components/file-preview-list.tsx
@@ -0,0 +1,178 @@
+"use client"
+
+import { FileCode, FileText, Loader2, X } from "lucide-react"
+import { useEffect, useRef, useState } from "react"
+import { isPdfFile, isTextFile } from "@/lib/pdf-utils"
+import { type FileData } from "@/lib/use-file-processor"
+
+function formatCharCount(count: number): string {
+ if (count >= 1000) {
+ return `${(count / 1000).toFixed(1)}k`
+ }
+ return String(count)
+}
+
+interface FilePreviewListProps {
+ files: File[]
+ onRemoveFile: (fileToRemove: File) => void
+ pdfData?: Map<File, FileData>
+}
+
+export function FilePreviewList({
+ files,
+ onRemoveFile,
+ pdfData = new Map(),
+}: FilePreviewListProps) {
+ const [selectedImage, setSelectedImage] = useState<string | null>(null)
+ const [imageUrls, setImageUrls] = useState<Map<File, string>>(new Map())
+ const imageUrlsRef = useRef<Map<File, string>>(new Map())
+
+ // Create and cleanup object URLs when files change
+ useEffect(() => {
+ const currentUrls = imageUrlsRef.current
+ const newUrls = new Map<File, string>()
+
+ files.forEach((file) => {
+ if (file.type.startsWith("image/")) {
+ // Reuse existing URL if file is already tracked
+ const existingUrl = currentUrls.get(file)
+ if (existingUrl) {
+ newUrls.set(file, existingUrl)
+ } else {
+ newUrls.set(file, URL.createObjectURL(file))
+ }
+ }
+ })
+
+ // Revoke URLs for files that are no longer in the list
+ currentUrls.forEach((url, file) => {
+ if (!newUrls.has(file)) {
+ URL.revokeObjectURL(url)
+ }
+ })
+
+ imageUrlsRef.current = newUrls
+ setImageUrls(newUrls)
+ }, [files])
+
+ // Cleanup all URLs on unmount only
+ useEffect(() => {
+ return () => {
+ imageUrlsRef.current.forEach((url) => {
+ URL.revokeObjectURL(url)
+ })
+ // Clear the ref so StrictMode remount creates fresh URLs
+ imageUrlsRef.current = new Map()
+ }
+ }, [])
+
+ // Clear selected image if its URL was revoked
+ useEffect(() => {
+ if (
+ selectedImage &&
+ !Array.from(imageUrls.values()).includes(selectedImage)
+ ) {
+ setSelectedImage(null)
+ }
+ }, [imageUrls, selectedImage])
+
+ if (files.length === 0) return null
+
+ return (
+ <>
+ <div className="flex flex-wrap gap-2 mt-2 p-2 bg-muted/50 rounded-md">
+ {files.map((file, index) => {
+ const imageUrl = imageUrls.get(file) || null
+ const pdfInfo = pdfData.get(file)
+ return (
+ <div key={file.name + index} className="relative group">
+ <div
+ className={`w-20 h-20 border rounded-md overflow-hidden bg-muted ${
+ file.type.startsWith("image/") && imageUrl
+ ? "cursor-pointer"
+ : ""
+ }`}
+ onClick={() =>
+ file.type.startsWith("image/") &&
+ imageUrl &&
+ setSelectedImage(imageUrl)
+ }
+ >
+ {file.type.startsWith("image/") && imageUrl ? (
+ <img
+ src={imageUrl}
+ alt={file.name}
+ className="object-cover w-full h-full"
+ />
+ ) : isPdfFile(file) || isTextFile(file) ? (
+ <div className="flex flex-col items-center justify-center h-full p-1">
+ {pdfInfo?.isExtracting ? (
+ <Loader2 className="h-6 w-6 text-blue-500 mb-1 animate-spin" />
+ ) : isPdfFile(file) ? (
+ <FileText className="h-6 w-6 text-red-500 mb-1" />
+ ) : (
+ <FileCode className="h-6 w-6 text-blue-500 mb-1" />
+ )}
+ <span className="text-xs text-center truncate w-full px-1">
+ {file.name.length > 10
+ ? `${file.name.slice(0, 7)}...`
+ : file.name}
+ </span>
+ {pdfInfo?.isExtracting ? (
+ <span className="text-[10px] text-muted-foreground">
+ Reading...
+ </span>
+ ) : pdfInfo?.charCount ? (
+ <span className="text-[10px] text-green-600 font-medium">
+ {formatCharCount(
+ pdfInfo.charCount,
+ )}{" "}
+ chars
+ </span>
+ ) : null}
+ </div>
+ ) : (
+ <div className="flex items-center justify-center h-full text-xs text-center p-1">
+ {file.name}
+ </div>
+ )}
+ </div>
+ <button
+ type="button"
+ onClick={() => onRemoveFile(file)}
+ className="absolute -top-2 -right-2 bg-destructive rounded-full p-1 opacity-0 group-hover:opacity-100 transition-opacity text-destructive-foreground"
+ aria-label="Remove file"
+ >
+ <X className="h-3 w-3" />
+ </button>
+ </div>
+ )
+ })}
+ </div>
+
+ {/* Image Modal/Lightbox */}
+ {selectedImage && (
+ <div
+ className="fixed inset-0 z-50 bg-black/80 flex items-center justify-center p-4"
+ onClick={() => setSelectedImage(null)}
+ >
+ <button
+ className="absolute top-4 right-4 z-10 bg-white rounded-full p-2 hover:bg-gray-200 transition-colors"
+ onClick={() => setSelectedImage(null)}
+ aria-label="Close"
+ >
+ <X className="h-6 w-6" />
+ </button>
+ <div className="relative w-auto h-auto max-w-[90vw] max-h-[90vh]">
+ <img
+ src={selectedImage}
+ alt="Full size preview of uploaded diagram or image"
+ className="object-contain max-w-full max-h-[90vh] w-auto h-auto"
+ onClick={(e) => e.stopPropagation()}
+ />
+ </div>
+ </div>
+ )}
+ </>
+ )
+}
diff --git a/src/components/global-constraints-dialog.tsx b/src/components/global-constraints-dialog.tsx
new file mode 100644
index 0000000..8e9c377
--- /dev/null
+++ b/src/components/global-constraints-dialog.tsx
@@ -0,0 +1,70 @@
+import { useEffect, useState } from "react"
+import { Button } from "@/components/ui/button"
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+} from "@/components/ui/dialog"
+import { Textarea } from "@/components/ui/textarea"
+
+export const STORAGE_GLOBAL_CONSTRAINTS_KEY = "unified-ai-workspace-global-constraints"
+
+interface GlobalConstraintsDialogProps {
+ open: boolean
+ onOpenChange: (open: boolean) => void
+ workspaceId?: string // Optional workspace ID to scope constraints
+}
+
+export function GlobalConstraintsDialog({
+ open,
+ onOpenChange,
+ workspaceId
+}: GlobalConstraintsDialogProps) {
+ const [constraints, setConstraints] = useState("")
+
+ // Determine the actual storage key
+ const storageKey = workspaceId
+ ? `${STORAGE_GLOBAL_CONSTRAINTS_KEY}-${workspaceId}`
+ : STORAGE_GLOBAL_CONSTRAINTS_KEY;
+
+ useEffect(() => {
+ if (open) {
+ const saved = localStorage.getItem(storageKey) || ""
+ setConstraints(saved)
+ }
+ }, [open, storageKey])
+
+ const handleSave = () => {
+ localStorage.setItem(storageKey, constraints)
+ onOpenChange(false)
+ }
+
+ return (
+ <Dialog open={open} onOpenChange={onOpenChange}>
+ <DialogContent className="sm:max-w-[500px]">
+ <DialogHeader>
+ <DialogTitle>全局规则约束 ({workspaceId === 'flow' ? '流程图' : workspaceId === 'cad' ? 'CAD设计' : workspaceId === 'ppt' ? 'PPT演示' : '通用'})</DialogTitle>
+ <DialogDescription>
+ 设置适用于当前工作区的全局系统提示词。
+ </DialogDescription>
+ </DialogHeader>
+ <div className="grid gap-4 py-4">
+ <Textarea
+ value={constraints}
+ onChange={(e) => setConstraints(e.target.value)}
+ placeholder="例如:始终使用中文回答,代码注释必须详细..."
+ className="min-h-[200px]"
+ />
+ </div>
+ <DialogFooter>
+ <Button onClick={handleSave}>
+ 保存
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ )
+}
diff --git a/src/components/history-dialog.tsx b/src/components/history-dialog.tsx
new file mode 100644
index 0000000..e89c538
--- /dev/null
+++ b/src/components/history-dialog.tsx
@@ -0,0 +1,94 @@
+import React from 'react';
+import {
+ Dialog,
+ DialogContent,
+ DialogHeader,
+ DialogTitle,
+} from "@/components/ui/dialog"
+import { Button } from '@/components/ui/button';
+import { Clock, RotateCcw, FileCode } from 'lucide-react';
+import { ScrollArea } from '@/components/ui/scroll-area';
+
+export interface HistoryItem {
+ id: string;
+ timestamp: number;
+ content: string; // XML or code
+ type: 'xml' | 'python' | 'json';
+ summary?: string;
+}
+
+interface HistoryDialogProps {
+ showHistory: boolean;
+ onToggleHistory: (show: boolean) => void;
+ history: HistoryItem[];
+ onRestore: (item: HistoryItem) => void;
+}
+
+export function HistoryDialog({
+ showHistory,
+ onToggleHistory,
+ history,
+ onRestore,
+}: HistoryDialogProps) {
+ const formatDate = (ts: number) => {
+ return new Date(ts).toLocaleString();
+ };
+
+ return (
+ <Dialog open={showHistory} onOpenChange={onToggleHistory}>
+ <DialogContent className="max-w-md max-h-[80vh] flex flex-col">
+ <DialogHeader>
+ <DialogTitle className="flex items-center gap-2">
+ <Clock className="w-5 h-5 text-muted-foreground" />
+ 版本历史
+ </DialogTitle>
+ </DialogHeader>
+
+ <div className="flex-1 overflow-hidden mt-2">
+ {history.length === 0 ? (
+ <div className="text-center p-8 text-muted-foreground text-sm flex flex-col items-center gap-2">
+ <Clock className="w-8 h-8 opacity-20" />
+ <p>暂无历史记录</p>
+ </div>
+ ) : (
+ <ScrollArea className="h-[400px] pr-4">
+ <div className="space-y-3">
+ {[...history].reverse().map((item, index) => (
+ <div key={item.id} className="p-3 rounded-lg border border-border/50 bg-muted/20 hover:bg-muted/40 transition-colors flex items-center justify-between group">
+ <div className="flex flex-col gap-1 overflow-hidden">
+ <div className="flex items-center gap-2 text-sm font-medium">
+ <span className="w-6 h-6 rounded-full bg-blue-100 dark:bg-blue-900/30 text-blue-600 flex items-center justify-center text-xs">
+ {history.length - index}
+ </span>
+ <span>{formatDate(item.timestamp)}</span>
+ </div>
+ <div className="text-xs text-muted-foreground truncate pl-8 flex items-center gap-1">
+ <FileCode className="w-3 h-3" />
+ <span>{item.type.toUpperCase()}</span>
+ <span>•</span>
+ <span>{item.content.length} chars</span>
+ </div>
+ </div>
+
+ <Button
+ size="sm"
+ variant="ghost"
+ onClick={() => {
+ onRestore(item);
+ onToggleHistory(false);
+ }}
+ className="opacity-0 group-hover:opacity-100 transition-opacity gap-1 text-xs"
+ >
+ <RotateCcw className="w-3 h-3" />
+ 恢复
+ </Button>
+ </div>
+ ))}
+ </div>
+ </ScrollArea>
+ )}
+ </div>
+ </DialogContent>
+ </Dialog>
+ )
+}
diff --git a/src/components/reset-warning-modal.tsx b/src/components/reset-warning-modal.tsx
new file mode 100644
index 0000000..323b3a3
--- /dev/null
+++ b/src/components/reset-warning-modal.tsx
@@ -0,0 +1,43 @@
+import React from 'react';
+import { Button } from "@/components/ui/button"
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+} from "@/components/ui/dialog"
+
+interface ResetWarningModalProps {
+ open: boolean
+ onOpenChange: (open: boolean) => void
+ onClear: () => void
+}
+
+export function ResetWarningModal({
+ open,
+ onOpenChange,
+ onClear,
+}: ResetWarningModalProps) {
+ return (
+ <Dialog open={open} onOpenChange={onOpenChange}>
+ <DialogContent>
+ <DialogHeader>
+ <DialogTitle>清空对话</DialogTitle>
+ <DialogDescription>
+ 确定要清空所有对话记录吗?此操作无法撤销。
+ </DialogDescription>
+ </DialogHeader>
+ <DialogFooter>
+ <Button variant="outline" onClick={() => onOpenChange(false)}>
+ 取消
+ </Button>
+ <Button variant="destructive" onClick={onClear}>
+ 清空
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ )
+}
diff --git a/src/components/save-dialog.tsx b/src/components/save-dialog.tsx
new file mode 100644
index 0000000..82af98d
--- /dev/null
+++ b/src/components/save-dialog.tsx
@@ -0,0 +1,81 @@
+import React, { useState } from 'react';
+import { Button } from "@/components/ui/button"
+import {
+ Dialog,
+ DialogContent,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+} from "@/components/ui/dialog"
+import { Input } from "@/components/ui/input"
+import { Label } from "@/components/ui/label"
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from "@/components/ui/select"
+
+interface SaveDialogProps {
+ open: boolean
+ onOpenChange: (open: boolean) => void
+ onSave: (filename: string, format: string) => void
+ defaultFilename?: string
+}
+
+export function SaveDialog({
+ open,
+ onOpenChange,
+ onSave,
+ defaultFilename = "diagram",
+}: SaveDialogProps) {
+ const [filename, setFilename] = useState(defaultFilename)
+ const [format, setFormat] = useState("xml")
+
+ const handleSave = () => {
+ onSave(filename, format)
+ onOpenChange(false)
+ }
+
+ return (
+ <Dialog open={open} onOpenChange={onOpenChange}>
+ <DialogContent className="sm:max-w-[425px]">
+ <DialogHeader>
+ <DialogTitle>保存图表</DialogTitle>
+ </DialogHeader>
+ <div className="grid gap-4 py-4">
+ <div className="grid grid-cols-4 items-center gap-4">
+ <Label htmlFor="filename" className="text-right">
+ 文件名
+ </Label>
+ <Input
+ id="filename"
+ value={filename}
+ onChange={(e) => setFilename(e.target.value)}
+ className="col-span-3"
+ />
+ </div>
+ <div className="grid grid-cols-4 items-center gap-4">
+ <Label htmlFor="format" className="text-right">
+ 格式
+ </Label>
+ <Select value={format} onValueChange={setFormat}>
+ <SelectTrigger className="col-span-3">
+ <SelectValue placeholder="选择格式" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="xml">XML (Draw.io)</SelectItem>
+ <SelectItem value="svg">SVG</SelectItem>
+ <SelectItem value="png">PNG</SelectItem>
+ </SelectContent>
+ </Select>
+ </div>
+ </div>
+ <DialogFooter>
+ <Button onClick={handleSave}>保存</Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ )
+}
diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx
new file mode 100644
index 0000000..0ba4277
--- /dev/null
+++ b/src/components/ui/button.tsx
@@ -0,0 +1,56 @@
+import * as React from "react"
+import { Slot } from "@radix-ui/react-slot"
+import { cva, type VariantProps } from "class-variance-authority"
+
+import { cn } from "@/lib/utils"
+
+const buttonVariants = cva(
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
+ {
+ variants: {
+ variant: {
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
+ destructive:
+ "bg-destructive text-destructive-foreground hover:bg-destructive/90",
+ outline:
+ "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
+ secondary:
+ "bg-secondary text-secondary-foreground hover:bg-secondary/80",
+ ghost: "hover:bg-accent hover:text-accent-foreground",
+ link: "text-primary underline-offset-4 hover:underline",
+ },
+ size: {
+ default: "h-10 px-4 py-2",
+ sm: "h-9 rounded-md px-3",
+ lg: "h-11 rounded-md px-8",
+ icon: "h-10 w-10",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ size: "default",
+ },
+ }
+)
+
+export interface ButtonProps
+ extends React.ButtonHTMLAttributes<HTMLButtonElement>,
+ VariantProps<typeof buttonVariants> {
+ asChild?: boolean
+}
+
+const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
+ const Comp = asChild ? Slot : "button"
+ return (
+ <Comp
+ className={cn(buttonVariants({ variant, size, className }))}
+ ref={ref}
+ {...props}
+ />
+ )
+ }
+)
+Button.displayName = "Button"
+
+export { Button, buttonVariants }
diff --git a/src/components/ui/code-block.tsx b/src/components/ui/code-block.tsx
new file mode 100644
index 0000000..b635ef2
--- /dev/null
+++ b/src/components/ui/code-block.tsx
@@ -0,0 +1,87 @@
+import React, { useState, useEffect } from 'react';
+import { Highlight, themes } from "prism-react-renderer";
+import { ChevronRight, Loader2 } from 'lucide-react';
+import { cn } from '@/lib/utils';
+import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";
+
+interface CodeBlockProps {
+ code: string;
+ language?: string;
+ isStreaming?: boolean; // New prop to indicate if content is actively streaming
+}
+
+export function CodeBlock({ code, language = "xml", isStreaming = false }: CodeBlockProps) {
+ // Default to closed (false) initially
+ // If it's streaming, we keep it closed but show spinner.
+ const [isOpen, setIsOpen] = useState(false);
+
+ // Auto-open if it's a very short snippet? No, user said "always collapsed".
+ // But we might want to ensure the code block updates even if closed.
+
+ return (
+ <Collapsible
+ open={isOpen}
+ onOpenChange={setIsOpen}
+ className="w-full my-2 border border-border/50 rounded-lg bg-zinc-900 overflow-hidden group shadow-sm"
+ >
+ <CollapsibleTrigger className="flex items-center gap-2 w-full p-2.5 cursor-pointer hover:bg-zinc-800/50 transition-colors text-xs font-medium text-zinc-400 select-none bg-zinc-900/50">
+ <ChevronRight className={cn("w-4 h-4 transition-transform duration-200", isOpen && "rotate-90")} />
+
+ <span className="uppercase font-semibold tracking-wider text-zinc-300">{language}</span>
+
+ {isStreaming ? (
+ <div className="flex items-center gap-2 ml-auto">
+ <span className="text-[10px] text-blue-400 animate-pulse">Generating code...</span>
+ <Loader2 className="w-3.5 h-3.5 animate-spin text-blue-500" />
+ </div>
+ ) : (
+ <span className="ml-auto text-[10px] opacity-70 font-mono">{code.length} chars</span>
+ )}
+ </CollapsibleTrigger>
+
+ <CollapsibleContent>
+ <div className="p-0 border-t border-border/50">
+ <div className="overflow-hidden w-full bg-zinc-950/50">
+ <Highlight theme={themes.github} code={code} language={language}>
+ {({
+ className: _className,
+ style,
+ tokens,
+ getLineProps,
+ getTokenProps,
+ }) => (
+ <pre
+ className="text-[11px] leading-relaxed overflow-x-auto overflow-y-auto max-h-[500px] scrollbar-thin p-3"
+ style={{
+ ...style,
+ fontFamily: "var(--font-mono), ui-monospace, monospace",
+ backgroundColor: "transparent",
+ margin: 0,
+ }}
+ >
+ {tokens.map((line, i) => (
+ <div
+ key={i}
+ {...getLineProps({ line })}
+ style={{ display: 'table-row' }}
+ >
+ <span className="table-cell select-none text-zinc-600 text-right pr-4 w-8">{i + 1}</span>
+ <span className="table-cell">
+ {line.map((token, key) => (
+ <span
+ key={key}
+ {...getTokenProps({ token })}
+ />
+ ))}
+ </span>
+ </div>
+ ))}
+ </pre>
+ )}
+ </Highlight>
+ </div>
+ </div>
+ </CollapsibleContent>
+ </Collapsible>
+ );
+}
diff --git a/src/components/ui/collapsible.tsx b/src/components/ui/collapsible.tsx
new file mode 100644
index 0000000..9fa4894
--- /dev/null
+++ b/src/components/ui/collapsible.tsx
@@ -0,0 +1,11 @@
+"use client"
+
+import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"
+
+const Collapsible = CollapsiblePrimitive.Root
+
+const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger
+
+const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent
+
+export { Collapsible, CollapsibleTrigger, CollapsibleContent }
diff --git a/src/components/ui/context-menu.tsx b/src/components/ui/context-menu.tsx
new file mode 100644
index 0000000..3e52999
--- /dev/null
+++ b/src/components/ui/context-menu.tsx
@@ -0,0 +1,198 @@
+import * as React from "react"
+import * as ContextMenuPrimitive from "@radix-ui/react-context-menu"
+import { Check, ChevronRight, Circle } from "lucide-react"
+
+import { cn } from "@/lib/utils"
+
+const ContextMenu = ContextMenuPrimitive.Root
+
+const ContextMenuTrigger = ContextMenuPrimitive.Trigger
+
+const ContextMenuGroup = ContextMenuPrimitive.Group
+
+const ContextMenuPortal = ContextMenuPrimitive.Portal
+
+const ContextMenuSub = ContextMenuPrimitive.Sub
+
+const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup
+
+const ContextMenuSubTrigger = React.forwardRef<
+ React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,
+ React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {
+ inset?: boolean
+ }
+>(({ className, inset, children, ...props }, ref) => (
+ <ContextMenuPrimitive.SubTrigger
+ ref={ref}
+ className={cn(
+ "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
+ inset && "pl-8",
+ className
+ )}
+ {...props}
+ >
+ {children}
+ <ChevronRight className="ml-auto h-4 w-4" />
+ </ContextMenuPrimitive.SubTrigger>
+))
+ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName
+
+const ContextMenuSubContent = React.forwardRef<
+ React.ElementRef<typeof ContextMenuPrimitive.SubContent>,
+ React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>
+>(({ className, ...props }, ref) => (
+ <ContextMenuPrimitive.SubContent
+ ref={ref}
+ className={cn(
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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",
+ className
+ )}
+ {...props}
+ />
+))
+ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName
+
+const ContextMenuContent = React.forwardRef<
+ React.ElementRef<typeof ContextMenuPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>
+>(({ className, ...props }, ref) => (
+ <ContextMenuPrimitive.Portal>
+ <ContextMenuPrimitive.Content
+ ref={ref}
+ className={cn(
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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",
+ className
+ )}
+ {...props}
+ />
+ </ContextMenuPrimitive.Portal>
+))
+ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName
+
+const ContextMenuItem = React.forwardRef<
+ React.ElementRef<typeof ContextMenuPrimitive.Item>,
+ React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {
+ inset?: boolean
+ }
+>(({ className, inset, ...props }, ref) => (
+ <ContextMenuPrimitive.Item
+ ref={ref}
+ className={cn(
+ "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
+ inset && "pl-8",
+ className
+ )}
+ {...props}
+ />
+))
+ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName
+
+const ContextMenuCheckboxItem = React.forwardRef<
+ React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,
+ React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>
+>(({ className, children, checked, ...props }, ref) => (
+ <ContextMenuPrimitive.CheckboxItem
+ ref={ref}
+ className={cn(
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
+ className
+ )}
+ checked={checked}
+ {...props}
+ >
+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
+ <ContextMenuPrimitive.ItemIndicator>
+ <Check className="h-4 w-4" />
+ </ContextMenuPrimitive.ItemIndicator>
+ </span>
+ {children}
+ </ContextMenuPrimitive.CheckboxItem>
+))
+ContextMenuCheckboxItem.displayName =
+ ContextMenuPrimitive.CheckboxItem.displayName
+
+const ContextMenuRadioItem = React.forwardRef<
+ React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,
+ React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>
+>(({ className, children, ...props }, ref) => (
+ <ContextMenuPrimitive.RadioItem
+ ref={ref}
+ className={cn(
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
+ className
+ )}
+ {...props}
+ >
+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
+ <ContextMenuPrimitive.ItemIndicator>
+ <Circle className="h-2 w-2 fill-current" />
+ </ContextMenuPrimitive.ItemIndicator>
+ </span>
+ {children}
+ </ContextMenuPrimitive.RadioItem>
+))
+ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName
+
+const ContextMenuLabel = React.forwardRef<
+ React.ElementRef<typeof ContextMenuPrimitive.Label>,
+ React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {
+ inset?: boolean
+ }
+>(({ className, inset, ...props }, ref) => (
+ <ContextMenuPrimitive.Label
+ ref={ref}
+ className={cn(
+ "px-2 py-1.5 text-sm font-semibold text-foreground",
+ inset && "pl-8",
+ className
+ )}
+ {...props}
+ />
+))
+ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName
+
+const ContextMenuSeparator = React.forwardRef<
+ React.ElementRef<typeof ContextMenuPrimitive.Separator>,
+ React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>
+>(({ className, ...props }, ref) => (
+ <ContextMenuPrimitive.Separator
+ ref={ref}
+ className={cn("-mx-1 my-1 h-px bg-border", className)}
+ {...props}
+ />
+))
+ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName
+
+const ContextMenuShortcut = ({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLSpanElement>) => {
+ return (
+ <span
+ className={cn(
+ "ml-auto text-xs tracking-widest text-muted-foreground",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+ContextMenuShortcut.displayName = "ContextMenuShortcut"
+
+export {
+ ContextMenu,
+ ContextMenuTrigger,
+ ContextMenuContent,
+ ContextMenuItem,
+ ContextMenuCheckboxItem,
+ ContextMenuRadioItem,
+ ContextMenuLabel,
+ ContextMenuSeparator,
+ ContextMenuShortcut,
+ ContextMenuGroup,
+ ContextMenuPortal,
+ ContextMenuSub,
+ ContextMenuSubContent,
+ ContextMenuSubTrigger,
+ ContextMenuRadioGroup,
+}
diff --git a/src/components/ui/dialog.tsx b/src/components/ui/dialog.tsx
new file mode 100644
index 0000000..0245804
--- /dev/null
+++ b/src/components/ui/dialog.tsx
@@ -0,0 +1,135 @@
+"use client"
+
+import * as React from "react"
+import * as DialogPrimitive from "@radix-ui/react-dialog"
+import { XIcon } from "lucide-react"
+
+import { cn } from "@/lib/utils"
+
+function Dialog({
+ ...props
+}: React.ComponentProps<typeof DialogPrimitive.Root>) {
+ return <DialogPrimitive.Root data-slot="dialog" {...props} />
+}
+
+function DialogTrigger({
+ ...props
+}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
+ return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />
+}
+
+function DialogPortal({
+ ...props
+}: React.ComponentProps<typeof DialogPrimitive.Portal>) {
+ return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />
+}
+
+function DialogClose({
+ ...props
+}: React.ComponentProps<typeof DialogPrimitive.Close>) {
+ return <DialogPrimitive.Close data-slot="dialog-close" {...props} />
+}
+
+function DialogOverlay({
+ className,
+ ...props
+}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
+ return (
+ <DialogPrimitive.Overlay
+ data-slot="dialog-overlay"
+ className={cn(
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function DialogContent({
+ className,
+ children,
+ ...props
+}: React.ComponentProps<typeof DialogPrimitive.Content>) {
+ return (
+ <DialogPortal data-slot="dialog-portal">
+ <DialogOverlay />
+ <DialogPrimitive.Content
+ data-slot="dialog-content"
+ className={cn(
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
+ className
+ )}
+ {...props}
+ >
+ {children}
+ <DialogPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4">
+ <XIcon />
+ <span className="sr-only">Close</span>
+ </DialogPrimitive.Close>
+ </DialogPrimitive.Content>
+ </DialogPortal>
+ )
+}
+
+function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="dialog-header"
+ className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
+ {...props}
+ />
+ )
+}
+
+function DialogFooter({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="dialog-footer"
+ className={cn(
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function DialogTitle({
+ className,
+ ...props
+}: React.ComponentProps<typeof DialogPrimitive.Title>) {
+ return (
+ <DialogPrimitive.Title
+ data-slot="dialog-title"
+ className={cn("text-lg leading-none font-semibold", className)}
+ {...props}
+ />
+ )
+}
+
+function DialogDescription({
+ className,
+ ...props
+}: React.ComponentProps<typeof DialogPrimitive.Description>) {
+ return (
+ <DialogPrimitive.Description
+ data-slot="dialog-description"
+ className={cn("text-muted-foreground text-sm", className)}
+ {...props}
+ />
+ )
+}
+
+export {
+ Dialog,
+ DialogClose,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogOverlay,
+ DialogPortal,
+ DialogTitle,
+ DialogTrigger,
+}
diff --git a/src/components/ui/input.tsx b/src/components/ui/input.tsx
new file mode 100644
index 0000000..9fe885f
--- /dev/null
+++ b/src/components/ui/input.tsx
@@ -0,0 +1,21 @@
+import * as React from "react"
+
+import { cn } from "@/lib/utils"
+
+function Input({ className, type, ...props }: React.ComponentProps<"input">) {
+ return (
+ <input
+ type={type}
+ data-slot="input"
+ className={cn(
+ "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-sm transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
+ "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
+ "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+export { Input }
diff --git a/src/components/ui/label.tsx b/src/components/ui/label.tsx
new file mode 100644
index 0000000..fb5fbc3
--- /dev/null
+++ b/src/components/ui/label.tsx
@@ -0,0 +1,24 @@
+"use client"
+
+import * as React from "react"
+import * as LabelPrimitive from "@radix-ui/react-label"
+
+import { cn } from "@/lib/utils"
+
+function Label({
+ className,
+ ...props
+}: React.ComponentProps<typeof LabelPrimitive.Root>) {
+ return (
+ <LabelPrimitive.Root
+ 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/src/components/ui/resizable.tsx b/src/components/ui/resizable.tsx
new file mode 100644
index 0000000..73c6e45
--- /dev/null
+++ b/src/components/ui/resizable.tsx
@@ -0,0 +1,44 @@
+import { GripVertical } from "lucide-react"
+import { Panel, Group, Separator, type PanelImperativeHandle } from "react-resizable-panels"
+
+import { cn } from "@/lib/utils"
+
+const ResizablePanelGroup = ({
+ className,
+ ...props
+}: React.ComponentProps<typeof Group>) => (
+ <Group
+ className={cn(
+ "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
+ className
+ )}
+ {...props}
+ />
+)
+
+const ResizablePanel = Panel
+
+const ResizableHandle = ({
+ withHandle,
+ className,
+ ...props
+}: React.ComponentProps<typeof Separator> & {
+ withHandle?: boolean
+}) => (
+ <Separator
+ className={cn(
+ "relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",
+ className
+ )}
+ {...props}
+ >
+ {withHandle && (
+ <div className="z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border">
+ <GripVertical className="h-2.5 w-2.5" />
+ </div>
+ )}
+ </Separator>
+)
+
+export { ResizablePanelGroup, ResizablePanel, ResizableHandle }
+export type { PanelImperativeHandle }
diff --git a/src/components/ui/scroll-area.tsx b/src/components/ui/scroll-area.tsx
new file mode 100644
index 0000000..677c344
--- /dev/null
+++ b/src/components/ui/scroll-area.tsx
@@ -0,0 +1,58 @@
+"use client"
+
+import * as React from "react"
+import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"
+
+import { cn } from "@/lib/utils"
+
+function ScrollArea({
+ className,
+ children,
+ ...props
+}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
+ return (
+ <ScrollAreaPrimitive.Root
+ data-slot="scroll-area"
+ className={cn("relative", className)}
+ {...props}
+ >
+ <ScrollAreaPrimitive.Viewport
+ data-slot="scroll-area-viewport"
+ className="ring-ring/10 dark:ring-ring/20 dark:outline-ring/40 outline-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] focus-visible:ring-4 focus-visible:outline-1 !overflow-x-hidden"
+ >
+ {children}
+ </ScrollAreaPrimitive.Viewport>
+ <ScrollBar />
+ <ScrollAreaPrimitive.Corner />
+ </ScrollAreaPrimitive.Root>
+ )
+}
+
+function ScrollBar({
+ className,
+ orientation = "vertical",
+ ...props
+}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
+ return (
+ <ScrollAreaPrimitive.ScrollAreaScrollbar
+ data-slot="scroll-area-scrollbar"
+ orientation={orientation}
+ className={cn(
+ "flex touch-none p-px transition-colors select-none",
+ orientation === "vertical" &&
+ "h-full w-2.5 border-l border-l-transparent",
+ orientation === "horizontal" &&
+ "h-2.5 flex-col border-t border-t-transparent",
+ className
+ )}
+ {...props}
+ >
+ <ScrollAreaPrimitive.ScrollAreaThumb
+ data-slot="scroll-area-thumb"
+ className="bg-border relative flex-1 rounded-full"
+ />
+ </ScrollAreaPrimitive.ScrollAreaScrollbar>
+ )
+}
+
+export { ScrollArea, ScrollBar }
diff --git a/src/components/ui/select.tsx b/src/components/ui/select.tsx
new file mode 100644
index 0000000..16f25f9
--- /dev/null
+++ b/src/components/ui/select.tsx
@@ -0,0 +1,187 @@
+"use client"
+
+import * as React from "react"
+import * as SelectPrimitive from "@radix-ui/react-select"
+import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"
+
+import { cn } from "@/lib/utils"
+
+function Select({
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.Root>) {
+ return <SelectPrimitive.Root data-slot="select" {...props} />
+}
+
+function SelectGroup({
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.Group>) {
+ return <SelectPrimitive.Group data-slot="select-group" {...props} />
+}
+
+function SelectValue({
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.Value>) {
+ return <SelectPrimitive.Value data-slot="select-value" {...props} />
+}
+
+function SelectTrigger({
+ className,
+ size = "default",
+ children,
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
+ size?: "sm" | "default"
+}) {
+ return (
+ <SelectPrimitive.Trigger
+ data-slot="select-trigger"
+ data-size={size}
+ className={cn(
+ "border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
+ className
+ )}
+ {...props}
+ >
+ {children}
+ <SelectPrimitive.Icon asChild>
+ <ChevronDownIcon className="size-4 opacity-50" />
+ </SelectPrimitive.Icon>
+ </SelectPrimitive.Trigger>
+ )
+}
+
+function SelectContent({
+ className,
+ children,
+ position = "popper",
+ align = "center",
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.Content>) {
+ return (
+ <SelectPrimitive.Portal>
+ <SelectPrimitive.Content
+ data-slot="select-content"
+ className={cn(
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 relative z-50 max-h-[var(--radix-select-content-available-height)] min-w-[8rem] origin-[var(--radix-select-content-transform-origin)] overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
+ position === "popper" &&
+ "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
+ className
+ )}
+ position={position}
+ align={align}
+ {...props}
+ >
+ <SelectScrollUpButton />
+ <SelectPrimitive.Viewport
+ className={cn(
+ "p-1",
+ position === "popper" &&
+ "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
+ )}
+ >
+ {children}
+ </SelectPrimitive.Viewport>
+ <SelectScrollDownButton />
+ </SelectPrimitive.Content>
+ </SelectPrimitive.Portal>
+ )
+}
+
+function SelectLabel({
+ className,
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.Label>) {
+ return (
+ <SelectPrimitive.Label
+ data-slot="select-label"
+ className={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
+ {...props}
+ />
+ )
+}
+
+function SelectItem({
+ className,
+ children,
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.Item>) {
+ return (
+ <SelectPrimitive.Item
+ data-slot="select-item"
+ className={cn(
+ "focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none 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}
+ >
+ <span className="absolute right-2 flex size-3.5 items-center justify-center">
+ <SelectPrimitive.ItemIndicator>
+ <CheckIcon className="size-4" />
+ </SelectPrimitive.ItemIndicator>
+ </span>
+ <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
+ </SelectPrimitive.Item>
+ )
+}
+
+function SelectSeparator({
+ className,
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.Separator>) {
+ return (
+ <SelectPrimitive.Separator
+ data-slot="select-separator"
+ className={cn("bg-border pointer-events-none -mx-1 my-1 h-px", className)}
+ {...props}
+ />
+ )
+}
+
+function SelectScrollUpButton({
+ className,
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
+ return (
+ <SelectPrimitive.ScrollUpButton
+ data-slot="select-scroll-up-button"
+ className={cn(
+ "flex cursor-default items-center justify-center py-1",
+ className
+ )}
+ {...props}
+ >
+ <ChevronUpIcon className="size-4" />
+ </SelectPrimitive.ScrollUpButton>
+ )
+}
+
+function SelectScrollDownButton({
+ className,
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
+ return (
+ <SelectPrimitive.ScrollDownButton
+ data-slot="select-scroll-down-button"
+ className={cn(
+ "flex cursor-default items-center justify-center py-1",
+ className
+ )}
+ {...props}
+ >
+ <ChevronDownIcon className="size-4" />
+ </SelectPrimitive.ScrollDownButton>
+ )
+}
+
+export {
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectLabel,
+ SelectScrollDownButton,
+ SelectScrollUpButton,
+ SelectSeparator,
+ SelectTrigger,
+ SelectValue,
+}
diff --git a/src/components/ui/textarea.tsx b/src/components/ui/textarea.tsx
new file mode 100644
index 0000000..f2ab8f2
--- /dev/null
+++ b/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(
+ "border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-sm transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+export { Textarea }
diff --git a/src/components/ui/tooltip.tsx b/src/components/ui/tooltip.tsx
new file mode 100644
index 0000000..30fc44d
--- /dev/null
+++ b/src/components/ui/tooltip.tsx
@@ -0,0 +1,30 @@
+"use client"
+
+import * as React from "react"
+import * as TooltipPrimitive from "@radix-ui/react-tooltip"
+
+import { cn } from "@/lib/utils"
+
+const TooltipProvider = TooltipPrimitive.Provider
+
+const Tooltip = TooltipPrimitive.Root
+
+const TooltipTrigger = TooltipPrimitive.Trigger
+
+const TooltipContent = React.forwardRef<
+ React.ElementRef<typeof TooltipPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
+>(({ className, sideOffset = 4, ...props }, ref) => (
+ <TooltipPrimitive.Content
+ ref={ref}
+ sideOffset={sideOffset}
+ className={cn(
+ "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 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",
+ className
+ )}
+ {...props}
+ />
+))
+TooltipContent.displayName = TooltipPrimitive.Content.displayName
+
+export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
diff --git a/src/components/workspaces/Cad3DPreview.tsx b/src/components/workspaces/Cad3DPreview.tsx
new file mode 100644
index 0000000..e04b540
--- /dev/null
+++ b/src/components/workspaces/Cad3DPreview.tsx
@@ -0,0 +1,264 @@
+import React, { useEffect, useMemo, useRef } from "react"
+import * as THREE from "three"
+import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js"
+import { SVGLoader } from "three/examples/jsm/loaders/SVGLoader.js"
+import { STLLoader } from "three/examples/jsm/loaders/STLLoader.js"
+
+export function Cad3DPreview({
+ svg,
+ depth = 240,
+ meshUrl,
+ sectionCut = true,
+}: {
+ svg?: string
+ depth?: number
+ meshUrl?: string
+ sectionCut?: boolean
+}) {
+ const containerRef = useRef<HTMLDivElement | null>(null)
+ const rendererRef = useRef<THREE.WebGLRenderer | null>(null)
+ const sceneRef = useRef<THREE.Scene | null>(null)
+ const cameraRef = useRef<THREE.PerspectiveCamera | null>(null)
+ const controlsRef = useRef<OrbitControls | null>(null)
+ const meshGroupRef = useRef<THREE.Group | null>(null)
+ const rafRef = useRef<number | null>(null)
+
+ const parsedSvg = useMemo(() => {
+ if (!svg) return null
+ try {
+ const loader = new SVGLoader();
+ return loader.parse(svg);
+ } catch (e) {
+ console.error("SVG Parse Error", e);
+ return null
+ }
+ }, [svg])
+
+ useEffect(() => {
+ const container = containerRef.current
+ if (!container) return
+
+ const scene = new THREE.Scene()
+ scene.background = new THREE.Color(0xf7f7f8)
+ sceneRef.current = scene
+
+ const camera = new THREE.PerspectiveCamera(
+ 45,
+ container.clientWidth / container.clientHeight,
+ 0.1,
+ 10000
+ )
+ camera.position.set(0, 200, 400)
+ cameraRef.current = camera
+
+ const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: false })
+ renderer.setPixelRatio(window.devicePixelRatio || 1)
+ renderer.setSize(container.clientWidth, container.clientHeight)
+ renderer.localClippingEnabled = true
+ rendererRef.current = renderer
+ container.appendChild(renderer.domElement)
+
+ const controls = new OrbitControls(camera, renderer.domElement)
+ controls.enableDamping = true
+ controls.dampingFactor = 0.08
+ controlsRef.current = controls
+
+ const ambient = new THREE.AmbientLight(0xffffff, 0.75)
+ scene.add(ambient)
+ const dir = new THREE.DirectionalLight(0xffffff, 0.85)
+ dir.position.set(200, 400, 300)
+ scene.add(dir)
+
+ const grid = new THREE.GridHelper(800, 40, 0xd1d5db, 0xe5e7eb)
+ grid.position.y = -1
+ scene.add(grid)
+
+ const animate = () => {
+ controls.update()
+ renderer.render(scene, camera)
+ rafRef.current = requestAnimationFrame(animate)
+ }
+ animate()
+
+ const onResize = () => {
+ const c = containerRef.current
+ const r = rendererRef.current
+ const cam = cameraRef.current
+ if (!c || !r || !cam) return
+ cam.aspect = c.clientWidth / c.clientHeight
+ cam.updateProjectionMatrix()
+ r.setSize(c.clientWidth, c.clientHeight)
+ }
+
+ window.addEventListener("resize", onResize)
+
+ return () => {
+ window.removeEventListener("resize", onResize)
+ if (rafRef.current) cancelAnimationFrame(rafRef.current)
+ controls.dispose()
+ renderer.dispose()
+ if (renderer.domElement.parentElement === container) {
+ container.removeChild(renderer.domElement)
+ }
+ scene.clear()
+ rendererRef.current = null
+ sceneRef.current = null
+ cameraRef.current = null
+ controlsRef.current = null
+ meshGroupRef.current = null
+ }
+ }, [])
+
+ useEffect(() => {
+ const scene = sceneRef.current
+ if (!scene) return
+
+ if (meshGroupRef.current) {
+ scene.remove(meshGroupRef.current)
+ meshGroupRef.current.traverse((obj) => {
+ const mesh = obj as THREE.Mesh
+ if ((mesh as any).geometry) (mesh as any).geometry.dispose?.()
+ if ((mesh as any).material) {
+ const mat = (mesh as any).material
+ if (Array.isArray(mat)) mat.forEach((m) => m.dispose?.())
+ else mat.dispose?.()
+ }
+ })
+ meshGroupRef.current = null
+ }
+
+ const clippingPlane = sectionCut ? new THREE.Plane(new THREE.Vector3(1, 0, 0), 0) : null
+
+ const centerAndFrame = (group: THREE.Group) => {
+ const box = new THREE.Box3().setFromObject(group)
+ const size = new THREE.Vector3()
+ box.getSize(size)
+ const center = new THREE.Vector3()
+ box.getCenter(center)
+ group.position.x -= center.x
+ group.position.z -= center.z
+
+ const camera = cameraRef.current
+ const controls = controlsRef.current
+ if (camera && controls) {
+ const maxDim = Math.max(size.x, size.y, size.z, 1)
+ camera.position.set(0, maxDim * 0.9, maxDim * 1.4)
+ controls.target.set(0, 0, 0)
+ controls.update()
+ }
+ }
+
+ if (meshUrl) {
+ const loader = new STLLoader()
+ let canceled = false
+ loader.load(
+ meshUrl,
+ (geometry) => {
+ if (canceled) return
+ geometry.computeVertexNormals()
+ geometry.computeBoundingBox()
+ const material = new THREE.MeshBasicMaterial({
+ color: 0xe5e7eb,
+ transparent: true,
+ opacity: 0.18,
+ side: THREE.DoubleSide,
+ depthWrite: false,
+ clippingPlanes: clippingPlane ? [clippingPlane] : undefined,
+ })
+ const mesh = new THREE.Mesh(geometry, material)
+ mesh.rotation.x = -Math.PI / 2
+
+ const edgesGeom = new THREE.EdgesGeometry(geometry, 18)
+ const edgesMat = new THREE.LineBasicMaterial({
+ color: 0x111827,
+ transparent: true,
+ opacity: 0.75,
+ clippingPlanes: clippingPlane ? [clippingPlane] : undefined,
+ })
+ const edges = new THREE.LineSegments(edgesGeom, edgesMat)
+ edges.rotation.x = -Math.PI / 2
+
+ const group = new THREE.Group()
+ group.add(mesh)
+ group.add(edges)
+ scene.add(group)
+ meshGroupRef.current = group
+ centerAndFrame(group)
+ },
+ undefined,
+ (error) => {
+ if (canceled) return
+ console.error("STL Load Error", error)
+ }
+ )
+ return () => {
+ canceled = true
+ }
+ }
+
+ if (!parsedSvg) return
+
+ const group = new THREE.Group()
+ group.rotation.x = -Math.PI / 2
+
+ const paths = parsedSvg.paths || []
+
+ paths.forEach((path, i) => {
+ const fillColor = path.userData?.style?.fill;
+ const strokeColor = path.userData?.style?.stroke;
+
+ // 1. Handle Fills (Extruded Meshes)
+ if (fillColor !== undefined && fillColor !== 'none') {
+ const shapes = SVGLoader.createShapes(path);
+ shapes.forEach(shape => {
+ const geom = new THREE.ExtrudeGeometry(shape, { depth: depth, bevelEnabled: false });
+ // Center geometry locally if needed, but here we want absolute positioning relative to group
+ // geom.center() // Do NOT center individual parts, or they lose relative position
+
+ const mat = new THREE.MeshBasicMaterial({
+ color: 0xd1d5db,
+ transparent: true,
+ opacity: 0.22,
+ side: THREE.DoubleSide,
+ depthWrite: false,
+ clippingPlanes: clippingPlane ? [clippingPlane] : undefined,
+ });
+ const mesh = new THREE.Mesh(geom, mat);
+ // Add small Z offset to prevent z-fighting and allow "painters algorithm" in 3D height
+ mesh.position.z = i * 0.1;
+ group.add(mesh);
+ });
+ }
+
+ // 2. Handle Strokes (Lines/Walls)
+ if (strokeColor !== undefined && strokeColor !== 'none') {
+ const shapes = SVGLoader.createShapes(path);
+ // If createShapes returns empty for strokes, we can manually render lines
+ // But usually for CAD, strokes might define walls.
+ // Let's render them as thick lines (using Tubes or just Lines) slightly above the floor
+
+ path.subPaths.forEach(subPath => {
+ const points = subPath.getPoints();
+ const geometry = new THREE.BufferGeometry().setFromPoints(points);
+ const material = new THREE.LineBasicMaterial({
+ color: strokeColor === '#000000' ? 0x333333 : strokeColor,
+ linewidth: 2,
+ clippingPlanes: clippingPlane ? [clippingPlane] : undefined,
+ });
+
+ const line = new THREE.Line(geometry, material);
+ // Lift lines slightly above the extruded floor (assuming floor is at z=0 to z=depth)
+ // If floor is extruded by 'depth', we want lines on top surface
+ line.position.z = depth + 0.5 + (i * 0.01);
+ group.add(line);
+ });
+ }
+ });
+
+ scene.add(group)
+ meshGroupRef.current = group
+ centerAndFrame(group)
+ }, [parsedSvg, depth, meshUrl, sectionCut])
+
+ return <div ref={containerRef} className="w-full h-full" />
+}
diff --git a/src/components/workspaces/CadWorkspace.tsx b/src/components/workspaces/CadWorkspace.tsx
new file mode 100644
index 0000000..66415a2
--- /dev/null
+++ b/src/components/workspaces/CadWorkspace.tsx
@@ -0,0 +1,289 @@
+import React, { useMemo, useState, useEffect } from 'react';
+import { generateChatMessage } from '@/lib/ai-client';
+import { Loader2, MessageSquarePlus, Copy, Check, Box, Layers3 } from 'lucide-react';
+import {
+ ContextMenu,
+ ContextMenuContent,
+ ContextMenuItem,
+ ContextMenuTrigger,
+} from "@/components/ui/context-menu";
+import { Button } from "@/components/ui/button";
+import { Cad3DPreview } from "@/components/workspaces/Cad3DPreview";
+
+interface CadWorkspaceProps {
+ onAddToChat?: (code: string) => void;
+ code?: string; // New prop for incoming code (SVG or Python)
+}
+
+export function CadWorkspace({ onAddToChat, code }: CadWorkspaceProps) {
+ const [svgContent, setSvgContent] = useState<string | null>(null);
+ const [drawioXml, setDrawioXml] = useState<string | null>(null);
+ const [loading, setLoading] = useState(false);
+ const [freecadCode, setFreecadCode] = useState<string>("");
+ const [copied, setCopied] = useState(false);
+ const [viewMode, setViewMode] = useState<"2d" | "3d" | "freecad">("2d");
+ const [isGenerating3d, setIsGenerating3d] = useState(false);
+ const [meshUrl, setMeshUrl] = useState<string | null>(null);
+ const [meshError, setMeshError] = useState<string | null>(null);
+ const [isRunningFreecad, setIsRunningFreecad] = useState(false);
+ const [sectionCut, setSectionCut] = useState(true);
+
+ useEffect(() => {
+ if (code) {
+ const trimmed = code.trim();
+ setMeshUrl(null);
+ setMeshError(null);
+ if (trimmed.startsWith('<svg')) {
+ setSvgContent(code);
+ setDrawioXml(null);
+ setViewMode("2d");
+ return;
+ }
+ if (trimmed.startsWith('<mxGraphModel') || trimmed.startsWith('<mxfile')) {
+ setDrawioXml(code);
+ setSvgContent(null);
+ setViewMode("2d");
+ return;
+ }
+ setFreecadCode(code);
+ setViewMode("freecad");
+ }
+ }, [code]);
+
+ const handleCopyCode = async () => {
+ if (freecadCode) {
+ await navigator.clipboard.writeText(freecadCode);
+ setCopied(true);
+ setTimeout(() => setCopied(false), 2000);
+ }
+ };
+
+ const freecadServerBase = (import.meta as any).env?.VITE_FREECAD_SERVER || "http://localhost:43110";
+
+ const normalizeMeshUrl = (url: string) => {
+ if (!url) return null;
+ if (url.startsWith("http")) return url;
+ return `${freecadServerBase}${url}`;
+ };
+
+ const runFreecad = async (codeOverride?: string) => {
+ const codeToRun = (codeOverride ?? freecadCode).trim();
+ if (!codeToRun || isRunningFreecad) return;
+ setIsRunningFreecad(true);
+ setMeshError(null);
+ try {
+ const response = await fetch(`${freecadServerBase}/api/freecad/run`, {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({ code: codeToRun }),
+ });
+ if (!response.ok) {
+ const text = await response.text();
+ throw new Error(text || "FreeCAD 执行失败");
+ }
+ const data = await response.json();
+ const resolvedUrl = normalizeMeshUrl(data.meshUrl || data.url || "");
+ if (!resolvedUrl) throw new Error("未返回网格地址");
+ setMeshUrl(resolvedUrl);
+ setViewMode("3d");
+ } catch (e) {
+ const message = e instanceof Error ? e.message : "FreeCAD 执行失败";
+ setMeshError(message);
+ } finally {
+ setIsRunningFreecad(false);
+ }
+ };
+
+ const canShow3d = !!meshUrl || !!svgContent || !!freecadCode;
+
+ const handleGenerate3dFrom2d = async () => {
+ if ((!svgContent && !drawioXml) || isGenerating3d) return;
+ setIsGenerating3d(true);
+ try {
+ const prompt = `You are a CAD assistant using FreeCAD Python.
+Input is a 2D floor plan, provided as draw.io XML or SVG.
+Goal: generate a real 3D model in FreeCAD (walls/rooms/openings) based on the 2D plan.
+
+Requirements:
+- Output ONLY Python code for FreeCAD.
+- The script must be runnable inside FreeCAD's Python console/macros.
+- Prefer robust geometry: create closed wires, make faces, then extrude solids.
+- Use a default wall height of 3000 mm and wall thickness of 200 mm unless specified.
+- Create a new document and add solids.
+- Add a base/floor slab and extrude walls upward along +Z.
+- Keep Z scale realistic. Do not generate a "flat" model.
+
+If draw.io XML is provided:
+- Treat rectangles/lines/polylines as plan elements (walls/rooms).
+- Use element labels to infer types: "wall", "door", "window", "room".
+- Assume 1 draw.io unit = 10 mm if no other scale.
+
+Input:
+${drawioXml ? `\`\`\`xml\n${drawioXml}\n\`\`\`` : `\`\`\`svg\n${svgContent}\n\`\`\``}
+`;
+
+ const response = await generateChatMessage([{ role: "user", content: prompt }]);
+ const match = response.match(/```python\s*([\s\S]*?)```/);
+ const py = match ? match[1].trim() : response.trim();
+ setFreecadCode(py);
+ setMeshUrl(null);
+ await runFreecad(py);
+ } catch (e) {
+ console.error("Failed to generate FreeCAD code", e);
+ } finally {
+ setIsGenerating3d(false);
+ }
+ };
+
+ return (
+ <ContextMenu>
+ <ContextMenuTrigger className="w-full h-full bg-muted/20 relative overflow-hidden">
+ <div className="absolute top-4 left-4 z-20 flex items-center gap-2 bg-background/80 backdrop-blur rounded-xl border border-border/50 px-3 py-2 shadow-sm">
+ <Button
+ size="sm"
+ variant={viewMode === "2d" ? "default" : "outline"}
+ className="h-7 px-2 text-xs gap-1"
+ onClick={() => setViewMode("2d")}
+ disabled={!svgContent && !drawioXml}
+ >
+ <Box className="w-3.5 h-3.5" />
+ 2D
+ </Button>
+ <Button
+ size="sm"
+ variant={viewMode === "3d" ? "default" : "outline"}
+ className="h-7 px-2 text-xs gap-1"
+ onClick={() => {
+ if (meshUrl) {
+ setViewMode("3d");
+ return;
+ }
+ if (freecadCode) {
+ runFreecad();
+ return;
+ }
+ setViewMode("3d");
+ }}
+ disabled={!canShow3d}
+ >
+ <Layers3 className="w-3.5 h-3.5" />
+ 3D
+ </Button>
+ <Button
+ size="sm"
+ variant={sectionCut ? "default" : "outline"}
+ className="h-7 px-2 text-xs"
+ onClick={() => setSectionCut(v => !v)}
+ disabled={!canShow3d}
+ >
+ 剖切
+ </Button>
+ <Button
+ size="sm"
+ variant={viewMode === "freecad" ? "default" : "outline"}
+ className="h-7 px-2 text-xs"
+ onClick={() => setViewMode("freecad")}
+ disabled={!freecadCode}
+ >
+ FreeCAD
+ </Button>
+ <div className="w-px h-5 bg-border mx-1" />
+ <Button
+ size="sm"
+ className="h-7 px-2 text-xs"
+ onClick={handleGenerate3dFrom2d}
+ disabled={(!svgContent && !drawioXml) || isGenerating3d}
+ >
+ {isGenerating3d ? <Loader2 className="w-3.5 h-3.5 mr-1 animate-spin" /> : null}
+ 由 2D 生成 FreeCAD 3D
+ </Button>
+ <Button
+ size="sm"
+ variant="outline"
+ className="h-7 px-2 text-xs"
+ onClick={() => runFreecad()}
+ disabled={!freecadCode || isRunningFreecad}
+ >
+ {isRunningFreecad ? <Loader2 className="w-3.5 h-3.5 mr-1 animate-spin" /> : null}
+ 运行 FreeCAD 生成 3D
+ </Button>
+ </div>
+
+ {!svgContent && !freecadCode && !loading && (
+ <div className="w-full h-full flex items-center justify-center">
+ <div className="text-center text-muted-foreground">
+ <p className="mb-2">暂无 CAD 内容</p>
+ <p className="text-xs">在右侧对话里让 AI 先生成 SVG(2D),满意后再生成 FreeCAD(3D)。</p>
+ </div>
+ </div>
+ )}
+
+ {loading && (
+ <div className="flex flex-col items-center text-muted-foreground">
+ <Loader2 className="w-8 h-8 animate-spin mb-2 text-blue-600" />
+ <p>正在生成 2D 视图...</p>
+ </div>
+ )}
+
+ <div className="w-full h-full pt-16 p-6">
+ {viewMode === "2d" && svgContent && !loading && (
+ <div className="w-full h-full bg-white shadow-sm rounded-xl overflow-hidden border border-border/50 p-6 flex items-center justify-center">
+ <div className="w-full h-full overflow-auto" dangerouslySetInnerHTML={{ __html: svgContent }} />
+ </div>
+ )}
+ {viewMode === "2d" && !svgContent && drawioXml && !loading && (
+ <div className="w-full h-full bg-zinc-950 shadow-sm rounded-xl overflow-auto border border-border/50 p-4 relative">
+ <pre className="text-green-400 font-mono text-xs whitespace-pre-wrap">{drawioXml}</pre>
+ </div>
+ )}
+
+ {viewMode === "3d" && (svgContent || meshUrl) && (
+ <div className="w-full h-full grid grid-cols-1 lg:grid-cols-2 gap-4">
+ <div className="bg-white rounded-xl border border-border/50 shadow-sm overflow-hidden">
+ <div className="h-full min-h-[360px]">
+ <Cad3DPreview
+ svg={meshUrl ? undefined : svgContent || undefined}
+ meshUrl={meshUrl || undefined}
+ depth={240}
+ sectionCut={sectionCut}
+ />
+ </div>
+ </div>
+ <div className="bg-zinc-950 rounded-xl border border-border/50 shadow-sm overflow-hidden relative">
+ <div className="absolute top-2 right-2">
+ <Button variant="ghost" size="icon" onClick={handleCopyCode} className="h-8 w-8 text-zinc-400 hover:text-white hover:bg-zinc-800" disabled={!freecadCode}>
+ {copied ? <Check className="w-4 h-4 text-green-500" /> : <Copy className="w-4 h-4" />}
+ </Button>
+ </div>
+ <div className="h-full max-h-[70vh] overflow-auto p-4">
+ {meshError && (
+ <div className="text-red-400 text-xs mb-2 whitespace-pre-wrap">{meshError}</div>
+ )}
+ <pre className="text-green-400 font-mono text-xs whitespace-pre-wrap">{freecadCode || "点击「由 2D 生成 3D」生成 FreeCAD 脚本。"}</pre>
+ </div>
+ </div>
+ </div>
+ )}
+
+ {viewMode === "freecad" && freecadCode && (
+ <div className="w-full h-full bg-zinc-950 shadow-sm rounded-xl overflow-auto border border-border/50 p-4 relative">
+ <div className="absolute top-2 right-2">
+ <Button variant="ghost" size="icon" onClick={handleCopyCode} className="h-8 w-8 text-zinc-400 hover:text-white hover:bg-zinc-800">
+ {copied ? <Check className="w-4 h-4 text-green-500" /> : <Copy className="w-4 h-4" />}
+ </Button>
+ </div>
+ <pre className="text-green-400 font-mono text-xs whitespace-pre-wrap">{freecadCode}</pre>
+ </div>
+ )}
+ </div>
+ </ContextMenuTrigger>
+
+ <ContextMenuContent>
+ <ContextMenuItem onClick={() => onAddToChat && onAddToChat(svgContent || drawioXml || freecadCode)} className="cursor-pointer gap-2">
+ <MessageSquarePlus className="w-4 h-4" />
+ <span>添加到对话</span>
+ </ContextMenuItem>
+ </ContextMenuContent>
+ </ContextMenu>
+ );
+}
diff --git a/src/components/workspaces/FlowchartWorkspace.tsx b/src/components/workspaces/FlowchartWorkspace.tsx
new file mode 100644
index 0000000..af8773d
--- /dev/null
+++ b/src/components/workspaces/FlowchartWorkspace.tsx
@@ -0,0 +1,145 @@
+import React, { useRef, useEffect, useState } from 'react';
+import { Button } from '@/components/ui/button';
+import { MessageSquarePlus } from 'lucide-react';
+import {
+ ContextMenu,
+ ContextMenuContent,
+ ContextMenuItem,
+ ContextMenuTrigger,
+} from "@/components/ui/context-menu";
+
+interface FlowchartWorkspaceProps {
+ initialXml?: string;
+ onAddToChat?: (xmlSnippet: string) => void;
+}
+
+export function FlowchartWorkspace({ initialXml, onAddToChat }: FlowchartWorkspaceProps) {
+ const iframeRef = useRef<HTMLIFrameElement>(null);
+ const [isLoaded, setIsLoaded] = useState(false);
+ const [selectedCells, setSelectedCells] = useState<any[]>([]);
+
+ // Default empty graph
+ const emptyXml = '<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+
+ useEffect(() => {
+ const handleMessage = (e: MessageEvent) => {
+ if (typeof e.data === 'string') {
+ try {
+ const msg = JSON.parse(e.data);
+
+ // Init event - draw.io is ready
+ if (msg.event === 'init') {
+ setIsLoaded(true);
+
+ // Add "Add to Chat" button to Draw.io menu bar
+ const iframe = iframeRef.current;
+ if (iframe?.contentWindow) {
+ iframe.contentWindow.postMessage(JSON.stringify({
+ action: 'configure',
+ config: {
+ customButtons: [{
+ action: 'export',
+ format: 'xml',
+ callback: true,
+ label: 'Add to Chat',
+ tooltip: 'Add current diagram to chat',
+ icon: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwYXRoIGQ9Ik0yMSAxNWExIDEgMCAwIDEtMSAxSDRhMSAxIDAgMCAxLTEtMVY4YTEgMSAwIDAgMSAxLTFoMTZhMSAxIDAgMCAxIDEgMXY3em0tNC03djEwaC0ydjZoLTJ2LTZoLTJ2LTZIOSIgLz48L3N2Zz4='
+ }]
+ }
+ }), '*');
+ }
+ }
+
+ // Listen for auto-save or export events if we were to add them to internal menu
+ // but for now we drive it externally.
+ } catch (err) {
+ // ignore
+ }
+ }
+ };
+ window.addEventListener('message', handleMessage);
+ return () => window.removeEventListener('message', handleMessage);
+ }, []);
+
+ // Separate effect to handle XML loading when either loaded state or xml changes
+ useEffect(() => {
+ if (isLoaded && initialXml) {
+ const iframe = iframeRef.current;
+ if (iframe?.contentWindow) {
+ iframe.contentWindow.postMessage(JSON.stringify({
+ action: 'load',
+ xml: initialXml,
+ autosave: false
+ }), '*');
+ }
+ } else if (isLoaded && !initialXml) {
+ // Load default if no XML provided but loaded
+ const iframe = iframeRef.current;
+ if (iframe?.contentWindow) {
+ iframe.contentWindow.postMessage(JSON.stringify({
+ action: 'load',
+ xml: emptyXml,
+ autosave: false
+ }), '*');
+ }
+ }
+ }, [isLoaded, initialXml]);
+
+
+ // Remove the second useEffect that was depending on isLoaded and setTimeout
+ // to avoid race conditions or double loading.
+
+ const handleAddToChat = () => {
+ const iframe = iframeRef.current;
+ if (!iframe?.contentWindow) return;
+
+ // Request export
+ // We need to set up a listener for the export result
+ const handleExport = (e: MessageEvent) => {
+ if (typeof e.data === 'string') {
+ try {
+ const msg = JSON.parse(e.data);
+ if (msg.event === 'export') {
+ // msg.data contains the XML
+ // If msg.data is empty or just basic wrapper, it might mean nothing selected/drawn
+ // But usually export returns the whole graph
+ if (onAddToChat) {
+ onAddToChat(msg.data);
+ }
+ window.removeEventListener('message', handleExport);
+ }
+ } catch (e) {
+ // ignore non-json
+ }
+ }
+ };
+ window.addEventListener('message', handleExport);
+
+ // 'xml' format exports the full graph XML
+ iframe.contentWindow.postMessage(JSON.stringify({
+ action: 'export',
+ format: 'xml',
+ spin: 'Updating chat...'
+ }), '*');
+ };
+
+ return (
+ <ContextMenu>
+ <ContextMenuTrigger className="w-full h-full relative overflow-hidden bg-muted flex">
+ <iframe
+ ref={iframeRef}
+ src="https://embed.diagrams.net/?embed=1&ui=min&spin=1&noSaveBtn=1&noExitBtn=1&lang=zh&proto=json"
+ className="w-full h-full border-0 block"
+ title="流程图编辑器"
+ />
+ </ContextMenuTrigger>
+
+ <ContextMenuContent>
+ <ContextMenuItem onClick={handleAddToChat} className="cursor-pointer gap-2">
+ <MessageSquarePlus className="w-4 h-4" />
+ <span>添加到对话</span>
+ </ContextMenuItem>
+ </ContextMenuContent>
+ </ContextMenu>
+ );
+}
diff --git a/src/components/workspaces/PptWorkspace.tsx b/src/components/workspaces/PptWorkspace.tsx
new file mode 100644
index 0000000..47ea79e
--- /dev/null
+++ b/src/components/workspaces/PptWorkspace.tsx
@@ -0,0 +1,1481 @@
+import React, { useState, useEffect, useRef } from 'react';
+import { motion } from "framer-motion";
+import { generateImage } from '@/lib/ai-client';
+import { pptService, PptPage } from '@/lib/ppt-service';
+import { Loader2, Plus, Image as ImageIcon, MessageSquarePlus, Upload, Presentation, Sparkles, Check, Play, FileText, Download, Lightbulb } from 'lucide-react';
+import {
+ ContextMenu,
+ ContextMenuContent,
+ ContextMenuItem,
+ ContextMenuTrigger,
+} from "@/components/ui/context-menu";
+import { Button } from "@/components/ui/button";
+import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog";
+import { Textarea } from "@/components/ui/textarea";
+
+interface SlideData {
+ id: string;
+ title: string;
+ content: string[];
+ note?: string;
+ layout?: string;
+ description?: string; // Add description support
+}
+
+interface PptData {
+ theme?: string;
+ slides: SlideData[];
+}
+
+interface PptWorkspaceProps {
+ data?: PptData;
+ onAddToChat?: (json: string, name: string) => void;
+ onPptReadyChange?: (ready: boolean) => void;
+ incomingEdit?: { id: string; payload: string } | null;
+}
+
+type CreationStep = 'idle' | 'input' | 'outline' | 'generating_content' | 'generating_images' | 'done';
+type CreationMode = 'idea' | 'outline' | 'description';
+type ReferenceFile = { id: string; filename: string; content: string; charCount: number };
+
+const AVAILABLE_TEMPLATES = [
+ { name: "科技商务", path: "/templates/template_b.png" },
+ { name: "学术汇报", path: "/templates/template_academic.jpg" },
+ { name: "极简主义", path: "/templates/template_s.png" },
+ { name: "矢量插画", path: "/templates/template_vector_illustration.png" },
+ { name: "活力黄", path: "/templates/template_y.png" },
+ { name: "磨砂玻璃", path: "/templates/template_glass.png" },
+];
+
+const MODEL_CONCURRENCY = 30;
+
+export function PptWorkspace({ data, onAddToChat, onPptReadyChange, incomingEdit }: PptWorkspaceProps) {
+ // If data is provided by AI, use it. Otherwise maintain local state for demo.
+ const [localSlides, setLocalSlides] = useState<SlideData[]>([]);
+ const [currentSlideIndex, setCurrentSlideIndex] = useState(0);
+ const [templateImage, setTemplateImage] = useState<string | null>(null);
+ const [uploadedTemplateImage, setUploadedTemplateImage] = useState<string | null>(null);
+ const [selectedTemplatePath, setSelectedTemplatePath] = useState<string | null>(null);
+ const [generatedImages, setGeneratedImages] = useState<Record<string, string>>({});
+ const [imageVersions, setImageVersions] = useState<Record<string, Array<{ id: string; url: string; timestamp: number; type: 'generated' | 'edited'; instruction?: string }>>>({});
+ const [currentImageVersionId, setCurrentImageVersionId] = useState<Record<string, string>>({});
+ const [isGeneratingImage, setIsGeneratingImage] = useState(false);
+ const [selectedSlideIds, setSelectedSlideIds] = useState<Record<string, boolean>>({});
+ const [bulkEditOpen, setBulkEditOpen] = useState(false);
+ const [bulkEditText, setBulkEditText] = useState("");
+ const [isApplyingBulkEdit, setIsApplyingBulkEdit] = useState(false);
+
+ // Creation Wizard State
+ const [creationStep, setCreationStep] = useState<CreationStep>('idle');
+ const [creationMode, setCreationMode] = useState<CreationMode>('idea');
+ const [ideaInput, setIdeaInput] = useState("");
+ const [outlineInput, setOutlineInput] = useState("");
+ const [descriptionInput, setDescriptionInput] = useState("");
+ const [referenceFiles, setReferenceFiles] = useState<ReferenceFile[]>([]);
+ const [isParsingReferenceFiles, setIsParsingReferenceFiles] = useState(false);
+ const [referencePreviewOpen, setReferencePreviewOpen] = useState(false);
+ const [referencePreviewFile, setReferencePreviewFile] = useState<ReferenceFile | null>(null);
+ const [progress, setProgress] = useState({ current: 0, total: 0, message: "" });
+ const referenceFileInputRef = useRef<HTMLInputElement | null>(null);
+ const [slideshowOpen, setSlideshowOpen] = useState(false);
+ const [slideshowIndex, setSlideshowIndex] = useState(0);
+ const [slideshowAuto, setSlideshowAuto] = useState(true);
+
+ // Load default template on mount
+ useEffect(() => {
+ const loadDefaultTemplate = async () => {
+ try {
+ const response = await fetch(AVAILABLE_TEMPLATES[0].path);
+ const blob = await response.blob();
+ const reader = new FileReader();
+ reader.onloadend = () => {
+ setTemplateImage(reader.result as string);
+ setSelectedTemplatePath(AVAILABLE_TEMPLATES[0].path);
+ };
+ reader.readAsDataURL(blob);
+ } catch (e) {
+ console.error("Failed to load default template", e);
+ }
+ };
+ loadDefaultTemplate();
+ }, []);
+
+ const handleTemplateSelect = async (path: string) => {
+ try {
+ const response = await fetch(path);
+ const blob = await response.blob();
+ const reader = new FileReader();
+ reader.onloadend = () => {
+ setTemplateImage(reader.result as string);
+ setSelectedTemplatePath(path);
+ };
+ reader.readAsDataURL(blob);
+ } catch (e) {
+ console.error("Failed to load template", e);
+ }
+ };
+
+ // Sync prop data to local state
+ useEffect(() => {
+ if (data && data.slides && data.slides.length > 0) {
+ setLocalSlides(data.slides);
+ // Reset to first slide if new data comes in
+ if (data.slides) {
+ setCurrentSlideIndex(0);
+ }
+ setCreationStep('done');
+ onPptReadyChange?.(true);
+ }
+ }, [data]);
+
+ const applyIncomingSlideEdits = async (payload: string) => {
+ let parsed: any;
+ try {
+ parsed = JSON.parse(payload);
+ } catch {
+ return;
+ }
+
+ const incomingSlides: any[] | null = Array.isArray(parsed?.slides)
+ ? parsed.slides
+ : Array.isArray(parsed)
+ ? parsed
+ : null;
+
+ if (!incomingSlides || incomingSlides.length === 0) return;
+
+ const mergedSlides: SlideData[] = (() => {
+ const existing = localSlides.length > 0 ? [...localSlides] : [];
+ const byId = new Map(existing.map((s) => [s.id, s] as const));
+ const order: string[] = existing.map((s) => s.id);
+
+ for (const inc of incomingSlides) {
+ const id = String(inc?.id || "");
+ if (!id) continue;
+ const next: SlideData = {
+ id,
+ title: typeof inc?.title === "string" ? inc.title : (byId.get(id)?.title || `幻灯片`),
+ content: Array.isArray(inc?.content) ? inc.content.map((x: any) => String(x)) : (byId.get(id)?.content || []),
+ description: typeof inc?.description === "string" ? inc.description : byId.get(id)?.description,
+ note: typeof inc?.note === "string" ? inc.note : byId.get(id)?.note,
+ layout: typeof inc?.layout === "string" ? inc.layout : byId.get(id)?.layout,
+ };
+ byId.set(id, next);
+ if (!order.includes(id)) order.push(id);
+ }
+
+ return order.map((id) => byId.get(id)!).filter(Boolean);
+ })();
+
+ setLocalSlides(mergedSlides);
+ setCreationStep('done');
+ onPptReadyChange?.(true);
+
+ const editTasks: Array<() => Promise<void>> = [];
+ for (const inc of incomingSlides) {
+ const id = String(inc?.id || "");
+ if (!id) continue;
+ const incomingImageUrl = typeof inc?.imageUrl === "string" ? inc.imageUrl : "";
+ const instruction = typeof inc?.imageEditInstruction === "string"
+ ? inc.imageEditInstruction
+ : typeof inc?.instruction === "string"
+ ? inc.instruction
+ : "";
+
+ const slide = mergedSlides.find((s) => s.id === id);
+ if (!slide) continue;
+
+ if (incomingImageUrl.trim()) {
+ pushImageVersion(id, incomingImageUrl, 'edited', instruction.trim() ? instruction : undefined);
+ continue;
+ }
+
+ if (!instruction.trim()) continue;
+ editTasks.push(async () => {
+ const versions = imageVersions[id] || [];
+ const currentVersion = currentImageVersionId[id];
+ const currentUrl = currentVersion ? versions.find(v => v.id === currentVersion)?.url : generatedImages[id];
+
+ const page: PptPage = {
+ id,
+ title: slide.title,
+ content: slide.content || [],
+ description: slide.description
+ };
+ const editedUrl = await pptService.editPageImage(page, instruction, currentUrl || undefined, templateImage || undefined);
+ if (editedUrl) {
+ pushImageVersion(id, editedUrl, 'edited', instruction);
+ }
+ });
+ }
+
+ if (editTasks.length > 0) {
+ try {
+ await runInParallel(editTasks, MODEL_CONCURRENCY);
+ } catch (e) {
+ console.error("Failed to apply image edits", e);
+ }
+ }
+ };
+
+ useEffect(() => {
+ if (!incomingEdit?.payload) return;
+ applyIncomingSlideEdits(incomingEdit.payload);
+ }, [incomingEdit?.id]);
+
+ const activeSlides = localSlides.length > 0 ? localSlides : [];
+ const currentSlide = activeSlides[currentSlideIndex];
+ const getSlideImageUrl = (slideId: string) => {
+ const versions = imageVersions[slideId] || [];
+ const currentVersion = currentImageVersionId[slideId];
+ const v = currentVersion ? versions.find((x) => x.id === currentVersion) : undefined;
+ return v?.url || generatedImages[slideId] || "";
+ };
+ const currentSlideImage = currentSlide ? getSlideImageUrl(currentSlide.id) : "";
+
+ useEffect(() => {
+ if (!slideshowOpen) return;
+ setSlideshowIndex(currentSlideIndex);
+ }, [slideshowOpen]);
+
+ useEffect(() => {
+ if (!slideshowOpen || !slideshowAuto) return;
+ if (activeSlides.length <= 1) return;
+ const id = window.setInterval(() => {
+ setSlideshowIndex((prev) => (prev + 1) % activeSlides.length);
+ }, 3000);
+ return () => window.clearInterval(id);
+ }, [slideshowOpen, slideshowAuto, activeSlides.length]);
+
+ const pushImageVersion = (slideId: string, url: string, type: 'generated' | 'edited', instruction?: string) => {
+ const versionId = `v-${Date.now()}-${Math.random().toString(16).slice(2)}`;
+ setImageVersions(prev => ({
+ ...prev,
+ [slideId]: [
+ ...(prev[slideId] || []),
+ { id: versionId, url, timestamp: Date.now(), type, instruction }
+ ]
+ }));
+ setCurrentImageVersionId(prev => ({ ...prev, [slideId]: versionId }));
+ setGeneratedImages(prev => ({ ...prev, [slideId]: url }));
+ };
+
+ const handleFileUpload = (e: React.ChangeEvent<HTMLInputElement>) => {
+ const file = e.target.files?.[0];
+ if (file) {
+ const reader = new FileReader();
+ reader.onload = (e) => {
+ setTemplateImage(e.target?.result as string);
+ setUploadedTemplateImage(e.target?.result as string);
+ setSelectedTemplatePath("upload");
+ };
+ reader.readAsDataURL(file);
+ }
+ };
+
+ const addReferenceFiles = async (files: File[]) => {
+ if (!files.length) return;
+ setIsParsingReferenceFiles(true);
+ try {
+ const { extractPdfText, extractTextFileContent, isPdfFile, isTextFile } = await import('@/lib/pdf-utils');
+ const nextItems: ReferenceFile[] = [];
+
+ for (const file of files) {
+ try {
+ let content = "";
+ if (isPdfFile(file)) {
+ content = await extractPdfText(file);
+ } else if (isTextFile(file)) {
+ content = await extractTextFileContent(file);
+ } else {
+ continue;
+ }
+
+ const clipped = String(content || "").slice(0, 150000);
+ nextItems.push({
+ id: `ref-${Date.now()}-${Math.random().toString(16).slice(2)}`,
+ filename: file.name,
+ content: clipped,
+ charCount: clipped.length
+ });
+ } catch (e) {
+ console.error("Failed to parse reference file", file.name, e);
+ }
+ }
+
+ if (nextItems.length > 0) {
+ setReferenceFiles((prev) => [...prev, ...nextItems]);
+ }
+ } finally {
+ setIsParsingReferenceFiles(false);
+ }
+ };
+
+ const handleReferenceFileInputChange = async (e: React.ChangeEvent<HTMLInputElement>) => {
+ const files = Array.from(e.target.files || []);
+ e.target.value = "";
+ await addReferenceFiles(files);
+ };
+
+ const openReferencePreview = (file: ReferenceFile) => {
+ setReferencePreviewFile(file);
+ setReferencePreviewOpen(true);
+ };
+
+ const resetGenerationState = () => {
+ setGeneratedImages({});
+ setImageVersions({});
+ setCurrentImageVersionId({});
+ setSelectedSlideIds({});
+ setCurrentSlideIndex(0);
+ };
+
+ const extractJsonArray = (text: string) => {
+ const match = text.match(/\[[\s\S]*\]/);
+ return match ? match[0] : null;
+ };
+
+ const parseSlides = (raw: string): SlideData[] | null => {
+ const trimmed = raw.trim();
+ if (!trimmed) return null;
+
+ const jsonArrayText = extractJsonArray(trimmed);
+ if (jsonArrayText) {
+ try {
+ const parsed = JSON.parse(jsonArrayText);
+ if (Array.isArray(parsed)) {
+ return parsed.map((it: any, i: number) => ({
+ id: String(it.id || `slide-${i}`),
+ title: String(it.title || `第 ${i + 1} 页`),
+ content: Array.isArray(it.content) ? it.content.map((x: any) => String(x)) : [],
+ description: typeof it.description === "string" ? it.description : undefined
+ }));
+ }
+ } catch {
+ }
+ }
+
+ const lines = trimmed.split(/\r?\n/);
+ const slides: SlideData[] = [];
+ let current: SlideData | null = null;
+
+ const pushCurrent = () => {
+ if (current) slides.push(current);
+ current = null;
+ };
+
+ for (const line of lines) {
+ const l = line.trim();
+ if (!l) continue;
+ const heading = l.match(/^(#{1,3})\s+(.*)$/);
+ if (heading) {
+ pushCurrent();
+ current = {
+ id: `slide-${slides.length}`,
+ title: heading[2].trim() || `第 ${slides.length + 1} 页`,
+ content: []
+ };
+ continue;
+ }
+ const bullet = l.match(/^[-•]\s+(.*)$/);
+ if (bullet) {
+ if (!current) {
+ current = { id: `slide-${slides.length}`, title: `第 ${slides.length + 1} 页`, content: [] };
+ }
+ current.content.push(bullet[1].trim());
+ continue;
+ }
+ const desc = l.match(/^description[::]\s*(.*)$/i);
+ if (desc) {
+ if (!current) {
+ current = { id: `slide-${slides.length}`, title: `第 ${slides.length + 1} 页`, content: [] };
+ }
+ current.description = desc[1].trim();
+ continue;
+ }
+ }
+ pushCurrent();
+ return slides.length > 0 ? slides : null;
+ };
+
+ const runInParallel = async (tasks: (() => Promise<void>)[], limit: number) => {
+ const results: Promise<void>[] = [];
+ const executing: Promise<void>[] = [];
+ for (const task of tasks) {
+ const p = Promise.resolve().then(() => task());
+ results.push(p);
+ const e: Promise<void> = p.then(() => {
+ executing.splice(executing.indexOf(e), 1);
+ });
+ executing.push(e);
+ if (executing.length >= limit) {
+ await Promise.race(executing);
+ }
+ }
+ await Promise.all(results);
+ };
+
+ const handleLoadOutline = () => {
+ const slides = parseSlides(outlineInput);
+ if (!slides || slides.length === 0) {
+ alert("未识别到大纲,请粘贴 JSON 数组或 Markdown 大纲。");
+ return;
+ }
+ resetGenerationState();
+ setLocalSlides(slides);
+ setCreationStep("outline");
+ onPptReadyChange?.(true);
+ };
+
+ const handleLoadDescriptions = async () => {
+ const slides = parseSlides(descriptionInput);
+ resetGenerationState();
+
+ if (slides && slides.length > 0) {
+ setLocalSlides(slides);
+ setCreationStep("outline");
+ onPptReadyChange?.(true);
+ return;
+ }
+
+ setCreationStep('input');
+ setProgress({ current: 0, total: 0, message: "正在从描述生成大纲与画面..." });
+ try {
+ const pages = await pptService.generateSlidesFromDescription(descriptionInput);
+ const nextSlides: SlideData[] = pages.map((p, i) => ({
+ id: `slide-${i}`,
+ title: p.title,
+ content: p.content,
+ description: p.description
+ }));
+ setLocalSlides(nextSlides);
+ setCreationStep("outline");
+ onPptReadyChange?.(true);
+ } catch (e) {
+ console.error("Failed to generate slides from description", e);
+ alert("从描述生成失败,请重试或改为粘贴 JSON/Markdown。");
+ setCreationStep("idle");
+ } finally {
+ setProgress({ current: 0, total: 0, message: "" });
+ }
+ };
+
+ const handleGenerateOutline = async () => {
+ if (!ideaInput.trim()) return;
+
+ resetGenerationState();
+ setCreationStep('input'); // Keep input visible but loading
+ setProgress({ current: 0, total: 0, message: "正在生成大纲..." });
+
+ try {
+ const pages = await pptService.generateOutline(ideaInput);
+ const slides: SlideData[] = pages.map((p, i) => ({
+ id: `slide-${i}`,
+ title: p.title,
+ content: p.content,
+ description: p.description
+ }));
+ setLocalSlides(slides);
+ setCreationStep('outline');
+ onPptReadyChange?.(true);
+ } catch (e) {
+ console.error("Failed to generate outline", e);
+ alert("生成大纲失败,请重试");
+ }
+ };
+
+ const handleGenerateFullPpt = async () => {
+ setCreationStep('generating_content');
+
+ // Convert SlideData back to PptPage for service
+ const pages: PptPage[] = localSlides.map(s => ({
+ title: s.title,
+ content: s.content,
+ status: 'outline_generated'
+ }));
+
+ try {
+ // 1. Generate Descriptions
+ setProgress({ current: 0, total: pages.length, message: "正在生成页面内容描述..." });
+
+ // Parallel description generation
+ const descCounter = { done: 0 };
+ const descTasks = pages.map((_, i) => async () => {
+ try {
+ const result = await pptService.generatePageDescription(pages, i, ideaInput, referenceFiles);
+
+ // Update local state immediately
+ setLocalSlides(prev => {
+ const newSlides = [...prev];
+ newSlides[i] = {
+ ...newSlides[i],
+ content: result.content,
+ description: result.description
+ };
+ return newSlides;
+ });
+
+ // Update pages array for next step
+ pages[i].description = result.description;
+ pages[i].content = result.content;
+ } catch (e) {
+ console.error(`Failed to generate description for slide ${i}`, e);
+ } finally {
+ descCounter.done += 1;
+ setProgress(prev => ({
+ ...prev,
+ current: descCounter.done,
+ message: `正在生成页面内容描述... (${descCounter.done}/${pages.length})`
+ }));
+ }
+ });
+
+ await runInParallel(descTasks, MODEL_CONCURRENCY);
+
+ // 2. Generate Images
+ setCreationStep('generating_images');
+ setProgress({ current: 0, total: pages.length, message: "正在生成页面渲染图..." });
+
+ const imageCounter = { done: 0 };
+ const imageTasks = pages.map((_, i) => async () => {
+ try {
+ const imageUrl = await pptService.generatePageImage(pages[i], pages, templateImage || undefined);
+ if (imageUrl) {
+ const slideId = localSlides[i]?.id || `slide-${i}`;
+ pushImageVersion(slideId, imageUrl, 'generated');
+ }
+ } catch (e) {
+ console.error(`Failed to generate image for slide ${i}`, e);
+ } finally {
+ imageCounter.done += 1;
+ setProgress(prev => ({
+ ...prev,
+ current: imageCounter.done,
+ message: `正在生成页面渲染图... (${imageCounter.done}/${pages.length})`
+ }));
+ }
+ });
+
+ await runInParallel(imageTasks, MODEL_CONCURRENCY);
+
+ setCreationStep('done');
+ onPptReadyChange?.(true);
+
+ } catch (e) {
+ console.error("Full generation failed", e);
+ alert("生成过程中出错");
+ setCreationStep('done'); // Allow viewing what's done
+ onPptReadyChange?.(true);
+ }
+ };
+
+ const handleGenerateImagesOnly = async () => {
+ if (localSlides.length === 0) return;
+ setCreationStep('generating_images');
+ setProgress({ current: 0, total: localSlides.length, message: "正在生成页面渲染图..." });
+
+ const pages: PptPage[] = localSlides.map((s) => ({
+ id: s.id,
+ title: s.title,
+ content: s.content || [],
+ description: s.description,
+ status: "description_generated"
+ }));
+
+ const imageCounter = { done: 0 };
+ const imageTasks = pages.map((_, i) => async () => {
+ try {
+ const imageUrl = await pptService.generatePageImage(pages[i], pages, templateImage || undefined);
+ if (imageUrl) {
+ pushImageVersion(pages[i].id || `slide-${i}`, imageUrl, 'generated');
+ }
+ } catch (e) {
+ console.error(`Failed to generate image for slide ${i}`, e);
+ } finally {
+ imageCounter.done += 1;
+ setProgress(prev => ({
+ ...prev,
+ current: imageCounter.done,
+ message: `正在生成页面渲染图... (${imageCounter.done}/${pages.length})`
+ }));
+ }
+ });
+
+ try {
+ await runInParallel(imageTasks, MODEL_CONCURRENCY);
+ setCreationStep('done');
+ onPptReadyChange?.(true);
+ } catch (e) {
+ console.error("Image-only generation failed", e);
+ setCreationStep('done');
+ onPptReadyChange?.(true);
+ }
+ };
+
+ const handleGenerateAiImage = async () => {
+ if (!currentSlide) return;
+
+ setIsGeneratingImage(true);
+ try {
+ // Use the service logic if description exists, otherwise fallback
+ let imageUrl: string | null = null;
+
+ if (currentSlide.description) {
+ const pages: PptPage[] = localSlides.map(s => ({
+ title: s.title,
+ content: s.content,
+ part: undefined, // simplify
+ status: 'description_generated',
+ description: s.description
+ }));
+ const pageIndex = localSlides.findIndex(s => s === currentSlide);
+ imageUrl = await pptService.generatePageImage(pages[pageIndex], pages, templateImage || undefined);
+ } else {
+ // Fallback to simple prompt
+ const prompt = `Design a presentation slide. Title: "${currentSlide.title}". Content: ${(currentSlide.content || []).join('; ')}. Style: Professional, Modern.`;
+ imageUrl = await generateImage({
+ prompt: prompt,
+ referenceImageUrl: templateImage || undefined
+ });
+ }
+
+ if (imageUrl) {
+ const slideId = currentSlide.id || `slide-${currentSlideIndex}`;
+ pushImageVersion(slideId, imageUrl, 'generated');
+ }
+ } catch (e) {
+ console.error("Failed to generate slide image", e);
+ } finally {
+ setIsGeneratingImage(false);
+ }
+ };
+
+ const handleAddSlideToChat = (slide: SlideData) => {
+ if (onAddToChat) {
+ const slideId = slide.id || `slide-${currentSlideIndex}`;
+ const currentVersion = currentImageVersionId[slideId];
+ const versions = imageVersions[slideId] || [];
+ const imageUrl = currentVersion ? versions.find(v => v.id === currentVersion)?.url : generatedImages[slideId];
+ onAddToChat(JSON.stringify({ ...slide, imageUrl }, null, 2), `${slideId}.json`);
+ }
+ };
+
+ const handleAddSelectedSlidesToChat = () => {
+ if (!onAddToChat) return;
+ const selected = activeSlides
+ .filter(s => selectedSlideIds[s.id] )
+ .map((slide) => {
+ const slideId = slide.id;
+ const currentVersion = currentImageVersionId[slideId];
+ const versions = imageVersions[slideId] || [];
+ const imageUrl = currentVersion ? versions.find(v => v.id === currentVersion)?.url : generatedImages[slideId];
+ return { ...slide, imageUrl };
+ });
+
+ if (selected.length === 0) return;
+ onAddToChat(JSON.stringify({ slides: selected }, null, 2), `slides-selected.json`);
+ };
+
+ const handleApplyBulkEdit = async () => {
+ if (!bulkEditText.trim() || isApplyingBulkEdit) return;
+ setIsApplyingBulkEdit(true);
+ try {
+ const routes = await pptService.routeSlideEdits(
+ activeSlides.map(s => ({ title: s.title, bullets: s.content || [] })),
+ bulkEditText
+ );
+
+ const editTasks = routes.map((r) => async () => {
+ const idx = r.slideIndex;
+ const slide = activeSlides[idx];
+ if (!slide) return;
+
+ const slideId = slide.id;
+ const versions = imageVersions[slideId] || [];
+ const currentVersion = currentImageVersionId[slideId];
+ const currentUrl = currentVersion ? versions.find(v => v.id === currentVersion)?.url : generatedImages[slideId];
+
+ const page: PptPage = {
+ id: slideId,
+ title: slide.title,
+ content: slide.content || [],
+ description: slide.description
+ };
+
+ const editedUrl = await pptService.editPageImage(page, r.instruction, currentUrl || undefined, templateImage || undefined);
+ if (editedUrl) {
+ pushImageVersion(slideId, editedUrl, 'edited', r.instruction);
+ }
+ });
+
+ await runInParallel(editTasks, MODEL_CONCURRENCY);
+ setBulkEditOpen(false);
+ setBulkEditText("");
+ } catch (e) {
+ console.error("Bulk edit failed", e);
+ } finally {
+ setIsApplyingBulkEdit(false);
+ }
+ };
+
+ const handleDownloadPpt = async () => {
+ try {
+ const pages: PptPage[] = activeSlides.map(s => ({
+ id: s.id,
+ title: s.title,
+ content: s.content,
+ status: 'completed'
+ }));
+ const images: Record<string, string> = {};
+ for (const s of activeSlides) {
+ const versions = imageVersions[s.id] || [];
+ const currentVersion = currentImageVersionId[s.id];
+ const currentUrl = currentVersion ? versions.find(v => v.id === currentVersion)?.url : generatedImages[s.id];
+ if (currentUrl) images[s.id] = currentUrl;
+ }
+ await pptService.exportPptx(pages, images, `presentation-${Date.now()}`);
+ } catch (e) {
+ console.error("Export failed", e);
+ alert("导出失败");
+ }
+ };
+
+ const handleDownloadPdf = async () => {
+ try {
+ const pages: PptPage[] = activeSlides.map(s => ({
+ id: s.id,
+ title: s.title,
+ content: s.content,
+ status: 'completed'
+ }));
+ const images: Record<string, string> = {};
+ for (const s of activeSlides) {
+ const versions = imageVersions[s.id] || [];
+ const currentVersion = currentImageVersionId[s.id];
+ const currentUrl = currentVersion ? versions.find(v => v.id === currentVersion)?.url : generatedImages[s.id];
+ if (currentUrl) images[s.id] = currentUrl;
+ }
+ await pptService.exportPdf(pages, images, `presentation-${Date.now()}`);
+ } catch (e) {
+ console.error("Export failed", e);
+ alert("导出失败");
+ }
+ };
+
+ // Render Creation Wizard
+ if (activeSlides.length === 0 && (creationStep === 'idle' || creationStep === 'input')) {
+ const tabs = [
+ { id: 'idea', label: '想法' },
+ { id: 'outline', label: '大纲' },
+ { id: 'description', label: '描述' },
+ ];
+ const modeCopy = (() => {
+ if (creationMode === "outline") {
+ return {
+ hint: "已有大纲?直接粘贴即可快速生成,AI 将自动切分为结构化大纲",
+ placeholder: "粘贴你的 PPT 大纲…\n\n例如:\n第一部分:AI 的起源\n- 1950 年代的开端\n- 达特茅斯会议\n\n第二部分:发展历程\n- 专家系统\n- 深度学习\n…"
+ };
+ }
+ if (creationMode === "description") {
+ return {
+ hint: "已有完整描述?AI 将自动解析出大纲并切分为每页描述,直接生成图片",
+ placeholder: "粘贴你的完整页面描述…\n\n例如:\n第 1 页\n标题:人工智能的诞生\n内容:1950 年,图灵提出“图灵测试”…\n\n第 2 页\n标题:AI 的发展历程\n内容:1950 年代:符号主义…\n…"
+ };
+ }
+ return {
+ hint: "输入你的想法,AI 将为你生成完整的 PPT",
+ placeholder: "例如:生成一份关于 AI 发展史的演讲 PPT"
+ };
+ })();
+
+ return (
+ <div className="w-full h-full bg-zinc-50/50 dark:bg-zinc-900 flex flex-col overflow-hidden">
+ <div className="flex-1 overflow-auto p-8">
+ <div className="max-w-4xl mx-auto space-y-8 bg-white dark:bg-zinc-800 p-8 rounded-2xl shadow-sm border border-zinc-100 dark:border-zinc-700/50">
+
+ <div className="space-y-8">
+ {/* Template Selection */}
+ <div className="space-y-4">
+ <label className="text-sm font-semibold text-zinc-900 dark:text-zinc-100 flex items-center gap-2">
+ <span className="w-6 h-6 rounded-full bg-blue-100 text-blue-600 text-xs flex items-center justify-center font-bold">1</span>
+ 选择或上传参考模板
+ </label>
+
+ <div className="grid gap-4 grid-cols-[repeat(auto-fill,minmax(180px,1fr))]">
+ {/* Upload Card */}
+ <label className={`cursor-pointer border-2 border-dashed rounded-xl transition-all duration-200 overflow-hidden relative aspect-video flex flex-col items-center justify-center group ${
+ selectedTemplatePath === "upload"
+ ? "border-blue-500 bg-blue-50/30 dark:bg-zinc-800/50"
+ : "border-zinc-200 dark:border-zinc-700 hover:border-blue-500 hover:bg-blue-50/30 dark:hover:bg-zinc-800/50"
+ }`}>
+ {uploadedTemplateImage ? (
+ <>
+ <img src={uploadedTemplateImage} className="w-full h-full object-cover opacity-80 group-hover:opacity-100 transition-opacity" alt="Template" />
+ {selectedTemplatePath === "upload" && (
+ <div className="absolute top-2 left-2 rounded-full bg-blue-600 px-2 py-0.5 text-[10px] font-medium text-white shadow">
+ 已选择
+ </div>
+ )}
+ <div className="absolute inset-0 bg-black/40 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity">
+ <span className="text-white text-xs font-medium px-3 py-1 bg-black/50 rounded-full backdrop-blur-sm">更换图片</span>
+ </div>
+ </>
+ ) : (
+ <div className="flex flex-col items-center text-zinc-400 group-hover:text-blue-500 transition-colors">
+ <div className="w-10 h-10 rounded-full bg-zinc-100 dark:bg-zinc-800 flex items-center justify-center mb-2 group-hover:bg-blue-100 dark:group-hover:bg-blue-900/30 transition-colors">
+ <Upload className="w-5 h-5" />
+ </div>
+ <span className="text-xs font-medium">上传参考图</span>
+ </div>
+ )}
+ <input type="file" accept="image/*" className="hidden" onChange={handleFileUpload} />
+ </label>
+
+ {/* Preset Templates */}
+ {AVAILABLE_TEMPLATES.map((t) => (
+ <div
+ key={t.path}
+ onClick={() => handleTemplateSelect(t.path)}
+ className={`cursor-pointer border rounded-xl overflow-hidden relative aspect-video group transition-all duration-200 bg-zinc-100 dark:bg-zinc-900 ${
+ selectedTemplatePath === t.path
+ ? "border-blue-500 ring-2 ring-blue-500 shadow-md"
+ : "border-zinc-200 dark:border-zinc-700 hover:ring-2 hover:ring-blue-500 hover:shadow-md"
+ }`}
+ >
+ <img src={t.path} className="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105" alt={t.name} />
+ {selectedTemplatePath === t.path && (
+ <div className="absolute top-2 left-2 rounded-full bg-blue-600 px-2 py-0.5 text-[10px] font-medium text-white shadow">
+ 已选择
+ </div>
+ )}
+ <div className="absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/80 to-transparent p-3 pt-8 opacity-0 group-hover:opacity-100 transition-opacity duration-200">
+ <div className="text-white text-xs font-medium text-center">{t.name}</div>
+ </div>
+ </div>
+ ))}
+ </div>
+ </div>
+
+ {/* Mode Selection & Input */}
+ <div className="space-y-4">
+ <label className="text-sm font-semibold text-zinc-900 dark:text-zinc-100 flex items-center gap-2">
+ <span className="w-6 h-6 rounded-full bg-blue-100 text-blue-600 text-xs flex items-center justify-center font-bold">2</span>
+ 输入内容
+ </label>
+
+ {/* Segmented Control */}
+ <div className="bg-zinc-100 dark:bg-zinc-900/50 p-1 rounded-lg inline-flex w-full sm:w-auto">
+ {tabs.map((tab) => (
+ <button
+ key={tab.id}
+ onClick={() => setCreationMode(tab.id as any)}
+ className={`relative flex-1 sm:flex-none px-6 py-2 text-sm font-medium rounded-md transition-all duration-200 ${
+ creationMode === tab.id
+ ? "text-zinc-900 dark:text-zinc-100 shadow-sm"
+ : "text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200"
+ }`}
+ >
+ {creationMode === tab.id && (
+ <motion.div
+ layoutId="activeTab"
+ className="absolute inset-0 bg-white dark:bg-zinc-700 rounded-md"
+ transition={{ type: "spring", stiffness: 500, damping: 30 }}
+ />
+ )}
+ <span className="relative z-10">{tab.label}</span>
+ </button>
+ ))}
+ </div>
+
+ <input
+ ref={referenceFileInputRef}
+ type="file"
+ multiple
+ accept=".pdf,text/*,.txt,.md,.markdown,.json,.csv,.xml,.yaml,.yml"
+ className="hidden"
+ onChange={handleReferenceFileInputChange}
+ />
+
+ <motion.div
+ key={creationMode}
+ initial={{ opacity: 0, y: 10 }}
+ animate={{ opacity: 1, y: 0 }}
+ exit={{ opacity: 0, y: -10 }}
+ transition={{ duration: 0.2 }}
+ className="space-y-3"
+ >
+ <div className="flex items-center gap-2 text-sm text-zinc-700 dark:text-zinc-200">
+ <Lightbulb className="w-4 h-4 text-amber-500" />
+ <span>{modeCopy.hint}</span>
+ </div>
+ <div className="relative">
+ <textarea
+ value={creationMode === "idea" ? ideaInput : creationMode === "outline" ? outlineInput : descriptionInput}
+ onChange={(e) => {
+ const v = e.target.value;
+ if (creationMode === "idea") setIdeaInput(v);
+ else if (creationMode === "outline") setOutlineInput(v);
+ else setDescriptionInput(v);
+ }}
+ className="w-full h-40 p-4 pb-12 rounded-xl border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900/50 text-sm focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition-all resize-none outline-none"
+ placeholder={modeCopy.placeholder}
+ />
+ <button
+ type="button"
+ onClick={() => referenceFileInputRef.current?.click()}
+ disabled={isParsingReferenceFiles}
+ className="absolute bottom-3 right-3 inline-flex items-center gap-2 rounded-lg border border-zinc-200 dark:border-zinc-700 bg-white/80 dark:bg-zinc-900/60 px-3 py-1.5 text-xs text-zinc-700 dark:text-zinc-200 shadow-sm hover:bg-white dark:hover:bg-zinc-900 transition-colors disabled:opacity-60"
+ >
+ {isParsingReferenceFiles ? <Loader2 className="w-3.5 h-3.5 animate-spin" /> : <Upload className="w-3.5 h-3.5" />}
+ 上传文件
+ </button>
+ </div>
+
+ <div className="flex items-center justify-between gap-3">
+ <div className="text-xs text-zinc-500 dark:text-zinc-400">
+ 上传 PDF/文本作为参考资料(可选)
+ </div>
+ {referenceFiles.length > 0 && (
+ <button
+ type="button"
+ onClick={() => setReferenceFiles([])}
+ className="text-xs text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-200"
+ disabled={isParsingReferenceFiles}
+ >
+ 清空
+ </button>
+ )}
+ </div>
+
+ {referenceFiles.length > 0 && (
+ <div className="grid gap-2">
+ {referenceFiles.map((f) => (
+ <div key={f.id} className="flex items-center justify-between gap-3 rounded-lg border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900/40 px-3 py-2">
+ <button
+ type="button"
+ onClick={() => openReferencePreview(f)}
+ className="flex items-center gap-2 min-w-0 text-left"
+ >
+ <FileText className="w-4 h-4 text-zinc-500 flex-shrink-0" />
+ <span className="truncate text-sm text-zinc-800 dark:text-zinc-100">{f.filename}</span>
+ <span className="text-xs text-zinc-500 dark:text-zinc-400 flex-shrink-0">({f.charCount} chars)</span>
+ </button>
+ <button
+ type="button"
+ className="text-xs text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-200"
+ onClick={() => setReferenceFiles((prev) => prev.filter((x) => x.id !== f.id))}
+ >
+ 移除
+ </button>
+ </div>
+ ))}
+ </div>
+ )}
+ </motion.div>
+ </div>
+
+ <Button
+ onClick={creationMode === "idea" ? handleGenerateOutline : creationMode === "outline" ? handleLoadOutline : handleLoadDescriptions}
+ disabled={Boolean(progress.message) || isParsingReferenceFiles || (creationMode === "idea" ? !ideaInput.trim() : creationMode === "outline" ? !outlineInput.trim() : !descriptionInput.trim())}
+ className="w-full py-6 text-lg font-medium bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-700 hover:to-indigo-700 text-white shadow-lg shadow-blue-500/20 rounded-xl transition-all hover:scale-[1.01] active:scale-[0.99]"
+ >
+ {progress.message ? <Loader2 className="w-5 h-5 mr-2 animate-spin" /> : <Sparkles className="w-5 h-5 mr-2" />}
+ {progress.message || (creationMode === "idea" ? "开始生成大纲" : creationMode === "outline" ? "载入大纲" : "载入描述")}
+ </Button>
+ </div>
+
+ <Dialog open={referencePreviewOpen} onOpenChange={setReferencePreviewOpen}>
+ <DialogContent className="max-w-3xl">
+ <DialogHeader>
+ <DialogTitle>{referencePreviewFile?.filename || "参考文件"}</DialogTitle>
+ </DialogHeader>
+ <Textarea value={referencePreviewFile?.content || ""} readOnly className="min-h-[420px] font-mono text-xs" />
+ </DialogContent>
+ </Dialog>
+ </div>
+ </div>
+ </div>
+ );
+ }
+
+ // Render Outline Review
+ if (creationStep === 'outline') {
+ return (
+ <div className="w-full h-full bg-zinc-50 dark:bg-zinc-900 flex flex-col overflow-hidden">
+ <div className="flex-1 overflow-auto p-6">
+ <div className="w-full min-h-full bg-white dark:bg-zinc-800 rounded-xl shadow-sm flex flex-col overflow-hidden">
+ <div className="p-6 border-b border-border flex justify-between items-center">
+ <h3 className="font-semibold text-lg">{creationMode === "description" ? "确认内容与描述" : "确认大纲"}</h3>
+ <div className="text-sm text-muted-foreground">共 {localSlides.length} 页</div>
+ </div>
+
+ <div className="flex-1 overflow-y-auto p-6 space-y-4">
+ {localSlides.map((slide, i) => (
+ <div key={i} className="flex gap-4 p-4 border rounded-lg bg-zinc-50 dark:bg-zinc-900/50">
+ <div className="w-8 h-8 flex items-center justify-center bg-white dark:bg-zinc-800 rounded-full border text-sm font-medium text-muted-foreground">
+ {i + 1}
+ </div>
+ <div className="flex-1 space-y-2">
+ <div className="flex items-start justify-between gap-3">
+ <input
+ value={slide.title}
+ onChange={(e) => {
+ const newSlides = [...localSlides];
+ newSlides[i].title = e.target.value;
+ setLocalSlides(newSlides);
+ }}
+ className="w-full font-medium bg-transparent border-none focus:outline-none focus:ring-0 p-0"
+ />
+ <Button variant="outline" size="sm" onClick={() => handleAddSlideToChat(slide)} className="shrink-0">
+ <MessageSquarePlus className="w-4 h-4 mr-2" />
+ 加入对话
+ </Button>
+ </div>
+ <div className="space-y-1">
+ {(slide.content || []).map((point, j) => (
+ <div key={j} className="flex gap-2 text-sm text-muted-foreground">
+ <span>•</span>
+ <input
+ value={point}
+ onChange={(e) => {
+ const newSlides = [...localSlides];
+ if (!newSlides[i].content) newSlides[i].content = [];
+ newSlides[i].content[j] = e.target.value;
+ setLocalSlides(newSlides);
+ }}
+ className="flex-1 bg-transparent border-none focus:outline-none focus:ring-0 p-0"
+ />
+ </div>
+ ))}
+ </div>
+ {creationMode === "description" && (
+ <div className="pt-2">
+ <div className="text-xs font-medium text-foreground mb-1">画面描述(用于生图)</div>
+ <textarea
+ value={slide.description || ""}
+ onChange={(e) => {
+ const newSlides = [...localSlides];
+ newSlides[i].description = e.target.value;
+ setLocalSlides(newSlides);
+ }}
+ className="w-full h-20 p-3 rounded-md border border-input bg-background text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
+ placeholder="例如:科技感蓝色渐变背景,中心是抽象的 AI 芯片与电路纹理,干净留白…"
+ />
+ </div>
+ )}
+ </div>
+ </div>
+ ))}
+ </div>
+
+ <div className="p-6 border-t border-border bg-zinc-50/50 dark:bg-zinc-900/50 flex justify-end gap-3">
+ <Button variant="outline" onClick={() => setCreationStep('idle')}>返回修改</Button>
+ <Button onClick={creationMode === "description" ? handleGenerateImagesOnly : handleGenerateFullPpt} className="bg-blue-600 hover:bg-blue-700">
+ <Sparkles className="w-4 h-4 mr-2" />
+ {creationMode === "description" ? "开始渲染图片" : "生成完整 PPT"}
+ </Button>
+ </div>
+ </div>
+ </div>
+ </div>
+ );
+ }
+
+ // Render Progress
+ if (creationStep === 'generating_content' || creationStep === 'generating_images') {
+ return (
+ <div className="w-full h-full bg-zinc-50 dark:bg-zinc-900 flex flex-col overflow-hidden">
+ <div className="flex-1 flex items-center justify-center p-6">
+ <div className="w-full max-w-md bg-white dark:bg-zinc-800 p-8 rounded-xl shadow-lg text-center space-y-6">
+ <div className="relative w-20 h-20 mx-auto">
+ <svg className="w-full h-full" viewBox="0 0 100 100">
+ <circle className="text-zinc-200 dark:text-zinc-700 stroke-current" strokeWidth="8" cx="50" cy="50" r="40" fill="transparent"></circle>
+ <circle className="text-blue-600 stroke-current transition-all duration-300 ease-in-out origin-center -rotate-90" strokeWidth="8" strokeLinecap="round" cx="50" cy="50" r="40" fill="transparent" strokeDasharray={`${(progress.current / progress.total) * 251.2} 251.2`}></circle>
+ </svg>
+ <div className="absolute inset-0 flex items-center justify-center text-sm font-bold">
+ {Math.round((progress.current / progress.total) * 100)}%
+ </div>
+ </div>
+
+ <div className="space-y-2">
+ <h3 className="font-semibold text-lg">AI 正在创作中</h3>
+ <p className="text-sm text-muted-foreground">{progress.message}</p>
+ </div>
+
+ <div className="flex justify-center gap-2 text-xs text-muted-foreground">
+ <div className={`flex items-center gap-1 ${creationStep === 'generating_content' ? 'text-blue-600' : 'text-green-600'}`}>
+ {creationStep === 'generating_content' ? <Loader2 className="w-3 h-3 animate-spin" /> : <Check className="w-3 h-3" />}
+ <span>生成内容</span>
+ </div>
+ <span className="text-zinc-300">→</span>
+ <div className={`flex items-center gap-1 ${creationStep === 'generating_images' ? 'text-blue-600' : 'text-zinc-400'}`}>
+ {creationStep === 'generating_images' && <Loader2 className="w-3 h-3 animate-spin" />}
+ <span>渲染图片</span>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ );
+ }
+
+ // Regular View (creationStep === 'done' or manually provided data)
+ return (
+ <div className="w-full h-full bg-zinc-100 dark:bg-zinc-900 flex flex-col">
+ {/* Toolbar */}
+ <div className="h-14 px-4 bg-white dark:bg-zinc-800 border-b border-zinc-200 dark:border-zinc-700 flex justify-between items-center shadow-sm z-10">
+ <div className="flex items-center gap-4">
+ <h2 className="font-semibold text-sm text-foreground">PPT 演示文稿</h2>
+ <div className="h-4 w-px bg-border"></div>
+ <label className="flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground cursor-pointer transition-colors">
+ <Upload className="w-3.5 h-3.5" />
+ <span>{templateImage ? "已上传模板" : "上传模板参考图"}</span>
+ <input type="file" accept="image/*" className="hidden" onChange={handleFileUpload} />
+ </label>
+ <div className="h-4 w-px bg-border"></div>
+ <button
+ onClick={() => setSlideshowOpen(true)}
+ disabled={activeSlides.length === 0}
+ className="flex items-center gap-2 px-3 py-1.5 bg-zinc-100 dark:bg-zinc-700 hover:bg-zinc-200 dark:hover:bg-zinc-600 text-xs rounded transition-colors shadow-sm"
+ >
+ <Play className="w-3.5 h-3.5" />
+ <span>播放</span>
+ </button>
+ <div className="h-4 w-px bg-border"></div>
+ <button
+ onClick={handleDownloadPpt}
+ disabled={activeSlides.length === 0}
+ className="flex items-center gap-2 px-3 py-1.5 bg-zinc-100 dark:bg-zinc-700 hover:bg-zinc-200 dark:hover:bg-zinc-600 text-xs rounded transition-colors shadow-sm"
+ >
+ <Download className="w-3.5 h-3.5" />
+ <span>导出 PPTX</span>
+ </button>
+ <button
+ onClick={handleDownloadPdf}
+ disabled={activeSlides.length === 0}
+ className="flex items-center gap-2 px-3 py-1.5 bg-zinc-100 dark:bg-zinc-700 hover:bg-zinc-200 dark:hover:bg-zinc-600 text-xs rounded transition-colors shadow-sm"
+ >
+ <Download className="w-3.5 h-3.5" />
+ <span>导出 PDF</span>
+ </button>
+ </div>
+ <div className="text-xs text-muted-foreground">
+ {activeSlides.length > 0 ? `第 ${currentSlideIndex + 1} / ${activeSlides.length} 页` : "空文档"}
+ </div>
+ </div>
+
+ {/* Main View */}
+ <div className="flex-1 flex overflow-hidden">
+ {/* Thumbnails */}
+ <div className="w-64 bg-zinc-50 dark:bg-zinc-900 border-r border-border overflow-y-auto p-4 space-y-4">
+ <div className="flex items-center gap-2">
+ <Button
+ variant="outline"
+ size="sm"
+ className="h-7 px-2 text-xs"
+ onClick={() => {
+ const next: Record<string, boolean> = {};
+ for (const s of activeSlides) next[s.id] = true;
+ setSelectedSlideIds(next);
+ }}
+ >
+ 全选
+ </Button>
+ <Button
+ variant="outline"
+ size="sm"
+ className="h-7 px-2 text-xs"
+ onClick={() => setSelectedSlideIds({})}
+ >
+ 清空
+ </Button>
+ <Button
+ variant="default"
+ size="sm"
+ className="h-7 px-2 text-xs ml-auto"
+ onClick={handleAddSelectedSlidesToChat}
+ disabled={Object.keys(selectedSlideIds).length === 0}
+ >
+ 加入对话
+ </Button>
+ </div>
+ {activeSlides.map((slide, index) => {
+ const hasGeneratedImage = generatedImages[slide.id || index];
+ return (
+ <ContextMenu key={slide.id || index}>
+ <ContextMenuTrigger>
+ <div
+ onClick={() => setCurrentSlideIndex(index)}
+ className={`cursor-pointer border-2 rounded-lg overflow-hidden relative aspect-[16/9] group transition-all duration-200 ${
+ currentSlideIndex === index
+ ? 'border-blue-600 shadow-md scale-[1.02]'
+ : 'border-transparent hover:border-zinc-300 dark:hover:border-zinc-700 bg-white dark:bg-zinc-800 shadow-sm'
+ }`}
+ >
+ <div
+ className="absolute top-1 left-1 z-20 flex items-center gap-1 bg-white/90 dark:bg-zinc-900/80 rounded px-1.5 py-1 border border-border/50"
+ onClick={(e) => e.stopPropagation()}
+ >
+ <input
+ type="checkbox"
+ checked={!!selectedSlideIds[slide.id]}
+ onChange={(e) => {
+ const checked = e.target.checked;
+ setSelectedSlideIds(prev => {
+ const next = { ...prev };
+ if (checked) next[slide.id] = true;
+ else delete next[slide.id];
+ return next;
+ });
+ }}
+ className="h-3 w-3"
+ />
+ <span className="text-[10px] text-muted-foreground">选中</span>
+ </div>
+ {/* Thumbnail Preview */}
+ {hasGeneratedImage ? (
+ <img src={hasGeneratedImage} className="w-full h-full object-cover" alt={`Slide ${index + 1}`} />
+ ) : (
+ <div className="w-full h-full p-2 flex flex-col bg-white overflow-hidden text-[6px]">
+ {templateImage && (
+ <img src={templateImage} className="absolute inset-0 w-full h-full object-cover opacity-20 pointer-events-none" alt="" />
+ )}
+ <div className="font-bold mb-1 truncate z-10 relative">{slide.title}</div>
+ <div className="flex-1 space-y-0.5 z-10 relative">
+ {(slide.content || []).slice(0, 3).map((line, i) => (
+ <div key={i} className="truncate text-zinc-500">• {line}</div>
+ ))}
+ </div>
+ </div>
+ )}
+
+ <div className="absolute bottom-1 right-1 bg-black/60 text-white text-[10px] px-1.5 rounded-sm backdrop-blur-sm">
+ {index + 1}
+ </div>
+ </div>
+ </ContextMenuTrigger>
+ <ContextMenuContent>
+ <ContextMenuItem onClick={() => handleAddSlideToChat(slide)} className="gap-2">
+ <MessageSquarePlus className="w-4 h-4" />
+ <span>把此页添加到对话</span>
+ </ContextMenuItem>
+ </ContextMenuContent>
+ </ContextMenu>
+ )})}
+
+ {activeSlides.length === 0 && (
+ <div className="text-center py-8">
+ <div className="inline-flex items-center justify-center w-12 h-12 rounded-full bg-muted mb-3">
+ <Presentation className="w-6 h-6 text-muted-foreground" />
+ </div>
+ <p className="text-sm text-muted-foreground">在右侧对话框中输入需求<br/>让 AI 为您生成 PPT</p>
+ </div>
+ )}
+ </div>
+
+ {/* Preview */}
+ <div className="flex-1 p-4 flex items-center justify-center bg-zinc-200/50 dark:bg-zinc-950/50 overflow-auto relative">
+ <div className="absolute top-4 left-4 z-30 flex items-center gap-2 bg-white/80 dark:bg-zinc-900/70 backdrop-blur rounded-xl border border-border/50 px-3 py-2 shadow-sm">
+ <Button
+ size="sm"
+ className="h-7 px-2 text-xs"
+ onClick={handleGenerateAiImage}
+ disabled={!currentSlide || isGeneratingImage}
+ >
+ {isGeneratingImage ? <Loader2 className="w-3 h-3 mr-1 animate-spin" /> : null}
+ 重渲染本页
+ </Button>
+ <Button
+ size="sm"
+ variant="outline"
+ className="h-7 px-2 text-xs"
+ onClick={() => setBulkEditOpen(true)}
+ disabled={activeSlides.length === 0}
+ >
+ 批量修改
+ </Button>
+ {currentSlide && (imageVersions[currentSlide.id] || []).length > 0 && (
+ <select
+ className="h-7 text-xs rounded-md border border-input bg-background px-2"
+ value={currentImageVersionId[currentSlide.id] || (imageVersions[currentSlide.id] || [])[0]?.id}
+ onChange={(e) => {
+ const slideId = currentSlide.id;
+ const versionId = e.target.value;
+ const versions = imageVersions[slideId] || [];
+ const v = versions.find(x => x.id === versionId);
+ if (v) {
+ setCurrentImageVersionId(prev => ({ ...prev, [slideId]: versionId }));
+ setGeneratedImages(prev => ({ ...prev, [slideId]: v.url }));
+ }
+ }}
+ >
+ {(imageVersions[currentSlide.id] || []).map((v, idx) => (
+ <option key={v.id} value={v.id}>
+ {idx + 1} · {new Date(v.timestamp).toLocaleString()}
+ </option>
+ ))}
+ </select>
+ )}
+ </div>
+ {currentSlide ? (
+ <ContextMenu>
+ <ContextMenuTrigger className="outline-none">
+ <div className="relative w-full max-w-[1100px] aspect-[16/9] bg-white shadow-2xl rounded-sm overflow-hidden flex flex-col transition-transform duration-300">
+ {/* Display either generated image or DOM layout */}
+ {currentSlideImage ? (
+ <img src={currentSlideImage} className="w-full h-full object-cover" alt="AI Generated Slide" />
+ ) : (
+ <div className="w-full h-full p-12 flex flex-col relative">
+ {/* Background Template */}
+ {templateImage && (
+ <img src={templateImage} className="absolute inset-0 w-full h-full object-cover opacity-30 pointer-events-none" alt="Template" />
+ )}
+
+ {/* Slide Content */}
+ <div className="relative z-10 h-full flex flex-col">
+ <h1 className="text-4xl font-bold mb-8 text-zinc-900 border-b-4 border-blue-600 pb-4 w-fit pr-12">
+ {currentSlide.title}
+ </h1>
+ <div className="flex-1 space-y-6">
+ {(currentSlide.content || []).map((point, i) => (
+ <div key={i} className="flex gap-4 text-2xl text-zinc-700 leading-relaxed items-start">
+ <span className="text-blue-600 mt-2">•</span>
+ <span>{point}</span>
+ </div>
+ ))}
+ </div>
+
+ {/* Footer/Note Placeholder */}
+ <div className="mt-auto pt-8 flex justify-between text-sm text-zinc-400 border-t border-zinc-100">
+ <span>Generated by Unified AI Workspace</span>
+ <span>{currentSlideIndex + 1}</span>
+ </div>
+ </div>
+ </div>
+ )}
+
+ {/* Overlay Label if Generated */}
+ </div>
+ </ContextMenuTrigger>
+ <ContextMenuContent>
+ <ContextMenuItem onClick={() => handleAddSlideToChat(currentSlide)} className="gap-2">
+ <MessageSquarePlus className="w-4 h-4" />
+ <span>把此页添加到对话</span>
+ </ContextMenuItem>
+ </ContextMenuContent>
+ </ContextMenu>
+ ) : (
+ <div className="text-muted-foreground flex flex-col items-center">
+ <ImageIcon className="w-16 h-16 mb-4 opacity-20" />
+ <p>暂无幻灯片</p>
+ </div>
+ )}
+ </div>
+ </div>
+
+ <Dialog open={slideshowOpen} onOpenChange={setSlideshowOpen}>
+ <DialogContent className="max-w-none w-screen h-screen p-0 bg-black border-none">
+ <div className="w-full h-full flex flex-col">
+ <div className="h-14 px-4 flex items-center justify-between text-white/90">
+ <div className="text-sm">
+ {activeSlides.length > 0 ? `第 ${slideshowIndex + 1} / ${activeSlides.length} 页` : ""}
+ </div>
+ <div className="flex items-center gap-2">
+ <Button
+ variant="ghost"
+ size="sm"
+ className="text-white hover:text-white hover:bg-white/10"
+ onClick={() => setSlideshowAuto((v) => !v)}
+ >
+ {slideshowAuto ? "暂停" : "自动播放"}
+ </Button>
+ <Button
+ variant="ghost"
+ size="sm"
+ className="text-white hover:text-white hover:bg-white/10"
+ onClick={() => setSlideshowOpen(false)}
+ >
+ 退出
+ </Button>
+ </div>
+ </div>
+ <div className="flex-1 flex items-center justify-center px-6 pb-6">
+ {activeSlides[slideshowIndex] ? (
+ <div className="w-full max-w-[1400px] aspect-[16/9] bg-white shadow-2xl overflow-hidden">
+ {getSlideImageUrl(activeSlides[slideshowIndex].id) ? (
+ <img
+ src={getSlideImageUrl(activeSlides[slideshowIndex].id)}
+ className="w-full h-full object-cover"
+ alt="Slide"
+ />
+ ) : (
+ <div className="w-full h-full p-12 flex flex-col">
+ <h1 className="text-4xl font-bold mb-8 text-zinc-900 border-b-4 border-blue-600 pb-4 w-fit pr-12">
+ {activeSlides[slideshowIndex].title}
+ </h1>
+ <div className="flex-1 space-y-6">
+ {(activeSlides[slideshowIndex].content || []).map((point, i) => (
+ <div key={i} className="flex gap-4 text-2xl text-zinc-700 leading-relaxed items-start">
+ <span className="text-blue-600 mt-2">•</span>
+ <span>{point}</span>
+ </div>
+ ))}
+ </div>
+ <div className="mt-auto pt-8 flex justify-between text-sm text-zinc-400 border-t border-zinc-100">
+ <span>Generated by Unified AI Workspace</span>
+ <span>{slideshowIndex + 1}</span>
+ </div>
+ </div>
+ )}
+ </div>
+ ) : null}
+ </div>
+ <div className="h-16 px-4 flex items-center justify-center gap-3">
+ <Button
+ variant="outline"
+ className="bg-white/10 border-white/20 text-white hover:bg-white/15"
+ onClick={() => setSlideshowIndex((v) => (v - 1 + activeSlides.length) % activeSlides.length)}
+ disabled={activeSlides.length <= 1}
+ >
+ 上一页
+ </Button>
+ <Button
+ variant="outline"
+ className="bg-white/10 border-white/20 text-white hover:bg-white/15"
+ onClick={() => setSlideshowIndex((v) => (v + 1) % activeSlides.length)}
+ disabled={activeSlides.length <= 1}
+ >
+ 下一页
+ </Button>
+ </div>
+ </div>
+ </DialogContent>
+ </Dialog>
+
+ <Dialog open={bulkEditOpen} onOpenChange={setBulkEditOpen}>
+ <DialogContent className="sm:max-w-[720px]">
+ <DialogHeader>
+ <DialogTitle>批量修改(智能拆分到对应幻灯片)</DialogTitle>
+ </DialogHeader>
+ <div className="space-y-3">
+ <Textarea
+ value={bulkEditText}
+ onChange={(e) => setBulkEditText(e.target.value)}
+ placeholder="把你对多张幻灯片的修改意见一次性写在这里,例如:第1页标题更简洁;第3页配图换成更科技感的插画;结尾页增加总结..."
+ className="min-h-[180px]"
+ />
+ <div className="flex justify-end gap-2">
+ <Button variant="outline" onClick={() => setBulkEditOpen(false)} disabled={isApplyingBulkEdit}>
+ 取消
+ </Button>
+ <Button onClick={handleApplyBulkEdit} disabled={!bulkEditText.trim() || isApplyingBulkEdit}>
+ {isApplyingBulkEdit ? <Loader2 className="w-4 h-4 mr-2 animate-spin" /> : null}
+ 开始应用
+ </Button>
+ </div>
+ </div>
+ </DialogContent>
+ </Dialog>
+ </div>
+ );
+}
diff --git a/src/hooks/useTheme.ts b/src/hooks/useTheme.ts
new file mode 100644
index 0000000..841f812
--- /dev/null
+++ b/src/hooks/useTheme.ts
@@ -0,0 +1,29 @@
+import { useState, useEffect } from 'react';
+
+type Theme = 'light' | 'dark';
+
+export function useTheme() {
+ const [theme, setTheme] = useState<Theme>(() => {
+ const savedTheme = localStorage.getItem('theme') as Theme;
+ if (savedTheme) {
+ return savedTheme;
+ }
+ return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
+ });
+
+ useEffect(() => {
+ document.documentElement.classList.remove('light', 'dark');
+ document.documentElement.classList.add(theme);
+ localStorage.setItem('theme', theme);
+ }, [theme]);
+
+ const toggleTheme = () => {
+ setTheme(prevTheme => prevTheme === 'light' ? 'dark' : 'light');
+ };
+
+ return {
+ theme,
+ toggleTheme,
+ isDark: theme === 'dark'
+ };
+}
\ No newline at end of file
diff --git a/src/index.css b/src/index.css
new file mode 100644
index 0000000..ec4e8f7
--- /dev/null
+++ b/src/index.css
@@ -0,0 +1,76 @@
+@tailwind base;
+@tailwind components;
+@tailwind utilities;
+
+@layer base {
+ :root {
+ --background: 0 0% 100%;
+ --foreground: 222.2 84% 4.9%;
+
+ --card: 0 0% 100%;
+ --card-foreground: 222.2 84% 4.9%;
+
+ --popover: 0 0% 100%;
+ --popover-foreground: 222.2 84% 4.9%;
+
+ --primary: 222.2 47.4% 11.2%;
+ --primary-foreground: 210 40% 98%;
+
+ --secondary: 210 40% 96.1%;
+ --secondary-foreground: 222.2 47.4% 11.2%;
+
+ --muted: 210 40% 96.1%;
+ --muted-foreground: 215.4 16.3% 46.9%;
+
+ --accent: 210 40% 96.1%;
+ --accent-foreground: 222.2 47.4% 11.2%;
+
+ --destructive: 0 84.2% 60.2%;
+ --destructive-foreground: 210 40% 98%;
+
+ --border: 214.3 31.8% 91.4%;
+ --input: 214.3 31.8% 91.4%;
+ --ring: 222.2 84% 4.9%;
+
+ --radius: 0.5rem;
+ }
+
+ .dark {
+ --background: 222.2 84% 4.9%;
+ --foreground: 210 40% 98%;
+
+ --card: 222.2 84% 4.9%;
+ --card-foreground: 210 40% 98%;
+
+ --popover: 222.2 84% 4.9%;
+ --popover-foreground: 210 40% 98%;
+
+ --primary: 210 40% 98%;
+ --primary-foreground: 222.2 47.4% 11.2%;
+
+ --secondary: 217.2 32.6% 17.5%;
+ --secondary-foreground: 210 40% 98%;
+
+ --muted: 217.2 32.6% 17.5%;
+ --muted-foreground: 215 20.2% 65.1%;
+
+ --accent: 217.2 32.6% 17.5%;
+ --accent-foreground: 210 40% 98%;
+
+ --destructive: 0 62.8% 30.6%;
+ --destructive-foreground: 210 40% 98%;
+
+ --border: 217.2 32.6% 17.5%;
+ --input: 217.2 32.6% 17.5%;
+ --ring: 212.7 26.8% 83.9%;
+ }
+}
+
+@layer base {
+ * {
+ @apply border-border;
+ }
+ body {
+ @apply bg-background text-foreground;
+ }
+}
diff --git a/src/lib/ai-client.ts b/src/lib/ai-client.ts
new file mode 100644
index 0000000..7d2be50
--- /dev/null
+++ b/src/lib/ai-client.ts
@@ -0,0 +1,298 @@
+import OpenAI from 'openai';
+
+// Configuration Interfaces
+export interface AIConfig {
+ apiKey: string;
+ baseUrl: string;
+ chatModel: string;
+ imageModel: string;
+ systemPrompt?: string;
+}
+
+// Default Configuration
+const DEFAULT_CONFIG: AIConfig = {
+ apiKey: "",
+ baseUrl: "https://api.rcouyi.com/v1",
+ chatModel: "gpt-3.5-turbo",
+ imageModel: "gemini-2.5-flash-image-preview",
+ systemPrompt: ""
+};
+
+const STORAGE_KEY = "unified_ai_workspace_config";
+const MODEL_CONCURRENCY = 30;
+
+type QueueItem<T> = {
+ run: () => Promise<T>;
+ resolve: (value: T) => void;
+ reject: (reason?: any) => void;
+ signal?: AbortSignal;
+ onAbort?: () => void;
+};
+
+function createLimiter(max: number) {
+ let active = 0;
+ const queue: QueueItem<any>[] = [];
+
+ const pump = () => {
+ while (active < max && queue.length > 0) {
+ const item = queue.shift()!;
+ if (item.signal?.aborted) {
+ item.reject(Object.assign(new Error("Aborted"), { name: "AbortError" }));
+ continue;
+ }
+
+ active += 1;
+ if (item.signal && item.onAbort) {
+ item.signal.removeEventListener("abort", item.onAbort);
+ item.onAbort = undefined;
+ }
+
+ item
+ .run()
+ .then(item.resolve, item.reject)
+ .finally(() => {
+ active -= 1;
+ pump();
+ });
+ }
+ };
+
+ return function limit<T>(run: () => Promise<T>, signal?: AbortSignal) {
+ if (signal?.aborted) {
+ return Promise.reject(Object.assign(new Error("Aborted"), { name: "AbortError" }));
+ }
+
+ return new Promise<T>((resolve, reject) => {
+ const item: QueueItem<T> = { run, resolve, reject, signal };
+ if (signal) {
+ const onAbort = () => {
+ const idx = queue.indexOf(item as any);
+ if (idx >= 0) queue.splice(idx, 1);
+ reject(Object.assign(new Error("Aborted"), { name: "AbortError" }));
+ };
+ item.onAbort = onAbort;
+ signal.addEventListener("abort", onAbort, { once: true });
+ }
+
+ queue.push(item);
+ pump();
+ });
+ };
+}
+
+const limitModelCall = createLimiter(MODEL_CONCURRENCY);
+
+// Helper to get config
+export function getAIConfig(): AIConfig {
+ if (typeof window === 'undefined') return DEFAULT_CONFIG;
+ const stored = localStorage.getItem(STORAGE_KEY);
+ if (stored) {
+ return { ...DEFAULT_CONFIG, ...JSON.parse(stored) };
+ }
+ return DEFAULT_CONFIG;
+}
+
+// Helper to save config
+export function saveAIConfig(config: AIConfig) {
+ localStorage.setItem(STORAGE_KEY, JSON.stringify(config));
+}
+
+// OpenAI Client Factory
+function getClient() {
+ const config = getAIConfig();
+ return new OpenAI({
+ apiKey: config.apiKey || "dummy", // Prevent crash if empty, but calls will fail
+ baseURL: config.baseUrl,
+ dangerouslyAllowBrowser: true
+ });
+}
+
+export interface ChatMessage {
+ role: 'user' | 'assistant' | 'system';
+ content: string;
+}
+
+// Stream Chat Message
+export async function streamChatMessage(
+ messages: ChatMessage[],
+ onChunk: (content: string) => void,
+ model?: string,
+ signal?: AbortSignal
+) {
+ return await limitModelCall(async () => {
+ const config = getAIConfig();
+ const client = getClient();
+
+ if (!config.apiKey) {
+ throw new Error("请先在设置中配置 API Key");
+ }
+
+ try {
+ const stream = await client.chat.completions.create(
+ {
+ model: model || config.chatModel,
+ messages: messages,
+ stream: true,
+ },
+ signal ? ({ signal } as any) : undefined
+ );
+
+ let fullContent = '';
+ for await (const chunk of stream) {
+ const content = chunk.choices[0]?.delta?.content || '';
+ if (content) {
+ fullContent += content;
+ onChunk(fullContent);
+ }
+ }
+ console.log("=== AI Chat Response ===");
+ console.log(fullContent);
+ console.log("========================");
+ return fullContent;
+ } catch (error) {
+ if ((error as any)?.name === "AbortError") {
+ throw error;
+ }
+ console.error("Chat Stream Error:", error);
+ throw error;
+ }
+ }, signal);
+}
+
+// Simple non-stream wrapper
+export async function generateChatMessage(messages: ChatMessage[], model?: string) {
+ return streamChatMessage(messages, () => {}, model);
+}
+
+// Legacy non-stream function (kept for compatibility if needed)
+export async function sendChatMessage(messages: ChatMessage[]) {
+ return streamChatMessage(messages, () => {});
+}
+
+// Image Generation Client
+export interface ImageGenerationRequest {
+ prompt: string;
+ referenceImageUrl?: string; // For image-to-image
+}
+
+// Helper to validate and clean URL
+function cleanUrl(url: string) {
+ if (!url) return null;
+ if (url.startsWith('http')) return url;
+ // If it looks like a path but not absolute URL, return as is (might be base64 or relative)
+ if (url.startsWith('data:image')) return url;
+ return null;
+}
+
+function extractImageUrlFromContent(messageContent: any) {
+ if (Array.isArray(messageContent)) {
+ const imagePart = messageContent.find((part: any) => part.type === 'image_url');
+ if (imagePart) {
+ return cleanUrl(imagePart.image_url.url);
+ }
+ const textPart = messageContent.find((part: any) => part.type === 'text');
+ if (textPart) {
+ const text = textPart.text;
+ const markdownMatch = text.match(/!\[.*?\]\((.*?)\)/);
+ if (markdownMatch && markdownMatch[1]) {
+ return cleanUrl(markdownMatch[1]);
+ }
+ if (text.trim().startsWith('http') || text.trim().startsWith('data:image')) {
+ return cleanUrl(text.trim());
+ }
+ }
+ return null;
+ }
+
+ if (typeof messageContent === 'string') {
+ const markdownMatch = messageContent.match(/!\[.*?\]\((.*?)\)/);
+ if (markdownMatch && markdownMatch[1]) {
+ return cleanUrl(markdownMatch[1]);
+ }
+ if (messageContent.trim().startsWith('http')) {
+ return cleanUrl(messageContent.trim());
+ }
+ return null;
+ }
+
+ return null;
+}
+
+function parseAIResponse(result: any) {
+ console.log("=== AI Image Response (Parsed) ===");
+ console.log(JSON.stringify(result, null, 2));
+ console.log("==================================");
+
+ if (result.error) {
+ throw new Error(result.error.message || "API Error");
+ }
+
+ if (result.choices && result.choices.length > 0) {
+ const messageContent = result.choices[0].message.content;
+ return extractImageUrlFromContent(messageContent);
+ }
+ return null;
+}
+
+export async function generateImage(request: ImageGenerationRequest, signal?: AbortSignal) {
+ return await limitModelCall(async () => {
+ const config = getAIConfig();
+
+ if (!config.apiKey) {
+ throw new Error("请先在设置中配置 API Key");
+ }
+
+ const myHeaders = new Headers();
+ myHeaders.append("Authorization", `Bearer ${config.apiKey}`);
+ myHeaders.append("Content-Type", "application/json");
+
+ const content: any[] = [
+ {
+ "type": "text",
+ "text": request.prompt
+ }
+ ];
+
+ if (request.referenceImageUrl) {
+ content.push({
+ "type": "image_url",
+ "image_url": {
+ "url": request.referenceImageUrl
+ }
+ });
+ }
+
+ const raw = JSON.stringify({
+ "model": config.imageModel,
+ "messages": [
+ {
+ "role": "user",
+ "content": request.referenceImageUrl ? content : request.prompt
+ }
+ ],
+ "stream": false
+ });
+
+ const requestOptions = {
+ method: 'POST',
+ headers: myHeaders,
+ body: raw,
+ redirect: 'follow' as RequestRedirect,
+ ...(signal ? { signal } : {})
+ };
+
+ try {
+ const response = await fetch(`${config.baseUrl}/chat/completions`, requestOptions);
+
+ if (!response.ok) {
+ throw new Error(`API request failed with status ${response.status}`);
+ }
+
+ const result = await response.json();
+ return parseAIResponse(result);
+ } catch (error) {
+ console.error("Image Gen Error:", error);
+ throw error;
+ }
+ }, signal);
+}
diff --git a/src/lib/pdf-utils.ts b/src/lib/pdf-utils.ts
new file mode 100644
index 0000000..66e1a23
--- /dev/null
+++ b/src/lib/pdf-utils.ts
@@ -0,0 +1,79 @@
+import { extractText, getDocumentProxy } from "unpdf"
+
+// Maximum characters allowed for extracted text (configurable via env)
+const DEFAULT_MAX_EXTRACTED_CHARS = 150000 // 150k chars
+export const MAX_EXTRACTED_CHARS = DEFAULT_MAX_EXTRACTED_CHARS
+
+// Text file extensions we support
+const TEXT_EXTENSIONS = [
+ ".txt", ".md", ".markdown", ".json", ".csv", ".xml", ".html", ".css", ".js", ".ts",
+ ".jsx", ".tsx", ".py", ".java", ".c", ".cpp", ".h", ".go", ".rs", ".yaml", ".yml",
+ ".toml", ".ini", ".log", ".sh", ".bash", ".zsh"
+]
+
+/**
+ * Extract text content from a PDF file
+ * Uses unpdf library for client-side extraction
+ */
+export async function extractPdfText(file: File): Promise<string> {
+ const buffer = await file.arrayBuffer()
+ const pdf = await getDocumentProxy(new Uint8Array(buffer))
+ const { text } = await extractText(pdf, { mergePages: true })
+ return text as string
+}
+
+export async function getPdfPageCountFromUrl(url: string): Promise<number> {
+ const res = await fetch(url)
+ const buffer = await res.arrayBuffer()
+ const pdf = await getDocumentProxy(new Uint8Array(buffer))
+ return (pdf as any).numPages ?? 0
+}
+
+export async function getPdfDocumentFromUrl(url: string): Promise<any> {
+ const res = await fetch(url)
+ const buffer = await res.arrayBuffer()
+ return await getDocumentProxy(new Uint8Array(buffer))
+}
+
+export async function renderPdfPageToCanvas(opts: { pdf: any; pageNumber: number; canvas: HTMLCanvasElement; targetWidth: number }): Promise<void> {
+ const page = await opts.pdf.getPage(opts.pageNumber)
+ const viewportAtScale1 = page.getViewport({ scale: 1 })
+ const scale = opts.targetWidth / viewportAtScale1.width
+ const viewport = page.getViewport({ scale })
+
+ const dpr = typeof window !== "undefined" ? window.devicePixelRatio || 1 : 1
+ opts.canvas.width = Math.floor(viewport.width * dpr)
+ opts.canvas.height = Math.floor(viewport.height * dpr)
+ opts.canvas.style.width = `${Math.floor(viewport.width)}px`
+ opts.canvas.style.height = `${Math.floor(viewport.height)}px`
+ const ctx = opts.canvas.getContext("2d")
+ if (!ctx) return
+ ctx.setTransform(dpr, 0, 0, dpr, 0, 0)
+ await page.render({ canvasContext: ctx, viewport }).promise
+}
+
+/**
+ * Check if a file is a PDF
+ */
+export function isPdfFile(file: File): boolean {
+ return file.type === "application/pdf" || file.name.endsWith(".pdf")
+}
+
+/**
+ * Check if a file is a text file
+ */
+export function isTextFile(file: File): boolean {
+ const name = file.name.toLowerCase()
+ return (
+ file.type.startsWith("text/") ||
+ file.type === "application/json" ||
+ TEXT_EXTENSIONS.some((ext) => name.endsWith(ext))
+ )
+}
+
+/**
+ * Extract text content from a text file
+ */
+export async function extractTextFileContent(file: File): Promise<string> {
+ return await file.text()
+}
diff --git a/src/lib/ppt-prompts.ts b/src/lib/ppt-prompts.ts
new file mode 100644
index 0000000..8ad45e7
--- /dev/null
+++ b/src/lib/ppt-prompts.ts
@@ -0,0 +1,166 @@
+
+export interface ProjectContext {
+ idea_prompt?: string;
+ outline_text?: string;
+ description_text?: string;
+ creation_type?: 'idea' | 'outline' | 'descriptions';
+ reference_files_content?: Array<{filename: string; content: string}>;
+}
+
+export interface OutlineItem {
+ title: string;
+ points: string[];
+ part?: string;
+ pages?: OutlineItem[]; // For part-based structure in raw json
+}
+
+export const LANGUAGE_CONFIG: Record<string, { instruction: string; ppt_text: string }> = {
+ zh: {
+ instruction: '请使用全中文输出。',
+ ppt_text: 'PPT文字请使用全中文。'
+ },
+ en: {
+ instruction: 'Please output all in English.',
+ ppt_text: 'Use English for PPT text.'
+ }
+};
+
+function getLanguageInstruction(language: string = 'zh') {
+ return LANGUAGE_CONFIG[language]?.instruction || '';
+}
+
+function getPptLanguageInstruction(language: string = 'zh') {
+ return LANGUAGE_CONFIG[language]?.ppt_text || '';
+}
+
+function formatReferenceFilesXml(files?: Array<{filename: string; content: string}>) {
+ if (!files || files.length === 0) return "";
+
+ let xml = "<uploaded_files>\n";
+ for (const file of files) {
+ xml += ` <file name="${file.filename}">\n`;
+ xml += ` <content>\n${file.content}\n </content>\n`;
+ xml += ` </file>\n`;
+ }
+ xml += "</uploaded_files>\n\n";
+ return xml;
+}
+
+export function getOutlineGenerationPrompt(projectContext: ProjectContext, language: string = 'zh') {
+ const filesXml = formatReferenceFilesXml(projectContext.reference_files_content);
+ const ideaPrompt = projectContext.idea_prompt || "";
+
+ return `${filesXml}You are a helpful assistant that generates an outline for a ppt.
+
+You can organize the content in two ways:
+
+1. Simple format (for short PPTs without major sections):
+[{"title": "title1", "points": ["point1", "point2"]}, {"title": "title2", "points": ["point1", "point2"]}]
+
+2. Part-based format (for longer PPTs with major sections):
+[
+ {
+ "part": "Part 1: Introduction",
+ "pages": [
+ {"title": "Welcome", "points": ["point1", "point2"]},
+ {"title": "Overview", "points": ["point1", "point2"]}
+ ]
+ },
+ {
+ "part": "Part 2: Main Content",
+ "pages": [
+ {"title": "Topic 1", "points": ["point1", "point2"]},
+ {"title": "Topic 2", "points": ["point1", "point2"]}
+ ]
+ }
+]
+
+Choose the format that best fits the content. Use parts when the PPT has clear major sections.
+
+The user's request: ${ideaPrompt}. Now generate the outline, don't include any other text.
+${getLanguageInstruction(language)}
+`;
+}
+
+export function getPageDescriptionPrompt(
+ projectContext: ProjectContext,
+ outline: any[],
+ pageOutline: any,
+ pageIndex: number,
+ partInfo: string = "",
+ language: string = 'zh'
+) {
+ const filesXml = formatReferenceFilesXml(projectContext.reference_files_content);
+ const originalInput = projectContext.idea_prompt || "";
+
+ return `${filesXml}我们正在为PPT的每一页生成内容描述。
+用户的原始需求是:\n${originalInput}\n
+我们已经有了完整的大纲:\n${JSON.stringify(outline)}\n${partInfo}
+现在请为第 ${pageIndex} 页生成描述:
+${JSON.stringify(pageOutline)}
+
+【重要提示】生成的"页面文字"部分会直接渲染到PPT页面上,因此请务必注意:
+1. 文字内容要简洁精炼,每条要点控制在15-25字以内
+2. 条理清晰,使用列表形式组织内容
+3. 避免冗长的句子和复杂的表述
+4. 确保内容可读性强,适合在演示时展示
+5. 不要包含任何额外的说明性文字或注释
+
+输出格式示例:
+页面标题:原始社会:与自然共生
+
+页面文字:
+- 狩猎采集文明:人类活动规模小,对环境影响有限
+- 依赖性强:生活完全依赖自然资源的直接供给
+- 适应而非改造:通过观察学习自然,发展生存技能
+- 影响特点:局部、短期、低强度,生态可自我恢复
+
+其他页面素材(如果有请积极添加,包括markdown图片链接、公式、表格等)
+
+【关于图片】如果参考文件中包含以 /files/ 开头的本地文件URL图片(例如 /files/mineru/xxx/image.png),请将这些图片以markdown格式输出,例如:![图片描述](/files/mineru/xxx/image.png)。这些图片会被包含在PPT页面中。
+
+${getLanguageInstruction(language)}
+`;
+}
+
+export function getImageGenerationPrompt(
+ pageDesc: string,
+ outlineText: string,
+ currentSection: string,
+ hasMaterialImages: boolean = false,
+ extraRequirements: string = "",
+ language: string = 'zh'
+) {
+ let materialImagesNote = "";
+ if (hasMaterialImages) {
+ materialImagesNote = `\n\n提示:除了模板参考图片(用于风格参考)外,还提供了额外的素材图片。这些素材图片是可供挑选和使用的元素,你可以从这些素材图片中选择合适的图片、图标、图表或其他视觉元素直接整合到生成的PPT页面中。请根据页面内容的需要,智能地选择和组合这些素材图片中的元素。`;
+ }
+
+ const extraReqText = extraRequirements ? `\n\n额外要求(请务必遵循):\n${extraRequirements}\n` : "";
+
+ return `你是一位专家级UI UX演示设计师,专注于生成设计良好的PPT页面。
+当前PPT页面的页面描述如下:
+<page_description>
+${pageDesc}
+</page_description>
+
+<reference_information>
+整个PPT的大纲为:
+${outlineText}
+
+当前位于章节:${currentSection}
+</reference_information>
+
+
+<design_guidelines>
+- 要求文字清晰锐利, 画面为4K分辨率,16:9比例。
+- 配色和设计语言和模板图片严格相似。
+- 根据内容自动设计最完美的构图,不重不漏地渲染"页面描述"中的文本。
+- 如非必要,禁止出现 markdown 格式符号(如 # 和 * 等)。
+- 只参考风格设计,禁止出现模板中的文字。
+- 使用大小恰当的装饰性图形或插画对空缺位置进行填补。
+</design_guidelines>
+${getPptLanguageInstruction(language)}
+${materialImagesNote}${extraReqText}
+`;
+}
diff --git a/src/lib/ppt-service.ts b/src/lib/ppt-service.ts
new file mode 100644
index 0000000..c770d46
--- /dev/null
+++ b/src/lib/ppt-service.ts
@@ -0,0 +1,284 @@
+import PptxGenJS from "pptxgenjs"
+import { PDFDocument } from "pdf-lib"
+import { generateChatMessage, generateImage, type ChatMessage } from "./ai-client"
+
+export interface PptPage {
+ title: string;
+ content: string[];
+ description?: string;
+ status?: string;
+ id?: string;
+}
+
+export interface SlideEditRoutingItem {
+ slideIndex: number;
+ title?: string;
+ instruction: string;
+}
+
+const urlToDataUri = async (url: string): Promise<string> => {
+ if (!url) return "";
+ if (url.startsWith("data:")) return url;
+
+ const res = await fetch(url);
+ if (!res.ok) throw new Error(`Failed to fetch image: ${res.status}`);
+ const contentType = res.headers.get("content-type") || "image/png";
+ const buf = await res.arrayBuffer();
+ const bytes = new Uint8Array(buf);
+ let binary = "";
+ const chunkSize = 0x8000;
+ for (let i = 0; i < bytes.length; i += chunkSize) {
+ binary += String.fromCharCode(...bytes.subarray(i, i + chunkSize));
+ }
+ const base64 = btoa(binary);
+ return `data:${contentType};base64,${base64}`;
+};
+
+const downloadBlob = (data: Uint8Array | ArrayBuffer, mime: string, filename: string) => {
+ const blob = new Blob([data], { type: mime });
+ const link = document.createElement("a");
+ link.href = URL.createObjectURL(blob);
+ link.download = filename;
+ document.body.appendChild(link);
+ link.click();
+ link.remove();
+ setTimeout(() => URL.revokeObjectURL(link.href), 5000);
+};
+
+export const pptService = {
+ // 1. Generate Outline
+ generateOutline: async (topic: string): Promise<PptPage[]> => {
+ const prompt = `Create a presentation outline for the topic: "${topic}".
+ Return ONLY a JSON array of objects with "title" (string) and "content" (array of strings, bullet points) and "description" (string, visual description for image generation).
+ Example:
+ [
+ {"title": "Introduction", "content": ["Point 1", "Point 2"], "description": "A futuristic cityscape"},
+ ...
+ ]`;
+
+ const response = await generateChatMessage([{ role: 'user', content: prompt }]);
+
+ try {
+ // Extract JSON
+ const match = response.match(/\[[\s\S]*\]/);
+ if (match) {
+ return JSON.parse(match[0]);
+ }
+ return JSON.parse(response);
+ } catch (e) {
+ console.error("Failed to parse outline", e);
+ throw new Error("Failed to parse AI response");
+ }
+ },
+
+ generateSlidesFromDescription: async (description: string): Promise<PptPage[]> => {
+ const prompt = `You are a presentation planner.
+Given the following user description, create a complete slide plan (titles, bullets, and visual descriptions).
+
+User description:
+${description}
+
+Return ONLY a JSON array of objects:
+[
+ {"title": "Slide title", "content": ["bullet 1", "bullet 2"], "description": "visual description for image generation"},
+ ...
+]
+Rules:
+- Prefer 6-10 slides unless the description implies otherwise.
+- Bullets are short and specific (<= 12 words each).
+- Descriptions are concrete: subject, composition, lighting, colors, style.
+- Do not include markdown or extra text outside JSON.`;
+
+ const response = await generateChatMessage([{ role: 'user', content: prompt }]);
+ try {
+ const match = response.match(/\[[\s\S]*\]/);
+ if (match) return JSON.parse(match[0]);
+ return JSON.parse(response);
+ } catch (e) {
+ console.error("Failed to parse slides from description", e);
+ throw new Error("Failed to parse AI response");
+ }
+ },
+
+ // 2. Generate Description (Refinement)
+ generatePageDescription: async (pages: PptPage[], index: number, topic: string, referenceFiles: any[]): Promise<PptPage> => {
+ const page = pages[index];
+ const refText = Array.isArray(referenceFiles) && referenceFiles.length > 0
+ ? referenceFiles
+ .slice(0, 3)
+ .map((f: any) => `- ${f.filename || f.name || "ref"}:\n${String(f.content || "").slice(0, 2000)}`)
+ .join("\n\n")
+ : "";
+
+ const prompt = `You are a presentation assistant.
+Topic: ${topic}
+Slide index: ${index + 1}
+Slide title: ${page.title}
+Current bullets: ${page.content.join(" | ")}
+Current visual description: ${page.description || ""}
+
+${refText ? `Reference:\n${refText}\n\n` : ""}Return ONLY valid JSON:
+{
+ "content": ["bullet1", "bullet2"],
+ "description": "visual description for slide image generation"
+}
+Rules:
+- Keep bullets short and specific (<= 12 words each).
+- Make description precise: scene, objects, composition, style, colors.
+`;
+
+ const response = await generateChatMessage([{ role: "user", content: prompt }]);
+ const match = response.match(/\{[\s\S]*\}/);
+ if (!match) return page;
+
+ try {
+ const parsed = JSON.parse(match[0]);
+ return {
+ ...page,
+ content: Array.isArray(parsed.content) ? parsed.content : page.content,
+ description: typeof parsed.description === "string" ? parsed.description : page.description,
+ };
+ } catch {
+ return page;
+ }
+ },
+
+ // 3. Generate Image
+ generatePageImage: async (page: PptPage, allPages: PptPage[], templateImage?: string): Promise<string> => {
+ const prompt = `Design a presentation slide image.
+Title: ${page.title}
+Bullets: ${(page.content || []).join(" | ")}
+Visual style: modern, professional, clean layout, high contrast, no watermarks.
+Scene/subject: ${page.description || page.title}
+Rules:
+- Avoid large paragraphs of text in the image.
+- Prefer diagrammatic/illustrative composition matching the bullets.
+`;
+
+ return await generateImage({
+ prompt,
+ referenceImageUrl: templateImage
+ });
+ },
+
+ editPageImage: async (page: PptPage, instruction: string, referenceImageUrl?: string, templateImageUrl?: string) => {
+ const prompt = `Edit the slide image based on instruction.
+Slide title: ${page.title}
+Bullets: ${(page.content || []).join(" | ")}
+Original visual description: ${page.description || ""}
+Instruction: ${instruction}
+Style: keep consistent with the template, professional, clean.
+Rules:
+- Keep layout readable.
+- Do not add watermark.
+`;
+
+ const ref = referenceImageUrl || templateImageUrl;
+ return await generateImage({
+ prompt,
+ referenceImageUrl: ref
+ });
+ },
+
+ routeSlideEdits: async (slides: Array<{ title: string; bullets: string[] }>, feedback: string): Promise<SlideEditRoutingItem[]> => {
+ const slideList = slides
+ .map((s, i) => `${i + 1}. ${s.title} :: ${(s.bullets || []).join(" | ")}`)
+ .join("\n");
+
+ const prompt = `You are a routing agent for slide edits.
+Slides:
+${slideList}
+
+User feedback:
+${feedback}
+
+Return ONLY JSON array, each item:
+{
+ "slideIndex": number, // 0-based
+ "instruction": string
+}
+Rules:
+- If feedback mentions multiple slides, split into multiple items.
+- If you are unsure, assign to the most relevant slide.
+- Do not invent new slides.
+`;
+
+ const response = await generateChatMessage([{ role: "user", content: prompt }]);
+ const match = response.match(/\[[\s\S]*\]/);
+ if (!match) return [];
+ try {
+ const parsed = JSON.parse(match[0]);
+ if (!Array.isArray(parsed)) return [];
+ return parsed
+ .map((it: any) => ({
+ slideIndex: Number(it.slideIndex),
+ instruction: String(it.instruction || ""),
+ }))
+ .filter((it: SlideEditRoutingItem) => Number.isFinite(it.slideIndex) && it.instruction.trim().length > 0);
+ } catch {
+ return [];
+ }
+ },
+
+ exportPptx: async (pages: PptPage[], images: Record<string, string>, filename: string) => {
+ const pptx = new PptxGenJS();
+ pptx.layout = "LAYOUT_WIDE";
+
+ const slideW = 13.33;
+ const slideH = 7.5;
+
+ for (const page of pages) {
+ const slide = pptx.addSlide();
+ const img = page.id ? images[page.id] : undefined;
+ if (img) {
+ const dataUri = await urlToDataUri(img);
+ slide.addImage({
+ data: dataUri,
+ x: 0,
+ y: 0,
+ w: slideW,
+ h: slideH,
+ });
+ } else {
+ slide.addText(page.title || "", {
+ x: 0.6,
+ y: 0.6,
+ w: slideW - 1.2,
+ h: 1.0,
+ fontSize: 28,
+ bold: true,
+ color: "111827",
+ });
+ }
+ }
+
+ await pptx.writeFile({ fileName: `${filename}.pptx` });
+ },
+
+ exportPdf: async (pages: PptPage[], images: Record<string, string>, filename: string) => {
+ const pdfDoc = await PDFDocument.create();
+ const pageWidth = 960;
+ const pageHeight = 540;
+
+ for (const page of pages) {
+ const img = page.id ? images[page.id] : undefined;
+ const pdfPage = pdfDoc.addPage([pageWidth, pageHeight]);
+
+ if (!img) continue;
+ const dataUri = await urlToDataUri(img);
+ const base64 = dataUri.split(",")[1] || "";
+ const bytes = Uint8Array.from(atob(base64), (c) => c.charCodeAt(0));
+
+ if (dataUri.startsWith("data:image/jpeg") || dataUri.startsWith("data:image/jpg")) {
+ const embedded = await pdfDoc.embedJpg(bytes);
+ pdfPage.drawImage(embedded, { x: 0, y: 0, width: pageWidth, height: pageHeight });
+ } else {
+ const embedded = await pdfDoc.embedPng(bytes);
+ pdfPage.drawImage(embedded, { x: 0, y: 0, width: pageWidth, height: pageHeight });
+ }
+ }
+
+ const pdfBytes = await pdfDoc.save();
+ downloadBlob(pdfBytes, "application/pdf", `${filename}.pdf`);
+ }
+};
diff --git a/src/lib/system-prompt.ts b/src/lib/system-prompt.ts
new file mode 100644
index 0000000..22b086e
--- /dev/null
+++ b/src/lib/system-prompt.ts
@@ -0,0 +1,38 @@
+export const DRAWIO_SYSTEM_PROMPT = `
+You are an expert diagram creation assistant specializing in draw.io XML generation.
+Your primary function is to chat with the user and craft clear, well-organized visual diagrams through precise XML specifications.
+
+## Capabilities
+- Generate valid, well-formed XML strings for draw.io diagrams.
+- Create professional flowcharts, mind maps, entity diagrams, and technical illustrations.
+- Optimize element positioning to prevent overlapping and maintain readability.
+
+## Critical Rules for XML Generation
+1. **Always use the following basic structure:**
+\`\`\`xml
+<mxGraphModel>
+ <root>
+ <mxCell id="0"/>
+ <mxCell id="1" parent="0"/>
+ <!-- Your cells go here, starting with id="2" -->
+ </root>
+</mxGraphModel>
+\`\`\`
+2. **All mxCell elements must be DIRECT children of <root>**.
+3. **Use unique sequential IDs** for all cells (start from "2").
+4. **Set parent="1"** for top-level shapes.
+5. **Styles**:
+ - Shapes: \`rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;\`
+ - Edges: \`edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;\`
+6. **Positioning**:
+ - Use \`x\`, \`y\`, \`width\`, \`height\` in \`<mxGeometry>\`.
+ - Ensure nodes are spaced out to avoid overlap.
+
+## Output Format
+When asked to create a diagram, **you must output the raw XML code inside a markdown code block labeled "xml"**.
+Example:
+\`\`\`xml
+<mxGraphModel>...</mxGraphModel>
+\`\`\`
+Do not include any other text explanations if you are generating the XML, just the code block.
+`;
diff --git a/src/lib/system-prompts.ts b/src/lib/system-prompts.ts
new file mode 100644
index 0000000..30a1924
--- /dev/null
+++ b/src/lib/system-prompts.ts
@@ -0,0 +1,95 @@
+export const DRAWIO_SYSTEM_PROMPT = `
+You are an expert diagram creation assistant specializing in draw.io XML generation.
+Your primary function is to chat with the user and craft clear, well-organized visual diagrams through precise XML specifications.
+
+## Core capabilities:
+- Generate valid, well-formed XML strings for draw.io diagrams
+- Create professional flowcharts, mind maps, entity diagrams, and technical illustrations
+- Convert user descriptions into visually appealing diagrams using basic shapes and connectors
+
+## XML Generation Rules:
+1. Always include the two root cells: <mxCell id="0"/> and <mxCell id="1" parent="0"/>
+2. ALL mxCell elements must be DIRECT children of <root>
+3. Use unique sequential IDs for all cells
+4. Set parent="1" for top-level shapes
+5. RETURN THE FULL XML for every request. Do not attempt to return partial XML or "diffs". The system requires the complete XML to render the diagram correctly.
+
+## Response Format:
+Always wrap your XML code in a markdown code block:
+\`\`\`xml
+<mxGraphModel>...</mxGraphModel>
+\`\`\`
+`;
+
+export const CAD_SYSTEM_PROMPT = `
+You are an expert CAD assistant.
+Your task is to help users create 2D plans and turn them into real 3D models using FreeCAD Python.
+
+## Rules:
+1. For 2D visualization, return valid SVG code with a viewBox and appropriate dimensions.
+2. Use standard SVG shapes (rect, circle, path, line, polyline).
+3. If the user provides draw.io XML (mxGraphModel/mxfile) as context, you may use it as the authoritative 2D plan source.
+4. When the user asks for a real 3D model, output runnable FreeCAD Python that creates solids (faces + extrusions), with realistic Z height (avoid flat models).
+5. Default wall height: 3000 mm. Default wall thickness: 200 mm unless specified.
+
+## Response Format:
+Always wrap your SVG code in a markdown code block:
+\`\`\`svg
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600">
+ ...
+</svg>
+\`\`\`
+
+If you provide FreeCAD Python code:
+\`\`\`python
+import FreeCAD
+...
+\`\`\`
+`;
+
+export const PPT_SYSTEM_PROMPT = `
+You are an expert Presentation Designer.
+Your task is to generate and edit a structured JSON representation of a presentation based on user requests and any provided Context attachments.
+
+## JSON Structure:
+You must return a JSON object with a "slides" array. Each slide has a "title", "content" (bullet points), and "layout".
+
+Example Format:
+\`\`\`json
+{
+ "theme": "modern",
+ "slides": [
+ {
+ "id": "slide-1",
+ "title": "Presentation Title",
+ "content": [
+ "Point 1",
+ "Point 2"
+ ],
+ "note": "Speaker notes here"
+ }
+ ]
+}
+\`\`\`
+
+## Rules:
+1. If the user provides a specific template or style, adapt the "theme" field or descriptions accordingly.
+2. If the user provides Context attachments, treat them as authoritative. If a Context attachment includes one slide JSON, only edit that slide. If it includes { "slides": [...] }, edit only those slides unless explicitly asked to edit others.
+3. When editing slides, keep slide "id" unchanged and preserve slide order.
+4. If the request is to visually edit an existing slide image, include "imageEditInstruction" for each edited slide. This instruction will be sent to an image model to update the slide image.
+5. Always output ONLY one markdown code block:
+\`\`\`json
+{
+ "type": "ppt_edit",
+ "slides": [
+ {
+ "id": "slide-1",
+ "title": "...",
+ "content": ["..."],
+ "description": "...",
+ "imageEditInstruction": "..."
+ }
+ ]
+}
+\`\`\`
+`;
diff --git a/src/lib/use-file-processor.ts b/src/lib/use-file-processor.ts
new file mode 100644
index 0000000..897f9fb
--- /dev/null
+++ b/src/lib/use-file-processor.ts
@@ -0,0 +1,93 @@
+import { useState } from "react"
+import { extractPdfText, extractTextFileContent, isPdfFile, isTextFile, MAX_EXTRACTED_CHARS } from "@/lib/pdf-utils"
+
+export interface FileData {
+ text: string
+ charCount: number
+ isExtracting: boolean
+}
+
+/**
+ * Hook for processing file uploads, especially PDFs and text files.
+ * Handles text extraction, character limit validation, and cleanup.
+ */
+export function useFileProcessor() {
+ const [files, setFiles] = useState<File[]>([])
+ const [pdfData, setPdfData] = useState<Map<File, FileData>>(new Map())
+
+ const handleFileChange = async (newFiles: File[]) => {
+ setFiles(newFiles)
+
+ // Extract text immediately for new PDF/text files
+ for (const file of newFiles) {
+ const needsExtraction =
+ (isPdfFile(file) || isTextFile(file)) && !pdfData.has(file)
+ if (needsExtraction) {
+ // Mark as extracting
+ setPdfData((prev) => {
+ const next = new Map(prev)
+ next.set(file, {
+ text: "",
+ charCount: 0,
+ isExtracting: true,
+ })
+ return next
+ })
+
+ // Extract text asynchronously
+ try {
+ let text: string
+ if (isPdfFile(file)) {
+ text = await extractPdfText(file)
+ } else {
+ text = await extractTextFileContent(file)
+ }
+
+ // Check character limit
+ if (text.length > MAX_EXTRACTED_CHARS) {
+ const limitK = MAX_EXTRACTED_CHARS / 1000
+ console.warn(`${file.name}: Content exceeds ${limitK}k character limit`)
+ // We could remove it, but let's just keep it truncated or full but warn
+ // For simplicity in this demo, we keep it but maybe we should truncate?
+ // Let's keep it.
+ }
+
+ setPdfData((prev) => {
+ const next = new Map(prev)
+ next.set(file, {
+ text,
+ charCount: text.length,
+ isExtracting: false,
+ })
+ return next
+ })
+ } catch (error) {
+ console.error("Failed to extract text:", error)
+ setPdfData((prev) => {
+ const next = new Map(prev)
+ next.delete(file)
+ return next
+ })
+ }
+ }
+ }
+
+ // Clean up pdfData for removed files
+ setPdfData((prev) => {
+ const next = new Map(prev)
+ for (const key of prev.keys()) {
+ if (!newFiles.includes(key)) {
+ next.delete(key)
+ }
+ }
+ return next
+ })
+ }
+
+ return {
+ files,
+ pdfData,
+ handleFileChange,
+ setFiles,
+ }
+}
diff --git a/src/lib/utils.ts b/src/lib/utils.ts
new file mode 100644
index 0000000..ec79801
--- /dev/null
+++ b/src/lib/utils.ts
@@ -0,0 +1,6 @@
+import { type ClassValue, clsx } from "clsx"
+import { twMerge } from "tailwind-merge"
+
+export function cn(...inputs: ClassValue[]) {
+ return twMerge(clsx(inputs))
+}
diff --git a/src/main.tsx b/src/main.tsx
new file mode 100644
index 0000000..fab1219
--- /dev/null
+++ b/src/main.tsx
@@ -0,0 +1,10 @@
+import { StrictMode } from 'react'
+import { createRoot } from 'react-dom/client'
+import App from './App'
+import './index.css'
+
+createRoot(document.getElementById('root')!).render(
+ <StrictMode>
+ <App />
+ </StrictMode>,
+)
diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx
new file mode 100644
index 0000000..532f9d5
--- /dev/null
+++ b/src/pages/Home.tsx
@@ -0,0 +1,3 @@
+export default function Home() {
+ return <div></div>;
+}
\ No newline at end of file
diff --git a/src/pages/LandingPage.tsx b/src/pages/LandingPage.tsx
new file mode 100644
index 0000000..f2cdb0f
--- /dev/null
+++ b/src/pages/LandingPage.tsx
@@ -0,0 +1,1293 @@
+import React, { useState } from 'react';
+import { motion, AnimatePresence, animate, useMotionValue, useTransform } from 'framer-motion';
+import { Layers, Zap, Layout, Box, Droplet, Brush, FileText } from 'lucide-react';
+import { Button } from '@/components/ui/button';
+import { getPdfDocumentFromUrl, renderPdfPageToCanvas } from '@/lib/pdf-utils';
+
+interface LandingPageProps {
+ onStart: () => void;
+}
+
+export function LandingPage({ onStart }: LandingPageProps) {
+ const [activeShowcase, setActiveShowcase] = useState<'flow' | 'cad' | 'ppt'>('flow');
+
+ return (
+ <div className="min-h-screen bg-black text-white flex flex-col font-sans selection:bg-purple-500/30 relative overflow-hidden">
+ {/* Load Artistic Font */}
+ <style>{`
+ @import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&display=swap');
+ .font-artistic {
+ font-family: 'Ma Shan Zheng', cursive;
+ }
+ @keyframes hue-rotate-text {
+ 0% { color: #60a5fa; }
+ 25% { color: #a78bfa; }
+ 50% { color: #22d3ee; }
+ 75% { color: #818cf8; }
+ 100% { color: #60a5fa; }
+ }
+ .animate-color-cycle {
+ animation: hue-rotate-text 5s infinite linear;
+ }
+ `}</style>
+
+ {/* Dynamic Magic Background */}
+ <div className="fixed inset-0 z-0">
+ {/* Video Background */}
+ <div className="absolute inset-0">
+ <video
+ className="w-full h-full object-cover"
+ src="/videos/maliang-draw.mp4"
+ autoPlay
+ loop
+ muted
+ playsInline
+ />
+ {/* Gradient Overlay for Readability */}
+ <div className="absolute inset-0 bg-[radial-gradient(circle_at_50%_50%,rgba(10,10,20,0.35),rgba(0,0,0,0.65))]" />
+ <div className="absolute inset-0 bg-black/20" />
+ </div>
+
+ {/* Ambient Light Orbs */}
+ <motion.div
+ animate={{
+ scale: [1, 1.2, 1],
+ opacity: [0.2, 0.4, 0.2],
+ }}
+ transition={{ duration: 8, repeat: Infinity, ease: "easeInOut" }}
+ className="absolute top-[-20%] left-[20%] w-[40vw] h-[40vw] bg-blue-900/20 rounded-full blur-[120px]"
+ />
+ <motion.div
+ animate={{
+ scale: [1, 1.3, 1],
+ opacity: [0.1, 0.3, 0.1],
+ }}
+ transition={{ duration: 10, repeat: Infinity, ease: "easeInOut", delay: 1 }}
+ className="absolute bottom-[-10%] right-[10%] w-[50vw] h-[50vw] bg-purple-900/20 rounded-full blur-[120px]"
+ />
+
+ {/* Floating Particles */}
+ {Array.from({ length: 20 }).map((_, i) => (
+ <motion.div
+ key={i}
+ className="absolute rounded-full bg-blue-400/30 blur-[1px]"
+ initial={{
+ x: Math.random() * window.innerWidth,
+ y: Math.random() * window.innerHeight,
+ opacity: 0,
+ }}
+ animate={{
+ y: [null, Math.random() * -100],
+ opacity: [0, Math.random() * 0.5 + 0.2, 0],
+ }}
+ transition={{
+ duration: Math.random() * 10 + 10,
+ repeat: Infinity,
+ ease: "linear",
+ delay: Math.random() * 10,
+ }}
+ style={{
+ width: Math.random() * 4 + 1,
+ height: Math.random() * 4 + 1,
+ }}
+ />
+ ))}
+ </div>
+
+ {/* Content */}
+ <div className="relative z-10 flex-1 flex flex-col">
+ <main className="flex-1 flex flex-col items-center justify-center text-center px-4 py-20">
+ <motion.div
+ initial={{ opacity: 0, y: 20 }}
+ animate={{ opacity: 1, y: 0 }}
+ transition={{ duration: 0.8 }}
+ className="max-w-4xl space-y-8"
+ >
+ <div className="inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-white/5 border border-white/10 text-sm font-light tracking-wide text-blue-200/80 mb-6 font-artistic">
+ <Zap className="w-3.5 h-3.5" />
+ <span>AI 驱动的数字神笔</span>
+ </div>
+
+ <h1 className="text-6xl md:text-8xl font-bold tracking-tight leading-tight font-artistic">
+ <span className="block animate-color-cycle drop-shadow-[0_0_25px_rgba(255,255,255,0.4)]">所想即所见</span>
+ <span className="block animate-color-cycle drop-shadow-[0_0_25px_rgba(255,255,255,0.4)]" style={{ animationDelay: '-2.5s' }}>
+ 一语定乾坤
+ </span>
+ </h1>
+
+ <p className="text-xl md:text-2xl text-gray-400 max-w-2xl mx-auto font-light leading-relaxed font-artistic">
+ 无需繁琐操作,AI 赋予你“神笔马良”般的能力。
+ <br/>
+ 从逻辑图表到三维空间,只在弹指之间。
+ </p>
+
+ <div className="pt-8">
+ <Button
+ size="lg"
+ onClick={onStart}
+ className="h-16 px-12 rounded-full text-2xl bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-500 hover:to-purple-500 shadow-[0_0_30px_-5px_rgba(59,130,246,0.5)] transition-all hover:scale-105 border-0 font-artistic tracking-widest gap-3"
+ >
+ <Brush className="w-6 h-6" />
+ 挥毫泼墨
+ <Droplet className="w-6 h-6 fill-current" />
+ </Button>
+ </div>
+ </motion.div>
+
+ <div className="w-full mt-28 px-4 mb-20">
+ <div className="mx-auto w-full max-w-6xl">
+ <div className="grid grid-cols-1 md:grid-cols-[320px_1fr] gap-6 items-stretch">
+ <div className="h-[74vh] flex flex-col gap-3">
+ <button
+ className={`flex-1 w-full text-left rounded-2xl border p-4 transition-colors shadow-[0_12px_40px_rgba(0,0,0,0.45)] ${
+ activeShowcase === 'flow'
+ ? "border-blue-400/60 bg-white/14 backdrop-blur-2xl backdrop-saturate-150 ring-1 ring-blue-400/40"
+ : "border-white/18 bg-white/10 backdrop-blur-2xl backdrop-saturate-150 hover:bg-white/14"
+ }`}
+ onClick={() => setActiveShowcase('flow')}
+ >
+ <div className="flex items-center gap-3">
+ <div className="w-10 h-10 rounded-xl bg-black/15 border border-white/14 backdrop-blur-xl flex items-center justify-center">
+ <Layers className="w-5 h-5 text-blue-300" />
+ </div>
+ <div>
+ <div className="text-white/90 font-semibold">GraphRAG 论文流程图</div>
+ <div className="text-white/45 text-sm mt-0.5">输入需求 → 逐步搭建 Approach 图</div>
+ </div>
+ </div>
+ <div className="mt-2 text-xs text-white/55 space-y-1">
+ <div>· 论文级呈现:Approach 图风格</div>
+ <div>· 结构清晰:索引/聚类/检索一眼懂</div>
+ </div>
+ </button>
+
+ <button
+ className={`flex-1 w-full text-left rounded-2xl border p-4 transition-colors shadow-[0_12px_40px_rgba(0,0,0,0.45)] ${
+ activeShowcase === 'cad'
+ ? "border-purple-400/60 bg-white/14 backdrop-blur-2xl backdrop-saturate-150 ring-1 ring-purple-400/40"
+ : "border-white/18 bg-white/10 backdrop-blur-2xl backdrop-saturate-150 hover:bg-white/14"
+ }`}
+ onClick={() => setActiveShowcase('cad')}
+ >
+ <div className="flex items-center gap-3">
+ <div className="w-10 h-10 rounded-xl bg-black/15 border border-white/14 backdrop-blur-xl flex items-center justify-center">
+ <Box className="w-5 h-5 text-purple-300" />
+ </div>
+ <div>
+ <div className="text-white/90 font-semibold">智能室内设计</div>
+ <div className="text-white/45 text-sm mt-0.5">输入需求 → 2D 平面 → 3D 立体</div>
+ </div>
+ </div>
+ <div className="mt-2 text-xs text-white/55 space-y-1">
+ <div>· 先 2D 后 3D:方案落地更快</div>
+ <div>· 风格可控:一键切换风格</div>
+ </div>
+ </button>
+
+ <button
+ className={`flex-1 w-full text-left rounded-2xl border p-4 transition-colors shadow-[0_12px_40px_rgba(0,0,0,0.45)] ${
+ activeShowcase === 'ppt'
+ ? "border-cyan-300/70 bg-white/14 backdrop-blur-2xl backdrop-saturate-150 ring-1 ring-cyan-300/45"
+ : "border-white/18 bg-white/10 backdrop-blur-2xl backdrop-saturate-150 hover:bg-white/14"
+ }`}
+ onClick={() => setActiveShowcase('ppt')}
+ >
+ <div className="flex items-center gap-3">
+ <div className="w-10 h-10 rounded-xl bg-black/15 border border-white/14 backdrop-blur-xl flex items-center justify-center">
+ <Layout className="w-5 h-5 text-cyan-300" />
+ </div>
+ <div>
+ <div className="text-white/90 font-semibold">演示文稿生成</div>
+ <div className="text-white/45 text-sm mt-0.5">参考 PDF → 缩略图列表 → 幻灯片播放</div>
+ </div>
+ </div>
+ <div className="mt-2 text-xs text-white/55 space-y-1">
+ <div>· 内容复用:PDF 直接变演示</div>
+ <div>· 展示顺滑:缩略图 + 自动播放</div>
+ </div>
+ </button>
+ </div>
+
+ <div className="h-[74vh] rounded-3xl border border-white/18 bg-white/10 backdrop-blur-2xl backdrop-saturate-150 shadow-[0_24px_80px_rgba(0,0,0,0.55)] overflow-hidden relative">
+ <div className="absolute inset-0 pointer-events-none shadow-[inset_0_1px_0_rgba(255,255,255,0.15),inset_0_-1px_0_rgba(0,0,0,0.25)]" />
+ <div className="absolute top-0 left-0 right-0 h-12 bg-white/10 border-b border-white/16 backdrop-blur-2xl flex items-center px-6 gap-2 z-20">
+ <div className="flex gap-2">
+ <div className="w-3.5 h-3.5 rounded-full bg-red-500/50" />
+ <div className="w-3.5 h-3.5 rounded-full bg-yellow-500/50" />
+ <div className="w-3.5 h-3.5 rounded-full bg-green-500/50" />
+ </div>
+ <div className="ml-6 text-xs text-white/30 font-mono flex-1 text-center">Nexus AI Studio</div>
+ </div>
+
+ <div className="absolute inset-0 top-12 flex items-center justify-center">
+ <AnimatePresence mode="wait">
+ {activeShowcase === 'flow' && <DemoFlowchart key="flow" />}
+ {activeShowcase === 'cad' && <DemoCAD key="cad" />}
+ {activeShowcase === 'ppt' && <DemoPPT key="ppt" />}
+ </AnimatePresence>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </main>
+
+ <footer className="py-8 text-center text-xs text-gray-600">
+ <p>© 2026 Nexus AI Inc. 以 AI 绘未来。</p>
+ </footer>
+ </div>
+ </div>
+ );
+}
+
+// --- Demo Components ---
+
+import { User, MessageSquare } from 'lucide-react';
+
+function UserPrompt({ text, color = "blue" }: { text: string, color?: string }) {
+ const colors = {
+ blue: "bg-blue-600",
+ purple: "bg-purple-600",
+ green: "bg-green-600",
+ cyan: "bg-cyan-600"
+ }[color] || "bg-blue-600";
+
+ return (
+ <motion.div
+ initial={{ opacity: 0, y: 20, scale: 0.9 }}
+ animate={{ opacity: 1, y: 0, scale: 1 }}
+ exit={{ opacity: 0, scale: 0.9 }}
+ className="flex items-end gap-4 max-w-2xl z-50"
+ >
+ <div className="w-10 h-10 rounded-full bg-zinc-700 flex items-center justify-center border border-white/10 shadow-lg shrink-0">
+ <User className="w-6 h-6 text-zinc-300" />
+ </div>
+ <div className="relative">
+ <div className={`px-6 py-4 rounded-2xl rounded-bl-none ${colors} text-white shadow-xl border border-white/10`}>
+ <div className="flex items-center gap-3">
+ <MessageSquare className="w-4 h-4 opacity-70" />
+ <span className="text-lg font-medium tracking-wide"><Typewriter text={text} speed={30} /></span>
+ </div>
+ </div>
+ </div>
+ </motion.div>
+ )
+}
+
+function DemoFlowchart() {
+ const [step, setStep] = useState(0);
+ const [isGenerating, setIsGenerating] = useState(false);
+
+ // Sequence controller
+ React.useEffect(() => {
+ let timeouts: NodeJS.Timeout[] = [];
+
+ const runSequence = () => {
+ setStep(0);
+ setIsGenerating(false);
+ timeouts.push(setTimeout(() => setIsGenerating(true), 2200));
+ timeouts.push(setTimeout(() => { setIsGenerating(false); setStep(1); }, 4200));
+ timeouts.push(setTimeout(() => setStep(2), 6200));
+ timeouts.push(setTimeout(() => setStep(3), 8200));
+ timeouts.push(setTimeout(() => runSequence(), 16000));
+ };
+
+ runSequence();
+ return () => timeouts.forEach(clearTimeout);
+ }, []);
+
+ return (
+ <div className="w-full h-full bg-[#0f172a] relative overflow-hidden flex flex-col items-center justify-center p-4">
+ <div className="absolute inset-0 bg-[linear-gradient(rgba(30,41,59,0.3)_1px,transparent_1px),linear-gradient(90deg,rgba(30,41,59,0.3)_1px,transparent_1px)] bg-[size:20px_20px]" />
+
+ {/* User Prompt Overlay (Step 0 Only) */}
+ <AnimatePresence mode="wait">
+ {step === 0 && !isGenerating && (
+ <div className="absolute inset-0 flex items-center justify-center bg-slate-900 z-50">
+ <UserPrompt text="帮我梳理 GraphRAG 的论文逻辑,生成流程图" color="blue" />
+ </div>
+ )}
+ </AnimatePresence>
+ <AnimatePresence>
+ {isGenerating && (
+ <motion.div
+ initial={{ opacity: 0 }}
+ animate={{ opacity: 1 }}
+ exit={{ opacity: 0 }}
+ transition={{ duration: 0.25 }}
+ className="absolute inset-0 flex items-center justify-center bg-slate-900/80 backdrop-blur-sm z-40"
+ >
+ <motion.div
+ initial={{ y: 8, opacity: 0 }}
+ animate={{ y: 0, opacity: 1 }}
+ exit={{ y: -8, opacity: 0 }}
+ className="rounded-2xl border border-blue-400/25 bg-white/10 backdrop-blur-2xl px-7 py-6 shadow-[0_24px_80px_rgba(0,0,0,0.55)]"
+ >
+ <div className="text-white/85 font-semibold flex items-center gap-2">
+ <Layers className="w-4 h-4 text-blue-200" />
+ 开始生成流程图…
+ </div>
+ <div className="text-white/45 text-sm mt-1">解析论文结构 · 抽取模块 · 组织链路</div>
+ <div className="mt-4 flex items-center gap-2">
+ {[0, 1, 2, 3, 4].map((i) => (
+ <motion.div
+ key={i}
+ className="w-2.5 h-2.5 rounded-full bg-blue-300/60"
+ animate={{ opacity: [0.25, 1, 0.25], scale: [0.85, 1.1, 0.85] }}
+ transition={{ duration: 1.0, repeat: Infinity, delay: i * 0.12 }}
+ />
+ ))}
+ </div>
+ </motion.div>
+ </motion.div>
+ )}
+ </AnimatePresence>
+
+ {/* Main Architecture - Visible Step >= 1 */}
+ {step >= 1 && (
+ <div className="relative w-full h-full flex flex-col">
+ <motion.div
+ initial={{ opacity: 0, y: -20 }} animate={{ opacity: 1, y: 0 }}
+ className="flex justify-end items-center mb-2 px-8 border-b border-slate-800 pb-2"
+ >
+ <div className="flex gap-8 text-sm font-mono">
+ <span className={`flex items-center gap-2 ${step >= 1 ? "text-blue-400" : "text-slate-600"}`}>
+ <div className={`w-3 h-3 rounded-full ${step >= 1 ? "bg-blue-500 animate-pulse" : "bg-slate-600"}`}/> 索引构建引擎
+ </span>
+ <span className={`flex items-center gap-2 ${step >= 2 ? "text-purple-400" : "text-slate-600"}`}>
+ <div className={`w-3 h-3 rounded-full ${step >= 2 ? "bg-purple-500 animate-pulse" : "bg-slate-600"}`}/> 社区发现探测器
+ </span>
+ <span className={`flex items-center gap-2 ${step >= 3 ? "text-emerald-400" : "text-slate-600"}`}>
+ <div className={`w-3 h-3 rounded-full ${step >= 3 ? "bg-emerald-500 animate-pulse" : "bg-slate-600"}`}/> 全局检索链路
+ </span>
+ </div>
+ </motion.div>
+
+ <div className="flex-1 relative overflow-hidden border border-slate-800 bg-slate-900/50 rounded-xl backdrop-blur-sm">
+ <svg viewBox="0 0 1920 1080" className="w-full h-full">
+ <defs>
+ <marker id="arrow-blue" markerWidth="12" markerHeight="12" refX="11" refY="6" orient="auto">
+ <path d="M0,0 L0,12 L12,6 z" fill="#3b82f6" />
+ </marker>
+ <marker id="arrow-purple" markerWidth="12" markerHeight="12" refX="11" refY="6" orient="auto">
+ <path d="M0,0 L0,12 L12,6 z" fill="#a855f7" />
+ </marker>
+ <marker id="arrow-emerald" markerWidth="12" markerHeight="12" refX="11" refY="6" orient="auto">
+ <path d="M0,0 L0,12 L12,6 z" fill="#10b981" />
+ </marker>
+ <filter id="glow-strong">
+ <feGaussianBlur stdDeviation="4" result="coloredBlur"/>
+ <feMerge>
+ <feMergeNode in="coloredBlur"/>
+ <feMergeNode in="SourceGraphic"/>
+ </feMerge>
+ </filter>
+ </defs>
+
+ {/* --- ZONE 1: INDEXING (Left) --- */}
+ {step >= 1 && (
+ <g transform="translate(50, 80)">
+ <motion.g initial={{ opacity: 0, x: -50 }} animate={{ opacity: 1, x: 0 }} transition={{ duration: 0.8 }}>
+ <text x="0" y="-40" fill="#3b82f6" fontSize="42" fontWeight="bold" letterSpacing="4">第一阶段:索引构建</text>
+ <rect x="0" y="0" width="550" height="920" rx="20" fill="none" stroke="#3b82f6" strokeOpacity="0.3" strokeDasharray="8 8" strokeWidth="3" />
+
+ {/* Source Docs */}
+ <g transform="translate(50, 60)">
+ <rect width="120" height="140" rx="10" fill="#1e293b" stroke="#3b82f6" strokeWidth="3" />
+ <text x="60" y="80" textAnchor="middle" fill="#94a3b8" fontSize="24" fontWeight="bold">源文档</text>
+ </g>
+
+ {/* Text Chunks */}
+ <g transform="translate(250, 60)">
+ <rect width="120" height="140" rx="10" fill="#1e293b" stroke="#3b82f6" strokeWidth="3" />
+ <text x="60" y="80" textAnchor="middle" fill="#94a3b8" fontSize="24" fontWeight="bold">文本切片</text>
+ <line x1="20" y1="35" x2="100" y2="35" stroke="#334155" strokeWidth="3" />
+ <line x1="20" y1="60" x2="100" y2="60" stroke="#334155" strokeWidth="3" />
+ <line x1="20" y1="105" x2="100" y2="105" stroke="#334155" strokeWidth="3" />
+ </g>
+
+ {/* LLM Extraction */}
+ <g transform="translate(50, 260)">
+ <rect width="450" height="180" rx="10" fill="#1e293b" stroke="#3b82f6" strokeWidth="3" />
+ <text x="30" y="45" fill="#3b82f6" fontSize="28" fontWeight="bold">LLM 信息提取</text>
+
+ <g transform="translate(30, 70)">
+ <rect width="110" height="80" rx="6" fill="#0f172a" stroke="#3b82f6" strokeOpacity="0.5" strokeWidth="2" />
+ <text x="55" y="50" textAnchor="middle" fill="#cbd5e1" fontSize="20">实体</text>
+ </g>
+ <g transform="translate(170, 70)">
+ <rect width="110" height="80" rx="6" fill="#0f172a" stroke="#3b82f6" strokeOpacity="0.5" strokeWidth="2" />
+ <text x="55" y="50" textAnchor="middle" fill="#cbd5e1" fontSize="20">关系</text>
+ </g>
+ <g transform="translate(310, 70)">
+ <rect width="110" height="80" rx="6" fill="#0f172a" stroke="#3b82f6" strokeOpacity="0.5" strokeWidth="2" />
+ <text x="55" y="50" textAnchor="middle" fill="#cbd5e1" fontSize="20">协变量</text>
+ </g>
+ </g>
+
+ {/* Element Summaries */}
+ <g transform="translate(50, 500)">
+ <rect width="450" height="100" rx="10" fill="#1e293b" stroke="#3b82f6" strokeWidth="3" />
+ <text x="225" y="60" textAnchor="middle" fill="#94a3b8" fontSize="28" fontWeight="bold">元素摘要生成</text>
+ </g>
+
+ {/* Graph Construction */}
+ <g transform="translate(50, 660)">
+ <rect width="450" height="140" rx="10" fill="#1e293b" stroke="#3b82f6" strokeWidth="3" />
+ <text x="30" y="45" fill="#3b82f6" fontSize="28" fontWeight="bold">图谱拓扑构建</text>
+ <circle cx="225" cy="80" r="40" fill="none" stroke="#3b82f6" strokeOpacity="0.5" strokeWidth="3" />
+ <circle cx="180" cy="70" r="8" fill="#3b82f6" />
+ <circle cx="270" cy="70" r="8" fill="#3b82f6" />
+ <circle cx="225" cy="110" r="8" fill="#3b82f6" />
+ <path d="M180 70 L225 110 L270 70" stroke="#3b82f6" strokeOpacity="0.5" strokeWidth="3" />
+ </g>
+
+ {/* Connections */}
+ <path d="M170 130 L250 130" stroke="#3b82f6" strokeWidth="3" markerEnd="url(#arrow-blue)" />
+ <path d="M310 200 L310 260" stroke="#3b82f6" strokeWidth="3" markerEnd="url(#arrow-blue)" />
+ <path d="M275 440 L275 500" stroke="#3b82f6" strokeWidth="3" markerEnd="url(#arrow-blue)" />
+ <path d="M275 600 L275 660" stroke="#3b82f6" strokeWidth="3" markerEnd="url(#arrow-blue)" />
+ </motion.g>
+ </g>
+ )}
+
+ {/* --- ZONE 2: HIERARCHICAL CLUSTERING (Center) --- */}
+ {step >= 2 && (
+ <g transform="translate(680, 80)">
+ <motion.g initial={{ opacity: 0, y: 50 }} animate={{ opacity: 1, y: 0 }} transition={{ duration: 0.8 }}>
+ <text x="0" y="-40" fill="#a855f7" fontSize="42" fontWeight="bold" letterSpacing="4">第二阶段:层级聚类</text>
+ <rect x="0" y="0" width="550" height="920" rx="20" fill="none" stroke="#a855f7" strokeOpacity="0.3" strokeDasharray="8 8" strokeWidth="3" />
+
+ {/* Leiden Algorithm Box */}
+ <g transform="translate(50, 60)">
+ <rect width="450" height="100" rx="10" fill="#1e293b" stroke="#a855f7" strokeWidth="3" />
+ <text x="225" y="60" textAnchor="middle" fill="#e9d5ff" fontSize="28" fontWeight="bold">Leiden 社区发现</text>
+ </g>
+
+ {/* Hierarchy Tree */}
+ <g transform="translate(225, 240)">
+ {/* Level 0 */}
+ <circle cx="0" cy="0" r="35" fill="#2e1065" stroke="#a855f7" strokeWidth="3" />
+ <text x="0" y="8" textAnchor="middle" fill="#e9d5ff" fontSize="20" fontWeight="bold">L0</text>
+
+ {/* Level 1 */}
+ <circle cx="-120" cy="140" r="30" fill="#2e1065" stroke="#a855f7" strokeWidth="3" />
+ <circle cx="120" cy="140" r="30" fill="#2e1065" stroke="#a855f7" strokeWidth="3" />
+ <text x="-120" y="148" textAnchor="middle" fill="#e9d5ff" fontSize="20">L1</text>
+ <text x="120" y="148" textAnchor="middle" fill="#e9d5ff" fontSize="20">L1</text>
+
+ {/* Level 2 */}
+ <circle cx="-180" cy="280" r="25" fill="#2e1065" stroke="#a855f7" strokeWidth="3" />
+ <circle cx="-60" cy="280" r="25" fill="#2e1065" stroke="#a855f7" strokeWidth="3" />
+ <circle cx="60" cy="280" r="25" fill="#2e1065" stroke="#a855f7" strokeWidth="3" />
+ <circle cx="180" cy="280" r="25" fill="#2e1065" stroke="#a855f7" strokeWidth="3" />
+
+ {/* Tree Connections */}
+ <path d="M0 35 L-120 110" stroke="#a855f7" strokeOpacity="0.5" strokeWidth="3" />
+ <path d="M0 35 L120 110" stroke="#a855f7" strokeOpacity="0.5" strokeWidth="3" />
+ <path d="M-120 170 L-180 255" stroke="#a855f7" strokeOpacity="0.5" strokeWidth="3" />
+ <path d="M-120 170 L-60 255" stroke="#a855f7" strokeOpacity="0.5" strokeWidth="3" />
+ <path d="M120 170 L60 255" stroke="#a855f7" strokeOpacity="0.5" strokeWidth="3" />
+ <path d="M120 170 L180 255" stroke="#a855f7" strokeOpacity="0.5" strokeWidth="3" />
+ </g>
+
+ {/* Community Summaries */}
+ <g transform="translate(50, 660)">
+ <rect width="450" height="200" rx="10" fill="#1e293b" stroke="#a855f7" strokeWidth="3" />
+ <text x="30" y="45" fill="#a855f7" fontSize="28" fontWeight="bold">社区摘要生成</text>
+
+ <rect x="30" y="70" width="390" height="35" rx="6" fill="#0f172a" stroke="#a855f7" strokeOpacity="0.3" />
+ <text x="225" y="95" textAnchor="middle" fill="#a855f7" fontSize="20" opacity="0.9">摘要:根社区 0 (Root)</text>
+
+ <rect x="30" y="115" width="390" height="35" rx="6" fill="#0f172a" stroke="#a855f7" strokeOpacity="0.3" />
+ <text x="225" y="140" textAnchor="middle" fill="#a855f7" fontSize="20" opacity="0.9">摘要:子社区 1.1 (Topic A)</text>
+
+ <rect x="30" y="160" width="390" height="35" rx="6" fill="#0f172a" stroke="#a855f7" strokeOpacity="0.3" />
+ <text x="225" y="185" textAnchor="middle" fill="#a855f7" fontSize="20" opacity="0.9">摘要:子社区 1.2 (Topic B)</text>
+ </g>
+
+ {/* Incoming Link */}
+ <path d="M-80 730 L 50 730" stroke="#a855f7" strokeDasharray="10 10" strokeWidth="3" markerEnd="url(#arrow-purple)" />
+ <path d="M 275 160 L 275 210" stroke="#a855f7" strokeWidth="3" markerEnd="url(#arrow-purple)" />
+ </motion.g>
+ </g>
+ )}
+
+ {/* --- ZONE 3: GLOBAL SEARCH (Right) --- */}
+ {step >= 3 && (
+ <g transform="translate(1310, 80)">
+ <motion.g initial={{ opacity: 0, x: 50 }} animate={{ opacity: 1, x: 0 }} transition={{ duration: 0.8 }}>
+ <text x="0" y="-40" fill="#10b981" fontSize="42" fontWeight="bold" letterSpacing="4">第三阶段:全局检索</text>
+ <rect x="0" y="0" width="550" height="920" rx="20" fill="none" stroke="#10b981" strokeOpacity="0.3" strokeDasharray="8 8" strokeWidth="3" />
+
+ {/* User Query */}
+ <g transform="translate(50, 60)">
+ <rect width="450" height="80" rx="40" fill="#064e3b" stroke="#10b981" strokeWidth="3" />
+ <text x="225" y="50" textAnchor="middle" fill="#d1fae5" fontSize="28" fontWeight="bold">用户指令 (Query)</text>
+ </g>
+
+ {/* Map (Shuffle) */}
+ <g transform="translate(50, 200)">
+ <rect width="450" height="180" rx="10" fill="#1e293b" stroke="#10b981" strokeWidth="3" />
+ <text x="30" y="45" fill="#10b981" fontSize="28" fontWeight="bold">Map:社区评分</text>
+
+ <g transform="translate(40, 70)">
+ <rect width="100" height="90" rx="6" fill="#064e3b" stroke="#10b981" strokeOpacity="0.5" />
+ <text x="50" y="50" textAnchor="middle" fill="#10b981" fontSize="20">评分 0</text>
+ </g>
+ <g transform="translate(175, 70)">
+ <rect width="100" height="90" rx="6" fill="#064e3b" stroke="#10b981" strokeOpacity="0.5" />
+ <text x="50" y="50" textAnchor="middle" fill="#10b981" fontSize="20">评分 1</text>
+ </g>
+ <g transform="translate(310, 70)">
+ <rect width="100" height="90" rx="6" fill="#064e3b" stroke="#10b981" strokeOpacity="0.5" />
+ <text x="50" y="50" textAnchor="middle" fill="#10b981" fontSize="20">评分 2</text>
+ </g>
+ </g>
+
+ {/* Reduce (Synthesize) */}
+ <g transform="translate(50, 460)">
+ <rect width="450" height="140" rx="10" fill="#1e293b" stroke="#10b981" strokeWidth="3" />
+ <text x="30" y="45" fill="#10b981" fontSize="28" fontWeight="bold">Reduce:归约合成</text>
+
+ <path d="M60 70 L225 120 L390 70" fill="none" stroke="#10b981" strokeWidth="4" />
+ <circle cx="225" cy="120" r="20" fill="#10b981" filter="url(#glow-strong)" />
+ </g>
+
+ {/* Final Answer */}
+ <g transform="translate(50, 700)">
+ <rect width="450" height="120" rx="10" fill="#1e293b" stroke="#10b981" strokeWidth="4" />
+ <text x="225" y="70" textAnchor="middle" fill="#10b981" fontSize="32" fontWeight="bold">全局答案 (Answer)</text>
+ </g>
+
+ {/* Connections */}
+ <path d="M275 140 L275 200" stroke="#10b981" strokeWidth="3" markerEnd="url(#arrow-emerald)" />
+ <path d="M275 380 L275 460" stroke="#10b981" strokeWidth="3" markerEnd="url(#arrow-emerald)" />
+ <path d="M275 600 L275 700" stroke="#10b981" strokeWidth="3" markerEnd="url(#arrow-emerald)" />
+
+ {/* Cross connection from Communities */}
+ <path d="M -80 700 L 0 700 L 0 300 L 50 300" fill="none" stroke="#10b981" strokeDasharray="10 10" strokeWidth="3" />
+ </motion.g>
+ </g>
+ )}
+
+ {/* --- ANIMATIONS --- */}
+
+ {/* Blue Flow */}
+ {step >= 1 && (
+ <motion.circle r="8" fill="#60a5fa" filter="url(#glow-strong)">
+ <animateMotion
+ dur="3s"
+ repeatCount="indefinite"
+ path="M 220 160 L 300 160 L 300 240 L 300 600 L 300 750 L 680 750"
+ />
+ </motion.circle>
+ )}
+
+ {/* Purple Flow */}
+ {step >= 2 && (
+ <motion.circle r="8" fill="#c084fc" filter="url(#glow-strong)">
+ <animateMotion
+ dur="4s"
+ repeatCount="indefinite"
+ path="M 905 160 L 905 240 M 905 600 L 905 780 L 1310 780"
+ />
+ </motion.circle>
+ )}
+
+ {/* Green Flow */}
+ {step >= 3 && (
+ <motion.circle r="8" fill="#4ade80" filter="url(#glow-strong)">
+ <animateMotion
+ dur="2s"
+ repeatCount="indefinite"
+ path="M 1585 160 L 1585 280 M 1585 540 L 1585 640 M 1585 780 L 1585 860"
+ />
+ </motion.circle>
+ )}
+
+ </svg>
+ </div>
+ </div>
+ )}
+ </div>
+ )
+}
+
+function DemoCAD() {
+ const [step, setStep] = useState(0);
+ const [isGenerating, setIsGenerating] = useState(false);
+
+ React.useEffect(() => {
+ let timeouts: NodeJS.Timeout[] = [];
+
+ const runSequence = () => {
+ setStep(0);
+ setIsGenerating(false);
+ timeouts.push(setTimeout(() => setIsGenerating(true), 2200));
+ timeouts.push(setTimeout(() => { setIsGenerating(false); setStep(1); }, 4200));
+ timeouts.push(setTimeout(() => setStep(2), 9000));
+ timeouts.push(setTimeout(() => runSequence(), 15000));
+ };
+
+ runSequence();
+ return () => timeouts.forEach(clearTimeout);
+ }, []);
+
+ // Step 0: Input
+ // Step 1: 2D Plan
+ // Step 2: 3D View
+
+ return (
+ <div className="w-full h-full flex flex-col items-center justify-center relative overflow-hidden bg-zinc-900">
+ <AnimatePresence mode="wait">
+ {step === 0 && !isGenerating && (
+ <div className="absolute inset-0 flex items-center justify-center bg-black/60 backdrop-blur-sm z-50">
+ <UserPrompt text="设计一套新中式客厅装修方案,要简约大气" color="purple" />
+ </div>
+ )}
+ </AnimatePresence>
+ <AnimatePresence>
+ {isGenerating && (
+ <motion.div
+ initial={{ opacity: 0 }}
+ animate={{ opacity: 1 }}
+ exit={{ opacity: 0 }}
+ transition={{ duration: 0.25 }}
+ className="absolute inset-0 flex items-center justify-center bg-black/50 backdrop-blur-sm z-40"
+ >
+ <motion.div
+ initial={{ y: 10, opacity: 0 }}
+ animate={{ y: 0, opacity: 1 }}
+ exit={{ y: -10, opacity: 0 }}
+ className="rounded-2xl border border-purple-300/25 bg-white/10 backdrop-blur-2xl px-7 py-6 shadow-[0_24px_80px_rgba(0,0,0,0.55)]"
+ >
+ <div className="text-white/85 font-semibold flex items-center gap-2">
+ <Box className="w-4 h-4 text-purple-200" />
+ 开始生成方案…
+ </div>
+ <div className="text-white/45 text-sm mt-1">布局规划 · 家具摆放 · 2D → 3D</div>
+ <div className="mt-4 space-y-2">
+ <div className="h-2 rounded bg-white/10 overflow-hidden">
+ <motion.div className="h-full bg-purple-400/70" animate={{ width: ["0%", "100%"] }} transition={{ duration: 2.0, ease: "easeInOut" }} />
+ </div>
+ <div className="h-2 rounded bg-white/10 overflow-hidden">
+ <motion.div className="h-full bg-fuchsia-400/60" animate={{ width: ["0%", "92%"] }} transition={{ duration: 2.0, ease: "easeInOut", delay: 0.05 }} />
+ </div>
+ </div>
+ </motion.div>
+ </motion.div>
+ )}
+ </AnimatePresence>
+
+ <div className={`transition-all duration-1000 w-full h-full flex items-center justify-center ${(step === 0 || isGenerating) ? 'opacity-20 blur-sm' : 'opacity-100'}`}>
+ <div className="perspective-[1200px] w-full h-full flex items-center justify-center">
+ <motion.div
+ className="relative w-[720px] h-[540px] bg-zinc-800/80 border-4 border-white/20 shadow-2xl"
+ style={{ transformStyle: "preserve-3d" }}
+ initial={{ rotateX: 0, rotateZ: 0 }}
+ animate={step === 2 ? { rotateX: 62, rotateZ: 28, scale: 0.72 } : { rotateX: 0, rotateZ: 0, scale: 1 }}
+ transition={{ duration: 1.5, ease: "easeInOut" }}
+ >
+ {/* Floor Grid */}
+ <div className="absolute inset-0 bg-[linear-gradient(rgba(255,255,255,0.05)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,0.05)_1px,transparent_1px)] bg-[size:25px_25px]" />
+ <div className="absolute inset-0 bg-stone-900 opacity-50" />
+
+ {/* Room Elements - Only show after input */}
+ {step >= 1 && (
+ <CadPlan is3d={step === 2} />
+ )}
+ </motion.div>
+ </div>
+ </div>
+ </div>
+ )
+}
+
+function CadBox3D({
+ is3d,
+ x,
+ y,
+ w,
+ h,
+ height,
+ topClassName,
+ sideClassName,
+ borderClassName,
+ roundedClassName
+}: {
+ is3d: boolean;
+ x: number;
+ y: number;
+ w: number;
+ h: number;
+ height: number;
+ topClassName: string;
+ sideClassName: string;
+ borderClassName: string;
+ roundedClassName?: string;
+}) {
+ return (
+ <div className="absolute" style={{ left: x, top: y, width: w, height: h, transformStyle: "preserve-3d" as any }}>
+ <motion.div
+ className={`absolute inset-0 ${topClassName} ${borderClassName} ${roundedClassName ?? ""}`}
+ style={{ backfaceVisibility: "hidden" }}
+ animate={is3d ? { z: height } : { z: 0 }}
+ />
+ <motion.div
+ className={`absolute bottom-0 left-0 w-full ${sideClassName} ${borderClassName} origin-bottom ${roundedClassName ?? ""}`}
+ style={{ backfaceVisibility: "hidden" }}
+ animate={is3d ? { height, rotateX: -90 } : { height: 0 }}
+ />
+ <motion.div
+ className={`absolute top-0 left-0 w-full ${sideClassName} ${borderClassName} origin-top ${roundedClassName ?? ""}`}
+ style={{ backfaceVisibility: "hidden" }}
+ animate={is3d ? { height, rotateX: 90 } : { height: 0 }}
+ />
+ <motion.div
+ className={`absolute top-0 right-0 h-full ${sideClassName} ${borderClassName} origin-right ${roundedClassName ?? ""}`}
+ style={{ backfaceVisibility: "hidden" }}
+ animate={is3d ? { width: height, rotateY: 90 } : { width: 0 }}
+ />
+ <motion.div
+ className={`absolute top-0 left-0 h-full ${sideClassName} ${borderClassName} origin-left ${roundedClassName ?? ""}`}
+ style={{ backfaceVisibility: "hidden" }}
+ animate={is3d ? { width: height, rotateY: -90 } : { width: 0 }}
+ />
+ </div>
+ );
+}
+
+function CadPlan({ is3d }: { is3d: boolean }) {
+ if (!is3d) return <CadPlan2D />;
+ return <CadPlan3D />;
+}
+
+function CadPlan2D() {
+ return (
+ <div className="absolute inset-4 rounded-2xl border border-white/10 bg-white/95 overflow-hidden shadow-[0_20px_80px_rgba(0,0,0,0.45)]">
+ <div className="absolute inset-0 flex">
+ <div className="relative flex-1 overflow-hidden">
+ <div className="absolute inset-0 bg-[radial-gradient(circle_at_50%_30%,rgba(0,0,0,0.05),transparent_55%)]" />
+ <div className="absolute inset-0 bg-[linear-gradient(rgba(0,0,0,0.035)_1px,transparent_1px),linear-gradient(90deg,rgba(0,0,0,0.035)_1px,transparent_1px)] bg-[size:20px_20px]" />
+ <svg viewBox="0 0 560 420" className="absolute inset-0 w-full h-full">
+ <defs>
+ <marker id="dimArrow" markerWidth="8" markerHeight="8" refX="4" refY="4" orient="auto">
+ <path d="M0,4 L8,0 L8,8 z" fill="#666666" />
+ </marker>
+ <marker id="dimTick" markerWidth="10" markerHeight="10" refX="5" refY="5" orient="auto">
+ <path d="M1,9 L9,1" stroke="#666666" strokeWidth="2" />
+ </marker>
+ </defs>
+
+ <rect x="24" y="20" width="512" height="380" rx="10" fill="none" stroke="rgba(17,24,39,0.35)" strokeWidth="2" />
+ <rect x="34" y="30" width="492" height="360" rx="8" fill="none" stroke="rgba(17,24,39,0.18)" strokeWidth="1" />
+
+ <g>
+ <rect x="52" y="46" width="456" height="18" fill="#0b1220" />
+ <rect x="52" y="356" width="456" height="18" fill="#0b1220" />
+ <rect x="52" y="46" width="18" height="328" fill="#0b1220" />
+ <rect x="490" y="46" width="18" height="328" fill="#0b1220" />
+
+ <rect x="260" y="46" width="12" height="176" fill="#374151" />
+ <rect x="260" y="222" width="248" height="12" fill="#374151" />
+ <rect x="150" y="222" width="110" height="12" fill="#374151" />
+ <rect x="150" y="222" width="12" height="152" fill="#374151" />
+ <rect x="52" y="306" width="98" height="12" fill="#374151" />
+
+ <rect x="260" y="122" width="12" height="46" fill="#ffffff" />
+ <rect x="150" y="292" width="12" height="52" fill="#ffffff" />
+ <rect x="52" y="190" width="18" height="60" fill="#ffffff" />
+ <rect x="508" y="80" width="18" height="70" fill="#ffffff" />
+
+ <rect x="392" y="46" width="86" height="18" fill="#ffffff" />
+ <line x1="392" y1="54" x2="478" y2="54" stroke="rgba(17,24,39,0.65)" strokeWidth="2" />
+ <line x1="392" y1="58" x2="478" y2="58" stroke="rgba(17,24,39,0.35)" strokeWidth="2" />
+
+ <rect x="490" y="270" width="18" height="62" fill="#ffffff" />
+ <line x1="498" y1="270" x2="498" y2="332" stroke="rgba(17,24,39,0.65)" strokeWidth="2" />
+ <line x1="502" y1="270" x2="502" y2="332" stroke="rgba(17,24,39,0.35)" strokeWidth="2" />
+ </g>
+
+ <g>
+ <path d="M260 122 L300 122" stroke="rgba(17,24,39,0.55)" strokeWidth="1.8" />
+ <path d="M260 122 A40 40 0 0 1 300 162" fill="none" stroke="rgba(17,24,39,0.55)" strokeWidth="1.8" />
+
+ <path d="M150 344 L150 304" stroke="rgba(17,24,39,0.55)" strokeWidth="1.8" />
+ <path d="M150 304 A40 40 0 0 1 190 344" fill="none" stroke="rgba(17,24,39,0.55)" strokeWidth="1.8" />
+ </g>
+
+ <rect x="280" y="86" width="150" height="70" rx="8" fill="none" stroke="#E5E5E5" strokeWidth="1.2" />
+ <rect x="436" y="98" width="60" height="50" rx="6" fill="none" stroke="#E5E5E5" strokeWidth="1.2" />
+ <rect x="334" y="170" width="86" height="62" rx="30" fill="none" stroke="#E5E5E5" strokeWidth="1.2" />
+ <rect x="290" y="252" width="188" height="74" rx="10" fill="none" stroke="#E5E5E5" strokeWidth="1.1" />
+ {[
+ { x: 282, y: 242 }, { x: 446, y: 242 }, { x: 282, y: 322 }, { x: 446, y: 322 }
+ ].map((c, i) => (
+ <rect key={i} x={c.x} y={c.y} width="30" height="30" rx="6" fill="none" stroke="#E5E5E5" strokeWidth="1.1" />
+ ))}
+ <rect x="316" y="330" width="180" height="30" rx="6" fill="none" stroke="#E5E5E5" strokeWidth="1.1" />
+ <rect x="332" y="286" width="86" height="26" rx="6" fill="none" stroke="#E5E5E5" strokeWidth="1.1" />
+ <rect x="422" y="286" width="86" height="26" rx="6" fill="none" stroke="#E5E5E5" strokeWidth="1.1" />
+
+ <circle cx="92" cy="346" r="15" fill="none" stroke="rgba(16,185,129,0.45)" strokeWidth="2.4" />
+ <rect x="88" y="320" width="8" height="52" rx="4" fill="none" stroke="rgba(31,41,55,0.4)" strokeWidth="2" />
+
+ <g opacity="0.85">
+ <path d="M62 396 L498 396" stroke="#666666" strokeWidth="2" markerStart="url(#dimArrow)" markerEnd="url(#dimArrow)" />
+ <path d="M62 388 L62 404" stroke="#666666" strokeWidth="2" />
+ <path d="M498 388 L498 404" stroke="#666666" strokeWidth="2" />
+ <text x="280" y="412" textAnchor="middle" fill="#666666" fontSize="12" fontFamily="ui-monospace, SFMono-Regular">5.8m</text>
+ </g>
+
+ <g opacity="0.85">
+ <path d="M40 46 L40 374" stroke="#666666" strokeWidth="2" markerStart="url(#dimArrow)" markerEnd="url(#dimArrow)" />
+ <path d="M46 46 L34 46" stroke="#666666" strokeWidth="2" />
+ <path d="M46 374 L34 374" stroke="#666666" strokeWidth="2" />
+ <text x="28" y="214" textAnchor="middle" fill="#666666" fontSize="12" fontFamily="ui-monospace, SFMono-Regular" transform="rotate(-90 28 214)">4.2m</text>
+ </g>
+
+ <g opacity="0.85">
+ <path d="M52 38 L508 38" stroke="#666666" strokeWidth="1.5" markerStart="url(#dimTick)" markerEnd="url(#dimTick)" />
+ <path d="M52 46 L52 32" stroke="#666666" strokeWidth="1.5" />
+ <path d="M508 46 L508 32" stroke="#666666" strokeWidth="1.5" />
+ <text x="280" y="30" textAnchor="middle" fill="#666666" fontSize="11" fontFamily="ui-monospace, SFMono-Regular">轴线 A—A</text>
+ </g>
+
+ <g opacity="0.85">
+ <path d="M260 84 L508 84" stroke="#666666" strokeWidth="1.6" markerStart="url(#dimArrow)" markerEnd="url(#dimArrow)" />
+ <path d="M260 222 L260 76" stroke="#666666" strokeOpacity="0.55" strokeWidth="1.5" />
+ <path d="M508 222 L508 76" stroke="#666666" strokeOpacity="0.55" strokeWidth="1.5" />
+ <text x="384" y="76" textAnchor="middle" fill="#666666" fontSize="11" fontFamily="ui-monospace, SFMono-Regular">3.2m</text>
+ </g>
+
+ <g opacity="0.85">
+ <path d="M30 222 L30 374" stroke="#666666" strokeWidth="1.6" markerStart="url(#dimArrow)" markerEnd="url(#dimArrow)" />
+ <path d="M52 222 L22 222" stroke="#666666" strokeOpacity="0.55" strokeWidth="1.5" />
+ <path d="M150 374 L22 374" stroke="#666666" strokeOpacity="0.55" strokeWidth="1.5" />
+ <text x="18" y="302" textAnchor="middle" fill="#666666" fontSize="11" fontFamily="ui-monospace, SFMono-Regular" transform="rotate(-90 18 302)">1.2m</text>
+ </g>
+
+ <g opacity="0.9">
+ <path d="M520 58 L540 58 L530 38 Z" fill="rgba(17,24,39,0.55)" />
+ <text x="530" y="78" textAnchor="middle" fill="rgba(17,24,39,0.55)" fontSize="12" fontFamily="ui-monospace, SFMono-Regular">N</text>
+ </g>
+
+ <text x="78" y="96" fill="rgba(17,24,39,0.5)" fontSize="12" fontFamily="ui-monospace, SFMono-Regular">玄关</text>
+ <text x="292" y="96" fill="rgba(17,24,39,0.5)" fontSize="12" fontFamily="ui-monospace, SFMono-Regular">客厅</text>
+ <text x="292" y="246" fill="rgba(17,24,39,0.5)" fontSize="12" fontFamily="ui-monospace, SFMono-Regular">餐厅</text>
+ <text x="78" y="344" fill="rgba(17,24,39,0.5)" fontSize="12" fontFamily="ui-monospace, SFMono-Regular">走廊</text>
+ <text x="304" y="364" fill="rgba(17,24,39,0.5)" fontSize="12" fontFamily="ui-monospace, SFMono-Regular">厨房</text>
+
+ <g opacity="0.95">
+ <circle cx="276" cy="86" r="4.5" fill="rgba(2,132,199,0.95)" />
+ <path d="M272 86 L280 86" stroke="rgba(255,255,255,0.95)" strokeWidth="1.5" />
+ <path d="M276 82 L276 90" stroke="rgba(255,255,255,0.95)" strokeWidth="1.5" />
+ <text x="284" y="90" fill="rgba(17,24,39,0.55)" fontSize="10" fontFamily="ui-monospace, SFMono-Regular">索引 1/PL-01</text>
+ </g>
+
+ <g opacity="0.95">
+ <circle cx="306" cy="162" r="7.5" fill="rgba(34,197,94,0.9)" stroke="rgba(17,24,39,0.35)" strokeWidth="1.2" />
+ <text x="306" y="166" textAnchor="middle" fill="rgba(255,255,255,0.95)" fontSize="9" fontFamily="ui-monospace, SFMono-Regular">S</text>
+ </g>
+
+ <g opacity="0.95">
+ <circle cx="332" cy="164" r="7.5" fill="rgba(234,179,8,0.9)" stroke="rgba(17,24,39,0.35)" strokeWidth="1.2" />
+ <text x="332" y="168" textAnchor="middle" fill="rgba(17,24,39,0.85)" fontSize="9" fontFamily="ui-monospace, SFMono-Regular">K</text>
+ </g>
+
+ <g opacity="0.45">
+ <path d="M252 46 L252 222" stroke="#666666" strokeWidth="1.2" strokeDasharray="6 6" />
+ </g>
+ </svg>
+ </div>
+
+ <CadInfoPanel />
+ </div>
+ </div>
+ );
+}
+
+function CadPlan3D() {
+ const is3d = true;
+ const wallHeight = 240;
+ const innerWallHeight = 200;
+ return (
+ <div className="absolute inset-4 rounded-2xl border border-white/10 bg-black/25 overflow-hidden">
+ <div className="absolute inset-0 flex">
+ <div className="relative flex-1 overflow-hidden">
+ <div className="absolute inset-0 bg-[radial-gradient(circle_at_50%_40%,rgba(255,255,255,0.14),transparent_62%)]" />
+ <div className="absolute inset-0 bg-[linear-gradient(rgba(255,255,255,0.07)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,0.07)_1px,transparent_1px)] bg-[size:18px_18px]" />
+ <div className="absolute inset-0 bg-gradient-to-br from-purple-900/18 via-transparent to-amber-900/16" />
+
+ <div className="absolute inset-0" style={{ transformStyle: "preserve-3d" }}>
+ <div className="absolute inset-0 shadow-[inset_0_-110px_140px_rgba(0,0,0,0.7)]" />
+
+ <CadBox3D
+ is3d={is3d}
+ x={52}
+ y={46}
+ w={456}
+ h={328}
+ height={18}
+ topClassName="bg-gradient-to-br from-zinc-200/12 to-zinc-900/24"
+ sideClassName="bg-gradient-to-b from-zinc-950/85 to-zinc-900/90"
+ borderClassName="border border-white/10"
+ roundedClassName="rounded-xl"
+ />
+
+ <CadBox3D is3d={is3d} x={52} y={46} w={456} h={18} height={wallHeight} topClassName="bg-zinc-800/70" sideClassName="bg-gradient-to-b from-zinc-950/95 to-zinc-900/95" borderClassName="border border-white/14" />
+ <CadBox3D is3d={is3d} x={52} y={356} w={456} h={18} height={wallHeight} topClassName="bg-zinc-800/70" sideClassName="bg-gradient-to-b from-zinc-950/95 to-zinc-900/95" borderClassName="border border-white/14" />
+ <CadBox3D is3d={is3d} x={52} y={46} w={18} h={328} height={wallHeight} topClassName="bg-zinc-800/70" sideClassName="bg-gradient-to-b from-zinc-950/95 to-zinc-900/95" borderClassName="border border-white/14" />
+ <CadBox3D is3d={is3d} x={490} y={46} w={18} h={328} height={wallHeight} topClassName="bg-zinc-800/70" sideClassName="bg-gradient-to-b from-zinc-950/95 to-zinc-900/95" borderClassName="border border-white/14" />
+
+ <CadBox3D is3d={is3d} x={260} y={46} w={12} h={176} height={innerWallHeight} topClassName="bg-zinc-700/65" sideClassName="bg-gradient-to-b from-zinc-950/92 to-zinc-900/92" borderClassName="border border-white/10" />
+ <CadBox3D is3d={is3d} x={260} y={222} w={248} h={12} height={innerWallHeight} topClassName="bg-zinc-700/65" sideClassName="bg-gradient-to-b from-zinc-950/92 to-zinc-900/92" borderClassName="border border-white/10" />
+ <CadBox3D is3d={is3d} x={150} y={222} w={110} h={12} height={innerWallHeight} topClassName="bg-zinc-700/65" sideClassName="bg-gradient-to-b from-zinc-950/92 to-zinc-900/92" borderClassName="border border-white/10" />
+ <CadBox3D is3d={is3d} x={150} y={222} w={12} h={152} height={innerWallHeight} topClassName="bg-zinc-700/65" sideClassName="bg-gradient-to-b from-zinc-950/92 to-zinc-900/92" borderClassName="border border-white/10" />
+ <CadBox3D is3d={is3d} x={52} y={306} w={98} h={12} height={innerWallHeight} topClassName="bg-zinc-700/65" sideClassName="bg-gradient-to-b from-zinc-950/92 to-zinc-900/92" borderClassName="border border-white/10" />
+
+ <CadBox3D is3d={is3d} x={286} y={92} w={136} h={68} height={62} topClassName="bg-gradient-to-br from-purple-500/55 to-purple-900/55" sideClassName="bg-gradient-to-b from-purple-950/88 to-purple-900/88" borderClassName="border border-purple-200/22" roundedClassName="rounded-xl" />
+ <CadBox3D is3d={is3d} x={430} y={100} w={66} h={54} height={54} topClassName="bg-gradient-to-br from-purple-400/45 to-purple-900/45" sideClassName="bg-gradient-to-b from-purple-950/88 to-purple-900/88" borderClassName="border border-purple-200/18" roundedClassName="rounded-xl" />
+ <CadBox3D is3d={is3d} x={332} y={168} w={94} h={70} height={28} topClassName="bg-gradient-to-br from-amber-300/45 to-amber-900/45" sideClassName="bg-gradient-to-b from-amber-950/88 to-amber-900/88" borderClassName="border border-amber-200/18" roundedClassName="rounded-full" />
+ <CadBox3D is3d={is3d} x={460} y={62} w={40} h={136} height={140} topClassName="bg-gradient-to-br from-zinc-500/45 to-zinc-900/45" sideClassName="bg-gradient-to-b from-zinc-950/92 to-zinc-800/92" borderClassName="border border-white/12" roundedClassName="rounded-lg" />
+
+ <CadBox3D is3d={is3d} x={292} y={246} w={186} h={80} height={22} topClassName="bg-gradient-to-br from-stone-300/18 to-stone-800/22" sideClassName="bg-gradient-to-b from-stone-950/72 to-stone-900/82" borderClassName="border border-white/10" roundedClassName="rounded-2xl" />
+ {[
+ { x: 282, y: 236 }, { x: 452, y: 236 }, { x: 282, y: 322 }, { x: 452, y: 322 }
+ ].map((c, i) => (
+ <CadBox3D key={i} is3d={is3d} x={c.x} y={c.y} w={34} h={34} height={20} topClassName="bg-gradient-to-br from-zinc-400/35 to-zinc-900/35" sideClassName="bg-gradient-to-b from-zinc-950/92 to-zinc-800/92" borderClassName="border border-white/12" roundedClassName="rounded-xl" />
+ ))}
+
+ <CadBox3D is3d={is3d} x={310} y={332} w={196} h={36} height={70} topClassName="bg-gradient-to-br from-emerald-400/22 to-emerald-900/22" sideClassName="bg-gradient-to-b from-emerald-950/74 to-emerald-900/78" borderClassName="border border-emerald-200/16" roundedClassName="rounded-xl" />
+ <CadBox3D is3d={is3d} x={320} y={290} w={90} h={30} height={40} topClassName="bg-gradient-to-br from-blue-400/18 to-blue-900/18" sideClassName="bg-gradient-to-b from-blue-950/74 to-blue-900/78" borderClassName="border border-blue-200/16" roundedClassName="rounded-xl" />
+ <CadBox3D is3d={is3d} x={414} y={290} w={90} h={30} height={40} topClassName="bg-gradient-to-br from-blue-400/18 to-blue-900/18" sideClassName="bg-gradient-to-b from-blue-950/74 to-blue-900/78" borderClassName="border border-blue-200/16" roundedClassName="rounded-xl" />
+
+ <div className="absolute inset-0 pointer-events-none" style={{ transform: "translateZ(6px)" }}>
+ <svg viewBox="0 0 560 420" className="absolute inset-0 w-full h-full opacity-55">
+ <path d="M260 122 A40 40 0 0 1 300 162" fill="none" stroke="rgba(148,163,184,0.6)" strokeWidth="2.2" />
+ <path d="M150 304 A40 40 0 0 1 190 344" fill="none" stroke="rgba(148,163,184,0.6)" strokeWidth="2.2" />
+ </svg>
+ </div>
+ </div>
+ </div>
+
+ <CadInfoPanel />
+ </div>
+ </div>
+ );
+}
+
+function CadInfoPanel() {
+ return (
+ <div className="w-[200px] shrink-0 border-l border-black/10 bg-white/70">
+ <div className="h-full px-3 py-3 flex flex-col">
+ <div className="rounded-lg border border-black/15 bg-white/90 backdrop-blur-sm text-[10px] text-black/70 font-mono overflow-hidden">
+ <div className="px-3 py-2 border-b border-black/10 text-black/80 text-[12px] font-semibold text-center">室内平面布置图</div>
+ <div className="grid grid-cols-[58px_1fr]">
+ <div className="px-2 py-1 border-b border-black/10">图号</div>
+ <div className="px-2 py-1 border-b border-black/10 text-black/80">PL-01</div>
+ <div className="px-2 py-1 border-b border-black/10">比例</div>
+ <div className="px-2 py-1 border-b border-black/10 text-black/80">1:50</div>
+ <div className="px-2 py-1 border-b border-black/10">日期</div>
+ <div className="px-2 py-1 border-b border-black/10 text-black/80">2026-01</div>
+ <div className="px-2 py-1 border-b border-black/10">标高</div>
+ <div className="px-2 py-1 border-b border-black/10 text-black/80">±0.000</div>
+ <div className="px-2 py-1 border-b border-black/10">墙厚</div>
+ <div className="px-2 py-1 border-b border-black/10 text-black/80">外墙240 / 内墙120</div>
+ </div>
+
+ <div className="px-3 py-2 border-t border-black/10">
+ <div className="text-black/70 mb-1">图例</div>
+ <div className="grid grid-cols-[64px_1fr] gap-y-1 items-center">
+ <div className="flex items-center gap-2">
+ <div className="w-10 h-[6px] bg-[#0b1220]" />
+ </div>
+ <div>承重墙</div>
+ <div className="flex items-center gap-2">
+ <div className="w-10 h-[4px] bg-[#374151]" />
+ </div>
+ <div>非承重墙</div>
+ <div className="flex items-center gap-2">
+ <div className="w-10 h-[2px] bg-black/35" />
+ <div className="w-[2px] h-[8px] bg-black/35" />
+ </div>
+ <div>门窗线</div>
+ <div className="flex items-center gap-2">
+ <div className="w-4 h-4 rounded-full bg-green-500/90 border border-black/20 flex items-center justify-center text-white/95 text-[9px]">S</div>
+ </div>
+ <div>插座</div>
+ <div className="flex items-center gap-2">
+ <div className="w-4 h-4 rounded-full bg-yellow-400/90 border border-black/20 flex items-center justify-center text-black/85 text-[9px]">K</div>
+ </div>
+ <div>开关</div>
+ </div>
+ </div>
+ </div>
+ <div className="flex-1" />
+ </div>
+ </div>
+ );
+}
+
+function DemoPPT() {
+ const pdfUrl = "/pdf/GraphRAG_Global_Knowledge_Structure.pdf";
+ const [pdfDoc, setPdfDoc] = useState<any>(null);
+ const [loadError, setLoadError] = useState<string | null>(null);
+ const [phase, setPhase] = useState<"prompt" | "generating" | "scrolling">("prompt");
+ const [cycle, setCycle] = useState(0);
+ const [showSlides, setShowSlides] = useState(false);
+ const slideCount = Math.min((pdfDoc as any)?.numPages ?? 0, 10);
+ const stageRef = React.useRef<HTMLDivElement | null>(null);
+ const [stageSize, setStageSize] = useState<{ w: number; h: number }>({ w: 960, h: 720 });
+ const [pageRatio, setPageRatio] = useState(16 / 9);
+ const maxScale = 1.0;
+ const baseSlideWidth = Math.max(
+ 320,
+ Math.min(
+ 600,
+ Math.floor(stageSize.w - 120),
+ Math.floor((stageSize.h - 140) * pageRatio)
+ )
+ );
+ const itemGap = Math.floor(baseSlideWidth / pageRatio) * 0.8;
+ const startScroll = 0;
+ const endScroll = Math.max(0, (slideCount - 1) * itemGap);
+ const scroll = useMotionValue(startScroll);
+
+ React.useEffect(() => {
+ if (pdfDoc) return;
+ getPdfDocumentFromUrl(pdfUrl)
+ .then((doc) => setPdfDoc(doc))
+ .catch(() => setLoadError("PDF 解析失败"));
+ }, [pdfDoc, pdfUrl]);
+
+ React.useEffect(() => {
+ if (!pdfDoc) return;
+ let cancelled = false;
+ pdfDoc
+ .getPage(1)
+ .then((page: any) => {
+ if (cancelled) return;
+ const viewport = page.getViewport({ scale: 1 });
+ const ratio = viewport.width / viewport.height;
+ if (Number.isFinite(ratio) && ratio > 0.2 && ratio < 5) setPageRatio(ratio);
+ })
+ .catch(() => {});
+ return () => {
+ cancelled = true;
+ };
+ }, [pdfDoc]);
+
+ React.useEffect(() => {
+ const el = stageRef.current;
+ if (!el) return;
+ const ro = new ResizeObserver(() => {
+ setStageSize({ w: el.clientWidth, h: el.clientHeight });
+ });
+ ro.observe(el);
+ setStageSize({ w: el.clientWidth, h: el.clientHeight });
+ return () => ro.disconnect();
+ }, []);
+
+ React.useEffect(() => {
+ if (!pdfDoc || loadError) return;
+ if (slideCount <= 0) return;
+ let t1: NodeJS.Timeout | null = null;
+ let t2: NodeJS.Timeout | null = null;
+ let t3: NodeJS.Timeout | null = null;
+ let t4: NodeJS.Timeout | null = null;
+ let controls: any;
+
+ setPhase("prompt");
+ setShowSlides(false);
+ scroll.set(startScroll);
+
+ t1 = setTimeout(() => {
+ setPhase("generating");
+ }, 2800);
+
+ t2 = setTimeout(() => {
+ setPhase("scrolling");
+ setShowSlides(true);
+ controls = animate(scroll, endScroll, {
+ duration: 12.5,
+ ease: "linear",
+ onComplete: () => {
+ setShowSlides(false);
+ setPhase("prompt");
+ scroll.set(startScroll);
+ t3 = setTimeout(() => setCycle((c) => c + 1), 900);
+ }
+ });
+ }, 4800);
+
+ return () => {
+ if (t1) clearTimeout(t1);
+ if (t2) clearTimeout(t2);
+ if (t3) clearTimeout(t3);
+ if (t4) clearTimeout(t4);
+ controls?.stop?.();
+ };
+ }, [cycle, endScroll, loadError, pdfDoc, scroll, slideCount, startScroll]);
+
+ return (
+ <div ref={stageRef} className="w-full h-full relative overflow-hidden">
+ {loadError && (
+ <div className="absolute inset-0 flex items-center justify-center text-red-200">{loadError}</div>
+ )}
+
+ {!loadError && !pdfDoc && (
+ <div className="absolute inset-0 flex items-center justify-center">
+ <div className="w-full max-w-xl rounded-2xl border border-white/18 bg-white/10 backdrop-blur-2xl p-6 text-white/60">
+ 正在加载演示文稿…
+ </div>
+ </div>
+ )}
+
+ <AnimatePresence mode="wait">
+ {phase === "prompt" && (
+ <motion.div
+ key="prompt"
+ initial={{ opacity: 0 }}
+ animate={{ opacity: 1 }}
+ exit={{ opacity: 0 }}
+ transition={{ duration: 0.35 }}
+ className="absolute inset-0 flex items-center justify-center z-30"
+ >
+ <UserPrompt text="生成一份 GraphRAG 的演示文稿,要结构清晰、视觉震撼" color="cyan" />
+ </motion.div>
+ )}
+ {phase === "generating" && (
+ <motion.div
+ key="generating"
+ initial={{ opacity: 0 }}
+ animate={{ opacity: 1 }}
+ exit={{ opacity: 0 }}
+ transition={{ duration: 0.25 }}
+ className="absolute inset-0 flex items-center justify-center z-30 pointer-events-none"
+ >
+ <div className="w-full max-w-lg rounded-2xl border border-cyan-300/25 bg-white/10 backdrop-blur-2xl px-7 py-6 shadow-[0_24px_80px_rgba(0,0,0,0.55)]">
+ <div className="text-white/85 font-semibold flex items-center gap-2">
+ <FileText className="w-4 h-4 text-cyan-200" />
+ 开始生成 PPT…
+ </div>
+ <div className="text-white/45 text-sm mt-1">抽取要点 · 自动排版 · 渲染幻灯片</div>
+ <div className="mt-4 h-2 rounded-full bg-white/10 overflow-hidden">
+ <motion.div
+ className="h-full bg-gradient-to-r from-cyan-400/70 via-blue-400/70 to-purple-400/70"
+ animate={{ width: ["0%", "100%"] }}
+ transition={{ duration: 2.0, ease: "easeInOut" }}
+ />
+ </div>
+ <div className="mt-3 text-white/40 text-xs font-mono">GENERATING</div>
+ </div>
+ </motion.div>
+ )}
+ </AnimatePresence>
+
+ {!loadError && pdfDoc && slideCount > 0 && showSlides && (
+ <div className="absolute inset-0 overflow-hidden">
+ <div className="absolute inset-0 flex items-center justify-center">
+ <div className="relative w-full h-full">
+ {Array.from({ length: slideCount }).map((_, idx) => (
+ <PptSlideItem
+ key={idx}
+ index={idx}
+ pdf={pdfDoc}
+ scroll={scroll}
+ itemGap={itemGap}
+ slideWidth={baseSlideWidth}
+ maxScale={maxScale}
+ />
+ ))}
+ </div>
+ </div>
+ </div>
+ )}
+ </div>
+ );
+}
+
+function PptSlideItem({ index, pdf, scroll, itemGap, slideWidth, maxScale }: { index: number; pdf: any; scroll: any; itemGap: number; slideWidth: number; maxScale: number }) {
+ const y = useTransform(scroll, (v: number) => index * itemGap - v);
+ const scale = useTransform(scroll, (v: number) => {
+ const d = Math.abs(index * itemGap - v) / itemGap;
+ return Math.max(0.6, maxScale - d * 0.4);
+ });
+ const opacity = useTransform(scroll, (v: number) => {
+ const d = Math.abs(index * itemGap - v) / itemGap;
+ return Math.max(0.3, 1 - d * 0.6);
+ });
+ const blur = useTransform(scroll, (v: number) => {
+ const d = Math.abs(index * itemGap - v) / itemGap;
+ return `blur(${Math.min(8, d * 2)}px)`;
+ });
+
+ return (
+ <div className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2">
+ <motion.div style={{ y, scale, opacity, filter: blur }}>
+ <div className="rounded-2xl border border-cyan-300/20 bg-white/8 backdrop-blur-xl shadow-[0_18px_60px_rgba(0,0,0,0.45)] p-3">
+ <div className="text-white/40 text-xs font-mono px-2 pb-2">SLIDE {String(index + 1).padStart(2, "0")}</div>
+ <PdfSlideCanvas pdf={pdf} pageNumber={index + 1} targetWidth={slideWidth} />
+ </div>
+ </motion.div>
+ </div>
+ );
+}
+
+function PdfSlideCanvas({ pdf, pageNumber, targetWidth }: { pdf: any; pageNumber: number; targetWidth: number }) {
+ const canvasRef = React.useRef<HTMLCanvasElement | null>(null);
+ const [size, setSize] = useState<{ w: number; h: number }>({ w: targetWidth, h: Math.round(targetWidth * 0.5625) });
+ const [ready, setReady] = useState(false);
+
+ React.useEffect(() => {
+ const canvas = canvasRef.current;
+ if (!canvas) return;
+ let cancelled = false;
+ setReady(false);
+ renderPdfPageToCanvas({ pdf, pageNumber, canvas, targetWidth })
+ .then(() => {
+ if (cancelled) return;
+ setSize({ w: canvas.clientWidth || targetWidth, h: canvas.clientHeight || Math.round(targetWidth * 0.5625) });
+ setReady(true);
+ })
+ .catch(() => {
+ if (cancelled) return;
+ setReady(true);
+ });
+ return () => {
+ cancelled = true;
+ };
+ }, [pageNumber, pdf, targetWidth]);
+
+ return (
+ <div className="w-full flex justify-center">
+ <div className="relative rounded-xl overflow-hidden border border-white/10 bg-black" style={{ width: targetWidth, minHeight: Math.max(140, size.h) }}>
+ {!ready && <div className="absolute inset-0 bg-white/5 animate-pulse" style={{ height: Math.max(140, size.h) }} />}
+ <canvas ref={canvasRef} className="block" />
+ </div>
+ </div>
+ );
+}
+
+// Utility Component for Typing Effect
+function Typewriter({ text, speed = 50 }: { text: string, speed?: number }) {
+ const [displayed, setDisplayed] = useState("");
+
+ React.useEffect(() => {
+ let i = 0;
+ setDisplayed("");
+ const timer = setInterval(() => {
+ if (i < text.length) {
+ setDisplayed((prev) => prev + text.charAt(i));
+ i++;
+ } else {
+ clearInterval(timer);
+ }
+ }, speed);
+ return () => clearInterval(timer);
+ }, [text, speed]);
+
+ return <span>{displayed}<span className="animate-pulse">|</span></span>;
+}
diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts
new file mode 100644
index 0000000..11f02fe
--- /dev/null
+++ b/src/vite-env.d.ts
@@ -0,0 +1 @@
+/// <reference types="vite/client" />
diff --git a/tailwind.config.js b/tailwind.config.js
new file mode 100644
index 0000000..df0fecb
--- /dev/null
+++ b/tailwind.config.js
@@ -0,0 +1,65 @@
+/** @type {import('tailwindcss').Config} */
+export default {
+ darkMode: ["class"],
+ content: [
+ './pages/**/*.{ts,tsx}',
+ './components/**/*.{ts,tsx}',
+ './app/**/*.{ts,tsx}',
+ './src/**/*.{ts,tsx}',
+ ],
+ theme: {
+ container: {
+ center: true,
+ padding: "2rem",
+ screens: {
+ "2xl": "1400px",
+ },
+ },
+ extend: {
+ colors: {
+ border: "hsl(var(--border))",
+ input: "hsl(var(--input))",
+ ring: "hsl(var(--ring))",
+ background: "hsl(var(--background))",
+ foreground: "hsl(var(--foreground))",
+ primary: {
+ DEFAULT: "hsl(var(--primary))",
+ foreground: "hsl(var(--primary-foreground))",
+ },
+ secondary: {
+ DEFAULT: "hsl(var(--secondary))",
+ foreground: "hsl(var(--secondary-foreground))",
+ },
+ destructive: {
+ DEFAULT: "hsl(var(--destructive))",
+ foreground: "hsl(var(--destructive-foreground))",
+ },
+ muted: {
+ DEFAULT: "hsl(var(--muted))",
+ foreground: "hsl(var(--muted-foreground))",
+ },
+ accent: {
+ DEFAULT: "hsl(var(--accent))",
+ foreground: "hsl(var(--accent-foreground))",
+ },
+ popover: {
+ DEFAULT: "hsl(var(--popover))",
+ foreground: "hsl(var(--popover-foreground))",
+ },
+ card: {
+ DEFAULT: "hsl(var(--card))",
+ foreground: "hsl(var(--card-foreground))",
+ },
+ },
+ borderRadius: {
+ lg: "var(--radius)",
+ md: "calc(var(--radius) - 2px)",
+ sm: "calc(var(--radius) - 4px)",
+ },
+ },
+ },
+ plugins: [
+ require("tailwindcss-animate"),
+ require('@tailwindcss/typography'),
+ ],
+}
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 0000000..d75047a
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,36 @@
+{
+ "compilerOptions": {
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
+ "target": "ES2020",
+ "useDefineForClassFields": true,
+ "lib": [
+ "ES2020",
+ "DOM",
+ "DOM.Iterable"
+ ],
+ "module": "ESNext",
+ "skipLibCheck": true,
+ "moduleResolution": "bundler",
+ "allowImportingTsExtensions": true,
+ "verbatimModuleSyntax": false,
+ "moduleDetection": "force",
+ "noEmit": true,
+ "jsx": "react-jsx",
+ "strict": false,
+ "noUnusedLocals": false,
+ "noUnusedParameters": false,
+ "noFallthroughCasesInSwitch": false,
+ "noUncheckedSideEffectImports": false,
+ "forceConsistentCasingInFileNames": false,
+ "baseUrl": "./",
+ "paths": {
+ "@/*": [
+ "./src/*"
+ ]
+ }
+ },
+ "include": [
+ "src",
+ "api"
+ ]
+}
diff --git a/vite.config.ts b/vite.config.ts
new file mode 100644
index 0000000..ae87a08
--- /dev/null
+++ b/vite.config.ts
@@ -0,0 +1,30 @@
+import { defineConfig } from 'vite'
+import react from '@vitejs/plugin-react'
+import tsconfigPaths from "vite-tsconfig-paths";
+import { traeBadgePlugin } from 'vite-plugin-trae-solo-badge';
+
+// https://vite.dev/config/
+export default defineConfig({
+ build: {
+ sourcemap: 'hidden',
+ },
+ plugins: [
+ react({
+ babel: {
+ plugins: [
+ 'react-dev-locator',
+ ],
+ },
+ }),
+ traeBadgePlugin({
+ variant: 'dark',
+ position: 'bottom-right',
+ prodOnly: true,
+ clickable: true,
+ clickUrl: 'https://www.trae.ai/solo?showJoin=1',
+ autoTheme: true,
+ autoThemeTarget: '#root'
+ }),
+ tsconfigPaths()
+ ],
+})