From 1f669143cc3d9d650f0fad32fa1c2750a927ecb3 Mon Sep 17 00:00:00 2001 From: ert Date: Thu, 18 Sep 2025 23:34:55 +0800 Subject: [PATCH] first commit --- .gitignore | 24 + .trae/documents/抽奖系统产品需求文档.md | 97 + .trae/documents/抽奖系统技术架构文档.md | 247 + .vite/deps/_metadata.json | 61 + .vite/deps/better-sqlite3.js | 816 + .vite/deps/better-sqlite3.js.map | 7 + .vite/deps/chunk-PR4QN5HX.js | 42 + .vite/deps/chunk-PR4QN5HX.js.map | 7 + .vite/deps/chunk-QMYD5KZB.js | 21687 +++++++++++++++++ .vite/deps/chunk-QMYD5KZB.js.map | 7 + .vite/deps/chunk-QTVD6AVW.js | 1906 ++ .vite/deps/chunk-QTVD6AVW.js.map | 7 + .vite/deps/framer-motion.js | 11179 +++++++++ .vite/deps/framer-motion.js.map | 7 + .vite/deps/lucide-react.js | 26825 ++++++++++++++++++++++ .vite/deps/lucide-react.js.map | 7 + .vite/deps/package.json | 3 + .vite/deps/react-dom_client.js | 39 + .vite/deps/react-dom_client.js.map | 7 + .vite/deps/react-router-dom.js | 13502 +++++++++++ .vite/deps/react-router-dom.js.map | 7 + .vite/deps/react.js | 5 + .vite/deps/react.js.map | 7 + .vite/deps/react_jsx-dev-runtime.js | 913 + .vite/deps/react_jsx-dev-runtime.js.map | 7 + README.md | 96 + eslint.config.js | 28 + index.html | 25 + lottery.db | 0 package-lock.json | 7777 +++++++ package.json | 57 + postcss.config.js | 10 + public/favicon.svg | 13 + server/index.js | 1062 + server/lottery.db | Bin 0 -> 45056 bytes src/App.tsx | 151 + src/assets/react.svg | 1 + src/components/ConfettiEffect.tsx | 151 + src/components/DrawAnimation.tsx | 217 + src/components/Empty.tsx | 45 + src/components/EnhancedUX.tsx | 223 + src/components/ErrorBoundary.tsx | 49 + src/components/LoadingSpinner.tsx | 63 + src/components/LotteryAnimation.tsx | 330 + src/components/NetworkStatus.tsx | 68 + src/components/NumberKeyboard.tsx | 158 + src/components/PrizeDisplay.tsx | 661 + src/components/ResultDisplay.tsx | 323 + src/components/ScreenKeyboard.tsx | 317 + src/components/Toast.tsx | 120 + src/components/ToastContainer.tsx | 31 + src/contexts/ToastContext.tsx | 62 + src/database/database.ts | 435 + src/database/init.sql | 66 + src/hooks/useTheme.ts | 29 + src/hooks/useToast.ts | 64 + src/index.css | 92 + src/lib/utils.ts | 6 + src/main.tsx | 14 + src/pages/Admin.tsx | 1399 ++ src/pages/ClearRecords.tsx | 184 + src/pages/ConfettiDemo.tsx | 161 + src/pages/CrudTest.tsx | 284 + src/pages/Home.tsx | 443 + src/pages/Login.tsx | 156 + src/pages/Lottery.tsx | 364 + src/pages/NetworkTest.tsx | 120 + src/pages/Records.tsx | 307 + src/pages/SimpleNetworkTest.tsx | 105 + src/services/apiService.ts | 453 + src/services/authService.ts | 268 + src/services/eventService.ts | 105 + src/services/lotteryService.ts | 279 + src/services/networkService.ts | 159 + src/services/websocketService.ts | 393 + src/store/index.ts | 404 + src/types.ts | 61 + src/vite-env.d.ts | 1 + start.sh | 34 + tailwind.config.js | 13 + tsconfig.json | 36 + vite.config.ts | 70 + 原始需求.md | 16 + 部署文档.md | 408 + 84 files changed, 96383 insertions(+) create mode 100644 .gitignore create mode 100644 .trae/documents/抽奖系统产品需求文档.md create mode 100644 .trae/documents/抽奖系统技术架构文档.md create mode 100644 .vite/deps/_metadata.json create mode 100644 .vite/deps/better-sqlite3.js create mode 100644 .vite/deps/better-sqlite3.js.map create mode 100644 .vite/deps/chunk-PR4QN5HX.js create mode 100644 .vite/deps/chunk-PR4QN5HX.js.map create mode 100644 .vite/deps/chunk-QMYD5KZB.js create mode 100644 .vite/deps/chunk-QMYD5KZB.js.map create mode 100644 .vite/deps/chunk-QTVD6AVW.js create mode 100644 .vite/deps/chunk-QTVD6AVW.js.map create mode 100644 .vite/deps/framer-motion.js create mode 100644 .vite/deps/framer-motion.js.map create mode 100644 .vite/deps/lucide-react.js create mode 100644 .vite/deps/lucide-react.js.map create mode 100644 .vite/deps/package.json create mode 100644 .vite/deps/react-dom_client.js create mode 100644 .vite/deps/react-dom_client.js.map create mode 100644 .vite/deps/react-router-dom.js create mode 100644 .vite/deps/react-router-dom.js.map create mode 100644 .vite/deps/react.js create mode 100644 .vite/deps/react.js.map create mode 100644 .vite/deps/react_jsx-dev-runtime.js create mode 100644 .vite/deps/react_jsx-dev-runtime.js.map create mode 100644 README.md create mode 100644 eslint.config.js create mode 100644 index.html create mode 100644 lottery.db create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 postcss.config.js create mode 100644 public/favicon.svg create mode 100644 server/index.js create mode 100644 server/lottery.db create mode 100644 src/App.tsx create mode 100644 src/assets/react.svg create mode 100644 src/components/ConfettiEffect.tsx create mode 100644 src/components/DrawAnimation.tsx create mode 100644 src/components/Empty.tsx create mode 100644 src/components/EnhancedUX.tsx create mode 100644 src/components/ErrorBoundary.tsx create mode 100644 src/components/LoadingSpinner.tsx create mode 100644 src/components/LotteryAnimation.tsx create mode 100644 src/components/NetworkStatus.tsx create mode 100644 src/components/NumberKeyboard.tsx create mode 100644 src/components/PrizeDisplay.tsx create mode 100644 src/components/ResultDisplay.tsx create mode 100644 src/components/ScreenKeyboard.tsx create mode 100644 src/components/Toast.tsx create mode 100644 src/components/ToastContainer.tsx create mode 100644 src/contexts/ToastContext.tsx create mode 100644 src/database/database.ts create mode 100644 src/database/init.sql create mode 100644 src/hooks/useTheme.ts create mode 100644 src/hooks/useToast.ts create mode 100644 src/index.css create mode 100644 src/lib/utils.ts create mode 100644 src/main.tsx create mode 100644 src/pages/Admin.tsx create mode 100644 src/pages/ClearRecords.tsx create mode 100644 src/pages/ConfettiDemo.tsx create mode 100644 src/pages/CrudTest.tsx create mode 100644 src/pages/Home.tsx create mode 100644 src/pages/Login.tsx create mode 100644 src/pages/Lottery.tsx create mode 100644 src/pages/NetworkTest.tsx create mode 100644 src/pages/Records.tsx create mode 100644 src/pages/SimpleNetworkTest.tsx create mode 100644 src/services/apiService.ts create mode 100644 src/services/authService.ts create mode 100644 src/services/eventService.ts create mode 100644 src/services/lotteryService.ts create mode 100644 src/services/networkService.ts create mode 100644 src/services/websocketService.ts create mode 100644 src/store/index.ts create mode 100644 src/types.ts create mode 100644 src/vite-env.d.ts create mode 100644 start.sh create mode 100644 tailwind.config.js create mode 100644 tsconfig.json create mode 100644 vite.config.ts create mode 100644 原始需求.md create mode 100644 部署文档.md 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/documents/抽奖系统产品需求文档.md b/.trae/documents/抽奖系统产品需求文档.md new file mode 100644 index 0000000..d6f83c2 --- /dev/null +++ b/.trae/documents/抽奖系统产品需求文档.md @@ -0,0 +1,97 @@ +# 抽奖系统产品需求文档 + +## 1. Product Overview + +本产品是一个基于H5技术的学号抽奖系统,为学校活动提供公平、透明的抽奖服务。系统支持多级奖项设置、实时数据统计和离线缓存功能,确保在网络异常情况下也能正常运行。 + +- 解决传统抽奖方式不够透明、数据难以统计的问题,为学校师生提供现代化的抽奖解决方案。 +- 目标是成为校园活动的标准抽奖工具,提升活动参与度和公信力。 + +## 2. Core Features + +### 2.1 User Roles + +| Role | Registration Method | Core Permissions | +|------|---------------------|------------------| +| 管理员 | 密码登录 | 系统配置、奖项设置、数据查看、背景管理 | +| 学生用户 | 学号输入 | 参与抽奖、查看中奖结果 | + +### 2.2 Feature Module + +我们的抽奖系统包含以下主要页面: + +1. **登录页面**:密码验证、系统准入控制 +2. **抽奖主界面**:三列布局展示、学号输入、屏幕键盘、抽奖操作 +3. **后台管理页面**:奖项配置、抽奖次数设置、数据统计 +4. **数据查询页面**:中奖记录查看、学号隐私保护 +5. **系统设置页面**:背景图片管理、界面配置 + +### 2.3 Page Details + +| Page Name | Module Name | Feature description | +|-----------|-------------|---------------------| +| 登录页面 | 密码验证模块 | 输入系统密码,验证通过后进入抽奖系统 | +| 抽奖主界面 | 奖项展示区 | 显示各级奖品名称、中奖概率、已中出数量(左侧2/9宽度) | +| 抽奖主界面 | 学号输入区 | 12位数字学号输入框、屏幕数字键盘(140px*140px,间距10px)、退格清空按钮(中间5/9宽度) | +| 抽奖主界面 | 开奖结果区 | 实时显示中奖情况、历史记录(右侧2/9宽度) | +| 抽奖主界面 | 抽奖动画模块 | 弹出浮窗、3秒滚动摇奖效果、中奖信息展示 | +| 后台管理页面 | 奖项配置模块 | 设置总奖数、一二三等奖名称数量、抽奖次数限制 | +| 后台管理页面 | 数据统计模块 | 查看所有中奖数据、学号记录、抽奖时间 | +| 数据查询页面 | 查询接口模块 | 实时查看出奖情况、学号隐私保护(*号替换) | +| 系统设置页面 | 背景管理模块 | 本地图片选择、背景大小位置调整 | +| 系统设置页面 | 缓存同步模块 | 本地缓存管理、网络恢复后数据同步 | + +## 3. Core Process + +**管理员流程:** +系统启动 → 密码登录 → 奖项配置 → 背景设置 → 启动抽奖 → 实时监控 → 数据导出 + +**学生用户流程:** +进入抽奖页面 → 输入12位学号 → 点击抽奖按钮 → 观看摇奖动画 → 查看中奖结果 → 结束或继续抽奖 + +**系统内部流程:** +学号验证 → 抽奖次数检查 → 本地缓存记录 → 概率计算 → 结果生成 → 数据同步 + +```mermaid +graph TD + A[系统启动] --> B[密码登录] + B --> C[抽奖主界面] + C --> D[学号输入] + D --> E[抽奖次数验证] + E --> F[抽奖动画] + F --> G[结果展示] + G --> H[数据记录] + H --> I[本地缓存] + I --> J[网络同步] + + C --> K[后台管理] + K --> L[奖项配置] + K --> M[数据查询] + K --> N[系统设置] +``` + +## 4. User Interface Design + +### 4.1 Design Style + +- **主色调**:#1890FF(蓝色主题),#52C41A(成功绿色) +- **辅助色**:#FAAD14(警告黄色),#F5222D(错误红色) +- **按钮样式**:圆角矩形,3D立体效果,悬停渐变动画 +- **字体**:微软雅黑 16px-24px,数字使用等宽字体 +- **布局风格**:卡片式设计,顶部导航,响应式网格布局 +- **图标风格**:线性图标配合实心填充,统一视觉风格 + +### 4.2 Page Design Overview + +| Page Name | Module Name | UI Elements | +|-----------|-------------|-------------| +| 登录页面 | 密码输入框 | 居中卡片布局,深色背景,白色输入框,蓝色登录按钮 | +| 抽奖主界面 | 三列布局 | 1920*1080全屏,左中右2:5:2比例,无滚动条设计 | +| 抽奖主界面 | 屏幕键盘 | 3*4数字矩阵,140px*140px按钮,10px间距,触摸反馈 | +| 抽奖主界面 | 抽奖动画 | 模态弹窗,旋转滚动效果,3秒倒计时,结果高亮显示 | +| 后台管理页面 | 配置表单 | 表格布局,输入框验证,实时预览,保存确认 | +| 数据查询页面 | 数据表格 | 分页显示,搜索过滤,学号脱敏,导出功能 | + +### 4.3 Responsiveness + +系统主要针对1920*1080分辨率设计,桌面优先适配。支持触摸交互优化,屏幕键盘具备触觉反馈效果。在较小屏幕上自动调整布局比例,确保核心功能可用性。 \ No newline at end of file diff --git a/.trae/documents/抽奖系统技术架构文档.md b/.trae/documents/抽奖系统技术架构文档.md new file mode 100644 index 0000000..dda4f8f --- /dev/null +++ b/.trae/documents/抽奖系统技术架构文档.md @@ -0,0 +1,247 @@ +# 抽奖系统技术架构文档 + +## 1. Architecture design + +```mermaid +graph TD + A[用户浏览器] --> B[React前端应用] + B --> C[SQLite数据库接口] + C --> D[SQLite本地数据库] + B --> E[本地缓存 LocalStorage] + B --> F[文件系统存储] + + subgraph "前端层" + B + E + end + + subgraph "数据层" + C + D + F + end +``` + +## 2. Technology Description + +- Frontend: React@18 + TypeScript + Tailwind CSS@3 + Vite + Framer Motion +- Database: SQLite + better-sqlite3 +- 状态管理: Zustand +- 本地存储: LocalStorage + SQLite +- 动画库: Framer Motion + CSS3 Animations +- 文件处理: Node.js File System API + +## 3. Route definitions + +| Route | Purpose | +|-------|---------| +| / | 登录页面,密码验证和系统准入 | +| /lottery | 抽奖主界面,三列布局的核心抽奖功能 | +| /admin | 后台管理页面,奖项配置和系统设置 | +| /admin/prizes | 奖项管理子页面,设置各级奖品信息 | +| /admin/records | 数据查询子页面,查看中奖记录 | +| /admin/settings | 系统设置子页面,背景和参数配置 | + +## 4. API definitions + +### 4.1 Core API + +**身份认证相关** +``` +POST /api/auth/login +``` + +Request: +| Param Name | Param Type | isRequired | Description | +|------------|------------|------------|-------------| +| password | string | true | 系统管理密码 | + +Response: +| Param Name | Param Type | Description | +|------------|------------|-------------| +| success | boolean | 登录是否成功 | +| session | string | 会话标识 | + +**抽奖相关** +``` +POST /api/lottery/draw +``` + +Request: +| Param Name | Param Type | isRequired | Description | +|------------|------------|------------|-------------| +| studentId | string | true | 12位学号 | +| timestamp | number | true | 抽奖时间戳 | + +Response: +| Param Name | Param Type | Description | +|------------|------------|-------------| +| success | boolean | 抽奖是否成功 | +| prize | object | 中奖信息 | +| remaining | number | 剩余抽奖次数 | + +**奖项配置** +``` +GET/POST /api/prizes +``` + +**中奖记录查询** +``` +GET /api/records +``` + +Request: +| Param Name | Param Type | isRequired | Description | +|------------|------------|------------|-------------| +| page | number | false | 页码 | +| limit | number | false | 每页数量 | +| hidePositions | array | false | 学号隐藏位置 | + +## 5. Server architecture diagram + +```mermaid +graph TD + A[客户端/前端] --> B[路由层] + B --> C[组件层] + C --> D[状态管理层] + D --> E[数据服务层] + E --> F[缓存层] + E --> G[(SQLite数据库)] + + subgraph 前端架构 + B + C + D + E + F + end + + subgraph 数据层 + G + H[本地存储] + I[文件系统] + end + + F --> H + F --> I +``` + +## 6. Data model + +### 6.1 Data model definition + +```mermaid +erDiagram + SYSTEM_CONFIG ||--o{ PRIZE_CONFIG : contains + PRIZE_CONFIG ||--o{ LOTTERY_RECORD : generates + STUDENT ||--o{ LOTTERY_RECORD : participates + + SYSTEM_CONFIG { + uuid id PK + string admin_password + int max_draw_times + json background_config + json hide_positions + timestamp created_at + timestamp updated_at + } + + PRIZE_CONFIG { + uuid id PK + string prize_name + int prize_level + int total_quantity + int remaining_quantity + decimal probability + boolean is_active + timestamp created_at + } + + STUDENT { + string student_id PK + int draw_count + timestamp first_draw_at + timestamp last_draw_at + } + + LOTTERY_RECORD { + uuid id PK + string student_id FK + uuid prize_id FK + string prize_name + int prize_level + timestamp draw_time + boolean is_synced + json cache_data + } +``` + +### 6.2 Data Definition Language + +**系统配置表 (system_config)** +```sql +-- 创建系统配置表 +CREATE TABLE system_config ( + id TEXT PRIMARY KEY DEFAULT (lower(hex(randomblob(16)))), + admin_password TEXT NOT NULL DEFAULT 'admin123', + max_draw_times INTEGER DEFAULT 1, + background_config TEXT DEFAULT '{}', + hide_positions TEXT DEFAULT '3,4,5,6', + created_at DATETIME DEFAULT CURRENT_TIMESTAMP, + updated_at DATETIME DEFAULT CURRENT_TIMESTAMP +); + +-- 创建奖项配置表 +CREATE TABLE prize_config ( + id TEXT PRIMARY KEY DEFAULT (lower(hex(randomblob(16)))), + prize_name TEXT NOT NULL, + prize_level INTEGER NOT NULL CHECK (prize_level IN (1,2,3,4)), + total_quantity INTEGER NOT NULL DEFAULT 0, + remaining_quantity INTEGER NOT NULL DEFAULT 0, + probability REAL DEFAULT 0.0000, + is_active INTEGER DEFAULT 1, + created_at DATETIME DEFAULT CURRENT_TIMESTAMP +); + +-- 创建学生表 +CREATE TABLE students ( + student_id TEXT PRIMARY KEY, + draw_count INTEGER DEFAULT 0, + first_draw_at DATETIME, + last_draw_at DATETIME +); + +-- 创建抽奖记录表 +CREATE TABLE lottery_records ( + id TEXT PRIMARY KEY DEFAULT (lower(hex(randomblob(16)))), + student_id TEXT NOT NULL, + prize_id TEXT REFERENCES prize_config(id), + prize_name TEXT NOT NULL, + prize_level INTEGER NOT NULL, + draw_time DATETIME DEFAULT CURRENT_TIMESTAMP, + is_synced INTEGER DEFAULT 0, + cache_data TEXT DEFAULT '{}' +); + +-- 创建索引 +CREATE INDEX idx_lottery_records_student_id ON lottery_records(student_id); +CREATE INDEX idx_lottery_records_draw_time ON lottery_records(draw_time DESC); +CREATE INDEX idx_lottery_records_prize_level ON lottery_records(prize_level); +CREATE INDEX idx_students_draw_count ON students(draw_count); + +-- 创建触发器用于更新时间戳 +CREATE TRIGGER update_system_config_timestamp + AFTER UPDATE ON system_config + BEGIN + UPDATE system_config SET updated_at = CURRENT_TIMESTAMP WHERE id = NEW.id; + END; + +-- 初始化数据 +INSERT INTO system_config (admin_password, max_draw_times) VALUES ('admin123', 1); + +INSERT INTO prize_config (prize_name, prize_level, total_quantity, remaining_quantity, probability) VALUES +('一等奖-iPad', 1, 1, 1, 0.0010), +('二等奖-蓝牙耳机', 2, 5, 5, 0.0050), +('三等奖-保温杯', 3, 20, 20, 0.0200), +('谢谢参与', 4, 9974, 9974, 0.9740); +``` \ No newline at end of file diff --git a/.vite/deps/_metadata.json b/.vite/deps/_metadata.json new file mode 100644 index 0000000..2c15828 --- /dev/null +++ b/.vite/deps/_metadata.json @@ -0,0 +1,61 @@ +{ + "hash": "e77040a4", + "configHash": "7cee043e", + "lockfileHash": "0a7bdaab", + "browserHash": "98b692f4", + "optimized": { + "react/jsx-dev-runtime": { + "src": "../../node_modules/react/jsx-dev-runtime.js", + "file": "react_jsx-dev-runtime.js", + "fileHash": "c400bd07", + "needsInterop": true + }, + "react": { + "src": "../../node_modules/react/index.js", + "file": "react.js", + "fileHash": "eaccd8a1", + "needsInterop": true + }, + "react-dom/client": { + "src": "../../node_modules/react-dom/client.js", + "file": "react-dom_client.js", + "fileHash": "8c209677", + "needsInterop": true + }, + "react-router-dom": { + "src": "../../node_modules/react-router-dom/dist/index.mjs", + "file": "react-router-dom.js", + "fileHash": "c1275fad", + "needsInterop": false + }, + "framer-motion": { + "src": "../../node_modules/framer-motion/dist/es/index.mjs", + "file": "framer-motion.js", + "fileHash": "e6ddb510", + "needsInterop": false + }, + "lucide-react": { + "src": "../../node_modules/lucide-react/dist/esm/lucide-react.js", + "file": "lucide-react.js", + "fileHash": "49c0e6e0", + "needsInterop": false + }, + "better-sqlite3": { + "src": "../../node_modules/better-sqlite3/lib/index.js", + "file": "better-sqlite3.js", + "fileHash": "3977a274", + "needsInterop": true + } + }, + "chunks": { + "chunk-QMYD5KZB": { + "file": "chunk-QMYD5KZB.js" + }, + "chunk-QTVD6AVW": { + "file": "chunk-QTVD6AVW.js" + }, + "chunk-PR4QN5HX": { + "file": "chunk-PR4QN5HX.js" + } + } +} \ No newline at end of file diff --git a/.vite/deps/better-sqlite3.js b/.vite/deps/better-sqlite3.js new file mode 100644 index 0000000..e6d5c27 --- /dev/null +++ b/.vite/deps/better-sqlite3.js @@ -0,0 +1,816 @@ +import { + __commonJS, + __require +} from "./chunk-PR4QN5HX.js"; + +// browser-external:fs +var require_fs = __commonJS({ + "browser-external:fs"(exports, module) { + module.exports = Object.create(new Proxy({}, { + get(_, key) { + if (key !== "__esModule" && key !== "__proto__" && key !== "constructor" && key !== "splice") { + console.warn(`Module "fs" has been externalized for browser compatibility. Cannot access "fs.${key}" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`); + } + } + })); + } +}); + +// browser-external:path +var require_path = __commonJS({ + "browser-external:path"(exports, module) { + module.exports = Object.create(new Proxy({}, { + get(_, key) { + if (key !== "__esModule" && key !== "__proto__" && key !== "constructor" && key !== "splice") { + console.warn(`Module "path" has been externalized for browser compatibility. Cannot access "path.${key}" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`); + } + } + })); + } +}); + +// node_modules/better-sqlite3/lib/util.js +var require_util = __commonJS({ + "node_modules/better-sqlite3/lib/util.js"(exports) { + "use strict"; + exports.getBooleanOption = (options, key) => { + let value = false; + if (key in options && typeof (value = options[key]) !== "boolean") { + throw new TypeError(`Expected the "${key}" option to be a boolean`); + } + return value; + }; + exports.cppdb = Symbol(); + exports.inspect = Symbol.for("nodejs.util.inspect.custom"); + } +}); + +// node_modules/better-sqlite3/lib/sqlite-error.js +var require_sqlite_error = __commonJS({ + "node_modules/better-sqlite3/lib/sqlite-error.js"(exports, module) { + "use strict"; + var descriptor = { value: "SqliteError", writable: true, enumerable: false, configurable: true }; + function SqliteError(message, code) { + if (new.target !== SqliteError) { + return new SqliteError(message, code); + } + if (typeof code !== "string") { + throw new TypeError("Expected second argument to be a string"); + } + Error.call(this, message); + descriptor.value = "" + message; + Object.defineProperty(this, "message", descriptor); + Error.captureStackTrace(this, SqliteError); + this.code = code; + } + Object.setPrototypeOf(SqliteError, Error); + Object.setPrototypeOf(SqliteError.prototype, Error.prototype); + Object.defineProperty(SqliteError.prototype, "name", descriptor); + module.exports = SqliteError; + } +}); + +// node_modules/file-uri-to-path/index.js +var require_file_uri_to_path = __commonJS({ + "node_modules/file-uri-to-path/index.js"(exports, module) { + var sep = require_path().sep || "/"; + module.exports = fileUriToPath; + function fileUriToPath(uri) { + if ("string" != typeof uri || uri.length <= 7 || "file://" != uri.substring(0, 7)) { + throw new TypeError("must pass in a file:// URI to convert to a file path"); + } + var rest = decodeURI(uri.substring(7)); + var firstSlash = rest.indexOf("/"); + var host = rest.substring(0, firstSlash); + var path = rest.substring(firstSlash + 1); + if ("localhost" == host) host = ""; + if (host) { + host = sep + sep + host; + } + path = path.replace(/^(.+)\|/, "$1:"); + if (sep == "\\") { + path = path.replace(/\//g, "\\"); + } + if (/^.+\:/.test(path)) { + } else { + path = sep + path; + } + return host + path; + } + } +}); + +// node_modules/bindings/bindings.js +var require_bindings = __commonJS({ + "node_modules/bindings/bindings.js"(exports, module) { + var fs = require_fs(); + var path = require_path(); + var fileURLToPath = require_file_uri_to_path(); + var join = path.join; + var dirname = path.dirname; + var exists = fs.accessSync && function(path2) { + try { + fs.accessSync(path2); + } catch (e) { + return false; + } + return true; + } || fs.existsSync || path.existsSync; + var defaults = { + arrow: process.env.NODE_BINDINGS_ARROW || " → ", + compiled: process.env.NODE_BINDINGS_COMPILED_DIR || "compiled", + platform: process.platform, + arch: process.arch, + nodePreGyp: "node-v" + process.versions.modules + "-" + process.platform + "-" + process.arch, + version: process.versions.node, + bindings: "bindings.node", + try: [ + // node-gyp's linked version in the "build" dir + ["module_root", "build", "bindings"], + // node-waf and gyp_addon (a.k.a node-gyp) + ["module_root", "build", "Debug", "bindings"], + ["module_root", "build", "Release", "bindings"], + // Debug files, for development (legacy behavior, remove for node v0.9) + ["module_root", "out", "Debug", "bindings"], + ["module_root", "Debug", "bindings"], + // Release files, but manually compiled (legacy behavior, remove for node v0.9) + ["module_root", "out", "Release", "bindings"], + ["module_root", "Release", "bindings"], + // Legacy from node-waf, node <= 0.4.x + ["module_root", "build", "default", "bindings"], + // Production "Release" buildtype binary (meh...) + ["module_root", "compiled", "version", "platform", "arch", "bindings"], + // node-qbs builds + ["module_root", "addon-build", "release", "install-root", "bindings"], + ["module_root", "addon-build", "debug", "install-root", "bindings"], + ["module_root", "addon-build", "default", "install-root", "bindings"], + // node-pre-gyp path ./lib/binding/{node_abi}-{platform}-{arch} + ["module_root", "lib", "binding", "nodePreGyp", "bindings"] + ] + }; + function bindings(opts) { + if (typeof opts == "string") { + opts = { bindings: opts }; + } else if (!opts) { + opts = {}; + } + Object.keys(defaults).map(function(i2) { + if (!(i2 in opts)) opts[i2] = defaults[i2]; + }); + if (!opts.module_root) { + opts.module_root = exports.getRoot(exports.getFileName()); + } + if (path.extname(opts.bindings) != ".node") { + opts.bindings += ".node"; + } + var requireFunc = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require; + var tries = [], i = 0, l = opts.try.length, n, b, err; + for (; i < l; i++) { + n = join.apply( + null, + opts.try[i].map(function(p) { + return opts[p] || p; + }) + ); + tries.push(n); + try { + b = opts.path ? requireFunc.resolve(n) : requireFunc(n); + if (!opts.path) { + b.path = n; + } + return b; + } catch (e) { + if (e.code !== "MODULE_NOT_FOUND" && e.code !== "QUALIFIED_PATH_RESOLUTION_FAILED" && !/not find/i.test(e.message)) { + throw e; + } + } + } + err = new Error( + "Could not locate the bindings file. Tried:\n" + tries.map(function(a) { + return opts.arrow + a; + }).join("\n") + ); + err.tries = tries; + throw err; + } + module.exports = exports = bindings; + exports.getFileName = function getFileName(calling_file) { + var origPST = Error.prepareStackTrace, origSTL = Error.stackTraceLimit, dummy = {}, fileName; + Error.stackTraceLimit = 10; + Error.prepareStackTrace = function(e, st) { + for (var i = 0, l = st.length; i < l; i++) { + fileName = st[i].getFileName(); + if (fileName !== __filename) { + if (calling_file) { + if (fileName !== calling_file) { + return; + } + } else { + return; + } + } + } + }; + Error.captureStackTrace(dummy); + dummy.stack; + Error.prepareStackTrace = origPST; + Error.stackTraceLimit = origSTL; + var fileSchema = "file://"; + if (fileName.indexOf(fileSchema) === 0) { + fileName = fileURLToPath(fileName); + } + return fileName; + }; + exports.getRoot = function getRoot(file) { + var dir = dirname(file), prev; + while (true) { + if (dir === ".") { + dir = process.cwd(); + } + if (exists(join(dir, "package.json")) || exists(join(dir, "node_modules"))) { + return dir; + } + if (prev === dir) { + throw new Error( + 'Could not find module root given file: "' + file + '". Do you have a `package.json` file? ' + ); + } + prev = dir; + dir = join(dir, ".."); + } + }; + } +}); + +// node_modules/better-sqlite3/lib/methods/wrappers.js +var require_wrappers = __commonJS({ + "node_modules/better-sqlite3/lib/methods/wrappers.js"(exports) { + "use strict"; + var { cppdb } = require_util(); + exports.prepare = function prepare(sql) { + return this[cppdb].prepare(sql, this, false); + }; + exports.exec = function exec(sql) { + this[cppdb].exec(sql); + return this; + }; + exports.close = function close() { + this[cppdb].close(); + return this; + }; + exports.loadExtension = function loadExtension(...args) { + this[cppdb].loadExtension(...args); + return this; + }; + exports.defaultSafeIntegers = function defaultSafeIntegers(...args) { + this[cppdb].defaultSafeIntegers(...args); + return this; + }; + exports.unsafeMode = function unsafeMode(...args) { + this[cppdb].unsafeMode(...args); + return this; + }; + exports.getters = { + name: { + get: function name() { + return this[cppdb].name; + }, + enumerable: true + }, + open: { + get: function open() { + return this[cppdb].open; + }, + enumerable: true + }, + inTransaction: { + get: function inTransaction() { + return this[cppdb].inTransaction; + }, + enumerable: true + }, + readonly: { + get: function readonly() { + return this[cppdb].readonly; + }, + enumerable: true + }, + memory: { + get: function memory() { + return this[cppdb].memory; + }, + enumerable: true + } + }; + } +}); + +// node_modules/better-sqlite3/lib/methods/transaction.js +var require_transaction = __commonJS({ + "node_modules/better-sqlite3/lib/methods/transaction.js"(exports, module) { + "use strict"; + var { cppdb } = require_util(); + var controllers = /* @__PURE__ */ new WeakMap(); + module.exports = function transaction(fn) { + if (typeof fn !== "function") throw new TypeError("Expected first argument to be a function"); + const db = this[cppdb]; + const controller = getController(db, this); + const { apply } = Function.prototype; + const properties = { + default: { value: wrapTransaction(apply, fn, db, controller.default) }, + deferred: { value: wrapTransaction(apply, fn, db, controller.deferred) }, + immediate: { value: wrapTransaction(apply, fn, db, controller.immediate) }, + exclusive: { value: wrapTransaction(apply, fn, db, controller.exclusive) }, + database: { value: this, enumerable: true } + }; + Object.defineProperties(properties.default.value, properties); + Object.defineProperties(properties.deferred.value, properties); + Object.defineProperties(properties.immediate.value, properties); + Object.defineProperties(properties.exclusive.value, properties); + return properties.default.value; + }; + var getController = (db, self) => { + let controller = controllers.get(db); + if (!controller) { + const shared = { + commit: db.prepare("COMMIT", self, false), + rollback: db.prepare("ROLLBACK", self, false), + savepoint: db.prepare("SAVEPOINT ` _bs3. `", self, false), + release: db.prepare("RELEASE ` _bs3. `", self, false), + rollbackTo: db.prepare("ROLLBACK TO ` _bs3. `", self, false) + }; + controllers.set(db, controller = { + default: Object.assign({ begin: db.prepare("BEGIN", self, false) }, shared), + deferred: Object.assign({ begin: db.prepare("BEGIN DEFERRED", self, false) }, shared), + immediate: Object.assign({ begin: db.prepare("BEGIN IMMEDIATE", self, false) }, shared), + exclusive: Object.assign({ begin: db.prepare("BEGIN EXCLUSIVE", self, false) }, shared) + }); + } + return controller; + }; + var wrapTransaction = (apply, fn, db, { begin, commit, rollback, savepoint, release, rollbackTo }) => function sqliteTransaction() { + let before, after, undo; + if (db.inTransaction) { + before = savepoint; + after = release; + undo = rollbackTo; + } else { + before = begin; + after = commit; + undo = rollback; + } + before.run(); + try { + const result = apply.call(fn, this, arguments); + if (result && typeof result.then === "function") { + throw new TypeError("Transaction function cannot return a promise"); + } + after.run(); + return result; + } catch (ex) { + if (db.inTransaction) { + undo.run(); + if (undo !== rollback) after.run(); + } + throw ex; + } + }; + } +}); + +// node_modules/better-sqlite3/lib/methods/pragma.js +var require_pragma = __commonJS({ + "node_modules/better-sqlite3/lib/methods/pragma.js"(exports, module) { + "use strict"; + var { getBooleanOption, cppdb } = require_util(); + module.exports = function pragma(source, options) { + if (options == null) options = {}; + if (typeof source !== "string") throw new TypeError("Expected first argument to be a string"); + if (typeof options !== "object") throw new TypeError("Expected second argument to be an options object"); + const simple = getBooleanOption(options, "simple"); + const stmt = this[cppdb].prepare(`PRAGMA ${source}`, this, true); + return simple ? stmt.pluck().get() : stmt.all(); + }; + } +}); + +// browser-external:util +var require_util2 = __commonJS({ + "browser-external:util"(exports, module) { + module.exports = Object.create(new Proxy({}, { + get(_, key) { + if (key !== "__esModule" && key !== "__proto__" && key !== "constructor" && key !== "splice") { + console.warn(`Module "util" has been externalized for browser compatibility. Cannot access "util.${key}" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`); + } + } + })); + } +}); + +// node_modules/better-sqlite3/lib/methods/backup.js +var require_backup = __commonJS({ + "node_modules/better-sqlite3/lib/methods/backup.js"(exports, module) { + "use strict"; + var fs = require_fs(); + var path = require_path(); + var { promisify } = require_util2(); + var { cppdb } = require_util(); + var fsAccess = promisify(fs.access); + module.exports = async function backup(filename, options) { + if (options == null) options = {}; + if (typeof filename !== "string") throw new TypeError("Expected first argument to be a string"); + if (typeof options !== "object") throw new TypeError("Expected second argument to be an options object"); + filename = filename.trim(); + const attachedName = "attached" in options ? options.attached : "main"; + const handler = "progress" in options ? options.progress : null; + if (!filename) throw new TypeError("Backup filename cannot be an empty string"); + if (filename === ":memory:") throw new TypeError('Invalid backup filename ":memory:"'); + if (typeof attachedName !== "string") throw new TypeError('Expected the "attached" option to be a string'); + if (!attachedName) throw new TypeError('The "attached" option cannot be an empty string'); + if (handler != null && typeof handler !== "function") throw new TypeError('Expected the "progress" option to be a function'); + await fsAccess(path.dirname(filename)).catch(() => { + throw new TypeError("Cannot save backup because the directory does not exist"); + }); + const isNewFile = await fsAccess(filename).then(() => false, () => true); + return runBackup(this[cppdb].backup(this, attachedName, filename, isNewFile), handler || null); + }; + var runBackup = (backup, handler) => { + let rate = 0; + let useDefault = true; + return new Promise((resolve, reject) => { + setImmediate(function step() { + try { + const progress = backup.transfer(rate); + if (!progress.remainingPages) { + backup.close(); + resolve(progress); + return; + } + if (useDefault) { + useDefault = false; + rate = 100; + } + if (handler) { + const ret = handler(progress); + if (ret !== void 0) { + if (typeof ret === "number" && ret === ret) rate = Math.max(0, Math.min(2147483647, Math.round(ret))); + else throw new TypeError("Expected progress callback to return a number or undefined"); + } + } + setImmediate(step); + } catch (err) { + backup.close(); + reject(err); + } + }); + }); + }; + } +}); + +// node_modules/better-sqlite3/lib/methods/serialize.js +var require_serialize = __commonJS({ + "node_modules/better-sqlite3/lib/methods/serialize.js"(exports, module) { + "use strict"; + var { cppdb } = require_util(); + module.exports = function serialize(options) { + if (options == null) options = {}; + if (typeof options !== "object") throw new TypeError("Expected first argument to be an options object"); + const attachedName = "attached" in options ? options.attached : "main"; + if (typeof attachedName !== "string") throw new TypeError('Expected the "attached" option to be a string'); + if (!attachedName) throw new TypeError('The "attached" option cannot be an empty string'); + return this[cppdb].serialize(attachedName); + }; + } +}); + +// node_modules/better-sqlite3/lib/methods/function.js +var require_function = __commonJS({ + "node_modules/better-sqlite3/lib/methods/function.js"(exports, module) { + "use strict"; + var { getBooleanOption, cppdb } = require_util(); + module.exports = function defineFunction(name, options, fn) { + if (options == null) options = {}; + if (typeof options === "function") { + fn = options; + options = {}; + } + if (typeof name !== "string") throw new TypeError("Expected first argument to be a string"); + if (typeof fn !== "function") throw new TypeError("Expected last argument to be a function"); + if (typeof options !== "object") throw new TypeError("Expected second argument to be an options object"); + if (!name) throw new TypeError("User-defined function name cannot be an empty string"); + const safeIntegers = "safeIntegers" in options ? +getBooleanOption(options, "safeIntegers") : 2; + const deterministic = getBooleanOption(options, "deterministic"); + const directOnly = getBooleanOption(options, "directOnly"); + const varargs = getBooleanOption(options, "varargs"); + let argCount = -1; + if (!varargs) { + argCount = fn.length; + if (!Number.isInteger(argCount) || argCount < 0) throw new TypeError("Expected function.length to be a positive integer"); + if (argCount > 100) throw new RangeError("User-defined functions cannot have more than 100 arguments"); + } + this[cppdb].function(fn, name, argCount, safeIntegers, deterministic, directOnly); + return this; + }; + } +}); + +// node_modules/better-sqlite3/lib/methods/aggregate.js +var require_aggregate = __commonJS({ + "node_modules/better-sqlite3/lib/methods/aggregate.js"(exports, module) { + "use strict"; + var { getBooleanOption, cppdb } = require_util(); + module.exports = function defineAggregate(name, options) { + if (typeof name !== "string") throw new TypeError("Expected first argument to be a string"); + if (typeof options !== "object" || options === null) throw new TypeError("Expected second argument to be an options object"); + if (!name) throw new TypeError("User-defined function name cannot be an empty string"); + const start = "start" in options ? options.start : null; + const step = getFunctionOption(options, "step", true); + const inverse = getFunctionOption(options, "inverse", false); + const result = getFunctionOption(options, "result", false); + const safeIntegers = "safeIntegers" in options ? +getBooleanOption(options, "safeIntegers") : 2; + const deterministic = getBooleanOption(options, "deterministic"); + const directOnly = getBooleanOption(options, "directOnly"); + const varargs = getBooleanOption(options, "varargs"); + let argCount = -1; + if (!varargs) { + argCount = Math.max(getLength(step), inverse ? getLength(inverse) : 0); + if (argCount > 0) argCount -= 1; + if (argCount > 100) throw new RangeError("User-defined functions cannot have more than 100 arguments"); + } + this[cppdb].aggregate(start, step, inverse, result, name, argCount, safeIntegers, deterministic, directOnly); + return this; + }; + var getFunctionOption = (options, key, required) => { + const value = key in options ? options[key] : null; + if (typeof value === "function") return value; + if (value != null) throw new TypeError(`Expected the "${key}" option to be a function`); + if (required) throw new TypeError(`Missing required option "${key}"`); + return null; + }; + var getLength = ({ length }) => { + if (Number.isInteger(length) && length >= 0) return length; + throw new TypeError("Expected function.length to be a positive integer"); + }; + } +}); + +// node_modules/better-sqlite3/lib/methods/table.js +var require_table = __commonJS({ + "node_modules/better-sqlite3/lib/methods/table.js"(exports, module) { + "use strict"; + var { cppdb } = require_util(); + module.exports = function defineTable(name, factory) { + if (typeof name !== "string") throw new TypeError("Expected first argument to be a string"); + if (!name) throw new TypeError("Virtual table module name cannot be an empty string"); + let eponymous = false; + if (typeof factory === "object" && factory !== null) { + eponymous = true; + factory = defer(parseTableDefinition(factory, "used", name)); + } else { + if (typeof factory !== "function") throw new TypeError("Expected second argument to be a function or a table definition object"); + factory = wrapFactory(factory); + } + this[cppdb].table(factory, name, eponymous); + return this; + }; + function wrapFactory(factory) { + return function virtualTableFactory(moduleName, databaseName, tableName, ...args) { + const thisObject = { + module: moduleName, + database: databaseName, + table: tableName + }; + const def = apply.call(factory, thisObject, args); + if (typeof def !== "object" || def === null) { + throw new TypeError(`Virtual table module "${moduleName}" did not return a table definition object`); + } + return parseTableDefinition(def, "returned", moduleName); + }; + } + function parseTableDefinition(def, verb, moduleName) { + if (!hasOwnProperty.call(def, "rows")) { + throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition without a "rows" property`); + } + if (!hasOwnProperty.call(def, "columns")) { + throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition without a "columns" property`); + } + const rows = def.rows; + if (typeof rows !== "function" || Object.getPrototypeOf(rows) !== GeneratorFunctionPrototype) { + throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "rows" property (should be a generator function)`); + } + let columns = def.columns; + if (!Array.isArray(columns) || !(columns = [...columns]).every((x) => typeof x === "string")) { + throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "columns" property (should be an array of strings)`); + } + if (columns.length !== new Set(columns).size) { + throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with duplicate column names`); + } + if (!columns.length) { + throw new RangeError(`Virtual table module "${moduleName}" ${verb} a table definition with zero columns`); + } + let parameters; + if (hasOwnProperty.call(def, "parameters")) { + parameters = def.parameters; + if (!Array.isArray(parameters) || !(parameters = [...parameters]).every((x) => typeof x === "string")) { + throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "parameters" property (should be an array of strings)`); + } + } else { + parameters = inferParameters(rows); + } + if (parameters.length !== new Set(parameters).size) { + throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with duplicate parameter names`); + } + if (parameters.length > 32) { + throw new RangeError(`Virtual table module "${moduleName}" ${verb} a table definition with more than the maximum number of 32 parameters`); + } + for (const parameter of parameters) { + if (columns.includes(parameter)) { + throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with column "${parameter}" which was ambiguously defined as both a column and parameter`); + } + } + let safeIntegers = 2; + if (hasOwnProperty.call(def, "safeIntegers")) { + const bool = def.safeIntegers; + if (typeof bool !== "boolean") { + throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "safeIntegers" property (should be a boolean)`); + } + safeIntegers = +bool; + } + let directOnly = false; + if (hasOwnProperty.call(def, "directOnly")) { + directOnly = def.directOnly; + if (typeof directOnly !== "boolean") { + throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "directOnly" property (should be a boolean)`); + } + } + const columnDefinitions = [ + ...parameters.map(identifier).map((str) => `${str} HIDDEN`), + ...columns.map(identifier) + ]; + return [ + `CREATE TABLE x(${columnDefinitions.join(", ")});`, + wrapGenerator(rows, new Map(columns.map((x, i) => [x, parameters.length + i])), moduleName), + parameters, + safeIntegers, + directOnly + ]; + } + function wrapGenerator(generator, columnMap, moduleName) { + return function* virtualTable(...args) { + const output = args.map((x) => Buffer.isBuffer(x) ? Buffer.from(x) : x); + for (let i = 0; i < columnMap.size; ++i) { + output.push(null); + } + for (const row of generator(...args)) { + if (Array.isArray(row)) { + extractRowArray(row, output, columnMap.size, moduleName); + yield output; + } else if (typeof row === "object" && row !== null) { + extractRowObject(row, output, columnMap, moduleName); + yield output; + } else { + throw new TypeError(`Virtual table module "${moduleName}" yielded something that isn't a valid row object`); + } + } + }; + } + function extractRowArray(row, output, columnCount, moduleName) { + if (row.length !== columnCount) { + throw new TypeError(`Virtual table module "${moduleName}" yielded a row with an incorrect number of columns`); + } + const offset = output.length - columnCount; + for (let i = 0; i < columnCount; ++i) { + output[i + offset] = row[i]; + } + } + function extractRowObject(row, output, columnMap, moduleName) { + let count = 0; + for (const key of Object.keys(row)) { + const index = columnMap.get(key); + if (index === void 0) { + throw new TypeError(`Virtual table module "${moduleName}" yielded a row with an undeclared column "${key}"`); + } + output[index] = row[key]; + count += 1; + } + if (count !== columnMap.size) { + throw new TypeError(`Virtual table module "${moduleName}" yielded a row with missing columns`); + } + } + function inferParameters({ length }) { + if (!Number.isInteger(length) || length < 0) { + throw new TypeError("Expected function.length to be a positive integer"); + } + const params = []; + for (let i = 0; i < length; ++i) { + params.push(`$${i + 1}`); + } + return params; + } + var { hasOwnProperty } = Object.prototype; + var { apply } = Function.prototype; + var GeneratorFunctionPrototype = Object.getPrototypeOf(function* () { + }); + var identifier = (str) => `"${str.replace(/"/g, '""')}"`; + var defer = (x) => () => x; + } +}); + +// node_modules/better-sqlite3/lib/methods/inspect.js +var require_inspect = __commonJS({ + "node_modules/better-sqlite3/lib/methods/inspect.js"(exports, module) { + "use strict"; + var DatabaseInspection = function Database() { + }; + module.exports = function inspect(depth, opts) { + return Object.assign(new DatabaseInspection(), this); + }; + } +}); + +// node_modules/better-sqlite3/lib/database.js +var require_database = __commonJS({ + "node_modules/better-sqlite3/lib/database.js"(exports, module) { + "use strict"; + var fs = require_fs(); + var path = require_path(); + var util = require_util(); + var SqliteError = require_sqlite_error(); + var DEFAULT_ADDON; + function Database(filenameGiven, options) { + if (new.target == null) { + return new Database(filenameGiven, options); + } + let buffer; + if (Buffer.isBuffer(filenameGiven)) { + buffer = filenameGiven; + filenameGiven = ":memory:"; + } + if (filenameGiven == null) filenameGiven = ""; + if (options == null) options = {}; + if (typeof filenameGiven !== "string") throw new TypeError("Expected first argument to be a string"); + if (typeof options !== "object") throw new TypeError("Expected second argument to be an options object"); + if ("readOnly" in options) throw new TypeError('Misspelled option "readOnly" should be "readonly"'); + if ("memory" in options) throw new TypeError('Option "memory" was removed in v7.0.0 (use ":memory:" filename instead)'); + const filename = filenameGiven.trim(); + const anonymous = filename === "" || filename === ":memory:"; + const readonly = util.getBooleanOption(options, "readonly"); + const fileMustExist = util.getBooleanOption(options, "fileMustExist"); + const timeout = "timeout" in options ? options.timeout : 5e3; + const verbose = "verbose" in options ? options.verbose : null; + const nativeBinding = "nativeBinding" in options ? options.nativeBinding : null; + if (readonly && anonymous && !buffer) throw new TypeError("In-memory/temporary databases cannot be readonly"); + if (!Number.isInteger(timeout) || timeout < 0) throw new TypeError('Expected the "timeout" option to be a positive integer'); + if (timeout > 2147483647) throw new RangeError('Option "timeout" cannot be greater than 2147483647'); + if (verbose != null && typeof verbose !== "function") throw new TypeError('Expected the "verbose" option to be a function'); + if (nativeBinding != null && typeof nativeBinding !== "string" && typeof nativeBinding !== "object") throw new TypeError('Expected the "nativeBinding" option to be a string or addon object'); + let addon; + if (nativeBinding == null) { + addon = DEFAULT_ADDON || (DEFAULT_ADDON = require_bindings()("better_sqlite3.node")); + } else if (typeof nativeBinding === "string") { + const requireFunc = typeof __non_webpack_require__ === "function" ? __non_webpack_require__ : __require; + addon = requireFunc(path.resolve(nativeBinding).replace(/(\.node)?$/, ".node")); + } else { + addon = nativeBinding; + } + if (!addon.isInitialized) { + addon.setErrorConstructor(SqliteError); + addon.isInitialized = true; + } + if (!anonymous && !fs.existsSync(path.dirname(filename))) { + throw new TypeError("Cannot open database because the directory does not exist"); + } + Object.defineProperties(this, { + [util.cppdb]: { value: new addon.Database(filename, filenameGiven, anonymous, readonly, fileMustExist, timeout, verbose || null, buffer || null) }, + ...wrappers.getters + }); + } + var wrappers = require_wrappers(); + Database.prototype.prepare = wrappers.prepare; + Database.prototype.transaction = require_transaction(); + Database.prototype.pragma = require_pragma(); + Database.prototype.backup = require_backup(); + Database.prototype.serialize = require_serialize(); + Database.prototype.function = require_function(); + Database.prototype.aggregate = require_aggregate(); + Database.prototype.table = require_table(); + Database.prototype.loadExtension = wrappers.loadExtension; + Database.prototype.exec = wrappers.exec; + Database.prototype.close = wrappers.close; + Database.prototype.defaultSafeIntegers = wrappers.defaultSafeIntegers; + Database.prototype.unsafeMode = wrappers.unsafeMode; + Database.prototype[util.inspect] = require_inspect(); + module.exports = Database; + } +}); + +// node_modules/better-sqlite3/lib/index.js +var require_lib = __commonJS({ + "node_modules/better-sqlite3/lib/index.js"(exports, module) { + module.exports = require_database(); + module.exports.SqliteError = require_sqlite_error(); + } +}); +export default require_lib(); +//# sourceMappingURL=better-sqlite3.js.map diff --git a/.vite/deps/better-sqlite3.js.map b/.vite/deps/better-sqlite3.js.map new file mode 100644 index 0000000..1a55a11 --- /dev/null +++ b/.vite/deps/better-sqlite3.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["browser-external:fs", "browser-external:path", "../../node_modules/better-sqlite3/lib/util.js", "../../node_modules/better-sqlite3/lib/sqlite-error.js", "../../node_modules/file-uri-to-path/index.js", "../../node_modules/bindings/bindings.js", "../../node_modules/better-sqlite3/lib/methods/wrappers.js", "../../node_modules/better-sqlite3/lib/methods/transaction.js", "../../node_modules/better-sqlite3/lib/methods/pragma.js", "browser-external:util", "../../node_modules/better-sqlite3/lib/methods/backup.js", "../../node_modules/better-sqlite3/lib/methods/serialize.js", "../../node_modules/better-sqlite3/lib/methods/function.js", "../../node_modules/better-sqlite3/lib/methods/aggregate.js", "../../node_modules/better-sqlite3/lib/methods/table.js", "../../node_modules/better-sqlite3/lib/methods/inspect.js", "../../node_modules/better-sqlite3/lib/database.js", "../../node_modules/better-sqlite3/lib/index.js"], + "sourcesContent": ["module.exports = Object.create(new Proxy({}, {\n get(_, key) {\n if (\n key !== '__esModule' &&\n key !== '__proto__' &&\n key !== 'constructor' &&\n key !== 'splice'\n ) {\n console.warn(`Module \"fs\" has been externalized for browser compatibility. Cannot access \"fs.${key}\" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`)\n }\n }\n}))", "module.exports = Object.create(new Proxy({}, {\n get(_, key) {\n if (\n key !== '__esModule' &&\n key !== '__proto__' &&\n key !== 'constructor' &&\n key !== 'splice'\n ) {\n console.warn(`Module \"path\" has been externalized for browser compatibility. Cannot access \"path.${key}\" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`)\n }\n }\n}))", "'use strict';\n\nexports.getBooleanOption = (options, key) => {\n\tlet value = false;\n\tif (key in options && typeof (value = options[key]) !== 'boolean') {\n\t\tthrow new TypeError(`Expected the \"${key}\" option to be a boolean`);\n\t}\n\treturn value;\n};\n\nexports.cppdb = Symbol();\nexports.inspect = Symbol.for('nodejs.util.inspect.custom');\n", "'use strict';\nconst descriptor = { value: 'SqliteError', writable: true, enumerable: false, configurable: true };\n\nfunction SqliteError(message, code) {\n\tif (new.target !== SqliteError) {\n\t\treturn new SqliteError(message, code);\n\t}\n\tif (typeof code !== 'string') {\n\t\tthrow new TypeError('Expected second argument to be a string');\n\t}\n\tError.call(this, message);\n\tdescriptor.value = '' + message;\n\tObject.defineProperty(this, 'message', descriptor);\n\tError.captureStackTrace(this, SqliteError);\n\tthis.code = code;\n}\nObject.setPrototypeOf(SqliteError, Error);\nObject.setPrototypeOf(SqliteError.prototype, Error.prototype);\nObject.defineProperty(SqliteError.prototype, 'name', descriptor);\nmodule.exports = SqliteError;\n", "\n/**\n * Module dependencies.\n */\n\nvar sep = require('path').sep || '/';\n\n/**\n * Module exports.\n */\n\nmodule.exports = fileUriToPath;\n\n/**\n * File URI to Path function.\n *\n * @param {String} uri\n * @return {String} path\n * @api public\n */\n\nfunction fileUriToPath (uri) {\n if ('string' != typeof uri ||\n uri.length <= 7 ||\n 'file://' != uri.substring(0, 7)) {\n throw new TypeError('must pass in a file:// URI to convert to a file path');\n }\n\n var rest = decodeURI(uri.substring(7));\n var firstSlash = rest.indexOf('/');\n var host = rest.substring(0, firstSlash);\n var path = rest.substring(firstSlash + 1);\n\n // 2. Scheme Definition\n // As a special case, can be the string \"localhost\" or the empty\n // string; this is interpreted as \"the machine from which the URL is\n // being interpreted\".\n if ('localhost' == host) host = '';\n\n if (host) {\n host = sep + sep + host;\n }\n\n // 3.2 Drives, drive letters, mount points, file system root\n // Drive letters are mapped into the top of a file URI in various ways,\n // depending on the implementation; some applications substitute\n // vertical bar (\"|\") for the colon after the drive letter, yielding\n // \"file:///c|/tmp/test.txt\". In some cases, the colon is left\n // unchanged, as in \"file:///c:/tmp/test.txt\". In other cases, the\n // colon is simply omitted, as in \"file:///c/tmp/test.txt\".\n path = path.replace(/^(.+)\\|/, '$1:');\n\n // for Windows, we need to invert the path separators from what a URI uses\n if (sep == '\\\\') {\n path = path.replace(/\\//g, '\\\\');\n }\n\n if (/^.+\\:/.test(path)) {\n // has Windows drive at beginning of path\n } else {\n // unix path…\n path = sep + path;\n }\n\n return host + path;\n}\n", "/**\n * Module dependencies.\n */\n\nvar fs = require('fs'),\n path = require('path'),\n fileURLToPath = require('file-uri-to-path'),\n join = path.join,\n dirname = path.dirname,\n exists =\n (fs.accessSync &&\n function(path) {\n try {\n fs.accessSync(path);\n } catch (e) {\n return false;\n }\n return true;\n }) ||\n fs.existsSync ||\n path.existsSync,\n defaults = {\n arrow: process.env.NODE_BINDINGS_ARROW || ' → ',\n compiled: process.env.NODE_BINDINGS_COMPILED_DIR || 'compiled',\n platform: process.platform,\n arch: process.arch,\n nodePreGyp:\n 'node-v' +\n process.versions.modules +\n '-' +\n process.platform +\n '-' +\n process.arch,\n version: process.versions.node,\n bindings: 'bindings.node',\n try: [\n // node-gyp's linked version in the \"build\" dir\n ['module_root', 'build', 'bindings'],\n // node-waf and gyp_addon (a.k.a node-gyp)\n ['module_root', 'build', 'Debug', 'bindings'],\n ['module_root', 'build', 'Release', 'bindings'],\n // Debug files, for development (legacy behavior, remove for node v0.9)\n ['module_root', 'out', 'Debug', 'bindings'],\n ['module_root', 'Debug', 'bindings'],\n // Release files, but manually compiled (legacy behavior, remove for node v0.9)\n ['module_root', 'out', 'Release', 'bindings'],\n ['module_root', 'Release', 'bindings'],\n // Legacy from node-waf, node <= 0.4.x\n ['module_root', 'build', 'default', 'bindings'],\n // Production \"Release\" buildtype binary (meh...)\n ['module_root', 'compiled', 'version', 'platform', 'arch', 'bindings'],\n // node-qbs builds\n ['module_root', 'addon-build', 'release', 'install-root', 'bindings'],\n ['module_root', 'addon-build', 'debug', 'install-root', 'bindings'],\n ['module_root', 'addon-build', 'default', 'install-root', 'bindings'],\n // node-pre-gyp path ./lib/binding/{node_abi}-{platform}-{arch}\n ['module_root', 'lib', 'binding', 'nodePreGyp', 'bindings']\n ]\n };\n\n/**\n * The main `bindings()` function loads the compiled bindings for a given module.\n * It uses V8's Error API to determine the parent filename that this function is\n * being invoked from, which is then used to find the root directory.\n */\n\nfunction bindings(opts) {\n // Argument surgery\n if (typeof opts == 'string') {\n opts = { bindings: opts };\n } else if (!opts) {\n opts = {};\n }\n\n // maps `defaults` onto `opts` object\n Object.keys(defaults).map(function(i) {\n if (!(i in opts)) opts[i] = defaults[i];\n });\n\n // Get the module root\n if (!opts.module_root) {\n opts.module_root = exports.getRoot(exports.getFileName());\n }\n\n // Ensure the given bindings name ends with .node\n if (path.extname(opts.bindings) != '.node') {\n opts.bindings += '.node';\n }\n\n // https://github.com/webpack/webpack/issues/4175#issuecomment-342931035\n var requireFunc =\n typeof __webpack_require__ === 'function'\n ? __non_webpack_require__\n : require;\n\n var tries = [],\n i = 0,\n l = opts.try.length,\n n,\n b,\n err;\n\n for (; i < l; i++) {\n n = join.apply(\n null,\n opts.try[i].map(function(p) {\n return opts[p] || p;\n })\n );\n tries.push(n);\n try {\n b = opts.path ? requireFunc.resolve(n) : requireFunc(n);\n if (!opts.path) {\n b.path = n;\n }\n return b;\n } catch (e) {\n if (e.code !== 'MODULE_NOT_FOUND' &&\n e.code !== 'QUALIFIED_PATH_RESOLUTION_FAILED' &&\n !/not find/i.test(e.message)) {\n throw e;\n }\n }\n }\n\n err = new Error(\n 'Could not locate the bindings file. Tried:\\n' +\n tries\n .map(function(a) {\n return opts.arrow + a;\n })\n .join('\\n')\n );\n err.tries = tries;\n throw err;\n}\nmodule.exports = exports = bindings;\n\n/**\n * Gets the filename of the JavaScript file that invokes this function.\n * Used to help find the root directory of a module.\n * Optionally accepts an filename argument to skip when searching for the invoking filename\n */\n\nexports.getFileName = function getFileName(calling_file) {\n var origPST = Error.prepareStackTrace,\n origSTL = Error.stackTraceLimit,\n dummy = {},\n fileName;\n\n Error.stackTraceLimit = 10;\n\n Error.prepareStackTrace = function(e, st) {\n for (var i = 0, l = st.length; i < l; i++) {\n fileName = st[i].getFileName();\n if (fileName !== __filename) {\n if (calling_file) {\n if (fileName !== calling_file) {\n return;\n }\n } else {\n return;\n }\n }\n }\n };\n\n // run the 'prepareStackTrace' function above\n Error.captureStackTrace(dummy);\n dummy.stack;\n\n // cleanup\n Error.prepareStackTrace = origPST;\n Error.stackTraceLimit = origSTL;\n\n // handle filename that starts with \"file://\"\n var fileSchema = 'file://';\n if (fileName.indexOf(fileSchema) === 0) {\n fileName = fileURLToPath(fileName);\n }\n\n return fileName;\n};\n\n/**\n * Gets the root directory of a module, given an arbitrary filename\n * somewhere in the module tree. The \"root directory\" is the directory\n * containing the `package.json` file.\n *\n * In: /home/nate/node-native-module/lib/index.js\n * Out: /home/nate/node-native-module\n */\n\nexports.getRoot = function getRoot(file) {\n var dir = dirname(file),\n prev;\n while (true) {\n if (dir === '.') {\n // Avoids an infinite loop in rare cases, like the REPL\n dir = process.cwd();\n }\n if (\n exists(join(dir, 'package.json')) ||\n exists(join(dir, 'node_modules'))\n ) {\n // Found the 'package.json' file or 'node_modules' dir; we're done\n return dir;\n }\n if (prev === dir) {\n // Got to the top\n throw new Error(\n 'Could not find module root given file: \"' +\n file +\n '\". Do you have a `package.json` file? '\n );\n }\n // Try the parent dir next\n prev = dir;\n dir = join(dir, '..');\n }\n};\n", "'use strict';\nconst { cppdb } = require('../util');\n\nexports.prepare = function prepare(sql) {\n\treturn this[cppdb].prepare(sql, this, false);\n};\n\nexports.exec = function exec(sql) {\n\tthis[cppdb].exec(sql);\n\treturn this;\n};\n\nexports.close = function close() {\n\tthis[cppdb].close();\n\treturn this;\n};\n\nexports.loadExtension = function loadExtension(...args) {\n\tthis[cppdb].loadExtension(...args);\n\treturn this;\n};\n\nexports.defaultSafeIntegers = function defaultSafeIntegers(...args) {\n\tthis[cppdb].defaultSafeIntegers(...args);\n\treturn this;\n};\n\nexports.unsafeMode = function unsafeMode(...args) {\n\tthis[cppdb].unsafeMode(...args);\n\treturn this;\n};\n\nexports.getters = {\n\tname: {\n\t\tget: function name() { return this[cppdb].name; },\n\t\tenumerable: true,\n\t},\n\topen: {\n\t\tget: function open() { return this[cppdb].open; },\n\t\tenumerable: true,\n\t},\n\tinTransaction: {\n\t\tget: function inTransaction() { return this[cppdb].inTransaction; },\n\t\tenumerable: true,\n\t},\n\treadonly: {\n\t\tget: function readonly() { return this[cppdb].readonly; },\n\t\tenumerable: true,\n\t},\n\tmemory: {\n\t\tget: function memory() { return this[cppdb].memory; },\n\t\tenumerable: true,\n\t},\n};\n", "'use strict';\nconst { cppdb } = require('../util');\nconst controllers = new WeakMap();\n\nmodule.exports = function transaction(fn) {\n\tif (typeof fn !== 'function') throw new TypeError('Expected first argument to be a function');\n\n\tconst db = this[cppdb];\n\tconst controller = getController(db, this);\n\tconst { apply } = Function.prototype;\n\n\t// Each version of the transaction function has these same properties\n\tconst properties = {\n\t\tdefault: { value: wrapTransaction(apply, fn, db, controller.default) },\n\t\tdeferred: { value: wrapTransaction(apply, fn, db, controller.deferred) },\n\t\timmediate: { value: wrapTransaction(apply, fn, db, controller.immediate) },\n\t\texclusive: { value: wrapTransaction(apply, fn, db, controller.exclusive) },\n\t\tdatabase: { value: this, enumerable: true },\n\t};\n\n\tObject.defineProperties(properties.default.value, properties);\n\tObject.defineProperties(properties.deferred.value, properties);\n\tObject.defineProperties(properties.immediate.value, properties);\n\tObject.defineProperties(properties.exclusive.value, properties);\n\n\t// Return the default version of the transaction function\n\treturn properties.default.value;\n};\n\n// Return the database's cached transaction controller, or create a new one\nconst getController = (db, self) => {\n\tlet controller = controllers.get(db);\n\tif (!controller) {\n\t\tconst shared = {\n\t\t\tcommit: db.prepare('COMMIT', self, false),\n\t\t\trollback: db.prepare('ROLLBACK', self, false),\n\t\t\tsavepoint: db.prepare('SAVEPOINT `\\t_bs3.\\t`', self, false),\n\t\t\trelease: db.prepare('RELEASE `\\t_bs3.\\t`', self, false),\n\t\t\trollbackTo: db.prepare('ROLLBACK TO `\\t_bs3.\\t`', self, false),\n\t\t};\n\t\tcontrollers.set(db, controller = {\n\t\t\tdefault: Object.assign({ begin: db.prepare('BEGIN', self, false) }, shared),\n\t\t\tdeferred: Object.assign({ begin: db.prepare('BEGIN DEFERRED', self, false) }, shared),\n\t\t\timmediate: Object.assign({ begin: db.prepare('BEGIN IMMEDIATE', self, false) }, shared),\n\t\t\texclusive: Object.assign({ begin: db.prepare('BEGIN EXCLUSIVE', self, false) }, shared),\n\t\t});\n\t}\n\treturn controller;\n};\n\n// Return a new transaction function by wrapping the given function\nconst wrapTransaction = (apply, fn, db, { begin, commit, rollback, savepoint, release, rollbackTo }) => function sqliteTransaction() {\n\tlet before, after, undo;\n\tif (db.inTransaction) {\n\t\tbefore = savepoint;\n\t\tafter = release;\n\t\tundo = rollbackTo;\n\t} else {\n\t\tbefore = begin;\n\t\tafter = commit;\n\t\tundo = rollback;\n\t}\n\tbefore.run();\n\ttry {\n\t\tconst result = apply.call(fn, this, arguments);\n\t\tif (result && typeof result.then === 'function') {\n\t\t\tthrow new TypeError('Transaction function cannot return a promise');\n\t\t}\n\t\tafter.run();\n\t\treturn result;\n\t} catch (ex) {\n\t\tif (db.inTransaction) {\n\t\t\tundo.run();\n\t\t\tif (undo !== rollback) after.run();\n\t\t}\n\t\tthrow ex;\n\t}\n};\n", "'use strict';\nconst { getBooleanOption, cppdb } = require('../util');\n\nmodule.exports = function pragma(source, options) {\n\tif (options == null) options = {};\n\tif (typeof source !== 'string') throw new TypeError('Expected first argument to be a string');\n\tif (typeof options !== 'object') throw new TypeError('Expected second argument to be an options object');\n\tconst simple = getBooleanOption(options, 'simple');\n\n\tconst stmt = this[cppdb].prepare(`PRAGMA ${source}`, this, true);\n\treturn simple ? stmt.pluck().get() : stmt.all();\n};\n", "module.exports = Object.create(new Proxy({}, {\n get(_, key) {\n if (\n key !== '__esModule' &&\n key !== '__proto__' &&\n key !== 'constructor' &&\n key !== 'splice'\n ) {\n console.warn(`Module \"util\" has been externalized for browser compatibility. Cannot access \"util.${key}\" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`)\n }\n }\n}))", "'use strict';\nconst fs = require('fs');\nconst path = require('path');\nconst { promisify } = require('util');\nconst { cppdb } = require('../util');\nconst fsAccess = promisify(fs.access);\n\nmodule.exports = async function backup(filename, options) {\n\tif (options == null) options = {};\n\n\t// Validate arguments\n\tif (typeof filename !== 'string') throw new TypeError('Expected first argument to be a string');\n\tif (typeof options !== 'object') throw new TypeError('Expected second argument to be an options object');\n\n\t// Interpret options\n\tfilename = filename.trim();\n\tconst attachedName = 'attached' in options ? options.attached : 'main';\n\tconst handler = 'progress' in options ? options.progress : null;\n\n\t// Validate interpreted options\n\tif (!filename) throw new TypeError('Backup filename cannot be an empty string');\n\tif (filename === ':memory:') throw new TypeError('Invalid backup filename \":memory:\"');\n\tif (typeof attachedName !== 'string') throw new TypeError('Expected the \"attached\" option to be a string');\n\tif (!attachedName) throw new TypeError('The \"attached\" option cannot be an empty string');\n\tif (handler != null && typeof handler !== 'function') throw new TypeError('Expected the \"progress\" option to be a function');\n\n\t// Make sure the specified directory exists\n\tawait fsAccess(path.dirname(filename)).catch(() => {\n\t\tthrow new TypeError('Cannot save backup because the directory does not exist');\n\t});\n\n\tconst isNewFile = await fsAccess(filename).then(() => false, () => true);\n\treturn runBackup(this[cppdb].backup(this, attachedName, filename, isNewFile), handler || null);\n};\n\nconst runBackup = (backup, handler) => {\n\tlet rate = 0;\n\tlet useDefault = true;\n\n\treturn new Promise((resolve, reject) => {\n\t\tsetImmediate(function step() {\n\t\t\ttry {\n\t\t\t\tconst progress = backup.transfer(rate);\n\t\t\t\tif (!progress.remainingPages) {\n\t\t\t\t\tbackup.close();\n\t\t\t\t\tresolve(progress);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (useDefault) {\n\t\t\t\t\tuseDefault = false;\n\t\t\t\t\trate = 100;\n\t\t\t\t}\n\t\t\t\tif (handler) {\n\t\t\t\t\tconst ret = handler(progress);\n\t\t\t\t\tif (ret !== undefined) {\n\t\t\t\t\t\tif (typeof ret === 'number' && ret === ret) rate = Math.max(0, Math.min(0x7fffffff, Math.round(ret)));\n\t\t\t\t\t\telse throw new TypeError('Expected progress callback to return a number or undefined');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsetImmediate(step);\n\t\t\t} catch (err) {\n\t\t\t\tbackup.close();\n\t\t\t\treject(err);\n\t\t\t}\n\t\t});\n\t});\n};\n", "'use strict';\nconst { cppdb } = require('../util');\n\nmodule.exports = function serialize(options) {\n\tif (options == null) options = {};\n\n\t// Validate arguments\n\tif (typeof options !== 'object') throw new TypeError('Expected first argument to be an options object');\n\n\t// Interpret and validate options\n\tconst attachedName = 'attached' in options ? options.attached : 'main';\n\tif (typeof attachedName !== 'string') throw new TypeError('Expected the \"attached\" option to be a string');\n\tif (!attachedName) throw new TypeError('The \"attached\" option cannot be an empty string');\n\n\treturn this[cppdb].serialize(attachedName);\n};\n", "'use strict';\nconst { getBooleanOption, cppdb } = require('../util');\n\nmodule.exports = function defineFunction(name, options, fn) {\n\t// Apply defaults\n\tif (options == null) options = {};\n\tif (typeof options === 'function') { fn = options; options = {}; }\n\n\t// Validate arguments\n\tif (typeof name !== 'string') throw new TypeError('Expected first argument to be a string');\n\tif (typeof fn !== 'function') throw new TypeError('Expected last argument to be a function');\n\tif (typeof options !== 'object') throw new TypeError('Expected second argument to be an options object');\n\tif (!name) throw new TypeError('User-defined function name cannot be an empty string');\n\n\t// Interpret options\n\tconst safeIntegers = 'safeIntegers' in options ? +getBooleanOption(options, 'safeIntegers') : 2;\n\tconst deterministic = getBooleanOption(options, 'deterministic');\n\tconst directOnly = getBooleanOption(options, 'directOnly');\n\tconst varargs = getBooleanOption(options, 'varargs');\n\tlet argCount = -1;\n\n\t// Determine argument count\n\tif (!varargs) {\n\t\targCount = fn.length;\n\t\tif (!Number.isInteger(argCount) || argCount < 0) throw new TypeError('Expected function.length to be a positive integer');\n\t\tif (argCount > 100) throw new RangeError('User-defined functions cannot have more than 100 arguments');\n\t}\n\n\tthis[cppdb].function(fn, name, argCount, safeIntegers, deterministic, directOnly);\n\treturn this;\n};\n", "'use strict';\nconst { getBooleanOption, cppdb } = require('../util');\n\nmodule.exports = function defineAggregate(name, options) {\n\t// Validate arguments\n\tif (typeof name !== 'string') throw new TypeError('Expected first argument to be a string');\n\tif (typeof options !== 'object' || options === null) throw new TypeError('Expected second argument to be an options object');\n\tif (!name) throw new TypeError('User-defined function name cannot be an empty string');\n\n\t// Interpret options\n\tconst start = 'start' in options ? options.start : null;\n\tconst step = getFunctionOption(options, 'step', true);\n\tconst inverse = getFunctionOption(options, 'inverse', false);\n\tconst result = getFunctionOption(options, 'result', false);\n\tconst safeIntegers = 'safeIntegers' in options ? +getBooleanOption(options, 'safeIntegers') : 2;\n\tconst deterministic = getBooleanOption(options, 'deterministic');\n\tconst directOnly = getBooleanOption(options, 'directOnly');\n\tconst varargs = getBooleanOption(options, 'varargs');\n\tlet argCount = -1;\n\n\t// Determine argument count\n\tif (!varargs) {\n\t\targCount = Math.max(getLength(step), inverse ? getLength(inverse) : 0);\n\t\tif (argCount > 0) argCount -= 1;\n\t\tif (argCount > 100) throw new RangeError('User-defined functions cannot have more than 100 arguments');\n\t}\n\n\tthis[cppdb].aggregate(start, step, inverse, result, name, argCount, safeIntegers, deterministic, directOnly);\n\treturn this;\n};\n\nconst getFunctionOption = (options, key, required) => {\n\tconst value = key in options ? options[key] : null;\n\tif (typeof value === 'function') return value;\n\tif (value != null) throw new TypeError(`Expected the \"${key}\" option to be a function`);\n\tif (required) throw new TypeError(`Missing required option \"${key}\"`);\n\treturn null;\n};\n\nconst getLength = ({ length }) => {\n\tif (Number.isInteger(length) && length >= 0) return length;\n\tthrow new TypeError('Expected function.length to be a positive integer');\n};\n", "'use strict';\nconst { cppdb } = require('../util');\n\nmodule.exports = function defineTable(name, factory) {\n\t// Validate arguments\n\tif (typeof name !== 'string') throw new TypeError('Expected first argument to be a string');\n\tif (!name) throw new TypeError('Virtual table module name cannot be an empty string');\n\n\t// Determine whether the module is eponymous-only or not\n\tlet eponymous = false;\n\tif (typeof factory === 'object' && factory !== null) {\n\t\teponymous = true;\n\t\tfactory = defer(parseTableDefinition(factory, 'used', name));\n\t} else {\n\t\tif (typeof factory !== 'function') throw new TypeError('Expected second argument to be a function or a table definition object');\n\t\tfactory = wrapFactory(factory);\n\t}\n\n\tthis[cppdb].table(factory, name, eponymous);\n\treturn this;\n};\n\nfunction wrapFactory(factory) {\n\treturn function virtualTableFactory(moduleName, databaseName, tableName, ...args) {\n\t\tconst thisObject = {\n\t\t\tmodule: moduleName,\n\t\t\tdatabase: databaseName,\n\t\t\ttable: tableName,\n\t\t};\n\n\t\t// Generate a new table definition by invoking the factory\n\t\tconst def = apply.call(factory, thisObject, args);\n\t\tif (typeof def !== 'object' || def === null) {\n\t\t\tthrow new TypeError(`Virtual table module \"${moduleName}\" did not return a table definition object`);\n\t\t}\n\n\t\treturn parseTableDefinition(def, 'returned', moduleName);\n\t};\n}\n\nfunction parseTableDefinition(def, verb, moduleName) {\n\t// Validate required properties\n\tif (!hasOwnProperty.call(def, 'rows')) {\n\t\tthrow new TypeError(`Virtual table module \"${moduleName}\" ${verb} a table definition without a \"rows\" property`);\n\t}\n\tif (!hasOwnProperty.call(def, 'columns')) {\n\t\tthrow new TypeError(`Virtual table module \"${moduleName}\" ${verb} a table definition without a \"columns\" property`);\n\t}\n\n\t// Validate \"rows\" property\n\tconst rows = def.rows;\n\tif (typeof rows !== 'function' || Object.getPrototypeOf(rows) !== GeneratorFunctionPrototype) {\n\t\tthrow new TypeError(`Virtual table module \"${moduleName}\" ${verb} a table definition with an invalid \"rows\" property (should be a generator function)`);\n\t}\n\n\t// Validate \"columns\" property\n\tlet columns = def.columns;\n\tif (!Array.isArray(columns) || !(columns = [...columns]).every(x => typeof x === 'string')) {\n\t\tthrow new TypeError(`Virtual table module \"${moduleName}\" ${verb} a table definition with an invalid \"columns\" property (should be an array of strings)`);\n\t}\n\tif (columns.length !== new Set(columns).size) {\n\t\tthrow new TypeError(`Virtual table module \"${moduleName}\" ${verb} a table definition with duplicate column names`);\n\t}\n\tif (!columns.length) {\n\t\tthrow new RangeError(`Virtual table module \"${moduleName}\" ${verb} a table definition with zero columns`);\n\t}\n\n\t// Validate \"parameters\" property\n\tlet parameters;\n\tif (hasOwnProperty.call(def, 'parameters')) {\n\t\tparameters = def.parameters;\n\t\tif (!Array.isArray(parameters) || !(parameters = [...parameters]).every(x => typeof x === 'string')) {\n\t\t\tthrow new TypeError(`Virtual table module \"${moduleName}\" ${verb} a table definition with an invalid \"parameters\" property (should be an array of strings)`);\n\t\t}\n\t} else {\n\t\tparameters = inferParameters(rows);\n\t}\n\tif (parameters.length !== new Set(parameters).size) {\n\t\tthrow new TypeError(`Virtual table module \"${moduleName}\" ${verb} a table definition with duplicate parameter names`);\n\t}\n\tif (parameters.length > 32) {\n\t\tthrow new RangeError(`Virtual table module \"${moduleName}\" ${verb} a table definition with more than the maximum number of 32 parameters`);\n\t}\n\tfor (const parameter of parameters) {\n\t\tif (columns.includes(parameter)) {\n\t\t\tthrow new TypeError(`Virtual table module \"${moduleName}\" ${verb} a table definition with column \"${parameter}\" which was ambiguously defined as both a column and parameter`);\n\t\t}\n\t}\n\n\t// Validate \"safeIntegers\" option\n\tlet safeIntegers = 2;\n\tif (hasOwnProperty.call(def, 'safeIntegers')) {\n\t\tconst bool = def.safeIntegers;\n\t\tif (typeof bool !== 'boolean') {\n\t\t\tthrow new TypeError(`Virtual table module \"${moduleName}\" ${verb} a table definition with an invalid \"safeIntegers\" property (should be a boolean)`);\n\t\t}\n\t\tsafeIntegers = +bool;\n\t}\n\n\t// Validate \"directOnly\" option\n\tlet directOnly = false;\n\tif (hasOwnProperty.call(def, 'directOnly')) {\n\t\tdirectOnly = def.directOnly;\n\t\tif (typeof directOnly !== 'boolean') {\n\t\t\tthrow new TypeError(`Virtual table module \"${moduleName}\" ${verb} a table definition with an invalid \"directOnly\" property (should be a boolean)`);\n\t\t}\n\t}\n\n\t// Generate SQL for the virtual table definition\n\tconst columnDefinitions = [\n\t\t...parameters.map(identifier).map(str => `${str} HIDDEN`),\n\t\t...columns.map(identifier),\n\t];\n\treturn [\n\t\t`CREATE TABLE x(${columnDefinitions.join(', ')});`,\n\t\twrapGenerator(rows, new Map(columns.map((x, i) => [x, parameters.length + i])), moduleName),\n\t\tparameters,\n\t\tsafeIntegers,\n\t\tdirectOnly,\n\t];\n}\n\nfunction wrapGenerator(generator, columnMap, moduleName) {\n\treturn function* virtualTable(...args) {\n\t\t/*\n\t\t\tWe must defensively clone any buffers in the arguments, because\n\t\t\totherwise the generator could mutate one of them, which would cause\n\t\t\tus to return incorrect values for hidden columns, potentially\n\t\t\tcorrupting the database.\n\t\t */\n\t\tconst output = args.map(x => Buffer.isBuffer(x) ? Buffer.from(x) : x);\n\t\tfor (let i = 0; i < columnMap.size; ++i) {\n\t\t\toutput.push(null); // Fill with nulls to prevent gaps in array (v8 optimization)\n\t\t}\n\t\tfor (const row of generator(...args)) {\n\t\t\tif (Array.isArray(row)) {\n\t\t\t\textractRowArray(row, output, columnMap.size, moduleName);\n\t\t\t\tyield output;\n\t\t\t} else if (typeof row === 'object' && row !== null) {\n\t\t\t\textractRowObject(row, output, columnMap, moduleName);\n\t\t\t\tyield output;\n\t\t\t} else {\n\t\t\t\tthrow new TypeError(`Virtual table module \"${moduleName}\" yielded something that isn't a valid row object`);\n\t\t\t}\n\t\t}\n\t};\n}\n\nfunction extractRowArray(row, output, columnCount, moduleName) {\n\tif (row.length !== columnCount) {\n\t\tthrow new TypeError(`Virtual table module \"${moduleName}\" yielded a row with an incorrect number of columns`);\n\t}\n\tconst offset = output.length - columnCount;\n\tfor (let i = 0; i < columnCount; ++i) {\n\t\toutput[i + offset] = row[i];\n\t}\n}\n\nfunction extractRowObject(row, output, columnMap, moduleName) {\n\tlet count = 0;\n\tfor (const key of Object.keys(row)) {\n\t\tconst index = columnMap.get(key);\n\t\tif (index === undefined) {\n\t\t\tthrow new TypeError(`Virtual table module \"${moduleName}\" yielded a row with an undeclared column \"${key}\"`);\n\t\t}\n\t\toutput[index] = row[key];\n\t\tcount += 1;\n\t}\n\tif (count !== columnMap.size) {\n\t\tthrow new TypeError(`Virtual table module \"${moduleName}\" yielded a row with missing columns`);\n\t}\n}\n\nfunction inferParameters({ length }) {\n\tif (!Number.isInteger(length) || length < 0) {\n\t\tthrow new TypeError('Expected function.length to be a positive integer');\n\t}\n\tconst params = [];\n\tfor (let i = 0; i < length; ++i) {\n\t\tparams.push(`$${i + 1}`);\n\t}\n\treturn params;\n}\n\nconst { hasOwnProperty } = Object.prototype;\nconst { apply } = Function.prototype;\nconst GeneratorFunctionPrototype = Object.getPrototypeOf(function*(){});\nconst identifier = str => `\"${str.replace(/\"/g, '\"\"')}\"`;\nconst defer = x => () => x;\n", "'use strict';\nconst DatabaseInspection = function Database() {};\n\nmodule.exports = function inspect(depth, opts) {\n\treturn Object.assign(new DatabaseInspection(), this);\n};\n\n", "'use strict';\nconst fs = require('fs');\nconst path = require('path');\nconst util = require('./util');\nconst SqliteError = require('./sqlite-error');\n\nlet DEFAULT_ADDON;\n\nfunction Database(filenameGiven, options) {\n\tif (new.target == null) {\n\t\treturn new Database(filenameGiven, options);\n\t}\n\n\t// Apply defaults\n\tlet buffer;\n\tif (Buffer.isBuffer(filenameGiven)) {\n\t\tbuffer = filenameGiven;\n\t\tfilenameGiven = ':memory:';\n\t}\n\tif (filenameGiven == null) filenameGiven = '';\n\tif (options == null) options = {};\n\n\t// Validate arguments\n\tif (typeof filenameGiven !== 'string') throw new TypeError('Expected first argument to be a string');\n\tif (typeof options !== 'object') throw new TypeError('Expected second argument to be an options object');\n\tif ('readOnly' in options) throw new TypeError('Misspelled option \"readOnly\" should be \"readonly\"');\n\tif ('memory' in options) throw new TypeError('Option \"memory\" was removed in v7.0.0 (use \":memory:\" filename instead)');\n\n\t// Interpret options\n\tconst filename = filenameGiven.trim();\n\tconst anonymous = filename === '' || filename === ':memory:';\n\tconst readonly = util.getBooleanOption(options, 'readonly');\n\tconst fileMustExist = util.getBooleanOption(options, 'fileMustExist');\n\tconst timeout = 'timeout' in options ? options.timeout : 5000;\n\tconst verbose = 'verbose' in options ? options.verbose : null;\n\tconst nativeBinding = 'nativeBinding' in options ? options.nativeBinding : null;\n\n\t// Validate interpreted options\n\tif (readonly && anonymous && !buffer) throw new TypeError('In-memory/temporary databases cannot be readonly');\n\tif (!Number.isInteger(timeout) || timeout < 0) throw new TypeError('Expected the \"timeout\" option to be a positive integer');\n\tif (timeout > 0x7fffffff) throw new RangeError('Option \"timeout\" cannot be greater than 2147483647');\n\tif (verbose != null && typeof verbose !== 'function') throw new TypeError('Expected the \"verbose\" option to be a function');\n\tif (nativeBinding != null && typeof nativeBinding !== 'string' && typeof nativeBinding !== 'object') throw new TypeError('Expected the \"nativeBinding\" option to be a string or addon object');\n\n\t// Load the native addon\n\tlet addon;\n\tif (nativeBinding == null) {\n\t\taddon = DEFAULT_ADDON || (DEFAULT_ADDON = require('bindings')('better_sqlite3.node'));\n\t} else if (typeof nativeBinding === 'string') {\n\t\t// See \n\t\tconst requireFunc = typeof __non_webpack_require__ === 'function' ? __non_webpack_require__ : require;\n\t\taddon = requireFunc(path.resolve(nativeBinding).replace(/(\\.node)?$/, '.node'));\n\t} else {\n\t\t// See \n\t\taddon = nativeBinding;\n\t}\n\n\tif (!addon.isInitialized) {\n\t\taddon.setErrorConstructor(SqliteError);\n\t\taddon.isInitialized = true;\n\t}\n\n\t// Make sure the specified directory exists\n\tif (!anonymous && !fs.existsSync(path.dirname(filename))) {\n\t\tthrow new TypeError('Cannot open database because the directory does not exist');\n\t}\n\n\tObject.defineProperties(this, {\n\t\t[util.cppdb]: { value: new addon.Database(filename, filenameGiven, anonymous, readonly, fileMustExist, timeout, verbose || null, buffer || null) },\n\t\t...wrappers.getters,\n\t});\n}\n\nconst wrappers = require('./methods/wrappers');\nDatabase.prototype.prepare = wrappers.prepare;\nDatabase.prototype.transaction = require('./methods/transaction');\nDatabase.prototype.pragma = require('./methods/pragma');\nDatabase.prototype.backup = require('./methods/backup');\nDatabase.prototype.serialize = require('./methods/serialize');\nDatabase.prototype.function = require('./methods/function');\nDatabase.prototype.aggregate = require('./methods/aggregate');\nDatabase.prototype.table = require('./methods/table');\nDatabase.prototype.loadExtension = wrappers.loadExtension;\nDatabase.prototype.exec = wrappers.exec;\nDatabase.prototype.close = wrappers.close;\nDatabase.prototype.defaultSafeIntegers = wrappers.defaultSafeIntegers;\nDatabase.prototype.unsafeMode = wrappers.unsafeMode;\nDatabase.prototype[util.inspect] = require('./methods/inspect');\n\nmodule.exports = Database;\n", "'use strict';\nmodule.exports = require('./database');\nmodule.exports.SqliteError = require('./sqlite-error');\n"], + "mappings": ";;;;;;AAAA;AAAA;AAAA,WAAO,UAAU,OAAO,OAAO,IAAI,MAAM,CAAC,GAAG;AAAA,MAC3C,IAAI,GAAG,KAAK;AACV,YACE,QAAQ,gBACR,QAAQ,eACR,QAAQ,iBACR,QAAQ,UACR;AACA,kBAAQ,KAAK,kFAAkF,GAAG,mIAAmI;AAAA,QACvO;AAAA,MACF;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,0 +1,42 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { + get: (a, b) => (typeof require !== "undefined" ? require : a)[b] +}) : x)(function(x) { + if (typeof require !== "undefined") return require.apply(this, arguments); + throw Error('Dynamic require of "' + x + '" is not supported'); +}); +var __commonJS = (cb, mod) => function __require2() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); + +export { + __require, + __commonJS, + __export, + __toESM +}; diff --git a/.vite/deps/chunk-PR4QN5HX.js.map b/.vite/deps/chunk-PR4QN5HX.js.map new file mode 100644 index 0000000..9865211 --- /dev/null +++ b/.vite/deps/chunk-PR4QN5HX.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": [], + "sourcesContent": [], + "mappings": "", + "names": [] +} diff --git a/.vite/deps/chunk-QMYD5KZB.js b/.vite/deps/chunk-QMYD5KZB.js new file mode 100644 index 0000000..c2f8db4 --- /dev/null +++ b/.vite/deps/chunk-QMYD5KZB.js @@ -0,0 +1,21687 @@ +import { + require_react +} from "./chunk-QTVD6AVW.js"; +import { + __commonJS +} from "./chunk-PR4QN5HX.js"; + +// node_modules/scheduler/cjs/scheduler.development.js +var require_scheduler_development = __commonJS({ + "node_modules/scheduler/cjs/scheduler.development.js"(exports) { + "use strict"; + if (true) { + (function() { + "use strict"; + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") { + __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); + } + var enableSchedulerDebugging = false; + var enableProfiling = false; + var frameYieldMs = 5; + function push(heap, node) { + var index = heap.length; + heap.push(node); + siftUp(heap, node, index); + } + function peek(heap) { + return heap.length === 0 ? null : heap[0]; + } + function pop(heap) { + if (heap.length === 0) { + return null; + } + var first = heap[0]; + var last = heap.pop(); + if (last !== first) { + heap[0] = last; + siftDown(heap, last, 0); + } + return first; + } + function siftUp(heap, node, i) { + var index = i; + while (index > 0) { + var parentIndex = index - 1 >>> 1; + var parent = heap[parentIndex]; + if (compare(parent, node) > 0) { + heap[parentIndex] = node; + heap[index] = parent; + index = parentIndex; + } else { + return; + } + } + } + function siftDown(heap, node, i) { + var index = i; + var length = heap.length; + var halfLength = length >>> 1; + while (index < halfLength) { + var leftIndex = (index + 1) * 2 - 1; + var left = heap[leftIndex]; + var rightIndex = leftIndex + 1; + var right = heap[rightIndex]; + if (compare(left, node) < 0) { + if (rightIndex < length && compare(right, left) < 0) { + heap[index] = right; + heap[rightIndex] = node; + index = rightIndex; + } else { + heap[index] = left; + heap[leftIndex] = node; + index = leftIndex; + } + } else if (rightIndex < length && compare(right, node) < 0) { + heap[index] = right; + heap[rightIndex] = node; + index = rightIndex; + } else { + return; + } + } + } + function compare(a, b) { + var diff = a.sortIndex - b.sortIndex; + return diff !== 0 ? diff : a.id - b.id; + } + var ImmediatePriority = 1; + var UserBlockingPriority = 2; + var NormalPriority = 3; + var LowPriority = 4; + var IdlePriority = 5; + function markTaskErrored(task, ms) { + } + var hasPerformanceNow = typeof performance === "object" && typeof performance.now === "function"; + if (hasPerformanceNow) { + var localPerformance = performance; + exports.unstable_now = function() { + return localPerformance.now(); + }; + } else { + var localDate = Date; + var initialTime = localDate.now(); + exports.unstable_now = function() { + return localDate.now() - initialTime; + }; + } + var maxSigned31BitInt = 1073741823; + var IMMEDIATE_PRIORITY_TIMEOUT = -1; + var USER_BLOCKING_PRIORITY_TIMEOUT = 250; + var NORMAL_PRIORITY_TIMEOUT = 5e3; + var LOW_PRIORITY_TIMEOUT = 1e4; + var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; + var taskQueue = []; + var timerQueue = []; + var taskIdCounter = 1; + var currentTask = null; + var currentPriorityLevel = NormalPriority; + var isPerformingWork = false; + var isHostCallbackScheduled = false; + var isHostTimeoutScheduled = false; + var localSetTimeout = typeof setTimeout === "function" ? setTimeout : null; + var localClearTimeout = typeof clearTimeout === "function" ? clearTimeout : null; + var localSetImmediate = typeof setImmediate !== "undefined" ? setImmediate : null; + var isInputPending = typeof navigator !== "undefined" && navigator.scheduling !== void 0 && navigator.scheduling.isInputPending !== void 0 ? navigator.scheduling.isInputPending.bind(navigator.scheduling) : null; + function advanceTimers(currentTime) { + var timer = peek(timerQueue); + while (timer !== null) { + if (timer.callback === null) { + pop(timerQueue); + } else if (timer.startTime <= currentTime) { + pop(timerQueue); + timer.sortIndex = timer.expirationTime; + push(taskQueue, timer); + } else { + return; + } + timer = peek(timerQueue); + } + } + function handleTimeout(currentTime) { + isHostTimeoutScheduled = false; + advanceTimers(currentTime); + if (!isHostCallbackScheduled) { + if (peek(taskQueue) !== null) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } else { + var firstTimer = peek(timerQueue); + if (firstTimer !== null) { + requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); + } + } + } + } + function flushWork(hasTimeRemaining, initialTime2) { + isHostCallbackScheduled = false; + if (isHostTimeoutScheduled) { + isHostTimeoutScheduled = false; + cancelHostTimeout(); + } + isPerformingWork = true; + var previousPriorityLevel = currentPriorityLevel; + try { + if (enableProfiling) { + try { + return workLoop(hasTimeRemaining, initialTime2); + } catch (error) { + if (currentTask !== null) { + var currentTime = exports.unstable_now(); + markTaskErrored(currentTask, currentTime); + currentTask.isQueued = false; + } + throw error; + } + } else { + return workLoop(hasTimeRemaining, initialTime2); + } + } finally { + currentTask = null; + currentPriorityLevel = previousPriorityLevel; + isPerformingWork = false; + } + } + function workLoop(hasTimeRemaining, initialTime2) { + var currentTime = initialTime2; + advanceTimers(currentTime); + currentTask = peek(taskQueue); + while (currentTask !== null && !enableSchedulerDebugging) { + if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) { + break; + } + var callback = currentTask.callback; + if (typeof callback === "function") { + currentTask.callback = null; + currentPriorityLevel = currentTask.priorityLevel; + var didUserCallbackTimeout = currentTask.expirationTime <= currentTime; + var continuationCallback = callback(didUserCallbackTimeout); + currentTime = exports.unstable_now(); + if (typeof continuationCallback === "function") { + currentTask.callback = continuationCallback; + } else { + if (currentTask === peek(taskQueue)) { + pop(taskQueue); + } + } + advanceTimers(currentTime); + } else { + pop(taskQueue); + } + currentTask = peek(taskQueue); + } + if (currentTask !== null) { + return true; + } else { + var firstTimer = peek(timerQueue); + if (firstTimer !== null) { + requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); + } + return false; + } + } + function unstable_runWithPriority(priorityLevel, eventHandler) { + switch (priorityLevel) { + case ImmediatePriority: + case UserBlockingPriority: + case NormalPriority: + case LowPriority: + case IdlePriority: + break; + default: + priorityLevel = NormalPriority; + } + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = priorityLevel; + try { + return eventHandler(); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + } + function unstable_next(eventHandler) { + var priorityLevel; + switch (currentPriorityLevel) { + case ImmediatePriority: + case UserBlockingPriority: + case NormalPriority: + priorityLevel = NormalPriority; + break; + default: + priorityLevel = currentPriorityLevel; + break; + } + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = priorityLevel; + try { + return eventHandler(); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + } + function unstable_wrapCallback(callback) { + var parentPriorityLevel = currentPriorityLevel; + return function() { + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = parentPriorityLevel; + try { + return callback.apply(this, arguments); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + }; + } + function unstable_scheduleCallback(priorityLevel, callback, options) { + var currentTime = exports.unstable_now(); + var startTime2; + if (typeof options === "object" && options !== null) { + var delay = options.delay; + if (typeof delay === "number" && delay > 0) { + startTime2 = currentTime + delay; + } else { + startTime2 = currentTime; + } + } else { + startTime2 = currentTime; + } + var timeout; + switch (priorityLevel) { + case ImmediatePriority: + timeout = IMMEDIATE_PRIORITY_TIMEOUT; + break; + case UserBlockingPriority: + timeout = USER_BLOCKING_PRIORITY_TIMEOUT; + break; + case IdlePriority: + timeout = IDLE_PRIORITY_TIMEOUT; + break; + case LowPriority: + timeout = LOW_PRIORITY_TIMEOUT; + break; + case NormalPriority: + default: + timeout = NORMAL_PRIORITY_TIMEOUT; + break; + } + var expirationTime = startTime2 + timeout; + var newTask = { + id: taskIdCounter++, + callback, + priorityLevel, + startTime: startTime2, + expirationTime, + sortIndex: -1 + }; + if (startTime2 > currentTime) { + newTask.sortIndex = startTime2; + push(timerQueue, newTask); + if (peek(taskQueue) === null && newTask === peek(timerQueue)) { + if (isHostTimeoutScheduled) { + cancelHostTimeout(); + } else { + isHostTimeoutScheduled = true; + } + requestHostTimeout(handleTimeout, startTime2 - currentTime); + } + } else { + newTask.sortIndex = expirationTime; + push(taskQueue, newTask); + if (!isHostCallbackScheduled && !isPerformingWork) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } + } + return newTask; + } + function unstable_pauseExecution() { + } + function unstable_continueExecution() { + if (!isHostCallbackScheduled && !isPerformingWork) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } + } + function unstable_getFirstCallbackNode() { + return peek(taskQueue); + } + function unstable_cancelCallback(task) { + task.callback = null; + } + function unstable_getCurrentPriorityLevel() { + return currentPriorityLevel; + } + var isMessageLoopRunning = false; + var scheduledHostCallback = null; + var taskTimeoutID = -1; + var frameInterval = frameYieldMs; + var startTime = -1; + function shouldYieldToHost() { + var timeElapsed = exports.unstable_now() - startTime; + if (timeElapsed < frameInterval) { + return false; + } + return true; + } + function requestPaint() { + } + function forceFrameRate(fps) { + if (fps < 0 || fps > 125) { + console["error"]("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"); + return; + } + if (fps > 0) { + frameInterval = Math.floor(1e3 / fps); + } else { + frameInterval = frameYieldMs; + } + } + var performWorkUntilDeadline = function() { + if (scheduledHostCallback !== null) { + var currentTime = exports.unstable_now(); + startTime = currentTime; + var hasTimeRemaining = true; + var hasMoreWork = true; + try { + hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime); + } finally { + if (hasMoreWork) { + schedulePerformWorkUntilDeadline(); + } else { + isMessageLoopRunning = false; + scheduledHostCallback = null; + } + } + } else { + isMessageLoopRunning = false; + } + }; + var schedulePerformWorkUntilDeadline; + if (typeof localSetImmediate === "function") { + schedulePerformWorkUntilDeadline = function() { + localSetImmediate(performWorkUntilDeadline); + }; + } else if (typeof MessageChannel !== "undefined") { + var channel = new MessageChannel(); + var port = channel.port2; + channel.port1.onmessage = performWorkUntilDeadline; + schedulePerformWorkUntilDeadline = function() { + port.postMessage(null); + }; + } else { + schedulePerformWorkUntilDeadline = function() { + localSetTimeout(performWorkUntilDeadline, 0); + }; + } + function requestHostCallback(callback) { + scheduledHostCallback = callback; + if (!isMessageLoopRunning) { + isMessageLoopRunning = true; + schedulePerformWorkUntilDeadline(); + } + } + function requestHostTimeout(callback, ms) { + taskTimeoutID = localSetTimeout(function() { + callback(exports.unstable_now()); + }, ms); + } + function cancelHostTimeout() { + localClearTimeout(taskTimeoutID); + taskTimeoutID = -1; + } + var unstable_requestPaint = requestPaint; + var unstable_Profiling = null; + exports.unstable_IdlePriority = IdlePriority; + exports.unstable_ImmediatePriority = ImmediatePriority; + exports.unstable_LowPriority = LowPriority; + exports.unstable_NormalPriority = NormalPriority; + exports.unstable_Profiling = unstable_Profiling; + exports.unstable_UserBlockingPriority = UserBlockingPriority; + exports.unstable_cancelCallback = unstable_cancelCallback; + exports.unstable_continueExecution = unstable_continueExecution; + exports.unstable_forceFrameRate = forceFrameRate; + exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel; + exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode; + exports.unstable_next = unstable_next; + exports.unstable_pauseExecution = unstable_pauseExecution; + exports.unstable_requestPaint = unstable_requestPaint; + exports.unstable_runWithPriority = unstable_runWithPriority; + exports.unstable_scheduleCallback = unstable_scheduleCallback; + exports.unstable_shouldYield = shouldYieldToHost; + exports.unstable_wrapCallback = unstable_wrapCallback; + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") { + __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); + } + })(); + } + } +}); + +// node_modules/scheduler/index.js +var require_scheduler = __commonJS({ + "node_modules/scheduler/index.js"(exports, module) { + "use strict"; + if (false) { + module.exports = null; + } else { + module.exports = require_scheduler_development(); + } + } +}); + +// node_modules/react-dom/cjs/react-dom.development.js +var require_react_dom_development = __commonJS({ + "node_modules/react-dom/cjs/react-dom.development.js"(exports) { + "use strict"; + if (true) { + (function() { + "use strict"; + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") { + __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); + } + var React = require_react(); + var Scheduler = require_scheduler(); + var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + var suppressWarning = false; + function setSuppressWarning(newSuppressWarning) { + { + suppressWarning = newSuppressWarning; + } + } + function warn(format) { + { + if (!suppressWarning) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + printWarning("warn", format, args); + } + } + } + function error(format) { + { + if (!suppressWarning) { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + printWarning("error", format, args); + } + } + } + function printWarning(level, format, args) { + { + var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame2.getStackAddendum(); + if (stack !== "") { + format += "%s"; + args = args.concat([stack]); + } + var argsWithFormat = args.map(function(item) { + return String(item); + }); + argsWithFormat.unshift("Warning: " + format); + Function.prototype.apply.call(console[level], console, argsWithFormat); + } + } + var FunctionComponent = 0; + var ClassComponent = 1; + var IndeterminateComponent = 2; + var HostRoot = 3; + var HostPortal = 4; + var HostComponent = 5; + var HostText = 6; + var Fragment = 7; + var Mode = 8; + var ContextConsumer = 9; + var ContextProvider = 10; + var ForwardRef = 11; + var Profiler = 12; + var SuspenseComponent = 13; + var MemoComponent = 14; + var SimpleMemoComponent = 15; + var LazyComponent = 16; + var IncompleteClassComponent = 17; + var DehydratedFragment = 18; + var SuspenseListComponent = 19; + var ScopeComponent = 21; + var OffscreenComponent = 22; + var LegacyHiddenComponent = 23; + var CacheComponent = 24; + var TracingMarkerComponent = 25; + var enableClientRenderFallbackOnTextMismatch = true; + var enableNewReconciler = false; + var enableLazyContextPropagation = false; + var enableLegacyHidden = false; + var enableSuspenseAvoidThisFallback = false; + var disableCommentsAsDOMContainers = true; + var enableCustomElementPropertySupport = false; + var warnAboutStringRefs = true; + var enableSchedulingProfiler = true; + var enableProfilerTimer = true; + var enableProfilerCommitHooks = true; + var allNativeEvents = /* @__PURE__ */ new Set(); + var registrationNameDependencies = {}; + var possibleRegistrationNames = {}; + function registerTwoPhaseEvent(registrationName, dependencies) { + registerDirectEvent(registrationName, dependencies); + registerDirectEvent(registrationName + "Capture", dependencies); + } + function registerDirectEvent(registrationName, dependencies) { + { + if (registrationNameDependencies[registrationName]) { + error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", registrationName); + } + } + registrationNameDependencies[registrationName] = dependencies; + { + var lowerCasedName = registrationName.toLowerCase(); + possibleRegistrationNames[lowerCasedName] = registrationName; + if (registrationName === "onDoubleClick") { + possibleRegistrationNames.ondblclick = registrationName; + } + } + for (var i = 0; i < dependencies.length; i++) { + allNativeEvents.add(dependencies[i]); + } + } + var canUseDOM = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined"); + var hasOwnProperty = Object.prototype.hasOwnProperty; + function typeName(value) { + { + var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; + var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; + return type; + } + } + function willCoercionThrow(value) { + { + try { + testStringCoercion(value); + return false; + } catch (e) { + return true; + } + } + } + function testStringCoercion(value) { + return "" + value; + } + function checkAttributeStringCoercion(value, attributeName) { + { + if (willCoercionThrow(value)) { + error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.", attributeName, typeName(value)); + return testStringCoercion(value); + } + } + } + function checkKeyStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); + return testStringCoercion(value); + } + } + } + function checkPropStringCoercion(value, propName) { + { + if (willCoercionThrow(value)) { + error("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.", propName, typeName(value)); + return testStringCoercion(value); + } + } + } + function checkCSSPropertyStringCoercion(value, propName) { + { + if (willCoercionThrow(value)) { + error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.", propName, typeName(value)); + return testStringCoercion(value); + } + } + } + function checkHtmlStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); + return testStringCoercion(value); + } + } + } + function checkFormFieldValueStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before before using it here.", typeName(value)); + return testStringCoercion(value); + } + } + } + var RESERVED = 0; + var STRING = 1; + var BOOLEANISH_STRING = 2; + var BOOLEAN = 3; + var OVERLOADED_BOOLEAN = 4; + var NUMERIC = 5; + var POSITIVE_NUMERIC = 6; + var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; + var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; + var VALID_ATTRIBUTE_NAME_REGEX = new RegExp("^[" + ATTRIBUTE_NAME_START_CHAR + "][" + ATTRIBUTE_NAME_CHAR + "]*$"); + var illegalAttributeNameCache = {}; + var validatedAttributeNameCache = {}; + function isAttributeNameSafe(attributeName) { + if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) { + return true; + } + if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) { + return false; + } + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + illegalAttributeNameCache[attributeName] = true; + { + error("Invalid attribute name: `%s`", attributeName); + } + return false; + } + function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null) { + return propertyInfo.type === RESERVED; + } + if (isCustomComponentTag) { + return false; + } + if (name.length > 2 && (name[0] === "o" || name[0] === "O") && (name[1] === "n" || name[1] === "N")) { + return true; + } + return false; + } + function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null && propertyInfo.type === RESERVED) { + return false; + } + switch (typeof value) { + case "function": + // $FlowIssue symbol is perfectly valid here + case "symbol": + return true; + case "boolean": { + if (isCustomComponentTag) { + return false; + } + if (propertyInfo !== null) { + return !propertyInfo.acceptsBooleans; + } else { + var prefix2 = name.toLowerCase().slice(0, 5); + return prefix2 !== "data-" && prefix2 !== "aria-"; + } + } + default: + return false; + } + } + function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { + if (value === null || typeof value === "undefined") { + return true; + } + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { + return true; + } + if (isCustomComponentTag) { + return false; + } + if (propertyInfo !== null) { + switch (propertyInfo.type) { + case BOOLEAN: + return !value; + case OVERLOADED_BOOLEAN: + return value === false; + case NUMERIC: + return isNaN(value); + case POSITIVE_NUMERIC: + return isNaN(value) || value < 1; + } + } + return false; + } + function getPropertyInfo(name) { + return properties.hasOwnProperty(name) ? properties[name] : null; + } + function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL2, removeEmptyString) { + this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; + this.attributeName = attributeName; + this.attributeNamespace = attributeNamespace; + this.mustUseProperty = mustUseProperty; + this.propertyName = name; + this.type = type; + this.sanitizeURL = sanitizeURL2; + this.removeEmptyString = removeEmptyString; + } + var properties = {}; + var reservedProps = [ + "children", + "dangerouslySetInnerHTML", + // TODO: This prevents the assignment of defaultValue to regular + // elements (not just inputs). Now that ReactDOMInput assigns to the + // defaultValue property -- do we need this? + "defaultValue", + "defaultChecked", + "innerHTML", + "suppressContentEditableWarning", + "suppressHydrationWarning", + "style" + ]; + reservedProps.forEach(function(name) { + properties[name] = new PropertyInfoRecord( + name, + RESERVED, + false, + // mustUseProperty + name, + // attributeName + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(_ref) { + var name = _ref[0], attributeName = _ref[1]; + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, + // mustUseProperty + attributeName, + // attributeName + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + ["contentEditable", "draggable", "spellCheck", "value"].forEach(function(name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEANISH_STRING, + false, + // mustUseProperty + name.toLowerCase(), + // attributeName + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEANISH_STRING, + false, + // mustUseProperty + name, + // attributeName + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + [ + "allowFullScreen", + "async", + // Note: there is a special case that prevents it from being written to the DOM + // on the client side because the browsers are inconsistent. Instead we call focus(). + "autoFocus", + "autoPlay", + "controls", + "default", + "defer", + "disabled", + "disablePictureInPicture", + "disableRemotePlayback", + "formNoValidate", + "hidden", + "loop", + "noModule", + "noValidate", + "open", + "playsInline", + "readOnly", + "required", + "reversed", + "scoped", + "seamless", + // Microdata + "itemScope" + ].forEach(function(name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEAN, + false, + // mustUseProperty + name.toLowerCase(), + // attributeName + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + [ + "checked", + // Note: `option.selected` is not updated if `select.multiple` is + // disabled with `removeAttribute`. We have special logic for handling this. + "multiple", + "muted", + "selected" + // NOTE: if you add a camelCased prop to this list, + // you'll need to set attributeName to name.toLowerCase() + // instead in the assignment below. + ].forEach(function(name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEAN, + true, + // mustUseProperty + name, + // attributeName + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + [ + "capture", + "download" + // NOTE: if you add a camelCased prop to this list, + // you'll need to set attributeName to name.toLowerCase() + // instead in the assignment below. + ].forEach(function(name) { + properties[name] = new PropertyInfoRecord( + name, + OVERLOADED_BOOLEAN, + false, + // mustUseProperty + name, + // attributeName + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + [ + "cols", + "rows", + "size", + "span" + // NOTE: if you add a camelCased prop to this list, + // you'll need to set attributeName to name.toLowerCase() + // instead in the assignment below. + ].forEach(function(name) { + properties[name] = new PropertyInfoRecord( + name, + POSITIVE_NUMERIC, + false, + // mustUseProperty + name, + // attributeName + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + ["rowSpan", "start"].forEach(function(name) { + properties[name] = new PropertyInfoRecord( + name, + NUMERIC, + false, + // mustUseProperty + name.toLowerCase(), + // attributeName + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + var CAMELIZE = /[\-\:]([a-z])/g; + var capitalize = function(token) { + return token[1].toUpperCase(); + }; + [ + "accent-height", + "alignment-baseline", + "arabic-form", + "baseline-shift", + "cap-height", + "clip-path", + "clip-rule", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "dominant-baseline", + "enable-background", + "fill-opacity", + "fill-rule", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-name", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "horiz-adv-x", + "horiz-origin-x", + "image-rendering", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "overline-position", + "overline-thickness", + "paint-order", + "panose-1", + "pointer-events", + "rendering-intent", + "shape-rendering", + "stop-color", + "stop-opacity", + "strikethrough-position", + "strikethrough-thickness", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "underline-position", + "underline-thickness", + "unicode-bidi", + "unicode-range", + "units-per-em", + "v-alphabetic", + "v-hanging", + "v-ideographic", + "v-mathematical", + "vector-effect", + "vert-adv-y", + "vert-origin-x", + "vert-origin-y", + "word-spacing", + "writing-mode", + "xmlns:xlink", + "x-height" + // NOTE: if you add a camelCased prop to this list, + // you'll need to set attributeName to name.toLowerCase() + // instead in the assignment below. + ].forEach(function(attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, + // mustUseProperty + attributeName, + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + [ + "xlink:actuate", + "xlink:arcrole", + "xlink:role", + "xlink:show", + "xlink:title", + "xlink:type" + // NOTE: if you add a camelCased prop to this list, + // you'll need to set attributeName to name.toLowerCase() + // instead in the assignment below. + ].forEach(function(attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, + // mustUseProperty + attributeName, + "http://www.w3.org/1999/xlink", + false, + // sanitizeURL + false + ); + }); + [ + "xml:base", + "xml:lang", + "xml:space" + // NOTE: if you add a camelCased prop to this list, + // you'll need to set attributeName to name.toLowerCase() + // instead in the assignment below. + ].forEach(function(attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, + // mustUseProperty + attributeName, + "http://www.w3.org/XML/1998/namespace", + false, + // sanitizeURL + false + ); + }); + ["tabIndex", "crossOrigin"].forEach(function(attributeName) { + properties[attributeName] = new PropertyInfoRecord( + attributeName, + STRING, + false, + // mustUseProperty + attributeName.toLowerCase(), + // attributeName + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + var xlinkHref = "xlinkHref"; + properties[xlinkHref] = new PropertyInfoRecord( + "xlinkHref", + STRING, + false, + // mustUseProperty + "xlink:href", + "http://www.w3.org/1999/xlink", + true, + // sanitizeURL + false + ); + ["src", "href", "action", "formAction"].forEach(function(attributeName) { + properties[attributeName] = new PropertyInfoRecord( + attributeName, + STRING, + false, + // mustUseProperty + attributeName.toLowerCase(), + // attributeName + null, + // attributeNamespace + true, + // sanitizeURL + true + ); + }); + var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; + var didWarn = false; + function sanitizeURL(url) { + { + if (!didWarn && isJavaScriptProtocol.test(url)) { + didWarn = true; + error("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.", JSON.stringify(url)); + } + } + } + function getValueForProperty(node, name, expected, propertyInfo) { + { + if (propertyInfo.mustUseProperty) { + var propertyName = propertyInfo.propertyName; + return node[propertyName]; + } else { + { + checkAttributeStringCoercion(expected, name); + } + if (propertyInfo.sanitizeURL) { + sanitizeURL("" + expected); + } + var attributeName = propertyInfo.attributeName; + var stringValue = null; + if (propertyInfo.type === OVERLOADED_BOOLEAN) { + if (node.hasAttribute(attributeName)) { + var value = node.getAttribute(attributeName); + if (value === "") { + return true; + } + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return value; + } + if (value === "" + expected) { + return expected; + } + return value; + } + } else if (node.hasAttribute(attributeName)) { + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return node.getAttribute(attributeName); + } + if (propertyInfo.type === BOOLEAN) { + return expected; + } + stringValue = node.getAttribute(attributeName); + } + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return stringValue === null ? expected : stringValue; + } else if (stringValue === "" + expected) { + return expected; + } else { + return stringValue; + } + } + } + } + function getValueForAttribute(node, name, expected, isCustomComponentTag) { + { + if (!isAttributeNameSafe(name)) { + return; + } + if (!node.hasAttribute(name)) { + return expected === void 0 ? void 0 : null; + } + var value = node.getAttribute(name); + { + checkAttributeStringCoercion(expected, name); + } + if (value === "" + expected) { + return expected; + } + return value; + } + } + function setValueForProperty(node, name, value, isCustomComponentTag) { + var propertyInfo = getPropertyInfo(name); + if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) { + return; + } + if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) { + value = null; + } + if (isCustomComponentTag || propertyInfo === null) { + if (isAttributeNameSafe(name)) { + var _attributeName = name; + if (value === null) { + node.removeAttribute(_attributeName); + } else { + { + checkAttributeStringCoercion(value, name); + } + node.setAttribute(_attributeName, "" + value); + } + } + return; + } + var mustUseProperty = propertyInfo.mustUseProperty; + if (mustUseProperty) { + var propertyName = propertyInfo.propertyName; + if (value === null) { + var type = propertyInfo.type; + node[propertyName] = type === BOOLEAN ? false : ""; + } else { + node[propertyName] = value; + } + return; + } + var attributeName = propertyInfo.attributeName, attributeNamespace = propertyInfo.attributeNamespace; + if (value === null) { + node.removeAttribute(attributeName); + } else { + var _type = propertyInfo.type; + var attributeValue; + if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) { + attributeValue = ""; + } else { + { + { + checkAttributeStringCoercion(value, attributeName); + } + attributeValue = "" + value; + } + if (propertyInfo.sanitizeURL) { + sanitizeURL(attributeValue.toString()); + } + } + if (attributeNamespace) { + node.setAttributeNS(attributeNamespace, attributeName, attributeValue); + } else { + node.setAttribute(attributeName, attributeValue); + } + } + } + var REACT_ELEMENT_TYPE = Symbol.for("react.element"); + var REACT_PORTAL_TYPE = Symbol.for("react.portal"); + var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); + var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); + var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); + var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); + var REACT_CONTEXT_TYPE = Symbol.for("react.context"); + var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); + var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); + var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); + var REACT_MEMO_TYPE = Symbol.for("react.memo"); + var REACT_LAZY_TYPE = Symbol.for("react.lazy"); + var REACT_SCOPE_TYPE = Symbol.for("react.scope"); + var REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for("react.debug_trace_mode"); + var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); + var REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"); + var REACT_CACHE_TYPE = Symbol.for("react.cache"); + var REACT_TRACING_MARKER_TYPE = Symbol.for("react.tracing_marker"); + var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = "@@iterator"; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== "object") { + return null; + } + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; + if (typeof maybeIterator === "function") { + return maybeIterator; + } + return null; + } + var assign = Object.assign; + var disabledDepth = 0; + var prevLog; + var prevInfo; + var prevWarn; + var prevError; + var prevGroup; + var prevGroupCollapsed; + var prevGroupEnd; + function disabledLog() { + } + disabledLog.__reactDisabledLog = true; + function disableLogs() { + { + if (disabledDepth === 0) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: true, + enumerable: true, + value: disabledLog, + writable: true + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); + } + disabledDepth++; + } + } + function reenableLogs() { + { + disabledDepth--; + if (disabledDepth === 0) { + var props = { + configurable: true, + enumerable: true, + writable: true + }; + Object.defineProperties(console, { + log: assign({}, props, { + value: prevLog + }), + info: assign({}, props, { + value: prevInfo + }), + warn: assign({}, props, { + value: prevWarn + }), + error: assign({}, props, { + value: prevError + }), + group: assign({}, props, { + value: prevGroup + }), + groupCollapsed: assign({}, props, { + value: prevGroupCollapsed + }), + groupEnd: assign({}, props, { + value: prevGroupEnd + }) + }); + } + if (disabledDepth < 0) { + error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + } + } + } + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + var prefix; + function describeBuiltInComponentFrame(name, source, ownerFn) { + { + if (prefix === void 0) { + try { + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = match && match[1] || ""; + } + } + return "\n" + prefix + name; + } + } + var reentry = false; + var componentFrameCache; + { + var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; + componentFrameCache = new PossiblyWeakMap(); + } + function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) { + return ""; + } + { + var frame = componentFrameCache.get(fn); + if (frame !== void 0) { + return frame; + } + } + var control; + reentry = true; + var previousPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher; + { + previousDispatcher = ReactCurrentDispatcher.current; + ReactCurrentDispatcher.current = null; + disableLogs(); + } + try { + if (construct) { + var Fake = function() { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function() { + throw Error(); + } + }); + if (typeof Reflect === "object" && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x) { + control = x; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x) { + control = x; + } + fn(); + } + } catch (sample) { + if (sample && control && typeof sample.stack === "string") { + var sampleLines = sample.stack.split("\n"); + var controlLines = control.stack.split("\n"); + var s = sampleLines.length - 1; + var c = controlLines.length - 1; + while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { + c--; + } + for (; s >= 1 && c >= 0; s--, c--) { + if (sampleLines[s] !== controlLines[c]) { + if (s !== 1 || c !== 1) { + do { + s--; + c--; + if (c < 0 || sampleLines[s] !== controlLines[c]) { + var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); + if (fn.displayName && _frame.includes("")) { + _frame = _frame.replace("", fn.displayName); + } + { + if (typeof fn === "function") { + componentFrameCache.set(fn, _frame); + } + } + return _frame; + } + } while (s >= 1 && c >= 0); + } + break; + } + } + } + } finally { + reentry = false; + { + ReactCurrentDispatcher.current = previousDispatcher; + reenableLogs(); + } + Error.prepareStackTrace = previousPrepareStackTrace; + } + var name = fn ? fn.displayName || fn.name : ""; + var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; + { + if (typeof fn === "function") { + componentFrameCache.set(fn, syntheticFrame); + } + } + return syntheticFrame; + } + function describeClassComponentFrame(ctor, source, ownerFn) { + { + return describeNativeComponentFrame(ctor, true); + } + } + function describeFunctionComponentFrame(fn, source, ownerFn) { + { + return describeNativeComponentFrame(fn, false); + } + } + function shouldConstruct(Component) { + var prototype = Component.prototype; + return !!(prototype && prototype.isReactComponent); + } + function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { + if (type == null) { + return ""; + } + if (typeof type === "function") { + { + return describeNativeComponentFrame(type, shouldConstruct(type)); + } + } + if (typeof type === "string") { + return describeBuiltInComponentFrame(type); + } + switch (type) { + case REACT_SUSPENSE_TYPE: + return describeBuiltInComponentFrame("Suspense"); + case REACT_SUSPENSE_LIST_TYPE: + return describeBuiltInComponentFrame("SuspenseList"); + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeFunctionComponentFrame(type.render); + case REACT_MEMO_TYPE: + return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); + } catch (x) { + } + } + } + } + return ""; + } + function describeFiber(fiber) { + var owner = fiber._debugOwner ? fiber._debugOwner.type : null; + var source = fiber._debugSource; + switch (fiber.tag) { + case HostComponent: + return describeBuiltInComponentFrame(fiber.type); + case LazyComponent: + return describeBuiltInComponentFrame("Lazy"); + case SuspenseComponent: + return describeBuiltInComponentFrame("Suspense"); + case SuspenseListComponent: + return describeBuiltInComponentFrame("SuspenseList"); + case FunctionComponent: + case IndeterminateComponent: + case SimpleMemoComponent: + return describeFunctionComponentFrame(fiber.type); + case ForwardRef: + return describeFunctionComponentFrame(fiber.type.render); + case ClassComponent: + return describeClassComponentFrame(fiber.type); + default: + return ""; + } + } + function getStackByFiberInDevAndProd(workInProgress2) { + try { + var info = ""; + var node = workInProgress2; + do { + info += describeFiber(node); + node = node.return; + } while (node); + return info; + } catch (x) { + return "\nError generating stack: " + x.message + "\n" + x.stack; + } + } + function getWrappedName(outerType, innerType, wrapperName) { + var displayName = outerType.displayName; + if (displayName) { + return displayName; + } + var functionName = innerType.displayName || innerType.name || ""; + return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName; + } + function getContextName(type) { + return type.displayName || "Context"; + } + function getComponentNameFromType(type) { + if (type == null) { + return null; + } + { + if (typeof type.tag === "number") { + error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."); + } + } + if (typeof type === "function") { + return type.displayName || type.name || null; + } + if (typeof type === "string") { + return type; + } + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_PROFILER_TYPE: + return "Profiler"; + case REACT_STRICT_MODE_TYPE: + return "StrictMode"; + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + var context = type; + return getContextName(context) + ".Consumer"; + case REACT_PROVIDER_TYPE: + var provider = type; + return getContextName(provider._context) + ".Provider"; + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, "ForwardRef"); + case REACT_MEMO_TYPE: + var outerName = type.displayName || null; + if (outerName !== null) { + return outerName; + } + return getComponentNameFromType(type.type) || "Memo"; + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return getComponentNameFromType(init(payload)); + } catch (x) { + return null; + } + } + } + } + return null; + } + function getWrappedName$1(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ""; + return outerType.displayName || (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName); + } + function getContextName$1(type) { + return type.displayName || "Context"; + } + function getComponentNameFromFiber(fiber) { + var tag = fiber.tag, type = fiber.type; + switch (tag) { + case CacheComponent: + return "Cache"; + case ContextConsumer: + var context = type; + return getContextName$1(context) + ".Consumer"; + case ContextProvider: + var provider = type; + return getContextName$1(provider._context) + ".Provider"; + case DehydratedFragment: + return "DehydratedFragment"; + case ForwardRef: + return getWrappedName$1(type, type.render, "ForwardRef"); + case Fragment: + return "Fragment"; + case HostComponent: + return type; + case HostPortal: + return "Portal"; + case HostRoot: + return "Root"; + case HostText: + return "Text"; + case LazyComponent: + return getComponentNameFromType(type); + case Mode: + if (type === REACT_STRICT_MODE_TYPE) { + return "StrictMode"; + } + return "Mode"; + case OffscreenComponent: + return "Offscreen"; + case Profiler: + return "Profiler"; + case ScopeComponent: + return "Scope"; + case SuspenseComponent: + return "Suspense"; + case SuspenseListComponent: + return "SuspenseList"; + case TracingMarkerComponent: + return "TracingMarker"; + // The display name for this tags come from the user-provided type: + case ClassComponent: + case FunctionComponent: + case IncompleteClassComponent: + case IndeterminateComponent: + case MemoComponent: + case SimpleMemoComponent: + if (typeof type === "function") { + return type.displayName || type.name || null; + } + if (typeof type === "string") { + return type; + } + break; + } + return null; + } + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var current = null; + var isRendering = false; + function getCurrentFiberOwnerNameInDevOrNull() { + { + if (current === null) { + return null; + } + var owner = current._debugOwner; + if (owner !== null && typeof owner !== "undefined") { + return getComponentNameFromFiber(owner); + } + } + return null; + } + function getCurrentFiberStackInDev() { + { + if (current === null) { + return ""; + } + return getStackByFiberInDevAndProd(current); + } + } + function resetCurrentFiber() { + { + ReactDebugCurrentFrame.getCurrentStack = null; + current = null; + isRendering = false; + } + } + function setCurrentFiber(fiber) { + { + ReactDebugCurrentFrame.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev; + current = fiber; + isRendering = false; + } + } + function getCurrentFiber() { + { + return current; + } + } + function setIsRendering(rendering) { + { + isRendering = rendering; + } + } + function toString(value) { + return "" + value; + } + function getToStringValue(value) { + switch (typeof value) { + case "boolean": + case "number": + case "string": + case "undefined": + return value; + case "object": + { + checkFormFieldValueStringCoercion(value); + } + return value; + default: + return ""; + } + } + var hasReadOnlyValue = { + button: true, + checkbox: true, + image: true, + hidden: true, + radio: true, + reset: true, + submit: true + }; + function checkControlledValueProps(tagName, props) { + { + if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) { + error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."); + } + if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) { + error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`."); + } + } + } + function isCheckable(elem) { + var type = elem.type; + var nodeName = elem.nodeName; + return nodeName && nodeName.toLowerCase() === "input" && (type === "checkbox" || type === "radio"); + } + function getTracker(node) { + return node._valueTracker; + } + function detachTracker(node) { + node._valueTracker = null; + } + function getValueFromNode(node) { + var value = ""; + if (!node) { + return value; + } + if (isCheckable(node)) { + value = node.checked ? "true" : "false"; + } else { + value = node.value; + } + return value; + } + function trackValueOnNode(node) { + var valueField = isCheckable(node) ? "checked" : "value"; + var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField); + { + checkFormFieldValueStringCoercion(node[valueField]); + } + var currentValue = "" + node[valueField]; + if (node.hasOwnProperty(valueField) || typeof descriptor === "undefined" || typeof descriptor.get !== "function" || typeof descriptor.set !== "function") { + return; + } + var get2 = descriptor.get, set2 = descriptor.set; + Object.defineProperty(node, valueField, { + configurable: true, + get: function() { + return get2.call(this); + }, + set: function(value) { + { + checkFormFieldValueStringCoercion(value); + } + currentValue = "" + value; + set2.call(this, value); + } + }); + Object.defineProperty(node, valueField, { + enumerable: descriptor.enumerable + }); + var tracker = { + getValue: function() { + return currentValue; + }, + setValue: function(value) { + { + checkFormFieldValueStringCoercion(value); + } + currentValue = "" + value; + }, + stopTracking: function() { + detachTracker(node); + delete node[valueField]; + } + }; + return tracker; + } + function track(node) { + if (getTracker(node)) { + return; + } + node._valueTracker = trackValueOnNode(node); + } + function updateValueIfChanged(node) { + if (!node) { + return false; + } + var tracker = getTracker(node); + if (!tracker) { + return true; + } + var lastValue = tracker.getValue(); + var nextValue = getValueFromNode(node); + if (nextValue !== lastValue) { + tracker.setValue(nextValue); + return true; + } + return false; + } + function getActiveElement(doc) { + doc = doc || (typeof document !== "undefined" ? document : void 0); + if (typeof doc === "undefined") { + return null; + } + try { + return doc.activeElement || doc.body; + } catch (e) { + return doc.body; + } + } + var didWarnValueDefaultValue = false; + var didWarnCheckedDefaultChecked = false; + var didWarnControlledToUncontrolled = false; + var didWarnUncontrolledToControlled = false; + function isControlled(props) { + var usesChecked = props.type === "checkbox" || props.type === "radio"; + return usesChecked ? props.checked != null : props.value != null; + } + function getHostProps(element, props) { + var node = element; + var checked = props.checked; + var hostProps = assign({}, props, { + defaultChecked: void 0, + defaultValue: void 0, + value: void 0, + checked: checked != null ? checked : node._wrapperState.initialChecked + }); + return hostProps; + } + function initWrapperState(element, props) { + { + checkControlledValueProps("input", props); + if (props.checked !== void 0 && props.defaultChecked !== void 0 && !didWarnCheckedDefaultChecked) { + error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type); + didWarnCheckedDefaultChecked = true; + } + if (props.value !== void 0 && props.defaultValue !== void 0 && !didWarnValueDefaultValue) { + error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type); + didWarnValueDefaultValue = true; + } + } + var node = element; + var defaultValue = props.defaultValue == null ? "" : props.defaultValue; + node._wrapperState = { + initialChecked: props.checked != null ? props.checked : props.defaultChecked, + initialValue: getToStringValue(props.value != null ? props.value : defaultValue), + controlled: isControlled(props) + }; + } + function updateChecked(element, props) { + var node = element; + var checked = props.checked; + if (checked != null) { + setValueForProperty(node, "checked", checked, false); + } + } + function updateWrapper(element, props) { + var node = element; + { + var controlled = isControlled(props); + if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { + error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"); + didWarnUncontrolledToControlled = true; + } + if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { + error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"); + didWarnControlledToUncontrolled = true; + } + } + updateChecked(element, props); + var value = getToStringValue(props.value); + var type = props.type; + if (value != null) { + if (type === "number") { + if (value === 0 && node.value === "" || // We explicitly want to coerce to number here if possible. + + node.value != value) { + node.value = toString(value); + } + } else if (node.value !== toString(value)) { + node.value = toString(value); + } + } else if (type === "submit" || type === "reset") { + node.removeAttribute("value"); + return; + } + { + if (props.hasOwnProperty("value")) { + setDefaultValue(node, props.type, value); + } else if (props.hasOwnProperty("defaultValue")) { + setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); + } + } + { + if (props.checked == null && props.defaultChecked != null) { + node.defaultChecked = !!props.defaultChecked; + } + } + } + function postMountWrapper(element, props, isHydrating2) { + var node = element; + if (props.hasOwnProperty("value") || props.hasOwnProperty("defaultValue")) { + var type = props.type; + var isButton = type === "submit" || type === "reset"; + if (isButton && (props.value === void 0 || props.value === null)) { + return; + } + var initialValue = toString(node._wrapperState.initialValue); + if (!isHydrating2) { + { + if (initialValue !== node.value) { + node.value = initialValue; + } + } + } + { + node.defaultValue = initialValue; + } + } + var name = node.name; + if (name !== "") { + node.name = ""; + } + { + node.defaultChecked = !node.defaultChecked; + node.defaultChecked = !!node._wrapperState.initialChecked; + } + if (name !== "") { + node.name = name; + } + } + function restoreControlledState(element, props) { + var node = element; + updateWrapper(node, props); + updateNamedCousins(node, props); + } + function updateNamedCousins(rootNode, props) { + var name = props.name; + if (props.type === "radio" && name != null) { + var queryRoot = rootNode; + while (queryRoot.parentNode) { + queryRoot = queryRoot.parentNode; + } + { + checkAttributeStringCoercion(name, "name"); + } + var group = queryRoot.querySelectorAll("input[name=" + JSON.stringify("" + name) + '][type="radio"]'); + for (var i = 0; i < group.length; i++) { + var otherNode = group[i]; + if (otherNode === rootNode || otherNode.form !== rootNode.form) { + continue; + } + var otherProps = getFiberCurrentPropsFromNode(otherNode); + if (!otherProps) { + throw new Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported."); + } + updateValueIfChanged(otherNode); + updateWrapper(otherNode, otherProps); + } + } + } + function setDefaultValue(node, type, value) { + if ( + // Focused number inputs synchronize on blur. See ChangeEventPlugin.js + type !== "number" || getActiveElement(node.ownerDocument) !== node + ) { + if (value == null) { + node.defaultValue = toString(node._wrapperState.initialValue); + } else if (node.defaultValue !== toString(value)) { + node.defaultValue = toString(value); + } + } + } + var didWarnSelectedSetOnOption = false; + var didWarnInvalidChild = false; + var didWarnInvalidInnerHTML = false; + function validateProps(element, props) { + { + if (props.value == null) { + if (typeof props.children === "object" && props.children !== null) { + React.Children.forEach(props.children, function(child) { + if (child == null) { + return; + } + if (typeof child === "string" || typeof child === "number") { + return; + } + if (!didWarnInvalidChild) { + didWarnInvalidChild = true; + error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to