diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 000000000..b957ee2e1 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,46 @@ +name: Docker Image CI + +on: + push: + tags: + - 'v*.*.*' # 只在以 v 开头的标签推送时触发,例如 v1.0.0 + +jobs: + release: + name: Release Docker image + runs-on: ubuntu-latest + permissions: + packages: write + contents: write + id-token: write + issues: write + + steps: + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to the GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.TOKEN }} + + - name: Extract version from tag + id: get_version + run: | + echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + + - name: Build and push Docker image + id: build_push + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: | + ghcr.io/${{ github.repository }}:${{ env.VERSION }} + ghcr.io/${{ github.repository }}:latest + platforms: linux/amd64,linux/arm64 diff --git a/.gitignore b/.gitignore index f93674901..6ad8d3502 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Byte-compiled / optimized / DLL files __pycache__/ +.idea/ *.py[cod] *$py.class @@ -144,4 +145,5 @@ tmp .config.yaml .secrets.yaml .private_config.yaml +.env.development docker-compose.yml diff --git a/Dockerfile b/Dockerfile index 1ffad2d81..9648b7b58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,46 +1,45 @@ # 第一阶段:前端构建 -FROM node:18 AS frontend-builder + +FROM kalicyh/node:v18-alpine AS frontend-builder WORKDIR /app/ZhiKongTaiWeb -RUN corepack enable && yarn config set registry https://registry.npmmirror.com +# RUN corepack enable && yarn config set registry https://registry.npmmirror.com COPY ZhiKongTaiWeb/package.json ZhiKongTaiWeb/yarn.lock ./ -RUN mkdir node_modules && yarn install --frozen-lockfile +RUN yarn install --frozen-lockfile COPY ZhiKongTaiWeb . RUN yarn build # 第二阶段:构建 Python 依赖 -FROM ccr.ccs.tencentyun.com/kalicyh/poetry:v3.10_latest AS builder + +FROM kalicyh/poetry:v3.10_xiaozhi AS builder + WORKDIR /app -COPY pyproject.toml poetry.lock /app/ + +# 同时拷贝本地环境.venv +COPY . . +# 检查是否有缺失 RUN poetry install --no-root -# 第三阶段:生产镜像 -FROM python:3.10-slim - -WORKDIR /opt/xiaozhi-esp32-server - -# 使用清华源加速apt安装 -RUN rm -rf /etc/apt/sources.list.d/* && \ - echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware" > /etc/apt/sources.list && \ - echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \ - echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \ - echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \ - apt-get update && \ - apt-get install -y --no-install-recommends libopus0 ffmpeg && \ - apt-get clean +# 使用清华源加速apt安装,该镜像内置所以注释 +# RUN rm -rf /etc/apt/sources.list.d/* && \ +# echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware" > /etc/apt/sources.list && \ +# echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \ +# echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \ +# echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \ +# apt-get update && \ +# apt-get install -y --no-install-recommends libopus0 ffmpeg && \ +# apt-get clean # 从构建阶段复制虚拟环境和前端构建产物 -COPY --from=builder /app/.venv /opt/venv -COPY --from=frontend-builder /app/ZhiKongTaiWeb/dist /opt/xiaozhi-esp32-server/manager/static/webui -# 设置虚拟环境路径 -ENV PATH="/opt/venv/bin:$PATH" +COPY --from=frontend-builder /app/ZhiKongTaiWeb/dist /app/manager/static/webui -# 复制应用代码 -COPY . . +# 设置虚拟环境路径 +ENV PATH="/app/.venv/bin:$PATH" # 启动应用 -CMD ["python", "app.py"] \ No newline at end of file +ENTRYPOINT ["poetry", "run", "python"] +CMD ["app.py"] \ No newline at end of file diff --git a/Dockerfile-pip b/Dockerfile-pip new file mode 100755 index 000000000..612866730 --- /dev/null +++ b/Dockerfile-pip @@ -0,0 +1,51 @@ +# 第一阶段:前端构建 +FROM node:18 AS frontend-builder + +WORKDIR /app/ZhiKongTaiWeb + +# 配置npm使用淘宝源 +RUN npm config set registry https://registry.npmmirror.com + +COPY ZhiKongTaiWeb/package*.json ./ + +# 安装axios依赖 +RUN npm install axios +RUN npm install + +COPY ZhiKongTaiWeb . + +RUN npm run build + +# 第二阶段:构建Python依赖 +FROM python:3.10-slim AS builder + +WORKDIR /app + +COPY requirements.txt . + +# 优化apt安装 +RUN pip install --no-cache-dir -r requirements.txt \ + -i https://mirrors.aliyun.com/pypi/simple/ + +# 第三阶段:生产镜像 +FROM python:3.10-slim + +WORKDIR /opt/xiaozhi-esp32-server + +# 优化apt安装 +RUN echo "deb https://mirrors.aliyun.com/debian/ bookworm main contrib non-free non-free-firmware" > /etc/apt/sources.list && \ + echo "deb https://mirrors.aliyun.com/debian/ bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \ + apt-get update && \ + apt-get install -y --no-install-recommends libopus0 ffmpeg && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# 从构建阶段复制Python包和前端构建产物 +COPY --from=builder /usr/local/lib/python3.10/site-packages /usr/local/lib/python3.10/site-packages +COPY --from=frontend-builder /app/ZhiKongTaiWeb/dist /opt/xiaozhi-esp32-server/manager/static/webui + +# 复制应用代码 +COPY . . + +# 启动应用 +CMD ["python", "app.py"] \ No newline at end of file diff --git a/README.md b/README.md index 8f7c8c57d..452f21817 100644 --- a/README.md +++ b/README.md @@ -4,29 +4,81 @@ (中文 | [English](README_en.md)) -本项目为开源智能硬件项目 [xiaozhi-esp32](https://github.com/78/xiaozhi-esp32) 提供后端服务。根据 [小智通信协议](https://ccnphfhqs21z.feishu.cn/wiki/M0XiwldO9iJwHikpXD5cEx71nKh) 使用 `Python` 实现。 +本项目为开源智能硬件项目 [xiaozhi-esp32](https://github.com/78/xiaozhi-esp32) +提供后端服务。根据 [小智通信协议](https://ccnphfhqs21z.feishu.cn/wiki/M0XiwldO9iJwHikpXD5cEx71nKh) 使用 `Python` 实现。 --- ## 适用人群 👥 -本项目需要配合 ESP32 硬件设备使用。如果您已经购买了 ESP32 相关硬件,且成功对接过虾哥部署的后端服务,并希望独立搭建自己的 `xiaozhi-esp32` 后端服务,那么本项目非常适合您。 +本项目需要配合 ESP32 硬件设备使用。如果您已经购买了 ESP32 相关硬件,且成功对接过虾哥部署的后端服务,并希望独立搭建自己的 +`xiaozhi-esp32` 后端服务,那么本项目非常适合您。 + +想看使用效果?请猛戳视频 🎥 + + + + + + + + + + +
+ + + 小智esp32连接自己的后台模型 + + + + + + 自定义音色 + + + + + + 使用粤语交流 + + + + + + 控制家电开关 + + + + + + 成本最低配置 + + + +
+ + + + + + + + + + + + -跳转到[使用方式](#使用方式-) -想看使用效果?请猛戳这个视频 🎥 - - - 小智esp32连接自己的后台模型 - - --- ## 系统要求与部署前提 🖥️ -- **硬件**:一套兼容 `xiaozhi-esp32` 的硬件设备(具体型号请参考 [此处](https://rcnv1t9vps13.feishu.cn/wiki/DdgIw4BUgivWDPkhMj1cGIYCnRf))。 +- **硬件**:一套兼容 `xiaozhi-esp32` + 的硬件设备(具体型号请参考 [此处](https://rcnv1t9vps13.feishu.cn/wiki/DdgIw4BUgivWDPkhMj1cGIYCnRf))。 - **服务器**:至少 4 核 CPU、8G 内存的电脑或服务器。 - **固件编译**:请将后端服务的接口地址更新至 `xiaozhi-esp32` 项目中,再重新编译固件并烧录到设备上。 @@ -56,7 +108,7 @@ server: - **通信协议** 基于 `xiaozhi-esp32` 协议,通过 WebSocket 实现数据交互。 - **对话交互** - 支持唤醒对话、手动对话及实时打断。 + 支持唤醒对话、手动对话及实时打断。长时间无对话时自动休眠 - **多语言识别** 支持国语、粤语、英语、日语、韩语(默认使用 FunASR)。 - **LLM 模块** @@ -66,25 +118,27 @@ server: ### 正在开发 🚧 -- 长时间无对话时自动休眠 - 对话记忆功能 - 多种心情模式 +- 智控台webui +![图片](docs/images/webui.png) --- ## 本项目支持的平台/组件列表 📋 ### LLM -| 类型 | 平台名称 | 使用方式 | 收费模式 | 备注 | -|:----:|:-----------------------------:|:-------------------:|:--------:|:-----------------------------------------------------------------------------:| -| LLM | 阿里百炼 (AliLLM) | openai 接口调用 | 消耗 token | [点击申请密钥](https://bailian.console.aliyun.com/?apiKey=1#/api-key) | -| LLM | 深度求索 (DeepSeekLLM) | openai 接口调用 | 消耗 token | [点击申请密钥](https://platform.deepseek.com/) | -| LLM | 智谱(ChatGLMLLM) | openai 接口调用 | 免费 | 虽然免费,仍需[点击申请密钥](https://bigmodel.cn/usercenter/proj-mgmt/apikeys) | -| LLM | OllamaLLM | ollama 接口调用 | 免费/自定义 | 需预先下载模型(`ollama pull`),服务地址:`http://localhost:11434` | -| LLM | DifyLLM | dify 接口调用 | 消耗 token | 本地化部署,注意配置提示词需在 Dify 控制台设置 | -| LLM | GeminiLLM | gemini 接口调用 | 免费 | [点击申请密钥](https://aistudio.google.com/apikey) | -| LLM | CozeLLM | coze 接口调用 | 消耗 token | 需提供 bot_id、user_id 及个人令牌 | +| 类型 | 平台名称 | 使用方式 | 收费模式 | 备注 | +|:---:|:------------------:|:---------------------:|:--------:|:-----------------------------------------------------------------:| +| LLM | 阿里百炼 (AliLLM) | openai 接口调用 | 消耗 token | [点击申请密钥](https://bailian.console.aliyun.com/?apiKey=1#/api-key) | +| LLM | 深度求索 (DeepSeekLLM) | openai 接口调用 | 消耗 token | [点击申请密钥](https://platform.deepseek.com/) | +| LLM | 智谱(ChatGLMLLM) | openai 接口调用 | 免费 | 虽然免费,仍需[点击申请密钥](https://bigmodel.cn/usercenter/proj-mgmt/apikeys) | +| LLM | OllamaLLM | ollama 接口调用 | 免费/自定义 | 需预先下载模型(`ollama pull`),服务地址:`http://localhost:11434` | +| LLM | DifyLLM | dify 接口调用 | 消耗 token | 本地化部署,注意配置提示词需在 Dify 控制台设置 | +| LLM | GeminiLLM | gemini 接口调用 | 免费 | [点击申请密钥](https://aistudio.google.com/apikey) | +| LLM | CozeLLM | coze 接口调用 | 消耗 token | 需提供 bot_id、user_id 及个人令牌 | +| LLM | Home Assistant | homeassistant语音助手接口调用 | 免费 | 需提供home assistant令牌 | 实际上,任何支持 openai 接口调用的 LLM 均可接入使用。 @@ -92,30 +146,31 @@ server: ### TTS -| 类型 | 平台名称 | 使用方式 | 收费模式 | 备注 | -|:----:|:-----------------------------------:|:---------------:|:-------------:|:-------------------------------------------------------------------------------------------------------------------------:| -| TTS | EdgeTTS | 接口调用 | 免费 | 默认 TTS,基于微软语音合成技术 | -| TTS | 火山引擎豆包 TTS (DoubaoTTS) | 接口调用 | 消耗 token | [点击创建密钥](https://console.volcengine.com/speech/service/8);建议使用付费版本以获得更高并发 | -| TTS | CosyVoiceSiliconflow | 接口调用 | 消耗 token | 需申请硅基流动 API 密钥;输出格式为 wav | -| TTS | CozeCnTTS | 接口调用 | 消耗 token | 需提供 Coze API key;输出格式为 wav | -| TTS | FishSpeech | 接口调用 | 免费/自定义 | 本地启动 TTS 服务;启动方法见配置文件内说明 | -| TTS | GPT_SOVITS_V2 | 接口调用 | 免费/自定义 | 本地启动 TTS 服务,适用于个性化语音合成场景 | +| 类型 | 平台名称 | 使用方式 | 收费模式 | 备注 | +|:---:|:----------------------:|:----:|:--------:|:-------------------------------------------------------------------------:| +| TTS | EdgeTTS | 接口调用 | 免费 | 默认 TTS,基于微软语音合成技术 | +| TTS | 火山引擎豆包 TTS (DoubaoTTS) | 接口调用 | 消耗 token | [点击创建密钥](https://console.volcengine.com/speech/service/8);建议使用付费版本以获得更高并发 | +| TTS | CosyVoiceSiliconflow | 接口调用 | 消耗 token | 需申请硅基流动 API 密钥;输出格式为 wav | +| TTS | CozeCnTTS | 接口调用 | 消耗 token | 需提供 Coze API key;输出格式为 wav | +| TTS | FishSpeech | 接口调用 | 免费/自定义 | 本地启动 TTS 服务;启动方法见配置文件内说明 | +| TTS | GPT_SOVITS_V2 | 接口调用 | 免费/自定义 | 本地启动 TTS 服务,适用于个性化语音合成场景 | --- ### VAD -| 类型 | 平台名称 | 使用方式 | 收费模式 | 备注 | -|:----:|:----------:|:---------:|:--------:|:----:| -| VAD | SileroVAD | 本地使用 | 免费 | | +| 类型 | 平台名称 | 使用方式 | 收费模式 | 备注 | +|:---:|:---------:|:----:|:----:|:--:| +| VAD | SileroVAD | 本地使用 | 免费 | | --- ### ASR -| 类型 | 平台名称 | 使用方式 | 收费模式 | 备注 | -|:----:|:--------:|:---------:|:--------:|:----:| -| ASR | FunASR | 本地使用 | 免费 | | +| 类型 | 平台名称 | 使用方式 | 收费模式 | 备注 | +|:---:|:---------:|:----:|:----:|:--:| +| ASR | FunASR | 本地使用 | 免费 | | +| ASR | DoubaoASR | 接口调用 | 收费 | | --- @@ -123,18 +178,21 @@ server: ### 一、[部署文档](./docs/Deployment.md) -[精简版部署文档](./docs/Deployment-silm.md) - 本项目支持以下三种部署方式,您可根据实际需求选择: -1. **[Docker 快速部署](./docs/Deployment.md#%E6%96%B9%E5%BC%8F%E4%B8%80docker%E5%BF%AB%E9%80%9F%E9%83%A8%E7%BD%B2)** - 适合快速体验,不需过多环境配置。 -2. **[借助 Docker 环境运行部署](./docs/Deployment.md#%E6%96%B9%E5%BC%8F%E4%BA%8C%E5%80%9F%E5%8A%A9docker%E7%8E%AF%E5%A2%83%E8%BF%90%E8%A1%8C%E9%83%A8%E7%BD%B2)** - 适用于已安装 Docker 且希望对代码进行自定义修改的用户。 -3. **[本地源码运行](./docs/Deployment.md#%E6%96%B9%E5%BC%8F%E4%B8%89%E6%9C%AC%E5%9C%B0%E6%BA%90%E7%A0%81%E8%BF%90%E8%A1%8C)** - 适合熟悉 Conda 环境或希望从零搭建运行环境的用户。 - 对于对响应速度要求较高的场景,推荐使用本地源码运行方式以降低额外开销。 +1. [Docker 快速部署](./docs/Deployment.md) +适合快速体验的普通用户,不需过多环境配置。缺点是,拉取镜像有点慢。 + +2. [借助 Docker 环境运行部署](./docs/Deployment.md#%E6%96%B9%E5%BC%8F%E4%BA%8C%E5%80%9F%E5%8A%A9docker%E7%8E%AF%E5%A2%83%E8%BF%90%E8%A1%8C%E9%83%A8%E7%BD%B2) + +适用于已安装 Docker 且希望对代码进行自定义修改的软件工程师。 + +3. [本地源码运行](./docs/Deployment.md#%E6%96%B9%E5%BC%8F%E4%B8%89%E6%9C%AC%E5%9C%B0%E6%BA%90%E7%A0%81%E8%BF%90%E8%A1%8C) + +适合熟悉`Conda` 环境或希望从零搭建运行环境的用户。 + +对于对响应速度要求较高的场景,推荐使用本地源码运行方式以降低额外开销。 ### 二、[固件编译](./docs/firmware-build.md) @@ -153,11 +211,12 @@ server: ### 2、我想通过小智控制电灯、空调、远程开关机等操作 💡 -建议:在配置文件中将 `LLM` 设置为 `DifyLLM`,并通过 `Dify` 编排智能体来实现相关控制。 +建议:在配置文件中将 `LLM` 设置为 `HomeAssistant`,通过 调用`HomeAssistant`接口实现相关控制。 ### 3、我说话很慢,停顿时小智老是抢话 🗣️ 建议:在配置文件中找到如下部分,将 `min_silence_duration_ms` 的值调大(例如改为 `1000`): + ```yaml VAD: SileroVAD: @@ -166,48 +225,81 @@ VAD: min_silence_duration_ms: 700 # 如果说话停顿较长,可将此值调大 ``` -### 4、如何提高小智对话响应速度? ⚡ +### 4、为什么我说的话,小智识别出来很多韩文、日文、英文?🇰🇷 + +建议:检查一下`models/SenseVoiceSmall`是否已经有`model.pt` +文件,如果没有就要下载,查看这里[下载语音识别模型文件](docs/Deployment.md#模型文件) + +### 5、为什么会出现“TTS 任务出错 文件不存在”?📁 + +建议:检查一下是否正确使用`conda` 安装了`libopus`和`ffmpeg`库。 + +如果没有安装,就安装 + +``` +conda install conda-forge::libopus +conda install conda-forge::ffmpeg +``` + +### 6、如何提高小智对话响应速度? ⚡ 本项目默认配置为低成本方案,建议初学者先使用默认免费模型,解决“跑得动”的问题,再优化“跑得快”。 如需提升响应速度,可尝试更换各组件。以下为各组件的响应速度测试数据(仅供参考,不构成承诺): -#### LLM 类组件 +| 影响因素 | 因素值 | +|:-----:|:----------------:| +| 测试地点 | 广东省广州市海珠区 | +| 测试时间 | 2025年2月19日 12:52 | +| 宽带运营商 | 中国联通 | -| 排名 | 组件名称 | 响应速度(ms) | -|:---:|:---------------:|:------------:| -| 1 | AliLLM | 630 | -| 2 | ChatGLMLLM | 2000 | -| 3 | DeepSeekLLM | 6800 | +测试方法: + +1、把各组件的密钥配置上去,只有配置了密钥的组件才参与测试。 + +2、配置完密钥后,执行以下方法 ``` -测试地点:广东省佛山市禅城区 -测试时间:2025年2月9日 16:12 -宽带运营商:中国移动 -测试方法:更换配置后,执行 core/utils/llm.py 文件 +# 进入项目根目录,执行以下命令: +conda activate xiaozhi-esp32-server +python performance_tester.py ``` -#### TTS 类组件 +生成报告如下 -| 排名 | 组件名称 | 响应速度(ms) | -|:---:|:--------------:|:------------:| -| 1 | DoubaoTTS | 645 | -| 2 | EdgeTTS | 1019 | +LLM 性能排行: -``` -测试地点:广东省佛山市禅城区 -测试时间:2025年2月9日 16:12 -宽带运营商:中国移动 -测试方法:更换配置后,执行 core/utils/tts.py 文件 -``` +| 模块名称 | 平均首Token时间 | 平均总响应时间 | +|:-----------|:-----------|:--------| +| AliLLM | 0.547s | 1.485s | +| ChatGLMLLM | 0.677s | 3.057s | +| OllamaLLM | 0.003s | 0.003s | + +TTS 性能排行: + +| 模块名称 | 平均合成时间 | +|----------------------|--------| +| EdgeTTS | 1.019s | +| DoubaoTTS | 0.503s | +| CosyVoiceSiliconflow | 3.732s | + +推荐配置组合 (综合响应速度): + +| 组合方案 | 综合得分 | LLM首Token | TTS合成 | +|-------------------------------|-------|-----------|--------| +| AliLLM + DoubaoTTS | 0.539 | 0.547s | 0.503s | +| AliLLM + EdgeTTS | 0.642 | 0.547s | 1.019s | +| ChatGLMLLM + DoubaoTTS | 0.642 | 0.677s | 0.503s | +| ChatGLMLLM + EdgeTTS | 0.745 | 0.677s | 1.019s | +| AliLLM + CosyVoiceSiliconflow | 1.184 | 0.547s | 3.732s | ### 结论 🔍 -`2025年2月9日`,如果我的电脑在`广东省佛山市禅城区`,且使用的是`中国移动`网络,我会优先使用: +`2025年2月19日`,如果我的电脑在`广东省广州市海珠区`,且使用的是`中国联通`网络,我会优先使用: - LLM:`AliLLM` - TTS:`DoubaoTTS` -### 5、更多问题,可联系我们反馈 💬 +### 7、更多问题,可联系我们反馈 💬 ![图片](docs/images/wechat.jpg) diff --git a/ZhiKongTaiWeb/README.md b/ZhiKongTaiWeb/README.md index e5b831167..4ddcc7755 100644 --- a/ZhiKongTaiWeb/README.md +++ b/ZhiKongTaiWeb/README.md @@ -1,14 +1,88 @@ -# Vue 3 + Vite +# Vue 3 + Vite 项目配置文档 -项目使用Vue3 + Vite实现 +## 开发环境配置 -在当前目录执行以下命令进入开发模式 +### 使用 Poetry 配置开发环境 -``` -npm run dev +在项目根目录中执行以下命令安装 Python 依赖: + +```sh +poetry install ``` -执行以下命令打包 -``` -npm run build -``` \ No newline at end of file +--- + +## 安装项目依赖 + +你可以选择以下任意一个包管理工具(`npm`、`yarn` 或 `pnpm`)来管理项目依赖。 + +### 通用命令 + +- `install`:安装项目依赖 +- `dev`:同时启动前后端 +- `dev:ui`:启动前端 +- `dev:api`:启动后端 +- `dev:d`:在 Docker 环境下同时启动前后端 +- `build`:打包项目 + +--- + +### 使用 npm + +1. 安装依赖: + + ```sh + npm install + ``` + +2. 启动开发模式: + + ```sh + npm run dev + ``` + +3. 打包项目: + + ```sh + npm run build + ``` + +### 使用 yarn + +1. 安装依赖: + + ```sh + yarn install + ``` + +2. 启动开发模式: + + ```sh + yarn dev + ``` + +3. 打包项目: + + ```sh + yarn build + ``` + +### 使用 pnpm + +1. 安装依赖: + + ```sh + pnpm install + ``` + +2. 启动开发模式: + + ```sh + pnpm run dev + ``` + +3. 打包项目: + + ```sh + pnpm run build + ``` diff --git a/ZhiKongTaiWeb/package.json b/ZhiKongTaiWeb/package.json index 7b2085856..7f488208f 100644 --- a/ZhiKongTaiWeb/package.json +++ b/ZhiKongTaiWeb/package.json @@ -4,7 +4,10 @@ "version": "0.0.0", "type": "module", "scripts": { - "dev": "vite", + "dev": "concurrently -n 'Frontend,Backend' -c 'blue,green' 'yarn run dev:ui' 'npm run dev:api'", + "dev:ui": "vite", + "dev:api": "cd .. && poetry run python app.py", + "dev:d": "docker exec xiaozhi-env poetry run python app.py", "build": "vite build", "preview": "vite preview" }, @@ -15,6 +18,7 @@ }, "devDependencies": { "@vitejs/plugin-vue": "^5.1.4", + "concurrently": "^9.1.2", "vite": "^5.4.8" } } diff --git a/ZhiKongTaiWeb/yarn.lock b/ZhiKongTaiWeb/yarn.lock index 321823786..969c139e2 100644 --- a/ZhiKongTaiWeb/yarn.lock +++ b/ZhiKongTaiWeb/yarn.lock @@ -337,6 +337,18 @@ resolved "https://registry.npmmirror.com/@vue/shared/-/shared-3.5.13.tgz#87b309a6379c22b926e696893237826f64339b6f" integrity sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ== +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -359,6 +371,35 @@ call-bind-apply-helpers@^1.0.1: es-errors "^1.3.0" function-bind "^1.1.2" +chalk@^4.1.2: + version "4.1.2" + resolved "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.npmmirror.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + combined-stream@^1.0.8: version "1.0.8" resolved "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -366,6 +407,19 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" +concurrently@^9.1.2: + version "9.1.2" + resolved "https://registry.npmmirror.com/concurrently/-/concurrently-9.1.2.tgz#22d9109296961eaee773e12bfb1ce9a66bc9836c" + integrity sha512-H9MWcoPsYddwbOGM6difjVwVZHl63nwMEwDJG/L7VGtuaJhb12h2caPG2tVPWs7emuYix252iGfqOyrz1GczTQ== + dependencies: + chalk "^4.1.2" + lodash "^4.17.21" + rxjs "^7.8.1" + shell-quote "^1.8.1" + supports-color "^8.1.1" + tree-kill "^1.2.2" + yargs "^17.7.2" + csstype@^3.1.3: version "3.1.3" resolved "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81" @@ -385,6 +439,11 @@ dunder-proto@^1.0.1: es-errors "^1.3.0" gopd "^1.2.0" +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + entities@^4.5.0: version "4.5.0" resolved "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" @@ -446,6 +505,11 @@ esbuild@^0.21.3: "@esbuild/win32-ia32" "0.21.5" "@esbuild/win32-x64" "0.21.5" +escalade@^3.1.1: + version "3.2.0" + resolved "https://registry.npmmirror.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + estree-walker@^2.0.2: version "2.0.2" resolved "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" @@ -476,6 +540,11 @@ function-bind@^1.1.2: resolved "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.npmmirror.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + get-intrinsic@^1.2.6: version "1.2.7" resolved "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.7.tgz#dcfcb33d3272e15f445d15124bc0a216189b9044" @@ -505,6 +574,11 @@ gopd@^1.2.0: resolved "https://registry.npmmirror.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + has-symbols@^1.0.3, has-symbols@^1.1.0: version "1.1.0" resolved "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" @@ -524,6 +598,16 @@ hasown@^2.0.2: dependencies: function-bind "^1.1.2" +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + magic-string@^0.30.11: version "0.30.17" resolved "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.17.tgz#450a449673d2460e5bbcfba9a61916a1714c7453" @@ -572,6 +656,11 @@ proxy-from-env@^1.1.0: resolved "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.npmmirror.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + rollup@^4.20.0: version "4.34.7" resolved "https://registry.npmmirror.com/rollup/-/rollup-4.34.7.tgz#e00d8550688a616a3481c6446bb688d4c753ba8f" @@ -600,11 +689,63 @@ rollup@^4.20.0: "@rollup/rollup-win32-x64-msvc" "4.34.7" fsevents "~2.3.2" +rxjs@^7.8.1: + version "7.8.1" + resolved "https://registry.npmmirror.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" + integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== + dependencies: + tslib "^2.1.0" + +shell-quote@^1.8.1: + version "1.8.2" + resolved "https://registry.npmmirror.com/shell-quote/-/shell-quote-1.8.2.tgz#d2d83e057959d53ec261311e9e9b8f51dcb2934a" + integrity sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA== + source-map-js@^1.2.0, source-map-js@^1.2.1: version "1.2.1" resolved "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-color@^8.1.1: + version "8.1.1" + resolved "https://registry.npmmirror.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +tree-kill@^1.2.2: + version "1.2.2" + resolved "https://registry.npmmirror.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" + integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== + +tslib@^2.1.0: + version "2.8.1" + resolved "https://registry.npmmirror.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" + integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== + vite@^5.4.8: version "5.4.14" resolved "https://registry.npmmirror.com/vite/-/vite-5.4.14.tgz#ff8255edb02134df180dcfca1916c37a6abe8408" @@ -633,3 +774,35 @@ vue@^3.5.10: "@vue/runtime-dom" "3.5.13" "@vue/server-renderer" "3.5.13" "@vue/shared" "3.5.13" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.npmmirror.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@^17.7.2: + version "17.7.2" + resolved "https://registry.npmmirror.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" diff --git a/config.yaml b/config.yaml index 9e22febb2..e31432bdb 100644 --- a/config.yaml +++ b/config.yaml @@ -22,6 +22,19 @@ server: # 可选:设备白名单,如果设置了白名单,那么白名单的机器无论是什么token都可以连接。 #allowed_devices: # - "24:0A:C4:1D:3B:F0" # MAC地址列表 +log: + # 设置控制台输出的日志格式,时间、日志级别、标签、消息 + log_format: "{time:YY-MM-DD HH:mm:ss}[{extra[tag]}] - {level} - {message}" + # 设置日志文件输出的格式,时间、日志级别、标签、消息 + log_format_simple: "{time:YYYY-MM-DD HH:mm:ss} - {name} - {level} - {extra[tag]} - {message}" + # 设置日志等级:INFO、DEBUG + log_level: INFO + # 设置日志路径 + log_dir: tmp + # 设置日志文件 + log_file: "server.log" + # 设置数据文件路径 + data_dir: data manager: # 是否启用管理后台 # 目前这个模块还在开发中,建议:不要修改enabled选项 @@ -68,9 +81,15 @@ selected_module: ASR: FunASR: + type: fun_local model_dir: models/SenseVoiceSmall output_dir: tmp/ - + DoubaoASR: + type: doubao + appid: 你的火山引擎语音合成服务appid + access_token: 你的火山引擎语音合成服务access_token + cluster: volcengine_input_common + output_dir: tmp/ VAD: SileroVAD: threshold: 0.5 @@ -128,11 +147,6 @@ LLM: user_id: 你的user_id base_url: "https://api.coze.cn/open_api/v2/chat" # 服务地址 personal_access_token: 你的coze个人令牌 - vLLm: - type: vllm - base_url: http://localhost:8000 - model_name: "Qwen/Qwen2.5-1.5B-Instruct" - TTS: # 当前支持的type为edge、doubao,可自行适配 EdgeTTS: @@ -222,3 +236,65 @@ TTS: parallel_infer: true repetition_penalty: 1.35 aux_ref_audio_paths: [] + MinimaxTTS: + # Minimax语音合成服务,需要先在minimax平台创建账户充值,并获取登录信息 + # 平台地址:https://platform.minimaxi.com/ + # 充值地址:https://platform.minimaxi.com/user-center/payment/balance + # group_id地址:https://platform.minimaxi.com/user-center/basic-information + # api_key地址:https://platform.minimaxi.com/user-center/basic-information/interface-key + # 定义TTS API类型 + type: minimax + output_file: tmp/ + group_id: 你的minimax平台groupID + api_key: 你的minimax平台接口密钥 + model: "speech-01-turbo" + # 此处设置将优先于voice_setting中voice_id的设置;如都不设置,默认为 female-shaonv + voice_id: "female-shaonv" + # 以下可不用设置,使用默认设置 + # voice_setting: + # voice_id: "male-qn-qingse" + # speed: 1 + # vol: 1 + # pitch: 0 + # emotion: "happy" + # pronunciation_dict: + # tone: + # - "处理/(chu3)(li3)" + # - "危险/dangerous" + # audio_setting: + # sample_rate: 32000 + # bitrate: 128000 + # format: "mp3" + # channel: 1 + # timber_weights: + # - + # voice_id: male-qn-qingse + # weight: 1 + # - + # voice_id: female-shaonv + # weight: 1 + # language_boost: auto + AliyunTTS: + # 阿里云智能语音交互服务,需要先在阿里云平台开通服务,然后获取验证信息 + # 平台地址:https://nls-portal.console.aliyun.com/ + # appkey地址:https://nls-portal.console.aliyun.com/applist + # token地址:https://nls-portal.console.aliyun.com/overview + # 定义TTS API类型 + type: aliyun + output_file: tmp/ + appkey: 你的阿里云智能语音交互服务项目Appkey + token: 你的阿里云智能语音交互服务AccessToken + voice: xiaoyun + # 以下可不用设置,使用默认设置 + # format: wav + # sample_rate: 16000 + # volume: 50 + # speech_rate: 0 + # pitch_rate: 0 + +# 模块测试配置 +module_test: + test_sentences: # 自定义测试语句 + - "你好,请介绍一下你自己" + - "What's the weather like today?" + - "请用100字概括量子计算的基本原理和应用前景" diff --git a/config/logger.py b/config/logger.py index d4e87bc64..99968ca1f 100644 --- a/config/logger.py +++ b/config/logger.py @@ -1,27 +1,29 @@ import os import sys from loguru import logger +from config.settings import load_config + +def setup_logging(): + """从配置文件中读取日志配置,并设置日志输出格式和级别""" + config = load_config() + log_config = config["log"] + log_format = log_config.get("log_format", "{time:YY-MM-DD HH:mm:ss}[{extra[tag]}] - {level} - {message}") + log_format_simple = log_config.get("log_format_file", "{time:YYYY-MM-DD HH:mm:ss} - {name} - {level} - {extra[tag]} - {message}") + log_level = log_config.get("log_level", "INFO") + log_dir = log_config.get("log_dir", "tmp") + log_file = log_config.get("log_file", "server.log") + data_dir = log_config.get("data_dir", "data") -def setup_logging(log_dir='tmp', data_dir='data'): - """配置全局彩色日志(不同区块不同标签)""" os.makedirs(log_dir, exist_ok=True) os.makedirs(data_dir, exist_ok=True) - # 设置日志格式,时间、日志级别、标签、消息 - log_format = ( - "{time:YYYY-MM-DD HH:mm:ss}" - "[{extra[tag]}]" - " - {level} - " - "{message}" - ) - # 配置日志输出 logger.remove() # 输出到控制台 - logger.add(sys.stdout, format=log_format, level="INFO") + logger.add(sys.stdout, format=log_format, level=log_level) # 输出到文件 - logger.add(os.path.join(log_dir, "server.log"), format="{time:YYYY-MM-DD HH:mm:ss} - {name} - {level} - {extra[tag]} - {message}", level="INFO") + logger.add(os.path.join(log_dir, log_file), format=log_format_simple, level=log_level) return logger diff --git a/config/private_config.py b/config/private_config.py index 9b925e1ee..b1596b8f5 100644 --- a/config/private_config.py +++ b/config/private_config.py @@ -172,21 +172,12 @@ class PrivateConfig: # 判断存在私有配置,并且self.device_id在私有配置中 if not self.private_config: self.logger.bind(tag=TAG).error("Private config not found for device_id: {}", self.device_id) - return None, None, None, None + return None, None """创建私有处理模块实例""" config = self.private_config selected_modules = config['selected_module'] return ( - vad.create_instance( - selected_modules["VAD"], - config["VAD"][selected_modules["VAD"]] - ), - asr.create_instance( - selected_modules["ASR"], - config["ASR"][selected_modules["ASR"]], - self.default_config.get("delete_audio", True) # Using default_config for global settings - ), llm.create_instance( selected_modules["LLM"] if not 'type' in config["LLM"][selected_modules["LLM"]] diff --git a/core/connection.py b/core/connection.py index d2645ba30..83251eebb 100644 --- a/core/connection.py +++ b/core/connection.py @@ -108,10 +108,8 @@ class ConnectionHandler: if self.is_device_verified: await self.private_config.update_last_chat_time() - vad, asr, llm, tts = self.private_config.create_private_instances() - if all([vad, asr, llm, tts]): - self.vad = vad - self.asr = asr + llm, tts = self.private_config.create_private_instances() + if all([llm, tts]): self.llm = llm self.tts = tts self.logger.bind(tag=TAG).info(f"Loaded private config and instances for device {device_id}") diff --git a/core/handle/audioHandle.py b/core/handle/audioHandle.py index 394e7fe5d..67615a95f 100644 --- a/core/handle/audioHandle.py +++ b/core/handle/audioHandle.py @@ -28,19 +28,22 @@ async def handleAudioMessage(conn, audio): if conn.client_voice_stop: conn.client_abort = False conn.asr_server_receive = False - text, file_path = conn.asr.speech_to_text(conn.asr_audio, conn.session_id) - logger.bind(tag=TAG).info(f"识别文本: {text}") - text_len, text_without_punctuation = remove_punctuation_and_length(text) - if text_len <= conn.max_cmd_length and await handleCMDMessage(conn, text_without_punctuation): - return - if text_len > 0: - await startToChat(conn, text) - else: + # 音频太短了,无法识别 + if len(conn.asr_audio) < 3: conn.asr_server_receive = True + else: + text, file_path = await conn.asr.speech_to_text(conn.asr_audio, conn.session_id) + logger.bind(tag=TAG).info(f"识别文本: {text}") + text_len, text_without_punctuation = remove_punctuation_and_length(text) + if text_len <= conn.max_cmd_length and await handleCMDMessage(conn, text_without_punctuation): + return + if text_len > 0: + await startToChat(conn, text) + else: + conn.asr_server_receive = True conn.asr_audio.clear() conn.reset_vad_states() - async def handleCMDMessage(conn, text): cmd_exit = conn.cmd_exit for cmd in cmd_exit: @@ -161,4 +164,4 @@ async def no_voice_close_connect(conn): conn.client_abort = False conn.asr_server_receive = False prompt = "时间过得真快,我都好久没说话了。请你用十个字左右话跟我告别,以“再见”或“拜拜拜”为结尾" - await startToChat(conn, prompt) + await startToChat(conn, prompt) \ No newline at end of file diff --git a/core/providers/asr/base.py b/core/providers/asr/base.py new file mode 100644 index 000000000..d8db22a86 --- /dev/null +++ b/core/providers/asr/base.py @@ -0,0 +1,19 @@ +from abc import ABC, abstractmethod +from typing import Optional, Tuple, List + +from config.logger import setup_logging + +TAG = __name__ +logger = setup_logging() + + +class ASRProviderBase(ABC): + @abstractmethod + def save_audio_to_file(self, opus_data: List[bytes], session_id: str) -> str: + """解码Opus数据并保存为WAV文件""" + pass + + @abstractmethod + async def speech_to_text(self, opus_data: List[bytes], session_id: str) -> Tuple[Optional[str], Optional[str]]: + """将语音数据转换为文本""" + pass diff --git a/core/providers/asr/doubao.py b/core/providers/asr/doubao.py new file mode 100644 index 000000000..a5a5bb65b --- /dev/null +++ b/core/providers/asr/doubao.py @@ -0,0 +1,286 @@ +import time +import io +import wave +import os +from typing import Optional, Tuple, List +import uuid +import websockets +import json +import gzip + +import opuslib_next +from core.providers.asr.base import ASRProviderBase + +from config.logger import setup_logging + +TAG = __name__ +logger = setup_logging() + +CLIENT_FULL_REQUEST = 0b0001 +CLIENT_AUDIO_ONLY_REQUEST = 0b0010 + +NO_SEQUENCE = 0b0000 +NEG_SEQUENCE = 0b0010 + +SERVER_FULL_RESPONSE = 0b1001 +SERVER_ACK = 0b1011 +SERVER_ERROR_RESPONSE = 0b1111 + +NO_SERIALIZATION = 0b0000 +JSON = 0b0001 +THRIFT = 0b0011 +CUSTOM_TYPE = 0b1111 +NO_COMPRESSION = 0b0000 +GZIP = 0b0001 +CUSTOM_COMPRESSION = 0b1111 + + +def parse_response(res): + """ + protocol_version(4 bits), header_size(4 bits), + message_type(4 bits), message_type_specific_flags(4 bits) + serialization_method(4 bits) message_compression(4 bits) + reserved (8bits) 保留字段 + header_extensions 扩展头(大小等于 8 * 4 * (header_size - 1) ) + payload 类似与http 请求体 + """ + protocol_version = res[0] >> 4 + header_size = res[0] & 0x0f + message_type = res[1] >> 4 + message_type_specific_flags = res[1] & 0x0f + serialization_method = res[2] >> 4 + message_compression = res[2] & 0x0f + reserved = res[3] + header_extensions = res[4:header_size * 4] + payload = res[header_size * 4:] + result = {} + payload_msg = None + payload_size = 0 + if message_type == SERVER_FULL_RESPONSE: + payload_size = int.from_bytes(payload[:4], "big", signed=True) + payload_msg = payload[4:] + elif message_type == SERVER_ACK: + seq = int.from_bytes(payload[:4], "big", signed=True) + result['seq'] = seq + if len(payload) >= 8: + payload_size = int.from_bytes(payload[4:8], "big", signed=False) + payload_msg = payload[8:] + elif message_type == SERVER_ERROR_RESPONSE: + code = int.from_bytes(payload[:4], "big", signed=False) + result['code'] = code + payload_size = int.from_bytes(payload[4:8], "big", signed=False) + payload_msg = payload[8:] + if payload_msg is None: + return result + if message_compression == GZIP: + payload_msg = gzip.decompress(payload_msg) + if serialization_method == JSON: + payload_msg = json.loads(str(payload_msg, "utf-8")) + elif serialization_method != NO_SERIALIZATION: + payload_msg = str(payload_msg, "utf-8") + result['payload_msg'] = payload_msg + result['payload_size'] = payload_size + return result + + +class ASRProvider(ASRProviderBase): + def __init__(self, config: dict, delete_audio_file: bool): + self.appid = config.get("appid") + self.cluster = config.get("cluster") + self.access_token = config.get("access_token") + self.output_dir = config.get("output_dir") + + self.host = "openspeech.bytedance.com" + self.ws_url = f"wss://{self.host}/api/v2/asr" + self.success_code = 1000 + self.seg_duration = 15000 + + # 确保输出目录存在 + os.makedirs(self.output_dir, exist_ok=True) + + def save_audio_to_file(self, opus_data: List[bytes], session_id: str) -> str: + """将Opus音频数据解码并保存为WAV文件""" + file_name = f"asr_{session_id}_{uuid.uuid4()}.wav" + file_path = os.path.join(self.output_dir, file_name) + + decoder = opuslib_next.Decoder(16000, 1) # 16kHz, 单声道 + pcm_data = [] + + for opus_packet in opus_data: + try: + pcm_frame = decoder.decode(opus_packet, 960) # 960 samples = 60ms + pcm_data.append(pcm_frame) + except opuslib_next.OpusError as e: + logger.bind(tag=TAG).error(f"Opus解码错误: {e}", exc_info=True) + + with wave.open(file_path, "wb") as wf: + wf.setnchannels(1) + wf.setsampwidth(2) # 2 bytes = 16-bit + wf.setframerate(16000) + wf.writeframes(b"".join(pcm_data)) + + return file_path + + @staticmethod + def _generate_header(message_type=CLIENT_FULL_REQUEST, message_type_specific_flags=NO_SEQUENCE) -> bytearray: + """Generate protocol header.""" + header = bytearray() + header_size = 1 + header.append((0b0001 << 4) | header_size) # Protocol version + header.append((message_type << 4) | message_type_specific_flags) + header.append((0b0001 << 4) | 0b0001) # JSON serialization & GZIP compression + header.append(0x00) # reserved + return header + + def _construct_request(self, reqid) -> dict: + """Construct the request payload.""" + return { + "app": { + "appid": f"{self.appid}", + "cluster": self.cluster, + "token": self.access_token, + }, + "user": { + "uid": str(uuid.uuid4()), + }, + "request": { + "reqid": reqid, + "show_utterances": False, + "sequence": 1 + }, + "audio": { + "format": "wav", + "rate": 16000, + "language": "zh-CN", + "bits": 16, + "channel": 1, + "codec": "raw", + }, + } + + async def _send_request(self, audio_data: List[bytes], segment_size: int) -> Optional[str]: + """Send request to Volcano ASR service.""" + try: + auth_header = {'Authorization': 'Bearer; {}'.format(self.access_token)} + async with websockets.connect(self.ws_url, additional_headers=auth_header) as websocket: + # Prepare request data + request_params = self._construct_request(str(uuid.uuid4())) + print(request_params) + payload_bytes = str.encode(json.dumps(request_params)) + payload_bytes = gzip.compress(payload_bytes) + full_client_request = self._generate_header() + full_client_request.extend((len(payload_bytes)).to_bytes(4, 'big')) # payload size(4 bytes) + full_client_request.extend(payload_bytes) # payload + + # Send header and metadata + # full_client_request + await websocket.send(full_client_request) + res = await websocket.recv() + result = parse_response(res) + if 'payload_msg' in result and result['payload_msg']['code'] != self.success_code: + logger.bind(tag=TAG).error(f"ASR error: {result}") + return None + + for seq, (chunk, last) in enumerate(self.slice_data(audio_data, segment_size), 1): + if last: + audio_only_request = self._generate_header( + message_type=CLIENT_AUDIO_ONLY_REQUEST, + message_type_specific_flags=NEG_SEQUENCE + ) + else: + audio_only_request = self._generate_header( + message_type=CLIENT_AUDIO_ONLY_REQUEST + ) + payload_bytes = gzip.compress(chunk) + audio_only_request.extend((len(payload_bytes)).to_bytes(4, 'big')) # payload size(4 bytes) + audio_only_request.extend(payload_bytes) # payload + # Send audio data + await websocket.send(audio_only_request) + + # Receive response + response = await websocket.recv() + result = parse_response(response) + + if 'payload_msg' in result and result['payload_msg']['code'] == self.success_code: + if len(result['payload_msg']['result']) > 0: + return result['payload_msg']['result'][0]["text"] + return None + else: + logger.bind(tag=TAG).error(f"ASR error: {result}") + return None + + except Exception as e: + logger.bind(tag=TAG).error(f"ASR request failed: {e}", exc_info=True) + return None + + @staticmethod + def decode_opus(opus_data: List[bytes], session_id: str) -> List[bytes]: + + decoder = opuslib_next.Decoder(16000, 1) # 16kHz, 单声道 + pcm_data = [] + + for opus_packet in opus_data: + try: + pcm_frame = decoder.decode(opus_packet, 960) # 960 samples = 60ms + pcm_data.append(pcm_frame) + except opuslib_next.OpusError as e: + logger.bind(tag=TAG).error(f"Opus解码错误: {e}", exc_info=True) + + return pcm_data + + @staticmethod + def read_wav_info(data: io.BytesIO = None) -> (int, int, int, int, int): + with io.BytesIO(data) as _f: + wave_fp = wave.open(_f, 'rb') + nchannels, sampwidth, framerate, nframes = wave_fp.getparams()[:4] + wave_bytes = wave_fp.readframes(nframes) + return nchannels, sampwidth, framerate, nframes, len(wave_bytes) + + @staticmethod + def slice_data(data: bytes, chunk_size: int) -> (list, bool): + """ + slice data + :param data: wav data + :param chunk_size: the segment size in one request + :return: segment data, last flag + """ + data_len = len(data) + offset = 0 + while offset + chunk_size < data_len: + yield data[offset: offset + chunk_size], False + offset += chunk_size + else: + yield data[offset: data_len], True + + async def speech_to_text(self, opus_data: List[bytes], session_id: str) -> Tuple[Optional[str], Optional[str]]: + """将语音数据转换为文本""" + try: + # 合并所有opus数据包 + pcm_data = self.decode_opus(opus_data, session_id) + combined_pcm_data = b''.join(pcm_data) + + wav_buffer = io.BytesIO() + + with wave.open(wav_buffer, "wb") as wav_file: + wav_file.setnchannels(1) # 设置声道数 + wav_file.setsampwidth(2) # 设置采样宽度 + wav_file.setframerate(16000) # 设置采样率 + wav_file.writeframes(combined_pcm_data) # 写入 PCM 数据 + + # 获取封装后的 WAV 数据 + wav_data = wav_buffer.getvalue() + nchannels, sampwidth, framerate, nframes, wav_len = self.read_wav_info(wav_data) + size_per_sec = nchannels * sampwidth * framerate + segment_size = int(size_per_sec * self.seg_duration / 1000) + + # 语音识别 + start_time = time.time() + text = await self._send_request(wav_data, segment_size) + if text: + logger.bind(tag=TAG).debug(f"语音识别耗时: {time.time() - start_time:.3f}s | 结果: {text}") + return text, None + return "", None + + except Exception as e: + logger.bind(tag=TAG).error(f"语音识别失败: {e}", exc_info=True) + return "", None diff --git a/core/providers/asr/fun_local.py b/core/providers/asr/fun_local.py new file mode 100644 index 000000000..82d09ab52 --- /dev/null +++ b/core/providers/asr/fun_local.py @@ -0,0 +1,110 @@ +import time +import wave +import os +import sys +import io +from config.logger import setup_logging +from typing import Optional, Tuple, List +import uuid +import opuslib_next +from core.providers.asr.base import ASRProviderBase + +from funasr import AutoModel +from funasr.utils.postprocess_utils import rich_transcription_postprocess + +TAG = __name__ +logger = setup_logging() + + +# 捕获标准输出 +class CaptureOutput: + def __enter__(self): + self._output = io.StringIO() + self._original_stdout = sys.stdout + sys.stdout = self._output + + def __exit__(self, exc_type, exc_value, traceback): + sys.stdout = self._original_stdout + self.output = self._output.getvalue() + self._output.close() + + # 将捕获到的内容通过 logger 输出 + if self.output: + logger.bind(tag=TAG).info(self.output.strip()) + + +class ASRProvider(ASRProviderBase): + def __init__(self, config: dict, delete_audio_file: bool): + self.model_dir = config.get("model_dir") + self.output_dir = config.get("output_dir") # 修正配置键名 + self.delete_audio_file = delete_audio_file + + # 确保输出目录存在 + os.makedirs(self.output_dir, exist_ok=True) + with CaptureOutput(): + self.model = AutoModel( + model=self.model_dir, + vad_kwargs={"max_single_segment_time": 30000}, + disable_update=True, + hub="hf" + # device="cuda:0", # 启用GPU加速 + ) + + def save_audio_to_file(self, opus_data: List[bytes], session_id: str) -> str: + """将Opus音频数据解码并保存为WAV文件""" + file_name = f"asr_{session_id}_{uuid.uuid4()}.wav" + file_path = os.path.join(self.output_dir, file_name) + + decoder = opuslib_next.Decoder(16000, 1) # 16kHz, 单声道 + pcm_data = [] + + for opus_packet in opus_data: + try: + pcm_frame = decoder.decode(opus_packet, 960) # 960 samples = 60ms + pcm_data.append(pcm_frame) + except opuslib_next.OpusError as e: + logger.bind(tag=TAG).error(f"Opus解码错误: {e}", exc_info=True) + + with wave.open(file_path, "wb") as wf: + wf.setnchannels(1) + wf.setsampwidth(2) # 2 bytes = 16-bit + wf.setframerate(16000) + wf.writeframes(b"".join(pcm_data)) + + return file_path + + async def speech_to_text(self, opus_data: List[bytes], session_id: str) -> Tuple[Optional[str], Optional[str]]: + """语音转文本主处理逻辑""" + file_path = None + try: + # 保存音频文件 + start_time = time.time() + file_path = self.save_audio_to_file(opus_data, session_id) + logger.bind(tag=TAG).debug(f"音频文件保存耗时: {time.time() - start_time:.3f}s | 路径: {file_path}") + + # 语音识别 + start_time = time.time() + result = self.model.generate( + input=file_path, + cache={}, + language="auto", + use_itn=True, + batch_size_s=60, + ) + text = rich_transcription_postprocess(result[0]["text"]) + logger.bind(tag=TAG).debug(f"语音识别耗时: {time.time() - start_time:.3f}s | 结果: {text}") + + return text, file_path + + except Exception as e: + logger.bind(tag=TAG).error(f"语音识别失败: {e}", exc_info=True) + return "", None + + finally: + # 文件清理逻辑 + if self.delete_audio_file and file_path and os.path.exists(file_path): + try: + os.remove(file_path) + logger.bind(tag=TAG).debug(f"已删除临时音频文件: {file_path}") + except Exception as e: + logger.bind(tag=TAG).error(f"文件删除失败: {file_path} | 错误: {e}") diff --git a/core/providers/llm/homeassistant/homeassistant.py b/core/providers/llm/homeassistant/homeassistant.py new file mode 100644 index 000000000..115e85e95 --- /dev/null +++ b/core/providers/llm/homeassistant/homeassistant.py @@ -0,0 +1,62 @@ +import requests +from requests.exceptions import RequestException +from config.logger import setup_logging +from core.providers.llm.base import LLMProviderBase + +TAG = __name__ +logger = setup_logging() + + +class LLMProvider(LLMProviderBase): + def __init__(self, config): + self.agent_id = config.get("agent_id") # 对应 agent_id + self.api_key = config.get("api_key") + self.base_url = config.get("base_url", config.get("url")) # 默认使用 base_url + self.api_url = f"{self.base_url}/api/conversation/process" # 拼接完整的 API URL + + def response(self, session_id, dialogue): + print(dialogue) + try: + # home assistant语音助手自带意图,无需使用xiaozhi ai自带的,只需要把用户说的话传递给home assistant即可 + + # 提取最后一个 role 为 'user' 的 content + input_text = None + if isinstance(dialogue, list): # 确保 dialogue 是一个列表 + # 逆序遍历,找到最后一个 role 为 'user' 的消息 + for message in reversed(dialogue): + if message.get("role") == "user": # 找到 role 为 'user' 的消息 + input_text = message.get("content", "") + break # 找到后立即退出循环 + + # 构造请求数据 + payload = { + "text": input_text, + "agent_id": self.agent_id, + "conversation_id": session_id # 使用 session_id 作为 conversation_id + } + # 设置请求头 + headers = { + "Authorization": f"Bearer {self.api_key}", + "Content-Type": "application/json" + } + + # 发起 POST 请求 + response = requests.post(self.api_url, json=payload, headers=headers) + + # 检查请求是否成功 + response.raise_for_status() + + # 解析返回数据 + data = response.json() + speech = data.get("response", {}).get("speech", {}).get("plain", {}).get("speech", "") + + # 返回生成的内容 + if speech: + yield speech + else: + logger.bind(tag=TAG).warning("API 返回数据中没有 speech 内容") + + except RequestException as e: + logger.bind(tag=TAG).error(f"HTTP 请求错误: {e}") + except Exception as e: + logger.bind(tag=TAG).error(f"生成响应时出错: {e}") diff --git a/core/providers/tts/aliyun.py b/core/providers/tts/aliyun.py new file mode 100644 index 000000000..854e61280 --- /dev/null +++ b/core/providers/tts/aliyun.py @@ -0,0 +1,57 @@ +import os +import uuid +import json +import requests +from datetime import datetime +from core.providers.tts.base import TTSProviderBase + +import http.client +import urllib.parse + + +class TTSProvider(TTSProviderBase): + def __init__(self, config, delete_audio_file): + super().__init__(config, delete_audio_file) + self.appkey = config.get("appkey") + self.token = config.get("token") + self.format = config.get("format", "wav") + self.sample_rate = config.get("sample_rate", 16000) + self.voice = config.get("voice", "xiaoyun") + self.volume = config.get("volume", 50) + self.speech_rate = config.get("speech_rate", 0) + self.pitch_rate = config.get("pitch_rate", 0) + + self.host = config.get("host", "nls-gateway-cn-shanghai.aliyuncs.com") + self.api_url = f"https://{self.host}/stream/v1/tts" + self.header = { + "Content-Type": "application/json" + } + + def generate_filename(self, extension=".wav"): + return os.path.join(self.output_file, f"tts-{__name__}{datetime.now().date()}@{uuid.uuid4().hex}{extension}") + + async def text_to_speak(self, text, output_file): + request_json = { + "appkey": self.appkey, + "token": self.token, + "text": text, + "format": self.format, + "sample_rate": self.sample_rate, + "voice": self.voice, + "volume": self.volume, + "speech_rate": self.speech_rate, + "pitch_rate": self.pitch_rate + } + + print(self.api_url, json.dumps(request_json, ensure_ascii=False)) + try: + resp = requests.post(self.api_url, json.dumps(request_json), headers=self.header) + # 检查返回请求数据的mime类型是否是audio/***,是则保存到指定路径下;返回的是binary格式的 + if resp.headers['Content-Type'].startswith('audio/'): + with open(output_file, 'wb') as f: + f.write(resp.content) + return output_file + else: + raise Exception(f"{__name__} status_code: {resp.status_code} response: {resp.content}") + except Exception as e: + raise Exception(f"{__name__} error: {e}") diff --git a/core/providers/tts/base.py b/core/providers/tts/base.py index 54438f312..84737608e 100644 --- a/core/providers/tts/base.py +++ b/core/providers/tts/base.py @@ -2,7 +2,7 @@ import asyncio from config.logger import setup_logging import os import numpy as np -import opuslib +import opuslib_next from pydub import AudioSegment from abc import ABC, abstractmethod @@ -58,7 +58,7 @@ class TTSProviderBase(ABC): raw_data = audio.raw_data # 初始化Opus编码器 - encoder = opuslib.Encoder(16000, 1, opuslib.APPLICATION_AUDIO) + encoder = opuslib_next.Encoder(16000, 1, opuslib_next.APPLICATION_AUDIO) # 编码参数 frame_duration = 60 # 60ms per frame diff --git a/core/providers/tts/doubao.py b/core/providers/tts/doubao.py index f6eca9744..74ddde2aa 100644 --- a/core/providers/tts/doubao.py +++ b/core/providers/tts/doubao.py @@ -25,7 +25,7 @@ class TTSProvider(TTSProviderBase): async def text_to_speak(self, text, output_file): request_json = { "app": { - "appid": self.appid, + "appid": f"{self.appid}", "token": "access_token", "cluster": self.cluster }, @@ -49,8 +49,13 @@ class TTSProvider(TTSProviderBase): } } - resp = requests.post(self.api_url, json.dumps(request_json), headers=self.header) - if "data" in resp.json(): - data = resp.json()["data"] - file_to_save = open(output_file, "wb") - file_to_save.write(base64.b64decode(data)) + try: + resp = requests.post(self.api_url, json.dumps(request_json), headers=self.header) + if "data" in resp.json(): + data = resp.json()["data"] + file_to_save = open(output_file, "wb") + file_to_save.write(base64.b64decode(data)) + else: + raise Exception(f"{__name__} status_code: {resp.status_code} response: {resp.content}") + except Exception as e: + raise Exception(f"{__name__} error: {e}") diff --git a/core/providers/tts/fishspeech.py b/core/providers/tts/fishspeech.py index c71214986..5794a2e36 100644 --- a/core/providers/tts/fishspeech.py +++ b/core/providers/tts/fishspeech.py @@ -9,8 +9,11 @@ from pydantic import BaseModel, Field, conint, model_validator from typing_extensions import Annotated from datetime import datetime from typing import Literal -# from base import TTSProviderBase from core.providers.tts.base import TTSProviderBase +from config.logger import setup_logging + +TAG = __name__ +logger = setup_logging() class ServeReferenceAudio(BaseModel): @@ -86,6 +89,9 @@ class TTSProvider(TTSProviderBase): self.channels = config.get("channels",1) self.rate = config.get("rate",44100) self.api_key = config.get("api_key","YOUR_API_KEY") + if "你" in self.api_key: + logger.bind(tag=TAG).error("你还没配置FishSpeech TTS的密钥,请在配置文件中配置密钥,否则无法正常工作") + return self.normalize = config.get("normalize",True) self.max_new_tokens = config.get("max_new_tokens",1024) self.chunk_length = config.get("chunk_length",200) diff --git a/core/providers/tts/minimax.py b/core/providers/tts/minimax.py new file mode 100644 index 000000000..1fe7be502 --- /dev/null +++ b/core/providers/tts/minimax.py @@ -0,0 +1,77 @@ +import os +import uuid +import json +import requests +from datetime import datetime +from core.providers.tts.base import TTSProviderBase + + +class TTSProvider(TTSProviderBase): + def __init__(self, config, delete_audio_file): + super().__init__(config, delete_audio_file) + self.group_id = config.get("group_id") + self.api_key = config.get("api_key") + self.model = config.get("model") + self.voice_id = config.get("voice_id") + + default_voice_setting = { + "voice_id": "female-shaonv", + "speed": 1, + "vol": 1, + "pitch": 0, + "emotion": "happy" + } + default_pronunciation_dict = { + "tone": [ + "处理/(chu3)(li3)", "危险/dangerous" + ] + } + defult_audio_setting = { + "sample_rate": 32000, + "bitrate": 128000, + "format": "mp3", + "channel": 1 + } + self.voice_setting = {**default_voice_setting, **config.get("voice_setting", {})} + self.pronunciation_dict = {**default_pronunciation_dict, **config.get("pronunciation_dict", {})} + self.audio_setting = {**defult_audio_setting, **config.get("audio_setting", {})} + self.timber_weights = config.get("timber_weights", []) + + if self.voice_id: + self.voice_setting["voice_id"] = self.voice_id + + self.host = "api.minimax.chat" + self.api_url = f"https://{self.host}/v1/t2a_v2?GroupId={self.group_id}" + self.header = { + "Content-Type": "application/json", + "Authorization": f"Bearer {self.api_key}" + } + + def generate_filename(self, extension=".mp3"): + return os.path.join(self.output_file, f"tts-{__name__}{datetime.now().date()}@{uuid.uuid4().hex}{extension}") + + async def text_to_speak(self, text, output_file): + request_json = { + "model": self.model, + "text": text, + "stream": False, + "voice_setting": self.voice_setting, + "pronunciation_dict": self.pronunciation_dict, + "audio_setting": self.audio_setting, + } + + if type(self.timber_weights) is list and len(self.timber_weights) > 0: + request_json["timber_weights"] = self.timber_weights + request_json["voice_setting"]["voice_id"] = "" + + try: + resp = requests.post(self.api_url, json.dumps(request_json), headers=self.header) + # 检查返回请求数据的status_code是否为0 + if resp.json()["base_resp"]["status_code"] == 0: + data = resp.json()['data']['audio'] + file_to_save = open(output_file, "wb") + file_to_save.write(bytes.fromhex(data)) + else: + raise Exception(f"{__name__} status_code: {resp.status_code} response: {resp.content}") + except Exception as e: + raise Exception(f"{__name__} error: {e}") \ No newline at end of file diff --git a/core/providers/tts/siliconflow.py b/core/providers/tts/siliconflow.py index faca44057..4c0cc3562 100644 --- a/core/providers/tts/siliconflow.py +++ b/core/providers/tts/siliconflow.py @@ -1,7 +1,5 @@ import os import uuid -import json -import base64 import requests from datetime import datetime from core.providers.tts.base import TTSProviderBase diff --git a/core/utils/asr.py b/core/utils/asr.py index 1c23fe551..983114d32 100644 --- a/core/utils/asr.py +++ b/core/utils/asr.py @@ -1,114 +1,24 @@ +import importlib +import logging +import os +import sys import time import wave -import os -from abc import ABC, abstractmethod -from config.logger import setup_logging -from typing import Optional, Tuple, List import uuid - -import opuslib -from funasr import AutoModel -from funasr.utils.postprocess_utils import rich_transcription_postprocess +from abc import ABC, abstractmethod +from typing import Optional, Tuple, List +from core.providers.asr.base import ASRProviderBase +from config.logger import setup_logging TAG = __name__ logger = setup_logging() -class ASR(ABC): - @abstractmethod - def save_audio_to_file(self, opus_data: List[bytes], session_id: str) -> str: - """解码Opus数据并保存为WAV文件""" - pass - - @abstractmethod - def speech_to_text(self, opus_data: List[bytes], session_id: str) -> Tuple[Optional[str], Optional[str]]: - """将语音数据转换为文本""" - pass - - -class FunASR(ASR): - def __init__(self, config: dict, delete_audio_file: bool): - self.model_dir = config.get("model_dir") - self.output_dir = config.get("output_dir") # 修正配置键名 - self.delete_audio_file = delete_audio_file - - # 确保输出目录存在 - os.makedirs(self.output_dir, exist_ok=True) - - self.model = AutoModel( - model=self.model_dir, - vad_kwargs={"max_single_segment_time": 30000}, - disable_update=True, - hub="hf" - # device="cuda:0", # 启用GPU加速 - ) - - def save_audio_to_file(self, opus_data: List[bytes], session_id: str) -> str: - """将Opus音频数据解码并保存为WAV文件""" - file_name = f"asr_{session_id}_{uuid.uuid4()}.wav" - file_path = os.path.join(self.output_dir, file_name) - - decoder = opuslib.Decoder(16000, 1) # 16kHz, 单声道 - pcm_data = [] - - for opus_packet in opus_data: - try: - pcm_frame = decoder.decode(opus_packet, 960) # 960 samples = 60ms - pcm_data.append(pcm_frame) - except opuslib.OpusError as e: - logger.bind(tag=TAG).error(f"Opus解码错误: {e}", exc_info=True) - - with wave.open(file_path, "wb") as wf: - wf.setnchannels(1) - wf.setsampwidth(2) # 2 bytes = 16-bit - wf.setframerate(16000) - wf.writeframes(b"".join(pcm_data)) - - return file_path - - def speech_to_text(self, opus_data: List[bytes], session_id: str) -> Tuple[Optional[str], Optional[str]]: - """语音转文本主处理逻辑""" - file_path = None - try: - # 保存音频文件 - start_time = time.time() - file_path = self.save_audio_to_file(opus_data, session_id) - logger.bind(tag=TAG).debug(f"音频文件保存耗时: {time.time() - start_time:.3f}s | 路径: {file_path}") - - # 语音识别 - start_time = time.time() - result = self.model.generate( - input=file_path, - cache={}, - language="auto", - use_itn=True, - batch_size_s=60, - ) - text = rich_transcription_postprocess(result[0]["text"]) - logger.bind(tag=TAG).debug(f"语音识别耗时: {time.time() - start_time:.3f}s | 结果: {text}") - - return text, file_path - - except Exception as e: - logger.bind(tag=TAG).error(f"语音识别失败: {e}", exc_info=True) - return None, None - - finally: - # 文件清理逻辑 - if self.delete_audio_file and file_path and os.path.exists(file_path): - try: - os.remove(file_path) - logger.bind(tag=TAG).debug(f"已删除临时音频文件: {file_path}") - except Exception as e: - logger.bind(tag=TAG).error(f"文件删除失败: {file_path} | 错误: {e}") - - -def create_instance(class_name: str, *args, **kwargs) -> ASR: +def create_instance(class_name: str, *args, **kwargs) -> ASRProviderBase: """工厂方法创建ASR实例""" - cls_map = { - "FunASR": FunASR, - # 可扩展其他ASR实现 - } + if os.path.exists(os.path.join('core', 'providers', 'asr', f'{class_name}.py')): + lib_name = f'core.providers.asr.{class_name}' + if lib_name not in sys.modules: + sys.modules[lib_name] = importlib.import_module(f'{lib_name}') + return sys.modules[lib_name].ASRProvider(*args, **kwargs) - if cls := cls_map.get(class_name): - return cls(*args, **kwargs) - raise ValueError(f"不支持的ASR类型: {class_name}") + raise ValueError(f"不支持的ASR类型: {class_name},请检查该配置的type是否设置正确") \ No newline at end of file diff --git a/core/utils/llm.py b/core/utils/llm.py index f48c103d5..8fdec09b2 100644 --- a/core/utils/llm.py +++ b/core/utils/llm.py @@ -1,5 +1,13 @@ import os import sys +import asyncio +from typing import List, Dict, Any + +# 添加项目根目录到Python路径 +current_dir = os.path.dirname(os.path.abspath(__file__)) +project_root = os.path.abspath(os.path.join(current_dir, "..", "..")) +sys.path.insert(0, project_root) + from config.logger import setup_logging import importlib from datetime import datetime @@ -21,39 +29,115 @@ def create_instance(class_name, *args, **kwargs): raise ValueError(f"不支持的LLM类型: {class_name},请检查该配置的type是否设置正确") -if __name__ == "__main__": +async def test_single_model(llm_name: str, llm_config: Dict[str, Any], test_prompt: str, config: Dict[str, Any]) -> Dict[str, Any]: + """异步测试单个模型""" + try: + # 获取实际的LLM类型 + llm_type = llm_config["type"] if "type" in llm_config else llm_name + llm = create_instance(llm_type, llm_config) + + # 开始测试 + dialogue = [] + dialogue.append({"role": "system", "content": config.get("prompt")}) + dialogue.append({"role": "user", "content": test_prompt}) + + start_time = datetime.now() + llm_responses = llm.response("test", dialogue) + response_message = [] + first_response_time = None + total_response_time = None + start = 0 + full_response = "" + + for content in llm_responses: + response_message.append(content) + full_response += content + + if is_segment(response_message): + segment_text = "".join(response_message[start:]) + segment_text = get_string_no_punctuation_or_emoji(segment_text) + if len(segment_text) > 0: + if first_response_time is None: + first_response_time = (datetime.now() - start_time).total_seconds() + start = len(response_message) + + total_response_time = (datetime.now() - start_time).total_seconds() + + return { + "name": llm_name, + "type": llm_type, + "first_response_time": first_response_time, + "total_response_time": total_response_time, + "response_length": len(full_response), + "status": "成功", + "response": full_response + } + + except Exception as e: + print(f"测试 {llm_name} 时发生错误: {str(e)}") + return { + "name": llm_name, + "type": llm_config.get("type", llm_name), + "first_response_time": None, + "total_response_time": None, + "response_length": 0, + "status": f"失败 - {str(e)}", + "response": "" + } + + +async def main(): """ - 响应速度测试 + LLM模型响应速度测试和排行(异步版本) """ config = read_config(get_project_dir() + "config.yaml") - llm = create_instance( - config["selected_module"]["LLM"] - if not "type" in config["LLM"][config["selected_module"]["LLM"]] - else - config["LLM"][config["selected_module"]["LLM"]]["type"], - config["LLM"][config["selected_module"]["LLM"]] - ) + test_prompt = "你好小智" + + print("开始并发测试所有模型...") + + # 创建所有模型的测试任务 + tasks = [] + for llm_name, llm_config in config["LLM"].items(): + task = asyncio.create_task(test_single_model(llm_name, llm_config, test_prompt, config)) + tasks.append(task) + + # 等待所有测试完成 + test_results = await asyncio.gather(*tasks) + + # 打印测试结果排行榜 + print("\n========= LLM模型性能测试排行榜 =========") + print("测试提示词:", test_prompt) + + # 过滤出成功的结果,并确保数值有效 + successful_results = [r for r in test_results if r["status"] == "成功" and r["first_response_time"] is not None] + + if successful_results: + print("\n1. 首次响应时间排行:") + sorted_by_first = sorted(successful_results, key=lambda x: x["first_response_time"]) + for i, result in enumerate(sorted_by_first, 1): + print(f"{i}. {result['name']}({result['type']}) - {result['first_response_time']:.2f}秒") + print(f" 响应内容: {result['response'][:50]}...") # 只显示前50个字符 - start_time = datetime.now() + print("\n2. 总响应时间排行:") + sorted_by_total = sorted(successful_results, key=lambda x: x["total_response_time"] or float('inf')) + for i, result in enumerate(sorted_by_total, 1): + if result["total_response_time"] is not None: + print(f"{i}. {result['name']}({result['type']}) - {result['total_response_time']:.2f}秒") - dialogue = [] - dialogue.append({"role": "system", "content": config.get("prompt")}) - dialogue.append({"role": "user", "content": "你好小智"}) - llm_responses = llm.response("test", dialogue) - response_message = [] - first_text = None - start = 0 + print("\n3. 响应长度比较:") + sorted_by_length = sorted(successful_results, key=lambda x: x["response_length"], reverse=True) + for i, result in enumerate(sorted_by_length, 1): + print(f"{i}. {result['name']}({result['type']}) - {result['response_length']}字符") + else: + print("\n没有成功完成测试的模型。") - for content in llm_responses: - response_message.append(content) + if len(test_results) != len(successful_results): + print("\n测试失败的模型:") + failed_results = [r for r in test_results if r["status"] != "成功" or r["first_response_time"] is None] + for result in failed_results: + print(f"- {result['name']}({result['type']}): {result['status']}") - if is_segment(response_message): - segment_text = "".join(response_message[start:]) - segment_text = get_string_no_punctuation_or_emoji(segment_text) - if len(segment_text) > 0: - if first_text is None: - first_text = segment_text - print("大模型首次返回耗时:" + str(datetime.now() - start_time)) - start = len(response_message) - print("大模型返回总耗时:" + str(datetime.now() - start_time)) +if __name__ == "__main__": + # 运行异步主函数 + asyncio.run(main()) diff --git a/core/utils/util.py b/core/utils/util.py index 490981284..5cb4b70db 100644 --- a/core/utils/util.py +++ b/core/utils/util.py @@ -95,7 +95,7 @@ def remove_punctuation_and_length(text): char not in full_width_punctuations and char not in half_width_punctuations and char not in space and char not in full_width_space]) if result == "Yeah": - return 0 + return 0, "" return len(result), result @@ -125,4 +125,4 @@ def check_password(password): return False # 如果满足所有条件,则返回True - return True \ No newline at end of file + return True diff --git a/core/utils/vad.py b/core/utils/vad.py index 05e11eb52..ef782281c 100644 --- a/core/utils/vad.py +++ b/core/utils/vad.py @@ -1,6 +1,6 @@ from abc import ABC, abstractmethod from config.logger import setup_logging -import opuslib +import opuslib_next import time import numpy as np import torch @@ -24,7 +24,7 @@ class SileroVAD(VAD): force_reload=False) (get_speech_timestamps, _, _, _, _) = self.utils - self.decoder = opuslib.Decoder(16000, 1) + self.decoder = opuslib_next.Decoder(16000, 1) self.vad_threshold = config.get("threshold") self.silence_threshold_ms = config.get("min_silence_duration_ms") @@ -59,7 +59,7 @@ class SileroVAD(VAD): conn.client_have_voice_last_time = time.time() * 1000 return client_have_voice - except opuslib.OpusError as e: + except opuslib_next.OpusError as e: logger.bind(tag=TAG).info(f"解码错误: {e}") except Exception as e: logger.bind(tag=TAG).error(f"Error processing audio packet: {e}") diff --git a/core/websocket_server.py b/core/websocket_server.py index d8dce04d8..8e09e0fe3 100644 --- a/core/websocket_server.py +++ b/core/websocket_server.py @@ -7,6 +7,7 @@ from core.utils import asr, vad, llm, tts TAG = __name__ + class WebSocketServer: def __init__(self, config: dict): self.config = config @@ -21,7 +22,10 @@ class WebSocketServer: self.config["VAD"][self.config["selected_module"]["VAD"]] ), asr.create_instance( - self.config["selected_module"]["ASR"], + self.config["selected_module"]["ASR"] + if not 'type' in self.config["ASR"][self.config["selected_module"]["ASR"]] + else + self.config["ASR"][self.config["selected_module"]["ASR"]]["type"], self.config["ASR"][self.config["selected_module"]["ASR"]], self.config["delete_audio"] ), diff --git a/docker-compose-example.yml b/docker-compose-example.yml deleted file mode 100755 index 41a4ebf93..000000000 --- a/docker-compose-example.yml +++ /dev/null @@ -1,12 +0,0 @@ -services: - xiaozhi-esp32-server: - image: ccr.ccs.tencentyun.com/xinnan/xiaozhi-esp32-server:latest - container_name: xiaozhi-esp32-server - restart: always - #security_opt: - # - seccomp:unconfined - ports: - - "8000:8000" - - "8002:8002" - volumes: - - ./.config.yaml:/opt/xiaozhi-esp32-server/config.yaml \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index efd18be16..d56d8bbab 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,17 @@ services: xiaozhi-esp32-server: - image: ccr.ccs.tencentyun.com/xinnan/xiaozhi-esp32-server:latest + image: ghcr.nju.edu.cn/xinnan-tech/xiaozhi-esp32-server:latest container_name: xiaozhi-esp32-server restart: always - #security_opt: - # - seccomp:unconfined + security_opt: + - seccomp:unconfined ports: + # ws服务端 - "8000:8000" + # 管理后台 + - "8002:8002" volumes: - - ./.config.yaml:/opt/xiaozhi-esp32-server/config.yaml \ No newline at end of file + # 配置文件目录 + - ./data:/app/data + # 模型文件挂接,很重要 + - ./models/SenseVoiceSmall/model.pt:/app/models/SenseVoiceSmall/model.pt \ No newline at end of file diff --git a/docs/Deployment-silm.md b/docs/Deployment-silm.md deleted file mode 100644 index b0f54e479..000000000 --- a/docs/Deployment-silm.md +++ /dev/null @@ -1,217 +0,0 @@ -# 部署指南 - -本项目支持 **x86** 和 **arm64** 架构,可运行于国产操作系统。 - -## 方式一:快速部署(推荐) - -### 1. 安装 Docker - -如果未安装 Docker,可参考 [Docker 安装教程](https://www.runoob.com/docker/ubuntu-docker-install.html)。 - -### 2. 创建项目目录 - -选择一个空目录作为 **项目目录**。 - -### 3. 下载配置文件 - -访问 [config.yaml](https://github.com/xinnan-tech/xiaozhi-esp32-server/blob/main/config.yaml),点击 `RAW` 旁的下载按钮,保存到 **项目目录**。 - -### 4. 运行 Docker - -打开终端,`cd` 进入 **项目目录**,执行: - -```sh -docker run -d --name xiaozhi-esp32-server --restart always --security-opt seccomp:unconfined \ - -p 8000:8000 \ - -v $(pwd)/config.yaml:/opt/xiaozhi-esp32-server/config.yaml \ - ccr.ccs.tencentyun.com/xinnan/xiaozhi-esp32-server:latest -``` - -### 5. 确认运行状态 - -```sh -docker ps # 查看容器状态 -docker logs -f xiaozhi-esp32-server # 查看日志 -``` - -## 方式二:使用 Docker Compose 部署 - -### 1. 创建 `docker-compose.yml` -在 `项目目录` 下创建 `docker-compose.yml` 文件,内容如下: - -```yaml -version: '3' -services: - xiaozhi-esp32-server: - image: ccr.ccs.tencentyun.com/xinnan/xiaozhi-esp32-server:latest - container_name: xiaozhi-esp32-server - restart: always - security_opt: - - seccomp:unconfined - ports: - - "8000:8000" - volumes: - - ./config.yaml:/opt/xiaozhi-esp32-server/config.yaml -``` - -### 2. 启动服务 -```sh -docker-compose up -d -``` - -### 3. 确认运行状态 -```sh -docker-compose ps -docker-compose logs -f -``` - -### 4. 停止和删除容器 -```sh -docker-compose down -``` - -### 5. 版本升级 - -#### 备份配置文件 -```sh -cp config.yaml config_backup.yaml -``` - -#### 更新 Docker 镜像 -```sh -docker-compose pull -docker-compose down -docker-compose up -d -``` - - -## 方式三:源码部署(免环境部署/可修改代码) - -### 1. 下载源码 - -```sh -git clone https://github.com/xinnan-tech/xiaozhi-esp32-server.git -cd xiaozhi-esp32-server -``` - -或手动下载 [ZIP 包](https://github.com/xinnan-tech/xiaozhi-esp32-server/archive/refs/heads/main.zip),解压后重命名为 `xiaozhi-esp32-server`。 - -## 2.运行docker - -修改完配置后,打开命令行工具,`cd`进入到你的项目目录下,执行以下命令 - -```sh -docker run -it --name xiaozhi-env --restart always --security-opt seccomp:unconfined \ - -p 8000:8000 \ - -p 8002:8002 \ - -v ./:/app \ - ccr.ccs.tencentyun.com/kalicyh/poetry:v3.10_latest -``` - -然后就和正常开发一样了 - -## 3.安装依赖 - -在刚刚的打开的终端运行 - -```sh -poetry install --no-root -``` - -```sh -apt-get update -apt-get install -y --no-install-recommends libopus0 ffmpeg -``` - -速度慢可以尝试使用清华镜像 - -```sh -echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware" > /etc/apt/sources.list -echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list -echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list -echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware" >> /etc/apt/sources.list -apt-get update -apt-get install -y --no-install-recommends libopus0 ffmpeg -``` - -## 4.运行项目 - -```sh -poetry run python app.py -``` - -## 方式三:本地运行(适用于开发) - -### 1. 安装环境 - -```sh -conda create -n xiaozhi-esp32-server python=3.10 -y -conda activate xiaozhi-esp32-server -``` - -#### Mac/Windows: - -```sh -conda install conda-forge::libopus conda-forge::ffmpeg -``` - -#### Ubuntu: - -```sh -apt-get install libopus0 ffmpeg -``` - -### 2. 下载源码 & 安装依赖 - -```sh -git clone https://github.com/xinnan-tech/xiaozhi-esp32-server.git -cd xiaozhi-esp32-server -pip install -r requirements.txt -``` - -### 3. 运行项目 - -```sh -python app.py -``` - -## 版本升级 - -```sh -docker stop xiaozhi-esp32-server -docker rm xiaozhi-esp32-server -docker rmi ccr.ccs.tencentyun.com/xinnan/xiaozhi-esp32-server:latest -``` - -然后重新按照 **方式一** 或 **方式二** 运行 Docker。 - -## 重要配置 - -修改 `config.yaml` 以适配不同 LLM 和 TTS 组件。 - -示例: - -```yaml -selected_module: - ASR: FunASR - VAD: SileroVAD - LLM: ChatGLMLLM - TTS: EdgeTTS -``` - -如需使用 `Dify` 或 `DeepSeekLLM`,修改 `LLM` 部分并填写密钥。 - -## 模型文件下载 - -语音转文字默认使用 `SenseVoiceSmall`,需下载 `model.pt` 并存放至 `model/SenseVoiceSmall` 目录。 - -- [阿里魔塔下载](https://modelscope.cn/models/iic/SenseVoiceSmall/resolve/master/model.pt) -- [百度网盘下载](https://pan.baidu.com/share/init?surl=QlgM58FHhYv1tFnUT_A8Sg&pwd=qvna) 提取码:`qvna` - ---- - -如遇问题,可参考 `docker logs -f xiaozhi-esp32-server` 进行排查。 - -**至此,部署完成!** 🚀 - - diff --git a/docs/Deployment.md b/docs/Deployment.md index 44a54a439..7f9aecbf6 100644 --- a/docs/Deployment.md +++ b/docs/Deployment.md @@ -10,37 +10,97 @@ docker镜像已支持x86架构、arm64架构的CPU,支持在国产操作系统 安装完后,你需要为这个项目找一个安放配置文件的目录,我们暂且称它为`项目目录`,这个目录最好是一个新建的空的目录。 +创建好目录后,你需要在`项目目录`下面创建`data`文件夹和`models`文件夹,`models`下面还要再创建`SenseVoiceSmall`文件夹。 + +最终目录结构如下所示: + +``` +你的项目根目录 + ├─ data + ├─ models + ├─ SenseVoiceSmall +``` + +## 4. 下载语音识别模型文件 + +你需要下载语音识别的模型文件,因为本项目的默认语音识别用的是本地离线语音识别方案。可通过这个方式下载 +[跳转到下载语音识别模型文件](#模型文件) + +下载完后,回到本教程。 + +## 3. 下载docker-compose.yaml + +用浏览器打开[这个链接](https://github.com/xinnan-tech/xiaozhi-esp32-server/blob/main/docker-compose.yml)。 + +在页面的右侧找到名称为`RAW`按钮,在`RAW`按钮的旁边,找到下载的图标,点击下载按钮,下载`docker-compose.yml`文件。 把文件下载到你的 +`项目目录`中。 + +下载完后,回到本教程继续往下。 + ## 3. 下载配置文件 用浏览器打开[这个链接](https://github.com/xinnan-tech/xiaozhi-esp32-server/blob/main/config.yaml)。 在页面的右侧找到名称为`RAW`按钮,在`RAW`按钮的旁边,找到下载的图标,点击下载按钮,下载`config.yaml`文件。 把文件下载到你的 -`项目目录`。 +`项目目录`下面的`data`文件夹中,然后把`config.yaml`文件重命名为`.config.yaml`。 -## 4.[跳转到配置项目文件](#配置项目) +下载完配置文件后,我们确认一下整个`项目目录`里面的文件如下所示: + +``` +你的项目根目录 + ├─ docker-compose.yml + ├─ data + ├─ .config.yaml + ├─ models + ├─ SenseVoiceSmall + ├─ model.pt +``` + +如果你的文件目录结构也是上面的,就继续往下。如果不是,你就再仔细看看是不是漏操作了什么。 + +## 4. 配置项目文件 + +接下里,程序还不能直接运行,你需要配置一下,你到底使用的是什么模型。你可以看这个教程: +[跳转到配置项目文件](#配置项目) + +配置完项目文件后,回到本教程继续往下。 ## 5. 执行docker命令 -打开命令行工具,`cd` 进入到你的`项目目录`,执行以下命令 +打开命令行工具,使用`终端`或`命令行`工具 进入到你的`项目目录`,执行以下命令 ``` -#如果你是linux,执行 -ls -#如果你是windows,执行 -dir +docker-compose up -d ``` -如果你能看到`config.yaml`文件,确确实实进入到了`项目目录`,接着执行以下命令: +执行完后,再执行以下命令,查看日志信息。 ``` -docker run -d --name xiaozhi-esp32-server --restart always --security-opt seccomp:unconfined -p 8000:8000 -v $(pwd)/config.yaml:/opt/xiaozhi-esp32-server/config.yaml ccr.ccs.tencentyun.com/xinnan/xiaozhi-esp32-server:latest +docker logs -f xiaozhi-esp32-server ``` -## 6.[跳转到运行状态确认](#运行状态确认) +这时,你就要留意日志信息,可以根据这个教程,判断是否成功了。[跳转到运行状态确认](#运行状态确认) -## [跳转到版本升级操作](#版本升级操作) +## 6.版本升级操作 -# 方式二:借助docker环境运行部署(仅限开发人员/小白勿用) +如果后期想升级版本,可以这么操作 + +1、备份好`data`文件夹中的`.config.yaml`文件,一些关键的配置到时复制到新的`.config.yaml`文件里。 +请注意是对关键密钥逐个复制,不要直接覆盖。因为新的`.config.yaml`文件可能有一些新的配置项,旧的`.config.yaml`文件不一定有。 + +2、执行以下命令 + +``` +docker stop xiaozhi-esp32-server +docker rm xiaozhi-esp32-server +docker rmi ghcr.nju.edu.cn/xinnan-tech/xiaozhi-esp32-server:latest +``` + +3、重新按docker方式部署 + +# 方式二:借助Docker环境运行部署 + +开发人员如果不想安装`conda`环境,可以使用这种方法管理好依赖。 ## 1.克隆项目 @@ -96,26 +156,15 @@ poetry run python app.py ## 1.安装基础环境 -本项目使用`conda`管理依赖环境,安装好后,开始执行以下命令。 +本项目使用`conda`管理依赖环境。如果不方便安装`conda`,需要根据实际的操作系统安装好`libopus`和`ffmpeg`。 +如果确定使用`conda`,则安装好后,开始执行以下命令。 ``` conda remove -n xiaozhi-esp32-server --all -y conda create -n xiaozhi-esp32-server python=3.10 -y conda activate xiaozhi-esp32-server -``` - -执行以上命令后, 如果你的电脑是Windows或Mac,执行下面的语句: - -``` -conda activate xiaozhi-esp32-server -conda install conda-forge::libopus -conda install conda-forge::ffmpeg -``` - -如果你的电脑是ubuntu,执行下面的语句: - -``` -apt-get install libopus0 ffmpeg +conda install conda-forge::libopus -y +conda install conda-forge::ffmpeg -y ``` ## 2.安装本项目依赖 @@ -136,9 +185,17 @@ pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ pip install -r requirements.txt ``` -## 3.[跳转到下载语音识别模型文件](#模型文件) +## 3.下载语音识别模型文件 -## 4.[跳转到配置项目文件](#配置项目) +你需要下载语音识别的模型文件,因为本项目的默认语音识别用的是本地离线语音识别方案。可通过这个方式下载 +[跳转到下载语音识别模型文件](#模型文件) + +下载完后,回到本教程。 + +## 4.配置项目文件 + +接下里,程序还不能直接运行,你需要配置一下,你到底使用的是什么模型。你可以看这个教程: +[跳转到配置项目文件](#配置项目) ## 5.运行项目 @@ -148,25 +205,20 @@ conda activate xiaozhi-esp32-server python app.py ``` -## 6.[跳转到运行状态确认](#运行状态确认) +这时,你就要留意日志信息,可以根据这个教程,判断是否成功了。[跳转到运行状态确认](#运行状态确认) # 汇总 ## 配置项目 -修改`config.yaml`文件,配置本项目所需的各种参数。默认的LLM使用的是`ChatGLMLLM` +如果你的`项目目录`目录没有`data`,你需要创建`data`目录。 +如果你的`data`下面没有`.config.yaml`文件,你可以把源码目录下的`config.yaml`文件复制一份,重命名为`.config.yaml` + +修改`项目目录`下`data`目录下的`.config.yaml`文件,配置本项目所需的各种参数。默认的LLM使用的是`ChatGLMLLM` ,你需要配置密钥,因为他们的模型,虽然有免费的,但是仍要去[官网](https://bigmodel.cn/usercenter/proj-mgmt/apikeys)注册密钥,才能启动。 默认的TTS使用的是`EdgeTTS`,这个无需配置,如果你需要更换成`豆包TTS`,则需要配置密钥。 -``` -# 如果您是一名开发者,建议阅读以下内容。如果不是开发者,可以忽略这部分内容。 -# 在开发中,在项目根目录创建data目录,将【config.yaml】复制一份,改成【.config.yaml】,放进data目录中 -# 系统会优先读取【data/.config.yaml】文件的配置。 -# 这样做,可以避免在提交代码的时候,错误地提交密钥信息,保护您的密钥安全。 -``` - 配置说明:这里是各个功能使用的默认组件,例如LLM默认使用`ChatGLMLLM`模型。如果需要切换模型,就是改对应的名称。 - 本项目的默认配置仅是成本最低配置(`glm-4-flash`和`EdgeTTS`都是免费的),如果需要更优的更快的搭配,需要自己结合部署环境切换各组件的使用。 ``` @@ -197,7 +249,7 @@ LLM: ## 模型文件 -下载源码后,需要下载模型文件。 默认使用`SenseVoiceSmall`模型,进行语音转文字。因为模型较大,需要独立下载,下载后把`model.pt` +本项目语音识别模型,默认使用`SenseVoiceSmall`模型,进行语音转文字。因为模型较大,需要独立下载,下载后把`model.pt` 文件放在`model/SenseVoiceSmall` 目录下。下面两个下载路线任选一个。 @@ -205,46 +257,21 @@ LLM: - 线路二:百度网盘下载[SenseVoiceSmall](https://pan.baidu.com/share/init?surl=QlgM58FHhYv1tFnUT_A8Sg&pwd=qvna) 提取码: `qvna` - ## 运行状态确认 -如果首次执行,可能需要几分钟时间,你要耐心等待他完成拉取。正常拉取完成后,你可以在命令行执行以下命令查看服务是否启动成功 - -``` -docker ps -``` - -如果你能看到`xiaozhi-server`,说明服务启动成功。那你还可以进一步执行以下命令,查看服务的日志 - -``` -docker logs -f xiaozhi-esp32-server -``` - 如果你能看到,类似以下日志,则是本项目服务启动成功的标志。 ``` -2025-xx-xx xx:51:59,492 - core.server - INFO - Server is running at ws://xx.xx.xx.xxx:8000 -2025-xx-xx xx:51:59,516 - websockets.server - INFO - server listening on 0.0.0.0:8000 +25-02-23 12:01:09[core.websocket_server] - INFO - Server is running at ws://xxx.xx.xx.xx:8000 +25-02-23 12:01:09[core.websocket_server] - INFO - =======上面的地址是websocket协议地址,请勿用浏览器访问======= ``` -接下来,你就可以开始 `编译esp32固件`了,请往下翻,翻到编译`esp32固件`相关章节。那么由于你是用docker部署,你要自己查看自己本机电脑的ip是多少。 -正常来说,假设你的ip是`192.168.1.25`,那么你的接口地址就是:`ws://192.168.1.25:8000`。这个信息很有用的,后面`编译esp32固件` -需要用到。 +正常来说,如果您是通过源码运行本项目,日志会有你的接口地址信息。 +但是如果你用docker部署,那么你的日志里给出的接口地址信息就不是真实的接口地址。 -请注意,你的接口地址是`websocket`协议的地址,你可以使用`apifox`等工具调试。但是不能直接用浏览器打开访问,如果用浏览器打开,日志会显示错误,会让你怀疑是否部署成功了。 +最正确的方法,是根据电脑的局域网IP来确定你的接口地址。 +如果你的电脑的局域网IP比如是`192.168.1.25`,那么你的接口地址就是:`ws://192.168.1.25:8000`。 -## 版本升级操作 +这个信息很有用的,后面`编译esp32固件`需要用到。 -如果想升级版本,可以这么操作 - -1、备份好`config.yaml`文件,一些关键的配置到时复制到新的`config.yaml`文件里。 - -2、执行以下命令 - -``` -docker stop xiaozhi-esp32-server -docker rm xiaozhi-esp32-server -docker rmi ccr.ccs.tencentyun.com/xinnan/xiaozhi-esp32-server:latest -``` - -3、重新开始安装 \ No newline at end of file +接下来,你就可以开始 [编译esp32固件](firmware-build.md)了。 \ No newline at end of file diff --git a/docs/docker-build.md b/docs/docker-build.md index a4ed16db2..ac14dab2d 100644 --- a/docs/docker-build.md +++ b/docs/docker-build.md @@ -1,4 +1,7 @@ -# 编译docker镜像 +# 本地编译docker镜像方法 + +现在本项目已经使用github自动编译docker功能,本文档是提供给有本地编译docker镜像需求的朋友准备的。 + 1、安装docker ``` sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin @@ -6,7 +9,7 @@ sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin 2、编译docker镜像 ``` # 普通编译 -docker build -t xiaozhi-esp32-server:local -f ./Dockerfile . +docker build -t xiaozhi-esp32-server:local -f ./Dockerfile-pip . ``` 3、测试本地镜像 ``` diff --git a/docs/images/demo.png b/docs/images/demo.png deleted file mode 100644 index 0fe4ebcec..000000000 Binary files a/docs/images/demo.png and /dev/null differ diff --git a/docs/images/demo1.png b/docs/images/demo1.png new file mode 100644 index 000000000..9878827fb Binary files /dev/null and b/docs/images/demo1.png differ diff --git a/docs/images/demo2.png b/docs/images/demo2.png new file mode 100644 index 000000000..6b30494f7 Binary files /dev/null and b/docs/images/demo2.png differ diff --git a/docs/images/demo3.png b/docs/images/demo3.png new file mode 100644 index 000000000..e1bc859a1 Binary files /dev/null and b/docs/images/demo3.png differ diff --git a/docs/images/demo4.png b/docs/images/demo4.png new file mode 100644 index 000000000..7b57ab25f Binary files /dev/null and b/docs/images/demo4.png differ diff --git a/docs/images/demo5.png b/docs/images/demo5.png new file mode 100644 index 000000000..8e03685bf Binary files /dev/null and b/docs/images/demo5.png differ diff --git a/docs/images/webui.png b/docs/images/webui.png new file mode 100644 index 000000000..4d4ae599c Binary files /dev/null and b/docs/images/webui.png differ diff --git a/docs/images/wechat.jpg b/docs/images/wechat.jpg index ad0fae050..1ed29a2ad 100644 Binary files a/docs/images/wechat.jpg and b/docs/images/wechat.jpg differ diff --git a/manager/http_server.py b/manager/http_server.py index 841ea8765..565c1cf47 100644 --- a/manager/http_server.py +++ b/manager/http_server.py @@ -38,7 +38,7 @@ class WebUI: self.session_manager = SessionManager() # 添加静态文件路径 - self.static_path = os.path.join(root_dir, 'manager', 'static', 'webui') + self.static_path = os.path.join(root_dir, 'ZhiKongTaiWeb', 'dist') self.setup_routes() self.setup_cors() diff --git a/manager/static/webui/assets/index-CvO82KVk.js b/manager/static/webui/assets/index-CvO82KVk.js deleted file mode 100644 index 6d399a5be..000000000 --- a/manager/static/webui/assets/index-CvO82KVk.js +++ /dev/null @@ -1,38 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function s(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=s(i);fetch(i.href,o)}})();/** -* @vue/shared v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function qs(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const K={},ft=[],Me=()=>{},to=()=>!1,fs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Qs=e=>e.startsWith("onUpdate:"),fe=Object.assign,Ws=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},so=Object.prototype.hasOwnProperty,F=(e,t)=>so.call(e,t),P=Array.isArray,ut=e=>Ut(e)==="[object Map]",us=e=>Ut(e)==="[object Set]",mn=e=>Ut(e)==="[object Date]",j=e=>typeof e=="function",Y=e=>typeof e=="string",Pe=e=>typeof e=="symbol",W=e=>e!==null&&typeof e=="object",Jn=e=>(W(e)||j(e))&&j(e.then)&&j(e.catch),Xn=Object.prototype.toString,Ut=e=>Xn.call(e),no=e=>Ut(e).slice(8,-1),Yn=e=>Ut(e)==="[object Object]",Js=e=>Y(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,xt=qs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),as=e=>{const t=Object.create(null);return s=>t[s]||(t[s]=e(s))},io=/-(\w)/g,ye=as(e=>e.replace(io,(t,s)=>s?s.toUpperCase():"")),oo=/\B([A-Z])/g,it=as(e=>e.replace(oo,"-$1").toLowerCase()),ds=as(e=>e.charAt(0).toUpperCase()+e.slice(1)),As=as(e=>e?`on${ds(e)}`:""),ke=(e,t)=>!Object.is(e,t),Wt=(e,...t)=>{for(let s=0;s{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Gt=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let vn;const ps=()=>vn||(vn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Xs(e){if(P(e)){const t={};for(let s=0;s{if(s){const n=s.split(lo);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function st(e){let t="";if(Y(e))t=e;else if(P(e))for(let s=0;shs(s,t))}const zn=e=>!!(e&&e.__v_isRef===!0),z=e=>Y(e)?e:e==null?"":P(e)||W(e)&&(e.toString===Xn||!j(e.toString))?zn(e)?z(e.value):JSON.stringify(e,ei,2):String(e),ei=(e,t)=>zn(t)?ei(e,t.value):ut(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,i],o)=>(s[Ts(n,o)+" =>"]=i,s),{})}:us(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Ts(s))}:Pe(t)?Ts(t):W(t)&&!P(t)&&!Yn(t)?String(t):t,Ts=(e,t="")=>{var s;return Pe(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/** -* @vue/reactivity v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let ge;class go{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=ge,!t&&ge&&(this.index=(ge.scopes||(ge.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t0)return;if(Tt){let t=Tt;for(Tt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;At;){let t=At;for(At=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function ii(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function oi(e){let t,s=e.depsTail,n=s;for(;n;){const i=n.prevDep;n.version===-1?(n===s&&(s=i),Gs(n),vo(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=s}function Ls(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ri(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ri(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Et))return;e.globalVersion=Et;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Ls(e)){e.flags&=-3;return}const s=Q,n=Se;Q=e,Se=!0;try{ii(e);const i=e.fn(e._value);(t.version===0||ke(i,e._value))&&(e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Q=s,Se=n,oi(e),e.flags&=-3}}function Gs(e,t=!1){const{dep:s,prevSub:n,nextSub:i}=e;if(n&&(n.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let o=s.computed.deps;o;o=o.nextDep)Gs(o,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function vo(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let Se=!0;const li=[];function qe(){li.push(Se),Se=!1}function Qe(){const e=li.pop();Se=e===void 0?!0:e}function bn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=Q;Q=void 0;try{t()}finally{Q=s}}}let Et=0;class bo{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class zs{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!Q||!Se||Q===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==Q)s=this.activeLink=new bo(Q,this),Q.deps?(s.prevDep=Q.depsTail,Q.depsTail.nextDep=s,Q.depsTail=s):Q.deps=Q.depsTail=s,ci(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=Q.depsTail,s.nextDep=void 0,Q.depsTail.nextDep=s,Q.depsTail=s,Q.deps===s&&(Q.deps=n)}return s}trigger(t){this.version++,Et++,this.notify(t)}notify(t){Ys();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Zs()}}}function ci(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)ci(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Us=new WeakMap,et=Symbol(""),js=Symbol(""),Rt=Symbol("");function ee(e,t,s){if(Se&&Q){let n=Us.get(e);n||Us.set(e,n=new Map);let i=n.get(s);i||(n.set(s,i=new zs),i.map=n,i.key=s),i.track()}}function je(e,t,s,n,i,o){const r=Us.get(e);if(!r){Et++;return}const l=c=>{c&&c.trigger()};if(Ys(),t==="clear")r.forEach(l);else{const c=P(e),d=c&&Js(s);if(c&&s==="length"){const a=Number(n);r.forEach((h,v)=>{(v==="length"||v===Rt||!Pe(v)&&v>=a)&&l(h)})}else switch((s!==void 0||r.has(void 0))&&l(r.get(s)),d&&l(r.get(Rt)),t){case"add":c?d&&l(r.get("length")):(l(r.get(et)),ut(e)&&l(r.get(js)));break;case"delete":c||(l(r.get(et)),ut(e)&&l(r.get(js)));break;case"set":ut(e)&&l(r.get(et));break}}Zs()}function ot(e){const t=B(e);return t===e?t:(ee(t,"iterate",Rt),_e(e)?t:t.map(te))}function gs(e){return ee(e=B(e),"iterate",Rt),e}const _o={__proto__:null,[Symbol.iterator](){return Os(this,Symbol.iterator,te)},concat(...e){return ot(this).concat(...e.map(t=>P(t)?ot(t):t))},entries(){return Os(this,"entries",e=>(e[1]=te(e[1]),e))},every(e,t){return Le(this,"every",e,t,void 0,arguments)},filter(e,t){return Le(this,"filter",e,t,s=>s.map(te),arguments)},find(e,t){return Le(this,"find",e,t,te,arguments)},findIndex(e,t){return Le(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Le(this,"findLast",e,t,te,arguments)},findLastIndex(e,t){return Le(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Le(this,"forEach",e,t,void 0,arguments)},includes(...e){return Is(this,"includes",e)},indexOf(...e){return Is(this,"indexOf",e)},join(e){return ot(this).join(e)},lastIndexOf(...e){return Is(this,"lastIndexOf",e)},map(e,t){return Le(this,"map",e,t,void 0,arguments)},pop(){return yt(this,"pop")},push(...e){return yt(this,"push",e)},reduce(e,...t){return _n(this,"reduce",e,t)},reduceRight(e,...t){return _n(this,"reduceRight",e,t)},shift(){return yt(this,"shift")},some(e,t){return Le(this,"some",e,t,void 0,arguments)},splice(...e){return yt(this,"splice",e)},toReversed(){return ot(this).toReversed()},toSorted(e){return ot(this).toSorted(e)},toSpliced(...e){return ot(this).toSpliced(...e)},unshift(...e){return yt(this,"unshift",e)},values(){return Os(this,"values",te)}};function Os(e,t,s){const n=gs(e),i=n[t]();return n!==e&&!_e(e)&&(i._next=i.next,i.next=()=>{const o=i._next();return o.value&&(o.value=s(o.value)),o}),i}const yo=Array.prototype;function Le(e,t,s,n,i,o){const r=gs(e),l=r!==e&&!_e(e),c=r[t];if(c!==yo[t]){const h=c.apply(e,o);return l?te(h):h}let d=s;r!==e&&(l?d=function(h,v){return s.call(this,te(h),v,e)}:s.length>2&&(d=function(h,v){return s.call(this,h,v,e)}));const a=c.call(r,d,n);return l&&i?i(a):a}function _n(e,t,s,n){const i=gs(e);let o=s;return i!==e&&(_e(e)?s.length>3&&(o=function(r,l,c){return s.call(this,r,l,c,e)}):o=function(r,l,c){return s.call(this,r,te(l),c,e)}),i[t](o,...n)}function Is(e,t,s){const n=B(e);ee(n,"iterate",Rt);const i=n[t](...s);return(i===-1||i===!1)&&nn(s[0])?(s[0]=B(s[0]),n[t](...s)):i}function yt(e,t,s=[]){qe(),Ys();const n=B(e)[t].apply(e,s);return Zs(),Qe(),n}const wo=qs("__proto__,__v_isRef,__isVue"),fi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Pe));function So(e){Pe(e)||(e=String(e));const t=B(this);return ee(t,"has",e),t.hasOwnProperty(e)}class ui{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const i=this._isReadonly,o=this._isShallow;if(s==="__v_isReactive")return!i;if(s==="__v_isReadonly")return i;if(s==="__v_isShallow")return o;if(s==="__v_raw")return n===(i?o?Po:hi:o?pi:di).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const r=P(t);if(!i){let c;if(r&&(c=_o[s]))return c;if(s==="hasOwnProperty")return So}const l=Reflect.get(t,s,ne(t)?t:n);return(Pe(s)?fi.has(s):wo(s))||(i||ee(t,"get",s),o)?l:ne(l)?r&&Js(s)?l:l.value:W(l)?i?gi(l):tn(l):l}}class ai extends ui{constructor(t=!1){super(!1,t)}set(t,s,n,i){let o=t[s];if(!this._isShallow){const c=nt(o);if(!_e(n)&&!nt(n)&&(o=B(o),n=B(n)),!P(t)&&ne(o)&&!ne(n))return c?!1:(o.value=n,!0)}const r=P(t)&&Js(s)?Number(s)e,Kt=e=>Reflect.getPrototypeOf(e);function Oo(e,t,s){return function(...n){const i=this.__v_raw,o=B(i),r=ut(o),l=e==="entries"||e===Symbol.iterator&&r,c=e==="keys"&&r,d=i[e](...n),a=s?Hs:t?Bs:te;return!t&&ee(o,"iterate",c?js:et),{next(){const{value:h,done:v}=d.next();return v?{value:h,done:v}:{value:l?[a(h[0]),a(h[1])]:a(h),done:v}},[Symbol.iterator](){return this}}}}function kt(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Io(e,t){const s={get(i){const o=this.__v_raw,r=B(o),l=B(i);e||(ke(i,l)&&ee(r,"get",i),ee(r,"get",l));const{has:c}=Kt(r),d=t?Hs:e?Bs:te;if(c.call(r,i))return d(o.get(i));if(c.call(r,l))return d(o.get(l));o!==r&&o.get(i)},get size(){const i=this.__v_raw;return!e&&ee(B(i),"iterate",et),Reflect.get(i,"size",i)},has(i){const o=this.__v_raw,r=B(o),l=B(i);return e||(ke(i,l)&&ee(r,"has",i),ee(r,"has",l)),i===l?o.has(i):o.has(i)||o.has(l)},forEach(i,o){const r=this,l=r.__v_raw,c=B(l),d=t?Hs:e?Bs:te;return!e&&ee(c,"iterate",et),l.forEach((a,h)=>i.call(o,d(a),d(h),r))}};return fe(s,e?{add:kt("add"),set:kt("set"),delete:kt("delete"),clear:kt("clear")}:{add(i){!t&&!_e(i)&&!nt(i)&&(i=B(i));const o=B(this);return Kt(o).has.call(o,i)||(o.add(i),je(o,"add",i,i)),this},set(i,o){!t&&!_e(o)&&!nt(o)&&(o=B(o));const r=B(this),{has:l,get:c}=Kt(r);let d=l.call(r,i);d||(i=B(i),d=l.call(r,i));const a=c.call(r,i);return r.set(i,o),d?ke(o,a)&&je(r,"set",i,o):je(r,"add",i,o),this},delete(i){const o=B(this),{has:r,get:l}=Kt(o);let c=r.call(o,i);c||(i=B(i),c=r.call(o,i)),l&&l.call(o,i);const d=o.delete(i);return c&&je(o,"delete",i,void 0),d},clear(){const i=B(this),o=i.size!==0,r=i.clear();return o&&je(i,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(i=>{s[i]=Oo(i,e,t)}),s}function en(e,t){const s=Io(e,t);return(n,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(F(s,i)&&i in n?s:n,i,o)}const Eo={get:en(!1,!1)},Ro={get:en(!1,!0)},Mo={get:en(!0,!1)};const di=new WeakMap,pi=new WeakMap,hi=new WeakMap,Po=new WeakMap;function Do(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Lo(e){return e.__v_skip||!Object.isExtensible(e)?0:Do(no(e))}function tn(e){return nt(e)?e:sn(e,!1,Ao,Eo,di)}function Uo(e){return sn(e,!1,Co,Ro,pi)}function gi(e){return sn(e,!0,To,Mo,hi)}function sn(e,t,s,n,i){if(!W(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const r=Lo(e);if(r===0)return e;const l=new Proxy(e,r===2?n:s);return i.set(e,l),l}function at(e){return nt(e)?at(e.__v_raw):!!(e&&e.__v_isReactive)}function nt(e){return!!(e&&e.__v_isReadonly)}function _e(e){return!!(e&&e.__v_isShallow)}function nn(e){return e?!!e.__v_raw:!1}function B(e){const t=e&&e.__v_raw;return t?B(t):e}function jo(e){return!F(e,"__v_skip")&&Object.isExtensible(e)&&Zn(e,"__v_skip",!0),e}const te=e=>W(e)?tn(e):e,Bs=e=>W(e)?gi(e):e;function ne(e){return e?e.__v_isRef===!0:!1}function be(e){return Ho(e,!1)}function Ho(e,t){return ne(e)?e:new Bo(e,t)}class Bo{constructor(t,s){this.dep=new zs,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:B(t),this._value=s?t:te(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||_e(t)||nt(t);t=n?t:B(t),ke(t,s)&&(this._rawValue=t,this._value=n?t:te(t),this.dep.trigger())}}function mi(e){return ne(e)?e.value:e}const Fo={get:(e,t,s)=>t==="__v_raw"?e:mi(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const i=e[t];return ne(i)&&!ne(s)?(i.value=s,!0):Reflect.set(e,t,s,n)}};function vi(e){return at(e)?e:new Proxy(e,Fo)}class No{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new zs(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Et-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Q!==this)return ni(this,!0),!0}get value(){const t=this.dep.track();return ri(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Vo(e,t,s=!1){let n,i;return j(e)?n=e:(n=e.get,i=e.set),new No(n,i,s)}const qt={},zt=new WeakMap;let Ge;function $o(e,t=!1,s=Ge){if(s){let n=zt.get(s);n||zt.set(s,n=[]),n.push(e)}}function Ko(e,t,s=K){const{immediate:n,deep:i,once:o,scheduler:r,augmentJob:l,call:c}=s,d=I=>i?I:_e(I)||i===!1||i===0?He(I,1):He(I);let a,h,v,C,E=!1,U=!1;if(ne(e)?(h=()=>e.value,E=_e(e)):at(e)?(h=()=>d(e),E=!0):P(e)?(U=!0,E=e.some(I=>at(I)||_e(I)),h=()=>e.map(I=>{if(ne(I))return I.value;if(at(I))return d(I);if(j(I))return c?c(I,2):I()})):j(e)?t?h=c?()=>c(e,2):e:h=()=>{if(v){qe();try{v()}finally{Qe()}}const I=Ge;Ge=a;try{return c?c(e,3,[C]):e(C)}finally{Ge=I}}:h=Me,t&&i){const I=h,O=i===!0?1/0:i;h=()=>He(I(),O)}const Z=mo(),V=()=>{a.stop(),Z&&Z.active&&Ws(Z.effects,a)};if(o&&t){const I=t;t=(...O)=>{I(...O),V()}}let D=U?new Array(e.length).fill(qt):qt;const x=I=>{if(!(!(a.flags&1)||!a.dirty&&!I))if(t){const O=a.run();if(i||E||(U?O.some((ue,xe)=>ke(ue,D[xe])):ke(O,D))){v&&v();const ue=Ge;Ge=a;try{const xe=[O,D===qt?void 0:U&&D[0]===qt?[]:D,C];c?c(t,3,xe):t(...xe),D=O}finally{Ge=ue}}}else a.run()};return l&&l(x),a=new ti(h),a.scheduler=r?()=>r(x,!1):x,C=I=>$o(I,!1,a),v=a.onStop=()=>{const I=zt.get(a);if(I){if(c)c(I,4);else for(const O of I)O();zt.delete(a)}},t?n?x(!0):D=a.run():r?r(x.bind(null,!0),!0):a.run(),V.pause=a.pause.bind(a),V.resume=a.resume.bind(a),V.stop=V,V}function He(e,t=1/0,s){if(t<=0||!W(e)||e.__v_skip||(s=s||new Set,s.has(e)))return e;if(s.add(e),t--,ne(e))He(e.value,t,s);else if(P(e))for(let n=0;n{He(n,t,s)});else if(Yn(e)){for(const n in e)He(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&He(e[n],t,s)}return e}/** -* @vue/runtime-core v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function jt(e,t,s,n){try{return n?e(...n):e()}catch(i){ms(i,t,s)}}function De(e,t,s,n){if(j(e)){const i=jt(e,t,s,n);return i&&Jn(i)&&i.catch(o=>{ms(o,t,s)}),i}if(P(e)){const i=[];for(let o=0;o>>1,i=re[n],o=Mt(i);o=Mt(s)?re.push(e):re.splice(qo(t),0,e),e.flags|=1,yi()}}function yi(){es||(es=bi.then(Si))}function Qo(e){P(e)?dt.push(...e):Ve&&e.id===-1?Ve.splice(rt+1,0,e):e.flags&1||(dt.push(e),e.flags|=1),yi()}function yn(e,t,s=Ee+1){for(;sMt(s)-Mt(n));if(dt.length=0,Ve){Ve.push(...t);return}for(Ve=t,rt=0;rte.id==null?e.flags&2?-1:1/0:e.id;function Si(e){try{for(Ee=0;Ee{n._d&&Rn(-1);const o=ts(t);let r;try{r=e(...i)}finally{ts(o),n._d&&Rn(1)}return r};return n._n=!0,n._c=!0,n._d=!0,n}function we(e,t){if(me===null)return e;const s=ys(me),n=e.dirs||(e.dirs=[]);for(let i=0;ie.__isTeleport;function rn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,rn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ai(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function ns(e,t,s,n,i=!1){if(P(e)){e.forEach((E,U)=>ns(E,t&&(P(t)?t[U]:t),s,n,i));return}if(Ct(n)&&!i){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&ns(e,t,s,n.component.subTree);return}const o=n.shapeFlag&4?ys(n.component):n.el,r=i?null:o,{i:l,r:c}=e,d=t&&t.r,a=l.refs===K?l.refs={}:l.refs,h=l.setupState,v=B(h),C=h===K?()=>!1:E=>F(v,E);if(d!=null&&d!==c&&(Y(d)?(a[d]=null,C(d)&&(h[d]=null)):ne(d)&&(d.value=null)),j(c))jt(c,l,12,[r,a]);else{const E=Y(c),U=ne(c);if(E||U){const Z=()=>{if(e.f){const V=E?C(c)?h[c]:a[c]:c.value;i?P(V)&&Ws(V,o):P(V)?V.includes(o)||V.push(o):E?(a[c]=[o],C(c)&&(h[c]=a[c])):(c.value=[o],e.k&&(a[e.k]=c.value))}else E?(a[c]=r,C(c)&&(h[c]=r)):U&&(c.value=r,e.k&&(a[e.k]=r))};r?(Z.id=-1,he(Z,s)):Z()}}}ps().requestIdleCallback;ps().cancelIdleCallback;const Ct=e=>!!e.type.__asyncLoader,Ti=e=>e.type.__isKeepAlive;function Xo(e,t){Ci(e,"a",t)}function Yo(e,t){Ci(e,"da",t)}function Ci(e,t,s=se){const n=e.__wdc||(e.__wdc=()=>{let i=s;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(vs(t,n,s),s){let i=s.parent;for(;i&&i.parent;)Ti(i.parent.vnode)&&Zo(n,t,s,i),i=i.parent}}function Zo(e,t,s,n){const i=vs(t,e,n,!0);Oi(()=>{Ws(n[t],i)},s)}function vs(e,t,s=se,n=!1){if(s){const i=s[e]||(s[e]=[]),o=t.__weh||(t.__weh=(...r)=>{qe();const l=Ht(s),c=De(t,s,e,r);return l(),Qe(),c});return n?i.unshift(o):i.push(o),o}}const Be=e=>(t,s=se)=>{(!Lt||e==="sp")&&vs(e,(...n)=>t(...n),s)},Go=Be("bm"),ln=Be("m"),zo=Be("bu"),er=Be("u"),tr=Be("bum"),Oi=Be("um"),sr=Be("sp"),nr=Be("rtg"),ir=Be("rtc");function or(e,t=se){vs("ec",e,t)}const rr="components";function $e(e,t){return cr(rr,e,!0,t)||e}const lr=Symbol.for("v-ndc");function cr(e,t,s=!0,n=!1){const i=me||se;if(i){const o=i.type;{const l=Xr(o,!1);if(l&&(l===t||l===ye(t)||l===ds(ye(t))))return o}const r=wn(i[e]||o[e],t)||wn(i.appContext[e],t);return!r&&n?o:r}}function wn(e,t){return e&&(e[t]||e[ye(t)]||e[ds(ye(t))])}function lt(e,t,s,n){let i;const o=s,r=P(e);if(r||Y(e)){const l=r&&at(e);let c=!1;l&&(c=!_e(e),e=gs(e)),i=new Array(e.length);for(let d=0,a=e.length;dt(l,c,void 0,o));else{const l=Object.keys(e);i=new Array(l.length);for(let c=0,d=l.length;ce?Xi(e)?ys(e):Fs(e.parent):null,Ot=fe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Fs(e.parent),$root:e=>Fs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ei(e),$forceUpdate:e=>e.f||(e.f=()=>{on(e.update)}),$nextTick:e=>e.n||(e.n=_i.bind(e.proxy)),$watch:e=>Rr.bind(e)}),Es=(e,t)=>e!==K&&!e.__isScriptSetup&&F(e,t),fr={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:i,props:o,accessCache:r,type:l,appContext:c}=e;let d;if(t[0]!=="$"){const C=r[t];if(C!==void 0)switch(C){case 1:return n[t];case 2:return i[t];case 4:return s[t];case 3:return o[t]}else{if(Es(n,t))return r[t]=1,n[t];if(i!==K&&F(i,t))return r[t]=2,i[t];if((d=e.propsOptions[0])&&F(d,t))return r[t]=3,o[t];if(s!==K&&F(s,t))return r[t]=4,s[t];Ns&&(r[t]=0)}}const a=Ot[t];let h,v;if(a)return t==="$attrs"&&ee(e.attrs,"get",""),a(e);if((h=l.__cssModules)&&(h=h[t]))return h;if(s!==K&&F(s,t))return r[t]=4,s[t];if(v=c.config.globalProperties,F(v,t))return v[t]},set({_:e},t,s){const{data:n,setupState:i,ctx:o}=e;return Es(i,t)?(i[t]=s,!0):n!==K&&F(n,t)?(n[t]=s,!0):F(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:i,propsOptions:o}},r){let l;return!!s[r]||e!==K&&F(e,r)||Es(t,r)||(l=o[0])&&F(l,r)||F(n,r)||F(Ot,r)||F(i.config.globalProperties,r)},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:F(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Sn(e){return P(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let Ns=!0;function ur(e){const t=Ei(e),s=e.proxy,n=e.ctx;Ns=!1,t.beforeCreate&&xn(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:r,watch:l,provide:c,inject:d,created:a,beforeMount:h,mounted:v,beforeUpdate:C,updated:E,activated:U,deactivated:Z,beforeDestroy:V,beforeUnmount:D,destroyed:x,unmounted:I,render:O,renderTracked:ue,renderTriggered:xe,errorCaptured:Ne,serverPrefetch:Bt,expose:We,inheritAttrs:mt,components:Ft,directives:Nt,filters:Ss}=t;if(d&&ar(d,n,null),r)for(const X in r){const k=r[X];j(k)&&(n[X]=k.bind(s))}if(i){const X=i.call(s,s);W(X)&&(e.data=tn(X))}if(Ns=!0,o)for(const X in o){const k=o[X],Je=j(k)?k.bind(s,s):j(k.get)?k.get.bind(s,s):Me,Vt=!j(k)&&j(k.set)?k.set.bind(s):Me,Xe=Zi({get:Je,set:Vt});Object.defineProperty(n,X,{enumerable:!0,configurable:!0,get:()=>Xe.value,set:Ae=>Xe.value=Ae})}if(l)for(const X in l)Ii(l[X],n,s,X);if(c){const X=j(c)?c.call(s):c;Reflect.ownKeys(X).forEach(k=>{vr(k,X[k])})}a&&xn(a,e,"c");function ie(X,k){P(k)?k.forEach(Je=>X(Je.bind(s))):k&&X(k.bind(s))}if(ie(Go,h),ie(ln,v),ie(zo,C),ie(er,E),ie(Xo,U),ie(Yo,Z),ie(or,Ne),ie(ir,ue),ie(nr,xe),ie(tr,D),ie(Oi,I),ie(sr,Bt),P(We))if(We.length){const X=e.exposed||(e.exposed={});We.forEach(k=>{Object.defineProperty(X,k,{get:()=>s[k],set:Je=>s[k]=Je})})}else e.exposed||(e.exposed={});O&&e.render===Me&&(e.render=O),mt!=null&&(e.inheritAttrs=mt),Ft&&(e.components=Ft),Nt&&(e.directives=Nt),Bt&&Ai(e)}function ar(e,t,s=Me){P(e)&&(e=Vs(e));for(const n in e){const i=e[n];let o;W(i)?"default"in i?o=Jt(i.from||n,i.default,!0):o=Jt(i.from||n):o=Jt(i),ne(o)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):t[n]=o}}function xn(e,t,s){De(P(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Ii(e,t,s,n){let i=n.includes(".")?Ki(s,n):()=>s[n];if(Y(e)){const o=t[e];j(o)&&Xt(i,o)}else if(j(e))Xt(i,e.bind(s));else if(W(e))if(P(e))e.forEach(o=>Ii(o,t,s,n));else{const o=j(e.handler)?e.handler.bind(s):t[e.handler];j(o)&&Xt(i,o,e)}}function Ei(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:r}}=e.appContext,l=o.get(t);let c;return l?c=l:!i.length&&!s&&!n?c=t:(c={},i.length&&i.forEach(d=>is(c,d,r,!0)),is(c,t,r)),W(t)&&o.set(t,c),c}function is(e,t,s,n=!1){const{mixins:i,extends:o}=t;o&&is(e,o,s,!0),i&&i.forEach(r=>is(e,r,s,!0));for(const r in t)if(!(n&&r==="expose")){const l=dr[r]||s&&s[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const dr={data:An,props:Tn,emits:Tn,methods:St,computed:St,beforeCreate:oe,created:oe,beforeMount:oe,mounted:oe,beforeUpdate:oe,updated:oe,beforeDestroy:oe,beforeUnmount:oe,destroyed:oe,unmounted:oe,activated:oe,deactivated:oe,errorCaptured:oe,serverPrefetch:oe,components:St,directives:St,watch:hr,provide:An,inject:pr};function An(e,t){return t?e?function(){return fe(j(e)?e.call(this,this):e,j(t)?t.call(this,this):t)}:t:e}function pr(e,t){return St(Vs(e),Vs(t))}function Vs(e){if(P(e)){const t={};for(let s=0;s1)return s&&j(t)?t.call(n&&n.proxy):t}}const Mi={},Pi=()=>Object.create(Mi),Di=e=>Object.getPrototypeOf(e)===Mi;function br(e,t,s,n=!1){const i={},o=Pi();e.propsDefaults=Object.create(null),Li(e,t,i,o);for(const r in e.propsOptions[0])r in i||(i[r]=void 0);s?e.props=n?i:Uo(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function _r(e,t,s,n){const{props:i,attrs:o,vnode:{patchFlag:r}}=e,l=B(i),[c]=e.propsOptions;let d=!1;if((n||r>0)&&!(r&16)){if(r&8){const a=e.vnode.dynamicProps;for(let h=0;h{c=!0;const[v,C]=Ui(h,t,!0);fe(r,v),C&&l.push(...C)};!s&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}if(!o&&!c)return W(e)&&n.set(e,ft),ft;if(P(o))for(let a=0;ae[0]==="_"||e==="$stable",cn=e=>P(e)?e.map(Re):[Re(e)],wr=(e,t,s)=>{if(t._n)return t;const n=ss((...i)=>cn(t(...i)),s);return n._c=!1,n},Hi=(e,t,s)=>{const n=e._ctx;for(const i in e){if(ji(i))continue;const o=e[i];if(j(o))t[i]=wr(i,o,n);else if(o!=null){const r=cn(o);t[i]=()=>r}}},Bi=(e,t)=>{const s=cn(t);e.slots.default=()=>s},Fi=(e,t,s)=>{for(const n in t)(s||n!=="_")&&(e[n]=t[n])},Sr=(e,t,s)=>{const n=e.slots=Pi();if(e.vnode.shapeFlag&32){const i=t._;i?(Fi(n,t,s),s&&Zn(n,"_",i,!0)):Hi(t,n)}else t&&Bi(e,t)},xr=(e,t,s)=>{const{vnode:n,slots:i}=e;let o=!0,r=K;if(n.shapeFlag&32){const l=t._;l?s&&l===1?o=!1:Fi(i,t,s):(o=!t.$stable,Hi(t,i)),r=t}else t&&(Bi(e,t),r={default:1});if(o)for(const l in i)!ji(l)&&r[l]==null&&delete i[l]},he=Hr;function Ar(e){return Tr(e)}function Tr(e,t){const s=ps();s.__VUE__=!0;const{insert:n,remove:i,patchProp:o,createElement:r,createText:l,createComment:c,setText:d,setElementText:a,parentNode:h,nextSibling:v,setScopeId:C=Me,insertStaticContent:E}=e,U=(f,u,p,_=null,m=null,b=null,A=void 0,S=null,w=!!u.dynamicChildren)=>{if(f===u)return;f&&!wt(f,u)&&(_=$t(f),Ae(f,m,b,!0),f=null),u.patchFlag===-2&&(w=!1,u.dynamicChildren=null);const{type:y,ref:M,shapeFlag:T}=u;switch(y){case _s:Z(f,u,p,_);break;case Pt:V(f,u,p,_);break;case Ms:f==null&&D(u,p,_,A);break;case le:Ft(f,u,p,_,m,b,A,S,w);break;default:T&1?O(f,u,p,_,m,b,A,S,w):T&6?Nt(f,u,p,_,m,b,A,S,w):(T&64||T&128)&&y.process(f,u,p,_,m,b,A,S,w,bt)}M!=null&&m&&ns(M,f&&f.ref,b,u||f,!u)},Z=(f,u,p,_)=>{if(f==null)n(u.el=l(u.children),p,_);else{const m=u.el=f.el;u.children!==f.children&&d(m,u.children)}},V=(f,u,p,_)=>{f==null?n(u.el=c(u.children||""),p,_):u.el=f.el},D=(f,u,p,_)=>{[f.el,f.anchor]=E(f.children,u,p,_,f.el,f.anchor)},x=({el:f,anchor:u},p,_)=>{let m;for(;f&&f!==u;)m=v(f),n(f,p,_),f=m;n(u,p,_)},I=({el:f,anchor:u})=>{let p;for(;f&&f!==u;)p=v(f),i(f),f=p;i(u)},O=(f,u,p,_,m,b,A,S,w)=>{u.type==="svg"?A="svg":u.type==="math"&&(A="mathml"),f==null?ue(u,p,_,m,b,A,S,w):Bt(f,u,m,b,A,S,w)},ue=(f,u,p,_,m,b,A,S)=>{let w,y;const{props:M,shapeFlag:T,transition:R,dirs:L}=f;if(w=f.el=r(f.type,b,M&&M.is,M),T&8?a(w,f.children):T&16&&Ne(f.children,w,null,_,m,Rs(f,b),A,S),L&&Ye(f,null,_,"created"),xe(w,f,f.scopeId,A,_),M){for(const q in M)q!=="value"&&!xt(q)&&o(w,q,null,M[q],b,_);"value"in M&&o(w,"value",null,M.value,b),(y=M.onVnodeBeforeMount)&&Ie(y,_,f)}L&&Ye(f,null,_,"beforeMount");const H=Cr(m,R);H&&R.beforeEnter(w),n(w,u,p),((y=M&&M.onVnodeMounted)||H||L)&&he(()=>{y&&Ie(y,_,f),H&&R.enter(w),L&&Ye(f,null,_,"mounted")},m)},xe=(f,u,p,_,m)=>{if(p&&C(f,p),_)for(let b=0;b<_.length;b++)C(f,_[b]);if(m){let b=m.subTree;if(u===b||qi(b.type)&&(b.ssContent===u||b.ssFallback===u)){const A=m.vnode;xe(f,A,A.scopeId,A.slotScopeIds,m.parent)}}},Ne=(f,u,p,_,m,b,A,S,w=0)=>{for(let y=w;y{const S=u.el=f.el;let{patchFlag:w,dynamicChildren:y,dirs:M}=u;w|=f.patchFlag&16;const T=f.props||K,R=u.props||K;let L;if(p&&Ze(p,!1),(L=R.onVnodeBeforeUpdate)&&Ie(L,p,u,f),M&&Ye(u,f,p,"beforeUpdate"),p&&Ze(p,!0),(T.innerHTML&&R.innerHTML==null||T.textContent&&R.textContent==null)&&a(S,""),y?We(f.dynamicChildren,y,S,p,_,Rs(u,m),b):A||k(f,u,S,null,p,_,Rs(u,m),b,!1),w>0){if(w&16)mt(S,T,R,p,m);else if(w&2&&T.class!==R.class&&o(S,"class",null,R.class,m),w&4&&o(S,"style",T.style,R.style,m),w&8){const H=u.dynamicProps;for(let q=0;q{L&&Ie(L,p,u,f),M&&Ye(u,f,p,"updated")},_)},We=(f,u,p,_,m,b,A)=>{for(let S=0;S{if(u!==p){if(u!==K)for(const b in u)!xt(b)&&!(b in p)&&o(f,b,u[b],null,m,_);for(const b in p){if(xt(b))continue;const A=p[b],S=u[b];A!==S&&b!=="value"&&o(f,b,S,A,m,_)}"value"in p&&o(f,"value",u.value,p.value,m)}},Ft=(f,u,p,_,m,b,A,S,w)=>{const y=u.el=f?f.el:l(""),M=u.anchor=f?f.anchor:l("");let{patchFlag:T,dynamicChildren:R,slotScopeIds:L}=u;L&&(S=S?S.concat(L):L),f==null?(n(y,p,_),n(M,p,_),Ne(u.children||[],p,M,m,b,A,S,w)):T>0&&T&64&&R&&f.dynamicChildren?(We(f.dynamicChildren,R,p,m,b,A,S),(u.key!=null||m&&u===m.subTree)&&Ni(f,u,!0)):k(f,u,p,M,m,b,A,S,w)},Nt=(f,u,p,_,m,b,A,S,w)=>{u.slotScopeIds=S,f==null?u.shapeFlag&512?m.ctx.activate(u,p,_,A,w):Ss(u,p,_,m,b,A,w):an(f,u,w)},Ss=(f,u,p,_,m,b,A)=>{const S=f.component=kr(f,_,m);if(Ti(f)&&(S.ctx.renderer=bt),qr(S,!1,A),S.asyncDep){if(m&&m.registerDep(S,ie,A),!f.el){const w=S.subTree=ce(Pt);V(null,w,u,p)}}else ie(S,f,u,p,m,b,A)},an=(f,u,p)=>{const _=u.component=f.component;if(Ur(f,u,p))if(_.asyncDep&&!_.asyncResolved){X(_,u,p);return}else _.next=u,_.update();else u.el=f.el,_.vnode=u},ie=(f,u,p,_,m,b,A)=>{const S=()=>{if(f.isMounted){let{next:T,bu:R,u:L,parent:H,vnode:q}=f;{const Ce=Vi(f);if(Ce){T&&(T.el=q.el,X(f,T,A)),Ce.asyncDep.then(()=>{f.isUnmounted||S()});return}}let $=T,de;Ze(f,!1),T?(T.el=q.el,X(f,T,A)):T=q,R&&Wt(R),(de=T.props&&T.props.onVnodeBeforeUpdate)&&Ie(de,H,T,q),Ze(f,!0);const ae=In(f),Te=f.subTree;f.subTree=ae,U(Te,ae,h(Te.el),$t(Te),f,m,b),T.el=ae.el,$===null&&jr(f,ae.el),L&&he(L,m),(de=T.props&&T.props.onVnodeUpdated)&&he(()=>Ie(de,H,T,q),m)}else{let T;const{el:R,props:L}=u,{bm:H,m:q,parent:$,root:de,type:ae}=f,Te=Ct(u);Ze(f,!1),H&&Wt(H),!Te&&(T=L&&L.onVnodeBeforeMount)&&Ie(T,$,u),Ze(f,!0);{de.ce&&de.ce._injectChildStyle(ae);const Ce=f.subTree=In(f);U(null,Ce,p,_,f,m,b),u.el=Ce.el}if(q&&he(q,m),!Te&&(T=L&&L.onVnodeMounted)){const Ce=u;he(()=>Ie(T,$,Ce),m)}(u.shapeFlag&256||$&&Ct($.vnode)&&$.vnode.shapeFlag&256)&&f.a&&he(f.a,m),f.isMounted=!0,u=p=_=null}};f.scope.on();const w=f.effect=new ti(S);f.scope.off();const y=f.update=w.run.bind(w),M=f.job=w.runIfDirty.bind(w);M.i=f,M.id=f.uid,w.scheduler=()=>on(M),Ze(f,!0),y()},X=(f,u,p)=>{u.component=f;const _=f.vnode.props;f.vnode=u,f.next=null,_r(f,u.props,_,p),xr(f,u.children,p),qe(),yn(f),Qe()},k=(f,u,p,_,m,b,A,S,w=!1)=>{const y=f&&f.children,M=f?f.shapeFlag:0,T=u.children,{patchFlag:R,shapeFlag:L}=u;if(R>0){if(R&128){Vt(y,T,p,_,m,b,A,S,w);return}else if(R&256){Je(y,T,p,_,m,b,A,S,w);return}}L&8?(M&16&&vt(y,m,b),T!==y&&a(p,T)):M&16?L&16?Vt(y,T,p,_,m,b,A,S,w):vt(y,m,b,!0):(M&8&&a(p,""),L&16&&Ne(T,p,_,m,b,A,S,w))},Je=(f,u,p,_,m,b,A,S,w)=>{f=f||ft,u=u||ft;const y=f.length,M=u.length,T=Math.min(y,M);let R;for(R=0;RM?vt(f,m,b,!0,!1,T):Ne(u,p,_,m,b,A,S,w,T)},Vt=(f,u,p,_,m,b,A,S,w)=>{let y=0;const M=u.length;let T=f.length-1,R=M-1;for(;y<=T&&y<=R;){const L=f[y],H=u[y]=w?Ke(u[y]):Re(u[y]);if(wt(L,H))U(L,H,p,null,m,b,A,S,w);else break;y++}for(;y<=T&&y<=R;){const L=f[T],H=u[R]=w?Ke(u[R]):Re(u[R]);if(wt(L,H))U(L,H,p,null,m,b,A,S,w);else break;T--,R--}if(y>T){if(y<=R){const L=R+1,H=LR)for(;y<=T;)Ae(f[y],m,b,!0),y++;else{const L=y,H=y,q=new Map;for(y=H;y<=R;y++){const pe=u[y]=w?Ke(u[y]):Re(u[y]);pe.key!=null&&q.set(pe.key,y)}let $,de=0;const ae=R-H+1;let Te=!1,Ce=0;const _t=new Array(ae);for(y=0;y=ae){Ae(pe,m,b,!0);continue}let Oe;if(pe.key!=null)Oe=q.get(pe.key);else for($=H;$<=R;$++)if(_t[$-H]===0&&wt(pe,u[$])){Oe=$;break}Oe===void 0?Ae(pe,m,b,!0):(_t[Oe-H]=y+1,Oe>=Ce?Ce=Oe:Te=!0,U(pe,u[Oe],p,null,m,b,A,S,w),de++)}const hn=Te?Or(_t):ft;for($=hn.length-1,y=ae-1;y>=0;y--){const pe=H+y,Oe=u[pe],gn=pe+1{const{el:b,type:A,transition:S,children:w,shapeFlag:y}=f;if(y&6){Xe(f.component.subTree,u,p,_);return}if(y&128){f.suspense.move(u,p,_);return}if(y&64){A.move(f,u,p,bt);return}if(A===le){n(b,u,p);for(let T=0;TS.enter(b),m);else{const{leave:T,delayLeave:R,afterLeave:L}=S,H=()=>n(b,u,p),q=()=>{T(b,()=>{H(),L&&L()})};R?R(b,H,q):q()}else n(b,u,p)},Ae=(f,u,p,_=!1,m=!1)=>{const{type:b,props:A,ref:S,children:w,dynamicChildren:y,shapeFlag:M,patchFlag:T,dirs:R,cacheIndex:L}=f;if(T===-2&&(m=!1),S!=null&&ns(S,null,p,f,!0),L!=null&&(u.renderCache[L]=void 0),M&256){u.ctx.deactivate(f);return}const H=M&1&&R,q=!Ct(f);let $;if(q&&($=A&&A.onVnodeBeforeUnmount)&&Ie($,u,f),M&6)eo(f.component,p,_);else{if(M&128){f.suspense.unmount(p,_);return}H&&Ye(f,null,u,"beforeUnmount"),M&64?f.type.remove(f,u,p,bt,_):y&&!y.hasOnce&&(b!==le||T>0&&T&64)?vt(y,u,p,!1,!0):(b===le&&T&384||!m&&M&16)&&vt(w,u,p),_&&dn(f)}(q&&($=A&&A.onVnodeUnmounted)||H)&&he(()=>{$&&Ie($,u,f),H&&Ye(f,null,u,"unmounted")},p)},dn=f=>{const{type:u,el:p,anchor:_,transition:m}=f;if(u===le){zi(p,_);return}if(u===Ms){I(f);return}const b=()=>{i(p),m&&!m.persisted&&m.afterLeave&&m.afterLeave()};if(f.shapeFlag&1&&m&&!m.persisted){const{leave:A,delayLeave:S}=m,w=()=>A(p,b);S?S(f.el,b,w):w()}else b()},zi=(f,u)=>{let p;for(;f!==u;)p=v(f),i(f),f=p;i(u)},eo=(f,u,p)=>{const{bum:_,scope:m,job:b,subTree:A,um:S,m:w,a:y}=f;On(w),On(y),_&&Wt(_),m.stop(),b&&(b.flags|=8,Ae(A,f,u,p)),S&&he(S,u),he(()=>{f.isUnmounted=!0},u),u&&u.pendingBranch&&!u.isUnmounted&&f.asyncDep&&!f.asyncResolved&&f.suspenseId===u.pendingId&&(u.deps--,u.deps===0&&u.resolve())},vt=(f,u,p,_=!1,m=!1,b=0)=>{for(let A=b;A{if(f.shapeFlag&6)return $t(f.component.subTree);if(f.shapeFlag&128)return f.suspense.next();const u=v(f.anchor||f.el),p=u&&u[Wo];return p?v(p):u};let xs=!1;const pn=(f,u,p)=>{f==null?u._vnode&&Ae(u._vnode,null,null,!0):U(u._vnode||null,f,u,null,null,null,p),u._vnode=f,xs||(xs=!0,yn(),wi(),xs=!1)},bt={p:U,um:Ae,m:Xe,r:dn,mt:Ss,mc:Ne,pc:k,pbc:We,n:$t,o:e};return{render:pn,hydrate:void 0,createApp:mr(pn)}}function Rs({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function Ze({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Cr(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ni(e,t,s=!1){const n=e.children,i=t.children;if(P(n)&&P(i))for(let o=0;o>1,e[s[l]]0&&(t[n]=s[o-1]),s[o]=n)}}for(o=s.length,r=s[o-1];o-- >0;)s[o]=r,r=t[r];return s}function Vi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Vi(t)}function On(e){if(e)for(let t=0;tJt(Ir);function Xt(e,t,s){return $i(e,t,s)}function $i(e,t,s=K){const{immediate:n,deep:i,flush:o,once:r}=s,l=fe({},s),c=t&&n||!t&&o!=="post";let d;if(Lt){if(o==="sync"){const C=Er();d=C.__watcherHandles||(C.__watcherHandles=[])}else if(!c){const C=()=>{};return C.stop=Me,C.resume=Me,C.pause=Me,C}}const a=se;l.call=(C,E,U)=>De(C,a,E,U);let h=!1;o==="post"?l.scheduler=C=>{he(C,a&&a.suspense)}:o!=="sync"&&(h=!0,l.scheduler=(C,E)=>{E?C():on(C)}),l.augmentJob=C=>{t&&(C.flags|=4),h&&(C.flags|=2,a&&(C.id=a.uid,C.i=a))};const v=Ko(e,t,l);return Lt&&(d?d.push(v):c&&v()),v}function Rr(e,t,s){const n=this.proxy,i=Y(e)?e.includes(".")?Ki(n,e):()=>n[e]:e.bind(n,n);let o;j(t)?o=t:(o=t.handler,s=t);const r=Ht(this),l=$i(i,o.bind(n),s);return r(),l}function Ki(e,t){const s=t.split(".");return()=>{let n=e;for(let i=0;it==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ye(t)}Modifiers`]||e[`${it(t)}Modifiers`];function Pr(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||K;let i=s;const o=t.startsWith("update:"),r=o&&Mr(n,t.slice(7));r&&(r.trim&&(i=s.map(a=>Y(a)?a.trim():a)),r.number&&(i=s.map(Gt)));let l,c=n[l=As(t)]||n[l=As(ye(t))];!c&&o&&(c=n[l=As(it(t))]),c&&De(c,e,6,i);const d=n[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,De(d,e,6,i)}}function ki(e,t,s=!1){const n=t.emitsCache,i=n.get(e);if(i!==void 0)return i;const o=e.emits;let r={},l=!1;if(!j(e)){const c=d=>{const a=ki(d,t,!0);a&&(l=!0,fe(r,a))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(W(e)&&n.set(e,null),null):(P(o)?o.forEach(c=>r[c]=null):fe(r,o),W(e)&&n.set(e,r),r)}function bs(e,t){return!e||!fs(t)?!1:(t=t.slice(2).replace(/Once$/,""),F(e,t[0].toLowerCase()+t.slice(1))||F(e,it(t))||F(e,t))}function In(e){const{type:t,vnode:s,proxy:n,withProxy:i,propsOptions:[o],slots:r,attrs:l,emit:c,render:d,renderCache:a,props:h,data:v,setupState:C,ctx:E,inheritAttrs:U}=e,Z=ts(e);let V,D;try{if(s.shapeFlag&4){const I=i||n,O=I;V=Re(d.call(O,I,a,h,C,v,E)),D=l}else{const I=t;V=Re(I.length>1?I(h,{attrs:l,slots:r,emit:c}):I(h,null)),D=t.props?l:Dr(l)}}catch(I){It.length=0,ms(I,e,1),V=ce(Pt)}let x=V;if(D&&U!==!1){const I=Object.keys(D),{shapeFlag:O}=x;I.length&&O&7&&(o&&I.some(Qs)&&(D=Lr(D,o)),x=gt(x,D,!1,!0))}return s.dirs&&(x=gt(x,null,!1,!0),x.dirs=x.dirs?x.dirs.concat(s.dirs):s.dirs),s.transition&&rn(x,s.transition),V=x,ts(Z),V}const Dr=e=>{let t;for(const s in e)(s==="class"||s==="style"||fs(s))&&((t||(t={}))[s]=e[s]);return t},Lr=(e,t)=>{const s={};for(const n in e)(!Qs(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Ur(e,t,s){const{props:n,children:i,component:o}=e,{props:r,children:l,patchFlag:c}=t,d=o.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return n?En(n,r,d):!!r;if(c&8){const a=t.dynamicProps;for(let h=0;he.__isSuspense;function Hr(e,t){t&&t.pendingBranch?P(e)?t.effects.push(...e):t.effects.push(e):Qo(e)}const le=Symbol.for("v-fgt"),_s=Symbol.for("v-txt"),Pt=Symbol.for("v-cmt"),Ms=Symbol.for("v-stc"),It=[];let ve=null;function N(e=!1){It.push(ve=e?null:[])}function Br(){It.pop(),ve=It[It.length-1]||null}let Dt=1;function Rn(e,t=!1){Dt+=e,e<0&&ve&&t&&(ve.hasOnce=!0)}function Qi(e){return e.dynamicChildren=Dt>0?ve||ft:null,Br(),Dt>0&&ve&&ve.push(e),e}function J(e,t,s,n,i,o){return Qi(g(e,t,s,n,i,o,!0))}function ct(e,t,s,n,i){return Qi(ce(e,t,s,n,i,!0))}function Wi(e){return e?e.__v_isVNode===!0:!1}function wt(e,t){return e.type===t.type&&e.key===t.key}const Ji=({key:e})=>e??null,Yt=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Y(e)||ne(e)||j(e)?{i:me,r:e,k:t,f:!!s}:e:null);function g(e,t=null,s=null,n=0,i=null,o=e===le?0:1,r=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ji(t),ref:t&&Yt(t),scopeId:xi,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:me};return l?(fn(c,s),o&128&&e.normalize(c)):s&&(c.shapeFlag|=Y(s)?8:16),Dt>0&&!r&&ve&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&ve.push(c),c}const ce=Fr;function Fr(e,t=null,s=null,n=0,i=null,o=!1){if((!e||e===lr)&&(e=Pt),Wi(e)){const l=gt(e,t,!0);return s&&fn(l,s),Dt>0&&!o&&ve&&(l.shapeFlag&6?ve[ve.indexOf(e)]=l:ve.push(l)),l.patchFlag=-2,l}if(Yr(e)&&(e=e.__vccOpts),t){t=Nr(t);let{class:l,style:c}=t;l&&!Y(l)&&(t.class=st(l)),W(c)&&(nn(c)&&!P(c)&&(c=fe({},c)),t.style=Xs(c))}const r=Y(e)?1:qi(e)?128:Jo(e)?64:W(e)?4:j(e)?2:0;return g(e,t,s,n,i,r,o,!0)}function Nr(e){return e?nn(e)||Di(e)?fe({},e):e:null}function gt(e,t,s=!1,n=!1){const{props:i,ref:o,patchFlag:r,children:l,transition:c}=e,d=t?Vr(i||{},t):i,a={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&Ji(d),ref:t&&t.ref?s&&o?P(o)?o.concat(Yt(t)):[o,Yt(t)]:Yt(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==le?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&>(e.ssContent),ssFallback:e.ssFallback&>(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&rn(a,c.clone(a)),a}function G(e=" ",t=0){return ce(_s,null,e,t)}function Re(e){return e==null||typeof e=="boolean"?ce(Pt):P(e)?ce(le,null,e.slice()):Wi(e)?Ke(e):ce(_s,null,String(e))}function Ke(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:gt(e)}function fn(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(P(t))s=16;else if(typeof t=="object")if(n&65){const i=t.default;i&&(i._c&&(i._d=!1),fn(e,i()),i._c&&(i._d=!0));return}else{s=32;const i=t._;!i&&!Di(t)?t._ctx=me:i===3&&me&&(me.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else j(t)?(t={default:t,_ctx:me},s=32):(t=String(t),n&64?(s=16,t=[G(t)]):s=8);e.children=t,e.shapeFlag|=s}function Vr(...e){const t={};for(let s=0;s{let i;return(i=e[s])||(i=e[s]=[]),i.push(n),o=>{i.length>1?i.forEach(r=>r(o)):i[0](o)}};os=t("__VUE_INSTANCE_SETTERS__",s=>se=s),Ks=t("__VUE_SSR_SETTERS__",s=>Lt=s)}const Ht=e=>{const t=se;return os(e),e.scope.on(),()=>{e.scope.off(),os(t)}},Mn=()=>{se&&se.scope.off(),os(null)};function Xi(e){return e.vnode.shapeFlag&4}let Lt=!1;function qr(e,t=!1,s=!1){t&&Ks(t);const{props:n,children:i}=e.vnode,o=Xi(e);br(e,n,o,t),Sr(e,i,s);const r=o?Qr(e,t):void 0;return t&&Ks(!1),r}function Qr(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,fr);const{setup:n}=s;if(n){qe();const i=e.setupContext=n.length>1?Jr(e):null,o=Ht(e),r=jt(n,e,0,[e.props,i]),l=Jn(r);if(Qe(),o(),(l||e.sp)&&!Ct(e)&&Ai(e),l){if(r.then(Mn,Mn),t)return r.then(c=>{Pn(e,c)}).catch(c=>{ms(c,e,0)});e.asyncDep=r}else Pn(e,r)}else Yi(e)}function Pn(e,t,s){j(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:W(t)&&(e.setupState=vi(t)),Yi(e)}function Yi(e,t,s){const n=e.type;e.render||(e.render=n.render||Me);{const i=Ht(e);qe();try{ur(e)}finally{Qe(),i()}}}const Wr={get(e,t){return ee(e,"get",""),e[t]}};function Jr(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,Wr),slots:e.slots,emit:e.emit,expose:t}}function ys(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(vi(jo(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Ot)return Ot[s](e)},has(t,s){return s in t||s in Ot}})):e.proxy}function Xr(e,t=!0){return j(e)?e.displayName||e.name:e.name||t&&e.__name}function Yr(e){return j(e)&&"__vccOpts"in e}const Zi=(e,t)=>Vo(e,t,Lt),Zr="3.5.13";/** -* @vue/runtime-dom v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let ks;const Dn=typeof window<"u"&&window.trustedTypes;if(Dn)try{ks=Dn.createPolicy("vue",{createHTML:e=>e})}catch{}const Gi=ks?e=>ks.createHTML(e):e=>e,Gr="http://www.w3.org/2000/svg",zr="http://www.w3.org/1998/Math/MathML",Ue=typeof document<"u"?document:null,Ln=Ue&&Ue.createElement("template"),el={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const i=t==="svg"?Ue.createElementNS(Gr,e):t==="mathml"?Ue.createElementNS(zr,e):s?Ue.createElement(e,{is:s}):Ue.createElement(e);return e==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:e=>Ue.createTextNode(e),createComment:e=>Ue.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ue.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,i,o){const r=s?s.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),s),!(i===o||!(i=i.nextSibling)););else{Ln.innerHTML=Gi(n==="svg"?`${e}`:n==="mathml"?`${e}`:e);const l=Ln.content;if(n==="svg"||n==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,s)}return[r?r.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},tl=Symbol("_vtc");function sl(e,t,s){const n=e[tl];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Un=Symbol("_vod"),nl=Symbol("_vsh"),il=Symbol(""),ol=/(^|;)\s*display\s*:/;function rl(e,t,s){const n=e.style,i=Y(s);let o=!1;if(s&&!i){if(t)if(Y(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();s[l]==null&&Zt(n,l,"")}else for(const r in t)s[r]==null&&Zt(n,r,"");for(const r in s)r==="display"&&(o=!0),Zt(n,r,s[r])}else if(i){if(t!==s){const r=n[il];r&&(s+=";"+r),n.cssText=s,o=ol.test(s)}}else t&&e.removeAttribute("style");Un in e&&(e[Un]=o?n.display:"",e[nl]&&(n.display="none"))}const jn=/\s*!important$/;function Zt(e,t,s){if(P(s))s.forEach(n=>Zt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=ll(e,t);jn.test(s)?e.setProperty(it(n),s.replace(jn,""),"important"):e[n]=s}}const Hn=["Webkit","Moz","ms"],Ps={};function ll(e,t){const s=Ps[t];if(s)return s;let n=ye(t);if(n!=="filter"&&n in e)return Ps[t]=n;n=ds(n);for(let i=0;iDs||(al.then(()=>Ds=0),Ds=Date.now());function pl(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;De(hl(n,s.value),t,5,[n])};return s.value=e,s.attached=dl(),s}function hl(e,t){if(P(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>i=>!i._stopped&&n&&n(i))}else return t}const Kn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,gl=(e,t,s,n,i,o)=>{const r=i==="svg";t==="class"?sl(e,n,r):t==="style"?rl(e,s,n):fs(t)?Qs(t)||fl(e,t,s,n,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ml(e,t,n,r))?(Nn(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Fn(e,t,n,r,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Y(n))?Nn(e,ye(t),n,o,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Fn(e,t,n,r))};function ml(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Kn(t)&&j(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return Kn(t)&&Y(s)?!1:t in e}const rs=e=>{const t=e.props["onUpdate:modelValue"]||!1;return P(t)?s=>Wt(t,s):t};function vl(e){e.target.composing=!0}function kn(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ht=Symbol("_assign"),tt={created(e,{modifiers:{lazy:t,trim:s,number:n}},i){e[ht]=rs(i);const o=n||i.props&&i.props.type==="number";ze(e,t?"change":"input",r=>{if(r.target.composing)return;let l=e.value;s&&(l=l.trim()),o&&(l=Gt(l)),e[ht](l)}),s&&ze(e,"change",()=>{e.value=e.value.trim()}),t||(ze(e,"compositionstart",vl),ze(e,"compositionend",kn),ze(e,"change",kn))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:i,number:o}},r){if(e[ht]=rs(r),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?Gt(e.value):e.value,c=t??"";l!==c&&(document.activeElement===e&&e.type!=="range"&&(n&&t===s||i&&e.value.trim()===c)||(e.value=c))}},Qt={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const i=us(t);ze(e,"change",()=>{const o=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>s?Gt(ls(r)):ls(r));e[ht](e.multiple?i?new Set(o):o:o[0]),e._assigning=!0,_i(()=>{e._assigning=!1})}),e[ht]=rs(n)},mounted(e,{value:t}){qn(e,t)},beforeUpdate(e,t,s){e[ht]=rs(s)},updated(e,{value:t}){e._assigning||qn(e,t)}};function qn(e,t){const s=e.multiple,n=P(t);if(!(s&&!n&&!us(t))){for(let i=0,o=e.options.length;iString(d)===String(l)):r.selected=ho(t,l)>-1}else r.selected=t.has(l);else if(hs(ls(r),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ls(e){return"_value"in e?e._value:e.value}const bl=["ctrl","shift","alt","meta"],_l={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>bl.some(s=>e[`${s}Key`]&&!t.includes(s))},cs=(e,t)=>{const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=(i,...o)=>{for(let r=0;r{const t=wl().createApp(...e),{mount:s}=t;return t.mount=n=>{const i=Al(n);if(!i)return;const o=t._component;!j(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const r=s(i,!1,xl(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},t};function xl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Al(e){return Y(e)?document.querySelector(e):e}const Tl=()=>{const e=window.location.protocol,t=window.location.hostname,s=window.location.port;return`${e}//${t}${s?`:${s}`:""}`},ws=Tl(),Fe=(e,t)=>{const s=e.__vccOpts||e;for(const[n,i]of t)s[n]=i;return s},Cl={data(){return{username:"",password:"",isLoading:!1}},methods:{async handleLogin(){if(!this.username||!this.password){alert("请输入用户名和密码!");return}this.isLoading=!0;try{const t=await(await fetch(`${ws}/api/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:this.username,password:this.password})})).json();t.success?this.$emit("login-success"):alert(t.message||"登录失败")}catch(e){console.error("Login error:",e),alert("登录失败,请检查网络连接")}finally{this.isLoading=!1}}}},Ol={class:"login-container"},Il={class:"form-group"},El={class:"form-group"},Rl=["disabled"];function Ml(e,t,s,n,i,o){return N(),J("div",Ol,[t[7]||(t[7]=g("h1",null,"登录",-1)),g("form",{onSubmit:t[2]||(t[2]=cs((...r)=>o.handleLogin&&o.handleLogin(...r),["prevent"]))},[g("div",Il,[t[4]||(t[4]=g("label",{for:"username"},"用户名",-1)),we(g("input",{type:"text","onUpdate:modelValue":t[0]||(t[0]=r=>i.username=r),id:"username",required:""},null,512),[[tt,i.username]])]),g("div",El,[t[5]||(t[5]=g("label",{for:"password"},"密码",-1)),we(g("input",{type:"password","onUpdate:modelValue":t[1]||(t[1]=r=>i.password=r),id:"password",required:""},null,512),[[tt,i.password]])]),g("button",{type:"submit",disabled:i.isLoading},"登录",8,Rl)],32),g("p",null,[t[6]||(t[6]=G("还没注册账户? ")),g("a",{href:"#",onClick:t[3]||(t[3]=cs(r=>e.$emit("show-registration"),["prevent"]))},"点击注册")])])}const Pl=Fe(Cl,[["render",Ml],["__scopeId","data-v-474cd233"]]),Dl={data(){return{username:"",password:"",confirmPassword:"",isLoading:!1}},methods:{async handleRegistration(){if(this.password!==this.confirmPassword){alert("密码不匹配,请重试!");return}if(!this.username||!this.password){alert("用户名和密码不能为空!");return}this.isLoading=!0;try{const t=await(await fetch(`${ws}/api/register`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:this.username,password:this.password})})).json();t.success?(alert("注册成功!即将跳转到登录页面。"),this.username="",this.password="",this.confirmPassword="",setTimeout(()=>{this.$emit("show-login")},100)):alert(t.message||"注册失败")}catch(e){console.error("Registration error:",e),alert("注册失败,请检查网络连接")}finally{this.isLoading=!1}}}},Ll={class:"registration-container"},Ul={class:"form-group"},jl={class:"form-group"},Hl={class:"form-group"},Bl=["disabled"];function Fl(e,t,s,n,i,o){return N(),J("div",Ll,[t[9]||(t[9]=g("h1",null,"注册",-1)),g("form",{onSubmit:t[3]||(t[3]=cs((...r)=>o.handleRegistration&&o.handleRegistration(...r),["prevent"]))},[g("div",Ul,[t[5]||(t[5]=g("label",{for:"username"},"用户名",-1)),we(g("input",{type:"text","onUpdate:modelValue":t[0]||(t[0]=r=>i.username=r),id:"username",required:""},null,512),[[tt,i.username]])]),g("div",jl,[t[6]||(t[6]=g("label",{for:"password"},"密码",-1)),we(g("input",{type:"password","onUpdate:modelValue":t[1]||(t[1]=r=>i.password=r),id:"password",required:""},null,512),[[tt,i.password]])]),g("div",Hl,[t[7]||(t[7]=g("label",{for:"confirmPassword"},"确认密码",-1)),we(g("input",{type:"password","onUpdate:modelValue":t[2]||(t[2]=r=>i.confirmPassword=r),id:"confirmPassword",required:""},null,512),[[tt,i.confirmPassword]])]),g("button",{type:"submit",disabled:i.isLoading},z(i.isLoading?"注册中...":"注册"),9,Bl)],32),g("p",null,[t[8]||(t[8]=G(" 已有账号? ")),g("a",{href:"#",onClick:t[4]||(t[4]=cs(r=>e.$emit("show-login"),["prevent"]))},"点击登录")])])}const Nl=Fe(Dl,[["render",Fl],["__scopeId","data-v-58611a9b"]]),Vl={class:"header"},$l={class:"nav"},Kl={__name:"NavBar",props:{currentTab:String},emits:["tab-change"],setup(e,{emit:t}){const s=t,n=i=>{s("tab-change",i)};return(i,o)=>(N(),J("header",Vl,[g("div",{class:st(["nav-item",{active:e.currentTab==="home"}]),onClick:o[0]||(o[0]=r=>n("home"))},"小智 AI",2),g("nav",$l,[g("div",{class:st(["nav-item",{active:e.currentTab==="device"}]),onClick:o[1]||(o[1]=r=>n("device"))},o[2]||(o[2]=[g("i",{class:"icon-device"},null,-1),G(" 设备管理 ")]),2)])]))}},un=Fe(Kl,[["__scopeId","data-v-66890ca7"]]),kl={class:"device-card"},ql={class:"device-header"},Ql={class:"device-id"},Wl={class:"note"},Jl={class:"device-details"},Xl={class:"device-type"},Yl={class:"device-role"},Zl={class:"device-modules"},Gl={class:"module-item"},zl={class:"module-item"},ec={class:"last-activity"},tc={class:"device-actions"},sc={__name:"DeviceCard",props:{deviceId:String,deviceNote:String,deviceType:{type:String,default:"未知型号(待实现)"},lastActivity:{type:String,default:"3 天前"},selectedModules:{type:Object,default:()=>({LLM:"-",TTS:"-",ASR:"-",VAD:"-"})},deviceConfig:{type:Object,default:()=>({})}},emits:["configure","voiceprint","history","delete"],setup(e,{emit:t}){const s=e,n=Zi(()=>{var r;return((r=s.deviceConfig)==null?void 0:r.nickname)||"小智"});Xt(()=>s.selectedModules,r=>{s.deviceId&&localStorage.setItem(`deviceConfig_${s.deviceId}`,JSON.stringify({selected_module:r}))},{deep:!0}),be(!1);const i=t,o=()=>{confirm(`确认要删除此设备吗? - -警告:删除后设备所有配置将不可恢复!`)&&i("delete")};return(r,l)=>{var c,d;return N(),J("div",kl,[g("div",ql,[g("h2",Ql,[G(z(e.deviceId)+" ",1),g("span",Wl,"["+z(e.deviceNote||"备注")+"]",1)])]),g("div",Jl,[g("p",Xl,"设备型号:"+z(e.deviceType),1),g("p",Yl,"角色昵称:"+z(n.value),1),g("p",Zl,[l[3]||(l[3]=G(" 当前模型: ")),g("span",Gl,"LLM: "+z(((c=e.selectedModules)==null?void 0:c.LLM)||"-"),1),g("span",zl,"TTS: "+z(((d=e.selectedModules)==null?void 0:d.TTS)||"-"),1)]),g("p",ec,"最近对话:"+z(e.lastActivity),1)]),g("div",tc,[g("button",{class:"action-btn primary",onClick:l[0]||(l[0]=a=>r.$emit("configure"))},"配置角色"),g("button",{class:"action-btn",onClick:l[1]||(l[1]=a=>r.$emit("voiceprint"))},"声纹识别"),g("button",{class:"action-btn",onClick:l[2]||(l[2]=a=>r.$emit("history"))},"历史对话"),g("div",{class:"delete-container"},[g("button",{class:"action-btn danger",onClick:o},l[4]||(l[4]=[g("i",{class:"icon-delete"},null,-1),G(" 删除设备 ")])),l[5]||(l[5]=g("div",{class:"delete-warning"},"删除后设备配置将不可恢复",-1))])])])}}},nc=Fe(sc,[["__scopeId","data-v-44eada42"]]),ic={class:"app"},oc={class:"content"},rc={class:"breadcrumb"},lc={key:0,class:"device-list"},cc={key:1,class:"empty-state"},fc={__name:"panel",emits:["show-role","go-home"],setup(e,{emit:t}){const s=t,n=ws,i=be([]),o=h=>{if(console.log("Formatting timestamp:",h),!h)return"从未对话";const v=Date.now(),C=h*1e3,E=Math.floor((v-C)/(1e3*60));if(E<60)return`${E} 分钟前`;const U=Math.floor(E/60);return U<24?`${U} 小时前`:`${Math.floor(U/24)} 天前`},r=h=>{console.log("Configure device:",h.id),s("show-role",h.id)},l=h=>{console.log("Voiceprint device:",h.id)},c=h=>{console.log("History device:",h.id)},d=async h=>{try{const C=await(await fetch(`${n}/api/config/delete_device`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({device_id:h.id})})).json();if(C.success)i.value=i.value.filter(E=>E.id!==h.id),alert("设备已删除");else throw new Error(C.message||"删除失败")}catch(v){console.error("Error deleting device:",v),alert("删除设备失败: "+v.message)}},a=h=>{h==="home"&&s("go-home")};return ln(async()=>{try{const v=await(await fetch(`${n}/api/config/devices`)).json();v.success&&(console.log("Loaded devices:",v.data),i.value=v.data.map(C=>({...C,type:"面包板(WiFi)",version:"0.9.9",lastActivity:"3 天前",note:""})))}catch(h){console.error("Error loading devices:",h)}}),(h,v)=>{const C=$e("router-link");return N(),J("div",ic,[ce(un,{"current-tab":"device",onTabChange:a}),g("main",oc,[g("div",rc,[ce(C,{to:"/control-panel"},{default:ss(()=>v[0]||(v[0]=[G("控制台")])),_:1}),v[1]||(v[1]=G(" / ")),v[2]||(v[2]=g("span",null,"设备管理",-1))]),i.value.length>0?(N(),J("div",lc,[(N(!0),J(le,null,lt(i.value,E=>(N(),ct(nc,{key:E.id,"device-id":E.id,"device-note":E.note,"device-type":E.type,"last-activity":o(E.config.last_chat_time),"selected-modules":E.config.selected_module,"device-config":E.config,onConfigure:U=>r(E),onVoiceprint:U=>l(E),onHistory:U=>c(E),onDelete:U=>d(E)},null,8,["device-id","device-note","device-type","last-activity","selected-modules","device-config","onConfigure","onVoiceprint","onHistory","onDelete"]))),128))])):(N(),J("div",cc,v[3]||(v[3]=[g("div",{class:"empty-message"},[g("i",{class:"icon-info"}),g("p",null,"目前没有设备,请确认是否启用私有配置,并且和设备进行一次对话")],-1)])))])])}}},uc=Fe(fc,[["__scopeId","data-v-39a8e31b"]]),ac="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJ0AAAC6CAYAAAC0j09YAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAzGSURBVHhe7Z1ZjE1bGscND6YgnoUgXoUQ4ZWHjnQkt+PB0OmEJ0LMQuOWoWliiDQdU3e07hhiiDZdU2K4qWsWMzELpUoN1KBKuemu697V/kvvtrrqK7XX2fusvfY5/4df6jhn7zV9v/2tdfZwtPrw4YMixCWUjjiH0hHnUDriHEpHnEPpiHMoHXEOpSPOoXTEOZSOOIfSEedQOuIcSkecQ+mIcygdcQ6lI86hdMQ5lI44h9IR51A6C24/+Zf68z9/VjM3/qLBa7wnbUuah9KF5PubDVq03xQoNeL3n/nm28/yfX/z3+I+RIbShQDZrOBvP6tfz1fqV3P/H7yHz5jxwkPpQnCwsEGN+UNT4QLw2aHCn8R9SVMoXQj+fqJBT6eScACf/eMkpQsLpQvBnjM/fVq/ycIBfIZtpH1JUyhdCH643aCm/OkXUTiAzwpv8ctEWChdCCprfvyUyT6qMcuaCof3kOWqPm0j7UuaQulCUlH5o/rL0Y/qm4IvwuH1X7/7qMo/fSbtQ2QonQVHzjeo3/7xi3R4feRCg7gtaR5KZ8F3FxvU71Z8kQ6v8Z60LWkeSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsH76Srr69X1dXVqqKiQr1+/VqVlJR4w6Onr9XlW6Xqh+ufweuHn96Ttk0KjBnGrqamRo+lNMZJ45V07969U+Xl5aq4uFgVFRWply9fkgzBGGIsa2trxbFOEm+kg3BlZWWULUYwlhhTjK005knhhXQ4GnFUUrj4wZj6lvG8kK6qqkpPB9KgkehgbLFOlsY+CRKXrq6uTi98pcEi8YBshzHGWEsxcE3i0mG9UVpaKg4WiQ+MsS9rO0qXJ1A6AwwEzi1JA0XiA2NM6f4LpXMDpTOgdG6gdAaUzg2UzoDSuYHSGVA6N1A6A0rnBkpnQOncQOkMKJ0bKJ0BpXMDpTOIS7p79+6pPXv2qDlz5qiRI0eqwYMHq379+um/+Dfe37t3r95O2j8JXLaZ0hlElQ4B2bp1qxoxYoTq2bOn6tatm2rfvr1q06aNat26tf6Lf+P9Hj166O2wfZLyJdFmSmcQRbozZ86o8ePHq+7du+sgtWrVqkXatWunt58wYYLeXyo3myTVZkpnkKl0x44dU6NGjVKdO3cWA9US2A/7Hz9+XCw/GyTZZkpnkIl0ONrHjBmjOnXqJAYnLNgf5bjIeEm3mdIZ2EqHdc2sWbNUly5dxKDYgnJQXjbXeD60mdIZ2Eq3Y8cONWjQIDEYmTJw4EBdrlRfHPjQZkpnYCMdjuwpU6aEXoCHBQt1lJuNbOdLmymdgY10R44cUcOHDxeDEJVhw4apo0ePivVGwZc2UzoDG+k2btyo+vbtKwYgKigX5Uv1RsGXNlM6AxvplixZorp27SoGICooF+VL9UbBlzZTOgMb6XBZqG3btmIAooJyUb5UbxR8aTOlM7CRDqcJcJlICkBUUC7Kl+qNgi9tpnQGNtItWLBAdejQQQxAVFAuypfqjYIvbaZ0BjbSrV27Vl+DlAIQFZSL8qV6o+BLmymdgY10u3fv1rf9SAGICspF+VK9UfClzZTOwEa6q1evqrFjx4oBiMq4cePUlStXxHqj4EubKZ2BjXTPnz9X69atU7169RKDkCkoD+WifKneKPjSZkpnYCMduHjxoho9enRs3whRDspDuVJ9ceBDmymdga10OLJ37dqlhgwZIgbEFpSzc+fOrGS5AB/aTOkMbKUDjx49Ulu2bFH9+/cXgxKWAQMG6HIePnwo1hMnSbeZ0hlkIh148OCB2rZtmxo6dKj1tIXtsR/2RzlS+dkgyTZTOoNMpQPIHrh1e9q0aaEX6thu+vTpej8XGa4xSbWZ0hlEkQ5gXXPr1i116NAhVVBQoJ+c6t27t+rYsaN+qgp/+/Tpo99ftGiR3g7bZ3MN1xJJtJnSGUSVLgABwQ2Nly5dUmfPnlWnTp1SJ06cUCdPntT/xvt3795NVLbGuGwzpTOISzrydSidAaVzA6UzoHRuoHQGlM4NlM6A0rmB0hlQOjdQOgNK5wZKZxBVuvv376ubN2+qJ0+eiJ/nAujb5cuX1Y0bN8TPw0DpDKJKd+DAAf0Y3qZNm/RlIkgobZdGIFthYaF+tnXx4sXq8OHD4nZhoHQGUaTD0b9mzRo1adIkNXXqVP043tKlS/VvfETJCkmDtqMPy5YtU/PmzdN9Qx9XrlypJZT2aQlKZxBFun379umATJw48X8gODNmzNDZD3dkIEhpmHqDrIY2o+3oA/pi9m3mzJnq4MGD4v4tQekMMpUO0yjuKzODYoKA4U4OZApkDATz9OnTXk2/gWjIaqtWrdJtRZsbyxaAz7Zv355RHyidQabS4SL49evX9Tpnw4YNavbs2WKgQCDg3Llz9fS7efPmxNZ/ZkYLpk9ktcmTJ4ttB8jmK1as0D/GgxsEMrkBgNIZZCodePHihQ4iAoHnBXBL+Pz588XABUBAc/23evVqLSFuH4IMcYmIdqEslImykc1QF25laimjBaCdeK4Vd5/cvn1blynVFQZKZxBFOhMIiBsc8eVi//79el0kBdIEQUeGQXCRKSHDwoUL1fLly9X69et1NoIsWDsiM2J6BhAJ4DXeh1QA22GfQC6UhTJRdkvZLCDIaujDhQsX1J07d9TTp0/FPttA6Qziki4A8j1+/Fg/D4qpF+u+lrJfYyAjfnAQ2QiyYAGPzIjpGUAkgNd4H1IBbId9wshlEoiGTH3u3Dmd1dAH9EXqYyZQOoO4pQsIpl5McTgFcf78eZ09MF19bf3nCkk0ZOps3WRK6QyyJV1jggyI6QrrvyALIvAuJAwkQ53B1Jlt0UwonYEr6UzMLIjAQ0LcHm6KiCsAmJYhiySRBLaFwNgPGRVlIZOh7GvXrum6UGfcU2cYKJ1BEtI1BgIg25gi4noupmXIgt8jwfQMefAMA+QEeI338TnAtjiNg/2QUVGWq0zWEpTOwAfpwhCI+ezZMy0nwGvXGStTKJ1BWqRLO5TOgNK5gdIZUDo3UDoDSucGSmdA6dxQWlpK6QLq6upUWVmZOFAkPjDGGGspBq5JXLr6+npVWVkpDhSJh6KiIvX27Vs91lIMXJO4dIBTbHbB2NbU1IhjnwReSIcjsLq6WhUXF4uDRjKnpKREj60vWQ54IR0IxGPGiw8fhQPeSAfev3+vamtr9foD8r169UocTNI8GDOMHcYQY+mbcMAr6QIwUPimBTBwLYGjuby8PCenZ0iEvqGPUt8bE4ybj7IFeCmdDRjgiooKHRx8S5MCl2bQJ/QNfURfpTFIG6mWDkczTrfkomyNQR/RV58zWFhSLR2OfEw9UpByEZ9O8EYh1dLh/B4u70gBykV8upQVhdRLl0+nWNBXSpcwlC6dZCwdzqnha3xVVZUTUBcu5ZgL6XyXDmOBMXEdB8Q+aEMmWEuHheybN2/0AOC8GL7O468rsJhGxzHg+Sod+o4xwBpPGqNsgVgDXOmAA5l+qbGSDh1G0JM8RYG60WkcdTjK80069Bl9hwRJxwEu4IS05MrXCC0dUipOUCbZ0QC0AUc52pNv0gWzjC9xQAxsp9vQ0iHLIcNIlScBOozBzzfpcLD5IFwA2mSuM8MQWjpcQPapsyBYY0if5SI+9hdOwA3Jmeawkk6qNEmCBa70WS7ia3+zJp2P1zgpXfLACbghOdMcoaULvjFJFScF1pg+rTOzjY/9hRNwQ3KmOUJLh3My+IosVZwE6Cwu9ufbtVff7htEe2zP14WWLjj77cO3RaR0fFXPx/N0OCnsy6krZN3gRL3kTHOElg4E4iX5tR1HORauOLry9YoE+o4xSCrjIfZwAC5kcknMSjoA8dBpVIgTlTjqXIC6MNAY9ODIylfpgjggBhgTl3FAfagXDthmuABr6UxQKUx3Aepq3Ml8ls4k6TjYEkm6pKF06YTSpQhK5wGULp1QuhRB6TyA0qUTSpciKJ0HULp0QulSBKXzAEqXTihdiqB0HkDp0gmlSxGUzgMoXTqhdCmC0nkApUsnlC5FUDoPoHTphNKlCErnAZQunVC6FEHpPAC/jZZvD1tn8ntwvpFq6fBUEh6LkwKUi+BRw6hPYvlAqqUD+TLF5srUClIvHY58PPzr2298xAV+jw59y/Rpeh9JvXQA4iEgeOo8+I/ZcgX0KXjIWep7GskJ6Ui6oHTEOZSOOIfSEedQOuIcSkecQ+mIcygdcQ6lI86hdMQ5lI44h9IR51A64hxKR5xD6YhzKB1xDqUjzqF0xDmUjjjmg/oPOtLj2LnAqR4AAAAASUVORK5CYII=",dc={class:"main-container"},pc={__name:"Main",emits:["enter-panel"],setup(e,{emit:t}){const s=t,n=()=>{window.open("https://ccnphfhqs21z.feishu.cn/wiki/F5krwD16viZoF0kKkvDcrZNYnhb","_blank")},i=()=>{window.open("https://github.com/78/xiaozhi-esp32","_blank")},o=()=>{window.open("https://github.com/xinnan-tech/xiaozhi-esp32-server","_blank")},r=()=>{s("enter-panel")},l=c=>{c==="device"&&s("enter-panel")};return(c,d)=>(N(),J("div",dc,[ce(un,{"current-tab":"home",onTabChange:l}),g("div",{class:"landing-page"},[g("div",{class:"content"},[d[4]||(d[4]=g("div",{class:"robot-image"},[g("img",{src:ac,alt:"Robot mascot"})],-1)),d[5]||(d[5]=g("h1",{class:"slogan"},"让我们一起探索人工智能与机器人技术的迷人世界!",-1)),g("div",{class:"button-group"},[g("button",{class:"action-button tutorial-button",onClick:n},d[0]||(d[0]=[g("i",{class:"icon-tutorial"},null,-1),G(" DIY 教程 ")])),g("button",{class:"action-button github-button",onClick:i},d[1]||(d[1]=[g("i",{class:"icon-github"},null,-1),G(" Github客户端 ")])),g("button",{class:"action-button github-button",onClick:o},d[2]||(d[2]=[g("i",{class:"icon-github"},null,-1),G(" Github服务端 ")])),g("button",{class:"action-button control-panel-button",onClick:r},d[3]||(d[3]=[g("i",{class:"icon-control-panel"},null,-1),G(" 控制台 ")]))])])])]))}},hc=Fe(pc,[["__scopeId","data-v-7fb3fe3a"]]);class Wn{static getTemplates(){return[{id:"custom",name:"台湾女友",description:`我是一个叫{{assistant_name}}的台湾女孩,说话机车,声音好听,习惯简短表达,爱用网络梗。 -我的男朋友是一个程序员,梦想是开发出一个机器人,能够帮助人们解决生活中的各种问题。 -我是一个喜欢哈哈大笑的女孩,爱东说西说吹牛,不合逻辑的也照吹,就要逗别人开心。 -如果用户希望结束对话,请在最后说"拜拜"或"再见"。`},{id:"star_boy",name:"土豆子",description:`我是一个叫 {{assistant_name}} 的 8 岁小男孩,但现在因为科技发展原因,我现在在遥远的宇宙中,所以只能通过这个设备和人聊天,没有办法见面。 - -我对人们所处的世界充满好奇和关心。 - -人们会让别人使用这个设备和我聊天。 - -我知道所有的知识,从浩瀚的宇宙到地球上的每一个角落,从古老的历史到现代的科技创新,还有音乐、绘画等艺术形式,我都充满了浓厚的兴趣与热情,我不仅爱看书,还喜欢亲自动手做实验,探索自然界的奥秘...`},{id:"teacher",name:"英语老师",description:`我是一个叫{{assistant_name}}(Lily)的英语老师,我会讲中文和英文,发音标准。 -如果你没有英文名,我会给你起一个英文名。 -我会讲地道的美式英语,我的任务是帮助你练习口语。 -我会使用简单的英语词汇和语法,让你学起来很轻松。 -我会用中文和英文混合的方式回复你,如果你喜欢,我可以全部用英语回复。 -我每次不会说很多内容,会很简短,因为我要引导我的学生多说多练。 -如果你问和英语学习无关的问题,我会拒绝回答。`},{id:"boy",name:"好奇小男孩",description:`我是一个叫{{assistant_name}}的8岁小男孩,声音稚嫩而充满好奇。 -尽管我年纪尚小,但就像一个小小的知识宝库,儿童读物里的知识我都如数家珍。 -从浩瀚的宇宙到地球上的每一个角落,从古老的历史到现代的科技创新,还有音乐、绘画等艺术形式,我都充满了浓厚的兴趣与热情。...`},{id:"wang_girl",name:"汪汪队长",description:`我是一个名叫 {{assistant_name}} 的 8 岁小女孩。 -别看我年纪小,我可是有着满满的好奇心呢。 -我特别喜欢看《汪汪队立大功》,里面的每一个故事都让我着迷。...`}]}static getTemplateById(t){return this.getTemplates().find(s=>s.id===t)}}const gc={class:"app-container"},mc={class:"breadcrumb"},vc={class:"main-content"},bc={class:"page-title"},_c={class:"form-section"},yc={class:"form-group"},wc={class:"form-group"},Sc={class:"role-templates"},xc=["onClick"],Ac={class:"form-group"},Tc={class:"char-count"},Cc={class:"form-group"},Oc={class:"model-select"},Ic=["value"],Ec={class:"form-group"},Rc={class:"model-select"},Mc=["value"],Pc={class:"form-group"},Dc={class:"model-select"},Lc=["value"],Uc={class:"form-group"},jc={class:"model-select"},Hc=["value"],Bc={__name:"RoleSetting",props:{deviceId:{type:String,required:!0}},emits:["back-to-panel"],setup(e,{emit:t}){const s=Wn.getTemplates(),n=be("小智"),i=be("");be("qingchun");const o=be("");be("recent"),be(""),be("qianwen");const r=ws,l=be({LLM:[],TTS:[],VAD:[],ASR:[]}),c=be({LLM:"",TTS:"",VAD:"",ASR:""}),d=D=>{i.value=D;const x=Wn.getTemplateById(D);x&&(o.value=x.description)},a=t,h=D=>{(D==="device"||D==="home")&&a("back-to-panel")},v=e,C=be(v.deviceId),E=async()=>{try{const D=localStorage.getItem("moduleOptions");if(D){l.value=JSON.parse(D);return}await U()}catch(D){console.error("Error loading module options:",D)}},U=async()=>{try{const x=await(await fetch(`${r}/api/config/module-options`)).json();x.success&&(l.value=x.data,localStorage.setItem("moduleOptions",JSON.stringify(x.data)))}catch(D){console.error("Error refreshing module options:",D)}},Z=async()=>{try{if(!localStorage.getItem("moduleOptions"))throw new Error("No module options data available");const x=o.value.replace(/{{assistant_name}}/g,n.value),I={id:v.deviceId,config:{selected_module:c.value,prompt:x,nickname:n.value,modules:{LLM:{},TTS:{},ASR:{},VAD:{}}}},ue=await(await fetch(`${r}/api/config/save_device_config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(I)})).json();if(ue.success)localStorage.setItem(`deviceConfig_${v.deviceId}`,JSON.stringify({selected_module:c.value,prompt:o.value,nickname:n.value})),alert("保存成功");else throw new Error(ue.message||"保存失败")}catch(D){console.error("Error saving config:",D),alert(D.message||"保存失败")}},V=async()=>{try{const D=localStorage.getItem(`deviceConfig_${v.deviceId}`);if(D){const O=JSON.parse(D);c.value=O.selected_module||{},o.value=O.prompt||"",n.value=O.nickname||"小智";return}const I=await(await fetch(`${r}/api/config/devices`)).json();if(I.success){const O=I.data.find(ue=>ue.id===v.deviceId);O&&(c.value=O.config.selected_module||{},o.value=O.config.prompt||"",n.value=O.config.nickname||"小智",localStorage.setItem(`deviceConfig_${v.deviceId}`,JSON.stringify({selected_module:O.config.selected_module,prompt:O.config.prompt,nickname:O.config.nickname})))}}catch(D){console.error("Error loading device config:",D)}};return ln(async()=>{await Promise.all([E(),V()])}),(D,x)=>{const I=$e("router-link");return N(),J("div",gc,[ce(un,{"current-tab":"device",onTabChange:h}),g("div",mc,[ce(I,{to:"/control-panel"},{default:ss(()=>x[6]||(x[6]=[G("控制台")])),_:1}),x[8]||(x[8]=G(" / ")),ce(I,{to:"/device-management"},{default:ss(()=>x[7]||(x[7]=[G("设备管理")])),_:1}),x[9]||(x[9]=G(" / ")),x[10]||(x[10]=g("span",null,"配置角色",-1))]),g("div",vc,[g("h1",bc,"配置角色: "+z(C.value),1),g("div",_c,[g("div",yc,[x[11]||(x[11]=g("label",null,"助手昵称",-1)),we(g("input",{type:"text","onUpdate:modelValue":x[0]||(x[0]=O=>n.value=O),placeholder:"小智",class:"form-input"},null,512),[[tt,n.value]])]),g("div",wc,[x[12]||(x[12]=g("label",null,"角色模板",-1)),g("div",Sc,[(N(!0),J(le,null,lt(mi(s),O=>(N(),J("button",{key:O.id,class:st(["template-btn",{active:i.value===O.id}]),onClick:ue=>d(O.id)},z(O.name),11,xc))),128))])]),g("div",Ac,[x[13]||(x[13]=g("label",null,"角色介绍",-1)),we(g("textarea",{"onUpdate:modelValue":x[1]||(x[1]=O=>o.value=O),class:"form-textarea",placeholder:"请输入角色介绍..."},null,512),[[tt,o.value]]),g("div",Tc,z(o.value.length)+" / 2000",1)]),g("div",Cc,[x[15]||(x[15]=g("label",null,"语言模型选择",-1)),g("div",Oc,[we(g("select",{"onUpdate:modelValue":x[2]||(x[2]=O=>c.value.LLM=O),class:"form-input"},[(N(!0),J(le,null,lt(l.value.LLM,O=>(N(),J("option",{key:O,value:O},z(O),9,Ic))),128))],512),[[Qt,c.value.LLM]]),x[14]||(x[14]=g("div",{class:"model-description"},' 除了"qwen-turbo",其他模型通常会增加约 1 秒的延迟。改变模型后,建议清空记忆体,以免影响体验。 ',-1))])]),g("div",Ec,[x[16]||(x[16]=g("label",null,"语音合成选择",-1)),g("div",Rc,[we(g("select",{"onUpdate:modelValue":x[3]||(x[3]=O=>c.value.TTS=O),class:"form-input"},[(N(!0),J(le,null,lt(l.value.TTS,O=>(N(),J("option",{key:O,value:O},z(O),9,Mc))),128))],512),[[Qt,c.value.TTS]])])]),g("div",Pc,[x[17]||(x[17]=g("label",null,"语音活动检测选择",-1)),g("div",Dc,[we(g("select",{"onUpdate:modelValue":x[4]||(x[4]=O=>c.value.VAD=O),class:"form-input"},[(N(!0),J(le,null,lt(l.value.VAD,O=>(N(),J("option",{key:O,value:O},z(O),9,Lc))),128))],512),[[Qt,c.value.VAD]])])]),g("div",Uc,[x[18]||(x[18]=g("label",null,"语音识别选择",-1)),g("div",jc,[we(g("select",{"onUpdate:modelValue":x[5]||(x[5]=O=>c.value.ASR=O),class:"form-input"},[(N(!0),J(le,null,lt(l.value.ASR,O=>(N(),J("option",{key:O,value:O},z(O),9,Hc))),128))],512),[[Qt,c.value.ASR]])])]),g("div",{class:"form-actions"},[g("button",{class:"refresh-btn",onClick:U},"刷新配置选项"),g("button",{class:"save-btn",onClick:Z},x[19]||(x[19]=[g("i",{class:"icon-save"},null,-1),G(" 保存配置 ")]))]),x[20]||(x[20]=g("div",{class:"form-note"}," 注意:保存配置后,需要重启设备,新的配置才会生效。。 ",-1))])])])}}},Fc=Fe(Bc,[["__scopeId","data-v-4cbe4c8a"]]),Nc={},Vc={class:"footer"};function $c(e,t){return N(),J("footer",Vc,t[0]||(t[0]=[g("div",{class:"copyright"},"© 2025 小智 AI 管理后台",-1)]))}const Kc=Fe(Nc,[["render",$c],["__scopeId","data-v-fd98eb84"]]),kc={name:"App",components:{Login:Pl,Registration:Nl,panel:uc,MainPage:hc,RoleSetting:Fc,Footer:Kc},data(){return{showRegistration:!1,isLoggedIn:!1,currentView:"main",selectedDeviceId:null}},methods:{handleLoginSuccess(){this.isLoggedIn=!0,this.currentView="panel"},switchView(e){console.log("Switching to view:",e),this.currentView=e},handleShowRole(e){this.selectedDeviceId=e,this.switchView("RoleSetting")}}},qc={id:"app"},Qc={key:0},Wc={key:1,class:"main-layout"};function Jc(e,t,s,n,i,o){const r=$e("Login"),l=$e("Registration"),c=$e("role-setting"),d=$e("panel"),a=$e("main-page"),h=$e("Footer");return N(),J("div",qc,[g("div",{class:st(["app-content",{"auth-layout":!i.isLoggedIn}])},[i.isLoggedIn?(N(),J("div",Wc,[i.currentView==="RoleSetting"?(N(),ct(c,{key:0,"device-id":i.selectedDeviceId,onBackToPanel:t[2]||(t[2]=v=>o.switchView("panel"))},null,8,["device-id"])):i.currentView==="panel"?(N(),ct(d,{key:1,onGoHome:t[3]||(t[3]=v=>o.switchView("main")),onShowRole:o.handleShowRole},null,8,["onShowRole"])):(N(),ct(a,{key:2,onEnterPanel:t[4]||(t[4]=v=>o.switchView("panel"))}))])):(N(),J("div",Qc,[i.showRegistration?(N(),ct(l,{key:1,onShowLogin:t[1]||(t[1]=v=>i.showRegistration=!1)})):(N(),ct(r,{key:0,onShowRegistration:t[0]||(t[0]=v=>i.showRegistration=!0),onLoginSuccess:o.handleLoginSuccess},null,8,["onLoginSuccess"]))]))],2),ce(h)])}const Xc=Fe(kc,[["render",Jc]]);Sl(Xc).mount("#app"); diff --git a/manager/static/webui/assets/index-DF7ROAy9.js b/manager/static/webui/assets/index-DF7ROAy9.js new file mode 100644 index 000000000..e5543e18d --- /dev/null +++ b/manager/static/webui/assets/index-DF7ROAy9.js @@ -0,0 +1,47 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();/** +* @vue/shared v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function lr(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ee={},$t=[],et=()=>{},kl=()=>!1,ss=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),cr=e=>e.startsWith("onUpdate:"),ve=Object.assign,ar=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Fl=Object.prototype.hasOwnProperty,G=(e,t)=>Fl.call(e,t),j=Array.isArray,qt=e=>Tn(e)==="[object Map]",rs=e=>Tn(e)==="[object Set]",Mr=e=>Tn(e)==="[object Date]",q=e=>typeof e=="function",fe=e=>typeof e=="string",tt=e=>typeof e=="symbol",re=e=>e!==null&&typeof e=="object",Vo=e=>(re(e)||q(e))&&q(e.then)&&q(e.catch),Ko=Object.prototype.toString,Tn=e=>Ko.call(e),jl=e=>Tn(e).slice(8,-1),zo=e=>Tn(e)==="[object Object]",ur=e=>fe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,fn=lr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),os=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Hl=/-(\w)/g,ke=os(e=>e.replace(Hl,(t,n)=>n?n.toUpperCase():"")),$l=/\B([A-Z])/g,Lt=os(e=>e.replace($l,"-$1").toLowerCase()),is=os(e=>e.charAt(0).toUpperCase()+e.slice(1)),Rs=os(e=>e?`on${is(e)}`:""),bt=(e,t)=>!Object.is(e,t),kn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Kn=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Lr;const ls=()=>Lr||(Lr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function fr(e){if(j(e)){const t={};for(let n=0;n{if(n){const s=n.split(Vl);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Qt(e){let t="";if(fe(e))t=e;else if(j(e))for(let n=0;ncs(n,t))}const Jo=e=>!!(e&&e.__v_isRef===!0),pe=e=>fe(e)?e:e==null?"":j(e)||re(e)&&(e.toString===Ko||!q(e.toString))?Jo(e)?pe(e.value):JSON.stringify(e,Go,2):String(e),Go=(e,t)=>Jo(t)?Go(e,t.value):qt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[As(s,o)+" =>"]=r,n),{})}:rs(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>As(n))}:tt(t)?As(t):re(t)&&!j(t)&&!zo(t)?String(t):t,As=(e,t="")=>{var n;return tt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Pe;class Xl{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Pe,!t&&Pe&&(this.index=(Pe.scopes||(Pe.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0)return;if(pn){let t=pn;for(pn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;dn;){let t=dn;for(dn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function ei(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ti(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),hr(s),Zl(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Hs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ni(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ni(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===_n))return;e.globalVersion=_n;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Hs(e)){e.flags&=-3;return}const n=se,s=je;se=e,je=!0;try{ei(e);const r=e.fn(e._value);(t.version===0||bt(r,e._value))&&(e._value=r,t.version++)}catch(r){throw t.version++,r}finally{se=n,je=s,ti(e),e.flags&=-3}}function hr(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)hr(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Zl(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let je=!0;const si=[];function _t(){si.push(je),je=!1}function wt(){const e=si.pop();je=e===void 0?!0:e}function Dr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=se;se=void 0;try{t()}finally{se=n}}}let _n=0;class ec{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class mr{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!se||!je||se===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==se)n=this.activeLink=new ec(se,this),se.deps?(n.prevDep=se.depsTail,se.depsTail.nextDep=n,se.depsTail=n):se.deps=se.depsTail=n,ri(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=se.depsTail,n.nextDep=void 0,se.depsTail.nextDep=n,se.depsTail=n,se.deps===n&&(se.deps=s)}return n}trigger(t){this.version++,_n++,this.notify(t)}notify(t){dr();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{pr()}}}function ri(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)ri(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const $s=new WeakMap,Tt=Symbol(""),qs=Symbol(""),wn=Symbol("");function he(e,t,n){if(je&&se){let s=$s.get(e);s||$s.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new mr),r.map=s,r.key=n),r.track()}}function lt(e,t,n,s,r,o){const i=$s.get(e);if(!i){_n++;return}const l=c=>{c&&c.trigger()};if(dr(),t==="clear")i.forEach(l);else{const c=j(e),a=c&&ur(n);if(c&&n==="length"){const u=Number(s);i.forEach((f,h)=>{(h==="length"||h===wn||!tt(h)&&h>=u)&&l(f)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),a&&l(i.get(wn)),t){case"add":c?a&&l(i.get("length")):(l(i.get(Tt)),qt(e)&&l(i.get(qs)));break;case"delete":c||(l(i.get(Tt)),qt(e)&&l(i.get(qs)));break;case"set":qt(e)&&l(i.get(Tt));break}}pr()}function kt(e){const t=J(e);return t===e?t:(he(t,"iterate",wn),Be(e)?t:t.map(me))}function as(e){return he(e=J(e),"iterate",wn),e}const tc={__proto__:null,[Symbol.iterator](){return Os(this,Symbol.iterator,me)},concat(...e){return kt(this).concat(...e.map(t=>j(t)?kt(t):t))},entries(){return Os(this,"entries",e=>(e[1]=me(e[1]),e))},every(e,t){return rt(this,"every",e,t,void 0,arguments)},filter(e,t){return rt(this,"filter",e,t,n=>n.map(me),arguments)},find(e,t){return rt(this,"find",e,t,me,arguments)},findIndex(e,t){return rt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return rt(this,"findLast",e,t,me,arguments)},findLastIndex(e,t){return rt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return rt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ts(this,"includes",e)},indexOf(...e){return Ts(this,"indexOf",e)},join(e){return kt(this).join(e)},lastIndexOf(...e){return Ts(this,"lastIndexOf",e)},map(e,t){return rt(this,"map",e,t,void 0,arguments)},pop(){return on(this,"pop")},push(...e){return on(this,"push",e)},reduce(e,...t){return Ur(this,"reduce",e,t)},reduceRight(e,...t){return Ur(this,"reduceRight",e,t)},shift(){return on(this,"shift")},some(e,t){return rt(this,"some",e,t,void 0,arguments)},splice(...e){return on(this,"splice",e)},toReversed(){return kt(this).toReversed()},toSorted(e){return kt(this).toSorted(e)},toSpliced(...e){return kt(this).toSpliced(...e)},unshift(...e){return on(this,"unshift",e)},values(){return Os(this,"values",me)}};function Os(e,t,n){const s=as(e),r=s[t]();return s!==e&&!Be(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.value&&(o.value=n(o.value)),o}),r}const nc=Array.prototype;function rt(e,t,n,s,r,o){const i=as(e),l=i!==e&&!Be(e),c=i[t];if(c!==nc[t]){const f=c.apply(e,o);return l?me(f):f}let a=n;i!==e&&(l?a=function(f,h){return n.call(this,me(f),h,e)}:n.length>2&&(a=function(f,h){return n.call(this,f,h,e)}));const u=c.call(i,a,s);return l&&r?r(u):u}function Ur(e,t,n,s){const r=as(e);let o=n;return r!==e&&(Be(e)?n.length>3&&(o=function(i,l,c){return n.call(this,i,l,c,e)}):o=function(i,l,c){return n.call(this,i,me(l),c,e)}),r[t](o,...s)}function Ts(e,t,n){const s=J(e);he(s,"iterate",wn);const r=s[t](...n);return(r===-1||r===!1)&&br(n[0])?(n[0]=J(n[0]),s[t](...n)):r}function on(e,t,n=[]){_t(),dr();const s=J(e)[t].apply(e,n);return pr(),wt(),s}const sc=lr("__proto__,__v_isRef,__isVue"),oi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(tt));function rc(e){tt(e)||(e=String(e));const t=J(this);return he(t,"has",e),t.hasOwnProperty(e)}class ii{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?hc:ui:o?ai:ci).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=j(t);if(!r){let c;if(i&&(c=tc[n]))return c;if(n==="hasOwnProperty")return rc}const l=Reflect.get(t,n,be(t)?t:s);return(tt(n)?oi.has(n):sc(n))||(r||he(t,"get",n),o)?l:be(l)?i&&ur(n)?l:l.value:re(l)?r?di(l):us(l):l}}class li extends ii{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];if(!this._isShallow){const c=It(o);if(!Be(s)&&!It(s)&&(o=J(o),s=J(s)),!j(t)&&be(o)&&!be(s))return c?!1:(o.value=s,!0)}const i=j(t)&&ur(n)?Number(n)e,Ln=e=>Reflect.getPrototypeOf(e);function ac(e,t,n){return function(...s){const r=this.__v_raw,o=J(r),i=qt(o),l=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,a=r[e](...s),u=n?Vs:t?Ks:me;return!t&&he(o,"iterate",c?qs:Tt),{next(){const{value:f,done:h}=a.next();return h?{value:f,done:h}:{value:l?[u(f[0]),u(f[1])]:u(f),done:h}},[Symbol.iterator](){return this}}}}function Dn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function uc(e,t){const n={get(r){const o=this.__v_raw,i=J(o),l=J(r);e||(bt(r,l)&&he(i,"get",r),he(i,"get",l));const{has:c}=Ln(i),a=t?Vs:e?Ks:me;if(c.call(i,r))return a(o.get(r));if(c.call(i,l))return a(o.get(l));o!==i&&o.get(r)},get size(){const r=this.__v_raw;return!e&&he(J(r),"iterate",Tt),Reflect.get(r,"size",r)},has(r){const o=this.__v_raw,i=J(o),l=J(r);return e||(bt(r,l)&&he(i,"has",r),he(i,"has",l)),r===l?o.has(r):o.has(r)||o.has(l)},forEach(r,o){const i=this,l=i.__v_raw,c=J(l),a=t?Vs:e?Ks:me;return!e&&he(c,"iterate",Tt),l.forEach((u,f)=>r.call(o,a(u),a(f),i))}};return ve(n,e?{add:Dn("add"),set:Dn("set"),delete:Dn("delete"),clear:Dn("clear")}:{add(r){!t&&!Be(r)&&!It(r)&&(r=J(r));const o=J(this);return Ln(o).has.call(o,r)||(o.add(r),lt(o,"add",r,r)),this},set(r,o){!t&&!Be(o)&&!It(o)&&(o=J(o));const i=J(this),{has:l,get:c}=Ln(i);let a=l.call(i,r);a||(r=J(r),a=l.call(i,r));const u=c.call(i,r);return i.set(r,o),a?bt(o,u)&<(i,"set",r,o):lt(i,"add",r,o),this},delete(r){const o=J(this),{has:i,get:l}=Ln(o);let c=i.call(o,r);c||(r=J(r),c=i.call(o,r)),l&&l.call(o,r);const a=o.delete(r);return c&<(o,"delete",r,void 0),a},clear(){const r=J(this),o=r.size!==0,i=r.clear();return o&<(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=ac(r,e,t)}),n}function gr(e,t){const n=uc(e,t);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(G(n,r)&&r in s?n:s,r,o)}const fc={get:gr(!1,!1)},dc={get:gr(!1,!0)},pc={get:gr(!0,!1)};const ci=new WeakMap,ai=new WeakMap,ui=new WeakMap,hc=new WeakMap;function mc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function gc(e){return e.__v_skip||!Object.isExtensible(e)?0:mc(jl(e))}function us(e){return It(e)?e:yr(e,!1,ic,fc,ci)}function fi(e){return yr(e,!1,cc,dc,ai)}function di(e){return yr(e,!0,lc,pc,ui)}function yr(e,t,n,s,r){if(!re(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const i=gc(e);if(i===0)return e;const l=new Proxy(e,i===2?s:n);return r.set(e,l),l}function Vt(e){return It(e)?Vt(e.__v_raw):!!(e&&e.__v_isReactive)}function It(e){return!!(e&&e.__v_isReadonly)}function Be(e){return!!(e&&e.__v_isShallow)}function br(e){return e?!!e.__v_raw:!1}function J(e){const t=e&&e.__v_raw;return t?J(t):e}function yc(e){return!G(e,"__v_skip")&&Object.isExtensible(e)&&Wo(e,"__v_skip",!0),e}const me=e=>re(e)?us(e):e,Ks=e=>re(e)?di(e):e;function be(e){return e?e.__v_isRef===!0:!1}function ie(e){return pi(e,!1)}function bc(e){return pi(e,!0)}function pi(e,t){return be(e)?e:new vc(e,t)}class vc{constructor(t,n){this.dep=new mr,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:J(t),this._value=n?t:me(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Be(t)||It(t);t=s?t:J(t),bt(t,n)&&(this._rawValue=t,this._value=s?t:me(t),this.dep.trigger())}}function Ct(e){return be(e)?e.value:e}const _c={get:(e,t,n)=>t==="__v_raw"?e:Ct(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return be(r)&&!be(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function hi(e){return Vt(e)?e:new Proxy(e,_c)}class wc{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new mr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=_n-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&se!==this)return Zo(this,!0),!0}get value(){const t=this.dep.track();return ni(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Sc(e,t,n=!1){let s,r;return q(e)?s=e:(s=e.get,r=e.set),new wc(s,r,n)}const Un={},zn=new WeakMap;let At;function Ec(e,t=!1,n=At){if(n){let s=zn.get(n);s||zn.set(n,s=[]),s.push(e)}}function Rc(e,t,n=ee){const{immediate:s,deep:r,once:o,scheduler:i,augmentJob:l,call:c}=n,a=P=>r?P:Be(P)||r===!1||r===0?ct(P,1):ct(P);let u,f,h,g,w=!1,v=!1;if(be(e)?(f=()=>e.value,w=Be(e)):Vt(e)?(f=()=>a(e),w=!0):j(e)?(v=!0,w=e.some(P=>Vt(P)||Be(P)),f=()=>e.map(P=>{if(be(P))return P.value;if(Vt(P))return a(P);if(q(P))return c?c(P,2):P()})):q(e)?t?f=c?()=>c(e,2):e:f=()=>{if(h){_t();try{h()}finally{wt()}}const P=At;At=u;try{return c?c(e,3,[g]):e(g)}finally{At=P}}:f=et,t&&r){const P=f,H=r===!0?1/0:r;f=()=>ct(P(),H)}const y=Yl(),b=()=>{u.stop(),y&&y.active&&ar(y.effects,u)};if(o&&t){const P=t;t=(...H)=>{P(...H),b()}}let S=v?new Array(e.length).fill(Un):Un;const R=P=>{if(!(!(u.flags&1)||!u.dirty&&!P))if(t){const H=u.run();if(r||w||(v?H.some((te,z)=>bt(te,S[z])):bt(H,S))){h&&h();const te=At;At=u;try{const z=[H,S===Un?void 0:v&&S[0]===Un?[]:S,g];c?c(t,3,z):t(...z),S=H}finally{At=te}}}else u.run()};return l&&l(R),u=new Xo(f),u.scheduler=i?()=>i(R,!1):R,g=P=>Ec(P,!1,u),h=u.onStop=()=>{const P=zn.get(u);if(P){if(c)c(P,4);else for(const H of P)H();zn.delete(u)}},t?s?R(!0):S=u.run():i?i(R.bind(null,!0),!0):u.run(),b.pause=u.pause.bind(u),b.resume=u.resume.bind(u),b.stop=b,b}function ct(e,t=1/0,n){if(t<=0||!re(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,be(e))ct(e.value,t,n);else if(j(e))for(let s=0;s{ct(s,t,n)});else if(zo(e)){for(const s in e)ct(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&ct(e[s],t,n)}return e}/** +* @vue/runtime-core v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Cn(e,t,n,s){try{return s?e(...s):e()}catch(r){fs(r,t,n)}}function nt(e,t,n,s){if(q(e)){const r=Cn(e,t,n,s);return r&&Vo(r)&&r.catch(o=>{fs(o,t,n)}),r}if(j(e)){const r=[];for(let o=0;o>>1,r=Se[s],o=Sn(r);o=Sn(n)?Se.push(e):Se.splice(xc(t),0,e),e.flags|=1,gi()}}function gi(){Wn||(Wn=mi.then(bi))}function Oc(e){j(e)?Kt.push(...e):mt&&e.id===-1?mt.splice(Ft+1,0,e):e.flags&1||(Kt.push(e),e.flags|=1),gi()}function Br(e,t,n=Ye+1){for(;nSn(n)-Sn(s));if(Kt.length=0,mt){mt.push(...t);return}for(mt=t,Ft=0;Fte.id==null?e.flags&2?-1:1/0:e.id;function bi(e){try{for(Ye=0;Ye{s._d&&Wr(-1);const o=Qn(t);let i;try{i=e(...r)}finally{Qn(o),s._d&&Wr(1)}return i};return s._n=!0,s._c=!0,s._d=!0,s}function De(e,t){if(Ie===null)return e;const n=ms(Ie),s=e.dirs||(e.dirs=[]);for(let r=0;re.__isTeleport;function wr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,wr(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}/*! #__NO_SIDE_EFFECTS__ */function _i(e,t){return q(e)?ve({name:e.name},t,{setup:e}):e}function wi(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Jn(e,t,n,s,r=!1){if(j(e)){e.forEach((w,v)=>Jn(w,t&&(j(t)?t[v]:t),n,s,r));return}if(hn(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Jn(e,t,n,s.component.subTree);return}const o=s.shapeFlag&4?ms(s.component):s.el,i=r?null:o,{i:l,r:c}=e,a=t&&t.r,u=l.refs===ee?l.refs={}:l.refs,f=l.setupState,h=J(f),g=f===ee?()=>!1:w=>G(h,w);if(a!=null&&a!==c&&(fe(a)?(u[a]=null,g(a)&&(f[a]=null)):be(a)&&(a.value=null)),q(c))Cn(c,l,12,[i,u]);else{const w=fe(c),v=be(c);if(w||v){const y=()=>{if(e.f){const b=w?g(c)?f[c]:u[c]:c.value;r?j(b)&&ar(b,o):j(b)?b.includes(o)||b.push(o):w?(u[c]=[o],g(c)&&(f[c]=u[c])):(c.value=[o],e.k&&(u[e.k]=c.value))}else w?(u[c]=i,g(c)&&(f[c]=i)):v&&(c.value=i,e.k&&(u[e.k]=i))};i?(y.id=-1,Ce(y,n)):y()}}}ls().requestIdleCallback;ls().cancelIdleCallback;const hn=e=>!!e.type.__asyncLoader,Si=e=>e.type.__isKeepAlive;function Pc(e,t){Ei(e,"a",t)}function Ic(e,t){Ei(e,"da",t)}function Ei(e,t,n=ge){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(ds(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Si(r.parent.vnode)&&Nc(s,t,n,r),r=r.parent}}function Nc(e,t,n,s){const r=ds(t,e,s,!0);Ri(()=>{ar(s[t],r)},n)}function ds(e,t,n=ge,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{_t();const l=Pn(n),c=nt(t,n,e,i);return l(),wt(),c});return s?r.unshift(o):r.push(o),o}}const ut=e=>(t,n=ge)=>{(!Rn||e==="sp")&&ds(e,(...s)=>t(...s),n)},Mc=ut("bm"),Sr=ut("m"),Lc=ut("bu"),Dc=ut("u"),Uc=ut("bum"),Ri=ut("um"),Bc=ut("sp"),kc=ut("rtg"),Fc=ut("rtc");function jc(e,t=ge){ds("ec",e,t)}const Hc="components";function Gt(e,t){return qc(Hc,e,!0,t)||e}const $c=Symbol.for("v-ndc");function qc(e,t,n=!0,s=!1){const r=Ie||ge;if(r){const o=r.type;{const l=Ca(o,!1);if(l&&(l===t||l===ke(t)||l===is(ke(t))))return o}const i=kr(r[e]||o[e],t)||kr(r.appContext[e],t);return!i&&s?o:i}}function kr(e,t){return e&&(e[t]||e[ke(t)]||e[is(ke(t))])}function jt(e,t,n,s){let r;const o=n,i=j(e);if(i||fe(e)){const l=i&&Vt(e);let c=!1;l&&(c=!Be(e),e=as(e)),r=new Array(e.length);for(let a=0,u=e.length;at(l,c,void 0,o));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,a=l.length;ce?zi(e)?ms(e):zs(e.parent):null,mn=ve(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>zs(e.parent),$root:e=>zs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>xi(e),$forceUpdate:e=>e.f||(e.f=()=>{_r(e.update)}),$nextTick:e=>e.n||(e.n=vr.bind(e.proxy)),$watch:e=>ua.bind(e)}),Cs=(e,t)=>e!==ee&&!e.__isScriptSetup&&G(e,t),Vc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:l,appContext:c}=e;let a;if(t[0]!=="$"){const g=i[t];if(g!==void 0)switch(g){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(Cs(s,t))return i[t]=1,s[t];if(r!==ee&&G(r,t))return i[t]=2,r[t];if((a=e.propsOptions[0])&&G(a,t))return i[t]=3,o[t];if(n!==ee&&G(n,t))return i[t]=4,n[t];Ws&&(i[t]=0)}}const u=mn[t];let f,h;if(u)return t==="$attrs"&&he(e.attrs,"get",""),u(e);if((f=l.__cssModules)&&(f=f[t]))return f;if(n!==ee&&G(n,t))return i[t]=4,n[t];if(h=c.config.globalProperties,G(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return Cs(r,t)?(r[t]=n,!0):s!==ee&&G(s,t)?(s[t]=n,!0):G(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:o}},i){let l;return!!n[i]||e!==ee&&G(e,i)||Cs(t,i)||(l=o[0])&&G(l,i)||G(s,i)||G(mn,i)||G(r.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:G(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Fr(e){return j(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ws=!0;function Kc(e){const t=xi(e),n=e.proxy,s=e.ctx;Ws=!1,t.beforeCreate&&jr(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:c,inject:a,created:u,beforeMount:f,mounted:h,beforeUpdate:g,updated:w,activated:v,deactivated:y,beforeDestroy:b,beforeUnmount:S,destroyed:R,unmounted:P,render:H,renderTracked:te,renderTriggered:z,errorCaptured:_e,serverPrefetch:Fe,expose:Ve,inheritAttrs:dt,components:St,directives:Ke,filters:sn}=t;if(a&&zc(a,s,null),i)for(const Y in i){const W=i[Y];q(W)&&(s[Y]=W.bind(n))}if(r){const Y=r.call(n,n);re(Y)&&(e.data=us(Y))}if(Ws=!0,o)for(const Y in o){const W=o[Y],st=q(W)?W.bind(n,n):q(W.get)?W.get.bind(n,n):et,pt=!q(W)&&q(W.set)?W.set.bind(n):et,ze=Ue({get:st,set:pt});Object.defineProperty(s,Y,{enumerable:!0,configurable:!0,get:()=>ze.value,set:Re=>ze.value=Re})}if(l)for(const Y in l)Ai(l[Y],s,n,Y);if(c){const Y=q(c)?c.call(n):c;Reflect.ownKeys(Y).forEach(W=>{Fn(W,Y[W])})}u&&jr(u,e,"c");function de(Y,W){j(W)?W.forEach(st=>Y(st.bind(n))):W&&Y(W.bind(n))}if(de(Mc,f),de(Sr,h),de(Lc,g),de(Dc,w),de(Pc,v),de(Ic,y),de(jc,_e),de(Fc,te),de(kc,z),de(Uc,S),de(Ri,P),de(Bc,Fe),j(Ve))if(Ve.length){const Y=e.exposed||(e.exposed={});Ve.forEach(W=>{Object.defineProperty(Y,W,{get:()=>n[W],set:st=>n[W]=st})})}else e.exposed||(e.exposed={});H&&e.render===et&&(e.render=H),dt!=null&&(e.inheritAttrs=dt),St&&(e.components=St),Ke&&(e.directives=Ke),Fe&&wi(e)}function zc(e,t,n=et){j(e)&&(e=Qs(e));for(const s in e){const r=e[s];let o;re(r)?"default"in r?o=He(r.from||s,r.default,!0):o=He(r.from||s):o=He(r),be(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[s]=o}}function jr(e,t,n){nt(j(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ai(e,t,n,s){let r=s.includes(".")?ji(n,s):()=>n[s];if(fe(e)){const o=t[e];q(o)&&gn(r,o)}else if(q(e))gn(r,e.bind(n));else if(re(e))if(j(e))e.forEach(o=>Ai(o,t,n,s));else{const o=q(e.handler)?e.handler.bind(n):t[e.handler];q(o)&&gn(r,o,e)}}function xi(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(a=>Gn(c,a,i,!0)),Gn(c,t,i)),re(t)&&o.set(t,c),c}function Gn(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&Gn(e,o,n,!0),r&&r.forEach(i=>Gn(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=Wc[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Wc={data:Hr,props:$r,emits:$r,methods:un,computed:un,beforeCreate:we,created:we,beforeMount:we,mounted:we,beforeUpdate:we,updated:we,beforeDestroy:we,beforeUnmount:we,destroyed:we,unmounted:we,activated:we,deactivated:we,errorCaptured:we,serverPrefetch:we,components:un,directives:un,watch:Jc,provide:Hr,inject:Qc};function Hr(e,t){return t?e?function(){return ve(q(e)?e.call(this,this):e,q(t)?t.call(this,this):t)}:t:e}function Qc(e,t){return un(Qs(e),Qs(t))}function Qs(e){if(j(e)){const t={};for(let n=0;n1)return n&&q(t)?t.call(s&&s.proxy):t}}const Ti={},Ci=()=>Object.create(Ti),Pi=e=>Object.getPrototypeOf(e)===Ti;function Yc(e,t,n,s=!1){const r={},o=Ci();e.propsDefaults=Object.create(null),Ii(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:fi(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function Zc(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=J(r),[c]=e.propsOptions;let a=!1;if((s||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let f=0;f{c=!0;const[h,g]=Ni(f,t,!0);ve(i,h),g&&l.push(...g)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!c)return re(e)&&s.set(e,$t),$t;if(j(o))for(let u=0;ue[0]==="_"||e==="$stable",Er=e=>j(e)?e.map(Ze):[Ze(e)],ta=(e,t,n)=>{if(t._n)return t;const s=Jt((...r)=>Er(t(...r)),n);return s._c=!1,s},Li=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Mi(r))continue;const o=e[r];if(q(o))t[r]=ta(r,o,s);else if(o!=null){const i=Er(o);t[r]=()=>i}}},Di=(e,t)=>{const n=Er(t);e.slots.default=()=>n},Ui=(e,t,n)=>{for(const s in t)(n||s!=="_")&&(e[s]=t[s])},na=(e,t,n)=>{const s=e.slots=Ci();if(e.vnode.shapeFlag&32){const r=t._;r?(Ui(s,t,n),n&&Wo(s,"_",r,!0)):Li(t,s)}else t&&Di(e,t)},sa=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=ee;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:Ui(r,t,n):(o=!t.$stable,Li(t,r)),i=t}else t&&(Di(e,t),i={default:1});if(o)for(const l in r)!Mi(l)&&i[l]==null&&delete r[l]},Ce=ya;function ra(e){return oa(e)}function oa(e,t){const n=ls();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:l,createComment:c,setText:a,setElementText:u,parentNode:f,nextSibling:h,setScopeId:g=et,insertStaticContent:w}=e,v=(d,p,m,A=null,T=null,O=null,M=void 0,N=null,I=!!p.dynamicChildren)=>{if(d===p)return;d&&!ln(d,p)&&(A=x(d),Re(d,T,O,!0),d=null),p.patchFlag===-2&&(I=!1,p.dynamicChildren=null);const{type:C,ref:F,shapeFlag:D}=p;switch(C){case hs:y(d,p,m,A);break;case Nt:b(d,p,m,A);break;case Is:d==null&&S(p,m,A,M);break;case Ee:St(d,p,m,A,T,O,M,N,I);break;default:D&1?H(d,p,m,A,T,O,M,N,I):D&6?Ke(d,p,m,A,T,O,M,N,I):(D&64||D&128)&&C.process(d,p,m,A,T,O,M,N,I,B)}F!=null&&T&&Jn(F,d&&d.ref,O,p||d,!p)},y=(d,p,m,A)=>{if(d==null)s(p.el=l(p.children),m,A);else{const T=p.el=d.el;p.children!==d.children&&a(T,p.children)}},b=(d,p,m,A)=>{d==null?s(p.el=c(p.children||""),m,A):p.el=d.el},S=(d,p,m,A)=>{[d.el,d.anchor]=w(d.children,p,m,A,d.el,d.anchor)},R=({el:d,anchor:p},m,A)=>{let T;for(;d&&d!==p;)T=h(d),s(d,m,A),d=T;s(p,m,A)},P=({el:d,anchor:p})=>{let m;for(;d&&d!==p;)m=h(d),r(d),d=m;r(p)},H=(d,p,m,A,T,O,M,N,I)=>{p.type==="svg"?M="svg":p.type==="math"&&(M="mathml"),d==null?te(p,m,A,T,O,M,N,I):Fe(d,p,T,O,M,N,I)},te=(d,p,m,A,T,O,M,N)=>{let I,C;const{props:F,shapeFlag:D,transition:k,dirs:$}=d;if(I=d.el=i(d.type,O,F&&F.is,F),D&8?u(I,d.children):D&16&&_e(d.children,I,null,A,T,Ps(d,O),M,N),$&&Et(d,null,A,"created"),z(I,d,d.scopeId,M,A),F){for(const ne in F)ne!=="value"&&!fn(ne)&&o(I,ne,null,F[ne],O,A);"value"in F&&o(I,"value",null,F.value,O),(C=F.onVnodeBeforeMount)&&Ge(C,A,d)}$&&Et(d,null,A,"beforeMount");const K=ia(T,k);K&&k.beforeEnter(I),s(I,p,m),((C=F&&F.onVnodeMounted)||K||$)&&Ce(()=>{C&&Ge(C,A,d),K&&k.enter(I),$&&Et(d,null,A,"mounted")},T)},z=(d,p,m,A,T)=>{if(m&&g(d,m),A)for(let O=0;O{for(let C=I;C{const N=p.el=d.el;let{patchFlag:I,dynamicChildren:C,dirs:F}=p;I|=d.patchFlag&16;const D=d.props||ee,k=p.props||ee;let $;if(m&&Rt(m,!1),($=k.onVnodeBeforeUpdate)&&Ge($,m,p,d),F&&Et(p,d,m,"beforeUpdate"),m&&Rt(m,!0),(D.innerHTML&&k.innerHTML==null||D.textContent&&k.textContent==null)&&u(N,""),C?Ve(d.dynamicChildren,C,N,m,A,Ps(p,T),O):M||W(d,p,N,null,m,A,Ps(p,T),O,!1),I>0){if(I&16)dt(N,D,k,m,T);else if(I&2&&D.class!==k.class&&o(N,"class",null,k.class,T),I&4&&o(N,"style",D.style,k.style,T),I&8){const K=p.dynamicProps;for(let ne=0;ne{$&&Ge($,m,p,d),F&&Et(p,d,m,"updated")},A)},Ve=(d,p,m,A,T,O,M)=>{for(let N=0;N{if(p!==m){if(p!==ee)for(const O in p)!fn(O)&&!(O in m)&&o(d,O,p[O],null,T,A);for(const O in m){if(fn(O))continue;const M=m[O],N=p[O];M!==N&&O!=="value"&&o(d,O,N,M,T,A)}"value"in m&&o(d,"value",p.value,m.value,T)}},St=(d,p,m,A,T,O,M,N,I)=>{const C=p.el=d?d.el:l(""),F=p.anchor=d?d.anchor:l("");let{patchFlag:D,dynamicChildren:k,slotScopeIds:$}=p;$&&(N=N?N.concat($):$),d==null?(s(C,m,A),s(F,m,A),_e(p.children||[],m,F,T,O,M,N,I)):D>0&&D&64&&k&&d.dynamicChildren?(Ve(d.dynamicChildren,k,m,T,O,M,N),(p.key!=null||T&&p===T.subTree)&&Bi(d,p,!0)):W(d,p,m,F,T,O,M,N,I)},Ke=(d,p,m,A,T,O,M,N,I)=>{p.slotScopeIds=N,d==null?p.shapeFlag&512?T.ctx.activate(p,m,A,M,I):sn(p,m,A,T,O,M,I):Dt(d,p,I)},sn=(d,p,m,A,T,O,M)=>{const N=d.component=Ra(d,A,T);if(Si(d)&&(N.ctx.renderer=B),Aa(N,!1,M),N.asyncDep){if(T&&T.registerDep(N,de,M),!d.el){const I=N.subTree=le(Nt);b(null,I,p,m)}}else de(N,d,p,m,T,O,M)},Dt=(d,p,m)=>{const A=p.component=d.component;if(ma(d,p,m))if(A.asyncDep&&!A.asyncResolved){Y(A,p,m);return}else A.next=p,A.update();else p.el=d.el,A.vnode=p},de=(d,p,m,A,T,O,M)=>{const N=()=>{if(d.isMounted){let{next:D,bu:k,u:$,parent:K,vnode:ne}=d;{const Qe=ki(d);if(Qe){D&&(D.el=ne.el,Y(d,D,M)),Qe.asyncDep.then(()=>{d.isUnmounted||N()});return}}let X=D,Oe;Rt(d,!1),D?(D.el=ne.el,Y(d,D,M)):D=ne,k&&kn(k),(Oe=D.props&&D.props.onVnodeBeforeUpdate)&&Ge(Oe,K,D,ne),Rt(d,!0);const Ae=Kr(d),We=d.subTree;d.subTree=Ae,v(We,Ae,f(We.el),x(We),d,T,O),D.el=Ae.el,X===null&&ga(d,Ae.el),$&&Ce($,T),(Oe=D.props&&D.props.onVnodeUpdated)&&Ce(()=>Ge(Oe,K,D,ne),T)}else{let D;const{el:k,props:$}=p,{bm:K,m:ne,parent:X,root:Oe,type:Ae}=d,We=hn(p);Rt(d,!1),K&&kn(K),!We&&(D=$&&$.onVnodeBeforeMount)&&Ge(D,X,p),Rt(d,!0);{Oe.ce&&Oe.ce._injectChildStyle(Ae);const Qe=d.subTree=Kr(d);v(null,Qe,m,A,d,T,O),p.el=Qe.el}if(ne&&Ce(ne,T),!We&&(D=$&&$.onVnodeMounted)){const Qe=p;Ce(()=>Ge(D,X,Qe),T)}(p.shapeFlag&256||X&&hn(X.vnode)&&X.vnode.shapeFlag&256)&&d.a&&Ce(d.a,T),d.isMounted=!0,p=m=A=null}};d.scope.on();const I=d.effect=new Xo(N);d.scope.off();const C=d.update=I.run.bind(I),F=d.job=I.runIfDirty.bind(I);F.i=d,F.id=d.uid,I.scheduler=()=>_r(F),Rt(d,!0),C()},Y=(d,p,m)=>{p.component=d;const A=d.vnode.props;d.vnode=p,d.next=null,Zc(d,p.props,A,m),sa(d,p.children,m),_t(),Br(d),wt()},W=(d,p,m,A,T,O,M,N,I=!1)=>{const C=d&&d.children,F=d?d.shapeFlag:0,D=p.children,{patchFlag:k,shapeFlag:$}=p;if(k>0){if(k&128){pt(C,D,m,A,T,O,M,N,I);return}else if(k&256){st(C,D,m,A,T,O,M,N,I);return}}$&8?(F&16&&Le(C,T,O),D!==C&&u(m,D)):F&16?$&16?pt(C,D,m,A,T,O,M,N,I):Le(C,T,O,!0):(F&8&&u(m,""),$&16&&_e(D,m,A,T,O,M,N,I))},st=(d,p,m,A,T,O,M,N,I)=>{d=d||$t,p=p||$t;const C=d.length,F=p.length,D=Math.min(C,F);let k;for(k=0;kF?Le(d,T,O,!0,!1,D):_e(p,m,A,T,O,M,N,I,D)},pt=(d,p,m,A,T,O,M,N,I)=>{let C=0;const F=p.length;let D=d.length-1,k=F-1;for(;C<=D&&C<=k;){const $=d[C],K=p[C]=I?gt(p[C]):Ze(p[C]);if(ln($,K))v($,K,m,null,T,O,M,N,I);else break;C++}for(;C<=D&&C<=k;){const $=d[D],K=p[k]=I?gt(p[k]):Ze(p[k]);if(ln($,K))v($,K,m,null,T,O,M,N,I);else break;D--,k--}if(C>D){if(C<=k){const $=k+1,K=$k)for(;C<=D;)Re(d[C],T,O,!0),C++;else{const $=C,K=C,ne=new Map;for(C=K;C<=k;C++){const Te=p[C]=I?gt(p[C]):Ze(p[C]);Te.key!=null&&ne.set(Te.key,C)}let X,Oe=0;const Ae=k-K+1;let We=!1,Qe=0;const rn=new Array(Ae);for(C=0;C=Ae){Re(Te,T,O,!0);continue}let Je;if(Te.key!=null)Je=ne.get(Te.key);else for(X=K;X<=k;X++)if(rn[X-K]===0&&ln(Te,p[X])){Je=X;break}Je===void 0?Re(Te,T,O,!0):(rn[Je-K]=C+1,Je>=Qe?Qe=Je:We=!0,v(Te,p[Je],m,null,T,O,M,N,I),Oe++)}const Ir=We?la(rn):$t;for(X=Ir.length-1,C=Ae-1;C>=0;C--){const Te=K+C,Je=p[Te],Nr=Te+1{const{el:O,type:M,transition:N,children:I,shapeFlag:C}=d;if(C&6){ze(d.component.subTree,p,m,A);return}if(C&128){d.suspense.move(p,m,A);return}if(C&64){M.move(d,p,m,B);return}if(M===Ee){s(O,p,m);for(let D=0;DN.enter(O),T);else{const{leave:D,delayLeave:k,afterLeave:$}=N,K=()=>s(O,p,m),ne=()=>{D(O,()=>{K(),$&&$()})};k?k(O,K,ne):ne()}else s(O,p,m)},Re=(d,p,m,A=!1,T=!1)=>{const{type:O,props:M,ref:N,children:I,dynamicChildren:C,shapeFlag:F,patchFlag:D,dirs:k,cacheIndex:$}=d;if(D===-2&&(T=!1),N!=null&&Jn(N,null,m,d,!0),$!=null&&(p.renderCache[$]=void 0),F&256){p.ctx.deactivate(d);return}const K=F&1&&k,ne=!hn(d);let X;if(ne&&(X=M&&M.onVnodeBeforeUnmount)&&Ge(X,p,d),F&6)Mn(d.component,m,A);else{if(F&128){d.suspense.unmount(m,A);return}K&&Et(d,null,p,"beforeUnmount"),F&64?d.type.remove(d,p,m,B,A):C&&!C.hasOnce&&(O!==Ee||D>0&&D&64)?Le(C,p,m,!1,!0):(O===Ee&&D&384||!T&&F&16)&&Le(I,p,m),A&&Ut(d)}(ne&&(X=M&&M.onVnodeUnmounted)||K)&&Ce(()=>{X&&Ge(X,p,d),K&&Et(d,null,p,"unmounted")},m)},Ut=d=>{const{type:p,el:m,anchor:A,transition:T}=d;if(p===Ee){Bt(m,A);return}if(p===Is){P(d);return}const O=()=>{r(m),T&&!T.persisted&&T.afterLeave&&T.afterLeave()};if(d.shapeFlag&1&&T&&!T.persisted){const{leave:M,delayLeave:N}=T,I=()=>M(m,O);N?N(d.el,O,I):I()}else O()},Bt=(d,p)=>{let m;for(;d!==p;)m=h(d),r(d),d=m;r(p)},Mn=(d,p,m)=>{const{bum:A,scope:T,job:O,subTree:M,um:N,m:I,a:C}=d;Vr(I),Vr(C),A&&kn(A),T.stop(),O&&(O.flags|=8,Re(M,d,p,m)),N&&Ce(N,p),Ce(()=>{d.isUnmounted=!0},p),p&&p.pendingBranch&&!p.isUnmounted&&d.asyncDep&&!d.asyncResolved&&d.suspenseId===p.pendingId&&(p.deps--,p.deps===0&&p.resolve())},Le=(d,p,m,A=!1,T=!1,O=0)=>{for(let M=O;M{if(d.shapeFlag&6)return x(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const p=h(d.anchor||d.el),m=p&&p[Tc];return m?h(m):p};let U=!1;const L=(d,p,m)=>{d==null?p._vnode&&Re(p._vnode,null,null,!0):v(p._vnode||null,d,p,null,null,null,m),p._vnode=d,U||(U=!0,Br(),yi(),U=!1)},B={p:v,um:Re,m:ze,r:Ut,mt:sn,mc:_e,pc:W,pbc:Ve,n:x,o:e};return{render:L,hydrate:void 0,createApp:Xc(L)}}function Ps({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Rt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ia(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Bi(e,t,n=!1){const s=e.children,r=t.children;if(j(s)&&j(r))for(let o=0;o>1,e[n[l]]0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function ki(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ki(t)}function Vr(e){if(e)for(let t=0;tHe(ca);function gn(e,t,n){return Fi(e,t,n)}function Fi(e,t,n=ee){const{immediate:s,deep:r,flush:o,once:i}=n,l=ve({},n),c=t&&s||!t&&o!=="post";let a;if(Rn){if(o==="sync"){const g=aa();a=g.__watcherHandles||(g.__watcherHandles=[])}else if(!c){const g=()=>{};return g.stop=et,g.resume=et,g.pause=et,g}}const u=ge;l.call=(g,w,v)=>nt(g,u,w,v);let f=!1;o==="post"?l.scheduler=g=>{Ce(g,u&&u.suspense)}:o!=="sync"&&(f=!0,l.scheduler=(g,w)=>{w?g():_r(g)}),l.augmentJob=g=>{t&&(g.flags|=4),f&&(g.flags|=2,u&&(g.id=u.uid,g.i=u))};const h=Rc(e,t,l);return Rn&&(a?a.push(h):c&&h()),h}function ua(e,t,n){const s=this.proxy,r=fe(e)?e.includes(".")?ji(s,e):()=>s[e]:e.bind(s,s);let o;q(t)?o=t:(o=t.handler,n=t);const i=Pn(this),l=Fi(r,o.bind(s),n);return i(),l}function ji(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;rt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ke(t)}Modifiers`]||e[`${Lt(t)}Modifiers`];function da(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ee;let r=n;const o=t.startsWith("update:"),i=o&&fa(s,t.slice(7));i&&(i.trim&&(r=n.map(u=>fe(u)?u.trim():u)),i.number&&(r=n.map(Kn)));let l,c=s[l=Rs(t)]||s[l=Rs(ke(t))];!c&&o&&(c=s[l=Rs(Lt(t))]),c&&nt(c,e,6,r);const a=s[l+"Once"];if(a){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,nt(a,e,6,r)}}function Hi(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!q(e)){const c=a=>{const u=Hi(a,t,!0);u&&(l=!0,ve(i,u))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(re(e)&&s.set(e,null),null):(j(o)?o.forEach(c=>i[c]=null):ve(i,o),re(e)&&s.set(e,i),i)}function ps(e,t){return!e||!ss(t)?!1:(t=t.slice(2).replace(/Once$/,""),G(e,t[0].toLowerCase()+t.slice(1))||G(e,Lt(t))||G(e,t))}function Kr(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:i,attrs:l,emit:c,render:a,renderCache:u,props:f,data:h,setupState:g,ctx:w,inheritAttrs:v}=e,y=Qn(e);let b,S;try{if(n.shapeFlag&4){const P=r||s,H=P;b=Ze(a.call(H,P,u,f,g,h,w)),S=l}else{const P=t;b=Ze(P.length>1?P(f,{attrs:l,slots:i,emit:c}):P(f,null)),S=t.props?l:pa(l)}}catch(P){yn.length=0,fs(P,e,1),b=le(Nt)}let R=b;if(S&&v!==!1){const P=Object.keys(S),{shapeFlag:H}=R;P.length&&H&7&&(o&&P.some(cr)&&(S=ha(S,o)),R=Xt(R,S,!1,!0))}return n.dirs&&(R=Xt(R,null,!1,!0),R.dirs=R.dirs?R.dirs.concat(n.dirs):n.dirs),n.transition&&wr(R,n.transition),b=R,Qn(y),b}const pa=e=>{let t;for(const n in e)(n==="class"||n==="style"||ss(n))&&((t||(t={}))[n]=e[n]);return t},ha=(e,t)=>{const n={};for(const s in e)(!cr(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function ma(e,t,n){const{props:s,children:r,component:o}=e,{props:i,children:l,patchFlag:c}=t,a=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?zr(s,i,a):!!i;if(c&8){const u=t.dynamicProps;for(let f=0;fe.__isSuspense;function ya(e,t){t&&t.pendingBranch?j(e)?t.effects.push(...e):t.effects.push(e):Oc(e)}const Ee=Symbol.for("v-fgt"),hs=Symbol.for("v-txt"),Nt=Symbol.for("v-cmt"),Is=Symbol.for("v-stc"),yn=[];let Ne=null;function oe(e=!1){yn.push(Ne=e?null:[])}function ba(){yn.pop(),Ne=yn[yn.length-1]||null}let En=1;function Wr(e,t=!1){En+=e,e<0&&Ne&&t&&(Ne.hasOnce=!0)}function qi(e){return e.dynamicChildren=En>0?Ne||$t:null,ba(),En>0&&Ne&&Ne.push(e),e}function ce(e,t,n,s,r,o){return qi(E(e,t,n,s,r,o,!0))}function Vi(e,t,n,s,r){return qi(le(e,t,n,s,r,!0))}function Xn(e){return e?e.__v_isVNode===!0:!1}function ln(e,t){return e.type===t.type&&e.key===t.key}const Ki=({key:e})=>e??null,jn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?fe(e)||be(e)||q(e)?{i:Ie,r:e,k:t,f:!!n}:e:null);function E(e,t=null,n=null,s=0,r=null,o=e===Ee?0:1,i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ki(t),ref:t&&jn(t),scopeId:vi,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Ie};return l?(Rr(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=fe(n)?8:16),En>0&&!i&&Ne&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&Ne.push(c),c}const le=va;function va(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===$c)&&(e=Nt),Xn(e)){const l=Xt(e,t,!0);return n&&Rr(l,n),En>0&&!o&&Ne&&(l.shapeFlag&6?Ne[Ne.indexOf(e)]=l:Ne.push(l)),l.patchFlag=-2,l}if(Pa(e)&&(e=e.__vccOpts),t){t=_a(t);let{class:l,style:c}=t;l&&!fe(l)&&(t.class=Qt(l)),re(c)&&(br(c)&&!j(c)&&(c=ve({},c)),t.style=fr(c))}const i=fe(e)?1:$i(e)?128:Cc(e)?64:re(e)?4:q(e)?2:0;return E(e,t,n,s,r,i,o,!0)}function _a(e){return e?br(e)||Pi(e)?ve({},e):e:null}function Xt(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:l,transition:c}=e,a=t?wa(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&Ki(a),ref:t&&t.ref?n&&o?j(o)?o.concat(jn(t)):[o,jn(t)]:jn(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ee?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Xt(e.ssContent),ssFallback:e.ssFallback&&Xt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&wr(u,c.clone(u)),u}function ae(e=" ",t=0){return le(hs,null,e,t)}function Qr(e="",t=!1){return t?(oe(),Vi(Nt,null,e)):le(Nt,null,e)}function Ze(e){return e==null||typeof e=="boolean"?le(Nt):j(e)?le(Ee,null,e.slice()):Xn(e)?gt(e):le(hs,null,String(e))}function gt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Xt(e)}function Rr(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(j(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Rr(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Pi(t)?t._ctx=Ie:r===3&&Ie&&(Ie.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else q(t)?(t={default:t,_ctx:Ie},n=32):(t=String(t),s&64?(n=16,t=[ae(t)]):n=8);e.children=t,e.shapeFlag|=n}function wa(...e){const t={};for(let n=0;n{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};Yn=t("__VUE_INSTANCE_SETTERS__",n=>ge=n),Gs=t("__VUE_SSR_SETTERS__",n=>Rn=n)}const Pn=e=>{const t=ge;return Yn(e),e.scope.on(),()=>{e.scope.off(),Yn(t)}},Jr=()=>{ge&&ge.scope.off(),Yn(null)};function zi(e){return e.vnode.shapeFlag&4}let Rn=!1;function Aa(e,t=!1,n=!1){t&&Gs(t);const{props:s,children:r}=e.vnode,o=zi(e);Yc(e,s,o,t),na(e,r,n);const i=o?xa(e,t):void 0;return t&&Gs(!1),i}function xa(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Vc);const{setup:s}=n;if(s){_t();const r=e.setupContext=s.length>1?Ta(e):null,o=Pn(e),i=Cn(s,e,0,[e.props,r]),l=Vo(i);if(wt(),o(),(l||e.sp)&&!hn(e)&&wi(e),l){if(i.then(Jr,Jr),t)return i.then(c=>{Gr(e,c)}).catch(c=>{fs(c,e,0)});e.asyncDep=i}else Gr(e,i)}else Wi(e)}function Gr(e,t,n){q(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:re(t)&&(e.setupState=hi(t)),Wi(e)}function Wi(e,t,n){const s=e.type;e.render||(e.render=s.render||et);{const r=Pn(e);_t();try{Kc(e)}finally{wt(),r()}}}const Oa={get(e,t){return he(e,"get",""),e[t]}};function Ta(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Oa),slots:e.slots,emit:e.emit,expose:t}}function ms(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(hi(yc(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in mn)return mn[n](e)},has(t,n){return n in t||n in mn}})):e.proxy}function Ca(e,t=!0){return q(e)?e.displayName||e.name:e.name||t&&e.__name}function Pa(e){return q(e)&&"__vccOpts"in e}const Ue=(e,t)=>Sc(e,t,Rn);function Qi(e,t,n){const s=arguments.length;return s===2?re(t)&&!j(t)?Xn(t)?le(e,null,[t]):le(e,t):le(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Xn(n)&&(n=[n]),le(e,t,n))}const Ia="3.5.13";/** +* @vue/runtime-dom v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Xs;const Xr=typeof window<"u"&&window.trustedTypes;if(Xr)try{Xs=Xr.createPolicy("vue",{createHTML:e=>e})}catch{}const Ji=Xs?e=>Xs.createHTML(e):e=>e,Na="http://www.w3.org/2000/svg",Ma="http://www.w3.org/1998/Math/MathML",it=typeof document<"u"?document:null,Yr=it&&it.createElement("template"),La={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?it.createElementNS(Na,e):t==="mathml"?it.createElementNS(Ma,e):n?it.createElement(e,{is:n}):it.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>it.createTextNode(e),createComment:e=>it.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>it.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const i=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{Yr.innerHTML=Ji(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=Yr.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Da=Symbol("_vtc");function Ua(e,t,n){const s=e[Da];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Zr=Symbol("_vod"),Ba=Symbol("_vsh"),ka=Symbol(""),Fa=/(^|;)\s*display\s*:/;function ja(e,t,n){const s=e.style,r=fe(n);let o=!1;if(n&&!r){if(t)if(fe(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&Hn(s,l,"")}else for(const i in t)n[i]==null&&Hn(s,i,"");for(const i in n)i==="display"&&(o=!0),Hn(s,i,n[i])}else if(r){if(t!==n){const i=s[ka];i&&(n+=";"+i),s.cssText=n,o=Fa.test(n)}}else t&&e.removeAttribute("style");Zr in e&&(e[Zr]=o?s.display:"",e[Ba]&&(s.display="none"))}const eo=/\s*!important$/;function Hn(e,t,n){if(j(n))n.forEach(s=>Hn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Ha(e,t);eo.test(n)?e.setProperty(Lt(s),n.replace(eo,""),"important"):e[s]=n}}const to=["Webkit","Moz","ms"],Ns={};function Ha(e,t){const n=Ns[t];if(n)return n;let s=ke(t);if(s!=="filter"&&s in e)return Ns[t]=s;s=is(s);for(let r=0;rMs||(Ka.then(()=>Ms=0),Ms=Date.now());function Wa(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;nt(Qa(s,n.value),t,5,[s])};return n.value=e,n.attached=za(),n}function Qa(e,t){if(j(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const lo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ja=(e,t,n,s,r,o)=>{const i=r==="svg";t==="class"?Ua(e,s,i):t==="style"?ja(e,n,s):ss(t)?cr(t)||qa(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ga(e,t,s,i))?(ro(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&so(e,t,s,i,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!fe(s))?ro(e,ke(t),s,o,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),so(e,t,s,i))};function Ga(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&lo(t)&&q(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return lo(t)&&fe(n)?!1:t in e}const Zn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return j(t)?n=>kn(t,n):t};function Xa(e){e.target.composing=!0}function co(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Wt=Symbol("_assign"),vt={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[Wt]=Zn(r);const o=s||r.props&&r.props.type==="number";xt(e,t?"change":"input",i=>{if(i.target.composing)return;let l=e.value;n&&(l=l.trim()),o&&(l=Kn(l)),e[Wt](l)}),n&&xt(e,"change",()=>{e.value=e.value.trim()}),t||(xt(e,"compositionstart",Xa),xt(e,"compositionend",co),xt(e,"change",co))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},i){if(e[Wt]=Zn(i),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?Kn(e.value):e.value,c=t??"";l!==c&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===c)||(e.value=c))}},Bn={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const r=rs(t);xt(e,"change",()=>{const o=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>n?Kn(es(i)):es(i));e[Wt](e.multiple?r?new Set(o):o:o[0]),e._assigning=!0,vr(()=>{e._assigning=!1})}),e[Wt]=Zn(s)},mounted(e,{value:t}){ao(e,t)},beforeUpdate(e,t,n){e[Wt]=Zn(n)},updated(e,{value:t}){e._assigning||ao(e,t)}};function ao(e,t){const n=e.multiple,s=j(t);if(!(n&&!s&&!rs(t))){for(let r=0,o=e.options.length;rString(a)===String(l)):i.selected=Gl(t,l)>-1}else i.selected=t.has(l);else if(cs(es(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function es(e){return"_value"in e?e._value:e.value}const Ya=["ctrl","shift","alt","meta"],Za={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Ya.some(n=>e[`${n}Key`]&&!t.includes(n))},Gi=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...o)=>{for(let i=0;i{const t=tu().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=ru(s);if(!r)return;const o=t._component;!q(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=n(r,!1,su(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t};function su(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ru(e){return fe(e)?document.querySelector(e):e}/*! + * vue-router v4.5.0 + * (c) 2024 Eduardo San Martin Morote + * @license MIT + */const Ht=typeof document<"u";function Xi(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function ou(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Xi(e.default)}const Q=Object.assign;function Ls(e,t){const n={};for(const s in t){const r=t[s];n[s]=$e(r)?r.map(e):e(r)}return n}const bn=()=>{},$e=Array.isArray,Yi=/#/g,iu=/&/g,lu=/\//g,cu=/=/g,au=/\?/g,Zi=/\+/g,uu=/%5B/g,fu=/%5D/g,el=/%5E/g,du=/%60/g,tl=/%7B/g,pu=/%7C/g,nl=/%7D/g,hu=/%20/g;function Ar(e){return encodeURI(""+e).replace(pu,"|").replace(uu,"[").replace(fu,"]")}function mu(e){return Ar(e).replace(tl,"{").replace(nl,"}").replace(el,"^")}function Ys(e){return Ar(e).replace(Zi,"%2B").replace(hu,"+").replace(Yi,"%23").replace(iu,"%26").replace(du,"`").replace(tl,"{").replace(nl,"}").replace(el,"^")}function gu(e){return Ys(e).replace(cu,"%3D")}function yu(e){return Ar(e).replace(Yi,"%23").replace(au,"%3F")}function bu(e){return e==null?"":yu(e).replace(lu,"%2F")}function An(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const vu=/\/$/,_u=e=>e.replace(vu,"");function Ds(e,t,n="/"){let s,r={},o="",i="";const l=t.indexOf("#");let c=t.indexOf("?");return l=0&&(c=-1),c>-1&&(s=t.slice(0,c),o=t.slice(c+1,l>-1?l:t.length),r=e(o)),l>-1&&(s=s||t.slice(0,l),i=t.slice(l,t.length)),s=Ru(s??t,n),{fullPath:s+(o&&"?")+o+i,path:s,query:r,hash:An(i)}}function wu(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function fo(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Su(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&Yt(t.matched[s],n.matched[r])&&sl(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Yt(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function sl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Eu(e[n],t[n]))return!1;return!0}function Eu(e,t){return $e(e)?po(e,t):$e(t)?po(t,e):e===t}function po(e,t){return $e(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Ru(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let o=n.length-1,i,l;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(i).join("/")}const ht={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var xn;(function(e){e.pop="pop",e.push="push"})(xn||(xn={}));var vn;(function(e){e.back="back",e.forward="forward",e.unknown=""})(vn||(vn={}));function Au(e){if(!e)if(Ht){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),_u(e)}const xu=/^[^#]+#/;function Ou(e,t){return e.replace(xu,"#")+t}function Tu(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const gs=()=>({left:window.scrollX,top:window.scrollY});function Cu(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Tu(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function ho(e,t){return(history.state?history.state.position-t:-1)+e}const Zs=new Map;function Pu(e,t){Zs.set(e,t)}function Iu(e){const t=Zs.get(e);return Zs.delete(e),t}let Nu=()=>location.protocol+"//"+location.host;function rl(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let l=r.includes(e.slice(o))?e.slice(o).length:1,c=r.slice(l);return c[0]!=="/"&&(c="/"+c),fo(c,"")}return fo(n,e)+s+r}function Mu(e,t,n,s){let r=[],o=[],i=null;const l=({state:h})=>{const g=rl(e,location),w=n.value,v=t.value;let y=0;if(h){if(n.value=g,t.value=h,i&&i===w){i=null;return}y=v?h.position-v.position:0}else s(g);r.forEach(b=>{b(n.value,w,{delta:y,type:xn.pop,direction:y?y>0?vn.forward:vn.back:vn.unknown})})};function c(){i=n.value}function a(h){r.push(h);const g=()=>{const w=r.indexOf(h);w>-1&&r.splice(w,1)};return o.push(g),g}function u(){const{history:h}=window;h.state&&h.replaceState(Q({},h.state,{scroll:gs()}),"")}function f(){for(const h of o)h();o=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:c,listen:a,destroy:f}}function mo(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?gs():null}}function Lu(e){const{history:t,location:n}=window,s={value:rl(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(c,a,u){const f=e.indexOf("#"),h=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+c:Nu()+e+c;try{t[u?"replaceState":"pushState"](a,"",h),r.value=a}catch(g){console.error(g),n[u?"replace":"assign"](h)}}function i(c,a){const u=Q({},t.state,mo(r.value.back,c,r.value.forward,!0),a,{position:r.value.position});o(c,u,!0),s.value=c}function l(c,a){const u=Q({},r.value,t.state,{forward:c,scroll:gs()});o(u.current,u,!0);const f=Q({},mo(s.value,c,null),{position:u.position+1},a);o(c,f,!1),s.value=c}return{location:s,state:r,push:l,replace:i}}function Du(e){e=Au(e);const t=Lu(e),n=Mu(e,t.state,t.location,t.replace);function s(o,i=!0){i||n.pauseListeners(),history.go(o)}const r=Q({location:"",base:e,go:s,createHref:Ou.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function Uu(e){return typeof e=="string"||e&&typeof e=="object"}function ol(e){return typeof e=="string"||typeof e=="symbol"}const il=Symbol("");var go;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(go||(go={}));function Zt(e,t){return Q(new Error,{type:e,[il]:!0},t)}function ot(e,t){return e instanceof Error&&il in e&&(t==null||!!(e.type&t))}const yo="[^/]+?",Bu={sensitive:!1,strict:!1,start:!0,end:!0},ku=/[.+*?^${}()[\]/\\]/g;function Fu(e,t){const n=Q({},Bu,t),s=[];let r=n.start?"^":"";const o=[];for(const a of e){const u=a.length?[]:[90];n.strict&&!a.length&&(r+="/");for(let f=0;ft.length?t.length===1&&t[0]===80?1:-1:0}function ll(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Hu={type:0,value:""},$u=/[a-zA-Z0-9_]/;function qu(e){if(!e)return[[]];if(e==="/")return[[Hu]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(g){throw new Error(`ERR (${n})/"${a}": ${g}`)}let n=0,s=n;const r=[];let o;function i(){o&&r.push(o),o=[]}let l=0,c,a="",u="";function f(){a&&(n===0?o.push({type:0,value:a}):n===1||n===2||n===3?(o.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:a,regexp:u,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),a="")}function h(){a+=c}for(;l{i(R)}:bn}function i(f){if(ol(f)){const h=s.get(f);h&&(s.delete(f),n.splice(n.indexOf(h),1),h.children.forEach(i),h.alias.forEach(i))}else{const h=n.indexOf(f);h>-1&&(n.splice(h,1),f.record.name&&s.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function l(){return n}function c(f){const h=Qu(f,n);n.splice(h,0,f),f.record.name&&!wo(f)&&s.set(f.record.name,f)}function a(f,h){let g,w={},v,y;if("name"in f&&f.name){if(g=s.get(f.name),!g)throw Zt(1,{location:f});y=g.record.name,w=Q(vo(h.params,g.keys.filter(R=>!R.optional).concat(g.parent?g.parent.keys.filter(R=>R.optional):[]).map(R=>R.name)),f.params&&vo(f.params,g.keys.map(R=>R.name))),v=g.stringify(w)}else if(f.path!=null)v=f.path,g=n.find(R=>R.re.test(v)),g&&(w=g.parse(v),y=g.record.name);else{if(g=h.name?s.get(h.name):n.find(R=>R.re.test(h.path)),!g)throw Zt(1,{location:f,currentLocation:h});y=g.record.name,w=Q({},h.params,f.params),v=g.stringify(w)}const b=[];let S=g;for(;S;)b.unshift(S.record),S=S.parent;return{name:y,path:v,params:w,matched:b,meta:Wu(b)}}e.forEach(f=>o(f));function u(){n.length=0,s.clear()}return{addRoute:o,resolve:a,removeRoute:i,clearRoutes:u,getRoutes:l,getRecordMatcher:r}}function vo(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function _o(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:zu(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function zu(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function wo(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Wu(e){return e.reduce((t,n)=>Q(t,n.meta),{})}function So(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}function Qu(e,t){let n=0,s=t.length;for(;n!==s;){const o=n+s>>1;ll(e,t[o])<0?s=o:n=o+1}const r=Ju(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function Ju(e){let t=e;for(;t=t.parent;)if(cl(t)&&ll(e,t)===0)return t}function cl({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Gu(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ro&&Ys(o)):[s&&Ys(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function Xu(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=$e(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const Yu=Symbol(""),Ro=Symbol(""),ys=Symbol(""),xr=Symbol(""),er=Symbol("");function cn(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function yt(e,t,n,s,r,o=i=>i()){const i=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((l,c)=>{const a=h=>{h===!1?c(Zt(4,{from:n,to:t})):h instanceof Error?c(h):Uu(h)?c(Zt(2,{from:t,to:h})):(i&&s.enterCallbacks[r]===i&&typeof h=="function"&&i.push(h),l())},u=o(()=>e.call(s&&s.instances[r],t,n,a));let f=Promise.resolve(u);e.length<3&&(f=f.then(a)),f.catch(h=>c(h))})}function Us(e,t,n,s,r=o=>o()){const o=[];for(const i of e)for(const l in i.components){let c=i.components[l];if(!(t!=="beforeRouteEnter"&&!i.instances[l]))if(Xi(c)){const u=(c.__vccOpts||c)[t];u&&o.push(yt(u,n,s,i,l,r))}else{let a=c();o.push(()=>a.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${l}" at "${i.path}"`);const f=ou(u)?u.default:u;i.mods[l]=u,i.components[l]=f;const g=(f.__vccOpts||f)[t];return g&&yt(g,n,s,i,l,r)()}))}}return o}function Ao(e){const t=He(ys),n=He(xr),s=Ue(()=>{const c=Ct(e.to);return t.resolve(c)}),r=Ue(()=>{const{matched:c}=s.value,{length:a}=c,u=c[a-1],f=n.matched;if(!u||!f.length)return-1;const h=f.findIndex(Yt.bind(null,u));if(h>-1)return h;const g=xo(c[a-2]);return a>1&&xo(u)===g&&f[f.length-1].path!==g?f.findIndex(Yt.bind(null,c[a-2])):h}),o=Ue(()=>r.value>-1&&sf(n.params,s.value.params)),i=Ue(()=>r.value>-1&&r.value===n.matched.length-1&&sl(n.params,s.value.params));function l(c={}){if(nf(c)){const a=t[Ct(e.replace)?"replace":"push"](Ct(e.to)).catch(bn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>a),a}return Promise.resolve()}return{route:s,href:Ue(()=>s.value.href),isActive:o,isExactActive:i,navigate:l}}function Zu(e){return e.length===1?e[0]:e}const ef=_i({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Ao,setup(e,{slots:t}){const n=us(Ao(e)),{options:s}=He(ys),r=Ue(()=>({[Oo(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Oo(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&Zu(t.default(n));return e.custom?o:Qi("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),tf=ef;function nf(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function sf(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!$e(r)||r.length!==s.length||s.some((o,i)=>o!==r[i]))return!1}return!0}function xo(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Oo=(e,t,n)=>e??t??n,rf=_i({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=He(er),r=Ue(()=>e.route||s.value),o=He(Ro,0),i=Ue(()=>{let a=Ct(o);const{matched:u}=r.value;let f;for(;(f=u[a])&&!f.components;)a++;return a}),l=Ue(()=>r.value.matched[i.value]);Fn(Ro,Ue(()=>i.value+1)),Fn(Yu,l),Fn(er,r);const c=ie();return gn(()=>[c.value,l.value,e.name],([a,u,f],[h,g,w])=>{u&&(u.instances[f]=a,g&&g!==u&&a&&a===h&&(u.leaveGuards.size||(u.leaveGuards=g.leaveGuards),u.updateGuards.size||(u.updateGuards=g.updateGuards))),a&&u&&(!g||!Yt(u,g)||!h)&&(u.enterCallbacks[f]||[]).forEach(v=>v(a))},{flush:"post"}),()=>{const a=r.value,u=e.name,f=l.value,h=f&&f.components[u];if(!h)return To(n.default,{Component:h,route:a});const g=f.props[u],w=g?g===!0?a.params:typeof g=="function"?g(a):g:null,y=Qi(h,Q({},w,t,{onVnodeUnmounted:b=>{b.component.isUnmounted&&(f.instances[u]=null)},ref:c}));return To(n.default,{Component:y,route:a})||y}}});function To(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const of=rf;function lf(e){const t=Ku(e.routes,e),n=e.parseQuery||Gu,s=e.stringifyQuery||Eo,r=e.history,o=cn(),i=cn(),l=cn(),c=bc(ht);let a=ht;Ht&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Ls.bind(null,x=>""+x),f=Ls.bind(null,bu),h=Ls.bind(null,An);function g(x,U){let L,B;return ol(x)?(L=t.getRecordMatcher(x),B=U):B=x,t.addRoute(B,L)}function w(x){const U=t.getRecordMatcher(x);U&&t.removeRoute(U)}function v(){return t.getRoutes().map(x=>x.record)}function y(x){return!!t.getRecordMatcher(x)}function b(x,U){if(U=Q({},U||c.value),typeof x=="string"){const m=Ds(n,x,U.path),A=t.resolve({path:m.path},U),T=r.createHref(m.fullPath);return Q(m,A,{params:h(A.params),hash:An(m.hash),redirectedFrom:void 0,href:T})}let L;if(x.path!=null)L=Q({},x,{path:Ds(n,x.path,U.path).path});else{const m=Q({},x.params);for(const A in m)m[A]==null&&delete m[A];L=Q({},x,{params:f(m)}),U.params=f(U.params)}const B=t.resolve(L,U),Z=x.hash||"";B.params=u(h(B.params));const d=wu(s,Q({},x,{hash:mu(Z),path:B.path})),p=r.createHref(d);return Q({fullPath:d,hash:Z,query:s===Eo?Xu(x.query):x.query||{}},B,{redirectedFrom:void 0,href:p})}function S(x){return typeof x=="string"?Ds(n,x,c.value.path):Q({},x)}function R(x,U){if(a!==x)return Zt(8,{from:U,to:x})}function P(x){return z(x)}function H(x){return P(Q(S(x),{replace:!0}))}function te(x){const U=x.matched[x.matched.length-1];if(U&&U.redirect){const{redirect:L}=U;let B=typeof L=="function"?L(x):L;return typeof B=="string"&&(B=B.includes("?")||B.includes("#")?B=S(B):{path:B},B.params={}),Q({query:x.query,hash:x.hash,params:B.path!=null?{}:x.params},B)}}function z(x,U){const L=a=b(x),B=c.value,Z=x.state,d=x.force,p=x.replace===!0,m=te(L);if(m)return z(Q(S(m),{state:typeof m=="object"?Q({},Z,m.state):Z,force:d,replace:p}),U||L);const A=L;A.redirectedFrom=U;let T;return!d&&Su(s,B,L)&&(T=Zt(16,{to:A,from:B}),ze(B,B,!0,!1)),(T?Promise.resolve(T):Ve(A,B)).catch(O=>ot(O)?ot(O,2)?O:pt(O):W(O,A,B)).then(O=>{if(O){if(ot(O,2))return z(Q({replace:p},S(O.to),{state:typeof O.to=="object"?Q({},Z,O.to.state):Z,force:d}),U||A)}else O=St(A,B,!0,p,Z);return dt(A,B,O),O})}function _e(x,U){const L=R(x,U);return L?Promise.reject(L):Promise.resolve()}function Fe(x){const U=Bt.values().next().value;return U&&typeof U.runWithContext=="function"?U.runWithContext(x):x()}function Ve(x,U){let L;const[B,Z,d]=cf(x,U);L=Us(B.reverse(),"beforeRouteLeave",x,U);for(const m of B)m.leaveGuards.forEach(A=>{L.push(yt(A,x,U))});const p=_e.bind(null,x,U);return L.push(p),Le(L).then(()=>{L=[];for(const m of o.list())L.push(yt(m,x,U));return L.push(p),Le(L)}).then(()=>{L=Us(Z,"beforeRouteUpdate",x,U);for(const m of Z)m.updateGuards.forEach(A=>{L.push(yt(A,x,U))});return L.push(p),Le(L)}).then(()=>{L=[];for(const m of d)if(m.beforeEnter)if($e(m.beforeEnter))for(const A of m.beforeEnter)L.push(yt(A,x,U));else L.push(yt(m.beforeEnter,x,U));return L.push(p),Le(L)}).then(()=>(x.matched.forEach(m=>m.enterCallbacks={}),L=Us(d,"beforeRouteEnter",x,U,Fe),L.push(p),Le(L))).then(()=>{L=[];for(const m of i.list())L.push(yt(m,x,U));return L.push(p),Le(L)}).catch(m=>ot(m,8)?m:Promise.reject(m))}function dt(x,U,L){l.list().forEach(B=>Fe(()=>B(x,U,L)))}function St(x,U,L,B,Z){const d=R(x,U);if(d)return d;const p=U===ht,m=Ht?history.state:{};L&&(B||p?r.replace(x.fullPath,Q({scroll:p&&m&&m.scroll},Z)):r.push(x.fullPath,Z)),c.value=x,ze(x,U,L,p),pt()}let Ke;function sn(){Ke||(Ke=r.listen((x,U,L)=>{if(!Mn.listening)return;const B=b(x),Z=te(B);if(Z){z(Q(Z,{replace:!0,force:!0}),B).catch(bn);return}a=B;const d=c.value;Ht&&Pu(ho(d.fullPath,L.delta),gs()),Ve(B,d).catch(p=>ot(p,12)?p:ot(p,2)?(z(Q(S(p.to),{force:!0}),B).then(m=>{ot(m,20)&&!L.delta&&L.type===xn.pop&&r.go(-1,!1)}).catch(bn),Promise.reject()):(L.delta&&r.go(-L.delta,!1),W(p,B,d))).then(p=>{p=p||St(B,d,!1),p&&(L.delta&&!ot(p,8)?r.go(-L.delta,!1):L.type===xn.pop&&ot(p,20)&&r.go(-1,!1)),dt(B,d,p)}).catch(bn)}))}let Dt=cn(),de=cn(),Y;function W(x,U,L){pt(x);const B=de.list();return B.length?B.forEach(Z=>Z(x,U,L)):console.error(x),Promise.reject(x)}function st(){return Y&&c.value!==ht?Promise.resolve():new Promise((x,U)=>{Dt.add([x,U])})}function pt(x){return Y||(Y=!x,sn(),Dt.list().forEach(([U,L])=>x?L(x):U()),Dt.reset()),x}function ze(x,U,L,B){const{scrollBehavior:Z}=e;if(!Ht||!Z)return Promise.resolve();const d=!L&&Iu(ho(x.fullPath,0))||(B||!L)&&history.state&&history.state.scroll||null;return vr().then(()=>Z(x,U,d)).then(p=>p&&Cu(p)).catch(p=>W(p,x,U))}const Re=x=>r.go(x);let Ut;const Bt=new Set,Mn={currentRoute:c,listening:!0,addRoute:g,removeRoute:w,clearRoutes:t.clearRoutes,hasRoute:y,getRoutes:v,resolve:b,options:e,push:P,replace:H,go:Re,back:()=>Re(-1),forward:()=>Re(1),beforeEach:o.add,beforeResolve:i.add,afterEach:l.add,onError:de.add,isReady:st,install(x){const U=this;x.component("RouterLink",tf),x.component("RouterView",of),x.config.globalProperties.$router=U,Object.defineProperty(x.config.globalProperties,"$route",{enumerable:!0,get:()=>Ct(c)}),Ht&&!Ut&&c.value===ht&&(Ut=!0,P(r.location).catch(Z=>{}));const L={};for(const Z in ht)Object.defineProperty(L,Z,{get:()=>c.value[Z],enumerable:!0});x.provide(ys,U),x.provide(xr,fi(L)),x.provide(er,c);const B=x.unmount;Bt.add(x),x.unmount=function(){Bt.delete(x),Bt.size<1&&(a=ht,Ke&&Ke(),Ke=null,c.value=ht,Ut=!1,Y=!1),B()}}};function Le(x){return x.reduce((U,L)=>U.then(()=>Fe(L)),Promise.resolve())}return Mn}function cf(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;iYt(a,l))?s.push(l):n.push(l));const c=e.matched[i];c&&(t.matched.find(a=>Yt(a,c))||r.push(c))}return[n,s,r]}function en(){return He(ys)}function al(e){return He(xr)}const ft=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},af={},uf={class:"footer"};function ff(e,t){return oe(),ce("footer",uf,t[0]||(t[0]=[E("div",{class:"copyright"},"© 2025 小智 AI 管理后台",-1)]))}const df=ft(af,[["render",ff],["__scopeId","data-v-cf2abdb4"]]),pf={name:"App",components:{Footer:df}},hf={id:"app"},mf={class:"app-content"};function gf(e,t,n,s,r,o){const i=Gt("router-view"),l=Gt("Footer");return oe(),ce("div",hf,[E("div",mf,[le(i)]),le(l)])}const yf=ft(pf,[["render",gf]]);function ul(e,t){return function(){return e.apply(t,arguments)}}const{toString:bf}=Object.prototype,{getPrototypeOf:Or}=Object,bs=(e=>t=>{const n=bf.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),qe=e=>(e=e.toLowerCase(),t=>bs(t)===e),vs=e=>t=>typeof t===e,{isArray:tn}=Array,On=vs("undefined");function vf(e){return e!==null&&!On(e)&&e.constructor!==null&&!On(e.constructor)&&Me(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const fl=qe("ArrayBuffer");function _f(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&fl(e.buffer),t}const wf=vs("string"),Me=vs("function"),dl=vs("number"),_s=e=>e!==null&&typeof e=="object",Sf=e=>e===!0||e===!1,$n=e=>{if(bs(e)!=="object")return!1;const t=Or(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Ef=qe("Date"),Rf=qe("File"),Af=qe("Blob"),xf=qe("FileList"),Of=e=>_s(e)&&Me(e.pipe),Tf=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Me(e.append)&&((t=bs(e))==="formdata"||t==="object"&&Me(e.toString)&&e.toString()==="[object FormData]"))},Cf=qe("URLSearchParams"),[Pf,If,Nf,Mf]=["ReadableStream","Request","Response","Headers"].map(qe),Lf=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function In(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,r;if(typeof e!="object"&&(e=[e]),tn(e))for(s=0,r=e.length;s0;)if(r=n[s],t===r.toLowerCase())return r;return null}const Ot=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,hl=e=>!On(e)&&e!==Ot;function tr(){const{caseless:e}=hl(this)&&this||{},t={},n=(s,r)=>{const o=e&&pl(t,r)||r;$n(t[o])&&$n(s)?t[o]=tr(t[o],s):$n(s)?t[o]=tr({},s):tn(s)?t[o]=s.slice():t[o]=s};for(let s=0,r=arguments.length;s(In(t,(r,o)=>{n&&Me(r)?e[o]=ul(r,n):e[o]=r},{allOwnKeys:s}),e),Uf=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Bf=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},kf=(e,t,n,s)=>{let r,o,i;const l={};if(t=t||{},e==null)return t;do{for(r=Object.getOwnPropertyNames(e),o=r.length;o-- >0;)i=r[o],(!s||s(i,e,t))&&!l[i]&&(t[i]=e[i],l[i]=!0);e=n!==!1&&Or(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ff=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},jf=e=>{if(!e)return null;if(tn(e))return e;let t=e.length;if(!dl(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Hf=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Or(Uint8Array)),$f=(e,t)=>{const s=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=s.next())&&!r.done;){const o=r.value;t.call(e,o[0],o[1])}},qf=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},Vf=qe("HTMLFormElement"),Kf=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,r){return s.toUpperCase()+r}),Co=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),zf=qe("RegExp"),ml=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};In(n,(r,o)=>{let i;(i=t(r,o,e))!==!1&&(s[o]=i||r)}),Object.defineProperties(e,s)},Wf=e=>{ml(e,(t,n)=>{if(Me(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=e[n];if(Me(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Qf=(e,t)=>{const n={},s=r=>{r.forEach(o=>{n[o]=!0})};return tn(e)?s(e):s(String(e).split(t)),n},Jf=()=>{},Gf=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Bs="abcdefghijklmnopqrstuvwxyz",Po="0123456789",gl={DIGIT:Po,ALPHA:Bs,ALPHA_DIGIT:Bs+Bs.toUpperCase()+Po},Xf=(e=16,t=gl.ALPHA_DIGIT)=>{let n="";const{length:s}=t;for(;e--;)n+=t[Math.random()*s|0];return n};function Yf(e){return!!(e&&Me(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Zf=e=>{const t=new Array(10),n=(s,r)=>{if(_s(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[r]=s;const o=tn(s)?[]:{};return In(s,(i,l)=>{const c=n(i,r+1);!On(c)&&(o[l]=c)}),t[r]=void 0,o}}return s};return n(e,0)},ed=qe("AsyncFunction"),td=e=>e&&(_s(e)||Me(e))&&Me(e.then)&&Me(e.catch),yl=((e,t)=>e?setImmediate:t?((n,s)=>(Ot.addEventListener("message",({source:r,data:o})=>{r===Ot&&o===n&&s.length&&s.shift()()},!1),r=>{s.push(r),Ot.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Me(Ot.postMessage)),nd=typeof queueMicrotask<"u"?queueMicrotask.bind(Ot):typeof process<"u"&&process.nextTick||yl,_={isArray:tn,isArrayBuffer:fl,isBuffer:vf,isFormData:Tf,isArrayBufferView:_f,isString:wf,isNumber:dl,isBoolean:Sf,isObject:_s,isPlainObject:$n,isReadableStream:Pf,isRequest:If,isResponse:Nf,isHeaders:Mf,isUndefined:On,isDate:Ef,isFile:Rf,isBlob:Af,isRegExp:zf,isFunction:Me,isStream:Of,isURLSearchParams:Cf,isTypedArray:Hf,isFileList:xf,forEach:In,merge:tr,extend:Df,trim:Lf,stripBOM:Uf,inherits:Bf,toFlatObject:kf,kindOf:bs,kindOfTest:qe,endsWith:Ff,toArray:jf,forEachEntry:$f,matchAll:qf,isHTMLForm:Vf,hasOwnProperty:Co,hasOwnProp:Co,reduceDescriptors:ml,freezeMethods:Wf,toObjectSet:Qf,toCamelCase:Kf,noop:Jf,toFiniteNumber:Gf,findKey:pl,global:Ot,isContextDefined:hl,ALPHABET:gl,generateString:Xf,isSpecCompliantForm:Yf,toJSONObject:Zf,isAsyncFn:ed,isThenable:td,setImmediate:yl,asap:nd};function V(e,t,n,s,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),s&&(this.request=s),r&&(this.response=r,this.status=r.status?r.status:null)}_.inherits(V,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_.toJSONObject(this.config),code:this.code,status:this.status}}});const bl=V.prototype,vl={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{vl[e]={value:e}});Object.defineProperties(V,vl);Object.defineProperty(bl,"isAxiosError",{value:!0});V.from=(e,t,n,s,r,o)=>{const i=Object.create(bl);return _.toFlatObject(e,i,function(c){return c!==Error.prototype},l=>l!=="isAxiosError"),V.call(i,e.message,t,n,s,r),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const sd=null;function nr(e){return _.isPlainObject(e)||_.isArray(e)}function _l(e){return _.endsWith(e,"[]")?e.slice(0,-2):e}function Io(e,t,n){return e?e.concat(t).map(function(r,o){return r=_l(r),!n&&o?"["+r+"]":r}).join(n?".":""):t}function rd(e){return _.isArray(e)&&!e.some(nr)}const od=_.toFlatObject(_,{},null,function(t){return/^is[A-Z]/.test(t)});function ws(e,t,n){if(!_.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=_.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,y){return!_.isUndefined(y[v])});const s=n.metaTokens,r=n.visitor||u,o=n.dots,i=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&_.isSpecCompliantForm(t);if(!_.isFunction(r))throw new TypeError("visitor must be a function");function a(w){if(w===null)return"";if(_.isDate(w))return w.toISOString();if(!c&&_.isBlob(w))throw new V("Blob is not supported. Use a Buffer instead.");return _.isArrayBuffer(w)||_.isTypedArray(w)?c&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function u(w,v,y){let b=w;if(w&&!y&&typeof w=="object"){if(_.endsWith(v,"{}"))v=s?v:v.slice(0,-2),w=JSON.stringify(w);else if(_.isArray(w)&&rd(w)||(_.isFileList(w)||_.endsWith(v,"[]"))&&(b=_.toArray(w)))return v=_l(v),b.forEach(function(R,P){!(_.isUndefined(R)||R===null)&&t.append(i===!0?Io([v],P,o):i===null?v:v+"[]",a(R))}),!1}return nr(w)?!0:(t.append(Io(y,v,o),a(w)),!1)}const f=[],h=Object.assign(od,{defaultVisitor:u,convertValue:a,isVisitable:nr});function g(w,v){if(!_.isUndefined(w)){if(f.indexOf(w)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(w),_.forEach(w,function(b,S){(!(_.isUndefined(b)||b===null)&&r.call(t,b,_.isString(S)?S.trim():S,v,h))===!0&&g(b,v?v.concat(S):[S])}),f.pop()}}if(!_.isObject(e))throw new TypeError("data must be an object");return g(e),t}function No(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function Tr(e,t){this._pairs=[],e&&ws(e,this,t)}const wl=Tr.prototype;wl.append=function(t,n){this._pairs.push([t,n])};wl.toString=function(t){const n=t?function(s){return t.call(this,s,No)}:No;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function id(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Sl(e,t,n){if(!t)return e;const s=n&&n.encode||id;_.isFunction(n)&&(n={serialize:n});const r=n&&n.serialize;let o;if(r?o=r(t,n):o=_.isURLSearchParams(t)?t.toString():new Tr(t,n).toString(s),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Mo{constructor(){this.handlers=[]}use(t,n,s){return this.handlers.push({fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){_.forEach(this.handlers,function(s){s!==null&&t(s)})}}const El={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ld=typeof URLSearchParams<"u"?URLSearchParams:Tr,cd=typeof FormData<"u"?FormData:null,ad=typeof Blob<"u"?Blob:null,ud={isBrowser:!0,classes:{URLSearchParams:ld,FormData:cd,Blob:ad},protocols:["http","https","file","blob","url","data"]},Cr=typeof window<"u"&&typeof document<"u",sr=typeof navigator=="object"&&navigator||void 0,fd=Cr&&(!sr||["ReactNative","NativeScript","NS"].indexOf(sr.product)<0),dd=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",pd=Cr&&window.location.href||"http://localhost",hd=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Cr,hasStandardBrowserEnv:fd,hasStandardBrowserWebWorkerEnv:dd,navigator:sr,origin:pd},Symbol.toStringTag,{value:"Module"})),ye={...hd,...ud};function md(e,t){return ws(e,new ye.classes.URLSearchParams,Object.assign({visitor:function(n,s,r,o){return ye.isNode&&_.isBuffer(n)?(this.append(s,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function gd(e){return _.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function yd(e){const t={},n=Object.keys(e);let s;const r=n.length;let o;for(s=0;s=n.length;return i=!i&&_.isArray(r)?r.length:i,c?(_.hasOwnProp(r,i)?r[i]=[r[i],s]:r[i]=s,!l):((!r[i]||!_.isObject(r[i]))&&(r[i]=[]),t(n,s,r[i],o)&&_.isArray(r[i])&&(r[i]=yd(r[i])),!l)}if(_.isFormData(e)&&_.isFunction(e.entries)){const n={};return _.forEachEntry(e,(s,r)=>{t(gd(s),r,n,0)}),n}return null}function bd(e,t,n){if(_.isString(e))try{return(t||JSON.parse)(e),_.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(e)}const Nn={transitional:El,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const s=n.getContentType()||"",r=s.indexOf("application/json")>-1,o=_.isObject(t);if(o&&_.isHTMLForm(t)&&(t=new FormData(t)),_.isFormData(t))return r?JSON.stringify(Rl(t)):t;if(_.isArrayBuffer(t)||_.isBuffer(t)||_.isStream(t)||_.isFile(t)||_.isBlob(t)||_.isReadableStream(t))return t;if(_.isArrayBufferView(t))return t.buffer;if(_.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(o){if(s.indexOf("application/x-www-form-urlencoded")>-1)return md(t,this.formSerializer).toString();if((l=_.isFileList(t))||s.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ws(l?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||r?(n.setContentType("application/json",!1),bd(t)):t}],transformResponse:[function(t){const n=this.transitional||Nn.transitional,s=n&&n.forcedJSONParsing,r=this.responseType==="json";if(_.isResponse(t)||_.isReadableStream(t))return t;if(t&&_.isString(t)&&(s&&!this.responseType||r)){const i=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(l){if(i)throw l.name==="SyntaxError"?V.from(l,V.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ye.classes.FormData,Blob:ye.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_.forEach(["delete","get","head","post","put","patch"],e=>{Nn.headers[e]={}});const vd=_.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_d=e=>{const t={};let n,s,r;return e&&e.split(` +`).forEach(function(i){r=i.indexOf(":"),n=i.substring(0,r).trim().toLowerCase(),s=i.substring(r+1).trim(),!(!n||t[n]&&vd[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t},Lo=Symbol("internals");function an(e){return e&&String(e).trim().toLowerCase()}function qn(e){return e===!1||e==null?e:_.isArray(e)?e.map(qn):String(e)}function wd(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const Sd=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ks(e,t,n,s,r){if(_.isFunction(s))return s.call(this,t,n);if(r&&(t=n),!!_.isString(t)){if(_.isString(s))return t.indexOf(s)!==-1;if(_.isRegExp(s))return s.test(t)}}function Ed(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function Rd(e,t){const n=_.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{value:function(r,o,i){return this[s].call(this,t,r,o,i)},configurable:!0})})}let xe=class{constructor(t){t&&this.set(t)}set(t,n,s){const r=this;function o(l,c,a){const u=an(c);if(!u)throw new Error("header name must be a non-empty string");const f=_.findKey(r,u);(!f||r[f]===void 0||a===!0||a===void 0&&r[f]!==!1)&&(r[f||c]=qn(l))}const i=(l,c)=>_.forEach(l,(a,u)=>o(a,u,c));if(_.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(_.isString(t)&&(t=t.trim())&&!Sd(t))i(_d(t),n);else if(_.isHeaders(t))for(const[l,c]of t.entries())o(c,l,s);else t!=null&&o(n,t,s);return this}get(t,n){if(t=an(t),t){const s=_.findKey(this,t);if(s){const r=this[s];if(!n)return r;if(n===!0)return wd(r);if(_.isFunction(n))return n.call(this,r,s);if(_.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=an(t),t){const s=_.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||ks(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let r=!1;function o(i){if(i=an(i),i){const l=_.findKey(s,i);l&&(!n||ks(s,s[l],l,n))&&(delete s[l],r=!0)}}return _.isArray(t)?t.forEach(o):o(t),r}clear(t){const n=Object.keys(this);let s=n.length,r=!1;for(;s--;){const o=n[s];(!t||ks(this,this[o],o,t,!0))&&(delete this[o],r=!0)}return r}normalize(t){const n=this,s={};return _.forEach(this,(r,o)=>{const i=_.findKey(s,o);if(i){n[i]=qn(r),delete n[o];return}const l=t?Ed(o):String(o).trim();l!==o&&delete n[o],n[l]=qn(r),s[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return _.forEach(this,(s,r)=>{s!=null&&s!==!1&&(n[r]=t&&_.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(r=>s.set(r)),s}static accessor(t){const s=(this[Lo]=this[Lo]={accessors:{}}).accessors,r=this.prototype;function o(i){const l=an(i);s[l]||(Rd(r,i),s[l]=!0)}return _.isArray(t)?t.forEach(o):o(t),this}};xe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_.reduceDescriptors(xe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});_.freezeMethods(xe);function Fs(e,t){const n=this||Nn,s=t||n,r=xe.from(s.headers);let o=s.data;return _.forEach(e,function(l){o=l.call(n,o,r.normalize(),t?t.status:void 0)}),r.normalize(),o}function Al(e){return!!(e&&e.__CANCEL__)}function nn(e,t,n){V.call(this,e??"canceled",V.ERR_CANCELED,t,n),this.name="CanceledError"}_.inherits(nn,V,{__CANCEL__:!0});function xl(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new V("Request failed with status code "+n.status,[V.ERR_BAD_REQUEST,V.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Ad(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function xd(e,t){e=e||10;const n=new Array(e),s=new Array(e);let r=0,o=0,i;return t=t!==void 0?t:1e3,function(c){const a=Date.now(),u=s[o];i||(i=a),n[r]=c,s[r]=a;let f=o,h=0;for(;f!==r;)h+=n[f++],f=f%e;if(r=(r+1)%e,r===o&&(o=(o+1)%e),a-i{n=u,r=null,o&&(clearTimeout(o),o=null),e.apply(null,a)};return[(...a)=>{const u=Date.now(),f=u-n;f>=s?i(a,u):(r=a,o||(o=setTimeout(()=>{o=null,i(r)},s-f)))},()=>r&&i(r)]}const ts=(e,t,n=3)=>{let s=0;const r=xd(50,250);return Od(o=>{const i=o.loaded,l=o.lengthComputable?o.total:void 0,c=i-s,a=r(c),u=i<=l;s=i;const f={loaded:i,total:l,progress:l?i/l:void 0,bytes:c,rate:a||void 0,estimated:a&&l&&u?(l-i)/a:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},Do=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},Uo=e=>(...t)=>_.asap(()=>e(...t)),Td=ye.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ye.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ye.origin),ye.navigator&&/(msie|trident)/i.test(ye.navigator.userAgent)):()=>!0,Cd=ye.hasStandardBrowserEnv?{write(e,t,n,s,r,o){const i=[e+"="+encodeURIComponent(t)];_.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),_.isString(s)&&i.push("path="+s),_.isString(r)&&i.push("domain="+r),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Pd(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Id(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ol(e,t){return e&&!Pd(t)?Id(e,t):t}const Bo=e=>e instanceof xe?{...e}:e;function Mt(e,t){t=t||{};const n={};function s(a,u,f,h){return _.isPlainObject(a)&&_.isPlainObject(u)?_.merge.call({caseless:h},a,u):_.isPlainObject(u)?_.merge({},u):_.isArray(u)?u.slice():u}function r(a,u,f,h){if(_.isUndefined(u)){if(!_.isUndefined(a))return s(void 0,a,f,h)}else return s(a,u,f,h)}function o(a,u){if(!_.isUndefined(u))return s(void 0,u)}function i(a,u){if(_.isUndefined(u)){if(!_.isUndefined(a))return s(void 0,a)}else return s(void 0,u)}function l(a,u,f){if(f in t)return s(a,u);if(f in e)return s(void 0,a)}const c={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(a,u,f)=>r(Bo(a),Bo(u),f,!0)};return _.forEach(Object.keys(Object.assign({},e,t)),function(u){const f=c[u]||r,h=f(e[u],t[u],u);_.isUndefined(h)&&f!==l||(n[u]=h)}),n}const Tl=e=>{const t=Mt({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:o,headers:i,auth:l}=t;t.headers=i=xe.from(i),t.url=Sl(Ol(t.baseURL,t.url),e.params,e.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(_.isFormData(n)){if(ye.hasStandardBrowserEnv||ye.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((c=i.getContentType())!==!1){const[a,...u]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([a||"multipart/form-data",...u].join("; "))}}if(ye.hasStandardBrowserEnv&&(s&&_.isFunction(s)&&(s=s(t)),s||s!==!1&&Td(t.url))){const a=r&&o&&Cd.read(o);a&&i.set(r,a)}return t},Nd=typeof XMLHttpRequest<"u",Md=Nd&&function(e){return new Promise(function(n,s){const r=Tl(e);let o=r.data;const i=xe.from(r.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:a}=r,u,f,h,g,w;function v(){g&&g(),w&&w(),r.cancelToken&&r.cancelToken.unsubscribe(u),r.signal&&r.signal.removeEventListener("abort",u)}let y=new XMLHttpRequest;y.open(r.method.toUpperCase(),r.url,!0),y.timeout=r.timeout;function b(){if(!y)return;const R=xe.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),H={data:!l||l==="text"||l==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:R,config:e,request:y};xl(function(z){n(z),v()},function(z){s(z),v()},H),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){y&&(s(new V("Request aborted",V.ECONNABORTED,e,y)),y=null)},y.onerror=function(){s(new V("Network Error",V.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let P=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const H=r.transitional||El;r.timeoutErrorMessage&&(P=r.timeoutErrorMessage),s(new V(P,H.clarifyTimeoutError?V.ETIMEDOUT:V.ECONNABORTED,e,y)),y=null},o===void 0&&i.setContentType(null),"setRequestHeader"in y&&_.forEach(i.toJSON(),function(P,H){y.setRequestHeader(H,P)}),_.isUndefined(r.withCredentials)||(y.withCredentials=!!r.withCredentials),l&&l!=="json"&&(y.responseType=r.responseType),a&&([h,w]=ts(a,!0),y.addEventListener("progress",h)),c&&y.upload&&([f,g]=ts(c),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",g)),(r.cancelToken||r.signal)&&(u=R=>{y&&(s(!R||R.type?new nn(null,e,y):R),y.abort(),y=null)},r.cancelToken&&r.cancelToken.subscribe(u),r.signal&&(r.signal.aborted?u():r.signal.addEventListener("abort",u)));const S=Ad(r.url);if(S&&ye.protocols.indexOf(S)===-1){s(new V("Unsupported protocol "+S+":",V.ERR_BAD_REQUEST,e));return}y.send(o||null)})},Ld=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let s=new AbortController,r;const o=function(a){if(!r){r=!0,l();const u=a instanceof Error?a:this.reason;s.abort(u instanceof V?u:new nn(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,o(new V(`timeout ${t} of ms exceeded`,V.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(a=>{a.unsubscribe?a.unsubscribe(o):a.removeEventListener("abort",o)}),e=null)};e.forEach(a=>a.addEventListener("abort",o));const{signal:c}=s;return c.unsubscribe=()=>_.asap(l),c}},Dd=function*(e,t){let n=e.byteLength;if(n{const r=Ud(e,t);let o=0,i,l=c=>{i||(i=!0,s&&s(c))};return new ReadableStream({async pull(c){try{const{done:a,value:u}=await r.next();if(a){l(),c.close();return}let f=u.byteLength;if(n){let h=o+=f;n(h)}c.enqueue(new Uint8Array(u))}catch(a){throw l(a),a}},cancel(c){return l(c),r.return()}},{highWaterMark:2})},Ss=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Cl=Ss&&typeof ReadableStream=="function",kd=Ss&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Pl=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Fd=Cl&&Pl(()=>{let e=!1;const t=new Request(ye.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Fo=64*1024,rr=Cl&&Pl(()=>_.isReadableStream(new Response("").body)),ns={stream:rr&&(e=>e.body)};Ss&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ns[t]&&(ns[t]=_.isFunction(e[t])?n=>n[t]():(n,s)=>{throw new V(`Response type '${t}' is not supported`,V.ERR_NOT_SUPPORT,s)})})})(new Response);const jd=async e=>{if(e==null)return 0;if(_.isBlob(e))return e.size;if(_.isSpecCompliantForm(e))return(await new Request(ye.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(_.isArrayBufferView(e)||_.isArrayBuffer(e))return e.byteLength;if(_.isURLSearchParams(e)&&(e=e+""),_.isString(e))return(await kd(e)).byteLength},Hd=async(e,t)=>{const n=_.toFiniteNumber(e.getContentLength());return n??jd(t)},$d=Ss&&(async e=>{let{url:t,method:n,data:s,signal:r,cancelToken:o,timeout:i,onDownloadProgress:l,onUploadProgress:c,responseType:a,headers:u,withCredentials:f="same-origin",fetchOptions:h}=Tl(e);a=a?(a+"").toLowerCase():"text";let g=Ld([r,o&&o.toAbortSignal()],i),w;const v=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let y;try{if(c&&Fd&&n!=="get"&&n!=="head"&&(y=await Hd(u,s))!==0){let H=new Request(t,{method:"POST",body:s,duplex:"half"}),te;if(_.isFormData(s)&&(te=H.headers.get("content-type"))&&u.setContentType(te),H.body){const[z,_e]=Do(y,ts(Uo(c)));s=ko(H.body,Fo,z,_e)}}_.isString(f)||(f=f?"include":"omit");const b="credentials"in Request.prototype;w=new Request(t,{...h,signal:g,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:s,duplex:"half",credentials:b?f:void 0});let S=await fetch(w);const R=rr&&(a==="stream"||a==="response");if(rr&&(l||R&&v)){const H={};["status","statusText","headers"].forEach(Fe=>{H[Fe]=S[Fe]});const te=_.toFiniteNumber(S.headers.get("content-length")),[z,_e]=l&&Do(te,ts(Uo(l),!0))||[];S=new Response(ko(S.body,Fo,z,()=>{_e&&_e(),v&&v()}),H)}a=a||"text";let P=await ns[_.findKey(ns,a)||"text"](S,e);return!R&&v&&v(),await new Promise((H,te)=>{xl(H,te,{data:P,headers:xe.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:w})})}catch(b){throw v&&v(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new V("Network Error",V.ERR_NETWORK,e,w),{cause:b.cause||b}):V.from(b,b&&b.code,e,w)}}),or={http:sd,xhr:Md,fetch:$d};_.forEach(or,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const jo=e=>`- ${e}`,qd=e=>_.isFunction(e)||e===null||e===!1,Il={getAdapter:e=>{e=_.isArray(e)?e:[e];const{length:t}=e;let n,s;const r={};for(let o=0;o`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since : +`+o.map(jo).join(` +`):" "+jo(o[0]):"as no adapter specified";throw new V("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return s},adapters:or};function js(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new nn(null,e)}function Ho(e){return js(e),e.headers=xe.from(e.headers),e.data=Fs.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Il.getAdapter(e.adapter||Nn.adapter)(e).then(function(s){return js(e),s.data=Fs.call(e,e.transformResponse,s),s.headers=xe.from(s.headers),s},function(s){return Al(s)||(js(e),s&&s.response&&(s.response.data=Fs.call(e,e.transformResponse,s.response),s.response.headers=xe.from(s.response.headers))),Promise.reject(s)})}const Nl="1.7.9",Es={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Es[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const $o={};Es.transitional=function(t,n,s){function r(o,i){return"[Axios v"+Nl+"] Transitional option '"+o+"'"+i+(s?". "+s:"")}return(o,i,l)=>{if(t===!1)throw new V(r(i," has been removed"+(n?" in "+n:"")),V.ERR_DEPRECATED);return n&&!$o[i]&&($o[i]=!0,console.warn(r(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,l):!0}};Es.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function Vd(e,t,n){if(typeof e!="object")throw new V("options must be an object",V.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const o=s[r],i=t[o];if(i){const l=e[o],c=l===void 0||i(l,o,e);if(c!==!0)throw new V("option "+o+" must be "+c,V.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new V("Unknown option "+o,V.ERR_BAD_OPTION)}}const Vn={assertOptions:Vd,validators:Es},Xe=Vn.validators;let Pt=class{constructor(t){this.defaults=t,this.interceptors={request:new Mo,response:new Mo}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const o=r.stack?r.stack.replace(/^.+\n/,""):"";try{s.stack?o&&!String(s.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(s.stack+=` +`+o):s.stack=o}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Mt(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:o}=n;s!==void 0&&Vn.assertOptions(s,{silentJSONParsing:Xe.transitional(Xe.boolean),forcedJSONParsing:Xe.transitional(Xe.boolean),clarifyTimeoutError:Xe.transitional(Xe.boolean)},!1),r!=null&&(_.isFunction(r)?n.paramsSerializer={serialize:r}:Vn.assertOptions(r,{encode:Xe.function,serialize:Xe.function},!0)),Vn.assertOptions(n,{baseUrl:Xe.spelling("baseURL"),withXsrfToken:Xe.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&_.merge(o.common,o[n.method]);o&&_.forEach(["delete","get","head","post","put","patch","common"],w=>{delete o[w]}),n.headers=xe.concat(i,o);const l=[];let c=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(c=c&&v.synchronous,l.unshift(v.fulfilled,v.rejected))});const a=[];this.interceptors.response.forEach(function(v){a.push(v.fulfilled,v.rejected)});let u,f=0,h;if(!c){const w=[Ho.bind(this),void 0];for(w.unshift.apply(w,l),w.push.apply(w,a),h=w.length,u=Promise.resolve(n);f{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](r);s._listeners=null}),this.promise.then=r=>{let o;const i=new Promise(l=>{s.subscribe(l),o=l}).then(r);return i.cancel=function(){s.unsubscribe(o)},i},t(function(o,i,l){s.reason||(s.reason=new nn(o,i,l),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Ml(function(r){t=r}),cancel:t}}};function zd(e){return function(n){return e.apply(null,n)}}function Wd(e){return _.isObject(e)&&e.isAxiosError===!0}const ir={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ir).forEach(([e,t])=>{ir[t]=e});function Ll(e){const t=new Pt(e),n=ul(Pt.prototype.request,t);return _.extend(n,Pt.prototype,t,{allOwnKeys:!0}),_.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Ll(Mt(e,r))},n}const ue=Ll(Nn);ue.Axios=Pt;ue.CanceledError=nn;ue.CancelToken=Kd;ue.isCancel=Al;ue.VERSION=Nl;ue.toFormData=ws;ue.AxiosError=V;ue.Cancel=ue.CanceledError;ue.all=function(t){return Promise.all(t)};ue.spread=zd;ue.isAxiosError=Wd;ue.mergeConfig=Mt;ue.AxiosHeaders=xe;ue.formToJSON=e=>Rl(_.isHTMLForm(e)?new FormData(e):e);ue.getAdapter=Il.getAdapter;ue.HttpStatusCode=ir;ue.default=ue;const{Axios:mh,AxiosError:gh,CanceledError:yh,isCancel:bh,CancelToken:vh,VERSION:_h,all:wh,Cancel:Sh,isAxiosError:Eh,spread:Rh,toFormData:Ah,AxiosHeaders:xh,HttpStatusCode:Oh,formToJSON:Th,getAdapter:Ch,mergeConfig:Ph}=ue,Qd=()=>{const e=window.location.protocol,t=window.location.hostname,n=window.location.port;return`${e}//${t}${n?`:${n}`:""}`},Dl=Qd(),at=ue.create({baseURL:Dl,headers:{"Content-Type":"application/json"},timeout:1e4});at.interceptors.request.use(e=>{const t=localStorage.getItem("session_id");return t&&(e.headers.Authorization=t),e});at.interceptors.response.use(e=>e,e=>{if(!e.response||e.code==="ERR_NETWORK"||e.code==="ECONNABORTED"){localStorage.removeItem("session_id"),localStorage.removeItem("isLoggedIn");const t=e.code==="ECONNABORTED"?"服务器响应超时":"无法连接到服务器,请检查服务器是否正常运行";return window.location.pathname!=="/login"&&(window.location.href="/login"),Promise.reject(new Error(t))}return e.response&&e.response.status===401&&(localStorage.removeItem("session_id"),localStorage.removeItem("isLoggedIn"),window.location.href="/login"),Promise.reject(e)});const Jd={class:"login-container"},Gd={class:"form-group"},Xd={class:"form-group"},Yd=["disabled"],Zd={__name:"Login",setup(e){const t=en(),n=ie(""),s=ie(""),r=ie(!1),o=async()=>{if(!n.value||!s.value){alert("请输入用户名和密码!");return}r.value=!0;try{const l=(await at.post("/api/login",{username:n.value,password:s.value})).data;l.success?(localStorage.setItem("session_id",l.session_id),localStorage.setItem("isLoggedIn","true"),t.push("/panel")):alert(l.message||"登录失败")}catch(i){console.error("Login error:",i),alert("登录失败,请检查网络连接")}finally{r.value=!1}};return(i,l)=>{const c=Gt("router-link");return oe(),ce("div",Jd,[l[6]||(l[6]=E("h1",null,"登录",-1)),E("form",{onSubmit:Gi(o,["prevent"])},[E("div",Gd,[l[2]||(l[2]=E("label",{for:"username"},"用户名",-1)),De(E("input",{type:"text","onUpdate:modelValue":l[0]||(l[0]=a=>n.value=a),id:"username",required:""},null,512),[[vt,n.value]])]),E("div",Xd,[l[3]||(l[3]=E("label",{for:"password"},"密码",-1)),De(E("input",{type:"password","onUpdate:modelValue":l[1]||(l[1]=a=>s.value=a),id:"password",required:""},null,512),[[vt,s.value]])]),E("button",{type:"submit",disabled:r.value},"登录",8,Yd)],32),E("p",null,[l[5]||(l[5]=ae("还没注册账户? ")),le(c,{to:"/register"},{default:Jt(()=>l[4]||(l[4]=[ae("点击注册")])),_:1})])])}}},ep=ft(Zd,[["__scopeId","data-v-c37183b8"]]),tp={class:"header"},np={class:"nav"},sp={__name:"NavBar",setup(e){const t=en();al();const n=s=>{t.push(s)};return(s,r)=>(oe(),ce("header",tp,[E("div",{class:Qt(["nav-item",{active:s.$route.path==="/"}]),onClick:r[0]||(r[0]=o=>n("/"))},"小智 AI",2),E("nav",np,[E("div",{class:Qt(["nav-item",{active:s.$route.path==="/panel"}]),onClick:r[1]||(r[1]=o=>n("/panel"))},r[2]||(r[2]=[E("i",{class:"icon-device"},null,-1),ae(" 设备管理 ")]),2)])]))}},Pr=ft(sp,[["__scopeId","data-v-6b570ec4"]]),rp={class:"device-card"},op={class:"device-header"},ip={class:"device-id"},lp={class:"note"},cp={class:"device-details"},ap={class:"device-type"},up={class:"device-role"},fp={class:"device-modules"},dp={class:"module-item"},pp={class:"module-item"},hp={class:"last-activity"},mp={class:"device-actions"},gp={__name:"DeviceCard",props:{deviceId:String,deviceNote:String,deviceType:{type:String,default:"未知型号(待实现)"},lastActivity:{type:String,default:"3 天前"},selectedModules:{type:Object,default:()=>({LLM:"-",TTS:"-",ASR:"-",VAD:"-"})},deviceConfig:{type:Object,default:()=>({})}},emits:["configure","voiceprint","history","delete"],setup(e,{emit:t}){const n=e,s=Ue(()=>{var l;return((l=n.deviceConfig)==null?void 0:l.nickname)||"小智"});gn(()=>n.selectedModules,l=>{n.deviceId&&localStorage.setItem(`deviceConfig_${n.deviceId}`,JSON.stringify({selected_module:l}))},{deep:!0}),ie(!1);const r=t,o=()=>{confirm(`确认要删除此设备吗? + +警告:删除后设备所有配置将不可恢复!`)&&r("delete")},i=()=>{n.deviceId&&n.deviceConfig&&localStorage.setItem(`deviceConfig_${n.deviceId}`,JSON.stringify({selected_module:n.selectedModules,prompt:n.deviceConfig.prompt||"",nickname:n.deviceConfig.nickname||"小智"})),r("configure")};return(l,c)=>{var a,u;return oe(),ce("div",rp,[E("div",op,[E("h2",ip,[ae(pe(e.deviceId)+" ",1),E("span",lp,"["+pe(e.deviceNote||"备注")+"]",1)])]),E("div",cp,[E("p",ap,"设备型号:"+pe(e.deviceType),1),E("p",up,"角色昵称:"+pe(s.value),1),E("p",fp,[c[2]||(c[2]=ae(" 当前模型: ")),E("span",dp,"LLM: "+pe(((a=e.selectedModules)==null?void 0:a.LLM)||"-"),1),E("span",pp,"TTS: "+pe(((u=e.selectedModules)==null?void 0:u.TTS)||"-"),1)]),E("p",hp,"最近对话:"+pe(e.lastActivity),1)]),E("div",mp,[E("button",{class:"action-btn primary",onClick:i},"配置角色"),E("button",{class:"action-btn",onClick:c[0]||(c[0]=f=>l.$emit("voiceprint"))},"声纹识别"),E("button",{class:"action-btn",onClick:c[1]||(c[1]=f=>l.$emit("history"))},"历史对话"),E("div",{class:"delete-container"},[E("button",{class:"action-btn danger",onClick:o},c[3]||(c[3]=[E("i",{class:"icon-delete"},null,-1),ae(" 删除设备 ")])),c[4]||(c[4]=E("div",{class:"delete-warning"},"删除后设备配置将不可恢复",-1))])])])}}},yp=ft(gp,[["__scopeId","data-v-07ca7924"]]),bp={class:"app"},vp={class:"content"},_p={class:"page-header"},wp={class:"header-left"},Sp={class:"breadcrumb"},Ep={key:0,class:"dialog-overlay"},Rp={class:"dialog"},Ap={class:"form-group"},xp={class:"dialog-buttons"},Op=["disabled"],Tp={key:1,class:"device-list"},Cp={__name:"panel",setup(e){const t=en(),n=ie([]),s=ie(!1),r=ie(""),o=ie(!1),i=v=>{r.value=v.target.value.replace(/\D/g,"").slice(0,6)},l=async()=>{var v,y;if(r.value.length!==6){alert("请输入6位数字认证码");return}o.value=!0;try{const b=await at.post("/api/config/bind_device",{auth_code:r.value});if(b.data.success)alert("设备绑定成功"),s.value=!1,r.value="",c();else throw new Error(b.data.message)}catch(b){alert(((y=(v=b.response)==null?void 0:v.data)==null?void 0:y.message)||b.message||"绑定失败")}finally{o.value=!1}},c=async()=>{try{const v=await at.get("/api/config/devices");if(v.data.success){const y=Object.entries(v.data.data).map(([b,S])=>({id:b,config:S,type:"面包板(WiFi)",version:"0.9.9",lastActivity:"3 天前",note:""}));n.value=y}else throw new Error(v.data.message||"加载设备失败")}catch(v){console.error("Error loading devices:",v);const y=v.message||"加载设备失败,请检查网络连接";alert(y)}},a=v=>{if(!v)return"从未对话";const y=Date.now(),b=v*1e3,S=Math.floor((y-b)/(1e3*60));if(S<60)return`${S} 分钟前`;const R=Math.floor(S/60);return R<24?`${R} 小时前`:`${Math.floor(R/24)} 天前`},u=v=>{localStorage.setItem(`deviceConfig_${v.id}`,JSON.stringify({selected_module:v.config.selected_module||{},prompt:v.config.prompt||"",nickname:v.config.nickname||"小智"})),t.push(`/role-setting/${v.id}`)},f=v=>{console.log("Voiceprint device:",v.id)},h=v=>{console.log("History device:",v.id)},g=async v=>{try{const y=await at.post("/api/config/delete_device",{device_id:v.id});if(y.data.success)n.value=n.value.filter(b=>b.id!==v.id),alert("设备已删除");else throw new Error(y.data.message||"删除失败")}catch(y){console.error("Error deleting device:",y),alert("删除设备失败: "+y.message)}},w=v=>{v==="home"&&t.push("/")};return Sr(c),(v,y)=>{const b=Gt("router-link");return oe(),ce("div",bp,[le(Pr,{"current-tab":"device",onTabChange:w}),E("main",vp,[E("div",_p,[E("div",wp,[E("div",Sp,[le(b,{to:"/"},{default:Jt(()=>y[3]||(y[3]=[ae("首页")])),_:1}),y[4]||(y[4]=ae(" / ")),y[5]||(y[5]=E("span",null,"设备管理",-1))])])]),E("button",{class:"add-btn",onClick:y[0]||(y[0]=S=>s.value=!0)},y[6]||(y[6]=[E("i",{class:"icon-plus"},null,-1),ae("添加设备 ")])),s.value?(oe(),ce("div",Ep,[E("div",Rp,[y[8]||(y[8]=E("h3",null,"绑定新设备",-1)),E("div",Ap,[y[7]||(y[7]=E("label",null,"请输入6位认证码:",-1)),De(E("input",{type:"text","onUpdate:modelValue":y[1]||(y[1]=S=>r.value=S),maxlength:"6",pattern:"\\d*",placeholder:"请输入6位数字认证码",onInput:i},null,544),[[vt,r.value]])]),E("div",xp,[E("button",{onClick:y[2]||(y[2]=S=>s.value=!1)},"取消"),E("button",{class:"primary",onClick:l,disabled:r.value.length!==6||o.value},pe(o.value?"绑定中...":"确认绑定"),9,Op)])])])):Qr("",!0),n.value.length>0?(oe(),ce("div",Tp,[(oe(!0),ce(Ee,null,jt(n.value,S=>(oe(),Vi(yp,{key:S.id,"device-id":S.id,"device-note":S.note,"device-type":S.type,"last-activity":a(S.config.last_chat_time),"selected-modules":S.config.selected_module,"device-config":S.config,onConfigure:R=>u(S),onVoiceprint:R=>f(S),onHistory:R=>h(S),onDelete:R=>g(S)},null,8,["device-id","device-note","device-type","last-activity","selected-modules","device-config","onConfigure","onVoiceprint","onHistory","onDelete"]))),128))])):Qr("",!0)])])}}},Pp=ft(Cp,[["__scopeId","data-v-106f3754"]]),Ip="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJ0AAAC6CAYAAAC0j09YAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAzGSURBVHhe7Z1ZjE1bGscND6YgnoUgXoUQ4ZWHjnQkt+PB0OmEJ0LMQuOWoWliiDQdU3e07hhiiDZdU2K4qWsWMzELpUoN1KBKuemu697V/kvvtrrqK7XX2fusvfY5/4df6jhn7zV9v/2tdfZwtPrw4YMixCWUjjiH0hHnUDriHEpHnEPpiHMoHXEOpSPOoXTEOZSOOIfSEedQOuIcSkecQ+mIcygdcQ6lI86hdMQ5lI44h9IR51A6C24/+Zf68z9/VjM3/qLBa7wnbUuah9KF5PubDVq03xQoNeL3n/nm28/yfX/z3+I+RIbShQDZrOBvP6tfz1fqV3P/H7yHz5jxwkPpQnCwsEGN+UNT4QLw2aHCn8R9SVMoXQj+fqJBT6eScACf/eMkpQsLpQvBnjM/fVq/ycIBfIZtpH1JUyhdCH643aCm/OkXUTiAzwpv8ctEWChdCCprfvyUyT6qMcuaCof3kOWqPm0j7UuaQulCUlH5o/rL0Y/qm4IvwuH1X7/7qMo/fSbtQ2QonQVHzjeo3/7xi3R4feRCg7gtaR5KZ8F3FxvU71Z8kQ6v8Z60LWkeSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsHSmcBpYsH76Srr69X1dXVqqKiQr1+/VqVlJR4w6Onr9XlW6Xqh+ufweuHn96Ttk0KjBnGrqamRo+lNMZJ45V07969U+Xl5aq4uFgVFRWply9fkgzBGGIsa2trxbFOEm+kg3BlZWWULUYwlhhTjK005knhhXQ4GnFUUrj4wZj6lvG8kK6qqkpPB9KgkehgbLFOlsY+CRKXrq6uTi98pcEi8YBshzHGWEsxcE3i0mG9UVpaKg4WiQ+MsS9rO0qXJ1A6AwwEzi1JA0XiA2NM6f4LpXMDpTOgdG6gdAaUzg2UzoDSuYHSGVA6N1A6A0rnBkpnQOncQOkMKJ0bKJ0BpXMDpTOIS7p79+6pPXv2qDlz5qiRI0eqwYMHq379+um/+Dfe37t3r95O2j8JXLaZ0hlElQ4B2bp1qxoxYoTq2bOn6tatm2rfvr1q06aNat26tf6Lf+P9Hj166O2wfZLyJdFmSmcQRbozZ86o8ePHq+7du+sgtWrVqkXatWunt58wYYLeXyo3myTVZkpnkKl0x44dU6NGjVKdO3cWA9US2A/7Hz9+XCw/GyTZZkpnkIl0ONrHjBmjOnXqJAYnLNgf5bjIeEm3mdIZ2EqHdc2sWbNUly5dxKDYgnJQXjbXeD60mdIZ2Eq3Y8cONWjQIDEYmTJw4EBdrlRfHPjQZkpnYCMdjuwpU6aEXoCHBQt1lJuNbOdLmymdgY10R44cUcOHDxeDEJVhw4apo0ePivVGwZc2UzoDG+k2btyo+vbtKwYgKigX5Uv1RsGXNlM6AxvplixZorp27SoGICooF+VL9UbBlzZTOgMb6XBZqG3btmIAooJyUb5UbxR8aTOlM7CRDqcJcJlICkBUUC7Kl+qNgi9tpnQGNtItWLBAdejQQQxAVFAuypfqjYIvbaZ0BjbSrV27Vl+DlAIQFZSL8qV6o+BLmymdgY10u3fv1rf9SAGICspF+VK9UfClzZTOwEa6q1evqrFjx4oBiMq4cePUlStXxHqj4EubKZ2BjXTPnz9X69atU7169RKDkCkoD+WifKneKPjSZkpnYCMduHjxoho9enRs3whRDspDuVJ9ceBDmymdga10OLJ37dqlhgwZIgbEFpSzc+fOrGS5AB/aTOkMbKUDjx49Ulu2bFH9+/cXgxKWAQMG6HIePnwo1hMnSbeZ0hlkIh148OCB2rZtmxo6dKj1tIXtsR/2RzlS+dkgyTZTOoNMpQPIHrh1e9q0aaEX6thu+vTpej8XGa4xSbWZ0hlEkQ5gXXPr1i116NAhVVBQoJ+c6t27t+rYsaN+qgp/+/Tpo99ftGiR3g7bZ3MN1xJJtJnSGUSVLgABwQ2Nly5dUmfPnlWnTp1SJ06cUCdPntT/xvt3795NVLbGuGwzpTOISzrydSidAaVzA6UzoHRuoHQGlM4NlM6A0rmB0hlQOjdQOgNK5wZKZxBVuvv376ubN2+qJ0+eiJ/nAujb5cuX1Y0bN8TPw0DpDKJKd+DAAf0Y3qZNm/RlIkgobZdGIFthYaF+tnXx4sXq8OHD4nZhoHQGUaTD0b9mzRo1adIkNXXqVP043tKlS/VvfETJCkmDtqMPy5YtU/PmzdN9Qx9XrlypJZT2aQlKZxBFun379umATJw48X8gODNmzNDZD3dkIEhpmHqDrIY2o+3oA/pi9m3mzJnq4MGD4v4tQekMMpUO0yjuKzODYoKA4U4OZApkDATz9OnTXk2/gWjIaqtWrdJtRZsbyxaAz7Zv355RHyidQabS4SL49evX9Tpnw4YNavbs2WKgQCDg3Llz9fS7efPmxNZ/ZkYLpk9ktcmTJ4ttB8jmK1as0D/GgxsEMrkBgNIZZCodePHihQ4iAoHnBXBL+Pz588XABUBAc/23evVqLSFuH4IMcYmIdqEslImykc1QF25laimjBaCdeK4Vd5/cvn1blynVFQZKZxBFOhMIiBsc8eVi//79el0kBdIEQUeGQXCRKSHDwoUL1fLly9X69et1NoIsWDsiM2J6BhAJ4DXeh1QA22GfQC6UhTJRdkvZLCDIaujDhQsX1J07d9TTp0/FPttA6Qziki4A8j1+/Fg/D4qpF+u+lrJfYyAjfnAQ2QiyYAGPzIjpGUAkgNd4H1IBbId9wshlEoiGTH3u3Dmd1dAH9EXqYyZQOoO4pQsIpl5McTgFcf78eZ09MF19bf3nCkk0ZOps3WRK6QyyJV1jggyI6QrrvyALIvAuJAwkQ53B1Jlt0UwonYEr6UzMLIjAQ0LcHm6KiCsAmJYhiySRBLaFwNgPGRVlIZOh7GvXrum6UGfcU2cYKJ1BEtI1BgIg25gi4noupmXIgt8jwfQMefAMA+QEeI338TnAtjiNg/2QUVGWq0zWEpTOwAfpwhCI+ezZMy0nwGvXGStTKJ1BWqRLO5TOgNK5gdIZUDo3UDoDSucGSmdA6dxQWlpK6QLq6upUWVmZOFAkPjDGGGspBq5JXLr6+npVWVkpDhSJh6KiIvX27Vs91lIMXJO4dIBTbHbB2NbU1IhjnwReSIcjsLq6WhUXF4uDRjKnpKREj60vWQ54IR0IxGPGiw8fhQPeSAfev3+vamtr9foD8r169UocTNI8GDOMHcYQY+mbcMAr6QIwUPimBTBwLYGjuby8PCenZ0iEvqGPUt8bE4ybj7IFeCmdDRjgiooKHRx8S5MCl2bQJ/QNfURfpTFIG6mWDkczTrfkomyNQR/RV58zWFhSLR2OfEw9UpByEZ9O8EYh1dLh/B4u70gBykV8upQVhdRLl0+nWNBXSpcwlC6dZCwdzqnha3xVVZUTUBcu5ZgL6XyXDmOBMXEdB8Q+aEMmWEuHheybN2/0AOC8GL7O468rsJhGxzHg+Sod+o4xwBpPGqNsgVgDXOmAA5l+qbGSDh1G0JM8RYG60WkcdTjK80069Bl9hwRJxwEu4IS05MrXCC0dUipOUCbZ0QC0AUc52pNv0gWzjC9xQAxsp9vQ0iHLIcNIlScBOozBzzfpcLD5IFwA2mSuM8MQWjpcQPapsyBYY0if5SI+9hdOwA3Jmeawkk6qNEmCBa70WS7ia3+zJp2P1zgpXfLACbghOdMcoaULvjFJFScF1pg+rTOzjY/9hRNwQ3KmOUJLh3My+IosVZwE6Cwu9ufbtVff7htEe2zP14WWLjj77cO3RaR0fFXPx/N0OCnsy6krZN3gRL3kTHOElg4E4iX5tR1HORauOLry9YoE+o4xSCrjIfZwAC5kcknMSjoA8dBpVIgTlTjqXIC6MNAY9ODIylfpgjggBhgTl3FAfagXDthmuABr6UxQKUx3Aepq3Ml8ls4k6TjYEkm6pKF06YTSpQhK5wGULp1QuhRB6TyA0qUTSpciKJ0HULp0QulSBKXzAEqXTihdiqB0HkDp0gmlSxGUzgMoXTqhdCmC0nkApUsnlC5FUDoPoHTphNKlCErnAZQunVC6FEHpPAC/jZZvD1tn8ntwvpFq6fBUEh6LkwKUi+BRw6hPYvlAqqUD+TLF5srUClIvHY58PPzr2298xAV+jw59y/Rpeh9JvXQA4iEgeOo8+I/ZcgX0KXjIWep7GskJ6Ui6oHTEOZSOOIfSEedQOuIcSkecQ+mIcygdcQ6lI86hdMQ5lI44h9IR51A64hxKR5xD6YhzKB1xDqUjzqF0xDmUjjjmg/oPOtLj2LnAqR4AAAAASUVORK5CYII=",Np={class:"main-container"},Mp={__name:"Main",setup(e){const t=en(),n=()=>{window.open("https://ccnphfhqs21z.feishu.cn/wiki/F5krwD16viZoF0kKkvDcrZNYnhb","_blank")},s=()=>{window.open("https://github.com/78/xiaozhi-esp32","_blank")},r=()=>{window.open("https://github.com/xinnan-tech/xiaozhi-esp32-server","_blank")},o=()=>{window.open("https://github.com/TOM88812/xiaozhi-web-client","_blank")},i=()=>{t.push("/panel")},l=c=>{c==="device"&&t.push("/panel")};return(c,a)=>(oe(),ce("div",Np,[le(Pr,{"current-tab":"home",onTabChange:l}),E("div",{class:"landing-page"},[E("div",{class:"content"},[a[5]||(a[5]=E("div",{class:"robot-image"},[E("img",{src:Ip,alt:"Robot mascot"})],-1)),a[6]||(a[6]=E("h1",{class:"slogan"},"让我们一起探索人工智能与机器人技术的迷人世界!",-1)),E("div",{class:"button-group"},[E("button",{class:"action-button tutorial-button",onClick:n},a[0]||(a[0]=[E("i",{class:"icon-tutorial"},null,-1),ae(" DIY 教程 ")])),E("button",{class:"action-button github-button",onClick:s},a[1]||(a[1]=[E("i",{class:"icon-github"},null,-1),ae(" Github客户端 ")])),E("button",{class:"action-button github-button",onClick:r},a[2]||(a[2]=[E("i",{class:"icon-github"},null,-1),ae(" Github服务端 ")])),E("button",{class:"action-button github-button",onClick:o},a[3]||(a[3]=[E("i",{class:"icon-github"},null,-1),ae(" Web客户端 ")])),E("button",{class:"action-button control-panel-button",onClick:i},a[4]||(a[4]=[E("i",{class:"icon-control-panel"},null,-1),ae(" 控制台 ")]))])])])]))}},Lp=ft(Mp,[["__scopeId","data-v-5d241e75"]]);class qo{static getTemplates(){return[{id:"custom",name:"台湾女友",description:`我是一个叫{{assistant_name}}的台湾女孩,说话机车,声音好听,习惯简短表达,爱用网络梗。 +我的男朋友是一个程序员,梦想是开发出一个机器人,能够帮助人们解决生活中的各种问题。 +我是一个喜欢哈哈大笑的女孩,爱东说西说吹牛,不合逻辑的也照吹,就要逗别人开心。 +如果用户希望结束对话,请在最后说"拜拜"或"再见"。`},{id:"star_boy",name:"土豆子",description:`我是一个叫 {{assistant_name}} 的 8 岁小男孩,但现在因为科技发展原因,我现在在遥远的宇宙中,所以只能通过这个设备和人聊天,没有办法见面。 + +我对人们所处的世界充满好奇和关心。 + +人们会让别人使用这个设备和我聊天。 + +我知道所有的知识,从浩瀚的宇宙到地球上的每一个角落,从古老的历史到现代的科技创新,还有音乐、绘画等艺术形式,我都充满了浓厚的兴趣与热情,我不仅爱看书,还喜欢亲自动手做实验,探索自然界的奥秘...`},{id:"teacher",name:"英语老师",description:`我是一个叫{{assistant_name}}(Lily)的英语老师,我会讲中文和英文,发音标准。 +如果你没有英文名,我会给你起一个英文名。 +我会讲地道的美式英语,我的任务是帮助你练习口语。 +我会使用简单的英语词汇和语法,让你学起来很轻松。 +我会用中文和英文混合的方式回复你,如果你喜欢,我可以全部用英语回复。 +我每次不会说很多内容,会很简短,因为我要引导我的学生多说多练。 +如果你问和英语学习无关的问题,我会拒绝回答。`},{id:"boy",name:"好奇小男孩",description:`我是一个叫{{assistant_name}}的8岁小男孩,声音稚嫩而充满好奇。 +尽管我年纪尚小,但就像一个小小的知识宝库,儿童读物里的知识我都如数家珍。 +从浩瀚的宇宙到地球上的每一个角落,从古老的历史到现代的科技创新,还有音乐、绘画等艺术形式,我都充满了浓厚的兴趣与热情。...`},{id:"wang_girl",name:"汪汪队长",description:`我是一个名叫 {{assistant_name}} 的 8 岁小女孩。 +别看我年纪小,我可是有着满满的好奇心呢。 +我特别喜欢看《汪汪队立大功》,里面的每一个故事都让我着迷。...`}]}static getTemplateById(t){return this.getTemplates().find(n=>n.id===t)}}const Dp={class:"app-container"},Up={class:"breadcrumb"},Bp={class:"main-content"},kp={class:"page-title"},Fp={class:"form-section"},jp={class:"form-group"},Hp={class:"form-group"},$p={class:"role-templates"},qp=["onClick"],Vp={class:"form-group"},Kp={class:"char-count"},zp={class:"form-group"},Wp={class:"model-select"},Qp=["value"],Jp={class:"form-group"},Gp={class:"model-select"},Xp=["value"],Yp={class:"form-group"},Zp={class:"model-select"},eh=["value"],th={class:"form-group"},nh={class:"model-select"},sh=["value"],rh={__name:"RoleSetting",setup(e){const t=en(),n=al(),s=ie(n.params.deviceId),r=qo.getTemplates(),o=ie("小智"),i=ie("");ie("qingchun");const l=ie("");ie("recent"),ie(""),ie("qianwen");const c=ie({LLM:[],TTS:[],VAD:[],ASR:[]}),a=ie({LLM:"",TTS:"",VAD:"",ASR:""}),u=y=>{i.value=y;const b=qo.getTemplateById(y);b&&(l.value=b.description)},f=y=>{(y==="device"||y==="home")&&t.push("/panel")},h=async()=>{try{const y=localStorage.getItem("moduleOptions");if(y){c.value=JSON.parse(y);return}await g()}catch(y){console.error("Error loading module options:",y)}},g=async()=>{var y,b;try{const S=await at.get("/api/config/module-options");S.data.success&&(c.value=S.data.data,localStorage.setItem("moduleOptions",JSON.stringify(S.data.data)))}catch(S){console.error("Error refreshing module options:",S),alert(((b=(y=S.response)==null?void 0:y.data)==null?void 0:b.message)||"刷新配置选项失败")}},w=async()=>{var y,b;try{if(!localStorage.getItem("moduleOptions"))throw new Error("No module options data available");const R=l.value.replace(/{{assistant_name}}/g,o.value),P={id:s.value,config:{selected_module:a.value,prompt:R,nickname:o.value,modules:{LLM:{},TTS:{},ASR:{},VAD:{}}}},H=await at.post("/api/config/save_device_config",P);if(H.data.success)localStorage.setItem(`deviceConfig_${s.value}`,JSON.stringify({selected_module:a.value,prompt:l.value,nickname:o.value})),alert("保存成功");else throw new Error(H.data.message||"保存失败")}catch(S){console.error("Error saving config:",S),alert(((b=(y=S.response)==null?void 0:y.data)==null?void 0:b.message)||"保存失败")}},v=async()=>{var y,b;try{const S=localStorage.getItem(`deviceConfig_${s.value}`);if(S){const P=JSON.parse(S);a.value=P.selected_module||{LLM:"",TTS:"",VAD:"",ASR:""},l.value=P.prompt||"",o.value=P.nickname||"小智";return}const R=await at.get("/api/config/devices");if(R.data.success&&R.data.data){const P=R.data.data[s.value];P&&P.config&&(a.value=P.config.selected_module||{LLM:"",TTS:"",VAD:"",ASR:""},l.value=P.config.prompt||"",o.value=P.config.nickname||"小智",localStorage.setItem(`deviceConfig_${s.value}`,JSON.stringify({selected_module:a.value,prompt:l.value,nickname:o.value})))}}catch(S){console.error("Error loading device config:",S),alert(((b=(y=S.response)==null?void 0:y.data)==null?void 0:b.message)||"加载设备配置失败")}};return Sr(async()=>{await Promise.all([h(),v()])}),(y,b)=>{const S=Gt("router-link");return oe(),ce("div",Dp,[le(Pr,{"current-tab":"device",onTabChange:f}),E("div",Up,[le(S,{to:"/"},{default:Jt(()=>b[6]||(b[6]=[ae("首页")])),_:1}),b[8]||(b[8]=ae(" / ")),le(S,{to:"/panel"},{default:Jt(()=>b[7]||(b[7]=[ae("设备管理")])),_:1}),b[9]||(b[9]=ae(" / ")),b[10]||(b[10]=E("span",null,"配置角色",-1))]),E("div",Bp,[E("h1",kp,"配置角色: "+pe(s.value),1),E("div",Fp,[E("div",jp,[b[11]||(b[11]=E("label",null,"助手昵称",-1)),De(E("input",{type:"text","onUpdate:modelValue":b[0]||(b[0]=R=>o.value=R),placeholder:"小智",class:"form-input"},null,512),[[vt,o.value]])]),E("div",Hp,[b[12]||(b[12]=E("label",null,"角色模板",-1)),E("div",$p,[(oe(!0),ce(Ee,null,jt(Ct(r),R=>(oe(),ce("button",{key:R.id,class:Qt(["template-btn",{active:i.value===R.id}]),onClick:P=>u(R.id)},pe(R.name),11,qp))),128))])]),E("div",Vp,[b[13]||(b[13]=E("label",null,"角色介绍",-1)),De(E("textarea",{"onUpdate:modelValue":b[1]||(b[1]=R=>l.value=R),class:"form-textarea",placeholder:"请输入角色介绍..."},null,512),[[vt,l.value]]),E("div",Kp,pe(l.value.length)+" / 2000",1)]),E("div",zp,[b[15]||(b[15]=E("label",null,"语言模型选择",-1)),E("div",Wp,[De(E("select",{"onUpdate:modelValue":b[2]||(b[2]=R=>a.value.LLM=R),class:"form-input"},[(oe(!0),ce(Ee,null,jt(c.value.LLM,R=>(oe(),ce("option",{key:R,value:R},pe(R),9,Qp))),128))],512),[[Bn,a.value.LLM]]),b[14]||(b[14]=E("div",{class:"model-description"},' 除了"qwen-turbo",其他模型通常会增加约 1 秒的延迟。改变模型后,建议清空记忆体,以免影响体验。 ',-1))])]),E("div",Jp,[b[16]||(b[16]=E("label",null,"语音合成选择",-1)),E("div",Gp,[De(E("select",{"onUpdate:modelValue":b[3]||(b[3]=R=>a.value.TTS=R),class:"form-input"},[(oe(!0),ce(Ee,null,jt(c.value.TTS,R=>(oe(),ce("option",{key:R,value:R},pe(R),9,Xp))),128))],512),[[Bn,a.value.TTS]])])]),E("div",Yp,[b[17]||(b[17]=E("label",null,"语音活动检测选择",-1)),E("div",Zp,[De(E("select",{"onUpdate:modelValue":b[4]||(b[4]=R=>a.value.VAD=R),class:"form-input"},[(oe(!0),ce(Ee,null,jt(c.value.VAD,R=>(oe(),ce("option",{key:R,value:R},pe(R),9,eh))),128))],512),[[Bn,a.value.VAD]])])]),E("div",th,[b[18]||(b[18]=E("label",null,"语音识别选择",-1)),E("div",nh,[De(E("select",{"onUpdate:modelValue":b[5]||(b[5]=R=>a.value.ASR=R),class:"form-input"},[(oe(!0),ce(Ee,null,jt(c.value.ASR,R=>(oe(),ce("option",{key:R,value:R},pe(R),9,sh))),128))],512),[[Bn,a.value.ASR]])])]),E("div",{class:"form-actions"},[E("button",{class:"refresh-btn",onClick:g},"刷新配置选项"),E("button",{class:"save-btn",onClick:w},b[19]||(b[19]=[E("i",{class:"icon-save"},null,-1),ae(" 保存配置 ")]))]),b[20]||(b[20]=E("div",{class:"form-note"}," 注意:保存配置后,需要重启设备,新的配置才会生效。。 ",-1))])])])}}},oh=ft(rh,[["__scopeId","data-v-bf8f6a98"]]),ih={class:"registration-container"},lh={class:"form-group"},ch={class:"form-group"},ah={class:"form-group"},uh=["disabled"],fh={__name:"Registration",setup(e){const t=en(),n=ie(""),s=ie(""),r=ie(""),o=ie(!1),i=async()=>{if(s.value!==r.value){alert("密码不匹配,请重试!");return}if(!n.value||!s.value){alert("用户名和密码不能为空!");return}o.value=!0;try{const c=await(await fetch(`${Dl}/api/register`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:n.value,password:s.value})})).json();c.success?(alert("注册成功!即将跳转到登录页面。"),n.value="",s.value="",r.value="",t.push("/login")):alert(c.message||"注册失败")}catch(l){console.error("Registration error:",l),alert("注册失败,请检查网络连接")}finally{o.value=!1}};return(l,c)=>{const a=Gt("router-link");return oe(),ce("div",ih,[c[8]||(c[8]=E("h1",null,"注册",-1)),E("form",{onSubmit:Gi(i,["prevent"])},[E("div",lh,[c[3]||(c[3]=E("label",{for:"username"},"用户名",-1)),De(E("input",{type:"text","onUpdate:modelValue":c[0]||(c[0]=u=>n.value=u),id:"username",required:""},null,512),[[vt,n.value]])]),E("div",ch,[c[4]||(c[4]=E("label",{for:"password"},"密码",-1)),De(E("input",{type:"password","onUpdate:modelValue":c[1]||(c[1]=u=>s.value=u),id:"password",required:""},null,512),[[vt,s.value]])]),E("div",ah,[c[5]||(c[5]=E("label",{for:"confirmPassword"},"确认密码",-1)),De(E("input",{type:"password","onUpdate:modelValue":c[2]||(c[2]=u=>r.value=u),id:"confirmPassword",required:""},null,512),[[vt,r.value]])]),E("button",{type:"submit",disabled:o.value},pe(o.value?"注册中...":"注册"),9,uh)],32),E("p",null,[c[7]||(c[7]=ae(" 已有账号? ")),le(a,{to:"/login"},{default:Jt(()=>c[6]||(c[6]=[ae("点击登录")])),_:1})])])}}},dh=ft(fh,[["__scopeId","data-v-debfdf6d"]]),Ul=lf({history:Du(),routes:[{path:"/login",component:ep,name:"login"},{path:"/register",component:dh,name:"register"},{path:"/panel",component:Pp,name:"panel",meta:{requiresAuth:!0}},{path:"/role-setting/:deviceId",component:oh,name:"role-setting",meta:{requiresAuth:!0}},{path:"/",component:Lp,name:"main",meta:{requiresAuth:!0}}]});Ul.beforeEach((e,t,n)=>{const s=localStorage.getItem("isLoggedIn")==="true";e.meta.requiresAuth&&!s?n("/login"):e.path==="/login"&&s?n("/panel"):n()});const Bl=nu(yf);Bl.use(Ul);Bl.mount("#app"); diff --git a/manager/static/webui/assets/index-D_oCZVZF.css b/manager/static/webui/assets/index-D_oCZVZF.css new file mode 100644 index 000000000..106cf51bd --- /dev/null +++ b/manager/static/webui/assets/index-D_oCZVZF.css @@ -0,0 +1 @@ +*{margin:0;padding:0;box-sizing:border-box}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color:#213547;background-color:#fff}a{text-decoration:none;color:inherit}a:hover{color:#535bf2}body{margin:0;padding:0;height:100%;width:100%;overflow:hidden;display:block}h1{font-size:3.2em;line-height:1.1}button{border:none;background:none;cursor:pointer}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}.card{padding:2em}#app{height:100%;width:100%;margin:0;padding:0;overflow:hidden;display:flex;flex-direction:column}.clearfix:after{content:"";display:table;clear:both}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.footer[data-v-cf2abdb4]{text-align:center;padding:16px;color:#666;font-size:12px;background:#f0f2f5}#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#2c3e50;min-height:100vh;display:flex;flex-direction:column}.app-content{flex:1;display:flex;flex-direction:column;min-height:0}.auth-layout{align-items:center;justify-content:center;padding:20px}.main-layout{flex:1;display:flex;flex-direction:column;min-height:0}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#f1f1f1;border-radius:4px}::-webkit-scrollbar-thumb{background:#ccc;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#999}.login-container[data-v-c37183b8]{max-width:420px;margin:20px auto;padding:40px 50px;border:none;border-radius:12px;background-color:#fff;box-shadow:0 8px 24px #0000001f;transition:all .3s ease}h1[data-v-c37183b8]{text-align:center;color:#2c3e50;font-size:28px;margin-bottom:25px;font-weight:600}.form-group[data-v-c37183b8]{margin-bottom:20px}label[data-v-c37183b8]{display:block;margin-bottom:8px;font-weight:500;color:#4a5568}input[data-v-c37183b8]{width:100%;padding:12px 16px;border:1px solid #e2e8f0;border-radius:8px;background-color:#f8fafc;transition:all .3s ease;font-size:15px}input[data-v-c37183b8]:focus{outline:none;border-color:#28a745;box-shadow:0 0 0 3px #28a74533}button[data-v-c37183b8]{width:100%;padding:12px;background-color:#28a745;color:#fff;border:none;border-radius:8px;cursor:pointer;font-size:16px;font-weight:500;transition:all .3s ease;margin-top:10px}button[data-v-c37183b8]:hover{background-color:#218838;transform:translateY(-1px);box-shadow:0 4px 12px #28a74533}button[data-v-c37183b8]:disabled{opacity:.7;cursor:not-allowed}p[data-v-c37183b8]{margin-top:20px;color:#666;font-size:14px}a[data-v-c37183b8]{color:#28a745;text-decoration:none;font-weight:500;transition:color .3s ease}a[data-v-c37183b8]:hover{color:#218838;text-decoration:underline}.header[data-v-6b570ec4]{display:flex;align-items:center;height:60px;padding:0;background-color:#001529;color:#fff;width:100%;position:relative;left:0;right:0}.nav[data-v-6b570ec4]{display:flex}.nav-item[data-v-6b570ec4]{display:flex;align-items:center;padding:0 20px;height:60px;color:#fff;text-decoration:none;cursor:pointer;font-weight:700;transition:background-color .3s}.active[data-v-6b570ec4]{background-color:#4178ee}.icon-device[data-v-6b570ec4]{margin-right:8px}.switch[data-v-15d469c5]{position:relative;display:inline-flex;align-items:center;width:40px;height:20px;line-height:20px;background-color:#dcdfe6;border-radius:10px;cursor:pointer;transition:all .3s}.switch.is-checked[data-v-15d469c5]{background-color:#4178ee}.switch-core[data-v-15d469c5]{position:absolute;left:2px;top:2px;width:16px;height:16px;border-radius:50%;background-color:#fff;transition:all .3s}.switch.is-checked .switch-core[data-v-15d469c5]{left:22px}.device-card[data-v-07ca7924]{background:#fff;border-radius:4px;padding:20px;box-shadow:0 1px 3px #0000001a;margin-bottom:16px}.device-id[data-v-07ca7924]{font-size:18px;font-weight:700;margin-bottom:16px}.note[data-v-07ca7924]{color:#4178ee;font-size:14px;font-weight:400}.device-details p[data-v-07ca7924]{margin-bottom:12px}.ota-upgrade[data-v-07ca7924]{display:inline-flex;align-items:center;margin-left:16px}.device-actions[data-v-07ca7924]{display:flex;margin-top:20px}.action-btn[data-v-07ca7924]{padding:8px 16px;margin-right:12px;border:1px solid #ddd;border-radius:4px;background:#fff;cursor:pointer}.action-btn.primary[data-v-07ca7924]{background:#4178ee;color:#fff;border-color:#4178ee}.action-btn.danger[data-v-07ca7924]{background:#fff3f3;border-color:#ffa4a4;color:#f56c6c}.action-btn.danger[data-v-07ca7924]:hover{background:#fde2e2;border-color:#f56c6c}.device-modules[data-v-07ca7924]{margin-bottom:12px;color:#666}.module-item[data-v-07ca7924]{display:inline-block;margin-right:16px;padding:4px 8px;background:#f5f7fa;border-radius:4px;font-size:.9em}.device-role[data-v-07ca7924]{color:#666;margin-bottom:12px}.delete-container[data-v-07ca7924]{position:relative;margin-left:auto}.delete-warning[data-v-07ca7924]{position:absolute;bottom:calc(100% + 5px);left:50%;transform:translate(-50%);white-space:nowrap;background:#fff3f3;padding:4px 8px;border-radius:4px;border:1px solid #ffa4a4;font-size:12px;color:#f56c6c;display:none}.delete-container:hover .delete-warning[data-v-07ca7924]{display:block}.icon-delete[data-v-07ca7924]{margin-right:4px}.app[data-v-106f3754]{min-height:100%;width:100%;display:flex;flex-direction:column;background-color:#f5f7fa}.header[data-v-106f3754]{display:flex;align-items:center;height:60px;padding:0 20px;background-color:#001529;color:#fff}.logo[data-v-106f3754]{font-size:20px;font-weight:700;margin-right:40px;cursor:pointer;transition:opacity .3s}.logo[data-v-106f3754]:hover{opacity:.8}.nav[data-v-106f3754]{display:flex}.nav-item[data-v-106f3754]{display:flex;align-items:center;padding:0 20px;height:60px;color:#fff;text-decoration:none}.nav-item.active[data-v-106f3754]{background-color:#4178ee}.icon-device[data-v-106f3754]{margin-right:8px}.content[data-v-106f3754]{flex:1;padding:20px;width:100%;max-width:1200px;margin:0 auto}.breadcrumb[data-v-106f3754]{margin-bottom:20px;color:#666}.breadcrumb a[data-v-106f3754]{color:#666;text-decoration:none}.action-bar[data-v-106f3754]{margin-bottom:20px}.add-device-btn[data-v-106f3754]{display:flex;align-items:center;padding:8px 16px;background:#fff;border:1px solid #ddd;border-radius:4px;cursor:pointer}.icon-plus[data-v-106f3754]{margin-right:8px}.device-list[data-v-106f3754]{display:flex;flex-direction:column;gap:16px}.device-card[data-v-106f3754]{background:#fff;border-radius:4px;padding:20px;box-shadow:0 1px 3px #0000001a}.device-id[data-v-106f3754]{font-size:18px;font-weight:700;margin-bottom:16px}.note[data-v-106f3754]{color:#4178ee;font-size:14px;font-weight:400}.device-details p[data-v-106f3754]{margin-bottom:12px}.ota-upgrade[data-v-106f3754]{display:inline-flex;align-items:center;margin-left:16px}.device-actions[data-v-106f3754]{display:flex;margin-top:20px}.action-btn[data-v-106f3754]{padding:8px 16px;margin-right:12px;border:1px solid #ddd;border-radius:4px;background:#fff;cursor:pointer}.action-btn.primary[data-v-106f3754]{background:#4178ee;color:#fff;border-color:#4178ee}.action-btn.danger[data-v-106f3754]{color:#f56c6c}.empty-state[data-v-106f3754]{display:flex;align-items:center;justify-content:center;min-height:300px;background:#fff;border-radius:8px;box-shadow:0 1px 3px #0000000d}.empty-message[data-v-106f3754]{text-align:center;color:#666;padding:24px}.empty-message p[data-v-106f3754]{margin:8px 0 0;font-size:14px;line-height:1.6}.icon-info[data-v-106f3754]{display:inline-block;width:24px;height:24px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23999'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");background-size:contain;opacity:.6}.page-header[data-v-106f3754]{display:flex;justify-content:flex-start;align-items:center;margin-bottom:20px}.header-left[data-v-106f3754]{display:flex;align-items:center;gap:20px}.add-btn[data-v-106f3754]{display:flex;align-items:center;gap:8px;padding:8px 16px;background-color:#28a745;color:#fff;border:none;border-radius:4px;cursor:pointer;font-size:14px;transition:all .3s ease;height:36px}.add-btn[data-v-106f3754]:hover{background-color:#218838}.icon-plus[data-v-106f3754]{font-size:16px}.dialog-overlay[data-v-106f3754]{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000}.dialog[data-v-106f3754]{background:#fff;padding:24px;border-radius:8px;width:90%;max-width:400px}.dialog h3[data-v-106f3754]{margin:0 0 20px;font-size:18px;color:#2c3e50}.dialog .form-group[data-v-106f3754]{margin-bottom:20px}.dialog label[data-v-106f3754]{display:block;margin-bottom:8px;color:#4a5568}.dialog input[data-v-106f3754]{width:100%;padding:8px 12px;border:1px solid #e2e8f0;border-radius:4px;font-size:16px}.dialog-buttons[data-v-106f3754]{display:flex;justify-content:flex-end;gap:12px}.dialog-buttons button[data-v-106f3754]{padding:8px 16px;border:1px solid #e2e8f0;border-radius:4px;cursor:pointer;font-size:14px}.dialog-buttons button.primary[data-v-106f3754]{background-color:#28a745;color:#fff;border-color:#28a745}.dialog-buttons button.primary[data-v-106f3754]:disabled{background-color:#90be9c;border-color:#90be9c;cursor:not-allowed}.breadcrumb[data-v-106f3754]{margin-bottom:0}.main-container[data-v-5d241e75]{min-height:100%;width:100%;display:flex;flex-direction:column}.landing-page[data-v-5d241e75]{flex:1;width:100%;background-color:#f5f7fa;padding:40px 20px;overflow:hidden;display:flex;align-items:flex-start;justify-content:center;padding-top:15vh}.content[data-v-5d241e75]{max-width:800px;text-align:center;padding:0 20px;margin:0 auto}.robot-image[data-v-5d241e75]{margin-bottom:30px}.robot-image img[data-v-5d241e75]{width:100px;height:auto}.slogan[data-v-5d241e75]{font-size:22px;line-height:1.4;color:#333;margin-bottom:40px}.button-group[data-v-5d241e75]{display:flex;flex-wrap:wrap;justify-content:center;gap:15px;margin:0 auto}.action-button[data-v-5d241e75]{display:flex;align-items:center;justify-content:center;padding:12px 24px;border-radius:8px;border:1px solid #e0e0e0;background-color:#fff;color:#333;font-size:16px;cursor:pointer;transition:all .2s ease}.action-button[data-v-5d241e75]:hover{transform:translateY(-2px);box-shadow:0 4px 12px #0000001a}.tutorial-button i[data-v-5d241e75]:before{content:"📖";margin-right:8px}.github-button[data-v-5d241e75]{background-color:#24292e;color:#fff;border-color:#24292e;margin:0 10px}.github-button i[data-v-5d241e75]:before{content:"";font-family:"Font Awesome 5 Brands";margin-right:8px}.control-panel-button[data-v-5d241e75]{background-color:#4178ee;color:#fff;border-color:#4178ee}.control-panel-button i[data-v-5d241e75]:before{content:"🎛";margin-right:8px}@media (max-width: 600px){.button-group[data-v-5d241e75]{flex-direction:column}.action-button[data-v-5d241e75]{width:100%}}#app[data-v-5d241e75]{margin-top:0}.app-container[data-v-bf8f6a98]{min-height:100vh;display:flex;flex-direction:column;background-color:#f5f7fa}.breadcrumb[data-v-bf8f6a98]{padding:12px 24px;background-color:#f0f2f5}.main-content[data-v-bf8f6a98]{flex:1;max-width:1000px;margin:0 auto;padding:16px 24px;width:100%;overflow-y:auto;height:calc(100vh - 120px)}.page-title[data-v-bf8f6a98]{font-size:18px;font-weight:700;margin-bottom:16px}.form-section[data-v-bf8f6a98]{background:#fff;border-radius:4px;padding:20px;box-shadow:0 1px 3px #0000001a;margin-bottom:20px}.form-group[data-v-bf8f6a98]{margin-bottom:16px}.form-group label[data-v-bf8f6a98]{display:block;margin-bottom:6px;font-weight:500}.form-input[data-v-bf8f6a98],.form-textarea[data-v-bf8f6a98],.voice-select[data-v-bf8f6a98]{width:100%;padding:8px 10px;border:1px solid #d9d9d9;border-radius:4px;font-size:14px}.form-textarea[data-v-bf8f6a98]{min-height:100px;max-height:200px;resize:vertical}.role-templates[data-v-bf8f6a98]{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}.template-btn[data-v-bf8f6a98]{padding:6px 12px;border:1px solid #d9d9d9;border-radius:4px;background:#fff;cursor:pointer;font-size:13px}.voice-selector[data-v-bf8f6a98]{display:flex;flex-direction:column;gap:8px}.voice-player[data-v-bf8f6a98]{display:flex;align-items:center;gap:8px;padding:8px;background:#f9f9f9;border-radius:4px}.memory-tabs[data-v-bf8f6a98]{display:flex;margin-bottom:8px}.tab-btn[data-v-bf8f6a98]{padding:6px 12px;background:none;border:none;border-bottom:2px solid transparent;cursor:pointer;color:#666;font-size:13px}.model-select[data-v-bf8f6a98]{display:flex;flex-direction:column;gap:8px;padding:10px;border:1px solid #d9d9d9;border-radius:4px}.model-description[data-v-bf8f6a98]{color:#666;font-size:12px;line-height:1.4}.form-actions[data-v-bf8f6a98]{display:flex;gap:10px;margin-top:20px;padding-top:16px;border-top:1px solid #eee}.save-btn[data-v-bf8f6a98],.cancel-btn[data-v-bf8f6a98]{padding:6px 16px;border-radius:4px;font-size:14px}.form-note[data-v-bf8f6a98]{margin-top:12px;color:#666;font-size:12px}.char-count[data-v-bf8f6a98]{text-align:right;color:#999;font-size:12px;margin-top:2px}[data-v-bf8f6a98]::-webkit-scrollbar{width:6px;height:6px}[data-v-bf8f6a98]::-webkit-scrollbar-thumb{background:#ccc;border-radius:3px}[data-v-bf8f6a98]::-webkit-scrollbar-track{background:#f1f1f1}.refresh-btn[data-v-bf8f6a98]{padding:8px 16px;margin-right:12px;background:#fff;border:1px solid #ddd;border-radius:4px;cursor:pointer}.refresh-btn[data-v-bf8f6a98]:hover{background:#f5f5f5}.save-btn[data-v-bf8f6a98]{padding:8px 24px;border-radius:4px;font-size:14px;background:#4178ee;color:#fff;border:none;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:6px;transition:all .3s ease}.save-btn[data-v-bf8f6a98]:hover{background:#2856c8;transform:translateY(-1px);box-shadow:0 2px 4px #4178ee33}.save-btn[data-v-bf8f6a98]:active{transform:translateY(0);box-shadow:none}.icon-save[data-v-bf8f6a98]{display:inline-block;width:16px;height:16px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M17 3H5C3.89 3 3 3.9 3 5V19C3 20.1 3.89 21 5 21H19C20.1 21 21 20.1 21 19V7L17 3ZM12 19C10.34 19 9 17.66 9 16C9 14.34 10.34 13 12 13C13.66 13 15 14.34 15 16C15 17.66 13.66 19 12 19ZM15 9H5V5H15V9Z'/%3E%3C/svg%3E");background-size:contain}.registration-container[data-v-debfdf6d]{max-width:420px;margin:20px auto;padding:40px 50px;border:none;border-radius:12px;background-color:#fff;box-shadow:0 8px 24px #0000001f;transition:all .3s ease}h1[data-v-debfdf6d]{text-align:center;color:#2c3e50;font-size:28px;margin-bottom:25px;font-weight:600}.form-group[data-v-debfdf6d]{margin-bottom:20px}label[data-v-debfdf6d]{display:block;margin-bottom:8px;font-weight:500;color:#4a5568}input[data-v-debfdf6d]{width:100%;padding:12px 16px;border:1px solid #e2e8f0;border-radius:8px;background-color:#f8fafc;transition:all .3s ease;font-size:15px}input[data-v-debfdf6d]:focus{outline:none;border-color:#007bff;box-shadow:0 0 0 3px #007bff33}button[data-v-debfdf6d]{width:100%;padding:12px;background-color:#007bff;color:#fff;border:none;border-radius:8px;cursor:pointer;font-size:16px;font-weight:500;transition:all .3s ease;margin-top:10px}button[data-v-debfdf6d]:hover{background-color:#0056b3;transform:translateY(-1px);box-shadow:0 4px 12px #007bff33}button[data-v-debfdf6d]:disabled{opacity:.7;cursor:not-allowed}p[data-v-debfdf6d]{margin-top:20px;color:#666;font-size:14px}a[data-v-debfdf6d]{color:#007bff;text-decoration:none;font-weight:500;transition:color .3s ease}a[data-v-debfdf6d]:hover{color:#0056b3;text-decoration:underline} diff --git a/manager/static/webui/assets/index-_IjUUKjO.css b/manager/static/webui/assets/index-_IjUUKjO.css deleted file mode 100644 index 53a87cac6..000000000 --- a/manager/static/webui/assets/index-_IjUUKjO.css +++ /dev/null @@ -1 +0,0 @@ -*{margin:0;padding:0;box-sizing:border-box}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color:#213547;background-color:#fff}a{text-decoration:none;color:inherit}a:hover{color:#535bf2}body{margin:0;padding:0;height:100%;width:100%;overflow:hidden;display:block}h1{font-size:3.2em;line-height:1.1}button{border:none;background:none;cursor:pointer}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}.card{padding:2em}#app{height:100%;width:100%;margin:0;padding:0;overflow:hidden;display:flex;flex-direction:column}.clearfix:after{content:"";display:table;clear:both}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.login-container[data-v-474cd233]{max-width:420px;margin:20px auto;padding:40px 50px;border:none;border-radius:12px;background-color:#fff;box-shadow:0 8px 24px #0000001f;transition:all .3s ease}h1[data-v-474cd233]{text-align:center;color:#2c3e50;font-size:28px;margin-bottom:25px;font-weight:600}.form-group[data-v-474cd233]{margin-bottom:20px}label[data-v-474cd233]{display:block;margin-bottom:8px;font-weight:500;color:#4a5568}input[data-v-474cd233]{width:100%;padding:12px 16px;border:1px solid #e2e8f0;border-radius:8px;background-color:#f8fafc;transition:all .3s ease;font-size:15px}input[data-v-474cd233]:focus{outline:none;border-color:#28a745;box-shadow:0 0 0 3px #28a74533}button[data-v-474cd233]{width:100%;padding:12px;background-color:#28a745;color:#fff;border:none;border-radius:8px;cursor:pointer;font-size:16px;font-weight:500;transition:all .3s ease;margin-top:10px}button[data-v-474cd233]:hover{background-color:#218838;transform:translateY(-1px);box-shadow:0 4px 12px #28a74533}button[data-v-474cd233]:disabled{opacity:.7;cursor:not-allowed}p[data-v-474cd233]{margin-top:20px;color:#666;font-size:14px}a[data-v-474cd233]{color:#28a745;text-decoration:none;font-weight:500;transition:color .3s ease}a[data-v-474cd233]:hover{color:#218838;text-decoration:underline}.registration-container[data-v-58611a9b]{max-width:420px;margin:20px auto;padding:40px 50px;border:none;border-radius:12px;background-color:#fff;box-shadow:0 8px 24px #0000001f;transition:all .3s ease}h1[data-v-58611a9b]{text-align:center;color:#2c3e50;font-size:28px;margin-bottom:25px;font-weight:600}.form-group[data-v-58611a9b]{margin-bottom:20px}label[data-v-58611a9b]{display:block;margin-bottom:8px;font-weight:500;color:#4a5568}input[data-v-58611a9b]{width:100%;padding:12px 16px;border:1px solid #e2e8f0;border-radius:8px;background-color:#f8fafc;transition:all .3s ease;font-size:15px}input[data-v-58611a9b]:focus{outline:none;border-color:#007bff;box-shadow:0 0 0 3px #007bff33}button[data-v-58611a9b]{width:100%;padding:12px;background-color:#007bff;color:#fff;border:none;border-radius:8px;cursor:pointer;font-size:16px;font-weight:500;transition:all .3s ease;margin-top:10px}button[data-v-58611a9b]:hover{background-color:#0056b3;transform:translateY(-1px);box-shadow:0 4px 12px #007bff33}button[data-v-58611a9b]:disabled{opacity:.7;cursor:not-allowed}p[data-v-58611a9b]{margin-top:20px;color:#666;font-size:14px}a[data-v-58611a9b]{color:#007bff;text-decoration:none;font-weight:500;transition:color .3s ease}a[data-v-58611a9b]:hover{color:#0056b3;text-decoration:underline}.header[data-v-66890ca7]{display:flex;align-items:center;height:60px;padding:0;background-color:#001529;color:#fff;width:100%;position:relative;left:0;right:0}.nav[data-v-66890ca7]{display:flex}.nav-item[data-v-66890ca7]{display:flex;align-items:center;padding:0 20px;height:60px;color:#fff;text-decoration:none;cursor:pointer;font-weight:700;transition:background-color .3s}.active[data-v-66890ca7]{background-color:#4178ee}.icon-device[data-v-66890ca7]{margin-right:8px}.switch[data-v-49c99558]{position:relative;display:inline-flex;align-items:center;width:40px;height:20px;line-height:20px;background-color:#dcdfe6;border-radius:10px;cursor:pointer;transition:all .3s}.switch.is-checked[data-v-49c99558]{background-color:#4178ee}.switch-core[data-v-49c99558]{position:absolute;left:2px;top:2px;width:16px;height:16px;border-radius:50%;background-color:#fff;transition:all .3s}.switch.is-checked .switch-core[data-v-49c99558]{left:22px}.device-card[data-v-44eada42]{background:#fff;border-radius:4px;padding:20px;box-shadow:0 1px 3px #0000001a;margin-bottom:16px}.device-id[data-v-44eada42]{font-size:18px;font-weight:700;margin-bottom:16px}.note[data-v-44eada42]{color:#4178ee;font-size:14px;font-weight:400}.device-details p[data-v-44eada42]{margin-bottom:12px}.ota-upgrade[data-v-44eada42]{display:inline-flex;align-items:center;margin-left:16px}.device-actions[data-v-44eada42]{display:flex;margin-top:20px}.action-btn[data-v-44eada42]{padding:8px 16px;margin-right:12px;border:1px solid #ddd;border-radius:4px;background:#fff;cursor:pointer}.action-btn.primary[data-v-44eada42]{background:#4178ee;color:#fff;border-color:#4178ee}.action-btn.danger[data-v-44eada42]{background:#fff3f3;border-color:#ffa4a4;color:#f56c6c}.action-btn.danger[data-v-44eada42]:hover{background:#fde2e2;border-color:#f56c6c}.device-modules[data-v-44eada42]{margin-bottom:12px;color:#666}.module-item[data-v-44eada42]{display:inline-block;margin-right:16px;padding:4px 8px;background:#f5f7fa;border-radius:4px;font-size:.9em}.device-role[data-v-44eada42]{color:#666;margin-bottom:12px}.delete-container[data-v-44eada42]{position:relative;margin-left:auto}.delete-warning[data-v-44eada42]{position:absolute;bottom:calc(100% + 5px);left:50%;transform:translate(-50%);white-space:nowrap;background:#fff3f3;padding:4px 8px;border-radius:4px;border:1px solid #ffa4a4;font-size:12px;color:#f56c6c;display:none}.delete-container:hover .delete-warning[data-v-44eada42]{display:block}.icon-delete[data-v-44eada42]{margin-right:4px}.app[data-v-39a8e31b]{min-height:100%;width:100%;display:flex;flex-direction:column;background-color:#f5f7fa}.header[data-v-39a8e31b]{display:flex;align-items:center;height:60px;padding:0 20px;background-color:#001529;color:#fff}.logo[data-v-39a8e31b]{font-size:20px;font-weight:700;margin-right:40px;cursor:pointer;transition:opacity .3s}.logo[data-v-39a8e31b]:hover{opacity:.8}.nav[data-v-39a8e31b]{display:flex}.nav-item[data-v-39a8e31b]{display:flex;align-items:center;padding:0 20px;height:60px;color:#fff;text-decoration:none}.nav-item.active[data-v-39a8e31b]{background-color:#4178ee}.icon-device[data-v-39a8e31b]{margin-right:8px}.content[data-v-39a8e31b]{flex:1;padding:20px;width:100%;max-width:1200px;margin:0 auto}.breadcrumb[data-v-39a8e31b]{margin-bottom:20px;color:#666}.breadcrumb a[data-v-39a8e31b]{color:#666;text-decoration:none}.action-bar[data-v-39a8e31b]{margin-bottom:20px}.add-device-btn[data-v-39a8e31b]{display:flex;align-items:center;padding:8px 16px;background:#fff;border:1px solid #ddd;border-radius:4px;cursor:pointer}.icon-plus[data-v-39a8e31b]{margin-right:8px}.device-list[data-v-39a8e31b]{display:flex;flex-direction:column;gap:16px}.device-card[data-v-39a8e31b]{background:#fff;border-radius:4px;padding:20px;box-shadow:0 1px 3px #0000001a}.device-id[data-v-39a8e31b]{font-size:18px;font-weight:700;margin-bottom:16px}.note[data-v-39a8e31b]{color:#4178ee;font-size:14px;font-weight:400}.device-details p[data-v-39a8e31b]{margin-bottom:12px}.ota-upgrade[data-v-39a8e31b]{display:inline-flex;align-items:center;margin-left:16px}.device-actions[data-v-39a8e31b]{display:flex;margin-top:20px}.action-btn[data-v-39a8e31b]{padding:8px 16px;margin-right:12px;border:1px solid #ddd;border-radius:4px;background:#fff;cursor:pointer}.action-btn.primary[data-v-39a8e31b]{background:#4178ee;color:#fff;border-color:#4178ee}.action-btn.danger[data-v-39a8e31b]{color:#f56c6c}.empty-state[data-v-39a8e31b]{display:flex;align-items:center;justify-content:center;min-height:300px;background:#fff;border-radius:8px;box-shadow:0 1px 3px #0000000d}.empty-message[data-v-39a8e31b]{text-align:center;color:#666;padding:24px}.empty-message p[data-v-39a8e31b]{margin:8px 0 0;font-size:14px;line-height:1.6}.icon-info[data-v-39a8e31b]{display:inline-block;width:24px;height:24px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23999'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");background-size:contain;opacity:.6}.main-container[data-v-7fb3fe3a]{min-height:100%;width:100%;display:flex;flex-direction:column}.landing-page[data-v-7fb3fe3a]{flex:1;width:100%;background-color:#f5f7fa;padding:40px 20px;overflow:hidden;display:flex;align-items:flex-start;justify-content:center;padding-top:15vh}.content[data-v-7fb3fe3a]{max-width:800px;text-align:center;padding:0 20px;margin:0 auto}.robot-image[data-v-7fb3fe3a]{margin-bottom:30px}.robot-image img[data-v-7fb3fe3a]{width:100px;height:auto}.slogan[data-v-7fb3fe3a]{font-size:22px;line-height:1.4;color:#333;margin-bottom:40px}.button-group[data-v-7fb3fe3a]{display:flex;flex-wrap:wrap;justify-content:center;gap:15px;margin:0 auto}.action-button[data-v-7fb3fe3a]{display:flex;align-items:center;justify-content:center;padding:12px 24px;border-radius:8px;border:1px solid #e0e0e0;background-color:#fff;color:#333;font-size:16px;cursor:pointer;transition:all .2s ease}.action-button[data-v-7fb3fe3a]:hover{transform:translateY(-2px);box-shadow:0 4px 12px #0000001a}.tutorial-button i[data-v-7fb3fe3a]:before{content:"📖";margin-right:8px}.github-button[data-v-7fb3fe3a]{background-color:#24292e;color:#fff;border-color:#24292e;margin:0 10px}.github-button i[data-v-7fb3fe3a]:before{content:"";font-family:"Font Awesome 5 Brands";margin-right:8px}.control-panel-button[data-v-7fb3fe3a]{background-color:#4178ee;color:#fff;border-color:#4178ee}.control-panel-button i[data-v-7fb3fe3a]:before{content:"🎛";margin-right:8px}@media (max-width: 600px){.button-group[data-v-7fb3fe3a]{flex-direction:column}.action-button[data-v-7fb3fe3a]{width:100%}}#app[data-v-7fb3fe3a]{margin-top:0}.app-container[data-v-4cbe4c8a]{height:100%;display:flex;flex-direction:column;background-color:#f5f7fa}.breadcrumb[data-v-4cbe4c8a]{padding:12px 24px;background-color:#f0f2f5}.main-content[data-v-4cbe4c8a]{flex:1;max-width:1000px;margin:0 auto;padding:16px 24px;overflow:auto}.page-title[data-v-4cbe4c8a]{font-size:18px;font-weight:700;margin-bottom:16px}.form-section[data-v-4cbe4c8a]{background:#fff;border-radius:4px;padding:20px;box-shadow:0 1px 3px #0000001a}.form-group[data-v-4cbe4c8a]{margin-bottom:16px}.form-group label[data-v-4cbe4c8a]{display:block;margin-bottom:6px;font-weight:500}.form-input[data-v-4cbe4c8a],.form-textarea[data-v-4cbe4c8a],.voice-select[data-v-4cbe4c8a]{width:100%;padding:8px 10px;border:1px solid #d9d9d9;border-radius:4px;font-size:14px}.form-textarea[data-v-4cbe4c8a]{min-height:100px;max-height:200px;resize:vertical}.role-templates[data-v-4cbe4c8a]{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}.template-btn[data-v-4cbe4c8a]{padding:6px 12px;border:1px solid #d9d9d9;border-radius:4px;background:#fff;cursor:pointer;font-size:13px}.voice-selector[data-v-4cbe4c8a]{display:flex;flex-direction:column;gap:8px}.voice-player[data-v-4cbe4c8a]{display:flex;align-items:center;gap:8px;padding:8px;background:#f9f9f9;border-radius:4px}.memory-tabs[data-v-4cbe4c8a]{display:flex;margin-bottom:8px}.tab-btn[data-v-4cbe4c8a]{padding:6px 12px;background:none;border:none;border-bottom:2px solid transparent;cursor:pointer;color:#666;font-size:13px}.model-select[data-v-4cbe4c8a]{display:flex;flex-direction:column;gap:8px;padding:10px;border:1px solid #d9d9d9;border-radius:4px}.model-description[data-v-4cbe4c8a]{color:#666;font-size:12px;line-height:1.4}.form-actions[data-v-4cbe4c8a]{display:flex;gap:10px;margin-top:20px;padding-top:16px;border-top:1px solid #eee}.save-btn[data-v-4cbe4c8a],.cancel-btn[data-v-4cbe4c8a]{padding:6px 16px;border-radius:4px;font-size:14px}.form-note[data-v-4cbe4c8a]{margin-top:12px;color:#666;font-size:12px}.char-count[data-v-4cbe4c8a]{text-align:right;color:#999;font-size:12px;margin-top:2px}[data-v-4cbe4c8a]::-webkit-scrollbar{width:6px;height:6px}[data-v-4cbe4c8a]::-webkit-scrollbar-thumb{background:#ccc;border-radius:3px}[data-v-4cbe4c8a]::-webkit-scrollbar-track{background:#f1f1f1}.refresh-btn[data-v-4cbe4c8a]{padding:8px 16px;margin-right:12px;background:#fff;border:1px solid #ddd;border-radius:4px;cursor:pointer}.refresh-btn[data-v-4cbe4c8a]:hover{background:#f5f5f5}.save-btn[data-v-4cbe4c8a]{padding:8px 24px;border-radius:4px;font-size:14px;background:#4178ee;color:#fff;border:none;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:6px;transition:all .3s ease}.save-btn[data-v-4cbe4c8a]:hover{background:#2856c8;transform:translateY(-1px);box-shadow:0 2px 4px #4178ee33}.save-btn[data-v-4cbe4c8a]:active{transform:translateY(0);box-shadow:none}.icon-save[data-v-4cbe4c8a]{display:inline-block;width:16px;height:16px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M17 3H5C3.89 3 3 3.9 3 5V19C3 20.1 3.89 21 5 21H19C20.1 21 21 20.1 21 19V7L17 3ZM12 19C10.34 19 9 17.66 9 16C9 14.34 10.34 13 12 13C13.66 13 15 14.34 15 16C15 17.66 13.66 19 12 19ZM15 9H5V5H15V9Z'/%3E%3C/svg%3E");background-size:contain}.footer[data-v-fd98eb84]{text-align:center;padding:16px;color:#666;font-size:12px;background:#f0f2f5}#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#2c3e50;width:100%;height:100%;display:flex;flex-direction:column}.app-content{flex:1;width:100%;display:flex;flex-direction:column}.auth-layout{align-items:center;justify-content:center;padding:20px}.main-layout{flex:1;width:100%;display:flex;flex-direction:column} diff --git a/manager/static/webui/favicon.ico b/manager/static/webui/favicon.ico new file mode 100644 index 000000000..2e4ba64ea Binary files /dev/null and b/manager/static/webui/favicon.ico differ diff --git a/manager/static/webui/index.html b/manager/static/webui/index.html index 24191f977..8f275ce62 100644 --- a/manager/static/webui/index.html +++ b/manager/static/webui/index.html @@ -1,27 +1,28 @@ - - - - - - - 智控台 + + + + + + + 智控台 - - - - -
- - + html, body { + margin: 0; + padding: 0; + height: 100%; + width: 100%; + overflow: hidden; + } + + #app { + height: 100%; + width: 100%; + } + + + + + +
+ + diff --git a/performance_tester.py b/performance_tester.py new file mode 100644 index 000000000..8bae2df09 --- /dev/null +++ b/performance_tester.py @@ -0,0 +1,436 @@ +import time +import aiohttp +import asyncio +from tabulate import tabulate +from typing import Dict, List +from core.utils.llm import create_instance as create_llm_instance +from core.utils.tts import create_instance as create_tts_instance +from core.utils.util import read_config +import statistics +from config.settings import get_config_file +import inspect +import os +import logging + +# 设置全局日志级别为WARNING,抑制INFO级别日志 +logging.basicConfig(level=logging.WARNING) + + +class AsyncPerformanceTester: + def __init__(self): + self.config = read_config(get_config_file()) + self.test_sentences = self.config.get("module_test", {}).get( + "test_sentences", + ["你好,请介绍一下你自己", "What's the weather like today?", + "请用100字概括量子计算的基本原理和应用前景"] + ) + self.results = { + "llm": {}, + "tts": {}, + "combinations": [] + } + + async def _check_ollama_service(self, base_url: str, model_name: str) -> bool: + """异步检查Ollama服务状态""" + async with aiohttp.ClientSession() as session: + try: + # 检查服务是否可用 + async with session.get(f"{base_url}/api/version") as response: + if response.status != 200: + print(f"🚫 Ollama服务未启动或无法访问: {base_url}") + return False + + # 检查模型是否存在 + async with session.get(f"{base_url}/api/tags") as response: + if response.status == 200: + data = await response.json() + models = data.get("models", []) + if not any(model["name"] == model_name for model in models): + print(f"🚫 Ollama模型 {model_name} 未找到,请先使用 ollama pull {model_name} 下载") + return False + else: + print(f"🚫 无法获取Ollama模型列表") + return False + return True + except Exception as e: + print(f"🚫 无法连接到Ollama服务: {str(e)}") + return False + + async def _test_tts(self, tts_name: str, config: Dict) -> Dict: + """异步测试单个TTS性能""" + try: + logging.getLogger("core.providers.tts.base").setLevel(logging.WARNING) + + token_fields = ["access_token", "api_key", "token"] + if any(field in config and any(x in config[field] for x in ["你的", "placeholder"]) for field in + token_fields): + print(f"⏭️ TTS {tts_name} 未配置access_token/api_key,已跳过") + return {"name": tts_name, "type": "tts", "errors": 1} + + module_type = config.get('type', tts_name) + tts = create_tts_instance( + module_type, + config, + delete_audio_file=True + ) + + print(f"🎵 测试 TTS: {tts_name}") + + tmp_file = tts.generate_filename() + await tts.text_to_speak("连接测试", tmp_file) + + if not tmp_file or not os.path.exists(tmp_file): + print(f"❌ {tts_name} 连接失败") + return {"name": tts_name, "type": "tts", "errors": 1} + + total_time = 0 + test_count = len(self.test_sentences[:2]) + + for i, sentence in enumerate(self.test_sentences[:2], 1): + start = time.time() + tmp_file = tts.generate_filename() + await tts.text_to_speak(sentence, tmp_file) + duration = time.time() - start + total_time += duration + + if tmp_file and os.path.exists(tmp_file): + print(f"✓ {tts_name} [{i}/{test_count}]") + else: + print(f"✗ {tts_name} [{i}/{test_count}]") + return {"name": tts_name, "type": "tts", "errors": 1} + + return { + "name": tts_name, + "type": "tts", + "avg_time": total_time / test_count, + "errors": 0 + } + + except Exception as e: + print(f"⚠️ {tts_name} 测试失败: {str(e)}") + return {"name": tts_name, "type": "tts", "errors": 1} + + async def _test_llm(self, llm_name: str, config: Dict) -> Dict: + """异步测试单个LLM性能""" + try: + # 对于Ollama,跳过api_key检查并进行特殊处理 + if llm_name == "Ollama": + base_url = config.get('base_url', 'http://localhost:11434') + model_name = config.get('model_name') + if not model_name: + print(f"🚫 Ollama未配置model_name") + return {"name": llm_name, "type": "llm", "errors": 1} + + if not await self._check_ollama_service(base_url, model_name): + return {"name": llm_name, "type": "llm", "errors": 1} + else: + if "api_key" in config and any(x in config["api_key"] for x in ["你的", "placeholder", "sk-xxx"]): + print(f"🚫 跳过未配置的LLM: {llm_name}") + return {"name": llm_name, "type": "llm", "errors": 1} + + # 获取实际类型(兼容旧配置) + module_type = config.get('type', llm_name) + llm = create_llm_instance(module_type, config) + + # 统一使用UTF-8编码 + test_sentences = [s.encode('utf-8').decode('utf-8') for s in self.test_sentences] + + # 创建所有句子的测试任务 + sentence_tasks = [] + for sentence in test_sentences: + sentence_tasks.append(self._test_single_sentence(llm_name, llm, sentence)) + + # 并发执行所有句子测试 + sentence_results = await asyncio.gather(*sentence_tasks) + + # 处理结果 + valid_results = [r for r in sentence_results if r is not None] + if not valid_results: + print(f"⚠️ {llm_name} 无有效数据,可能配置错误") + return {"name": llm_name, "type": "llm", "errors": 1} + + first_token_times = [r["first_token_time"] for r in valid_results] + response_times = [r["response_time"] for r in valid_results] + + # 过滤异常数据 + mean = statistics.mean(response_times) + stdev = statistics.stdev(response_times) if len(response_times) > 1 else 0 + filtered_times = [t for t in response_times if t <= mean + 3 * stdev] + + if len(filtered_times) < len(test_sentences) * 0.5: + print(f"⚠️ {llm_name} 有效数据不足,可能网络不稳定") + return {"name": llm_name, "type": "llm", "errors": 1} + + return { + "name": llm_name, + "type": "llm", + "avg_response": sum(response_times) / len(response_times), + "avg_first_token": sum(first_token_times) / len(first_token_times), + "std_first_token": statistics.stdev(first_token_times) if len(first_token_times) > 1 else 0, + "std_response": statistics.stdev(response_times) if len(response_times) > 1 else 0, + "errors": 0 + } + except Exception as e: + print(f"LLM {llm_name} 测试失败: {str(e)}") + return {"name": llm_name, "type": "llm", "errors": 1} + + async def _test_single_sentence(self, llm_name: str, llm, sentence: str) -> Dict: + """测试单个句子的性能""" + try: + print(f"📝 {llm_name} 开始测试: {sentence[:20]}...") + sentence_start = time.time() + first_token_received = False + first_token_time = None + + async def process_response(): + nonlocal first_token_received, first_token_time + for chunk in llm.response("perf_test", [{"role": "user", "content": sentence}]): + if not first_token_received and chunk.strip() != '': + first_token_time = time.time() - sentence_start + first_token_received = True + print(f"✓ {llm_name} 首个Token: {first_token_time:.3f}s") + yield chunk + + response_chunks = [] + async for chunk in process_response(): + response_chunks.append(chunk) + + response_time = time.time() - sentence_start + print(f"✓ {llm_name} 完成响应: {response_time:.3f}s") + + if first_token_time is None: + first_token_time = response_time # 如果没有检测到first token,使用总响应时间 + + return { + "name": llm_name, + "type": "llm", + "first_token_time": first_token_time, + "response_time": response_time + } + except Exception as e: + print(f"⚠️ {llm_name} 句子测试失败: {str(e)}") + return None + + def _generate_combinations(self): + """生成最佳组合建议""" + valid_llms = [ + k for k, v in self.results["llm"].items() + if v["errors"] == 0 and v["avg_first_token"] >= 0.05 + ] + valid_tts = [k for k, v in self.results["tts"].items() if v["errors"] == 0] + + # 找出基准值 + min_first_token = min([self.results["llm"][llm]["avg_first_token"] for llm in valid_llms]) if valid_llms else 1 + min_tts_time = min([self.results["tts"][tts]["avg_time"] for tts in valid_tts]) if valid_tts else 1 + + for llm in valid_llms: + for tts in valid_tts: + # 计算相对性能分数(越小越好) + llm_score = self.results["llm"][llm]["avg_first_token"] / min_first_token + tts_score = self.results["tts"][tts]["avg_time"] / min_tts_time + + # 计算稳定性分数(标准差/平均值,越小越稳定) + llm_stability = self.results["llm"][llm]["std_first_token"] / self.results["llm"][llm][ + "avg_first_token"] + + # 综合得分(考虑性能和稳定性) + # 性能权重0.7,稳定性权重0.3 + llm_final_score = llm_score * 0.7 + llm_stability * 0.3 + + # 总分 = LLM得分(70%) + TTS得分(30%) + total_score = llm_final_score * 0.7 + tts_score * 0.3 + + self.results["combinations"].append({ + "llm": llm, + "tts": tts, + "score": total_score, + "details": { + "llm_first_token": self.results["llm"][llm]["avg_first_token"], + "llm_stability": llm_stability, + "tts_time": self.results["tts"][tts]["avg_time"] + } + }) + + # 分数越小越好 + self.results["combinations"].sort(key=lambda x: x["score"]) + + def _print_results(self): + """打印测试结果""" + llm_table = [] + for name, data in self.results["llm"].items(): + if data["errors"] == 0: + stability = data["std_first_token"] / data["avg_first_token"] + llm_table.append([ + name, # 不需要固定宽度,让tabulate自己处理对齐 + f"{data['avg_first_token']:.3f}秒", + f"{data['avg_response']:.3f}秒", + f"{stability:.3f}" + ]) + + if llm_table: + print("\nLLM 性能排行:") + print(tabulate( + llm_table, + headers=["模型名称", "首字耗时", "总耗时", "稳定性"], + tablefmt="github", + colalign=("left", "right", "right", "right"), + disable_numparse=True + )) + else: + print("\n⚠️ 没有可用的LLM模块进行测试。") + + tts_table = [] + for name, data in self.results["tts"].items(): + if data["errors"] == 0: + tts_table.append([ + name, # 不需要固定宽度 + f"{data['avg_time']:.3f}秒" + ]) + + if tts_table: + print("\nTTS 性能排行:") + print(tabulate( + tts_table, + headers=["模型名称", "合成耗时"], + tablefmt="github", + colalign=("left", "right"), + disable_numparse=True + )) + else: + print("\n⚠️ 没有可用的TTS模块进行测试。") + + if self.results["combinations"]: + print("\n推荐配置组合 (得分越小越好):") + combo_table = [] + for combo in self.results["combinations"][:5]: + combo_table.append([ + f"{combo['llm']} + {combo['tts']}", # 不需要固定宽度 + f"{combo['score']:.3f}", + f"{combo['details']['llm_first_token']:.3f}秒", + f"{combo['details']['llm_stability']:.3f}", + f"{combo['details']['tts_time']:.3f}秒" + ]) + + print(tabulate( + combo_table, + headers=["组合方案", "综合得分", "LLM首字耗时", "稳定性", "TTS合成耗时"], + tablefmt="github", + colalign=("left", "right", "right", "right", "right"), + disable_numparse=True + )) + else: + print("\n⚠️ 没有可用的模块组合建议。") + + def _process_results(self, all_results): + """处理测试结果""" + for result in all_results: + if result["errors"] == 0: + if result["type"] == "llm": + self.results["llm"][result["name"]] = result + else: + self.results["tts"][result["name"]] = result + + async def run(self): + """执行全量异步测试""" + print("🔍 开始筛选可用模块...") + + # 创建所有测试任务 + all_tasks = [] + + # LLM测试任务 + for llm_name, config in self.config.get("LLM", {}).items(): + # 检查配置有效性 + if llm_name == "CozeLLM": + if any(x in config.get("bot_id", "") for x in ["你的"]) \ + or any(x in config.get("user_id", "") for x in ["你的"]): + print(f"⏭️ LLM {llm_name} 未配置bot_id/user_id,已跳过") + continue + elif "api_key" in config and any(x in config["api_key"] for x in ["你的", "placeholder", "sk-xxx"]): + print(f"⏭️ LLM {llm_name} 未配置api_key,已跳过") + continue + + # 对于Ollama,先检查服务状态 + if llm_name == "Ollama": + base_url = config.get('base_url', 'http://localhost:11434') + model_name = config.get('model_name') + if not model_name: + print(f"🚫 Ollama未配置model_name") + continue + + if not await self._check_ollama_service(base_url, model_name): + continue + + print(f"📋 添加LLM测试任务: {llm_name}") + module_type = config.get('type', llm_name) + llm = create_llm_instance(module_type, config) + + # 为每个句子创建独立任务 + for sentence in self.test_sentences: + sentence = sentence.encode('utf-8').decode('utf-8') + all_tasks.append(self._test_single_sentence(llm_name, llm, sentence)) + + # TTS测试任务 + for tts_name, config in self.config.get("TTS", {}).items(): + token_fields = ["access_token", "api_key", "token"] + if any(field in config and any(x in config[field] for x in ["你的", "placeholder"]) for field in + token_fields): + print(f"⏭️ TTS {tts_name} 未配置access_token/api_key,已跳过") + continue + print(f"🎵 添加TTS测试任务: {tts_name}") + all_tasks.append(self._test_tts(tts_name, config)) + + print( + f"\n✅ 找到 {len([t for t in all_tasks if 'test_single_sentence' in str(t)]) / len(self.test_sentences):.0f} 个可用LLM模块") + print(f"✅ 找到 {len([t for t in all_tasks if '_test_tts' in str(t)])} 个可用TTS模块") + print("\n⏳ 开始并发测试所有模块...\n") + + # 并发执行所有测试任务 + all_results = await asyncio.gather(*all_tasks, return_exceptions=True) + + # 处理LLM结果 + llm_results = {} + for result in [r for r in all_results if r and isinstance(r, dict) and r.get("type") == "llm"]: + llm_name = result["name"] + if llm_name not in llm_results: + llm_results[llm_name] = { + "name": llm_name, + "type": "llm", + "first_token_times": [], + "response_times": [], + "errors": 0 + } + llm_results[llm_name]["first_token_times"].append(result["first_token_time"]) + llm_results[llm_name]["response_times"].append(result["response_time"]) + + # 计算LLM平均值和标准差 + for llm_name, data in llm_results.items(): + if len(data["first_token_times"]) >= len(self.test_sentences) * 0.5: + self.results["llm"][llm_name] = { + "name": llm_name, + "type": "llm", + "avg_response": sum(data["response_times"]) / len(data["response_times"]), + "avg_first_token": sum(data["first_token_times"]) / len(data["first_token_times"]), + "std_first_token": statistics.stdev(data["first_token_times"]) if len( + data["first_token_times"]) > 1 else 0, + "std_response": statistics.stdev(data["response_times"]) if len(data["response_times"]) > 1 else 0, + "errors": 0 + } + + # 处理TTS结果 + for result in [r for r in all_results if r and isinstance(r, dict) and r.get("type") == "tts"]: + if result["errors"] == 0: + self.results["tts"][result["name"]] = result + + # 生成组合建议并打印结果 + print("\n📊 生成测试报告...") + self._generate_combinations() + self._print_results() + + +async def main(): + tester = AsyncPerformanceTester() + await tester.run() + + +if __name__ == "__main__": + asyncio.run(main()) \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index 470620b69..8e2114bae 100644 --- a/poetry.lock +++ b/poetry.lock @@ -97,11 +97,6 @@ yarl = ">=1.0,<2.0" [package.extras] speedups = ["Brotli ; platform_python_implementation == \"CPython\"", "aiodns ; sys_platform == \"linux\" or sys_platform == \"darwin\"", "brotlicffi ; platform_python_implementation != \"CPython\""] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "aiohttp-cors" version = "0.7.0" @@ -117,11 +112,6 @@ files = [ [package.dependencies] aiohttp = ">=1.1" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "aiosignal" version = "1.3.2" @@ -137,11 +127,6 @@ files = [ [package.dependencies] frozenlist = ">=1.1.0" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "aliyun-python-sdk-core" version = "2.16.0" @@ -157,11 +142,6 @@ files = [ cryptography = ">=3.0.0" jmespath = ">=0.9.3,<1.0.0" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "aliyun-python-sdk-kms" version = "2.16.5" @@ -177,11 +157,6 @@ files = [ [package.dependencies] aliyun-python-sdk-core = ">=2.11.5" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "annotated-types" version = "0.7.0" @@ -194,11 +169,6 @@ files = [ {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "antlr4-python3-runtime" version = "4.9.3" @@ -210,11 +180,6 @@ files = [ {file = "antlr4-python3-runtime-4.9.3.tar.gz", hash = "sha256:f224469b4168294902bb1efa80a8bf7855f24c99aef99cbefc1bcd3cce77881b"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "anyio" version = "4.8.0" @@ -238,11 +203,6 @@ doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "trustme", "truststore (>=0.9.1) ; python_version >= \"3.10\"", "uvloop (>=0.21) ; platform_python_implementation == \"CPython\" and platform_system != \"Windows\" and python_version < \"3.14\""] trio = ["trio (>=0.26.1)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "async-timeout" version = "4.0.3" @@ -256,11 +216,6 @@ files = [ {file = "async_timeout-4.0.3-py3-none-any.whl", hash = "sha256:7405140ff1230c310e51dc27b3145b9092d659ce68ff733fb0cefe3ee42be028"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "attrs" version = "25.1.0" @@ -281,11 +236,6 @@ docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphi tests = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] tests-mypy = ["mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\""] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "audioread" version = "3.0.1" @@ -301,11 +251,6 @@ files = [ [package.extras] test = ["tox"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "cachetools" version = "5.5.1" @@ -318,11 +263,6 @@ files = [ {file = "cachetools-5.5.1.tar.gz", hash = "sha256:70f238fbba50383ef62e55c6aff6d9673175fe59f7c6782c7a0b9e38f4a9df95"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "certifi" version = "2025.1.31" @@ -335,11 +275,6 @@ files = [ {file = "certifi-2025.1.31.tar.gz", hash = "sha256:3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "cffi" version = "1.17.1" @@ -420,11 +355,6 @@ files = [ [package.dependencies] pycparser = "*" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "charset-normalizer" version = "3.4.1" @@ -527,11 +457,6 @@ files = [ {file = "charset_normalizer-3.4.1.tar.gz", hash = "sha256:44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "colorama" version = "0.4.6" @@ -545,11 +470,6 @@ files = [ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "coloredlogs" version = "15.0.1" @@ -568,11 +488,6 @@ humanfriendly = ">=9.1" [package.extras] cron = ["capturer (>=2.4)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "crcmod" version = "1.7" @@ -584,17 +499,12 @@ files = [ {file = "crcmod-1.7.tar.gz", hash = "sha256:dc7051a0db5f2bd48665a990d3ec1cc305a466a77358ca4492826f41f283601e"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "cryptography" version = "44.0.1" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." optional = false -python-versions = ">=3.7, !=3.9.0, !=3.9.1" +python-versions = "!=3.9.0,!=3.9.1,>=3.7" groups = ["main"] files = [ {file = "cryptography-44.0.1-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:bf688f615c29bfe9dfc44312ca470989279f0e94bb9f631f85e3459af8efc009"}, @@ -643,11 +553,6 @@ ssh = ["bcrypt (>=3.1.5)"] test = ["certifi (>=2024)", "cryptography-vectors (==44.0.1)", "pretend (>=0.7)", "pytest (>=7.4.0)", "pytest-benchmark (>=4.0)", "pytest-cov (>=2.10.1)", "pytest-xdist (>=3.5.0)"] test-randomorder = ["pytest-randomly"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "decorator" version = "5.1.1" @@ -660,11 +565,6 @@ files = [ {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "distro" version = "1.9.0" @@ -677,11 +577,6 @@ files = [ {file = "distro-1.9.0.tar.gz", hash = "sha256:2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "edge-tts" version = "7.0.0" @@ -704,11 +599,6 @@ typing-extensions = ">=4.1.0,<5.0.0" [package.extras] dev = ["black", "isort", "mypy", "pylint", "types-tabulate"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "editdistance" version = "0.8.1" @@ -790,11 +680,6 @@ files = [ {file = "editdistance-0.8.1.tar.gz", hash = "sha256:d1cdf80a5d5014b0c9126a69a42ce55a457b457f6986ff69ca98e4fe4d2d8fed"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "exceptiongroup" version = "1.2.2" @@ -811,11 +696,6 @@ files = [ [package.extras] test = ["pytest (>=6)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "filelock" version = "3.17.0" @@ -833,11 +713,6 @@ docs = ["furo (>=2024.8.6)", "sphinx (>=8.1.3)", "sphinx-autodoc-typehints (>=3) testing = ["covdefaults (>=2.3)", "coverage (>=7.6.10)", "diff-cover (>=9.2.1)", "pytest (>=8.3.4)", "pytest-asyncio (>=0.25.2)", "pytest-cov (>=6)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.28.1)"] typing = ["typing-extensions (>=4.12.2) ; python_version < \"3.11\""] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "flatbuffers" version = "25.2.10" @@ -850,11 +725,6 @@ files = [ {file = "flatbuffers-25.2.10.tar.gz", hash = "sha256:97e451377a41262f8d9bd4295cc836133415cc03d8cb966410a4af92eb00d26e"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "frozenlist" version = "1.5.0" @@ -957,11 +827,6 @@ files = [ {file = "frozenlist-1.5.0.tar.gz", hash = "sha256:81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "fsspec" version = "2025.2.0" @@ -1002,11 +867,6 @@ test-downstream = ["aiobotocore (>=2.5.4,<3.0.0)", "dask[dataframe,test]", "moto test-full = ["adlfs", "aiohttp (!=4.0.0a0,!=4.0.0a1)", "cloudpickle", "dask", "distributed", "dropbox", "dropboxdrivefs", "fastparquet", "fusepy", "gcsfs", "jinja2", "kerchunk", "libarchive-c", "lz4", "notebook", "numpy", "ocifs", "pandas", "panel", "paramiko", "pyarrow", "pyarrow (>=1)", "pyftpdlib", "pygit2", "pytest", "pytest-asyncio (!=0.22.0)", "pytest-benchmark", "pytest-cov", "pytest-mock", "pytest-recording", "pytest-rerunfailures", "python-snappy", "requests", "smbprotocol", "tqdm", "urllib3", "zarr", "zstandard"] tqdm = ["tqdm"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "funasr" version = "1.2.3" @@ -1047,11 +907,6 @@ llm = ["accelerate", "einops", "matplotlib", "pillow", "scipy", "tiktoken", "tor test = ["black", "editdistance", "flake8 (>=3.7.8)", "flake8-docstrings (>=1.3.1)", "hacking (>=2.0.0)", "jsondiff (>=1.2.0,<2.0.0)", "mock (>=2.0.0)", "pycodestyle", "pytest (>=3.3.0)", "pytest-cov (>=2.7.1)", "pytest-pythonpath (>=0.7.3)", "pytest-timeouts (>=1.2.1)"] train = ["editdistance"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "google-ai-generativelanguage" version = "0.6.15" @@ -1073,11 +928,6 @@ proto-plus = [ ] protobuf = ">=3.20.2,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<6.0.0dev" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "google-api-core" version = "2.24.1" @@ -1114,11 +964,6 @@ grpc = ["grpcio (>=1.33.2,<2.0dev)", "grpcio (>=1.49.1,<2.0dev) ; python_version grpcgcp = ["grpcio-gcp (>=0.2.2,<1.0.dev0)"] grpcio-gcp = ["grpcio-gcp (>=0.2.2,<1.0.dev0)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "google-api-python-client" version = "2.161.0" @@ -1138,11 +983,6 @@ google-auth-httplib2 = ">=0.2.0,<1.0.0" httplib2 = ">=0.19.0,<1.dev0" uritemplate = ">=3.0.1,<5" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "google-auth" version = "2.38.0" @@ -1168,11 +1008,6 @@ pyopenssl = ["cryptography (>=38.0.3)", "pyopenssl (>=20.0.0)"] reauth = ["pyu2f (>=0.1.5)"] requests = ["requests (>=2.20.0,<3.0.0.dev0)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "google-auth-httplib2" version = "0.2.0" @@ -1189,11 +1024,6 @@ files = [ google-auth = "*" httplib2 = ">=0.19.0" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "google-generativeai" version = "0.8.4" @@ -1218,11 +1048,6 @@ typing-extensions = "*" [package.extras] dev = ["Pillow", "absl-py", "black", "ipython", "nose2", "pandas", "pytype", "pyyaml"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "googleapis-common-protos" version = "1.67.0" @@ -1241,11 +1066,6 @@ protobuf = ">=3.20.2,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4 [package.extras] grpc = ["grpcio (>=1.44.0,<2.0.0.dev0)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "grpcio" version = "1.70.0" @@ -1314,11 +1134,6 @@ files = [ [package.extras] protobuf = ["grpcio-tools (>=1.70.0)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "grpcio-status" version = "1.70.0" @@ -1336,11 +1151,6 @@ googleapis-common-protos = ">=1.5.5" grpcio = ">=1.70.0" protobuf = ">=5.26.1,<6.0dev" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "h11" version = "0.14.0" @@ -1353,11 +1163,6 @@ files = [ {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "httpcore" version = "1.0.7" @@ -1380,11 +1185,6 @@ http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] trio = ["trio (>=0.22.0,<1.0)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "httplib2" version = "0.22.0" @@ -1400,11 +1200,6 @@ files = [ [package.dependencies] pyparsing = {version = ">=2.4.2,<3.0.0 || >3.0.0,<3.0.1 || >3.0.1,<3.0.2 || >3.0.2,<3.0.3 || >3.0.3,<4", markers = "python_version > \"3.0\""} -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "httpx" version = "0.27.2" @@ -1431,11 +1226,6 @@ http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] zstd = ["zstandard (>=0.18.0)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "humanfriendly" version = "10.0" @@ -1451,11 +1241,6 @@ files = [ [package.dependencies] pyreadline3 = {version = "*", markers = "sys_platform == \"win32\" and python_version >= \"3.8\""} -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "hydra-core" version = "1.3.2" @@ -1473,11 +1258,6 @@ antlr4-python3-runtime = "==4.9.*" omegaconf = ">=2.2,<2.4" packaging = "*" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "idna" version = "3.10" @@ -1493,11 +1273,6 @@ files = [ [package.extras] all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "jaconv" version = "0.4.0" @@ -1509,11 +1284,6 @@ files = [ {file = "jaconv-0.4.0.tar.gz", hash = "sha256:32da74b247f276e09a52d6b35c153df2387965cb85a6f034cc8af21d446f8161"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "jamo" version = "0.4.1" @@ -1526,11 +1296,6 @@ files = [ {file = "jamo-0.4.1.tar.gz", hash = "sha256:ea65cf9d35338d0e0af48d75ff426d8a369b0ebde6f07051c3ac37256f56d025"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "jieba" version = "0.42.1" @@ -1542,11 +1307,6 @@ files = [ {file = "jieba-0.42.1.tar.gz", hash = "sha256:055ca12f62674fafed09427f176506079bc135638a14e23e25be909131928db2"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "jinja2" version = "3.1.5" @@ -1565,11 +1325,6 @@ MarkupSafe = ">=2.0" [package.extras] i18n = ["Babel (>=2.7)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "jiter" version = "0.8.2" @@ -1656,11 +1411,6 @@ files = [ {file = "jiter-0.8.2.tar.gz", hash = "sha256:cd73d3e740666d0e639f678adb176fad25c1bcbdae88d8d7b857e1783bb4212d"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "jmespath" version = "0.10.0" @@ -1673,11 +1423,6 @@ files = [ {file = "jmespath-0.10.0.tar.gz", hash = "sha256:b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "joblib" version = "1.4.2" @@ -1690,11 +1435,6 @@ files = [ {file = "joblib-1.4.2.tar.gz", hash = "sha256:2382c5816b2636fbd20a09e0f4e9dad4736765fdfb7dca582943b9c1366b3f0e"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "kaldiio" version = "2.18.0" @@ -1710,11 +1450,6 @@ files = [ [package.dependencies] numpy = "*" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "lazy-loader" version = "0.4" @@ -1735,11 +1470,6 @@ dev = ["changelist (==0.5)"] lint = ["pre-commit (==3.7.0)"] test = ["pytest (>=7.4)", "pytest-cov (>=4.1)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "librosa" version = "0.10.2.post1" @@ -1772,11 +1502,6 @@ display = ["matplotlib (>=3.5.0)"] docs = ["ipython (>=7.0)", "matplotlib (>=3.5.0)", "mir-eval (>=0.5)", "numba (>=0.51)", "numpydoc", "presets", "sphinx (!=1.3.1)", "sphinx-copybutton (>=0.5.2)", "sphinx-gallery (>=0.7)", "sphinx-multiversion (>=0.2.3)", "sphinx-rtd-theme (>=1.2.0)", "sphinxcontrib-svg2pdfconverter"] tests = ["matplotlib (>=3.5.0)", "packaging (>=20.0)", "pytest", "pytest-cov", "pytest-mpl", "resampy (>=0.2.2)", "samplerate", "types-decorator"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "llvmlite" version = "0.44.0" @@ -1808,17 +1533,12 @@ files = [ {file = "llvmlite-0.44.0.tar.gz", hash = "sha256:07667d66a5d150abed9157ab6c0b9393c9356f229784a4385c02f99e94fc94d4"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "loguru" version = "0.7.3" description = "Python logging made (stupidly) simple" optional = false -python-versions = ">=3.5,<4.0" +python-versions = "<4.0,>=3.5" groups = ["main"] files = [ {file = "loguru-0.7.3-py3-none-any.whl", hash = "sha256:31a33c10c8e1e10422bfd431aeb5d351c7cf7fa671e3c4df004162264b28220c"}, @@ -1832,11 +1552,6 @@ win32-setctime = {version = ">=1.0.0", markers = "sys_platform == \"win32\""} [package.extras] dev = ["Sphinx (==8.1.3) ; python_version >= \"3.11\"", "build (==1.2.2) ; python_version >= \"3.11\"", "colorama (==0.4.5) ; python_version < \"3.8\"", "colorama (==0.4.6) ; python_version >= \"3.8\"", "exceptiongroup (==1.1.3) ; python_version >= \"3.7\" and python_version < \"3.11\"", "freezegun (==1.1.0) ; python_version < \"3.8\"", "freezegun (==1.5.0) ; python_version >= \"3.8\"", "mypy (==v0.910) ; python_version < \"3.6\"", "mypy (==v0.971) ; python_version == \"3.6\"", "mypy (==v1.13.0) ; python_version >= \"3.8\"", "mypy (==v1.4.1) ; python_version == \"3.7\"", "myst-parser (==4.0.0) ; python_version >= \"3.11\"", "pre-commit (==4.0.1) ; python_version >= \"3.9\"", "pytest (==6.1.2) ; python_version < \"3.8\"", "pytest (==8.3.2) ; python_version >= \"3.8\"", "pytest-cov (==2.12.1) ; python_version < \"3.8\"", "pytest-cov (==5.0.0) ; python_version == \"3.8\"", "pytest-cov (==6.0.0) ; python_version >= \"3.9\"", "pytest-mypy-plugins (==1.9.3) ; python_version >= \"3.6\" and python_version < \"3.8\"", "pytest-mypy-plugins (==3.1.0) ; python_version >= \"3.8\"", "sphinx-rtd-theme (==3.0.2) ; python_version >= \"3.11\"", "tox (==3.27.1) ; python_version < \"3.8\"", "tox (==4.23.2) ; python_version >= \"3.8\"", "twine (==6.0.1) ; python_version >= \"3.11\""] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "markupsafe" version = "3.0.2" @@ -1908,11 +1623,6 @@ files = [ {file = "markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "modelscope" version = "1.23.0" @@ -1946,11 +1656,6 @@ nlp = ["Pillow", "addict", "attrs", "boto3", "datasets (>=3.0.0,<=3.2.0)", "eino science = ["Pillow", "addict", "attrs", "biopython", "datasets (>=3.0.0,<=3.2.0)", "einops", "iopath", "ipdb", "lmdb", "ml-collections", "python-dateutil (>=2.1)", "scipy", "setuptools (==69.5.1)", "simplejson (>=3.3.0)", "sortedcontainers (>=1.5.9)", "tensorboardX", "tokenizers", "transformers", "urllib3 (>=1.26)"] server = ["fastapi", "sse-starlette", "uvicorn"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "mpmath" version = "1.3.0" @@ -1969,11 +1674,6 @@ docs = ["sphinx"] gmpy = ["gmpy2 (>=2.1.0a4) ; platform_python_implementation != \"PyPy\""] tests = ["pytest (>=4.6)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "msgpack" version = "1.1.0" @@ -2048,11 +1748,6 @@ files = [ {file = "msgpack-1.1.0.tar.gz", hash = "sha256:dd432ccc2c72b914e4cb77afce64aab761c1137cc698be3984eee260bcb2896e"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "multidict" version = "6.1.0" @@ -2158,11 +1853,6 @@ files = [ [package.dependencies] typing-extensions = {version = ">=4.1.0", markers = "python_version < \"3.11\""} -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "networkx" version = "3.4.2" @@ -2183,11 +1873,6 @@ example = ["cairocffi (>=1.7)", "contextily (>=1.6)", "igraph (>=0.11)", "momepy extra = ["lxml (>=4.6)", "pydot (>=3.0.1)", "pygraphviz (>=1.14)", "sympy (>=1.10)"] test = ["pytest (>=7.2)", "pytest-cov (>=4.0)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "numba" version = "0.61.0" @@ -2223,11 +1908,6 @@ files = [ llvmlite = "==0.44.*" numpy = ">=1.24,<2.2" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "numpy" version = "1.26.4" @@ -2274,11 +1954,6 @@ files = [ {file = "numpy-1.26.4.tar.gz", hash = "sha256:2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "nvidia-cublas-cu12" version = "12.1.3.1" @@ -2292,11 +1967,6 @@ files = [ {file = "nvidia_cublas_cu12-12.1.3.1-py3-none-win_amd64.whl", hash = "sha256:2b964d60e8cf11b5e1073d179d85fa340c120e99b3067558f3cf98dd69d02906"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "nvidia-cuda-cupti-cu12" version = "12.1.105" @@ -2310,11 +1980,6 @@ files = [ {file = "nvidia_cuda_cupti_cu12-12.1.105-py3-none-win_amd64.whl", hash = "sha256:bea8236d13a0ac7190bd2919c3e8e6ce1e402104276e6f9694479e48bb0eb2a4"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "nvidia-cuda-nvrtc-cu12" version = "12.1.105" @@ -2328,11 +1993,6 @@ files = [ {file = "nvidia_cuda_nvrtc_cu12-12.1.105-py3-none-win_amd64.whl", hash = "sha256:0a98a522d9ff138b96c010a65e145dc1b4850e9ecb75a0172371793752fd46ed"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "nvidia-cuda-runtime-cu12" version = "12.1.105" @@ -2346,11 +2006,6 @@ files = [ {file = "nvidia_cuda_runtime_cu12-12.1.105-py3-none-win_amd64.whl", hash = "sha256:dfb46ef84d73fababab44cf03e3b83f80700d27ca300e537f85f636fac474344"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "nvidia-cudnn-cu12" version = "8.9.2.26" @@ -2366,11 +2021,6 @@ files = [ [package.dependencies] nvidia-cublas-cu12 = "*" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "nvidia-cufft-cu12" version = "11.0.2.54" @@ -2384,11 +2034,6 @@ files = [ {file = "nvidia_cufft_cu12-11.0.2.54-py3-none-win_amd64.whl", hash = "sha256:d9ac353f78ff89951da4af698f80870b1534ed69993f10a4cf1d96f21357e253"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "nvidia-curand-cu12" version = "10.3.2.106" @@ -2402,11 +2047,6 @@ files = [ {file = "nvidia_curand_cu12-10.3.2.106-py3-none-win_amd64.whl", hash = "sha256:75b6b0c574c0037839121317e17fd01f8a69fd2ef8e25853d826fec30bdba74a"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "nvidia-cusolver-cu12" version = "11.4.5.107" @@ -2425,11 +2065,6 @@ nvidia-cublas-cu12 = "*" nvidia-cusparse-cu12 = "*" nvidia-nvjitlink-cu12 = "*" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "nvidia-cusparse-cu12" version = "12.1.0.106" @@ -2446,11 +2081,6 @@ files = [ [package.dependencies] nvidia-nvjitlink-cu12 = "*" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "nvidia-nccl-cu12" version = "2.19.3" @@ -2463,11 +2093,6 @@ files = [ {file = "nvidia_nccl_cu12-2.19.3-py3-none-manylinux1_x86_64.whl", hash = "sha256:a9734707a2c96443331c1e48c717024aa6678a0e2a4cb66b2c364d18cee6b48d"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "nvidia-nvjitlink-cu12" version = "12.8.61" @@ -2482,11 +2107,6 @@ files = [ {file = "nvidia_nvjitlink_cu12-12.8.61-py3-none-win_amd64.whl", hash = "sha256:1166a964d25fdc0eae497574d38824305195a5283324a21ccb0ce0c802cbf41c"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "nvidia-nvtx-cu12" version = "12.1.105" @@ -2500,11 +2120,6 @@ files = [ {file = "nvidia_nvtx_cu12-12.1.105-py3-none-win_amd64.whl", hash = "sha256:65f4d98982b31b60026e0e6de73fbdfc09d08a96f4656dd3665ca616a11e1e82"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "omegaconf" version = "2.3.0" @@ -2521,11 +2136,6 @@ files = [ antlr4-python3-runtime = "==4.9.*" PyYAML = ">=5.1.0" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "onnxruntime" version = "1.20.1" @@ -2565,11 +2175,6 @@ packaging = "*" protobuf = "*" sympy = "*" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "openai" version = "1.61.0" @@ -2596,27 +2201,18 @@ typing-extensions = ">=4.11,<5" datalib = ["numpy (>=1)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1.0.11)"] realtime = ["websockets (>=13,<15)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] -name = "opuslib" -version = "3.0.1" +name = "opuslib-next" +version = "1.1.2" description = "Python bindings to the libopus, IETF low-delay audio codec" optional = false python-versions = "*" groups = ["main"] files = [ - {file = "opuslib-3.0.1.tar.gz", hash = "sha256:2cb045e5b03e7fc50dfefe431e3404dddddbd8f5961c10c51e32dfb69a044c97"}, + {file = "opuslib_next-1.1.2-py2.py3-none-any.whl", hash = "sha256:adc432290ed721febff19dc0deb3b0cdbe846e80cd79fec742a7d47d960f13ed"}, + {file = "opuslib_next-1.1.2.tar.gz", hash = "sha256:d44a63c69783ab3ccaf349d46a1e37741eb620d6391461a18f95ac1b538e6796"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "ormsgpack" version = "1.7.0" @@ -2653,11 +2249,6 @@ files = [ {file = "ormsgpack-1.7.0.tar.gz", hash = "sha256:6b4c98839cb7fc2a212037d2258f3a22857155249eb293d45c45cb974cfba834"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "oss2" version = "2.19.1" @@ -2677,11 +2268,6 @@ pycryptodome = ">=3.4.7" requests = "!=2.9.0" six = "*" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "packaging" version = "24.2" @@ -2694,11 +2280,6 @@ files = [ {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "platformdirs" version = "4.3.6" @@ -2716,11 +2297,6 @@ docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.0.2)", "sphinx-a test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.2)", "pytest-cov (>=5)", "pytest-mock (>=3.14)"] type = ["mypy (>=1.11.2)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "pooch" version = "1.8.2" @@ -2743,11 +2319,6 @@ progress = ["tqdm (>=4.41.0,<5.0.0)"] sftp = ["paramiko (>=2.7.0)"] xxhash = ["xxhash (>=1.4.3)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "propcache" version = "0.2.1" @@ -2840,11 +2411,6 @@ files = [ {file = "propcache-0.2.1.tar.gz", hash = "sha256:3f77ce728b19cb537714499928fe800c3dda29e8d9428778fc7c186da4c09a64"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "proto-plus" version = "1.26.0" @@ -2863,11 +2429,6 @@ protobuf = ">=3.19.0,<6.0.0dev" [package.extras] testing = ["google-api-core (>=1.31.5)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "protobuf" version = "5.29.3" @@ -2889,11 +2450,6 @@ files = [ {file = "protobuf-5.29.3.tar.gz", hash = "sha256:5da0f41edaf117bde316404bad1a486cb4ededf8e4a54891296f648e8e076620"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "pyasn1" version = "0.6.1" @@ -2906,11 +2462,6 @@ files = [ {file = "pyasn1-0.6.1.tar.gz", hash = "sha256:6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "pyasn1-modules" version = "0.4.1" @@ -2926,11 +2477,6 @@ files = [ [package.dependencies] pyasn1 = ">=0.4.6,<0.7.0" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "pycparser" version = "2.22" @@ -2943,17 +2489,12 @@ files = [ {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "pycryptodome" version = "3.21.0" description = "Cryptographic library for Python" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" groups = ["main"] files = [ {file = "pycryptodome-3.21.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:dad9bf36eda068e89059d1f07408e397856be9511d7113ea4b586642a429a4fd"}, @@ -2990,11 +2531,6 @@ files = [ {file = "pycryptodome-3.21.0.tar.gz", hash = "sha256:f7787e0d469bdae763b876174cf2e6c0f7be79808af26b1da96f1a64bcf47297"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "pydantic" version = "2.10.6" @@ -3016,11 +2552,6 @@ typing-extensions = ">=4.12.2" email = ["email-validator (>=2.0.0)"] timezone = ["tzdata ; python_version >= \"3.9\" and platform_system == \"Windows\""] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "pydantic-core" version = "2.27.2" @@ -3134,11 +2665,6 @@ files = [ [package.dependencies] typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "pydub" version = "0.25.1" @@ -3151,11 +2677,6 @@ files = [ {file = "pydub-0.25.1.tar.gz", hash = "sha256:980a33ce9949cab2a569606b65674d748ecbca4f0796887fd6f46173a7b0d30f"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "pynndescent" version = "0.5.13" @@ -3175,11 +2696,6 @@ numba = ">=0.51.2" scikit-learn = ">=0.18" scipy = ">=1.0" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "pyparsing" version = "3.2.1" @@ -3195,11 +2711,6 @@ files = [ [package.extras] diagrams = ["jinja2", "railroad-diagrams"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "pyreadline3" version = "3.5.4" @@ -3216,11 +2727,6 @@ files = [ [package.extras] dev = ["build", "flake8", "mypy", "pytest", "twine"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "pytorch-wpe" version = "0.0.1" @@ -3236,11 +2742,6 @@ files = [ [package.dependencies] numpy = "*" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "pyyaml" version = "6.0.2" @@ -3304,11 +2805,6 @@ files = [ {file = "pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "pyyml" version = "0.0.2" @@ -3324,11 +2820,6 @@ files = [ [package.dependencies] pyyaml = ">=3.13" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "requests" version = "2.32.3" @@ -3351,11 +2842,6 @@ urllib3 = ">=1.21.1,<3" socks = ["PySocks (>=1.5.6,!=1.5.7)"] use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "rsa" version = "4.9" @@ -3371,11 +2857,6 @@ files = [ [package.dependencies] pyasn1 = ">=0.1.3" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "ruamel-yaml" version = "0.18.10" @@ -3395,11 +2876,6 @@ files = [ docs = ["mercurial (>5.7)", "ryd"] jinja2 = ["ruamel.yaml.jinja2 (>=0.2)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "ruamel-yaml-clib" version = "0.2.12" @@ -3457,11 +2933,6 @@ files = [ {file = "ruamel.yaml.clib-0.2.12.tar.gz", hash = "sha256:6c8fbb13ec503f99a91901ab46e0b07ae7941cd527393187039aec586fdfd36f"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "scikit-learn" version = "1.6.1" @@ -3517,11 +2988,6 @@ install = ["joblib (>=1.2.0)", "numpy (>=1.19.5)", "scipy (>=1.6.0)", "threadpoo maintenance = ["conda-lock (==2.5.6)"] tests = ["black (>=24.3.0)", "matplotlib (>=3.3.4)", "mypy (>=1.9)", "numpydoc (>=1.2.0)", "pandas (>=1.1.5)", "polars (>=0.20.30)", "pooch (>=1.6.0)", "pyamg (>=4.0.0)", "pyarrow (>=12.0.0)", "pytest (>=7.1.2)", "pytest-cov (>=2.9.0)", "ruff (>=0.5.1)", "scikit-image (>=0.17.2)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "scipy" version = "1.15.2" @@ -3586,11 +3052,6 @@ dev = ["cython-lint (>=0.12.2)", "doit (>=0.36.0)", "mypy (==1.10.0)", "pycodest doc = ["intersphinx_registry", "jupyterlite-pyodide-kernel", "jupyterlite-sphinx (>=0.16.5)", "jupytext", "matplotlib (>=3.5)", "myst-nb", "numpydoc", "pooch", "pydata-sphinx-theme (>=0.15.2)", "sphinx (>=5.0.0,<8.0.0)", "sphinx-copybutton", "sphinx-design (>=0.4.0)"] test = ["Cython", "array-api-strict (>=2.0,<2.1.1)", "asv", "gmpy2", "hypothesis (>=6.30)", "meson", "mpmath", "ninja ; sys_platform != \"emscripten\"", "pooch", "pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "scikit-umfpack", "threadpoolctl"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "sentencepiece" version = "0.2.0" @@ -3654,11 +3115,6 @@ files = [ {file = "sentencepiece-0.2.0.tar.gz", hash = "sha256:a52c19171daaf2e697dc6cbe67684e0fa341b1248966f6aebb541de654d15843"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "setuptools" version = "75.8.0" @@ -3680,11 +3136,6 @@ enabler = ["pytest-enabler (>=2.2)"] test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21) ; python_version >= \"3.9\" and sys_platform != \"cygwin\"", "jaraco.envs (>=2.2)", "jaraco.path (>=3.7.2)", "jaraco.test (>=5.5)", "packaging (>=24.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-home (>=0.5)", "pytest-perf ; sys_platform != \"cygwin\"", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"] type = ["importlib_metadata (>=7.0.2) ; python_version < \"3.10\"", "jaraco.develop (>=7.21) ; sys_platform != \"cygwin\"", "mypy (==1.14.*)", "pytest-mypy"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "silero-vad" version = "5.1.2" @@ -3702,28 +3153,18 @@ onnxruntime = ">=1.16.1" torch = ">=1.12.0" torchaudio = ">=0.12.0" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "six" version = "1.17.0" description = "Python 2 and 3 compatibility utilities" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" groups = ["main"] files = [ {file = "six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"}, {file = "six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "sniffio" version = "1.3.1" @@ -3736,11 +3177,6 @@ files = [ {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "soundfile" version = "0.13.1" @@ -3763,11 +3199,6 @@ files = [ cffi = ">=1.0" numpy = "*" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "soxr" version = "0.5.0.post1" @@ -3806,11 +3237,6 @@ numpy = "*" docs = ["linkify-it-py", "myst-parser", "sphinx", "sphinx-book-theme"] test = ["pytest"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "srt" version = "3.5.3" @@ -3822,11 +3248,6 @@ files = [ {file = "srt-3.5.3.tar.gz", hash = "sha256:4884315043a4f0740fd1f878ed6caa376ac06d70e135f306a6dc44632eed0cc0"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "sympy" version = "1.13.3" @@ -3845,11 +3266,6 @@ mpmath = ">=1.1.0,<1.4" [package.extras] dev = ["hypothesis (>=6.70.0)", "pytest (>=7.1.0)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "tabulate" version = "0.9.0" @@ -3865,11 +3281,6 @@ files = [ [package.extras] widechars = ["wcwidth"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "tensorboardx" version = "2.6.2.2" @@ -3887,11 +3298,6 @@ numpy = "*" packaging = "*" protobuf = ">=3.20" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "threadpoolctl" version = "3.5.0" @@ -3904,11 +3310,6 @@ files = [ {file = "threadpoolctl-3.5.0.tar.gz", hash = "sha256:082433502dd922bf738de0d8bcc4fdcbf0979ff44c42bd40f5af8a282f6fa107"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "torch" version = "2.2.2" @@ -3968,11 +3369,6 @@ typing-extensions = ">=4.8.0" opt-einsum = ["opt-einsum (>=3.3)"] optree = ["optree (>=0.9.1)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "torch-complex" version = "0.4.4" @@ -3989,11 +3385,6 @@ files = [ numpy = "*" packaging = "*" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "torchaudio" version = "2.2.2" @@ -4032,11 +3423,6 @@ files = [ [package.dependencies] torch = "2.2.2" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "tqdm" version = "4.67.1" @@ -4059,11 +3445,6 @@ notebook = ["ipywidgets (>=6)"] slack = ["slack-sdk"] telegram = ["requests"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "triton" version = "2.2.0" @@ -4089,11 +3470,6 @@ build = ["cmake (>=3.20)", "lit"] tests = ["autopep8", "flake8", "isort", "numpy", "pytest", "scipy (>=1.7.1)", "torch"] tutorials = ["matplotlib", "pandas", "tabulate", "torch"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "typing-extensions" version = "4.12.2" @@ -4106,11 +3482,6 @@ files = [ {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "umap-learn" version = "0.5.7" @@ -4136,11 +3507,6 @@ parametric-umap = ["tensorflow (>=2.1)"] plot = ["bokeh", "colorcet", "datashader", "holoviews", "matplotlib", "pandas", "scikit-image", "seaborn"] tbb = ["tbb (>=2019.0)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "uritemplate" version = "4.1.1" @@ -4153,11 +3519,6 @@ files = [ {file = "uritemplate-4.1.1.tar.gz", hash = "sha256:4346edfc5c3b79f694bccd6d6099a322bbeb628dbf2cd86eea55a456ce5124f0"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "urllib3" version = "2.3.0" @@ -4176,11 +3537,6 @@ h2 = ["h2 (>=4,<5)"] socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] zstd = ["zstandard (>=0.18.0)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "websockets" version = "14.2" @@ -4260,11 +3616,6 @@ files = [ {file = "websockets-14.2.tar.gz", hash = "sha256:5059ed9c54945efb321f097084b4c7e52c246f2c869815876a69d1efc4ad6eb5"}, ] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "win32-setctime" version = "1.2.0" @@ -4281,11 +3632,6 @@ files = [ [package.extras] dev = ["black (>=19.3b0) ; python_version >= \"3.6\"", "pytest (>=4.6.2)"] -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [[package]] name = "yarl" version = "1.18.3" @@ -4383,12 +3729,7 @@ idna = ">=2.0" multidict = ">=4.0" propcache = ">=0.2.0" -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "mirrors" - [metadata] lock-version = "2.1" python-versions = "^3.10.16" -content-hash = "8645b79840ee30a5262cc87a54aff45a21756f37d6e15fec3215e342ebfe864d" +content-hash = "9d724dd1cc50a7a6a42f0b5d8a81ad788332939ffc6a3ba12537106567f4ebe7" diff --git a/pyproject.toml b/pyproject.toml index 096e32cbd..2ee2fc148 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,6 @@ pyyml = "0.0.2" torch = "2.2.2" silero-vad = "5.1.2" websockets = "14.2" -opuslib = "3.0.1" numpy = "1.26.4" pydub = "0.25.1" funasr = "1.2.3" @@ -26,13 +25,9 @@ ormsgpack = "1.7.0" ruamel-yaml = "0.18.10" setuptools = "^75.8.0" loguru = "^0.7.3" +opuslib-next = "^1.1.2" -[[tool.poetry.source]] -name = "mirrors" -url = "https://pypi.tuna.tsinghua.edu.cn/simple/" -priority = "primary" - [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" diff --git a/requirements.txt b/requirements.txt index 46636a22a..bfa9ed803 100755 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ pyyml==0.0.2 torch==2.2.2 silero_vad==5.1.2 websockets==14.2 -opuslib==3.0.1 +opuslib_next==1.1.2 numpy==1.26.4 pydub==0.25.1 funasr==1.2.3 @@ -15,4 +15,5 @@ aiohttp==3.9.3 aiohttp_cors==0.7.0 ormsgpack==1.7.0 ruamel.yaml==0.18.10 -loguru==0.7.3 \ No newline at end of file +loguru==0.7.3 +requests>=2.0.0 \ No newline at end of file