From fa14e9e5b92f092e349ca27cfc47b93326ebeaba Mon Sep 17 00:00:00 2001 From: mid Date: Fri, 7 Aug 2026 21:51:15 +0800 Subject: [PATCH] Initial release of Web Tools 0.0.5 --- .dockerignore | 10 + .env.example | 1 + .gitattributes | 6 + .gitignore | 11 + AGENTS.md | 19 + CHANGELOG.md | 33 + Dockerfile | 32 + README.zh-CN.md | 306 ++++++ THIRD_PARTY_NOTICES.md | 51 + docker-compose.yml | 23 + index.html | 14 + package-lock.json | 1666 ++++++++++++++++++++++++++++++ package.json | 36 + server/index.mjs | 203 ++++ server/navigation.mjs | 115 +++ shared/default-navigation.json | 10 + shared/tool-catalog.json | 75 ++ src/App.vue | 70 ++ src/components/AppSidebar.vue | 53 + src/components/ModeTabs.vue | 27 + src/components/SyntaxViewer.vue | 28 + src/components/TextEditor.vue | 41 + src/components/ToolPage.vue | 27 + src/composables/useNavigation.ts | 58 ++ src/env.d.ts | 7 + src/lib/browser.ts | 32 + src/lib/bytes.ts | 96 ++ src/lib/cmac.ts | 15 + src/lib/crc.ts | 152 +++ src/lib/crcWorker.ts | 60 ++ src/lib/firmware.ts | 35 + src/lib/ico.ts | 79 ++ src/lib/intelHex.ts | 138 +++ src/lib/navigationOrder.ts | 62 ++ src/lib/png.ts | 33 + src/lib/random.ts | 14 + src/lib/rsa.ts | 102 ++ src/lib/syntax.ts | 175 ++++ src/main.ts | 6 + src/router.ts | 34 + src/styles.css | 303 ++++++ src/tools/AesCmacTool.vue | 88 ++ src/tools/AsciiHexTool.vue | 110 ++ src/tools/Base64Tool.vue | 126 +++ src/tools/CrcTool.vue | 269 +++++ src/tools/JsonTool.vue | 65 ++ src/tools/PngIcoTool.vue | 172 +++ src/tools/RandomTool.vue | 72 ++ src/tools/RsaKeyPairTool.vue | 120 +++ src/tools/XmlTool.vue | 71 ++ src/tools/registry.ts | 72 ++ src/types.ts | 30 + src/views/SettingView.vue | 162 +++ src/workers/crc.worker.ts | 44 + tests/bytes.test.ts | 56 + tests/catalog.test.ts | 28 + tests/cmac.test.ts | 17 + tests/crc.test.ts | 123 +++ tests/fixtures/multi-block.hex | 3 + tests/ico.test.ts | 75 ++ tests/navigation.test.mjs | 76 ++ tests/navigationOrder.test.ts | 47 + tests/random.test.ts | 25 + tests/rsa.test.ts | 20 + tests/server.test.mjs | 115 +++ tests/syntax.test.ts | 39 + tsconfig.app.json | 24 + tsconfig.json | 7 + tsconfig.node.json | 17 + vite.config.ts | 19 + vitest.config.ts | 15 + 71 files changed, 6365 insertions(+) create mode 100644 .dockerignore create mode 100644 .env.example create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 AGENTS.md create mode 100644 CHANGELOG.md create mode 100644 Dockerfile create mode 100644 README.zh-CN.md create mode 100644 THIRD_PARTY_NOTICES.md create mode 100644 docker-compose.yml create mode 100644 index.html create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 server/index.mjs create mode 100644 server/navigation.mjs create mode 100644 shared/default-navigation.json create mode 100644 shared/tool-catalog.json create mode 100644 src/App.vue create mode 100644 src/components/AppSidebar.vue create mode 100644 src/components/ModeTabs.vue create mode 100644 src/components/SyntaxViewer.vue create mode 100644 src/components/TextEditor.vue create mode 100644 src/components/ToolPage.vue create mode 100644 src/composables/useNavigation.ts create mode 100644 src/env.d.ts create mode 100644 src/lib/browser.ts create mode 100644 src/lib/bytes.ts create mode 100644 src/lib/cmac.ts create mode 100644 src/lib/crc.ts create mode 100644 src/lib/crcWorker.ts create mode 100644 src/lib/firmware.ts create mode 100644 src/lib/ico.ts create mode 100644 src/lib/intelHex.ts create mode 100644 src/lib/navigationOrder.ts create mode 100644 src/lib/png.ts create mode 100644 src/lib/random.ts create mode 100644 src/lib/rsa.ts create mode 100644 src/lib/syntax.ts create mode 100644 src/main.ts create mode 100644 src/router.ts create mode 100644 src/styles.css create mode 100644 src/tools/AesCmacTool.vue create mode 100644 src/tools/AsciiHexTool.vue create mode 100644 src/tools/Base64Tool.vue create mode 100644 src/tools/CrcTool.vue create mode 100644 src/tools/JsonTool.vue create mode 100644 src/tools/PngIcoTool.vue create mode 100644 src/tools/RandomTool.vue create mode 100644 src/tools/RsaKeyPairTool.vue create mode 100644 src/tools/XmlTool.vue create mode 100644 src/tools/registry.ts create mode 100644 src/types.ts create mode 100644 src/views/SettingView.vue create mode 100644 src/workers/crc.worker.ts create mode 100644 tests/bytes.test.ts create mode 100644 tests/catalog.test.ts create mode 100644 tests/cmac.test.ts create mode 100644 tests/crc.test.ts create mode 100644 tests/fixtures/multi-block.hex create mode 100644 tests/ico.test.ts create mode 100644 tests/navigation.test.mjs create mode 100644 tests/navigationOrder.test.ts create mode 100644 tests/random.test.ts create mode 100644 tests/rsa.test.ts create mode 100644 tests/server.test.mjs create mode 100644 tests/syntax.test.ts create mode 100644 tsconfig.app.json create mode 100644 tsconfig.json create mode 100644 tsconfig.node.json create mode 100644 vite.config.ts create mode 100644 vitest.config.ts diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..8f51473 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,10 @@ +.git +.gitignore +.runtime-data +data +dist +node_modules +npm-debug.log* +outputs +*.tar +*.zip diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..8090f71 --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +WEB_TOOLS_PORT=8080 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..307eb2e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +* text=auto eol=lf + +*.ico binary +*.png binary +*.tar binary +*.zip binary diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..881de51 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +data/ +dist/ +node_modules/ +.runtime-data/ +coverage/ +.env +!.env.example +*.local +*.log +*.tar +*.zip diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..a0471a9 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,19 @@ +# Web Tools Agent Guide + +Before changing this project, read `README.zh-CN.md` in full. Its architecture constraints, extension procedure, validation checklist, and release steps are authoritative. + +Key rules: + +- Preserve the anonymous, no-login, no-database design. Tool calculations are isolated in each browser tab; only navigation order is shared globally. +- Never send tool input, keys, text, or images to the server or a third party. +- Keep each tool independently lazy-loaded through `src/tools/registry.ts`. +- Put testable computation in `src/lib/` and cover it in `tests/`. +- Preserve the documented file, record, image, random-output, syntax-rendering, and request-size limits. Update the limits table and tests when any limit changes. +- Treat asynchronous replacement and clearing as race-sensitive: stale Worker, file, image, or key-generation results must never replace current state. +- Keep IDs synchronized across `shared/tool-catalog.json`, `shared/default-navigation.json`, and `src/tools/registry.ts`. +- Use the shared UI components and existing responsive styles. +- Do not edit generated `dist/` directly; rebuild it from source. +- Do not overwrite or delete `data/navigation.json`. +- Run `npm run check` after every change. Run `npm audit --audit-level=low` before a release. +- For UI changes, verify desktop and mobile portrait layouts in a real browser. +- A release must update all version references and `CHANGELOG.md`, rebuild the delivery ZIP, and regenerate SHA-256. diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..aa05c33 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,33 @@ +# Changelog + +本文档记录面向使用者和维护者的重要变更。版本号以 `package.json` 为准。 + +## 0.0.5 - 2026-08-07 + +### Changed + +- CRC 文件读取、Intel HEX 解析和 CRC 计算统一放入独立 Web Worker,页面只保留文件摘要和结果。 +- 设置页排序操作提取为可测试的纯函数,并增加加载就绪状态。 +- 工具目录、默认导航、图标注册和懒加载组件增加运行时及自动化一致性检查。 +- Node.js 最低版本明确为 22.12.0,增加 `typecheck` 和统一的 `npm run check` 门禁。 +- 补全生产依赖版本与许可证说明。 + +### Fixed + +- 修复 CRC 更换文件、重新计算及旧 Worker 响应覆盖当前状态的竞态问题。 +- Intel HEX 增加文件、记录数和 block 数限制,并降低记录合并时的内存占用。 +- PNG 在浏览器解码前校验签名、IHDR、文件大小、尺寸和总像素;清空或更换图片后忽略旧转换结果。 +- ICO 在创建 Canvas 前校验并规范化尺寸。 +- 修复设置页首次加载时保存按钮可能被错误启用的问题。 +- 修复缺失 JS/CSS 被错误返回 `index.html` 和 200 状态的问题。 +- 修复导航原子写入失败后可能残留临时文件的问题。 +- Base64 解码拒绝非规范尾部填充位。 +- 大型 JSON/XML 结果在语法 token 过多时降级为纯文本,避免创建过量 DOM 节点。 +- 移动端菜单增加正确的展开状态、动态标签和路由切换自动关闭行为。 + +### Verification + +- 49 条 Vitest 测试通过,覆盖算法、边界、目录一致性、排序逻辑和真实 HTTP 服务。 +- Vue/TypeScript 类型检查和 Vite 生产构建通过。 +- npm 依赖审计结果为 0 个已知漏洞。 +- 桌面端和 390 x 844 移动端完成浏览器验收,9 个工具路由无横向溢出或控制台错误。 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..05d9a17 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,32 @@ +# syntax=docker/dockerfile:1.7 +FROM node:22-alpine AS build + +WORKDIR /app +COPY package.json package-lock.json ./ +RUN npm ci + +COPY index.html tsconfig*.json vite.config.ts ./ +COPY src ./src +COPY shared ./shared +RUN npm run build + +FROM node:22-alpine AS runtime + +ENV NODE_ENV=production \ + HOST=0.0.0.0 \ + PORT=8080 \ + DATA_DIR=/data + +WORKDIR /app +RUN mkdir -p /data && chown -R node:node /app /data +COPY --from=build --chown=node:node /app/dist ./dist +COPY --chown=node:node server ./server +COPY --chown=node:node shared ./shared + +USER node +EXPOSE 8080 +VOLUME ["/data"] +HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ + CMD node -e "fetch('http://127.0.0.1:8080/healthz').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))" + +CMD ["node", "server/index.mjs"] diff --git a/README.zh-CN.md b/README.zh-CN.md new file mode 100644 index 0000000..8be66d0 --- /dev/null +++ b/README.zh-CN.md @@ -0,0 +1,306 @@ +# Web Tools + +一个匿名访问、自托管的浏览器本地工具箱。支持多人同时使用;除全局导航顺序外,文本、密钥、文件、图片和计算结果均只存在于各自浏览器中,不会发送到服务端。 + +当前应用版本:`0.0.5`。 + +## 内置工具 + +- ASCII/UTF-8 与 Hex 互转 +- Base64 与 Base64 URL 编码、解码,解码结果支持 UTF-8、连续 Hex 和代码字节数组 +- AES-128-CMAC(RFC 4493) +- CRC-8/16/32/64 预设与自定义参数,支持 BIN 和多 block Intel HEX +- RSA 2048/3072/4096 位密钥对,导出 PEM,以及可分别复制的 N/E Hex 或代码字节数组 +- 密码学安全随机数,支持连续 Hex、空格 Hex 和代码字节数组 +- JSON 格式化、压缩、校验和语法着色 +- XML 格式化、压缩、校验和语法着色 +- PNG 转多尺寸 ICO + +## 交付物与源码 + +容器交付 ZIP 同时包含源码、测试、生产构建结果和部署文件,不是只有压缩后的网页。主要目录如下: + +```text +src/ Vue 3 前端源码 + components/ 所有工具共用的 UI 组件 + lib/ 可测试的纯计算与浏览器辅助逻辑 + tools/ 每个工具一个独立 Vue 组件 + workers/ 大文件计算使用的浏览器后台线程 + views/SettingView.vue /setting 工具管理页 +server/ 零依赖 Node.js 静态服务和导航配置 API +shared/tool-catalog.json 工具与分类的权威元数据目录 +shared/default-navigation.json 新部署的默认分类和工具顺序 +tests/ Vitest 单元测试 +dist/ npm run build 生成的生产前端 +Dockerfile 多阶段容器构建 +docker-compose.yml 默认部署配置 +THIRD_PARTY_NOTICES.md 第三方依赖许可说明 +CHANGELOG.md 版本变更、修复和验证记录 +``` + +交付包不包含 `node_modules`。Docker 首次构建需要访问 Node 镜像仓库和 npm 软件源;若环境完全离线,应另外交付 Docker 镜像 tar。 + +## 架构约束 + +- Vue 3、TypeScript、Vite 前端;Node.js 标准库服务端;不引入数据库。 +- 工具组件彼此独立并懒加载,公共交互使用 `ToolPage`、`ModeTabs`、`TextEditor` 和 `src/styles.css` 中的现有样式。 +- 工具的计算、解析和文件生成逻辑放在 `src/lib/`,Vue 组件只负责状态与交互。 +- 大文件或长时间计算必须放入 `src/workers/` 的 Web Worker,避免阻塞页面交互;Worker 仍只在浏览器本地处理数据。 +- 路由和左侧导航由工具目录自动生成,增加普通工具时不得手工新增路由。 +- 工具输入只在浏览器内存中处理,不得发送给服务端、遥测服务或第三方接口。 +- 服务端只持久化导航顺序,文件为 `/data/navigation.json`,写入采用临时文件和原子替换。 +- `/setting` 是固定但不公开显示的管理入口;项目没有登录、收藏、赞助或用户系统。 +- 页面必须保持统一 UI,并兼容桌面端和移动端竖屏。 + +## 多人使用与状态边界 + +- 每个浏览器标签页拥有独立的 Vue 组件状态、文件对象、图像对象和 Web Worker。不同用户、浏览器或标签页不会共享工具输入与结果。 +- CRC、RSA、AES-CMAC、随机数、PNG/ICO、编码转换和格式化都在浏览器中执行;服务端没有工具计算接口。 +- `/setting` 保存的是所有访问者共享的导航配置。并发保存没有版本冲突合并,最后完成原子替换的请求生效。 +- 原子替换保证读取者看到完整的旧配置或新配置,不会看到写到一半的 JSON;它不保证保留多个用户各自的排序修改。 +- 已打开的页面不会实时接收其他用户保存的新顺序,刷新或重新打开后才会读取。 +- 深浅主题保存在当前浏览器同源 `localStorage` 中;系统剪贴板由操作系统管理。这两项不会改变工具计算结果。 + +## 资源限制 + +限制用于避免异常文件、解压后超大图像或高密度语法 token 长时间占用浏览器。修改这些数值时必须同步源码常量、测试和本文档。 + +| 功能 | 当前限制 | 超限行为 | +| --- | --- | --- | +| CRC 固件文件 | 最大 64 MiB | 选择时拒绝,不保留旧文件结果 | +| Intel HEX 数据记录 | 最多 500,000 条 | Worker 停止解析并显示错误 | +| Intel HEX 数据块 | 最多 1,024 个 block | Worker 停止解析并显示错误 | +| PNG 压缩文件 | 最大 32 MiB | 创建预览前拒绝 | +| PNG 尺寸 | 单边最大 16,384 像素,总计最大 32,000,000 像素 | 浏览器解码前拒绝 | +| 安全随机数 | 每次 1 至 65,536 字节 | 拒绝无效长度 | +| JSON/XML 语法着色 | 最大 100,000 字符且不超过 10,000 个 token | 结果仍完整显示,但降级为纯文本以减少 DOM 节点 | +| 导航配置请求体 | 最大 64 KiB | 服务端返回 400 | + +## Docker Compose 部署 + +要求 Linux AMD64/ARM64、Docker Engine 24+、Docker Compose v2。 + +```bash +docker compose up -d --build +``` + +默认访问地址:`http://服务器地址:8080` + +自定义端口: + +```bash +WEB_TOOLS_PORT=9000 docker compose up -d --build +``` + +检查状态: + +```bash +docker compose ps +docker compose logs --tail=100 web-tools +``` + +停止服务: + +```bash +docker compose down +``` + +导航配置保存在 Docker 卷 `web-tools-data` 中的 `/data/navigation.json`。全新部署且从未保存过排序时,应用直接使用内置默认配置,该文件可能尚不存在;首次保存后会创建。删除或重建容器不会丢失已有配置,执行 `docker compose down -v` 才会删除该卷。 + +健康检查地址:`http://服务器地址:8080/healthz` + +## 工具管理 + +管理入口不显示在页面中,直接访问: + +```text +http://服务器地址:8080/setting +``` + +可以调整分类顺序、分类内工具顺序及工具所属分类。保存时采用同目录临时文件和原子替换。 + +导出配置(至少保存过一次排序后执行): + +```bash +docker compose cp web-tools:/data/navigation.json ./navigation.json +``` + +导入配置: + +```bash +docker compose cp ./navigation.json web-tools:/data/navigation.json +docker compose restart web-tools +``` + +升级应用前建议导出该文件。新版本增加工具时,服务端会保留已有顺序,并把缺少的新工具追加到其默认分类。 + +## 离线镜像 + +若交付目录包含 `personal-web-tools-0.0.5-amd64.tar`,可直接导入: + +```bash +docker load -i personal-web-tools-0.0.5-amd64.tar +docker compose up -d --no-build +``` + +当前源码 ZIP 本身不是 Docker 镜像 tar。 + +## 本地开发 + +要求 Node.js 22.12.0 或更高版本。首次安装使用锁定依赖: + +```bash +npm ci +``` + +终端一运行配置服务: + +```bash +PORT=8081 DATA_DIR=./data node server/index.mjs +``` + +终端二运行 Vite;`/api` 和 `/healthz` 会代理到 `127.0.0.1:8081`: + +```bash +npm run dev +``` + +生产模式本地运行: + +```bash +npm run build +npm start +``` + +生产服务默认监听 `0.0.0.0:8080`。 + +完整工程检查: + +```bash +npm run check +npm audit --audit-level=low +``` + +`npm run check` 会依次运行全部 Vitest 测试、TypeScript/Vue 类型检查和生产构建。服务端测试使用随机本地端口验证 SPA 直达路由、静态资源 404、导航 API、请求大小限制及跨站写入拦截。 + +自动化测试还覆盖标准算法向量、Base64 规范性、Intel HEX 记录与 block 边界、PNG 头部与像素限制、导航排序纯函数、目录/图标/懒加载组件一致性,以及原子写入失败后的临时文件清理。 + +## 增加工具 + +### 1. 先定义稳定标识 + +为工具选择永久的 kebab-case `id`,例如 `url-encode`。已发布工具的 `id` 不应修改,因为路由、懒加载映射和用户保存的导航配置都依赖它。 + +确定工具所属分类。新增分类时,需要同时更新: + +- `shared/tool-catalog.json` 中的 `categories` +- `shared/default-navigation.json` 中的 `categories` + +仅新增工具时,分类配置版本仍保持 `version: 1`,不要因为工具数量变化而升级配置格式版本。 + +### 2. 编写独立计算逻辑 + +将编码、解析、加密、校验或文件生成逻辑放入 `src/lib/`。优先使用浏览器标准 API或经过验证的现有依赖,不在 Vue 组件中堆积算法实现。 + +在 `tests/` 添加正常输入、边界输入、无效输入和已知测试向量。涉及字节的工具必须明确 UTF-8、Hex、Base64、换行及分隔符语义,避免隐式改变数据。 + +文件或高开销工具还必须定义文件大小、记录数量、图像尺寸或输出 DOM 数量等资源上限。异步工具在清空、更换输入或卸载后必须忽略旧任务结果;计算量较大的文件解析与 CRC 计算放入 Web Worker。 + +### 3. 编写统一的工具页面 + +在 `src/tools/` 新增一个 Vue 组件,并参考现有 `Base64Tool.vue` 或与需求最接近的工具。 + +- 页面外层使用 `ToolPage`。 +- 文本输入输出优先使用 `TextEditor`。 +- 模式切换使用 `ModeTabs`。 +- 操作按钮使用 Lucide 图标和现有 `action-button` 类。 +- 必须提供清空、错误提示和必要的复制/粘贴操作。 +- 不增加登录、收藏、赞助、遥测、外部网络请求或独立视觉风格。 +- 在窄屏下确认控件不溢出、不重叠,文字不会遮挡。 + +### 4. 登记工具元数据 + +在 `shared/tool-catalog.json` 的 `tools` 中增加: + +```json +{ + "id": "url-encode", + "title": "URL 编解码", + "category": "encoding", + "description": "编码和解码 URL 组件。", + "icon": "Link" +} +``` + +`id` 必须唯一,`category` 必须存在。`icon` 使用 Lucide Vue 图标名称。 + +在 `shared/default-navigation.json` 的目标分类工具数组中加入相同 `id`,位置即新部署的默认显示顺序。 + +### 5. 注册图标与懒加载组件 + +在 `src/tools/registry.ts` 中完成三件事: + +1. 从 `@lucide/vue` 导入目录中填写的图标。 +2. 把图标加入 `iconComponents`。 +3. 把工具 `id` 和 `defineAsyncComponent(() => import(...))` 加入 `toolComponents`。 + +工具目录、默认导航和注册表中的 `id` 必须完全一致。路由会从注册表自动生成,不需要修改 `src/router.ts`。 + +现有自动化测试会校验目录分类、工具 ID、图标注册和懒加载组件映射。新增工具后若漏改任一处,`npm test` 或应用启动会直接报错。 + +### 6. 验证兼容性 + +```bash +npm run check +npm audit --audit-level=low +``` + +还应在真实浏览器中检查: + +- 新工具的默认路径 `/tools/` 可以直接打开和刷新。 +- 左侧导航、搜索和 `/setting` 正常显示新工具。 +- 已保存的旧 `navigation.json` 启动后会自动补入新工具。 +- 桌面端和约 `390 x 844` 的移动端竖屏布局正常。 +- 浏览器控制台无错误,工具内容没有发往服务端。 + +## AI 接手清单 + +后续由 AI 增加或修改工具时,应先阅读本文件,然后依次检查: + +1. `shared/tool-catalog.json` 和 `shared/default-navigation.json` +2. `src/tools/registry.ts` +3. 与目标功能最接近的 `src/tools/*.vue` +4. `src/components/ToolPage.vue`、`TextEditor.vue`、`ModeTabs.vue` +5. 相关 `src/lib/` 和 `tests/` +6. `server/navigation.mjs` 中的导航兼容逻辑 + +AI 不应仅修改 `dist/`;必须修改源码并重新构建。不得覆盖或删除用户的 `data/navigation.json`。发现工作区已有未说明的改动时应保留并兼容,不得擅自回退。 + +处理多人访问、文件工具或异步计算时,还必须检查本文档中的“多人使用与状态边界”和“资源限制”,避免重新引入共享状态、旧任务覆盖新输入或无上限解析。 + +完成任务后至少报告:修改的工具、数据格式选择、测试和构建结果、容器包路径及 SHA-256。涉及 UI 的改动还要进行桌面和移动端浏览器验收。 + +## 版本与发布 + +应用版本的权威来源是 `package.json`。发布新版本时: + +1. 使用 `npm version patch --no-git-tag-version` 或按兼容性选择 minor/major,使 `package.json` 与 `package-lock.json` 同步。 +2. 更新 `docker-compose.yml` 中的镜像标签。 +3. 更新本文档中的当前版本和离线镜像文件名。 +4. 在 `CHANGELOG.md` 记录用户可见变更、重要修复和验证结果。 +5. 运行测试、生产构建和依赖审计。 +6. 重新制作源码/容器部署 ZIP,并生成 SHA-256。 + +版本号固定显示在左侧导航底部;版权信息 `Copyright © mid All Rights Reserved.` 固定显示在所有页面底部。第三方许可保留在 `THIRD_PARTY_NOTICES.md`。 + +## 安全边界 + +- 无登录、无统计、无遥测、无 CDN 和第三方网络请求。 +- `/setting` 是固定但不显示的入口,不构成身份认证;直接公开到互联网时任何访问者都可能修改排序。 +- 工具内容仅在浏览器内存中处理,默认不会持久化。 +- 容器以非 root 用户运行,根文件系统只读,全部 Linux capabilities 已移除。 +- 服务端只接受不超过 64 KiB 的导航 JSON 配置。 +- 服务端只提供静态文件、`GET/PUT /api/navigation` 和 `GET /healthz`。 +- 只有无扩展名且明确请求 HTML 的前端路由会回退到 `index.html`;缺失的 JS、CSS 和其他资源返回 404。 +- JSON API 响应使用 `Cache-Control: no-store`,避免浏览器缓存导航和健康状态。 +- 安全响应头禁止第三方脚本、跨站嵌入、摄像头、麦克风和定位权限。 diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md new file mode 100644 index 0000000..90ba370 --- /dev/null +++ b/THIRD_PARTY_NOTICES.md @@ -0,0 +1,51 @@ +# Third-Party Notices + +This project bundles open-source dependencies. Exact dependency integrity hashes and the development-only toolchain are recorded in `package-lock.json`. The following production dependency set is included by the current lockfile. + +| Package | Version | License | +| --- | --- | --- | +| `@lucide/vue` | 1.29.0 | ISC; selected Feather-derived icons are MIT | +| `@stablelib/aes`, `binary`, `cmac`, `constant-time`, `int`, `wipe` | 2.0.1 | MIT | +| `@stablelib/blockcipher` | 2.0.0 | MIT | +| `node-forge` | 1.4.0 | BSD-3-Clause OR GPL-2.0; this distribution selects BSD-3-Clause | +| `vue`, `@vue/*` runtime/compiler packages | 3.5.41 | MIT | +| `vue-router` | 4.6.4 | MIT | +| `@vue/devtools-api` | 6.6.4 | MIT | +| `xml-formatter` | 3.7.0 | MIT | +| `xml-parser-xo` | 4.1.6 | MIT | +| `@babel/helper-string-parser`, `@babel/helper-validator-identifier` | 7.29.7 | MIT | +| `@babel/parser`, `@babel/types` | 7.29.8 | MIT | +| `@jridgewell/sourcemap-codec` | 1.5.5 | MIT | +| `csstype` | 3.2.3 | MIT | +| `entities` | 7.0.1 | BSD-2-Clause | +| `estree-walker` | 2.0.2 | MIT | +| `magic-string` | 0.30.21 | MIT | +| `nanoid` | 3.3.17 | MIT | +| `picocolors` | 1.1.1 | ISC | +| `postcss` | 8.5.26 | MIT | +| `source-map-js` | 1.2.1 | BSD-3-Clause | +| `typescript` | 5.8.3 | Apache-2.0 | + +Primary copyright notices: + +- Vue: Copyright (c) 2018-present, Yuxi (Evan) You. +- Vue Router: Copyright (c) 2019-present, Eduardo San Martin Morote. +- Lucide: Copyright (c) 2026 Lucide Icons and Contributors. Feather-derived icons: Copyright (c) 2013-present, Cole Bemis. +- StableLib: Copyright (C) 2016 Dmitry Chestnykh. The AES implementation also contains public-domain Rijndael material and BSD-licensed Go-derived material identified in the upstream package. +- xml-formatter: Copyright 2019 Chris Bottin. xml-parser-xo: Copyright 2020 Chris Bottin. +- node-forge: Copyright (c) 2010, Digital Bazaar, Inc. + +Full per-package license files are available in each package installed by `npm ci`. The complete node-forge BSD license selected for this distribution follows. + +## node-forge New BSD License + +Copyright (c) 2010, Digital Bazaar, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of Digital Bazaar, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..4a2e8bf --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,23 @@ +services: + web-tools: + image: personal-web-tools:0.0.5 + build: + context: . + dockerfile: Dockerfile + container_name: personal-web-tools + restart: unless-stopped + init: true + ports: + - "${WEB_TOOLS_PORT:-8080}:8080" + volumes: + - web-tools-data:/data + read_only: true + tmpfs: + - /tmp:size=16m,mode=1777 + cap_drop: + - ALL + security_opt: + - no-new-privileges:true + +volumes: + web-tools-data: diff --git a/index.html b/index.html new file mode 100644 index 0000000..f20257c --- /dev/null +++ b/index.html @@ -0,0 +1,14 @@ + + + + + + + + Web Tools + + +
+ + + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..7be0345 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1666 @@ +{ + "name": "personal-web-tools", + "version": "0.0.5", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "personal-web-tools", + "version": "0.0.5", + "dependencies": { + "@lucide/vue": "^1.29.0", + "@stablelib/aes": "^2.0.1", + "@stablelib/cmac": "^2.0.1", + "node-forge": "^1.4.0", + "vue": "^3.5.13", + "vue-router": "^4.5.0", + "xml-formatter": "^3.6.6" + }, + "devDependencies": { + "@types/node": "^22.10.5", + "@types/node-forge": "^1.3.14", + "@vitejs/plugin-vue": "^6.0.8", + "typescript": "^5.8.3", + "vite": "^8.2.1", + "vitest": "^4.1.10", + "vue-tsc": "^3.3.9" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", + "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.8.tgz", + "integrity": "sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.8" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz", + "integrity": "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "license": "MIT" + }, + "node_modules/@lucide/vue": { + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/@lucide/vue/-/vue-1.29.0.tgz", + "integrity": "sha512-UnbPPAdxWGqABrjcQJZFqawSgZTBmeKOrNFPI9sqKaDkgLoEbYyx+ivIdiYRR1YoYhWWg7dCdvjtCwK6zBxWDQ==", + "license": "ISC", + "peerDependencies": { + "vue": ">=3.0.1" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.143.0.tgz", + "integrity": "sha512-u6JZdLBTLotrNC9Vd6vPssINdzcCzleKAH6EJKImQb7GtYvX5keN2dxkoK44stCc4tffE6QQRtZTXVSzsLUlWA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.3.tgz", + "integrity": "sha512-zrJtHDcaZJ1Fp7xf4hNl+7seH9Cn/N5TwLYkhgXREtBwAd/jaqW3uqeHxpDugJLVICWg4eW44kOQEGJ1r6jCGw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.3.tgz", + "integrity": "sha512-ieIiibVCp0tX7TLu2cafoNPv8wJyYi01ekXpbf8q2j7F4rGAhhXb/eQh7ge9DRBY78GwmRQtvjZDux7EDbA8kA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.3.tgz", + "integrity": "sha512-Zh9tCon19eDXJoihx0rqKhMUlMYqzwj3aPsSuHmI4RWZh62dWUL+DJN4C5YQya5TcQBJU/Fe8+rY0jhXTQITqA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.3.tgz", + "integrity": "sha512-nGbJWewA1wrXXZiQhjAT5rhibGfns5ZNkDVqxsO6zJ3f3YvpoDNNmGMSbbhLuXKjNScaBJVOAboztAWVespQMg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.3.tgz", + "integrity": "sha512-QNniJr5Kml0kDEB98jiDOJjXNroxIIi0IXIbdYzY26Xt1pVbeP62+KnoIZLwirOymX/0jDk/2gI/bNUv7A7OIw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.3.tgz", + "integrity": "sha512-TkqEAcmmvH3I/q4114NB4RVt6241Dao48pF45uLcFGrwAaIn0iITgTAKP/dLjbN0R4buJjGb91+UHSoFmpgIWw==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.3.tgz", + "integrity": "sha512-NHqjnxpsndf4MPymxteFAWHHfkTL8HjWh1KB7z23ofZ6QO2euONuxDXjat69dKZRALnGypg8k8SsK8vZJoXv1Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.3.tgz", + "integrity": "sha512-6tbrbwfz5GB9DQ4Jwo6hy9v+vR31xZlvzZ6n5Xut6Hhx5PvrA9q/HsK8KMaYQp063iqZGXwNvZtYNLD7EM/x0w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.3.tgz", + "integrity": "sha512-oyuXxXmoZHjXC917IAPFAAv4wWAa0cM9afk8nx1+9/jNNOX1uPf8yDA6p7G0RypOfw/X0PQt5IfoquY1um+zSg==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.3.tgz", + "integrity": "sha512-TytMwF2KVGqP2tgd0I1OY0PAv78dZRAYcF5ssDzjM34SUXCED3uXvSd5+lHoC0bTD6eEdFz7LdQNCO1y0oVk9w==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.3.tgz", + "integrity": "sha512-/E9m3qstrJFVPoULV25mVQblSNExY2+kBsYe4sy0Tn0yOOgJ8wZbZt3KnRbF/XeU2Gl1STKUQnDNTqhIE5MD4A==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.3.tgz", + "integrity": "sha512-Kr0OcsoQI816i6HOl3vFHpd1K0eZyh76zgfj4c1nTyaTsd5r2Mj1lwM4R90y/qaCfmTn9eHy0SKwi98eitRxug==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.3.tgz", + "integrity": "sha512-hOtMwTqnME+/gJcH/PCZ0wn0zPUjiWOgkHpxbSJpfGKMezHltx1S7/k1SitzVa7Ww2cqrDDaFbZEhcJZO8o+Jw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.3.tgz", + "integrity": "sha512-ekcqMMkI2PlhYnfzQnB/cEdYUVVJViWvoUyLrbzgDoi3Snfc1mVBwdnc306ufA5ejy8JSPjT2RlW1nQSjW7efg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@stablelib/aes": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/aes/-/aes-2.0.1.tgz", + "integrity": "sha512-LpDuPe9Cr/IXXJaCHDCAITtVa7uLV6P+Cs3V8lZw87sElX7eOLk1OHTSzzvWagTJf++O+o3EISawHh1uzyi4qw==", + "license": "MIT", + "dependencies": { + "@stablelib/binary": "^2.0.1", + "@stablelib/blockcipher": "^2.0.0", + "@stablelib/wipe": "^2.0.1" + } + }, + "node_modules/@stablelib/binary": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/binary/-/binary-2.0.1.tgz", + "integrity": "sha512-U9iAO8lXgEDONsA0zPPSgcf3HUBNAqHiJmSHgZz62OvC3Hi2Bhc5kTnQ3S1/L+sthDTHtCMhcEiklmIly6uQ3w==", + "license": "MIT", + "dependencies": { + "@stablelib/int": "^2.0.1" + } + }, + "node_modules/@stablelib/blockcipher": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@stablelib/blockcipher/-/blockcipher-2.0.0.tgz", + "integrity": "sha512-c0iMTah5a5KxeqVyf6ejpaRkYanODvGaQn8wgvLLAnY23fHZMjhR6ycQVvasW2nIzAmc+faetpRORJqAfaE/yw==", + "license": "MIT" + }, + "node_modules/@stablelib/cmac": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/cmac/-/cmac-2.0.1.tgz", + "integrity": "sha512-GwR5fie/M3I9BgqDd0mRpoeeoN3e+zrSSpYp/ATVPqQ/gzBZ1EXXkSZU+UBZ2W03sOJylHNW3p6FtXGRSfGdkA==", + "license": "MIT", + "dependencies": { + "@stablelib/blockcipher": "^2.0.0", + "@stablelib/constant-time": "^2.0.1", + "@stablelib/wipe": "^2.0.1" + } + }, + "node_modules/@stablelib/constant-time": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/constant-time/-/constant-time-2.0.1.tgz", + "integrity": "sha512-0NWPogffRm+UWBH0+iM5otZmNrVe5OHFIvyoNIVankMAYOQzMwcdVALOVPrB5Ho0dST+Oc3H8/hPh65Z8R/uew==", + "license": "MIT" + }, + "node_modules/@stablelib/int": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/int/-/int-2.0.1.tgz", + "integrity": "sha512-Ht63fQp3wz/F8U4AlXEPb7hfJOIILs8Lq55jgtD7KueWtyjhVuzcsGLSTAWtZs3XJDZYdF1WcSKn+kBtbzupww==", + "license": "MIT" + }, + "node_modules/@stablelib/wipe": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/wipe/-/wipe-2.0.1.tgz", + "integrity": "sha512-1eU2K9EgOcV4qc9jcP6G72xxZxEm5PfeI5H55l08W95b4oRJaqhmlWRc4xZAm6IVSKhVNxMi66V67hCzzuMTAg==", + "license": "MIT" + }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/chai": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.20.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.1.tgz", + "integrity": "sha512-EANqOCF9QFyra+4pfxUcX9STKJpCLjMbObVzljIJomAWSnuSIEAvyzEU53GaajbXJEgdh0iEcPL+DGvpUd4k1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@types/node-forge": { + "version": "1.3.14", + "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.14.tgz", + "integrity": "sha512-mhVF2BnD4BO+jtOp7z1CdzaK4mbuK0LLQYAvdOLqHTavxFNq4zA1EmYkpnFjP8HOUzedfQkRnp0E2ulSAYSzAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@vitejs/plugin-vue": { + "version": "6.0.8", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-6.0.8.tgz", + "integrity": "sha512-0ZjgOg7oO6farnNGup7yvoM/YXZV84OZxHAwtflItNa/6zzQyVb5LNxyea3FEKEX2XlagIKzrlH7wwxkKgtiew==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rolldown/pluginutils": "^1.0.1" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", + "vue": "^3.2.25" + } + }, + "node_modules/@vitest/expect": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.10.tgz", + "integrity": "sha512-YsCn+qAk1GWjQOWFEsEcL2gNQ0zmVmQu3T03qP6UyjhtmdtwtbuI+DASn/7iQB3HGTXkdBwGddzxPlmiql5vlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.1.0", + "@types/chai": "^5.2.2", + "@vitest/spy": "4.1.10", + "@vitest/utils": "4.1.10", + "chai": "^6.2.2", + "tinyrainbow": "^3.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.10.tgz", + "integrity": "sha512-v0xaezt+DKEmKfaxg133ldzADrwLGd7Ze1MfQQTYfvs8OqZIwbxyxaYURivwV7sWy5fqn3rH5uOrSp07bp44Ow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "4.1.10", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.21" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/mocker/node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/@vitest/pretty-format": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.10.tgz", + "integrity": "sha512-W1HsjSH4MXQ9YfmmhLAoIYf1HRfekQCGngeIgcei6MP5QQGWUe0gkopdZQaVCFO+JDJMrAJGwa5pRpNpvy4P8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^3.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.10.tgz", + "integrity": "sha512-IKI6kpIH+LmpROplyLwBBaCfMgOZOMsygVa6BARD6ahA04VRuJSa6OaVG7kRvSEMD870Vd91rSSw0eegtWyLGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "4.1.10", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.10.tgz", + "integrity": "sha512-xRkfOT1qpTAi/Ti4Y1LtfRc3kEuqxGw59eN2jN9pRWMtS/XDevekhcFSqvQqjUNGksfjMJu3Y+oJ+4Ypn2OaJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "4.1.10", + "@vitest/utils": "4.1.10", + "magic-string": "^0.30.21", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.10.tgz", + "integrity": "sha512-PLf/Ugvoq5wO/b4rwYCR1h2PSIdXz7wnkQFMiUpLdtM7l6pqVFcQIBEHyT1+l+cj7mNwAfZHzqXqDyjvOuwbDw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.10.tgz", + "integrity": "sha512-fy9am/HWxbaGt/Sawrp90vt6Y6jQwf1RX77cz3uwoJwJVMli/e1IEwRPnMNJ7vKfPTwo0diXifkpPvwH9v7nGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "4.1.10", + "convert-source-map": "^2.0.0", + "tinyrainbow": "^3.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@volar/language-core": { + "version": "2.4.28", + "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.4.28.tgz", + "integrity": "sha512-w4qhIJ8ZSitgLAkVay6AbcnC7gP3glYM3fYwKV3srj8m494E3xtrCv6E+bWviiK/8hs6e6t1ij1s2Endql7vzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/source-map": "2.4.28" + } + }, + "node_modules/@volar/source-map": { + "version": "2.4.28", + "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.4.28.tgz", + "integrity": "sha512-yX2BDBqJkRXfKw8my8VarTyjv48QwxdJtvRgUpNE5erCsgEUdI2DsLbpa+rOQVAJYshY99szEcRDmyHbF10ggQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@volar/typescript": { + "version": "2.4.28", + "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.4.28.tgz", + "integrity": "sha512-Ja6yvWrbis2QtN4ClAKreeUZPVYMARDYZl9LMEv1iQ1QdepB6wn0jTRxA9MftYmYa4DQ4k/DaSZpFPUfxl8giw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/language-core": "2.4.28", + "path-browserify": "^1.0.1", + "vscode-uri": "^3.0.8" + } + }, + "node_modules/@vue/compiler-core": { + "version": "3.5.41", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.41.tgz", + "integrity": "sha512-q0Xtv/F9w2YO/7htQhtiL+Ev2WCJbe5N2hc+XfgyKkEKqWpSxknmT8QOuGdEKNdjPq0c3F7rNpFkTo3Kfrm7pg==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.8", + "@vue/shared": "3.5.41", + "entities": "^7.0.1", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.1" + } + }, + "node_modules/@vue/compiler-dom": { + "version": "3.5.41", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.41.tgz", + "integrity": "sha512-oKacVfNglLvGjnS6BXOlGL7EyG2h8X03pqXCjzotRZUaXGjbrTJUnVAQjrCqUnS+lyu31nwQjZY/d817GmCnfw==", + "license": "MIT", + "dependencies": { + "@vue/compiler-core": "3.5.41", + "@vue/shared": "3.5.41" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.5.41", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.41.tgz", + "integrity": "sha512-XJhip7R2wy6vX3knCxdZN4KracFaZUef58s1KYewqluedHIJaPIVfXoYT7MF1F8nCvv6k8bWWxDC8opMkg1VTQ==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.8", + "@vue/compiler-core": "3.5.41", + "@vue/compiler-dom": "3.5.41", + "@vue/compiler-ssr": "3.5.41", + "@vue/shared": "3.5.41", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.21", + "postcss": "^8.5.19", + "source-map-js": "^1.2.1" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.5.41", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.41.tgz", + "integrity": "sha512-U3v5OejKEGqOI0Wy0+Sz7hGuIFZHA4LSXzrNM3IMIeDyJEBBfTpX26n3SDgToRpP2bLc9FfI2j/kSgcJ8Emq5A==", + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.41", + "@vue/shared": "3.5.41" + } + }, + "node_modules/@vue/devtools-api": { + "version": "6.6.4", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.4.tgz", + "integrity": "sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==", + "license": "MIT" + }, + "node_modules/@vue/language-core": { + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-3.3.9.tgz", + "integrity": "sha512-in/68oAa4BCtVY6n/nkuhLIkV8DHYd2UivedJ6cMZ6UYtlq9jaoaSNUBHYCVO44z3nKg7MdE5OBoHKt5SxeBKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/language-core": "2.4.28", + "@vue/compiler-dom": "^3.5.0", + "@vue/shared": "^3.5.0", + "alien-signals": "^3.2.1", + "muggle-string": "^0.4.1", + "path-browserify": "^1.0.1", + "picomatch": "^4.0.4" + } + }, + "node_modules/@vue/reactivity": { + "version": "3.5.41", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.41.tgz", + "integrity": "sha512-rznsqKM0np0x18EjzF8x88MpEhdNsffbvFbckLL5+oUKz1BxAImEmO7J1ArRYSyo6aQaVoBDp7jEkT91OOxydA==", + "license": "MIT", + "dependencies": { + "@vue/shared": "3.5.41" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.5.41", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.41.tgz", + "integrity": "sha512-Vcry58hiAKwGen9Z1jUZE0feFsNArPCMOImYI8el48A9Idf6DuQYD0U05zZIF2Iad1hGhPSvcbBbAOhNr55fhg==", + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.41", + "@vue/shared": "3.5.41" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.5.41", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.41.tgz", + "integrity": "sha512-3vVBahVBS9+U6cmXBLyb8nE6/yYo4J/CGI9eVFs3KiMc0YHuudwKyShTD65jtJy/L9PUUxNAFu4cj4LiJ0UFbw==", + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.41", + "@vue/runtime-core": "3.5.41", + "@vue/shared": "3.5.41", + "csstype": "^3.2.3" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.5.41", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.41.tgz", + "integrity": "sha512-n6hx/pNFfbD6SuyeuMVkvqox8bwf/ET9JlA/kAz/imw8sw++wkqKe2mHX5KutjPpbKE4Z56yTHszoOjGMI9igQ==", + "license": "MIT", + "dependencies": { + "@vue/compiler-ssr": "3.5.41", + "@vue/runtime-dom": "3.5.41", + "@vue/shared": "3.5.41" + } + }, + "node_modules/@vue/shared": { + "version": "3.5.41", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.41.tgz", + "integrity": "sha512-IOnwSCma8j+9xJT6b8H0dEYidC80NsYmNMlZxRsukYcSoGaDBohog5hDxzeUXdFeGWFA++vWvxqOmrr96VlqMA==", + "license": "MIT" + }, + "node_modules/alien-signals": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/alien-signals/-/alien-signals-3.2.1.tgz", + "integrity": "sha512-I8FjmltrfnDFoZedi5CG8DghVYNhzb/Ijluz7tCSJH0xpd0484Kowhbb1XDYOxfJpU1p5wnM2X54dA+IfGyD1g==", + "dev": true, + "license": "MIT" + }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/chai": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", + "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "license": "MIT" + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/es-module-lexer": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.1.tgz", + "integrity": "sha512-shc1dbU90Yl/xq1QrC7QRtfcwURZuVRfPhZbDoldJ1cn1gzDvBaBWlv0eFolj5+0znnPJz5TXLxsN77X/12KTA==", + "dev": true, + "license": "MIT" + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "license": "MIT" + }, + "node_modules/expect-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", + "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/muggle-string": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/muggle-string/-/muggle-string-0.4.1.tgz", + "integrity": "sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.17", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.17.tgz", + "integrity": "sha512-xQLf0A3HOMlgHq0n247/LRuAOYmB7dXJ/DvAxGvsSBij45XtBSmQycu+F8ODbHwns/XyFZagyL1+J0Offw1E0g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-forge": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.4.0.tgz", + "integrity": "sha512-LarFH0+6VfriEhqMMcLX2F7SwSXeWwnEAJEsYm5QKWchiVYVvJyV9v7UDvUv+w5HO23ZpQTXDv/GxdDdMyOuoQ==", + "license": "(BSD-3-Clause OR GPL-2.0)", + "engines": { + "node": ">= 6.13.0" + } + }, + "node_modules/obug": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.4.tgz", + "integrity": "sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA==", + "dev": true, + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], + "license": "MIT", + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dev": true, + "license": "MIT" + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.26", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz", + "integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.17", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/rolldown": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.3.tgz", + "integrity": "sha512-rn9wpmxplLf7NLNyCk9FyWh3FM43DbY8jOzCdEPzH7uflhTftRbCEpqi6Ly2osgoU8OwObtmavMbWLaWy4LX7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.143.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm64": "1.2.3", + "@rolldown/binding-darwin-arm64": "1.2.3", + "@rolldown/binding-darwin-x64": "1.2.3", + "@rolldown/binding-freebsd-x64": "1.2.3", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.3", + "@rolldown/binding-linux-arm64-gnu": "1.2.3", + "@rolldown/binding-linux-arm64-musl": "1.2.3", + "@rolldown/binding-linux-ppc64-gnu": "1.2.3", + "@rolldown/binding-linux-s390x-gnu": "1.2.3", + "@rolldown/binding-linux-x64-gnu": "1.2.3", + "@rolldown/binding-linux-x64-musl": "1.2.3", + "@rolldown/binding-openharmony-arm64": "1.2.3", + "@rolldown/binding-win32-arm64-msvc": "1.2.3", + "@rolldown/binding-win32-x64-msvc": "1.2.3" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true, + "license": "ISC" + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/std-env": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.2.0.tgz", + "integrity": "sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.0.tgz", + "integrity": "sha512-QKAl9m8gWWGHV8jZcPeym6j+XULi6tOf1mT83WYJ4Lk2ytW/uwAWkrP0uFsdoYMdueVJ0qs26wZ+23xeB4ibNQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyrainbow": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.1.tgz", + "integrity": "sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/typescript": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "devOptional": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/vite": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.2.1.tgz", + "integrity": "sha512-EU/eS7BH3XROHh2YnBefjM6DBKA6ZeMZEYQbj7NLWg5wHYlhB8B/Mayd5XsgWq+NFYccDOTemRpdETWR6Ka/lw==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.33.0", + "picomatch": "^4.0.5", + "postcss": "^8.5.25", + "rolldown": "~1.2.1", + "tinyglobby": "^0.2.17" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.4.0", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vitest": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.10.tgz", + "integrity": "sha512-R9jUTe5S4Qb0HCd4TNqpC7oGcrMssMRGXLW80ubjWsW9VH5GF8y1Y0SFLY9AbqSk6nt0PnOx4H4WNJYZ13GUPw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "4.1.10", + "@vitest/mocker": "4.1.10", + "@vitest/pretty-format": "4.1.10", + "@vitest/runner": "4.1.10", + "@vitest/snapshot": "4.1.10", + "@vitest/spy": "4.1.10", + "@vitest/utils": "4.1.10", + "es-module-lexer": "^2.0.0", + "expect-type": "^1.3.0", + "magic-string": "^0.30.21", + "obug": "^2.1.1", + "pathe": "^2.0.3", + "picomatch": "^4.0.3", + "std-env": "^4.0.0-rc.1", + "tinybench": "^2.9.0", + "tinyexec": "^1.0.2", + "tinyglobby": "^0.2.15", + "tinyrainbow": "^3.1.0", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@opentelemetry/api": "^1.9.0", + "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", + "@vitest/browser-playwright": "4.1.10", + "@vitest/browser-preview": "4.1.10", + "@vitest/browser-webdriverio": "4.1.10", + "@vitest/coverage-istanbul": "4.1.10", + "@vitest/coverage-v8": "4.1.10", + "@vitest/ui": "4.1.10", + "happy-dom": "*", + "jsdom": "*", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@opentelemetry/api": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser-playwright": { + "optional": true + }, + "@vitest/browser-preview": { + "optional": true + }, + "@vitest/browser-webdriverio": { + "optional": true + }, + "@vitest/coverage-istanbul": { + "optional": true + }, + "@vitest/coverage-v8": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + }, + "vite": { + "optional": false + } + } + }, + "node_modules/vscode-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.1.0.tgz", + "integrity": "sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/vue": { + "version": "3.5.41", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.41.tgz", + "integrity": "sha512-2laE0p+aK+/AOPG/XL/WepOs/GlK755LJ1XECi9kDUrz1FKNw8rb2Xzlw9JS1rqEV55nb0ttsKxVlTCcd+R5cg==", + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.41", + "@vue/compiler-sfc": "3.5.41", + "@vue/runtime-dom": "3.5.41", + "@vue/server-renderer": "3.5.41", + "@vue/shared": "3.5.41" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/vue-router": { + "version": "4.6.4", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.6.4.tgz", + "integrity": "sha512-Hz9q5sa33Yhduglwz6g9skT8OBPii+4bFn88w6J+J4MfEo4KRRpmiNG/hHHkdbRFlLBOqxN8y8gf2Fb0MTUgVg==", + "license": "MIT", + "dependencies": { + "@vue/devtools-api": "^6.6.4" + }, + "funding": { + "url": "https://github.com/sponsors/posva" + }, + "peerDependencies": { + "vue": "^3.5.0" + } + }, + "node_modules/vue-tsc": { + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-3.3.9.tgz", + "integrity": "sha512-TS3Y1ux/IRoE8OCP2PpACAeOseuIs0UvWrcr7u+w3PmfY+SlCfEf8zjrBgnQksHUgLpthi5vHlffcQTQTdPBZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/typescript": "2.4.28", + "@vue/language-core": "3.3.9" + }, + "bin": { + "vue-tsc": "bin/vue-tsc.js" + }, + "peerDependencies": { + "typescript": ">=5.0.0" + } + }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/xml-formatter": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/xml-formatter/-/xml-formatter-3.7.0.tgz", + "integrity": "sha512-+8qTc3zv2UcJ1v9IsSIce37Dl4MQG14Cp7tWrwmy202UaI1wqRukw5QMX1JHsV+DX64yw77EgGsj2s5wGvuMbQ==", + "license": "MIT", + "dependencies": { + "xml-parser-xo": "^4.1.5" + }, + "engines": { + "node": ">= 16" + } + }, + "node_modules/xml-parser-xo": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/xml-parser-xo/-/xml-parser-xo-4.1.6.tgz", + "integrity": "sha512-mXbSNSM+rIwndoxSwmFa83bOdeP8G/cOGr7XvxA67X7ebCzoAuVez9JYDCDub3zRDNBZxIbfjuXLSsamr7NfwQ==", + "license": "MIT", + "engines": { + "node": ">= 20" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..43f5d13 --- /dev/null +++ b/package.json @@ -0,0 +1,36 @@ +{ + "name": "personal-web-tools", + "version": "0.0.5", + "private": true, + "type": "module", + "engines": { + "node": ">=22.12.0" + }, + "scripts": { + "dev": "vite --host 0.0.0.0", + "typecheck": "vue-tsc -b", + "build": "npm run typecheck && vite build", + "check": "npm test && npm run build", + "test": "vitest run --config vitest.config.ts", + "test:watch": "vitest --config vitest.config.ts", + "start": "node server/index.mjs" + }, + "dependencies": { + "@lucide/vue": "^1.29.0", + "@stablelib/aes": "^2.0.1", + "@stablelib/cmac": "^2.0.1", + "node-forge": "^1.4.0", + "vue": "^3.5.13", + "vue-router": "^4.5.0", + "xml-formatter": "^3.6.6" + }, + "devDependencies": { + "@types/node": "^22.10.5", + "@types/node-forge": "^1.3.14", + "@vitejs/plugin-vue": "^6.0.8", + "typescript": "^5.8.3", + "vite": "^8.2.1", + "vitest": "^4.1.10", + "vue-tsc": "^3.3.9" + } +} diff --git a/server/index.mjs b/server/index.mjs new file mode 100644 index 0000000..d4ff27c --- /dev/null +++ b/server/index.mjs @@ -0,0 +1,203 @@ +import { createReadStream } from 'node:fs' +import { stat } from 'node:fs/promises' +import { createServer } from 'node:http' +import path from 'node:path' +import { pipeline } from 'node:stream/promises' +import { fileURLToPath } from 'node:url' +import { + loadCatalog, + loadDefaultNavigation, + readOrCreateNavigation, + validateNavigation, + writeJsonAtomic, +} from './navigation.mjs' + +const serverFile = fileURLToPath(import.meta.url) +const serverDir = path.dirname(serverFile) +const projectRoot = path.resolve(serverDir, '..') +export const MAX_JSON_BODY_SIZE = 64 * 1024 + +const mimeTypes = new Map([ + ['.css', 'text/css; charset=utf-8'], + ['.html', 'text/html; charset=utf-8'], + ['.ico', 'image/x-icon'], + ['.js', 'text/javascript; charset=utf-8'], + ['.json', 'application/json; charset=utf-8'], + ['.map', 'application/json; charset=utf-8'], + ['.png', 'image/png'], + ['.svg', 'image/svg+xml'], + ['.txt', 'text/plain; charset=utf-8'], + ['.woff2', 'font/woff2'], +]) + +function applySecurityHeaders(response) { + response.setHeader('Content-Security-Policy', "default-src 'self'; img-src 'self' blob: data:; style-src 'self'; script-src 'self'; font-src 'self'; connect-src 'self'; object-src 'none'; base-uri 'none'; form-action 'self'; frame-ancestors 'none'") + response.setHeader('Cross-Origin-Opener-Policy', 'same-origin') + response.setHeader('Permissions-Policy', 'camera=(), microphone=(), geolocation=()') + response.setHeader('Referrer-Policy', 'no-referrer') + response.setHeader('X-Content-Type-Options', 'nosniff') + response.setHeader('X-Frame-Options', 'DENY') +} + +function sendJson(response, statusCode, payload, headers = {}) { + const body = `${JSON.stringify(payload)}\n` + response.statusCode = statusCode + response.setHeader('Cache-Control', 'no-store') + response.setHeader('Content-Type', 'application/json; charset=utf-8') + response.setHeader('Content-Length', Buffer.byteLength(body)) + for (const [name, value] of Object.entries(headers)) response.setHeader(name, value) + response.end(body) +} + +function sendText(response, statusCode, body, headers = {}) { + response.statusCode = statusCode + response.setHeader('Cache-Control', 'no-store') + response.setHeader('Content-Type', 'text/plain; charset=utf-8') + response.setHeader('Content-Length', Buffer.byteLength(body)) + for (const [name, value] of Object.entries(headers)) response.setHeader(name, value) + response.end(body) +} + +async function readJsonBody(request) { + const contentLength = Number(request.headers['content-length']) + if (Number.isFinite(contentLength) && contentLength > MAX_JSON_BODY_SIZE) throw new Error('请求内容过大') + + const chunks = [] + let size = 0 + for await (const chunk of request) { + size += chunk.length + if (size > MAX_JSON_BODY_SIZE) throw new Error('请求内容过大') + chunks.push(chunk) + } + return JSON.parse(Buffer.concat(chunks).toString('utf8')) +} + +function isMissingFile(error) { + return error?.code === 'ENOENT' || error?.code === 'ENOTDIR' +} + +function acceptsHtmlNavigation(request, pathname) { + if (path.extname(pathname)) return false + return String(request.headers.accept || '').split(',').some((value) => value.trim().toLowerCase().startsWith('text/html')) +} + +async function serveStatic(request, response, staticRoot) { + const url = new URL(request.url, 'http://localhost') + let pathname + try { + pathname = decodeURIComponent(url.pathname) + } catch { + sendText(response, 400, 'Bad request\n') + return + } + + const requested = pathname === '/' ? '/index.html' : pathname + const candidate = path.resolve(staticRoot, `.${requested}`) + if (!candidate.startsWith(`${staticRoot}${path.sep}`)) { + sendText(response, 403, 'Forbidden\n') + return + } + + let filePath = candidate + let details + try { + details = await stat(filePath) + } catch (error) { + if (!isMissingFile(error)) throw error + } + if (!details?.isFile()) { + if (!acceptsHtmlNavigation(request, pathname)) { + sendText(response, 404, 'Not found\n') + return + } + filePath = path.join(staticRoot, 'index.html') + details = await stat(filePath) + if (!details.isFile()) throw new Error('静态入口文件不存在') + } + + response.statusCode = 200 + response.setHeader('Content-Type', mimeTypes.get(path.extname(filePath).toLowerCase()) || 'application/octet-stream') + response.setHeader('Content-Length', details.size) + if (path.basename(filePath) === 'index.html') response.setHeader('Cache-Control', 'no-cache') + else response.setHeader('Cache-Control', 'public, max-age=31536000, immutable') + if (request.method === 'HEAD') { + response.end() + return + } + await pipeline(createReadStream(filePath), response) +} + +export async function createWebToolsServer(options = {}) { + const staticRoot = path.resolve(options.staticRoot || path.join(projectRoot, 'dist')) + const dataDir = path.resolve(options.dataDir || process.env.DATA_DIR || path.join(projectRoot, 'data')) + const navigationPath = path.join(dataDir, 'navigation.json') + const catalog = options.catalog || await loadCatalog() + const defaults = options.defaults || await loadDefaultNavigation() + const logger = options.logger || console + + return createServer(async (request, response) => { + applySecurityHeaders(response) + try { + const url = new URL(request.url, 'http://localhost') + if (request.method === 'GET' && url.pathname === '/healthz') { + sendJson(response, 200, { status: 'ok' }) + return + } + if (url.pathname === '/api/navigation') { + if (request.method === 'GET') { + sendJson(response, 200, await readOrCreateNavigation(navigationPath, catalog, defaults)) + return + } + if (request.method === 'PUT') { + if (request.headers['sec-fetch-site'] === 'cross-site') { + sendJson(response, 403, { error: '不允许跨站写入配置' }) + return + } + let navigation + try { + navigation = validateNavigation(await readJsonBody(request), catalog) + } catch (error) { + sendJson(response, 400, { error: error instanceof Error ? error.message : '配置格式无效' }) + return + } + await writeJsonAtomic(navigationPath, navigation) + sendJson(response, 200, navigation) + return + } + sendJson(response, 405, { error: '请求方法不支持' }, { Allow: 'GET, PUT' }) + return + } + if (url.pathname.startsWith('/api/')) { + sendJson(response, 404, { error: '接口不存在' }) + return + } + if (request.method !== 'GET' && request.method !== 'HEAD') { + sendText(response, 405, '', { Allow: 'GET, HEAD' }) + return + } + await serveStatic(request, response, staticRoot) + } catch (error) { + logger.error(error) + if (response.headersSent) response.destroy() + else sendJson(response, 500, { error: '服务器错误' }) + } + }) +} + +export async function startWebToolsServer() { + const host = process.env.HOST || '0.0.0.0' + const port = Number(process.env.PORT || 8080) + const server = await createWebToolsServer() + server.listen(port, host, () => { + console.log(`Web Tools listening on http://${host}:${port}`) + console.log(`Navigation config: ${path.resolve(process.env.DATA_DIR || path.join(projectRoot, 'data'), 'navigation.json')}`) + }) + return server +} + +if (process.argv[1] && path.resolve(process.argv[1]) === serverFile) { + startWebToolsServer().catch((error) => { + console.error(error) + process.exitCode = 1 + }) +} diff --git a/server/navigation.mjs b/server/navigation.mjs new file mode 100644 index 0000000..f283d5d --- /dev/null +++ b/server/navigation.mjs @@ -0,0 +1,115 @@ +import { randomUUID } from 'node:crypto' +import { mkdir, open, readFile, rename, unlink } from 'node:fs/promises' +import path from 'node:path' +import { fileURLToPath } from 'node:url' + +const serverDir = path.dirname(fileURLToPath(import.meta.url)) +const projectRoot = path.resolve(serverDir, '..') + +async function readJson(filePath) { + return JSON.parse(await readFile(filePath, 'utf8')) +} + +export async function loadCatalog() { + return readJson(path.join(projectRoot, 'shared', 'tool-catalog.json')) +} + +export async function loadDefaultNavigation() { + return readJson(path.join(projectRoot, 'shared', 'default-navigation.json')) +} + +export function normalizeNavigation(input, catalog, defaults) { + const categoryIds = new Set(catalog.categories.map((category) => category.id)) + const toolById = new Map(catalog.tools.map((tool) => [tool.id, tool])) + const seenCategories = new Set() + const seenTools = new Set() + const categories = [] + + const inputCategories = Array.isArray(input?.categories) ? input.categories : [] + for (const candidate of inputCategories) { + if (!candidate || !categoryIds.has(candidate.id) || seenCategories.has(candidate.id)) continue + seenCategories.add(candidate.id) + const tools = [] + for (const toolId of Array.isArray(candidate.tools) ? candidate.tools : []) { + if (!toolById.has(toolId) || seenTools.has(toolId)) continue + seenTools.add(toolId) + tools.push(toolId) + } + categories.push({ id: candidate.id, tools }) + } + + for (const defaultCategory of defaults.categories) { + if (!seenCategories.has(defaultCategory.id)) { + seenCategories.add(defaultCategory.id) + categories.push({ id: defaultCategory.id, tools: [] }) + } + } + + for (const tool of catalog.tools) { + if (seenTools.has(tool.id)) continue + const preferred = categories.find((category) => category.id === tool.category) ?? categories[0] + preferred?.tools.push(tool.id) + seenTools.add(tool.id) + } + + return { version: 1, categories } +} + +export function validateNavigation(input, catalog) { + if (!input || input.version !== 1 || !Array.isArray(input.categories)) { + throw new Error('配置格式无效') + } + const validCategories = new Set(catalog.categories.map((category) => category.id)) + const validTools = new Set(catalog.tools.map((tool) => tool.id)) + const seenCategories = new Set() + const seenTools = new Set() + + for (const category of input.categories) { + if (!category || !validCategories.has(category.id) || seenCategories.has(category.id)) { + throw new Error(`分类无效或重复:${category?.id ?? 'unknown'}`) + } + if (!Array.isArray(category.tools)) throw new Error(`分类 ${category.id} 缺少工具列表`) + seenCategories.add(category.id) + for (const toolId of category.tools) { + if (!validTools.has(toolId) || seenTools.has(toolId)) throw new Error(`工具无效或重复:${toolId}`) + seenTools.add(toolId) + } + } + + if (seenCategories.size !== validCategories.size || seenTools.size !== validTools.size) { + throw new Error('配置必须包含全部分类和工具') + } + return input +} + +export async function writeJsonAtomic(filePath, value, operations = { mkdir, open, rename, unlink }) { + const serialized = `${JSON.stringify(value, null, 2)}\n` + const temporaryPath = `${filePath}.${randomUUID()}.tmp` + let handle + try { + await operations.mkdir(path.dirname(filePath), { recursive: true }) + handle = await operations.open(temporaryPath, 'wx', 0o600) + await handle.writeFile(serialized, 'utf8') + await handle.sync() + await handle.close() + handle = undefined + await operations.rename(temporaryPath, filePath) + } catch (error) { + if (handle) await handle.close().catch(() => undefined) + await operations.unlink(temporaryPath).catch(() => undefined) + throw error + } +} + +export async function readOrCreateNavigation(filePath, catalog, defaults) { + let current + try { + current = await readJson(filePath) + } catch (error) { + if (error?.code !== 'ENOENT') throw error + current = defaults + } + const normalized = normalizeNavigation(current, catalog, defaults) + if (JSON.stringify(current) !== JSON.stringify(normalized)) await writeJsonAtomic(filePath, normalized) + return normalized +} diff --git a/shared/default-navigation.json b/shared/default-navigation.json new file mode 100644 index 0000000..7a33150 --- /dev/null +++ b/shared/default-navigation.json @@ -0,0 +1,10 @@ +{ + "version": 1, + "categories": [ + { "id": "encoding", "tools": ["ascii-hex", "base64"] }, + { "id": "checksum", "tools": ["crc"] }, + { "id": "crypto", "tools": ["aes-cmac", "rsa-key-pair", "random"] }, + { "id": "formatting", "tools": ["json", "xml"] }, + { "id": "image", "tools": ["png-ico"] } + ] +} diff --git a/shared/tool-catalog.json b/shared/tool-catalog.json new file mode 100644 index 0000000..f60c019 --- /dev/null +++ b/shared/tool-catalog.json @@ -0,0 +1,75 @@ +{ + "version": 1, + "categories": [ + { "id": "encoding", "title": "编码转换" }, + { "id": "checksum", "title": "校验计算" }, + { "id": "crypto", "title": "加密计算" }, + { "id": "formatting", "title": "格式化" }, + { "id": "image", "title": "图像处理" } + ], + "tools": [ + { + "id": "ascii-hex", + "title": "ASCII / Hex", + "category": "encoding", + "description": "在 UTF-8 文本与十六进制字节之间转换。", + "icon": "Binary" + }, + { + "id": "base64", + "title": "Base64", + "category": "encoding", + "description": "编码、解码并校验 Base64 内容。", + "icon": "FileCode2" + }, + { + "id": "aes-cmac", + "title": "AES-128-CMAC", + "category": "crypto", + "description": "使用 128 位密钥计算消息认证码。", + "icon": "ShieldCheck" + }, + { + "id": "rsa-key-pair", + "title": "RSA 密钥对", + "category": "crypto", + "description": "生成 RSA 密钥对并导出 PEM 与 N/E 参数。", + "icon": "KeyRound" + }, + { + "id": "random", + "title": "安全随机数", + "category": "crypto", + "description": "生成指定字节长度的密码学安全随机数。", + "icon": "Dices" + }, + { + "id": "crc", + "title": "CRC", + "category": "checksum", + "description": "解析 BIN 或 Intel HEX 数据并计算 CRC。", + "icon": "BadgeCheck" + }, + { + "id": "json", + "title": "JSON", + "category": "formatting", + "description": "格式化、压缩并校验 JSON 字符串。", + "icon": "Braces" + }, + { + "id": "xml", + "title": "XML", + "category": "formatting", + "description": "格式化、压缩并校验 XML 字符串。", + "icon": "Code2" + }, + { + "id": "png-ico", + "title": "PNG → ICO", + "category": "image", + "description": "在浏览器本地生成多尺寸 ICO 图标。", + "icon": "Image" + } + ] +} diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..cfebe66 --- /dev/null +++ b/src/App.vue @@ -0,0 +1,70 @@ + + + diff --git a/src/components/AppSidebar.vue b/src/components/AppSidebar.vue new file mode 100644 index 0000000..4f02232 --- /dev/null +++ b/src/components/AppSidebar.vue @@ -0,0 +1,53 @@ + + + diff --git a/src/components/ModeTabs.vue b/src/components/ModeTabs.vue new file mode 100644 index 0000000..70b938a --- /dev/null +++ b/src/components/ModeTabs.vue @@ -0,0 +1,27 @@ + + + diff --git a/src/components/SyntaxViewer.vue b/src/components/SyntaxViewer.vue new file mode 100644 index 0000000..c49d18b --- /dev/null +++ b/src/components/SyntaxViewer.vue @@ -0,0 +1,28 @@ + + + diff --git a/src/components/TextEditor.vue b/src/components/TextEditor.vue new file mode 100644 index 0000000..3159759 --- /dev/null +++ b/src/components/TextEditor.vue @@ -0,0 +1,41 @@ + + +