From 91765400f6649aa0b4825e937738bbc066f4c130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=B4=E7=8C=AB?= Date: Tue, 3 Mar 2026 01:13:52 +0900 Subject: [PATCH 01/12] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=EF=BC=8C=E6=B7=BB=E5=8A=A0macOS=E6=94=AF?= =?UTF-8?q?=E6=8C=81=EF=BC=8C=E9=87=8D=E6=9E=84=E4=BE=9D=E8=B5=96=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=92=8C=E6=9C=8D=E5=8A=A1=E6=8E=A7=E5=88=B6=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/run.sh | 524 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 470 insertions(+), 54 deletions(-) diff --git a/scripts/run.sh b/scripts/run.sh index d702323a..7862e2ab 100644 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -1,7 +1,7 @@ #!/bin/bash # MaiCore & NapCat Adapter一键安装脚本 by Cookie_987 -# 适用于Arch/Ubuntu 24.10/Debian 12/CentOS 9 +# 适用于macOS/Arch/Ubuntu 24.10/Debian 12/CentOS 9 # 请小心使用任何一键脚本! INSTALLER_VERSION="0.0.5-refactor" @@ -15,36 +15,297 @@ GREEN="\e[32m" RED="\e[31m" RESET="\e[0m" -# 需要的基本软件包 - -declare -A REQUIRED_PACKAGES=( - ["common"]="git sudo python3 curl gnupg" - ["debian"]="python3-venv python3-pip build-essential" - ["ubuntu"]="python3-venv python3-pip build-essential" - ["centos"]="epel-release python3-pip python3-devel gcc gcc-c++ make" - ["arch"]="python-virtualenv python-pip base-devel" -) - -# 默认项目目录 -DEFAULT_INSTALL_DIR="/opt/maicore" +# 需要的基本软件包(兼容 Bash 3,避免使用关联数组) +REQUIRED_PACKAGES_COMMON="git sudo python3 curl gnupg" +REQUIRED_PACKAGES_DEBIAN="python3-venv python3-pip build-essential" +REQUIRED_PACKAGES_UBUNTU="python3-venv python3-pip build-essential" +REQUIRED_PACKAGES_CENTOS="epel-release python3-pip python3-devel gcc gcc-c++ make" +REQUIRED_PACKAGES_ARCH="python-virtualenv python-pip base-devel" +REQUIRED_PACKAGES_MACOS="git gnupg python" # 服务名称 SERVICE_NAME="maicore" SERVICE_NAME_WEB="maicore-web" SERVICE_NAME_NBADAPTER="maibot-napcat-adapter" +SERVICE_USER="${SUDO_USER:-$USER}" +SERVICE_HOME="$(eval echo "~${SERVICE_USER}" 2>/dev/null)" +if [[ -z "$SERVICE_HOME" || "$SERVICE_HOME" == "~${SERVICE_USER}" ]]; then + SERVICE_HOME="$HOME" +fi + +IS_MACOS=false +[[ "$(uname -s)" == "Darwin" ]] && IS_MACOS=true + +INSTALL_CONF="/etc/maicore_install.conf" + +# 默认项目目录 +DEFAULT_INSTALL_DIR="/opt/maicore" +if [[ "$IS_MACOS" == true ]]; then + DEFAULT_INSTALL_DIR="${SERVICE_HOME}/maicore" + INSTALL_CONF="${SERVICE_HOME}/.config/maicore/maicore_install.conf" +fi + +LAUNCHD_DOMAIN="" +LAUNCHD_AGENT_DIR="" +LAUNCHD_LABEL_MAIN="com.maicore.${SERVICE_NAME}" +LAUNCHD_LABEL_NBADAPTER="com.maicore.${SERVICE_NAME_NBADAPTER}" +LAUNCHD_PLIST_MAIN="" +LAUNCHD_PLIST_NBADAPTER="" + +if [[ "$IS_MACOS" == true ]]; then + SERVICE_UID="$(id -u "${SERVICE_USER}" 2>/dev/null || id -u)" + LAUNCHD_DOMAIN="gui/${SERVICE_UID}" + LAUNCHD_AGENT_DIR="${SERVICE_HOME}/Library/LaunchAgents" + LAUNCHD_PLIST_MAIN="${LAUNCHD_AGENT_DIR}/${LAUNCHD_LABEL_MAIN}.plist" + LAUNCHD_PLIST_NBADAPTER="${LAUNCHD_AGENT_DIR}/${LAUNCHD_LABEL_NBADAPTER}.plist" +fi + +get_required_packages() { + local distro="$1" + case "$distro" in + debian) + echo "${REQUIRED_PACKAGES_COMMON} ${REQUIRED_PACKAGES_DEBIAN}" + ;; + ubuntu) + echo "${REQUIRED_PACKAGES_COMMON} ${REQUIRED_PACKAGES_UBUNTU}" + ;; + centos) + echo "${REQUIRED_PACKAGES_COMMON} ${REQUIRED_PACKAGES_CENTOS}" + ;; + arch) + echo "${REQUIRED_PACKAGES_COMMON} ${REQUIRED_PACKAGES_ARCH}" + ;; + macos) + echo "${REQUIRED_PACKAGES_MACOS}" + ;; + *) + echo "${REQUIRED_PACKAGES_COMMON}" + ;; + esac +} + IS_INSTALL_NAPCAT=false IS_INSTALL_DEPENDENCIES=false +resolve_brew_bin() { + local brew_bin + brew_bin="$(command -v brew)" + [[ -z "$brew_bin" && -x /opt/homebrew/bin/brew ]] && brew_bin="/opt/homebrew/bin/brew" + [[ -z "$brew_bin" && -x /usr/local/bin/brew ]] && brew_bin="/usr/local/bin/brew" + [[ -n "$brew_bin" ]] && echo "$brew_bin" +} + +run_brew() { + local brew_bin + brew_bin="$(resolve_brew_bin)" + + [[ -z "$brew_bin" ]] && return 1 + if [[ "$(id -u)" -eq 0 && -n "${SUDO_USER:-}" && "${SUDO_USER}" != "root" ]]; then + sudo -u "${SUDO_USER}" "${brew_bin}" "$@" + else + "${brew_bin}" "$@" + fi +} + +run_launchctl() { + if [[ "$(id -u)" -eq 0 && -n "${SUDO_USER:-}" && "${SUDO_USER}" != "root" ]]; then + sudo -u "${SUDO_USER}" launchctl "$@" + else + launchctl "$@" + fi +} + +ensure_writable_parent() { + local path="$1" + local parent + parent="$(dirname "$path")" + mkdir -p "$parent" + if [[ "$IS_MACOS" == true && "$(id -u)" -eq 0 && -n "${SUDO_USER:-}" ]]; then + chown "${SUDO_USER}" "$parent" 2>/dev/null || true + fi +} + +save_install_info() { + ensure_writable_parent "$INSTALL_CONF" + cat > "$INSTALL_CONF" </dev/null; then + md5sum "$file_path" | awk '{print $1}' + elif command -v md5 &>/dev/null; then + md5 -q "$file_path" + else + return 1 + fi +} + +launchd_label_for_service() { + local service="$1" + case "$service" in + ${SERVICE_NAME}) + echo "$LAUNCHD_LABEL_MAIN" + ;; + ${SERVICE_NAME_NBADAPTER}) + echo "$LAUNCHD_LABEL_NBADAPTER" + ;; + *) + return 1 + ;; + esac +} + +launchd_plist_for_service() { + local service="$1" + case "$service" in + ${SERVICE_NAME}) + echo "$LAUNCHD_PLIST_MAIN" + ;; + ${SERVICE_NAME_NBADAPTER}) + echo "$LAUNCHD_PLIST_NBADAPTER" + ;; + *) + return 1 + ;; + esac +} + +is_launchd_service_loaded() { + local service="$1" + local label + label="$(launchd_label_for_service "$service")" || return 1 + run_launchctl print "${LAUNCHD_DOMAIN}/${label}" &>/dev/null +} + +start_service() { + local service="$1" + if [[ "$IS_MACOS" == true ]]; then + local label + local plist + label="$(launchd_label_for_service "$service")" || return 1 + plist="$(launchd_plist_for_service "$service")" || return 1 + if [[ ! -f "$plist" && -d "${INSTALL_DIR}/MaiBot" ]]; then + create_launchd_services + fi + if [[ ! -f "$plist" ]]; then + echo -e "${RED}未找到服务配置文件:${plist}${RESET}" + return 1 + fi + + if is_launchd_service_loaded "$service"; then + run_launchctl kickstart -k "${LAUNCHD_DOMAIN}/${label}" + else + run_launchctl bootstrap "${LAUNCHD_DOMAIN}" "$plist" + fi + else + systemctl start "$service" + fi +} + +stop_service() { + local service="$1" + if [[ "$IS_MACOS" == true ]]; then + local label + label="$(launchd_label_for_service "$service")" || return 1 + if is_launchd_service_loaded "$service"; then + run_launchctl bootout "${LAUNCHD_DOMAIN}/${label}" + fi + else + systemctl stop "$service" + fi +} + +restart_service() { + local service="$1" + if [[ "$IS_MACOS" == true ]]; then + stop_service "$service" + start_service "$service" + else + systemctl restart "$service" + fi +} + +create_launchd_services() { + mkdir -p "${LAUNCHD_AGENT_DIR}" + mkdir -p "${INSTALL_DIR}/logs" + + cat > "${LAUNCHD_PLIST_MAIN}" < + + + + Label + ${LAUNCHD_LABEL_MAIN} + ProgramArguments + + ${INSTALL_DIR}/venv/bin/python3 + bot.py + + WorkingDirectory + ${INSTALL_DIR}/MaiBot + RunAtLoad + + KeepAlive + + StandardOutPath + ${INSTALL_DIR}/logs/${SERVICE_NAME}.log + StandardErrorPath + ${INSTALL_DIR}/logs/${SERVICE_NAME}.error.log + + +EOF + + cat > "${LAUNCHD_PLIST_NBADAPTER}" < + + + + Label + ${LAUNCHD_LABEL_NBADAPTER} + ProgramArguments + + ${INSTALL_DIR}/venv/bin/python3 + main.py + + WorkingDirectory + ${INSTALL_DIR}/MaiBot-Napcat-Adapter + RunAtLoad + + KeepAlive + + StandardOutPath + ${INSTALL_DIR}/logs/${SERVICE_NAME_NBADAPTER}.log + StandardErrorPath + ${INSTALL_DIR}/logs/${SERVICE_NAME_NBADAPTER}.error.log + + +EOF + + if [[ "$(id -u)" -eq 0 && -n "${SUDO_USER:-}" && "${SUDO_USER}" != "root" ]]; then + chown "${SUDO_USER}" "${LAUNCHD_PLIST_MAIN}" "${LAUNCHD_PLIST_NBADAPTER}" "${LAUNCHD_AGENT_DIR}" 2>/dev/null || true + fi +} + # 检查是否已安装 check_installed() { - [[ -f /etc/systemd/system/${SERVICE_NAME}.service ]] + if [[ "$IS_MACOS" == true ]]; then + [[ -f "$INSTALL_CONF" ]] + else + [[ -f /etc/systemd/system/${SERVICE_NAME}.service ]] + fi } # 加载安装信息 load_install_info() { - if [[ -f /etc/maicore_install.conf ]]; then - source /etc/maicore_install.conf + if [[ -f "$INSTALL_CONF" ]]; then + source "$INSTALL_CONF" else INSTALL_DIR="$DEFAULT_INSTALL_DIR" BRANCH="refactor" @@ -69,27 +330,27 @@ show_menu() { case "$choice" in 1) - systemctl start ${SERVICE_NAME} + start_service "${SERVICE_NAME}" whiptail --msgbox "✅MaiCore已启动" 10 60 ;; 2) - systemctl stop ${SERVICE_NAME} + stop_service "${SERVICE_NAME}" whiptail --msgbox "🛑MaiCore已停止" 10 60 ;; 3) - systemctl restart ${SERVICE_NAME} + restart_service "${SERVICE_NAME}" whiptail --msgbox "🔄MaiCore已重启" 10 60 ;; 4) - systemctl start ${SERVICE_NAME_NBADAPTER} + start_service "${SERVICE_NAME_NBADAPTER}" whiptail --msgbox "✅NapCat Adapter已启动" 10 60 ;; 5) - systemctl stop ${SERVICE_NAME_NBADAPTER} + stop_service "${SERVICE_NAME_NBADAPTER}" whiptail --msgbox "🛑NapCat Adapter已停止" 10 60 ;; 6) - systemctl restart ${SERVICE_NAME_NBADAPTER} + restart_service "${SERVICE_NAME_NBADAPTER}" whiptail --msgbox "🔄NapCat Adapter已重启" 10 60 ;; 7) @@ -111,7 +372,7 @@ show_menu() { # 更新依赖 update_dependencies() { whiptail --title "⚠" --msgbox "更新后请阅读教程" 10 60 - systemctl stop ${SERVICE_NAME} + stop_service "${SERVICE_NAME}" cd "${INSTALL_DIR}/MaiBot" || { whiptail --msgbox "🚫 无法进入安装目录!" 10 60 return 1 @@ -157,23 +418,23 @@ switch_branch() { whiptail --msgbox "🚫 代码拉取失败!" 10 60 return 1 fi - systemctl stop ${SERVICE_NAME} + stop_service "${SERVICE_NAME}" source "${INSTALL_DIR}/venv/bin/activate" pip install -r requirements.txt deactivate - sed -i "s/^BRANCH=.*/BRANCH=${new_branch}/" /etc/maicore_install.conf BRANCH="${new_branch}" + save_install_info check_eula whiptail --msgbox "✅ 已停止服务并切换到分支 ${new_branch} !" 10 60 } check_eula() { # 首先计算当前EULA的MD5值 - current_md5=$(md5sum "${INSTALL_DIR}/MaiBot/EULA.md" | awk '{print $1}') + current_md5=$(compute_md5 "${INSTALL_DIR}/MaiBot/EULA.md") # 首先计算当前隐私条款文件的哈希值 - current_md5_privacy=$(md5sum "${INSTALL_DIR}/MaiBot/PRIVACY.md" | awk '{print $1}') + current_md5_privacy=$(compute_md5 "${INSTALL_DIR}/MaiBot/PRIVACY.md") # 如果当前的md5值为空,则直接返回 if [[ -z $current_md5 || -z $current_md5_privacy ]]; then @@ -183,7 +444,7 @@ check_eula() { # 检查eula.confirmed文件是否存在 if [[ -f ${INSTALL_DIR}/MaiBot/eula.confirmed ]]; then # 如果存在则检查其中包含的md5与current_md5是否一致 - confirmed_md5=$(cat ${INSTALL_DIR}/MaiBot/eula.confirmed) + confirmed_md5=$(cat "${INSTALL_DIR}/MaiBot/eula.confirmed") else confirmed_md5="" fi @@ -191,7 +452,7 @@ check_eula() { # 检查privacy.confirmed文件是否存在 if [[ -f ${INSTALL_DIR}/MaiBot/privacy.confirmed ]]; then # 如果存在则检查其中包含的md5与current_md5是否一致 - confirmed_md5_privacy=$(cat ${INSTALL_DIR}/MaiBot/privacy.confirmed) + confirmed_md5_privacy=$(cat "${INSTALL_DIR}/MaiBot/privacy.confirmed") else confirmed_md5_privacy="" fi @@ -200,8 +461,8 @@ check_eula() { if [[ $current_md5 != $confirmed_md5 || $current_md5_privacy != $confirmed_md5_privacy ]]; then whiptail --title "📜 使用协议更新" --yesno "检测到MaiCore EULA或隐私条款已更新。\nhttps://github.com/MaiM-with-u/MaiBot/blob/refactor/EULA.md\nhttps://github.com/MaiM-with-u/MaiBot/blob/refactor/PRIVACY.md\n\n您是否同意上述协议? \n\n " 12 70 if [[ $? -eq 0 ]]; then - echo -n $current_md5 > ${INSTALL_DIR}/MaiBot/eula.confirmed - echo -n $current_md5_privacy > ${INSTALL_DIR}/MaiBot/privacy.confirmed + echo -n "$current_md5" > "${INSTALL_DIR}/MaiBot/eula.confirmed" + echo -n "$current_md5_privacy" > "${INSTALL_DIR}/MaiBot/privacy.confirmed" else exit 1 fi @@ -209,6 +470,98 @@ check_eula() { } +# 测速并选择PyPI源(仅当阿里云更快时使用阿里云) +measure_url_latency() { + local url="$1" + local latency + + latency=$(curl -sS -o /dev/null -w "%{time_total}" --connect-timeout 3 --max-time 8 "$url" 2>/dev/null) + + if [[ $? -eq 0 && "$latency" =~ ^[0-9]+(\.[0-9]+)?$ ]]; then + echo "$latency" + return 0 + else + echo "999999" + return 1 + fi +} + +resolve_default_pypi_index_url() { + local default_url="" + + if [[ -n "${PIP_INDEX_URL:-}" ]]; then + default_url="$PIP_INDEX_URL" + elif [[ -n "${UV_INDEX_URL:-}" ]]; then + default_url="$UV_INDEX_URL" + elif command -v pip &>/dev/null; then + default_url=$(pip config get global.index-url 2>/dev/null | head -n 1) + if [[ -z "$default_url" ]]; then + default_url=$(pip config get install.index-url 2>/dev/null | head -n 1) + fi + fi + + if [[ -z "$default_url" ]]; then + default_url="https://pypi.org/simple" + fi + + echo "$default_url" +} + +select_pypi_index_url() { + local default_url + local aliyun_url="https://mirrors.aliyun.com/pypi/simple" + local default_latency + local aliyun_latency + local default_status + local aliyun_status + + default_url=$(resolve_default_pypi_index_url) + default_latency=$(measure_url_latency "$default_url") + default_status=$? + aliyun_latency=$(measure_url_latency "$aliyun_url") + aliyun_status=$? + + if [[ $aliyun_status -eq 0 && $default_status -ne 0 ]]; then + PYPI_INDEX_URL="$aliyun_url" + PYPI_INDEX_NAME="阿里云镜像(默认源测速失败)" + UV_PIP_INDEX_OPTION=(-i "$aliyun_url") + echo -e "${RED}默认源测速失败,已选择${PYPI_INDEX_NAME}:${PYPI_INDEX_URL}${RESET}" + return + fi + + if [[ $aliyun_status -ne 0 && $default_status -eq 0 ]]; then + PYPI_INDEX_URL="$default_url" + PYPI_INDEX_NAME="默认源(阿里云测速失败)" + UV_PIP_INDEX_OPTION=() + echo -e "${RED}阿里云测速失败,已选择${PYPI_INDEX_NAME}:不显式指定 -i 参数${RESET}" + return + fi + + if [[ $aliyun_status -ne 0 && $default_status -ne 0 ]]; then + PYPI_INDEX_URL="$default_url" + PYPI_INDEX_NAME="默认源(双源测速失败)" + UV_PIP_INDEX_OPTION=() + echo -e "${RED}默认源和阿里云测速均失败,回退到${PYPI_INDEX_NAME}:不显式指定 -i 参数${RESET}" + return + fi + + if awk "BEGIN {exit !(${aliyun_latency} < ${default_latency})}"; then + PYPI_INDEX_URL="$aliyun_url" + PYPI_INDEX_NAME="阿里云镜像" + UV_PIP_INDEX_OPTION=(-i "$aliyun_url") + else + PYPI_INDEX_URL="$default_url" + PYPI_INDEX_NAME="默认源" + UV_PIP_INDEX_OPTION=() + fi + + if [[ ${#UV_PIP_INDEX_OPTION[@]} -gt 0 ]]; then + echo -e "${GREEN}已选择${PYPI_INDEX_NAME}:${PYPI_INDEX_URL}${RESET}" + else + echo -e "${GREEN}已选择${PYPI_INDEX_NAME}:不显式指定 -i 参数${RESET}" + fi +} + # ----------- 主安装流程 ----------- run_installation() { # 1/6: 检测是否安装 whiptail @@ -221,10 +574,21 @@ run_installation() { pacman -Syu --noconfirm whiptail elif command -v yum &>/dev/null; then yum install -y whiptail + elif command -v brew &>/dev/null || [[ -x /opt/homebrew/bin/brew ]] || [[ -x /usr/local/bin/brew ]]; then + run_brew install newt + + # 确保当前 shell 能找到 Homebrew 安装的 whiptail。 + [[ -x /opt/homebrew/bin/whiptail ]] && export PATH="/opt/homebrew/bin:${PATH}" + [[ -x /usr/local/bin/whiptail ]] && export PATH="/usr/local/bin:${PATH}" else echo -e "${RED}[Error] 无受支持的包管理器,无法安装 whiptail!${RESET}" exit 1 fi + + if ! command -v whiptail &>/dev/null; then + echo -e "${RED}[Error] whiptail 安装失败或不可用,请手动安装后重试。${RESET}" + exit 1 + fi fi whiptail --title "ℹ️ 提示" --msgbox "如果您没有特殊需求,请优先使用docker方式部署。" 10 60 @@ -239,6 +603,13 @@ run_installation() { # 系统检查 check_system() { + if [[ "$IS_MACOS" == true ]]; then + ID="macos" + VERSION_ID="$(sw_vers -productVersion 2>/dev/null)" + PRETTY_NAME="macOS ${VERSION_ID}" + return + fi + if [[ "$(id -u)" -ne 0 ]]; then whiptail --title "🚫 权限不足" --msgbox "请使用 root 用户运行此脚本!\n执行方式: sudo bash $0" 10 60 exit 1 @@ -278,6 +649,9 @@ run_installation() { # 添加arch包管理器 PKG_MANAGER="pacman" ;; + macos) + PKG_MANAGER="brew" + ;; esac # 检查NapCat @@ -294,7 +668,7 @@ run_installation() { install_packages() { missing_packages=() # 检查 common 及当前系统专属依赖 - for package in ${REQUIRED_PACKAGES["common"]} ${REQUIRED_PACKAGES["$ID"]}; do + for package in $(get_required_packages "$ID"); do case "$PKG_MANAGER" in apt) dpkg -s "$package" &>/dev/null || missing_packages+=("$package") @@ -305,6 +679,22 @@ run_installation() { pacman) pacman -Qi "$package" &>/dev/null || missing_packages+=("$package") ;; + brew) + case "$package" in + git) + command -v git &>/dev/null || missing_packages+=("$package") + ;; + gnupg) + command -v gpg &>/dev/null || missing_packages+=("$package") + ;; + python) + command -v python3 &>/dev/null || missing_packages+=("$package") + ;; + *) + run_brew list --formula "$package" &>/dev/null || missing_packages+=("$package") + ;; + esac + ;; esac done @@ -327,8 +717,12 @@ run_installation() { } } - # 仅在非Arch系统上安装NapCat - [[ "$ID" != "arch" ]] && install_napcat + # 仅在 Linux 非 Arch 系统上安装 NapCat,macOS 仅支持远程 NapCat。 + if [[ "$ID" == "macos" ]]; then + whiptail --title "⚠️ NapCat 安装提示" --msgbox "当前为 macOS,暂不支持自动安装 NapCat。\n如需使用 NapCat,请配置远程实例后再连接。 " 10 60 + elif [[ "$ID" != "arch" ]]; then + install_napcat + fi # Python版本检查 check_python() { @@ -412,6 +806,9 @@ run_installation() { pacman) pacman -S --noconfirm "${missing_packages[@]}" ;; + brew) + run_brew update && run_brew install "${missing_packages[@]}" + ;; esac fi @@ -448,35 +845,42 @@ run_installation() { echo -e "${GREEN}安装Python依赖...${RESET}" + select_pypi_index_url pip install -r MaiBot/requirements.txt cd MaiBot pip install uv - uv pip install -i https://mirrors.aliyun.com/pypi/simple -r requirements.txt + uv pip install "${UV_PIP_INDEX_OPTION[@]}" -r requirements.txt cd .. echo -e "${GREEN}安装maim_message依赖...${RESET}" cd maim_message - uv pip install -i https://mirrors.aliyun.com/pypi/simple -e . + uv pip install "${UV_PIP_INDEX_OPTION[@]}" -e . cd .. echo -e "${GREEN}部署MaiBot Napcat Adapter...${RESET}" cd MaiBot-Napcat-Adapter - uv pip install -i https://mirrors.aliyun.com/pypi/simple -r requirements.txt + uv pip install "${UV_PIP_INDEX_OPTION[@]}" -r requirements.txt cd .. echo -e "${GREEN}同意协议...${RESET}" # 首先计算当前EULA的MD5值 - current_md5=$(md5sum "MaiBot/EULA.md" | awk '{print $1}') + current_md5=$(compute_md5 "MaiBot/EULA.md") # 首先计算当前隐私条款文件的哈希值 - current_md5_privacy=$(md5sum "MaiBot/PRIVACY.md" | awk '{print $1}') + current_md5_privacy=$(compute_md5 "MaiBot/PRIVACY.md") - echo -n $current_md5 > MaiBot/eula.confirmed - echo -n $current_md5_privacy > MaiBot/privacy.confirmed + echo -n "$current_md5" > MaiBot/eula.confirmed + echo -n "$current_md5_privacy" > MaiBot/privacy.confirmed - echo -e "${GREEN}创建系统服务...${RESET}" - cat > /etc/systemd/system/${SERVICE_NAME}.service </dev/null 2>&1 || true + stop_service "${SERVICE_NAME_NBADAPTER}" >/dev/null 2>&1 || true + else + echo -e "${GREEN}创建系统服务...${RESET}" + cat > /etc/systemd/system/${SERVICE_NAME}.service < /etc/systemd/system/${SERVICE_NAME_NBADAPTER}.service < /etc/systemd/system/${SERVICE_NAME_NBADAPTER}.service < /etc/maicore_install.conf - echo "INSTALL_DIR=${INSTALL_DIR}" >> /etc/maicore_install.conf - echo "BRANCH=${BRANCH}" >> /etc/maicore_install.conf + save_install_info - whiptail --title "🎉 安装完成" --msgbox "MaiCore安装完成!\n已创建系统服务:${SERVICE_NAME}、${SERVICE_NAME_WEB}、${SERVICE_NAME_NBADAPTER}\n\n使用以下命令管理服务:\n启动服务:systemctl start ${SERVICE_NAME}\n查看状态:systemctl status ${SERVICE_NAME}" 14 60 + if [[ "$IS_MACOS" == true ]]; then + whiptail --title "🎉 安装完成" --msgbox "MaiCore安装完成!\n已创建 launchctl 服务:${LAUNCHD_LABEL_MAIN}、${LAUNCHD_LABEL_NBADAPTER}\n\n首次加载:launchctl bootstrap ${LAUNCHD_DOMAIN} ${LAUNCHD_PLIST_MAIN}\n重启服务:launchctl kickstart -k ${LAUNCHD_DOMAIN}/${LAUNCHD_LABEL_MAIN}\n查看状态:launchctl print ${LAUNCHD_DOMAIN}/${LAUNCHD_LABEL_MAIN}" 14 100 + else + whiptail --title "🎉 安装完成" --msgbox "MaiCore安装完成!\n已创建系统服务:${SERVICE_NAME}、${SERVICE_NAME_WEB}、${SERVICE_NAME_NBADAPTER}\n\n使用以下命令管理服务:\n启动服务:systemctl start ${SERVICE_NAME}\n查看状态:systemctl status ${SERVICE_NAME}" 14 60 + fi } # ----------- 主执行流程 ----------- -# 检查root权限 -[[ $(id -u) -ne 0 ]] && { +# Linux 仍需 root,macOS 使用用户级 launchctl(无需 root)。 +if [[ "$IS_MACOS" == true && $(id -u) -eq 0 ]]; then + echo -e "${RED}macOS 请勿使用 root/sudo 运行此脚本,请直接以当前登录用户执行。${RESET}" + exit 1 +fi + +if [[ "$IS_MACOS" != true && $(id -u) -ne 0 ]]; then echo -e "${RED}请使用root用户运行此脚本!${RESET}" exit 1 -} +fi # 如果已安装显示菜单,并检查协议是否更新 if check_installed; then @@ -550,7 +962,11 @@ else run_installation # 安装完成后询问是否启动 if whiptail --title "安装完成" --yesno "是否立即启动MaiCore服务?" 10 60; then - systemctl start ${SERVICE_NAME} - whiptail --msgbox "✅ 服务已启动!\n使用 systemctl status ${SERVICE_NAME} 查看状态" 10 60 + start_service "${SERVICE_NAME}" + if [[ "$IS_MACOS" == true ]]; then + whiptail --msgbox "✅ 服务已启动!\n使用 launchctl print ${LAUNCHD_DOMAIN}/${LAUNCHD_LABEL_MAIN} 查看状态" 10 80 + else + whiptail --msgbox "✅ 服务已启动!\n使用 systemctl status ${SERVICE_NAME} 查看状态" 10 60 + fi fi fi From e6862e227b7385dfab3bc7707bd3056f36818a4a Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Mon, 2 Mar 2026 22:49:01 +0800 Subject: [PATCH 02/12] feat(electron): scaffold electron-vite project structure Initialize Wave 1 Electron integration with: - electron v40.6.1, electron-vite v5.0.0, electron-builder v26.8.1 - Main entry point: electron/main/index.ts with app:// protocol registration - Preload placeholder: electron/preload/index.ts for Wave 2 IPC - electron.vite.config.ts with unified renderer chunk splitting strategy - tsconfig.electron.json with ESNext module support - Updated package.json with electron dependencies and scripts: - electron:dev, electron:build, electron:preview - All original scripts (dev, build, test, etc) remain unchanged - TypeScript compilation verified: tsc --noEmit passes - Ready for Wave 2: IPC bridge and contextBridge exposure --- dashboard/electron.vite.config.ts | 150 ++++++++++++++++++++++++++++ dashboard/electron/main/index.ts | 98 ++++++++++++++++++ dashboard/electron/preload/index.ts | 7 ++ dashboard/package.json | 9 +- dashboard/tsconfig.electron.json | 36 +++++++ dashboard/tsconfig.json | 3 +- 6 files changed, 301 insertions(+), 2 deletions(-) create mode 100644 dashboard/electron.vite.config.ts create mode 100644 dashboard/electron/main/index.ts create mode 100644 dashboard/electron/preload/index.ts create mode 100644 dashboard/tsconfig.electron.json diff --git a/dashboard/electron.vite.config.ts b/dashboard/electron.vite.config.ts new file mode 100644 index 00000000..1e9c2b0f --- /dev/null +++ b/dashboard/electron.vite.config.ts @@ -0,0 +1,150 @@ +import { defineConfig } from 'electron-vite' +import react from '@vitejs/plugin-react' +import path from 'path' + +export default defineConfig({ + main: { + entry: 'electron/main/index.ts', + vite: { + build: { + rollupOptions: { + external: ['electron'], + }, + }, + resolve: { + alias: { + '@': path.resolve(__dirname, './src'), + }, + }, + }, + }, + preload: { + entry: 'electron/preload/index.ts', + vite: { + build: { + rollupOptions: { + external: ['electron'], + }, + }, + }, + }, + renderer: { + resolve: { + alias: { + '@': path.resolve(__dirname, './src'), + }, + }, + plugins: [react()], + server: { + port: 7999, + proxy: { + '/api': { + target: 'http://127.0.0.1:8001', + changeOrigin: true, + ws: true, + cookieDomainRewrite: '', + cookiePathRewrite: '/', + }, + }, + }, + build: { + rollupOptions: { + output: { + manualChunks: { + // React core + 'react-vendor': ['react', 'react-dom', 'react/jsx-runtime'], + + // TanStack Router + router: ['@tanstack/react-router', '@tanstack/react-virtual'], + + // Radix UI core + 'radix-core': [ + '@radix-ui/react-dialog', + '@radix-ui/react-select', + '@radix-ui/react-checkbox', + '@radix-ui/react-label', + '@radix-ui/react-slot', + '@radix-ui/react-toast', + '@radix-ui/react-tooltip', + ], + + // Radix UI extras + 'radix-extra': [ + '@radix-ui/react-alert-dialog', + '@radix-ui/react-avatar', + '@radix-ui/react-collapsible', + '@radix-ui/react-context-menu', + '@radix-ui/react-popover', + '@radix-ui/react-progress', + '@radix-ui/react-scroll-area', + '@radix-ui/react-separator', + '@radix-ui/react-slider', + '@radix-ui/react-switch', + '@radix-ui/react-tabs', + ], + + // Icons + icons: ['lucide-react'], + + // Charts + charts: ['recharts'], + + // CodeMirror + codemirror: [ + '@uiw/react-codemirror', + '@codemirror/lang-javascript', + '@codemirror/lang-json', + '@codemirror/lang-python', + '@codemirror/lint', + '@codemirror/theme-one-dark', + ], + + // ReactFlow + reactflow: ['reactflow', 'dagre'], + + // Markdown + markdown: [ + 'react-markdown', + 'remark-gfm', + 'remark-math', + 'rehype-katex', + 'katex', + ], + + // Uppy + uppy: [ + '@uppy/core', + '@uppy/dashboard', + '@uppy/react', + '@uppy/xhr-upload', + ], + + // Drag and drop + dnd: [ + '@dnd-kit/core', + '@dnd-kit/sortable', + '@dnd-kit/utilities', + ], + + // Utils + utils: [ + 'date-fns', + 'clsx', + 'tailwind-merge', + 'class-variance-authority', + 'axios', + ], + + // Misc + misc: [ + 'react-joyride', + 'react-day-picker', + 'cmdk', + ], + }, + }, + }, + chunkSizeWarningLimit: 500, + }, + }, +}) diff --git a/dashboard/electron/main/index.ts b/dashboard/electron/main/index.ts new file mode 100644 index 00000000..4c30f9ae --- /dev/null +++ b/dashboard/electron/main/index.ts @@ -0,0 +1,98 @@ +import { app, BrowserWindow, protocol } from 'electron' +import path from 'path' +import { fileURLToPath } from 'url' + +const __filename = fileURLToPath(import.meta.url) +const __dirname = path.dirname(__filename) + +let mainWindow: BrowserWindow | null = null + +/** + * Register app:// custom protocol BEFORE app.whenReady() + * This is critical for electron-vite to work correctly + */ +function registerAppProtocol() { + protocol.registerSchemesAsPrivileged([ + { + scheme: 'app', + privileges: { + secure: true, + standard: true, + allowServiceWorkers: true, + }, + }, + ]) +} + +/** + * Create the main application window + */ +function createWindow() { + mainWindow = new BrowserWindow({ + width: 1200, + height: 800, + minWidth: 800, + minHeight: 600, + webPreferences: { + preload: path.join(__dirname, '../preload/index.js'), + nodeIntegration: false, + contextIsolation: true, + }, + }) + + // Load the app using app:// protocol + // electron-vite will handle serving the renderer from app://host/index.html + if (process.env.VITE_DEV_SERVER_URL) { + // Development: load from electron-vite dev server + mainWindow.loadURL(process.env.VITE_DEV_SERVER_URL) + } else { + // Production: load from bundled renderer + mainWindow.loadURL('app://host/index.html') + } + + mainWindow.on('closed', () => { + mainWindow = null + }) +} + +/** + * Register app:// protocol handler (for production) + */ +function registerAppProtocolHandler() { + protocol.handle('app', (request) => { + const filePath = new URL(request.url).pathname + return new Response( + `Cannot handle app:// requests. Renderer should be served by electron-vite.` + ) + }) +} + +/** + * App event: when app is ready + */ +app.on('ready', () => { + registerAppProtocolHandler() + createWindow() +}) + +/** + * App event: when all windows are closed (non-macOS behavior) + */ +app.on('window-all-closed', () => { + // On macOS, applications typically stay open until the user quits + if (process.platform !== 'darwin') { + app.quit() + } +}) + +/** + * App event: when app is activated (macOS) + */ +app.on('activate', () => { + if (mainWindow === null) { + createWindow() + } +}) + +// Register protocol BEFORE app.whenReady() +registerAppProtocol() diff --git a/dashboard/electron/preload/index.ts b/dashboard/electron/preload/index.ts new file mode 100644 index 00000000..39ec94b6 --- /dev/null +++ b/dashboard/electron/preload/index.ts @@ -0,0 +1,7 @@ +/** + * Preload script for Electron renderer process + * This script runs in the main process before renderer loads + * Use contextBridge to safely expose APIs + * + * Wave 2 implementation will expose specific IPC methods here + */ diff --git a/dashboard/package.json b/dashboard/package.json index b627cddb..c30afc0a 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -3,6 +3,7 @@ "private": true, "version": "1.0.0", "type": "module", + "main": "./out/main/index.js", "scripts": { "dev": "vite", "build": "tsc -b && vite build", @@ -10,7 +11,10 @@ "preview": "vite preview", "format": "prettier --write \"src/**/*.{ts,tsx,css}\"", "test": "vitest", - "test:ui": "vitest --ui" + "test:ui": "vitest --ui", + "electron:dev": "electron-vite dev", + "electron:build": "electron-vite build", + "electron:preview": "electron-vite preview" }, "dependencies": { "@codemirror/lang-css": "^6.3.1", @@ -88,6 +92,9 @@ "@vitejs/plugin-react": "^5.1.2", "@vitest/ui": "^4.0.18", "autoprefixer": "^10.4.22", + "electron": "^40.6.1", + "electron-builder": "^26.8.1", + "electron-vite": "^5.0.0", "eslint": "^9.39.1", "eslint-plugin-react-hooks": "^7.0.1", "eslint-plugin-react-refresh": "^0.4.24", diff --git a/dashboard/tsconfig.electron.json b/dashboard/tsconfig.electron.json new file mode 100644 index 00000000..8ec25cc8 --- /dev/null +++ b/dashboard/tsconfig.electron.json @@ -0,0 +1,36 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.electron.tsbuildinfo", + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020"], + "module": "ESNext", + "moduleResolution": "bundler", + "types": ["electron"], + "skipLibCheck": true, + + /* Module resolution */ + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": false, + "moduleDetection": "force", + "noEmit": true, + + /* Path aliases */ + "baseUrl": ".", + "paths": { + "@/*": ["./src/*"] + }, + + /* Linting */ + "strict": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "erasableSyntaxOnly": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true, + "skipLibCheck": true + }, + "include": ["electron/**/*"] +} diff --git a/dashboard/tsconfig.json b/dashboard/tsconfig.json index 08c8a904..04af6c3f 100644 --- a/dashboard/tsconfig.json +++ b/dashboard/tsconfig.json @@ -3,6 +3,7 @@ "references": [ { "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" }, - { "path": "./tsconfig.vitest.json" } + { "path": "./tsconfig.vitest.json" }, + { "path": "./tsconfig.electron.json" } ] } From b5cc361ce9693e940925cdb46b8e622ea04f34b0 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Tue, 3 Mar 2026 00:52:53 +0800 Subject: [PATCH 03/12] feat(electron): add main process, preload, store, protocol, and type definitions - Add ElectronAPI type definitions and runtime contract (isElectron guard) - Add electron-store with backend connection data model - Add centralized API base URL utility (api-base.ts) - Implement app:// custom protocol with API proxy - Implement preload script with full contextBridge API - Complete main process: BrowserWindow config, IPC handlers, window controls - Register app:// scheme as privileged for secure renderer access --- dashboard/electron.vite.config.ts | 61 +++----- dashboard/electron/main/index.ts | 139 ++++++++++++++--- dashboard/electron/main/protocol.ts | 89 +++++++++++ dashboard/electron/main/store.ts | 215 ++++++++++++++++++++++++++ dashboard/electron/preload/index.ts | 63 +++++++- dashboard/electron/resources/.gitkeep | 0 dashboard/package.json | 52 ++++++- dashboard/src/lib/api-base.ts | 119 ++++++++++++++ dashboard/src/lib/runtime.ts | 77 +++++++++ dashboard/src/types/electron.d.ts | 95 ++++++++++++ 10 files changed, 843 insertions(+), 67 deletions(-) create mode 100644 dashboard/electron/main/protocol.ts create mode 100644 dashboard/electron/main/store.ts create mode 100644 dashboard/electron/resources/.gitkeep create mode 100644 dashboard/src/lib/api-base.ts create mode 100644 dashboard/src/lib/runtime.ts create mode 100644 dashboard/src/types/electron.d.ts diff --git a/dashboard/electron.vite.config.ts b/dashboard/electron.vite.config.ts index 1e9c2b0f..b332bcfd 100644 --- a/dashboard/electron.vite.config.ts +++ b/dashboard/electron.vite.config.ts @@ -1,34 +1,40 @@ -import { defineConfig } from 'electron-vite' import react from '@vitejs/plugin-react' +import { defineConfig } from 'electron-vite' import path from 'path' export default defineConfig({ main: { entry: 'electron/main/index.ts', - vite: { - build: { - rollupOptions: { - external: ['electron'], - }, + build: { + target: 'node18', + lib: { + entry: 'electron/main/index.ts', }, - resolve: { - alias: { - '@': path.resolve(__dirname, './src'), - }, + rollupOptions: { + external: ['electron', 'electron-store'], + }, + }, + resolve: { + alias: { + '@': path.resolve(__dirname, './src'), }, }, }, preload: { entry: 'electron/preload/index.ts', - vite: { - build: { - rollupOptions: { - external: ['electron'], + build: { + target: 'node18', + rollupOptions: { + input: path.resolve(__dirname, 'electron/preload/index.ts'), + output: { + entryFileNames: '[name].js', + format: 'cjs', }, }, }, }, renderer: { + root: '.', resolve: { alias: { '@': path.resolve(__dirname, './src'), @@ -49,15 +55,13 @@ export default defineConfig({ }, build: { rollupOptions: { + input: path.resolve(__dirname, 'index.html'), output: { manualChunks: { - // React core 'react-vendor': ['react', 'react-dom', 'react/jsx-runtime'], - // TanStack Router router: ['@tanstack/react-router', '@tanstack/react-virtual'], - // Radix UI core 'radix-core': [ '@radix-ui/react-dialog', '@radix-ui/react-select', @@ -67,8 +71,6 @@ export default defineConfig({ '@radix-ui/react-toast', '@radix-ui/react-tooltip', ], - - // Radix UI extras 'radix-extra': [ '@radix-ui/react-alert-dialog', '@radix-ui/react-avatar', @@ -83,13 +85,10 @@ export default defineConfig({ '@radix-ui/react-tabs', ], - // Icons icons: ['lucide-react'], - // Charts charts: ['recharts'], - // CodeMirror codemirror: [ '@uiw/react-codemirror', '@codemirror/lang-javascript', @@ -99,10 +98,8 @@ export default defineConfig({ '@codemirror/theme-one-dark', ], - // ReactFlow reactflow: ['reactflow', 'dagre'], - // Markdown markdown: [ 'react-markdown', 'remark-gfm', @@ -111,7 +108,6 @@ export default defineConfig({ 'katex', ], - // Uppy uppy: [ '@uppy/core', '@uppy/dashboard', @@ -119,14 +115,8 @@ export default defineConfig({ '@uppy/xhr-upload', ], - // Drag and drop - dnd: [ - '@dnd-kit/core', - '@dnd-kit/sortable', - '@dnd-kit/utilities', - ], + dnd: ['@dnd-kit/core', '@dnd-kit/sortable', '@dnd-kit/utilities'], - // Utils utils: [ 'date-fns', 'clsx', @@ -135,12 +125,7 @@ export default defineConfig({ 'axios', ], - // Misc - misc: [ - 'react-joyride', - 'react-day-picker', - 'cmdk', - ], + misc: ['react-joyride', 'react-day-picker', 'cmdk'], }, }, }, diff --git a/dashboard/electron/main/index.ts b/dashboard/electron/main/index.ts index 4c30f9ae..4df1cf3f 100644 --- a/dashboard/electron/main/index.ts +++ b/dashboard/electron/main/index.ts @@ -1,7 +1,21 @@ -import { app, BrowserWindow, protocol } from 'electron' +import { app, BrowserWindow, ipcMain, protocol, session } from 'electron' import path from 'path' import { fileURLToPath } from 'url' +import { registerAppProtocol } from './protocol' +import { + addBackend, + getActiveBackend, + getBackends, + getWindowBounds, + isFirstLaunch, + markFirstLaunchComplete, + removeBackend, + setActiveBackend, + setWindowBounds, + updateBackend, +} from './store' + const __filename = fileURLToPath(import.meta.url) const __dirname = path.dirname(__filename) @@ -11,67 +25,151 @@ let mainWindow: BrowserWindow | null = null * Register app:// custom protocol BEFORE app.whenReady() * This is critical for electron-vite to work correctly */ -function registerAppProtocol() { +function registerAppScheme() { protocol.registerSchemesAsPrivileged([ { scheme: 'app', privileges: { + corsEnabled: true, secure: true, - standard: true, allowServiceWorkers: true, + standard: true, + supportFetchAPI: true, + stream: true, }, }, ]) } +/** + * Register all IPC handlers for window control and store CRUD + */ +function registerIpcHandlers() { + // ── Window control ─────────────────────────────────────────────────────── + ipcMain.handle('electron:minimize-window', () => mainWindow?.minimize()) + ipcMain.handle('electron:maximize-window', () => { + if (mainWindow?.isMaximized()) mainWindow.unmaximize() + else mainWindow?.maximize() + }) + ipcMain.handle('electron:close-window', () => mainWindow?.close()) + ipcMain.handle('electron:is-maximized', () => mainWindow?.isMaximized() ?? false) + + // ── Backend CRUD ───────────────────────────────────────────────────────── + ipcMain.handle('electron:get-backends', () => getBackends()) + ipcMain.handle('electron:add-backend', (_e, conn) => addBackend(conn)) + ipcMain.handle('electron:update-backend', (_e, id, patch) => updateBackend(id, patch)) + ipcMain.handle('electron:remove-backend', (_e, id) => removeBackend(id)) + ipcMain.handle('electron:set-active-backend', (_e, id) => { + setActiveBackend(id) + const backend = getActiveBackend() + mainWindow?.webContents.send('electron:backend-changed', backend) + }) + ipcMain.handle('electron:get-active-backend', () => getActiveBackend()) + ipcMain.handle('electron:get-active-url', () => getActiveBackend()?.url ?? null) + + // ── App state ──────────────────────────────────────────────────────────── + ipcMain.handle('electron:is-first-launch', () => isFirstLaunch()) + ipcMain.handle('electron:mark-first-launch-complete', () => markFirstLaunchComplete()) + ipcMain.handle('electron:get-app-version', () => app.getVersion()) +} + /** * Create the main application window */ function createWindow() { + const isMac = process.platform === 'darwin' + + // Restore window bounds from store + const bounds = getWindowBounds() + mainWindow = new BrowserWindow({ - width: 1200, - height: 800, + x: bounds.x, + y: bounds.y, + width: bounds.width, + height: bounds.height, minWidth: 800, minHeight: 600, + // macOS: hide native title bar but keep traffic light buttons + ...(isMac + ? { + titleBarStyle: 'hidden' as const, + trafficLightPosition: { x: 12, y: 8 }, + } + : {}), + // Windows/Linux: overlay title bar (custom title bar integrated) + ...(!isMac + ? { + titleBarOverlay: { + color: '#00000000', + symbolColor: '#ffffff', + height: 32, + }, + } + : {}), webPreferences: { preload: path.join(__dirname, '../preload/index.js'), nodeIntegration: false, contextIsolation: true, + sandbox: true, }, }) // Load the app using app:// protocol // electron-vite will handle serving the renderer from app://host/index.html - if (process.env.VITE_DEV_SERVER_URL) { + if (process.env.ELECTRON_RENDERER_URL) { // Development: load from electron-vite dev server - mainWindow.loadURL(process.env.VITE_DEV_SERVER_URL) + mainWindow.loadURL(process.env.ELECTRON_RENDERER_URL) } else { // Production: load from bundled renderer mainWindow.loadURL('app://host/index.html') } + // Persist window size/position on close + mainWindow.on('close', () => { + if (mainWindow) { + const { x, y, width, height } = mainWindow.getBounds() + setWindowBounds({ x, y, width, height }) + } + }) + mainWindow.on('closed', () => { mainWindow = null }) -} -/** - * Register app:// protocol handler (for production) - */ -function registerAppProtocolHandler() { - protocol.handle('app', (request) => { - const filePath = new URL(request.url).pathname - return new Response( - `Cannot handle app:// requests. Renderer should be served by electron-vite.` - ) + // Push maximize/unmaximize events to renderer + mainWindow.on('maximize', () => { + mainWindow?.webContents.send('electron:window-maximized') + }) + mainWindow.on('unmaximize', () => { + mainWindow?.webContents.send('electron:window-unmaximized') }) } /** * App event: when app is ready */ -app.on('ready', () => { - registerAppProtocolHandler() +app.whenReady().then(() => { + registerAppProtocol() + + // Set Content Security Policy + session.defaultSession.webRequest.onHeadersReceived((details, callback) => { + callback({ + responseHeaders: { + ...details.responseHeaders, + 'Content-Security-Policy': [ + "default-src 'self' app:; " + + "script-src 'self' 'unsafe-inline' app:; " + + "style-src 'self' 'unsafe-inline' app:; " + + "img-src 'self' app: data: blob:; " + + "font-src 'self' app: data:; " + + "connect-src 'self' app: ws: wss: http: https:; " + + "worker-src 'self' blob:;" + ], + }, + }) + }) + + registerIpcHandlers() createWindow() }) @@ -94,5 +192,4 @@ app.on('activate', () => { } }) -// Register protocol BEFORE app.whenReady() -registerAppProtocol() +registerAppScheme() diff --git a/dashboard/electron/main/protocol.ts b/dashboard/electron/main/protocol.ts new file mode 100644 index 00000000..0fb995a9 --- /dev/null +++ b/dashboard/electron/main/protocol.ts @@ -0,0 +1,89 @@ +import { net, protocol } from 'electron' +import { readFile } from 'fs/promises' +import { dirname, extname, join } from 'path' +import { fileURLToPath } from 'url' + +import { getActiveBackend } from './store' + +const __filename = fileURLToPath(import.meta.url) +const __dirname = dirname(__filename) + +const MIME_TYPES: Record = { + '.html': 'text/html', + '.js': 'application/javascript', + '.mjs': 'application/javascript', + '.cjs': 'application/javascript', + '.css': 'text/css', + '.json': 'application/json', + '.png': 'image/png', + '.jpg': 'image/jpeg', + '.jpeg': 'image/jpeg', + '.gif': 'image/gif', + '.svg': 'image/svg+xml', + '.ico': 'image/x-icon', + '.woff': 'font/woff', + '.woff2': 'font/woff2', + '.ttf': 'font/ttf', + '.txt': 'text/plain', + '.webp': 'image/webp', +} + +export function registerAppProtocol(): void { + protocol.handle('app', async (request) => { + const url = new URL(request.url) + const pathname = url.pathname + + if (pathname.startsWith('/api/')) { + const backend = getActiveBackend() + const targetUrl = backend + ? `${backend.url.replace(/\/$/, '')}${pathname}${url.search}` + : null + + if (!targetUrl) { + return new Response(JSON.stringify({ error: 'No backend configured' }), { + status: 503, + headers: { 'Content-Type': 'application/json' }, + }) + } + + const headers = new Headers(request.headers) + headers.delete('host') + + return net.fetch(targetUrl, { + method: request.method, + headers, + body: ['GET', 'HEAD'].includes(request.method) ? undefined : request.body, + duplex: 'half', + }) + } + + // Dev mode: renderer is served by vite dev server, not app:// protocol + if (process.env.ELECTRON_RENDERER_URL) { + return new Response(null, { status: 204 }) + } + + const rendererDir = join(__dirname, '../renderer') + const safePath = decodeURIComponent(pathname) + .replace(/\.\./g, '') + .replace(/^\/+/, '') + + const resolvedPath = safePath === '' ? 'index.html' : safePath + const filePath = resolvedPath.endsWith('/') + ? join(rendererDir, resolvedPath, 'index.html') + : join(rendererDir, resolvedPath) + + const tryReadFile = async (path: string) => { + const ext = extname(path) + const mimeType = MIME_TYPES[ext] ?? 'application/octet-stream' + const data = await readFile(path) + return new Response(data, { headers: { 'Content-Type': mimeType } }) + } + + try { + return await tryReadFile(filePath) + } catch { + const indexPath = join(rendererDir, 'index.html') + return tryReadFile(indexPath) + } + }) +} diff --git a/dashboard/electron/main/store.ts b/dashboard/electron/main/store.ts new file mode 100644 index 00000000..65a810df --- /dev/null +++ b/dashboard/electron/main/store.ts @@ -0,0 +1,215 @@ +import { randomUUID } from 'crypto' + +import Store from 'electron-store' + +/** + * Backend connection data model + */ +export interface BackendConnection { + id: string + name: string + url: string + isDefault: boolean + lastConnected?: number +} + +/** + * Application settings data model + */ +export interface AppSettings { + backends: BackendConnection[] + activeBackendId: string | null + windowBounds: { + x: number + y: number + width: number + height: number + } + firstLaunchComplete: boolean +} + +/** + * JSON Schema for validating store contents + */ +const SCHEMA: Store.Schema = { + backends: { + type: 'array', + items: { + type: 'object', + properties: { + id: { type: 'string' }, + name: { type: 'string' }, + url: { type: 'string' }, + isDefault: { type: 'boolean' }, + lastConnected: { type: 'number' }, + }, + required: ['id', 'name', 'url', 'isDefault'], + }, + }, + activeBackendId: { type: ['string', 'null'] }, + windowBounds: { + type: 'object', + properties: { + x: { type: 'number' }, + y: { type: 'number' }, + width: { type: 'number' }, + height: { type: 'number' }, + }, + required: ['x', 'y', 'width', 'height'], + }, + firstLaunchComplete: { type: 'boolean' }, +} + +/** + * Default settings + */ +const DEFAULTS: AppSettings = { + backends: [], + activeBackendId: null, + windowBounds: { + x: 100, + y: 100, + width: 1280, + height: 800, + }, + firstLaunchComplete: false, +} + +/** + * Initialize electron-store with encryption and schema validation + */ +const store = new Store({ + schema: SCHEMA, + defaults: DEFAULTS, + encryptionKey: process.env.MAIBOT_STORE_KEY, +}) + +/** + * Get all backends + */ +export function getBackends(): BackendConnection[] { + return store.get('backends', []) +} + +/** + * Add a new backend connection + * Generates UUID for new backend + */ +export function addBackend( + conn: Omit, +): BackendConnection { + const newBackend: BackendConnection = { + ...conn, + id: randomUUID(), + } + + const backends = getBackends() + backends.push(newBackend) + store.set('backends', backends) + + return newBackend +} + +/** + * Update an existing backend connection + */ +export function updateBackend( + id: string, + patch: Partial>, +): void { + const backends = getBackends() + const index = backends.findIndex((b) => b.id === id) + + if (index === -1) { + throw new Error(`Backend with id ${id} not found`) + } + + backends[index] = { + ...backends[index], + ...patch, + } + + store.set('backends', backends) +} + +/** + * Remove a backend connection by id + */ +export function removeBackend(id: string): void { + const backends = getBackends() + const filtered = backends.filter((b) => b.id !== id) + + store.set('backends', filtered) + + // Clear active backend if it was the removed one + if (store.get('activeBackendId') === id) { + store.set('activeBackendId', null) + } +} + +/** + * Set the active backend + */ +export function setActiveBackend(id: string): void { + const backends = getBackends() + + if (!backends.find((b) => b.id === id)) { + throw new Error(`Backend with id ${id} not found`) + } + + store.set('activeBackendId', id) +} + +/** + * Get the currently active backend connection + */ +export function getActiveBackend(): BackendConnection | null { + const activeId = store.get('activeBackendId') + + if (!activeId) { + return null + } + + const backends = getBackends() + return backends.find((b) => b.id === activeId) || null +} + +/** + * Get window bounds + */ +export function getWindowBounds(): AppSettings['windowBounds'] { + return store.get('windowBounds', DEFAULTS.windowBounds) +} + +/** + * Set window bounds + */ +export function setWindowBounds(bounds: AppSettings['windowBounds']): void { + store.set('windowBounds', bounds) +} + +/** + * Check if this is the first launch + */ +export function isFirstLaunch(): boolean { + return !store.get('firstLaunchComplete', false) +} + +/** + * Mark first launch as complete + */ +export function markFirstLaunchComplete(): void { + store.set('firstLaunchComplete', true) +} + +/** + * Get complete app settings + */ +export function getSettings(): AppSettings { + return { + backends: getBackends(), + activeBackendId: store.get('activeBackendId', null), + windowBounds: getWindowBounds(), + firstLaunchComplete: store.get('firstLaunchComplete', false), + } +} diff --git a/dashboard/electron/preload/index.ts b/dashboard/electron/preload/index.ts index 39ec94b6..4f950e24 100644 --- a/dashboard/electron/preload/index.ts +++ b/dashboard/electron/preload/index.ts @@ -1,7 +1,56 @@ -/** - * Preload script for Electron renderer process - * This script runs in the main process before renderer loads - * Use contextBridge to safely expose APIs - * - * Wave 2 implementation will expose specific IPC methods here - */ +import { contextBridge, ipcRenderer } from 'electron' + +// Write __RUNTIME__ tag into the isolated world so renderer can detect Electron +contextBridge.exposeInMainWorld('__RUNTIME__', { + kind: 'electron' as const, + versions: process.versions as unknown as Record, + source: 'tag' as const, +}) + +// Expose the full ElectronAPI surface to the renderer process +contextBridge.exposeInMainWorld('electronAPI', { + // ── Platform detection ────────────────────────────────────────────────── + getPlatform: () => process.platform, + + // ── Window control ────────────────────────────────────────────────────── + minimizeWindow: () => ipcRenderer.invoke('electron:minimize-window'), + maximizeWindow: () => ipcRenderer.invoke('electron:maximize-window'), + closeWindow: () => ipcRenderer.invoke('electron:close-window'), + isMaximized: () => ipcRenderer.invoke('electron:is-maximized'), + + // ── Window event listeners ─────────────────────────────────────────────── + onWindowMaximized: (callback: () => void) => { + const listener = () => callback() + ipcRenderer.on('electron:window-maximized', listener) + return () => ipcRenderer.removeListener('electron:window-maximized', listener) + }, + onWindowUnmaximized: (callback: () => void) => { + const listener = () => callback() + ipcRenderer.on('electron:window-unmaximized', listener) + return () => ipcRenderer.removeListener('electron:window-unmaximized', listener) + }, + + // ── Backend CRUD ───────────────────────────────────────────────────────── + getBackends: () => ipcRenderer.invoke('electron:get-backends'), + addBackend: (conn: object) => ipcRenderer.invoke('electron:add-backend', conn), + updateBackend: (id: string, patch: object) => + ipcRenderer.invoke('electron:update-backend', id, patch), + removeBackend: (id: string) => ipcRenderer.invoke('electron:remove-backend', id), + setActiveBackend: (id: string) => + ipcRenderer.invoke('electron:set-active-backend', id), + getActiveBackend: () => ipcRenderer.invoke('electron:get-active-backend'), + getActiveBackendUrl: () => ipcRenderer.invoke('electron:get-active-url'), + + // ── App state ─────────────────────────────────────────────────────────── + isFirstLaunch: () => ipcRenderer.invoke('electron:is-first-launch'), + markFirstLaunchComplete: () => + ipcRenderer.invoke('electron:mark-first-launch-complete'), + getAppVersion: () => ipcRenderer.invoke('electron:get-app-version'), + + // ── Backend event listener ────────────────────────────────────────────── + onBackendChanged: (callback: (backend: { id: string; name: string; url: string; isDefault: boolean; lastConnected?: number } | null) => void) => { + const listener = (_event: unknown, backend: { id: string; name: string; url: string; isDefault: boolean; lastConnected?: number } | null) => callback(backend) + ipcRenderer.on('electron:backend-changed', listener) + return () => ipcRenderer.removeListener('electron:backend-changed', listener) + }, +}) diff --git a/dashboard/electron/resources/.gitkeep b/dashboard/electron/resources/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/dashboard/package.json b/dashboard/package.json index c30afc0a..119b2d27 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -14,7 +14,56 @@ "test:ui": "vitest --ui", "electron:dev": "electron-vite dev", "electron:build": "electron-vite build", - "electron:preview": "electron-vite preview" + "electron:preview": "electron-vite preview", + "electron:dist": "electron-vite build && electron-builder", + "electron:dist:mac": "electron-vite build && electron-builder --mac", + "electron:dist:win": "electron-vite build && electron-builder --win", + "electron:dist:linux": "electron-vite build && electron-builder --linux" + }, + "build": { + "appId": "org.maibot.dashboard", + "productName": "MaiBot Dashboard", + "directories": { + "output": "dist-electron", + "buildResources": "electron/resources" + }, + "files": [ + "out/**/*", + "package.json" + ], + "mac": { + "category": "public.app-category.utilities", + "target": [ + { "target": "dmg", "arch": ["x64", "arm64"] } + ], + "icon": "electron/resources/icon.icns", + "darkModeSupport": true + }, + "win": { + "target": [ + { "target": "nsis", "arch": ["x64"] } + ], + "icon": "electron/resources/icon.ico" + }, + "linux": { + "target": [ + { "target": "AppImage", "arch": ["x64"] } + ], + "icon": "electron/resources/icon.png", + "category": "Utility" + }, + "nsis": { + "oneClick": false, + "allowToChangeInstallationDirectory": true, + "createDesktopShortcut": true, + "createStartMenuShortcut": true + }, + "dmg": { + "contents": [ + { "x": 130, "y": 220 }, + { "x": 410, "y": 220, "type": "link", "path": "/Applications" } + ] + } }, "dependencies": { "@codemirror/lang-css": "^6.3.1", @@ -94,6 +143,7 @@ "autoprefixer": "^10.4.22", "electron": "^40.6.1", "electron-builder": "^26.8.1", + "electron-store": "^8.1.0", "electron-vite": "^5.0.0", "eslint": "^9.39.1", "eslint-plugin-react-hooks": "^7.0.1", diff --git a/dashboard/src/lib/api-base.ts b/dashboard/src/lib/api-base.ts new file mode 100644 index 00000000..8d066829 --- /dev/null +++ b/dashboard/src/lib/api-base.ts @@ -0,0 +1,119 @@ +/** + * Centralized API base URL utility + * Provides single source of truth for all URL construction across the application + * Handles environment-specific configuration (Electron, Browser DEV, Browser PROD) + */ + +import type { BackendConnection } from '@/types/electron' + +import { isElectron } from './runtime' + +/** + * Get API base URL for HTTP/HTTPS requests + * - Electron: User-configured backend URL from main process + * - Browser DEV: Empty string (Vite proxy handles /api prefix) + * - Browser PROD: Empty string (same-origin deployment) + */ +export async function getApiBaseUrl(): Promise { + if (isElectron()) { + // Electron: Get configured backend URL from IPC + const backendUrl = await window.electronAPI?.getActiveBackendUrl() + return backendUrl ?? '' + } + + // Browser (DEV & PROD): Return empty string + // In DEV: Vite proxy forwards /api requests to backend + // In PROD: API is deployed on same origin as frontend + return '' +} + +/** + * Get WebSocket base URL + * - Electron: Convert HTTP/HTTPS URL to WS/WSS + * - Browser DEV: ws://127.0.0.1:8001 (hardcoded, same as log-websocket.ts) + * - Browser PROD: Construct WS URL from window.location + */ +export async function getWsBaseUrl(): Promise { + if (isElectron()) { + // Electron: Convert API URL protocol to WS protocol + const apiUrl = await getApiBaseUrl() + if (!apiUrl) { + return '' + } + + // Convert http -> ws, https -> wss + return apiUrl.replace(/^https?/, (match) => { + return match === 'https' ? 'wss' : 'ws' + }) + } + + // Browser DEV: Use hardcoded WebSocket server + if (import.meta.env.DEV) { + return 'ws://127.0.0.1:8001' + } + + // Browser PROD: Construct WS URL from current location + const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:' + const host = window.location.host + return `${protocol}//${host}` +} + +/** + * Get synchronous API base URL for axios baseURL configuration + * Note: axios instance baseURL is set at module initialization time (synchronous). + * Since window.electronAPI.getActiveBackendUrl() is async, this function returns + * empty string. The actual Electron backend URL will be injected via axios request + * interceptor (Task 7) to support dynamic backend switching at runtime. + */ +export function getAxiosBaseUrl(): string { + // Always return empty string: + // - Browser: Vite proxy / same-origin handles paths + // - Electron: axios interceptor injects dynamic baseURL + return '' +} + +/** + * Resolve full API path by prepending base URL if needed + * - Electron: Prepends configured backend URL + * - Browser: Path remains unchanged (proxy/same-origin handling) + */ +export async function resolveApiPath(path: string): Promise { + if (isElectron()) { + const baseUrl = await getApiBaseUrl() + return baseUrl ? `${baseUrl}${path}` : path + } + + // Browser: Path is used as-is + return path +} + +/** + * Subscribe to backend URL changes + * Electron: Listens to IPC backend change events + * Browser: No-op (backend cannot change at runtime) + * + * @param callback Function called when backend URL changes + * @returns Unsubscribe function + */ +export function onBackendUrlChanged( + callback: (newUrl: string | null) => void +): () => void { + if (!isElectron()) { + // Browser: No-op, return empty unsubscribe function + return () => {} + } + + // Electron: Register IPC listener and return unsubscribe function + if (!window.electronAPI?.onBackendChanged) { + return () => {} + } + + // Wrap callback to extract URL from BackendConnection + const wrappedCallback = (backend: BackendConnection | null) => { + const url = backend?.url ?? null + callback(url) + } + + // Get and return the unsubscribe function from preload + return window.electronAPI.onBackendChanged(wrappedCallback) +} diff --git a/dashboard/src/lib/runtime.ts b/dashboard/src/lib/runtime.ts new file mode 100644 index 00000000..b6d781c1 --- /dev/null +++ b/dashboard/src/lib/runtime.ts @@ -0,0 +1,77 @@ +/** + * Runtime environment detection and information + * Provides unified interface for checking execution environment (Electron vs Browser) + */ + +/** + * Type of runtime environment + */ +export type RuntimeKind = 'electron' | 'browser' + +/** + * Runtime information object + */ +export interface RuntimeInfo { + /** Type of runtime (electron or browser) */ + kind: RuntimeKind + /** Version information (electron versions, etc) */ + versions?: Record + /** User agent string */ + userAgent?: string + /** Source of runtime detection (tag means set by preload, fallback means default for browser) */ + source: 'tag' | 'fallback' +} + +/** + * Build default browser runtime info + * Used as fallback when not in Electron environment + */ +function buildBrowserRuntime(): RuntimeInfo { + return { + kind: 'browser', + userAgent: typeof navigator !== 'undefined' ? navigator.userAgent : undefined, + source: 'fallback', + } +} + +/** + * Get current runtime information + * Reads from globalThis.__RUNTIME__ if available (set by Electron preload) + * Falls back to browser runtime if not running in Electron + */ +export function getRuntime(): RuntimeInfo { + // Check if running in Electron (preload sets __RUNTIME__) + if (typeof globalThis !== 'undefined' && globalThis.__RUNTIME__) { + return globalThis.__RUNTIME__ + } + + // Fallback to browser runtime + return buildBrowserRuntime() +} + +/** + * Check if running in Electron environment + * Safe to use across browser and Electron - always returns boolean + */ +export function isElectron(): boolean { + return getRuntime().kind === 'electron' +} + +/** + * Get platform information + * In Electron: calls window.electronAPI.getPlatform() for actual platform + * In browser: returns 'browser' as identifier + */ +export function getPlatform(): string { + if (!isElectron()) { + return 'browser' + } + + // Safe to access electronAPI because isElectron() confirms it's available + if (typeof window !== 'undefined' && window.electronAPI?.getPlatform) { + return window.electronAPI.getPlatform() + } + + // Fallback if electronAPI unavailable + return 'unknown' +} diff --git a/dashboard/src/types/electron.d.ts b/dashboard/src/types/electron.d.ts new file mode 100644 index 00000000..ca042cdc --- /dev/null +++ b/dashboard/src/types/electron.d.ts @@ -0,0 +1,95 @@ +/** + * Electron API type definitions + * Declares Window.electronAPI and globalThis.__RUNTIME__ for frontend use + */ + +import type { RuntimeInfo } from '@/lib/runtime' + +/** + * Backend connection configuration + */ +export interface BackendConnection { + /** Unique identifier */ + id: string + /** Display name */ + name: string + /** Connection URL */ + url: string + /** Whether this is the default backend */ + isDefault: boolean + /** Last connection timestamp */ + lastConnected?: number +} + +/** + * Electron IPC API exposed to renderer process + * All methods communicate via IPC bridges to main process + */ +export interface ElectronAPI { + // Window control + /** Minimize the application window */ + minimizeWindow(): void + /** Maximize the application window */ + maximizeWindow(): void + /** Close the application window */ + closeWindow(): void + /** Check if window is currently maximized */ + isMaximized(): Promise + + // Window event listeners + /** Register callback for window maximized event */ + onWindowMaximized(callback: () => void): () => void + /** Register callback for window unmaximized event */ + onWindowUnmaximized(callback: () => void): () => void + + // Backend management + /** Get list of all configured backends */ + getBackends(): Promise + /** Add a new backend connection */ + addBackend(conn: Omit): Promise + /** Update an existing backend configuration */ + updateBackend(id: string, patch: Partial): Promise + /** Remove a backend by ID */ + removeBackend(id: string): Promise + /** Set the active backend */ + setActiveBackend(id: string): Promise + /** Get the currently active backend */ + getActiveBackend(): Promise + /** Get the active backend's URL for API requests */ + getActiveBackendUrl(): Promise + + // Application state + /** Mark that first-launch setup has been completed */ + markFirstLaunchComplete(): Promise + /** Check if this is the first launch */ + isFirstLaunch(): Promise + /** Get application version */ + getAppVersion(): Promise + + // Backend event listener + /** Register callback for backend change events */ + onBackendChanged(callback: (backend: BackendConnection | null) => void): () => void + + // Platform detection + /** Get platform identifier (darwin, win32, linux) */ + getPlatform(): string +} + +// Extend Window interface to include electronAPI +declare global { + interface Window { + /** Electron API bridge for main process communication */ + electronAPI?: ElectronAPI + } + + /** + * Global runtime information + * Set by Electron preload, undefined in browser + */ + namespace globalThis { + var __RUNTIME__: RuntimeInfo | undefined + } +} + +// Ensure this file is treated as a module +export {} From fc394f4412ab495bd2eec138ace706a5679a4068 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Tue, 3 Mar 2026 00:54:14 +0800 Subject: [PATCH 04/12] feat(electron): adapt renderer API and WebSocket layer for dynamic backend URL --- dashboard/src/lib/api.ts | 13 ++++++++++++- dashboard/src/lib/fetch-with-auth.ts | 21 ++++++++++++++++++--- dashboard/src/lib/knowledge-api.ts | 17 +++++++++++++---- dashboard/src/lib/log-websocket.ts | 19 ++++++------------- dashboard/src/lib/plugin-api/marketplace.ts | 7 +++---- dashboard/src/routes/chat/index.tsx | 5 +++-- 6 files changed, 55 insertions(+), 27 deletions(-) diff --git a/dashboard/src/lib/api.ts b/dashboard/src/lib/api.ts index 4c8d1bb9..94a4d94c 100644 --- a/dashboard/src/lib/api.ts +++ b/dashboard/src/lib/api.ts @@ -1,8 +1,19 @@ import axios from 'axios' +import { getApiBaseUrl } from './api-base' + const apiClient = axios.create({ - baseURL: import.meta.env.DEV ? 'http://localhost:8000' : '', + baseURL: '', // 统一为空,通过拦截器动态设置 timeout: 10000, }) +// Electron 端:动态注入后端 URL;浏览器端 getApiBaseUrl() 返回空字符串,行为不变 +apiClient.interceptors.request.use(async (config) => { + const baseUrl = await getApiBaseUrl() + if (baseUrl && !config.baseURL) { + config.baseURL = baseUrl + } + return config +}) + export default apiClient diff --git a/dashboard/src/lib/fetch-with-auth.ts b/dashboard/src/lib/fetch-with-auth.ts index 7a2ef31e..d3529678 100644 --- a/dashboard/src/lib/fetch-with-auth.ts +++ b/dashboard/src/lib/fetch-with-auth.ts @@ -1,5 +1,20 @@ +import { getApiBaseUrl } from './api-base' +import { isElectron } from './runtime' + // 带自动认证处理的 fetch 封装 +/** + * 将相对路径在 Electron 端转换为绝对路径 + * 浏览器端直接返回原始 input,行为不变 + */ +async function resolveUrl(input: RequestInfo | URL): Promise { + if (isElectron() && typeof input === 'string' && input.startsWith('/')) { + const base = await getApiBaseUrl() + return base ? `${base}${input}` : input + } + return input +} + /** * 增强的 fetch 函数,自动处理 401 错误并跳转到登录页 * 使用 HttpOnly Cookie 进行认证,自动携带 credentials @@ -25,7 +40,7 @@ export async function fetchWithAuth( headers, } - const response = await fetch(input, config) + const response = await fetch(await resolveUrl(input), config) // 检测 401 未授权错误 if (response.status === 401) { @@ -54,7 +69,7 @@ export function getAuthHeaders(): HeadersInit { */ export async function logout(): Promise { try { - await fetch('/api/webui/auth/logout', { + await fetch(await resolveUrl('/api/webui/auth/logout'), { method: 'POST', credentials: 'include', }) @@ -70,7 +85,7 @@ export async function logout(): Promise { */ export async function checkAuthStatus(): Promise { try { - const response = await fetch('/api/webui/auth/check', { + const response = await fetch(await resolveUrl('/api/webui/auth/check'), { method: 'GET', credentials: 'include', }) diff --git a/dashboard/src/lib/knowledge-api.ts b/dashboard/src/lib/knowledge-api.ts index b07fe653..ff679191 100644 --- a/dashboard/src/lib/knowledge-api.ts +++ b/dashboard/src/lib/knowledge-api.ts @@ -2,7 +2,16 @@ * 知识库 API */ -const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || '/api/webui' +import { getApiBaseUrl } from './api-base' +import { isElectron } from './runtime' + +async function getKnowledgeApiBase(): Promise { + if (isElectron()) { + const base = await getApiBaseUrl() + return base ? `${base}/api/webui` : '/api/webui' + } + return import.meta.env.VITE_API_BASE_URL || '/api/webui' +} export interface KnowledgeNode { id: string @@ -35,7 +44,7 @@ export interface KnowledgeStats { * 获取知识图谱数据 */ export async function getKnowledgeGraph(limit: number = 100, nodeType: 'all' | 'entity' | 'paragraph' = 'all'): Promise { - const url = `${API_BASE_URL}/knowledge/graph?limit=${limit}&node_type=${nodeType}` + const url = `${await getKnowledgeApiBase()}/knowledge/graph?limit=${limit}&node_type=${nodeType}` const response = await fetch(url) @@ -50,7 +59,7 @@ export async function getKnowledgeGraph(limit: number = 100, nodeType: 'all' | ' * 获取知识图谱统计信息 */ export async function getKnowledgeStats(): Promise { - const response = await fetch(`${API_BASE_URL}/knowledge/stats`) + const response = await fetch(`${await getKnowledgeApiBase()}/knowledge/stats`) if (!response.ok) { throw new Error('获取知识图谱统计信息失败') } @@ -61,7 +70,7 @@ export async function getKnowledgeStats(): Promise { * 搜索知识节点 */ export async function searchKnowledgeNode(query: string): Promise { - const response = await fetch(`${API_BASE_URL}/knowledge/search?query=${encodeURIComponent(query)}`) + const response = await fetch(`${await getKnowledgeApiBase()}/knowledge/search?query=${encodeURIComponent(query)}`) if (!response.ok) { throw new Error('搜索知识节点失败') } diff --git a/dashboard/src/lib/log-websocket.ts b/dashboard/src/lib/log-websocket.ts index 4ad69127..abf9e7f7 100644 --- a/dashboard/src/lib/log-websocket.ts +++ b/dashboard/src/lib/log-websocket.ts @@ -7,6 +7,8 @@ import { checkAuthStatus } from './fetch-with-auth' import { getSetting } from './settings-manager' import { createReconnectingWebSocket } from './ws-utils' +import { getWsBaseUrl } from '@/lib/api-base' + export interface LogEntry { id: string timestamp: string @@ -54,18 +56,9 @@ class LogWebSocketManager { /** * 获取 WebSocket URL(不含 token 参数) */ - private getWebSocketUrl(): string { - let baseUrl: string - if (import.meta.env.DEV) { - // 开发模式:连接到 WebUI 后端服务器 - baseUrl = 'ws://127.0.0.1:8001/ws/logs' - } else { - // 生产模式:使用当前页面的 host - const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:' - const host = window.location.host - baseUrl = `${protocol}//${host}/ws/logs` - } - return baseUrl + private async getWebSocketUrl(): Promise { + const wsBase = await getWsBaseUrl() + return `${wsBase}/ws/logs` } /** @@ -85,7 +78,7 @@ class LogWebSocketManager { return } - const wsUrl = this.getWebSocketUrl() + const wsUrl = await this.getWebSocketUrl() // 使用 ws-utils 创建 WebSocket this.wsControl = createReconnectingWebSocket(wsUrl, { diff --git a/dashboard/src/lib/plugin-api/marketplace.ts b/dashboard/src/lib/plugin-api/marketplace.ts index 026e4457..82b8e9c7 100644 --- a/dashboard/src/lib/plugin-api/marketplace.ts +++ b/dashboard/src/lib/plugin-api/marketplace.ts @@ -1,9 +1,9 @@ import type { ApiResponse } from '@/types/api' import type { PluginInfo } from '@/types/plugin' +import { getWsBaseUrl } from '@/lib/api-base' import { fetchWithAuth } from '@/lib/fetch-with-auth' import { parseResponse } from '@/lib/api-helpers' - import type { GitStatus, MaimaiVersion } from './types' /** @@ -213,9 +213,8 @@ export async function connectPluginProgressWebSocket( onProgress: (progress: import('./types').PluginLoadProgress) => void, onError?: (error: Event) => void ): Promise { - const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:' - const host = window.location.host - const wsUrl = `${protocol}//${host}/api/webui/ws/plugin-progress` + const wsBase = await getWsBaseUrl() + const wsUrl = `${wsBase}/api/webui/ws/plugin-progress` // 使用 ws-utils 创建 WebSocket const { createReconnectingWebSocket } = await import('@/lib/ws-utils') diff --git a/dashboard/src/routes/chat/index.tsx b/dashboard/src/routes/chat/index.tsx index 20f45ae4..5d7044a6 100644 --- a/dashboard/src/routes/chat/index.tsx +++ b/dashboard/src/routes/chat/index.tsx @@ -5,6 +5,7 @@ import { Button } from '@/components/ui/button' import { Input } from '@/components/ui/input' import { ScrollArea } from '@/components/ui/scroll-area' import { useToast } from '@/hooks/use-toast' +import { getWsBaseUrl } from '@/lib/api-base' import { fetchWithAuth } from '@/lib/fetch-with-auth' import { cn } from '@/lib/utils' import { Bot, Edit2, Loader2, RefreshCw, User, Send, Wifi, WifiOff, UserCircle2 } from 'lucide-react' @@ -299,7 +300,7 @@ export function ChatPage() { return } - const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:' + const wsBase = await getWsBaseUrl() const params = new URLSearchParams() // 添加 token 到参数 @@ -320,7 +321,7 @@ export function ChatPage() { params.append('user_name', userName) } - const wsUrl = `${protocol}//${window.location.host}/api/chat/ws?${params.toString()}` + const wsUrl = `${wsBase}/api/chat/ws?${params.toString()}` console.log(`[Tab ${tabId}] 正在连接 WebSocket:`, wsUrl) try { From 65774f3afc36c045ea5964d4334083c7531dea9e Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Tue, 3 Mar 2026 00:54:24 +0800 Subject: [PATCH 05/12] feat(electron): add Electron UI components and layout integration --- .../components/electron/BackendManager.tsx | 244 +++++++++++++++++ .../electron/BackendSetupWizard.tsx | 256 ++++++++++++++++++ .../src/components/electron/TitleBar.tsx | 64 +++++ dashboard/src/components/layout/Header.tsx | 33 ++- dashboard/src/components/layout/Layout.tsx | 8 +- dashboard/src/hooks/useBackendConnections.ts | 62 +++++ dashboard/src/hooks/useWindowControls.ts | 30 ++ dashboard/src/main.tsx | 15 +- 8 files changed, 708 insertions(+), 4 deletions(-) create mode 100644 dashboard/src/components/electron/BackendManager.tsx create mode 100644 dashboard/src/components/electron/BackendSetupWizard.tsx create mode 100644 dashboard/src/components/electron/TitleBar.tsx create mode 100644 dashboard/src/hooks/useBackendConnections.ts create mode 100644 dashboard/src/hooks/useWindowControls.ts diff --git a/dashboard/src/components/electron/BackendManager.tsx b/dashboard/src/components/electron/BackendManager.tsx new file mode 100644 index 00000000..caef5137 --- /dev/null +++ b/dashboard/src/components/electron/BackendManager.tsx @@ -0,0 +1,244 @@ +import { useState } from 'react' +import { Check, Loader2, Pencil, Plus, Server, Trash2 } from 'lucide-react' + +import { + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, +} from '@/components/ui/alert-dialog' +import { Button } from '@/components/ui/button' +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, +} from '@/components/ui/dialog' +import { Input } from '@/components/ui/input' +import { Label } from '@/components/ui/label' +import { ScrollArea } from '@/components/ui/scroll-area' +import { useBackendConnections } from '@/hooks/useBackendConnections' +import { isElectron } from '@/lib/runtime' +import type { BackendConnection } from '@/types/electron' + +export interface BackendManagerProps { + open: boolean + onOpenChange: (open: boolean) => void +} + +export function BackendManager({ open, onOpenChange }: BackendManagerProps) { + const { + activeId, + addBackend, + backends, + loading, + removeBackend, + switchBackend, + updateBackend, + } = useBackendConnections() + + const [editConn, setEditConn] = useState | null>(null) + const [deleteConn, setDeleteConn] = useState(null) + + if (!isElectron()) return null + + const handleSave = async () => { + if (!editConn?.name || !editConn?.url) return + const urlPattern = /^https?:\/\// + if (!urlPattern.test(editConn.url)) return + + if (editConn.id) { + await updateBackend(editConn.id, editConn) + } else { + await addBackend({ + name: editConn.name, + url: editConn.url, + isDefault: editConn.isDefault ?? false, + }) + } + setEditConn(null) + } + + const handleDelete = async () => { + if (!deleteConn) return + if (deleteConn.id === activeId) return + await removeBackend(deleteConn.id) + setDeleteConn(null) + } + + const handleSwitch = async (id: string) => { + if (id === activeId) return + await switchBackend(id) + } + + return ( + <> + + + + 后端连接管理 + + + {loading ? ( +
+ +
+ ) : ( + +
+ {backends.map((backend) => { + const isActive = backend.id === activeId + return ( +
+
+
+ {isActive ? ( + + ) : ( +
+ )} +
+
+ + {backend.name} + + + {backend.url} + +
+
+ +
+ {!isActive && ( + + )} + + +
+
+ ) + })} +
+ + )} + +
+ +
+ +
+ + {/* Edit/Add Dialog */} + !open && setEditConn(null)}> + + + {editConn?.id ? '编辑连接' : '添加连接'} + +
+
+ + + setEditConn((prev) => (prev ? { ...prev, name: e.target.value } : null)) + } + placeholder="我的服务器" + /> +
+
+ + + setEditConn((prev) => (prev ? { ...prev, url: e.target.value } : null)) + } + placeholder="http://192.168.1.100:8001" + /> +
+
+
+ + +
+
+
+ + {/* Delete Confirmation */} + !open && setDeleteConn(null)}> + + + 删除连接 + + 确定要删除 {deleteConn?.name} 吗?此操作不可撤销。 + + + + 取消 + + 删除 + + + + + + ) +} diff --git a/dashboard/src/components/electron/BackendSetupWizard.tsx b/dashboard/src/components/electron/BackendSetupWizard.tsx new file mode 100644 index 00000000..c1fcfa18 --- /dev/null +++ b/dashboard/src/components/electron/BackendSetupWizard.tsx @@ -0,0 +1,256 @@ +import { useState } from 'react' +import { + ArrowRight, + Bot, + CheckCircle2, + Loader2, + XCircle, +} from 'lucide-react' + +import { Button } from '@/components/ui/button' +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from '@/components/ui/card' +import { Input } from '@/components/ui/input' +import { Label } from '@/components/ui/label' + +import { isElectron } from '@/lib/runtime' + +interface BackendSetupWizardProps { + open: boolean +} + +type TestStatus = 'idle' | 'loading' | 'success' | 'error' + +/** + * First-launch backend setup wizard for Electron environment. + * Full-screen modal that guides users to configure their first backend connection. + * Cannot be dismissed until configuration is complete. + */ +export function BackendSetupWizard({ open }: BackendSetupWizardProps) { + const [name, setName] = useState('') + const [url, setUrl] = useState('') + const [testStatus, setTestStatus] = useState('idle') + const [testError, setTestError] = useState('') + const [isSubmitting, setIsSubmitting] = useState(false) + + // Validation errors + const [nameError, setNameError] = useState('') + const [urlError, setUrlError] = useState('') + + // Only render in Electron environment + if (!isElectron()) { + return null + } + + if (!open) { + return null + } + + const validateName = (value: string): boolean => { + if (!value.trim()) { + setNameError('后端名称不能为空') + return false + } + setNameError('') + return true + } + + const validateUrl = (value: string): boolean => { + if (!value.trim()) { + setUrlError('后端地址不能为空') + return false + } + if (!/^https?:\/\/.+/.test(value)) { + setUrlError('地址必须以 http:// 或 https:// 开头') + return false + } + if (value.endsWith('/')) { + setUrlError('地址末尾不能包含 /') + return false + } + setUrlError('') + return true + } + + const handleTestConnection = async () => { + if (!validateUrl(url)) return + + setTestStatus('loading') + setTestError('') + + try { + const response = await fetch(`${url}/api/webui/system/health`, { + method: 'GET', + signal: AbortSignal.timeout(10000), + }) + if (response.ok) { + setTestStatus('success') + } else { + setTestStatus('error') + setTestError(`服务器返回状态码 ${response.status}`) + } + } catch (err) { + setTestStatus('error') + if (err instanceof DOMException && err.name === 'TimeoutError') { + setTestError('连接超时,请检查地址是否正确') + } else if (err instanceof TypeError) { + setTestError('无法连接到服务器,请检查地址和网络') + } else { + setTestError(err instanceof Error ? err.message : '未知错误') + } + } + } + + const handleFinish = async () => { + const isNameValid = validateName(name) + const isUrlValid = validateUrl(url) + if (!isNameValid || !isUrlValid) return + + setIsSubmitting(true) + try { + const newBackend = await window.electronAPI!.addBackend({ + name: name.trim(), + url: url.trim(), + isDefault: true, + }) + await window.electronAPI!.setActiveBackend(newBackend.id) + await window.electronAPI!.markFirstLaunchComplete() + window.location.reload() + } catch (err) { + setIsSubmitting(false) + setTestStatus('error') + setTestError( + err instanceof Error ? err.message : '保存配置失败,请重试' + ) + } + } + + const isFormValid = name.trim() !== '' && /^https?:\/\/.+/.test(url) && !url.endsWith('/') + + return ( +
+ {/* Background decoration */} +
+
+
+
+ + + +
+ +
+ 欢迎使用 MaiBot + + 配置您的第一个后端连接以开始使用 + +
+ + + {/* Backend name field */} +
+ + { + setName(e.target.value) + if (nameError) validateName(e.target.value) + }} + onBlur={() => validateName(name)} + /> + {nameError && ( +

{nameError}

+ )} +
+ + {/* Backend URL field */} +
+ + { + setUrl(e.target.value) + if (urlError) validateUrl(e.target.value) + // Reset test status when URL changes + if (testStatus !== 'idle') { + setTestStatus('idle') + setTestError('') + } + }} + onBlur={() => validateUrl(url)} + /> + {urlError && ( +

{urlError}

+ )} +
+ + {/* Test connection */} +
+ + + {testStatus === 'success' && ( +
+ + 连接成功 +
+ )} + + {testStatus === 'error' && ( +
+ + {testError || '无法连接'} +
+ )} +
+ + {/* Submit button */} + +
+
+
+ ) +} diff --git a/dashboard/src/components/electron/TitleBar.tsx b/dashboard/src/components/electron/TitleBar.tsx new file mode 100644 index 00000000..8fe43480 --- /dev/null +++ b/dashboard/src/components/electron/TitleBar.tsx @@ -0,0 +1,64 @@ +import { Copy, Minus, Square, X } from 'lucide-react' +import { useMemo } from 'react' + +import { useWindowControls } from '@/hooks/useWindowControls' +import { getPlatform, isElectron } from '@/lib/runtime' + +const dragStyle = { WebkitAppRegion: 'drag' } as React.CSSProperties & { WebkitAppRegion: string } +const noDragStyle = { WebkitAppRegion: 'no-drag' } as React.CSSProperties & { WebkitAppRegion: string } + +export function TitleBar() { + const { close, isMaximized, minimize, toggleMaximize } = useWindowControls() + const isMac = useMemo(() => getPlatform() === 'darwin', []) + + if (!isElectron()) return null + + return ( +
+ {/* macOS traffic light padding */} + {isMac &&
} + + {/* Title / Drag area */} +
+ MaiBot +
+ + {/* Windows / Linux Controls */} + {!isMac && ( +
+ + + +
+ )} +
+ ) +} \ No newline at end of file diff --git a/dashboard/src/components/layout/Header.tsx b/dashboard/src/components/layout/Header.tsx index efacb33d..2b9493ca 100644 --- a/dashboard/src/components/layout/Header.tsx +++ b/dashboard/src/components/layout/Header.tsx @@ -1,10 +1,13 @@ -import { BookOpen, ChevronLeft, LogOut, Menu, Moon, PieChart, Search, Sun } from 'lucide-react' +import { BookOpen, ChevronLeft, LogOut, Menu, Moon, PieChart, Search, Server, Sun } from 'lucide-react' import { Link } from '@tanstack/react-router' import { BackgroundLayer } from '@/components/background-layer' import { Button } from '@/components/ui/button' import { Kbd } from '@/components/ui/kbd' import { SearchDialog } from '@/components/search-dialog' +import { useEffect, useState } from 'react' +import { BackendManager } from '@/components/electron/BackendManager' +import { isElectron } from '@/lib/runtime' import { cn } from '@/lib/utils' import { useBackground } from '@/hooks/use-background' import { logout } from '@/lib/fetch-with-auth' @@ -32,6 +35,15 @@ export function Header({ onThemeChange, }: HeaderProps) { const headerBg = useBackground('header') + const [backendManagerOpen, setBackendManagerOpen] = useState(false) + const [activeBackendName, setActiveBackendName] = useState('') + + useEffect(() => { + if (!isElectron()) return + window.electronAPI!.getActiveBackend().then((b) => { + setActiveBackendName(b?.name ?? '未连接') + }) + }, []) const handleLogout = async () => { await logout() @@ -62,6 +74,25 @@ export function Header({
+ {/* 后端切换按钮(仅 Electron) */} + {isElectron() && ( + <> + + +
+ + )} {/* 年度总结入口 */}
) } diff --git a/dashboard/src/hooks/useBackendConnections.ts b/dashboard/src/hooks/useBackendConnections.ts new file mode 100644 index 00000000..7f506109 --- /dev/null +++ b/dashboard/src/hooks/useBackendConnections.ts @@ -0,0 +1,62 @@ +import { useCallback, useEffect, useState } from 'react' + +import { isElectron } from '@/lib/runtime' +import type { BackendConnection } from '@/types/electron' + +export function useBackendConnections() { + const [backends, setBackends] = useState([]) + const [activeId, setActiveId] = useState(null) + const [loading, setLoading] = useState(true) + + const refresh = useCallback(async () => { + if (!isElectron()) return + const [list, active] = await Promise.all([ + window.electronAPI!.getBackends(), + window.electronAPI!.getActiveBackend(), + ]) + setBackends(list) + setActiveId(active?.id ?? null) + setLoading(false) + }, []) + + useEffect(() => { + refresh() + }, [refresh]) + + const addBackend = useCallback(async (conn: Omit) => { + if (!isElectron()) return + await window.electronAPI!.addBackend(conn) + await refresh() + }, [refresh]) + + const updateBackend = useCallback(async (id: string, patch: Partial) => { + if (!isElectron()) return + await window.electronAPI!.updateBackend(id, patch) + await refresh() + }, [refresh]) + + const removeBackend = useCallback(async (id: string) => { + if (!isElectron()) return + await window.electronAPI!.removeBackend(id) + await refresh() + }, [refresh]) + + const switchBackend = useCallback(async (id: string) => { + if (!isElectron()) return + await window.electronAPI!.setActiveBackend(id) + setActiveId(id) + // 重新加载页面以使用新后端 + window.location.reload() + }, []) + + return { + backends, + activeId, + loading, + addBackend, + updateBackend, + removeBackend, + switchBackend, + refresh + } +} diff --git a/dashboard/src/hooks/useWindowControls.ts b/dashboard/src/hooks/useWindowControls.ts new file mode 100644 index 00000000..7cc49418 --- /dev/null +++ b/dashboard/src/hooks/useWindowControls.ts @@ -0,0 +1,30 @@ +import { useCallback, useEffect, useState } from 'react' + +import { isElectron } from '@/lib/runtime' + +export function useWindowControls() { + const [isMaximized, setIsMaximized] = useState(false) + + useEffect(() => { + if (!isElectron()) return + + const api = window.electronAPI + if (!api) return + + api.isMaximized().then(setIsMaximized) + + const unsubMax = api.onWindowMaximized(() => setIsMaximized(true)) + const unsubUnmax = api.onWindowUnmaximized(() => setIsMaximized(false)) + + return () => { + unsubMax?.() + unsubUnmax?.() + } + }, []) + + const minimize = useCallback(() => window.electronAPI?.minimizeWindow(), []) + const toggleMaximize = useCallback(() => window.electronAPI?.maximizeWindow(), []) + const close = useCallback(() => window.electronAPI?.closeWindow(), []) + + return { close, isMaximized, minimize, toggleMaximize } +} \ No newline at end of file diff --git a/dashboard/src/main.tsx b/dashboard/src/main.tsx index b5e77323..0123c786 100644 --- a/dashboard/src/main.tsx +++ b/dashboard/src/main.tsx @@ -1,4 +1,4 @@ -import { StrictMode } from 'react' +import { StrictMode, useEffect, useState } from 'react' import { createRoot } from 'react-dom/client' import { RouterProvider } from '@tanstack/react-router' import './index.css' @@ -9,6 +9,18 @@ import { AnimationProvider } from './components/animation-provider' import { TourProvider, TourRenderer } from './components/tour' import { Toaster } from './components/ui/toaster' import { ErrorBoundary } from './components/error-boundary' +import { BackendSetupWizard } from './components/electron/BackendSetupWizard' +import { isElectron } from './lib/runtime' + +function ElectronShell() { + const [isFirstLaunch, setIsFirstLaunch] = useState(false) + + useEffect(() => { + window.electronAPI!.isFirstLaunch().then(setIsFirstLaunch) + }, []) + + return +} createRoot(document.getElementById('root')!).render( @@ -17,6 +29,7 @@ createRoot(document.getElementById('root')!).render( + {isElectron() && } From c6545afa2e5b1b2afba97630ecb6029d005fd72d Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Tue, 3 Mar 2026 01:16:04 +0800 Subject: [PATCH 06/12] fix(package): format target configurations and update electron-store version --- dashboard/package.json | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/dashboard/package.json b/dashboard/package.json index 119b2d27..71ac2276 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -34,20 +34,29 @@ "mac": { "category": "public.app-category.utilities", "target": [ - { "target": "dmg", "arch": ["x64", "arm64"] } + { + "target": "dmg", + "arch": ["x64", "arm64"] + } ], "icon": "electron/resources/icon.icns", "darkModeSupport": true }, "win": { "target": [ - { "target": "nsis", "arch": ["x64"] } + { + "target": "nsis", + "arch": ["x64"] + } ], "icon": "electron/resources/icon.ico" }, "linux": { "target": [ - { "target": "AppImage", "arch": ["x64"] } + { + "target": "AppImage", + "arch": ["x64"] + } ], "icon": "electron/resources/icon.png", "category": "Utility" @@ -60,8 +69,16 @@ }, "dmg": { "contents": [ - { "x": 130, "y": 220 }, - { "x": 410, "y": 220, "type": "link", "path": "/Applications" } + { + "x": 130, + "y": 220 + }, + { + "x": 410, + "y": 220, + "type": "link", + "path": "/Applications" + } ] } }, @@ -143,7 +160,7 @@ "autoprefixer": "^10.4.22", "electron": "^40.6.1", "electron-builder": "^26.8.1", - "electron-store": "^8.1.0", + "electron-store": "11.0.2", "electron-vite": "^5.0.0", "eslint": "^9.39.1", "eslint-plugin-react-hooks": "^7.0.1", From efaff7ac605c0587c436f4d062f2580c4676af24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=B4=E7=8C=AB?= Date: Tue, 3 Mar 2026 02:18:04 +0900 Subject: [PATCH 07/12] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E8=BF=BD=E8=B8=AA?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E9=80=BB=E8=BE=91=EF=BC=8C=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=95=B0=E9=87=8F=E5=92=8CLLM=E5=88=A4?= =?UTF-8?q?=E6=96=AD=EF=BC=8C=E6=9B=B4=E6=96=B0=E8=A1=A8=E8=BE=BE=E5=B9=B6?= =?UTF-8?q?=E6=8C=81=E4=B9=85=E5=8C=96=E5=88=B0=E6=95=B0=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bw_learner/expression_reflect_tracker.py | 132 ++++++++++++++++++- 1 file changed, 127 insertions(+), 5 deletions(-) diff --git a/src/bw_learner/expression_reflect_tracker.py b/src/bw_learner/expression_reflect_tracker.py index 1ab56d3f..e4173c6a 100644 --- a/src/bw_learner/expression_reflect_tracker.py +++ b/src/bw_learner/expression_reflect_tracker.py @@ -1,16 +1,23 @@ +import json +import re +import time from typing import TYPE_CHECKING, Optional -import time +from json_repair import repair_json -from src.common.logger import get_logger +from src.chat.utils.chat_message_builder import ( + build_readable_messages, + get_raw_msg_by_timestamp_with_chat, +) from src.common.database.database import get_db_session -from src.llm_models.utils_model import LLMRequest +from src.common.logger import get_logger from src.config.config import model_config +from src.llm_models.utils_model import LLMRequest +from src.prompt.prompt_manager import prompt_manager if TYPE_CHECKING: from src.common.data_models.expression_data_model import MaiExpression -# TODO: 这个LLMRequest实例被更优雅的方式替换掉 judge_model = LLMRequest(model_set=model_config.model_task_config.tool_use, request_type="reflect.tracker") logger = get_logger("reflect_tracker") @@ -57,4 +64,119 @@ class ReflectTracker: self._reset_tracker() return True - # TODO: 完成追踪检查逻辑 \ No newline at end of file + # 获取消息列表 + msg_list = get_raw_msg_by_timestamp_with_chat( + chat_id=self.session_id, + timestamp_start=self.tracking_start_time, + timestamp_end=time.time(), + ) + + current_msg_count = len(msg_list) + + # 检查消息数量是否超限 + if current_msg_count > self.max_msg_count: + logger.info(f"ReflectTracker for expr {self.expression.item_id} timed out (message count).") + self._reset_tracker() + return True + + # 如果没有新消息,跳过本次检查 + if current_msg_count <= self.last_check_msg_count: + return False + + self.last_check_msg_count = current_msg_count + + # 构建上下文 + context_block = build_readable_messages( + msg_list, + replace_bot_name=True, + timestamp_mode="relative", + read_mark=0.0, + show_actions=False, + ) + + # LLM 判断 + try: + prompt_template = prompt_manager.get_prompt("reflect_judge") + prompt_template.add_context("situation", str(self.expression.situation)) + prompt_template.add_context("style", str(self.expression.style)) + prompt_template.add_context("context_block", context_block) + prompt = await prompt_manager.render_prompt(prompt_template) + + logger.info(f"ReflectTracker LLM Prompt: {prompt}") + + response, _ = await judge_model.generate_response_async(prompt, temperature=0.1) + + logger.info(f"ReflectTracker LLM Response: {response}") + + # 解析 JSON 响应 + json_pattern = r"```json\s*(.*?)\s*```" + matches = re.findall(json_pattern, response, re.DOTALL) + if not matches: + matches = [response] + + json_obj = json.loads(repair_json(matches[0])) + judgment = json_obj.get("judgment") + + if judgment == "Approve": + self._update_expression(checked=True, rejected=False, modified_by="ai") + logger.info(f"Expression {self.expression.item_id} approved by operator.") + self._reset_tracker() + return True + + elif judgment == "Reject": + corrected_situation = json_obj.get("corrected_situation") + corrected_style = json_obj.get("corrected_style") + has_update = bool(corrected_situation or corrected_style) + + update_kwargs = {"checked": True, "modified_by": "ai"} + if corrected_situation: + update_kwargs["situation"] = corrected_situation + if corrected_style: + update_kwargs["style"] = corrected_style + if not has_update: + update_kwargs["rejected"] = True + else: + update_kwargs["rejected"] = False + + self._update_expression(**update_kwargs) + + if has_update: + logger.info( + f"Expression {self.expression.item_id} rejected and updated. " + f"New situation: {corrected_situation}, New style: {corrected_style}" + ) + else: + logger.info( + f"Expression {self.expression.item_id} rejected but no correction provided, marked as rejected." + ) + self._reset_tracker() + return True + + elif judgment == "Ignore": + logger.info(f"ReflectTracker for expr {self.expression.item_id} judged as Ignore.") + return False + + except Exception as e: + logger.error(f"Error in ReflectTracker check: {e}") + return False + + return False + + def _update_expression(self, **kwargs): + """更新表达并持久化到数据库""" + if not self.expression: + return + + # 更新内存中的表达对象 + for key, value in kwargs.items(): + if hasattr(self.expression, key): + setattr(self.expression, key, value) + + # 持久化到数据库 + try: + with get_db_session() as session: + db_expr = self.expression.to_db_instance() + session.merge(db_expr) + session.commit() + except Exception as e: + logger.error(f"Failed to persist expression update: {e}") \ No newline at end of file From 71a5acbac5dcc724326034a911ecaf0ae7e2892a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=B4=E7=8C=AB?= Date: Tue, 3 Mar 2026 02:18:04 +0900 Subject: [PATCH 08/12] =?UTF-8?q?=E4=BC=98=E5=8C=96ReflectTracker=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E7=A1=AE=E4=BF=9D=E5=9C=A8=E8=BF=BD=E8=B8=AA?= =?UTF-8?q?=E6=97=B6=E8=A1=A8=E8=BE=BE=E4=B8=8D=E4=B8=BANone=EF=BC=8C?= =?UTF-8?q?=E7=AE=80=E5=8C=96=E4=BB=A3=E7=A0=81=E5=B9=B6=E5=A2=9E=E5=BC=BA?= =?UTF-8?q?=E5=8F=AF=E8=AF=BB=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bw_learner/expression_reflect_tracker.py | 26 +++++++++++--------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/bw_learner/expression_reflect_tracker.py b/src/bw_learner/expression_reflect_tracker.py index e4173c6a..f1ff810a 100644 --- a/src/bw_learner/expression_reflect_tracker.py +++ b/src/bw_learner/expression_reflect_tracker.py @@ -1,7 +1,7 @@ import json import re import time -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Any, Optional from json_repair import repair_json @@ -56,9 +56,13 @@ class ReflectTracker: return (bool): 如果返回True,表示追踪完成,Tracker运行结束(运行状态置为`False`);如果返回False,表示继续追踪 """ # 对于没有正在追踪的表达,直接返回False - if not self.tracking: + if not self.tracking or not self.expression: return False + # Type narrowing: expression is guaranteed non-None when tracking + assert self.expression is not None + expr = self.expression + # 检查是否超时(无论是消息数量还是时间) if time.time() - self.tracking_start_time > self.max_duration: self._reset_tracker() @@ -75,7 +79,7 @@ class ReflectTracker: # 检查消息数量是否超限 if current_msg_count > self.max_msg_count: - logger.info(f"ReflectTracker for expr {self.expression.item_id} timed out (message count).") + logger.info(f"ReflectTracker for expr {expr.item_id} timed out (message count).") self._reset_tracker() return True @@ -97,8 +101,8 @@ class ReflectTracker: # LLM 判断 try: prompt_template = prompt_manager.get_prompt("reflect_judge") - prompt_template.add_context("situation", str(self.expression.situation)) - prompt_template.add_context("style", str(self.expression.style)) + prompt_template.add_context("situation", str(expr.situation)) + prompt_template.add_context("style", str(expr.style)) prompt_template.add_context("context_block", context_block) prompt = await prompt_manager.render_prompt(prompt_template) @@ -119,7 +123,7 @@ class ReflectTracker: if judgment == "Approve": self._update_expression(checked=True, rejected=False, modified_by="ai") - logger.info(f"Expression {self.expression.item_id} approved by operator.") + logger.info(f"Expression {expr.item_id} approved by operator.") self._reset_tracker() return True @@ -128,7 +132,7 @@ class ReflectTracker: corrected_style = json_obj.get("corrected_style") has_update = bool(corrected_situation or corrected_style) - update_kwargs = {"checked": True, "modified_by": "ai"} + update_kwargs: dict[str, Any] = {"checked": True, "modified_by": "ai"} if corrected_situation: update_kwargs["situation"] = corrected_situation if corrected_style: @@ -142,18 +146,18 @@ class ReflectTracker: if has_update: logger.info( - f"Expression {self.expression.item_id} rejected and updated. " + f"Expression {expr.item_id} rejected and updated. " f"New situation: {corrected_situation}, New style: {corrected_style}" ) else: logger.info( - f"Expression {self.expression.item_id} rejected but no correction provided, marked as rejected." + f"Expression {expr.item_id} rejected but no correction provided, marked as rejected." ) self._reset_tracker() return True elif judgment == "Ignore": - logger.info(f"ReflectTracker for expr {self.expression.item_id} judged as Ignore.") + logger.info(f"ReflectTracker for expr {expr.item_id} judged as Ignore.") return False except Exception as e: @@ -162,7 +166,7 @@ class ReflectTracker: return False - def _update_expression(self, **kwargs): + def _update_expression(self, **kwargs: Any) -> None: """更新表达并持久化到数据库""" if not self.expression: return From 46babf729468995fa7d7cd8acf53b1c430bb703c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=B4=E7=8C=AB?= Date: Tue, 3 Mar 2026 02:18:59 +0900 Subject: [PATCH 09/12] =?UTF-8?q?=E6=B7=BB=E5=8A=A0TODO=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E4=BB=A5=E6=8F=90=E9=86=92=E6=B5=8B=E8=AF=95trigger=5Ftracker?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bw_learner/expression_reflect_tracker.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bw_learner/expression_reflect_tracker.py b/src/bw_learner/expression_reflect_tracker.py index f1ff810a..319c8459 100644 --- a/src/bw_learner/expression_reflect_tracker.py +++ b/src/bw_learner/expression_reflect_tracker.py @@ -48,6 +48,7 @@ class ReflectTracker: self.tracking = False self.last_check_msg_count = 0 + # TODO test it async def trigger_tracker(self) -> bool: """ 触发追踪检查 From 4561cd91b89eb89b38401958685835cfaaa16360 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Tue, 3 Mar 2026 01:19:36 +0800 Subject: [PATCH 10/12] fix(electron): use named Schema import from electron-store v8+ --- dashboard/electron/main/store.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboard/electron/main/store.ts b/dashboard/electron/main/store.ts index 65a810df..73535c91 100644 --- a/dashboard/electron/main/store.ts +++ b/dashboard/electron/main/store.ts @@ -1,6 +1,6 @@ import { randomUUID } from 'crypto' -import Store from 'electron-store' +import Store, { type Schema } from 'electron-store' /** * Backend connection data model @@ -31,7 +31,7 @@ export interface AppSettings { /** * JSON Schema for validating store contents */ -const SCHEMA: Store.Schema = { +const SCHEMA: Schema = { backends: { type: 'array', items: { From 5cc34f24c0f93f569d645a9355c059a7b89d5e65 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Tue, 3 Mar 2026 01:25:12 +0800 Subject: [PATCH 11/12] fix(.gitignore): add dist-electron and .sisyphus to ignored files --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 02864245..b4b922ed 100644 --- a/.gitignore +++ b/.gitignore @@ -353,4 +353,5 @@ interested_rates.txt MaiBot.code-workspace *.lock actionlint -.sisyphus/ \ No newline at end of file +.sisyphus/ +dist-electron/ \ No newline at end of file From a65a40f85f412cb0a2cbd683e6562133b8d4a6d4 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Tue, 3 Mar 2026 20:50:06 +0800 Subject: [PATCH 12/12] feat(dashboard): add i18n support with zh/en/ja/ko locales - Add react-i18next + i18next + i18next-browser-languagedetector - Create i18n config (singleton import) with zh/en/ja/ko JSON locale files - Add language switcher Globe dropdown in Header topbar - Replace all hardcoded Chinese strings in: - Layout (Header, Sidebar, NavItem, Layout, constants) - Settings (index, AppearanceTab, SecurityTab, OtherTab, AboutTab) - Auth page (auth.tsx) - Search dialog (searchItems via useMemo + t()) - Restart overlay (getStatusConfig accepts t param) - Error boundary (ErrorFallback, ErrorDetails function components) - HTTP warning banner - localStorage key: maibot-locale - Compatible with Electron --- dashboard/package-lock.json | 4775 +++++++++++++++++ dashboard/package.json | 16 +- dashboard/src/components/error-boundary.tsx | 17 +- .../src/components/http-warning-banner.tsx | 10 +- dashboard/src/components/layout/Header.tsx | 80 +- dashboard/src/components/layout/Layout.tsx | 4 +- dashboard/src/components/layout/NavItem.tsx | 6 +- dashboard/src/components/layout/Sidebar.tsx | 5 +- dashboard/src/components/layout/constants.ts | 46 +- dashboard/src/components/restart-overlay.tsx | 40 +- dashboard/src/components/search-dialog.tsx | 191 +- dashboard/src/i18n/index.ts | 37 + dashboard/src/i18n/locales/en.json | 477 ++ dashboard/src/i18n/locales/ja.json | 477 ++ dashboard/src/i18n/locales/ko.json | 477 ++ dashboard/src/i18n/locales/zh.json | 477 ++ dashboard/src/main.tsx | 1 + dashboard/src/routes/auth.tsx | 60 +- dashboard/src/routes/settings/AboutTab.tsx | 102 +- .../src/routes/settings/AppearanceTab.tsx | 158 +- dashboard/src/routes/settings/OtherTab.tsx | 141 +- dashboard/src/routes/settings/SecurityTab.tsx | 133 +- dashboard/src/routes/settings/index.tsx | 14 +- 23 files changed, 7271 insertions(+), 473 deletions(-) create mode 100644 dashboard/src/i18n/index.ts create mode 100644 dashboard/src/i18n/locales/en.json create mode 100644 dashboard/src/i18n/locales/ja.json create mode 100644 dashboard/src/i18n/locales/ko.json create mode 100644 dashboard/src/i18n/locales/zh.json diff --git a/dashboard/package-lock.json b/dashboard/package-lock.json index b23bcf79..5be38059 100644 --- a/dashboard/package-lock.json +++ b/dashboard/package-lock.json @@ -55,12 +55,15 @@ "dagre": "^0.8.5", "date-fns": "^4.1.0", "html-to-image": "^1.11.13", + "i18next": "^25.8.13", + "i18next-browser-languagedetector": "^8.2.1", "idb": "^8.0.3", "katex": "^0.16.27", "lucide-react": "^0.556.0", "react": "^19.2.1", "react-day-picker": "^9.12.0", "react-dom": "^19.2.1", + "react-i18next": "^16.5.4", "react-joyride": "^2.9.3", "react-markdown": "^10.1.0", "reactflow": "^11.11.4", @@ -83,6 +86,10 @@ "@vitejs/plugin-react": "^5.1.2", "@vitest/ui": "^4.0.18", "autoprefixer": "^10.4.22", + "electron": "^40.6.1", + "electron-builder": "^26.8.1", + "electron-store": "11.0.2", + "electron-vite": "^5.0.0", "eslint": "^9.39.1", "eslint-plugin-react-hooks": "^7.0.1", "eslint-plugin-react-refresh": "^0.4.24", @@ -330,6 +337,22 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.27.1", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.27.1.tgz", + "integrity": "sha512-8Z4TGic6xW70FKThA5HYEKKyBpOOsucTOD1DjU3fZxDg+K3zBJcXMFnt/4yQiZnf5+MiOMSXQ9PaEK/Ilh1DeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-transform-react-jsx-self": { "version": "7.27.1", "dev": true, @@ -671,6 +694,24 @@ "version": "1.4.1", "license": "MIT" }, + "node_modules/@develar/schema-utils": { + "version": "2.6.5", + "resolved": "https://registry.npmmirror.com/@develar/schema-utils/-/schema-utils-2.6.5.tgz", + "integrity": "sha512-0cp4PsWQ/9avqTVMCtZ+GirikIA36ikvjtHweU4/j8yLtgObI0+JUPhYFScgwlteveGB1rt3Cm8UhN04XayDig==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.0", + "ajv-keywords": "^3.4.1" + }, + "engines": { + "node": ">= 8.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, "node_modules/@dnd-kit/accessibility": { "version": "3.1.1", "license": "MIT", @@ -716,6 +757,361 @@ "react": ">=16.8.0" } }, + "node_modules/@electron/asar": { + "version": "3.4.1", + "resolved": "https://registry.npmmirror.com/@electron/asar/-/asar-3.4.1.tgz", + "integrity": "sha512-i4/rNPRS84t0vSRa2HorerGRXWyF4vThfHesw0dmcWHp+cspK743UanA0suA5Q5y8kzY2y6YKrvbIUn69BCAiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "commander": "^5.0.0", + "glob": "^7.1.6", + "minimatch": "^3.0.4" + }, + "bin": { + "asar": "bin/asar.js" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/@electron/asar/node_modules/commander": { + "version": "5.1.0", + "resolved": "https://registry.npmmirror.com/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/@electron/fuses": { + "version": "1.8.0", + "resolved": "https://registry.npmmirror.com/@electron/fuses/-/fuses-1.8.0.tgz", + "integrity": "sha512-zx0EIq78WlY/lBb1uXlziZmDZI4ubcCXIMJ4uGjXzZW0nS19TjSPeXPAjzzTmKQlJUZm0SbmZhPKP7tuQ1SsEw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.1", + "fs-extra": "^9.0.1", + "minimist": "^1.2.5" + }, + "bin": { + "electron-fuses": "dist/bin.js" + } + }, + "node_modules/@electron/fuses/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@electron/fuses/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@electron/fuses/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@electron/get": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/@electron/get/-/get-2.0.3.tgz", + "integrity": "sha512-Qkzpg2s9GnVV2I2BjRksUi43U5e6+zaQMcjoJy0C+C5oxaKl+fmckGDQFtRpZpZV0NQekuZZ+tGz7EA9TVnQtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.1.1", + "env-paths": "^2.2.0", + "fs-extra": "^8.1.0", + "got": "^11.8.5", + "progress": "^2.0.3", + "semver": "^6.2.0", + "sumchecker": "^3.0.1" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "global-agent": "^3.0.0" + } + }, + "node_modules/@electron/notarize": { + "version": "2.5.0", + "resolved": "https://registry.npmmirror.com/@electron/notarize/-/notarize-2.5.0.tgz", + "integrity": "sha512-jNT8nwH1f9X5GEITXaQ8IF/KdskvIkOFfB2CvwumsveVidzpSc+mvhhTMdAGSYF3O+Nq49lJ7y+ssODRXu06+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.1.1", + "fs-extra": "^9.0.1", + "promise-retry": "^2.0.1" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@electron/notarize/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@electron/notarize/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@electron/notarize/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@electron/osx-sign": { + "version": "1.3.3", + "resolved": "https://registry.npmmirror.com/@electron/osx-sign/-/osx-sign-1.3.3.tgz", + "integrity": "sha512-KZ8mhXvWv2rIEgMbWZ4y33bDHyUKMXnx4M0sTyPNK/vcB81ImdeY9Ggdqy0SWbMDgmbqyQ+phgejh6V3R2QuSg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "compare-version": "^0.1.2", + "debug": "^4.3.4", + "fs-extra": "^10.0.0", + "isbinaryfile": "^4.0.8", + "minimist": "^1.2.6", + "plist": "^3.0.5" + }, + "bin": { + "electron-osx-flat": "bin/electron-osx-flat.js", + "electron-osx-sign": "bin/electron-osx-sign.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@electron/osx-sign/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@electron/osx-sign/node_modules/isbinaryfile": { + "version": "4.0.10", + "resolved": "https://registry.npmmirror.com/isbinaryfile/-/isbinaryfile-4.0.10.tgz", + "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/gjtorikian/" + } + }, + "node_modules/@electron/osx-sign/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@electron/osx-sign/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@electron/rebuild": { + "version": "4.0.3", + "resolved": "https://registry.npmmirror.com/@electron/rebuild/-/rebuild-4.0.3.tgz", + "integrity": "sha512-u9vpTHRMkOYCs/1FLiSVAFZ7FbjsXK+bQuzviJZa+lG7BHZl1nz52/IcGvwa3sk80/fc3llutBkbCq10Vh8WQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@malept/cross-spawn-promise": "^2.0.0", + "debug": "^4.1.1", + "detect-libc": "^2.0.1", + "got": "^11.7.0", + "graceful-fs": "^4.2.11", + "node-abi": "^4.2.0", + "node-api-version": "^0.2.1", + "node-gyp": "^11.2.0", + "ora": "^5.1.0", + "read-binary-file-arch": "^1.0.6", + "semver": "^7.3.5", + "tar": "^7.5.6", + "yargs": "^17.0.1" + }, + "bin": { + "electron-rebuild": "lib/cli.js" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/@electron/rebuild/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@electron/universal": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/@electron/universal/-/universal-2.0.3.tgz", + "integrity": "sha512-Wn9sPYIVFRFl5HmwMJkARCCf7rqK/EurkfQ/rJZ14mHP3iYTjZSIOSVonEAnhWeAXwtw7zOekGRlc6yTtZ0t+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@electron/asar": "^3.3.1", + "@malept/cross-spawn-promise": "^2.0.0", + "debug": "^4.3.1", + "dir-compare": "^4.2.0", + "fs-extra": "^11.1.1", + "minimatch": "^9.0.3", + "plist": "^3.1.0" + }, + "engines": { + "node": ">=16.4" + } + }, + "node_modules/@electron/universal/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@electron/universal/node_modules/fs-extra": { + "version": "11.3.3", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-11.3.3.tgz", + "integrity": "sha512-VWSRii4t0AFm6ixFFmLLx1t7wS1gh+ckoa84aOeapGum0h+EZd1EhEumSB+ZdDLnEPuucsVB9oB7cxJHap6Afg==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/@electron/universal/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@electron/universal/node_modules/minimatch": { + "version": "9.0.9", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.2" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@electron/universal/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.27.3", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.3.tgz", @@ -1385,6 +1781,122 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmmirror.com/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/fs-minipass": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", + "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.4" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", "dev": true, @@ -1481,6 +1993,84 @@ "@lezer/lr": "^1.0.0" } }, + "node_modules/@malept/cross-spawn-promise": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/@malept/cross-spawn-promise/-/cross-spawn-promise-2.0.0.tgz", + "integrity": "sha512-1DpKU0Z5ThltBwjNySMC14g0CkbyhCaz9FkhxqNsZI6uAPJXFS8cMXlBKo26FJ8ZuW6S9GCMcR9IO5k2X5/9Fg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/malept" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/subscription/pkg/npm-.malept-cross-spawn-promise?utm_medium=referral&utm_source=npm_fund" + } + ], + "license": "Apache-2.0", + "dependencies": { + "cross-spawn": "^7.0.1" + }, + "engines": { + "node": ">= 12.13.0" + } + }, + "node_modules/@malept/flatpak-bundler": { + "version": "0.4.0", + "resolved": "https://registry.npmmirror.com/@malept/flatpak-bundler/-/flatpak-bundler-0.4.0.tgz", + "integrity": "sha512-9QOtNffcOF/c1seMCDnjckb3R9WHcG34tky+FHpNKKCW0wc/scYLwMtO+ptyGUfMW0/b/n4qRiALlaFHc9Oj7Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.1.1", + "fs-extra": "^9.0.0", + "lodash": "^4.17.15", + "tmp-promise": "^3.0.2" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@malept/flatpak-bundler/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@malept/flatpak-bundler/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@malept/flatpak-bundler/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/@marijn/find-cluster-break": { "version": "1.0.2", "license": "MIT" @@ -1517,6 +2107,67 @@ "node": ">= 8" } }, + "node_modules/@npmcli/agent": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/@npmcli/agent/-/agent-3.0.0.tgz", + "integrity": "sha512-S79NdEgDQd/NGCay6TCoVzXSj74skRZIKJcpJjC5lOq34SZzyI6MqtiiWoiVWoVrTcGjNeC4ipbh1VIHlpfF5Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^10.0.1", + "socks-proxy-agent": "^8.0.3" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@npmcli/agent/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/@npmcli/fs": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/@npmcli/fs/-/fs-4.0.0.tgz", + "integrity": "sha512-/xGlezI6xfGO9NwuJlnwz/K14qD1kCSAGtacBHnGzeAIuJGazcp45KP5NuyARXoKb7cwulAGWVsbeSxdG/cb0Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@npmcli/fs/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmmirror.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@polka/url": { "version": "1.0.0-next.29", "dev": true, @@ -3315,6 +3966,19 @@ "win32" ] }, + "node_modules/@sindresorhus/is": { + "version": "4.6.0", + "resolved": "https://registry.npmmirror.com/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, "node_modules/@standard-schema/spec": { "version": "1.1.0", "license": "MIT" @@ -3323,6 +3987,19 @@ "version": "0.3.0", "license": "MIT" }, + "node_modules/@szmarczak/http-timer": { + "version": "4.0.6", + "resolved": "https://registry.npmmirror.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", + "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", + "dev": true, + "license": "MIT", + "dependencies": { + "defer-to-connect": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@tanstack/history": { "version": "1.154.14", "license": "MIT", @@ -3643,6 +4320,19 @@ "@babel/types": "^7.28.2" } }, + "node_modules/@types/cacheable-request": { + "version": "6.0.3", + "resolved": "https://registry.npmmirror.com/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", + "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/http-cache-semantics": "*", + "@types/keyv": "^3.1.4", + "@types/node": "*", + "@types/responselike": "^1.0.0" + } + }, "node_modules/@types/chai": { "version": "5.2.3", "dev": true, @@ -3870,6 +4560,16 @@ "@types/estree": "*" } }, + "node_modules/@types/fs-extra": { + "version": "9.0.13", + "resolved": "https://registry.npmmirror.com/@types/fs-extra/-/fs-extra-9.0.13.tgz", + "integrity": "sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/geojson": { "version": "7946.0.16", "license": "MIT" @@ -3881,6 +4581,13 @@ "@types/unist": "*" } }, + "node_modules/@types/http-cache-semantics": { + "version": "4.2.0", + "resolved": "https://registry.npmmirror.com/@types/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", + "integrity": "sha512-L3LgimLHXtGkWikKnsPg0/VFx9OGZaC+eN1u4r+OB1XRqH3meBIAVC2zr1WdMH+RHmnRkqliQAOHNJ/E0j/e0Q==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/json-schema": { "version": "7.0.15", "dev": true, @@ -3890,6 +4597,16 @@ "version": "0.16.8", "license": "MIT" }, + "node_modules/@types/keyv": { + "version": "3.1.4", + "resolved": "https://registry.npmmirror.com/@types/keyv/-/keyv-3.1.4.tgz", + "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/mdast": { "version": "4.0.4", "license": "MIT", @@ -3909,6 +4626,18 @@ "undici-types": "~7.16.0" } }, + "node_modules/@types/plist": { + "version": "3.0.5", + "resolved": "https://registry.npmmirror.com/@types/plist/-/plist-3.0.5.tgz", + "integrity": "sha512-E6OCaRmAe4WDmWNsL/9RMqdkkzDCY1etutkflWk4c+AcjDU07Pcz1fQwTX0TQz+Pxqn9i4L1TU3UFpjnrcDgxA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@types/node": "*", + "xmlbuilder": ">=11.0.1" + } + }, "node_modules/@types/react": { "version": "19.2.13", "dev": true, @@ -3925,6 +4654,16 @@ "@types/react": "^19.2.0" } }, + "node_modules/@types/responselike": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/@types/responselike/-/responselike-1.0.3.tgz", + "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/retry": { "version": "0.12.2", "license": "MIT" @@ -3937,6 +4676,25 @@ "version": "0.0.6", "license": "MIT" }, + "node_modules/@types/verror": { + "version": "1.10.11", + "resolved": "https://registry.npmmirror.com/@types/verror/-/verror-1.10.11.tgz", + "integrity": "sha512-RlDm9K7+o5stv0Co8i8ZRGxDbrTxhJtgjqjFyVh/tXQyl/rYtTKlnTvZ88oSTeYREWurwx20Js4kTuKCsFkUtg==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/@types/yauzl": { + "version": "2.10.3", + "resolved": "https://registry.npmmirror.com/@types/yauzl/-/yauzl-2.10.3.tgz", + "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.54.0", "dev": true, @@ -4567,6 +5325,33 @@ "url": "https://opencollective.com/vitest" } }, + "node_modules/@xmldom/xmldom": { + "version": "0.8.11", + "resolved": "https://registry.npmmirror.com/@xmldom/xmldom/-/xmldom-0.8.11.tgz", + "integrity": "sha512-cQzWCtO6C8TQiYl1ruKNn2U6Ao4o4WBBcbL61yJl84x+j5sOWWFU9X7DpND8XZG3daDppSsigMdfAIl2upQBRw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/7zip-bin": { + "version": "5.2.0", + "resolved": "https://registry.npmmirror.com/7zip-bin/-/7zip-bin-5.2.0.tgz", + "integrity": "sha512-ukTPVhqG4jNzMro2qA9HSCSSVJN3aN7tlb+hfqYCt3ER0yWroeA2VR38MNrOHLQ/cVj+DaIMad0kFCtWWowh/A==", + "dev": true, + "license": "MIT" + }, + "node_modules/abbrev": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/abbrev/-/abbrev-3.0.1.tgz", + "integrity": "sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, "node_modules/acorn": { "version": "8.15.0", "dev": true, @@ -4609,6 +5394,58 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ajv-formats": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-formats/node_modules/ajv": { + "version": "8.18.0", + "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.18.0.tgz", + "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmmirror.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "ajv": "^6.9.1" + } + }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -4661,6 +5498,254 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/app-builder-bin": { + "version": "5.0.0-alpha.12", + "resolved": "https://registry.npmmirror.com/app-builder-bin/-/app-builder-bin-5.0.0-alpha.12.tgz", + "integrity": "sha512-j87o0j6LqPL3QRr8yid6c+Tt5gC7xNfYo6uQIQkorAC6MpeayVMZrEDzKmJJ/Hlv7EnOQpaRm53k6ktDYZyB6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/app-builder-lib": { + "version": "26.8.1", + "resolved": "https://registry.npmmirror.com/app-builder-lib/-/app-builder-lib-26.8.1.tgz", + "integrity": "sha512-p0Im/Dx5C4tmz8QEE1Yn4MkuPC8PrnlRneMhWJj7BBXQfNTJUshM/bp3lusdEsDbvvfJZpXWnYesgSLvwtM2Zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@develar/schema-utils": "~2.6.5", + "@electron/asar": "3.4.1", + "@electron/fuses": "^1.8.0", + "@electron/get": "^3.0.0", + "@electron/notarize": "2.5.0", + "@electron/osx-sign": "1.3.3", + "@electron/rebuild": "^4.0.3", + "@electron/universal": "2.0.3", + "@malept/flatpak-bundler": "^0.4.0", + "@types/fs-extra": "9.0.13", + "async-exit-hook": "^2.0.1", + "builder-util": "26.8.1", + "builder-util-runtime": "9.5.1", + "chromium-pickle-js": "^0.2.0", + "ci-info": "4.3.1", + "debug": "^4.3.4", + "dotenv": "^16.4.5", + "dotenv-expand": "^11.0.6", + "ejs": "^3.1.8", + "electron-publish": "26.8.1", + "fs-extra": "^10.1.0", + "hosted-git-info": "^4.1.0", + "isbinaryfile": "^5.0.0", + "jiti": "^2.4.2", + "js-yaml": "^4.1.0", + "json5": "^2.2.3", + "lazy-val": "^1.0.5", + "minimatch": "^10.0.3", + "plist": "3.1.0", + "proper-lockfile": "^4.1.2", + "resedit": "^1.7.0", + "semver": "~7.7.3", + "tar": "^7.5.7", + "temp-file": "^3.4.0", + "tiny-async-pool": "1.3.0", + "which": "^5.0.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "dmg-builder": "26.8.1", + "electron-builder-squirrel-windows": "26.8.1" + } + }, + "node_modules/app-builder-lib/node_modules/@electron/get": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/@electron/get/-/get-3.1.0.tgz", + "integrity": "sha512-F+nKc0xW+kVbBRhFzaMgPy3KwmuNTYX1fx6+FxxoSnNgwYX6LD7AKBTWkU0MQ6IBoe7dz069CNkR673sPAgkCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.1.1", + "env-paths": "^2.2.0", + "fs-extra": "^8.1.0", + "got": "^11.8.5", + "progress": "^2.0.3", + "semver": "^6.2.0", + "sumchecker": "^3.0.1" + }, + "engines": { + "node": ">=14" + }, + "optionalDependencies": { + "global-agent": "^3.0.0" + } + }, + "node_modules/app-builder-lib/node_modules/@electron/get/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/app-builder-lib/node_modules/@electron/get/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/app-builder-lib/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/app-builder-lib/node_modules/brace-expansion": { + "version": "5.0.4", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-5.0.4.tgz", + "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/app-builder-lib/node_modules/ci-info": { + "version": "4.3.1", + "resolved": "https://registry.npmmirror.com/ci-info/-/ci-info-4.3.1.tgz", + "integrity": "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/app-builder-lib/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/app-builder-lib/node_modules/fs-extra/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/app-builder-lib/node_modules/fs-extra/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/app-builder-lib/node_modules/isexe": { + "version": "3.1.5", + "resolved": "https://registry.npmmirror.com/isexe/-/isexe-3.1.5.tgz", + "integrity": "sha512-6B3tLtFqtQS4ekarvLVMZ+X+VlvQekbe4taUkf/rhVO3d/h0M2rfARm/pXLcPEsjjMsFgrFgSrhQIxcSVrBz8w==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/app-builder-lib/node_modules/jiti": { + "version": "2.6.1", + "resolved": "https://registry.npmmirror.com/jiti/-/jiti-2.6.1.tgz", + "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/app-builder-lib/node_modules/minimatch": { + "version": "10.2.4", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-10.2.4.tgz", + "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/app-builder-lib/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/app-builder-lib/node_modules/which": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/which/-/which-5.0.0.tgz", + "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, "node_modules/arg": { "version": "5.0.2", "dev": true, @@ -4689,6 +5774,17 @@ "node": ">= 0.4" } }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.8" + } + }, "node_modules/assertion-error": { "version": "2.0.1", "dev": true, @@ -4697,10 +5793,59 @@ "node": ">=12" } }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmmirror.com/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true, + "license": "MIT" + }, + "node_modules/async-exit-hook": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/async-exit-hook/-/async-exit-hook-2.0.1.tgz", + "integrity": "sha512-NW2cX8m1Q7KPA7a5M2ULQeZ2wR5qI5PAbw5L0UOMxdioVk9PMZ0h1TmyZEkPYrCvYjDlFICusOu1dlEKAAeXBw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, "node_modules/asynckit": { "version": "0.4.0", "license": "MIT" }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/atomically": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/atomically/-/atomically-2.1.1.tgz", + "integrity": "sha512-P4w9o2dqARji6P7MHprklbfiArZAWvo07yW7qs3pdljb3BWr12FIB7W+p0zJiuiVsUpRO0iZn1kFFcpPegg0tQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "stubborn-fs": "^2.0.0", + "when-exit": "^2.1.4" + } + }, "node_modules/autoprefixer": { "version": "10.4.24", "dev": true, @@ -4758,6 +5903,27 @@ "dev": true, "license": "MIT" }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/baseline-browser-mapping": { "version": "2.9.19", "dev": true, @@ -4785,6 +5951,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/boolean": { + "version": "3.2.0", + "resolved": "https://registry.npmmirror.com/boolean/-/boolean-3.2.0.tgz", + "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", + "dev": true, + "license": "MIT", + "optional": true + }, "node_modules/brace-expansion": { "version": "1.1.12", "dev": true, @@ -4837,6 +6024,242 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmmirror.com/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmmirror.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/builder-util": { + "version": "26.8.1", + "resolved": "https://registry.npmmirror.com/builder-util/-/builder-util-26.8.1.tgz", + "integrity": "sha512-pm1lTYbGyc90DHgCDO7eo8Rl4EqKLciayNbZqGziqnH9jrlKe8ZANGdityLZU+pJh16dfzjAx2xQq9McuIPEtw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/debug": "^4.1.6", + "7zip-bin": "~5.2.0", + "app-builder-bin": "5.0.0-alpha.12", + "builder-util-runtime": "9.5.1", + "chalk": "^4.1.2", + "cross-spawn": "^7.0.6", + "debug": "^4.3.4", + "fs-extra": "^10.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.0", + "js-yaml": "^4.1.0", + "sanitize-filename": "^1.6.3", + "source-map-support": "^0.5.19", + "stat-mode": "^1.0.0", + "temp-file": "^3.4.0", + "tiny-async-pool": "1.3.0" + } + }, + "node_modules/builder-util-runtime": { + "version": "9.5.1", + "resolved": "https://registry.npmmirror.com/builder-util-runtime/-/builder-util-runtime-9.5.1.tgz", + "integrity": "sha512-qt41tMfgHTllhResqM5DcnHyDIWNgzHvuY2jDcYP9iaGpkWxTUzV6GQjDeLnlR1/DtdlcsWQbA7sByMpmJFTLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.4", + "sax": "^1.2.4" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/builder-util/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/builder-util/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/builder-util/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmmirror.com/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cacache": { + "version": "19.0.1", + "resolved": "https://registry.npmmirror.com/cacache/-/cacache-19.0.1.tgz", + "integrity": "sha512-hdsUxulXCi5STId78vRVYEtDAjq99ICAUktLTeTYsLoTE6Z8dS0c8pWNCxwdrk9YfJeobDZc2Y186hD/5ZQgFQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "@npmcli/fs": "^4.0.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^10.0.1", + "minipass": "^7.0.3", + "minipass-collect": "^2.0.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^7.0.2", + "ssri": "^12.0.0", + "tar": "^7.4.3", + "unique-filename": "^4.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/cacache/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/cacache/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmmirror.com/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/cacache/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/cacache/node_modules/minimatch": { + "version": "9.0.9", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.2" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/cacheable-lookup": { + "version": "5.0.4", + "resolved": "https://registry.npmmirror.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", + "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.6.0" + } + }, + "node_modules/cacheable-request": { + "version": "7.0.4", + "resolved": "https://registry.npmmirror.com/cacheable-request/-/cacheable-request-7.0.4.tgz", + "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^6.0.1", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", "license": "MIT", @@ -4980,6 +6403,39 @@ "node": ">= 6" } }, + "node_modules/chownr": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/chromium-pickle-js": { + "version": "0.2.0", + "resolved": "https://registry.npmmirror.com/chromium-pickle-js/-/chromium-pickle-js-0.2.0.tgz", + "integrity": "sha512-1R5Fho+jBq0DDydt+/vHWj5KJNJCKdARKOCwZUen84I5BreWoLqRLANH1U87eJy1tiASPtMnGqJJq0ZsLoRPOw==", + "dev": true, + "license": "MIT" + }, + "node_modules/ci-info": { + "version": "4.4.0", + "resolved": "https://registry.npmmirror.com/ci-info/-/ci-info-4.4.0.tgz", + "integrity": "sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/class-variance-authority": { "version": "0.7.1", "license": "Apache-2.0", @@ -4998,6 +6454,88 @@ "version": "2.5.1", "license": "MIT" }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmmirror.com/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmmirror.com/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmmirror.com/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/clone-response": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/clone-response/-/clone-response-1.0.3.tgz", + "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-response": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/clsx": { "version": "2.1.1", "license": "MIT", @@ -5094,11 +6632,95 @@ "node": ">= 12" } }, + "node_modules/compare-version": { + "version": "0.1.2", + "resolved": "https://registry.npmmirror.com/compare-version/-/compare-version-0.1.2.tgz", + "integrity": "sha512-pJDh5/4wrEnXX/VWRZvruAGHkzKdr46z11OlTPN+VrATlWWhSKewNCJ1futCO5C7eJB3nPMFZA1LeYtcFboZ2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/concat-map": { "version": "0.0.1", "dev": true, "license": "MIT" }, + "node_modules/conf": { + "version": "15.1.0", + "resolved": "https://registry.npmmirror.com/conf/-/conf-15.1.0.tgz", + "integrity": "sha512-Uy5YN9KEu0WWDaZAVJ5FAmZoaJt9rdK6kH+utItPyGsCqCgaTKkrmZx3zoE0/3q6S3bcp3Ihkk+ZqPxWxFK5og==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.17.1", + "ajv-formats": "^3.0.1", + "atomically": "^2.0.3", + "debounce-fn": "^6.0.0", + "dot-prop": "^10.0.0", + "env-paths": "^3.0.0", + "json-schema-typed": "^8.0.1", + "semver": "^7.7.2", + "uint8array-extras": "^1.5.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/conf/node_modules/ajv": { + "version": "8.18.0", + "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.18.0.tgz", + "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/conf/node_modules/env-paths": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/env-paths/-/env-paths-3.0.0.tgz", + "integrity": "sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/conf/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/conf/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/convert-source-map": { "version": "2.0.0", "dev": true, @@ -5108,6 +6730,25 @@ "version": "2.0.0", "license": "MIT" }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/crc": { + "version": "3.8.0", + "resolved": "https://registry.npmmirror.com/crc/-/crc-3.8.0.tgz", + "integrity": "sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "buffer": "^5.1.0" + } + }, "node_modules/crelt": { "version": "1.0.6", "license": "MIT" @@ -5359,6 +7000,22 @@ "version": "4.1.0-0", "license": "MIT" }, + "node_modules/debounce-fn": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/debounce-fn/-/debounce-fn-6.0.0.tgz", + "integrity": "sha512-rBMW+F2TXryBwB54Q0d8drNEI+TfoS9JpNTAoVpukbWEhjXQq4rySFYLaqXMFXwdv61Zb2OHtj5bviSoimqxRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-function": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/debug": { "version": "4.4.3", "license": "MIT", @@ -5394,6 +7051,35 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decompress-response/node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/deep-diff": { "version": "1.0.2", "license": "MIT" @@ -5410,6 +7096,67 @@ "node": ">=0.10.0" } }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmmirror.com/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "license": "MIT", @@ -5424,6 +7171,24 @@ "node": ">=6" } }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/detect-node": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/detect-node/-/detect-node-2.1.0.tgz", + "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", + "dev": true, + "license": "MIT", + "optional": true + }, "node_modules/detect-node-es": { "version": "1.1.0", "license": "MIT" @@ -5444,16 +7209,170 @@ "dev": true, "license": "Apache-2.0" }, + "node_modules/dir-compare": { + "version": "4.2.0", + "resolved": "https://registry.npmmirror.com/dir-compare/-/dir-compare-4.2.0.tgz", + "integrity": "sha512-2xMCmOoMrdQIPHdsTawECdNPwlVFB9zGcz3kuhmBO6U3oU+UQjsue0i8ayLKpgBcm+hcXPMVSGUN9d+pvJ6+VQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimatch": "^3.0.5", + "p-limit": "^3.1.0 " + } + }, "node_modules/dlv": { "version": "1.1.3", "dev": true, "license": "MIT" }, + "node_modules/dmg-builder": { + "version": "26.8.1", + "resolved": "https://registry.npmmirror.com/dmg-builder/-/dmg-builder-26.8.1.tgz", + "integrity": "sha512-glMJgnTreo8CFINujtAhCgN96QAqApDMZ8Vl1r8f0QT8QprvC1UCltV4CcWj20YoIyLZx6IUskaJZ0NV8fokcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "app-builder-lib": "26.8.1", + "builder-util": "26.8.1", + "fs-extra": "^10.1.0", + "iconv-lite": "^0.6.2", + "js-yaml": "^4.1.0" + }, + "optionalDependencies": { + "dmg-license": "^1.0.11" + } + }, + "node_modules/dmg-builder/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/dmg-builder/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/dmg-builder/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/dmg-license": { + "version": "1.0.11", + "resolved": "https://registry.npmmirror.com/dmg-license/-/dmg-license-1.0.11.tgz", + "integrity": "sha512-ZdzmqwKmECOWJpqefloC5OJy1+WZBBse5+MR88z9g9Zn4VY+WYUkAyojmhzJckH5YbbZGcYIuGAkY5/Ys5OM2Q==", + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "dependencies": { + "@types/plist": "^3.0.1", + "@types/verror": "^1.10.3", + "ajv": "^6.10.0", + "crc": "^3.8.0", + "iconv-corefoundation": "^1.1.7", + "plist": "^3.0.4", + "smart-buffer": "^4.0.2", + "verror": "^1.10.0" + }, + "bin": { + "dmg-license": "bin/dmg-license.js" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/dom-accessibility-api": { "version": "0.6.3", "dev": true, "license": "MIT" }, + "node_modules/dot-prop": { + "version": "10.1.0", + "resolved": "https://registry.npmmirror.com/dot-prop/-/dot-prop-10.1.0.tgz", + "integrity": "sha512-MVUtAugQMOff5RnBy2d9N31iG0lNwg1qAoAOn7pOK5wf94WIaE3My2p3uwTQuvS2AcqchkcR3bHByjaM0mmi7Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^5.0.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/dot-prop/node_modules/type-fest": { + "version": "5.4.4", + "resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-5.4.4.tgz", + "integrity": "sha512-JnTrzGu+zPV3aXIUhnyWJj4z/wigMsdYajGLIYakqyOW1nPllzXEJee0QQbHj+CTIQtXGlAjuK0UY+2xTyjVAw==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "dependencies": { + "tagged-tag": "^1.0.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmmirror.com/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dotenv-expand": { + "version": "11.0.7", + "resolved": "https://registry.npmmirror.com/dotenv-expand/-/dotenv-expand-11.0.7.tgz", + "integrity": "sha512-zIHwmZPRshsCdpMDyVsqGmgyP0yT8GAgXUnkdAoJisxvf33k7yO6OuoKmcTGuXPWSsm8Oh88nZicRLA9Y0rUeA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "dotenv": "^16.4.5" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/dunder-proto": { "version": "1.0.1", "license": "MIT", @@ -5466,11 +7385,747 @@ "node": ">= 0.4" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmmirror.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmmirror.com/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/electron": { + "version": "40.6.1", + "resolved": "https://registry.npmmirror.com/electron/-/electron-40.6.1.tgz", + "integrity": "sha512-u9YfoixttdauciHV9Ut9Zf3YipJoU093kR1GSYTTXTAXqhiXI0G1A0NnL/f0O2m2UULCXaXMf2W71PloR6V9pQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "@electron/get": "^2.0.0", + "@types/node": "^24.9.0", + "extract-zip": "^2.0.1" + }, + "bin": { + "electron": "cli.js" + }, + "engines": { + "node": ">= 12.20.55" + } + }, + "node_modules/electron-builder": { + "version": "26.8.1", + "resolved": "https://registry.npmmirror.com/electron-builder/-/electron-builder-26.8.1.tgz", + "integrity": "sha512-uWhx1r74NGpCagG0ULs/P9Nqv2nsoo+7eo4fLUOB8L8MdWltq9odW/uuLXMFCDGnPafknYLZgjNX0ZIFRzOQAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "app-builder-lib": "26.8.1", + "builder-util": "26.8.1", + "builder-util-runtime": "9.5.1", + "chalk": "^4.1.2", + "ci-info": "^4.2.0", + "dmg-builder": "26.8.1", + "fs-extra": "^10.1.0", + "lazy-val": "^1.0.5", + "simple-update-notifier": "2.0.0", + "yargs": "^17.6.2" + }, + "bin": { + "electron-builder": "cli.js", + "install-app-deps": "install-app-deps.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/electron-builder/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/electron-builder/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/electron-builder/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/electron-publish": { + "version": "26.8.1", + "resolved": "https://registry.npmmirror.com/electron-publish/-/electron-publish-26.8.1.tgz", + "integrity": "sha512-q+jrSTIh/Cv4eGZa7oVR+grEJo/FoLMYBAnSL5GCtqwUpr1T+VgKB/dn1pnzxIxqD8S/jP1yilT9VrwCqINR4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/fs-extra": "^9.0.11", + "builder-util": "26.8.1", + "builder-util-runtime": "9.5.1", + "chalk": "^4.1.2", + "form-data": "^4.0.5", + "fs-extra": "^10.1.0", + "lazy-val": "^1.0.5", + "mime": "^2.5.2" + } + }, + "node_modules/electron-publish/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/electron-publish/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/electron-publish/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/electron-store": { + "version": "11.0.2", + "resolved": "https://registry.npmmirror.com/electron-store/-/electron-store-11.0.2.tgz", + "integrity": "sha512-4VkNRdN+BImL2KcCi41WvAYbh6zLX5AUTi4so68yPqiItjbgTjqpEnGAqasgnG+lB6GuAyUltKwVopp6Uv+gwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "conf": "^15.0.2", + "type-fest": "^5.0.1" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/electron-store/node_modules/type-fest": { + "version": "5.4.4", + "resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-5.4.4.tgz", + "integrity": "sha512-JnTrzGu+zPV3aXIUhnyWJj4z/wigMsdYajGLIYakqyOW1nPllzXEJee0QQbHj+CTIQtXGlAjuK0UY+2xTyjVAw==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "dependencies": { + "tagged-tag": "^1.0.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/electron-to-chromium": { "version": "1.5.286", "dev": true, "license": "ISC" }, + "node_modules/electron-vite": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/electron-vite/-/electron-vite-5.0.0.tgz", + "integrity": "sha512-OHp/vjdlubNlhNkPkL/+3JD34ii5ov7M0GpuXEVdQeqdQ3ulvVR7Dg/rNBLfS5XPIFwgoBLDf9sjjrL+CuDyRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.28.4", + "@babel/plugin-transform-arrow-functions": "^7.27.1", + "cac": "^6.7.14", + "esbuild": "^0.25.11", + "magic-string": "^0.30.19", + "picocolors": "^1.1.1" + }, + "bin": { + "electron-vite": "bin/electron-vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "@swc/core": "^1.0.0", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + } + } + }, + "node_modules/electron-vite/node_modules/@esbuild/aix-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/electron-vite/node_modules/esbuild": { + "version": "0.25.12", + "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmmirror.com/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmmirror.com/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, "node_modules/entities": { "version": "6.0.1", "license": "BSD-2-Clause", @@ -5481,6 +8136,23 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmmirror.com/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "dev": true, + "license": "MIT" + }, "node_modules/es-define-property": { "version": "1.0.1", "license": "MIT", @@ -5531,6 +8203,14 @@ "benchmarks" ] }, + "node_modules/es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true, + "license": "MIT", + "optional": true + }, "node_modules/esbuild": { "version": "0.27.3", "dev": true, @@ -5786,10 +8466,49 @@ "node": ">=12.0.0" } }, + "node_modules/exponential-backoff": { + "version": "3.1.3", + "resolved": "https://registry.npmmirror.com/exponential-backoff/-/exponential-backoff-3.1.3.tgz", + "integrity": "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/extend": { "version": "3.0.2", "license": "MIT" }, + "node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "bin": { + "extract-zip": "cli.js" + }, + "engines": { + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" + } + }, + "node_modules/extsprintf": { + "version": "1.4.1", + "resolved": "https://registry.npmmirror.com/extsprintf/-/extsprintf-1.4.1.tgz", + "integrity": "sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "license": "MIT", + "optional": true + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "dev": true, @@ -5831,6 +8550,23 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, "node_modules/fastq": { "version": "1.20.1", "dev": true, @@ -5839,6 +8575,16 @@ "reusify": "^1.0.4" } }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "pend": "~1.2.0" + } + }, "node_modules/fdir": { "version": "6.5.0", "dev": true, @@ -5871,6 +8617,39 @@ "node": ">=16.0.0" } }, + "node_modules/filelist": { + "version": "1.0.6", + "resolved": "https://registry.npmmirror.com/filelist/-/filelist-1.0.6.tgz", + "integrity": "sha512-5giy2PkLYY1cP39p17Ech+2xlpTRL9HLspOfEgm0L6CwBXBTgsK5ou0JtzYuepxkaQ/tvhCFIJ5uXo0OrM2DxA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.9", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-5.1.9.tgz", + "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/fill-range": { "version": "7.1.1", "dev": true, @@ -5932,6 +8711,36 @@ } } }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmmirror.com/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/form-data": { "version": "4.0.5", "license": "MIT", @@ -5958,6 +8767,41 @@ "url": "https://github.com/sponsors/rawify" } }, + "node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, "node_modules/fsevents": { "version": "2.3.3", "dev": true, @@ -5985,6 +8829,16 @@ "node": ">=6.9.0" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmmirror.com/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-intrinsic": { "version": "1.3.0", "license": "MIT", @@ -6025,6 +8879,44 @@ "node": ">= 0.4" } }, + "node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmmirror.com/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/glob-parent": { "version": "6.0.2", "dev": true, @@ -6036,6 +8928,39 @@ "node": ">=10.13.0" } }, + "node_modules/global-agent": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/global-agent/-/global-agent-3.0.0.tgz", + "integrity": "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==", + "dev": true, + "license": "BSD-3-Clause", + "optional": true, + "dependencies": { + "boolean": "^3.0.1", + "es6-error": "^4.1.1", + "matcher": "^3.0.0", + "roarr": "^2.15.3", + "semver": "^7.3.2", + "serialize-error": "^7.0.1" + }, + "engines": { + "node": ">=10.0" + } + }, + "node_modules/global-agent/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "optional": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/globals": { "version": "16.5.0", "dev": true, @@ -6047,6 +8972,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmmirror.com/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/goober": { "version": "2.1.18", "license": "MIT", @@ -6064,6 +9007,39 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/got": { + "version": "11.8.6", + "resolved": "https://registry.npmmirror.com/got/-/got-11.8.6.tgz", + "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sindresorhus/is": "^4.0.0", + "@szmarczak/http-timer": "^4.0.5", + "@types/cacheable-request": "^6.0.1", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^5.0.3", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "http2-wrapper": "^1.0.0-beta.5.2", + "lowercase-keys": "^2.0.0", + "p-cancelable": "^2.0.0", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=10.19.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/got?sponsor=1" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, "node_modules/graphlib": { "version": "2.1.8", "license": "MIT", @@ -6079,6 +9055,20 @@ "node": ">=8" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { "version": "1.1.0", "license": "MIT", @@ -6283,6 +9273,39 @@ "hermes-estree": "0.25.1" } }, + "node_modules/hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/hosted-git-info/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/hosted-git-info/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, "node_modules/html-encoding-sniffer": { "version": "6.0.0", "dev": true, @@ -6294,6 +9317,15 @@ "node": "^20.19.0 || ^22.12.0 || >=24.0.0" } }, + "node_modules/html-parse-stringify": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz", + "integrity": "sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==", + "license": "MIT", + "dependencies": { + "void-elements": "3.1.0" + } + }, "node_modules/html-to-image": { "version": "1.11.13", "license": "MIT" @@ -6306,6 +9338,13 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/http-cache-semantics": { + "version": "4.2.0", + "resolved": "https://registry.npmmirror.com/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", + "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==", + "dev": true, + "license": "BSD-2-Clause" + }, "node_modules/http-proxy-agent": { "version": "7.0.2", "dev": true, @@ -6318,6 +9357,20 @@ "node": ">= 14" } }, + "node_modules/http2-wrapper": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz", + "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.0.0" + }, + "engines": { + "node": ">=10.19.0" + } + }, "node_modules/https-proxy-agent": { "version": "7.0.6", "dev": true, @@ -6330,12 +9383,104 @@ "node": ">= 14" } }, + "node_modules/i18next": { + "version": "25.8.13", + "resolved": "https://registry.npmmirror.com/i18next/-/i18next-25.8.13.tgz", + "integrity": "sha512-E0vzjBY1yM+nsFrtgkjLhST2NBkirkvOVoQa0MSldhsuZ3jUge7ZNpuwG0Cfc74zwo5ZwRzg3uOgT+McBn32iA==", + "funding": [ + { + "type": "individual", + "url": "https://locize.com" + }, + { + "type": "individual", + "url": "https://locize.com/i18next.html" + }, + { + "type": "individual", + "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" + } + ], + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.28.4" + }, + "peerDependencies": { + "typescript": "^5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/i18next-browser-languagedetector": { + "version": "8.2.1", + "resolved": "https://registry.npmmirror.com/i18next-browser-languagedetector/-/i18next-browser-languagedetector-8.2.1.tgz", + "integrity": "sha512-bZg8+4bdmaOiApD7N7BPT9W8MLZG+nPTOFlLiJiT8uzKXFjhxw4v2ierCXOwB5sFDMtuA5G4kgYZ0AznZxQ/cw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.2" + } + }, + "node_modules/iconv-corefoundation": { + "version": "1.1.7", + "resolved": "https://registry.npmmirror.com/iconv-corefoundation/-/iconv-corefoundation-1.1.7.tgz", + "integrity": "sha512-T10qvkw0zz4wnm560lOEg0PovVqUXuOFhhHAkixw8/sycy7TJt7v/RrkEKEQnAw2viPSJu6iAkErxnzR0g8PpQ==", + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "dependencies": { + "cli-truncate": "^2.1.0", + "node-addon-api": "^1.6.3" + }, + "engines": { + "node": "^8.11.2 || >=10" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/idb": { "version": "8.0.3", "resolved": "https://registry.npmjs.org/idb/-/idb-8.0.3.tgz", "integrity": "sha512-LtwtVyVYO5BqRvcsKuB2iUMnHwPVByPCXFXOpuU96IZPPoPN6xjOGxZQ74pgSVVLQWtUOYgyeL4GE98BY5D3wg==", "license": "ISC" }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, "node_modules/ignore": { "version": "5.3.2", "dev": true, @@ -6383,6 +9528,25 @@ "node": ">=8" } }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmmirror.com/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, "node_modules/inline-style-parser": { "version": "0.2.7", "license": "MIT" @@ -6394,6 +9558,16 @@ "node": ">=12" } }, + "node_modules/ip-address": { + "version": "10.1.0", + "resolved": "https://registry.npmmirror.com/ip-address/-/ip-address-10.1.0.tgz", + "integrity": "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, "node_modules/is-alphabetical": { "version": "2.0.1", "license": "MIT", @@ -6455,6 +9629,16 @@ "node": ">=0.10.0" } }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/is-glob": { "version": "4.0.3", "dev": true, @@ -6474,6 +9658,16 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/is-lite": { "version": "1.2.1", "license": "MIT" @@ -6511,6 +9705,32 @@ "dev": true, "license": "MIT" }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmmirror.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isbinaryfile": { + "version": "5.0.7", + "resolved": "https://registry.npmmirror.com/isbinaryfile/-/isbinaryfile-5.0.7.tgz", + "integrity": "sha512-gnWD14Jh3FzS3CPhF0AxNOJ8CxqeblPTADzI38r0wt8ZyQl5edpy75myt08EG2oKvpyiqSqsx+Wkz9vtkbTqYQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/gjtorikian/" + } + }, "node_modules/isbot": { "version": "5.1.34", "license": "Unlicense", @@ -6523,6 +9743,40 @@ "dev": true, "license": "ISC" }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmmirror.com/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jake": { + "version": "10.9.4", + "resolved": "https://registry.npmmirror.com/jake/-/jake-10.9.4.tgz", + "integrity": "sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.6", + "filelist": "^1.0.4", + "picocolors": "^1.1.1" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/jiti": { "version": "1.21.7", "dev": true, @@ -6606,11 +9860,26 @@ "dev": true, "license": "MIT" }, + "node_modules/json-schema-typed": { + "version": "8.0.2", + "resolved": "https://registry.npmmirror.com/json-schema-typed/-/json-schema-typed-8.0.2.tgz", + "integrity": "sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==", + "dev": true, + "license": "BSD-2-Clause" + }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "dev": true, "license": "MIT" }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true, + "license": "ISC", + "optional": true + }, "node_modules/json5": { "version": "2.2.3", "dev": true, @@ -6622,6 +9891,16 @@ "node": ">=6" } }, + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/katex": { "version": "0.16.28", "funding": [ @@ -6644,6 +9923,13 @@ "json-buffer": "3.0.1" } }, + "node_modules/lazy-val": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/lazy-val/-/lazy-val-1.0.5.tgz", + "integrity": "sha512-0/BnGCCfyUMkBpeDgWihanIAF9JmZhHBgUhEqzvf+adhNGLoP6TaiI5oF8oyb3I45P+PcnrqihSf01M0l0G5+Q==", + "dev": true, + "license": "MIT" + }, "node_modules/levn": { "version": "0.4.1", "dev": true, @@ -6695,6 +9981,23 @@ "dev": true, "license": "MIT" }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/longest-streak": { "version": "3.1.0", "license": "MIT", @@ -6713,6 +10016,16 @@ "loose-envify": "cli.js" } }, + "node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/lru-cache": { "version": "11.2.6", "dev": true, @@ -6746,6 +10059,29 @@ "@jridgewell/sourcemap-codec": "^1.5.5" } }, + "node_modules/make-fetch-happen": { + "version": "14.0.3", + "resolved": "https://registry.npmmirror.com/make-fetch-happen/-/make-fetch-happen-14.0.3.tgz", + "integrity": "sha512-QMjGbFTP0blj97EeidG5hk/QhKQ3T4ICckQGLgz38QF7Vgbk6e6FTARN8KhKxyBbWn8R0HU+bnw8aSoFPD4qtQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "@npmcli/agent": "^3.0.0", + "cacache": "^19.0.1", + "http-cache-semantics": "^4.1.1", + "minipass": "^7.0.2", + "minipass-fetch": "^4.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^1.0.0", + "proc-log": "^5.0.0", + "promise-retry": "^2.0.1", + "ssri": "^12.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, "node_modules/markdown-table": { "version": "3.0.4", "license": "MIT", @@ -6754,6 +10090,20 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/matcher": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/matcher/-/matcher-3.0.0.tgz", + "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "escape-string-regexp": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/math-intrinsics": { "version": "1.1.0", "license": "MIT", @@ -7588,6 +10938,19 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/mime": { + "version": "2.6.0", + "resolved": "https://registry.npmmirror.com/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", + "dev": true, + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/mime-db": { "version": "1.52.0", "license": "MIT", @@ -7612,6 +10975,39 @@ "node": ">= 0.6" } }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/min-indent": { "version": "1.0.1", "dev": true, @@ -7631,6 +11027,169 @@ "node": "*" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmmirror.com/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-collect": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/minipass-collect/-/minipass-collect-2.0.1.tgz", + "integrity": "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-fetch": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/minipass-fetch/-/minipass-fetch-4.0.1.tgz", + "integrity": "sha512-j7U11C5HXigVuutxebFadoYBbd7VSdZWggSe64NVdvWNBqGAiXPL2QVCehjmw7lY1oF9gOllYbORh+hiNgfPgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^3.0.1" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmmirror.com/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-flush/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmmirror.com/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmmirror.com/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/minizlib": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/minizlib/-/minizlib-3.1.0.tgz", + "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, "node_modules/mrmime": { "version": "2.0.1", "dev": true, @@ -7679,11 +11238,158 @@ "dev": true, "license": "MIT" }, + "node_modules/negotiator": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-1.0.0.tgz", + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/node-abi": { + "version": "4.26.0", + "resolved": "https://registry.npmmirror.com/node-abi/-/node-abi-4.26.0.tgz", + "integrity": "sha512-8QwIZqikRvDIkXS2S93LjzhsSPJuIbfaMETWH+Bx8oOT9Sa9UsUtBFQlc3gBNd1+QINjaTloitXr1W3dQLi9Iw==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.6.3" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/node-abi/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-addon-api": { + "version": "1.7.2", + "resolved": "https://registry.npmmirror.com/node-addon-api/-/node-addon-api-1.7.2.tgz", + "integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/node-api-version": { + "version": "0.2.1", + "resolved": "https://registry.npmmirror.com/node-api-version/-/node-api-version-0.2.1.tgz", + "integrity": "sha512-2xP/IGGMmmSQpI1+O/k72jF/ykvZ89JeuKX3TLJAYPDVLUalrshrLHkeVcCCZqG/eEa635cr8IBYzgnDvM2O8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.3.5" + } + }, + "node_modules/node-api-version/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-gyp": { + "version": "11.5.0", + "resolved": "https://registry.npmmirror.com/node-gyp/-/node-gyp-11.5.0.tgz", + "integrity": "sha512-ra7Kvlhxn5V9Slyus0ygMa2h+UqExPqUIkfk7Pc8QTLT956JLSy51uWFwHtIYy0vI8cB4BDhc/S03+880My/LQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^14.0.3", + "nopt": "^8.0.0", + "proc-log": "^5.0.0", + "semver": "^7.3.5", + "tar": "^7.4.3", + "tinyglobby": "^0.2.12", + "which": "^5.0.0" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/node-gyp/node_modules/isexe": { + "version": "3.1.5", + "resolved": "https://registry.npmmirror.com/isexe/-/isexe-3.1.5.tgz", + "integrity": "sha512-6B3tLtFqtQS4ekarvLVMZ+X+VlvQekbe4taUkf/rhVO3d/h0M2rfARm/pXLcPEsjjMsFgrFgSrhQIxcSVrBz8w==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/node-gyp/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-gyp/node_modules/which": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/which/-/which-5.0.0.tgz", + "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, "node_modules/node-releases": { "version": "2.0.27", "dev": true, "license": "MIT" }, + "node_modules/nopt": { + "version": "8.1.0", + "resolved": "https://registry.npmmirror.com/nopt/-/nopt-8.1.0.tgz", + "integrity": "sha512-ieGu42u/Qsa4TFktmaKEwM6MQH0pOWnaB3htzh0JRtx84+Mebc0cbZYN5bC+6WTZ4+77xrL9Pn5m7CV6VIkV7A==", + "dev": true, + "license": "ISC", + "dependencies": { + "abbrev": "^3.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "dev": true, @@ -7692,6 +11398,19 @@ "node": ">=0.10.0" } }, + "node_modules/normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmmirror.com/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/object-assign": { "version": "4.1.1", "license": "MIT", @@ -7707,6 +11426,17 @@ "node": ">= 6" } }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/obug": { "version": "2.1.1", "dev": true, @@ -7716,6 +11446,32 @@ ], "license": "MIT" }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/optionator": { "version": "0.9.4", "dev": true, @@ -7732,6 +11488,40 @@ "node": ">= 0.8.0" } }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmmirror.com/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-cancelable": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/p-cancelable/-/p-cancelable-2.1.1.tgz", + "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/p-limit": { "version": "3.1.0", "dev": true, @@ -7760,6 +11550,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-map": { + "version": "7.0.4", + "resolved": "https://registry.npmmirror.com/p-map/-/p-map-7.0.4.tgz", + "integrity": "sha512-tkAQEw8ysMzmkhgw8k+1U/iPhWNhykKnSk4Rd5zLoPJCuJaGRPo6YposrZgaxHKzDHdDWWZvE/Sk7hsL2X/CpQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/p-queue": { "version": "8.1.1", "license": "MIT", @@ -7799,6 +11602,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/parent-module": { "version": "1.0.1", "dev": true, @@ -7850,6 +11660,16 @@ "node": ">=8" } }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/path-key": { "version": "3.1.1", "dev": true, @@ -7863,11 +11683,57 @@ "dev": true, "license": "MIT" }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmmirror.com/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, "node_modules/pathe": { "version": "2.0.3", "dev": true, "license": "MIT" }, + "node_modules/pe-library": { + "version": "0.4.1", + "resolved": "https://registry.npmmirror.com/pe-library/-/pe-library-0.4.1.tgz", + "integrity": "sha512-eRWB5LBz7PpDu4PUlwT0PhnQfTQJlDDdPa35urV4Osrm0t0AqQFGn+UIkU3klZvwJ8KPO3VbBFsXquA6p6kqZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12", + "npm": ">=6" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jet2jet" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true, + "license": "MIT" + }, "node_modules/picocolors": { "version": "1.1.1", "dev": true, @@ -7900,6 +11766,21 @@ "node": ">= 6" } }, + "node_modules/plist": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/plist/-/plist-3.1.0.tgz", + "integrity": "sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@xmldom/xmldom": "^0.8.8", + "base64-js": "^1.5.1", + "xmlbuilder": "^15.1.1" + }, + "engines": { + "node": ">=10.4.0" + } + }, "node_modules/popper.js": { "version": "1.16.1", "license": "MIT", @@ -8209,6 +12090,50 @@ "dev": true, "license": "MIT" }, + "node_modules/proc-log": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/proc-log/-/proc-log-5.0.0.tgz", + "integrity": "sha512-Azwzvl90HaF0aCz1JrDdXQykFakSSNPaPoiZ9fm5qJIMHioDZEi7OAdRwSm6rSoPtY3Qutnm3L7ogmg3dc+wbQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/promise-retry/node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmmirror.com/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/prop-types": { "version": "15.8.1", "license": "MIT", @@ -8218,6 +12143,28 @@ "react-is": "^16.13.1" } }, + "node_modules/proper-lockfile": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/proper-lockfile/-/proper-lockfile-4.1.2.tgz", + "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "retry": "^0.12.0", + "signal-exit": "^3.0.2" + } + }, + "node_modules/proper-lockfile/node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmmirror.com/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/property-information": { "version": "7.1.0", "license": "MIT", @@ -8230,6 +12177,17 @@ "version": "1.1.0", "license": "MIT" }, + "node_modules/pump": { + "version": "3.0.4", + "resolved": "https://registry.npmmirror.com/pump/-/pump-3.0.4.tgz", + "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "node_modules/punycode": { "version": "2.3.1", "dev": true, @@ -8257,6 +12215,19 @@ ], "license": "MIT" }, + "node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmmirror.com/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/react": { "version": "19.2.4", "license": "MIT", @@ -8324,6 +12295,33 @@ "version": "0.1.2", "license": "MIT" }, + "node_modules/react-i18next": { + "version": "16.5.4", + "resolved": "https://registry.npmmirror.com/react-i18next/-/react-i18next-16.5.4.tgz", + "integrity": "sha512-6yj+dcfMncEC21QPhOTsW8mOSO+pzFmT6uvU7XXdvM/Cp38zJkmTeMeKmTrmCMD5ToT79FmiE/mRWiYWcJYW4g==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.28.4", + "html-parse-stringify": "^3.0.1", + "use-sync-external-store": "^1.6.0" + }, + "peerDependencies": { + "i18next": ">= 25.6.2", + "react": ">= 16.8.0", + "typescript": "^5" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, "node_modules/react-innertext": { "version": "1.1.5", "license": "MIT", @@ -8490,6 +12488,19 @@ "react-dom": ">=17" } }, + "node_modules/read-binary-file-arch": { + "version": "1.0.6", + "resolved": "https://registry.npmmirror.com/read-binary-file-arch/-/read-binary-file-arch-1.0.6.tgz", + "integrity": "sha512-BNg9EN3DD3GsDXX7Aa8O4p92sryjkmzYYgmgTAc6CA4uGLEDzFfxOxugu21akOxpcXHiEgsYkC6nPsQvLLLmEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.4" + }, + "bin": { + "read-binary-file-arch": "cli.js" + } + }, "node_modules/read-cache": { "version": "1.0.0", "dev": true, @@ -8498,6 +12509,21 @@ "pify": "^2.3.0" } }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/readdirp": { "version": "3.6.0", "dev": true, @@ -8660,6 +12686,16 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/require-from-string": { "version": "2.0.2", "dev": true, @@ -8668,6 +12704,24 @@ "node": ">=0.10.0" } }, + "node_modules/resedit": { + "version": "1.7.2", + "resolved": "https://registry.npmmirror.com/resedit/-/resedit-1.7.2.tgz", + "integrity": "sha512-vHjcY2MlAITJhC0eRD/Vv8Vlgmu9Sd3LX9zZvtGzU5ZImdTN3+d6e/4mnTyV8vEbyf1sgNIrWxhWlrys52OkEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pe-library": "^0.4.1" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jet2jet" + } + }, "node_modules/reselect": { "version": "5.1.1", "license": "MIT" @@ -8691,6 +12745,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-alpn": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", + "dev": true, + "license": "MIT" + }, "node_modules/resolve-from": { "version": "4.0.0", "dev": true, @@ -8699,6 +12760,33 @@ "node": ">=4" } }, + "node_modules/responselike": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/responselike/-/responselike-2.0.1.tgz", + "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "lowercase-keys": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/retry": { "version": "0.13.1", "license": "MIT", @@ -8715,6 +12803,25 @@ "node": ">=0.10.0" } }, + "node_modules/roarr": { + "version": "2.15.4", + "resolved": "https://registry.npmmirror.com/roarr/-/roarr-2.15.4.tgz", + "integrity": "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==", + "dev": true, + "license": "BSD-3-Clause", + "optional": true, + "dependencies": { + "boolean": "^3.0.1", + "detect-node": "^2.0.4", + "globalthis": "^1.0.1", + "json-stringify-safe": "^5.0.1", + "semver-compare": "^1.0.0", + "sprintf-js": "^1.1.2" + }, + "engines": { + "node": ">=8.0" + } + }, "node_modules/rollup": { "version": "4.57.1", "dev": true, @@ -8780,6 +12887,54 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/sanitize-filename": { + "version": "1.6.3", + "resolved": "https://registry.npmmirror.com/sanitize-filename/-/sanitize-filename-1.6.3.tgz", + "integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==", + "dev": true, + "license": "WTFPL OR ISC", + "dependencies": { + "truncate-utf8-bytes": "^1.0.0" + } + }, + "node_modules/sax": { + "version": "1.5.0", + "resolved": "https://registry.npmmirror.com/sax/-/sax-1.5.0.tgz", + "integrity": "sha512-21IYA3Q5cQf089Z6tgaUTr7lDAyzoTPx5HRtbhsME8Udispad8dC/+sziTNugOEx54ilvatQ9YCzl4KQLPcRHA==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=11.0.0" + } + }, "node_modules/saxes": { "version": "6.0.0", "dev": true, @@ -8811,6 +12966,45 @@ "semver": "bin/semver.js" } }, + "node_modules/semver-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/serialize-error": { + "version": "7.0.1", + "resolved": "https://registry.npmmirror.com/serialize-error/-/serialize-error-7.0.1.tgz", + "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "type-fest": "^0.13.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/serialize-error/node_modules/type-fest": { + "version": "0.13.1", + "resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-0.13.1.tgz", + "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "optional": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/seroval": { "version": "1.5.0", "license": "MIT", @@ -8856,6 +13050,39 @@ "dev": true, "license": "ISC" }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmmirror.com/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/simple-update-notifier": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", + "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/simple-update-notifier/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/sirv": { "version": "3.0.2", "dev": true, @@ -8869,6 +13096,33 @@ "node": ">=18" } }, + "node_modules/slice-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmmirror.com/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, "node_modules/smol-toml": { "version": "1.6.0", "license": "BSD-3-Clause", @@ -8879,6 +13133,46 @@ "url": "https://github.com/sponsors/cyyynthia" } }, + "node_modules/socks": { + "version": "2.8.7", + "resolved": "https://registry.npmmirror.com/socks/-/socks-2.8.7.tgz", + "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ip-address": "^10.0.1", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.5", + "resolved": "https://registry.npmmirror.com/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", + "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "dev": true, @@ -8887,6 +13181,17 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmmirror.com/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, "node_modules/space-separated-tokens": { "version": "2.0.2", "license": "MIT", @@ -8895,6 +13200,14 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmmirror.com/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "dev": true, + "license": "BSD-3-Clause", + "optional": true + }, "node_modules/srvx": { "version": "0.11.2", "license": "MIT", @@ -8905,16 +13218,80 @@ "node": ">=20.16.0" } }, + "node_modules/ssri": { + "version": "12.0.0", + "resolved": "https://registry.npmmirror.com/ssri/-/ssri-12.0.0.tgz", + "integrity": "sha512-S7iGNosepx9RadX82oimUkvr0Ct7IjJbEbs4mJcTxst8um95J3sDYU1RBEOvdu6oL1Wek2ODI5i4MAw+dZ6cAQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, "node_modules/stackback": { "version": "0.0.2", "dev": true, "license": "MIT" }, + "node_modules/stat-mode": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/stat-mode/-/stat-mode-1.0.0.tgz", + "integrity": "sha512-jH9EhtKIjuXZ2cWxmXS8ZP80XyC3iasQxMDV8jzhNJpfDb7VbQLVW4Wvsxz9QZvzV+G4YoSfBUVKDOyxLzi/sg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, "node_modules/std-env": { "version": "3.10.0", "dev": true, "license": "MIT" }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/stringify-entities": { "version": "4.0.4", "license": "MIT", @@ -8927,6 +13304,33 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-indent": { "version": "3.0.0", "dev": true, @@ -8949,6 +13353,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/stubborn-fs": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/stubborn-fs/-/stubborn-fs-2.0.0.tgz", + "integrity": "sha512-Y0AvSwDw8y+nlSNFXMm2g6L51rBGdAQT20J3YSOqxC53Lo3bjWRtr2BKcfYoAf352WYpsZSTURrA0tqhfgudPA==", + "dev": true, + "license": "MIT", + "dependencies": { + "stubborn-utils": "^1.0.1" + } + }, + "node_modules/stubborn-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/stubborn-utils/-/stubborn-utils-1.0.2.tgz", + "integrity": "sha512-zOh9jPYI+xrNOyisSelgym4tolKTJCQd5GBhK0+0xJvcYDcwlOoxF/rnFKQ2KRZknXSG9jWAp66fwP6AxN9STg==", + "dev": true, + "license": "MIT" + }, "node_modules/style-mod": { "version": "4.1.3", "license": "MIT" @@ -8996,6 +13417,19 @@ "node": ">= 6" } }, + "node_modules/sumchecker": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/sumchecker/-/sumchecker-3.0.1.tgz", + "integrity": "sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "debug": "^4.1.0" + }, + "engines": { + "node": ">= 8.0" + } + }, "node_modules/supports-color": { "version": "7.2.0", "dev": true, @@ -9023,6 +13457,19 @@ "dev": true, "license": "MIT" }, + "node_modules/tagged-tag": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/tagged-tag/-/tagged-tag-1.0.0.tgz", + "integrity": "sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/tailwind-merge": { "version": "3.4.0", "license": "MIT", @@ -9067,6 +13514,82 @@ "node": ">=14.0.0" } }, + "node_modules/tar": { + "version": "7.5.9", + "resolved": "https://registry.npmmirror.com/tar/-/tar-7.5.9.tgz", + "integrity": "sha512-BTLcK0xsDh2+PUe9F6c2TlRp4zOOBMTkoQHQIWSIzI0R7KG46uEwq4OPk2W7bZcprBMsuaeFsqwYr7pjh6CuHg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.1.0", + "yallist": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/tar/node_modules/yallist": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/temp-file": { + "version": "3.4.0", + "resolved": "https://registry.npmmirror.com/temp-file/-/temp-file-3.4.0.tgz", + "integrity": "sha512-C5tjlC/HCtVUOi3KWVokd4vHVViOmGjtLwIh4MuzPo/nMYTV/p1urt3RnMz2IWXDdKEGJH3k5+KPxtqRsUYGtg==", + "dev": true, + "license": "MIT", + "dependencies": { + "async-exit-hook": "^2.0.1", + "fs-extra": "^10.0.0" + } + }, + "node_modules/temp-file/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/temp-file/node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/temp-file/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/thenify": { "version": "3.3.1", "dev": true, @@ -9086,6 +13609,26 @@ "node": ">=0.8" } }, + "node_modules/tiny-async-pool": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/tiny-async-pool/-/tiny-async-pool-1.3.0.tgz", + "integrity": "sha512-01EAw5EDrcVrdgyCLgoSPvqznC0sVxDSVeiOz09FUpjh71G79VCqneOr+xvt7T1r76CF6ZZfPjHorN2+d+3mqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^5.5.0" + } + }, + "node_modules/tiny-async-pool/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmmirror.com/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, "node_modules/tiny-invariant": { "version": "1.3.3", "license": "MIT" @@ -9146,6 +13689,26 @@ "dev": true, "license": "MIT" }, + "node_modules/tmp": { + "version": "0.2.5", + "resolved": "https://registry.npmmirror.com/tmp/-/tmp-0.2.5.tgz", + "integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.14" + } + }, + "node_modules/tmp-promise": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/tmp-promise/-/tmp-promise-3.0.3.tgz", + "integrity": "sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "tmp": "^0.2.0" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "dev": true, @@ -9211,6 +13774,16 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/truncate-utf8-bytes": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz", + "integrity": "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==", + "dev": true, + "license": "WTFPL", + "dependencies": { + "utf8-byte-length": "^1.0.1" + } + }, "node_modules/ts-api-utils": { "version": "2.4.0", "dev": true, @@ -9286,6 +13859,19 @@ "typescript": ">=4.8.4 <6.0.0" } }, + "node_modules/uint8array-extras": { + "version": "1.5.0", + "resolved": "https://registry.npmmirror.com/uint8array-extras/-/uint8array-extras-1.5.0.tgz", + "integrity": "sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/undici": { "version": "7.22.0", "dev": true, @@ -9316,6 +13902,32 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/unique-filename": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/unique-filename/-/unique-filename-4.0.0.tgz", + "integrity": "sha512-XSnEewXmQ+veP7xX2dS5Q4yZAvO40cBN2MWkJ7D/6sW4Dg6wYBNwM1Vrnz1FhH5AdeLIlUXRI9e28z1YZi71NQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "unique-slug": "^5.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/unique-slug": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/unique-slug/-/unique-slug-5.0.0.tgz", + "integrity": "sha512-9OdaqO5kwqR+1kVgHAhsp5vPNU0hnxRa26rBFNfNgM7M6pNtgzeBn3s/xbyCQL3dcjzOatcef6UUHpB/6MaETg==", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, "node_modules/unist-util-find-after": { "version": "5.0.0", "license": "MIT", @@ -9398,6 +14010,16 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmmirror.com/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/update-browserslist-db": { "version": "1.2.3", "dev": true, @@ -9481,11 +14103,34 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, + "node_modules/utf8-byte-length": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/utf8-byte-length/-/utf8-byte-length-1.0.5.tgz", + "integrity": "sha512-Xn0w3MtiQ6zoz2vFyUVruaCL53O/DwUvkEeOvj+uulMm0BkUGYWmBYVyElqZaSLhY6ZD0ulfU3aBra2aVT4xfA==", + "dev": true, + "license": "(WTFPL OR MIT)" + }, "node_modules/util-deprecate": { "version": "1.0.2", "dev": true, "license": "MIT" }, + "node_modules/verror": { + "version": "1.10.1", + "resolved": "https://registry.npmmirror.com/verror/-/verror-1.10.1.tgz", + "integrity": "sha512-veufcmxri4e3XSrT0xwfUR7kguIkaxBeosDg00yDWhk49wdwkSUrvvsm7nc75e1PUyvIeZj6nS8VQRYz2/S4Xg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/vfile": { "version": "6.0.3", "license": "MIT", @@ -9691,6 +14336,15 @@ } } }, + "node_modules/void-elements": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/void-elements/-/void-elements-3.1.0.tgz", + "integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/w3c-keyname": { "version": "2.2.8", "license": "MIT" @@ -9706,6 +14360,16 @@ "node": ">=18" } }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, "node_modules/web-namespaces": { "version": "2.0.1", "license": "MIT", @@ -9743,6 +14407,13 @@ "node": "^20.19.0 || ^22.12.0 || >=24.0.0" } }, + "node_modules/when-exit": { + "version": "2.1.5", + "resolved": "https://registry.npmmirror.com/when-exit/-/when-exit-2.1.5.tgz", + "integrity": "sha512-VGkKJ564kzt6Ms1dbgPP/yuIoQCrsFAnRbptpC5wOEsDaNsbCB2bnfnaA8i/vRs5tjUSEOtIuvl9/MyVsvQZCg==", + "dev": true, + "license": "MIT" + }, "node_modules/which": { "version": "2.0.2", "dev": true, @@ -9784,6 +14455,50 @@ "node": ">=0.10.0" } }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, "node_modules/xml-name-validator": { "version": "5.0.0", "dev": true, @@ -9792,16 +14507,76 @@ "node": ">=18" } }, + "node_modules/xmlbuilder": { + "version": "15.1.1", + "resolved": "https://registry.npmmirror.com/xmlbuilder/-/xmlbuilder-15.1.1.tgz", + "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0" + } + }, "node_modules/xmlchars": { "version": "2.2.0", "dev": true, "license": "MIT" }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmmirror.com/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, "node_modules/yallist": { "version": "3.1.1", "dev": true, "license": "ISC" }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmmirror.com/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "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" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmmirror.com/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "dev": true, diff --git a/dashboard/package.json b/dashboard/package.json index 71ac2276..de2c8fd3 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -36,7 +36,10 @@ "target": [ { "target": "dmg", - "arch": ["x64", "arm64"] + "arch": [ + "x64", + "arm64" + ] } ], "icon": "electron/resources/icon.icns", @@ -46,7 +49,9 @@ "target": [ { "target": "nsis", - "arch": ["x64"] + "arch": [ + "x64" + ] } ], "icon": "electron/resources/icon.ico" @@ -55,7 +60,9 @@ "target": [ { "target": "AppImage", - "arch": ["x64"] + "arch": [ + "x64" + ] } ], "icon": "electron/resources/icon.png", @@ -130,12 +137,15 @@ "dagre": "^0.8.5", "date-fns": "^4.1.0", "html-to-image": "^1.11.13", + "i18next": "^25.8.13", + "i18next-browser-languagedetector": "^8.2.1", "idb": "^8.0.3", "katex": "^0.16.27", "lucide-react": "^0.556.0", "react": "^19.2.1", "react-day-picker": "^9.12.0", "react-dom": "^19.2.1", + "react-i18next": "^16.5.4", "react-joyride": "^2.9.3", "react-markdown": "^10.1.0", "reactflow": "^11.11.4", diff --git a/dashboard/src/components/error-boundary.tsx b/dashboard/src/components/error-boundary.tsx index 7e3e0700..2c784ce3 100644 --- a/dashboard/src/components/error-boundary.tsx +++ b/dashboard/src/components/error-boundary.tsx @@ -1,4 +1,5 @@ import { Component } from 'react' +import { useTranslation } from 'react-i18next' import type { ErrorInfo, ReactNode } from 'react' import { AlertTriangle, RefreshCw, Home, ChevronDown, ChevronUp, Copy, Check, Bug } from 'lucide-react' import { Button } from '@/components/ui/button' @@ -65,6 +66,7 @@ function ErrorDetails({ error, errorInfo }: { error: Error; errorInfo: ErrorInfo const [isStackOpen, setIsStackOpen] = useState(true) const [isComponentStackOpen, setIsComponentStackOpen] = useState(false) const [copied, setCopied] = useState(false) + const { t } = useTranslation() const stackFrames = error.stack ? parseStackTrace(error.stack) : [] @@ -183,12 +185,12 @@ Time: ${new Date().toISOString()} {copied ? ( <> - 已复制到剪贴板 + {t('errorBoundary.copiedToClipboard')} ) : ( <> - 复制错误信息 + {t('errorBoundary.copyError')} )} @@ -204,6 +206,7 @@ function ErrorFallback({ error: Error errorInfo: ErrorInfo | null }) { + const { t } = useTranslation() const handleGoHome = () => { window.location.href = '/' } @@ -219,9 +222,9 @@ function ErrorFallback({
- 页面出现了问题 + {t('errorBoundary.title')} - 应用程序遇到了意外错误。您可以尝试刷新页面或返回首页。 + {t('errorBoundary.description')} @@ -232,17 +235,17 @@ function ErrorFallback({
{/* 提示信息 */}

- 如果问题持续存在,请将错误信息复制并反馈给开发者 + {t('errorBoundary.footer')}

diff --git a/dashboard/src/components/http-warning-banner.tsx b/dashboard/src/components/http-warning-banner.tsx index 55735928..42cbaa52 100644 --- a/dashboard/src/components/http-warning-banner.tsx +++ b/dashboard/src/components/http-warning-banner.tsx @@ -1,4 +1,5 @@ import { useState } from 'react' +import { useTranslation } from 'react-i18next' import { AlertTriangle, X } from 'lucide-react' import { Button } from '@/components/ui/button' @@ -7,6 +8,7 @@ import { Button } from '@/components/ui/button' * 当用户通过 HTTP 访问时显示安全警告 */ export function HttpWarningBanner() { + const { t } = useTranslation() // 直接计算初始状态,避免 effect 中调用 setState const isHttp = window.location.protocol === 'http:' const hostname = window.location.hostname.toLowerCase() @@ -35,11 +37,11 @@ export function HttpWarningBanner() {

- 安全警告: - 您正在使用 HTTP 访问 MaiBot WebUI + {t('httpWarning.title')} + {t('httpWarning.message')}

- 如果这是公网服务器,您的数据(包括 Token、聊天记录等)可能在传输过程中被窃取。强烈建议使用 HTTPS 访问或仅在本地网络使用。 + {t('httpWarning.description')}

@@ -48,7 +50,7 @@ export function HttpWarningBanner() { size="icon" onClick={handleDismiss} className="h-8 w-8 text-amber-700 hover:text-amber-900 dark:text-amber-400 dark:hover:text-amber-200 flex-shrink-0" - aria-label="关闭警告" + aria-label={t('httpWarning.dismiss')} > diff --git a/dashboard/src/components/layout/Header.tsx b/dashboard/src/components/layout/Header.tsx index 2b9493ca..6738e7ab 100644 --- a/dashboard/src/components/layout/Header.tsx +++ b/dashboard/src/components/layout/Header.tsx @@ -1,17 +1,26 @@ -import { BookOpen, ChevronLeft, LogOut, Menu, Moon, PieChart, Search, Server, Sun } from 'lucide-react' import { Link } from '@tanstack/react-router' +import { BookOpen, ChevronLeft, Globe, LogOut, Menu, Moon, PieChart, Search, Server, Sun } from 'lucide-react' +import { useEffect, useState } from 'react' +import { useTranslation } from 'react-i18next' import { BackgroundLayer } from '@/components/background-layer' -import { Button } from '@/components/ui/button' -import { Kbd } from '@/components/ui/kbd' -import { SearchDialog } from '@/components/search-dialog' -import { useEffect, useState } from 'react' import { BackendManager } from '@/components/electron/BackendManager' -import { isElectron } from '@/lib/runtime' -import { cn } from '@/lib/utils' +import { SearchDialog } from '@/components/search-dialog' +import { Button } from '@/components/ui/button' +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from '@/components/ui/dropdown-menu' +import { Kbd } from '@/components/ui/kbd' +import { toggleThemeWithTransition } from '@/components/use-theme' import { useBackground } from '@/hooks/use-background' import { logout } from '@/lib/fetch-with-auth' -import { toggleThemeWithTransition } from '@/components/use-theme' +import { isElectron } from '@/lib/runtime' +import { cn } from '@/lib/utils' + +const LANGUAGE_CODES = ['zh', 'en', 'ja', 'ko'] as const interface HeaderProps { sidebarOpen: boolean @@ -26,7 +35,7 @@ interface HeaderProps { export function Header({ sidebarOpen, - + // mobileMenuOpen, // unused - kept in props for API compatibility searchOpen, actualTheme, onSidebarToggle, @@ -34,6 +43,8 @@ export function Header({ onSearchOpenChange, onThemeChange, }: HeaderProps) { + const { t, i18n: i18nInstance } = useTranslation() + const currentLang = i18nInstance.language || 'zh' const headerBg = useBackground('header') const [backendManagerOpen, setBackendManagerOpen] = useState(false) const [activeBackendName, setActiveBackendName] = useState('') @@ -41,7 +52,7 @@ export function Header({ useEffect(() => { if (!isElectron()) return window.electronAPI!.getActiveBackend().then((b) => { - setActiveBackendName(b?.name ?? '未连接') + setActiveBackendName(b?.name ?? t('header.notConnected')) }) }, []) @@ -65,7 +76,7 @@ export function Header({ @@ -112,7 +123,7 @@ export function Header({ className="relative hidden md:flex items-center w-64 h-9 pl-9 pr-16 bg-background/50 border rounded-md hover:bg-accent/50 transition-colors text-left" > - 搜索... + {t('header.searchPlaceholder')} K @@ -127,12 +138,41 @@ export function Header({ size="sm" onClick={() => window.open('https://docs.mai-mai.org', '_blank')} className="gap-2" - title="查看麦麦文档" + title={t('header.viewDocs')} > - 麦麦文档 + {t('header.docs')} + {/* 语言切换 */} + + + + + + {LANGUAGE_CODES.map((code) => ( + i18nInstance.changeLanguage(code)} + className={cn( + 'cursor-pointer', + currentLang.split('-')[0] === code && 'font-semibold text-primary' + )} + > + {currentLang.split('-')[0] === code && ( + + )} + {t(`language.${code}`)} + + ))} + + + {/* 主题切换按钮 */} @@ -154,10 +194,10 @@ export function Header({ size="sm" onClick={handleLogout} className="gap-2" - title="登出系统" + title={t('header.logout')} > - 登出 + {t('header.logoutLabel')}
diff --git a/dashboard/src/components/layout/Layout.tsx b/dashboard/src/components/layout/Layout.tsx index 171f1167..f242fce0 100644 --- a/dashboard/src/components/layout/Layout.tsx +++ b/dashboard/src/components/layout/Layout.tsx @@ -1,4 +1,5 @@ import { useEffect, useState } from 'react' +import { useTranslation } from 'react-i18next' import { BackgroundLayer } from '@/components/background-layer' import { BackToTop } from '@/components/back-to-top' @@ -16,6 +17,7 @@ import { Sidebar } from './Sidebar' import type { LayoutProps } from './types' export function Layout({ children }: LayoutProps) { + const { t } = useTranslation() const { checking } = useAuthGuard() // 检查认证状态 const [sidebarOpen, setSidebarOpen] = useState(true) @@ -55,7 +57,7 @@ export function Layout({ children }: LayoutProps) { if (checking) { return (
-
正在验证登录状态...
+
{t('layout.verifyingLogin')}
) } diff --git a/dashboard/src/components/layout/NavItem.tsx b/dashboard/src/components/layout/NavItem.tsx index d5158137..f5f895da 100644 --- a/dashboard/src/components/layout/NavItem.tsx +++ b/dashboard/src/components/layout/NavItem.tsx @@ -1,4 +1,5 @@ import { Link, useMatchRoute } from '@tanstack/react-router' +import { useTranslation } from 'react-i18next' import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' import { cn } from '@/lib/utils' @@ -13,6 +14,7 @@ interface NavItemProps { } export function NavItem({ item, sidebarOpen, tooltipsEnabled, onMobileMenuClose }: NavItemProps) { + const { t } = useTranslation() const matchRoute = useMatchRoute() const isActive = matchRoute({ to: item.path }) const Icon = item.icon @@ -42,7 +44,7 @@ export function NavItem({ item, sidebarOpen, tooltipsEnabled, onMobileMenuClose ? 'opacity-100 max-w-[200px]' : 'opacity-100 max-w-[200px] lg:opacity-0 lg:max-w-0 lg:overflow-hidden' )}> - {item.label} + {t(item.label)}
@@ -70,7 +72,7 @@ export function NavItem({ item, sidebarOpen, tooltipsEnabled, onMobileMenuClose {tooltipsEnabled && ( -

{item.label}

+

{t(item.label)}

)} diff --git a/dashboard/src/components/layout/Sidebar.tsx b/dashboard/src/components/layout/Sidebar.tsx index 3e5538ce..4d7e4ef9 100644 --- a/dashboard/src/components/layout/Sidebar.tsx +++ b/dashboard/src/components/layout/Sidebar.tsx @@ -1,3 +1,5 @@ +import { useTranslation } from 'react-i18next' + import { ScrollArea } from '@/components/ui/scroll-area' import { cn } from '@/lib/utils' import { useBackground } from '@/hooks/use-background' @@ -20,6 +22,7 @@ export function Sidebar({ tooltipsEnabled, onMobileMenuClose }: SidebarProps) { + const { t } = useTranslation() const sidebarBg = useBackground('sidebar') return ( @@ -60,7 +63,7 @@ export function Sidebar({ !sidebarOpen && "lg:mb-1 lg:invisible" )}>

- {section.title} + {t(section.title)}

diff --git a/dashboard/src/components/layout/constants.ts b/dashboard/src/components/layout/constants.ts index 09bf7cc6..1d487586 100644 --- a/dashboard/src/components/layout/constants.ts +++ b/dashboard/src/components/layout/constants.ts @@ -4,46 +4,46 @@ import type { MenuSection } from './types' export const menuSections: MenuSection[] = [ { - title: '概览', + title: 'sidebar.groups.overview', items: [ - { icon: Home, label: '首页', path: '/' }, + { icon: Home, label: 'sidebar.menu.home', path: '/' }, ], }, { - title: '麦麦配置编辑', + title: 'sidebar.groups.botConfig', items: [ - { icon: FileText, label: '麦麦主程序配置', path: '/config/bot' }, - { icon: Server, label: 'AI模型厂商配置', path: '/config/modelProvider', tourId: 'sidebar-model-provider' }, - { icon: Boxes, label: '模型管理与分配', path: '/config/model', tourId: 'sidebar-model-management' }, - { icon: Sliders, label: '麦麦适配器配置', path: '/config/adapter' }, + { icon: FileText, label: 'sidebar.menu.botMainConfig', path: '/config/bot' }, + { icon: Server, label: 'sidebar.menu.aiModelProvider', path: '/config/modelProvider', tourId: 'sidebar-model-provider' }, + { icon: Boxes, label: 'sidebar.menu.modelManagement', path: '/config/model', tourId: 'sidebar-model-management' }, + { icon: Sliders, label: 'sidebar.menu.adapterConfig', path: '/config/adapter' }, ], }, { - title: '麦麦资源管理', + title: 'sidebar.groups.botResources', items: [ - { icon: Smile, label: '表情包管理', path: '/resource/emoji' }, - { icon: MessageSquare, label: '表达方式管理', path: '/resource/expression' }, - { icon: Hash, label: '黑话管理', path: '/resource/jargon' }, - { icon: UserCircle, label: '人物信息管理', path: '/resource/person' }, - { icon: Network, label: '知识库图谱可视化', path: '/resource/knowledge-graph' }, - { icon: Database, label: '麦麦知识库管理', path: '/resource/knowledge-base' }, + { icon: Smile, label: 'sidebar.menu.emojiManagement', path: '/resource/emoji' }, + { icon: MessageSquare, label: 'sidebar.menu.expressionManagement', path: '/resource/expression' }, + { icon: Hash, label: 'sidebar.menu.slangManagement', path: '/resource/jargon' }, + { icon: UserCircle, label: 'sidebar.menu.personInfo', path: '/resource/person' }, + { icon: Network, label: 'sidebar.menu.knowledgeGraph', path: '/resource/knowledge-graph' }, + { icon: Database, label: 'sidebar.menu.knowledgeBase', path: '/resource/knowledge-base' }, ], }, { - title: '扩展与监控', + title: 'sidebar.groups.extensionsMonitor', items: [ - { icon: Package, label: '插件市场', path: '/plugins' }, - { icon: LayoutGrid, label: '配置模板市场', path: '/config/pack-market' }, - { icon: Sliders, label: '插件配置', path: '/plugin-config' }, - { icon: FileSearch, label: '日志查看器', path: '/logs' }, - { icon: Activity, label: '计划器&回复器监控', path: '/planner-monitor' }, - { icon: MessageSquare, label: '本地聊天室', path: '/chat' }, + { icon: Package, label: 'sidebar.menu.pluginMarket', path: '/plugins' }, + { icon: LayoutGrid, label: 'sidebar.menu.configTemplate', path: '/config/pack-market' }, + { icon: Sliders, label: 'sidebar.menu.pluginConfig', path: '/plugin-config' }, + { icon: FileSearch, label: 'sidebar.menu.logViewer', path: '/logs' }, + { icon: Activity, label: 'sidebar.menu.plannerMonitor', path: '/planner-monitor' }, + { icon: MessageSquare, label: 'sidebar.menu.localChat', path: '/chat' }, ], }, { - title: '系统', + title: 'sidebar.groups.system', items: [ - { icon: Settings, label: '系统设置', path: '/settings' }, + { icon: Settings, label: 'sidebar.menu.settings', path: '/settings' }, ], }, ] diff --git a/dashboard/src/components/restart-overlay.tsx b/dashboard/src/components/restart-overlay.tsx index c96255c7..ac7da879 100644 --- a/dashboard/src/components/restart-overlay.tsx +++ b/dashboard/src/components/restart-overlay.tsx @@ -17,6 +17,7 @@ */ import { useEffect, useState, useCallback } from 'react' +import { useTranslation } from 'react-i18next' import { Loader2, CheckCircle2, @@ -70,6 +71,7 @@ const getStatusConfig = ( status: RestartStatus, checkAttempts: number, maxAttempts: number, + t: (key: string, opts?: Record) => string, customTitle?: string, customDescription?: string ): StatusConfig => { @@ -82,33 +84,33 @@ const getStatusConfig = ( }, requesting: { icon: , - title: customTitle ?? '准备重启', - description: customDescription ?? '正在发送重启请求...', - tip: '🔄 正在准备重启麦麦...', + title: customTitle ?? t('restart.preparing'), + description: customDescription ?? t('restart.preparingDesc'), + tip: t('restart.preparingTip'), }, restarting: { icon: , - title: customTitle ?? '正在重启麦麦', - description: customDescription ?? '请稍候,麦麦正在重启中...', - tip: '🔄 配置已保存,正在重启主程序...', + title: customTitle ?? t('restart.restarting'), + description: customDescription ?? t('restart.restartingDesc'), + tip: t('restart.restartingTip'), }, checking: { icon: , - title: '检查服务状态', - description: `等待服务恢复... (${checkAttempts}/${maxAttempts})`, - tip: '⏳ 正在等待服务恢复,请勿关闭页面...', + title: t('restart.checking'), + description: t('restart.checkingDesc', { current: checkAttempts, max: maxAttempts }), + tip: t('restart.checkingTip'), }, success: { icon: , - title: '重启成功', - description: '正在跳转到登录页面...', - tip: '✅ 配置已生效,服务运行正常', + title: t('restart.success'), + description: t('restart.successDesc'), + tip: t('restart.successTip'), }, failed: { icon: , - title: '重启超时', - description: '服务未能在预期时间内恢复', - tip: '⚠️ 如果长时间无响应,请尝试手动重启', + title: t('restart.failed'), + description: t('restart.failedDesc'), + tip: t('restart.failedTip'), }, } return configs[status] @@ -192,6 +194,7 @@ function RestartOverlayContent({ className, }: RestartOverlayContentProps) { const { status, progress, elapsedTime, checkAttempts, maxAttempts } = state + const { t } = useTranslation() // 回调处理 useEffect(() => { @@ -206,6 +209,7 @@ function RestartOverlayContent({ status, checkAttempts, maxAttempts, + t, title, description ) @@ -246,7 +250,7 @@ function RestartOverlayContent({
{progress}% - 已用时: {formatTime(elapsedTime)} + {t('restart.elapsed')} {formatTime(elapsedTime)}
)} @@ -265,11 +269,11 @@ function RestartOverlayContent({ className="flex-1" > - 刷新页面 + {t('restart.refreshPage')} )} diff --git a/dashboard/src/components/search-dialog.tsx b/dashboard/src/components/search-dialog.tsx index a5a4322f..4e5dabbe 100644 --- a/dashboard/src/components/search-dialog.tsx +++ b/dashboard/src/components/search-dialog.tsx @@ -1,6 +1,8 @@ -import { useState, useCallback } from 'react' +import { useState, useCallback, useMemo } from 'react' import { Search, FileText, Server, Boxes, Smile, MessageSquare, UserCircle, FileSearch, BarChart3, Package, Settings, Home, Hash } from 'lucide-react' import { useNavigate } from '@tanstack/react-router' +import { useTranslation } from 'react-i18next' + import { Dialog, DialogContent, @@ -24,97 +26,98 @@ interface SearchItem { category: string } -const searchItems: SearchItem[] = [ - { - icon: Home, - title: '首页', - description: '查看仪表板概览', - path: '/', - category: '概览', - }, - { - icon: FileText, - title: '麦麦主程序配置', - description: '配置麦麦的核心设置', - path: '/config/bot', - category: '配置', - }, - { - icon: Server, - title: '麦麦模型提供商配置', - description: '配置模型提供商', - path: '/config/modelProvider', - category: '配置', - }, - { - icon: Boxes, - title: '麦麦模型配置', - description: '配置模型参数', - path: '/config/model', - category: '配置', - }, - { - icon: Smile, - title: '表情包管理', - description: '管理麦麦的表情包', - path: '/resource/emoji', - category: '资源', - }, - { - icon: MessageSquare, - title: '表达方式管理', - description: '管理麦麦的表达方式', - path: '/resource/expression', - category: '资源', - }, - { - icon: UserCircle, - title: '人物信息管理', - description: '管理人物信息', - path: '/resource/person', - category: '资源', - }, - { - icon: Hash, - title: '黑话管理', - description: '管理麦麦学习到的黑话和俚语', - path: '/resource/jargon', - category: '资源', - }, - { - icon: BarChart3, - title: '统计信息', - description: '查看使用统计', - path: '/statistics', - category: '监控', - }, - { - icon: Package, - title: '插件市场', - description: '浏览和安装插件', - path: '/plugins', - category: '扩展', - }, - { - icon: FileSearch, - title: '日志查看器', - description: '查看系统日志', - path: '/logs', - category: '监控', - }, - { - icon: Settings, - title: '系统设置', - description: '配置系统参数', - path: '/settings', - category: '系统', - }, -] - export function SearchDialog({ open, onOpenChange }: SearchDialogProps) { const [searchQuery, setSearchQuery] = useState('') const [selectedIndex, setSelectedIndex] = useState(0) const navigate = useNavigate() + const { t } = useTranslation() + + const searchItems: SearchItem[] = useMemo(() => [ + { + icon: Home, + title: t('search.items.home'), + description: t('search.items.homeDesc'), + path: '/', + category: t('search.categories.overview'), + }, + { + icon: FileText, + title: t('search.items.botConfig'), + description: t('search.items.botConfigDesc'), + path: '/config/bot', + category: t('search.categories.config'), + }, + { + icon: Server, + title: t('search.items.modelProvider'), + description: t('search.items.modelProviderDesc'), + path: '/config/modelProvider', + category: t('search.categories.config'), + }, + { + icon: Boxes, + title: t('search.items.model'), + description: t('search.items.modelDesc'), + path: '/config/model', + category: t('search.categories.config'), + }, + { + icon: Smile, + title: t('search.items.emoji'), + description: t('search.items.emojiDesc'), + path: '/resource/emoji', + category: t('search.categories.resources'), + }, + { + icon: MessageSquare, + title: t('search.items.expression'), + description: t('search.items.expressionDesc'), + path: '/resource/expression', + category: t('search.categories.resources'), + }, + { + icon: UserCircle, + title: t('search.items.person'), + description: t('search.items.personDesc'), + path: '/resource/person', + category: t('search.categories.resources'), + }, + { + icon: Hash, + title: t('search.items.jargon'), + description: t('search.items.jargonDesc'), + path: '/resource/jargon', + category: t('search.categories.resources'), + }, + { + icon: BarChart3, + title: t('search.items.statistics'), + description: t('search.items.statisticsDesc'), + path: '/statistics', + category: t('search.categories.monitor'), + }, + { + icon: Package, + title: t('search.items.plugins'), + description: t('search.items.pluginsDesc'), + path: '/plugins', + category: t('search.categories.extensions'), + }, + { + icon: FileSearch, + title: t('search.items.logs'), + description: t('search.items.logsDesc'), + path: '/logs', + category: t('search.categories.monitor'), + }, + { + icon: Settings, + title: t('search.items.settings'), + description: t('search.items.settingsDesc'), + path: '/settings', + category: t('search.categories.system'), + }, + ], [t]) // 过滤搜索结果 const filteredItems = searchItems.filter( @@ -154,7 +157,7 @@ export function SearchDialog({ open, onOpenChange }: SearchDialogProps) { - 搜索 + {t('search.title')}
@@ -207,7 +210,7 @@ export function SearchDialog({ open, onOpenChange }: SearchDialogProps) {

- {searchQuery ? '未找到匹配的页面' : '输入关键词开始搜索'} + {searchQuery ? t('search.noResults') : t('search.startSearch')}

)} @@ -219,15 +222,15 @@ export function SearchDialog({ open, onOpenChange }: SearchDialogProps) { - 导航 + {t('search.navigate')} Enter - 选择 + {t('search.select')} Esc - 关闭 + {t('search.close')}
diff --git a/dashboard/src/i18n/index.ts b/dashboard/src/i18n/index.ts new file mode 100644 index 00000000..94b8fd8b --- /dev/null +++ b/dashboard/src/i18n/index.ts @@ -0,0 +1,37 @@ +import LanguageDetector from 'i18next-browser-languagedetector' +import { initReactI18next } from 'react-i18next' +import i18next from 'i18next' + +import en from './locales/en.json' +import ja from './locales/ja.json' +import ko from './locales/ko.json' +import zh from './locales/zh.json' + +i18next + .use(LanguageDetector) + .use(initReactI18next) + .init({ + resources: { + zh: { translation: zh }, + en: { translation: en }, + ja: { translation: ja }, + ko: { translation: ko }, + }, + fallbackLng: 'en', + supportedLngs: ['zh', 'en', 'ja', 'ko'], + interpolation: { + escapeValue: false, + }, + detection: { + order: ['localStorage', 'navigator'], + lookupLocalStorage: 'maibot-locale', + caches: ['localStorage'], + }, + keySeparator: '.', + }) + +i18next.on('languageChanged', (lng) => { + document.documentElement.lang = lng +}) + +export default i18next diff --git a/dashboard/src/i18n/locales/en.json b/dashboard/src/i18n/locales/en.json new file mode 100644 index 00000000..4f0c7add --- /dev/null +++ b/dashboard/src/i18n/locales/en.json @@ -0,0 +1,477 @@ +{ + "language": { "zh": "中文", "en": "English", "ja": "日本語", "ko": "한국어" }, + "header": { + "collapseSidebar": "Collapse sidebar", + "expandSidebar": "Expand sidebar", + "toggleConnection": "Toggle backend connection", + "viewAnnualSummary": "View annual summary", + "annualSummary": "2025 Annual Summary", + "searchPlaceholder": "Search...", + "viewDocs": "View MaiBot docs", + "docs": "MaiBot Docs", + "switchToLight": "Switch to light mode", + "switchToDark": "Switch to dark mode", + "logout": "Log out", + "logoutLabel": "Logout", + "notConnected": "Not connected" + }, + "sidebar": { + "groups": { + "overview": "Overview", + "botConfig": "Bot Configuration", + "botResources": "Bot Resources", + "extensionsMonitor": "Extensions & Monitor", + "system": "System" + }, + "menu": { + "home": "Home", + "botMainConfig": "Bot Main Config", + "aiModelProvider": "AI Model Providers", + "modelManagement": "Model Management", + "adapterConfig": "Adapter Config", + "emojiManagement": "Emoji Management", + "expressionManagement": "Expression Management", + "slangManagement": "Slang Management", + "personInfo": "Person Info", + "knowledgeGraph": "Knowledge Graph", + "knowledgeBase": "Knowledge Base", + "pluginMarket": "Plugin Market", + "configTemplate": "Config Templates", + "pluginConfig": "Plugin Config", + "logViewer": "Log Viewer", + "plannerMonitor": "Planner & Replier Monitor", + "localChat": "Local Chat", + "settings": "Settings" + } + }, + "layout": { + "verifyingLogin": "Verifying login status...", + "logoTitle": "MaiBot WebUI", + "logoTitleShort": "M" + }, + "settings": { + "title": "Settings", + "description": "Manage your application preferences", + "tabs": { + "appearance": "Appearance", + "security": "Security", + "other": "Other", + "about": "About" + }, + "appearance": { + "themeMode": "Theme Mode", + "themeModeDesc": "Light / Dark / Follow system", + "light": "Light", + "dark": "Dark", + "system": "System", + "accentColor": "Accent Color", + "resetDefault": "Reset Default", + "colorPreview": "Live Color Preview", + "styleTweaks": "Style Tweaks", + "typography": "Typography", + "visualEffects": "Visual Effects", + "layout": "Layout", + "animation": "Animation", + "background": "Background", + "customCss": "Custom CSS", + "animationEffect": "Animation Effect", + "importExportTheme": "Import / Export Theme", + "importTheme": "Import Theme", + "exportTheme": "Export Theme", + "importSuccess": "Import successful", + "importFailed": "Import failed", + "resetSuccess": "Reset successful", + "fontFamily": "Font Family", + "fontSize": "Font Size", + "borderRadius": "Border Radius", + "contentWidth": "Content Width", + "sidebarWidth": "Sidebar Width", + "animationSpeed": "Animation Speed", + "backgroundImage": "Background Image", + "backgroundBlur": "Background Blur", + "backgroundOpacity": "Background Opacity", + "lightDesc": "Always use light theme", + "darkDesc": "Always use dark theme", + "systemDesc": "Auto-switch based on system settings", + "accentPrimary": "Primary Color", + "accentHint": "Click the color ring or enter a HEX value", + "resetTheme": "Reset to Default", + "confirmResetTheme": "Confirm Reset Theme", + "confirmResetThemeDesc": "This will reset all theme settings to default, including colors, fonts, layout and custom CSS. This cannot be undone, are you sure?", + "confirmResetAction": "Confirm Reset", + "cssWarningTitle": "The following have been filtered for safety:", + "cssPlaceholder": "/* Enter custom CSS here */\n\n/* Example: */\n/* .sidebar { background: #1a1a2e; } */", + "cssDescription": "Write custom CSS to further personalize the interface. Dangerous CSS (like @import, url()) will be automatically filtered.", + "clearCss": "Clear", + "exportDesc": "Export theme as a JSON file for sharing or backup; all settings will be applied automatically on import.", + "importSuccessDesc": "Theme config imported, page will reload automatically", + "resetSuccessDesc": "Theme has been reset to default", + "enableAnimations": "Enable Animations", + "enableAnimationsDesc": "Disabling this will turn off all transition animations and effects, improving performance", + "loginWavesBackground": "Login Page Wave Background", + "loginWavesBackgroundDesc": "Disabling this will use a solid color background on the login page, suitable for low-performance devices", + "inheritParentBg": "Inherit Parent Background", + "inheritParentBgDesc": "When enabled, uses the background config from the parent layer", + "fontFamilyLabel": "Font Family", + "fontFamilyPlaceholder": "Select font family", + "fontFamilySystem": "System Default (System)", + "fontFamilySans": "Sans-serif", + "fontFamilySerif": "Serif", + "fontFamilyMono": "Monospace", + "baseFontSize": "Base Font Size", + "lineHeight": "Line Height", + "lineHeightPlaceholder": "Select line height", + "lineHeightCompact": "Compact (1.2)", + "lineHeightNormal": "Normal (1.5)", + "lineHeightLoose": "Loose (1.75)", + "borderRadiusLabel": "Border Radius", + "shadowLabel": "Shadow Intensity", + "shadowPlaceholder": "Select shadow intensity", + "shadowNone": "None", + "shadowSm": "Small", + "shadowMd": "Medium", + "shadowLg": "Large", + "shadowXl": "Extra Large", + "blurLabel": "Blur Effect", + "sidebarWidthLabel": "Sidebar Width", + "maxContentWidth": "Max Content Width", + "spacingUnit": "Spacing Unit", + "animationSpeedLabel": "Animation Speed", + "animationSpeedPlaceholder": "Select animation speed", + "animationFast": "Fast (100ms)", + "animationNormal": "Normal (300ms)", + "animationSlow": "Slow (500ms)", + "animationOff": "Off (0ms)", + "bgPage": "Page", + "bgSidebar": "Sidebar", + "typographyGroup": "Typography", + "visualGroup": "Visual Effects", + "layoutGroup": "Layout", + "animationGroup": "Animation", + "backgroundGroup": "Background Settings" + }, + "security": { + "currentToken": "Current Access Token", + "yourToken": "Your Access Token", + "regenerate": "Regenerate", + "customToken": "Custom Access Token", + "securityTip": "Security Tips", + "cannotCopy": "Cannot copy", + "copySuccess": "Copied", + "copyFailed": "Copy failed", + "updateSuccess": "Updated", + "updateFailed": "Update failed", + "generateSuccess": "Generated", + "generateFailed": "Generation failed", + "newToken": "New Access Token", + "confirmRegenerate": "Confirm Regenerate Token", + "confirmRegenerateDesc": "The old token will be invalidated after regeneration. You will need to log in again.", + "cancel": "Cancel", + "confirm": "Confirm", + "cannotCopyDesc": "Token is stored in a secure Cookie. Please regenerate to get a new Token.", + "copySuccessDesc": "Token copied to clipboard", + "copyFailedDesc": "Please copy the Token manually", + "inputError": "Input error", + "inputErrorDesc": "Please enter a new Token", + "formatError": "Format error", + "formatErrorDesc": "Token does not meet requirements: {{failedRules}}", + "updateSuccessDesc": "Access Token updated. Redirecting to login page.", + "updateFailedDesc": "Unable to update Token", + "updateFailedConn": "Failed to connect to server", + "generateSuccessDesc": "New Access Token generated. Please save it immediately.", + "generateFailedDesc": "Unable to generate new Token", + "generateFailedConn": "Failed to connect to server", + "cannotView": "Cannot view", + "cannotViewDesc": "Token is stored in a secure Cookie. Click \"Regenerate\" to get a new Token.", + "hide": "Hide", + "show": "Show", + "copyTip": "Copy to clipboard", + "regenerateShort": "Generate", + "confirmRegenerateFullDesc": "This will generate a new 64-character secure token, immediately invalidating the current Token. You will need to log in again with the new Token. This action cannot be undone. Are you sure?", + "confirmGenerate": "Confirm Generate", + "tokenStorePlaceholder": "Token is stored in a secure Cookie", + "safekeepTip": "Keep your Access Token safe and do not share it with others.", + "newTokenLabel": "New Access Token", + "customTokenPlaceholder": "Enter custom Token", + "tokenReqTitle": "Token security requirements:", + "tokenValid": "Token format is valid and ready to use", + "updateBtn": "Update Custom Token", + "updating": "Updating...", + "dialogTitle": "New Access Token", + "dialogDesc": "This is your new Token. Please save it immediately. You will be redirected to the login page after closing this window.", + "dialogTokenLabel": "Your new Token (64-char secure token)", + "important": "Important Notice", + "tip1": "This Token is only shown once and cannot be viewed after closing", + "tip2": "Copy and save it to a secure location immediately", + "tip3": "You will be automatically redirected to the login page after closing", + "tip4": "Use the new Token to log back in", + "copied": "Copied", + "copyToken": "Copy Token", + "savedClose": "Saved, close", + "securityTip1": "Regenerating creates a new system-generated 64-character secure token", + "securityTip2": "Custom Tokens must meet all security requirements", + "securityTip3": "After updating, the old Token will be immediately invalidated", + "securityTip4": "View and copy your Token only in a secure environment", + "securityTip5": "If you suspect a Token leak, regenerate or update it immediately", + "securityTip6": "System-generated Tokens are recommended for maximum security" + }, + "other": { + "performance": "Performance & Storage", + "localStorage": "Local Storage Usage", + "logCache": "Log Cache Size", + "importExport": "Import / Export Settings", + "configWizard": "Config Wizard", + "devTools": "Developer Tools", + "clearStorage": "Clear Local Storage", + "clearStorageDesc": "Clear all local storage data", + "clearStorageConfirm": "Confirm Clear", + "clearLogCache": "Clear Log Cache", + "clearLogCacheDesc": "Clear all cached log data", + "clearLogCacheConfirm": "Confirm Clear", + "importSettings": "Import Settings", + "exportSettings": "Export Settings", + "resetAllSettings": "Reset All Settings", + "resetAllSettingsDesc": "Restore all settings to defaults", + "resetAllSettingsConfirm": "Confirm Reset", + "clearStorageSuccess": "Local storage cleared", + "clearStorageFailed": "Failed to clear", + "clearLogSuccess": "Log cache cleared", + "clearLogFailed": "Failed to clear", + "importSuccess": "Import successful", + "importFailed": "Import failed", + "exportSuccess": "Export successful", + "exportFailed": "Export failed", + "resetSuccess": "Reset successful", + "resetFailed": "Reset failed", + "storageItems": "{{count}} storage items", + "logCacheSizeDesc": "Controls the maximum number of log entries cached. Larger values use more memory.", + "logCacheSizeUnit": "entries", + "dataSyncIntervalLabel": "Home Data Refresh Interval", + "dataSyncIntervalUnit": "s", + "dataSyncIntervalDesc": "Controls the auto-refresh interval for home page statistics", + "wsReconnectLabel": "WebSocket Reconnect Interval", + "wsReconnectUnit": "s", + "wsReconnectDesc": "Base reconnect interval after log WebSocket disconnects", + "wsMaxReconnectLabel": "WebSocket Max Reconnect Attempts", + "wsMaxReconnectUnit": "times", + "wsMaxReconnectDesc": "Maximum reconnect attempts after connection failure", + "clearLogCacheFn": "Clear Log Cache", + "clearLocalCache": "Clear Local Cache", + "confirmClearCache": "Confirm Clear Local Cache", + "confirmClearCacheDesc": "This will clear all locally cached settings and data (excluding login credentials). You may need to reconfigure some preferences. Are you sure?", + "confirmClear": "Confirm Clear", + "importExportDesc": "Export current interface settings for backup, or restore from a previously exported file.", + "exporting": "Exporting...", + "importing": "Importing...", + "resetAllSettingsBtn": "Reset All Settings to Defaults", + "confirmResetAll": "Confirm Reset All Settings", + "confirmResetAllDesc": "This will restore all interface settings to their defaults, including theme, colors, animation, and other preferences. This will not affect your login status. Are you sure?", + "configWizardDesc": "Re-run the initial setup wizard to reconfigure system basics.", + "rerunSetup": "Re-run Initial Setup", + "confirmRerunSetup": "Confirm Re-run Setup", + "confirmRerunSetupDesc": "This will take you back to the initial setup wizard. You can reconfigure the system basics. Are you sure?", + "devToolsDesc": "The following features are for development and debugging only. They may cause crashes or abnormal behavior.", + "triggerError": "Trigger Test Error", + "confirmTriggerError": "Confirm Trigger Error", + "confirmTriggerErrorDesc": "This will manually trigger a React error to test the error boundary component. The page will display an error view; you can recover by refreshing the page or clicking Go Home.", + "confirmTrigger": "Confirm Trigger", + "logCleared": "Log cleared", + "logClearedDesc": "Log cache has been cleared", + "cacheCleared": "Cache cleared", + "cacheClearedDesc": "Cleared {{count}} cached items", + "exportSuccessDesc": "Settings exported as a JSON file", + "exportFailedDesc": "Unable to export settings", + "importSuccessDesc": "Successfully imported {{imported}} settings", + "importSkippedSuffix": ", skipped {{skipped}}", + "importRefreshHint": "Note", + "importRefreshHintDesc": "Some settings require a page refresh to take full effect", + "importNoDataDesc": "No valid settings to import", + "importInvalidDesc": "Invalid file format", + "resetDone": "Reset done", + "resetDoneDesc": "All settings restored to defaults. Refresh the page to apply changes." + }, + "about": { + "openSource": "Open Source", + "aboutApp": "About MaiBot Dashboard", + "version": "Version:", + "author": "Author", + "techStack": "Tech Stack", + "frontendFramework": "Frontend Framework", + "uiComponents": "UI Components", + "backend": "Backend", + "buildTool": "Build Tool", + "openSourceThanks": "Open Source Libraries", + "openSourceLicense": "Open Source License", + "openSourceDesc": "This project is open source on GitHub. Give us a Star ⭐!", + "visitGitHub": "Visit GitHub", + "appDesc": "A modern Web management interface for MaiBot", + "maimaiCore": "MaiBot Core", + "uiFrameworkGroup": "UI Framework & Components", + "routingStateGroup": "Routing & State Management", + "formGroup": "Form Handling", + "utilsGroup": "Utility Libraries", + "animationGroup": "Animation", + "backendGroup": "Backend Framework", + "devToolsGroup": "Developer Tools", + "openSourceThanksDesc": "This project uses the following excellent open source libraries. Thank you for your contributions:", + "licenseDesc": "This project is licensed under the GNU General Public License v3.0. You are free to use, modify, and distribute the software, provided you keep the same open source license.", + "licenseDeps": "All open source libraries used by this project comply with their respective licenses (MIT, Apache-2.0, BSD, etc.). Thank you to all open source contributors for your selfless work.", + "lib": { + "react": "UI library for building user interfaces", + "shadcn": "Elegant React component library", + "radix": "Unstyled accessible component primitives", + "tailwind": "Utility-first CSS framework", + "lucide": "Beautiful icon library", + "tanstackRouter": "Type-safe routing library", + "zustand": "Lightweight state management", + "reactHookForm": "High-performance form library", + "zod": "TypeScript-first schema validation", + "clsx": "Conditional className builder", + "tailwindMerge": "Tailwind class name merger", + "cva": "Component variant management", + "dateFns": "Modern date utility library", + "framerMotion": "React animation library", + "vaul": "Drawer component animation", + "fastapi": "Modern Python web framework", + "uvicorn": "ASGI server", + "pydantic": "Data validation library", + "pythonMultipart": "File upload support", + "typescript": "Superset of JavaScript", + "vite": "Next-generation frontend build tool", + "eslint": "JavaScript code linter", + "postcss": "CSS transformation tool" + } + } + }, + "auth": { + "title": "Login", + "description": "Enter your access token to continue", + "tokenLabel": "Access Token", + "tokenPlaceholder": "Enter Access Token", + "loginButton": "Login", + "loggingIn": "Logging in...", + "loginFailed": "Login failed", + "loginSuccess": "Login successful", + "checkingAuth": "Checking login status...", + "welcome": "Welcome to MaiBot", + "accessDesc": "Enter your Access Token to continue accessing the system", + "tokenRequired": "Please enter your Access Token", + "verifyingLabel": "Verifying...", + "verifyEnter": "Verify & Enter", + "helpLink": "I don't have a Token. Where can I get one?", + "helpTitle": "How to Get an Access Token", + "helpDesc": "Access Token is the only credential to access MaiBot WebUI. Get yours in one of the following ways", + "method1Title": "Method 1: Check Startup Log", + "method1Desc": "When MaiBot starts, the console will display the WebUI Access Token.", + "method1Example1": "🔑 WebUI Access Token: abc123...", + "method1Example2": "💡 Use this Token to log in to WebUI", + "method2Title": "Method 2: Check Config File", + "method2Desc": "The Token is saved in the config file at the project root:", + "method2FileHint": "Open this file and copy the value of the access_token field", + "securityTipTitle": "Security Notice", + "securityTip1": "Keep your Token safe and never share it with others", + "securityTip2": "To reset the Token, go to System Settings after logging in", + "slowLink": "The interface feels laggy. What can I do?", + "disableAnimTitle": "Disable Background Animation", + "disableAnimDesc": "Background animation may cause lag on low-performance devices. Disabling it can significantly improve smoothness.", + "disableAnimDetail": "After disabling, the background will be a solid color, but all features remain fully functional. You can re-enable it anytime in System Settings.", + "disableAnimBtn": "Disable Animation", + "verifyFailed": "Token verification failed. Please check and try again.", + "connFailed": "Failed to connect to the server. Please check your network connection.", + "switchToLight": "Switch to light mode", + "switchToDark": "Switch to dark mode" + }, + "common": { + "loading": "Loading...", + "error": "Error", + "retry": "Retry", + "save": "Save", + "cancel": "Cancel", + "confirm": "Confirm", + "delete": "Delete", + "edit": "Edit", + "close": "Close", + "search": "Search", + "noData": "No data", + "success": "Success", + "failed": "Failed" + }, + "restart": { + "preparing": "Preparing to restart", + "preparingDesc": "Sending restart request...", + "preparingTip": "🔄 Preparing to restart MaiBot...", + "restarting": "Restarting MaiBot", + "restartingDesc": "Please wait, MaiBot is restarting...", + "restartingTip": "🔄 Config saved, restarting main process...", + "checking": "Checking service status", + "checkingDesc": "Waiting for service to recover... ({{current}}/{{max}})", + "checkingTip": "⏳ Waiting for service to recover, do not close this page...", + "success": "Restart successful", + "successDesc": "Redirecting to login page...", + "successTip": "✅ Config applied, service is running normally", + "failed": "Restart timed out", + "failedDesc": "Service failed to recover within the expected time", + "failedTip": "⚠️ If unresponsive for a long time, try restarting manually", + "refreshPage": "Refresh page", + "retryCheck": "Retry check", + "elapsed": "Elapsed:" + }, + "errorBoundary": { + "title": "Something went wrong", + "description": "The application encountered an unexpected error. You can try refreshing the page or going back home.", + "refreshPage": "Refresh page", + "goHome": "Go home", + "footer": "If the problem persists, copy the error info and report it to the developer", + "copiedToClipboard": "Copied to clipboard", + "copyError": "Copy error info" + }, + "search": { + "placeholder": "Search pages...", + "title": "Search", + "noResults": "No matching pages found", + "startSearch": "Type a keyword to start searching", + "navigate": "Navigate", + "select": "Select", + "close": "Close", + "categories": { + "overview": "Overview", + "config": "Config", + "resources": "Resources", + "monitor": "Monitor", + "extensions": "Extensions", + "system": "System" + }, + "items": { + "home": "Home", + "homeDesc": "View dashboard overview", + "botConfig": "Bot Main Config", + "botConfigDesc": "Configure bot core settings", + "modelProvider": "Model Provider Config", + "modelProviderDesc": "Configure model providers", + "model": "Model Config", + "modelDesc": "Configure model parameters", + "emoji": "Emoji Management", + "emojiDesc": "Manage bot emoji", + "expression": "Expression Management", + "expressionDesc": "Manage bot expressions", + "person": "Person Info", + "personDesc": "Manage person info", + "jargon": "Slang Management", + "jargonDesc": "Manage bot learned slang and jargon", + "statistics": "Statistics", + "statisticsDesc": "View usage statistics", + "plugins": "Plugin Market", + "pluginsDesc": "Browse and install plugins", + "logs": "Log Viewer", + "logsDesc": "View system logs", + "settings": "Settings", + "settingsDesc": "Configure system settings" + } + }, + "httpWarning": { + "title": "Security Warning:", + "message": "You are accessing MaiBot WebUI via HTTP", + "description": "If this is a public server, your data (including Token, chat history, etc.) may be intercepted in transit. It is strongly recommended to use HTTPS or access only from a local network.", + "dismiss": "Dismiss warning" +} +} diff --git a/dashboard/src/i18n/locales/ja.json b/dashboard/src/i18n/locales/ja.json new file mode 100644 index 00000000..fbaa3627 --- /dev/null +++ b/dashboard/src/i18n/locales/ja.json @@ -0,0 +1,477 @@ +{ + "language": { "zh": "中文", "en": "English", "ja": "日本語", "ko": "한국어" }, + "header": { + "collapseSidebar": "サイドバーを折りたたむ", + "expandSidebar": "サイドバーを展開する", + "toggleConnection": "バックエンド接続を切り替える", + "viewAnnualSummary": "年間サマリーを表示", + "annualSummary": "2025 年間サマリー", + "searchPlaceholder": "検索...", + "viewDocs": "MaiBot ドキュメントを表示", + "docs": "MaiBot ドキュメント", + "switchToLight": "ライトモードに切り替える", + "switchToDark": "ダークモードに切り替える", + "logout": "ログアウト", + "logoutLabel": "ログアウト", + "notConnected": "未接続" + }, + "sidebar": { + "groups": { + "overview": "概要", + "botConfig": "ボット設定", + "botResources": "ボットリソース", + "extensionsMonitor": "拡張機能 & 監視", + "system": "システム" + }, + "menu": { + "home": "ホーム", + "botMainConfig": "ボットメイン設定", + "aiModelProvider": "AIモデルプロバイダー", + "modelManagement": "モデル管理", + "adapterConfig": "アダプター設定", + "emojiManagement": "絵文字管理", + "expressionManagement": "表現管理", + "slangManagement": "スラング管理", + "personInfo": "人物情報", + "knowledgeGraph": "知識グラフ", + "knowledgeBase": "ナレッジベース", + "pluginMarket": "プラグインマーケット", + "configTemplate": "設定テンプレート", + "pluginConfig": "プラグイン設定", + "logViewer": "ログビューア", + "plannerMonitor": "プランナー & リプライヤー監視", + "localChat": "ローカルチャット", + "settings": "設定" + } + }, + "layout": { + "verifyingLogin": "ログイン状態を確認中...", + "logoTitle": "MaiBot WebUI", + "logoTitleShort": "M" + }, + "settings": { + "title": "設定", + "description": "アプリの設定を管理する", + "tabs": { + "appearance": "外観", + "security": "セキュリティ", + "other": "その他", + "about": "について" + }, + "appearance": { + "themeMode": "テーマモード", + "themeModeDesc": "ライト / ダーク / システムに従う", + "light": "ライト", + "dark": "ダーク", + "system": "システム", + "accentColor": "アクセントカラー", + "resetDefault": "デフォルトにリセット", + "colorPreview": "カラープレビュー", + "styleTweaks": "スタイル調整", + "typography": "タイポグラフィ", + "visualEffects": "視覚効果", + "layout": "レイアウト", + "animation": "アニメーション", + "background": "背景", + "customCss": "カスタム CSS", + "animationEffect": "アニメーション効果", + "importExportTheme": "テーマのインポート / エクスポート", + "importTheme": "テーマをインポート", + "exportTheme": "テーマをエクスポート", + "importSuccess": "インポート成功", + "importFailed": "インポート失敗", + "resetSuccess": "リセット成功", + "fontFamily": "フォントファミリー", + "fontSize": "フォントサイズ", + "borderRadius": "ボーダー半径", + "contentWidth": "コンテンツ幅", + "sidebarWidth": "サイドバー幅", + "animationSpeed": "アニメーション速度", + "backgroundImage": "背景画像", + "backgroundBlur": "背景ぼかし", + "backgroundOpacity": "背景透明度", + "lightDesc": "常にライトテーマを使用", + "darkDesc": "常にダークテーマを使用", + "systemDesc": "システム設定に従って自動切り替え", + "accentPrimary": "メインカラー", + "accentHint": "カラーリングをクリックするか、HEX 値を入力してください", + "resetTheme": "デフォルトにリセット", + "confirmResetTheme": "テーマのリセットを確認", + "confirmResetThemeDesc": "これにより、色、フォント、レイアウト、カスタム CSS を含むすべてのテーマ設定がデフォルトにリセットされます。この操作は元に戻せません。よろしいですか?", + "confirmResetAction": "リセットを確認", + "cssWarningTitle": "以下の内容はセキュリティフィルターされました:", + "cssPlaceholder": "/* カスタム CSS をここに入力 */\n\n/* 例: */\n/* .sidebar { background: #1a1a2e; } */", + "cssDescription": "カスタム CSS を記述して、インターフェースをさらにカスタマイズしてください。危険な CSS(@import、url() など)は自動的にフィルターされます。", + "clearCss": "クリア", + "exportDesc": "テーマを JSON ファイルとしてエクスポートして共有またはバックアップ。インポート時にすべての設定が自動適用されます。", + "importSuccessDesc": "テーマ設定がインポートされました。ページが自動的にリロードされます", + "resetSuccessDesc": "テーマがデフォルトにリセットされました", + "enableAnimations": "アニメーションを有効にする", + "enableAnimationsDesc": "無効にすると、すべてのトランジションアニメーションとエフェクトが無効化されパフォーマンスが向上します", + "loginWavesBackground": "ログインページのウェーブ背景", + "loginWavesBackgroundDesc": "無効にするとログインページが単色背景になります。低スペックのデバイスに適しています", + "inheritParentBg": "上位背景を継承", + "inheritParentBgDesc": "有効にすると上位レイヤーの背景設定を使用します", + "fontFamilyLabel": "フォントファミリー", + "fontFamilyPlaceholder": "フォントファミリーを選択", + "fontFamilySystem": "システムデフォルト (System)", + "fontFamilySans": "サンセリフ (Sans-serif)", + "fontFamilySerif": "セリフ (Serif)", + "fontFamilyMono": "等幅 (Monospace)", + "baseFontSize": "基準フォントサイズ (Base Size)", + "lineHeight": "行高 (Line Height)", + "lineHeightPlaceholder": "行高を選択", + "lineHeightCompact": "コンパクト (1.2)", + "lineHeightNormal": "標準 (1.5)", + "lineHeightLoose": "ルーズ (1.75)", + "borderRadiusLabel": "圆角の大きさ (Radius)", + "shadowLabel": "シャドウの強度 (Shadow)", + "shadowPlaceholder": "シャドウの強度を選択", + "shadowNone": "なし (None)", + "shadowSm": "軽微 (Small)", + "shadowMd": "中程度 (Medium)", + "shadowLg": "強い (Large)", + "shadowXl": "極強 (Extra Large)", + "blurLabel": "ボカシ効果 (Blur)", + "sidebarWidthLabel": "サイドバー幅 (Sidebar Width)", + "maxContentWidth": "コンテンツ最大幅 (Max Width)", + "spacingUnit": "基準間隔 (Spacing Unit)", + "animationSpeedLabel": "アニメーション速度 (Speed)", + "animationSpeedPlaceholder": "アニメーション速度を選択", + "animationFast": "高速 (100ms)", + "animationNormal": "標準 (300ms)", + "animationSlow": "低速 (500ms)", + "animationOff": "オフ (0ms)", + "bgPage": "ページ", + "bgSidebar": "サイドバー", + "typographyGroup": "タイポグラフィ (Typography)", + "visualGroup": "視覚効果 (Visual)", + "layoutGroup": "レイアウト (Layout)", + "animationGroup": "アニメーション (Animation)", + "backgroundGroup": "背景設定 (Backgrounds)" + }, + "security": { + "currentToken": "現在のアクセストークン", + "yourToken": "あなたのアクセストークン", + "regenerate": "再生成", + "customToken": "カスタムアクセストークン", + "securityTip": "セキュリティのヒント", + "cannotCopy": "コピーできません", + "copySuccess": "コピーしました", + "copyFailed": "コピー失敗", + "updateSuccess": "更新しました", + "updateFailed": "更新失敗", + "generateSuccess": "生成しました", + "generateFailed": "生成失敗", + "newToken": "新しいアクセストークン", + "confirmRegenerate": "トークンの再生成を確認", + "confirmRegenerateDesc": "再生成後、古いトークンは無効になります。再ログインが必要です。", + "cancel": "キャンセル", + "confirm": "確認", + "cannotCopyDesc": "Token はセキュアな Cookie に保存されています。新しい Token を取得するには再生成してください。", + "copySuccessDesc": "Token をクリップボードにコピーしました", + "copyFailedDesc": "Token を手動でコピーしてください", + "inputError": "入力エラー", + "inputErrorDesc": "新しい Token を入力してください", + "formatError": "フォーマットエラー", + "formatErrorDesc": "Token が要件を満たしていません: {{failedRules}}", + "updateSuccessDesc": "Access Token を更新しました。ログインページにリダイレクトします。", + "updateFailedDesc": "Token を更新できません", + "updateFailedConn": "サーバーへの接続に失敗しました", + "generateSuccessDesc": "新しい Access Token を生成しました。すぐに保存してください。", + "generateFailedDesc": "新しい Token を生成できません", + "generateFailedConn": "サーバーへの接続に失敗しました", + "cannotView": "表示できません", + "cannotViewDesc": "Token はセキュアな Cookie に保存されています。新しい Token が必要な場合は\"再生成\"をクリックしてください。", + "hide": "非表示", + "show": "表示", + "copyTip": "クリップボードにコピー", + "regenerateShort": "生成", + "confirmRegenerateFullDesc": "新しい 64 桁のセキュアトークンを生成し、現在の Token を即座に無効にします。新しい Token で再ログインが必要です。この操作は元に戻せません。続けますか?", + "confirmGenerate": "生成を確認", + "tokenStorePlaceholder": "Token はセキュアな Cookie に保存されています", + "safekeepTip": "Access Token を安全に保管し、他人に漏洩しないでください。", + "newTokenLabel": "新しいアクセストークン", + "customTokenPlaceholder": "カスタム Token を入力", + "tokenReqTitle": "Token セキュリティ要件:", + "tokenValid": "Token のフォーマットは正しく使用できます", + "updateBtn": "カスタム Token を更新", + "updating": "更新中...", + "dialogTitle": "新しい Access Token", + "dialogDesc": "これが新しい Token です。すぐに保存してください。このウィンドウを閉じるとログインページにリダイレクトされます。", + "dialogTokenLabel": "新しい Token (64 桁セキュアトークン)", + "important": "重要なお知らせ", + "tip1": "この Token は一度しか表示されません。閉じた後は表示できません", + "tip2": "すぐにコピーして安全な場所に保存してください", + "tip3": "閉じると自動的にログインページにリダイレクトされます", + "tip4": "新しい Token で再ログインしてください", + "copied": "コピー済み", + "copyToken": "Token をコピー", + "savedClose": "保存しました。閉じる", + "securityTip1": "再生成するとシステムがランダムに生成した 64 桁のセキュアトークンが作成されます", + "securityTip2": "カスタム Token はすべてのセキュリティ要件を満たす必要があります", + "securityTip3": "Token を更新すると、古い Token は即座に無効になります", + "securityTip4": "安全な環境で Token を表示してコピーしてください", + "securityTip5": "Token の漏洩が疏われる場合は、すぐに再生成または更新してください", + "securityTip6": "最高のセキュリティのためにシステム生成の Token を推奨します" + }, + "other": { + "performance": "パフォーマンス & ストレージ", + "localStorage": "ローカルストレージ使用量", + "logCache": "ログキャッシュサイズ", + "importExport": "設定のインポート / エクスポート", + "configWizard": "設定ウィザード", + "devTools": "開発者ツール", + "clearStorage": "ローカルストレージを削除", + "clearStorageDesc": "すべてのローカルストレージデータを削除します", + "clearStorageConfirm": "削除を確認", + "clearLogCache": "ログキャッシュを削除", + "clearLogCacheDesc": "すべてのキャッシュされたログデータを削除します", + "clearLogCacheConfirm": "削除を確認", + "importSettings": "設定をインポート", + "exportSettings": "設定をエクスポート", + "resetAllSettings": "すべての設定をリセット", + "resetAllSettingsDesc": "すべての設定をデフォルトに戻します", + "resetAllSettingsConfirm": "リセットを確認", + "clearStorageSuccess": "ローカルストレージを削除しました", + "clearStorageFailed": "削除失敗", + "clearLogSuccess": "ログキャッシュを削除しました", + "clearLogFailed": "削除失敗", + "importSuccess": "インポート成功", + "importFailed": "インポート失敗", + "exportSuccess": "エクスポート成功", + "exportFailed": "エクスポート失敗", + "resetSuccess": "リセット成功", + "resetFailed": "リセット失敗", + "storageItems": "{{count}} 件のアイテム", + "logCacheSizeDesc": "ログビューアがキャッシュする最大ログ数を制御します。大きい値はより多くのメモリを使用します。", + "logCacheSizeUnit": "件", + "dataSyncIntervalLabel": "ホームデータ更新間隔", + "dataSyncIntervalUnit": "秒", + "dataSyncIntervalDesc": "ホーム画面の統計データの自動更新間隔を制御します", + "wsReconnectLabel": "WebSocket 再接続間隔", + "wsReconnectUnit": "秒", + "wsReconnectDesc": "ログ WebSocket 切断後の再接続基本間隔", + "wsMaxReconnectLabel": "WebSocket 最大再接続回数", + "wsMaxReconnectUnit": "回", + "wsMaxReconnectDesc": "接続失敗後の最大再接続試行回数", + "clearLogCacheFn": "ログキャッシュをクリア", + "clearLocalCache": "ローカルキャッシュをクリア", + "confirmClearCache": "ローカルキャッシュのクリアを確認", + "confirmClearCacheDesc": "ローカルにキャッシュされたすべての設定とデータ(ログイン資格情報を除く)をクリアします。一部の設定を再構成する必要があるかもしれません。続けますか?", + "confirmClear": "クリアを確認", + "importExportDesc": "現在のインターフェース設定をエクスポートしてバックアップしたり、以前のファイルから復元したりできます。", + "exporting": "エクスポート中...", + "importing": "インポート中...", + "resetAllSettingsBtn": "すべての設定をデフォルトにリセット", + "confirmResetAll": "すべての設定のリセットを確認", + "confirmResetAllDesc": "テーマ、色、アニメーションなどのインターフェース設定をデフォルトに戻します。ログイン状態には影響しません。続けますか?", + "configWizardDesc": "初回設定ウィザードを再実行してシステムの基本設定を再構成できます。", + "rerunSetup": "初回設定を再実行", + "confirmRerunSetup": "再構成を確認", + "confirmRerunSetupDesc": "初回設定ウィザードに戻ります。システムの基本設定を再設定できます。続けますか?", + "devToolsDesc": "以下の機能は開発・デバッグ目的のみです。クラッシュや異常動作を引き起こす可能性があります。", + "triggerError": "テストエラーを発生させる", + "confirmTriggerError": "エラーの発生を確認", + "confirmTriggerErrorDesc": "React エラーを手動で発生させ、エラーボーダーコンポーネントをテストします。ページを更新するかホームに戻ることで復元できます。", + "confirmTrigger": "発生を確認", + "logCleared": "ログをクリアしました", + "logClearedDesc": "ログキャッシュをクリアしました", + "cacheCleared": "キャッシュをクリアしました", + "cacheClearedDesc": "{{count}} 件のキャッシュデータをクリアしました", + "exportSuccessDesc": "設定を JSON ファイルとしてエクスポートしました", + "exportFailedDesc": "設定のエクスポートに失敗しました", + "importSuccessDesc": "{{imported}} 件の設定をインポートしました", + "importSkippedSuffix": "、{{skipped}} 件をスキップ", + "importRefreshHint": "お知らせ", + "importRefreshHintDesc": "一部の設定はページを更新するまで完全に有効になりません", + "importNoDataDesc": "インポートする有効な設定がありません", + "importInvalidDesc": "ファイルフォーマットが無効です", + "resetDone": "リセット完了", + "resetDoneDesc": "すべての設定がデフォルトに戻りました。変更を適用するにはページを更新してください。" + }, + "about": { + "openSource": "オープンソース", + "aboutApp": "MaiBot Dashboard について", + "version": "バージョン:", + "author": "作者", + "techStack": "技術スタック", + "frontendFramework": "フロントエンドフレームワーク", + "uiComponents": "UI コンポーネント", + "backend": "バックエンド", + "buildTool": "ビルドツール", + "openSourceThanks": "使用オープンソースライブラリ", + "openSourceLicense": "オープンソースライセンス", + "openSourceDesc": "このプロジェクトは GitHub で公開されています。Star ⭐ でサポートしてください!", + "visitGitHub": "GitHub へ進む", + "appDesc": "MaiBot のモダンな Web 管理インターフェース", + "maimaiCore": "MaiBot コア", + "uiFrameworkGroup": "UI フレームワーク & コンポーネント", + "routingStateGroup": "ルーティング & 状態管理", + "formGroup": "フォーム処理", + "utilsGroup": "ユーティリティライブラリ", + "animationGroup": "アニメーション", + "backendGroup": "バックエンドフレームワーク", + "devToolsGroup": "開発ツール", + "openSourceThanksDesc": "このプロジェクトは以下の優れたオープンソースライブラリを使用しています。貢献に感謝します:", + "licenseDesc": "このプロジェクトは GNU General Public License v3.0 でライセンスされています。同じオープンソースライセンスを保持する限り、自由に使用・修改・配布できます。", + "licenseDeps": "このプロジェクトのすべての依存オープンソースライブラリはそれぞれのライセンス(MIT、Apache-2.0、BSD など)に従っています。すべてのオープンソース貢献者に感謝します。", + "lib": { + "react": "UIを構築するためのライブラリ", + "shadcn": "エレガントな React コンポーネントライブラリ", + "radix": "スタイルなしのアクセシブルなコンポーネント", + "tailwind": "ユーティリティファーストの CSS フレームワーク", + "lucide": "美しいアイコンライブラリ", + "tanstackRouter": "型安全なルーティングライブラリ", + "zustand": "軽量な状態管理ライブラリ", + "reactHookForm": "高パフォーマンスなフォームライブラリ", + "zod": "TypeScript ファーストのスキーマ検証", + "clsx": "条件付き className ビルダー", + "tailwindMerge": "Tailwind クラス名マージツール", + "cva": "コンポーネントバリアント管理", + "dateFns": "モダンな日付ユーティリティライブラリ", + "framerMotion": "React アニメーションライブラリ", + "vaul": "ドロワーコンポーネントアニメーション", + "fastapi": "モダンな Python Web フレームワーク", + "uvicorn": "ASGI サーバー", + "pydantic": "データ検証ライブラリ", + "pythonMultipart": "ファイルアップロードサポート", + "typescript": "JavaScript のスーパーセット", + "vite": "次世代フロントエンドビルドツール", + "eslint": "JavaScript コードリンター", + "postcss": "CSS 変換ツール" + } + } + }, + "auth": { + "title": "ログイン", + "description": "続行するにはアクセストークンを入力してください", + "tokenLabel": "アクセストークン", + "tokenPlaceholder": "アクセストークンを入力", + "loginButton": "ログイン", + "loggingIn": "ログイン中...", + "loginFailed": "ログイン失敗", + "loginSuccess": "ログイン成功", + "checkingAuth": "ログイン状態を確認中...", + "welcome": "MaiBot へようこそ", + "accessDesc": "システムにアクセスするためにアクセストークンを入力してください", + "tokenRequired": "アクセストークンを入力してください", + "verifyingLabel": "验証中...", + "verifyEnter": "验証して入る", + "helpLink": "Token がありません。どこで取得できますか?", + "helpTitle": "Access Token の取得方法", + "helpDesc": "Access Token は MaiBot WebUI にアクセスする唯一の証明情報です。次の方法で取得してください", + "method1Title": "方法1:起動ログを確認", + "method1Desc": "MaiBot 起動時にコンソールに WebUI Access Token が表示されます。", + "method1Example1": "🔑 WebUI Access Token: abc123...", + "method1Example2": "💡 この Token で WebUI にログインしてください", + "method2Title": "方法2:設定ファイルを確認", + "method2Desc": "Token はプロジェクトルートの設定ファイルに保存されています:", + "method2FileHint": "このファイルを開いて access_token フィールドの値をコピーしてください", + "securityTipTitle": "セキュリティノート", + "securityTip1": "Token を安全に保管し、他人に漏洱しないでください", + "securityTip2": "Token をリセットするには、ログイン後にシステム設定へ進んでください", + "slowLink": "インターフェースが重いです。どうすればいいですか?", + "disableAnimTitle": "バックグラウンドアニメーションを無効にする", + "disableAnimDesc": "バックグラウンドアニメーションは低スペックのデバイスで遅延を引き起こす可能性があります。無効にすると活百度が大幅に向上します。", + "disableAnimDetail": "無効にすると背景が単色になりますが、機能には影響しません。システム設定からいつでも再有効化できます。", + "disableAnimBtn": "アニメーションを無効にする", + "verifyFailed": "Token の検証に失敗しました。确認して再試行してください。", + "connFailed": "サーバーへの接続に失敗しました。ネットワーク接続を確認してください。", + "switchToLight": "ライトモードに切り替える", + "switchToDark": "ダークモードに切り替える" + }, + "common": { + "loading": "読み込み中...", + "error": "エラー", + "retry": "再試行", + "save": "保存", + "cancel": "キャンセル", + "confirm": "確認", + "delete": "削除", + "edit": "編集", + "close": "閉じる", + "search": "検索", + "noData": "データなし", + "success": "成功", + "failed": "失敗" + }, + "restart": { + "preparing": "再起動を準備中", + "preparingDesc": "再起動リクエストを送信中...", + "preparingTip": "🔄 MaiBot の再起動を準備中...", + "restarting": "MaiBot を再起動中", + "restartingDesc": "しばらお待ちください、MaiBot が再起動中です...", + "restartingTip": "🔄 設定を保存しました、メインプロセスを再起動中...", + "checking": "サービス状態を確認中", + "checkingDesc": "サービスの回復を待機中... ({{current}}/{{max}})", + "checkingTip": "⏳ サービスの回復を待機中、ページを閉じないでください...", + "success": "再起動成功", + "successDesc": "ログインページにリダイレクト中...", + "successTip": "✅ 設定が適用されました、サービスは正常に動作しています", + "failed": "再起動タイムアウト", + "failedDesc": "サービスが予定時間内に回復しませんでした", + "failedTip": "⚠️ 長時間応答がない場合は、手動で再起動してください", + "refreshPage": "ページを更新", + "retryCheck": "再試行", + "elapsed": "経過時間:" + }, + "errorBoundary": { + "title": "問題が発生しました", + "description": "アプリケーションが予期しないエラーを検出しました。ページを更新するかホームに戻ることができます。", + "refreshPage": "ページを更新", + "goHome": "ホームに戻る", + "footer": "問題が解決しない場合は、エラー情報をコピーして開発者に報告してください", + "copiedToClipboard": "クリップボードにコピーしました", + "copyError": "エラー情報をコピー" + }, + "search": { + "placeholder": "ページを検索...", + "title": "検索", + "noResults": "一致するページが見つかりません", + "startSearch": "キーワードを入力して検索を開始", + "navigate": "ナビゲート", + "select": "選択", + "close": "閉じる", + "categories": { + "overview": "概要", + "config": "設定", + "resources": "リソース", + "monitor": "監視", + "extensions": "拡張機能", + "system": "システム" + }, + "items": { + "home": "ホーム", + "homeDesc": "ダッシュボード概要を表示", + "botConfig": "ボットメイン設定", + "botConfigDesc": "ボットのコア設定を構成", + "modelProvider": "モデルプロバイダー設定", + "modelProviderDesc": "モデルプロバイダーを設定", + "model": "モデル設定", + "modelDesc": "モデルパラメーターを設定", + "emoji": "絵文字管理", + "emojiDesc": "ボットの絵文字を管理", + "expression": "表現管理", + "expressionDesc": "ボットの表現を管理", + "person": "人物情報", + "personDesc": "人物情報を管理", + "jargon": "スラング管理", + "jargonDesc": "ボットが学習したスラングを管理", + "statistics": "統計情報", + "statisticsDesc": "使用統計を表示", + "plugins": "プラグインマーケット", + "pluginsDesc": "プラグインを閉覧してインストール", + "logs": "ログビューア", + "logsDesc": "システムログを表示", + "settings": "設定", + "settingsDesc": "システム設定を構成" + } + }, + "httpWarning": { + "title": "セキュリティ警告:", + "message": "HTTP で MaiBot WebUI にアクセスしています", + "description": "これが公開サーバーの場合、データ(Token、チャット履歴など)が転送中に傍受される可能性があります。HTTPS を使用するか、ローカルネットワークからのみアクセスすることを強くお勧めします。", + "dismiss": "警告を閉じる" +} +} diff --git a/dashboard/src/i18n/locales/ko.json b/dashboard/src/i18n/locales/ko.json new file mode 100644 index 00000000..ec2f3c57 --- /dev/null +++ b/dashboard/src/i18n/locales/ko.json @@ -0,0 +1,477 @@ +{ + "language": { "zh": "中文", "en": "English", "ja": "日本語", "ko": "한국어" }, + "header": { + "collapseSidebar": "사이드바 접기", + "expandSidebar": "사이드바 펼치기", + "toggleConnection": "백엔드 연결 전환", + "viewAnnualSummary": "연간 요약 보기", + "annualSummary": "2025 연간 요약", + "searchPlaceholder": "검색...", + "viewDocs": "MaiBot 문서 보기", + "docs": "MaiBot 문서", + "switchToLight": "라이트 모드로 전환", + "switchToDark": "다크 모드로 전환", + "logout": "로그아웃", + "logoutLabel": "로그아웃", + "notConnected": "연결 안됨" + }, + "sidebar": { + "groups": { + "overview": "개요", + "botConfig": "봇 설정", + "botResources": "봇 리소스", + "extensionsMonitor": "확장 기능 & 모니터", + "system": "시스템" + }, + "menu": { + "home": "홈", + "botMainConfig": "봇 메인 설정", + "aiModelProvider": "AI 모델 공급자", + "modelManagement": "모델 관리", + "adapterConfig": "어댑터 설정", + "emojiManagement": "이모티콘 관리", + "expressionManagement": "표현 관리", + "slangManagement": "슬랭 관리", + "personInfo": "인물 정보", + "knowledgeGraph": "지식 그래프", + "knowledgeBase": "지식 베이스", + "pluginMarket": "플러그인 마켓", + "configTemplate": "설정 템플릿", + "pluginConfig": "플러그인 설정", + "logViewer": "로그 뷰어", + "plannerMonitor": "플래너 & 리플라이어 모니터", + "localChat": "로컬 채팅", + "settings": "설정" + } + }, + "layout": { + "verifyingLogin": "로그인 상태 확인 중...", + "logoTitle": "MaiBot WebUI", + "logoTitleShort": "M" + }, + "settings": { + "title": "설정", + "description": "앱 환경 설정 관리", + "tabs": { + "appearance": "외관", + "security": "보안", + "other": "기타", + "about": "정보" + }, + "appearance": { + "themeMode": "테마 모드", + "themeModeDesc": "라이트 / 다크 / 시스템 따라가기", + "light": "라이트", + "dark": "다크", + "system": "시스템", + "accentColor": "강조 색상", + "resetDefault": "기본값으로 재설정", + "colorPreview": "색상 미리보기", + "styleTweaks": "스타일 조정", + "typography": "타이포그래피", + "visualEffects": "시각 효과", + "layout": "레이아웃", + "animation": "애니메이션", + "background": "배경", + "customCss": "사용자 정의 CSS", + "animationEffect": "애니메이션 효과", + "importExportTheme": "테마 가져오기 / 내보내기", + "importTheme": "테마 가져오기", + "exportTheme": "테마 내보내기", + "importSuccess": "가져오기 성공", + "importFailed": "가져오기 실패", + "resetSuccess": "재설정 성공", + "fontFamily": "글꼴", + "fontSize": "글자 크기", + "borderRadius": "테두리 반경", + "contentWidth": "콘텐츠 너비", + "sidebarWidth": "사이드바 너비", + "animationSpeed": "애니메이션 속도", + "backgroundImage": "배경 이미지", + "backgroundBlur": "배경 흐림", + "backgroundOpacity": "배경 투명도", + "lightDesc": "항상 라이트 테마 사용", + "darkDesc": "항상 다크 테마 사용", + "systemDesc": "시스템 설정에 따라 자동 전환", + "accentPrimary": "링 컴러", + "accentHint": "색상 퐹을 클릭하거나 HEX 값을 입력하세요", + "resetTheme": "기본값으로 재설정", + "confirmResetTheme": "테마 재설정 확인", + "confirmResetThemeDesc": "이렇게 하면 색상, 글꼴, 레이아웃 및 사용자 정의 CSS를 포함한 모든 테마 설정이 기본값으로 재설정됩니다. 이 작업은 되돌릴 수 없습니다. 계속하시겠습니까?", + "confirmResetAction": "재설정 확인", + "cssWarningTitle": "다음 내용이 안전 필터를 거쳣습니다:", + "cssPlaceholder": "/* 사용자 정의 CSS를 여기에 입력 */\n\n/* 예시: */\n/* .sidebar { background: #1a1a2e; } */", + "cssDescription": "인터페이스를 더욱 개인화하도록 사용자 정의 CSS를 작성하세요. 위험한 CSS(@import, url() 등)는 자동으로 필터됩니다.", + "clearCss": "지우기", + "exportDesc": "주제를 JSON 파일로 내보내 공유하거나 백업합니다. 가져올 때 모든 설정이 자동으로 적용됩니다.", + "importSuccessDesc": "테마 설정을 가져왔습니다. 페이지가 자동으로 새로고침됩니다", + "resetSuccessDesc": "테마가 기본값으로 재설정되었습니다", + "enableAnimations": "애니메이션 활성화", + "enableAnimationsDesc": "비활성화하면 모든 전환 애니메이션과 효과가 긺히고 성능이 향상됩니다", + "loginWavesBackground": "로그인 페이지 파도 배경", + "loginWavesBackgroundDesc": "비활성화하면 로그인 페이지가 단색 배경이 됩니다. 저사양 디바이스에 적합합니다", + "inheritParentBg": "상위 배경 상속", + "inheritParentBgDesc": "활성화하면 상위 레이어의 배경 설정을 사용합니다", + "fontFamilyLabel": "글꼴 패밀리", + "fontFamilyPlaceholder": "글꼴 패밀리 선택", + "fontFamilySystem": "시스템 기본 (System)", + "fontFamilySans": "돋움체 (Sans-serif)", + "fontFamilySerif": "세리프 (Serif)", + "fontFamilyMono": "등폭 (Monospace)", + "baseFontSize": "기본 글자 크기 (Base Size)", + "lineHeight": "줄 높이 (Line Height)", + "lineHeightPlaceholder": "줄 높이 선택", + "lineHeightCompact": "콤팬트 (1.2)", + "lineHeightNormal": "보통 (1.5)", + "lineHeightLoose": "느슨 (1.75)", + "borderRadiusLabel": "테두리 반경 (Radius)", + "shadowLabel": "그림자 강도 (Shadow)", + "shadowPlaceholder": "그림자 강도 선택", + "shadowNone": "없음 (None)", + "shadowSm": "약함 (Small)", + "shadowMd": "중간 (Medium)", + "shadowLg": "강함 (Large)", + "shadowXl": "매우 강함 (Extra Large)", + "blurLabel": "흘림 효과 (Blur)", + "sidebarWidthLabel": "사이드바드 너비 (Sidebar Width)", + "maxContentWidth": "콘텐츠 최대 너비 (Max Width)", + "spacingUnit": "기본 간격 (Spacing Unit)", + "animationSpeedLabel": "애니메이션 속도 (Speed)", + "animationSpeedPlaceholder": "애니메이션 속도 선택", + "animationFast": "빠름 (100ms)", + "animationNormal": "보통 (300ms)", + "animationSlow": "느림 (500ms)", + "animationOff": "끄기 (0ms)", + "bgPage": "페이지", + "bgSidebar": "사이드바드", + "typographyGroup": "타이포그래피 (Typography)", + "visualGroup": "시각 효과 (Visual)", + "layoutGroup": "레이아웃 (Layout)", + "animationGroup": "애니메이션 (Animation)", + "backgroundGroup": "배경 설정 (Backgrounds)" + }, + "security": { + "currentToken": "현재 액세스 토큰", + "yourToken": "액세스 토큰", + "regenerate": "재생성", + "customToken": "사용자 정의 액세스 토큰", + "securityTip": "보안 팁", + "cannotCopy": "복사할 수 없습니다", + "copySuccess": "복사됨", + "copyFailed": "복사 실패", + "updateSuccess": "업데이트됨", + "updateFailed": "업데이트 실패", + "generateSuccess": "생성됨", + "generateFailed": "생성 실패", + "newToken": "새 액세스 토큰", + "confirmRegenerate": "토큰 재생성 확인", + "confirmRegenerateDesc": "재생성 후 이전 토큰은 무효화됩니다. 다시 로그인해야 합니다.", + "cancel": "취소", + "confirm": "확인", + "cannotCopyDesc": "토큰이 보안 쿠키에 저장되어 있습니다. 새 토큰을 얻으려면 재생성하세요.", + "copySuccessDesc": "토큰이 클립보드에 복사되었습니다", + "copyFailedDesc": "토큰을 수동으로 복사하세요", + "inputError": "입력 오류", + "inputErrorDesc": "새 토큰을 입력하세요", + "formatError": "형식 오류", + "formatErrorDesc": "토큰이 요구 사항을 충족하지 않습니다: {{failedRules}}", + "updateSuccessDesc": "액세스 토큰이 업데이트되었습니다. 로그인 페이지로 이동합니다.", + "updateFailedDesc": "토큰을 업데이트할 수 없습니다", + "updateFailedConn": "서버 연결에 실패했습니다", + "generateSuccessDesc": "새 액세스 토큰이 생성되었습니다. 즉시 저장하세요.", + "generateFailedDesc": "새 토큰을 생성할 수 없습니다", + "generateFailedConn": "서버 연결에 실패했습니다", + "cannotView": "볼 수 없습니다", + "cannotViewDesc": "토큰이 보안 쿠키에 저장되어 있습니다. 새 토큰이 필요하면 \"재생성\"을 클릭하세요.", + "hide": "숨기기", + "show": "표시", + "copyTip": "클립보드에 복사", + "regenerateShort": "생성", + "confirmRegenerateFullDesc": "새로운 64자 보안 토큰을 생성하고 현재 토큰을 즉시 무효화합니다. 새 토큰으로 다시 로그인해야 합니다. 이 작업은 되돌릴 수 없습니다. 계속하시겠습니까?", + "confirmGenerate": "생성 확인", + "tokenStorePlaceholder": "토큰이 보안 쿠키에 저장되어 있습니다", + "safekeepTip": "액세스 토큰을 안전하게 보관하고 다른 사람과 공유하지 마세요.", + "newTokenLabel": "새 액세스 토큰", + "customTokenPlaceholder": "사용자 정의 토큰 입력", + "tokenReqTitle": "토큰 보안 요구 사항:", + "tokenValid": "토큰 형식이 올바르며 사용 가능합니다", + "updateBtn": "사용자 정의 토큰 업데이트", + "updating": "업데이트 중...", + "dialogTitle": "새 액세스 토큰", + "dialogDesc": "새 토큰입니다. 즉시 저장하세요. 창을 닫으면 로그인 페이지로 이동합니다.", + "dialogTokenLabel": "새 토큰 (64자 보안 토큰)", + "important": "중요 공지", + "tip1": "이 토큰은 한 번만 표시됩니다. 닫은 후에는 볼 수 없습니다", + "tip2": "즉시 복사하여 안전한 위치에 저장하세요", + "tip3": "닫으면 자동으로 로그인 페이지로 이동합니다", + "tip4": "새 토큰으로 다시 로그인하세요", + "copied": "복사됨", + "copyToken": "토큰 복사", + "savedClose": "저장했습니다, 닫기", + "securityTip1": "재생성하면 시스템이 랜덤 64자 보안 토큰을 생성합니다", + "securityTip2": "사용자 정의 토큰은 모든 보안 요구 사항을 충족해야 합니다", + "securityTip3": "토큰을 업데이트하면 이전 토큰이 즉시 무효화됩니다", + "securityTip4": "안전한 환경에서 토큰을 확인하고 복사하세요", + "securityTip5": "토큰 유출이 의심되면 즉시 재생성하거나 업데이트하세요", + "securityTip6": "최고의 보안을 위해 시스템 생성 토큰을 권장합니다" + }, + "other": { + "performance": "성능 & 저장소", + "localStorage": "로컬 저장소 사용량", + "logCache": "로그 캐시 크기", + "importExport": "설정 가져오기 / 내보내기", + "configWizard": "설정 마법사", + "devTools": "개발자 도구", + "clearStorage": "로컬 저장소 지우기", + "clearStorageDesc": "모든 로컬 저장소 데이터를 지웁니다", + "clearStorageConfirm": "지우기 확인", + "clearLogCache": "로그 캐시 지우기", + "clearLogCacheDesc": "모든 캐시된 로그 데이터를 지웁니다", + "clearLogCacheConfirm": "지우기 확인", + "importSettings": "설정 가져오기", + "exportSettings": "설정 내보내기", + "resetAllSettings": "모든 설정 재설정", + "resetAllSettingsDesc": "모든 설정을 기본값으로 되돌립니다", + "resetAllSettingsConfirm": "재설정 확인", + "clearStorageSuccess": "로컬 저장소를 지웠습니다", + "clearStorageFailed": "지우기 실패", + "clearLogSuccess": "로그 캐시를 지웠습니다", + "clearLogFailed": "지우기 실패", + "importSuccess": "가져오기 성공", + "importFailed": "가져오기 실패", + "exportSuccess": "내보내기 성공", + "exportFailed": "내보내기 실패", + "resetSuccess": "재설정 성공", + "resetFailed": "재설정 실패", + "storageItems": "{{count}}개 저장 항목", + "logCacheSizeDesc": "로그 뷰어가 캐시할 최대 로그 수를 제어합니다. 값이 클수록 메모리를 더 사용합니다.", + "logCacheSizeUnit": "개", + "dataSyncIntervalLabel": "홈 데이터 새로고침 간격", + "dataSyncIntervalUnit": "초", + "dataSyncIntervalDesc": "홈 화면 통계 데이터의 자동 새로고침 간격을 제어합니다", + "wsReconnectLabel": "WebSocket 재연결 간격", + "wsReconnectUnit": "초", + "wsReconnectDesc": "로그 WebSocket 연결 해제 후 재연결 기본 간격", + "wsMaxReconnectLabel": "WebSocket 최대 재연결 횟수", + "wsMaxReconnectUnit": "회", + "wsMaxReconnectDesc": "연결 실패 후 최대 재연결 시도 횟수", + "clearLogCacheFn": "로그 캐시 지우기", + "clearLocalCache": "로컬 캐시 지우기", + "confirmClearCache": "로컬 캐시 지우기 확인", + "confirmClearCacheDesc": "로그인 자격 증명을 제외한 모든 로컬 캐시 설정과 데이터를 지웁니다. 일부 기본 설정을 다시 구성해야 할 수 있습니다. 계속하시겠습니까?", + "confirmClear": "지우기 확인", + "importExportDesc": "현재 인터페이스 설정을 내보내 백업하거나, 이전에 내보낸 파일에서 복원하세요.", + "exporting": "내보내는 중...", + "importing": "가져오는 중...", + "resetAllSettingsBtn": "모든 설정을 기본값으로 재설정", + "confirmResetAll": "모든 설정 재설정 확인", + "confirmResetAllDesc": "테마, 색상, 애니메이션 등 모든 인터페이스 설정을 기본값으로 복원합니다. 로그인 상태에는 영향이 없습니다. 계속하시겠습니까?", + "configWizardDesc": "초기 설정 마법사를 다시 실행하여 시스템 기본 설정을 재구성할 수 있습니다.", + "rerunSetup": "초기 설정 다시 실행", + "confirmRerunSetup": "재구성 확인", + "confirmRerunSetupDesc": "초기 설정 마법사로 돌아갑니다. 시스템 기본 설정을 재구성할 수 있습니다. 계속하시겠습니까?", + "devToolsDesc": "아래 기능은 개발 및 디버깅 전용입니다. 페이지 충돌이나 비정상 동작을 유발할 수 있습니다.", + "triggerError": "테스트 오류 발생", + "confirmTriggerError": "오류 발생 확인", + "confirmTriggerErrorDesc": "React 오류를 수동으로 발생시켜 오류 경계 컴포넌트를 테스트합니다. 페이지를 새로고침하거나 홈으로 돌아가면 복구됩니다.", + "confirmTrigger": "발생 확인", + "logCleared": "로그 지워짐", + "logClearedDesc": "로그 캐시가 지워졌습니다", + "cacheCleared": "캐시 지워짐", + "cacheClearedDesc": "{{count}}개의 캐시 데이터를 지웠습니다", + "exportSuccessDesc": "설정을 JSON 파일로 내보냈습니다", + "exportFailedDesc": "설정을 내보낼 수 없습니다", + "importSuccessDesc": "{{imported}}개 설정을 가져왔습니다", + "importSkippedSuffix": ", {{skipped}}개 건너뜀", + "importRefreshHint": "참고", + "importRefreshHintDesc": "일부 설정은 페이지를 새로고침해야 완전히 적용됩니다", + "importNoDataDesc": "가져올 유효한 설정이 없습니다", + "importInvalidDesc": "유효하지 않은 파일 형식", + "resetDone": "재설정 완료", + "resetDoneDesc": "모든 설정이 기본값으로 복원되었습니다. 변경 사항을 적용하려면 페이지를 새로고침하세요." + }, + "about": { + "openSource": "오픈 소스", + "aboutApp": "MaiBot Dashboard 정보", + "version": "버전:", + "author": "작성자", + "techStack": "기술 스택", + "frontendFramework": "프론트엔드 프레임워크", + "uiComponents": "UI 컴포넌트", + "backend": "백엔드", + "buildTool": "빌드 도구", + "openSourceThanks": "오픈 소스 라이브러리", + "openSourceLicense": "오픈 소스 라이선스", + "openSourceDesc": "이 프로젝트는 GitHub에서 오픈 소스입니다. Star ⭐로 응원해 주세요!", + "visitGitHub": "GitHub 방문", + "appDesc": "MaiBot의 현대적인 웹 관리 인터페이스", + "maimaiCore": "MaiBot 코어", + "uiFrameworkGroup": "UI 프레임워크 & 컴포넌트", + "routingStateGroup": "라우팅 & 상태 관리", + "formGroup": "폼 처리", + "utilsGroup": "유틸리티 라이브러리", + "animationGroup": "애니메이션", + "backendGroup": "백엔드 프레임워크", + "devToolsGroup": "개발자 도구", + "openSourceThanksDesc": "이 프로젝트는 다음 훌륭한 오픈 소스 라이브러리를 사용합니다. 기여에 감사드립니다:", + "licenseDesc": "이 프로젝트는 GNU General Public License v3.0으로 라이선스됩니다. 동일한 오픈 소스 라이선스를 유지하는 한 자유롭게 사용, 수정, 배포할 수 있습니다.", + "licenseDeps": "이 프로젝트의 모든 오픈 소스 라이브러리는 각각의 라이선스(MIT, Apache-2.0, BSD 등)를 따릅니다. 모든 오픈 소스 기여자에게 감사드립니다.", + "lib": { + "react": "UI 구축을 위한 라이브러리", + "shadcn": "우아한 React 컴포넌트 라이브러리", + "radix": "스타일 없는 접근 가능한 컴포넌트", + "tailwind": "유틸리티 우선 CSS 프레임워크", + "lucide": "아름다운 아이콘 라이브러리", + "tanstackRouter": "타입 안전한 라우팅 라이브러리", + "zustand": "경량 상태 관리 라이브러리", + "reactHookForm": "고성능 폼 라이브러리", + "zod": "TypeScript 우선 스키마 검증", + "clsx": "조건부 className 빌더", + "tailwindMerge": "Tailwind 클래스 이름 병합 도구", + "cva": "컴포넌트 변형 관리", + "dateFns": "현대적인 날짜 유틸리티 라이브러리", + "framerMotion": "React 애니메이션 라이브러리", + "vaul": "드로어 컴포넌트 애니메이션", + "fastapi": "현대적인 Python 웹 프레임워크", + "uvicorn": "ASGI 서버", + "pydantic": "데이터 검증 라이브러리", + "pythonMultipart": "파일 업로드 지원", + "typescript": "JavaScript의 슈퍼셋", + "vite": "차세대 프론트엔드 빌드 도구", + "eslint": "JavaScript 코드 린터", + "postcss": "CSS 변환 도구" + } + } + }, + "auth": { + "title": "로그인", + "description": "계속하려면 액세스 토큰을 입력하세요", + "tokenLabel": "액세스 토큰", + "tokenPlaceholder": "액세스 토큰 입력", + "loginButton": "로그인", + "loggingIn": "로그인 중...", + "loginFailed": "로그인 실패", + "loginSuccess": "로그인 성공", + "checkingAuth": "로그인 상태 확인 중...", + "welcome": "MaiBot에 오신 것을 환영합니다", + "accessDesc": "시스템에 액세스하려면 액세스 토큰을 입력하세요", + "tokenRequired": "액세스 토큰을 입력해 주세요", + "verifyingLabel": "확인 중...", + "verifyEnter": "확인 후 입장", + "helpLink": "Token이 없습니다. 어디서 얻을 수 있나요?", + "helpTitle": "Access Token 얻는 방법", + "helpDesc": "Access Token은 MaiBot WebUI에 액세스하는 유일한 자격 증명입니다. 다음 방법으로 얻으세요", + "method1Title": "방법 1: 시작 로그 확인", + "method1Desc": "MaiBot 시작 시 콘솔에 WebUI Access Token이 표시됩니다.", + "method1Example1": "🔑 WebUI Access Token: abc123...", + "method1Example2": "💡 이 Token으로 WebUI에 로그인하세요", + "method2Title": "방법 2: 설정 파일 확인", + "method2Desc": "Token은 프로젝트 루트의 설정 파일에 저장됩니다:", + "method2FileHint": "이 파일을 열고 access_token 필드의 값을 복사하세요", + "securityTipTitle": "보안 안내", + "securityTip1": "Token을 안전하게 유지하고 타인에게 노출하지 마세요", + "securityTip2": "Token을 재설정하려면 로그인 후 시스템 설정으로 이동하세요", + "slowLink": "인터페이스가 느립니다. 어떻게 하나요?", + "disableAnimTitle": "배경 애니메이션 비활성화", + "disableAnimDesc": "배경 애니메이션은 저사양 디바이스에서 느리게 동작할 수 있습니다. 비활성화하면 화면이 훨씬 부드러워집니다.", + "disableAnimDetail": "비활성화 후 배경은 단색으로 바뀐지지만 모든 기능은 정상 작동합니다. 시스템 설정에서 언제든지 다시 활성화할 수 있습니다.", + "disableAnimBtn": "애니메이션 비활성화", + "verifyFailed": "Token 확인에 실패했습니다. 확인 후 다시 시도해 주세요.", + "connFailed": "서버에 연결하지 못했습니다. 네트워크 연결을 확인해 주세요.", + "switchToLight": "라이트 모드로 전환", + "switchToDark": "다크 모드로 전환" + }, + "common": { + "loading": "로딩 중...", + "error": "오류", + "retry": "재시도", + "save": "저장", + "cancel": "취소", + "confirm": "확인", + "delete": "삭제", + "edit": "편집", + "close": "닫기", + "search": "검색", + "noData": "데이터 없음", + "success": "성공", + "failed": "실패" + }, + "restart": { + "preparing": "재시작 준비 중", + "preparingDesc": "재시작 요청 전송 중...", + "preparingTip": "🔄 MaiBot 재시작을 준비 중...", + "restarting": "MaiBot 재시작 중", + "restartingDesc": "잠시 기다려주세요, MaiBot이 재시작 중입니다...", + "restartingTip": "🔄 설정을 저장했습니다, 메인 프로세스를 재시작 중...", + "checking": "서비스 상태 확인 중", + "checkingDesc": "서비스 복구 대기 중... ({{current}}/{{max}})", + "checkingTip": "⏳ 서비스 복구를 기다리는 중, 페이지를 닫지 마세요...", + "success": "재시작 성공", + "successDesc": "로그인 페이지로 이동 중...", + "successTip": "✅ 설정이 적용되었습니다, 서비스가 정상적으로 실행 중입니다", + "failed": "재시작 시간 초과", + "failedDesc": "서비스가 예상 시간 내에 복구되지 않았습니다", + "failedTip": "⚠️ 장시간 응답이 없으면 수동으로 재시작해 보세요", + "refreshPage": "페이지 새로고침", + "retryCheck": "재시도", + "elapsed": "경과 시간:" + }, + "errorBoundary": { + "title": "문제가 발생했습니다", + "description": "앱이 예기치 않은 오류를 만났습니다. 페이지를 새로고침하거나 홈으로 돌아갈 수 있습니다.", + "refreshPage": "페이지 새로고침", + "goHome": "홈으로 이동", + "footer": "문제가 계속되면 오류 정보를 복사하여 개발자에게 보고해 주세요", + "copiedToClipboard": "클립보드에 복사됨", + "copyError": "오류 정보 복사" + }, + "search": { + "placeholder": "페이지 검색...", + "title": "검색", + "noResults": "일치하는 페이지를 찾을 수 없습니다", + "startSearch": "키워드를 입력하여 검색 시작", + "navigate": "탐색", + "select": "선택", + "close": "닫기", + "categories": { + "overview": "개요", + "config": "설정", + "resources": "리소스", + "monitor": "모니터", + "extensions": "확장 기능", + "system": "시스템" + }, + "items": { + "home": "홈", + "homeDesc": "대시보드 개요 보기", + "botConfig": "속 메인 설정", + "botConfigDesc": "속 핵심 설정 구성", + "modelProvider": "모델 공급자 설정", + "modelProviderDesc": "모델 공급자 구성", + "model": "모델 설정", + "modelDesc": "모델 매개변수 구성", + "emoji": "이모티콘 관리", + "emojiDesc": "속 이모티콘 관리", + "expression": "표현 관리", + "expressionDesc": "속 표현 관리", + "person": "인물 정보", + "personDesc": "인물 정보 관리", + "jargon": "슬랭 관리", + "jargonDesc": "속이 학습한 슬랭 관리", + "statistics": "통계 정보", + "statisticsDesc": "사용 통계 보기", + "plugins": "플러그인 마켓", + "pluginsDesc": "플러그인 탐색 및 설치", + "logs": "로그 뷰어", + "logsDesc": "시스템 로그 보기", + "settings": "설정", + "settingsDesc": "시스템 설정 구성" + } + }, + "httpWarning": { + "title": "보안 경고:", + "message": "HTTP를 통해 MaiBot WebUI에 접속하고 있습니다", + "description": "이것이 공개 서버인 경우, 데이터(Token, 채팅 기록 등)가 전송 중에 가로챔질 수 있습니다. HTTPS를 사용하거나 로컈 네트워크에서만 접속하는 것을 강력히 권장합니다.", + "dismiss": "경고 닫기" +} +} diff --git a/dashboard/src/i18n/locales/zh.json b/dashboard/src/i18n/locales/zh.json new file mode 100644 index 00000000..670dccc1 --- /dev/null +++ b/dashboard/src/i18n/locales/zh.json @@ -0,0 +1,477 @@ +{ + "language": { "zh": "中文", "en": "English", "ja": "日本語", "ko": "한국어" }, + "header": { + "collapseSidebar": "收起侧边栏", + "expandSidebar": "展开侧边栏", + "toggleConnection": "切换后端连接", + "viewAnnualSummary": "查看年度总结", + "annualSummary": "2025 年度总结", + "searchPlaceholder": "搜索...", + "viewDocs": "查看麦麦文档", + "docs": "麦麦文档", + "switchToLight": "切换到浅色模式", + "switchToDark": "切换到深色模式", + "logout": "登出系统", + "logoutLabel": "登出", + "notConnected": "未连接" + }, + "sidebar": { + "groups": { + "overview": "概览", + "botConfig": "麦麦配置编辑", + "botResources": "麦麦资源管理", + "extensionsMonitor": "扩展与监控", + "system": "系统" + }, + "menu": { + "home": "首页", + "botMainConfig": "麦麦主程序配置", + "aiModelProvider": "AI模型厂商配置", + "modelManagement": "模型管理与分配", + "adapterConfig": "麦麦适配器配置", + "emojiManagement": "表情包管理", + "expressionManagement": "表达方式管理", + "slangManagement": "黑话管理", + "personInfo": "人物信息管理", + "knowledgeGraph": "知识库图谱可视化", + "knowledgeBase": "麦麦知识库管理", + "pluginMarket": "插件市场", + "configTemplate": "配置模板市场", + "pluginConfig": "插件配置", + "logViewer": "日志查看器", + "plannerMonitor": "计划器&回复器监控", + "localChat": "本地聊天室", + "settings": "系统设置" + } + }, + "layout": { + "verifyingLogin": "正在验证登录状态...", + "logoTitle": "MaiBot WebUI", + "logoTitleShort": "M" + }, + "settings": { + "title": "系统设置", + "description": "管理您的应用偏好设置", + "tabs": { + "appearance": "外观", + "security": "安全", + "other": "其他", + "about": "关于" + }, + "appearance": { + "themeMode": "主题模式", + "themeModeDesc": "浅色/深色/跟随系统", + "light": "浅色", + "dark": "深色", + "system": "跟随系统", + "accentColor": "主题色", + "resetDefault": "重置默认", + "colorPreview": "实时色板预览", + "styleTweaks": "界面样式微调", + "typography": "字体排版", + "visualEffects": "视觉效果", + "layout": "布局", + "animation": "动画", + "background": "背景设置", + "customCss": "自定义 CSS", + "animationEffect": "动画效果", + "importExportTheme": "主题导入/导出", + "importTheme": "导入主题", + "exportTheme": "导出主题", + "importSuccess": "导入成功", + "importFailed": "导入失败", + "resetSuccess": "重置成功", + "fontFamily": "字体", + "fontSize": "字号", + "borderRadius": "圆角", + "contentWidth": "内容宽度", + "sidebarWidth": "侧边栏宽度", + "animationSpeed": "动画速度", + "backgroundImage": "背景图片", + "backgroundBlur": "背景模糊", + "backgroundOpacity": "背景透明度", + "lightDesc": "始终使用浅色主题", + "darkDesc": "始终使用深色主题", + "systemDesc": "根据系统设置自动切换", + "accentPrimary": "主色调", + "accentHint": "点击色环选择或输入 HEX 值", + "resetTheme": "重置为默认", + "confirmResetTheme": "确认重置主题", + "confirmResetThemeDesc": "这将重置所有主题设置为默认值,包括颜色、字体、布局和自定义 CSS。此操作不可撤销,确定要继续吗?", + "confirmResetAction": "确认重置", + "cssWarningTitle": "以下内容已被安全过滤:", + "cssPlaceholder": "/* 在这里输入自定义 CSS */\n\n/* 例如: */\n/* .sidebar { background: #1a1a2e; } */", + "cssDescription": "编写自定义 CSS 来进一步个性化界面。危险的 CSS(如 @import、url())将被自动过滤。", + "clearCss": "清除", + "exportDesc": "导出主题为 JSON 文件便于分享或备份,导入时会自动应用所有配置。", + "importSuccessDesc": "主题配置已导入,页面将自动刷新", + "resetSuccessDesc": "主题已重置为默认值", + "enableAnimations": "启用动画效果", + "enableAnimationsDesc": "关闭后将禁用所有过渡动画和特效,提升性能", + "loginWavesBackground": "登录页波浪背景", + "loginWavesBackgroundDesc": "关闭后登录页将使用纯色背景,适合低性能设备", + "inheritParentBg": "继承上级背景", + "inheritParentBgDesc": "开启后将使用上级层级的背景配置", + "fontFamilyLabel": "字体族 (Font Family)", + "fontFamilyPlaceholder": "选择字体族", + "fontFamilySystem": "系统默认 (System)", + "fontFamilySans": "无衬线 (Sans-serif)", + "fontFamilySerif": "衬线 (Serif)", + "fontFamilyMono": "等宽 (Monospace)", + "baseFontSize": "基准字体大小 (Base Size)", + "lineHeight": "行高 (Line Height)", + "lineHeightPlaceholder": "选择行高", + "lineHeightCompact": "紧凑 (1.2)", + "lineHeightNormal": "正常 (1.5)", + "lineHeightLoose": "宽松 (1.75)", + "borderRadiusLabel": "圆角大小 (Radius)", + "shadowLabel": "阴影强度 (Shadow)", + "shadowPlaceholder": "选择阴影强度", + "shadowNone": "无阴影 (None)", + "shadowSm": "轻微 (Small)", + "shadowMd": "中等 (Medium)", + "shadowLg": "强烈 (Large)", + "shadowXl": "极强 (Extra Large)", + "blurLabel": "模糊效果 (Blur)", + "sidebarWidthLabel": "侧边栏宽度 (Sidebar Width)", + "maxContentWidth": "内容区最大宽度 (Max Width)", + "spacingUnit": "基准间距 (Spacing Unit)", + "animationSpeedLabel": "动画速度 (Speed)", + "animationSpeedPlaceholder": "选择动画速度", + "animationFast": "快速 (100ms)", + "animationNormal": "正常 (300ms)", + "animationSlow": "慢速 (500ms)", + "animationOff": "关闭 (0ms)", + "bgPage": "页面", + "bgSidebar": "侧边栏", + "typographyGroup": "字体排版 (Typography)", + "visualGroup": "视觉效果 (Visual)", + "layoutGroup": "布局 (Layout)", + "animationGroup": "动画 (Animation)", + "backgroundGroup": "背景设置 (Backgrounds)" + }, + "security": { + "currentToken": "当前 Access Token", + "yourToken": "您的访问令牌", + "regenerate": "重新生成", + "customToken": "自定义 Access Token", + "securityTip": "安全提示", + "cannotCopy": "无法复制", + "copySuccess": "复制成功", + "copyFailed": "复制失败", + "updateSuccess": "更新成功", + "updateFailed": "更新失败", + "generateSuccess": "生成成功", + "generateFailed": "生成失败", + "newToken": "新的 Access Token", + "confirmRegenerate": "确认重新生成 Token", + "confirmRegenerateDesc": "重新生成后,旧 Token 将失效,需重新登录", + "cancel": "取消", + "confirm": "确认", + "cannotCopyDesc": "Token 存储在安全 Cookie 中,请重新生成以获取新 Token", + "copySuccessDesc": "Token 已复制到剪贴板", + "copyFailedDesc": "请手动复制 Token", + "inputError": "输入错误", + "inputErrorDesc": "请输入新的 Token", + "formatError": "格式错误", + "formatErrorDesc": "Token 不符合要求: {{failedRules}}", + "updateSuccessDesc": "Access Token 已更新,即将跳转到登录页", + "updateFailedDesc": "无法更新 Token", + "updateFailedConn": "连接服务器失败", + "generateSuccessDesc": "新的 Access Token 已生成,请及时保存", + "generateFailedDesc": "无法生成新 Token", + "generateFailedConn": "连接服务器失败", + "cannotView": "无法查看", + "cannotViewDesc": "Token 存储在安全 Cookie 中,如需新 Token 请点击\"重新生成\"", + "hide": "隐藏", + "show": "显示", + "copyTip": "复制到剪贴板", + "regenerateShort": "生成", + "confirmRegenerateFullDesc": "这将生成一个新的 64 位安全令牌,并使当前 Token 立即失效。您需要使用新 Token 重新登录系统。此操作不可撤销,确定要继续吗?", + "confirmGenerate": "确认生成", + "tokenStorePlaceholder": "Token 存储在安全 Cookie 中", + "safekeepTip": "请妥善保管您的 Access Token,不要泄露给他人", + "newTokenLabel": "新的访问令牌", + "customTokenPlaceholder": "输入自定义 Token", + "tokenReqTitle": "Token 安全要求:", + "tokenValid": "Token 格式正确,可以使用", + "updateBtn": "更新自定义 Token", + "updating": "更新中...", + "dialogTitle": "新的 Access Token", + "dialogDesc": "这是您的新 Token,请立即保存。关闭此窗口后将跳转到登录页面。", + "dialogTokenLabel": "您的新 Token (64位安全令牌)", + "important": "重要提示", + "tip1": "此 Token 仅显示一次,关闭后无法再查看", + "tip2": "请立即复制并保存到安全的位置", + "tip3": "关闭窗口后将自动跳转到登录页面", + "tip4": "请使用新 Token 重新登录系统", + "copied": "已复制", + "copyToken": "复制 Token", + "savedClose": "我已保存,关闭", + "securityTip1": "重新生成 Token 会创建系统随机生成的 64 位安全令牌", + "securityTip2": "自定义 Token 必须满足所有安全要求才能使用", + "securityTip3": "更新 Token 后,旧的 Token 将立即失效", + "securityTip4": "请在安全的环境下查看和复制 Token", + "securityTip5": "如果怀疑 Token 泄露,请立即重新生成或更新", + "securityTip6": "建议使用系统生成的 Token 以获得最高安全性" + }, + "other": { + "performance": "性能与存储", + "localStorage": "本地存储使用", + "logCache": "日志缓存大小", + "importExport": "导入/导出设置", + "configWizard": "配置向导", + "devTools": "开发者工具", + "clearStorage": "清空本地存储", + "clearStorageDesc": "清空所有本地存储数据", + "clearStorageConfirm": "确认清空", + "clearLogCache": "清空日志缓存", + "clearLogCacheDesc": "清空所有缓存的日志数据", + "clearLogCacheConfirm": "确认清空", + "importSettings": "导入设置", + "exportSettings": "导出设置", + "resetAllSettings": "重置所有设置", + "resetAllSettingsDesc": "将所有设置恢复到默认值", + "resetAllSettingsConfirm": "确认重置", + "clearStorageSuccess": "本地存储已清空", + "clearStorageFailed": "清空失败", + "clearLogSuccess": "日志缓存已清空", + "clearLogFailed": "清空失败", + "importSuccess": "导入成功", + "importFailed": "导入失败", + "exportSuccess": "导出成功", + "exportFailed": "导出失败", + "resetSuccess": "重置成功", + "resetFailed": "重置失败", + "storageItems": "{{count}} 个存储项", + "logCacheSizeDesc": "控制日志查看器最多缓存的日志条数,较大的值会占用更多内存", + "logCacheSizeUnit": "条", + "dataSyncIntervalLabel": "首页数据刷新间隔", + "dataSyncIntervalUnit": "秒", + "dataSyncIntervalDesc": "控制首页统计数据的自动刷新间隔", + "wsReconnectLabel": "WebSocket 重连间隔", + "wsReconnectUnit": "秒", + "wsReconnectDesc": "日志 WebSocket 连接断开后的重连基础间隔", + "wsMaxReconnectLabel": "WebSocket 最大重连次数", + "wsMaxReconnectUnit": "次", + "wsMaxReconnectDesc": "连接失败后的最大重连尝试次数", + "clearLogCacheFn": "清除日志缓存", + "clearLocalCache": "清除本地缓存", + "confirmClearCache": "确认清除本地缓存", + "confirmClearCacheDesc": "这将清除所有本地缓存的设置和数据(不包括登录凭证)。您可能需要重新配置部分偏好设置。确定要继续吗?", + "confirmClear": "确认清除", + "importExportDesc": "导出当前的界面设置以便备份,或从之前导出的文件中恢复设置。", + "exporting": "导出中...", + "importing": "导入中...", + "resetAllSettingsBtn": "重置所有设置为默认值", + "confirmResetAll": "确认重置所有设置", + "confirmResetAllDesc": "这将把所有界面设置恢复为默认值,包括主题、颜色、动画等偏好设置。此操作不会影响您的登录状态。确定要继续吗?", + "configWizardDesc": "重新进行初次配置向导,可以帮助您重新设置系统的基础配置。", + "rerunSetup": "重新进行初次配置", + "confirmRerunSetup": "确认重新配置", + "confirmRerunSetupDesc": "这将带您重新进入初次配置向导。您可以重新设置系统的基础配置项。确定要继续吗?", + "devToolsDesc": "以下功能仅供开发调试使用,可能会导致页面崩溃或异常。", + "triggerError": "触发测试错误", + "confirmTriggerError": "确认触发错误", + "confirmTriggerErrorDesc": "这将手动触发一个 React 错误,用于测试错误边界组件的显示效果。页面将显示错误界面,您可以通过刷新页面或点击返回首页来恢复。", + "confirmTrigger": "确认触发", + "logCleared": "日志已清除", + "logClearedDesc": "日志缓存已清空", + "cacheCleared": "缓存已清除", + "cacheClearedDesc": "已清除 {{count}} 项缓存数据", + "exportSuccessDesc": "设置已导出为 JSON 文件", + "exportFailedDesc": "无法导出设置", + "importSuccessDesc": "成功导入 {{imported}} 项设置", + "importSkippedSuffix": ",跳过 {{skipped}} 项", + "importRefreshHint": "提示", + "importRefreshHintDesc": "部分设置需要刷新页面才能完全生效", + "importNoDataDesc": "没有有效的设置项可导入", + "importInvalidDesc": "文件格式无效", + "resetDone": "已重置", + "resetDoneDesc": "所有设置已恢复为默认值,刷新页面以应用更改" + }, + "about": { + "openSource": "开源项目", + "aboutApp": "关于 MaiBot Dashboard", + "version": "版本:", + "author": "作者", + "techStack": "技术栈", + "frontendFramework": "前端框架", + "uiComponents": "UI 组件", + "backend": "后端", + "buildTool": "构建工具", + "openSourceThanks": "开源库感谢", + "openSourceLicense": "开源许可", + "openSourceDesc": "本项目在 GitHub 开源,欢迎 Star ⭐ 支持!", + "visitGitHub": "前往 GitHub", + "appDesc": "麦麦(MaiBot)的现代化 Web 管理界面", + "maimaiCore": "MaiBot 核心", + "uiFrameworkGroup": "UI 框架与组件", + "routingStateGroup": "路由与状态管理", + "formGroup": "表单处理", + "utilsGroup": "工具库", + "animationGroup": "动画效果", + "backendGroup": "后端框架", + "devToolsGroup": "开发工具", + "openSourceThanksDesc": "本项目使用了以下优秀的开源库,感谢他们的贡献:", + "licenseDesc": "本项目采用 GNU General Public License v3.0 开源许可证。您可以自由地使用、修改和分发本软件,但必须保持相同的开源许可。", + "licenseDeps": "本项目依赖的所有开源库均遵循各自的开源许可证(MIT、Apache-2.0、BSD 等)。感谢所有开源贡献者的无私奉献。", + "lib": { + "react": "用户界面构建库", + "shadcn": "优雅的 React 组件库", + "radix": "无样式的可访问组件库", + "tailwind": "实用优先的 CSS 框架", + "lucide": "精美的图标库", + "tanstackRouter": "类型安全的路由库", + "zustand": "轻量级状态管理", + "reactHookForm": "高性能表单库", + "zod": "TypeScript 优先的 schema 验证", + "clsx": "条件 className 构建工具", + "tailwindMerge": "Tailwind 类名合并工具", + "cva": "组件变体管理", + "dateFns": "现代化日期处理库", + "framerMotion": "React 动画库", + "vaul": "抽屉组件动画", + "fastapi": "现代化 Python Web 框架", + "uvicorn": "ASGI 服务器", + "pydantic": "数据验证库", + "pythonMultipart": "文件上传支持", + "typescript": "JavaScript 的超集", + "vite": "下一代前端构建工具", + "eslint": "JavaScript 代码检查工具", + "postcss": "CSS 转换工具" + } + } + }, + "auth": { + "title": "登录", + "description": "请输入访问令牌以继续", + "tokenLabel": "Access Token", + "tokenPlaceholder": "请输入 Access Token", + "loginButton": "登录", + "loggingIn": "登录中...", + "loginFailed": "登录失败", + "loginSuccess": "登录成功", + "checkingAuth": "正在检查登录状态...", + "welcome": "欢迎使用 MaiBot", + "accessDesc": "请输入您的 Access Token 以继续访问系统", + "tokenRequired": "请输入 Access Token", + "verifyingLabel": "验证中...", + "verifyEnter": "验证并进入", + "helpLink": "我没有 Token,我该去哪里获得 Token?", + "helpTitle": "如何获取 Access Token", + "helpDesc": "Access Token 是访问 MaiBot WebUI 的唯一凭证,请按以下方式获取", + "method1Title": "方式一:查看启动日志", + "method1Desc": "在 MaiBot 启动时,控制台会显示 WebUI Access Token。", + "method1Example1": "🔑 WebUI Access Token: abc123...", + "method1Example2": "💡 请使用此 Token 登录 WebUI", + "method2Title": "方式二:查看配置文件", + "method2Desc": "Token 保存在项目根目录的配置文件中:", + "method2FileHint": "打开此文件,复制 access_token 字段的值", + "securityTipTitle": "安全提示", + "securityTip1": "请妥善保管您的 Token,不要泄露给他人", + "securityTip2": "如需重置 Token,请在登录后前往系统设置", + "slowLink": "我觉得这个界面很卡怎么办?", + "disableAnimTitle": "关闭背景动画", + "disableAnimDesc": "背景动画可能会在低性能设备上造成卡顿。关闭动画可以显著提升界面流畅度。", + "disableAnimDetail": "关闭动画后,背景将变为纯色,但不影响任何功能的使用。您可以随时在系统设置中重新开启动画。", + "disableAnimBtn": "关闭动画", + "verifyFailed": "Token 验证失败,请检查后重试", + "connFailed": "连接服务器失败,请检查网络连接", + "switchToLight": "切换到浅色模式", + "switchToDark": "切换到深色模式" + }, + "common": { + "loading": "加载中...", + "error": "错误", + "retry": "重试", + "save": "保存", + "cancel": "取消", + "confirm": "确认", + "delete": "删除", + "edit": "编辑", + "close": "关闭", + "search": "搜索", + "noData": "暂无数据", + "success": "成功", + "failed": "失败" + }, + "restart": { + "preparing": "准备重启", + "preparingDesc": "正在发送重启请求...", + "preparingTip": "🔄 正在准备重启麦麦...", + "restarting": "正在重启麦麦", + "restartingDesc": "请稍候,麦麦正在重启中...", + "restartingTip": "🔄 配置已保存,正在重启主程序...", + "checking": "检查服务状态", + "checkingDesc": "等待服务恢复... ({{current}}/{{max}})", + "checkingTip": "⏳ 正在等待服务恢复,请勿关闭页面...", + "success": "重启成功", + "successDesc": "正在跳转到登录页面...", + "successTip": "✅ 配置已生效,服务运行正常", + "failed": "重启超时", + "failedDesc": "服务未能在预期时间内恢复", + "failedTip": "⚠️ 如果长时间无响应,请尝试手动重启", + "refreshPage": "刷新页面", + "retryCheck": "重试检测", + "elapsed": "已用时:" + }, + "errorBoundary": { + "title": "页面出现了问题", + "description": "应用程序遇到了意外错误。您可以尝试刷新页面或返回首页。", + "refreshPage": "刷新页面", + "goHome": "返回首页", + "footer": "如果问题持续存在,请将错误信息复制并反馈给开发者", + "copiedToClipboard": "已复制到剪贴板", + "copyError": "复制错误信息" + }, + "search": { + "placeholder": "搜索页面...", + "title": "搜索", + "noResults": "未找到匹配的页面", + "startSearch": "输入关键词开始搜索", + "navigate": "导航", + "select": "选择", + "close": "关闭", + "categories": { + "overview": "概览", + "config": "配置", + "resources": "资源", + "monitor": "监控", + "extensions": "扩展", + "system": "系统" + }, + "items": { + "home": "首页", + "homeDesc": "查看仪表板概览", + "botConfig": "麦麦主程序配置", + "botConfigDesc": "配置麦麦的核心设置", + "modelProvider": "麦麦模型提供商配置", + "modelProviderDesc": "配置模型提供商", + "model": "麦麦模型配置", + "modelDesc": "配置模型参数", + "emoji": "表情包管理", + "emojiDesc": "管理麦麦的表情包", + "expression": "表达方式管理", + "expressionDesc": "管理麦麦的表达方式", + "person": "人物信息管理", + "personDesc": "管理人物信息", + "jargon": "黑话管理", + "jargonDesc": "管理麦麦学习到的黑话和俚语", + "statistics": "统计信息", + "statisticsDesc": "查看使用统计", + "plugins": "插件市场", + "pluginsDesc": "浏览和安装插件", + "logs": "日志查看器", + "logsDesc": "查看系统日志", + "settings": "系统设置", + "settingsDesc": "配置系统参数" + } + }, + "httpWarning": { + "title": "安全警告:", + "message": "您正在使用 HTTP 访问 MaiBot WebUI", + "description": "如果这是公网服务器,您的数据(包括 Token、聊天记录等)可能在传输过程中被窃取。强烈建议使用 HTTPS 访问或仅在本地网络使用。", + "dismiss": "关闭警告" +} +} diff --git a/dashboard/src/main.tsx b/dashboard/src/main.tsx index 0123c786..a42bfe13 100644 --- a/dashboard/src/main.tsx +++ b/dashboard/src/main.tsx @@ -2,6 +2,7 @@ import { StrictMode, useEffect, useState } from 'react' import { createRoot } from 'react-dom/client' import { RouterProvider } from '@tanstack/react-router' import './index.css' +import './i18n' import { router } from './router' import { AssetStoreProvider } from './components/asset-provider' import { ThemeProvider } from './components/theme-provider' diff --git a/dashboard/src/routes/auth.tsx b/dashboard/src/routes/auth.tsx index 8f9ff520..24ccbfeb 100644 --- a/dashboard/src/routes/auth.tsx +++ b/dashboard/src/routes/auth.tsx @@ -1,5 +1,6 @@ import { useEffect, useState } from 'react' import { useNavigate } from '@tanstack/react-router' +import { useTranslation } from 'react-i18next' import { AlertCircle, @@ -59,6 +60,7 @@ export function AuthPage() { const [error, setError] = useState('') const [checkingAuth, setCheckingAuth] = useState(true) const navigate = useNavigate() + const { t } = useTranslation() const { enableWavesBackground, setEnableWavesBackground } = useAnimation() const { theme, setTheme } = useTheme() @@ -100,7 +102,7 @@ export function AuthPage() { setError('') if (!token.trim()) { - setError('请输入 Access Token') + setError(t('auth.tokenRequired')) return } @@ -160,12 +162,12 @@ export function AuthPage() { } } else { console.error('Token 验证失败:', data.message) - setError(data.message || 'Token 验证失败,请检查后重试') + setError(data.message || t('auth.verifyFailed')) } } catch (err) { console.error('Token 验证错误:', err) setError( - err instanceof Error ? err.message : '连接服务器失败,请检查网络连接' + err instanceof Error ? err.message : t('auth.connFailed') ) } finally { setIsValidating(false) @@ -177,7 +179,7 @@ export function AuthPage() { return (
{enableWavesBackground && } -
正在检查登录状态...
+
{t('auth.checkingAuth')}
) } @@ -193,7 +195,7 @@ export function AuthPage() { @@ -264,17 +266,17 @@ export function AuthPage() { - 如何获取 Access Token + {t('auth.helpTitle')} - Access Token 是访问 MaiBot WebUI 的唯一凭证,请按以下方式获取 + {t('auth.helpDesc')} @@ -284,13 +286,13 @@ export function AuthPage() {
-

方式一:查看启动日志

+

{t('auth.method1Title')}

- 在 MaiBot 启动时,控制台会显示 WebUI Access Token。 + {t('auth.method1Desc')}

-

🔑 WebUI Access Token: abc123...

-

💡 请使用此 Token 登录 WebUI

+

{t('auth.method1Example1')}

+

{t('auth.method1Example2')}

@@ -301,15 +303,15 @@ export function AuthPage() {
-

方式二:查看配置文件

+

{t('auth.method2Title')}

- Token 保存在项目根目录的配置文件中: + {t('auth.method2Desc')}

data/webui.json

- 打开此文件,复制 access_token 字段的值 + {t('auth.method2FileHint')} access_token

@@ -320,10 +322,10 @@ export function AuthPage() {
-

安全提示

+

{t('auth.securityTipTitle')}

    -
  • 请妥善保管您的 Token,不要泄露给他人
  • -
  • 如需重置 Token,请在登录后前往系统设置
  • +
  • {t('auth.securityTip1')}
  • +
  • {t('auth.securityTip2')}
@@ -337,30 +339,30 @@ export function AuthPage() { - 关闭背景动画 + {t('auth.disableAnimTitle')} - 背景动画可能会在低性能设备上造成卡顿。关闭动画可以显著提升界面流畅度。 + {t('auth.disableAnimDesc')}

- 关闭动画后,背景将变为纯色,但不影响任何功能的使用。您可以随时在系统设置中重新开启动画。 + {t('auth.disableAnimDetail')}

- 取消 + {t('common.cancel')} setEnableWavesBackground(false)} > - 关闭动画 + {t('auth.disableAnimBtn')}
diff --git a/dashboard/src/routes/settings/AboutTab.tsx b/dashboard/src/routes/settings/AboutTab.tsx index 0042a11f..38386dcb 100644 --- a/dashboard/src/routes/settings/AboutTab.tsx +++ b/dashboard/src/routes/settings/AboutTab.tsx @@ -1,3 +1,5 @@ +import { useTranslation } from 'react-i18next' + import { ScrollArea } from '@/components/ui/scroll-area' import { APP_NAME, APP_VERSION } from '@/lib/version' @@ -6,6 +8,8 @@ import { cn } from '@/lib/utils' import { LibraryItem } from './LibraryItem' export function AboutTab() { + const { t } = useTranslation() + return (
{/* GitHub 开源地址 */} @@ -27,10 +31,10 @@ export function AboutTab() {
{/* 作者信息 */}
-

作者

+

{t('settings.about.author')}

-

MaiBot 核心

+

{t('settings.about.maimaiCore')}

Mai-with-u

@@ -100,10 +104,10 @@ export function AboutTab() { {/* 技术栈 */}
-

技术栈

+

{t('settings.about.techStack')}

-

前端框架

+

{t('settings.about.frontendFramework')}

  • React 19.2.0
  • TypeScript 5.7.2
  • @@ -112,7 +116,7 @@ export function AboutTab() {
-

UI 组件

+

{t('settings.about.uiComponents')}

  • shadcn/ui
  • Radix UI
  • @@ -121,7 +125,7 @@ export function AboutTab() {
-

后端

+

{t('settings.about.backend')}

  • Python 3.12+
  • FastAPI
  • @@ -130,7 +134,7 @@ export function AboutTab() {
-

构建工具

+

{t('settings.about.buildTool')}

  • Bun / npm
  • ESLint 9.17.0
  • @@ -142,81 +146,81 @@ export function AboutTab() { {/* 开源感谢 */}
    -

    开源库感谢

    +

    {t('settings.about.openSourceThanks')}

    - 本项目使用了以下优秀的开源库,感谢他们的贡献: + {t('settings.about.openSourceThanksDesc')}

    {/* UI 框架 */}
    -

    UI 框架与组件

    +

    {t('settings.about.uiFrameworkGroup')}

    - - - - - + + + + +
    {/* 路由与状态 */}
    -

    路由与状态管理

    +

    {t('settings.about.routingStateGroup')}

    - - + +
    {/* 表单与验证 */}
    -

    表单处理

    +

    {t('settings.about.formGroup')}

    - - + +
    {/* 工具库 */}
    -

    工具库

    +

    {t('settings.about.utilsGroup')}

    - - - - + + + +
    {/* 动画 */}
    -

    动画效果

    +

    {t('settings.about.animationGroup')}

    - - + +
    {/* 后端相关 */}
    -

    后端框架

    +

    {t('settings.about.backendGroup')}

    - - - - + + + +
    {/* 开发工具 */}
    -

    开发工具

    +

    {t('settings.about.devToolsGroup')}

    - - - - + + + +
    @@ -225,7 +229,7 @@ export function AboutTab() { {/* 许可证 */}
    -

    开源许可

    +

    {t('settings.about.openSourceLicense')}

    @@ -239,15 +243,13 @@ export function AboutTab() { MaiBot WebUI

    - 本项目采用 GNU General Public License v3.0 开源许可证。 - 您可以自由地使用、修改和分发本软件,但必须保持相同的开源许可。 + {t('settings.about.licenseDesc')}

    - 本项目依赖的所有开源库均遵循各自的开源许可证(MIT、Apache-2.0、BSD 等)。 - 感谢所有开源贡献者的无私奉献。 + {t('settings.about.licenseDeps')}

    diff --git a/dashboard/src/routes/settings/AppearanceTab.tsx b/dashboard/src/routes/settings/AppearanceTab.tsx index 85a742c1..2dd2ad62 100644 --- a/dashboard/src/routes/settings/AppearanceTab.tsx +++ b/dashboard/src/routes/settings/AppearanceTab.tsx @@ -1,4 +1,5 @@ import { useState, useMemo, useRef, useCallback } from 'react' +import { useTranslation } from 'react-i18next' import { AlertTriangle, Download, RotateCcw, Trash2, Upload } from 'lucide-react' import { useAnimation } from '@/hooks/use-animation' @@ -77,6 +78,7 @@ export function AppearanceTab() { const { theme, setTheme, themeConfig, updateThemeConfig, resolvedTheme, resetTheme } = useTheme() const { enableAnimations, setEnableAnimations, enableWavesBackground, setEnableWavesBackground } = useAnimation() const { toast } = useToast() + const { t } = useTranslation() const [localCSS, setLocalCSS] = useState(themeConfig.customCSS || '') const [cssWarnings, setCssWarnings] = useState([]) @@ -157,10 +159,10 @@ export function AppearanceTab() { const result = importThemeJSON(json) if (result.success) { // 导入成功后需要刷新页面使配置生效(因为 ThemeProvider 需要重新读取 localStorage) - toast({ title: '导入成功', description: '主题配置已导入,页面将自动刷新' }) + toast({ title: t('settings.appearance.importSuccess'), description: t('settings.appearance.importSuccessDesc') }) setTimeout(() => window.location.reload(), 1000) } else { - toast({ title: '导入失败', description: result.errors.join('; '), variant: 'destructive' }) + toast({ title: t('settings.appearance.importFailed'), description: result.errors.join('; '), variant: 'destructive' }) } } reader.readAsText(file) @@ -172,7 +174,7 @@ export function AppearanceTab() { resetTheme() setLocalCSS('') setCssWarnings([]) - toast({ title: '重置成功', description: '主题已重置为默认值' }) + toast({ title: t('settings.appearance.resetSuccess'), description: t('settings.appearance.resetSuccessDesc') }) } const previewTokens = useMemo(() => { @@ -216,28 +218,28 @@ export function AppearanceTab() {
    {/* 主题模式 */}
    -

    主题模式

    +

    {t('settings.appearance.themeMode')}

    @@ -245,7 +247,7 @@ export function AppearanceTab() { {/* 主题色配置 */}
    -

    主题色

    +

    {t('settings.appearance.accentColor')}

    @@ -271,8 +273,8 @@ export function AppearanceTab() { />
    - -

    点击色环选择或输入 HEX 值

    + +

    {t('settings.appearance.accentHint')}

    @@ -290,7 +292,7 @@ export function AppearanceTab() { {/* 实时色板预览 */}
    -

    实时色板预览

    +

    {t('settings.appearance.colorPreview')}

    @@ -307,13 +309,13 @@ export function AppearanceTab() { {/* 样式微调 */}
    -

    界面样式微调

    +

    {t('settings.appearance.styleTweaks')}

    {/* 1. 字体排版 (Typography) */} - 字体排版 (Typography) + {t('settings.appearance.typographyGroup')}
    @@ -325,12 +327,12 @@ export function AppearanceTab() { className="h-8 text-xs" > - 重置默认 + {t('settings.appearance.resetDefault')}
    - +
    - + {parseFloat(getTokenValue(themeConfig.tokenOverrides, 'typography', 'font-size-base', '1')) * 16}px @@ -384,7 +386,7 @@ export function AppearanceTab() {
    - +
    @@ -409,7 +411,7 @@ export function AppearanceTab() { {/* 2. 视觉效果 (Visual) */} - 视觉效果 (Visual) + {t('settings.appearance.visualGroup')}
    @@ -421,13 +423,13 @@ export function AppearanceTab() { className="h-8 text-xs" > - 重置默认 + {t('settings.appearance.resetDefault')}
    - + {Math.round(parseFloat(getTokenValue(themeConfig.tokenOverrides, 'visual', 'radius-md', '0.375')) * 16)}px @@ -447,7 +449,7 @@ export function AppearanceTab() {
    - +
    - + - 布局 (Layout) + {t('settings.appearance.layoutGroup')}
    @@ -512,13 +514,13 @@ export function AppearanceTab() { className="h-8 text-xs" > - 重置默认 + {t('settings.appearance.resetDefault')}
    - + {getTokenValue(themeConfig.tokenOverrides, 'layout', 'sidebar-width', '16rem')} @@ -539,7 +541,7 @@ export function AppearanceTab() {
    - + {getTokenValue(themeConfig.tokenOverrides, 'layout', 'max-content-width', '1280px')} @@ -560,7 +562,7 @@ export function AppearanceTab() {
    - + {getTokenValue(themeConfig.tokenOverrides, 'layout', 'space-unit', '0.25rem')} @@ -584,7 +586,7 @@ export function AppearanceTab() { {/* 4. 动画 (Animation) */} - 动画 (Animation) + {t('settings.appearance.animationGroup')}
    @@ -596,12 +598,12 @@ export function AppearanceTab() { className="h-8 text-xs" > - 重置默认 + {t('settings.appearance.resetDefault')}
    - +
    @@ -645,13 +647,13 @@ export function AppearanceTab() { {/* 5. 背景设置 (Backgrounds) */} - 背景设置 (Backgrounds) + {t('settings.appearance.backgroundGroup')}
    - 页面 - 侧边栏 + {t('settings.appearance.bgPage')} + {t('settings.appearance.bgSidebar')} Header Card Dialog @@ -662,8 +664,8 @@ export function AppearanceTab() { {layerId !== 'page' && (
    - -

    开启后将使用上级层级的背景配置

    + +

    {t('settings.appearance.inheritParentBgDesc')}

    -

    自定义 CSS

    +

    {t('settings.appearance.customCss')}

    - 编写自定义 CSS 来进一步个性化界面。危险的 CSS(如 @import、url())将被自动过滤。 + {t('settings.appearance.cssDescription')}

    @@ -721,7 +723,7 @@ export function AppearanceTab() { value={localCSS} language="css" height="250px" - placeholder={`/* 在这里输入自定义 CSS */\n\n/* 例如: */\n/* .sidebar { background: #1a1a2e; } */`} + placeholder={t('settings.appearance.cssPlaceholder')} onChange={handleCSSChange} /> @@ -729,7 +731,7 @@ export function AppearanceTab() {
    - 以下内容已被安全过滤: + {t('settings.appearance.cssWarningTitle')}
      {cssWarnings.map((w, i) =>
    • {w}
    • )} @@ -741,17 +743,17 @@ export function AppearanceTab() { {/* 动效设置 */}
      -

      动画效果

      +

      {t('settings.appearance.animationEffect')}

      {/* 全局动画开关 */}

      - 关闭后将禁用所有过渡动画和特效,提升性能 + {t('settings.appearance.enableAnimationsDesc')}

      - 关闭后登录页将使用纯色背景,适合低性能设备 + {t('settings.appearance.loginWavesBackgroundDesc')}

      -

      主题导入/导出

      +

      {t('settings.appearance.importExportTheme')}

      {/* 导出按钮 */} @@ -795,7 +797,7 @@ export function AppearanceTab() { className="gap-2" > - 导出主题 + {t('settings.appearance.exportTheme')} {/* 导入按钮 */} @@ -805,7 +807,7 @@ export function AppearanceTab() { className="gap-2" > - 导入主题 + {t('settings.appearance.importTheme')} {/* 重置按钮 */} @@ -816,20 +818,20 @@ export function AppearanceTab() { className="gap-2" > - 重置为默认 + {t('settings.appearance.resetTheme')} - 确认重置主题 + {t('settings.appearance.confirmResetTheme')} - 这将重置所有主题设置为默认值,包括颜色、字体、布局和自定义 CSS。此操作不可撤销,确定要继续吗? + {t('settings.appearance.confirmResetThemeDesc')} - 取消 + {t('common.cancel')} - 确认重置 + {t('settings.appearance.confirmResetAction')} @@ -846,7 +848,7 @@ export function AppearanceTab() { />

      - 导出主题为 JSON 文件便于分享或备份,导入时会自动应用所有配置。 + {t('settings.appearance.exportDesc')}

      diff --git a/dashboard/src/routes/settings/OtherTab.tsx b/dashboard/src/routes/settings/OtherTab.tsx index e5aed473..8fb0ebd8 100644 --- a/dashboard/src/routes/settings/OtherTab.tsx +++ b/dashboard/src/routes/settings/OtherTab.tsx @@ -1,5 +1,6 @@ import { AlertTriangle, Database, Download, HardDrive, RefreshCw, RotateCcw, Trash2, Upload } from 'lucide-react' import { useRef, useState } from 'react' +import { useTranslation } from 'react-i18next' import { useNavigate } from '@tanstack/react-router' import { cn } from '@/lib/utils' @@ -14,6 +15,7 @@ import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, // 其他设置标签页 export function OtherTab() { + const { t } = useTranslation() const navigate = useNavigate() const { toast } = useToast() const [isResetting, setIsResetting] = useState(false) @@ -73,8 +75,8 @@ export function OtherTab() { const handleClearLogCache = () => { logWebSocket.clearLogs() toast({ - title: '日志已清除', - description: '日志缓存已清空', + title: t('settings.other.logCleared'), + description: t('settings.other.logClearedDesc'), }) } @@ -83,8 +85,8 @@ export function OtherTab() { const result = clearLocalCache() refreshStorageUsage() toast({ - title: '缓存已清除', - description: `已清除 ${result.clearedKeys.length} 项缓存数据`, + title: t('settings.other.cacheCleared'), + description: t('settings.other.cacheClearedDesc', { count: result.clearedKeys.length }), }) } @@ -104,14 +106,14 @@ export function OtherTab() { document.body.removeChild(a) URL.revokeObjectURL(url) toast({ - title: '导出成功', - description: '设置已导出为 JSON 文件', + title: t('settings.other.exportSuccess'), + description: t('settings.other.exportSuccessDesc'), }) } catch (error) { console.error('导出设置失败:', error) toast({ - title: '导出失败', - description: '无法导出设置', + title: t('settings.other.exportFailed'), + description: t('settings.other.exportFailedDesc'), variant: 'destructive', }) } finally { @@ -141,29 +143,29 @@ export function OtherTab() { refreshStorageUsage() toast({ - title: '导入成功', - description: `成功导入 ${result.imported.length} 项设置${result.skipped.length > 0 ? `,跳过 ${result.skipped.length} 项` : ''}`, + title: t('settings.other.importSuccess'), + description: t('settings.other.importSuccessDesc', { imported: result.imported.length }) + (result.skipped.length > 0 ? t('settings.other.importSkippedSuffix', { skipped: result.skipped.length }) : ''), }) // 提示用户刷新页面以应用所有更改 if (result.imported.includes('theme') || result.imported.includes('accentColor')) { toast({ - title: '提示', - description: '部分设置需要刷新页面才能完全生效', + title: t('settings.other.importRefreshHint'), + description: t('settings.other.importRefreshHintDesc'), }) } } else { toast({ - title: '导入失败', - description: '没有有效的设置项可导入', + title: t('settings.other.importFailed'), + description: t('settings.other.importNoDataDesc'), variant: 'destructive', }) } } catch (error) { console.error('导入设置失败:', error) toast({ - title: '导入失败', - description: '文件格式无效', + title: t('settings.other.importFailed'), + description: t('settings.other.importInvalidDesc'), variant: 'destructive', }) } finally { @@ -187,8 +189,8 @@ export function OtherTab() { setDataSyncInterval(DEFAULT_SETTINGS.dataSyncInterval) refreshStorageUsage() toast({ - title: '已重置', - description: '所有设置已恢复为默认值,刷新页面以应用更改', + title: t('settings.other.resetDone'), + description: t('settings.other.resetDoneDesc'), }) } @@ -205,8 +207,8 @@ export function OtherTab() { if (response.ok && data.success) { toast({ - title: '重置成功', - description: '即将进入初次配置向导', + title: t('settings.other.resetSuccess'), + description: t('settings.other.clearStorageSuccess'), }) // 延迟跳转到配置向导 @@ -215,16 +217,16 @@ export function OtherTab() { }, 1000) } else { toast({ - title: '重置失败', - description: data.message || '无法重置配置状态', + title: t('settings.other.resetFailed'), + description: data.message || t('settings.other.clearStorageFailed'), variant: 'destructive', }) } } catch (error) { console.error('重置配置状态错误:', error) toast({ - title: '重置失败', - description: '连接服务器失败', + title: t('settings.other.resetFailed'), + description: t('settings.other.clearStorageFailed'), variant: 'destructive', }) } finally { @@ -238,7 +240,7 @@ export function OtherTab() {

      - 性能与存储 + {t('settings.other.performance')}

      {/* 存储使用情况 */} @@ -246,21 +248,21 @@ export function OtherTab() {
      - 本地存储使用 + {t('settings.other.localStorage')}
      {formatBytes(storageUsage.used)}
      -

      {storageUsage.items} 个存储项

      +

      {t('settings.other.storageItems', { count: storageUsage.items })}

      {/* 日志缓存大小 */}
      - - {logCacheSize} 条 + + {logCacheSize} {t('settings.other.logCacheSizeUnit')}

      - 控制日志查看器最多缓存的日志条数,较大的值会占用更多内存 + {t('settings.other.logCacheSizeDesc')}

      {/* 数据刷新间隔 */}
      - - {dataSyncInterval} 秒 + + {dataSyncInterval} {t('settings.other.dataSyncIntervalUnit')}

      - 控制首页统计数据的自动刷新间隔 + {t('settings.other.dataSyncIntervalDesc')}

      {/* WebSocket 重连间隔 */}
      - - {wsReconnectInterval / 1000} 秒 + + {wsReconnectInterval / 1000} {t('settings.other.wsReconnectUnit')}

      - 日志 WebSocket 连接断开后的重连基础间隔 + {t('settings.other.wsReconnectDesc')}

      {/* WebSocket 最大重连次数 */}
      - - {wsMaxReconnectAttempts} 次 + + {wsMaxReconnectAttempts} {t('settings.other.wsMaxReconnectUnit')}

      - 连接失败后的最大重连尝试次数 + {t('settings.other.wsMaxReconnectDesc')}

      @@ -336,27 +338,26 @@ export function OtherTab() {
      - 确认清除本地缓存 + {t('settings.other.confirmClearCache')} - 这将清除所有本地缓存的设置和数据(不包括登录凭证)。 - 您可能需要重新配置部分偏好设置。确定要继续吗? + {t('settings.other.confirmClearCacheDesc')} - 取消 + {t('common.cancel')} - 确认清除 + {t('settings.other.confirmClear')} @@ -369,11 +370,11 @@ export function OtherTab() {

      - 导入/导出设置 + {t('settings.other.importExport')}

      - 导出当前的界面设置以便备份,或从之前导出的文件中恢复设置。 + {t('settings.other.importExportDesc')}

      @@ -384,7 +385,7 @@ export function OtherTab() { className="gap-2" > - {isExporting ? '导出中...' : '导出设置'} + {isExporting ? t('settings.other.exporting') : t('settings.other.exportSettings')} - {isImporting ? '导入中...' : '导入设置'} + {isImporting ? t('settings.other.importing') : t('settings.other.importSettings')}
      @@ -411,21 +412,20 @@ export function OtherTab() { - 确认重置所有设置 + {t('settings.other.confirmResetAll')} - 这将把所有界面设置恢复为默认值,包括主题、颜色、动画等偏好设置。 - 此操作不会影响您的登录状态。确定要继续吗? + {t('settings.other.confirmResetAllDesc')} - 取消 + {t('common.cancel')} - 确认重置 + {t('settings.other.resetAllSettingsConfirm')} @@ -436,31 +436,31 @@ export function OtherTab() { {/* 配置向导 */}
      -

      配置向导

      +

      {t('settings.other.configWizard')}

      - 重新进行初次配置向导,可以帮助您重新设置系统的基础配置。 + {t('settings.other.configWizardDesc')}

      - 确认重新配置 + {t('settings.other.confirmRerunSetup')} - 这将带您重新进入初次配置向导。您可以重新设置系统的基础配置项。确定要继续吗? + {t('settings.other.confirmRerunSetupDesc')} - 取消 + {t('common.cancel')} - 确认重置 + {t('settings.other.resetAllSettingsConfirm')} @@ -472,36 +472,35 @@ export function OtherTab() {

      - 开发者工具 + {t('settings.other.devTools')}

      - 以下功能仅供开发调试使用,可能会导致页面崩溃或异常。 + {t('settings.other.devToolsDesc')}

      - 确认触发错误 + {t('settings.other.confirmTriggerError')} - 这将手动触发一个 React 错误,用于测试错误边界组件的显示效果。 - 页面将显示错误界面,您可以通过刷新页面或点击返回首页来恢复。 + {t('settings.other.confirmTriggerErrorDesc')} - 取消 + {t('common.cancel')} setShouldThrowError(true)} className="bg-destructive text-destructive-foreground hover:bg-destructive/90" > - 确认触发 + {t('settings.other.confirmTrigger')} diff --git a/dashboard/src/routes/settings/SecurityTab.tsx b/dashboard/src/routes/settings/SecurityTab.tsx index 429a5a42..dd8028df 100644 --- a/dashboard/src/routes/settings/SecurityTab.tsx +++ b/dashboard/src/routes/settings/SecurityTab.tsx @@ -9,6 +9,7 @@ import { XCircle, } from 'lucide-react' import { useState, useMemo } from 'react' +import { useTranslation } from 'react-i18next' import { useNavigate } from '@tanstack/react-router' import { cn } from '@/lib/utils' @@ -38,6 +39,7 @@ import { } from '@/components/ui/alert-dialog' export function SecurityTab() { + const { t } = useTranslation() const navigate = useNavigate() const [currentToken, setCurrentToken] = useState('') const [newToken, setNewToken] = useState('') @@ -58,8 +60,8 @@ export function SecurityTab() { const copyToClipboard = async (text: string) => { if (!currentToken) { toast({ - title: '无法复制', - description: 'Token 存储在安全 Cookie 中,请重新生成以获取新 Token', + title: t('settings.security.cannotCopy'), + description: t('settings.security.cannotCopyDesc'), variant: 'destructive', }) return @@ -68,14 +70,14 @@ export function SecurityTab() { await navigator.clipboard.writeText(text) setCopied(true) toast({ - title: '复制成功', - description: 'Token 已复制到剪贴板', + title: t('settings.security.copySuccess'), + description: t('settings.security.copySuccessDesc'), }) setTimeout(() => setCopied(false), 2000) } catch { toast({ - title: '复制失败', - description: '请手动复制 Token', + title: t('settings.security.copyFailed'), + description: t('settings.security.copyFailedDesc'), variant: 'destructive', }) } @@ -85,8 +87,8 @@ export function SecurityTab() { const handleUpdateToken = async () => { if (!newToken.trim()) { toast({ - title: '输入错误', - description: '请输入新的 Token', + title: t('settings.security.inputError'), + description: t('settings.security.inputErrorDesc'), variant: 'destructive', }) return @@ -100,8 +102,8 @@ export function SecurityTab() { .join(', ') toast({ - title: '格式错误', - description: `Token 不符合要求: ${failedRules}`, + title: t('settings.security.formatError'), + description: t('settings.security.formatErrorDesc', { failedRules }), variant: 'destructive', }) return @@ -129,8 +131,8 @@ export function SecurityTab() { setCurrentToken(newToken.trim()) toast({ - title: '更新成功', - description: 'Access Token 已更新,即将跳转到登录页', + title: t('settings.security.updateSuccess'), + description: t('settings.security.updateSuccessDesc'), }) // 延迟跳转到登录页 @@ -139,16 +141,16 @@ export function SecurityTab() { }, 1500) } else { toast({ - title: '更新失败', - description: data.message || '无法更新 Token', + title: t('settings.security.updateFailed'), + description: data.message || t('settings.security.updateFailedDesc'), variant: 'destructive', }) } } catch (err) { console.error('更新 Token 错误:', err) toast({ - title: '更新失败', - description: '连接服务器失败', + title: t('settings.security.updateFailed'), + description: t('settings.security.updateFailedConn'), variant: 'destructive', }) } finally { @@ -181,21 +183,21 @@ export function SecurityTab() { setTokenCopied(false) toast({ - title: '生成成功', - description: '新的 Access Token 已生成,请及时保存', + title: t('settings.security.generateSuccess'), + description: t('settings.security.generateSuccessDesc'), }) } else { toast({ - title: '生成失败', - description: data.message || '无法生成新 Token', + title: t('settings.security.generateFailed'), + description: data.message || t('settings.security.generateFailedDesc'), variant: 'destructive', }) } } catch (err) { console.error('生成 Token 错误:', err) toast({ - title: '生成失败', - description: '连接服务器失败', + title: t('settings.security.generateFailed'), + description: t('settings.security.generateFailedConn'), variant: 'destructive', }) } finally { @@ -209,13 +211,13 @@ export function SecurityTab() { await navigator.clipboard.writeText(generatedToken) setTokenCopied(true) toast({ - title: '复制成功', - description: 'Token 已复制到剪贴板', + title: t('settings.security.copySuccess'), + description: t('settings.security.copySuccessDesc'), }) } catch { toast({ - title: '复制失败', - description: '请手动复制 Token', + title: t('settings.security.copyFailed'), + description: t('settings.security.copyFailedDesc'), variant: 'destructive', }) } @@ -251,10 +253,10 @@ export function SecurityTab() { - 新的 Access Token + {t('settings.security.dialogTitle')} - 这是您的新 Token,请立即保存。关闭此窗口后将跳转到登录页面。 + {t('settings.security.dialogDesc')} @@ -262,7 +264,7 @@ export function SecurityTab() { {/* Token 显示区域 */}
      {generatedToken} @@ -274,12 +276,12 @@ export function SecurityTab() {
      -

      重要提示

      +

      {t('settings.security.important')}

        -
      • 此 Token 仅显示一次,关闭后无法再查看
      • -
      • 请立即复制并保存到安全的位置
      • -
      • 关闭窗口后将自动跳转到登录页面
      • -
      • 请使用新 Token 重新登录系统
      • +
      • {t('settings.security.tip1')}
      • +
      • {t('settings.security.tip2')}
      • +
      • {t('settings.security.tip3')}
      • +
      • {t('settings.security.tip4')}
      @@ -295,17 +297,17 @@ export function SecurityTab() { {tokenCopied ? ( <> - 已复制 + {t('settings.security.copied')} ) : ( <> - 复制 Token + {t('settings.security.copyToken')} )} @@ -313,10 +315,10 @@ export function SecurityTab() { {/* 当前 Token */}
      -

      当前 Access Token

      +

      {t('settings.security.currentToken')}

      - +
      - 确认重新生成 Token + {t('settings.security.confirmRegenerate')} - 这将生成一个新的 64 位安全令牌,并使当前 Token 立即失效。 - 您需要使用新 Token 重新登录系统。此操作不可撤销,确定要继续吗? + {t('settings.security.confirmRegenerateFullDesc')} - 取消 + {t('settings.security.cancel')} - 确认生成 + {t('settings.security.confirmGenerate')} @@ -394,7 +395,7 @@ export function SecurityTab() {

      - 请妥善保管您的 Access Token,不要泄露给他人 + {t('settings.security.safekeepTip')}

      @@ -402,10 +403,10 @@ export function SecurityTab() { {/* 更新 Token */}
      -

      自定义 Access Token

      +

      {t('settings.security.customToken')}

      - +
      setNewToken(e.target.value)} className="pr-10 font-mono text-sm" - placeholder="输入自定义 Token" + placeholder={t('settings.security.customTokenPlaceholder')} />
      {/* 安全提示 */}
      -

      安全提示

      +

      {t('settings.security.securityTip')}

        -
      • 重新生成 Token 会创建系统随机生成的 64 位安全令牌
      • -
      • 自定义 Token 必须满足所有安全要求才能使用
      • -
      • 更新 Token 后,旧的 Token 将立即失效
      • -
      • 请在安全的环境下查看和复制 Token
      • -
      • 如果怀疑 Token 泄露,请立即重新生成或更新
      • -
      • 建议使用系统生成的 Token 以获得最高安全性
      • +
      • {t('settings.security.securityTip1')}
      • +
      • {t('settings.security.securityTip2')}
      • +
      • {t('settings.security.securityTip3')}
      • +
      • {t('settings.security.securityTip4')}
      • +
      • {t('settings.security.securityTip5')}
      • +
      • {t('settings.security.securityTip6')}
      diff --git a/dashboard/src/routes/settings/index.tsx b/dashboard/src/routes/settings/index.tsx index 833f9206..4c406e5f 100644 --- a/dashboard/src/routes/settings/index.tsx +++ b/dashboard/src/routes/settings/index.tsx @@ -1,4 +1,5 @@ import { Info, Palette, Settings, Shield } from 'lucide-react' +import { useTranslation } from 'react-i18next' import { ScrollArea } from '@/components/ui/scroll-area' import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs' @@ -9,13 +10,14 @@ import { OtherTab } from './OtherTab' import { SecurityTab } from './SecurityTab' export function SettingsPage() { + const { t } = useTranslation() return (
      {/* 页面标题 */}
      -

      系统设置

      -

      管理您的应用偏好设置

      +

      {t('settings.title')}

      +

      {t('settings.description')}

      @@ -24,19 +26,19 @@ export function SettingsPage() { - 外观 + {t('settings.tabs.appearance')} - 安全 + {t('settings.tabs.security')} - 其他 + {t('settings.tabs.other')} - 关于 + {t('settings.tabs.about')}