diff --git a/README.md b/README.md index 5976394..c1a8c4f 100755 --- a/README.md +++ b/README.md @@ -196,20 +196,21 @@ idh mcp --target 1 --endpoint http://127.0.0.1:8088 ### 越狱版设备会话 -在 IOSDecryptHub Manager 中启用设备会话模式并复制只读凭证。通过已授权的调试通道把设备的 `127.0.0.1:8088` 转发到 PC 本机,将凭证设置为 `IDH_DEVICE_SESSION_TOKEN`。`mcp`、`call`、`tools` 认出 `device` 后共用这一条连接。配对凭证只发给 `127.0.0.1`。 +`idhjd` 只绑设备回环 `127.0.0.1:8088`,没有自定义认证——与 frida-server 同一模型,信任来自传输层: -使用 `idh panel` 打开电脑端原版工作台。要编辑「设置 → 配置 JSON」和「日志」中的会话限额,再从 Manager 复制独立的设备设置凭证,并传入启动面板的 `IDH_DEVICE_SETTINGS_TOKEN`。只读凭证不能保存配置。写入持续保存在设备上,从下一场会话起生效。 +- **USB**:`idh connect usb`(或 `usb:`)经 usbmuxd 直连,插线即授权,等同 `frida -U`。`IDH_USBMUXD` 可指向其他机器的 usbmuxd(`host:port` 或 unix socket 路径,例如经 SSH 转发的 macOS `/var/run/usbmuxd`)。 +- **SSH 转发**:`ssh -L 8088:127.0.0.1:8088 root@` 后用 `idh connect 127.0.0.1:8088`。 +- **局域网**:设备上由 root 创建 `/private/var/db/idhjd-v1/listen-remote` 并重启 idhjd 后绑 `0.0.0.0`,等同 `frida-server -l`;之后 `idh connect :8088`。默认不开。 ```bash -idh mcp --endpoint http://127.0.0.1:8088 -idh call list_sessions --endpoint http://127.0.0.1:8088 +idh connect usb +idh mcp --endpoint usb +idh call list_sessions --endpoint usb: ``` -`idh mcp --device-session --endpoint http://127.0.0.1:8088` 仍可用。旧包没有 `/health` 时用这个别名。多条连接时用地址或连接 ID 指定。App 仍用 `--target `。 +`idh mcp --device-session --endpoint ` 仍可用作别名。多条连接时用地址或连接 ID 指定。App 仍用 `--target `。 -目标 App 退出后,上述三个只读工具仍能读已保存摘要。关闭会话模式会撤销会话配对,之后读取失败。服务重启或重新配对后,更新客户端使用的凭证。 - -`get_process_identity` 不使用这把会话凭证。它读取某个在线进程,凭证放在 `IDH_PROCESS_TOKEN`,同样只发到 `127.0.0.1`。同一个 App 有多个进程时,参数里带上 `processGeneration`。 +目标 App 退出后,只读工具仍能读已保存摘要。关闭会话模式不影响连接本身。 ## 连接状态 diff --git a/panel/.gitignore b/panel/.gitignore new file mode 100644 index 0000000..f06235c --- /dev/null +++ b/panel/.gitignore @@ -0,0 +1,2 @@ +node_modules +dist diff --git a/panel/index.html b/panel/index.html new file mode 100644 index 0000000..c52c71d --- /dev/null +++ b/panel/index.html @@ -0,0 +1,15 @@ + + + + + + + + + IOSDecryptHub + + +
+ + + diff --git a/panel/package-lock.json b/panel/package-lock.json new file mode 100644 index 0000000..f279d5f --- /dev/null +++ b/panel/package-lock.json @@ -0,0 +1,1414 @@ +{ + "name": "idh-panel", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "idh-panel", + "version": "0.1.0", + "dependencies": { + "vue": "3.5" + }, + "devDependencies": { + "@vitejs/plugin-vue": "^5.2.4", + "typescript": "5.7", + "vite": "^6.4.6", + "vite-plugin-singlefile": "^2.3.4" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.15", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.15.tgz", + "integrity": "sha512-C2FuapQ2Kh1OnVHAoLi5rD3GBJ8COb9Q609T6HEpLqaBAo560PDP5OxBE5dCI/h951MBO/+bCUYU5SZ+8ZlV+w==", + "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.15", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.15.tgz", + "integrity": "sha512-RpKWyisHoP81twtSCgmE02iU0RnPcq1DN5bBEbpUePrjA9Q3wXhufnCJrrayPpoZieqFh3zyZQqwtSK0gGccRA==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.15" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.15", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.15.tgz", + "integrity": "sha512-/XKpKDakL//LZ66bq1XsZOswuqeI5MZqPLDu18o3XdkU1fNJ7bdPtzgnc4ZNS+bBGHV0FJG8jjb8SwcC3nNVQQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.15", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.68.8.tgz", + "integrity": "sha512-7l9FdeCGjhmMTVePgndK4t9u5tLR+VuTTMoyc0PscqZDdYjS07ZsQ0vQYsWsODu/ZZYPG7WVJwbUZ77n1hVT+w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.68.8.tgz", + "integrity": "sha512-kXkkIiJujBjArHwEToz99BQqIqibn4xdV6SjsoaxuZzvLUCVEzoHQ1Lp62m7xOhpLRpWpCtxL2ZUy/ADKuz9/g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-x64": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-x64/-/rollup-android-x64-4.68.8.tgz", + "integrity": "sha512-KYoBygnHs3zUOLR0z7SaqhMnUrSF9pbuTOJT/uHK3PrgCXdv/xaMubZD8jCpg6NTo46deasLgZRq38xFTyu8uw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.68.8.tgz", + "integrity": "sha512-YmBUNjgm5bsjOByO+H1TFbuGZe+ZnHcYtPXYj9+L1cwTu/BG8zjuUzO2PH9KwS85P0UH+WJDSb+mQ2hqjp5uBQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.68.8.tgz", + "integrity": "sha512-XMX5ybuOmkwiM13KJtsBxakZ69pyaR9thRYU2fMejhaB0VuzLMIkIc+9TBsu2rv34eEf6XaSMOaLOyEgHGWHTQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.68.8.tgz", + "integrity": "sha512-WuBXScWJDaqPJKwVrotUe1sM9DHWMN937C23RClt0MVHVt7A1rBy285ZfZTLccPEVMxmGJMt2jvdHMOI33lrKA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.68.8.tgz", + "integrity": "sha512-kegwGqP3rMenEMaKo8OzMBb5WvLW2h2jrQ3iKuYptTTF8C/yuxz+hinjBPrtYuIPLJDwxHc/hv2e4u5pmrqo9A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.68.8.tgz", + "integrity": "sha512-Qct0oLM1zGNbvqs1udQnuchg+Q9uHbkMcQqCfs3M7foNn7HvEkUypfFn9o5fklimUI5OF3A2nMknd4/vrEyeVg==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.68.8.tgz", + "integrity": "sha512-xTH5vD+lW/5MU3kL/Op8RSSG/O9fxUQZuJcSBmmBeYem9uXYvCq6PDHx/oDSNeyLD/p4pGujG2PVI0R8MjAhSw==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.68.8.tgz", + "integrity": "sha512-lPPStmynSHvwWpSrAsuemPFB+EWFObXjwz44EK4Hph47U6SBAk1Kehq5MkI7i8EYVjrXddaAV7YkJH8mX8QSZQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.68.8.tgz", + "integrity": "sha512-kZkvIYAihM6l6M+giSUHayDDf/JL+TYR5bYWiAX7/jUFWvMkMmysA4GV2F0HOsXQNEyctW3x1xLjww1GqW7Q1w==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.68.8.tgz", + "integrity": "sha512-XZKLEIY977OJr6zUtK6nlQcLXme34c8HqVp3+WmKQxKVN6Nj+b9qE3ZHWIDHXznHJsGl2AsaMOgB0GL0fkZGUg==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.68.8.tgz", + "integrity": "sha512-+sN+Fj6F9suk8SkL6boIfXDmj9iJwSKPCTeCy8/pfTOHuzNX+duhTb9uyj6154oVK8Odl5zgL4DXRZzXjsRKcw==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.68.8.tgz", + "integrity": "sha512-EBCu3uDFaGwSodUl+XR8yubvVFUkSo6QK9YAIOV1vljqntzTF2/mXLM6utgLaSGf/8oM+qEe8Ai0Jd4+tyMoIQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.68.8.tgz", + "integrity": "sha512-hRC0jWdsLBckCijx2wiUfk7zW1SqEW47yMsCNoDGmQfoqq0AjW+9UYZqxg3LTmG76PyHNdNGBSuspB3CqrhGIA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.68.8.tgz", + "integrity": "sha512-OZKrTRWyGnLITUTipbeXDdtb2dxQPyFk/Fbw9qER8pIvd2Ja9hHELkY0Fv5p9yYYkimqtzVhApKKXGv0cWGQGw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.68.8.tgz", + "integrity": "sha512-HmhSRSQ+dOeOntPfmYux4rCpOQLtsGbcGLQu4nm8ig3tuVqe/bKfDHorg36LKAqYq4X/nwFr79ImtaFHHsn4ug==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.68.8.tgz", + "integrity": "sha512-wk1Ci1hsMREaBELoKPSnzRAh1oUULI+8kfb2F5vVmTD2IcfR9AKMskCusizZhIAvojOtPZihPj4OdKy6ifZwhQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.68.8.tgz", + "integrity": "sha512-mDufoUJ6fnKZnCyjV3sGEDvXQQkM6j1UmINHheGX4Emau3TZWJzX3sCVmbzkNB+W2G84BiFQdDCcF09lv0i0VA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.68.8.tgz", + "integrity": "sha512-7EGVL9rYRYQZe3UC8JQzfBN9rxk484Rfs4u/yGWumTYKUdJt6tmdP+0Y3qHvAvzJCQ+JQM5rSqZbVyrJARlGpA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.68.8.tgz", + "integrity": "sha512-Umklz+QSGwKWQVlVrsMJrwFx1oNRYHgrxSGiZM8pJCMpzWnMDMinDhPILf0BvRXfA1QOArsDcs+AE7Jd6dQxvA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.68.8.tgz", + "integrity": "sha512-BlRp6uzQDK5rczAdaXQ8dlSIRFRlkDRBqpb8GGtv8iwZxQdOjoigdFU5t5dcxpnpU0caMoT9mH27MyAl4dWwKw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.68.8.tgz", + "integrity": "sha512-Sc8Mkf/fVfcV0hBJNDRIM82BjS4kJn2Of0jP8dgQ+TodquxtCZ/5D6FgSsY3uN5IBmNi8Zrb/OHd60IEYKaw+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.68.8.tgz", + "integrity": "sha512-XPTFXclN+I+Cfu3ONWDsw+uvgSZjTJa1B2u2EvtdKlSdgNU6mrOZdgeaMkvN+2T2KPTEXn6fnRY8IODlRg3/Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.68.8.tgz", + "integrity": "sha512-63dWiHgvpWcienfdr465lT3SIn4u3535vbDfaLKhSn0F2KJ06bbcUsewDGJZUPZCbJ67qESrPDhb85UnWdb5ew==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.68.8.tgz", + "integrity": "sha512-/W1LBsMeQAdiCuH3Z2gkRspl3mlxL+butknhq4vXjmxO45vuT08BqhehxDoE4YS+m6s9lhpq6M9/PjTEAg8PYw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/estree": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.10.tgz", + "integrity": "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@vitejs/plugin-vue": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.2.4.tgz", + "integrity": "sha512-7Yx/SXSOcQq5HiiV3orevHUFn+pmMB4cgbEkDYgnkUWb0WfeQ/wa2yFv6D5ICiCQOVpjA7vYDXrC7AGO8yjDHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "vite": "^5.0.0 || ^6.0.0", + "vue": "^3.2.25" + } + }, + "node_modules/@vue/compiler-core": { + "version": "3.5.46", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.46.tgz", + "integrity": "sha512-yb+N8/mgBcoeqCJPVyJI/D3OphLrSMXnB3ZQUNmRLU/1fsMW4bFfdJWNi9oIj7+EA3ULKKkP7b/VCpcYQYeiuQ==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.12", + "@vue/shared": "3.5.46", + "entities": "^7.0.1", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.3" + } + }, + "node_modules/@vue/compiler-dom": { + "version": "3.5.46", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.46.tgz", + "integrity": "sha512-Bj3lCSw3DQnDRDxw115XqdLDd0+18Nftlgd8OXSGG+ud74hxJIE17eYrM+VWgQrTMsvJbLh9Hzf2MkwAzru36Q==", + "license": "MIT", + "dependencies": { + "@vue/compiler-core": "3.5.46", + "@vue/shared": "3.5.46" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.5.46", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.46.tgz", + "integrity": "sha512-hjUvMxGh+QIgegwksfp6BRBYleE/a8veZHvTR6sa+o+bM4HU+WnrUZlhN0X+pDcsl8Lhwmbu72xPvLMk3XUwog==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.12", + "@vue/compiler-core": "3.5.46", + "@vue/compiler-dom": "3.5.46", + "@vue/compiler-ssr": "3.5.46", + "@vue/shared": "3.5.46", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.21", + "postcss": "^8.5.32", + "source-map-js": "^1.2.3" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.5.46", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.46.tgz", + "integrity": "sha512-qebChL3aP0m1k+TlSf+fZWvOwAf3flBCi5o+n01ykR3DX4mTIWheFltmoiQ12+z66/4cGeXqbB2P7sPWkGhQNQ==", + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.46", + "@vue/shared": "3.5.46" + } + }, + "node_modules/@vue/reactivity": { + "version": "3.5.46", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.46.tgz", + "integrity": "sha512-+FHtYTvGxgFoX3oRs7soz6JHizGv50Q26WJN6PWtXuTLXRfkfUpDUTRuoTA/kiZVVt8NMeMpsPQLh9h++ReUjQ==", + "license": "MIT", + "dependencies": { + "@vue/shared": "3.5.46" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.5.46", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.46.tgz", + "integrity": "sha512-eJUzKAUaHAmtnys/l9qduPzUnBrYMkmsCU7TN+vbSOSpm8kcETT7nacKxIO4MBej/XiOraVzq+lSeZv7o1//jQ==", + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.46", + "@vue/shared": "3.5.46" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.5.46", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.46.tgz", + "integrity": "sha512-6L7lbBvXTYBFFjIt25a0pgdpmn3Ns8RqUnNVibRzF4bgyiWJvqOhKEV5MXYWKlCttZE3aGeJN8mveo+6IrIKXA==", + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.46", + "@vue/runtime-core": "3.5.46", + "@vue/shared": "3.5.46", + "csstype": "^3.2.4" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.5.46", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.46.tgz", + "integrity": "sha512-4mc0YWREc6OZ5pDCigvKPDzIUV+aciiH92yvyTS6xaHHxW/80rMceQQn11pYe7OEEBt2YQgYWR9zF8QF30GJUQ==", + "license": "MIT", + "dependencies": { + "@vue/compiler-ssr": "3.5.46", + "@vue/runtime-dom": "3.5.46", + "@vue/shared": "3.5.46" + } + }, + "node_modules/@vue/shared": { + "version": "3.5.46", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.46.tgz", + "integrity": "sha512-P1WePbdzHrcIciWtmY2Im9EFhdakd3rZxYqvalOa3SfoxtF35Q8Uhmj1tKn6bWP4utcOpN8ao6BoJUItq0Uf+g==", + "license": "MIT" + }, + "node_modules/csstype": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.4.tgz", + "integrity": "sha512-PoKaoPzQapnEoqUSnHx1u6W6ku8CVEgKsnpmmzU3m1nwkidpPBQ8V/Zq2+bWNrsOKoKLwTGdbx6xF7BXP1zLVQ==", + "license": "MIT" + }, + "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/esbuild": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" + } + }, + "node_modules/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/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/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/nanoid": { + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", + "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/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.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.33", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.33.tgz", + "integrity": "sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ==", + "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.20", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/rollup": { + "version": "4.68.8", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.68.8.tgz", + "integrity": "sha512-IHx4DeeTGhoAPke6p1Wlg0JEQFyQoZQQjEe1iD+nhEERk7eoeHK9zyOpVJiGc54Z1MCgI96rN1tD7Ttub8XyPA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.10" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.68.8", + "@rollup/rollup-android-arm64": "4.68.8", + "@rollup/rollup-android-x64": "4.68.8", + "@rollup/rollup-darwin-arm64": "4.68.8", + "@rollup/rollup-darwin-x64": "4.68.8", + "@rollup/rollup-freebsd-arm64": "4.68.8", + "@rollup/rollup-freebsd-x64": "4.68.8", + "@rollup/rollup-linux-arm-gnueabihf": "4.68.8", + "@rollup/rollup-linux-arm-musleabihf": "4.68.8", + "@rollup/rollup-linux-arm64-gnu": "4.68.8", + "@rollup/rollup-linux-arm64-musl": "4.68.8", + "@rollup/rollup-linux-loong64-gnu": "4.68.8", + "@rollup/rollup-linux-loong64-musl": "4.68.8", + "@rollup/rollup-linux-ppc64-gnu": "4.68.8", + "@rollup/rollup-linux-ppc64-musl": "4.68.8", + "@rollup/rollup-linux-riscv64-gnu": "4.68.8", + "@rollup/rollup-linux-riscv64-musl": "4.68.8", + "@rollup/rollup-linux-s390x-gnu": "4.68.8", + "@rollup/rollup-linux-x64-gnu": "4.68.8", + "@rollup/rollup-linux-x64-musl": "4.68.8", + "@rollup/rollup-openbsd-x64": "4.68.8", + "@rollup/rollup-openharmony-arm64": "4.68.8", + "@rollup/rollup-win32-arm64-msvc": "4.68.8", + "@rollup/rollup-win32-ia32-msvc": "4.68.8", + "@rollup/rollup-win32-x64-gnu": "4.68.8", + "@rollup/rollup-win32-x64-msvc": "4.68.8", + "fsevents": "~2.3.2" + } + }, + "node_modules/source-map-js": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.4.tgz", + "integrity": "sha512-J7ZjMvHd9O1fcT/5V09QWaaSl2BbWx3F6O08spde82Namf9UB0GxRVIPiNbVsdKkoizHiSpTodo3vp2bAy91MA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=6.0.0" + } + }, + "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/typescript": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", + "devOptional": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/vite": { + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.6.tgz", + "integrity": "sha512-RtsraAwEG68idOA6iUOoIpOlcSKROnf815aIq9qHTSrDNpLoBrBa12suyfcEd8qn0xwOVQI1Yhm1GbmTjF600A==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite-plugin-singlefile": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/vite-plugin-singlefile/-/vite-plugin-singlefile-2.3.4.tgz", + "integrity": "sha512-1FAhlTCL6KJDpSUudrVU+gspapvS+tmKCg70vwNaAU6tyXn3E/C6+NnwQIze06byhBRv7VggZ78K0h+J/Rsdrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^4.0.7" + }, + "engines": { + "node": ">18.0.0" + }, + "peerDependencies": { + "rollup": "^4.59.0", + "vite": "^5.4.21 || ^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/vue": { + "version": "3.5.46", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.46.tgz", + "integrity": "sha512-0kW5CgfjMPBqmH158049SaE1muufp+K/ZyrwvSEwrwYky6QB7zL2y8kXfruneKb9O12eh0xAJL6CVSpzb9o0Kg==", + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.46", + "@vue/compiler-sfc": "3.5.46", + "@vue/runtime-dom": "3.5.46", + "@vue/server-renderer": "3.5.46", + "@vue/shared": "3.5.46" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + } + } +} diff --git a/panel/package.json b/panel/package.json new file mode 100644 index 0000000..f4e4168 --- /dev/null +++ b/panel/package.json @@ -0,0 +1 @@ +{"name":"idh-panel","private":true,"version":"0.1.0","type":"module","scripts":{"dev":"vite","build":"vite build"},"dependencies":{"vue":"3.5"},"devDependencies":{"@vitejs/plugin-vue":"^5.2.4","typescript":"5.7","vite":"^6.4.6","vite-plugin-singlefile":"^2.3.4"}} diff --git a/panel/src/App.vue b/panel/src/App.vue new file mode 100644 index 0000000..f2fd061 --- /dev/null +++ b/panel/src/App.vue @@ -0,0 +1,174 @@ + + + diff --git a/panel/src/api.ts b/panel/src/api.ts new file mode 100644 index 0000000..7a5b8e3 --- /dev/null +++ b/panel/src/api.ts @@ -0,0 +1,60 @@ +// 面板 REST 层:全部走本机 idh 服务的 /api 中转,不直连设备。 +import type { DeviceRow, DeviceSession, DeviceInfo, InstalledApp, EventItem } from './model'; + +async function api(path: string, init?: RequestInit): Promise { + const r = await fetch(path, init); + const data = await r.json().catch(() => ({})); + if (!r.ok) { (data as Record).__status = r.status; } + return data as T; +} +const post = (path: string, body: unknown) => + api>(path, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body) }); + +export const getHealth = () => api('/health'); +export const getSessions = () => api<{ sessions?: DeviceSession[] }>('/api/sessions'); +export const getApps = () => api<{ apps?: InstalledApp[]; scope?: string[]; error?: string }>('/api/apps'); +export interface EventPage { + events?: EventItem[]; hasMore?: boolean; hasOlder?: boolean; + oldestSeq?: number; latestSeq?: number; + summary?: { count?: number; lastSeq?: number; byCategory?: number[] }; +} +export const getAppEvents = (bundleId: string, opts: { after?: number; before?: number; limit?: number } = {}) => { + const q = new URLSearchParams({ limit: String(opts.limit ?? 150) }); + if (opts.after != null) q.set('after', String(opts.after)); + if (opts.before != null) q.set('before', String(opts.before)); + return api(`/api/apps/${encodeURIComponent(bundleId)}/events?${q}`); +}; +export const clearAppEvents = (bundleId: string) => + api<{ ok?: boolean; error?: string }>('/api/apps/clear', { + method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ bundleId }), + }); +export const appIconUrl = (bundleId: string) => `/api/apps/${encodeURIComponent(bundleId)}/icon`; +export const getDevices = () => api<{ devices?: DeviceRow[]; usb?: string[] }>('/api/devices'); +export const deviceAction = (body: Record) => post('/api/devices', body); +export const getScope = () => api<{ scope?: string[]; error?: string }>('/api/injection-scope'); +export const scopeUpdate = (bundleId: string, on: boolean) => + api<{ scope?: string[]; error?: string }>('/api/injection-scope', + { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ [on ? 'add' : 'remove']: [bundleId] }) }); +export const relaunchApp = (bundleId: string) => post('/api/apps/relaunch', { bundleId }); +// 会话设置走 /api/session-settings 中转;设备错误码在此翻成可读文案(沿用旧适配层)。 +const SETTINGS_ERRORS: Record = { + settings_pairing_required: '设备设置暂不可用。', + revision_conflict: '设备配置已被修改。请重新载入后再应用。', + invalid_settings: '设备会话限额需要整数,支持 1–2000 条、512–2097152 字节和 1–300 秒。', + settings_storage_error: '设备无法读取或保存设置。', + settings_unavailable: '当前设备服务尚未提供设置接口。', +}; +interface SettingsReply { revision?: string; deviceSession?: Record; error?: string } +async function settingsRequest(body?: unknown): Promise { + const r = await fetch('/api/session-settings', body === undefined ? {} : { + method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body), + }); + const data = await r.json().catch(() => ({})) as { error?: string } & SettingsReply; + if (!r.ok || data.error) { + return { error: SETTINGS_ERRORS[data.error ?? ''] ?? '设备设置暂时无法读取或保存。' }; + } + return data; +} +export const getSettingsExport = () => settingsRequest(); +export const postSettingsImport = (body: { revision: string; deviceSession: Record }) => + settingsRequest(body); diff --git a/panel/src/appearance.ts b/panel/src/appearance.ts new file mode 100644 index 0000000..7aa7879 --- /dev/null +++ b/panel/src/appearance.ts @@ -0,0 +1,25 @@ +import { computed, onMounted, onUnmounted, ref, watchEffect } from 'vue'; + +export type Appearance = 'system' | 'light' | 'dark'; +const key = 'decrypthub.panel.appearance'; +const media = window.matchMedia('(prefers-color-scheme: dark)'); +const normalize = (s: string | null): Appearance => s === 'light' || s === 'dark' ? s : 'system'; +function read(): Appearance { try { return normalize(localStorage.getItem(key)); } catch { return 'system'; } } +export const appearance = ref(read()); +const systemDark = ref(media.matches); +export const isDark = computed(() => appearance.value === 'system' ? systemDark.value : appearance.value === 'dark'); +export function setAppearance(value: Appearance) { + appearance.value = value; + try { localStorage.setItem(key, value); } catch { /* Session-only preference. */ } +} +export function useAppearance() { + const onMedia = () => { systemDark.value = media.matches; }; + const onStorage = (e: StorageEvent) => { if (e.key === key || e.key === null) appearance.value = read(); }; + watchEffect(() => { + document.documentElement.dataset.appearance = isDark.value ? 'dark' : 'light'; + document.querySelector('meta[name="theme-color"]')?.setAttribute('content', isDark.value ? '#090b0d' : '#fbfcfd'); + }); + onMounted(() => { onMedia(); media.addEventListener('change', onMedia); window.addEventListener('storage', onStorage); }); + onUnmounted(() => { media.removeEventListener('change', onMedia); window.removeEventListener('storage', onStorage); }); +} + diff --git a/panel/src/components/AppDialog.vue b/panel/src/components/AppDialog.vue new file mode 100644 index 0000000..63c5048 --- /dev/null +++ b/panel/src/components/AppDialog.vue @@ -0,0 +1,122 @@ + + + diff --git a/panel/src/components/DeviceMenu.vue b/panel/src/components/DeviceMenu.vue new file mode 100644 index 0000000..2447f56 --- /dev/null +++ b/panel/src/components/DeviceMenu.vue @@ -0,0 +1,81 @@ + + + diff --git a/panel/src/components/DiagDialog.vue b/panel/src/components/DiagDialog.vue new file mode 100644 index 0000000..1b97133 --- /dev/null +++ b/panel/src/components/DiagDialog.vue @@ -0,0 +1,38 @@ + + + diff --git a/panel/src/components/EventBoard.vue b/panel/src/components/EventBoard.vue new file mode 100644 index 0000000..fdfff2c --- /dev/null +++ b/panel/src/components/EventBoard.vue @@ -0,0 +1,295 @@ + + + diff --git a/panel/src/components/EventDetail.vue b/panel/src/components/EventDetail.vue new file mode 100644 index 0000000..44b189f --- /dev/null +++ b/panel/src/components/EventDetail.vue @@ -0,0 +1,190 @@ + + + diff --git a/panel/src/components/InjectPanel.vue b/panel/src/components/InjectPanel.vue new file mode 100644 index 0000000..5460658 --- /dev/null +++ b/panel/src/components/InjectPanel.vue @@ -0,0 +1,55 @@ + + + diff --git a/panel/src/components/McpDialog.vue b/panel/src/components/McpDialog.vue new file mode 100644 index 0000000..54ab1f7 --- /dev/null +++ b/panel/src/components/McpDialog.vue @@ -0,0 +1,23 @@ + + + diff --git a/panel/src/components/SettingsPanel.vue b/panel/src/components/SettingsPanel.vue new file mode 100644 index 0000000..5a322f2 --- /dev/null +++ b/panel/src/components/SettingsPanel.vue @@ -0,0 +1,218 @@ + + + diff --git a/panel/src/components/ToolStub.vue b/panel/src/components/ToolStub.vue new file mode 100644 index 0000000..b7e4f09 --- /dev/null +++ b/panel/src/components/ToolStub.vue @@ -0,0 +1,37 @@ + + + diff --git a/panel/src/components/WechatDialog.vue b/panel/src/components/WechatDialog.vue new file mode 100644 index 0000000..2aa726a --- /dev/null +++ b/panel/src/components/WechatDialog.vue @@ -0,0 +1,17 @@ + + + diff --git a/panel/src/icons.ts b/panel/src/icons.ts new file mode 100644 index 0000000..81c7604 --- /dev/null +++ b/panel/src/icons.ts @@ -0,0 +1,33 @@ +// 内联 SVG 图标(stroke, 20x20 viewBox 对齐 IDH 原面板 sprite)。 +export const I: Record = { + chevron: '', + search: '', + filter: '', + list: '', + box: '', + code: '', + download: '', + play: '', + pause: '', + info: '', + terminal: '', + gear: '', + more: '', + copy: '', + x: '', + check: '', + key: '', + lock: '', + cpu: '', + wifi: '', + folder: '', + dump: '', + inject: '', + refresh: '', + eye: '', + target: '', + sliders: '', + server: '', + log: '', + collapse: '', +}; diff --git a/panel/src/main.ts b/panel/src/main.ts new file mode 100644 index 0000000..8dd6bc1 --- /dev/null +++ b/panel/src/main.ts @@ -0,0 +1,5 @@ +import { createApp } from 'vue'; +import App from './App.vue'; +import './style.css'; + +createApp(App).mount('#app'); diff --git a/panel/src/model.ts b/panel/src/model.ts new file mode 100644 index 0000000..a72177b --- /dev/null +++ b/panel/src/model.ts @@ -0,0 +1,150 @@ +// 从 panel-device.js 移植的领域模型:类别、阶段、面板偏好、设备限额、可移植配置。 +export const CATEGORIES = ["digest", "hmac", "sym", "asym", "file", "sys", "net", "keychain", "other"] as const; +export const CATEGORY_LABELS = ["摘要", "HMAC", "对称", "非对称", "文件", "系统", "网络", "Keychain", "其他"]; +export const SUMMARY_KINDS = CATEGORIES.map((key, i) => ({ key, label: CATEGORY_LABELS[i] })); + +export const PHASES: Record = { entry: "进入", leave: "返回", complete: "完成", aborted: "中止" }; +export const KIND_LABELS: Record = { crypto: "加解密", network: "网络", observation: "观测", function: "函数" }; +export const SESSION_STATUS: Record = { waiting: "等待 Agent", observing: "观察中", closing: "确认尾部", ended: "已结束" }; + +export interface DeviceSession { bundleId: string; sessionId: string; status: string; count: number; lastSeq: number; createdAtMs: number; pid?: number; processGeneration?: string } +export interface InstalledApp { bundleId: string; name: string; running?: boolean; kind?: string } +export interface DeviceApp extends InstalledApp { processGeneration?: string; pid?: number } +export interface DeviceInfo { service?: string; version?: string; apps: DeviceApp[]; [k: string]: unknown } +export interface EventItem { + seq: number; appSeq?: number; sourceSeq?: number; timeMs: number; category: number; kind?: string; + phase?: string; update?: boolean; callId?: string; parentCallId?: string; asyncTaskId?: string; + algorithm?: string; operation?: string; detail?: string; preview?: string; + inputHex?: string; outputHex?: string; inLen?: number; outLen?: number; [k: string]: unknown; +} +/** 归并后的应用条目:sessionId 复用为 bundleId,count 跨会话累计。 */ +export interface AppRecord extends DeviceSession { sessions: number; name: string; running: boolean; kind: "record" } +export interface DeviceRow { id: string; address: string; transport?: string; online?: boolean; selected?: boolean } + +export const getCategory = (n?: number) => CATEGORY_LABELS[n ?? -1] ?? "其他"; +export const getPhase = (p?: string) => (p ? PHASES[p] ?? "摘要" : "摘要"); + +// 标题优先用真实算法名;无算法字段(旧记录)按类别给具体动作名,不写「XX 事件」这种空标签 +const TITLE_FALLBACK: Record = { + digest: "摘要计算", hmac: "HMAC 校验", sym: "对称加解密", asym: "非对称运算", + file: "文件读写", sys: "系统调用", net: "网络请求", keychain: "Keychain 存取", other: "观测记录", +}; +const OPS: Array<[RegExp, string]> = [ + [/encrypt/i, "加密"], [/decrypt/i, "解密"], [/sign/i, "签名"], [/verify/i, "验签"], + [/digest|mac/i, "摘要"], [/derive|kdf/i, "派生"], +]; +/** 操作名中文化,保留括号里的有效信息:verify (ok) → 验签 · ok,derive (rounds=N) → 派生 · rounds=N */ +export const operationLabel = (op?: string) => { + if (!op) return ""; + const extra = op.match(/\(([^)]*)\)/)?.[1]; + const base = OPS.find(([re]) => re.test(op))?.[1] ?? op.replace(/\s*\(.*\)/, "").trim(); + return extra ? base + " · " + extra : base; +}; +export const titleFor = (e: EventItem) => { + if (e.algorithm) return e.operation ? e.algorithm + " · " + operationLabel(e.operation) : e.algorithm; + return TITLE_FALLBACK[CATEGORIES[e.category] ?? "other"]; +}; +/** 列表/详情里的字节数:'128 B → 64 B',仅单侧有值也给单侧 */ +export const sizeLabel = (e: EventItem) => + e.inLen == null && e.outLen == null ? "" : `${e.inLen ?? 0} B → ${e.outLen ?? 0} B`; + +export const DISPLAY_CHOICES = [100, 150, 300, 500]; +export const LIMITS: Record = { + maxRecords: [1, 2000], maxBytes: [512, 2097152], recordSeconds: [1, 300], +}; +export const LIMIT_FIELDS: Array<{ key: string; label: string; unit: string }> = [ + { key: "maxRecords", label: "单会话摘要条数", unit: "条" }, + { key: "maxBytes", label: "单会话摘要大小", unit: "字节" }, + { key: "recordSeconds", label: "单会话观察时长", unit: "秒" }, +]; + +export interface PanelPrefs { + displayCap: number; autoRefresh: boolean; advancedFilters: boolean; + summaryCategories: Record; +} +export type DeviceLimits = Record; + +const PREF_KEYS = ["displayCap", "autoRefresh", "advancedFilters", "summaryCategories"]; + +function checkFields(data: unknown, allowed: string[], name: string): asserts data is Record { + if (!data || typeof data !== "object" || Array.isArray(data)) throw new Error(name + " 必须是对象"); + if (Object.keys(data as object).some((k) => !allowed.includes(k))) throw new Error(name + " 含有不支持的字段"); +} + +export function defaults(): PanelPrefs { + return { + displayCap: 150, autoRefresh: true, advancedFilters: false, + summaryCategories: Object.fromEntries(CATEGORIES.map((k) => [k, true])), + }; +} + +export function deviceLimits(patch: Record, requireAll = false): DeviceLimits { + checkFields(patch, Object.keys(LIMITS), "deviceSession"); + if (requireAll && Object.keys(patch).length !== Object.keys(LIMITS).length) + throw new Error("设备返回的会话配置不完整"); + for (const [field, value] of Object.entries(patch)) { + const [min, max] = LIMITS[field]; + if (!Number.isInteger(value) || (value as number) < min || (value as number) > max) + throw new Error(field + " 必须是 " + min + "–" + max + " 之间的整数"); + } + return { ...patch } as DeviceLimits; +} + +export function mergePanel(base: PanelPrefs, patch: Record): PanelPrefs { + checkFields(patch, PREF_KEYS, "panel"); + const next: PanelPrefs = { + displayCap: base.displayCap, autoRefresh: base.autoRefresh, + advancedFilters: base.advancedFilters, summaryCategories: { ...base.summaryCategories }, + }; + for (const key of ["autoRefresh", "advancedFilters"] as const) { + if (!Object.hasOwn(patch, key)) continue; + if (typeof patch[key] !== "boolean") throw new Error(key + " 必须是布尔值"); + next[key] = patch[key]; + } + if (Object.hasOwn(patch, "displayCap")) { + if (!DISPLAY_CHOICES.includes(patch.displayCap as number)) throw new Error("displayCap 只支持 100、150、300、500"); + next.displayCap = patch.displayCap as number; + } + if (Object.hasOwn(patch, "summaryCategories")) { + const sc = patch.summaryCategories; + checkFields(sc, [...CATEGORIES], "summaryCategories"); + for (const [key, value] of Object.entries(sc as Record)) { + if (typeof value !== "boolean") throw new Error(key + " 的摘要开关必须是布尔值"); + next.summaryCategories[key] = value; + } + } + return next; +} + +export interface ParsedProfile { + deviceSession: DeviceLimits; hasDevice: boolean; hasPanel: boolean; panel: PanelPrefs; +} +export function parseProfile(data: unknown, panel: PanelPrefs): ParsedProfile { + checkFields(data, ["version", "deviceSession", "panel"], "配置"); + const hasVersion = Object.hasOwn(data, "version"); + const hasDevice = Object.hasOwn(data, "deviceSession"); + const hasPanel = Object.hasOwn(data, "panel"); + if (hasVersion && data.version !== 1) throw new Error("不支持此配置版本"); + if ((!hasVersion && (!hasDevice || hasPanel)) || (!hasDevice && !hasPanel)) + throw new Error("配置应包含 deviceSession 或带版本号的 panel"); + const deviceSession = hasDevice ? deviceLimits(data.deviceSession as Record) : {}; + if (hasDevice && !Object.keys(deviceSession).length) throw new Error("deviceSession 没有可应用的字段"); + return { + deviceSession, hasDevice, hasPanel, + panel: mergePanel(panel, hasPanel ? (data.panel as Record) : {}), + }; +} +export function portableProfile(device: DeviceLimits, panel: PanelPrefs): string { + return JSON.stringify({ version: 1, deviceSession: deviceLimits(device, true), panel: mergePanel(defaults(), panel as unknown as Record) }, null, 2); +} + +const FIELD_NAMES = ["seq", "sourceSeq", "timeMs", "category", "kind", "phase", "update", + "callId", "parentCallId", "asyncTaskId", "algorithm", "operation", "detail", "preview", + "inputHex", "outputHex", "inLen", "outLen"]; +export const cleanEvent = (e: EventItem) => + Object.fromEntries(FIELD_NAMES.filter((k) => Object.hasOwn(e, k)).map((k) => [k, e[k]])); + +export const fmt = (formatter: Intl.DateTimeFormat, ms?: number) => + Number.isFinite(ms) && (ms as number) > 0 && (ms as number) <= 8640000000000000 ? formatter.format(ms as number) : "—"; +export const shortTime = new Intl.DateTimeFormat("zh-CN", { hour: "2-digit", minute: "2-digit", second: "2-digit", hour12: false }); +export const longTime = new Intl.DateTimeFormat("zh-CN", { dateStyle: "medium", timeStyle: "medium" }); diff --git a/panel/src/store.ts b/panel/src/store.ts new file mode 100644 index 0000000..811e81d --- /dev/null +++ b/panel/src/store.ts @@ -0,0 +1,371 @@ +// 响应式数据层:panel-device.js 的 inspectDevice/readEvents/snapshot + 面板状态。 +import { reactive, computed } from 'vue'; +import * as A from './api'; +import { + type AppRecord, type DeviceInfo, type DeviceRow, type DeviceSession, type EventItem, + type InstalledApp, type PanelPrefs, defaults, mergePanel, +} from './model'; + +export interface Catalog { device: DeviceInfo; sessions: DeviceSession[]; installed: InstalledApp[] } +interface BoardDisplay { pauseAt: number | null; clearThrough: number | null } + +const PREF_KEY = 'idh_panel_preferences_v1'; +const VIEW_KEY = 'idh_workspace_view_v1'; + +function loadLocal(key: string): T | null { + try { return JSON.parse(localStorage.getItem(key) ?? '') as T; } catch { return null; } +} +export function saveLocal(key: string, value: unknown): boolean { + try { localStorage.setItem(key, JSON.stringify(value)); return true; } catch { return false; } +} + +function loadPrefs(): PanelPrefs { + try { + const old = Number(localStorage.getItem('dh_displayCap')); + const prev: Record = { advancedFilters: localStorage.getItem('dh_filters_open') === '1' }; + if ([100, 150, 300, 500].includes(old)) prev.displayCap = old; + return mergePanel(defaults(), (loadLocal>(PREF_KEY) ?? prev) as Record); + } catch { return defaults(); } +} + +export const store = reactive({ + // 设备与连接 + network: 'loading' as 'loading' | 'online' | 'offline', + device: null as DeviceInfo | null, + devices: [] as DeviceRow[], + usbRows: [] as string[], + // 应用目录 + apps: [] as AppRecord[], + installed: [] as InstalledApp[], + selected: '', + // 当前应用数据 + session: null as (DeviceSession & { sessions?: number }) | null, + events: [] as EventItem[], + sessionNotice: '', + // 已加载窗口之外设备上还有更早记录 + hasOlder: false, + eventTotal: 0, + loadingOlder: false, + // 设备侧按类别真实总数(summary.byCategory),空数组表示未取得 + catTotals: [] as number[], + // 板块与展示 + tab: 'crypto', + displayByBoard: new Map(), + prefs: loadPrefs(), + limit: 0, // 由 prefs.displayCap 初始化 + seq: null as number | null, + detailTab: 'data' as 'data' | 'context' | 'raw', + // 注入范围 + injectData: null as { apps?: InstalledApp[]; scope?: string[]; error?: string } | null, + injectAt: 0, + injectPending: new Set(), + // 对话框开关 + appDialogOpen: false, + diagOpen: false, + mcpOpen: false, + settingsOpen: false, + wechatOpen: false, + settingsPage: 'capture', +}); +store.limit = store.prefs.displayCap; + +// ---- toast ---- +export const toasts = reactive<{ id: number; text: string }[]>([]); +let toastSeq = 0; +export function toast(text: string) { + const id = ++toastSeq; + toasts.push({ id, text }); + setTimeout(() => { const i = toasts.findIndex(t => t.id === id); if (i >= 0) toasts.splice(i, 1); }, 1500); +} +export async function copyText(text: string) { + if (!text) return; + try { await navigator.clipboard.writeText(text); } + catch { + const ta = document.createElement('textarea'); + (document.querySelector('dialog[open]') ?? document.body).appendChild(ta); + ta.value = text; ta.select(); + try { document.execCommand('copy'); } catch { toast('无法复制,请手动选中内容'); ta.remove(); return; } + ta.remove(); + } + toast('已复制'); +} +export function downloadText(filename: string, text: string) { + downloadBlob(filename, new Blob([text], { type: 'application/json' })); +} +export function downloadBlob(filename: string, blob: Blob) { + const url = URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; a.download = filename; + document.body.appendChild(a); a.click(); a.remove(); + setTimeout(() => URL.revokeObjectURL(url), 1000); + toast('已下载 ' + filename); +} + +// ---- 板块显示状态(暂停/清空,跨页签保留)---- +export function displayState(board = store.tab): BoardDisplay { + if (!store.displayByBoard.has(board)) store.displayByBoard.set(board, { pauseAt: null, clearThrough: null }); + return store.displayByBoard.get(board)!; +} + +// ---- 应用归并:会话按 bundleId 合并 + 已安装元数据 ---- +export function appsFrom(sessions: DeviceSession[], installed: InstalledApp[]): AppRecord[] { + const meta = new Map(installed.map((a) => [a.bundleId, a])); + const map = new Map(); + for (const s of sessions) { + let app = map.get(s.bundleId); + if (!app) { + const m = meta.get(s.bundleId); + app = { + sessionId: s.bundleId, bundleId: s.bundleId, createdAtMs: s.createdAtMs, + status: s.status, count: 0, sessions: 0, lastSeq: 0, + name: m?.name ?? '', running: m?.running === true, kind: 'record', + }; + map.set(s.bundleId, app); + } + app.count += s.count; + app.sessions += 1; + if (s.createdAtMs > app.createdAtMs) { app.createdAtMs = s.createdAtMs; app.status = s.status; } + } + return [...map.values()]; +} + +let catalog: Catalog | null = null; +let catalogPending: Promise | null = null; + +export async function inspectDevice(): Promise { + if (catalogPending) return catalogPending; + if (catalog && Date.now() - (catalog as { time?: number }).time! < 1100) return catalog; + catalogPending = (async () => { + const [health, history, installedRes] = await Promise.all([ + A.getHealth(), A.getSessions(), A.getApps()]); + if (!(health as unknown as { ok?: boolean }).ok && !(health as DeviceInfo).service) + throw new Error('设备连接不可用'); + const device = health; + const sessions = history.sessions ?? []; + const installed = installedRes.apps ?? []; + const known = store.selected + && (sessions.some((s) => s.bundleId === store.selected) + || installed.some((a) => a.bundleId === store.selected)); + if (!known) changeSelection(sessions[0]?.bundleId ?? installed[0]?.bundleId ?? ''); + store.apps = appsFrom(sessions, installed); + store.installed = installed; + store.sessionNotice = history.sessions ? '' : '设备在线,会话暂时无法读取。'; + catalog = { device, sessions, installed }; + (catalog as { time?: number }).time = Date.now(); + return catalog; + })(); + try { return await catalogPending; } finally { catalogPending = null; } +} + +export function changeSelection(id: string) { + if (id === store.selected) return; + const had = !!store.selected; + store.selected = id; + eventWindow = null; + store.hasOlder = false; + store.eventTotal = 0; + store.loadingOlder = false; + store.catTotals = []; + store.displayByBoard.clear(); + store.seq = null; + store.detailTab = 'data'; + store.limit = store.prefs.displayCap; + if (had) void refresh(true); +} + +// ---- 按 App 读时间线:默认只取设备最新一页;向前翻页由「加载更早」手动触发 ---- +const EVENT_PAGE = 200; +interface EventWindow { + bundle: string; + events: EventItem[]; // appSeq 升序 + oldestSeq: number; + hasOlder: boolean; + total: number; // 设备侧该应用保存总数(summary.count) +} +let eventWindow: EventWindow | null = null; +let windowGen = 0; + +const normEvent = (e: EventItem): EventItem => { + const seq = e.appSeq ?? e.seq; + return { ...e, seq, appSeq: seq }; +}; + +async function loadLatestPage(bundle: string): Promise { + const page = await A.getAppEvents(bundle, { limit: EVENT_PAGE }); + if ((page as { __status?: number }).__status) throw new Error('设备摘要暂时无法读取'); + const events = (page.events ?? []).map(normEvent); + eventWindow = { + bundle, events, + oldestSeq: events[0]?.appSeq ?? 0, + hasOlder: !!page.hasOlder, + total: Number(page.summary?.count ?? events.length), + }; + if (Array.isArray(page.summary?.byCategory)) store.catTotals = page.summary.byCategory; +} + +export async function loadOlder(): Promise { + const w = eventWindow; + if (!w?.hasOlder || store.loadingOlder) return; + store.loadingOlder = true; + try { + const page = await A.getAppEvents(w.bundle, { before: w.oldestSeq, limit: EVENT_PAGE }); + if ((page as { __status?: number }).__status) throw new Error('设备摘要暂时无法读取'); + // 轮询快照不挡手动翻页;只在窗口整体被换(切应用/外部清理重建)时丢弃结果 + if (eventWindow !== w) return; + const older = (page.events ?? []).map(normEvent).filter((e) => (e.appSeq ?? 0) < w.oldestSeq); + if (older.length) w.events.unshift(...older); + w.oldestSeq = Number(page.oldestSeq) || w.oldestSeq; + w.hasOlder = !!page.hasOlder; + w.total = Number(page.summary?.count ?? w.total); + store.events = w.events.slice(); + store.hasOlder = w.hasOlder; + store.eventTotal = w.total; + if (Array.isArray(page.summary?.byCategory)) store.catTotals = page.summary.byCategory; + } finally { store.loadingOlder = false; } +} + +export async function clearDeviceEvents(): Promise { + if (!store.selected) return false; + const res = await A.clearAppEvents(store.selected); + if (res.error || (res as { __status?: number }).__status) return false; + eventWindow = null; + store.events = []; + store.seq = null; + store.detailTab = 'data'; + await refresh(true); + return true; +} + +export async function snapshot(): Promise<{ device: DeviceInfo; session: typeof store.session; events: EventItem[] }> { + const { device, sessions } = await inspectDevice(); + const appSessions = sessions.filter((s) => s.bundleId === store.selected); + if (!appSessions.length) { + eventWindow = null; + store.hasOlder = false; + store.eventTotal = 0; + return { device, session: null, events: [] }; + } + const latest = appSessions[0]; + const live = device.apps.find((a) => a.bundleId === store.selected); + const gen = ++windowGen; + if (!eventWindow || eventWindow.bundle !== store.selected) { + await loadLatestPage(store.selected); + } else { + const tail = eventWindow.events[eventWindow.events.length - 1]?.appSeq ?? 0; + const page = await A.getAppEvents(store.selected, { after: tail, limit: 500 }); + if ((page as { __status?: number }).__status) throw new Error('设备摘要暂时无法读取'); + if (gen !== windowGen || !eventWindow) throw new Error('stale'); + const fresh = (page.events ?? []).map(normEvent).filter((e) => (e.appSeq ?? 0) > tail); + if (fresh.length) eventWindow.events.push(...fresh); + const total = Number(page.summary?.count ?? NaN); + if (Number.isFinite(total)) { + // 设备记录在外部被清理(MCP/其他客户端)→ 已加载数据可能越界,整窗重读最新页 + if (total < eventWindow.events.length) await loadLatestPage(store.selected); + else eventWindow.total = total; + } + if (Array.isArray(page.summary?.byCategory)) store.catTotals = page.summary.byCategory; + } + if (gen !== windowGen || !eventWindow) throw new Error('stale'); + const w = eventWindow; + store.hasOlder = w.hasOlder; + store.eventTotal = w.total; + return { + device, + session: { + ...latest, count: w.total, lastSeq: w.events[w.events.length - 1]?.appSeq ?? latest.lastSeq, + sessions: appSessions.length, + processGeneration: live?.processGeneration ?? latest.processGeneration, + }, + events: w.events.slice(), + }; +} + +// ---- 轮询 ---- +let inFlight = false; +export async function refresh(force = false) { + if (inFlight && !force) return; + inFlight = true; + try { + const next = await snapshot(); + const changed = store.session?.sessionId !== next.session?.sessionId; + if (changed) { + store.displayByBoard.clear(); + store.seq = null; + store.detailTab = 'data'; + store.limit = store.prefs.displayCap; + } + store.device = next.device; + store.session = next.session; + store.events = next.events; + store.network = 'online'; + } catch { + store.network = 'offline'; + } finally { + inFlight = false; + } +} + +export function chooseApp(bundleId: string): boolean { + const known = catalog?.sessions.some((s) => s.bundleId === bundleId) + || catalog?.installed?.some((a) => a.bundleId === bundleId) + || store.apps.some((a) => a.bundleId === bundleId) + || store.installed.some((a) => a.bundleId === bundleId); + if (!known) return false; + changeSelection(bundleId); + return true; +} + +// ---- 设备列表 ---- +export async function loadDevices() { + try { + const data = await A.getDevices(); + store.devices = data.devices ?? []; + store.usbRows = data.usb ?? []; + } catch { store.devices = []; store.usbRows = []; } +} +export async function deviceSelect(id: string): Promise { + const data = await A.deviceAction({ action: 'select', id }); + return !data.error; +} +export async function deviceRemove(id: string) { await A.deviceAction({ action: 'remove', id }); await loadDevices(); } +export async function deviceAdd(address?: string, usb?: string) { + const body: Record = { action: 'add' }; + if (address) body.address = address; + if (usb) body.usb = usb; + const data = await A.deviceAction(body); + await loadDevices(); + return !data.error; +} +export const currentDevice = computed(() => store.devices.find((d) => d.selected)); + +// ---- 注入范围 ---- +export async function loadInject(force = false) { + if (!force && Date.now() - store.injectAt < 3000) return; + store.injectAt = Date.now(); + try { store.injectData = await A.getApps(); } + catch { store.injectData = { error: 'device_unavailable' }; } +} +export async function toggleScope(bundleId: string, on: boolean): Promise { + let data: { scope?: string[]; error?: string }; + try { data = await A.scopeUpdate(bundleId, on); } + catch { toast('注入范围更新失败'); return false; } + if (data.error) { toast('注入范围更新失败'); return false; } + const app = (store.injectData?.apps ?? []).find((a) => a.bundleId === bundleId); + if (app?.running) store.injectPending.add(bundleId); else store.injectPending.delete(bundleId); + if (store.injectData) store.injectData.scope = data.scope ?? store.injectData.scope; + return true; +} +export async function relaunchBundle(bundleId: string) { + await A.relaunchApp(bundleId).catch(() => undefined); + store.injectPending.delete(bundleId); + setTimeout(() => void loadInject(true), 1500); +} + +export function savePrefs(next: PanelPrefs) { + store.prefs = next; + saveLocal(PREF_KEY, next); +} +export const currentApp = computed(() => + store.apps.find((a) => a.bundleId === store.selected) + ?? store.installed.find((a) => a.bundleId === store.selected)); +export const selectedName = computed(() => currentApp.value?.name || store.selected || '应用记录'); diff --git a/panel/src/style.css b/panel/src/style.css new file mode 100644 index 0000000..0de7fdb --- /dev/null +++ b/panel/src/style.css @@ -0,0 +1,1099 @@ +:root { + color-scheme: light; + --bg:#fbfcfd; --chrome:#f5f6f7; --surface:#fff; --surface-2:#f1f2f3; --surface-3:#e7e9ec; + --line:#d3d6da; --line-soft:#e7e8ea; --ink:#111315; --ink-2:#34383d; --muted:#656a71; + --blue:var(--ink); --green:#286948; --danger:#a7363e; --amber:#815714; + --teal:#37685e; --cyan:#346674; --lilac:#645571; --pink:#855569; --coral:#8c5645; + --float-shadow:0 8px 28px rgba(20,25,32,.12); + } + :root[data-appearance=dark] { + color-scheme:dark; + --bg:#090b0d; --chrome:#101215; --surface:#141619; --surface-2:#1c1f23; --surface-3:#292d32; + --line:#383c42; --line-soft:#282d32; --ink:#f4f6f8; --ink-2:#d2d6db; --muted:#a3a9b1; + --green:#94c8a4; --danger:#eea0a5; --amber:#dbbc85; --teal:#9ac5b9; --cyan:#a0c7d0; + --lilac:#c6b6d5; --pink:#ddbac8; --coral:#dbb0a4; --float-shadow:0 10px 32px rgba(0,0,0,.32); + } + + * { box-sizing:border-box; scrollbar-width:thin; scrollbar-color:var(--line) transparent; } + *::-webkit-scrollbar { width:10px; height:10px; } + *::-webkit-scrollbar-track { background:transparent; } + *::-webkit-scrollbar-thumb { background:var(--line); border:3px solid transparent; border-radius:8px; background-clip:padding-box; } + *::-webkit-scrollbar-thumb:hover { background:#5c6574; border:3px solid transparent; background-clip:padding-box; } + *::-webkit-scrollbar-corner { background:transparent; } + [hidden] { display:none !important; } + html, body { margin:0; padding:0; height:100%; } + body { display:flex; flex-direction:column; height:100vh; overflow:hidden; min-width:320px; + background:var(--bg); color:var(--ink); line-height:1.5; font-size:13px; letter-spacing:0; + font-family:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'PingFang SC','Microsoft YaHei',sans-serif; } + header, #nav, .filters { flex-shrink:0; } + #app { flex:1; display:flex; min-height:0; } + .muted { color:var(--muted); } + .detect-radar { font-size:12px; line-height:1.55; color:var(--muted); padding:10px 14px 0; white-space:pre-wrap; } + .spacer { flex:1; } + a.dl { color:var(--blue); text-decoration:none; } a.dl:hover { text-decoration:underline; } + code { background:var(--surface-2); border:1px solid var(--line); border-radius:4px; padding:1px 5px; color:var(--ink-2); font-family:ui-monospace,SFMono-Regular,Consolas,monospace; } + + /* ---- header / brand(对齐 iOS workbench:无第二进程条、按钮透明) ---- */ + header { display:flex; align-items:center; gap:14px; min-height:62px; padding:9px 16px; background:var(--chrome); border-bottom:1px solid var(--line-soft); } + .header-context { display:flex; align-items:center; gap:8px 12px; min-width:0; flex-wrap:wrap; } + .brand-lockup { display:flex; align-items:center; gap:11px; flex-shrink:0; } + header h1 { display:flex; align-items:center; margin:0; font-size:16px; font-weight:700; color:var(--ink); letter-spacing:0; } + .hdr-mark { width:28px; height:28px; margin-right:9px; border-radius:5px; background:var(--ink); overflow:hidden; flex-shrink:0; } + .hdr-mark img { display:block; width:100%; height:100%; } + .workspace-name { display:none; } + .stats { display:flex; align-items:center; gap:7px; padding:0; font-size:12px; color:var(--green); background:transparent; border:0; white-space:nowrap; } + .stats b { color:var(--ink); font-weight:600; } + .status-dot { display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--danger); flex-shrink:0; } + .status-dot.ok { background:var(--green); animation:dh-pulse 2.4s ease-in-out infinite; } + @keyframes dh-pulse { 0%,100%{opacity:1;} 50%{opacity:.5;} } + .app-context { position:relative; min-width:0; } + .context-label { color:var(--muted); font-size:11px; white-space:nowrap; } + .app-affiliation { margin:0 0 9px; color:var(--muted); font-size:11px; } + .process-trigger { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; column-gap:10px; min-width:180px; max-width:280px; min-height:38px; padding:4px 10px; text-align:left; color:var(--ink-2); background:transparent; border:1px solid transparent; border-radius:4px; cursor:pointer; } + .process-trigger:hover, .process-trigger[aria-expanded="true"] { border-color:transparent; background:rgba(255,255,255,.04); color:var(--ink); } + .process-trigger .proc-primary { display:flex; align-items:center; gap:8px; min-width:0; overflow:hidden; color:var(--ink); font-size:13px; font-weight:650; } + .process-trigger .proc-face { width:22px; height:22px; flex:none; } + .process-trigger .proc-face img, .process-trigger .proc-face .app-dialog-letter { width:22px; height:22px; border-radius:6px; } + .process-trigger .proc-face .app-dialog-letter { font-size:12px; } + .process-trigger .proc-text { display:flex; flex-direction:column; min-width:0; line-height:1.25; } + .process-trigger #procLabel { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } + .process-trigger .proc-pkg { overflow:hidden; color:var(--muted); font-size:10px; font-weight:400; text-overflow:ellipsis; white-space:nowrap; } + .menu-chevron { display:inline-flex; align-items:center; justify-content:center; color:var(--muted); line-height:0; } + .menu-chevron svg { display:block; } + .process-trigger .menu-chevron { grid-column:2; align-self:center; } + .app-choices { max-height:190px; overflow:auto; } + .app-sessions { margin-top:8px; padding:9px 7px 4px; border-top:1px solid var(--line-soft); } + .app-context .proc-title { margin:3px 7px 7px; color:var(--muted); font-size:11px; font-weight:600; } + .app-sessions summary { padding:3px 0 8px; color:var(--ink-2); font-size:12px; font-weight:600; } + .app-sessions .cap-state-pill { display:inline-block; margin:0 0 8px; } + .app-item { box-sizing:border-box; display:flex; flex-direction:column; align-items:flex-start; gap:2px; width:100%; min-height:44px; padding:7px 10px; color:var(--ink-2); background:transparent; border:0; border-radius:3px; text-align:left; cursor:pointer; } + .app-item:hover, .app-item.active { color:var(--ink); background:var(--surface-3); } + .app-item .app-name-row { display:flex; align-items:center; gap:8px; width:100%; min-width:0; } + .app-item .app-name { overflow:hidden; flex:1; min-width:0; color:var(--ink); font-size:13px; font-weight:650; text-overflow:ellipsis; white-space:nowrap; } + .app-item .app-state { flex:none; color:var(--muted); font-size:10px; } + .app-item .app-state.on { color:var(--green); } + .app-item .app-pkg { overflow:hidden; max-width:100%; color:var(--muted); font:10px/1.3 ui-monospace,SFMono-Regular,Consolas,monospace; text-overflow:ellipsis; white-space:nowrap; } + .app-section { margin:8px 8px 2px; color:var(--muted); font-size:11px; font-weight:600; } + .app-row { display:flex; align-items:stretch; gap:2px; } + .app-row .app-item { flex:1; width:auto; min-width:0; } + .app-inject { flex:none; width:32px; min-height:44px; padding:0; color:var(--muted); background:transparent; border:0; border-radius:3px; cursor:pointer; } + .app-inject::before { content:''; display:inline-block; width:13px; height:13px; border:1px solid var(--line); border-radius:2px; } + .app-inject[aria-pressed="true"]::before { background:var(--blue); border-color:var(--blue); box-shadow:inset 0 0 0 2px var(--surface); } + .app-inject:disabled { opacity:.45; cursor:default; } + .app-load { width:calc(100% - 12px); margin:6px; } + .app-empty { padding:8px 10px; color:var(--muted); font-size:12px; } + .procinfo { display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px 14px; margin:0; font:11px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace; } + .procinfo dt { color:var(--muted); } + .procinfo dd { min-width:0; margin:0; overflow-wrap:anywhere; color:var(--ink-2); text-align:right; } + .sess-lab { display:flex; align-items:center; gap:8px; margin-top:12px; padding-top:10px; border-top:1px solid var(--line-soft); color:var(--muted); font-size:11px; } + .sess-lab select { flex:1; min-width:0; background:var(--surface-2); color:var(--ink); } + /* Native