From a85b731ce13accd221fba0e410015e67aca6f892 Mon Sep 17 00:00:00 2001 From: foxhui Date: Sat, 24 Jan 2026 03:24:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E6=8B=9F=E4=BA=BA?= =?UTF-8?q?=E9=BC=A0=E6=A0=87=E8=BD=A8=E8=BF=B9=E9=80=89=E6=8B=A9=EF=BC=8C?= =?UTF-8?q?Token=20=E5=85=81=E8=AE=B8=E7=95=99=E7=A9=BA=20(closes=20#12)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 14 +++++++ config.example.yaml | 17 ++++++++- src/backend/adapter/lmarena.js | 20 +++++++--- src/backend/adapter/lmarena_text.js | 17 +++++++-- src/backend/engine/launcher.js | 1 + src/backend/engine/utils.js | 30 +++++++++++---- src/backend/pool/Worker.js | 25 ++++++++++-- src/config/index.js | 17 +++++++-- src/config/manager.js | 2 + src/config/validator.js | 6 +-- src/server/middlewares/auth.js | 4 ++ src/server/server.js | 5 --- webui/dist/assets/DesktopOutlined-uy4U7g8U.js | 1 - webui/dist/assets/DesktopOutlined.js | 1 + webui/dist/assets/adapters-DtPVlvoc.js | 1 - webui/dist/assets/adapters.js | 1 + webui/dist/assets/browser-BaEoZVA4.js | 1 - webui/dist/assets/browser.js | 1 + webui/dist/assets/cache-B7UW2VhI.js | 1 - webui/dist/assets/cache.js | 1 + webui/dist/assets/dash-9gu6BYeT.js | 1 - webui/dist/assets/dash.js | 1 + webui/dist/assets/display-Dhk_8lAp.js | 1 - webui/dist/assets/display.js | 1 + .../assets/{index-BVr8U7Bl.css => index.css} | 0 .../assets/{index-BgSomuu7.js => index.js} | 6 +-- webui/dist/assets/logs-DZX_S7jR.js | 2 - .../assets/{logs-lIVamK0l.css => logs.css} | 0 webui/dist/assets/logs.js | 2 + webui/dist/assets/{rfb-BW3Yvshj.js => rfb.js} | 0 webui/dist/assets/server-BMslIr7R.js | 1 - webui/dist/assets/server-D1vV5anY.css | 1 - webui/dist/assets/server.css | 1 + webui/dist/assets/server.js | 1 + webui/dist/assets/system-CbLTf1UP.js | 1 - webui/dist/assets/system.js | 1 + webui/dist/assets/workers-DudWKgva.js | 1 - webui/dist/assets/workers.js | 1 + webui/dist/index.html | 4 +- webui/src/components/settings/browser.vue | 38 +++++++++++++++---- webui/src/components/settings/server.vue | 30 ++++++++++++++- webui/src/stores/settings.js | 4 +- webui/vite.config.js | 9 +++++ 43 files changed, 210 insertions(+), 63 deletions(-) delete mode 100644 webui/dist/assets/DesktopOutlined-uy4U7g8U.js create mode 100644 webui/dist/assets/DesktopOutlined.js delete mode 100644 webui/dist/assets/adapters-DtPVlvoc.js create mode 100644 webui/dist/assets/adapters.js delete mode 100644 webui/dist/assets/browser-BaEoZVA4.js create mode 100644 webui/dist/assets/browser.js delete mode 100644 webui/dist/assets/cache-B7UW2VhI.js create mode 100644 webui/dist/assets/cache.js delete mode 100644 webui/dist/assets/dash-9gu6BYeT.js create mode 100644 webui/dist/assets/dash.js delete mode 100644 webui/dist/assets/display-Dhk_8lAp.js create mode 100644 webui/dist/assets/display.js rename webui/dist/assets/{index-BVr8U7Bl.css => index.css} (100%) rename webui/dist/assets/{index-BgSomuu7.js => index.js} (99%) delete mode 100644 webui/dist/assets/logs-DZX_S7jR.js rename webui/dist/assets/{logs-lIVamK0l.css => logs.css} (100%) create mode 100644 webui/dist/assets/logs.js rename webui/dist/assets/{rfb-BW3Yvshj.js => rfb.js} (100%) delete mode 100644 webui/dist/assets/server-BMslIr7R.js delete mode 100644 webui/dist/assets/server-D1vV5anY.css create mode 100644 webui/dist/assets/server.css create mode 100644 webui/dist/assets/server.js delete mode 100644 webui/dist/assets/system-CbLTf1UP.js create mode 100644 webui/dist/assets/system.js delete mode 100644 webui/dist/assets/workers-DudWKgva.js create mode 100644 webui/dist/assets/workers.js diff --git a/CHANGELOG.md b/CHANGELOG.md index a8e454c..3d62dc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.5.0] - 2026-01-23 + +### ✨ Added +- **鼠标轨迹** + - 增加三种鼠标轨迹选择(使用项目维护的、使用 Camoufox 内置、不适用拟人轨迹) + +### 🐛 Fixed +- **Token 留空问题** + - 修复 WebUI 留空Token后无法重启的问题(允许 Token 留空) + +### ❌ Removed +- **热门模型ID** + - 竞技场删除了 gemini-3-pro-image-preview-2k,因此项目同步删除 + ## [3.4.9] - 2026-01-22 ### 🔄 Changed diff --git a/config.example.yaml b/config.example.yaml index 53c5866..564b95a 100644 --- a/config.example.yaml +++ b/config.example.yaml @@ -4,7 +4,7 @@ logLevel: info server: # 监听端口 port: 3000 - # 鉴权 API Token (可使用 npm run genkey 生成) + # 鉴权 API Token 至少为 10 个字符 (可使用 npm run genkey 生成) # 该配置会对 API 接口和 WebUI 生效 auth: sk-change-me-to-your-secure-key # 流式请求心跳设置 (自动对 stream: true 的请求发送心跳防止超时) @@ -64,9 +64,16 @@ backend: # gemini (Google Gemini 图片、视频生成) # gemini_text (Google Gemini 文本生成) # zai_is (zAI 图片生成) + # zai_is_text (zAI 文本生成) # nanobananafree_ai (NanoBananaFree 图片生成) # zenmux_ai_text (ZenMux 文本生成) # chatgpt (ChatGPT 图片生成) + # chatgpt_text (ChatGPT 文本生成) + # sora (Sora 视频生成) + # deepseek_text (DeepSeek 文本生成) + # doubao (豆包 图片生成) + # doubao_text (豆包 文本生成) + # test (浏览器检测,仅供调试使用) type: lmarena # 适配器类型 # ------------------------------------------------ @@ -150,6 +157,12 @@ browser: # 是否启用无头模式 headless: false + # 拟人鼠标轨迹模式 + # - false: 禁用拟人轨迹,使用 Playwright 原生点击(性能最好,但会被自动化检测) + # - true: 使用项目优化的 ghost-cursor(更拟人化,如不会点击正中心,但性能稍差) + # - "camou": 使用 Camoufox 内置轨迹(性能与拟人化的平衡) + humanizeCursor: true + # 站点隔离 (fission.autostart) # 开启保持 Firefox 默认开启状态 # 关闭此项可显著降低内存占用,防止低配服务器崩溃 @@ -163,7 +176,7 @@ browser: # 禁用网页动画 # 作用:移除 transition 和 animation # 收益:显著降低 CPU 持续占用 - # 风险:极低。几乎不影响浏览器指纹 + # 风险:低。几乎不影响浏览器指纹,但可能导致部分网页布局异常 animation: false # 禁用滤镜和阴影 diff --git a/src/backend/adapter/lmarena.js b/src/backend/adapter/lmarena.js index 842b192..514c270 100644 --- a/src/backend/adapter/lmarena.js +++ b/src/backend/adapter/lmarena.js @@ -59,7 +59,7 @@ async function generate(context, prompt, imgPaths, modelId, meta = {}) { await gotoWithCheck(page, TARGET_URL); // 1. 等待输入框加载 - await waitForInput(page, textareaSelector, { click: false }); + await waitForInput(page, textareaSelector, { click: true }); // 2. 选择模型 if (modelId) { @@ -81,13 +81,22 @@ async function generate(context, prompt, imgPaths, modelId, meta = {}) { document.execCommand('insertText', false, text); }, searchText); - // 等待下拉选项出现后再按回车 + // 等待过滤完成:第一个选项包含目标模型的主 ID + // searchText 可能是 codeName(含括号说明),但过滤后的选项应该包含 modelId try { - await page.waitForSelector('[role="option"]', { timeout: 5000 }); + await page.waitForFunction( + (targetId) => { + const firstOption = document.querySelector('[role="option"]'); + return firstOption && firstOption.textContent?.includes(targetId); + }, + modelId, + { timeout: 5000 } + ); } catch { - // 超时也继续,可能选项已经存在 + // 超时也继续,可能列表结构不同 + logger.debug('适配器', `等待模型选项过滤超时,继续执行`, meta); } - await sleep(200, 300); + await sleep(300, 500); await page.keyboard.press('Enter'); } @@ -196,7 +205,6 @@ export const manifest = { // 模型列表 models: [ - { id: 'gemini-3-pro-image-preview-2k', imagePolicy: 'optional' }, { id: 'gemini-3-pro-image-preview', codeName: 'gemini-3-pro-image-preview (nano-banana-pro)', imagePolicy: 'optional' }, { id: 'hunyuan-image-3.0', imagePolicy: 'forbidden' }, { id: 'vidu-q2-image', imagePolicy: 'optional' }, diff --git a/src/backend/adapter/lmarena_text.js b/src/backend/adapter/lmarena_text.js index a4841e9..1deac2d 100644 --- a/src/backend/adapter/lmarena_text.js +++ b/src/backend/adapter/lmarena_text.js @@ -65,13 +65,22 @@ async function generate(context, prompt, imgPaths, modelId, meta = {}) { document.execCommand('insertText', false, text); }, searchText); - // 等待下拉选项出现后再按回车 + // 等待过滤完成:第一个选项包含目标模型的主 ID + // searchText 可能是 codeName(含括号说明),但过滤后的选项应该包含 modelId try { - await page.waitForSelector('[role="option"]', { timeout: 5000 }); + await page.waitForFunction( + (targetId) => { + const firstOption = document.querySelector('[role="option"]'); + return firstOption && firstOption.textContent?.includes(targetId); + }, + modelId, + { timeout: 5000 } + ); } catch { - // 超时也继续,可能选项已经存在 + // 超时也继续,可能列表结构不同 + logger.debug('适配器', `等待模型选项过滤超时,继续执行`, meta); } - await sleep(200, 300); + await sleep(300, 500); await page.keyboard.press('Enter'); } diff --git a/src/backend/engine/launcher.js b/src/backend/engine/launcher.js index a663470..3dc02f8 100644 --- a/src/backend/engine/launcher.js +++ b/src/backend/engine/launcher.js @@ -295,6 +295,7 @@ export async function initBrowserBase(config, options = {}) { block_webrtc: true, exclude_addons: ['UBO'], geoip: true, + humanize: browserConfig.humanizeCursor === 'camou', config: { forceScopeAccess: true, // Canvas 抗指纹:注入固定噪点偏移 diff --git a/src/backend/engine/utils.js b/src/backend/engine/utils.js index 7e98510..298c76d 100644 --- a/src/backend/engine/utils.js +++ b/src/backend/engine/utils.js @@ -229,6 +229,9 @@ export async function safeClick(page, target, options = {}) { const timeout = options.timeout || TIMEOUTS.ELEMENT_CLICK; const waitStable = options.waitStable !== false; // 默认 true const selector = typeof target === 'string' ? target : '元素'; + // humanizeCursorMode: false=禁用, true=ghost-cursor, "camou"=Camoufox内置 + // 只有 true 时才使用 ghost-cursor,其他情况都使用原生点击 + const useGhostCursor = page?._humanizeCursorMode === true && page?.cursor; const doClick = async () => { let el; @@ -260,9 +263,8 @@ export async function safeClick(page, target, options = {}) { await waitForElementStable(el); logger.debug('浏览器', `[safeClick] 元素已稳定`); } - - // 使用 ghost-cursor 点击 - if (page.cursor) { + // 使用自维护 ghost-cursor 拟人鼠标轨迹 (仅当 humanizeCursor=true) + if (useGhostCursor) { const box = await el.boundingBox(); logger.debug('浏览器', `[safeClick] boundingBox: ${JSON.stringify(box)}`); if (box) { @@ -279,9 +281,11 @@ export async function safeClick(page, target, options = {}) { return; } - // 降级逻辑 - logger.debug('浏览器', `[safeClick] 无 cursor,使用原生 click`); - await el.click({ clickCount }); + // 使用原生点击 (humanizeCursor=false 或 "camou") + const mode = page?._humanizeCursorMode; + logger.debug('浏览器', `[safeClick] humanizeCursor=${mode} 使用原生点击`); + // force: true 跳过可操作性检查(遮挡检测等),避免在复杂页面卡住 + await el.click({ clickCount, force: true }); }; // 带超时的执行(移除了重试机制) @@ -673,8 +677,18 @@ export async function uploadFilesViaChooser(page, triggerTarget, filePaths, opti const clickCount = clickAction === 'dblclick' ? 2 : 1; await safeClick(page, triggerTarget, { bias: 'button', clickCount }); - // 等待 filechooser 事件并设置文件 - const fileChooser = await fileChooserPromise; + // 等待 filechooser 事件并设置文件(带异常保护) + let fileChooser; + try { + fileChooser = await fileChooserPromise; + } catch (e) { + // filechooser 超时通常意味着点击没有触发文件选择器 + // 抛出可识别的错误让上层决定是否重试 + const error = new Error(`文件选择器等待超时: ${e.message}`); + error.code = 'UPLOAD_FILECHOOSER_TIMEOUT'; + throw error; + } + await fileChooser.setFiles(filePaths); logger.debug('浏览器', '已通过 filechooser 提交文件'); diff --git a/src/backend/pool/Worker.js b/src/backend/pool/Worker.js index 419b49e..b7dfe69 100644 --- a/src/backend/pool/Worker.js +++ b/src/backend/pool/Worker.js @@ -116,7 +116,12 @@ export class Worker { this.browser = sharedBrowser; this.page = await sharedBrowser.newPage(); this.page.authState = { isHandlingAuth: false }; - this.page.cursor = createCursor(this.page); + const humanizeCursorMode = this.globalConfig?.browser?.humanizeCursor; + this.page._humanizeCursorMode = humanizeCursorMode; + // true 表示使用项目维护的 ghost-cursor + if (humanizeCursorMode === true) { + this.page.cursor = createCursor(this.page); + } // 保存参数用于重新初始化 this._targetUrl = targetUrl; @@ -165,7 +170,11 @@ export class Worker { async _recreatePage() { this.page = await this.browser.newPage(); this.page.authState = { isHandlingAuth: false }; - this.page.cursor = createCursor(this.page); + const humanizeCursorMode = this.globalConfig?.browser?.humanizeCursor; + this.page._humanizeCursorMode = humanizeCursorMode; + if (humanizeCursorMode === true) { + this.page.cursor = createCursor(this.page); + } await this._navigateToTarget(this._targetUrl || 'about:blank'); if (this._navigationHandler) { @@ -195,7 +204,11 @@ export class Worker { this.browser = base.context; this.page = base.page; this.page.authState = { isHandlingAuth: false }; - this.page.cursor = createCursor(this.page); + const humanizeCursorMode = this.globalConfig?.browser?.humanizeCursor; + this.page._humanizeCursorMode = humanizeCursorMode; + if (humanizeCursorMode === true) { + this.page.cursor = createCursor(this.page); + } if (navigationHandler) { this.page.on('framenavigated', async () => { @@ -244,7 +257,11 @@ export class Worker { sharedWorker.browser = this.browser; sharedWorker.page = await this.browser.newPage(); sharedWorker.page.authState = { isHandlingAuth: false }; - sharedWorker.page.cursor = createCursor(sharedWorker.page); + const sharedCursorMode = this.globalConfig?.browser?.humanizeCursor; + sharedWorker.page._humanizeCursorMode = sharedCursorMode; + if (sharedCursorMode === true) { + sharedWorker.page.cursor = createCursor(sharedWorker.page); + } await sharedWorker._navigateToTarget(sharedWorker._targetUrl || 'about:blank'); sharedWorker._registerPageCloseHandler(); // 重新注册标签页关闭处理器 sharedWorker.initialized = true; diff --git a/src/config/index.js b/src/config/index.js index d698c3c..09f016a 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -231,11 +231,14 @@ export function loadConfig() { if (typeof port !== 'number' || !Number.isInteger(port) || port < 1 || port > 65535) { throw new Error(`server.port 必须是 1-65535 范围内的整数,当前值: ${port}`); } + // Auth Token 校验:允许留空,但输出安全警告 if (!config.server.auth) { - throw new Error('配置文件缺少必需字段: server.auth'); - } - if (typeof config.server.auth !== 'string' || config.server.auth.length < 10) { - throw new Error('server.auth 必须是至少 10 个字符的字符串 (建议使用 npm run genkey 生成)'); + logger.warn('配置器', 'server.auth 未配置!API 和 WebUI 将无需认证即可访问!'); + logger.warn('配置器', '请勿在公网环境中留空 auth,建议使用 npm run genkey 生成密钥'); + } else if (config.server.auth === 'sk-change-me-to-your-secure-key') { + logger.warn('配置器', '检测到默认密钥!请勿在公网环境中使用默认密钥'); + } else if (typeof config.server.auth !== 'string' || config.server.auth.length < 10) { + logger.warn('配置器', 'server.auth 长度少于 10 个字符,安全性较低,建议使用 npm run genkey 生成密钥'); } // 设置 keepalive 配置默认值 @@ -249,6 +252,12 @@ export function loadConfig() { } } + // 设置 browser 配置默认值 + if (!config.browser) config.browser = {}; + if (config.browser.humanizeCursor === undefined) { + config.browser.humanizeCursor = true; + } + // 设置 Pool 配置默认值 if (!config.backend) config.backend = {}; if (!config.backend.pool) config.backend.pool = {}; diff --git a/src/config/manager.js b/src/config/manager.js index 3339d54..f563eba 100644 --- a/src/config/manager.js +++ b/src/config/manager.js @@ -83,6 +83,7 @@ export function getBrowserConfig() { path: browser.path || '', headless: browser.headless || false, fission: browser.fission !== false, // 默认 true + humanizeCursor: browser.humanizeCursor ?? true, // false | true | 'camou' cssInject: { animation: cssInject.animation || false, filter: cssInject.filter || false, @@ -112,6 +113,7 @@ export function saveBrowserConfig(data) { if (data.path !== undefined) config.browser.path = data.path; if (data.headless !== undefined) config.browser.headless = data.headless; if (data.fission !== undefined) config.browser.fission = data.fission; + if (data.humanizeCursor !== undefined) config.browser.humanizeCursor = data.humanizeCursor; // CSS 性能优化配置 if (data.cssInject) { diff --git a/src/config/validator.js b/src/config/validator.js index 4c16ebd..55c395c 100644 --- a/src/config/validator.js +++ b/src/config/validator.js @@ -22,12 +22,12 @@ export function validateServerConfig(data) { } } - // Auth Token 校验 + // Auth Token 校验:允许留空,但非空时必须至少 10 个字符 if (data.authToken !== undefined) { if (typeof data.authToken !== 'string') { errors.push('authToken 必须是字符串'); - } else if (data.authToken.length < 10) { - errors.push('authToken 必须至少 10 个字符'); + } else if (data.authToken.length > 0 && data.authToken.length < 10) { + errors.push('authToken 如果设置则必须至少 10 个字符,或留空'); } } diff --git a/src/server/middlewares/auth.js b/src/server/middlewares/auth.js index 4094522..62ee50f 100644 --- a/src/server/middlewares/auth.js +++ b/src/server/middlewares/auth.js @@ -30,6 +30,10 @@ export function createAuthMiddleware(authToken) { * @returns {boolean} 是否通过鉴权 */ return function authMiddleware(req, res) { + // 如果 authToken 为空,跳过认证(允许所有请求) + if (!authToken) { + return true; + } if (!checkAuth(req, authToken)) { sendApiError(res, { code: ERROR_CODES.UNAUTHORIZED }); return false; diff --git a/src/server/server.js b/src/server/server.js index 9f578f4..630c9c1 100644 --- a/src/server/server.js +++ b/src/server/server.js @@ -58,11 +58,6 @@ const PORT = config.server?.port || 3000; /** @type {string} 认证令牌 */ const AUTH_TOKEN = config.server?.auth; -// 检测默认密钥 -if (AUTH_TOKEN === 'sk-change-me-to-your-secure-key') { - logger.warn('服务器', '检测到默认密钥!如果在公网环境下请修改默认密钥'); -} - /** @type {string} 心跳模式 */ const KEEPALIVE_MODE = config.server?.keepalive?.mode || 'comment'; diff --git a/webui/dist/assets/DesktopOutlined-uy4U7g8U.js b/webui/dist/assets/DesktopOutlined-uy4U7g8U.js deleted file mode 100644 index 66a8798..0000000 --- a/webui/dist/assets/DesktopOutlined-uy4U7g8U.js +++ /dev/null @@ -1 +0,0 @@ -import{c as i,I as u}from"./index-BgSomuu7.js";var l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 140H96c-17.7 0-32 14.3-32 32v496c0 17.7 14.3 32 32 32h380v112H304c-8.8 0-16 7.2-16 16v48c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-48c0-8.8-7.2-16-16-16H548V700h380c17.7 0 32-14.3 32-32V172c0-17.7-14.3-32-32-32zm-40 488H136V212h752v416z"}}]},name:"desktop",theme:"outlined"};function c(r){for(var t=1;t{await Promise.all([a.fetchAdaptersMeta(),a.fetchAdapterConfig()])});const U=K(()=>a.adaptersMeta),j=i=>{const t=n.list.includes(i);return n.mode==="whitelist"?t:!t},H=(i,t)=>{const c=n.list.indexOf(i);n.mode==="whitelist"?t&&c===-1?n.list.push(i):!t&&c!==-1&&n.list.splice(c,1):!t&&c===-1?n.list.push(i):t&&c!==-1&&n.list.splice(c,1)},E=i=>{i!==n.mode&&(n.mode=i,n.list=[])},F=i=>{o.value=i;const t=a.adapterConfig[i.id]||{};Object.keys(s).forEach(m=>delete s[m]),i.configSchema&&i.configSchema.forEach(m=>{t[m.key]!==void 0?s[m.key]=t[m.key]:s[m.key]=m.default});const c=i.modelFilter||{mode:"blacklist",list:[]};n.mode=c.mode||"blacklist",n.list=[...c.list||[]],d.value=!0},P=async()=>{if(!o.value)return;const i={[o.value.id]:{...s,modelFilter:{mode:n.mode,list:[...n.list]}}};if(await a.saveAdapterConfig(i)){const c=a.adaptersMeta.find(m=>m.id===o.value.id);c&&(c.modelFilter={mode:n.mode,list:[...n.list]}),d.value=!1}};return(i,t)=>{const c=r("a-button"),m=r("a-card"),B=r("a-list-item"),N=r("a-list"),S=r("a-radio"),$=r("a-radio-group"),C=r("a-switch"),q=r("a-collapse-panel"),D=r("a-collapse"),L=r("a-empty"),T=r("a-input"),G=r("a-input-number"),J=r("a-select"),Q=r("a-form-item"),R=r("a-form"),W=r("a-drawer"),X=r("a-layout");return u(),y(X,{style:{background:"transparent"}},{default:l(()=>[p(m,{title:"适配器管理",bordered:!1},{extra:l(()=>[p(c,{type:"link",onClick:b(a).fetchAdaptersMeta},{default:l(()=>[...t[3]||(t[3]=[x("刷新列表",-1)])]),_:1},8,["onClick"])]),default:l(()=>[p(N,{grid:{gutter:16,xs:1,sm:2,md:3,lg:3,xl:4,xxl:4},"data-source":U.value},{renderItem:l(({item:e})=>[p(B,null,{default:l(()=>[p(m,{hoverable:"",onClick:f=>F(e),bodyStyle:{padding:"12px 16px"}},{default:l(()=>[g("div",ne,[g("div",ae,[p(b(w),{style:{"font-size":"18px",color:"#1890ff","margin-right":"8px","flex-shrink":"0"}}),g("span",se,k(e.id),1)]),p(b(ee),{style:{"font-size":"16px",color:"#8c8c8c","flex-shrink":"0"}})])]),_:2},1032,["onClick"])]),_:2},1024)]),_:1},8,["data-source"])]),_:1}),o.value?(u(),y(W,{key:0,open:d.value,"onUpdate:open":t[2]||(t[2]=e=>d.value=e),title:`配置适配器 - ${o.value.id}`,width:"500",placement:"right"},{footer:l(()=>[g("div",_e,[p(c,{style:{"margin-right":"8px"},onClick:t[1]||(t[1]=e=>d.value=!1)},{default:l(()=>[...t[7]||(t[7]=[x("取消",-1)])]),_:1}),p(c,{type:"primary",onClick:P},{default:l(()=>[...t[8]||(t[8]=[x("保存配置",-1)])]),_:1})])]),default:l(()=>[o.value.description?(u(),h("div",le,k(o.value.description),1)):_("",!0),o.value.models&&o.value.models.length>0?(u(),y(D,{key:1,style:{"margin-bottom":"16px"}},{default:l(()=>[p(q,{key:"models",header:"模型管理"},{default:l(()=>[g("div",ie,[t[6]||(t[6]=g("span",{style:{"margin-right":"12px",color:"#666"}},"过滤模式:",-1)),p($,{value:n.mode,onChange:t[0]||(t[0]=e=>E(e.target.value))},{default:l(()=>[p(S,{value:"blacklist"},{default:l(()=>[...t[4]||(t[4]=[x("黑名单",-1)])]),_:1}),p(S,{value:"whitelist"},{default:l(()=>[...t[5]||(t[5]=[x("白名单",-1)])]),_:1})]),_:1},8,["value"])]),g("div",re,k(n.mode==="blacklist"?"关闭的模型将被禁用,其他模型可用":"仅开启的模型可用,其他模型禁用"),1),g("div",ce,[(u(!0),h(A,null,V(o.value.models,e=>(u(),h("div",{key:e,style:{display:"flex","align-items":"center","justify-content":"space-between",padding:"8px 0","border-bottom":"1px solid #f0f0f0"}},[g("span",ue,k(e),1),p(C,{checked:j(e),onChange:f=>H(e,f),size:"small"},null,8,["checked","onChange"])]))),128))])]),_:1})]),_:1})):_("",!0),!o.value.configSchema||o.value.configSchema.length===0?(u(),h("div",pe,[!o.value.models||o.value.models.length===0?(u(),y(L,{key:0,description:"该适配器没有可配置项"})):_("",!0)])):_("",!0),o.value.configSchema&&o.value.configSchema.length>0?(u(),y(R,{key:3,layout:"vertical"},{default:l(()=>[(u(!0),h(A,null,V(o.value.configSchema,e=>(u(),y(Q,{key:e.key,label:e.label,required:e.required},{default:l(()=>[e.type==="string"?(u(),y(T,{key:0,value:s[e.key],"onUpdate:value":f=>s[e.key]=f,placeholder:e.placeholder},null,8,["value","onUpdate:value","placeholder"])):_("",!0),e.type==="number"?(u(),y(G,{key:1,value:s[e.key],"onUpdate:value":f=>s[e.key]=f,min:e.min,max:e.max,style:{width:"100%"}},null,8,["value","onUpdate:value","min","max"])):_("",!0),e.type==="boolean"?(u(),h("div",de,[p(C,{checked:s[e.key],"onUpdate:checked":f=>s[e.key]=f},null,8,["checked","onUpdate:checked"])])):_("",!0),e.type==="select"?(u(),y(J,{key:3,value:s[e.key],"onUpdate:value":f=>s[e.key]=f,options:e.options},null,8,["value","onUpdate:value","options"])):_("",!0),e.note?(u(),h("div",me,k(e.note),1)):_("",!0)]),_:2},1032,["label","required"]))),128))]),_:1})):_("",!0)]),_:1},8,["open","title"])):_("",!0)]),_:1})}}};export{ve as default}; diff --git a/webui/dist/assets/adapters.js b/webui/dist/assets/adapters.js new file mode 100644 index 0000000..79b1887 --- /dev/null +++ b/webui/dist/assets/adapters.js @@ -0,0 +1 @@ +import{c as p,I as Y,k as Z,r as z,l as O,o as I,n as K,b as y,d as u,w as l,e as _,f as r,g,u as b,t as k,S as ee,h as x,j as h,p as V,F as A}from"./index.js";var te={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"};function M(v){for(var a=1;a{await Promise.all([a.fetchAdaptersMeta(),a.fetchAdapterConfig()])});const U=K(()=>a.adaptersMeta),j=i=>{const t=n.list.includes(i);return n.mode==="whitelist"?t:!t},H=(i,t)=>{const c=n.list.indexOf(i);n.mode==="whitelist"?t&&c===-1?n.list.push(i):!t&&c!==-1&&n.list.splice(c,1):!t&&c===-1?n.list.push(i):t&&c!==-1&&n.list.splice(c,1)},E=i=>{i!==n.mode&&(n.mode=i,n.list=[])},F=i=>{o.value=i;const t=a.adapterConfig[i.id]||{};Object.keys(s).forEach(m=>delete s[m]),i.configSchema&&i.configSchema.forEach(m=>{t[m.key]!==void 0?s[m.key]=t[m.key]:s[m.key]=m.default});const c=i.modelFilter||{mode:"blacklist",list:[]};n.mode=c.mode||"blacklist",n.list=[...c.list||[]],d.value=!0},P=async()=>{if(!o.value)return;const i={[o.value.id]:{...s,modelFilter:{mode:n.mode,list:[...n.list]}}};if(await a.saveAdapterConfig(i)){const c=a.adaptersMeta.find(m=>m.id===o.value.id);c&&(c.modelFilter={mode:n.mode,list:[...n.list]}),d.value=!1}};return(i,t)=>{const c=r("a-button"),m=r("a-card"),B=r("a-list-item"),N=r("a-list"),S=r("a-radio"),$=r("a-radio-group"),C=r("a-switch"),q=r("a-collapse-panel"),D=r("a-collapse"),L=r("a-empty"),T=r("a-input"),G=r("a-input-number"),J=r("a-select"),Q=r("a-form-item"),R=r("a-form"),W=r("a-drawer"),X=r("a-layout");return u(),y(X,{style:{background:"transparent"}},{default:l(()=>[p(m,{title:"适配器管理",bordered:!1},{extra:l(()=>[p(c,{type:"link",onClick:b(a).fetchAdaptersMeta},{default:l(()=>[...t[3]||(t[3]=[x("刷新列表",-1)])]),_:1},8,["onClick"])]),default:l(()=>[p(N,{grid:{gutter:16,xs:1,sm:2,md:3,lg:3,xl:4,xxl:4},"data-source":U.value},{renderItem:l(({item:e})=>[p(B,null,{default:l(()=>[p(m,{hoverable:"",onClick:f=>F(e),bodyStyle:{padding:"12px 16px"}},{default:l(()=>[g("div",ne,[g("div",ae,[p(b(w),{style:{"font-size":"18px",color:"#1890ff","margin-right":"8px","flex-shrink":"0"}}),g("span",se,k(e.id),1)]),p(b(ee),{style:{"font-size":"16px",color:"#8c8c8c","flex-shrink":"0"}})])]),_:2},1032,["onClick"])]),_:2},1024)]),_:1},8,["data-source"])]),_:1}),o.value?(u(),y(W,{key:0,open:d.value,"onUpdate:open":t[2]||(t[2]=e=>d.value=e),title:`配置适配器 - ${o.value.id}`,width:"500",placement:"right"},{footer:l(()=>[g("div",_e,[p(c,{style:{"margin-right":"8px"},onClick:t[1]||(t[1]=e=>d.value=!1)},{default:l(()=>[...t[7]||(t[7]=[x("取消",-1)])]),_:1}),p(c,{type:"primary",onClick:P},{default:l(()=>[...t[8]||(t[8]=[x("保存配置",-1)])]),_:1})])]),default:l(()=>[o.value.description?(u(),h("div",le,k(o.value.description),1)):_("",!0),o.value.models&&o.value.models.length>0?(u(),y(D,{key:1,style:{"margin-bottom":"16px"}},{default:l(()=>[p(q,{key:"models",header:"模型管理"},{default:l(()=>[g("div",ie,[t[6]||(t[6]=g("span",{style:{"margin-right":"12px",color:"#666"}},"过滤模式:",-1)),p($,{value:n.mode,onChange:t[0]||(t[0]=e=>E(e.target.value))},{default:l(()=>[p(S,{value:"blacklist"},{default:l(()=>[...t[4]||(t[4]=[x("黑名单",-1)])]),_:1}),p(S,{value:"whitelist"},{default:l(()=>[...t[5]||(t[5]=[x("白名单",-1)])]),_:1})]),_:1},8,["value"])]),g("div",re,k(n.mode==="blacklist"?"关闭的模型将被禁用,其他模型可用":"仅开启的模型可用,其他模型禁用"),1),g("div",ce,[(u(!0),h(A,null,V(o.value.models,e=>(u(),h("div",{key:e,style:{display:"flex","align-items":"center","justify-content":"space-between",padding:"8px 0","border-bottom":"1px solid #f0f0f0"}},[g("span",ue,k(e),1),p(C,{checked:j(e),onChange:f=>H(e,f),size:"small"},null,8,["checked","onChange"])]))),128))])]),_:1})]),_:1})):_("",!0),!o.value.configSchema||o.value.configSchema.length===0?(u(),h("div",pe,[!o.value.models||o.value.models.length===0?(u(),y(L,{key:0,description:"该适配器没有可配置项"})):_("",!0)])):_("",!0),o.value.configSchema&&o.value.configSchema.length>0?(u(),y(R,{key:3,layout:"vertical"},{default:l(()=>[(u(!0),h(A,null,V(o.value.configSchema,e=>(u(),y(Q,{key:e.key,label:e.label,required:e.required},{default:l(()=>[e.type==="string"?(u(),y(T,{key:0,value:s[e.key],"onUpdate:value":f=>s[e.key]=f,placeholder:e.placeholder},null,8,["value","onUpdate:value","placeholder"])):_("",!0),e.type==="number"?(u(),y(G,{key:1,value:s[e.key],"onUpdate:value":f=>s[e.key]=f,min:e.min,max:e.max,style:{width:"100%"}},null,8,["value","onUpdate:value","min","max"])):_("",!0),e.type==="boolean"?(u(),h("div",de,[p(C,{checked:s[e.key],"onUpdate:checked":f=>s[e.key]=f},null,8,["checked","onUpdate:checked"])])):_("",!0),e.type==="select"?(u(),y(J,{key:3,value:s[e.key],"onUpdate:value":f=>s[e.key]=f,options:e.options},null,8,["value","onUpdate:value","options"])):_("",!0),e.note?(u(),h("div",me,k(e.note),1)):_("",!0)]),_:2},1032,["label","required"]))),128))]),_:1})):_("",!0)]),_:1},8,["open","title"])):_("",!0)]),_:1})}}};export{ve as default}; diff --git a/webui/dist/assets/browser-BaEoZVA4.js b/webui/dist/assets/browser-BaEoZVA4.js deleted file mode 100644 index 691cb05..0000000 --- a/webui/dist/assets/browser-BaEoZVA4.js +++ /dev/null @@ -1 +0,0 @@ -import{k as E,l as z,o as S,b as c,d as x,w as l,c as s,g as e,f as a,h as r,t as y,j as w,e as m}from"./index-BgSomuu7.js";const T={style:{"margin-bottom":"8px"}},B={style:{"margin-bottom":"8px"}},H={style:{"margin-left":"8px"}},I={style:{"margin-bottom":"8px"}},N={style:{"margin-left":"8px"}},V={style:{"margin-top":"16px"}},D={style:{"margin-bottom":"16px"}},G={style:{"margin-left":"8px"}},K={key:0,style:{"margin-bottom":"16px"}},L={style:{"margin-bottom":"16px"}},M={style:{"margin-bottom":"16px"}},O={key:2,style:{"margin-bottom":"16px"}},W={style:{"margin-left":"8px"}},X={style:{"margin-bottom":"16px"}},q={style:{"margin-bottom":"16px"}},J={style:{"margin-bottom":"16px",padding:"12px",background:"#fafafa","border-radius":"6px"}},Q={style:{display:"flex","align-items":"center","justify-content":"space-between"}},R={style:{"margin-bottom":"16px",padding:"12px",background:"#fafafa","border-radius":"6px"}},Y={style:{display:"flex","align-items":"center","justify-content":"space-between"}},Z={style:{padding:"12px",background:"#fff2f0","border-radius":"6px",border:"1px solid #ffccc7"}},$={style:{display:"flex","align-items":"center","justify-content":"space-between"}},tt={style:{display:"flex","justify-content":"flex-end","margin-top":"24px"}},st={__name:"browser",setup(ot){const f=E(),o=z({path:"",headless:!1,fission:!0,cssAnimation:!1,cssFilter:!1,cssFont:!1,proxyEnable:!1,proxyType:"http",proxyHost:"127.0.0.1",proxyPort:7890,proxyAuth:!1,proxyUser:"",proxyPasswd:""});S(async()=>{await f.fetchBrowserConfig();const i=f.browserConfig||{};o.path=i.path||"",o.headless=i.headless||!1,o.fission=i.fission!==!1,i.cssInject&&(o.cssAnimation=i.cssInject.animation||!1,o.cssFilter=i.cssInject.filter||!1,o.cssFont=i.cssInject.font||!1),i.proxy&&(o.proxyEnable=i.proxy.enable||!1,o.proxyType=i.proxy.type||"http",o.proxyHost=i.proxy.host||"",o.proxyPort=i.proxy.port||7890,o.proxyAuth=i.proxy.auth||!1,o.proxyUser=i.proxy.username||"",o.proxyPasswd=i.proxy.password||"")});const _=async()=>{const i={path:o.path,headless:o.headless,cssInject:{animation:o.cssAnimation,filter:o.cssFilter,font:o.cssFont},fission:o.fission,proxy:{enable:o.proxyEnable,type:o.proxyType,host:o.proxyHost,port:o.proxyPort,auth:o.proxyAuth,username:o.proxyUser,password:o.proxyPasswd}};await f.saveBrowserConfig(i)};return(i,t)=>{const u=a("a-input"),p=a("a-col"),d=a("a-switch"),g=a("a-row"),k=a("a-segmented"),h=a("a-input-number"),U=a("a-input-password"),v=a("a-collapse-panel"),P=a("a-alert"),b=a("a-tag"),C=a("a-collapse"),A=a("a-button"),F=a("a-card"),j=a("a-layout");return x(),c(j,{style:{background:"transparent"}},{default:l(()=>[s(F,{title:"浏览器设置",bordered:!1,style:{width:"100%"}},{default:l(()=>[s(g,{gutter:[16,16]},{default:l(()=>[s(p,{xs:24,md:24},{default:l(()=>[e("div",T,[t[13]||(t[13]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"浏览器可执行文件路径",-1)),t[14]||(t[14]=e("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}},[r(" 留空则使用 Camoufox 默认下载路径"),e("br"),r(" Windows示例: C:\\camoufox\\camoufox.exe"),e("br"),r(" Linux示例: /opt/camoufox/camoufox ")],-1)),s(u,{value:o.path,"onUpdate:value":t[0]||(t[0]=n=>o.path=n),placeholder:"留空使用默认路径"},null,8,["value"])])]),_:1}),s(p,{xs:24,md:12},{default:l(()=>[e("div",B,[t[15]||(t[15]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"无头模式",-1)),t[16]||(t[16]=e("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}},[r(" 启用后浏览器无界面化运行"),e("br"),r(" 登录模式和 Xvfb 模式会无视该设置强行禁用无头模式 ")],-1)),s(d,{checked:o.headless,"onUpdate:checked":t[1]||(t[1]=n=>o.headless=n)},null,8,["checked"]),e("span",H,y(o.headless?"已启用":"未启用"),1)])]),_:1}),s(p,{xs:24,md:12},{default:l(()=>[e("div",I,[t[17]||(t[17]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"站点隔离 (fission.autostart)",-1)),t[18]||(t[18]=e("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}},[r(" 关闭可低内存占用,适合低配服务器"),e("br"),r(" 正常 FireFox 用户是默认开启的,请酌情关闭"),e("br"),e("span",{style:{color:"#faad14"}},"⚠️ 反爬检测可能通过检测单进程或者跨进程延迟来识别自动化特征")],-1)),s(d,{checked:o.fission,"onUpdate:checked":t[2]||(t[2]=n=>o.fission=n)},null,8,["checked"]),e("span",N,y(o.fission?"已启用":"已关闭 (省内存)"),1)])]),_:1})]),_:1}),e("div",V,[s(C,null,{default:l(()=>[s(v,{key:"proxy",header:"全局代理设置"},{default:l(()=>[t[25]||(t[25]=e("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"16px"}}," 如果实例没有独立配置代理,将使用此全局代理配置 ",-1)),e("div",D,[s(d,{checked:o.proxyEnable,"onUpdate:checked":t[3]||(t[3]=n=>o.proxyEnable=n)},null,8,["checked"]),e("span",G,y(o.proxyEnable?"已启用全局代理":"未启用全局代理"),1)]),o.proxyEnable?(x(),w("div",K,[t[19]||(t[19]=e("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"代理类型",-1)),s(k,{value:o.proxyType,"onUpdate:value":t[4]||(t[4]=n=>o.proxyType=n),block:"",options:[{label:"HTTP",value:"http"},{label:"SOCKS5",value:"socks5"}]},null,8,["value"])])):m("",!0),o.proxyEnable?(x(),c(g,{key:1,gutter:16},{default:l(()=>[s(p,{xs:24,md:12},{default:l(()=>[e("div",L,[t[20]||(t[20]=e("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"代理主机",-1)),s(u,{value:o.proxyHost,"onUpdate:value":t[5]||(t[5]=n=>o.proxyHost=n),placeholder:"例如: 127.0.0.1"},null,8,["value"])])]),_:1}),s(p,{xs:24,md:12},{default:l(()=>[e("div",M,[t[21]||(t[21]=e("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"代理端口",-1)),s(h,{value:o.proxyPort,"onUpdate:value":t[6]||(t[6]=n=>o.proxyPort=n),min:1,max:65535,style:{width:"100%"},placeholder:"例如: 7890"},null,8,["value"])])]),_:1})]),_:1})):m("",!0),o.proxyEnable?(x(),w("div",O,[t[22]||(t[22]=e("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"代理认证",-1)),s(d,{checked:o.proxyAuth,"onUpdate:checked":t[7]||(t[7]=n=>o.proxyAuth=n)},null,8,["checked"]),e("span",W,y(o.proxyAuth?"需要认证":"无需认证"),1)])):m("",!0),o.proxyEnable&&o.proxyAuth?(x(),c(g,{key:3,gutter:16},{default:l(()=>[s(p,{xs:24,md:12},{default:l(()=>[e("div",X,[t[23]||(t[23]=e("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"用户名",-1)),s(u,{value:o.proxyUser,"onUpdate:value":t[8]||(t[8]=n=>o.proxyUser=n),placeholder:"请输入用户名"},null,8,["value"])])]),_:1}),s(p,{xs:24,md:12},{default:l(()=>[e("div",q,[t[24]||(t[24]=e("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"密码",-1)),s(U,{value:o.proxyPasswd,"onUpdate:value":t[9]||(t[9]=n=>o.proxyPasswd=n),placeholder:"请输入密码"},null,8,["value"])])]),_:1})]),_:1})):m("",!0)]),_:1}),s(v,{key:"cssInject",header:"CSS 性能优化注入"},{default:l(()=>[s(P,{message:"⚡ 适用于无 GPU 的服务器环境,通过禁用网页特效来降低 CPU 压力",type:"info","show-icon":"",style:{"margin-bottom":"16px"}}),e("div",J,[e("div",Q,[e("div",null,[t[27]||(t[27]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"禁用网页动画",-1)),t[28]||(t[28]=e("div",{style:{"font-size":"12px",color:"#8c8c8c"}}," 移除 transition 和 animation,显著降低 CPU 持续占用 ",-1)),s(b,{color:"green",style:{"margin-top":"6px"}},{default:l(()=>[...t[26]||(t[26]=[r("风险:极低",-1)])]),_:1})]),s(d,{checked:o.cssAnimation,"onUpdate:checked":t[10]||(t[10]=n=>o.cssAnimation=n)},null,8,["checked"])])]),e("div",R,[e("div",Y,[e("div",null,[t[30]||(t[30]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"禁用滤镜和阴影",-1)),t[31]||(t[31]=e("div",{style:{"font-size":"12px",color:"#8c8c8c"}}," 移除 blur(模糊)、box-shadow(阴影) 等复杂渲染 ",-1)),s(b,{color:"orange",style:{"margin-top":"6px"}},{default:l(()=>[...t[29]||(t[29]=[r("风险:中",-1)])]),_:1}),t[32]||(t[32]=e("span",{style:{"font-size":"11px",color:"#faad14","margin-left":"8px"}}," 界面会变丑,少数反爬可能检测样式计算结果 ",-1))]),s(d,{checked:o.cssFilter,"onUpdate:checked":t[11]||(t[11]=n=>o.cssFilter=n)},null,8,["checked"])])]),e("div",Z,[e("div",$,[e("div",null,[t[34]||(t[34]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"降低字体渲染质量",-1)),t[35]||(t[35]=e("div",{style:{"font-size":"12px",color:"#8c8c8c"}}," 强制使用极速渲染模式,微量减少 CPU 绘图压力 ",-1)),s(b,{color:"red",style:{"margin-top":"6px"}},{default:l(()=>[...t[33]||(t[33]=[r("⚠️ 风险:高",-1)])]),_:1}),t[36]||(t[36]=e("div",{style:{"font-size":"11px",color:"#cf1322","margin-top":"4px"}}," 会导致文字边缘有锯齿,且可能导致字体指纹与标准浏览器不符,易被高级反爬识别 ",-1))]),s(d,{checked:o.cssFont,"onUpdate:checked":t[12]||(t[12]=n=>o.cssFont=n)},null,8,["checked"])])])]),_:1})]),_:1})]),e("div",tt,[s(A,{type:"primary",onClick:_},{default:l(()=>[...t[37]||(t[37]=[r(" 保存设置 ",-1)])]),_:1})])]),_:1})]),_:1})}}};export{st as default}; diff --git a/webui/dist/assets/browser.js b/webui/dist/assets/browser.js new file mode 100644 index 0000000..a6eb282 --- /dev/null +++ b/webui/dist/assets/browser.js @@ -0,0 +1 @@ +import{k as j,l as E,o as S,b as c,d,w as l,c as s,g as e,f as a,h as r,t as x,j as u,e as y}from"./index.js";const T={style:{"margin-bottom":"8px"}},B={style:{"margin-bottom":"8px"}},H={style:{"margin-left":"8px"}},I={style:{"margin-bottom":"8px"}},N={style:{"margin-left":"8px"}},V={style:{"margin-bottom":"8px"}},D={style:{"font-size":"11px",color:"#8c8c8c","margin-top":"6px"}},G={key:0},K={key:1},L={key:2},M={style:{"margin-top":"16px"}},O={style:{"margin-bottom":"16px"}},W={style:{"margin-left":"8px"}},X={key:0,style:{"margin-bottom":"16px"}},q={style:{"margin-bottom":"16px"}},J={style:{"margin-bottom":"16px"}},Q={key:2,style:{"margin-bottom":"16px"}},R={style:{"margin-left":"8px"}},Y={style:{"margin-bottom":"16px"}},Z={style:{"margin-bottom":"16px"}},$={style:{"margin-bottom":"16px",padding:"12px",background:"#fafafa","border-radius":"6px"}},tt={style:{display:"flex","align-items":"center","justify-content":"space-between"}},ot={style:{"margin-bottom":"16px",padding:"12px",background:"#fafafa","border-radius":"6px"}},et={style:{display:"flex","align-items":"center","justify-content":"space-between"}},st={style:{padding:"12px",background:"#fff2f0","border-radius":"6px",border:"1px solid #ffccc7"}},nt={style:{display:"flex","align-items":"center","justify-content":"space-between"}},lt={style:{display:"flex","justify-content":"flex-end","margin-top":"24px"}},rt={__name:"browser",setup(it){const f=j(),o=E({path:"",headless:!1,fission:!0,humanizeCursor:!1,cssAnimation:!1,cssFilter:!1,cssFont:!1,proxyEnable:!1,proxyType:"http",proxyHost:"127.0.0.1",proxyPort:7890,proxyAuth:!1,proxyUser:"",proxyPasswd:""});S(async()=>{await f.fetchBrowserConfig();const i=f.browserConfig||{};o.path=i.path||"",o.headless=i.headless||!1,o.fission=i.fission!==!1,o.humanizeCursor=i.humanizeCursor??!1,i.cssInject&&(o.cssAnimation=i.cssInject.animation||!1,o.cssFilter=i.cssInject.filter||!1,o.cssFont=i.cssInject.font||!1),i.proxy&&(o.proxyEnable=i.proxy.enable||!1,o.proxyType=i.proxy.type||"http",o.proxyHost=i.proxy.host||"",o.proxyPort=i.proxy.port||7890,o.proxyAuth=i.proxy.auth||!1,o.proxyUser=i.proxy.username||"",o.proxyPasswd=i.proxy.password||"")});const k=async()=>{const i={path:o.path,headless:o.headless,cssInject:{animation:o.cssAnimation,filter:o.cssFilter,font:o.cssFont},fission:o.fission,humanizeCursor:o.humanizeCursor,proxy:{enable:o.proxyEnable,type:o.proxyType,host:o.proxyHost,port:o.proxyPort,auth:o.proxyAuth,username:o.proxyUser,password:o.proxyPasswd}};await f.saveBrowserConfig(i)};return(i,t)=>{const g=a("a-input"),p=a("a-col"),m=a("a-switch"),w=a("a-segmented"),b=a("a-row"),h=a("a-input-number"),C=a("a-input-password"),_=a("a-collapse-panel"),U=a("a-alert"),v=a("a-tag"),z=a("a-collapse"),P=a("a-button"),A=a("a-card"),F=a("a-layout");return d(),c(F,{style:{background:"transparent"}},{default:l(()=>[s(A,{title:"浏览器设置",bordered:!1,style:{width:"100%"}},{default:l(()=>[s(b,{gutter:[16,16]},{default:l(()=>[s(p,{xs:24,md:24},{default:l(()=>[e("div",T,[t[14]||(t[14]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"浏览器可执行文件路径",-1)),t[15]||(t[15]=e("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}},[r(" 留空则使用 Camoufox 默认下载路径"),e("br"),r(" Windows示例: C:\\camoufox\\camoufox.exe"),e("br"),r(" Linux示例: /opt/camoufox/camoufox ")],-1)),s(g,{value:o.path,"onUpdate:value":t[0]||(t[0]=n=>o.path=n),placeholder:"留空使用默认路径"},null,8,["value"])])]),_:1}),s(p,{xs:24,md:12},{default:l(()=>[e("div",B,[t[16]||(t[16]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"无头模式",-1)),t[17]||(t[17]=e("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}},[r(" 启用后浏览器无界面化运行"),e("br"),r(" 登录模式和 Xvfb 模式会无视该设置强行禁用无头模式 ")],-1)),s(m,{checked:o.headless,"onUpdate:checked":t[1]||(t[1]=n=>o.headless=n)},null,8,["checked"]),e("span",H,x(o.headless?"已启用":"未启用"),1)])]),_:1}),s(p,{xs:24,md:12},{default:l(()=>[e("div",I,[t[18]||(t[18]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"站点隔离 (fission.autostart)",-1)),t[19]||(t[19]=e("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}},[r(" 关闭可低内存占用,适合低配服务器"),e("br"),r(" 正常 FireFox 用户是默认开启的,请酌情关闭"),e("br"),e("span",{style:{color:"#faad14"}},"⚠️ 反爬检测可能通过检测单进程或者跨进程延迟来识别自动化特征")],-1)),s(m,{checked:o.fission,"onUpdate:checked":t[2]||(t[2]=n=>o.fission=n)},null,8,["checked"]),e("span",N,x(o.fission?"已启用":"已关闭 (省内存)"),1)])]),_:1}),s(p,{xs:24,md:24},{default:l(()=>[e("div",V,[t[20]||(t[20]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"拟人鼠标轨迹模式",-1)),t[21]||(t[21]=e("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}}," 控制鼠标点击的拟人化程度,影响性能和反爬检测风险 ",-1)),s(w,{value:o.humanizeCursor,"onUpdate:value":t[3]||(t[3]=n=>o.humanizeCursor=n),block:"",options:[{label:"禁用 (性能最佳)",value:!1},{label:"Ghost-Cursor (更拟人)",value:!0},{label:"Camoufox内置 (平衡)",value:"camou"}]},null,8,["value"]),e("div",D,[o.humanizeCursor===!1?(d(),u("span",G,"使用 Playwright 原生点击,性能最好,但可能被检测为自动化")):o.humanizeCursor===!0?(d(),u("span",K,"使用项目优化的 ghost-cursor 模拟人类鼠标轨迹(如不会点击正中心),性能稍差")):(d(),u("span",L,"使用 Camoufox 内置的 humanize 功能,性能与拟人化的平衡选择"))])])]),_:1})]),_:1}),e("div",M,[s(z,null,{default:l(()=>[s(_,{key:"proxy",header:"全局代理设置"},{default:l(()=>[t[28]||(t[28]=e("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"16px"}}," 如果实例没有独立配置代理,将使用此全局代理配置 ",-1)),e("div",O,[s(m,{checked:o.proxyEnable,"onUpdate:checked":t[4]||(t[4]=n=>o.proxyEnable=n)},null,8,["checked"]),e("span",W,x(o.proxyEnable?"已启用全局代理":"未启用全局代理"),1)]),o.proxyEnable?(d(),u("div",X,[t[22]||(t[22]=e("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"代理类型",-1)),s(w,{value:o.proxyType,"onUpdate:value":t[5]||(t[5]=n=>o.proxyType=n),block:"",options:[{label:"HTTP",value:"http"},{label:"SOCKS5",value:"socks5"}]},null,8,["value"])])):y("",!0),o.proxyEnable?(d(),c(b,{key:1,gutter:16},{default:l(()=>[s(p,{xs:24,md:12},{default:l(()=>[e("div",q,[t[23]||(t[23]=e("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"代理主机",-1)),s(g,{value:o.proxyHost,"onUpdate:value":t[6]||(t[6]=n=>o.proxyHost=n),placeholder:"例如: 127.0.0.1"},null,8,["value"])])]),_:1}),s(p,{xs:24,md:12},{default:l(()=>[e("div",J,[t[24]||(t[24]=e("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"代理端口",-1)),s(h,{value:o.proxyPort,"onUpdate:value":t[7]||(t[7]=n=>o.proxyPort=n),min:1,max:65535,style:{width:"100%"},placeholder:"例如: 7890"},null,8,["value"])])]),_:1})]),_:1})):y("",!0),o.proxyEnable?(d(),u("div",Q,[t[25]||(t[25]=e("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"代理认证",-1)),s(m,{checked:o.proxyAuth,"onUpdate:checked":t[8]||(t[8]=n=>o.proxyAuth=n)},null,8,["checked"]),e("span",R,x(o.proxyAuth?"需要认证":"无需认证"),1)])):y("",!0),o.proxyEnable&&o.proxyAuth?(d(),c(b,{key:3,gutter:16},{default:l(()=>[s(p,{xs:24,md:12},{default:l(()=>[e("div",Y,[t[26]||(t[26]=e("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"用户名",-1)),s(g,{value:o.proxyUser,"onUpdate:value":t[9]||(t[9]=n=>o.proxyUser=n),placeholder:"请输入用户名"},null,8,["value"])])]),_:1}),s(p,{xs:24,md:12},{default:l(()=>[e("div",Z,[t[27]||(t[27]=e("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"密码",-1)),s(C,{value:o.proxyPasswd,"onUpdate:value":t[10]||(t[10]=n=>o.proxyPasswd=n),placeholder:"请输入密码"},null,8,["value"])])]),_:1})]),_:1})):y("",!0)]),_:1}),s(_,{key:"cssInject",header:"CSS 性能优化注入"},{default:l(()=>[s(U,{message:"⚡ 适用于无 GPU 的服务器环境,通过禁用网页特效来降低 CPU 压力",type:"info","show-icon":"",style:{"margin-bottom":"16px"}}),e("div",$,[e("div",tt,[e("div",null,[t[30]||(t[30]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"禁用网页动画",-1)),t[31]||(t[31]=e("div",{style:{"font-size":"12px",color:"#8c8c8c"}}," 移除 transition 和 animation,显著降低 CPU 持续占用 ",-1)),s(v,{color:"green",style:{"margin-top":"6px"}},{default:l(()=>[...t[29]||(t[29]=[r("风险:低",-1)])]),_:1}),t[32]||(t[32]=e("span",{style:{"font-size":"11px",color:"#389e0d","margin-left":"8px"}}," 几乎不影响浏览器指纹,但可能导致部分网页布局异常 ",-1))]),s(m,{checked:o.cssAnimation,"onUpdate:checked":t[11]||(t[11]=n=>o.cssAnimation=n)},null,8,["checked"])])]),e("div",ot,[e("div",et,[e("div",null,[t[34]||(t[34]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"禁用滤镜和阴影",-1)),t[35]||(t[35]=e("div",{style:{"font-size":"12px",color:"#8c8c8c"}}," 移除 blur(模糊)、box-shadow(阴影) 等复杂渲染 ",-1)),s(v,{color:"orange",style:{"margin-top":"6px"}},{default:l(()=>[...t[33]||(t[33]=[r("风险:中",-1)])]),_:1}),t[36]||(t[36]=e("span",{style:{"font-size":"11px",color:"#faad14","margin-left":"8px"}}," 界面会变丑,少数反爬可能检测样式计算结果 ",-1))]),s(m,{checked:o.cssFilter,"onUpdate:checked":t[12]||(t[12]=n=>o.cssFilter=n)},null,8,["checked"])])]),e("div",st,[e("div",nt,[e("div",null,[t[38]||(t[38]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"降低字体渲染质量",-1)),t[39]||(t[39]=e("div",{style:{"font-size":"12px",color:"#8c8c8c"}}," 强制使用极速渲染模式,微量减少 CPU 绘图压力 ",-1)),s(v,{color:"red",style:{"margin-top":"6px"}},{default:l(()=>[...t[37]||(t[37]=[r("⚠️ 风险:高",-1)])]),_:1}),t[40]||(t[40]=e("div",{style:{"font-size":"11px",color:"#cf1322","margin-top":"4px"}}," 会导致文字边缘有锯齿,且可能导致字体指纹与标准浏览器不符,易被高级反爬识别 ",-1))]),s(m,{checked:o.cssFont,"onUpdate:checked":t[13]||(t[13]=n=>o.cssFont=n)},null,8,["checked"])])])]),_:1})]),_:1})]),e("div",lt,[s(P,{type:"primary",onClick:k},{default:l(()=>[...t[41]||(t[41]=[r(" 保存设置 ",-1)])]),_:1})])]),_:1})]),_:1})}}};export{rt as default}; diff --git a/webui/dist/assets/cache-B7UW2VhI.js b/webui/dist/assets/cache-B7UW2VhI.js deleted file mode 100644 index 6643f81..0000000 --- a/webui/dist/assets/cache-B7UW2VhI.js +++ /dev/null @@ -1 +0,0 @@ -import{u as pe}from"./system-CbLTf1UP.js";import{c as t,I as G,k as me,r as y,q as j,o as ve,b as B,d as x,w as n,g as o,f as i,h as c,u as _,P as R,e as ge,j as D,n as ye,F as _e,t as b,D as I,s as U,v,x as be,L as xe,C as he}from"./index-BgSomuu7.js";var we={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M521.7 82c-152.5-.4-286.7 78.5-363.4 197.7-3.4 5.3.4 12.3 6.7 12.3h70.3c4.8 0 9.3-2.1 12.3-5.8 7-8.5 14.5-16.7 22.4-24.5 32.6-32.5 70.5-58.1 112.7-75.9 43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 32.6 32.5 58.1 70.4 76 112.5C865.7 417.8 875 464.1 875 512c0 47.9-9.4 94.2-27.8 137.8-17.8 42.1-43.4 80-76 112.5s-70.5 58.1-112.7 75.9A352.8 352.8 0 01520.6 866c-47.9 0-94.3-9.4-137.9-27.8A353.84 353.84 0 01270 762.3c-7.9-7.9-15.3-16.1-22.4-24.5-3-3.7-7.6-5.8-12.3-5.8H165c-6.3 0-10.2 7-6.7 12.3C234.9 863.2 368.5 942 520.6 942c236.2 0 428-190.1 430.4-425.6C953.4 277.1 761.3 82.6 521.7 82zM395.02 624v-76h-314c-4.4 0-8-3.6-8-8v-56c0-4.4 3.6-8 8-8h314v-76c0-6.7 7.8-10.5 13-6.3l141.9 112a8 8 0 010 12.6l-141.9 112c-5.2 4.1-13 .4-13-6.3z"}}]},name:"login",theme:"outlined"};function q(u){for(var a=1;a{try{const s=await fetch("/admin/config/instances",{headers:l.getHeaders()});if(s.ok){const e=await s.json(),m=[];for(const z of e)for(const M of z.workers||[])m.push({name:M.name,instance:z.name});$.value=m}}catch(s){console.error("获取 Workers 列表失败",s)}},S=(s={})=>{h.value=s,C.value=!0},X=()=>{C.value=!1,Y(h.value)};ve(()=>{Q()});const L=s=>new Promise(e=>setTimeout(e,s)),Y=async(s={})=>{O.value=!0,f.value=!0,d.value=0,g.value[0].status="process",await L(500),g.value[0].status="finish",d.value=1,g.value[1].status="process";try{await a.restartService(s),g.value[1].status="finish",d.value=2}catch{g.value[1].status="error",v.error("无法连接到服务器");return}g.value[2].status="process",await L(3e3);let e=20;for(;e>0;){try{if(await a.fetchStatus(),a.status)break}catch{}await L(2e3),e--}g.value[2].status="finish",d.value=3,g.value[3].status="finish",v.success("服务重启成功"),setTimeout(()=>{O.value=!1,f.value=!1,g.value.forEach(m=>m.status="wait"),d.value=0},1500)},Z=async()=>{try{await a.stopService()&&v.success("服务已停止")}catch(s){v.error("停止服务失败: "+s.message)}},K=async()=>{try{(await fetch("/admin/cache/clear",{method:"POST",headers:l.getHeaders()})).ok?v.success("缓存文件夹已清理"):v.error("清理失败")}catch(s){v.error("请求失败: "+s.message)}},T=async()=>{p.value=[],k.value=!0;try{const s=await fetch("/admin/data-folders",{headers:l.getHeaders()});s.ok&&(H.value=await s.json())}catch{v.error("获取文件夹列表失败")}},ee=(s,e)=>{e?p.value.includes(s)||p.value.push(s):p.value=p.value.filter(m=>m!==s)},te=async()=>{if(p.value.length===0){v.warning("请先选择要删除的文件夹");return}try{(await fetch("/admin/data-folders/delete",{method:"POST",headers:l.getHeaders(),body:JSON.stringify({folders:p.value})})).ok?(v.success(`已删除 ${p.value.length} 个实例数据文件夹`),await T()):v.error("删除失败")}catch{v.error("删除请求失败")}};return(s,e)=>{const m=i("a-menu-item"),z=i("a-menu-divider"),M=i("a-sub-menu"),ne=i("a-menu"),oe=i("a-dropdown-button"),w=i("a-button"),F=i("a-popconfirm"),se=i("a-space"),P=i("a-card"),W=i("a-modal"),ae=i("a-steps"),A=i("a-col"),le=i("a-row"),re=i("a-checkbox"),ie=i("a-list-item-meta"),ue=i("a-list-item"),de=i("a-list"),ce=i("a-drawer"),fe=i("a-layout");return x(),B(fe,{style:{background:"transparent"}},{default:n(()=>[t(P,{title:"项目管理",bordered:!1,style:{width:"100%","margin-bottom":"10px"}},{default:n(()=>[o("div",Se,[e[12]||(e[12]=o("div",{style:{display:"flex","align-items":"center"}},[o("div",{style:{"margin-right":"16px"}},[o("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"系统服务控制"),o("div",{style:{"font-size":"12px",color:"#8c8c8c"}}," 控制后端服务的运行状态 (重启或停止) ")])],-1)),o("div",null,[t(se,null,{default:n(()=>[t(oe,{type:"primary",size:"large",onClick:e[2]||(e[2]=r=>S())},{overlay:n(()=>[t(ne,null,{default:n(()=>[t(m,{key:"normal",onClick:e[0]||(e[0]=r=>S())},{default:n(()=>[t(_(R)),e[7]||(e[7]=c(" 普通重启 ",-1))]),_:1}),t(z),t(m,{key:"login",onClick:e[1]||(e[1]=r=>S({loginMode:!0}))},{default:n(()=>[t(_(N)),e[8]||(e[8]=c(" 登录模式重启 ",-1))]),_:1}),$.value.length>1?(x(),B(M,{key:"login-worker",title:"指定 Worker 登录"},{icon:n(()=>[t(_(N))]),default:n(()=>[(x(!0),D(_e,null,ye($.value,r=>(x(),B(m,{key:r.name,onClick:E=>S({loginMode:!0,workerName:r.name})},{default:n(()=>[c(b(r.name),1)]),_:2},1032,["onClick"]))),128))]),_:1})):ge("",!0)]),_:1})]),default:n(()=>[t(_(R)),e[9]||(e[9]=c(" 重启 ",-1))]),_:1}),t(F,{"ok-text":"确定","cancel-text":"取消",onConfirm:Z,placement:"topRight"},{title:n(()=>[...e[10]||(e[10]=[o("div",{style:{width:"240px"}},[o("div",{style:{"font-weight":"500","margin-bottom":"4px"}},"确定要停止服务吗?"),o("div",{style:{"font-size":"12px",color:"#f5222d"}},"停止后服务将完全终止,需要手动重新启动。")],-1)])]),default:n(()=>[t(w,{type:"primary",danger:"",size:"large"},{icon:n(()=>[t(_(V))]),default:n(()=>[e[11]||(e[11]=c(" 停止 ",-1))]),_:1})]),_:1})]),_:1})])])]),_:1}),t(W,{open:C.value,"onUpdate:open":e[3]||(e[3]=r=>C.value=r),title:"确认重启",onOk:X,"ok-text":"确定","cancel-text":"取消",width:400},{default:n(()=>[o("div",ze,[h.value.loginMode?h.value.workerName?(x(),D("p",je,[e[13]||(e[13]=c(" 确定要以",-1)),e[14]||(e[14]=o("b",null,"登录模式",-1)),e[15]||(e[15]=c("重启服务吗?",-1)),e[16]||(e[16]=o("br",null,null,-1)),o("span",De,"仅初始化 Worker: "+b(h.value.workerName),1)])):(x(),D("p",Ne,[...e[17]||(e[17]=[c("确定要以",-1),o("b",null,"登录模式",-1),c("重启服务吗?",-1)])])):(x(),D("p",Pe,"确定要重启服务吗?"))])]),_:1},8,["open"]),t(W,{open:O.value,"onUpdate:open":e[4]||(e[4]=r=>O.value=r),title:"系统服务重启中",footer:null,closable:!1,maskClosable:!1,width:"500px"},{default:n(()=>[o("div",$e,[t(ae,{current:d.value,items:g.value},null,8,["current","items"]),e[18]||(e[18]=o("div",{style:{"text-align":"center","margin-top":"24px",color:"#8c8c8c"}}," 请稍候,系统正在执行重启操作... ",-1))])]),_:1},8,["open"]),t(P,{title:"缓存管理",bordered:!1,style:{width:"100%"}},{default:n(()=>[t(le,{gutter:[16,16]},{default:n(()=>[t(A,{xs:24,md:12},{default:n(()=>[t(P,{style:{height:"100%"},"body-style":{display:"flex",flexDirection:"column",height:"100%"}},{default:n(()=>[o("div",Le,[o("div",Me,[t(_(I),{style:{"font-size":"24px",color:"#1890ff","margin-right":"8px"}}),e[19]||(e[19]=o("div",{style:{"font-weight":"600","font-size":"16px"}},"清理缓存文件夹",-1))]),e[20]||(e[20]=o("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"16px"}},[c(" 清理项目运行过程中可能会遗留的临时缓存文件(如遇到错误时遗留的图片),"),o("br"),c(" 不会影响用户数据和配置"),o("strong",{style:{color:"#ff4d4f"}},"有任务运行时请勿执行")],-1))]),t(F,{title:"确定要清理缓存文件夹吗?","ok-text":"确定","cancel-text":"取消",onConfirm:K},{default:n(()=>[t(w,{type:"primary",block:""},{icon:n(()=>[t(_(I))]),default:n(()=>[e[21]||(e[21]=c(" 清理缓存 ",-1))]),_:1})]),_:1})]),_:1})]),_:1}),t(A,{xs:24,md:12},{default:n(()=>[t(P,{style:{height:"100%"},"body-style":{display:"flex",flexDirection:"column",height:"100%"}},{default:n(()=>[o("div",Fe,[o("div",Be,[t(_(U),{style:{"font-size":"24px",color:"#ff4d4f","margin-right":"8px"}}),e[22]||(e[22]=o("div",{style:{"font-weight":"600","font-size":"16px"}},"删除实例数据文件夹",-1))]),e[23]||(e[23]=o("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"16px"}},[c(" 删除所有浏览器实例的用户数据文件夹,"),o("br"),c(" 包括 Cookie、本地存储等,"),o("strong",{style:{color:"#ff4d4f"}},"请谨慎操作")],-1))]),t(w,{danger:"",block:"",onClick:T},{icon:n(()=>[t(_(U))]),default:n(()=>[e[24]||(e[24]=c(" 管理实例数据 ",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),t(ce,{open:k.value,"onUpdate:open":e[6]||(e[6]=r=>k.value=r),title:"管理实例数据文件夹",placement:"right",width:"500"},{footer:n(()=>[o("div",He,[o("div",Te," 已选择 "+b(p.value.length)+" 个文件夹 ",1),o("div",null,[t(w,{style:{"margin-right":"8px"},onClick:e[5]||(e[5]=r=>k.value=!1)},{default:n(()=>[...e[26]||(e[26]=[c(" 取消 ",-1)])]),_:1}),t(F,{placement:"topRight","ok-text":"确定删除","cancel-text":"取消",onConfirm:te},{title:n(()=>[o("div",We," 确定要删除选中的 "+b(p.value.length)+" 个文件夹吗? ",1)]),default:n(()=>[t(w,{type:"primary",danger:"",disabled:p.value.length===0},{default:n(()=>[...e[27]||(e[27]=[c(" 删除选中项 ",-1)])]),_:1},8,["disabled"])]),_:1})])])]),default:n(()=>[o("div",Re,[e[25]||(e[25]=o("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"12px"}}," 选择要删除的实例数据文件夹,删除后无法恢复,请谨慎操作 ",-1)),t(de,{"data-source":H.value,bordered:""},{renderItem:n(({item:r})=>[t(ue,null,{default:n(()=>[t(ie,null,{title:n(()=>[t(re,{checked:p.value.includes(r.name),onChange:E=>ee(r.name,E.target.checked)},{default:n(()=>[c(b(r.name),1)]),_:2},1032,["checked","onChange"])]),description:n(()=>[o("div",Ve,[o("div",null,"路径: "+b(r.path),1),o("div",null,"关联实例: "+b(r.instance),1),o("div",null,"大小: "+b(r.size),1)])]),_:2},1024)]),_:2},1024)]),_:1},8,["data-source"])])]),_:1},8,["open"])]),_:1})}}};export{Ie as default}; diff --git a/webui/dist/assets/cache.js b/webui/dist/assets/cache.js new file mode 100644 index 0000000..14b3459 --- /dev/null +++ b/webui/dist/assets/cache.js @@ -0,0 +1 @@ +import{u as pe}from"./system.js";import{c as t,I as G,k as me,r as y,s as j,o as ve,b as B,d as x,w as n,g as o,f as i,h as c,u as _,P as R,e as ge,j as D,p as ye,F as _e,t as b,D as I,v as U,m as v,x as be,L as xe,C as he}from"./index.js";var we={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M521.7 82c-152.5-.4-286.7 78.5-363.4 197.7-3.4 5.3.4 12.3 6.7 12.3h70.3c4.8 0 9.3-2.1 12.3-5.8 7-8.5 14.5-16.7 22.4-24.5 32.6-32.5 70.5-58.1 112.7-75.9 43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 32.6 32.5 58.1 70.4 76 112.5C865.7 417.8 875 464.1 875 512c0 47.9-9.4 94.2-27.8 137.8-17.8 42.1-43.4 80-76 112.5s-70.5 58.1-112.7 75.9A352.8 352.8 0 01520.6 866c-47.9 0-94.3-9.4-137.9-27.8A353.84 353.84 0 01270 762.3c-7.9-7.9-15.3-16.1-22.4-24.5-3-3.7-7.6-5.8-12.3-5.8H165c-6.3 0-10.2 7-6.7 12.3C234.9 863.2 368.5 942 520.6 942c236.2 0 428-190.1 430.4-425.6C953.4 277.1 761.3 82.6 521.7 82zM395.02 624v-76h-314c-4.4 0-8-3.6-8-8v-56c0-4.4 3.6-8 8-8h314v-76c0-6.7 7.8-10.5 13-6.3l141.9 112a8 8 0 010 12.6l-141.9 112c-5.2 4.1-13 .4-13-6.3z"}}]},name:"login",theme:"outlined"};function J(u){for(var a=1;a{try{const s=await fetch("/admin/config/instances",{headers:l.getHeaders()});if(s.ok){const e=await s.json(),m=[];for(const z of e)for(const M of z.workers||[])m.push({name:M.name,instance:z.name});$.value=m}}catch(s){console.error("获取 Workers 列表失败",s)}},S=(s={})=>{h.value=s,C.value=!0},X=()=>{C.value=!1,Y(h.value)};ve(()=>{Q()});const L=s=>new Promise(e=>setTimeout(e,s)),Y=async(s={})=>{O.value=!0,f.value=!0,d.value=0,g.value[0].status="process",await L(500),g.value[0].status="finish",d.value=1,g.value[1].status="process";try{await a.restartService(s),g.value[1].status="finish",d.value=2}catch{g.value[1].status="error",v.error("无法连接到服务器");return}g.value[2].status="process",await L(3e3);let e=20;for(;e>0;){try{if(await a.fetchStatus(),a.status)break}catch{}await L(2e3),e--}g.value[2].status="finish",d.value=3,g.value[3].status="finish",v.success("服务重启成功"),setTimeout(()=>{O.value=!1,f.value=!1,g.value.forEach(m=>m.status="wait"),d.value=0},1500)},Z=async()=>{try{await a.stopService()&&v.success("服务已停止")}catch(s){v.error("停止服务失败: "+s.message)}},K=async()=>{try{(await fetch("/admin/cache/clear",{method:"POST",headers:l.getHeaders()})).ok?v.success("缓存文件夹已清理"):v.error("清理失败")}catch(s){v.error("请求失败: "+s.message)}},T=async()=>{p.value=[],k.value=!0;try{const s=await fetch("/admin/data-folders",{headers:l.getHeaders()});s.ok&&(H.value=await s.json())}catch{v.error("获取文件夹列表失败")}},ee=(s,e)=>{e?p.value.includes(s)||p.value.push(s):p.value=p.value.filter(m=>m!==s)},te=async()=>{if(p.value.length===0){v.warning("请先选择要删除的文件夹");return}try{(await fetch("/admin/data-folders/delete",{method:"POST",headers:l.getHeaders(),body:JSON.stringify({folders:p.value})})).ok?(v.success(`已删除 ${p.value.length} 个实例数据文件夹`),await T()):v.error("删除失败")}catch{v.error("删除请求失败")}};return(s,e)=>{const m=i("a-menu-item"),z=i("a-menu-divider"),M=i("a-sub-menu"),ne=i("a-menu"),oe=i("a-dropdown-button"),w=i("a-button"),F=i("a-popconfirm"),se=i("a-space"),P=i("a-card"),W=i("a-modal"),ae=i("a-steps"),A=i("a-col"),le=i("a-row"),re=i("a-checkbox"),ie=i("a-list-item-meta"),ue=i("a-list-item"),de=i("a-list"),ce=i("a-drawer"),fe=i("a-layout");return x(),B(fe,{style:{background:"transparent"}},{default:n(()=>[t(P,{title:"项目管理",bordered:!1,style:{width:"100%","margin-bottom":"10px"}},{default:n(()=>[o("div",Se,[e[12]||(e[12]=o("div",{style:{display:"flex","align-items":"center"}},[o("div",{style:{"margin-right":"16px"}},[o("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"系统服务控制"),o("div",{style:{"font-size":"12px",color:"#8c8c8c"}}," 控制后端服务的运行状态 (重启或停止) ")])],-1)),o("div",null,[t(se,null,{default:n(()=>[t(oe,{type:"primary",size:"large",onClick:e[2]||(e[2]=r=>S())},{overlay:n(()=>[t(ne,null,{default:n(()=>[t(m,{key:"normal",onClick:e[0]||(e[0]=r=>S())},{default:n(()=>[t(_(R)),e[7]||(e[7]=c(" 普通重启 ",-1))]),_:1}),t(z),t(m,{key:"login",onClick:e[1]||(e[1]=r=>S({loginMode:!0}))},{default:n(()=>[t(_(N)),e[8]||(e[8]=c(" 登录模式重启 ",-1))]),_:1}),$.value.length>1?(x(),B(M,{key:"login-worker",title:"指定 Worker 登录"},{icon:n(()=>[t(_(N))]),default:n(()=>[(x(!0),D(_e,null,ye($.value,r=>(x(),B(m,{key:r.name,onClick:E=>S({loginMode:!0,workerName:r.name})},{default:n(()=>[c(b(r.name),1)]),_:2},1032,["onClick"]))),128))]),_:1})):ge("",!0)]),_:1})]),default:n(()=>[t(_(R)),e[9]||(e[9]=c(" 重启 ",-1))]),_:1}),t(F,{"ok-text":"确定","cancel-text":"取消",onConfirm:Z,placement:"topRight"},{title:n(()=>[...e[10]||(e[10]=[o("div",{style:{width:"240px"}},[o("div",{style:{"font-weight":"500","margin-bottom":"4px"}},"确定要停止服务吗?"),o("div",{style:{"font-size":"12px",color:"#f5222d"}},"停止后服务将完全终止,需要手动重新启动。")],-1)])]),default:n(()=>[t(w,{type:"primary",danger:"",size:"large"},{icon:n(()=>[t(_(V))]),default:n(()=>[e[11]||(e[11]=c(" 停止 ",-1))]),_:1})]),_:1})]),_:1})])])]),_:1}),t(W,{open:C.value,"onUpdate:open":e[3]||(e[3]=r=>C.value=r),title:"确认重启",onOk:X,"ok-text":"确定","cancel-text":"取消",width:400},{default:n(()=>[o("div",ze,[h.value.loginMode?h.value.workerName?(x(),D("p",je,[e[13]||(e[13]=c(" 确定要以",-1)),e[14]||(e[14]=o("b",null,"登录模式",-1)),e[15]||(e[15]=c("重启服务吗?",-1)),e[16]||(e[16]=o("br",null,null,-1)),o("span",De,"仅初始化 Worker: "+b(h.value.workerName),1)])):(x(),D("p",Ne,[...e[17]||(e[17]=[c("确定要以",-1),o("b",null,"登录模式",-1),c("重启服务吗?",-1)])])):(x(),D("p",Pe,"确定要重启服务吗?"))])]),_:1},8,["open"]),t(W,{open:O.value,"onUpdate:open":e[4]||(e[4]=r=>O.value=r),title:"系统服务重启中",footer:null,closable:!1,maskClosable:!1,width:"500px"},{default:n(()=>[o("div",$e,[t(ae,{current:d.value,items:g.value},null,8,["current","items"]),e[18]||(e[18]=o("div",{style:{"text-align":"center","margin-top":"24px",color:"#8c8c8c"}}," 请稍候,系统正在执行重启操作... ",-1))])]),_:1},8,["open"]),t(P,{title:"缓存管理",bordered:!1,style:{width:"100%"}},{default:n(()=>[t(le,{gutter:[16,16]},{default:n(()=>[t(A,{xs:24,md:12},{default:n(()=>[t(P,{style:{height:"100%"},"body-style":{display:"flex",flexDirection:"column",height:"100%"}},{default:n(()=>[o("div",Le,[o("div",Me,[t(_(I),{style:{"font-size":"24px",color:"#1890ff","margin-right":"8px"}}),e[19]||(e[19]=o("div",{style:{"font-weight":"600","font-size":"16px"}},"清理缓存文件夹",-1))]),e[20]||(e[20]=o("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"16px"}},[c(" 清理项目运行过程中可能会遗留的临时缓存文件(如遇到错误时遗留的图片),"),o("br"),c(" 不会影响用户数据和配置"),o("strong",{style:{color:"#ff4d4f"}},"有任务运行时请勿执行")],-1))]),t(F,{title:"确定要清理缓存文件夹吗?","ok-text":"确定","cancel-text":"取消",onConfirm:K},{default:n(()=>[t(w,{type:"primary",block:""},{icon:n(()=>[t(_(I))]),default:n(()=>[e[21]||(e[21]=c(" 清理缓存 ",-1))]),_:1})]),_:1})]),_:1})]),_:1}),t(A,{xs:24,md:12},{default:n(()=>[t(P,{style:{height:"100%"},"body-style":{display:"flex",flexDirection:"column",height:"100%"}},{default:n(()=>[o("div",Fe,[o("div",Be,[t(_(U),{style:{"font-size":"24px",color:"#ff4d4f","margin-right":"8px"}}),e[22]||(e[22]=o("div",{style:{"font-weight":"600","font-size":"16px"}},"删除实例数据文件夹",-1))]),e[23]||(e[23]=o("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"16px"}},[c(" 删除所有浏览器实例的用户数据文件夹,"),o("br"),c(" 包括 Cookie、本地存储等,"),o("strong",{style:{color:"#ff4d4f"}},"请谨慎操作")],-1))]),t(w,{danger:"",block:"",onClick:T},{icon:n(()=>[t(_(U))]),default:n(()=>[e[24]||(e[24]=c(" 管理实例数据 ",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),t(ce,{open:k.value,"onUpdate:open":e[6]||(e[6]=r=>k.value=r),title:"管理实例数据文件夹",placement:"right",width:"500"},{footer:n(()=>[o("div",He,[o("div",Te," 已选择 "+b(p.value.length)+" 个文件夹 ",1),o("div",null,[t(w,{style:{"margin-right":"8px"},onClick:e[5]||(e[5]=r=>k.value=!1)},{default:n(()=>[...e[26]||(e[26]=[c(" 取消 ",-1)])]),_:1}),t(F,{placement:"topRight","ok-text":"确定删除","cancel-text":"取消",onConfirm:te},{title:n(()=>[o("div",We," 确定要删除选中的 "+b(p.value.length)+" 个文件夹吗? ",1)]),default:n(()=>[t(w,{type:"primary",danger:"",disabled:p.value.length===0},{default:n(()=>[...e[27]||(e[27]=[c(" 删除选中项 ",-1)])]),_:1},8,["disabled"])]),_:1})])])]),default:n(()=>[o("div",Re,[e[25]||(e[25]=o("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"12px"}}," 选择要删除的实例数据文件夹,删除后无法恢复,请谨慎操作 ",-1)),t(de,{"data-source":H.value,bordered:""},{renderItem:n(({item:r})=>[t(ue,null,{default:n(()=>[t(ie,null,{title:n(()=>[t(re,{checked:p.value.includes(r.name),onChange:E=>ee(r.name,E.target.checked)},{default:n(()=>[c(b(r.name),1)]),_:2},1032,["checked","onChange"])]),description:n(()=>[o("div",Ve,[o("div",null,"路径: "+b(r.path),1),o("div",null,"关联实例: "+b(r.instance),1),o("div",null,"大小: "+b(r.size),1)])]),_:2},1024)]),_:2},1024)]),_:1},8,["data-source"])])]),_:1},8,["open"])]),_:1})}}};export{Ie as default}; diff --git a/webui/dist/assets/dash-9gu6BYeT.js b/webui/dist/assets/dash-9gu6BYeT.js deleted file mode 100644 index b04f1a7..0000000 --- a/webui/dist/assets/dash-9gu6BYeT.js +++ /dev/null @@ -1 +0,0 @@ -import{u as R}from"./system-CbLTf1UP.js";import{c as r,I as x,r as j,o as W,a as Y,b as h,d as _,w as l,e as P,u as i,f,g as c,h as d,t as g,C as V,i as Z,j as K,E as tt,k as et}from"./index-BgSomuu7.js";import{D as nt}from"./DesktopOutlined-uy4U7g8U.js";var rt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 512.3v-.3c0-229.8-186.2-416-416-416S96 282.2 96 512v.4c0 229.8 186.2 416 416 416s416-186.2 416-416v-.3.2zm-6.7-74.6l.6 3.3-.6-3.3zM676.7 638.2c53.5-82.2 52.5-189.4-11.1-263.7l162.4-8.4c20.5 44.4 32 93.8 32 145.9 0 185.2-144.6 336.6-327.1 347.4l143.8-221.2zM512 652.3c-77.5 0-140.2-62.7-140.2-140.2 0-77.7 62.7-140.2 140.2-140.2S652.2 434.5 652.2 512 589.5 652.3 512 652.3zm369.2-331.7l-3-5.7 3 5.7zM512 164c121.3 0 228.2 62.1 290.4 156.2l-263.6-13.9c-97.5-5.7-190.2 49.2-222.3 141.1L227.8 311c63.1-88.9 166.9-147 284.2-147zM102.5 585.8c26 145 127.1 264 261.6 315.1C229.6 850 128.5 731 102.5 585.8zM164 512c0-55.9 13.2-108.7 36.6-155.5l119.7 235.4c44.1 86.7 137.4 139.7 234 121.6l-74 145.1C302.9 842.5 164 693.5 164 512zm324.7 415.4c4 .2 8 .4 12 .5-4-.2-8-.3-12-.5z"}}]},name:"chrome",theme:"outlined"};function L(n){for(var t=1;t{const u=et();try{const a=await fetch("/admin/queue",{headers:u.getHeaders()});if(a.ok){const p=await a.json();s.value={processing:p.processing||0,waiting:p.waiting||0,total:p.total||0};const m=(p.processingTasks||[]).map(O=>({...O,status:"processing"})),w=(p.waitingTasks||[]).map(O=>({...O,status:"waiting"}));e.value=[...m,...w]}}catch(a){console.error("Fetch queue failed",a)}},B=async()=>{await Promise.all([t.fetchStatus(),t.fetchStats(),T()])},q=u=>{const a=Math.floor(u/86400),p=Math.floor(u%(3600*24)/3600),m=Math.floor(u%3600/60);return a>0?`${a}天 ${p}小时 ${m}分`:p>0?`${p}小时 ${m}分`:`${m}分`},U=u=>!u||u===0?"0 MB":u>1024?parseFloat((u/1024).toFixed(2))+" GB":parseFloat(Number(u).toFixed(2))+" MB",D=u=>u<50?"#52c41a":u<80?"#faad14":"#f5222d",N=u=>({normal:{color:"green",text:"正常模式 (Normal)"},headless:{color:"blue",text:"无头模式 (Headless)"},xvfb:{color:"purple",text:"虚拟显示 (Xvfb)"}})[u]||{color:"red",text:"未运行"};return W(()=>{B(),o.value=setInterval(B,5e3)}),Y(()=>{o.value&&clearInterval(o.value)}),(u,a)=>{const p=f("a-alert"),m=f("a-tag"),w=f("a-progress"),O=f("a-space"),z=f("a-card"),y=f("a-col"),b=f("a-statistic"),S=f("a-row"),G=f("a-list-item-meta"),Q=f("a-list-item"),X=f("a-list"),J=f("a-layout");return _(),h(J,{style:{width:"100%",background:"transparent"}},{default:l(()=>[i(t).safeMode?.enabled?(_(),h(p,{key:0,type:"error","show-icon":"",style:{"margin-bottom":"16px"},closable:""},{message:l(()=>[...a[0]||(a[0]=[c("span",{style:{"font-weight":"600"}},"⚠️ 安全模式",-1)])]),description:l(()=>[c("div",null,[a[2]||(a[2]=c("p",{style:{"margin-bottom":"8px"}}," 服务因初始化失败进入安全模式,OpenAI API 不可用。 ",-1)),c("p",pt,[a[1]||(a[1]=c("b",null,"原因:",-1)),d(g(i(t).safeMode.reason),1)]),a[3]||(a[3]=c("p",{style:{margin:"0"}}," 请前往「系统设置」修改正确的配置后重启服务。 ",-1))])]),_:1})):P("",!0),r(S,{gutter:[16,16],style:{"margin-bottom":"24px"}},{default:l(()=>[r(y,{xs:24,md:12},{default:l(()=>[r(z,{title:"系统状态",bordered:!1,style:{height:"100%"}},{default:l(()=>[r(O,{direction:"vertical",style:{width:"100%"},size:"middle"},{default:l(()=>[c("div",mt,[c("span",null,[r(i(nt)),a[4]||(a[4]=d(" 系统版本: ",-1))]),c("b",null,g(i(t).systemVersion),1)]),c("div",gt,[c("span",null,[r(i($)),a[5]||(a[5]=d(" 运行时间: ",-1))]),c("b",null,g(q(i(t).uptime)),1)]),c("div",yt,[c("span",null,[r(i(M)),a[6]||(a[6]=d(" 状态: ",-1))]),r(m,{color:N(i(t).status).color},{default:l(()=>[d(g(N(i(t).status).text),1)]),_:1},8,["color"])]),c("div",null,[c("div",vt,[c("span",null,[r(i(A)),a[7]||(a[7]=d(" CPU 使用率: ",-1))]),c("span",null,g(i(t).cpuUsage)+"%",1)]),r(w,{percent:i(t).cpuUsage,"stroke-color":D(i(t).cpuUsage),"show-info":!1},null,8,["percent","stroke-color"])]),c("div",null,[c("div",_t,[c("span",null,[r(i(k)),a[8]||(a[8]=d(" 内存使用: ",-1))]),c("span",null,g(U(i(t).memoryUsage.used))+" / "+g(U(i(t).memoryUsage.total)),1)]),r(w,{percent:Math.round(i(t).memoryUsage.used/i(t).memoryUsage.total*100)||0,"stroke-color":D(i(t).memoryUsage.used/i(t).memoryUsage.total*100),"show-info":!1},null,8,["percent","stroke-color"])])]),_:1})]),_:1})]),_:1}),r(y,{xs:24,md:12},{default:l(()=>[r(z,{title:"业务统计",bordered:!1,style:{height:"100%"}},{default:l(()=>[r(S,{gutter:16,style:{"margin-bottom":"24px"}},{default:l(()=>[r(y,{span:12},{default:l(()=>[r(b,{title:"窗口数量",value:i(t).stats.workers||0},{suffix:l(()=>[...a[9]||(a[9]=[c("span",{style:{"font-size":"14px",color:"#8c8c8c"}},"个",-1)])]),_:1},8,["value"])]),_:1}),r(y,{span:12},{default:l(()=>[r(b,{title:"实例数量",value:i(t).stats.instances||0},{suffix:l(()=>[...a[10]||(a[10]=[c("span",{style:{"font-size":"14px",color:"#8c8c8c"}},"个",-1)])]),_:1},8,["value"])]),_:1})]),_:1}),r(S,{gutter:16},{default:l(()=>[r(y,{span:12},{default:l(()=>[r(b,{title:"正在进行",value:s.value.processing},{suffix:l(()=>[c("span",bt,"/ "+g(s.value.total),1)]),_:1},8,["value"])]),_:1}),r(y,{span:12},{default:l(()=>[r(b,{title:"等待排队",value:s.value.waiting},{suffix:l(()=>[c("span",ht,"/ "+g(s.value.total),1)]),_:1},8,["value"])]),_:1})]),_:1}),r(S,{gutter:16,style:{"margin-top":"16px"}},{default:l(()=>[r(y,{span:12},{default:l(()=>[r(b,{title:"今日成功",value:i(t).stats.success||0},{prefix:l(()=>[r(i(V),{style:{color:"#52c41a"}})]),_:1},8,["value"])]),_:1}),r(y,{span:12},{default:l(()=>[r(b,{title:"今日失败",value:i(t).stats.failed||0},{prefix:l(()=>[r(i(Z),{style:{color:"#ff4d4f"}})]),_:1},8,["value"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),r(z,{title:"任务队列实时监控",bordered:!1,style:{width:"100%"},bodyStyle:{padding:"0 24px"}},{extra:l(()=>[c("div",Ot,[r(i(C),{spin:!0,style:{"margin-right":"4px"}}),a[11]||(a[11]=d(" 实时刷新中 ",-1))])]),default:l(()=>[r(X,{"item-layout":"horizontal","data-source":e.value},{renderItem:l(({item:v})=>[r(Q,null,{default:l(()=>[r(G,{description:`ID: ${v.id}`},{title:l(()=>[c("span",xt,g(v.model),1),v.worker?(_(),h(m,{key:0,color:"blue"},{default:l(()=>[d(g(v.worker),1)]),_:2},1024)):P("",!0)]),_:2},1032,["description"]),c("div",null,[v.status==="processing"?(_(),h(m,{key:0,color:"processing"},{icon:l(()=>[r(i(C),{spin:!0})]),default:l(()=>[a[12]||(a[12]=d(" 进行中 ",-1))]),_:1})):v.status==="waiting"?(_(),h(m,{key:1,color:"warning"},{icon:l(()=>[r(i(tt))]),default:l(()=>[a[13]||(a[13]=d(" 等待中 ",-1))]),_:1})):v.status==="success"?(_(),h(m,{key:2,color:"success"},{icon:l(()=>[r(i(V))]),default:l(()=>[a[14]||(a[14]=d(" 已完成 ",-1))]),_:1})):P("",!0)])]),_:2},1024)]),default:l(()=>[e.value.length===0?(_(),K("div",wt," 暂无任务 ")):P("",!0)]),_:1},8,["data-source"])]),_:1})]),_:1})}}};export{zt as default}; diff --git a/webui/dist/assets/dash.js b/webui/dist/assets/dash.js new file mode 100644 index 0000000..6c49753 --- /dev/null +++ b/webui/dist/assets/dash.js @@ -0,0 +1 @@ +import{u as R}from"./system.js";import{c as r,I as x,r as j,o as W,a as Y,b as h,d as _,w as l,e as P,u as i,f,g as c,h as d,t as g,C as V,i as Z,j as K,E as tt,k as et}from"./index.js";import{D as nt}from"./DesktopOutlined.js";var rt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 512.3v-.3c0-229.8-186.2-416-416-416S96 282.2 96 512v.4c0 229.8 186.2 416 416 416s416-186.2 416-416v-.3.2zm-6.7-74.6l.6 3.3-.6-3.3zM676.7 638.2c53.5-82.2 52.5-189.4-11.1-263.7l162.4-8.4c20.5 44.4 32 93.8 32 145.9 0 185.2-144.6 336.6-327.1 347.4l143.8-221.2zM512 652.3c-77.5 0-140.2-62.7-140.2-140.2 0-77.7 62.7-140.2 140.2-140.2S652.2 434.5 652.2 512 589.5 652.3 512 652.3zm369.2-331.7l-3-5.7 3 5.7zM512 164c121.3 0 228.2 62.1 290.4 156.2l-263.6-13.9c-97.5-5.7-190.2 49.2-222.3 141.1L227.8 311c63.1-88.9 166.9-147 284.2-147zM102.5 585.8c26 145 127.1 264 261.6 315.1C229.6 850 128.5 731 102.5 585.8zM164 512c0-55.9 13.2-108.7 36.6-155.5l119.7 235.4c44.1 86.7 137.4 139.7 234 121.6l-74 145.1C302.9 842.5 164 693.5 164 512zm324.7 415.4c4 .2 8 .4 12 .5-4-.2-8-.3-12-.5z"}}]},name:"chrome",theme:"outlined"};function L(n){for(var t=1;t{const u=et();try{const a=await fetch("/admin/queue",{headers:u.getHeaders()});if(a.ok){const p=await a.json();s.value={processing:p.processing||0,waiting:p.waiting||0,total:p.total||0};const m=(p.processingTasks||[]).map(O=>({...O,status:"processing"})),w=(p.waitingTasks||[]).map(O=>({...O,status:"waiting"}));e.value=[...m,...w]}}catch(a){console.error("Fetch queue failed",a)}},B=async()=>{await Promise.all([t.fetchStatus(),t.fetchStats(),T()])},q=u=>{const a=Math.floor(u/86400),p=Math.floor(u%(3600*24)/3600),m=Math.floor(u%3600/60);return a>0?`${a}天 ${p}小时 ${m}分`:p>0?`${p}小时 ${m}分`:`${m}分`},U=u=>!u||u===0?"0 MB":u>1024?parseFloat((u/1024).toFixed(2))+" GB":parseFloat(Number(u).toFixed(2))+" MB",D=u=>u<50?"#52c41a":u<80?"#faad14":"#f5222d",N=u=>({normal:{color:"green",text:"正常模式 (Normal)"},headless:{color:"blue",text:"无头模式 (Headless)"},xvfb:{color:"purple",text:"虚拟显示 (Xvfb)"}})[u]||{color:"red",text:"未运行"};return W(()=>{B(),o.value=setInterval(B,5e3)}),Y(()=>{o.value&&clearInterval(o.value)}),(u,a)=>{const p=f("a-alert"),m=f("a-tag"),w=f("a-progress"),O=f("a-space"),z=f("a-card"),y=f("a-col"),b=f("a-statistic"),S=f("a-row"),G=f("a-list-item-meta"),Q=f("a-list-item"),X=f("a-list"),J=f("a-layout");return _(),h(J,{style:{width:"100%",background:"transparent"}},{default:l(()=>[i(t).safeMode?.enabled?(_(),h(p,{key:0,type:"error","show-icon":"",style:{"margin-bottom":"16px"},closable:""},{message:l(()=>[...a[0]||(a[0]=[c("span",{style:{"font-weight":"600"}},"⚠️ 安全模式",-1)])]),description:l(()=>[c("div",null,[a[2]||(a[2]=c("p",{style:{"margin-bottom":"8px"}}," 服务因初始化失败进入安全模式,OpenAI API 不可用。 ",-1)),c("p",pt,[a[1]||(a[1]=c("b",null,"原因:",-1)),d(g(i(t).safeMode.reason),1)]),a[3]||(a[3]=c("p",{style:{margin:"0"}}," 请前往「系统设置」修改正确的配置后重启服务。 ",-1))])]),_:1})):P("",!0),r(S,{gutter:[16,16],style:{"margin-bottom":"24px"}},{default:l(()=>[r(y,{xs:24,md:12},{default:l(()=>[r(z,{title:"系统状态",bordered:!1,style:{height:"100%"}},{default:l(()=>[r(O,{direction:"vertical",style:{width:"100%"},size:"middle"},{default:l(()=>[c("div",mt,[c("span",null,[r(i(nt)),a[4]||(a[4]=d(" 系统版本: ",-1))]),c("b",null,g(i(t).systemVersion),1)]),c("div",gt,[c("span",null,[r(i($)),a[5]||(a[5]=d(" 运行时间: ",-1))]),c("b",null,g(q(i(t).uptime)),1)]),c("div",yt,[c("span",null,[r(i(M)),a[6]||(a[6]=d(" 状态: ",-1))]),r(m,{color:N(i(t).status).color},{default:l(()=>[d(g(N(i(t).status).text),1)]),_:1},8,["color"])]),c("div",null,[c("div",vt,[c("span",null,[r(i(A)),a[7]||(a[7]=d(" CPU 使用率: ",-1))]),c("span",null,g(i(t).cpuUsage)+"%",1)]),r(w,{percent:i(t).cpuUsage,"stroke-color":D(i(t).cpuUsage),"show-info":!1},null,8,["percent","stroke-color"])]),c("div",null,[c("div",_t,[c("span",null,[r(i(k)),a[8]||(a[8]=d(" 内存使用: ",-1))]),c("span",null,g(U(i(t).memoryUsage.used))+" / "+g(U(i(t).memoryUsage.total)),1)]),r(w,{percent:Math.round(i(t).memoryUsage.used/i(t).memoryUsage.total*100)||0,"stroke-color":D(i(t).memoryUsage.used/i(t).memoryUsage.total*100),"show-info":!1},null,8,["percent","stroke-color"])])]),_:1})]),_:1})]),_:1}),r(y,{xs:24,md:12},{default:l(()=>[r(z,{title:"业务统计",bordered:!1,style:{height:"100%"}},{default:l(()=>[r(S,{gutter:16,style:{"margin-bottom":"24px"}},{default:l(()=>[r(y,{span:12},{default:l(()=>[r(b,{title:"窗口数量",value:i(t).stats.workers||0},{suffix:l(()=>[...a[9]||(a[9]=[c("span",{style:{"font-size":"14px",color:"#8c8c8c"}},"个",-1)])]),_:1},8,["value"])]),_:1}),r(y,{span:12},{default:l(()=>[r(b,{title:"实例数量",value:i(t).stats.instances||0},{suffix:l(()=>[...a[10]||(a[10]=[c("span",{style:{"font-size":"14px",color:"#8c8c8c"}},"个",-1)])]),_:1},8,["value"])]),_:1})]),_:1}),r(S,{gutter:16},{default:l(()=>[r(y,{span:12},{default:l(()=>[r(b,{title:"正在进行",value:s.value.processing},{suffix:l(()=>[c("span",bt,"/ "+g(s.value.total),1)]),_:1},8,["value"])]),_:1}),r(y,{span:12},{default:l(()=>[r(b,{title:"等待排队",value:s.value.waiting},{suffix:l(()=>[c("span",ht,"/ "+g(s.value.total),1)]),_:1},8,["value"])]),_:1})]),_:1}),r(S,{gutter:16,style:{"margin-top":"16px"}},{default:l(()=>[r(y,{span:12},{default:l(()=>[r(b,{title:"今日成功",value:i(t).stats.success||0},{prefix:l(()=>[r(i(V),{style:{color:"#52c41a"}})]),_:1},8,["value"])]),_:1}),r(y,{span:12},{default:l(()=>[r(b,{title:"今日失败",value:i(t).stats.failed||0},{prefix:l(()=>[r(i(Z),{style:{color:"#ff4d4f"}})]),_:1},8,["value"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),r(z,{title:"任务队列实时监控",bordered:!1,style:{width:"100%"},bodyStyle:{padding:"0 24px"}},{extra:l(()=>[c("div",Ot,[r(i(C),{spin:!0,style:{"margin-right":"4px"}}),a[11]||(a[11]=d(" 实时刷新中 ",-1))])]),default:l(()=>[r(X,{"item-layout":"horizontal","data-source":e.value},{renderItem:l(({item:v})=>[r(Q,null,{default:l(()=>[r(G,{description:`ID: ${v.id}`},{title:l(()=>[c("span",xt,g(v.model),1),v.worker?(_(),h(m,{key:0,color:"blue"},{default:l(()=>[d(g(v.worker),1)]),_:2},1024)):P("",!0)]),_:2},1032,["description"]),c("div",null,[v.status==="processing"?(_(),h(m,{key:0,color:"processing"},{icon:l(()=>[r(i(C),{spin:!0})]),default:l(()=>[a[12]||(a[12]=d(" 进行中 ",-1))]),_:1})):v.status==="waiting"?(_(),h(m,{key:1,color:"warning"},{icon:l(()=>[r(i(tt))]),default:l(()=>[a[13]||(a[13]=d(" 等待中 ",-1))]),_:1})):v.status==="success"?(_(),h(m,{key:2,color:"success"},{icon:l(()=>[r(i(V))]),default:l(()=>[a[14]||(a[14]=d(" 已完成 ",-1))]),_:1})):P("",!0)])]),_:2},1024)]),default:l(()=>[e.value.length===0?(_(),K("div",wt," 暂无任务 ")):P("",!0)]),_:1},8,["data-source"])]),_:1})]),_:1})}}};export{zt as default}; diff --git a/webui/dist/assets/display-Dhk_8lAp.js b/webui/dist/assets/display-Dhk_8lAp.js deleted file mode 100644 index 64b77c9..0000000 --- a/webui/dist/assets/display-Dhk_8lAp.js +++ /dev/null @@ -1 +0,0 @@ -import{c,I as P,k as q,r as m,o as T,a as U,b as f,d as a,w as s,j as g,g as i,f as y,u as v,h as d,e as M,t as z,R as G,p as J}from"./index-BgSomuu7.js";import{D as C}from"./DesktopOutlined-uy4U7g8U.js";var Q={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M326 664H104c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h174v176c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V696c0-17.7-14.3-32-32-32zm16-576h-48c-8.8 0-16 7.2-16 16v176H104c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h222c17.7 0 32-14.3 32-32V104c0-8.8-7.2-16-16-16zm578 576H698c-17.7 0-32 14.3-32 32v224c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V744h174c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16zm0-384H746V104c0-8.8-7.2-16-16-16h-48c-8.8 0-16 7.2-16 16v224c0 17.7 14.3 32 32 32h222c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16z"}}]},name:"compress",theme:"outlined"};function $(n){for(var e=1;eimport("./rfb-BW3Yvshj.js"),[])).default);const r=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/admin/vnc?token=${e.token}`;u=new V(x.value,r,{wsProtocols:["binary"]}),u.scaleViewport=!0,u.clipViewport=!1,u.resizeSession=!1,u.addEventListener("connect",()=>{o.value="connected"}),u.addEventListener("disconnect",_=>{o.value="disconnected",_.detail.clean===!1&&(b.value="连接意外断开"),u=null}),u.addEventListener("credentialsrequired",()=>{u.sendCredentials({password:""})})}catch(p){o.value="error",b.value=p.message||"连接失败"}}}function N(){u&&(u.disconnect(),u=null),o.value="disconnected"}function F(){x.value&&(document.fullscreenElement?(document.exitFullscreen(),h.value=!1):(x.value.requestFullscreen(),h.value=!0))}function D(){h.value=!!document.fullscreenElement}return T(async()=>{await j(),document.addEventListener("fullscreenchange",D)}),U(()=>{N(),document.removeEventListener("fullscreenchange",D)}),(p,r)=>{const _=y("a-spin"),O=y("a-tag"),w=y("a-button"),A=y("a-space"),R=y("a-card"),I=y("a-layout");return a(),f(I,{style:{background:"transparent"}},{default:s(()=>[c(R,{title:"虚拟显示器",bordered:!1,style:{height:"100%"}},{default:s(()=>[t.value?(a(),g("div",ee,[c(_,{size:"large"}),r[0]||(r[0]=i("div",{style:{"margin-top":"16px",color:"#8c8c8c"}},"正在检查 VNC 状态...",-1))])):l.value?.xvfbMode?l.value?.enabled?(a(),g("div",oe,[i("div",re,[i("div",null,[o.value==="connected"?(a(),f(O,{key:0,color:"success"},{default:s(()=>[...r[5]||(r[5]=[d("已连接",-1)])]),_:1})):o.value==="connecting"?(a(),f(O,{key:1,color:"processing"},{default:s(()=>[...r[6]||(r[6]=[d("连接中...",-1)])]),_:1})):o.value==="error"?(a(),f(O,{key:2,color:"error"},{default:s(()=>[...r[7]||(r[7]=[d("连接错误",-1)])]),_:1})):(a(),f(O,{key:3,color:"default"},{default:s(()=>[...r[8]||(r[8]=[d("未连接",-1)])]),_:1})),b.value?(a(),g("span",le,z(b.value),1)):M("",!0)]),c(A,null,{default:s(()=>[o.value!=="connected"?(a(),f(w,{key:0,type:"primary",onClick:B,loading:o.value==="connecting"},{icon:s(()=>[c(v(C))]),default:s(()=>[r[9]||(r[9]=d(" 连接 ",-1))]),_:1},8,["loading"])):(a(),f(w,{key:1,danger:"",onClick:N},{icon:s(()=>[c(v(k))]),default:s(()=>[r[10]||(r[10]=d(" 断开 ",-1))]),_:1})),c(w,{onClick:F,disabled:o.value!=="connected"},{icon:s(()=>[h.value?(a(),f(v(E),{key:0})):(a(),f(v(S),{key:1}))]),_:1},8,["disabled"]),c(w,{onClick:j},{icon:s(()=>[c(v(G))]),_:1})]),_:1})]),i("div",{ref_key:"vncContainer",ref:x,style:{width:"100%","aspect-ratio":"16/9","min-height":"400px","max-height":"70vh",background:"#000","border-radius":"8px",overflow:"hidden"}},[o.value==="disconnected"?(a(),g("div",ae,[i("div",ce,[c(v(C),{style:{"font-size":"48px",color:"#434343"}}),r[11]||(r[11]=i("div",{style:{"margin-top":"16px"}},'点击"连接"按钮查看远程显示器',-1))])])):M("",!0)],512),i("div",se," 显示器: "+z(l.value.display)+" | VNC 端口: "+z(l.value.port),1)])):(a(),g("div",ne,[c(v(C),{style:{"font-size":"64px",color:"#bfbfbf"}}),r[3]||(r[3]=i("div",{style:{"margin-top":"16px","font-size":"16px",color:"#595959"}},"VNC 服务未启动",-1)),r[4]||(r[4]=i("div",{style:{"margin-top":"8px",color:"#8c8c8c"}},[d(" 请确保启动时包含 "),i("code",null,"-vnc"),d(" 参数,并已安装 x11vnc ")],-1))])):(a(),g("div",te,[c(v(k),{style:{"font-size":"64px",color:"#bfbfbf"}}),r[1]||(r[1]=i("div",{style:{"margin-top":"16px","font-size":"16px",color:"#595959"}},"程序未使用虚拟显示器运行",-1)),r[2]||(r[2]=i("div",{style:{"margin-top":"8px",color:"#8c8c8c"}},[d(" VNC 远程显示功能仅在 Linux 环境下使用 "),i("code",null,"-xvfb -vnc"),d(" 参数启动时可用 ")],-1))]))]),_:1})]),_:1})}}};export{de as default}; diff --git a/webui/dist/assets/display.js b/webui/dist/assets/display.js new file mode 100644 index 0000000..0d11ba8 --- /dev/null +++ b/webui/dist/assets/display.js @@ -0,0 +1 @@ +import{c,I as P,k as I,r as m,o as T,a as U,b as f,d as a,w as s,j as g,g as i,f as y,u as v,h as d,e as M,t as z,R as G,q as J}from"./index.js";import{D as C}from"./DesktopOutlined.js";var Q={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M326 664H104c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h174v176c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V696c0-17.7-14.3-32-32-32zm16-576h-48c-8.8 0-16 7.2-16 16v176H104c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h222c17.7 0 32-14.3 32-32V104c0-8.8-7.2-16-16-16zm578 576H698c-17.7 0-32 14.3-32 32v224c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V744h174c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16zm0-384H746V104c0-8.8-7.2-16-16-16h-48c-8.8 0-16 7.2-16 16v224c0 17.7 14.3 32 32 32h222c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16z"}}]},name:"compress",theme:"outlined"};function $(n){for(var e=1;eimport("./rfb.js"),[])).default);const r=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/admin/vnc?token=${e.token}`;u=new V(x.value,r,{wsProtocols:["binary"]}),u.scaleViewport=!0,u.clipViewport=!1,u.resizeSession=!1,u.addEventListener("connect",()=>{o.value="connected"}),u.addEventListener("disconnect",_=>{o.value="disconnected",_.detail.clean===!1&&(b.value="连接意外断开"),u=null}),u.addEventListener("credentialsrequired",()=>{u.sendCredentials({password:""})})}catch(p){o.value="error",b.value=p.message||"连接失败"}}}function N(){u&&(u.disconnect(),u=null),o.value="disconnected"}function F(){x.value&&(document.fullscreenElement?(document.exitFullscreen(),h.value=!1):(x.value.requestFullscreen(),h.value=!0))}function D(){h.value=!!document.fullscreenElement}return T(async()=>{await j(),document.addEventListener("fullscreenchange",D)}),U(()=>{N(),document.removeEventListener("fullscreenchange",D)}),(p,r)=>{const _=y("a-spin"),O=y("a-tag"),w=y("a-button"),A=y("a-space"),R=y("a-card"),q=y("a-layout");return a(),f(q,{style:{background:"transparent"}},{default:s(()=>[c(R,{title:"虚拟显示器",bordered:!1,style:{height:"100%"}},{default:s(()=>[t.value?(a(),g("div",ee,[c(_,{size:"large"}),r[0]||(r[0]=i("div",{style:{"margin-top":"16px",color:"#8c8c8c"}},"正在检查 VNC 状态...",-1))])):l.value?.xvfbMode?l.value?.enabled?(a(),g("div",oe,[i("div",re,[i("div",null,[o.value==="connected"?(a(),f(O,{key:0,color:"success"},{default:s(()=>[...r[5]||(r[5]=[d("已连接",-1)])]),_:1})):o.value==="connecting"?(a(),f(O,{key:1,color:"processing"},{default:s(()=>[...r[6]||(r[6]=[d("连接中...",-1)])]),_:1})):o.value==="error"?(a(),f(O,{key:2,color:"error"},{default:s(()=>[...r[7]||(r[7]=[d("连接错误",-1)])]),_:1})):(a(),f(O,{key:3,color:"default"},{default:s(()=>[...r[8]||(r[8]=[d("未连接",-1)])]),_:1})),b.value?(a(),g("span",le,z(b.value),1)):M("",!0)]),c(A,null,{default:s(()=>[o.value!=="connected"?(a(),f(w,{key:0,type:"primary",onClick:B,loading:o.value==="connecting"},{icon:s(()=>[c(v(C))]),default:s(()=>[r[9]||(r[9]=d(" 连接 ",-1))]),_:1},8,["loading"])):(a(),f(w,{key:1,danger:"",onClick:N},{icon:s(()=>[c(v(k))]),default:s(()=>[r[10]||(r[10]=d(" 断开 ",-1))]),_:1})),c(w,{onClick:F,disabled:o.value!=="connected"},{icon:s(()=>[h.value?(a(),f(v(E),{key:0})):(a(),f(v(S),{key:1}))]),_:1},8,["disabled"]),c(w,{onClick:j},{icon:s(()=>[c(v(G))]),_:1})]),_:1})]),i("div",{ref_key:"vncContainer",ref:x,style:{width:"100%","aspect-ratio":"16/9","min-height":"400px","max-height":"70vh",background:"#000","border-radius":"8px",overflow:"hidden"}},[o.value==="disconnected"?(a(),g("div",ae,[i("div",ce,[c(v(C),{style:{"font-size":"48px",color:"#434343"}}),r[11]||(r[11]=i("div",{style:{"margin-top":"16px"}},'点击"连接"按钮查看远程显示器',-1))])])):M("",!0)],512),i("div",se," 显示器: "+z(l.value.display)+" | VNC 端口: "+z(l.value.port),1)])):(a(),g("div",ne,[c(v(C),{style:{"font-size":"64px",color:"#bfbfbf"}}),r[3]||(r[3]=i("div",{style:{"margin-top":"16px","font-size":"16px",color:"#595959"}},"VNC 服务未启动",-1)),r[4]||(r[4]=i("div",{style:{"margin-top":"8px",color:"#8c8c8c"}},[d(" 请确保启动时包含 "),i("code",null,"-vnc"),d(" 参数,并已安装 x11vnc ")],-1))])):(a(),g("div",te,[c(v(k),{style:{"font-size":"64px",color:"#bfbfbf"}}),r[1]||(r[1]=i("div",{style:{"margin-top":"16px","font-size":"16px",color:"#595959"}},"程序未使用虚拟显示器运行",-1)),r[2]||(r[2]=i("div",{style:{"margin-top":"8px",color:"#8c8c8c"}},[d(" VNC 远程显示功能仅在 Linux 环境下使用 "),i("code",null,"-xvfb -vnc"),d(" 参数启动时可用 ")],-1))]))]),_:1})]),_:1})}}};export{de as default}; diff --git a/webui/dist/assets/index-BVr8U7Bl.css b/webui/dist/assets/index.css similarity index 100% rename from webui/dist/assets/index-BVr8U7Bl.css rename to webui/dist/assets/index.css diff --git a/webui/dist/assets/index-BgSomuu7.js b/webui/dist/assets/index.js similarity index 99% rename from webui/dist/assets/index-BgSomuu7.js rename to webui/dist/assets/index.js index c0ce8a8..b93e4c2 100644 --- a/webui/dist/assets/index-BgSomuu7.js +++ b/webui/dist/assets/index.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dash-9gu6BYeT.js","assets/system-CbLTf1UP.js","assets/DesktopOutlined-uy4U7g8U.js","assets/server-BMslIr7R.js","assets/server-D1vV5anY.css","assets/display-Dhk_8lAp.js","assets/cache-B7UW2VhI.js","assets/logs-DZX_S7jR.js","assets/logs-lIVamK0l.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dash.js","assets/system.js","assets/DesktopOutlined.js","assets/server.js","assets/server.css","assets/display.js","assets/cache.js","assets/logs.js","assets/logs.css"])))=>i.map(i=>d[i]); (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&o(l)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();const e7="modulepreload",t7=function(e){return"/"+e},K1={},ii=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){let s=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),a=l?.nonce||l?.getAttribute("nonce");r=s(n.map(c=>{if(c=t7(c),c in K1)return;K1[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const p=document.createElement("link");if(p.rel=u?"stylesheet":e7,u||(p.as="script"),p.crossOrigin="",p.href=c,a&&p.setAttribute("nonce",a),document.head.appendChild(p),u)return new Promise((g,v)=>{p.addEventListener("load",g),p.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(l){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=l,window.dispatchEvent(a),!a.defaultPrevented)throw l}return r.then(l=>{for(const a of l||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};function t0(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const At={},ga=[],gr=()=>{},G3=()=>!1,Xf=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),n0=e=>e.startsWith("onUpdate:"),dn=Object.assign,o0=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},n7=Object.prototype.hasOwnProperty,It=(e,t)=>n7.call(e,t),it=Array.isArray,ha=e=>Uf(e)==="[object Map]",X3=e=>Uf(e)==="[object Set]",st=e=>typeof e=="function",Xt=e=>typeof e=="string",Ai=e=>typeof e=="symbol",Nt=e=>e!==null&&typeof e=="object",U3=e=>(Nt(e)||st(e))&&st(e.then)&&st(e.catch),Y3=Object.prototype.toString,Uf=e=>Y3.call(e),o7=e=>Uf(e).slice(8,-1),q3=e=>Uf(e)==="[object Object]",Yf=e=>Xt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Is=t0(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),qf=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},r7=/-\w/g,Ao=qf(e=>e.replace(r7,t=>t.slice(1).toUpperCase())),i7=/\B([A-Z])/g,Al=qf(e=>e.replace(i7,"-$1").toLowerCase()),Zf=qf(e=>e.charAt(0).toUpperCase()+e.slice(1)),_g=qf(e=>e?`on${Zf(e)}`:""),wi=(e,t)=>!Object.is(e,t),Ag=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},l7=e=>{const t=parseFloat(e);return isNaN(t)?e:t},a7=e=>{const t=Xt(e)?Number(e):NaN;return isNaN(t)?e:t};let G1;const Qf=()=>G1||(G1=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Jf(e){if(it(e)){const t={};for(let n=0;n{if(n){const o=n.split(c7);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function r0(e){let t="";if(Xt(e))t=e;else if(it(e))for(let n=0;n!!(e&&e.__v_isRef===!0),ao=e=>Xt(e)?e:e==null?"":it(e)||Nt(e)&&(e.toString===Y3||!st(e.toString))?J3(e)?ao(e.value):JSON.stringify(e,e4,2):String(e),e4=(e,t)=>J3(t)?e4(e,t.value):ha(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,r],i)=>(n[Rg(o,i)+" =>"]=r,n),{})}:X3(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Rg(n))}:Ai(t)?Rg(t):Nt(t)&&!it(t)&&!q3(t)?String(t):t,Rg=(e,t="")=>{var n;return Ai(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let Pn;class t4{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Pn,!t&&Pn&&(this.index=(Pn.scopes||(Pn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0&&(Pn=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n0)return;if(Es){let t=Es;for(Es=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Ts;){let t=Ts;for(Ts=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function a4(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function s4(e){let t,n=e.depsTail,o=n;for(;o;){const r=o.prevDep;o.version===-1?(o===n&&(n=r),s0(o),g7(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=r}e.deps=t,e.depsTail=n}function dv(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(c4(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function c4(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===ec)||(e.globalVersion=ec,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!dv(e))))return;e.flags|=2;const t=e.dep,n=Lt,o=Wo;Lt=e,Wo=!0;try{a4(e);const r=e.fn(e._value);(t.version===0||wi(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Lt=n,Wo=o,s4(e),e.flags&=-3}}function s0(e,t=!1){const{dep:n,prevSub:o,nextSub:r}=e;if(o&&(o.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)s0(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function g7(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Wo=!0;const u4=[];function Vr(){u4.push(Wo),Wo=!1}function Wr(){const e=u4.pop();Wo=e===void 0?!0:e}function X1(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Lt;Lt=void 0;try{t()}finally{Lt=n}}}let ec=0,h7=class{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}};class c0{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Lt||!Wo||Lt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Lt)n=this.activeLink=new h7(Lt,this),Lt.deps?(n.prevDep=Lt.depsTail,Lt.depsTail.nextDep=n,Lt.depsTail=n):Lt.deps=Lt.depsTail=n,d4(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=Lt.depsTail,n.nextDep=void 0,Lt.depsTail.nextDep=n,Lt.depsTail=n,Lt.deps===n&&(Lt.deps=o)}return n}trigger(t){this.version++,ec++,this.notify(t)}notify(t){l0();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{a0()}}}function d4(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)d4(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const kd=new WeakMap,dl=Symbol(""),fv=Symbol(""),tc=Symbol("");function Tn(e,t,n){if(Wo&&Lt){let o=kd.get(e);o||kd.set(e,o=new Map);let r=o.get(n);r||(o.set(n,r=new c0),r.map=o,r.key=n),r.track()}}function Rr(e,t,n,o,r,i){const l=kd.get(e);if(!l){ec++;return}const a=s=>{s&&s.trigger()};if(l0(),t==="clear")l.forEach(a);else{const s=it(e),c=s&&Yf(n);if(s&&n==="length"){const u=Number(o);l.forEach((d,p)=>{(p==="length"||p===tc||!Ai(p)&&p>=u)&&a(d)})}else switch((n!==void 0||l.has(void 0))&&a(l.get(n)),c&&a(l.get(tc)),t){case"add":s?c&&a(l.get("length")):(a(l.get(dl)),ha(e)&&a(l.get(fv)));break;case"delete":s||(a(l.get(dl)),ha(e)&&a(l.get(fv)));break;case"set":ha(e)&&a(l.get(dl));break}}a0()}function v7(e,t){const n=kd.get(e);return n&&n.get(t)}function Gl(e){const t=Je(e);return t===e?t:(Tn(t,"iterate",tc),go(e)?t:t.map(Uo))}function ep(e){return Tn(e=Je(e),"iterate",tc),e}function fi(e,t){return Kr(e)?Hr(e)?Ma(Uo(t)):Ma(t):Uo(t)}const m7={__proto__:null,[Symbol.iterator](){return Ng(this,Symbol.iterator,e=>fi(this,e))},concat(...e){return Gl(this).concat(...e.map(t=>it(t)?Gl(t):t))},entries(){return Ng(this,"entries",e=>(e[1]=fi(this,e[1]),e))},every(e,t){return xr(this,"every",e,t,void 0,arguments)},filter(e,t){return xr(this,"filter",e,t,n=>n.map(o=>fi(this,o)),arguments)},find(e,t){return xr(this,"find",e,t,n=>fi(this,n),arguments)},findIndex(e,t){return xr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return xr(this,"findLast",e,t,n=>fi(this,n),arguments)},findLastIndex(e,t){return xr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return xr(this,"forEach",e,t,void 0,arguments)},includes(...e){return Bg(this,"includes",e)},indexOf(...e){return Bg(this,"indexOf",e)},join(e){return Gl(this).join(e)},lastIndexOf(...e){return Bg(this,"lastIndexOf",e)},map(e,t){return xr(this,"map",e,t,void 0,arguments)},pop(){return us(this,"pop")},push(...e){return us(this,"push",e)},reduce(e,...t){return U1(this,"reduce",e,t)},reduceRight(e,...t){return U1(this,"reduceRight",e,t)},shift(){return us(this,"shift")},some(e,t){return xr(this,"some",e,t,void 0,arguments)},splice(...e){return us(this,"splice",e)},toReversed(){return Gl(this).toReversed()},toSorted(e){return Gl(this).toSorted(e)},toSpliced(...e){return Gl(this).toSpliced(...e)},unshift(...e){return us(this,"unshift",e)},values(){return Ng(this,"values",e=>fi(this,e))}};function Ng(e,t,n){const o=ep(e),r=o[t]();return o!==e&&!go(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=n(i.value)),i}),r}const b7=Array.prototype;function xr(e,t,n,o,r,i){const l=ep(e),a=l!==e&&!go(e),s=l[t];if(s!==b7[t]){const d=s.apply(e,i);return a?Uo(d):d}let c=n;l!==e&&(a?c=function(d,p){return n.call(this,fi(e,d),p,e)}:n.length>2&&(c=function(d,p){return n.call(this,d,p,e)}));const u=s.call(l,c,o);return a&&r?r(u):u}function U1(e,t,n,o){const r=ep(e);let i=n;return r!==e&&(go(e)?n.length>3&&(i=function(l,a,s){return n.call(this,l,a,s,e)}):i=function(l,a,s){return n.call(this,l,fi(e,a),s,e)}),r[t](i,...o)}function Bg(e,t,n){const o=Je(e);Tn(o,"iterate",tc);const r=o[t](...n);return(r===-1||r===!1)&&tp(n[0])?(n[0]=Je(n[0]),o[t](...n)):r}function us(e,t,n=[]){Vr(),l0();const o=Je(e)[t].apply(e,n);return a0(),Wr(),o}const y7=t0("__proto__,__v_isRef,__isVue"),f4=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ai));function S7(e){Ai(e)||(e=String(e));const t=Je(this);return Tn(t,"has",e),t.hasOwnProperty(e)}class p4{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return o===(r?i?M7:m4:i?v4:h4).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const l=it(t);if(!r){let s;if(l&&(s=m7[n]))return s;if(n==="hasOwnProperty")return S7}const a=Reflect.get(t,n,Ht(t)?t:o);if((Ai(n)?f4.has(n):y7(n))||(r||Tn(t,"get",n),i))return a;if(Ht(a)){const s=l&&Yf(n)?a:a.value;return r&&Nt(s)?gv(s):s}return Nt(a)?r?gv(a):ut(a):a}}class g4 extends p4{constructor(t=!1){super(!1,t)}set(t,n,o,r){let i=t[n];const l=it(t)&&Yf(n);if(!this._isShallow){const c=Kr(i);if(!go(o)&&!Kr(o)&&(i=Je(i),o=Je(o)),!l&&Ht(i)&&!Ht(o))return c||(i.value=o),!0}const a=l?Number(n)e,tu=e=>Reflect.getPrototypeOf(e);function O7(e,t,n){return function(...o){const r=this.__v_raw,i=Je(r),l=ha(i),a=e==="entries"||e===Symbol.iterator&&l,s=e==="keys"&&l,c=r[e](...o),u=n?pv:t?Ma:Uo;return!t&&Tn(i,"iterate",s?fv:dl),{next(){const{value:d,done:p}=c.next();return p?{value:d,done:p}:{value:a?[u(d[0]),u(d[1])]:u(d),done:p}},[Symbol.iterator](){return this}}}}function nu(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function P7(e,t){const n={get(r){const i=this.__v_raw,l=Je(i),a=Je(r);e||(wi(r,a)&&Tn(l,"get",r),Tn(l,"get",a));const{has:s}=tu(l),c=t?pv:e?Ma:Uo;if(s.call(l,r))return c(i.get(r));if(s.call(l,a))return c(i.get(a));i!==l&&i.get(r)},get size(){const r=this.__v_raw;return!e&&Tn(Je(r),"iterate",dl),r.size},has(r){const i=this.__v_raw,l=Je(i),a=Je(r);return e||(wi(r,a)&&Tn(l,"has",r),Tn(l,"has",a)),r===a?i.has(r):i.has(r)||i.has(a)},forEach(r,i){const l=this,a=l.__v_raw,s=Je(a),c=t?pv:e?Ma:Uo;return!e&&Tn(s,"iterate",dl),a.forEach((u,d)=>r.call(i,c(u),c(d),l))}};return dn(n,e?{add:nu("add"),set:nu("set"),delete:nu("delete"),clear:nu("clear")}:{add(r){!t&&!go(r)&&!Kr(r)&&(r=Je(r));const i=Je(this);return tu(i).has.call(i,r)||(i.add(r),Rr(i,"add",r,r)),this},set(r,i){!t&&!go(i)&&!Kr(i)&&(i=Je(i));const l=Je(this),{has:a,get:s}=tu(l);let c=a.call(l,r);c||(r=Je(r),c=a.call(l,r));const u=s.call(l,r);return l.set(r,i),c?wi(i,u)&&Rr(l,"set",r,i):Rr(l,"add",r,i),this},delete(r){const i=Je(this),{has:l,get:a}=tu(i);let s=l.call(i,r);s||(r=Je(r),s=l.call(i,r)),a&&a.call(i,r);const c=i.delete(r);return s&&Rr(i,"delete",r,void 0),c},clear(){const r=Je(this),i=r.size!==0,l=r.clear();return i&&Rr(r,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=O7(r,e,t)}),n}function u0(e,t){const n=P7(e,t);return(o,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?o:Reflect.get(It(n,r)&&r in o?n:o,r,i)}const I7={get:u0(!1,!1)},T7={get:u0(!1,!0)},E7={get:u0(!0,!1)};const h4=new WeakMap,v4=new WeakMap,m4=new WeakMap,M7=new WeakMap;function _7(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function A7(e){return e.__v_skip||!Object.isExtensible(e)?0:_7(o7(e))}function ut(e){return Kr(e)?e:d0(e,!1,C7,I7,h4)}function b4(e){return d0(e,!1,w7,T7,v4)}function gv(e){return d0(e,!0,x7,E7,m4)}function d0(e,t,n,o,r){if(!Nt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=A7(e);if(i===0)return e;const l=r.get(e);if(l)return l;const a=new Proxy(e,i===2?o:n);return r.set(e,a),a}function Hr(e){return Kr(e)?Hr(e.__v_raw):!!(e&&e.__v_isReactive)}function Kr(e){return!!(e&&e.__v_isReadonly)}function go(e){return!!(e&&e.__v_isShallow)}function tp(e){return e?!!e.__v_raw:!1}function Je(e){const t=e&&e.__v_raw;return t?Je(t):e}function f0(e){return!It(e,"__v_skip")&&Object.isExtensible(e)&&Z3(e,"__v_skip",!0),e}const Uo=e=>Nt(e)?ut(e):e,Ma=e=>Nt(e)?gv(e):e;function Ht(e){return e?e.__v_isRef===!0:!1}function re(e){return y4(e,!1)}function oe(e){return y4(e,!0)}function y4(e,t){return Ht(e)?e:new R7(e,t)}class R7{constructor(t,n){this.dep=new c0,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Je(t),this._value=n?t:Uo(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||go(t)||Kr(t);t=o?t:Je(t),wi(t,n)&&(this._rawValue=t,this._value=o?t:Uo(t),this.dep.trigger())}}function S4(e){e.dep&&e.dep.trigger()}function gt(e){return Ht(e)?e.value:e}const D7={get:(e,t,n)=>t==="__v_raw"?e:gt(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return Ht(r)&&!Ht(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function $4(e){return Hr(e)?e:new Proxy(e,D7)}function Ko(e){const t=it(e)?new Array(e.length):{};for(const n in e)t[n]=C4(e,n);return t}class N7{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0,this._raw=Je(t);let r=!0,i=t;if(!it(t)||!Yf(String(n)))do r=!tp(i)||go(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=gt(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Ht(this._raw[this._key])){const n=this._object[this._key];if(Ht(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return v7(this._raw,this._key)}}class B7{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function ze(e,t,n){return Ht(e)?e:st(e)?new B7(e):Nt(e)&&arguments.length>1?C4(e,t,n):re(e)}function C4(e,t,n){return new N7(e,t,n)}class k7{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new c0(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ec-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&Lt!==this)return l4(this,!0),!0}get value(){const t=this.dep.track();return c4(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function F7(e,t,n=!1){let o,r;return st(e)?o=e:(o=e.get,r=e.set),new k7(o,r,n)}const ou={},Fd=new WeakMap;let Zi;function L7(e,t=!1,n=Zi){if(n){let o=Fd.get(n);o||Fd.set(n,o=[]),o.push(e)}}function z7(e,t,n=At){const{immediate:o,deep:r,once:i,scheduler:l,augmentJob:a,call:s}=n,c=x=>r?x:go(x)||r===!1||r===0?Dr(x,1):Dr(x);let u,d,p,g,v=!1,h=!1;if(Ht(e)?(d=()=>e.value,v=go(e)):Hr(e)?(d=()=>c(e),v=!0):it(e)?(h=!0,v=e.some(x=>Hr(x)||go(x)),d=()=>e.map(x=>{if(Ht(x))return x.value;if(Hr(x))return c(x);if(st(x))return s?s(x,2):x()})):st(e)?t?d=s?()=>s(e,2):e:d=()=>{if(p){Vr();try{p()}finally{Wr()}}const x=Zi;Zi=u;try{return s?s(e,3,[g]):e(g)}finally{Zi=x}}:d=gr,t&&r){const x=d,C=r===!0?1/0:r;d=()=>Dr(x(),C)}const b=i0(),y=()=>{u.stop(),b&&b.active&&o0(b.effects,u)};if(i&&t){const x=t;t=(...C)=>{x(...C),y()}}let S=h?new Array(e.length).fill(ou):ou;const $=x=>{if(!(!(u.flags&1)||!u.dirty&&!x))if(t){const C=u.run();if(r||v||(h?C.some((O,w)=>wi(O,S[w])):wi(C,S))){p&&p();const O=Zi;Zi=u;try{const w=[C,S===ou?void 0:h&&S[0]===ou?[]:S,g];S=C,s?s(t,3,w):t(...w)}finally{Zi=O}}}else u.run()};return a&&a($),u=new r4(d),u.scheduler=l?()=>l($,!1):$,g=x=>L7(x,!1,u),p=u.onStop=()=>{const x=Fd.get(u);if(x){if(s)s(x,4);else for(const C of x)C();Fd.delete(u)}},t?o?$(!0):S=u.run():l?l($.bind(null,!0),!0):u.run(),y.pause=u.pause.bind(u),y.resume=u.resume.bind(u),y.stop=y,y}function Dr(e,t=1/0,n){if(t<=0||!Nt(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ht(e))Dr(e.value,t,n);else if(it(e))for(let o=0;o{Dr(o,t,n)});else if(q3(e)){for(const o in e)Dr(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&Dr(e[o],t,n)}return e}function Mc(e,t,n,o){try{return o?e(...o):e()}catch(r){np(r,t,n)}}function Yo(e,t,n,o){if(st(e)){const r=Mc(e,t,n,o);return r&&U3(r)&&r.catch(i=>{np(i,t,n)}),r}if(it(e)){const r=[];for(let i=0;i>>1,r=Vn[o],i=nc(r);i=nc(n)?Vn.push(e):Vn.splice(j7(t),0,e),e.flags|=1,w4()}}function w4(){Ld||(Ld=x4.then(P4))}function V7(e){it(e)?va.push(...e):pi&&e.id===-1?pi.splice(na+1,0,e):e.flags&1||(va.push(e),e.flags|=1),w4()}function Y1(e,t,n=cr+1){for(;nnc(n)-nc(o));if(va.length=0,pi){pi.push(...t);return}for(pi=t,na=0;nae.id==null?e.flags&2?-1:1/0:e.id;function P4(e){try{for(cr=0;cr{o._d&&Vd(-1);const i=zd(t);let l;try{l=e(...r)}finally{zd(i),o._d&&Vd(1)}return l};return o._n=!0,o._c=!0,o._d=!0,o}function An(e,t){if(uo===null)return e;const n=cp(uo),o=e.dirs||(e.dirs=[]);for(let r=0;re.__isTeleport,Ms=e=>e&&(e.disabled||e.disabled===""),q1=e=>e&&(e.defer||e.defer===""),Z1=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Q1=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,hv=(e,t)=>{const n=e&&e.to;return Xt(n)?t?t(n):null:n},M4={name:"Teleport",__isTeleport:!0,process(e,t,n,o,r,i,l,a,s,c){const{mc:u,pc:d,pbc:p,o:{insert:g,querySelector:v,createText:h,createComment:b}}=c,y=Ms(t.props);let{shapeFlag:S,children:$,dynamicChildren:x}=t;if(e==null){const C=t.el=h(""),O=t.anchor=h("");g(C,n,o),g(O,n,o);const w=(E,_)=>{S&16&&u($,E,_,r,i,l,a,s)},T=()=>{const E=t.target=hv(t.props,v),_=_4(E,t,h,g);E&&(l!=="svg"&&Z1(E)?l="svg":l!=="mathml"&&Q1(E)&&(l="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(E),y||(w(E,_),Hu(t,!1)))};y&&(w(n,O),Hu(t,!0)),q1(t.props)?(t.el.__isMounted=!1,zn(()=>{T(),delete t.el.__isMounted},i)):T()}else{if(q1(t.props)&&e.el.__isMounted===!1){zn(()=>{M4.process(e,t,n,o,r,i,l,a,s,c)},i);return}t.el=e.el,t.targetStart=e.targetStart;const C=t.anchor=e.anchor,O=t.target=e.target,w=t.targetAnchor=e.targetAnchor,T=Ms(e.props),E=T?n:O,_=T?C:w;if(l==="svg"||Z1(O)?l="svg":(l==="mathml"||Q1(O))&&(l="mathml"),x?(p(e.dynamicChildren,x,E,r,i,l,a),y0(e,t,!0)):s||d(e,t,E,_,r,i,l,a,!1),y)T?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ru(t,n,C,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const M=t.target=hv(t.props,v);M&&ru(t,M,null,c,0)}else T&&ru(t,O,w,c,1);Hu(t,y)}},remove(e,t,n,{um:o,o:{remove:r}},i){const{shapeFlag:l,children:a,anchor:s,targetStart:c,targetAnchor:u,target:d,props:p}=e;if(d&&(r(c),r(u)),i&&r(s),l&16){const g=i||!Ms(p);for(let v=0;v{e.isMounted=!0}),Qe(()=>{e.isUnmounting=!0}),e}const xo=[Function,Array],R4={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:xo,onEnter:xo,onAfterEnter:xo,onEnterCancelled:xo,onBeforeLeave:xo,onLeave:xo,onAfterLeave:xo,onLeaveCancelled:xo,onBeforeAppear:xo,onAppear:xo,onAfterAppear:xo,onAppearCancelled:xo},D4=e=>{const t=e.subTree;return t.component?D4(t.component):t},K7={name:"BaseTransition",props:R4,setup(e,{slots:t}){const n=vn(),o=A4();return()=>{const r=t.default&&h0(t.default(),!0);if(!r||!r.length)return;const i=N4(r),l=Je(e),{mode:a}=l;if(o.isLeaving)return kg(i);const s=J1(i);if(!s)return kg(i);let c=oc(s,l,o,n,d=>c=d);s.type!==Sn&&xl(s,c);let u=n.subTree&&J1(n.subTree);if(u&&u.type!==Sn&&!el(u,s)&&D4(n).type!==Sn){let d=oc(u,l,o,n);if(xl(u,d),a==="out-in"&&s.type!==Sn)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},kg(i);a==="in-out"&&s.type!==Sn?d.delayLeave=(p,g,v)=>{const h=B4(o,u);h[String(u.key)]=u,p[Ar]=()=>{g(),p[Ar]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{v(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function N4(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Sn){t=n;break}}return t}const G7=K7;function B4(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function oc(e,t,n,o,r){const{appear:i,mode:l,persisted:a=!1,onBeforeEnter:s,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:p,onLeave:g,onAfterLeave:v,onLeaveCancelled:h,onBeforeAppear:b,onAppear:y,onAfterAppear:S,onAppearCancelled:$}=t,x=String(e.key),C=B4(n,e),O=(E,_)=>{E&&Yo(E,o,9,_)},w=(E,_)=>{const M=_[1];O(E,_),it(E)?E.every(A=>A.length<=1)&&M():E.length<=1&&M()},T={mode:l,persisted:a,beforeEnter(E){let _=s;if(!n.isMounted)if(i)_=b||s;else return;E[Ar]&&E[Ar](!0);const M=C[x];M&&el(e,M)&&M.el[Ar]&&M.el[Ar](),O(_,[E])},enter(E){let _=c,M=u,A=d;if(!n.isMounted)if(i)_=y||c,M=S||u,A=$||d;else return;let R=!1;const L=E[iu]=P=>{R||(R=!0,P?O(A,[E]):O(M,[E]),T.delayedLeave&&T.delayedLeave(),E[iu]=void 0)};_?w(_,[E,L]):L()},leave(E,_){const M=String(e.key);if(E[iu]&&E[iu](!0),n.isUnmounting)return _();O(p,[E]);let A=!1;const R=E[Ar]=L=>{A||(A=!0,_(),L?O(h,[E]):O(v,[E]),E[Ar]=void 0,C[M]===e&&delete C[M])};C[M]=e,g?w(g,[E,R]):R()},clone(E){const _=oc(E,t,n,o,r);return r&&r(_),_}};return T}function kg(e){if(op(e))return e=fn(e),e.children=null,e}function J1(e){if(!op(e))return E4(e.type)&&e.children?N4(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&st(n.default))return n.default()}}function xl(e,t){e.shapeFlag&6&&e.component?(e.transition=t,xl(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function h0(e,t=!1,n){let o=[],r=0;for(let i=0;i1)for(let i=0;i_s(v,t&&(it(t)?t[h]:t),n,o,r));return}if(As(o)&&!r){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&_s(e,t,n,o.component.subTree);return}const i=o.shapeFlag&4?cp(o.component):o.el,l=r?null:i,{i:a,r:s}=e,c=t&&t.r,u=a.refs===At?a.refs={}:a.refs,d=a.setupState,p=Je(d),g=d===At?G3:v=>It(p,v);if(c!=null&&c!==s){if(eS(t),Xt(c))u[c]=null,g(c)&&(d[c]=null);else if(Ht(c)){c.value=null;const v=t;v.k&&(u[v.k]=null)}}if(st(s))Mc(s,a,12,[l,u]);else{const v=Xt(s),h=Ht(s);if(v||h){const b=()=>{if(e.f){const y=v?g(s)?d[s]:u[s]:s.value;if(r)it(y)&&o0(y,i);else if(it(y))y.includes(i)||y.push(i);else if(v)u[s]=[i],g(s)&&(d[s]=u[s]);else{const S=[i];s.value=S,e.k&&(u[e.k]=S)}}else v?(u[s]=l,g(s)&&(d[s]=l)):h&&(s.value=l,e.k&&(u[e.k]=l))};if(l){const y=()=>{b(),Hd.delete(e)};y.id=-1,Hd.set(e,y),zn(y,n)}else eS(e),b()}}}function eS(e){const t=Hd.get(e);t&&(t.flags|=8,Hd.delete(e))}Qf().requestIdleCallback;Qf().cancelIdleCallback;const As=e=>!!e.type.__asyncLoader,op=e=>e.type.__isKeepAlive;function rp(e,t){L4(e,"a",t)}function F4(e,t){L4(e,"da",t)}function L4(e,t,n=Mn){const o=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(ip(t,o,n),n){let r=n.parent;for(;r&&r.parent;)op(r.parent.vnode)&&X7(o,t,n,r),r=r.parent}}function X7(e,t,n,o){const r=ip(t,e,o,!0);wn(()=>{o0(o[t],r)},n)}function ip(e,t,n=Mn,o=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...l)=>{Vr();const a=_c(n),s=Yo(t,n,e,l);return a(),Wr(),s});return o?r.unshift(i):r.push(i),i}}const qr=e=>(t,n=Mn)=>{(!ic||e==="sp")&&ip(e,(...o)=>t(...o),n)},lp=qr("bm"),We=qr("m"),ap=qr("bu"),Bn=qr("u"),Qe=qr("bum"),wn=qr("um"),U7=qr("sp"),Y7=qr("rtg"),q7=qr("rtc");function Z7(e,t=Mn){ip("ec",e,t)}const z4="components",Q7="directives";function _t(e,t){return H4(z4,e,!0,t)||e}const J7=Symbol.for("v-ndc");function eM(e){return H4(Q7,e)}function H4(e,t,n=!0,o=!1){const r=uo||Mn;if(r){const i=r.type;if(e===z4){const a=VM(i,!1);if(a&&(a===t||a===Ao(t)||a===Zf(Ao(t))))return i}const l=tS(r[e]||i[e],t)||tS(r.appContext[e],t);return!l&&o?i:l}}function tS(e,t){return e&&(e[t]||e[Ao(t)]||e[Zf(Ao(t))])}function lu(e,t,n,o){let r;const i=n,l=it(e);if(l||Xt(e)){const a=l&&Hr(e);let s=!1,c=!1;a&&(s=!go(e),c=Kr(e),e=ep(e)),r=new Array(e.length);for(let u=0,d=e.length;ut(a,s,void 0,i));else{const a=Object.keys(e);r=new Array(a.length);for(let s=0,c=a.length;se?iO(e)?cp(e):vv(e.parent):null,Rs=dn(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>vv(e.parent),$root:e=>vv(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>V4(e),$forceUpdate:e=>e.f||(e.f=()=>{p0(e.update)}),$nextTick:e=>e.n||(e.n=rt.bind(e.proxy)),$watch:e=>gM.bind(e)}),Fg=(e,t)=>e!==At&&!e.__isScriptSetup&&It(e,t),tM={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:r,props:i,accessCache:l,type:a,appContext:s}=e;if(t[0]!=="$"){const p=l[t];if(p!==void 0)switch(p){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(Fg(o,t))return l[t]=1,o[t];if(r!==At&&It(r,t))return l[t]=2,r[t];if(It(i,t))return l[t]=3,i[t];if(n!==At&&It(n,t))return l[t]=4,n[t];mv&&(l[t]=0)}}const c=Rs[t];let u,d;if(c)return t==="$attrs"&&Tn(e.attrs,"get",""),c(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(n!==At&&It(n,t))return l[t]=4,n[t];if(d=s.config.globalProperties,It(d,t))return d[t]},set({_:e},t,n){const{data:o,setupState:r,ctx:i}=e;return Fg(r,t)?(r[t]=n,!0):o!==At&&It(o,t)?(o[t]=n,!0):It(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,props:i,type:l}},a){let s;return!!(n[a]||e!==At&&a[0]!=="$"&&It(e,a)||Fg(t,a)||It(i,a)||It(o,a)||It(Rs,a)||It(r.config.globalProperties,a)||(s=l.__cssModules)&&s[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:It(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function nM(){return oM().attrs}function oM(e){const t=vn();return t.setupContext||(t.setupContext=aO(t))}function nS(e){return it(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let mv=!0;function rM(e){const t=V4(e),n=e.proxy,o=e.ctx;mv=!1,t.beforeCreate&&oS(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:l,watch:a,provide:s,inject:c,created:u,beforeMount:d,mounted:p,beforeUpdate:g,updated:v,activated:h,deactivated:b,beforeDestroy:y,beforeUnmount:S,destroyed:$,unmounted:x,render:C,renderTracked:O,renderTriggered:w,errorCaptured:T,serverPrefetch:E,expose:_,inheritAttrs:M,components:A,directives:R,filters:L}=t;if(c&&iM(c,o,null),l)for(const N in l){const k=l[N];st(k)&&(o[N]=k.bind(n))}if(r){const N=r.call(n,n);Nt(N)&&(e.data=ut(N))}if(mv=!0,i)for(const N in i){const k=i[N],F=st(k)?k.bind(n,n):st(k.get)?k.get.bind(n,n):gr,z=!st(k)&&st(k.set)?k.set.bind(n):gr,H=I({get:F,set:z});Object.defineProperty(o,N,{enumerable:!0,configurable:!0,get:()=>H.value,set:j=>H.value=j})}if(a)for(const N in a)j4(a[N],o,n,N);if(s){const N=st(s)?s.call(n):s;Reflect.ownKeys(N).forEach(k=>{Xe(k,N[k])})}u&&oS(u,e,"c");function D(N,k){it(k)?k.forEach(F=>N(F.bind(n))):k&&N(k.bind(n))}if(D(lp,d),D(We,p),D(ap,g),D(Bn,v),D(rp,h),D(F4,b),D(Z7,T),D(q7,O),D(Y7,w),D(Qe,S),D(wn,x),D(U7,E),it(_))if(_.length){const N=e.exposed||(e.exposed={});_.forEach(k=>{Object.defineProperty(N,k,{get:()=>n[k],set:F=>n[k]=F,enumerable:!0})})}else e.exposed||(e.exposed={});C&&e.render===gr&&(e.render=C),M!=null&&(e.inheritAttrs=M),A&&(e.components=A),R&&(e.directives=R),E&&k4(e)}function iM(e,t,n=gr){it(e)&&(e=bv(e));for(const o in e){const r=e[o];let i;Nt(r)?"default"in r?i=je(r.from||o,r.default,!0):i=je(r.from||o):i=je(r),Ht(i)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[o]=i}}function oS(e,t,n){Yo(it(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function j4(e,t,n,o){let r=o.includes(".")?K4(n,o):()=>n[o];if(Xt(e)){const i=t[e];st(i)&&ye(r,i)}else if(st(e))ye(r,e.bind(n));else if(Nt(e))if(it(e))e.forEach(i=>j4(i,t,n,o));else{const i=st(e.handler)?e.handler.bind(n):t[e.handler];st(i)&&ye(r,i,e)}}function V4(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:l}}=e.appContext,a=i.get(t);let s;return a?s=a:!r.length&&!n&&!o?s=t:(s={},r.length&&r.forEach(c=>jd(s,c,l,!0)),jd(s,t,l)),Nt(t)&&i.set(t,s),s}function jd(e,t,n,o=!1){const{mixins:r,extends:i}=t;i&&jd(e,i,n,!0),r&&r.forEach(l=>jd(e,l,n,!0));for(const l in t)if(!(o&&l==="expose")){const a=lM[l]||n&&n[l];e[l]=a?a(e[l],t[l]):t[l]}return e}const lM={data:rS,props:iS,emits:iS,methods:$s,computed:$s,beforeCreate:Ln,created:Ln,beforeMount:Ln,mounted:Ln,beforeUpdate:Ln,updated:Ln,beforeDestroy:Ln,beforeUnmount:Ln,destroyed:Ln,unmounted:Ln,activated:Ln,deactivated:Ln,errorCaptured:Ln,serverPrefetch:Ln,components:$s,directives:$s,watch:sM,provide:rS,inject:aM};function rS(e,t){return t?e?function(){return dn(st(e)?e.call(this,this):e,st(t)?t.call(this,this):t)}:t:e}function aM(e,t){return $s(bv(e),bv(t))}function bv(e){if(it(e)){const t={};for(let n=0;n1)return n&&st(t)?t.call(o&&o.proxy):t}}function dM(){return!!(vn()||fl)}const fM=Symbol.for("v-scx"),pM=()=>je(fM);function Le(e,t){return v0(e,null,t)}function ye(e,t,n){return v0(e,t,n)}function v0(e,t,n=At){const{immediate:o,deep:r,flush:i,once:l}=n,a=dn({},n),s=t&&o||!t&&i!=="post";let c;if(ic){if(i==="sync"){const g=pM();c=g.__watcherHandles||(g.__watcherHandles=[])}else if(!s){const g=()=>{};return g.stop=gr,g.resume=gr,g.pause=gr,g}}const u=Mn;a.call=(g,v,h)=>Yo(g,u,v,h);let d=!1;i==="post"?a.scheduler=g=>{zn(g,u&&u.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(g,v)=>{v?g():p0(g)}),a.augmentJob=g=>{t&&(g.flags|=4),d&&(g.flags|=2,u&&(g.id=u.uid,g.i=u))};const p=z7(e,t,a);return ic&&(c?c.push(p):s&&p()),p}function gM(e,t,n){const o=this.proxy,r=Xt(e)?e.includes(".")?K4(o,e):()=>o[e]:e.bind(o,o);let i;st(t)?i=t:(i=t.handler,n=t);const l=_c(this),a=v0(r,i.bind(o),n);return l(),a}function K4(e,t){const n=t.split(".");return()=>{let o=e;for(let r=0;rt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ao(t)}Modifiers`]||e[`${Al(t)}Modifiers`];function vM(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||At;let r=n;const i=t.startsWith("update:"),l=i&&hM(o,t.slice(7));l&&(l.trim&&(r=n.map(u=>Xt(u)?u.trim():u)),l.number&&(r=n.map(l7)));let a,s=o[a=_g(t)]||o[a=_g(Ao(t))];!s&&i&&(s=o[a=_g(Al(t))]),s&&Yo(s,e,6,r);const c=o[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Yo(c,e,6,r)}}const mM=new WeakMap;function G4(e,t,n=!1){const o=n?mM:t.emitsCache,r=o.get(e);if(r!==void 0)return r;const i=e.emits;let l={},a=!1;if(!st(e)){const s=c=>{const u=G4(c,t,!0);u&&(a=!0,dn(l,u))};!n&&t.mixins.length&&t.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}return!i&&!a?(Nt(e)&&o.set(e,null),null):(it(i)?i.forEach(s=>l[s]=null):dn(l,i),Nt(e)&&o.set(e,l),l)}function sp(e,t){return!e||!Xf(t)?!1:(t=t.slice(2).replace(/Once$/,""),It(e,t[0].toLowerCase()+t.slice(1))||It(e,Al(t))||It(e,t))}function lS(e){const{type:t,vnode:n,proxy:o,withProxy:r,propsOptions:[i],slots:l,attrs:a,emit:s,render:c,renderCache:u,props:d,data:p,setupState:g,ctx:v,inheritAttrs:h}=e,b=zd(e);let y,S;try{if(n.shapeFlag&4){const x=r||o,C=x;y=fr(c.call(C,x,u,d,g,p,v)),S=a}else{const x=t;y=fr(x.length>1?x(d,{attrs:a,slots:l,emit:s}):x(d,null)),S=t.props?a:bM(a)}}catch(x){Ds.length=0,np(x,e,1),y=f(Sn)}let $=y;if(S&&h!==!1){const x=Object.keys(S),{shapeFlag:C}=$;x.length&&C&7&&(i&&x.some(n0)&&(S=yM(S,i)),$=fn($,S,!1,!0))}return n.dirs&&($=fn($,null,!1,!0),$.dirs=$.dirs?$.dirs.concat(n.dirs):n.dirs),n.transition&&xl($,n.transition),y=$,zd(b),y}const bM=e=>{let t;for(const n in e)(n==="class"||n==="style"||Xf(n))&&((t||(t={}))[n]=e[n]);return t},yM=(e,t)=>{const n={};for(const o in e)(!n0(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function SM(e,t,n){const{props:o,children:r,component:i}=e,{props:l,children:a,patchFlag:s}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&s>=0){if(s&1024)return!0;if(s&16)return o?aS(o,l,c):!!l;if(s&8){const u=t.dynamicProps;for(let d=0;dObject.create(X4),Y4=e=>Object.getPrototypeOf(e)===X4;function CM(e,t,n,o=!1){const r={},i=U4();e.propsDefaults=Object.create(null),q4(e,t,r,i);for(const l in e.propsOptions[0])l in r||(r[l]=void 0);n?e.props=o?r:b4(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function xM(e,t,n,o){const{props:r,attrs:i,vnode:{patchFlag:l}}=e,a=Je(r),[s]=e.propsOptions;let c=!1;if((o||l>0)&&!(l&16)){if(l&8){const u=e.vnode.dynamicProps;for(let d=0;d{s=!0;const[p,g]=Z4(d,t,!0);dn(l,p),g&&a.push(...g)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!s)return Nt(e)&&o.set(e,ga),ga;if(it(i))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",b0=e=>it(e)?e.map(fr):[fr(e)],OM=(e,t,n)=>{if(t._n)return t;const o=tt((...r)=>b0(t(...r)),n);return o._c=!1,o},Q4=(e,t,n)=>{const o=e._ctx;for(const r in e){if(m0(r))continue;const i=e[r];if(st(i))t[r]=OM(r,i,o);else if(i!=null){const l=b0(i);t[r]=()=>l}}},J4=(e,t)=>{const n=b0(t);e.slots.default=()=>n},eO=(e,t,n)=>{for(const o in t)(n||!m0(o))&&(e[o]=t[o])},PM=(e,t,n)=>{const o=e.slots=U4();if(e.vnode.shapeFlag&32){const r=t._;r?(eO(o,t,n),n&&Z3(o,"_",r,!0)):Q4(t,o)}else t&&J4(e,t)},IM=(e,t,n)=>{const{vnode:o,slots:r}=e;let i=!0,l=At;if(o.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:eO(r,t,n):(i=!t.$stable,Q4(t,r)),l=t}else t&&(J4(e,t),l={default:1});if(i)for(const a in r)!m0(a)&&l[a]==null&&delete r[a]},zn=AM;function TM(e){return EM(e)}function EM(e,t){const n=Qf();n.__VUE__=!0;const{insert:o,remove:r,patchProp:i,createElement:l,createText:a,createComment:s,setText:c,setElementText:u,parentNode:d,nextSibling:p,setScopeId:g=gr,insertStaticContent:v}=e,h=(V,K,te,ue=null,le=null,ne=null,ce=void 0,se=null,pe=!!K.dynamicChildren)=>{if(V===K)return;V&&!el(V,K)&&(ue=X(V),j(V,le,ne,!0),V=null),K.patchFlag===-2&&(pe=!1,K.dynamicChildren=null);const{type:ge,ref:he,shapeFlag:me}=K;switch(ge){case Ri:b(V,K,te,ue);break;case Sn:y(V,K,te,ue);break;case zg:V==null&&S(K,te,ue,ce);break;case He:A(V,K,te,ue,le,ne,ce,se,pe);break;default:me&1?C(V,K,te,ue,le,ne,ce,se,pe):me&6?R(V,K,te,ue,le,ne,ce,se,pe):(me&64||me&128)&&ge.process(V,K,te,ue,le,ne,ce,se,pe,G)}he!=null&&le?_s(he,V&&V.ref,ne,K||V,!K):he==null&&V&&V.ref!=null&&_s(V.ref,null,ne,V,!0)},b=(V,K,te,ue)=>{if(V==null)o(K.el=a(K.children),te,ue);else{const le=K.el=V.el;K.children!==V.children&&c(le,K.children)}},y=(V,K,te,ue)=>{V==null?o(K.el=s(K.children||""),te,ue):K.el=V.el},S=(V,K,te,ue)=>{[V.el,V.anchor]=v(V.children,K,te,ue,V.el,V.anchor)},$=({el:V,anchor:K},te,ue)=>{let le;for(;V&&V!==K;)le=p(V),o(V,te,ue),V=le;o(K,te,ue)},x=({el:V,anchor:K})=>{let te;for(;V&&V!==K;)te=p(V),r(V),V=te;r(K)},C=(V,K,te,ue,le,ne,ce,se,pe)=>{if(K.type==="svg"?ce="svg":K.type==="math"&&(ce="mathml"),V==null)O(K,te,ue,le,ne,ce,se,pe);else{const ge=V.el&&V.el._isVueCE?V.el:null;try{ge&&ge._beginPatch(),E(V,K,le,ne,ce,se,pe)}finally{ge&&ge._endPatch()}}},O=(V,K,te,ue,le,ne,ce,se)=>{let pe,ge;const{props:he,shapeFlag:me,transition:xe,dirs:fe}=V;if(pe=V.el=l(V.type,ne,he&&he.is,he),me&8?u(pe,V.children):me&16&&T(V.children,pe,null,ue,le,Lg(V,ne),ce,se),fe&&ji(V,null,ue,"created"),w(pe,V,V.scopeId,ce,ue),he){for(const be in he)be!=="value"&&!Is(be)&&i(pe,be,null,he[be],ne,ue);"value"in he&&i(pe,"value",null,he.value,ne),(ge=he.onVnodeBeforeMount)&&ir(ge,ue,V)}fe&&ji(V,null,ue,"beforeMount");const de=MM(le,xe);de&&xe.beforeEnter(pe),o(pe,K,te),((ge=he&&he.onVnodeMounted)||de||fe)&&zn(()=>{ge&&ir(ge,ue,V),de&&xe.enter(pe),fe&&ji(V,null,ue,"mounted")},le)},w=(V,K,te,ue,le)=>{if(te&&g(V,te),ue)for(let ne=0;ne{for(let ge=pe;ge{const se=K.el=V.el;let{patchFlag:pe,dynamicChildren:ge,dirs:he}=K;pe|=V.patchFlag&16;const me=V.props||At,xe=K.props||At;let fe;if(te&&Vi(te,!1),(fe=xe.onVnodeBeforeUpdate)&&ir(fe,te,K,V),he&&ji(K,V,te,"beforeUpdate"),te&&Vi(te,!0),(me.innerHTML&&xe.innerHTML==null||me.textContent&&xe.textContent==null)&&u(se,""),ge?_(V.dynamicChildren,ge,se,te,ue,Lg(K,le),ne):ce||k(V,K,se,null,te,ue,Lg(K,le),ne,!1),pe>0){if(pe&16)M(se,me,xe,te,le);else if(pe&2&&me.class!==xe.class&&i(se,"class",null,xe.class,le),pe&4&&i(se,"style",me.style,xe.style,le),pe&8){const de=K.dynamicProps;for(let be=0;be{fe&&ir(fe,te,K,V),he&&ji(K,V,te,"updated")},ue)},_=(V,K,te,ue,le,ne,ce)=>{for(let se=0;se{if(K!==te){if(K!==At)for(const ne in K)!Is(ne)&&!(ne in te)&&i(V,ne,K[ne],null,le,ue);for(const ne in te){if(Is(ne))continue;const ce=te[ne],se=K[ne];ce!==se&&ne!=="value"&&i(V,ne,se,ce,le,ue)}"value"in te&&i(V,"value",K.value,te.value,le)}},A=(V,K,te,ue,le,ne,ce,se,pe)=>{const ge=K.el=V?V.el:a(""),he=K.anchor=V?V.anchor:a("");let{patchFlag:me,dynamicChildren:xe,slotScopeIds:fe}=K;fe&&(se=se?se.concat(fe):fe),V==null?(o(ge,te,ue),o(he,te,ue),T(K.children||[],te,he,le,ne,ce,se,pe)):me>0&&me&64&&xe&&V.dynamicChildren?(_(V.dynamicChildren,xe,te,le,ne,ce,se),(K.key!=null||le&&K===le.subTree)&&y0(V,K,!0)):k(V,K,te,he,le,ne,ce,se,pe)},R=(V,K,te,ue,le,ne,ce,se,pe)=>{K.slotScopeIds=se,V==null?K.shapeFlag&512?le.ctx.activate(K,te,ue,ce,pe):L(K,te,ue,le,ne,ce,pe):P(V,K,pe)},L=(V,K,te,ue,le,ne,ce)=>{const se=V.component=LM(V,ue,le);if(op(V)&&(se.ctx.renderer=G),zM(se,!1,ce),se.asyncDep){if(le&&le.registerDep(se,D,ce),!V.el){const pe=se.subTree=f(Sn);y(null,pe,K,te),V.placeholder=pe.el}}else D(se,V,K,te,le,ne,ce)},P=(V,K,te)=>{const ue=K.component=V.component;if(SM(V,K,te))if(ue.asyncDep&&!ue.asyncResolved){N(ue,K,te);return}else ue.next=K,ue.update();else K.el=V.el,ue.vnode=K},D=(V,K,te,ue,le,ne,ce)=>{const se=()=>{if(V.isMounted){let{next:me,bu:xe,u:fe,parent:de,vnode:be}=V;{const Ce=tO(V);if(Ce){me&&(me.el=be.el,N(V,me,ce)),Ce.asyncDep.then(()=>{V.isUnmounted||se()});return}}let we=me,Ie;Vi(V,!1),me?(me.el=be.el,N(V,me,ce)):me=be,xe&&Ag(xe),(Ie=me.props&&me.props.onVnodeBeforeUpdate)&&ir(Ie,de,me,be),Vi(V,!0);const Ae=lS(V),Se=V.subTree;V.subTree=Ae,h(Se,Ae,d(Se.el),X(Se),V,le,ne),me.el=Ae.el,we===null&&$M(V,Ae.el),fe&&zn(fe,le),(Ie=me.props&&me.props.onVnodeUpdated)&&zn(()=>ir(Ie,de,me,be),le)}else{let me;const{el:xe,props:fe}=K,{bm:de,m:be,parent:we,root:Ie,type:Ae}=V,Se=As(K);Vi(V,!1),de&&Ag(de),!Se&&(me=fe&&fe.onVnodeBeforeMount)&&ir(me,we,K),Vi(V,!0);{Ie.ce&&Ie.ce._def.shadowRoot!==!1&&Ie.ce._injectChildStyle(Ae);const Ce=V.subTree=lS(V);h(null,Ce,te,ue,V,le,ne),K.el=Ce.el}if(be&&zn(be,le),!Se&&(me=fe&&fe.onVnodeMounted)){const Ce=K;zn(()=>ir(me,we,Ce),le)}(K.shapeFlag&256||we&&As(we.vnode)&&we.vnode.shapeFlag&256)&&V.a&&zn(V.a,le),V.isMounted=!0,K=te=ue=null}};V.scope.on();const pe=V.effect=new r4(se);V.scope.off();const ge=V.update=pe.run.bind(pe),he=V.job=pe.runIfDirty.bind(pe);he.i=V,he.id=V.uid,pe.scheduler=()=>p0(he),Vi(V,!0),ge()},N=(V,K,te)=>{K.component=V;const ue=V.vnode.props;V.vnode=K,V.next=null,xM(V,K.props,ue,te),IM(V,K.children,te),Vr(),Y1(V),Wr()},k=(V,K,te,ue,le,ne,ce,se,pe=!1)=>{const ge=V&&V.children,he=V?V.shapeFlag:0,me=K.children,{patchFlag:xe,shapeFlag:fe}=K;if(xe>0){if(xe&128){z(ge,me,te,ue,le,ne,ce,se,pe);return}else if(xe&256){F(ge,me,te,ue,le,ne,ce,se,pe);return}}fe&8?(he&16&&ee(ge,le,ne),me!==ge&&u(te,me)):he&16?fe&16?z(ge,me,te,ue,le,ne,ce,se,pe):ee(ge,le,ne,!0):(he&8&&u(te,""),fe&16&&T(me,te,ue,le,ne,ce,se,pe))},F=(V,K,te,ue,le,ne,ce,se,pe)=>{V=V||ga,K=K||ga;const ge=V.length,he=K.length,me=Math.min(ge,he);let xe;for(xe=0;xehe?ee(V,le,ne,!0,!1,me):T(K,te,ue,le,ne,ce,se,pe,me)},z=(V,K,te,ue,le,ne,ce,se,pe)=>{let ge=0;const he=K.length;let me=V.length-1,xe=he-1;for(;ge<=me&&ge<=xe;){const fe=V[ge],de=K[ge]=pe?gi(K[ge]):fr(K[ge]);if(el(fe,de))h(fe,de,te,null,le,ne,ce,se,pe);else break;ge++}for(;ge<=me&&ge<=xe;){const fe=V[me],de=K[xe]=pe?gi(K[xe]):fr(K[xe]);if(el(fe,de))h(fe,de,te,null,le,ne,ce,se,pe);else break;me--,xe--}if(ge>me){if(ge<=xe){const fe=xe+1,de=fexe)for(;ge<=me;)j(V[ge],le,ne,!0),ge++;else{const fe=ge,de=ge,be=new Map;for(ge=de;ge<=xe;ge++){const Re=K[ge]=pe?gi(K[ge]):fr(K[ge]);Re.key!=null&&be.set(Re.key,ge)}let we,Ie=0;const Ae=xe-de+1;let Se=!1,Ce=0;const Oe=new Array(Ae);for(ge=0;ge=Ae){j(Re,le,ne,!0);continue}let _e;if(Re.key!=null)_e=be.get(Re.key);else for(we=de;we<=xe;we++)if(Oe[we-de]===0&&el(Re,K[we])){_e=we;break}_e===void 0?j(Re,le,ne,!0):(Oe[_e-de]=ge+1,_e>=Ce?Ce=_e:Se=!0,h(Re,K[_e],te,null,le,ne,ce,se,pe),Ie++)}const Me=Se?_M(Oe):ga;for(we=Me.length-1,ge=Ae-1;ge>=0;ge--){const Re=de+ge,_e=K[Re],Be=K[Re+1],et=Re+1{const{el:ne,type:ce,transition:se,children:pe,shapeFlag:ge}=V;if(ge&6){H(V.component.subTree,K,te,ue);return}if(ge&128){V.suspense.move(K,te,ue);return}if(ge&64){ce.move(V,K,te,G);return}if(ce===He){o(ne,K,te);for(let me=0;mese.enter(ne),le);else{const{leave:me,delayLeave:xe,afterLeave:fe}=se,de=()=>{V.ctx.isUnmounted?r(ne):o(ne,K,te)},be=()=>{ne._isLeaving&&ne[Ar](!0),me(ne,()=>{de(),fe&&fe()})};xe?xe(ne,de,be):be()}else o(ne,K,te)},j=(V,K,te,ue=!1,le=!1)=>{const{type:ne,props:ce,ref:se,children:pe,dynamicChildren:ge,shapeFlag:he,patchFlag:me,dirs:xe,cacheIndex:fe}=V;if(me===-2&&(le=!1),se!=null&&(Vr(),_s(se,null,te,V,!0),Wr()),fe!=null&&(K.renderCache[fe]=void 0),he&256){K.ctx.deactivate(V);return}const de=he&1&&xe,be=!As(V);let we;if(be&&(we=ce&&ce.onVnodeBeforeUnmount)&&ir(we,K,V),he&6)U(V.component,te,ue);else{if(he&128){V.suspense.unmount(te,ue);return}de&&ji(V,null,K,"beforeUnmount"),he&64?V.type.remove(V,K,te,G,ue):ge&&!ge.hasOnce&&(ne!==He||me>0&&me&64)?ee(ge,K,te,!1,!0):(ne===He&&me&384||!le&&he&16)&&ee(pe,K,te),ue&&Y(V)}(be&&(we=ce&&ce.onVnodeUnmounted)||de)&&zn(()=>{we&&ir(we,K,V),de&&ji(V,null,K,"unmounted")},te)},Y=V=>{const{type:K,el:te,anchor:ue,transition:le}=V;if(K===He){Q(te,ue);return}if(K===zg){x(V);return}const ne=()=>{r(te),le&&!le.persisted&&le.afterLeave&&le.afterLeave()};if(V.shapeFlag&1&&le&&!le.persisted){const{leave:ce,delayLeave:se}=le,pe=()=>ce(te,ne);se?se(V.el,ne,pe):pe()}else ne()},Q=(V,K)=>{let te;for(;V!==K;)te=p(V),r(V),V=te;r(K)},U=(V,K,te)=>{const{bum:ue,scope:le,job:ne,subTree:ce,um:se,m:pe,a:ge}=V;cS(pe),cS(ge),ue&&Ag(ue),le.stop(),ne&&(ne.flags|=8,j(ce,V,K,te)),se&&zn(se,K),zn(()=>{V.isUnmounted=!0},K)},ee=(V,K,te,ue=!1,le=!1,ne=0)=>{for(let ce=ne;ce{if(V.shapeFlag&6)return X(V.component.subTree);if(V.shapeFlag&128)return V.suspense.next();const K=p(V.anchor||V.el),te=K&&K[T4];return te?p(te):K};let J=!1;const Z=(V,K,te)=>{V==null?K._vnode&&j(K._vnode,null,null,!0):h(K._vnode||null,V,K,null,null,null,te),K._vnode=V,J||(J=!0,Y1(),O4(),J=!1)},G={p:h,um:j,m:H,r:Y,mt:L,mc:T,pc:k,pbc:_,n:X,o:e};return{render:Z,hydrate:void 0,createApp:uM(Z)}}function Lg({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Vi({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function MM(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function y0(e,t,n=!1){const o=e.children,r=t.children;if(it(o)&&it(r))for(let i=0;i>1,e[n[a]]0&&(t[o]=n[i-1]),n[i]=o)}}for(i=n.length,l=n[i-1];i-- >0;)n[i]=l,l=t[l];return n}function tO(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:tO(t)}function cS(e){if(e)for(let t=0;te.__isSuspense;function AM(e,t){t&&t.pendingBranch?it(e)?t.effects.push(...e):t.effects.push(e):V7(e)}const He=Symbol.for("v-fgt"),Ri=Symbol.for("v-txt"),Sn=Symbol.for("v-cmt"),zg=Symbol.for("v-stc"),Ds=[];let fo=null;function Mt(e=!1){Ds.push(fo=e?null:[])}function RM(){Ds.pop(),fo=Ds[Ds.length-1]||null}let rc=1;function Vd(e,t=!1){rc+=e,e<0&&fo&&t&&(fo.hasOnce=!0)}function oO(e){return e.dynamicChildren=rc>0?fo||ga:null,RM(),rc>0&&fo&&fo.push(e),e}function rn(e,t,n,o,r,i){return oO(xt(e,t,n,o,r,i,!0))}function Ji(e,t,n,o,r){return oO(f(e,t,n,o,r,!0))}function Jt(e){return e?e.__v_isVNode===!0:!1}function el(e,t){return e.type===t.type&&e.key===t.key}const rO=({key:e})=>e??null,ju=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Xt(e)||Ht(e)||st(e)?{i:uo,r:e,k:t,f:!!n}:e:null);function xt(e,t=null,n=null,o=0,r=null,i=e===He?0:1,l=!1,a=!1){const s={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&rO(t),ref:t&&ju(t),scopeId:I4,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:uo};return a?(S0(s,n),i&128&&e.normalize(s)):n&&(s.shapeFlag|=Xt(n)?8:16),rc>0&&!l&&fo&&(s.patchFlag>0||i&6)&&s.patchFlag!==32&&fo.push(s),s}const f=DM;function DM(e,t=null,n=null,o=0,r=null,i=!1){if((!e||e===J7)&&(e=Sn),Jt(e)){const a=fn(e,t,!0);return n&&S0(a,n),rc>0&&!i&&fo&&(a.shapeFlag&6?fo[fo.indexOf(e)]=a:fo.push(a)),a.patchFlag=-2,a}if(WM(e)&&(e=e.__vccOpts),t){t=NM(t);let{class:a,style:s}=t;a&&!Xt(a)&&(t.class=r0(a)),Nt(s)&&(tp(s)&&!it(s)&&(s=dn({},s)),t.style=Jf(s))}const l=Xt(e)?1:nO(e)?128:E4(e)?64:Nt(e)?4:st(e)?2:0;return xt(e,t,n,o,r,l,i,!0)}function NM(e){return e?tp(e)||Y4(e)?dn({},e):e:null}function fn(e,t,n=!1,o=!1){const{props:r,ref:i,patchFlag:l,children:a,transition:s}=e,c=t?BM(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&rO(c),ref:t&&t.ref?n&&i?it(i)?i.concat(ju(t)):[i,ju(t)]:ju(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==He?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:s,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&fn(e.ssContent),ssFallback:e.ssFallback&&fn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return s&&o&&xl(u,s.clone(u)),u}function vt(e=" ",t=0){return f(Ri,null,e,t)}function Xl(e="",t=!1){return t?(Mt(),Ji(Sn,null,e)):f(Sn,null,e)}function fr(e){return e==null||typeof e=="boolean"?f(Sn):it(e)?f(He,null,e.slice()):Jt(e)?gi(e):f(Ri,null,String(e))}function gi(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:fn(e)}function S0(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(it(t))n=16;else if(typeof t=="object")if(o&65){const r=t.default;r&&(r._c&&(r._d=!1),S0(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Y4(t)?t._ctx=uo:r===3&&uo&&(uo.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else st(t)?(t={default:t,_ctx:uo},n=32):(t=String(t),o&64?(n=16,t=[vt(t)]):n=8);e.children=t,e.shapeFlag|=n}function BM(...e){const t={};for(let n=0;nMn||uo;let Wd,Sv;{const e=Qf(),t=(n,o)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(o),i=>{r.length>1?r.forEach(l=>l(i)):r[0](i)}};Wd=t("__VUE_INSTANCE_SETTERS__",n=>Mn=n),Sv=t("__VUE_SSR_SETTERS__",n=>ic=n)}const _c=e=>{const t=Mn;return Wd(e),e.scope.on(),()=>{e.scope.off(),Wd(t)}},uS=()=>{Mn&&Mn.scope.off(),Wd(null)};function iO(e){return e.vnode.shapeFlag&4}let ic=!1;function zM(e,t=!1,n=!1){t&&Sv(t);const{props:o,children:r}=e.vnode,i=iO(e);CM(e,o,i,t),PM(e,r,n||t);const l=i?HM(e,t):void 0;return t&&Sv(!1),l}function HM(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,tM);const{setup:o}=n;if(o){Vr();const r=e.setupContext=o.length>1?aO(e):null,i=_c(e),l=Mc(o,e,0,[e.props,r]),a=U3(l);if(Wr(),i(),(a||e.sp)&&!As(e)&&k4(e),a){if(l.then(uS,uS),t)return l.then(s=>{dS(e,s)}).catch(s=>{np(s,e,0)});e.asyncDep=l}else dS(e,l)}else lO(e)}function dS(e,t,n){st(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Nt(t)&&(e.setupState=$4(t)),lO(e)}function lO(e,t,n){const o=e.type;e.render||(e.render=o.render||gr);{const r=_c(e);Vr();try{rM(e)}finally{Wr(),r()}}}const jM={get(e,t){return Tn(e,"get",""),e[t]}};function aO(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,jM),slots:e.slots,emit:e.emit,expose:t}}function cp(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy($4(f0(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Rs)return Rs[n](e)},has(t,n){return n in t||n in Rs}})):e.proxy}function VM(e,t=!0){return st(e)?e.displayName||e.name:e.name||t&&e.__name}function WM(e){return st(e)&&"__vccOpts"in e}const I=(e,t)=>F7(e,t,ic);function Gr(e,t,n){try{Vd(-1);const o=arguments.length;return o===2?Nt(t)&&!it(t)?Jt(t)?f(e,null,[t]):f(e,t):f(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Jt(n)&&(n=[n]),f(e,t,n))}finally{Vd(1)}}const KM="3.5.25";let $v;const fS=typeof window<"u"&&window.trustedTypes;if(fS)try{$v=fS.createPolicy("vue",{createHTML:e=>e})}catch{}const sO=$v?e=>$v.createHTML(e):e=>e,GM="http://www.w3.org/2000/svg",XM="http://www.w3.org/1998/Math/MathML",Er=typeof document<"u"?document:null,pS=Er&&Er.createElement("template"),UM={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t==="svg"?Er.createElementNS(GM,e):t==="mathml"?Er.createElementNS(XM,e):n?Er.createElement(e,{is:n}):Er.createElement(e);return e==="select"&&o&&o.multiple!=null&&r.setAttribute("multiple",o.multiple),r},createText:e=>Er.createTextNode(e),createComment:e=>Er.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Er.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,i){const l=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{pS.innerHTML=sO(o==="svg"?`${e}`:o==="mathml"?`${e}`:e);const a=pS.content;if(o==="svg"||o==="mathml"){const s=a.firstChild;for(;s.firstChild;)a.appendChild(s.firstChild);a.removeChild(s)}t.insertBefore(a,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},li="transition",ds="animation",_a=Symbol("_vtc"),cO={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},uO=dn({},R4,cO),YM=e=>(e.displayName="Transition",e.props=uO,e),pn=YM((e,{slots:t})=>Gr(G7,dO(e),t)),Wi=(e,t=[])=>{it(e)?e.forEach(n=>n(...t)):e&&e(...t)},gS=e=>e?it(e)?e.some(t=>t.length>1):e.length>1:!1;function dO(e){const t={};for(const A in e)A in cO||(t[A]=e[A]);if(e.css===!1)return t;const{name:n="v",type:o,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:l=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:s=i,appearActiveClass:c=l,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:g=`${n}-leave-to`}=e,v=qM(r),h=v&&v[0],b=v&&v[1],{onBeforeEnter:y,onEnter:S,onEnterCancelled:$,onLeave:x,onLeaveCancelled:C,onBeforeAppear:O=y,onAppear:w=S,onAppearCancelled:T=$}=t,E=(A,R,L,P)=>{A._enterCancelled=P,ci(A,R?u:a),ci(A,R?c:l),L&&L()},_=(A,R)=>{A._isLeaving=!1,ci(A,d),ci(A,g),ci(A,p),R&&R()},M=A=>(R,L)=>{const P=A?w:S,D=()=>E(R,A,L);Wi(P,[R,D]),hS(()=>{ci(R,A?s:i),lr(R,A?u:a),gS(P)||vS(R,o,h,D)})};return dn(t,{onBeforeEnter(A){Wi(y,[A]),lr(A,i),lr(A,l)},onBeforeAppear(A){Wi(O,[A]),lr(A,s),lr(A,c)},onEnter:M(!1),onAppear:M(!0),onLeave(A,R){A._isLeaving=!0;const L=()=>_(A,R);lr(A,d),A._enterCancelled?(lr(A,p),Cv(A)):(Cv(A),lr(A,p)),hS(()=>{A._isLeaving&&(ci(A,d),lr(A,g),gS(x)||vS(A,o,b,L))}),Wi(x,[A,L])},onEnterCancelled(A){E(A,!1,void 0,!0),Wi($,[A])},onAppearCancelled(A){E(A,!0,void 0,!0),Wi(T,[A])},onLeaveCancelled(A){_(A),Wi(C,[A])}})}function qM(e){if(e==null)return null;if(Nt(e))return[Hg(e.enter),Hg(e.leave)];{const t=Hg(e);return[t,t]}}function Hg(e){return a7(e)}function lr(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[_a]||(e[_a]=new Set)).add(t)}function ci(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[_a];n&&(n.delete(t),n.size||(e[_a]=void 0))}function hS(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let ZM=0;function vS(e,t,n,o){const r=e._endId=++ZM,i=()=>{r===e._endId&&o()};if(n!=null)return setTimeout(i,n);const{type:l,timeout:a,propCount:s}=fO(e,t);if(!l)return o();const c=l+"end";let u=0;const d=()=>{e.removeEventListener(c,p),i()},p=g=>{g.target===e&&++u>=s&&d()};setTimeout(()=>{u(n[v]||"").split(", "),r=o(`${li}Delay`),i=o(`${li}Duration`),l=mS(r,i),a=o(`${ds}Delay`),s=o(`${ds}Duration`),c=mS(a,s);let u=null,d=0,p=0;t===li?l>0&&(u=li,d=l,p=i.length):t===ds?c>0&&(u=ds,d=c,p=s.length):(d=Math.max(l,c),u=d>0?l>c?li:ds:null,p=u?u===li?i.length:s.length:0);const g=u===li&&/\b(?:transform|all)(?:,|$)/.test(o(`${li}Property`).toString());return{type:u,timeout:d,propCount:p,hasTransform:g}}function mS(e,t){for(;e.lengthbS(n)+bS(e[o])))}function bS(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Cv(e){return(e?e.ownerDocument:document).body.offsetHeight}function QM(e,t,n){const o=e[_a];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Kd=Symbol("_vod"),pO=Symbol("_vsh"),Xn={name:"show",beforeMount(e,{value:t},{transition:n}){e[Kd]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):fs(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),fs(e,!0),o.enter(e)):o.leave(e,()=>{fs(e,!1)}):fs(e,t))},beforeUnmount(e,{value:t}){fs(e,t)}};function fs(e,t){e.style.display=t?e[Kd]:"none",e[pO]=!t}const JM=Symbol(""),e_=/(?:^|;)\s*display\s*:/;function t_(e,t,n){const o=e.style,r=Xt(n);let i=!1;if(n&&!r){if(t)if(Xt(t))for(const l of t.split(";")){const a=l.slice(0,l.indexOf(":")).trim();n[a]==null&&Vu(o,a,"")}else for(const l in t)n[l]==null&&Vu(o,l,"");for(const l in n)l==="display"&&(i=!0),Vu(o,l,n[l])}else if(r){if(t!==n){const l=o[JM];l&&(n+=";"+l),o.cssText=n,i=e_.test(n)}}else t&&e.removeAttribute("style");Kd in e&&(e[Kd]=i?o.display:"",e[pO]&&(o.display="none"))}const yS=/\s*!important$/;function Vu(e,t,n){if(it(n))n.forEach(o=>Vu(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=n_(e,t);yS.test(n)?e.setProperty(Al(o),n.replace(yS,""),"important"):e[o]=n}}const SS=["Webkit","Moz","ms"],jg={};function n_(e,t){const n=jg[t];if(n)return n;let o=Ao(t);if(o!=="filter"&&o in e)return jg[t]=o;o=Zf(o);for(let r=0;rVg||(a_.then(()=>Vg=0),Vg=Date.now());function c_(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;Yo(u_(o,n.value),t,5,[o])};return n.value=e,n.attached=s_(),n}function u_(e,t){if(it(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>r=>!r._stopped&&o&&o(r))}else return t}const PS=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,d_=(e,t,n,o,r,i)=>{const l=r==="svg";t==="class"?QM(e,o,l):t==="style"?t_(e,n,o):Xf(t)?n0(t)||i_(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):f_(e,t,o,l))?(xS(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&CS(e,t,o,l,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Xt(o))?xS(e,Ao(t),o,i,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),CS(e,t,o,l))};function f_(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&PS(t)&&st(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return PS(t)&&Xt(n)?!1:t in e}const gO=new WeakMap,hO=new WeakMap,Gd=Symbol("_moveCb"),IS=Symbol("_enterCb"),p_=e=>(delete e.props.mode,e),g_=p_({name:"TransitionGroup",props:dn({},uO,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=vn(),o=A4();let r,i;return Bn(()=>{if(!r.length)return;const l=e.moveClass||`${e.name||"v"}-move`;if(!b_(r[0].el,n.vnode.el,l)){r=[];return}r.forEach(h_),r.forEach(v_);const a=r.filter(m_);Cv(n.vnode.el),a.forEach(s=>{const c=s.el,u=c.style;lr(c,l),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[Gd]=p=>{p&&p.target!==c||(!p||p.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[Gd]=null,ci(c,l))};c.addEventListener("transitionend",d)}),r=[]}),()=>{const l=Je(e),a=dO(l);let s=l.tag||He;if(r=[],i)for(let c=0;c{a.split(/\s+/).forEach(s=>s&&o.classList.remove(s))}),n.split(/\s+/).forEach(a=>a&&o.classList.add(a)),o.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(o);const{hasTransform:l}=fO(o);return i.removeChild(o),l}const y_=["ctrl","shift","alt","meta"],S_={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>y_.some(n=>e[`${n}Key`]&&!t.includes(n))},TS=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=((r,...i)=>{for(let l=0;l{vO().render(...e)}),mO=((...e)=>{const t=vO().createApp(...e),{mount:n}=t;return t.mount=o=>{const r=x_(o);if(!r)return;const i=t._component;!st(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const l=n(r,!1,C_(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),l},t});function C_(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function x_(e){return Xt(e)?document.querySelector(e):e}let bO;const dp=e=>bO=e,yO=Symbol();function xv(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Ns;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Ns||(Ns={}));function w_(){const e=n4(!0),t=e.run(()=>re({}));let n=[],o=[];const r=f0({install(i){dp(r),r._a=i,i.provide(yO,r),i.config.globalProperties.$pinia=r,o.forEach(l=>n.push(l)),o=[]},use(i){return this._a?n.push(i):o.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const SO=()=>{};function MS(e,t,n,o=SO){e.add(t);const r=()=>{e.delete(t)&&o()};return!n&&i0()&&o4(r),r}function Ul(e,...t){e.forEach(n=>{n(...t)})}const O_=e=>e(),_S=Symbol(),Wg=Symbol();function wv(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,o)=>e.set(o,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],r=e[n];xv(r)&&xv(o)&&e.hasOwnProperty(n)&&!Ht(o)&&!Hr(o)?e[n]=wv(r,o):e[n]=o}return e}const P_=Symbol();function I_(e){return!xv(e)||!Object.prototype.hasOwnProperty.call(e,P_)}const{assign:ui}=Object;function T_(e){return!!(Ht(e)&&e.effect)}function E_(e,t,n,o){const{state:r,actions:i,getters:l}=t,a=n.state.value[e];let s;function c(){a||(n.state.value[e]=r?r():{});const u=Ko(n.state.value[e]);return ui(u,i,Object.keys(l||{}).reduce((d,p)=>(d[p]=f0(I(()=>{dp(n);const g=n._s.get(e);return l[p].call(g,g)})),d),{}))}return s=$O(e,c,t,n,o,!0),s}function $O(e,t,n={},o,r,i){let l;const a=ui({actions:{}},n),s={deep:!0};let c,u,d=new Set,p=new Set,g;const v=o.state.value[e];!i&&!v&&(o.state.value[e]={}),re({});let h;function b(T){let E;c=u=!1,typeof T=="function"?(T(o.state.value[e]),E={type:Ns.patchFunction,storeId:e,events:g}):(wv(o.state.value[e],T),E={type:Ns.patchObject,payload:T,storeId:e,events:g});const _=h=Symbol();rt().then(()=>{h===_&&(c=!0)}),u=!0,Ul(d,E,o.state.value[e])}const y=i?function(){const{state:E}=n,_=E?E():{};this.$patch(M=>{ui(M,_)})}:SO;function S(){l.stop(),d.clear(),p.clear(),o._s.delete(e)}const $=(T,E="")=>{if(_S in T)return T[Wg]=E,T;const _=function(){dp(o);const M=Array.from(arguments),A=new Set,R=new Set;function L(N){A.add(N)}function P(N){R.add(N)}Ul(p,{args:M,name:_[Wg],store:C,after:L,onError:P});let D;try{D=T.apply(this&&this.$id===e?this:C,M)}catch(N){throw Ul(R,N),N}return D instanceof Promise?D.then(N=>(Ul(A,N),N)).catch(N=>(Ul(R,N),Promise.reject(N))):(Ul(A,D),D)};return _[_S]=!0,_[Wg]=E,_},x={_p:o,$id:e,$onAction:MS.bind(null,p),$patch:b,$reset:y,$subscribe(T,E={}){const _=MS(d,T,E.detached,()=>M()),M=l.run(()=>ye(()=>o.state.value[e],A=>{(E.flush==="sync"?u:c)&&T({storeId:e,type:Ns.direct,events:g},A)},ui({},s,E)));return _},$dispose:S},C=ut(x);o._s.set(e,C);const w=(o._a&&o._a.runWithContext||O_)(()=>o._e.run(()=>(l=n4()).run(()=>t({action:$}))));for(const T in w){const E=w[T];if(Ht(E)&&!T_(E)||Hr(E))i||(v&&I_(E)&&(Ht(E)?E.value=v[T]:wv(E,v[T])),o.state.value[e][T]=E);else if(typeof E=="function"){const _=$(E,T);w[T]=_,a.actions[T]=E}}return ui(C,w),ui(Je(C),w),Object.defineProperty(C,"$state",{get:()=>o.state.value[e],set:T=>{b(E=>{ui(E,T)})}}),o._p.forEach(T=>{ui(C,l.run(()=>T({store:C,app:o._a,pinia:o,options:a})))}),v&&i&&n.hydrate&&n.hydrate(C.$state,v),c=!0,u=!0,C}function M_(e,t,n){let o;const r=typeof t=="function";o=r?n:t;function i(l,a){const s=dM();return l=l||(s?je(yO,null):null),l&&dp(l),l=bO,l._s.has(e)||(r?$O(e,t,o,l):E_(e,o,l)),l._s.get(e)}return i.$id=e,i}function lc(e){"@babel/helpers - typeof";return lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lc(e)}function __(e,t){if(lc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t);if(lc(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function A_(e){var t=__(e,"string");return lc(t)=="symbol"?t:t+""}function R_(e,t,n){return(t=A_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function B(e){for(var t=1;ttypeof e=="function",D_=Array.isArray,N_=e=>typeof e=="string",B_=e=>e!==null&&typeof e=="object",k_=/^on[^a-z]/,F_=e=>k_.test(e),$0=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},L_=/-(\w)/g,Wa=$0(e=>e.replace(L_,(t,n)=>n?n.toUpperCase():"")),z_=/\B([A-Z])/g,H_=$0(e=>e.replace(z_,"-$1").toLowerCase()),j_=$0(e=>e.charAt(0).toUpperCase()+e.slice(1)),V_=Object.prototype.hasOwnProperty,RS=(e,t)=>V_.call(e,t);function W_(e,t,n,o){const r=e[n];if(r!=null){const i=RS(r,"default");if(i&&o===void 0){const l=r.default;o=r.type!==Function&&Ov(l)?l():l}r.type===Boolean&&(!RS(t,n)&&!i?o=!1:o===""&&(o=!0))}return o}function K_(e){return Object.keys(e).reduce((t,n)=>((n.startsWith("data-")||n.startsWith("aria-"))&&(t[n]=e[n]),t),{})}function tl(e){return typeof e=="number"?`${e}px`:e}function sa(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return typeof e=="function"?e(t):e??n}function G_(e){let t;const n=new Promise(r=>{t=e(()=>{r(!0)})}),o=()=>{t?.()};return o.then=(r,i)=>n.then(r,i),o.promise=n,o}function ae(){const e=[];for(let t=0;t0},e.prototype.connect_=function(){!Pv||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Q_?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!Pv||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,o=n===void 0?"":n,r=Z_.some(function(i){return!!~o.indexOf(i)});r&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e})(),xO=(function(e,t){for(var n=0,o=Object.keys(t);n"u"||!(Element instanceof Object))){if(!(t instanceof Aa(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new aA(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Aa(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(o){return new sA(o.target,o.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e})(),OO=typeof WeakMap<"u"?new WeakMap:new CO,PO=(function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=J_.getInstance(),o=new cA(t,n,this);OO.set(this,o)}return e})();["observe","unobserve","disconnect"].forEach(function(e){PO.prototype[e]=function(){var t;return(t=OO.get(this))[e].apply(t,arguments)}});var C0=(function(){return typeof Xd.ResizeObserver<"u"?Xd.ResizeObserver:PO})();const Iv=e=>e!=null&&e!=="",Ze=(e,t)=>{const n=m({},e);return Object.keys(t).forEach(o=>{const r=n[o];if(r)r.type||r.default?r.default=t[o]:r.def?r.def(t[o]):n[o]={type:r,default:t[o]};else throw new Error(`not have ${o} prop`)}),n},x0=e=>{const t=Object.keys(e),n={},o={},r={};for(let i=0,l=t.length;i0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n={},o=/;(?![^(]*\))/g,r=/:(.+)/;return typeof e=="object"?e:(e.split(o).forEach(function(i){if(i){const l=i.split(r);if(l.length>1){const a=t?Wa(l[0].trim()):l[0].trim();n[a]=l[1].trim()}}}),n)},Nr=(e,t)=>e[t]!==void 0,IO=Symbol("skipFlatten"),$t=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=Array.isArray(e)?e:[e],o=[];return n.forEach(r=>{Array.isArray(r)?o.push(...$t(r,t)):r&&r.type===He?r.key===IO?o.push(r):o.push(...$t(r.children,t)):r&&Jt(r)?t&&!Ac(r)?o.push(r):t||o.push(r):Iv(r)&&o.push(r)}),o},pp=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(Jt(e))return e.type===He?t==="default"?$t(e.children):[]:e.children&&e.children[t]?$t(e.children[t](n)):[];{const o=e.$slots[t]&&e.$slots[t](n);return $t(o)}},Kn=e=>{var t;let n=((t=e?.vnode)===null||t===void 0?void 0:t.el)||e&&(e.$el||e);for(;n&&!n.tagName;)n=n.nextSibling;return n},TO=e=>{const t={};if(e.$&&e.$.vnode){const n=e.$.vnode.props||{};Object.keys(e.$props).forEach(o=>{const r=e.$props[o],i=H_(o);(r!==void 0||i in n)&&(t[o]=r)})}else if(Jt(e)&&typeof e.type=="object"){const n=e.props||{},o={};Object.keys(n).forEach(i=>{o[Wa(i)]=n[i]});const r=e.type.props||{};Object.keys(r).forEach(i=>{const l=W_(r,o,i,o[i]);(l!==void 0||i in o)&&(t[i]=l)})}return t},EO=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,r;if(e.$){const i=e[t];if(i!==void 0)return typeof i=="function"&&o?i(n):i;r=e.$slots[t],r=o&&r?r(n):r}else if(Jt(e)){const i=e.props&&e.props[t];if(i!==void 0&&e.props!==null)return typeof i=="function"&&o?i(n):i;e.type===He?r=e.children:e.children&&e.children[t]&&(r=e.children[t],r=o&&r?r(n):r)}return Array.isArray(r)&&(r=$t(r),r=r.length===1?r[0]:r,r=r.length===0?void 0:r),r};function NS(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n={};return e.$?n=m(m({},n),e.$attrs):n=m(m({},n),e.props),x0(n)[t?"onEvents":"events"]}function dA(e){const n=((Jt(e)?e.props:e.$attrs)||{}).class||{};let o={};return typeof n=="string"?n.split(" ").forEach(r=>{o[r.trim()]=!0}):Array.isArray(n)?ae(n).split(" ").forEach(r=>{o[r.trim()]=!0}):o=m(m({},o),n),o}function MO(e,t){let o=((Jt(e)?e.props:e.$attrs)||{}).style||{};return typeof o=="string"&&(o=uA(o,t)),o}function fA(e){return e.length===1&&e[0].type===He}function pA(e){return e==null||e===""||Array.isArray(e)&&e.length===0}function Ac(e){return e&&(e.type===Sn||e.type===He&&e.children.length===0||e.type===Ri&&e.children.trim()==="")}function gA(e){return e&&e.type===Ri}function Bt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const t=[];return e.forEach(n=>{Array.isArray(n)?t.push(...n):n?.type===He?t.push(...Bt(n.children)):t.push(n)}),t.filter(n=>!Ac(n))}function ps(e){if(e){const t=Bt(e);return t.length?t:void 0}else return e}function Ut(e){return Array.isArray(e)&&e.length===1&&(e=e[0]),e&&e.__v_isVNode&&typeof e.type!="symbol"}function en(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"default";var o,r;return(o=t[n])!==null&&o!==void 0?o:(r=e[n])===null||r===void 0?void 0:r.call(e)}const Ro=ie({compatConfig:{MODE:3},name:"ResizeObserver",props:{disabled:Boolean,onResize:Function},emits:["resize"],setup(e,t){let{slots:n}=t;const o=ut({width:0,height:0,offsetHeight:0,offsetWidth:0});let r=null,i=null;const l=()=>{i&&(i.disconnect(),i=null)},a=u=>{const{onResize:d}=e,p=u[0].target,{width:g,height:v}=p.getBoundingClientRect(),{offsetWidth:h,offsetHeight:b}=p,y=Math.floor(g),S=Math.floor(v);if(o.width!==y||o.height!==S||o.offsetWidth!==h||o.offsetHeight!==b){const $={width:y,height:S,offsetWidth:h,offsetHeight:b};m(o,$),d&&Promise.resolve().then(()=>{d(m(m({},$),{offsetWidth:h,offsetHeight:b}),p)})}},s=vn(),c=()=>{const{disabled:u}=e;if(u){l();return}const d=Kn(s);d!==r&&(l(),r=d),!i&&d&&(i=new C0(a),i.observe(d))};return We(()=>{c()}),Bn(()=>{c()}),wn(()=>{l()}),ye(()=>e.disabled,()=>{c()},{flush:"post"}),()=>{var u;return(u=n.default)===null||u===void 0?void 0:u.call(n)[0]}}});let _O=e=>setTimeout(e,16),AO=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(_O=e=>window.requestAnimationFrame(e),AO=e=>window.cancelAnimationFrame(e));let BS=0;const w0=new Map;function RO(e){w0.delete(e)}function qe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;BS+=1;const n=BS;function o(r){if(r===0)RO(n),e();else{const i=_O(()=>{o(r-1)});w0.set(n,i)}}return o(t),n}qe.cancel=e=>{const t=w0.get(e);return RO(t),AO(t)};function Tv(e){let t;const n=r=>()=>{t=null,e(...r)},o=function(){if(t==null){for(var r=arguments.length,i=new Array(r),l=0;l{qe.cancel(t),t=null},o}const xn=function(){for(var e=arguments.length,t=new Array(e),n=0;n{const t=e;return t.install=function(n){n.component(t.displayName||t.name,e)},e};function wl(){return{type:[Function,Array]}}function De(e){return{type:Object,default:e}}function $e(e){return{type:Boolean,default:e}}function ve(e){return{type:Function,default:e}}function Ct(e,t){return{validator:()=>!0,default:e}}function En(){return{validator:()=>!0}}function at(e){return{type:Array,default:e}}function Ne(e){return{type:String,default:e}}function Fe(e,t){return e?{type:e,default:t}:Ct(t)}let Qt=!1;try{const e=Object.defineProperty({},"passive",{get(){Qt=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch{}function Rt(e,t,n,o){if(e&&e.addEventListener){let r=o;r===void 0&&Qt&&(t==="touchstart"||t==="touchmove"||t==="wheel")&&(r={passive:!1}),e.addEventListener(t,n,r)}return{remove:()=>{e&&e.removeEventListener&&e.removeEventListener(t,n)}}}function au(e){return e!==window?e.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function kS(e,t,n){if(n!==void 0&&t.top>e.top-n)return`${n+t.top}px`}function FS(e,t,n){if(n!==void 0&&t.bottomo.target===e);n?n.affixList.push(t):(n={target:e,affixList:[t],eventHandlers:{}},Bs.push(n),DO.forEach(o=>{n.eventHandlers[o]=Rt(e,o,()=>{n.affixList.forEach(r=>{const{lazyUpdatePosition:i}=r.exposed;i()},(o==="touchstart"||o==="touchmove")&&Qt?{passive:!0}:!1)})}))}function zS(e){const t=Bs.find(n=>{const o=n.affixList.some(r=>r===e);return o&&(n.affixList=n.affixList.filter(r=>r!==e)),o});t&&t.affixList.length===0&&(Bs=Bs.filter(n=>n!==t),DO.forEach(n=>{const o=t.eventHandlers[n];o&&o.remove&&o.remove()}))}const O0="anticon",NO=Symbol("GlobalFormContextKey"),vA=e=>{Xe(NO,e)},mA=()=>je(NO,{validateMessages:I(()=>{})}),bA=()=>({iconPrefixCls:String,getTargetContainer:{type:Function},getPopupContainer:{type:Function},prefixCls:String,getPrefixCls:{type:Function},renderEmpty:{type:Function},transformCellText:{type:Function},csp:De(),input:De(),autoInsertSpaceInButton:{type:Boolean,default:void 0},locale:De(),pageHeader:De(),componentSize:{type:String},componentDisabled:{type:Boolean,default:void 0},direction:{type:String,default:"ltr"},space:De(),virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},form:De(),pagination:De(),theme:De(),select:De(),wave:De()}),P0=Symbol("configProvider"),BO={getPrefixCls:(e,t)=>t||(e?`ant-${e}`:"ant"),iconPrefixCls:I(()=>O0),getPopupContainer:I(()=>()=>document.body),direction:I(()=>"ltr")},gp=()=>je(P0,BO),yA=e=>Xe(P0,e),kO=Symbol("DisabledContextKey"),no=()=>je(kO,re(void 0)),FO=e=>{const t=no();return Xe(kO,I(()=>{var n;return(n=e.value)!==null&&n!==void 0?n:t.value})),e},LO={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages"},SA={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"Ok",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},zO={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},ac={lang:m({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},SA),timePickerLocale:m({},zO)},ro="${label} is not a valid ${type}",Un={locale:"en",Pagination:LO,DatePicker:ac,TimePicker:zO,Calendar:ac,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:ro,method:ro,array:ro,object:ro,number:ro,date:ro,boolean:ro,integer:ro,float:ro,regexp:ro,email:ro,url:ro,hex:ro},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"}},Rl=ie({compatConfig:{MODE:3},name:"LocaleReceiver",props:{componentName:String,defaultLocale:{type:[Object,Function]},children:{type:Function}},setup(e,t){let{slots:n}=t;const o=je("localeData",{}),r=I(()=>{const{componentName:l="global",defaultLocale:a}=e,s=a||Un[l||"global"],{antLocale:c}=o,u=l&&c?c[l]:{};return m(m({},typeof s=="function"?s():s),u||{})}),i=I(()=>{const{antLocale:l}=o,a=l&&l.locale;return l&&l.exist&&!a?Un.locale:a});return()=>{const l=e.children||n.default,{antLocale:a}=o;return l?.(r.value,i.value,a)}}});function ko(e,t,n){const o=je("localeData",{});return[I(()=>{const{antLocale:i}=o,l=gt(t)||Un[e||"global"],a=e&&i?i[e]:{};return m(m(m({},typeof l=="function"?l():l),a||{}),gt(n)||{})})]}function I0(e){for(var t=0,n,o=0,r=e.length;r>=4;++o,r-=4)n=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(r){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}const HS="%";class $A{constructor(t){this.cache=new Map,this.instanceId=t}get(t){return this.cache.get(Array.isArray(t)?t.join(HS):t)||null}update(t,n){const o=Array.isArray(t)?t.join(HS):t,r=this.cache.get(o),i=n(r);i===null?this.cache.delete(o):this.cache.set(o,i)}}const HO="data-token-hash",pl="data-css-hash",ca="__cssinjs_instance__";function sc(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const t=document.body.querySelectorAll(`style[${pl}]`)||[],{firstChild:n}=document.head;Array.from(t).forEach(r=>{r[ca]=r[ca]||e,r[ca]===e&&document.head.insertBefore(r,n)});const o={};Array.from(document.querySelectorAll(`style[${pl}]`)).forEach(r=>{var i;const l=r.getAttribute(pl);o[l]?r[ca]===e&&((i=r.parentNode)===null||i===void 0||i.removeChild(r)):o[l]=!0})}return new $A(e)}const jO=Symbol("StyleContextKey"),CA=()=>{var e,t,n;const o=vn();let r;if(o&&o.appContext){const i=(n=(t=(e=o.appContext)===null||e===void 0?void 0:e.config)===null||t===void 0?void 0:t.globalProperties)===null||n===void 0?void 0:n.__ANTDV_CSSINJS_CACHE__;i?r=i:(r=sc(),o.appContext.config.globalProperties&&(o.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__=r))}else r=sc();return r},VO={cache:sc(),defaultCache:!0,hashPriority:"low"},hp=()=>{const e=CA();return je(jO,oe(m(m({},VO),{cache:e})))},xA=e=>{const t=hp(),n=oe(m(m({},VO),{cache:sc()}));return ye([()=>gt(e),t],()=>{const o=m({},t.value),r=gt(e);Object.keys(r).forEach(l=>{const a=r[l];r[l]!==void 0&&(o[l]=a)});const{cache:i}=r;o.cache=o.cache||sc(),o.defaultCache=!i&&t.value.defaultCache,n.value=o},{immediate:!0}),Xe(jO,n),n},wA=()=>({autoClear:$e(),mock:Ne(),cache:De(),defaultCache:$e(),hashPriority:Ne(),container:Fe(),ssrInline:$e(),transformers:at(),linters:at()}),OA=Et(ie({name:"AStyleProvider",inheritAttrs:!1,props:wA(),setup(e,t){let{slots:n}=t;return xA(e),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}));function WO(e,t,n,o){const r=hp(),i=oe(""),l=oe();Le(()=>{i.value=[e,...t.value].join("%")});const a=s=>{r.value.cache.update(s,c=>{const[u=0,d]=c||[];return u-1===0?(o?.(d,!1),null):[u-1,d]})};return ye(i,(s,c)=>{c&&a(c),r.value.cache.update(s,u=>{const[d=0,p]=u||[],v=p||n();return[d+1,v]}),l.value=r.value.cache.get(i.value)[1]},{immediate:!0}),Qe(()=>{a(i.value)}),l}function Rn(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function mi(e,t){return e&&e.contains?e.contains(t):!1}const jS="data-vc-order",PA="vc-util-key",Ev=new Map;function KO(){let{mark:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e?e.startsWith("data-")?e:`data-${e}`:PA}function vp(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function IA(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function GO(e){return Array.from((Ev.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function XO(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Rn())return null;const{csp:n,prepend:o}=t,r=document.createElement("style");r.setAttribute(jS,IA(o)),n?.nonce&&(r.nonce=n?.nonce),r.innerHTML=e;const i=vp(t),{firstChild:l}=i;if(o){if(o==="queue"){const a=GO(i).filter(s=>["prepend","prependQueue"].includes(s.getAttribute(jS)));if(a.length)return i.insertBefore(r,a[a.length-1].nextSibling),r}i.insertBefore(r,l)}else i.appendChild(r);return r}function UO(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=vp(t);return GO(n).find(o=>o.getAttribute(KO(t))===e)}function Yd(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=UO(e,t);n&&vp(t).removeChild(n)}function TA(e,t){const n=Ev.get(e);if(!n||!mi(document,n)){const o=XO("",t),{parentNode:r}=o;Ev.set(e,r),e.removeChild(o)}}function cc(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var o,r,i;const l=vp(n);TA(l,n);const a=UO(t,n);if(a)return!((o=n.csp)===null||o===void 0)&&o.nonce&&a.nonce!==((r=n.csp)===null||r===void 0?void 0:r.nonce)&&(a.nonce=(i=n.csp)===null||i===void 0?void 0:i.nonce),a.innerHTML!==e&&(a.innerHTML=e),a;const s=XO(e,n);return s.setAttribute(KO(n),t),s}function EA(e,t){if(e.length!==t.length)return!1;for(let n=0;n1&&arguments[1]!==void 0?arguments[1]:!1,o={map:this.cache};return t.forEach(r=>{var i;o?o=(i=o?.map)===null||i===void 0?void 0:i.get(r):o=void 0}),o?.value&&n&&(o.value[1]=this.cacheCallTimes++),o?.value}get(t){var n;return(n=this.internalGet(t,!0))===null||n===void 0?void 0:n[0]}has(t){return!!this.internalGet(t)}set(t,n){if(!this.has(t)){if(this.size()+1>Ra.MAX_CACHE_SIZE+Ra.MAX_CACHE_OFFSET){const[r]=this.keys.reduce((i,l)=>{const[,a]=i;return this.internalGet(l)[1]{if(i===t.length-1)o.set(r,{value:[n,this.cacheCallTimes++]});else{const l=o.get(r);l?l.map||(l.map=new Map):o.set(r,{map:new Map}),o=o.get(r).map}})}deleteByPath(t,n){var o;const r=t.get(n[0]);if(n.length===1)return r.map?t.set(n[0],{map:r.map}):t.delete(n[0]),(o=r.value)===null||o===void 0?void 0:o[0];const i=this.deleteByPath(r.map,n.slice(1));return(!r.map||r.map.size===0)&&!r.value&&t.delete(n[0]),i}delete(t){if(this.has(t))return this.keys=this.keys.filter(n=>!EA(n,t)),this.deleteByPath(this.cache,t)}}Ra.MAX_CACHE_SIZE=20;Ra.MAX_CACHE_OFFSET=5;let VS={};function MA(e,t){}function _A(e,t){}function YO(e,t,n){!t&&!VS[n]&&(e(!1,n),VS[n]=!0)}function T0(e,t){YO(MA,e,t)}function AA(e,t){YO(_A,e,t)}function RA(){}let vo=RA,WS=0;class qO{constructor(t){this.derivatives=Array.isArray(t)?t:[t],this.id=WS,t.length===0&&vo(t.length>0),WS+=1}getDerivativeToken(t){return this.derivatives.reduce((n,o)=>o(t,n),void 0)}}const Kg=new Ra;function ZO(e){const t=Array.isArray(e)?e:[e];return Kg.has(t)||Kg.set(t,new qO(t)),Kg.get(t)}const KS=new WeakMap;function qd(e){let t=KS.get(e)||"";return t||(Object.keys(e).forEach(n=>{const o=e[n];t+=n,o instanceof qO?t+=o.id:o&&typeof o=="object"?t+=qd(o):t+=o}),KS.set(e,t)),t}function DA(e,t){return I0(`${t}_${qd(e)}`)}const ks=`random-${Date.now()}-${Math.random()}`.replace(/\./g,""),QO="_bAmBoO_";function NA(e,t,n){var o,r;if(Rn()){cc(e,ks);const i=document.createElement("div");i.style.position="fixed",i.style.left="0",i.style.top="0",t?.(i),document.body.appendChild(i);const l=n?n(i):(o=getComputedStyle(i).content)===null||o===void 0?void 0:o.includes(QO);return(r=i.parentNode)===null||r===void 0||r.removeChild(i),Yd(ks),l}return!1}let Gg;function BA(){return Gg===void 0&&(Gg=NA(`@layer ${ks} { .${ks} { content: "${QO}"!important; } }`,e=>{e.className=ks})),Gg}const GS={},kA="css",nl=new Map;function FA(e){nl.set(e,(nl.get(e)||0)+1)}function LA(e,t){typeof document<"u"&&document.querySelectorAll(`style[${HO}="${e}"]`).forEach(o=>{var r;o[ca]===t&&((r=o.parentNode)===null||r===void 0||r.removeChild(o))})}const zA=0;function HA(e,t){nl.set(e,(nl.get(e)||0)-1);const n=Array.from(nl.keys()),o=n.filter(r=>(nl.get(r)||0)<=0);n.length-o.length>zA&&o.forEach(r=>{LA(r,t),nl.delete(r)})}const jA=(e,t,n,o)=>{const r=n.getDerivativeToken(e);let i=m(m({},r),t);return o&&(i=o(i)),i};function VA(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:re({});const o=hp(),r=I(()=>m({},...t.value)),i=I(()=>qd(r.value)),l=I(()=>qd(n.value.override||GS));return WO("token",I(()=>[n.value.salt||"",e.value.id,i.value,l.value]),()=>{const{salt:s="",override:c=GS,formatToken:u,getComputedToken:d}=n.value,p=d?d(r.value,c,e.value):jA(r.value,c,e.value,u),g=DA(p,s);p._tokenKey=g,FA(g);const v=`${kA}-${I0(g)}`;return p._hashId=v,[p,v]},s=>{var c;HA(s[0]._tokenKey,(c=o.value)===null||c===void 0?void 0:c.cache.instanceId)})}var WA={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},JO="comm",eP="rule",tP="decl",KA="@import",GA="@namespace",XA="@keyframes",UA="@layer",nP=Math.abs,E0=String.fromCharCode;function oP(e){return e.trim()}function Wu(e,t,n){return e.replace(t,n)}function YA(e,t,n){return e.indexOf(t,n)}function ma(e,t){return e.charCodeAt(t)|0}function Da(e,t,n){return e.slice(t,n)}function dr(e){return e.length}function qA(e){return e.length}function su(e,t){return t.push(e),e}var mp=1,Na=1,rP=0,Do=0,an=0,Ka="";function M0(e,t,n,o,r,i,l,a){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:mp,column:Na,length:l,return:"",siblings:a}}function ZA(){return an}function QA(){return an=Do>0?ma(Ka,--Do):0,Na--,an===10&&(Na=1,mp--),an}function Go(){return an=Do2||uc(an)>3?"":" "}function n9(e,t){for(;--t&&Go()&&!(an<48||an>102||an>57&&an<65||an>70&&an<97););return bp(e,Ku()+(t<6&&Si()==32&&Go()==32))}function Mv(e){for(;Go();)switch(an){case e:return Do;case 34:case 39:e!==34&&e!==39&&Mv(an);break;case 40:e===41&&Mv(e);break;case 92:Go();break}return Do}function o9(e,t){for(;Go()&&e+an!==57;)if(e+an===84&&Si()===47)break;return"/*"+bp(t,Do-1)+"*"+E0(e===47?e:Go())}function r9(e){for(;!uc(Si());)Go();return bp(e,Do)}function i9(e){return e9(Gu("",null,null,null,[""],e=JA(e),0,[0],e))}function Gu(e,t,n,o,r,i,l,a,s){for(var c=0,u=0,d=l,p=0,g=0,v=0,h=1,b=1,y=1,S=0,$="",x=r,C=i,O=o,w=$;b;)switch(v=S,S=Go()){case 40:if(v!=108&&ma(w,d-1)==58){YA(w+=Wu(Xg(S),"&","&\f"),"&\f",nP(c?a[c-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:w+=Xg(S);break;case 9:case 10:case 13:case 32:w+=t9(v);break;case 92:w+=n9(Ku()-1,7);continue;case 47:switch(Si()){case 42:case 47:su(l9(o9(Go(),Ku()),t,n,s),s),(uc(v||1)==5||uc(Si()||1)==5)&&dr(w)&&Da(w,-1,void 0)!==" "&&(w+=" ");break;default:w+="/"}break;case 123*h:a[c++]=dr(w)*y;case 125*h:case 59:case 0:switch(S){case 0:case 125:b=0;case 59+u:y==-1&&(w=Wu(w,/\f/g,"")),g>0&&(dr(w)-d||h===0&&v===47)&&su(g>32?US(w+";",o,n,d-1,s):US(Wu(w," ","")+";",o,n,d-2,s),s);break;case 59:w+=";";default:if(su(O=XS(w,t,n,c,u,r,a,$,x=[],C=[],d,i),i),S===123)if(u===0)Gu(w,t,O,O,x,i,d,a,C);else{switch(p){case 99:if(ma(w,3)===110)break;case 108:if(ma(w,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Gu(e,O,O,o&&su(XS(e,O,O,0,0,r,a,$,r,x=[],d,C),C),r,C,d,a,o?x:C):Gu(w,O,O,O,[""],C,0,a,C)}}c=u=g=0,h=y=1,$=w="",d=l;break;case 58:d=1+dr(w),g=v;default:if(h<1){if(S==123)--h;else if(S==125&&h++==0&&QA()==125)continue}switch(w+=E0(S),S*h){case 38:y=u>0?1:(w+="\f",-1);break;case 44:a[c++]=(dr(w)-1)*y,y=1;break;case 64:Si()===45&&(w+=Xg(Go())),p=Si(),u=d=dr($=w+=r9(Ku())),S++;break;case 45:v===45&&dr(w)==2&&(h=0)}}return i}function XS(e,t,n,o,r,i,l,a,s,c,u,d){for(var p=r-1,g=r===0?i:[""],v=qA(g),h=0,b=0,y=0;h0?g[S]+" "+$:Wu($,/&\f/g,g[S])))&&(s[y++]=x);return M0(e,t,n,r===0?eP:a,s,c,u,d)}function l9(e,t,n,o){return M0(e,t,n,JO,E0(ZA()),Da(e,2,-2),0,o)}function US(e,t,n,o,r){return M0(e,t,n,tP,Da(e,0,o),Da(e,o+1,-1),o,r)}function _v(e,t){for(var n="",o=0;o{const[i,l]=r.split(":");gl[i]=l});const o=document.querySelector(`style[${YS}]`);o&&(iP=!1,(e=o.parentNode)===null||e===void 0||e.removeChild(o)),document.body.removeChild(t)}}function u9(e){return c9(),!!gl[e]}function d9(e){const t=gl[e];let n=null;if(t&&Rn())if(iP)n=s9;else{const o=document.querySelector(`style[${pl}="${gl[e]}"]`);o?n=o.innerHTML:delete gl[e]}return[n,t]}const qS=Rn(),f9="_skip_check_",lP="_multi_value_";function ZS(e){return _v(i9(e),a9).replace(/\{%%%\:[^;];}/g,";")}function p9(e){return typeof e=="object"&&e&&(f9 in e||lP in e)}function g9(e,t,n){if(!t)return e;const o=`.${t}`,r=n==="low"?`:where(${o})`:o;return e.split(",").map(l=>{var a;const s=l.trim().split(/\s+/);let c=s[0]||"";const u=((a=c.match(/^\w+/))===null||a===void 0?void 0:a[0])||"";return c=`${u}${r}${c.slice(u.length)}`,[c,...s.slice(1)].join(" ")}).join(",")}const QS=new Set,Av=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{root:n,injectHash:o,parentSelectors:r}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]};const{hashId:i,layer:l,path:a,hashPriority:s,transformers:c=[],linters:u=[]}=t;let d="",p={};function g(b){const y=b.getName(i);if(!p[y]){const[S]=Av(b.style,t,{root:!1,parentSelectors:r});p[y]=`@keyframes ${b.getName(i)}${S}`}}function v(b){let y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return b.forEach(S=>{Array.isArray(S)?v(S,y):S&&y.push(S)}),y}if(v(Array.isArray(e)?e:[e]).forEach(b=>{const y=typeof b=="string"&&!n?{}:b;if(typeof y=="string")d+=`${y} `;else if(y._keyframe)g(y);else{const S=c.reduce(($,x)=>{var C;return((C=x?.visit)===null||C===void 0?void 0:C.call(x,$))||$},y);Object.keys(S).forEach($=>{var x;const C=S[$];if(typeof C=="object"&&C&&($!=="animationName"||!C._keyframe)&&!p9(C)){let O=!1,w=$.trim(),T=!1;(n||o)&&i?w.startsWith("@")?O=!0:w=g9($,i,s):n&&!i&&(w==="&"||w==="")&&(w="",T=!0);const[E,_]=Av(C,t,{root:T,injectHash:O,parentSelectors:[...r,w]});p=m(m({},p),_),d+=`${w}${E}`}else{let O=function(T,E){const _=T.replace(/[A-Z]/g,A=>`-${A.toLowerCase()}`);let M=E;!WA[T]&&typeof M=="number"&&M!==0&&(M=`${M}px`),T==="animationName"&&E?._keyframe&&(g(E),M=E.getName(i)),d+=`${_}:${M};`};const w=(x=C?.value)!==null&&x!==void 0?x:C;typeof C=="object"&&C?.[lP]&&Array.isArray(w)?w.forEach(T=>{O($,T)}):O($,w)}})}}),!n)d=`{${d}}`;else if(l&&BA()){const b=l.split(",");d=`@layer ${b[b.length-1].trim()} {${d}}`,b.length>1&&(d=`@layer ${l}{%%%:%}${d}`)}return[d,p]};function h9(e,t){return I0(`${e.join("%")}${t}`)}function Rv(e,t){const n=hp(),o=I(()=>e.value.token._tokenKey),r=I(()=>[o.value,...e.value.path]);let i=qS;return WO("style",r,()=>{const{path:l,hashId:a,layer:s,nonce:c,clientOnly:u,order:d=0}=e.value,p=r.value.join("|");if(u9(p)){const[w,T]=d9(p);if(w)return[w,o.value,T,{},u,d]}const g=t(),{hashPriority:v,container:h,transformers:b,linters:y,cache:S}=n.value,[$,x]=Av(g,{hashId:a,hashPriority:v,layer:s,path:l.join("-"),transformers:b,linters:y}),C=ZS($),O=h9(r.value,C);if(i){const w={mark:pl,prepend:"queue",attachTo:h,priority:d},T=typeof c=="function"?c():c;T&&(w.csp={nonce:T});const E=cc(C,O,w);E[ca]=S.instanceId,E.setAttribute(HO,o.value),Object.keys(x).forEach(_=>{QS.has(_)||(QS.add(_),cc(ZS(x[_]),`_effect-${_}`,{mark:pl,prepend:"queue",attachTo:h}))})}return[C,o.value,O,x,u,d]},(l,a)=>{let[,,s]=l;(a||n.value.autoClear)&&qS&&Yd(s,{mark:pl})}),l=>l}class ot{constructor(t,n){this._keyframe=!0,this.name=t,this.style=n}getName(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t?`${t}-${this.name}`:this.name}}const v9={StyleProvider:OA},aP="4.2.6",dc=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function Cn(e,t){m9(e)&&(e="100%");var n=b9(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function cu(e){return Math.min(1,Math.max(0,e))}function m9(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function b9(e){return typeof e=="string"&&e.indexOf("%")!==-1}function sP(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function uu(e){return e<=1?"".concat(Number(e)*100,"%"):e}function al(e){return e.length===1?"0"+e:String(e)}function y9(e,t,n){return{r:Cn(e,255)*255,g:Cn(t,255)*255,b:Cn(n,255)*255}}function JS(e,t,n){e=Cn(e,255),t=Cn(t,255),n=Cn(n,255);var o=Math.max(e,t,n),r=Math.min(e,t,n),i=0,l=0,a=(o+r)/2;if(o===r)l=0,i=0;else{var s=o-r;switch(l=a>.5?s/(2-o-r):s/(o+r),o){case e:i=(t-n)/s+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function S9(e,t,n){var o,r,i;if(e=Cn(e,360),t=Cn(t,100),n=Cn(n,100),t===0)r=n,i=n,o=n;else{var l=n<.5?n*(1+t):n+t-n*t,a=2*n-l;o=Ug(a,l,e+1/3),r=Ug(a,l,e),i=Ug(a,l,e-1/3)}return{r:o*255,g:r*255,b:i*255}}function Dv(e,t,n){e=Cn(e,255),t=Cn(t,255),n=Cn(n,255);var o=Math.max(e,t,n),r=Math.min(e,t,n),i=0,l=o,a=o-r,s=o===0?0:a/o;if(o===r)i=0;else{switch(o){case e:i=(t-n)/a+(t>16,g:(e&65280)>>8,b:e&255}}var Bv={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function oa(e){var t={r:0,g:0,b:0},n=1,o=null,r=null,i=null,l=!1,a=!1;return typeof e=="string"&&(e=I9(e)),typeof e=="object"&&(wr(e.r)&&wr(e.g)&&wr(e.b)?(t=y9(e.r,e.g,e.b),l=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):wr(e.h)&&wr(e.s)&&wr(e.v)?(o=uu(e.s),r=uu(e.v),t=$9(e.h,o,r),l=!0,a="hsv"):wr(e.h)&&wr(e.s)&&wr(e.l)&&(o=uu(e.s),i=uu(e.l),t=S9(e.h,o,i),l=!0,a="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=sP(n),{ok:l,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var O9="[-\\+]?\\d+%?",P9="[-\\+]?\\d*\\.\\d+%?",$i="(?:".concat(P9,")|(?:").concat(O9,")"),Yg="[\\s|\\(]+(".concat($i,")[,|\\s]+(").concat($i,")[,|\\s]+(").concat($i,")\\s*\\)?"),qg="[\\s|\\(]+(".concat($i,")[,|\\s]+(").concat($i,")[,|\\s]+(").concat($i,")[,|\\s]+(").concat($i,")\\s*\\)?"),jo={CSS_UNIT:new RegExp($i),rgb:new RegExp("rgb"+Yg),rgba:new RegExp("rgba"+qg),hsl:new RegExp("hsl"+Yg),hsla:new RegExp("hsla"+qg),hsv:new RegExp("hsv"+Yg),hsva:new RegExp("hsva"+qg),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function I9(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Bv[e])e=Bv[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=jo.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=jo.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=jo.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=jo.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=jo.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=jo.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=jo.hex8.exec(e),n?{r:so(n[1]),g:so(n[2]),b:so(n[3]),a:e$(n[4]),format:t?"name":"hex8"}:(n=jo.hex6.exec(e),n?{r:so(n[1]),g:so(n[2]),b:so(n[3]),format:t?"name":"hex"}:(n=jo.hex4.exec(e),n?{r:so(n[1]+n[1]),g:so(n[2]+n[2]),b:so(n[3]+n[3]),a:e$(n[4]+n[4]),format:t?"name":"hex8"}:(n=jo.hex3.exec(e),n?{r:so(n[1]+n[1]),g:so(n[2]+n[2]),b:so(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function wr(e){return!!jo.CSS_UNIT.exec(String(e))}var ht=(function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var o;if(t instanceof e)return t;typeof t=="number"&&(t=w9(t)),this.originalInput=t;var r=oa(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=(o=n.format)!==null&&o!==void 0?o:r.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,o,r,i=t.r/255,l=t.g/255,a=t.b/255;return i<=.03928?n=i/12.92:n=Math.pow((i+.055)/1.055,2.4),l<=.03928?o=l/12.92:o=Math.pow((l+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),.2126*n+.7152*o+.0722*r},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=sP(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=Dv(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Dv(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),r=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(o,"%, ").concat(r,"%)"):"hsva(".concat(n,", ").concat(o,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=JS(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=JS(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),r=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(o,"%, ").concat(r,"%)"):"hsla(".concat(n,", ").concat(o,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),Nv(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),C9(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),o=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(o,")"):"rgba(".concat(t,", ").concat(n,", ").concat(o,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Cn(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Cn(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+Nv(this.r,this.g,this.b,!1),n=0,o=Object.entries(Bv);n=0,i=!n&&r&&(t.startsWith("hex")||t==="name");return i?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(o=this.toRgbString()),t==="prgb"&&(o=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(o=this.toHexString()),t==="hex3"&&(o=this.toHexString(!0)),t==="hex4"&&(o=this.toHex8String(!0)),t==="hex8"&&(o=this.toHex8String()),t==="name"&&(o=this.toName()),t==="hsl"&&(o=this.toHslString()),t==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=cu(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=cu(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=cu(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=cu(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),o=(n.h+t)%360;return n.h=o<0?360+o:o,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var o=this.toRgb(),r=new e(t).toRgb(),i=n/100,l={r:(r.r-o.r)*i+o.r,g:(r.g-o.g)*i+o.g,b:(r.b-o.b)*i+o.b,a:(r.a-o.a)*i+o.a};return new e(l)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var o=this.toHsl(),r=360/n,i=[this];for(o.h=(o.h-(r*t>>1)+720)%360;--t;)o.h=(o.h+r)%360,i.push(new e(o));return i},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),o=n.h,r=n.s,i=n.v,l=[],a=1/t;t--;)l.push(new e({h:o,s:r,v:i})),i=(i+a)%1;return l},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),o=new e(t).toRgb(),r=n.a+o.a*(1-n.a);return new e({r:(n.r*n.a+o.r*o.a*(1-n.a))/r,g:(n.g*n.a+o.g*o.a*(1-n.a))/r,b:(n.b*n.a+o.b*o.a*(1-n.a))/r,a:r})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),o=n.h,r=[this],i=360/t,l=1;l=60&&Math.round(e.h)<=240?o=n?Math.round(e.h)-du*t:Math.round(e.h)+du*t:o=n?Math.round(e.h)+du*t:Math.round(e.h)-du*t,o<0?o+=360:o>=360&&(o-=360),o}function r$(e,t,n){if(e.h===0&&e.s===0)return e.s;var o;return n?o=e.s-t$*t:t===uP?o=e.s+t$:o=e.s+T9*t,o>1&&(o=1),n&&t===cP&&o>.1&&(o=.1),o<.06&&(o=.06),Number(o.toFixed(2))}function i$(e,t,n){var o;return n?o=e.v+E9*t:o=e.v-M9*t,o>1&&(o=1),Number(o.toFixed(2))}function Ol(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],o=oa(e),r=cP;r>0;r-=1){var i=n$(o),l=fu(oa({h:o$(i,r,!0),s:r$(i,r,!0),v:i$(i,r,!0)}));n.push(l)}n.push(fu(o));for(var a=1;a<=uP;a+=1){var s=n$(o),c=fu(oa({h:o$(s,a),s:r$(s,a),v:i$(s,a)}));n.push(c)}return t.theme==="dark"?_9.map(function(u){var d=u.index,p=u.opacity,g=fu(A9(oa(t.backgroundColor||"#141414"),oa(n[d]),p*100));return g}):n}var ba={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Fs={},Zg={};Object.keys(ba).forEach(function(e){Fs[e]=Ol(ba[e]),Fs[e].primary=Fs[e][5],Zg[e]=Ol(ba[e],{theme:"dark",backgroundColor:"#141414"}),Zg[e].primary=Zg[e][5]});var R9=Fs.gold,D9=Fs.blue;const N9=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function B9(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const dP={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},yp=m(m({},dP),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', @@ -471,5 +471,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `]:{color:e.colorTextDisabled}}}}}},Fce=e=>{const{componentCls:t,antCls:n,iconCls:o,fontSize:r,lineHeight:i}=e,l=`${t}-list-item`,a=`${l}-actions`,s=`${l}-action`,c=Math.round(r*i);return{[`${t}-wrapper`]:{[`${t}-list`]:m(m({},qo()),{lineHeight:e.lineHeight,[l]:{position:"relative",height:e.lineHeight*r,marginTop:e.marginXS,fontSize:r,display:"flex",alignItems:"center",transition:`background-color ${e.motionDurationSlow}`,"&:hover":{backgroundColor:e.controlItemBgHover},[`${l}-name`]:m(m({},Yt),{padding:`0 ${e.paddingXS}px`,lineHeight:i,flex:"auto",transition:`all ${e.motionDurationSlow}`}),[a]:{[s]:{opacity:0},[`${s}${n}-btn-sm`]:{height:c,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[` ${s}:focus, &.picture ${s} - `]:{opacity:1},[o]:{color:e.colorTextDescription,transition:`all ${e.motionDurationSlow}`},[`&:hover ${o}`]:{color:e.colorText}},[`${t}-icon ${o}`]:{color:e.colorTextDescription,fontSize:r},[`${l}-progress`]:{position:"absolute",bottom:-e.uploadProgressOffset,width:"100%",paddingInlineStart:r+e.paddingXS,fontSize:r,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${l}:hover ${s}`]:{opacity:1,color:e.colorText},[`${l}-error`]:{color:e.colorError,[`${l}-name, ${t}-icon ${o}`]:{color:e.colorError},[a]:{[`${o}, ${o}:hover`]:{color:e.colorError},[s]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},s3=new ot("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),c3=new ot("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),Lce=e=>{const{componentCls:t}=e,n=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${n}-appear, ${n}-enter, ${n}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${n}-appear, ${n}-enter`]:{animationName:s3},[`${n}-leave`]:{animationName:c3}}},s3,c3]},zce=e=>{const{componentCls:t,iconCls:n,uploadThumbnailSize:o,uploadProgressOffset:r}=e,i=`${t}-list`,l=`${i}-item`;return{[`${t}-wrapper`]:{[`${i}${i}-picture, ${i}${i}-picture-card`]:{[l]:{position:"relative",height:o+e.lineWidth*2+e.paddingXS*2,padding:e.paddingXS,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},[`${l}-thumbnail`]:m(m({},Yt),{width:o,height:o,lineHeight:`${o+e.paddingSM}px`,textAlign:"center",flex:"none",[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${l}-progress`]:{bottom:r,width:`calc(100% - ${e.paddingSM*2}px)`,marginTop:0,paddingInlineStart:o+e.paddingXS}},[`${l}-error`]:{borderColor:e.colorError,[`${l}-thumbnail ${n}`]:{"svg path[fill='#e6f7ff']":{fill:e.colorErrorBg},"svg path[fill='#1890ff']":{fill:e.colorError}}},[`${l}-uploading`]:{borderStyle:"dashed",[`${l}-name`]:{marginBottom:r}}}}}},Hce=e=>{const{componentCls:t,iconCls:n,fontSizeLG:o,colorTextLightSolid:r}=e,i=`${t}-list`,l=`${i}-item`,a=e.uploadPicCardSize;return{[`${t}-wrapper${t}-picture-card-wrapper`]:m(m({},qo()),{display:"inline-block",width:"100%",[`${t}${t}-select`]:{width:a,height:a,marginInlineEnd:e.marginXS,marginBottom:e.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${i}${i}-picture-card`]:{[`${i}-item-container`]:{display:"inline-block",width:a,height:a,marginBlock:`0 ${e.marginXS}px`,marginInline:`0 ${e.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[l]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${e.paddingXS*2}px)`,height:`calc(100% - ${e.paddingXS*2}px)`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'" "'}},[`${l}:hover`]:{[`&::before, ${l}-actions`]:{opacity:1}},[`${l}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[`${n}-eye, ${n}-download, ${n}-delete`]:{zIndex:10,width:o,margin:`0 ${e.marginXXS}px`,fontSize:o,cursor:"pointer",transition:`all ${e.motionDurationSlow}`}},[`${l}-actions, ${l}-actions:hover`]:{[`${n}-eye, ${n}-download, ${n}-delete`]:{color:new ht(r).setAlpha(.65).toRgbString(),"&:hover":{color:r}}},[`${l}-thumbnail, ${l}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${l}-name`]:{display:"none",textAlign:"center"},[`${l}-file + ${l}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${e.paddingXS*2}px)`},[`${l}-uploading`]:{[`&${l}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:"none"}},[`${l}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${e.paddingXS*2}px)`,paddingInlineStart:0}}})}},jce=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},Vce=e=>{const{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:m(m({},Ue(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-disabled`]:{color:n,cursor:"not-allowed"}})}},Wce=Ke("Upload",e=>{const{fontSizeHeading3:t,fontSize:n,lineHeight:o,lineWidth:r,controlHeightLG:i}=e,l=Math.round(n*o),a=ke(e,{uploadThumbnailSize:t*2,uploadProgressOffset:l/2+r,uploadPicCardSize:i*2.55});return[Vce(a),kce(a),zce(a),Hce(a),Fce(a),Lce(a),jce(a),Fc(a)]});var Kce=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(l){l(i)})}return new(n||(n=Promise))(function(i,l){function a(u){try{c(o.next(u))}catch(d){l(d)}}function s(u){try{c(o.throw(u))}catch(d){l(d)}}function c(u){u.done?i(u.value):r(u.value).then(a,s)}c((o=o.apply(e,t||[])).next())})},Gce=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var M;return(M=s.value)!==null&&M!==void 0?M:d.value}),[g,v]=Tt(e.defaultFileList||[],{value:ze(e,"fileList"),postState:M=>{const A=Date.now();return(M??[]).map((R,L)=>(!R.uid&&!Object.isFrozen(R)&&(R.uid=`__AUTO__${A}_${L}__`),R))}}),h=re("drop"),b=re(null);We(()=>{Ot(e.fileList!==void 0||o.value===void 0,"Upload","`value` is not a valid prop, do you mean `fileList`?"),Ot(e.transformFile===void 0,"Upload","`transformFile` is deprecated. Please use `beforeUpload` directly."),Ot(e.remove===void 0,"Upload","`remove` props is deprecated. Please use `remove` event.")});const y=(M,A,R)=>{var L,P;let D=[...A];e.maxCount===1?D=D.slice(-1):e.maxCount&&(D=D.slice(0,e.maxCount)),v(D);const N={file:M,fileList:D};R&&(N.event=R),(L=e["onUpdate:fileList"])===null||L===void 0||L.call(e,N.fileList),(P=e.onChange)===null||P===void 0||P.call(e,N),i.onFieldChange()},S=(M,A)=>Kce(this,void 0,void 0,function*(){const{beforeUpload:R,transformFile:L}=e;let P=M;if(R){const D=yield R(M,A);if(D===!1)return!1;if(delete M[Ps],D===Ps)return Object.defineProperty(M,Ps,{value:!0,configurable:!0}),!1;typeof D=="object"&&D&&(P=D)}return L&&(P=yield L(P)),P}),$=M=>{const A=M.filter(P=>!P.file[Ps]);if(!A.length)return;const R=A.map(P=>Fu(P.file));let L=[...g.value];R.forEach(P=>{L=Lu(P,L)}),R.forEach((P,D)=>{let N=P;if(A[D].parsedFile)P.status="uploading";else{const{originFileObj:k}=P;let F;try{F=new File([k],k.name,{type:k.type})}catch{F=new Blob([k],{type:k.type}),F.name=k.name,F.lastModifiedDate=new Date,F.lastModified=new Date().getTime()}F.uid=P.uid,N=F}y(N,L)})},x=(M,A,R)=>{try{typeof M=="string"&&(M=JSON.parse(M))}catch{}if(!ov(A,g.value))return;const L=Fu(A);L.status="done",L.percent=100,L.response=M,L.xhr=R;const P=Lu(L,g.value);y(L,P)},C=(M,A)=>{if(!ov(A,g.value))return;const R=Fu(A);R.status="uploading",R.percent=M.percent;const L=Lu(R,g.value);y(R,L,M)},O=(M,A,R)=>{if(!ov(R,g.value))return;const L=Fu(R);L.error=M,L.response=A,L.status="error";const P=Lu(L,g.value);y(L,P)},w=M=>{let A;const R=e.onRemove||e.remove;Promise.resolve(typeof R=="function"?R(M):R).then(L=>{var P,D;if(L===!1)return;const N=Ice(M,g.value);N&&(A=m(m({},M),{status:"removed"}),(P=g.value)===null||P===void 0||P.forEach(k=>{const F=A.uid!==void 0?"uid":"name";k[F]===A[F]&&!Object.isFrozen(k)&&(k.status="removed")}),(D=b.value)===null||D===void 0||D.abort(A),y(A,N))})},T=M=>{var A;h.value=M.type,M.type==="drop"&&((A=e.onDrop)===null||A===void 0||A.call(e,M))};r({onBatchStart:$,onSuccess:x,onProgress:C,onError:O,fileList:g,upload:b});const[E]=ko("Upload",Un.Upload,I(()=>e.locale)),_=(M,A)=>{const{removeIcon:R,previewIcon:L,downloadIcon:P,previewFile:D,onPreview:N,onDownload:k,isImageUrl:F,progress:z,itemRender:H,iconRender:j,showUploadList:Y}=e,{showDownloadIcon:Q,showPreviewIcon:U,showRemoveIcon:ee}=typeof Y=="boolean"?{}:Y;return Y?f(Bce,{prefixCls:l.value,listType:e.listType,items:g.value,previewFile:D,onPreview:N,onDownload:k,onRemove:w,showRemoveIcon:!p.value&&ee,showPreviewIcon:U,showDownloadIcon:Q,removeIcon:R,previewIcon:L,downloadIcon:P,iconRender:j,locale:E.value,isImageUrl:F,progress:z,itemRender:H,appendActionVisible:A,appendAction:M},m({},n)):M?.()};return()=>{var M,A,R;const{listType:L,type:P}=e,{class:D,style:N}=o,k=Gce(o,["class","style"]),F=m(m(m({onBatchStart:$,onError:O,onProgress:C,onSuccess:x},k),e),{id:(M=e.id)!==null&&M!==void 0?M:i.id.value,prefixCls:l.value,beforeUpload:S,onChange:void 0,disabled:p.value});delete F.remove,(!n.default||p.value)&&delete F.id;const z={[`${l.value}-rtl`]:a.value==="rtl"};if(P==="drag"){const Q=ae(l.value,{[`${l.value}-drag`]:!0,[`${l.value}-drag-uploading`]:g.value.some(U=>U.status==="uploading"),[`${l.value}-drag-hover`]:h.value==="dragover",[`${l.value}-disabled`]:p.value,[`${l.value}-rtl`]:a.value==="rtl"},o.class,u.value);return c(f("span",B(B({},o),{},{class:ae(`${l.value}-wrapper`,z,D,u.value)}),[f("div",{class:Q,onDrop:T,onDragover:T,onDragleave:T,style:o.style},[f(o3,B(B({},F),{},{ref:b,class:`${l.value}-btn`}),B({default:()=>[f("div",{class:`${l.value}-drag-container`},[(A=n.default)===null||A===void 0?void 0:A.call(n)])]},n))]),_()]))}const H=ae(l.value,{[`${l.value}-select`]:!0,[`${l.value}-select-${L}`]:!0,[`${l.value}-disabled`]:p.value,[`${l.value}-rtl`]:a.value==="rtl"}),j=$t((R=n.default)===null||R===void 0?void 0:R.call(n)),Y=Q=>f("div",{class:H,style:Q},[f(o3,B(B({},F),{},{ref:b}),n)]);return c(L==="picture-card"?f("span",B(B({},o),{},{class:ae(`${l.value}-wrapper`,`${l.value}-picture-card-wrapper`,z,o.class,u.value)}),[_(Y,!!(j&&j.length))]):f("span",B(B({},o),{},{class:ae(`${l.value}-wrapper`,z,o.class,u.value)}),[Y(j&&j.length?void 0:{display:"none"}),_()]))}}});var u3=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{height:r}=e,i=u3(e,["height"]),{style:l}=o,a=u3(o,["style"]),s=m(m(m({},i),a),{type:"drag",style:m(m({},l),{height:typeof r=="number"?`${r}px`:r})});return f(Nd,s,n)}}}),Xce=Bd,Uce=m(Nd,{Dragger:Bd,LIST_IGNORE:Ps,install(e){return e.component(Nd.name,Nd),e.component(Bd.name,Bd),e}});function Yce(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function qce(e){return Object.keys(e).map(t=>`${Yce(t)}: ${e[t]};`).join(" ")}function d3(){return window.devicePixelRatio||1}function rv(e,t,n,o){e.translate(t,n),e.rotate(Math.PI/180*Number(o)),e.translate(-t,-n)}const Zce=(e,t)=>{let n=!1;return e.removedNodes.length&&(n=Array.from(e.removedNodes).some(o=>o===t)),e.type==="attributes"&&e.target===t&&(n=!0),n};var Qce=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r2&&arguments[2]!==void 0?arguments[2]:{};const{window:o=W8}=n,r=Qce(n,["window"]);let i;const l=j8(()=>o&&"MutationObserver"in o),a=()=>{i&&(i.disconnect(),i=void 0)},s=ye(()=>ay(e),u=>{a(),l.value&&o&&u&&(i=new MutationObserver(t),i.observe(u,r))},{immediate:!0}),c=()=>{a(),s()};return H8(c),{isSupported:l,stop:c}}const iv=2,f3=3,eue=()=>({zIndex:Number,rotate:Number,width:Number,height:Number,image:String,content:Fe([String,Array]),font:De(),rootClassName:String,gap:at(),offset:at()}),tue=ie({name:"AWatermark",inheritAttrs:!1,props:Ze(eue(),{zIndex:9,rotate:-22,font:{},gap:[100,100]}),setup(e,t){let{slots:n,attrs:o}=t;const[,r]=Zr(),i=oe(),l=oe(),a=oe(!1),s=I(()=>{var _,M;return(M=(_=e.gap)===null||_===void 0?void 0:_[0])!==null&&M!==void 0?M:100}),c=I(()=>{var _,M;return(M=(_=e.gap)===null||_===void 0?void 0:_[1])!==null&&M!==void 0?M:100}),u=I(()=>s.value/2),d=I(()=>c.value/2),p=I(()=>{var _,M;return(M=(_=e.offset)===null||_===void 0?void 0:_[0])!==null&&M!==void 0?M:u.value}),g=I(()=>{var _,M;return(M=(_=e.offset)===null||_===void 0?void 0:_[1])!==null&&M!==void 0?M:d.value}),v=I(()=>{var _,M;return(M=(_=e.font)===null||_===void 0?void 0:_.fontSize)!==null&&M!==void 0?M:r.value.fontSizeLG}),h=I(()=>{var _,M;return(M=(_=e.font)===null||_===void 0?void 0:_.fontWeight)!==null&&M!==void 0?M:"normal"}),b=I(()=>{var _,M;return(M=(_=e.font)===null||_===void 0?void 0:_.fontStyle)!==null&&M!==void 0?M:"normal"}),y=I(()=>{var _,M;return(M=(_=e.font)===null||_===void 0?void 0:_.fontFamily)!==null&&M!==void 0?M:"sans-serif"}),S=I(()=>{var _,M;return(M=(_=e.font)===null||_===void 0?void 0:_.color)!==null&&M!==void 0?M:r.value.colorFill}),$=I(()=>{var _;const M={zIndex:(_=e.zIndex)!==null&&_!==void 0?_:9,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let A=p.value-u.value,R=g.value-d.value;return A>0&&(M.left=`${A}px`,M.width=`calc(100% - ${A}px)`,A=0),R>0&&(M.top=`${R}px`,M.height=`calc(100% - ${R}px)`,R=0),M.backgroundPosition=`${A}px ${R}px`,M}),x=()=>{l.value&&(l.value.remove(),l.value=void 0)},C=(_,M)=>{var A;i.value&&l.value&&(a.value=!0,l.value.setAttribute("style",qce(m(m({},$.value),{backgroundImage:`url('${_}')`,backgroundSize:`${(s.value+M)*iv}px`}))),(A=i.value)===null||A===void 0||A.append(l.value),setTimeout(()=>{a.value=!1}))},O=_=>{let M=120,A=64;const R=e.content,L=e.image,P=e.width,D=e.height;if(!L&&_.measureText){_.font=`${Number(v.value)}px ${y.value}`;const N=Array.isArray(R)?R:[R],k=N.map(F=>_.measureText(F).width);M=Math.ceil(Math.max(...k)),A=Number(v.value)*N.length+(N.length-1)*f3}return[P??M,D??A]},w=(_,M,A,R,L)=>{const P=d3(),D=e.content,N=Number(v.value)*P;_.font=`${b.value} normal ${h.value} ${N}px/${L}px ${y.value}`,_.fillStyle=S.value,_.textAlign="center",_.textBaseline="top",_.translate(R/2,0);const k=Array.isArray(D)?D:[D];k?.forEach((F,z)=>{_.fillText(F??"",M,A+z*(N+f3*P))})},T=()=>{var _;const M=document.createElement("canvas"),A=M.getContext("2d"),R=e.image,L=(_=e.rotate)!==null&&_!==void 0?_:-22;if(A){l.value||(l.value=document.createElement("div"));const P=d3(),[D,N]=O(A),k=(s.value+D)*P,F=(c.value+N)*P;M.setAttribute("width",`${k*iv}px`),M.setAttribute("height",`${F*iv}px`);const z=s.value*P/2,H=c.value*P/2,j=D*P,Y=N*P,Q=(j+s.value*P)/2,U=(Y+c.value*P)/2,ee=z+k,X=H+F,J=Q+k,Z=U+F;if(A.save(),rv(A,Q,U,L),R){const G=new Image;G.onload=()=>{A.drawImage(G,z,H,j,Y),A.restore(),rv(A,J,Z,L),A.drawImage(G,ee,X,j,Y),C(M.toDataURL(),D)},G.crossOrigin="anonymous",G.referrerPolicy="no-referrer",G.src=R}else w(A,z,H,j,Y),A.restore(),rv(A,J,Z,L),w(A,ee,X,j,Y),C(M.toDataURL(),D)}};return We(()=>{T()}),ye(()=>[e,r.value.colorFill,r.value.fontSizeLG],()=>{T()},{deep:!0,flush:"post"}),Qe(()=>{x()}),Jce(i,_=>{a.value||_.forEach(M=>{Zce(M,l.value)&&(x(),T())})},{attributes:!0,subtree:!0,childList:!0,attributeFilter:["style","class"]}),()=>{var _;return f("div",B(B({},o),{},{ref:i,class:[o.class,e.rootClassName],style:[{position:"relative"},o.style]}),[(_=n.default)===null||_===void 0?void 0:_.call(n)])}}}),nue=Et(tue);function p3(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}function g3(e){return{backgroundColor:e.bgColorSelected,boxShadow:e.boxShadow}}const oue=m({overflow:"hidden"},Yt),rue=e=>{const{componentCls:t}=e;return{[t]:m(m(m(m(m({},Ue(e)),{display:"inline-block",padding:e.segmentedContainerPadding,color:e.labelColor,backgroundColor:e.bgColor,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${e.motionDurationMid} ${e.motionEaseInOut}`,borderRadius:e.borderRadiusSM,"&-selected":m(m({},g3(e)),{color:e.labelColorHover}),"&::after":{content:'""',position:"absolute",width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",transition:`background-color ${e.motionDurationMid}`,pointerEvents:"none"},[`&:hover:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.labelColorHover,"&::after":{backgroundColor:e.bgColorHover}},"&-label":m({minHeight:e.controlHeight-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeight-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontal}px`},oue),"&-icon + *":{marginInlineStart:e.marginSM/2},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:m(m({},g3(e)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${e.paddingXXS}px 0`,borderRadius:e.borderRadiusSM,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:e.controlHeightLG-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeightLG-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontal}px`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:e.controlHeightSM-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeightSM-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontalSM}px`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}}}),p3(`&-disabled ${t}-item`,e)),p3(`${t}-item-disabled`,e)),{[`${t}-thumb-motion-appear-active`]:{transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,willChange:"transform, width"}})}},iue=Ke("Segmented",e=>{const{lineWidthBold:t,lineWidth:n,colorTextLabel:o,colorText:r,colorFillSecondary:i,colorBgLayout:l,colorBgElevated:a}=e,s=ke(e,{segmentedPaddingHorizontal:e.controlPaddingHorizontal-n,segmentedPaddingHorizontalSM:e.controlPaddingHorizontalSM-n,segmentedContainerPadding:t,labelColor:o,labelColorHover:r,bgColor:l,bgColorHover:i,bgColorSelected:a});return[rue(s)]}),h3=e=>e?{left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth}:null,ta=e=>e!==void 0?`${e}px`:void 0,lue=ie({props:{value:Ct(),getValueIndex:Ct(),prefixCls:Ct(),motionName:Ct(),onMotionStart:Ct(),onMotionEnd:Ct(),direction:Ct(),containerRef:Ct()},emits:["motionStart","motionEnd"],setup(e,t){let{emit:n}=t;const o=re(),r=v=>{var h;const b=e.getValueIndex(v),y=(h=e.containerRef.value)===null||h===void 0?void 0:h.querySelectorAll(`.${e.prefixCls}-item`)[b];return y?.offsetParent&&y},i=re(null),l=re(null);ye(()=>e.value,(v,h)=>{const b=r(h),y=r(v),S=h3(b),$=h3(y);i.value=S,l.value=$,n(b&&y?"motionStart":"motionEnd")},{flush:"post"});const a=I(()=>{var v,h;return e.direction==="rtl"?ta(-((v=i.value)===null||v===void 0?void 0:v.right)):ta((h=i.value)===null||h===void 0?void 0:h.left)}),s=I(()=>{var v,h;return e.direction==="rtl"?ta(-((v=l.value)===null||v===void 0?void 0:v.right)):ta((h=l.value)===null||h===void 0?void 0:h.left)});let c;const u=v=>{clearTimeout(c),rt(()=>{v&&(v.style.transform="translateX(var(--thumb-start-left))",v.style.width="var(--thumb-start-width)")})},d=v=>{c=setTimeout(()=>{v&&($f(v,`${e.motionName}-appear-active`),v.style.transform="translateX(var(--thumb-active-left))",v.style.width="var(--thumb-active-width)")})},p=v=>{i.value=null,l.value=null,v&&(v.style.transform=null,v.style.width=null,Cf(v,`${e.motionName}-appear-active`)),n("motionEnd")},g=I(()=>{var v,h;return{"--thumb-start-left":a.value,"--thumb-start-width":ta((v=i.value)===null||v===void 0?void 0:v.width),"--thumb-active-left":s.value,"--thumb-active-width":ta((h=l.value)===null||h===void 0?void 0:h.width)}});return Qe(()=>{clearTimeout(c)}),()=>{const v={ref:o,style:g.value,class:[`${e.prefixCls}-thumb`]};return f(pn,{appear:!0,onBeforeEnter:u,onEnter:d,onAfterEnter:p},{default:()=>[!i.value||!l.value?null:f("div",v,null)]})}}});function aue(e){return e.map(t=>typeof t=="object"&&t!==null?t:{label:t?.toString(),title:t?.toString(),value:t})}const sue=()=>({prefixCls:String,options:at(),block:$e(),disabled:$e(),size:Ne(),value:m(m({},Fe([String,Number])),{required:!0}),motionName:String,onChange:ve(),"onUpdate:value":ve()}),pE=(e,t)=>{let{slots:n,emit:o}=t;const{value:r,disabled:i,payload:l,title:a,prefixCls:s,label:c=n.label,checked:u,className:d}=e,p=g=>{i||o("change",g,r)};return f("label",{class:ae({[`${s}-item-disabled`]:i},d)},[f("input",{class:`${s}-item-input`,type:"radio",disabled:i,checked:u,onChange:p},null),f("div",{class:`${s}-item-label`,title:typeof a=="string"?a:""},[typeof c=="function"?c({value:r,disabled:i,payload:l,title:a}):c??r])])};pE.inheritAttrs=!1;const cue=ie({name:"ASegmented",inheritAttrs:!1,props:Ze(sue(),{options:[],motionName:"thumb-motion"}),slots:Object,setup(e,t){let{emit:n,slots:o,attrs:r}=t;const{prefixCls:i,direction:l,size:a}=Te("segmented",e),[s,c]=iue(i),u=oe(),d=oe(!1),p=I(()=>aue(e.options)),g=(v,h)=>{e.disabled||(n("update:value",h),n("change",h))};return()=>{const v=i.value;return s(f("div",B(B({},r),{},{class:ae(v,{[c.value]:!0,[`${v}-block`]:e.block,[`${v}-disabled`]:e.disabled,[`${v}-lg`]:a.value=="large",[`${v}-sm`]:a.value=="small",[`${v}-rtl`]:l.value==="rtl"},r.class),ref:u}),[f("div",{class:`${v}-group`},[f(lue,{containerRef:u,prefixCls:v,value:e.value,motionName:`${v}-${e.motionName}`,direction:l.value,getValueIndex:h=>p.value.findIndex(b=>b.value===h),onMotionStart:()=>{d.value=!0},onMotionEnd:()=>{d.value=!1}},null),p.value.map(h=>f(pE,B(B({key:h.value,prefixCls:v,checked:h.value===e.value,onChange:g},h),{},{className:ae(h.className,`${v}-item`,{[`${v}-item-selected`]:h.value===e.value&&!d.value}),disabled:!!e.disabled||!!h.disabled}),o))])]))}}}),uue=Et(cue),due=e=>{const{componentCls:t}=e;return{[t]:m(m({},Ue(e)),{display:"flex",justifyContent:"center",alignItems:"center",padding:e.paddingSM,backgroundColor:e.colorWhite,borderRadius:e.borderRadiusLG,border:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,position:"relative",width:"100%",height:"100%",overflow:"hidden",[`& > ${t}-mask`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:e.colorText,lineHeight:e.lineHeight,background:e.QRCodeMaskBackgroundColor,textAlign:"center",[`& > ${t}-expired , & > ${t}-scanned`]:{color:e.QRCodeTextColor}},"&-icon":{marginBlockEnd:e.marginXS,fontSize:e.controlHeight}}),[`${t}-borderless`]:{borderColor:"transparent"}}},fue=Ke("QRCode",e=>due(ke(e,{QRCodeTextColor:"rgba(0, 0, 0, 0.88)",QRCodeMaskBackgroundColor:"rgba(255, 255, 255, 0.96)"})));var pue={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z"}}]},name:"api",theme:"outlined"};function v3(e){for(var t=1;t({size:{type:Number,default:160},value:{type:String,required:!0},type:Ne("canvas"),color:String,bgColor:String,includeMargin:Boolean,imageSettings:De()}),Rue=()=>m(m({},D1()),{errorLevel:Ne("M"),icon:String,iconSize:{type:Number,default:40},status:Ne("active"),bordered:{type:Boolean,default:!0}});var Eo;(function(e){class t{static encodeText(a,s){const c=e.QrSegment.makeSegments(a);return t.encodeSegments(c,s)}static encodeBinary(a,s){const c=e.QrSegment.makeBytes(a);return t.encodeSegments([c],s)}static encodeSegments(a,s){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,p=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(!(t.MIN_VERSION<=c&&c<=u&&u<=t.MAX_VERSION)||d<-1||d>7)throw new RangeError("Invalid value");let g,v;for(g=c;;g++){const S=t.getNumDataCodewords(g,s)*8,$=i.getTotalBits(a,g);if($<=S){v=$;break}if(g>=u)throw new RangeError("Data too long")}for(const S of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])p&&v<=t.getNumDataCodewords(g,S)*8&&(s=S);const h=[];for(const S of a){n(S.mode.modeBits,4,h),n(S.numChars,S.mode.numCharCountBits(g),h);for(const $ of S.getData())h.push($)}r(h.length==v);const b=t.getNumDataCodewords(g,s)*8;r(h.length<=b),n(0,Math.min(4,b-h.length),h),n(0,(8-h.length%8)%8,h),r(h.length%8==0);for(let S=236;h.lengthy[$>>>3]|=S<<7-($&7)),new t(g,s,y,d)}constructor(a,s,c,u){if(this.version=a,this.errorCorrectionLevel=s,this.modules=[],this.isFunction=[],at.MAX_VERSION)throw new RangeError("Version value out of range");if(u<-1||u>7)throw new RangeError("Mask value out of range");this.size=a*4+17;const d=[];for(let g=0;g>>9)*1335;const u=(s<<10|c)^21522;r(u>>>15==0);for(let d=0;d<=5;d++)this.setFunctionModule(8,d,o(u,d));this.setFunctionModule(8,7,o(u,6)),this.setFunctionModule(8,8,o(u,7)),this.setFunctionModule(7,8,o(u,8));for(let d=9;d<15;d++)this.setFunctionModule(14-d,8,o(u,d));for(let d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,o(u,d));for(let d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,o(u,d));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let a=this.version;for(let c=0;c<12;c++)a=a<<1^(a>>>11)*7973;const s=this.version<<12|a;r(s>>>18==0);for(let c=0;c<18;c++){const u=o(s,c),d=this.size-11+c%3,p=Math.floor(c/3);this.setFunctionModule(d,p,u),this.setFunctionModule(p,d,u)}}drawFinderPattern(a,s){for(let c=-4;c<=4;c++)for(let u=-4;u<=4;u++){const d=Math.max(Math.abs(u),Math.abs(c)),p=a+u,g=s+c;0<=p&&p{(S!=v-d||x>=g)&&y.push($[S])});return r(y.length==p),y}drawCodewords(a){if(a.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let s=0;for(let c=this.size-1;c>=1;c-=2){c==6&&(c=5);for(let u=0;u>>3],7-(s&7)),s++)}}r(s==a.length*8)}applyMask(a){if(a<0||a>7)throw new RangeError("Mask value out of range");for(let s=0;s5&&a++):(this.finderPenaltyAddHistory(g,v),p||(a+=this.finderPenaltyCountPatterns(v)*t.PENALTY_N3),p=this.modules[d][h],g=1);a+=this.finderPenaltyTerminateAndCount(p,g,v)*t.PENALTY_N3}for(let d=0;d5&&a++):(this.finderPenaltyAddHistory(g,v),p||(a+=this.finderPenaltyCountPatterns(v)*t.PENALTY_N3),p=this.modules[h][d],g=1);a+=this.finderPenaltyTerminateAndCount(p,g,v)*t.PENALTY_N3}for(let d=0;dp+(g?1:0),s);const c=this.size*this.size,u=Math.ceil(Math.abs(s*20-c*10)/c)-1;return r(0<=u&&u<=9),a+=u*t.PENALTY_N4,r(0<=a&&a<=2568888),a}getAlignmentPatternPositions(){if(this.version==1)return[];{const a=Math.floor(this.version/7)+2,s=this.version==32?26:Math.ceil((this.version*4+4)/(a*2-2))*2,c=[6];for(let u=this.size-7;c.lengtht.MAX_VERSION)throw new RangeError("Version number out of range");let s=(16*a+128)*a+64;if(a>=2){const c=Math.floor(a/7)+2;s-=(25*c-10)*c-55,a>=7&&(s-=36)}return r(208<=s&&s<=29648),s}static getNumDataCodewords(a,s){return Math.floor(t.getNumRawDataModules(a)/8)-t.ECC_CODEWORDS_PER_BLOCK[s.ordinal][a]*t.NUM_ERROR_CORRECTION_BLOCKS[s.ordinal][a]}static reedSolomonComputeDivisor(a){if(a<1||a>255)throw new RangeError("Degree out of range");const s=[];for(let u=0;u0);for(const u of a){const d=u^c.shift();c.push(0),s.forEach((p,g)=>c[g]^=t.reedSolomonMultiply(p,d))}return c}static reedSolomonMultiply(a,s){if(a>>>8||s>>>8)throw new RangeError("Byte out of range");let c=0;for(let u=7;u>=0;u--)c=c<<1^(c>>>7)*285,c^=(s>>>u&1)*a;return r(c>>>8==0),c}finderPenaltyCountPatterns(a){const s=a[1];r(s<=this.size*3);const c=s>0&&a[2]==s&&a[3]==s*3&&a[4]==s&&a[5]==s;return(c&&a[0]>=s*4&&a[6]>=s?1:0)+(c&&a[6]>=s*4&&a[0]>=s?1:0)}finderPenaltyTerminateAndCount(a,s,c){return a&&(this.finderPenaltyAddHistory(s,c),s=0),s+=this.size,this.finderPenaltyAddHistory(s,c),this.finderPenaltyCountPatterns(c)}finderPenaltyAddHistory(a,s){s[0]==0&&(a+=this.size),s.pop(),s.unshift(a)}}t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(l,a,s){if(a<0||a>31||l>>>a)throw new RangeError("Value out of range");for(let c=a-1;c>=0;c--)s.push(l>>>c&1)}function o(l,a){return(l>>>a&1)!=0}function r(l){if(!l)throw new Error("Assertion error")}class i{static makeBytes(a){const s=[];for(const c of a)n(c,8,s);return new i(i.Mode.BYTE,a.length,s)}static makeNumeric(a){if(!i.isNumeric(a))throw new RangeError("String contains non-numeric characters");const s=[];for(let c=0;c=1<1&&arguments[1]!==void 0?arguments[1]:0;const n=[];return e.forEach(function(o,r){let i=null;o.forEach(function(l,a){if(!l&&i!==null){n.push(`M${i+t} ${r+t}h${a-i}v1H${i+t}z`),i=null;return}if(a===o.length-1){if(!l)return;i===null?n.push(`M${a+t},${r+t} h1v1H${a+t}z`):n.push(`M${i+t},${r+t} h${a+1-i}v1H${i+t}z`);return}l&&i===null&&(i=a)})}),n.join("")}function SE(e,t){return e.slice().map((n,o)=>o=t.y+t.h?n:n.map((r,i)=>i=t.x+t.w?r:!1))}function $E(e,t,n,o){if(o==null)return null;const r=e.length+n*2,i=Math.floor(t*Bue),l=r/t,a=(o.width||i)*l,s=(o.height||i)*l,c=o.x==null?e.length/2-a/2:o.x*l,u=o.y==null?e.length/2-s/2:o.y*l;let d=null;if(o.excavate){const p=Math.floor(c),g=Math.floor(u),v=Math.ceil(a+c-p),h=Math.ceil(s+u-g);d={x:p,y:g,w:v,h}}return{x:c,y:u,h:s,w:a,excavation:d}}function CE(e,t){return t!=null?Math.floor(t):e?Due:Nue}const kue=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),Fue=ie({name:"QRCodeCanvas",inheritAttrs:!1,props:m(m({},D1()),{level:String,bgColor:String,fgColor:String,marginSize:Number}),setup(e,t){let{attrs:n,expose:o}=t;const r=I(()=>{var s;return(s=e.imageSettings)===null||s===void 0?void 0:s.src}),i=oe(null),l=oe(null),a=oe(!1);return o({toDataURL:(s,c)=>{var u;return(u=i.value)===null||u===void 0?void 0:u.toDataURL(s,c)}}),Le(()=>{const{value:s,size:c=qm,level:u=hE,bgColor:d=vE,fgColor:p=mE,includeMargin:g=bE,marginSize:v,imageSettings:h}=e;if(i.value!=null){const b=i.value,y=b.getContext("2d");if(!y)return;let S=Eo.QrCode.encodeText(s,gE[u]).getModules();const $=CE(g,v),x=S.length+$*2,C=$E(S,c,$,h),O=l.value,w=a.value&&C!=null&&O!==null&&O.complete&&O.naturalHeight!==0&&O.naturalWidth!==0;w&&C.excavation!=null&&(S=SE(S,C.excavation));const T=window.devicePixelRatio||1;b.height=b.width=c*T;const E=c/x*T;y.scale(E,E),y.fillStyle=d,y.fillRect(0,0,x,x),y.fillStyle=p,kue?y.fill(new Path2D(yE(S,$))):S.forEach(function(_,M){_.forEach(function(A,R){A&&y.fillRect(R+$,M+$,1,1)})}),w&&y.drawImage(O,C.x+$,C.y+$,C.w,C.h)}},{flush:"post"}),ye(r,()=>{a.value=!1}),()=>{var s;const c=(s=e.size)!==null&&s!==void 0?s:qm,u={height:`${c}px`,width:`${c}px`};let d=null;return r.value!=null&&(d=f("img",{src:r.value,key:r.value,style:{display:"none"},onLoad:()=>{a.value=!0},ref:l},null)),f(He,null,[f("canvas",B(B({},n),{},{style:[u,n.style],ref:i}),null),d])}}}),Lue=ie({name:"QRCodeSVG",inheritAttrs:!1,props:m(m({},D1()),{color:String,level:String,bgColor:String,fgColor:String,marginSize:Number,title:String}),setup(e){let t=null,n=null,o=null,r=null,i=null,l=null;return Le(()=>{const{value:a,size:s=qm,level:c=hE,includeMargin:u=bE,marginSize:d,imageSettings:p}=e;t=Eo.QrCode.encodeText(a,gE[c]).getModules(),n=CE(u,d),o=t.length+n*2,r=$E(t,s,n,p),p!=null&&r!=null&&(r.excavation!=null&&(t=SE(t,r.excavation)),l=f("image",{"xlink:href":p.src,height:r.h,width:r.w,x:r.x+n,y:r.y+n,preserveAspectRatio:"none"},null)),i=yE(t,n)}),()=>{const a=e.bgColor&&vE,s=e.fgColor&&mE;return f("svg",{height:e.size,width:e.size,viewBox:`0 0 ${o} ${o}`},[!!e.title&&f("title",null,[e.title]),f("path",{fill:a,d:`M0,0 h${o}v${o}H0z`,"shape-rendering":"crispEdges"},null),f("path",{fill:s,d:i,"shape-rendering":"crispEdges"},null),l])}}}),zue=ie({name:"AQrcode",inheritAttrs:!1,props:Rue(),emits:["refresh"],setup(e,t){let{emit:n,attrs:o,expose:r}=t;const[i]=ko("QRCode"),{prefixCls:l}=Te("qrcode",e),[a,s]=fue(l),[,c]=Zr(),u=re();r({toDataURL:(p,g)=>{var v;return(v=u.value)===null||v===void 0?void 0:v.toDataURL(p,g)}});const d=I(()=>{const{value:p,icon:g="",size:v=160,iconSize:h=40,color:b=c.value.colorText,bgColor:y="transparent",errorLevel:S="M"}=e,$={src:g,x:void 0,y:void 0,height:h,width:h,excavate:!0};return{value:p,size:v-(c.value.paddingSM+c.value.lineWidth)*2,level:S,bgColor:y,fgColor:b,imageSettings:g?$:void 0}});return()=>{const p=l.value;return a(f("div",B(B({},o),{},{style:[o.style,{width:`${e.size}px`,height:`${e.size}px`,backgroundColor:d.value.bgColor}],class:[s.value,p,{[`${p}-borderless`]:!e.bordered}]}),[e.status!=="active"&&f("div",{class:`${p}-mask`},[e.status==="loading"&&f(mr,null,null),e.status==="expired"&&f(He,null,[f("p",{class:`${p}-expired`},[i.value.expired]),f(jt,{type:"link",onClick:g=>n("refresh",g)},{default:()=>[i.value.refresh],icon:()=>f(_1,null,null)})]),e.status==="scanned"&&f("p",{class:`${p}-scanned`},[i.value.scanned])]),e.type==="canvas"?f(Fue,B({ref:u},d.value),null):f(Lue,d.value,null)]))}}}),Hue=Et(zue);function jue(e){const t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,{top:o,right:r,bottom:i,left:l}=e.getBoundingClientRect();return o>=0&&l>=0&&r<=t&&i<=n}function Vue(e,t,n,o){const[r,i]=bt(void 0);Le(()=>{const u=typeof e.value=="function"?e.value():e.value;i(u||null)},{flush:"post"});const[l,a]=bt(null),s=()=>{if(!t.value){a(null);return}if(r.value){!jue(r.value)&&t.value&&r.value.scrollIntoView(o.value);const{left:u,top:d,width:p,height:g}=r.value.getBoundingClientRect(),v={left:u,top:d,width:p,height:g,radius:0};JSON.stringify(l.value)!==JSON.stringify(v)&&a(v)}else a(null)};return We(()=>{ye([t,r],()=>{s()},{flush:"post",immediate:!0}),window.addEventListener("resize",s)}),Qe(()=>{window.removeEventListener("resize",s)}),[I(()=>{var u,d;if(!l.value)return l.value;const p=((u=n.value)===null||u===void 0?void 0:u.offset)||6,g=((d=n.value)===null||d===void 0?void 0:d.radius)||2;return{left:l.value.left-p,top:l.value.top-p,width:l.value.width+p*2,height:l.value.height+p*2,radius:g}}),r]}const Wue=()=>({arrow:Fe([Boolean,Object]),target:Fe([String,Function,Object]),title:Fe([String,Object]),description:Fe([String,Object]),placement:Ne(),mask:Fe([Object,Boolean],!0),className:{type:String},style:De(),scrollIntoViewOptions:Fe([Boolean,Object])}),N1=()=>m(m({},Wue()),{prefixCls:{type:String},total:{type:Number},current:{type:Number},onClose:ve(),onFinish:ve(),renderPanel:ve(),onPrev:ve(),onNext:ve()}),Kue=ie({name:"DefaultPanel",inheritAttrs:!1,props:N1(),setup(e,t){let{attrs:n}=t;return()=>{const{prefixCls:o,current:r,total:i,title:l,description:a,onClose:s,onPrev:c,onNext:u,onFinish:d}=e;return f("div",B(B({},n),{},{class:ae(`${o}-content`,n.class)}),[f("div",{class:`${o}-inner`},[f("button",{type:"button",onClick:s,"aria-label":"Close",class:`${o}-close`},[f("span",{class:`${o}-close-x`},[vt("×")])]),f("div",{class:`${o}-header`},[f("div",{class:`${o}-title`},[l])]),f("div",{class:`${o}-description`},[a]),f("div",{class:`${o}-footer`},[f("div",{class:`${o}-sliders`},[i>1?[...Array.from({length:i}).keys()].map((p,g)=>f("span",{key:p,class:g===r?"active":""},null)):null]),f("div",{class:`${o}-buttons`},[r!==0?f("button",{class:`${o}-prev-btn`,onClick:c},[vt("Prev")]):null,r===i-1?f("button",{class:`${o}-finish-btn`,onClick:d},[vt("Finish")]):f("button",{class:`${o}-next-btn`,onClick:u},[vt("Next")])])])])])}}}),Gue=ie({name:"TourStep",inheritAttrs:!1,props:N1(),setup(e,t){let{attrs:n}=t;return()=>{const{current:o,renderPanel:r}=e;return f(He,null,[typeof r=="function"?r(m(m({},n),e),o):f(Kue,B(B({},n),e),null)])}}});let P3=0;const Xue=Rn();function Uue(){let e;return Xue?(e=P3,P3+=1):e="TEST_OR_SSR",e}function Yue(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:re("");const t=`vc_unique_${Uue()}`;return e.value||t}const zu={fill:"transparent","pointer-events":"auto"},que=ie({name:"TourMask",props:{prefixCls:{type:String},pos:De(),rootClassName:{type:String},showMask:$e(),fill:{type:String,default:"rgba(0,0,0,0.5)"},open:$e(),animated:Fe([Boolean,Object]),zIndex:{type:Number}},setup(e,t){let{attrs:n}=t;const o=Yue();return()=>{const{prefixCls:r,open:i,rootClassName:l,pos:a,showMask:s,fill:c,animated:u,zIndex:d}=e,p=`${r}-mask-${o}`,g=typeof u=="object"?u?.placeholder:u;return f(Dc,{visible:i,autoLock:!0},{default:()=>i&&f("div",B(B({},n),{},{class:ae(`${r}-mask`,l,n.class),style:[{position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:d,pointerEvents:"none"},n.style]}),[s?f("svg",{style:{width:"100%",height:"100%"}},[f("defs",null,[f("mask",{id:p},[f("rect",{x:"0",y:"0",width:"100vw",height:"100vh",fill:"white"},null),a&&f("rect",{x:a.left,y:a.top,rx:a.radius,width:a.width,height:a.height,fill:"black",class:g?`${r}-placeholder-animated`:""},null)])]),f("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:c,mask:`url(#${p})`},null),a&&f(He,null,[f("rect",B(B({},zu),{},{x:"0",y:"0",width:"100%",height:a.top}),null),f("rect",B(B({},zu),{},{x:"0",y:"0",width:a.left,height:"100%"}),null),f("rect",B(B({},zu),{},{x:"0",y:a.top+a.height,width:"100%",height:`calc(100vh - ${a.top+a.height}px)`}),null),f("rect",B(B({},zu),{},{x:a.left+a.width,y:"0",width:`calc(100vw - ${a.left+a.width}px)`,height:"100%"}),null)])]):null])})}}}),Zue=[0,0],I3={left:{points:["cr","cl"],offset:[-8,0]},right:{points:["cl","cr"],offset:[8,0]},top:{points:["bc","tc"],offset:[0,-8]},bottom:{points:["tc","bc"],offset:[0,8]},topLeft:{points:["bl","tl"],offset:[0,-8]},leftTop:{points:["tr","tl"],offset:[-8,0]},topRight:{points:["br","tr"],offset:[0,-8]},rightTop:{points:["tl","tr"],offset:[8,0]},bottomRight:{points:["tr","br"],offset:[0,8]},rightBottom:{points:["bl","br"],offset:[8,0]},bottomLeft:{points:["tl","bl"],offset:[0,8]},leftBottom:{points:["br","bl"],offset:[-8,0]}};function xE(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const t={};return Object.keys(I3).forEach(n=>{t[n]=m(m({},I3[n]),{autoArrow:e,targetOffset:Zue})}),t}xE();var Que=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{builtinPlacements:e,popupAlign:t}=DP();return{builtinPlacements:e,popupAlign:t,steps:at(),open:$e(),defaultCurrent:{type:Number},current:{type:Number},onChange:ve(),onClose:ve(),onFinish:ve(),mask:Fe([Boolean,Object],!0),arrow:Fe([Boolean,Object],!0),rootClassName:{type:String},placement:Ne("bottom"),prefixCls:{type:String,default:"rc-tour"},renderPanel:ve(),gap:De(),animated:Fe([Boolean,Object]),scrollIntoViewOptions:Fe([Boolean,Object],!0),zIndex:{type:Number,default:1001}}},Jue=ie({name:"Tour",inheritAttrs:!1,props:Ze(wE(),{}),setup(e){const{defaultCurrent:t,placement:n,mask:o,scrollIntoViewOptions:r,open:i,gap:l,arrow:a}=Ko(e),s=re(),[c,u]=Tt(0,{value:I(()=>e.current),defaultValue:t.value}),[d,p]=Tt(void 0,{value:I(()=>e.open),postState:w=>c.value<0||c.value>=e.steps.length?!1:w??!0}),g=oe(d.value);Le(()=>{d.value&&!g.value&&u(0),g.value=d.value});const v=I(()=>e.steps[c.value]||{}),h=I(()=>{var w;return(w=v.value.placement)!==null&&w!==void 0?w:n.value}),b=I(()=>{var w;return d.value&&((w=v.value.mask)!==null&&w!==void 0?w:o.value)}),y=I(()=>{var w;return(w=v.value.scrollIntoViewOptions)!==null&&w!==void 0?w:r.value}),[S,$]=Vue(I(()=>v.value.target),i,l,y),x=I(()=>$.value?typeof v.value.arrow>"u"?a.value:v.value.arrow:!1),C=I(()=>typeof x.value=="object"?x.value.pointAtCenter:!1);ye(C,()=>{var w;(w=s.value)===null||w===void 0||w.forcePopupAlign()}),ye(c,()=>{var w;(w=s.value)===null||w===void 0||w.forcePopupAlign()});const O=w=>{var T;u(w),(T=e.onChange)===null||T===void 0||T.call(e,w)};return()=>{var w;const{prefixCls:T,steps:E,onClose:_,onFinish:M,rootClassName:A,renderPanel:R,animated:L,zIndex:P}=e,D=Que(e,["prefixCls","steps","onClose","onFinish","rootClassName","renderPanel","animated","zIndex"]);if($.value===void 0)return null;const N=()=>{p(!1),_?.(c.value)},k=typeof b.value=="boolean"?b.value:!!b.value,F=typeof b.value=="boolean"?void 0:b.value,z=()=>$.value||document.body,H=()=>f(Gue,B({arrow:x.value,key:"content",prefixCls:T,total:E.length,renderPanel:R,onPrev:()=>{O(c.value-1)},onNext:()=>{O(c.value+1)},onClose:N,current:c.value,onFinish:()=>{N(),M?.()}},v.value),null),j=I(()=>{const Y=S.value||lv,Q={};return Object.keys(Y).forEach(U=>{typeof Y[U]=="number"?Q[U]=`${Y[U]}px`:Q[U]=Y[U]}),Q});return d.value?f(He,null,[f(que,{zIndex:P,prefixCls:T,pos:S.value,showMask:k,style:F?.style,fill:F?.color,open:d.value,animated:L,rootClassName:A},null),f(Ll,B(B({},D),{},{arrow:!!D.arrow,builtinPlacements:v.value.target?(w=D.builtinPlacements)!==null&&w!==void 0?w:xE(C.value):void 0,ref:s,popupStyle:v.value.target?v.value.style:m(m({},v.value.style),{position:"fixed",left:lv.left,top:lv.top,transform:"translate(-50%, -50%)"}),popupPlacement:h.value,popupVisible:d.value,popupClassName:ae(A,v.value.className),prefixCls:T,popup:H,forceRender:!1,destroyPopupOnHide:!0,zIndex:P,mask:!1,getTriggerDOMNode:z}),{default:()=>[f(Dc,{visible:d.value,autoLock:!0},{default:()=>[f("div",{class:ae(A,`${T}-target-placeholder`),style:m(m({},j.value),{position:"fixed",pointerEvents:"none"})},null)]})]})]):null}}}),ede=()=>m(m({},wE()),{steps:{type:Array},prefixCls:{type:String},current:{type:Number},type:{type:String},"onUpdate:current":Function}),tde=()=>m(m({},N1()),{cover:{type:Object},nextButtonProps:{type:Object},prevButtonProps:{type:Object},current:{type:Number},type:{type:String}}),nde=ie({name:"ATourPanel",inheritAttrs:!1,props:tde(),setup(e,t){let{attrs:n,slots:o}=t;const{current:r,total:i}=Ko(e),l=I(()=>r.value===i.value-1),a=c=>{var u;const d=e.prevButtonProps;(u=e.onPrev)===null||u===void 0||u.call(e,c),typeof d?.onClick=="function"&&d?.onClick()},s=c=>{var u,d;const p=e.nextButtonProps;l.value?(u=e.onFinish)===null||u===void 0||u.call(e,c):(d=e.onNext)===null||d===void 0||d.call(e,c),typeof p?.onClick=="function"&&p?.onClick()};return()=>{const{prefixCls:c,title:u,onClose:d,cover:p,description:g,type:v,arrow:h}=e,b=e.prevButtonProps,y=e.nextButtonProps;let S;u&&(S=f("div",{class:`${c}-header`},[f("div",{class:`${c}-title`},[u])]));let $;g&&($=f("div",{class:`${c}-description`},[g]));let x;p&&(x=f("div",{class:`${c}-cover`},[p]));let C;o.indicatorsRender?C=o.indicatorsRender({current:r.value,total:i}):C=[...Array.from({length:i.value}).keys()].map((T,E)=>f("span",{key:T,class:ae(E===r.value&&`${c}-indicator-active`,`${c}-indicator`)},null));const O=v==="primary"?"default":"primary",w={type:"default",ghost:v==="primary"};return f(Rl,{componentName:"Tour",defaultLocale:Un.Tour},{default:T=>{var E;return f("div",B(B({},n),{},{class:ae(v==="primary"?`${c}-primary`:"",n.class,`${c}-content`)}),[h&&f("div",{class:`${c}-arrow`,key:"arrow"},null),f("div",{class:`${c}-inner`},[f(kn,{class:`${c}-close`,onClick:d},null),x,S,$,f("div",{class:`${c}-footer`},[i.value>1&&f("div",{class:`${c}-indicators`},[C]),f("div",{class:`${c}-buttons`},[r.value!==0?f(jt,B(B(B({},w),b),{},{onClick:a,size:"small",class:ae(`${c}-prev-btn`,b?.className)}),{default:()=>[Ov(b?.children)?b.children():(E=b?.children)!==null&&E!==void 0?E:T.Previous]}):null,f(jt,B(B({type:O},y),{},{onClick:s,size:"small",class:ae(`${c}-next-btn`,y?.className)}),{default:()=>[Ov(y?.children)?y?.children():l.value?T.Finish:T.Next]})])])])])}})}}}),ode=e=>{let{defaultType:t,steps:n,current:o,defaultCurrent:r}=e;const i=re(r?.value),l=I(()=>o?.value);ye(l,u=>{i.value=u??r?.value},{immediate:!0});const a=u=>{i.value=u},s=I(()=>{var u,d;return typeof i.value=="number"?n&&((d=(u=n.value)===null||u===void 0?void 0:u[i.value])===null||d===void 0?void 0:d.type):t?.value});return{currentMergedType:I(()=>{var u;return(u=s.value)!==null&&u!==void 0?u:t?.value}),updateInnerCurrent:a}},rde=e=>{const{componentCls:t,lineHeight:n,padding:o,paddingXS:r,borderRadius:i,borderRadiusXS:l,colorPrimary:a,colorText:s,colorFill:c,indicatorHeight:u,indicatorWidth:d,boxShadowTertiary:p,tourZIndexPopup:g,fontSize:v,colorBgContainer:h,fontWeightStrong:b,marginXS:y,colorTextLightSolid:S,tourBorderRadius:$,colorWhite:x,colorBgTextHover:C,tourCloseSize:O,motionDurationSlow:w,antCls:T}=e;return[{[t]:m(m({},Ue(e)),{color:s,position:"absolute",zIndex:g,display:"block",visibility:"visible",fontSize:v,lineHeight:n,width:520,"--antd-arrow-background-color":h,"&-pure":{maxWidth:"100%",position:"relative"},[`&${t}-hidden`]:{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{textAlign:"start",textDecoration:"none",borderRadius:$,boxShadow:p,position:"relative",backgroundColor:h,border:"none",backgroundClip:"padding-box",[`${t}-close`]:{position:"absolute",top:o,insetInlineEnd:o,color:e.colorIcon,outline:"none",width:O,height:O,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:e.colorIconHover,backgroundColor:e.wireframe?"transparent":e.colorFillContent}},[`${t}-cover`]:{textAlign:"center",padding:`${o+O+r}px ${o}px 0`,img:{width:"100%"}},[`${t}-header`]:{padding:`${o}px ${o}px ${r}px`,[`${t}-title`]:{lineHeight:n,fontSize:v,fontWeight:b}},[`${t}-description`]:{padding:`0 ${o}px`,lineHeight:n,wordWrap:"break-word"},[`${t}-footer`]:{padding:`${r}px ${o}px ${o}px`,textAlign:"end",borderRadius:`0 0 ${l}px ${l}px`,display:"flex",[`${t}-indicators`]:{display:"inline-block",[`${t}-indicator`]:{width:d,height:u,display:"inline-block",borderRadius:"50%",background:c,"&:not(:last-child)":{marginInlineEnd:u},"&-active":{background:a}}},[`${t}-buttons`]:{marginInlineStart:"auto",[`${T}-btn`]:{marginInlineStart:y}}}},[`${t}-primary, &${t}-primary`]:{"--antd-arrow-background-color":a,[`${t}-inner`]:{color:S,textAlign:"start",textDecoration:"none",backgroundColor:a,borderRadius:i,boxShadow:p,[`${t}-close`]:{color:S},[`${t}-indicators`]:{[`${t}-indicator`]:{background:new ht(S).setAlpha(.15).toRgbString(),"&-active":{background:S}}},[`${t}-prev-btn`]:{color:S,borderColor:new ht(S).setAlpha(.15).toRgbString(),backgroundColor:a,"&:hover":{backgroundColor:new ht(S).setAlpha(.15).toRgbString(),borderColor:"transparent"}},[`${t}-next-btn`]:{color:a,borderColor:"transparent",background:x,"&:hover":{background:new ht(C).onBackground(x).toRgbString()}}}}}),[`${t}-mask`]:{[`${t}-placeholder-animated`]:{transition:`all ${w}`}},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${t}-inner`]:{borderRadius:Math.min($,_b)}}},Ab(e,{colorBg:"var(--antd-arrow-background-color)",contentRadius:$,limitVerticalRadius:!0})]},ide=Ke("Tour",e=>{const{borderRadiusLG:t,fontSize:n,lineHeight:o}=e,r=ke(e,{tourZIndexPopup:e.zIndexPopupBase+70,indicatorWidth:6,indicatorHeight:6,tourBorderRadius:t,tourCloseSize:n*o});return[rde(r)]});var lde=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{steps:h,current:b,type:y,rootClassName:S}=e,$=lde(e,["steps","current","type","rootClassName"]),x=ae({[`${c.value}-primary`]:g.value==="primary",[`${c.value}-rtl`]:u.value==="rtl"},p.value,S),C=(T,E)=>f(nde,B(B({},T),{},{type:y,current:E}),{indicatorsRender:r.indicatorsRender}),O=T=>{v(T),o("update:current",T),o("change",T)},w=I(()=>Mb({arrowPointAtCenter:!0,autoAdjustOverflow:!0}));return d(f(Jue,B(B(B({},n),$),{},{rootClassName:x,prefixCls:c.value,current:b,defaultCurrent:e.defaultCurrent,animated:!0,renderPanel:C,onChange:O,steps:h,builtinPlacements:w.value}),null))}}}),sde=Et(ade),OE=Symbol("appConfigContext"),cde=e=>Xe(OE,e),ude=()=>je(OE,{}),PE=Symbol("appContext"),dde=e=>Xe(PE,e),fde=ut({message:{},notification:{},modal:{}}),pde=()=>je(PE,fde),gde=e=>{const{componentCls:t,colorText:n,fontSize:o,lineHeight:r,fontFamily:i}=e;return{[t]:{color:n,fontSize:o,lineHeight:r,fontFamily:i}}},hde=Ke("App",e=>[gde(e)]),vde=()=>({rootClassName:String,message:De(),notification:De()}),mde=()=>pde(),Qs=ie({name:"AApp",props:Ze(vde(),{}),setup(e,t){let{slots:n}=t;const{prefixCls:o}=Te("app",e),[r,i]=hde(o),l=I(()=>ae(i.value,o.value,e.rootClassName)),a=ude(),s=I(()=>({message:m(m({},a.message),e.message),notification:m(m({},a.notification),e.notification)}));cde(s.value);const[c,u]=QI(s.value.message),[d,p]=u5(s.value.notification),[g,v]=pT(),h=I(()=>({message:c,notification:d,modal:g}));return dde(h.value),()=>{var b;return r(f("div",{class:l.value},[v(),u(),p(),(b=n.default)===null||b===void 0?void 0:b.call(n)]))}}});Qs.useApp=mde;Qs.install=function(e){e.component(Qs.name,Qs)};const IE=["wrap","nowrap","wrap-reverse"],TE=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],EE=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],bde=(e,t)=>{const n={};return IE.forEach(o=>{n[`${e}-wrap-${o}`]=t.wrap===o}),n},yde=(e,t)=>{const n={};return EE.forEach(o=>{n[`${e}-align-${o}`]=t.align===o}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},Sde=(e,t)=>{const n={};return TE.forEach(o=>{n[`${e}-justify-${o}`]=t.justify===o}),n};function $de(e,t){return ae(m(m(m({},bde(e,t)),yde(e,t)),Sde(e,t)))}const Cde=e=>{const{componentCls:t}=e;return{[t]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},xde=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},wde=e=>{const{componentCls:t}=e,n={};return IE.forEach(o=>{n[`${t}-wrap-${o}`]={flexWrap:o}}),n},Ode=e=>{const{componentCls:t}=e,n={};return EE.forEach(o=>{n[`${t}-align-${o}`]={alignItems:o}}),n},Pde=e=>{const{componentCls:t}=e,n={};return TE.forEach(o=>{n[`${t}-justify-${o}`]={justifyContent:o}}),n},Ide=Ke("Flex",e=>{const t=ke(e,{flexGapSM:e.paddingXS,flexGap:e.padding,flexGapLG:e.paddingLG});return[Cde(t),xde(t),wde(t),Ode(t),Pde(t)]});function T3(e){return["small","middle","large"].includes(e)}const Tde=()=>({prefixCls:Ne(),vertical:$e(),wrap:Ne(),justify:Ne(),align:Ne(),flex:Fe([Number,String]),gap:Fe([Number,String]),component:Ct()});var Ede=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var u;return[l.value,s.value,$de(l.value,e),{[`${l.value}-rtl`]:i.value==="rtl",[`${l.value}-gap-${e.gap}`]:T3(e.gap),[`${l.value}-vertical`]:(u=e.vertical)!==null&&u!==void 0?u:r?.value.vertical}]});return()=>{var u;const{flex:d,gap:p,component:g="div"}=e,v=Ede(e,["flex","gap","component"]),h={};return d&&(h.flex=d),p&&!T3(p)&&(h.gap=`${p}px`),a(f(g,B({class:[o.class,c.value],style:[o.style,h]},nt(v,["justify","wrap","align","vertical"])),{default:()=>[(u=n.default)===null||u===void 0?void 0:u.call(n)]}))}}}),_de=Et(Mde),E3=Object.freeze(Object.defineProperty({__proto__:null,Affix:yP,Alert:UV,Anchor:ol,AnchorLink:k0,App:Qs,AutoComplete:xV,AutoCompleteOptGroup:CV,AutoCompleteOption:$V,Avatar:ml,AvatarGroup:pf,BackTop:kf,Badge:Vs,BadgeRibbon:gf,Breadcrumb:bl,BreadcrumbItem:Sc,BreadcrumbSeparator:xf,Button:jt,ButtonGroup:yf,Calendar:HX,Card:wa,CardGrid:Tf,CardMeta:If,Carousel:IY,Cascader:jZ,CheckableTag:Rf,Checkbox:_o,CheckboxGroup:_f,Col:UZ,Collapse:Ks,CollapsePanel:Ef,Comment:JZ,Compact:df,ConfigProvider:Sl,DatePicker:vJ,Descriptions:la,DescriptionsItem:O5,DirectoryTree:Ed,Divider:EJ,Drawer:WJ,Dropdown:Xo,DropdownButton:yc,Empty:bi,Flex:_de,FloatButton:Ti,FloatButtonGroup:Bf,Form:yi,FormItem:WI,FormItemRest:sf,Grid:XZ,Image:il,ImagePreviewGroup:U5,Input:ln,InputGroup:N5,InputNumber:$te,InputPassword:F5,InputSearch:B5,Layout:Dte,LayoutContent:Rte,LayoutFooter:_te,LayoutHeader:Mte,LayoutSider:Ate,List:di,ListItem:J5,ListItemMeta:Z5,LocaleProvider:UI,Mentions:Hne,MentionsOption:Od,Menu:Gt,MenuDivider:Cc,MenuItem:vr,MenuItemGroup:$c,Modal:Dt,MonthPicker:vd,PageHeader:moe,Pagination:gg,Popconfirm:xoe,Popover:Rb,Progress:Jy,QRCode:Hue,QuarterPicker:md,Radio:jn,RadioButton:Of,RadioGroup:sy,RangePicker:bd,Rate:ure,Result:Cl,Row:Pre,Segmented:uue,Select:mn,SelectOptGroup:bV,SelectOption:mV,Skeleton:In,SkeletonAvatar:by,SkeletonButton:hy,SkeletonImage:my,SkeletonInput:vy,SkeletonTitle:Yp,Slider:Vre,Space:Ta,Spin:mr,Statistic:Br,StatisticCountdown:ooe,Step:Pd,Steps:aie,SubMenu:El,Switch:mie,TabPane:Pf,Table:Eae,TableColumn:_d,TableColumnGroup:Ad,TableSummary:Rd,TableSummaryCell:Kf,TableSummaryRow:Wf,Tabs:yl,Tag:Ia,Textarea:ky,TimePicker:wse,TimeRangePicker:Dd,Timeline:Zs,TimelineItem:Tc,Tooltip:to,Tour:sde,Transfer:Qae,Tree:ZT,TreeNode:Md,TreeSelect:Cse,TreeSelectNode:Ym,Typography:eo,TypographyLink:is,TypographyParagraph:ls,TypographyText:as,TypographyTitle:ss,Upload:Uce,UploadDragger:Xce,Watermark:nue,WeekPicker:hd,message:Gn,notification:_i},Symbol.toStringTag,{value:"Module"})),Ade=function(e){return Object.keys(E3).forEach(t=>{const n=E3[t];n.install&&e.use(n)}),e.use(v9.StyleProvider),e.config.globalProperties.$message=Gn,e.config.globalProperties.$notification=_i,e.config.globalProperties.$info=Dt.info,e.config.globalProperties.$success=Dt.success,e.config.globalProperties.$error=Dt.error,e.config.globalProperties.$warning=Dt.warning,e.config.globalProperties.$confirm=Dt.confirm,e.config.globalProperties.$destroyAll=Dt.destroyAll,e},Rde={version:aP,install:Ade};const aa=typeof document<"u";function ME(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Dde(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&ME(e.default)}const Pt=Object.assign;function av(e,t){const n={};for(const o in t){const r=t[o];n[o]=Jo(r)?r.map(e):e(r)}return n}const Js=()=>{},Jo=Array.isArray;function M3(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}const _E=/#/g,Nde=/&/g,Bde=/\//g,kde=/=/g,Fde=/\?/g,AE=/\+/g,Lde=/%5B/g,zde=/%5D/g,RE=/%5E/g,Hde=/%60/g,DE=/%7B/g,jde=/%7C/g,NE=/%7D/g,Vde=/%20/g;function B1(e){return e==null?"":encodeURI(""+e).replace(jde,"|").replace(Lde,"[").replace(zde,"]")}function Wde(e){return B1(e).replace(DE,"{").replace(NE,"}").replace(RE,"^")}function Zm(e){return B1(e).replace(AE,"%2B").replace(Vde,"+").replace(_E,"%23").replace(Nde,"%26").replace(Hde,"`").replace(DE,"{").replace(NE,"}").replace(RE,"^")}function Kde(e){return Zm(e).replace(kde,"%3D")}function Gde(e){return B1(e).replace(_E,"%23").replace(Fde,"%3F")}function Xde(e){return Gde(e).replace(Bde,"%2F")}function Ec(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Ude=/\/$/,Yde=e=>e.replace(Ude,"");function sv(e,t,n="/"){let o,r={},i="",l="";const a=t.indexOf("#");let s=t.indexOf("?");return s=a>=0&&s>a?-1:s,s>=0&&(o=t.slice(0,s),i=t.slice(s,a>0?a:t.length),r=e(i.slice(1))),a>=0&&(o=o||t.slice(0,a),l=t.slice(a,t.length)),o=Jde(o??t,n),{fullPath:o+i+l,path:o,query:r,hash:Ec(l)}}function qde(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function _3(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Zde(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&ja(t.matched[o],n.matched[r])&&BE(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function ja(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function BE(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Qde(e[n],t[n]))return!1;return!0}function Qde(e,t){return Jo(e)?A3(e,t):Jo(t)?A3(t,e):e?.valueOf()===t?.valueOf()}function A3(e,t){return Jo(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function Jde(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let i=n.length-1,l,a;for(l=0;l1&&i--;else break;return n.slice(0,i).join("/")+"/"+o.slice(l).join("/")}const si={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Qm=(function(e){return e.pop="pop",e.push="push",e})({}),cv=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function efe(e){if(!e)if(aa){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Yde(e)}const tfe=/^[^#]+#/;function nfe(e,t){return e.replace(tfe,"#")+t}function ofe(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const Cg=()=>({left:window.scrollX,top:window.scrollY});function rfe(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=ofe(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function R3(e,t){return(history.state?history.state.position-t:-1)+e}const Jm=new Map;function ife(e,t){Jm.set(e,t)}function lfe(e){const t=Jm.get(e);return Jm.delete(e),t}function afe(e){return typeof e=="string"||e&&typeof e=="object"}function kE(e){return typeof e=="string"||typeof e=="symbol"}let Kt=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const FE=Symbol("");Kt.MATCHER_NOT_FOUND+"",Kt.NAVIGATION_GUARD_REDIRECT+"",Kt.NAVIGATION_ABORTED+"",Kt.NAVIGATION_CANCELLED+"",Kt.NAVIGATION_DUPLICATED+"";function Va(e,t){return Pt(new Error,{type:e,[FE]:!0},t)}function Ir(e,t){return e instanceof Error&&FE in e&&(t==null||!!(e.type&t))}const sfe=["params","query","hash"];function cfe(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of sfe)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function ufe(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;or&&Zm(r)):[o&&Zm(o)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function dfe(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=Jo(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const ffe=Symbol(""),N3=Symbol(""),xg=Symbol(""),LE=Symbol(""),e0=Symbol("");function Ss(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function vi(e,t,n,o,r,i=l=>l()){const l=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((a,s)=>{const c=p=>{p===!1?s(Va(Kt.NAVIGATION_ABORTED,{from:n,to:t})):p instanceof Error?s(p):afe(p)?s(Va(Kt.NAVIGATION_GUARD_REDIRECT,{from:t,to:p})):(l&&o.enterCallbacks[r]===l&&typeof p=="function"&&l.push(p),a())},u=i(()=>e.call(o&&o.instances[r],t,n,c));let d=Promise.resolve(u);e.length<3&&(d=d.then(c)),d.catch(p=>s(p))})}function uv(e,t,n,o,r=i=>i()){const i=[];for(const l of e)for(const a in l.components){let s=l.components[a];if(!(t!=="beforeRouteEnter"&&!l.instances[a]))if(ME(s)){const c=(s.__vccOpts||s)[t];c&&i.push(vi(c,n,o,l,a,r))}else{let c=s();i.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${l.path}"`);const d=Dde(u)?u.default:u;l.mods[a]=u,l.components[a]=d;const p=(d.__vccOpts||d)[t];return p&&vi(p,n,o,l,a,r)()}))}}return i}function pfe(e,t){const n=[],o=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let l=0;lja(c,a))?o.push(a):n.push(a));const s=e.matched[l];s&&(t.matched.find(c=>ja(c,s))||r.push(s))}return[n,o,r]}let gfe=()=>location.protocol+"//"+location.host;function zE(e,t){const{pathname:n,search:o,hash:r}=t,i=e.indexOf("#");if(i>-1){let l=r.includes(e.slice(i))?e.slice(i).length:1,a=r.slice(l);return a[0]!=="/"&&(a="/"+a),_3(a,"")}return _3(n,e)+o+r}function hfe(e,t,n,o){let r=[],i=[],l=null;const a=({state:p})=>{const g=zE(e,location),v=n.value,h=t.value;let b=0;if(p){if(n.value=g,t.value=p,l&&l===v){l=null;return}b=h?p.position-h.position:0}else o(g);r.forEach(y=>{y(n.value,v,{delta:b,type:Qm.pop,direction:b?b>0?cv.forward:cv.back:cv.unknown})})};function s(){l=n.value}function c(p){r.push(p);const g=()=>{const v=r.indexOf(p);v>-1&&r.splice(v,1)};return i.push(g),g}function u(){if(document.visibilityState==="hidden"){const{history:p}=window;if(!p.state)return;p.replaceState(Pt({},p.state,{scroll:Cg()}),"")}}function d(){for(const p of i)p();i=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:s,listen:c,destroy:d}}function B3(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?Cg():null}}function vfe(e){const{history:t,location:n}=window,o={value:zE(e,n)},r={value:t.state};r.value||i(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(s,c,u){const d=e.indexOf("#"),p=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+s:gfe()+e+s;try{t[u?"replaceState":"pushState"](c,"",p),r.value=c}catch(g){console.error(g),n[u?"replace":"assign"](p)}}function l(s,c){i(s,Pt({},t.state,B3(r.value.back,s,r.value.forward,!0),c,{position:r.value.position}),!0),o.value=s}function a(s,c){const u=Pt({},r.value,t.state,{forward:s,scroll:Cg()});i(u.current,u,!0),i(s,Pt({},B3(o.value,s,null),{position:u.position+1},c),!1),o.value=s}return{location:o,state:r,push:a,replace:l}}function mfe(e){e=efe(e);const t=vfe(e),n=hfe(e,t.state,t.location,t.replace);function o(i,l=!0){l||n.pauseListeners(),history.go(i)}const r=Pt({location:"",base:e,go:o,createHref:nfe.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let ul=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var cn=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(cn||{});const bfe={type:ul.Static,value:""},yfe=/[a-zA-Z0-9_]/;function Sfe(e){if(!e)return[[]];if(e==="/")return[[bfe]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(g){throw new Error(`ERR (${n})/"${c}": ${g}`)}let n=cn.Static,o=n;const r=[];let i;function l(){i&&r.push(i),i=[]}let a=0,s,c="",u="";function d(){c&&(n===cn.Static?i.push({type:ul.Static,value:c}):n===cn.Param||n===cn.ParamRegExp||n===cn.ParamRegExpEnd?(i.length>1&&(s==="*"||s==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:ul.Param,value:c,regexp:u,repeatable:s==="*"||s==="+",optional:s==="*"||s==="?"})):t("Invalid state to consume buffer"),c="")}function p(){c+=s}for(;at.length?t.length===1&&t[0]===Hn.Static+Hn.Segment?1:-1:0}function HE(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Ofe={strict:!1,end:!0,sensitive:!1};function Pfe(e,t,n){const o=xfe(Sfe(e.path),n),r=Pt(o,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Ife(e,t){const n=[],o=new Map;t=M3(Ofe,t);function r(d){return o.get(d)}function i(d,p,g){const v=!g,h=z3(d);h.aliasOf=g&&g.record;const b=M3(t,d),y=[h];if("alias"in d){const x=typeof d.alias=="string"?[d.alias]:d.alias;for(const C of x)y.push(z3(Pt({},h,{components:g?g.record.components:h.components,path:C,aliasOf:g?g.record:h})))}let S,$;for(const x of y){const{path:C}=x;if(p&&C[0]!=="/"){const O=p.record.path,w=O[O.length-1]==="/"?"":"/";x.path=p.record.path+(C&&w+C)}if(S=Pfe(x,p,b),g?g.alias.push(S):($=$||S,$!==S&&$.alias.push(S),v&&d.name&&!H3(S)&&l(d.name)),jE(S)&&s(S),h.children){const O=h.children;for(let w=0;w{l($)}:Js}function l(d){if(kE(d)){const p=o.get(d);p&&(o.delete(d),n.splice(n.indexOf(p),1),p.children.forEach(l),p.alias.forEach(l))}else{const p=n.indexOf(d);p>-1&&(n.splice(p,1),d.record.name&&o.delete(d.record.name),d.children.forEach(l),d.alias.forEach(l))}}function a(){return n}function s(d){const p=Mfe(d,n);n.splice(p,0,d),d.record.name&&!H3(d)&&o.set(d.record.name,d)}function c(d,p){let g,v={},h,b;if("name"in d&&d.name){if(g=o.get(d.name),!g)throw Va(Kt.MATCHER_NOT_FOUND,{location:d});b=g.record.name,v=Pt(L3(p.params,g.keys.filter($=>!$.optional).concat(g.parent?g.parent.keys.filter($=>$.optional):[]).map($=>$.name)),d.params&&L3(d.params,g.keys.map($=>$.name))),h=g.stringify(v)}else if(d.path!=null)h=d.path,g=n.find($=>$.re.test(h)),g&&(v=g.parse(h),b=g.record.name);else{if(g=p.name?o.get(p.name):n.find($=>$.re.test(p.path)),!g)throw Va(Kt.MATCHER_NOT_FOUND,{location:d,currentLocation:p});b=g.record.name,v=Pt({},p.params,d.params),h=g.stringify(v)}const y=[];let S=g;for(;S;)y.unshift(S.record),S=S.parent;return{name:b,path:h,params:v,matched:y,meta:Efe(y)}}e.forEach(d=>i(d));function u(){n.length=0,o.clear()}return{addRoute:i,resolve:c,removeRoute:l,clearRoutes:u,getRoutes:a,getRecordMatcher:r}}function L3(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function z3(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Tfe(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Tfe(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function H3(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Efe(e){return e.reduce((t,n)=>Pt(t,n.meta),{})}function Mfe(e,t){let n=0,o=t.length;for(;n!==o;){const i=n+o>>1;HE(e,t[i])<0?o=i:n=i+1}const r=_fe(e);return r&&(o=t.lastIndexOf(r,o-1)),o}function _fe(e){let t=e;for(;t=t.parent;)if(jE(t)&&HE(e,t)===0)return t}function jE({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function j3(e){const t=je(xg),n=je(LE),o=I(()=>{const s=gt(e.to);return t.resolve(s)}),r=I(()=>{const{matched:s}=o.value,{length:c}=s,u=s[c-1],d=n.matched;if(!u||!d.length)return-1;const p=d.findIndex(ja.bind(null,u));if(p>-1)return p;const g=V3(s[c-2]);return c>1&&V3(u)===g&&d[d.length-1].path!==g?d.findIndex(ja.bind(null,s[c-2])):p}),i=I(()=>r.value>-1&&Bfe(n.params,o.value.params)),l=I(()=>r.value>-1&&r.value===n.matched.length-1&&BE(n.params,o.value.params));function a(s={}){if(Nfe(s)){const c=t[gt(e.replace)?"replace":"push"](gt(e.to)).catch(Js);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:o,href:I(()=>o.value.href),isActive:i,isExactActive:l,navigate:a}}function Afe(e){return e.length===1?e[0]:e}const Rfe=ie({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:j3,setup(e,{slots:t}){const n=ut(j3(e)),{options:o}=je(xg),r=I(()=>({[W3(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[W3(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&Afe(t.default(n));return e.custom?i:Gr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},i)}}}),Dfe=Rfe;function Nfe(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Bfe(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!Jo(r)||r.length!==o.length||o.some((i,l)=>i.valueOf()!==r[l].valueOf()))return!1}return!0}function V3(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const W3=(e,t,n)=>e??t??n,kfe=ie({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=je(e0),r=I(()=>e.route||o.value),i=je(N3,0),l=I(()=>{let c=gt(i);const{matched:u}=r.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=I(()=>r.value.matched[l.value]);Xe(N3,I(()=>l.value+1)),Xe(ffe,a),Xe(e0,r);const s=re();return ye(()=>[s.value,a.value,e.name],([c,u,d],[p,g,v])=>{u&&(u.instances[d]=c,g&&g!==u&&c&&c===p&&(u.leaveGuards.size||(u.leaveGuards=g.leaveGuards),u.updateGuards.size||(u.updateGuards=g.updateGuards))),c&&u&&(!g||!ja(u,g)||!p)&&(u.enterCallbacks[d]||[]).forEach(h=>h(c))},{flush:"post"}),()=>{const c=r.value,u=e.name,d=a.value,p=d&&d.components[u];if(!p)return K3(n.default,{Component:p,route:c});const g=d.props[u],v=g?g===!0?c.params:typeof g=="function"?g(c):g:null,b=Gr(p,Pt({},v,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[u]=null)},ref:s}));return K3(n.default,{Component:b,route:c})||b}}});function K3(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Ffe=kfe;function Lfe(e){const t=Ife(e.routes,e),n=e.parseQuery||ufe,o=e.stringifyQuery||D3,r=e.history,i=Ss(),l=Ss(),a=Ss(),s=oe(si);let c=si;aa&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=av.bind(null,X=>""+X),d=av.bind(null,Xde),p=av.bind(null,Ec);function g(X,J){let Z,G;return kE(X)?(Z=t.getRecordMatcher(X),G=J):G=X,t.addRoute(G,Z)}function v(X){const J=t.getRecordMatcher(X);J&&t.removeRoute(J)}function h(){return t.getRoutes().map(X=>X.record)}function b(X){return!!t.getRecordMatcher(X)}function y(X,J){if(J=Pt({},J||s.value),typeof X=="string"){const te=sv(n,X,J.path),ue=t.resolve({path:te.path},J),le=r.createHref(te.fullPath);return Pt(te,ue,{params:p(ue.params),hash:Ec(te.hash),redirectedFrom:void 0,href:le})}let Z;if(X.path!=null)Z=Pt({},X,{path:sv(n,X.path,J.path).path});else{const te=Pt({},X.params);for(const ue in te)te[ue]==null&&delete te[ue];Z=Pt({},X,{params:d(te)}),J.params=d(J.params)}const G=t.resolve(Z,J),q=X.hash||"";G.params=u(p(G.params));const V=qde(o,Pt({},X,{hash:Wde(q),path:G.path})),K=r.createHref(V);return Pt({fullPath:V,hash:q,query:o===D3?dfe(X.query):X.query||{}},G,{redirectedFrom:void 0,href:K})}function S(X){return typeof X=="string"?sv(n,X,s.value.path):Pt({},X)}function $(X,J){if(c!==X)return Va(Kt.NAVIGATION_CANCELLED,{from:J,to:X})}function x(X){return w(X)}function C(X){return x(Pt(S(X),{replace:!0}))}function O(X,J){const Z=X.matched[X.matched.length-1];if(Z&&Z.redirect){const{redirect:G}=Z;let q=typeof G=="function"?G(X,J):G;return typeof q=="string"&&(q=q.includes("?")||q.includes("#")?q=S(q):{path:q},q.params={}),Pt({query:X.query,hash:X.hash,params:q.path!=null?{}:X.params},q)}}function w(X,J){const Z=c=y(X),G=s.value,q=X.state,V=X.force,K=X.replace===!0,te=O(Z,G);if(te)return w(Pt(S(te),{state:typeof te=="object"?Pt({},q,te.state):q,force:V,replace:K}),J||Z);const ue=Z;ue.redirectedFrom=J;let le;return!V&&Zde(o,G,Z)&&(le=Va(Kt.NAVIGATION_DUPLICATED,{to:ue,from:G}),H(G,G,!0,!1)),(le?Promise.resolve(le):_(ue,G)).catch(ne=>Ir(ne)?Ir(ne,Kt.NAVIGATION_GUARD_REDIRECT)?ne:z(ne):k(ne,ue,G)).then(ne=>{if(ne){if(Ir(ne,Kt.NAVIGATION_GUARD_REDIRECT))return w(Pt({replace:K},S(ne.to),{state:typeof ne.to=="object"?Pt({},q,ne.to.state):q,force:V}),J||ue)}else ne=A(ue,G,!0,K,q);return M(ue,G,ne),ne})}function T(X,J){const Z=$(X,J);return Z?Promise.reject(Z):Promise.resolve()}function E(X){const J=Q.values().next().value;return J&&typeof J.runWithContext=="function"?J.runWithContext(X):X()}function _(X,J){let Z;const[G,q,V]=pfe(X,J);Z=uv(G.reverse(),"beforeRouteLeave",X,J);for(const te of G)te.leaveGuards.forEach(ue=>{Z.push(vi(ue,X,J))});const K=T.bind(null,X,J);return Z.push(K),ee(Z).then(()=>{Z=[];for(const te of i.list())Z.push(vi(te,X,J));return Z.push(K),ee(Z)}).then(()=>{Z=uv(q,"beforeRouteUpdate",X,J);for(const te of q)te.updateGuards.forEach(ue=>{Z.push(vi(ue,X,J))});return Z.push(K),ee(Z)}).then(()=>{Z=[];for(const te of V)if(te.beforeEnter)if(Jo(te.beforeEnter))for(const ue of te.beforeEnter)Z.push(vi(ue,X,J));else Z.push(vi(te.beforeEnter,X,J));return Z.push(K),ee(Z)}).then(()=>(X.matched.forEach(te=>te.enterCallbacks={}),Z=uv(V,"beforeRouteEnter",X,J,E),Z.push(K),ee(Z))).then(()=>{Z=[];for(const te of l.list())Z.push(vi(te,X,J));return Z.push(K),ee(Z)}).catch(te=>Ir(te,Kt.NAVIGATION_CANCELLED)?te:Promise.reject(te))}function M(X,J,Z){a.list().forEach(G=>E(()=>G(X,J,Z)))}function A(X,J,Z,G,q){const V=$(X,J);if(V)return V;const K=J===si,te=aa?history.state:{};Z&&(G||K?r.replace(X.fullPath,Pt({scroll:K&&te&&te.scroll},q)):r.push(X.fullPath,q)),s.value=X,H(X,J,Z,K),z()}let R;function L(){R||(R=r.listen((X,J,Z)=>{if(!U.listening)return;const G=y(X),q=O(G,U.currentRoute.value);if(q){w(Pt(q,{replace:!0,force:!0}),G).catch(Js);return}c=G;const V=s.value;aa&&ife(R3(V.fullPath,Z.delta),Cg()),_(G,V).catch(K=>Ir(K,Kt.NAVIGATION_ABORTED|Kt.NAVIGATION_CANCELLED)?K:Ir(K,Kt.NAVIGATION_GUARD_REDIRECT)?(w(Pt(S(K.to),{force:!0}),G).then(te=>{Ir(te,Kt.NAVIGATION_ABORTED|Kt.NAVIGATION_DUPLICATED)&&!Z.delta&&Z.type===Qm.pop&&r.go(-1,!1)}).catch(Js),Promise.reject()):(Z.delta&&r.go(-Z.delta,!1),k(K,G,V))).then(K=>{K=K||A(G,V,!1),K&&(Z.delta&&!Ir(K,Kt.NAVIGATION_CANCELLED)?r.go(-Z.delta,!1):Z.type===Qm.pop&&Ir(K,Kt.NAVIGATION_ABORTED|Kt.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),M(G,V,K)}).catch(Js)}))}let P=Ss(),D=Ss(),N;function k(X,J,Z){z(X);const G=D.list();return G.length?G.forEach(q=>q(X,J,Z)):console.error(X),Promise.reject(X)}function F(){return N&&s.value!==si?Promise.resolve():new Promise((X,J)=>{P.add([X,J])})}function z(X){return N||(N=!X,L(),P.list().forEach(([J,Z])=>X?Z(X):J()),P.reset()),X}function H(X,J,Z,G){const{scrollBehavior:q}=e;if(!aa||!q)return Promise.resolve();const V=!Z&&lfe(R3(X.fullPath,0))||(G||!Z)&&history.state&&history.state.scroll||null;return rt().then(()=>q(X,J,V)).then(K=>K&&rfe(K)).catch(K=>k(K,X,J))}const j=X=>r.go(X);let Y;const Q=new Set,U={currentRoute:s,listening:!0,addRoute:g,removeRoute:v,clearRoutes:t.clearRoutes,hasRoute:b,getRoutes:h,resolve:y,options:e,push:x,replace:C,go:j,back:()=>j(-1),forward:()=>j(1),beforeEach:i.add,beforeResolve:l.add,afterEach:a.add,onError:D.add,isReady:F,install(X){X.component("RouterLink",Dfe),X.component("RouterView",Ffe),X.config.globalProperties.$router=U,Object.defineProperty(X.config.globalProperties,"$route",{enumerable:!0,get:()=>gt(s)}),aa&&!Y&&s.value===si&&(Y=!0,x(r.location).catch(G=>{}));const J={};for(const G in si)Object.defineProperty(J,G,{get:()=>s.value[G],enumerable:!0});X.provide(xg,U),X.provide(LE,b4(J)),X.provide(e0,s);const Z=X.unmount;Q.add(X),X.unmount=function(){Q.delete(X),Q.size<1&&(c=si,R&&R(),R=null,s.value=si,Y=!1,N=!1),Z()}}};function ee(X){return X.reduce((J,Z)=>J.then(()=>E(Z)),Promise.resolve())}return U}function zfe(){return je(xg)}const VE=M_("settings",{state:()=>({token:localStorage.getItem("admin_token")||"",serverConfig:{},browserConfig:{},workerConfig:[],poolConfig:{strategy:"least_busy",failover:{enabled:!1,maxRetries:3}},adapterConfig:{},adaptersMeta:[]}),actions:{setToken(e){this.token=e,e?localStorage.setItem("admin_token",e):localStorage.removeItem("admin_token")},getHeaders(){const e={"Content-Type":"application/json"};return this.token&&(e.Authorization=`Bearer ${this.token}`),e},async checkAuth(){try{return(await fetch("/admin/status",{headers:this.getHeaders()})).status!==401}catch{return!1}},async handleResponse(e,t){let n={};try{n=await e.json()}catch{}return e.ok?(t&&Gn.success(t),{success:!0,data:n}):(console.error("Request failed:",e.status,n),Dt.error({title:"保存失败",content:n.message||`请求未成功: ${e.status} ${e.statusText}`,okText:"好的"}),{success:!1,data:n})},async fetchServerConfig(){try{const e=await fetch("/admin/config/server",{headers:this.getHeaders()});e.ok&&(this.serverConfig=await e.json())}catch(e){console.error("Fetch server config failed",e)}},async saveServerConfig(e){try{const t=await fetch("/admin/config/server",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(e)});if((await this.handleResponse(t,"服务器设置保存成功")).success)return this.serverConfig=e,!0}catch(t){Dt.error({title:"保存失败 (网络异常)",content:t.message})}return!1},async fetchBrowserConfig(){try{const e=await fetch("/admin/config/browser",{headers:this.getHeaders()});e.ok&&(this.browserConfig=await e.json())}catch(e){console.error("Fetch browser config failed",e)}},async saveBrowserConfig(e){try{const t=await fetch("/admin/config/browser",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(e)});if((await this.handleResponse(t,"浏览器设置保存成功")).success)return this.browserConfig=e,!0}catch(t){Dt.error({title:"保存失败 (网络异常)",content:t.message})}return!1},async fetchWorkerConfig(){try{const e=await fetch("/admin/config/instances",{headers:this.getHeaders()});e.ok&&(this.workerConfig=await e.json())}catch(e){console.error("Fetch instance configuration failed",e)}},async saveWorkerConfig(e){try{const t=await fetch("/admin/config/instances",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(e)});if((await this.handleResponse(t,"实例配置保存成功")).success)return this.workerConfig=e,!0}catch(t){Dt.error({title:"保存失败 (网络异常)",content:t.message})}return!1},async fetchPoolConfig(){try{const e=await fetch("/admin/config/pool",{headers:this.getHeaders()});if(e.ok){const t=await e.json();this.poolConfig={strategy:t.strategy||"least_busy",failover:{enabled:t.failover?.enabled||!1,maxRetries:t.failover?.maxRetries||3}}}}catch(e){console.error("Fetch pool config failed",e)}},async savePoolConfig(e){try{const t=await fetch("/admin/config/pool",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(e)});if((await this.handleResponse(t,"工作池设置保存成功")).success)return this.poolConfig=e,!0}catch(t){Dt.error({title:"保存失败 (网络异常)",content:t.message})}return!1},async fetchAdaptersMeta(){try{const e=await fetch("/admin/adapters",{headers:this.getHeaders()});e.ok&&(this.adaptersMeta=await e.json())}catch(e){console.error("Fetch adapters meta failed",e)}},async fetchAdapterConfig(){try{const e=await fetch("/admin/config/adapters",{headers:this.getHeaders()});e.ok&&(this.adapterConfig=await e.json())}catch(e){console.error("Fetch adapter config failed",e)}},async saveAdapterConfig(e){try{const t=await fetch("/admin/config/adapters",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(e)});if((await this.handleResponse(t,"适配器设置保存成功")).success)return this.adapterConfig={...this.adapterConfig,...e},!0}catch(t){Dt.error({title:"保存失败 (网络异常)",content:t.message})}return!1}}}),Hfe={style:{padding:"20px 0"}},jfe={style:{"text-align":"center","margin-bottom":"24px"}},Vfe={__name:"LoginModal",props:{visible:{type:Boolean,required:!0}},emits:["update:visible","success"],setup(e,{emit:t}){const n=t,o=VE(),r=re(o.token),i=re(!1),l=async()=>{if(!r.value){Gn.warning("请输入 Token");return}i.value=!0;try{const a=o.token;o.setToken(r.value),await o.checkAuth()?(Gn.success("验证成功"),n("success"),n("update:visible",!1)):(Gn.error("Token 验证失败,请检查是否正确"),o.setToken(a))}catch{Gn.error("验证过程发生错误")}finally{i.value=!1}};return(a,s)=>{const c=_t("a-avatar"),u=_t("a-input-password"),d=_t("a-form-item"),p=_t("a-button"),g=_t("a-form"),v=_t("a-modal");return Mt(),Ji(v,{open:e.visible,title:"需要身份验证",closable:!1,maskClosable:!1,footer:null,width:"400px",centered:""},{default:tt(()=>[xt("div",Hfe,[xt("div",jfe,[f(c,{size:64,style:{"background-color":"#1890ff"}},{icon:tt(()=>[f(gt(Gf))]),_:1}),s[1]||(s[1]=xt("div",{style:{"margin-top":"16px","font-size":"16px","font-weight":"500"}}," WebAI2API 管理面板 ",-1)),s[2]||(s[2]=xt("div",{style:{color:"#8c8c8c","margin-top":"8px"}}," 请输入访问 API Token 以继续 ",-1))]),f(g,{layout:"vertical"},{default:tt(()=>[f(d,{label:"API Token"},{default:tt(()=>[f(u,{value:r.value,"onUpdate:value":s[0]||(s[0]=h=>r.value=h),placeholder:"请输入 API Token",size:"large",onPressEnter:l},{prefix:tt(()=>[f(gt(Gf),{style:{color:"rgba(0,0,0,.25)"}})]),_:1},8,["value"])]),_:1}),f(p,{type:"primary",block:"",size:"large",loading:i.value,onClick:l},{default:tt(()=>[...s[3]||(s[3]=[vt(" 验证并登录 ",-1)])]),_:1},8,["loading"])]),_:1})])]),_:1},8,["open"])}}},Wfe=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Kfe={key:1},Gfe={href:"https://github.com/foxhui/WebAI2API",target:"_blank",style:{color:"#8c8c8c","font-size":"20px"}},Xfe={key:0},Ufe={style:{"margin-top":"8px","font-size":"12px",color:"#8c8c8c"}},Yfe={key:1},qfe={style:{"margin-top":"8px","font-size":"12px",color:"#ff4d4f"}},Zfe={key:2,style:{color:"#8c8c8c","font-size":"12px"}},Qfe={key:0},Jfe={style:{"margin-top":"8px","font-size":"12px",color:"#8c8c8c"}},epe={key:1},tpe={style:{"margin-top":"8px","font-size":"12px",color:"#ff4d4f"}},npe={key:2,style:{color:"#8c8c8c","font-size":"12px"}},ope={style:{"margin-bottom":"12px"}},rpe={style:{"margin-bottom":"12px"}},ipe={style:{"margin-bottom":"12px"}},lpe={style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"4px"}},ape={style:{margin:"0"}},spe={key:0,style:{"margin-top":"8px",display:"flex","flex-wrap":"wrap",gap:"4px"}},cpe={style:{"margin-bottom":"12px"}},upe={key:0},dpe={style:{"margin-bottom":"8px"}},fpe={key:0,style:{"font-size":"12px","max-height":"400px","overflow-y":"auto",background:"#fafafa",padding:"8px","border-radius":"4px"}},ppe={key:0,style:{"white-space":"pre-wrap","word-break":"break-all",margin:"0 0 8px 0"}},gpe={key:1,style:{display:"flex","flex-direction":"column",gap:"8px"}},hpe={style:{"font-size":"11px",color:"#8c8c8c","margin-bottom":"4px"}},vpe=["src","alt"],mpe={key:2,style:{display:"flex","flex-direction":"column",gap:"8px"}},bpe=["src"],ype={key:1},Spe={style:{"margin-top":"8px","font-size":"12px",color:"#ff4d4f"}},$pe={__name:"App",setup(e){const t=zfe(),n=VE(),o=re(["dash"]),r=re(!1),i=re(!1),l=re(!1),a=()=>{l.value=!0,n.setToken(""),setTimeout(()=>{l.value=!1,i.value=!0},500)},s=re(!1),c=re({models:{status:"pending",data:null,error:null},cookies:{status:"pending",data:null,error:null},chat:{status:"pending",data:null,error:null}}),u=re("Say hello in one word"),d=re(""),p=re([]),g=re([]),v=re(!1),h=re(""),b=async()=>{try{const L=await fetch("/v1/models",{headers:n.getHeaders()});if(L.ok){const P=await L.json();p.value=P.data||[],p.value.length>0&&!d.value&&(d.value=p.value[0].id)}}catch(L){console.error("获取模型列表失败",L)}},y=L=>new Promise((P,D)=>{const N=new FileReader;N.readAsDataURL(L),N.onload=()=>P(N.result),N.onerror=D}),S=L=>["image/png","image/jpeg","image/gif","image/webp"].includes(L.type)?(g.value.length>=10&&Gn.error("最多上传 10 张图片"),!1):(Gn.error("仅支持 PNG, JPEG, GIF, WebP 格式"),!1),$=async L=>{const P=L.file;if(P.status==="removed"){g.value=g.value.filter(D=>D.uid!==P.uid);return}try{const D=await y(P.originFileObj||P);g.value.push({uid:P.uid,name:P.name,base64:D})}catch{Gn.error("图片读取失败")}},x=L=>{const P=L.split(","),D=P[0].match(/:(.*?);/)[1],N=atob(P[1]);let k=N.length;const F=new Uint8Array(k);for(;k--;)F[k]=N.charCodeAt(k);return URL.createObjectURL(new Blob([F],{type:D}))},C=L=>{if(!L)return{text:"",images:[],videos:[]};if(L.trim().startsWith("data:video/"))try{const z=x(L.trim());return{text:"",images:[],videos:[{src:z,type:"video/mp4"}]}}catch(z){return console.error("视频转换失败",z),{text:L,images:[],videos:[]}}const P=/!\[([^\]]*)\]\(([^)]+)\)/g,D=[];let N,k=0,F=[];for(;(N=P.exec(L))!==null;)N.index>k&&F.push(L.substring(k,N.index)),D.push({alt:N[1]||"图片",src:N[2],type:"image"}),k=P.lastIndex;return k{c.value[L].status="loading",c.value[L].error=null,c.value[L].data=null,h.value="";try{let P,D;if(L==="models")P="/v1/models",D={headers:n.getHeaders()};else if(L==="cookies")P="/v1/cookies",D={headers:n.getHeaders()};else if(L==="chat"){P="/v1/chat/completions";let F;if(g.value.length>0){F=[{type:"text",text:u.value}];for(const z of g.value)F.push({type:"image_url",image_url:{url:z.base64}})}else F=u.value;if(D={method:"POST",headers:{...n.getHeaders(),"Content-Type":"application/json"},body:JSON.stringify({model:d.value,messages:[{role:"user",content:F}],stream:v.value})},v.value){const z=await fetch(P,D);if(!z.ok){const Q=await z.json();throw new Error(Q.error?.message||`HTTP ${z.status}`)}const H=z.body.getReader(),j=new TextDecoder;let Y="";for(;;){const{done:Q,value:U}=await H.read();if(Q)break;Y+=j.decode(U,{stream:!0});const ee=Y.split(` -`);Y=ee.pop()||"";for(const X of ee)if(X.startsWith("data: ")){const J=X.slice(6).trim();if(J==="[DONE]")continue;try{const G=JSON.parse(J).choices?.[0]?.delta?.content||"";h.value+=G}catch{}}}c.value[L].status="success",c.value[L].data={content:h.value};return}}const N=await fetch(P,D),k=await N.json();N.ok?(c.value[L].status="success",L==="chat"&&k.choices?.[0]?.message?.content?c.value[L].data={content:k.choices[0].message.content}:c.value[L].data=k):(c.value[L].status="error",c.value[L].error=k.error?.message||`HTTP ${N.status}`)}catch(P){c.value[L].status="error",c.value[L].error=P.message}},w=()=>{s.value=!0,Object.keys(c.value).forEach(L=>{c.value[L]={status:"pending",data:null,error:null}}),g.value=[],b()},T={dash:"/","settings-server":"/settings/server","settings-workers":"/settings/workers","settings-browser":"/settings/browser","settings-adapters":"/settings/adapters","tools-display":"/tools/display","tools-cache":"/tools/cache","tools-logs":"/tools/logs"},E=({key:L})=>{const P=T[L];P&&t.push(P)},_=re(!0);let M=null,A=!1;async function R(){try{(await fetch("/admin/status",{headers:n.getHeaders(),signal:AbortSignal.timeout(5e3)})).ok&&A&&(A=!1,Dt.destroyAll(),window.location.reload())}catch{!A&&!_.value&&(A=!0,Dt.warning({title:"后端连接断开",content:"无法连接到后端服务,请检查服务是否正在运行。连接恢复后页面将自动刷新。",okText:"我知道了",centered:!0}))}}return We(async()=>{const L=()=>{window.innerWidth<=768&&(r.value=!0)};L(),window.addEventListener("resize",L);try{n.token?await n.checkAuth()||(n.setToken(""),i.value=!0):i.value=!0}catch(P){console.error("Auth check failed",P),i.value=!0}finally{_.value=!1}M=setInterval(R,5e3),wn(()=>{window.removeEventListener("resize",L),M&&clearInterval(M)})}),(L,P)=>{const D=_t("a-spin"),N=_t("a-button"),k=_t("a-flex"),F=_t("a-layout-header"),z=_t("a-menu-item"),H=_t("a-sub-menu"),j=_t("a-menu"),Y=_t("a-layout-sider"),Q=_t("router-view"),U=_t("a-layout-content"),ee=_t("a-card"),X=_t("a-layout-footer"),J=_t("a-layout"),Z=_t("a-tag"),G=_t("a-select-option"),q=_t("a-select"),V=_t("a-textarea"),K=_t("a-upload-dragger"),te=_t("a-checkbox"),ue=_t("a-space"),le=_t("a-drawer");return _.value?(Mt(),Ji(D,{key:0,spinning:_.value,tip:"正在验证身份...",size:"large",style:{height:"100vh",display:"flex","align-items":"center","justify-content":"center"}},null,8,["spinning"])):(Mt(),rn("div",Kfe,[f(Vfe,{visible:i.value,"onUpdate:visible":P[0]||(P[0]=ne=>i.value=ne)},null,8,["visible"]),f(J,{style:{"min-height":"100vh"},theme:"light"},{default:tt(()=>[f(F,{class:"header",style:{background:"rgba(255, 255, 255, 0.7)","backdrop-filter":"blur(20px)","-webkit-backdrop-filter":"blur(20px)","border-bottom":"1.5px solid rgba(0, 0, 0, 0.05)",display:"flex","align-items":"center",padding:"0 24px",position:"fixed",width:"100%",top:"0","z-index":"1000"}},{default:tt(()=>[P[12]||(P[12]=xt("div",{class:"logo",style:{"font-size":"1.25rem","font-weight":"bold",color:"#1890ff","margin-right":"24px"}}," WebAI2API ",-1)),f(k,{justify:"end",align:"center",style:{flex:"1"},gap:12},{default:tt(()=>[f(N,{onClick:w},{icon:tt(()=>[f(gt(O1))]),default:tt(()=>[P[10]||(P[10]=vt(" 接口测试 ",-1))]),_:1}),f(N,{danger:"",loading:l.value,onClick:a},{icon:tt(()=>[f(gt(M1))]),default:tt(()=>[P[11]||(P[11]=vt(" 退出登录 ",-1))]),_:1},8,["loading"])]),_:1})]),_:1}),f(J,{style:{"margin-top":"64px"}},{default:tt(()=>[f(Y,{collapsed:r.value,"onUpdate:collapsed":P[2]||(P[2]=ne=>r.value=ne),collapsible:"",theme:"light",style:{position:"fixed",left:"0",top:"64px",height:"calc(100vh - 64px)","overflow-y":"auto","z-index":"100"}},{default:tt(()=>[f(j,{selectedKeys:o.value,"onUpdate:selectedKeys":P[1]||(P[1]=ne=>o.value=ne),mode:"inline",onClick:E},{default:tt(()=>[f(z,{key:"dash"},{default:tt(()=>[f(gt(P1)),P[13]||(P[13]=xt("span",null,"状态概览",-1))]),_:1}),f(H,{key:"settings"},{title:tt(()=>[xt("span",null,[f(gt(A1)),P[14]||(P[14]=xt("span",null,"系统设置",-1))])]),default:tt(()=>[f(z,{key:"settings-server"},{default:tt(()=>[...P[15]||(P[15]=[vt("服务器",-1)])]),_:1}),f(z,{key:"settings-workers"},{default:tt(()=>[...P[16]||(P[16]=[vt("工作池",-1)])]),_:1}),f(z,{key:"settings-browser"},{default:tt(()=>[...P[17]||(P[17]=[vt("浏览器",-1)])]),_:1}),f(z,{key:"settings-adapters"},{default:tt(()=>[...P[18]||(P[18]=[vt("适配器",-1)])]),_:1})]),_:1}),f(H,{key:"tools"},{title:tt(()=>[xt("span",null,[f(gt(R1)),P[19]||(P[19]=xt("span",null,"系统管理",-1))])]),default:tt(()=>[f(z,{key:"tools-display"},{default:tt(()=>[...P[20]||(P[20]=[vt("虚拟显示器",-1)])]),_:1}),f(z,{key:"tools-cache"},{default:tt(()=>[...P[21]||(P[21]=[vt("缓存与重启",-1)])]),_:1}),f(z,{key:"tools-logs"},{default:tt(()=>[...P[22]||(P[22]=[vt("日志查看器",-1)])]),_:1})]),_:1})]),_:1},8,["selectedKeys"])]),_:1},8,["collapsed"]),f(J,{style:Jf({marginLeft:r.value?"80px":"200px",padding:"16px",transition:"margin-left 0.2s"})},{default:tt(()=>[f(U,{style:{"min-height":"280px"}},{default:tt(()=>[f(Q)]),_:1}),f(X,{class:"footer",style:{padding:"0px","margin-top":"10px"}},{default:tt(()=>[f(ee,{bordered:!1,bodyStyle:{padding:"16px 24px",display:"flex",justifyContent:"space-between",alignItems:"center"}},{default:tt(()=>[xt("div",null,[xt("a",Gfe,[f(gt(I1))])])]),_:1})]),_:1})]),_:1},8,["style"])]),_:1})]),_:1}),f(le,{open:s.value,"onUpdate:open":P[9]||(P[9]=ne=>s.value=ne),title:"接口测试",placement:"right",width:500},{default:tt(()=>[f(ue,{direction:"vertical",style:{width:"100%"},size:"large"},{default:tt(()=>[f(ee,{title:"GET /v1/models",size:"small"},{extra:tt(()=>[f(N,{size:"small",type:"primary",onClick:P[3]||(P[3]=ne=>O("models")),loading:c.value.models.status==="loading"},{default:tt(()=>[...P[23]||(P[23]=[vt(" 测试 ",-1)])]),_:1},8,["loading"])]),default:tt(()=>[c.value.models.status==="success"?(Mt(),rn("div",Xfe,[f(Z,{color:"success"},{default:tt(()=>[f(gt(hl)),P[24]||(P[24]=vt(" 成功 ",-1))]),_:1}),xt("div",Ufe," 返回 "+ao(c.value.models.data?.data?.length||0)+" 个模型 ",1)])):c.value.models.status==="error"?(Mt(),rn("div",Yfe,[f(Z,{color:"error"},{default:tt(()=>[f(gt(vl)),P[25]||(P[25]=vt(" 失败 ",-1))]),_:1}),xt("div",qfe,ao(c.value.models.error),1)])):(Mt(),rn("div",Zfe,"点击测试按钮开始"))]),_:1}),f(ee,{title:"GET /v1/cookies",size:"small"},{extra:tt(()=>[f(N,{size:"small",type:"primary",onClick:P[4]||(P[4]=ne=>O("cookies")),loading:c.value.cookies.status==="loading"},{default:tt(()=>[...P[26]||(P[26]=[vt(" 测试 ",-1)])]),_:1},8,["loading"])]),default:tt(()=>[c.value.cookies.status==="success"?(Mt(),rn("div",Qfe,[f(Z,{color:"success"},{default:tt(()=>[f(gt(hl)),P[27]||(P[27]=vt(" 成功 ",-1))]),_:1}),xt("div",Jfe," 返回 "+ao(c.value.cookies.data?.cookies?.length||0)+" 个 Cookie ",1)])):c.value.cookies.status==="error"?(Mt(),rn("div",epe,[f(Z,{color:"error"},{default:tt(()=>[f(gt(vl)),P[28]||(P[28]=vt(" 失败 ",-1))]),_:1}),xt("div",tpe,ao(c.value.cookies.error),1)])):(Mt(),rn("div",npe,"点击测试按钮开始"))]),_:1}),f(ee,{title:"POST /v1/chat/completions",size:"small"},{extra:tt(()=>[f(N,{size:"small",type:"primary",onClick:P[5]||(P[5]=ne=>O("chat")),loading:c.value.chat.status==="loading",disabled:!d.value},{default:tt(()=>[...P[29]||(P[29]=[vt(" 测试 ",-1)])]),_:1},8,["loading","disabled"])]),default:tt(()=>[xt("div",ope,[P[30]||(P[30]=xt("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"4px"}},"模型",-1)),f(q,{value:d.value,"onUpdate:value":P[6]||(P[6]=ne=>d.value=ne),style:{width:"100%"},size:"small",placeholder:"选择模型","show-search":""},{default:tt(()=>[(Mt(!0),rn(He,null,lu(p.value,ne=>(Mt(),Ji(G,{key:ne.id,value:ne.id},{default:tt(()=>[vt(ao(ne.id),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),xt("div",rpe,[P[31]||(P[31]=xt("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"4px"}},"提示词",-1)),f(V,{value:u.value,"onUpdate:value":P[7]||(P[7]=ne=>u.value=ne),placeholder:"输入提示词",rows:2,size:"small"},null,8,["value"])]),xt("div",ipe,[xt("div",lpe," 附加图片 ("+ao(g.value.length)+"/10) ",1),f(K,{"file-list":[],multiple:!0,"before-upload":S,onChange:$,accept:".png,.jpg,.jpeg,.gif,.webp","show-upload-list":!1,style:{padding:"8px"}},{default:tt(()=>[xt("p",ape,[f(gt(T1),{style:{"font-size":"24px",color:"#1890ff"}})]),P[32]||(P[32]=xt("p",{style:{"font-size":"12px",margin:"4px 0 0 0",color:"#8c8c8c"}}," 点击或拖拽上传图片 (PNG/JPEG/GIF/WebP) ",-1))]),_:1}),g.value.length>0?(Mt(),rn("div",spe,[(Mt(!0),rn(He,null,lu(g.value,ne=>(Mt(),Ji(Z,{key:ne.uid,closable:"",onClose:ce=>g.value=g.value.filter(se=>se.uid!==ne.uid)},{default:tt(()=>[f(gt(E1)),vt(" "+ao(ne.name.slice(0,15))+ao(ne.name.length>15?"...":""),1)]),_:2},1032,["onClose"]))),128))])):Xl("",!0)]),xt("div",cpe,[f(te,{checked:v.value,"onUpdate:checked":P[8]||(P[8]=ne=>v.value=ne)},{default:tt(()=>[...P[33]||(P[33]=[vt("流式响应",-1)])]),_:1},8,["checked"])]),c.value.chat.status==="loading"||c.value.chat.status==="success"?(Mt(),rn("div",upe,[xt("div",dpe,[c.value.chat.status==="loading"?(Mt(),Ji(Z,{key:0,color:"processing"},{default:tt(()=>[f(gt(Nn)),vt(" "+ao(v.value?"正在接收流式响应...":"请求中,可能需要较长时间..."),1)]),_:1})):(Mt(),Ji(Z,{key:1,color:"success"},{default:tt(()=>[f(gt(hl)),P[34]||(P[34]=vt(" 成功 ",-1))]),_:1}))]),(v.value?h.value:c.value.chat.data?.content)?(Mt(),rn("div",fpe,[C(v.value?h.value:c.value.chat.data?.content).text?(Mt(),rn("pre",ppe,ao(C(v.value?h.value:c.value.chat.data?.content).text),1)):Xl("",!0),C(v.value?h.value:c.value.chat.data?.content).images.length>0?(Mt(),rn("div",gpe,[(Mt(!0),rn(He,null,lu(C(v.value?h.value:c.value.chat.data?.content).images,(ne,ce)=>(Mt(),rn("div",{key:ce,style:{border:"1px solid #d9d9d9","border-radius":"4px",padding:"4px",background:"white"}},[xt("div",hpe,ao(ne.alt),1),xt("img",{src:ne.src,alt:ne.alt,style:{"max-width":"100%",height:"auto",display:"block","border-radius":"2px"}},null,8,vpe)]))),128))])):Xl("",!0),C(v.value?h.value:c.value.chat.data?.content).videos.length>0?(Mt(),rn("div",mpe,[(Mt(!0),rn(He,null,lu(C(v.value?h.value:c.value.chat.data?.content).videos,(ne,ce)=>(Mt(),rn("div",{key:"video-"+ce,style:{border:"1px solid #d9d9d9","border-radius":"4px",padding:"4px",background:"white"}},[P[35]||(P[35]=xt("div",{style:{"font-size":"11px",color:"#8c8c8c","margin-bottom":"4px"}},"生成的视频",-1)),xt("video",{src:ne.src,controls:"",style:{"max-width":"100%",height:"auto",display:"block","border-radius":"2px"}}," 您的浏览器不支持视频播放。 ",8,bpe)]))),128))])):Xl("",!0)])):Xl("",!0)])):c.value.chat.status==="error"?(Mt(),rn("div",ype,[f(Z,{color:"error"},{default:tt(()=>[f(gt(vl)),P[36]||(P[36]=vt(" 失败 ",-1))]),_:1}),xt("div",Spe,ao(c.value.chat.error),1)])):Xl("",!0)]),_:1})]),_:1})]),_:1},8,["open"])]))}}},Cpe=Wfe($pe,[["__scopeId","data-v-5ef25f71"]]),xpe=[{path:"/",component:()=>ii(()=>import("./dash-9gu6BYeT.js"),__vite__mapDeps([0,1,2]))},{path:"/settings/server",component:()=>ii(()=>import("./server-BMslIr7R.js"),__vite__mapDeps([3,4]))},{path:"/settings/workers",component:()=>ii(()=>import("./workers-DudWKgva.js"),[])},{path:"/settings/browser",component:()=>ii(()=>import("./browser-BaEoZVA4.js"),[])},{path:"/settings/adapters",component:()=>ii(()=>import("./adapters-DtPVlvoc.js"),[])},{path:"/tools/display",component:()=>ii(()=>import("./display-Dhk_8lAp.js"),__vite__mapDeps([5,2]))},{path:"/tools/cache",component:()=>ii(()=>import("./cache-B7UW2VhI.js"),__vite__mapDeps([6,1]))},{path:"/tools/logs",component:()=>ii(()=>import("./logs-DZX_S7jR.js"),__vite__mapDeps([7,8]))}],wpe=Lfe({history:mfe(),routes:xpe}),Ope=w_(),wg=mO(Cpe);wg.use(Ope);wg.use(wpe);wg.use(Rde);wg.mount("#app");export{r0 as A,Vp as B,hl as C,$g as D,jp as E,He as F,Ve as I,Nn as L,Dt as M,M1 as P,_1 as R,A1 as S,Wfe as _,wn as a,Ji as b,f as c,Mt as d,Xl as e,_t as f,xt as g,vt as h,vl as i,rn as j,VE as k,ut as l,I as m,lu as n,We as o,ii as p,Gr as q,re as r,g1 as s,ao as t,gt as u,Gn as v,tt as w,cg as x,M_ as y,w1 as z}; + `]:{opacity:1},[o]:{color:e.colorTextDescription,transition:`all ${e.motionDurationSlow}`},[`&:hover ${o}`]:{color:e.colorText}},[`${t}-icon ${o}`]:{color:e.colorTextDescription,fontSize:r},[`${l}-progress`]:{position:"absolute",bottom:-e.uploadProgressOffset,width:"100%",paddingInlineStart:r+e.paddingXS,fontSize:r,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${l}:hover ${s}`]:{opacity:1,color:e.colorText},[`${l}-error`]:{color:e.colorError,[`${l}-name, ${t}-icon ${o}`]:{color:e.colorError},[a]:{[`${o}, ${o}:hover`]:{color:e.colorError},[s]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},s3=new ot("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),c3=new ot("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),Lce=e=>{const{componentCls:t}=e,n=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${n}-appear, ${n}-enter, ${n}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${n}-appear, ${n}-enter`]:{animationName:s3},[`${n}-leave`]:{animationName:c3}}},s3,c3]},zce=e=>{const{componentCls:t,iconCls:n,uploadThumbnailSize:o,uploadProgressOffset:r}=e,i=`${t}-list`,l=`${i}-item`;return{[`${t}-wrapper`]:{[`${i}${i}-picture, ${i}${i}-picture-card`]:{[l]:{position:"relative",height:o+e.lineWidth*2+e.paddingXS*2,padding:e.paddingXS,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},[`${l}-thumbnail`]:m(m({},Yt),{width:o,height:o,lineHeight:`${o+e.paddingSM}px`,textAlign:"center",flex:"none",[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${l}-progress`]:{bottom:r,width:`calc(100% - ${e.paddingSM*2}px)`,marginTop:0,paddingInlineStart:o+e.paddingXS}},[`${l}-error`]:{borderColor:e.colorError,[`${l}-thumbnail ${n}`]:{"svg path[fill='#e6f7ff']":{fill:e.colorErrorBg},"svg path[fill='#1890ff']":{fill:e.colorError}}},[`${l}-uploading`]:{borderStyle:"dashed",[`${l}-name`]:{marginBottom:r}}}}}},Hce=e=>{const{componentCls:t,iconCls:n,fontSizeLG:o,colorTextLightSolid:r}=e,i=`${t}-list`,l=`${i}-item`,a=e.uploadPicCardSize;return{[`${t}-wrapper${t}-picture-card-wrapper`]:m(m({},qo()),{display:"inline-block",width:"100%",[`${t}${t}-select`]:{width:a,height:a,marginInlineEnd:e.marginXS,marginBottom:e.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${i}${i}-picture-card`]:{[`${i}-item-container`]:{display:"inline-block",width:a,height:a,marginBlock:`0 ${e.marginXS}px`,marginInline:`0 ${e.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[l]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${e.paddingXS*2}px)`,height:`calc(100% - ${e.paddingXS*2}px)`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'" "'}},[`${l}:hover`]:{[`&::before, ${l}-actions`]:{opacity:1}},[`${l}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[`${n}-eye, ${n}-download, ${n}-delete`]:{zIndex:10,width:o,margin:`0 ${e.marginXXS}px`,fontSize:o,cursor:"pointer",transition:`all ${e.motionDurationSlow}`}},[`${l}-actions, ${l}-actions:hover`]:{[`${n}-eye, ${n}-download, ${n}-delete`]:{color:new ht(r).setAlpha(.65).toRgbString(),"&:hover":{color:r}}},[`${l}-thumbnail, ${l}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${l}-name`]:{display:"none",textAlign:"center"},[`${l}-file + ${l}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${e.paddingXS*2}px)`},[`${l}-uploading`]:{[`&${l}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:"none"}},[`${l}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${e.paddingXS*2}px)`,paddingInlineStart:0}}})}},jce=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},Vce=e=>{const{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:m(m({},Ue(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-disabled`]:{color:n,cursor:"not-allowed"}})}},Wce=Ke("Upload",e=>{const{fontSizeHeading3:t,fontSize:n,lineHeight:o,lineWidth:r,controlHeightLG:i}=e,l=Math.round(n*o),a=ke(e,{uploadThumbnailSize:t*2,uploadProgressOffset:l/2+r,uploadPicCardSize:i*2.55});return[Vce(a),kce(a),zce(a),Hce(a),Fce(a),Lce(a),jce(a),Fc(a)]});var Kce=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(l){l(i)})}return new(n||(n=Promise))(function(i,l){function a(u){try{c(o.next(u))}catch(d){l(d)}}function s(u){try{c(o.throw(u))}catch(d){l(d)}}function c(u){u.done?i(u.value):r(u.value).then(a,s)}c((o=o.apply(e,t||[])).next())})},Gce=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var M;return(M=s.value)!==null&&M!==void 0?M:d.value}),[g,v]=Tt(e.defaultFileList||[],{value:ze(e,"fileList"),postState:M=>{const A=Date.now();return(M??[]).map((R,L)=>(!R.uid&&!Object.isFrozen(R)&&(R.uid=`__AUTO__${A}_${L}__`),R))}}),h=re("drop"),b=re(null);We(()=>{Ot(e.fileList!==void 0||o.value===void 0,"Upload","`value` is not a valid prop, do you mean `fileList`?"),Ot(e.transformFile===void 0,"Upload","`transformFile` is deprecated. Please use `beforeUpload` directly."),Ot(e.remove===void 0,"Upload","`remove` props is deprecated. Please use `remove` event.")});const y=(M,A,R)=>{var L,P;let D=[...A];e.maxCount===1?D=D.slice(-1):e.maxCount&&(D=D.slice(0,e.maxCount)),v(D);const N={file:M,fileList:D};R&&(N.event=R),(L=e["onUpdate:fileList"])===null||L===void 0||L.call(e,N.fileList),(P=e.onChange)===null||P===void 0||P.call(e,N),i.onFieldChange()},S=(M,A)=>Kce(this,void 0,void 0,function*(){const{beforeUpload:R,transformFile:L}=e;let P=M;if(R){const D=yield R(M,A);if(D===!1)return!1;if(delete M[Ps],D===Ps)return Object.defineProperty(M,Ps,{value:!0,configurable:!0}),!1;typeof D=="object"&&D&&(P=D)}return L&&(P=yield L(P)),P}),$=M=>{const A=M.filter(P=>!P.file[Ps]);if(!A.length)return;const R=A.map(P=>Fu(P.file));let L=[...g.value];R.forEach(P=>{L=Lu(P,L)}),R.forEach((P,D)=>{let N=P;if(A[D].parsedFile)P.status="uploading";else{const{originFileObj:k}=P;let F;try{F=new File([k],k.name,{type:k.type})}catch{F=new Blob([k],{type:k.type}),F.name=k.name,F.lastModifiedDate=new Date,F.lastModified=new Date().getTime()}F.uid=P.uid,N=F}y(N,L)})},x=(M,A,R)=>{try{typeof M=="string"&&(M=JSON.parse(M))}catch{}if(!ov(A,g.value))return;const L=Fu(A);L.status="done",L.percent=100,L.response=M,L.xhr=R;const P=Lu(L,g.value);y(L,P)},C=(M,A)=>{if(!ov(A,g.value))return;const R=Fu(A);R.status="uploading",R.percent=M.percent;const L=Lu(R,g.value);y(R,L,M)},O=(M,A,R)=>{if(!ov(R,g.value))return;const L=Fu(R);L.error=M,L.response=A,L.status="error";const P=Lu(L,g.value);y(L,P)},w=M=>{let A;const R=e.onRemove||e.remove;Promise.resolve(typeof R=="function"?R(M):R).then(L=>{var P,D;if(L===!1)return;const N=Ice(M,g.value);N&&(A=m(m({},M),{status:"removed"}),(P=g.value)===null||P===void 0||P.forEach(k=>{const F=A.uid!==void 0?"uid":"name";k[F]===A[F]&&!Object.isFrozen(k)&&(k.status="removed")}),(D=b.value)===null||D===void 0||D.abort(A),y(A,N))})},T=M=>{var A;h.value=M.type,M.type==="drop"&&((A=e.onDrop)===null||A===void 0||A.call(e,M))};r({onBatchStart:$,onSuccess:x,onProgress:C,onError:O,fileList:g,upload:b});const[E]=ko("Upload",Un.Upload,I(()=>e.locale)),_=(M,A)=>{const{removeIcon:R,previewIcon:L,downloadIcon:P,previewFile:D,onPreview:N,onDownload:k,isImageUrl:F,progress:z,itemRender:H,iconRender:j,showUploadList:Y}=e,{showDownloadIcon:Q,showPreviewIcon:U,showRemoveIcon:ee}=typeof Y=="boolean"?{}:Y;return Y?f(Bce,{prefixCls:l.value,listType:e.listType,items:g.value,previewFile:D,onPreview:N,onDownload:k,onRemove:w,showRemoveIcon:!p.value&&ee,showPreviewIcon:U,showDownloadIcon:Q,removeIcon:R,previewIcon:L,downloadIcon:P,iconRender:j,locale:E.value,isImageUrl:F,progress:z,itemRender:H,appendActionVisible:A,appendAction:M},m({},n)):M?.()};return()=>{var M,A,R;const{listType:L,type:P}=e,{class:D,style:N}=o,k=Gce(o,["class","style"]),F=m(m(m({onBatchStart:$,onError:O,onProgress:C,onSuccess:x},k),e),{id:(M=e.id)!==null&&M!==void 0?M:i.id.value,prefixCls:l.value,beforeUpload:S,onChange:void 0,disabled:p.value});delete F.remove,(!n.default||p.value)&&delete F.id;const z={[`${l.value}-rtl`]:a.value==="rtl"};if(P==="drag"){const Q=ae(l.value,{[`${l.value}-drag`]:!0,[`${l.value}-drag-uploading`]:g.value.some(U=>U.status==="uploading"),[`${l.value}-drag-hover`]:h.value==="dragover",[`${l.value}-disabled`]:p.value,[`${l.value}-rtl`]:a.value==="rtl"},o.class,u.value);return c(f("span",B(B({},o),{},{class:ae(`${l.value}-wrapper`,z,D,u.value)}),[f("div",{class:Q,onDrop:T,onDragover:T,onDragleave:T,style:o.style},[f(o3,B(B({},F),{},{ref:b,class:`${l.value}-btn`}),B({default:()=>[f("div",{class:`${l.value}-drag-container`},[(A=n.default)===null||A===void 0?void 0:A.call(n)])]},n))]),_()]))}const H=ae(l.value,{[`${l.value}-select`]:!0,[`${l.value}-select-${L}`]:!0,[`${l.value}-disabled`]:p.value,[`${l.value}-rtl`]:a.value==="rtl"}),j=$t((R=n.default)===null||R===void 0?void 0:R.call(n)),Y=Q=>f("div",{class:H,style:Q},[f(o3,B(B({},F),{},{ref:b}),n)]);return c(L==="picture-card"?f("span",B(B({},o),{},{class:ae(`${l.value}-wrapper`,`${l.value}-picture-card-wrapper`,z,o.class,u.value)}),[_(Y,!!(j&&j.length))]):f("span",B(B({},o),{},{class:ae(`${l.value}-wrapper`,z,o.class,u.value)}),[Y(j&&j.length?void 0:{display:"none"}),_()]))}}});var u3=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{height:r}=e,i=u3(e,["height"]),{style:l}=o,a=u3(o,["style"]),s=m(m(m({},i),a),{type:"drag",style:m(m({},l),{height:typeof r=="number"?`${r}px`:r})});return f(Nd,s,n)}}}),Xce=Bd,Uce=m(Nd,{Dragger:Bd,LIST_IGNORE:Ps,install(e){return e.component(Nd.name,Nd),e.component(Bd.name,Bd),e}});function Yce(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function qce(e){return Object.keys(e).map(t=>`${Yce(t)}: ${e[t]};`).join(" ")}function d3(){return window.devicePixelRatio||1}function rv(e,t,n,o){e.translate(t,n),e.rotate(Math.PI/180*Number(o)),e.translate(-t,-n)}const Zce=(e,t)=>{let n=!1;return e.removedNodes.length&&(n=Array.from(e.removedNodes).some(o=>o===t)),e.type==="attributes"&&e.target===t&&(n=!0),n};var Qce=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r2&&arguments[2]!==void 0?arguments[2]:{};const{window:o=W8}=n,r=Qce(n,["window"]);let i;const l=j8(()=>o&&"MutationObserver"in o),a=()=>{i&&(i.disconnect(),i=void 0)},s=ye(()=>ay(e),u=>{a(),l.value&&o&&u&&(i=new MutationObserver(t),i.observe(u,r))},{immediate:!0}),c=()=>{a(),s()};return H8(c),{isSupported:l,stop:c}}const iv=2,f3=3,eue=()=>({zIndex:Number,rotate:Number,width:Number,height:Number,image:String,content:Fe([String,Array]),font:De(),rootClassName:String,gap:at(),offset:at()}),tue=ie({name:"AWatermark",inheritAttrs:!1,props:Ze(eue(),{zIndex:9,rotate:-22,font:{},gap:[100,100]}),setup(e,t){let{slots:n,attrs:o}=t;const[,r]=Zr(),i=oe(),l=oe(),a=oe(!1),s=I(()=>{var _,M;return(M=(_=e.gap)===null||_===void 0?void 0:_[0])!==null&&M!==void 0?M:100}),c=I(()=>{var _,M;return(M=(_=e.gap)===null||_===void 0?void 0:_[1])!==null&&M!==void 0?M:100}),u=I(()=>s.value/2),d=I(()=>c.value/2),p=I(()=>{var _,M;return(M=(_=e.offset)===null||_===void 0?void 0:_[0])!==null&&M!==void 0?M:u.value}),g=I(()=>{var _,M;return(M=(_=e.offset)===null||_===void 0?void 0:_[1])!==null&&M!==void 0?M:d.value}),v=I(()=>{var _,M;return(M=(_=e.font)===null||_===void 0?void 0:_.fontSize)!==null&&M!==void 0?M:r.value.fontSizeLG}),h=I(()=>{var _,M;return(M=(_=e.font)===null||_===void 0?void 0:_.fontWeight)!==null&&M!==void 0?M:"normal"}),b=I(()=>{var _,M;return(M=(_=e.font)===null||_===void 0?void 0:_.fontStyle)!==null&&M!==void 0?M:"normal"}),y=I(()=>{var _,M;return(M=(_=e.font)===null||_===void 0?void 0:_.fontFamily)!==null&&M!==void 0?M:"sans-serif"}),S=I(()=>{var _,M;return(M=(_=e.font)===null||_===void 0?void 0:_.color)!==null&&M!==void 0?M:r.value.colorFill}),$=I(()=>{var _;const M={zIndex:(_=e.zIndex)!==null&&_!==void 0?_:9,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let A=p.value-u.value,R=g.value-d.value;return A>0&&(M.left=`${A}px`,M.width=`calc(100% - ${A}px)`,A=0),R>0&&(M.top=`${R}px`,M.height=`calc(100% - ${R}px)`,R=0),M.backgroundPosition=`${A}px ${R}px`,M}),x=()=>{l.value&&(l.value.remove(),l.value=void 0)},C=(_,M)=>{var A;i.value&&l.value&&(a.value=!0,l.value.setAttribute("style",qce(m(m({},$.value),{backgroundImage:`url('${_}')`,backgroundSize:`${(s.value+M)*iv}px`}))),(A=i.value)===null||A===void 0||A.append(l.value),setTimeout(()=>{a.value=!1}))},O=_=>{let M=120,A=64;const R=e.content,L=e.image,P=e.width,D=e.height;if(!L&&_.measureText){_.font=`${Number(v.value)}px ${y.value}`;const N=Array.isArray(R)?R:[R],k=N.map(F=>_.measureText(F).width);M=Math.ceil(Math.max(...k)),A=Number(v.value)*N.length+(N.length-1)*f3}return[P??M,D??A]},w=(_,M,A,R,L)=>{const P=d3(),D=e.content,N=Number(v.value)*P;_.font=`${b.value} normal ${h.value} ${N}px/${L}px ${y.value}`,_.fillStyle=S.value,_.textAlign="center",_.textBaseline="top",_.translate(R/2,0);const k=Array.isArray(D)?D:[D];k?.forEach((F,z)=>{_.fillText(F??"",M,A+z*(N+f3*P))})},T=()=>{var _;const M=document.createElement("canvas"),A=M.getContext("2d"),R=e.image,L=(_=e.rotate)!==null&&_!==void 0?_:-22;if(A){l.value||(l.value=document.createElement("div"));const P=d3(),[D,N]=O(A),k=(s.value+D)*P,F=(c.value+N)*P;M.setAttribute("width",`${k*iv}px`),M.setAttribute("height",`${F*iv}px`);const z=s.value*P/2,H=c.value*P/2,j=D*P,Y=N*P,Q=(j+s.value*P)/2,U=(Y+c.value*P)/2,ee=z+k,X=H+F,J=Q+k,Z=U+F;if(A.save(),rv(A,Q,U,L),R){const G=new Image;G.onload=()=>{A.drawImage(G,z,H,j,Y),A.restore(),rv(A,J,Z,L),A.drawImage(G,ee,X,j,Y),C(M.toDataURL(),D)},G.crossOrigin="anonymous",G.referrerPolicy="no-referrer",G.src=R}else w(A,z,H,j,Y),A.restore(),rv(A,J,Z,L),w(A,ee,X,j,Y),C(M.toDataURL(),D)}};return We(()=>{T()}),ye(()=>[e,r.value.colorFill,r.value.fontSizeLG],()=>{T()},{deep:!0,flush:"post"}),Qe(()=>{x()}),Jce(i,_=>{a.value||_.forEach(M=>{Zce(M,l.value)&&(x(),T())})},{attributes:!0,subtree:!0,childList:!0,attributeFilter:["style","class"]}),()=>{var _;return f("div",B(B({},o),{},{ref:i,class:[o.class,e.rootClassName],style:[{position:"relative"},o.style]}),[(_=n.default)===null||_===void 0?void 0:_.call(n)])}}}),nue=Et(tue);function p3(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}function g3(e){return{backgroundColor:e.bgColorSelected,boxShadow:e.boxShadow}}const oue=m({overflow:"hidden"},Yt),rue=e=>{const{componentCls:t}=e;return{[t]:m(m(m(m(m({},Ue(e)),{display:"inline-block",padding:e.segmentedContainerPadding,color:e.labelColor,backgroundColor:e.bgColor,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${e.motionDurationMid} ${e.motionEaseInOut}`,borderRadius:e.borderRadiusSM,"&-selected":m(m({},g3(e)),{color:e.labelColorHover}),"&::after":{content:'""',position:"absolute",width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",transition:`background-color ${e.motionDurationMid}`,pointerEvents:"none"},[`&:hover:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.labelColorHover,"&::after":{backgroundColor:e.bgColorHover}},"&-label":m({minHeight:e.controlHeight-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeight-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontal}px`},oue),"&-icon + *":{marginInlineStart:e.marginSM/2},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:m(m({},g3(e)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${e.paddingXXS}px 0`,borderRadius:e.borderRadiusSM,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:e.controlHeightLG-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeightLG-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontal}px`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:e.controlHeightSM-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeightSM-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontalSM}px`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}}}),p3(`&-disabled ${t}-item`,e)),p3(`${t}-item-disabled`,e)),{[`${t}-thumb-motion-appear-active`]:{transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,willChange:"transform, width"}})}},iue=Ke("Segmented",e=>{const{lineWidthBold:t,lineWidth:n,colorTextLabel:o,colorText:r,colorFillSecondary:i,colorBgLayout:l,colorBgElevated:a}=e,s=ke(e,{segmentedPaddingHorizontal:e.controlPaddingHorizontal-n,segmentedPaddingHorizontalSM:e.controlPaddingHorizontalSM-n,segmentedContainerPadding:t,labelColor:o,labelColorHover:r,bgColor:l,bgColorHover:i,bgColorSelected:a});return[rue(s)]}),h3=e=>e?{left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth}:null,ta=e=>e!==void 0?`${e}px`:void 0,lue=ie({props:{value:Ct(),getValueIndex:Ct(),prefixCls:Ct(),motionName:Ct(),onMotionStart:Ct(),onMotionEnd:Ct(),direction:Ct(),containerRef:Ct()},emits:["motionStart","motionEnd"],setup(e,t){let{emit:n}=t;const o=re(),r=v=>{var h;const b=e.getValueIndex(v),y=(h=e.containerRef.value)===null||h===void 0?void 0:h.querySelectorAll(`.${e.prefixCls}-item`)[b];return y?.offsetParent&&y},i=re(null),l=re(null);ye(()=>e.value,(v,h)=>{const b=r(h),y=r(v),S=h3(b),$=h3(y);i.value=S,l.value=$,n(b&&y?"motionStart":"motionEnd")},{flush:"post"});const a=I(()=>{var v,h;return e.direction==="rtl"?ta(-((v=i.value)===null||v===void 0?void 0:v.right)):ta((h=i.value)===null||h===void 0?void 0:h.left)}),s=I(()=>{var v,h;return e.direction==="rtl"?ta(-((v=l.value)===null||v===void 0?void 0:v.right)):ta((h=l.value)===null||h===void 0?void 0:h.left)});let c;const u=v=>{clearTimeout(c),rt(()=>{v&&(v.style.transform="translateX(var(--thumb-start-left))",v.style.width="var(--thumb-start-width)")})},d=v=>{c=setTimeout(()=>{v&&($f(v,`${e.motionName}-appear-active`),v.style.transform="translateX(var(--thumb-active-left))",v.style.width="var(--thumb-active-width)")})},p=v=>{i.value=null,l.value=null,v&&(v.style.transform=null,v.style.width=null,Cf(v,`${e.motionName}-appear-active`)),n("motionEnd")},g=I(()=>{var v,h;return{"--thumb-start-left":a.value,"--thumb-start-width":ta((v=i.value)===null||v===void 0?void 0:v.width),"--thumb-active-left":s.value,"--thumb-active-width":ta((h=l.value)===null||h===void 0?void 0:h.width)}});return Qe(()=>{clearTimeout(c)}),()=>{const v={ref:o,style:g.value,class:[`${e.prefixCls}-thumb`]};return f(pn,{appear:!0,onBeforeEnter:u,onEnter:d,onAfterEnter:p},{default:()=>[!i.value||!l.value?null:f("div",v,null)]})}}});function aue(e){return e.map(t=>typeof t=="object"&&t!==null?t:{label:t?.toString(),title:t?.toString(),value:t})}const sue=()=>({prefixCls:String,options:at(),block:$e(),disabled:$e(),size:Ne(),value:m(m({},Fe([String,Number])),{required:!0}),motionName:String,onChange:ve(),"onUpdate:value":ve()}),pE=(e,t)=>{let{slots:n,emit:o}=t;const{value:r,disabled:i,payload:l,title:a,prefixCls:s,label:c=n.label,checked:u,className:d}=e,p=g=>{i||o("change",g,r)};return f("label",{class:ae({[`${s}-item-disabled`]:i},d)},[f("input",{class:`${s}-item-input`,type:"radio",disabled:i,checked:u,onChange:p},null),f("div",{class:`${s}-item-label`,title:typeof a=="string"?a:""},[typeof c=="function"?c({value:r,disabled:i,payload:l,title:a}):c??r])])};pE.inheritAttrs=!1;const cue=ie({name:"ASegmented",inheritAttrs:!1,props:Ze(sue(),{options:[],motionName:"thumb-motion"}),slots:Object,setup(e,t){let{emit:n,slots:o,attrs:r}=t;const{prefixCls:i,direction:l,size:a}=Te("segmented",e),[s,c]=iue(i),u=oe(),d=oe(!1),p=I(()=>aue(e.options)),g=(v,h)=>{e.disabled||(n("update:value",h),n("change",h))};return()=>{const v=i.value;return s(f("div",B(B({},r),{},{class:ae(v,{[c.value]:!0,[`${v}-block`]:e.block,[`${v}-disabled`]:e.disabled,[`${v}-lg`]:a.value=="large",[`${v}-sm`]:a.value=="small",[`${v}-rtl`]:l.value==="rtl"},r.class),ref:u}),[f("div",{class:`${v}-group`},[f(lue,{containerRef:u,prefixCls:v,value:e.value,motionName:`${v}-${e.motionName}`,direction:l.value,getValueIndex:h=>p.value.findIndex(b=>b.value===h),onMotionStart:()=>{d.value=!0},onMotionEnd:()=>{d.value=!1}},null),p.value.map(h=>f(pE,B(B({key:h.value,prefixCls:v,checked:h.value===e.value,onChange:g},h),{},{className:ae(h.className,`${v}-item`,{[`${v}-item-selected`]:h.value===e.value&&!d.value}),disabled:!!e.disabled||!!h.disabled}),o))])]))}}}),uue=Et(cue),due=e=>{const{componentCls:t}=e;return{[t]:m(m({},Ue(e)),{display:"flex",justifyContent:"center",alignItems:"center",padding:e.paddingSM,backgroundColor:e.colorWhite,borderRadius:e.borderRadiusLG,border:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,position:"relative",width:"100%",height:"100%",overflow:"hidden",[`& > ${t}-mask`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:e.colorText,lineHeight:e.lineHeight,background:e.QRCodeMaskBackgroundColor,textAlign:"center",[`& > ${t}-expired , & > ${t}-scanned`]:{color:e.QRCodeTextColor}},"&-icon":{marginBlockEnd:e.marginXS,fontSize:e.controlHeight}}),[`${t}-borderless`]:{borderColor:"transparent"}}},fue=Ke("QRCode",e=>due(ke(e,{QRCodeTextColor:"rgba(0, 0, 0, 0.88)",QRCodeMaskBackgroundColor:"rgba(255, 255, 255, 0.96)"})));var pue={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z"}}]},name:"api",theme:"outlined"};function v3(e){for(var t=1;t({size:{type:Number,default:160},value:{type:String,required:!0},type:Ne("canvas"),color:String,bgColor:String,includeMargin:Boolean,imageSettings:De()}),Rue=()=>m(m({},D1()),{errorLevel:Ne("M"),icon:String,iconSize:{type:Number,default:40},status:Ne("active"),bordered:{type:Boolean,default:!0}});var Eo;(function(e){class t{static encodeText(a,s){const c=e.QrSegment.makeSegments(a);return t.encodeSegments(c,s)}static encodeBinary(a,s){const c=e.QrSegment.makeBytes(a);return t.encodeSegments([c],s)}static encodeSegments(a,s){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,p=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(!(t.MIN_VERSION<=c&&c<=u&&u<=t.MAX_VERSION)||d<-1||d>7)throw new RangeError("Invalid value");let g,v;for(g=c;;g++){const S=t.getNumDataCodewords(g,s)*8,$=i.getTotalBits(a,g);if($<=S){v=$;break}if(g>=u)throw new RangeError("Data too long")}for(const S of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])p&&v<=t.getNumDataCodewords(g,S)*8&&(s=S);const h=[];for(const S of a){n(S.mode.modeBits,4,h),n(S.numChars,S.mode.numCharCountBits(g),h);for(const $ of S.getData())h.push($)}r(h.length==v);const b=t.getNumDataCodewords(g,s)*8;r(h.length<=b),n(0,Math.min(4,b-h.length),h),n(0,(8-h.length%8)%8,h),r(h.length%8==0);for(let S=236;h.lengthy[$>>>3]|=S<<7-($&7)),new t(g,s,y,d)}constructor(a,s,c,u){if(this.version=a,this.errorCorrectionLevel=s,this.modules=[],this.isFunction=[],at.MAX_VERSION)throw new RangeError("Version value out of range");if(u<-1||u>7)throw new RangeError("Mask value out of range");this.size=a*4+17;const d=[];for(let g=0;g>>9)*1335;const u=(s<<10|c)^21522;r(u>>>15==0);for(let d=0;d<=5;d++)this.setFunctionModule(8,d,o(u,d));this.setFunctionModule(8,7,o(u,6)),this.setFunctionModule(8,8,o(u,7)),this.setFunctionModule(7,8,o(u,8));for(let d=9;d<15;d++)this.setFunctionModule(14-d,8,o(u,d));for(let d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,o(u,d));for(let d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,o(u,d));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let a=this.version;for(let c=0;c<12;c++)a=a<<1^(a>>>11)*7973;const s=this.version<<12|a;r(s>>>18==0);for(let c=0;c<18;c++){const u=o(s,c),d=this.size-11+c%3,p=Math.floor(c/3);this.setFunctionModule(d,p,u),this.setFunctionModule(p,d,u)}}drawFinderPattern(a,s){for(let c=-4;c<=4;c++)for(let u=-4;u<=4;u++){const d=Math.max(Math.abs(u),Math.abs(c)),p=a+u,g=s+c;0<=p&&p{(S!=v-d||x>=g)&&y.push($[S])});return r(y.length==p),y}drawCodewords(a){if(a.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let s=0;for(let c=this.size-1;c>=1;c-=2){c==6&&(c=5);for(let u=0;u>>3],7-(s&7)),s++)}}r(s==a.length*8)}applyMask(a){if(a<0||a>7)throw new RangeError("Mask value out of range");for(let s=0;s5&&a++):(this.finderPenaltyAddHistory(g,v),p||(a+=this.finderPenaltyCountPatterns(v)*t.PENALTY_N3),p=this.modules[d][h],g=1);a+=this.finderPenaltyTerminateAndCount(p,g,v)*t.PENALTY_N3}for(let d=0;d5&&a++):(this.finderPenaltyAddHistory(g,v),p||(a+=this.finderPenaltyCountPatterns(v)*t.PENALTY_N3),p=this.modules[h][d],g=1);a+=this.finderPenaltyTerminateAndCount(p,g,v)*t.PENALTY_N3}for(let d=0;dp+(g?1:0),s);const c=this.size*this.size,u=Math.ceil(Math.abs(s*20-c*10)/c)-1;return r(0<=u&&u<=9),a+=u*t.PENALTY_N4,r(0<=a&&a<=2568888),a}getAlignmentPatternPositions(){if(this.version==1)return[];{const a=Math.floor(this.version/7)+2,s=this.version==32?26:Math.ceil((this.version*4+4)/(a*2-2))*2,c=[6];for(let u=this.size-7;c.lengtht.MAX_VERSION)throw new RangeError("Version number out of range");let s=(16*a+128)*a+64;if(a>=2){const c=Math.floor(a/7)+2;s-=(25*c-10)*c-55,a>=7&&(s-=36)}return r(208<=s&&s<=29648),s}static getNumDataCodewords(a,s){return Math.floor(t.getNumRawDataModules(a)/8)-t.ECC_CODEWORDS_PER_BLOCK[s.ordinal][a]*t.NUM_ERROR_CORRECTION_BLOCKS[s.ordinal][a]}static reedSolomonComputeDivisor(a){if(a<1||a>255)throw new RangeError("Degree out of range");const s=[];for(let u=0;u0);for(const u of a){const d=u^c.shift();c.push(0),s.forEach((p,g)=>c[g]^=t.reedSolomonMultiply(p,d))}return c}static reedSolomonMultiply(a,s){if(a>>>8||s>>>8)throw new RangeError("Byte out of range");let c=0;for(let u=7;u>=0;u--)c=c<<1^(c>>>7)*285,c^=(s>>>u&1)*a;return r(c>>>8==0),c}finderPenaltyCountPatterns(a){const s=a[1];r(s<=this.size*3);const c=s>0&&a[2]==s&&a[3]==s*3&&a[4]==s&&a[5]==s;return(c&&a[0]>=s*4&&a[6]>=s?1:0)+(c&&a[6]>=s*4&&a[0]>=s?1:0)}finderPenaltyTerminateAndCount(a,s,c){return a&&(this.finderPenaltyAddHistory(s,c),s=0),s+=this.size,this.finderPenaltyAddHistory(s,c),this.finderPenaltyCountPatterns(c)}finderPenaltyAddHistory(a,s){s[0]==0&&(a+=this.size),s.pop(),s.unshift(a)}}t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(l,a,s){if(a<0||a>31||l>>>a)throw new RangeError("Value out of range");for(let c=a-1;c>=0;c--)s.push(l>>>c&1)}function o(l,a){return(l>>>a&1)!=0}function r(l){if(!l)throw new Error("Assertion error")}class i{static makeBytes(a){const s=[];for(const c of a)n(c,8,s);return new i(i.Mode.BYTE,a.length,s)}static makeNumeric(a){if(!i.isNumeric(a))throw new RangeError("String contains non-numeric characters");const s=[];for(let c=0;c=1<1&&arguments[1]!==void 0?arguments[1]:0;const n=[];return e.forEach(function(o,r){let i=null;o.forEach(function(l,a){if(!l&&i!==null){n.push(`M${i+t} ${r+t}h${a-i}v1H${i+t}z`),i=null;return}if(a===o.length-1){if(!l)return;i===null?n.push(`M${a+t},${r+t} h1v1H${a+t}z`):n.push(`M${i+t},${r+t} h${a+1-i}v1H${i+t}z`);return}l&&i===null&&(i=a)})}),n.join("")}function SE(e,t){return e.slice().map((n,o)=>o=t.y+t.h?n:n.map((r,i)=>i=t.x+t.w?r:!1))}function $E(e,t,n,o){if(o==null)return null;const r=e.length+n*2,i=Math.floor(t*Bue),l=r/t,a=(o.width||i)*l,s=(o.height||i)*l,c=o.x==null?e.length/2-a/2:o.x*l,u=o.y==null?e.length/2-s/2:o.y*l;let d=null;if(o.excavate){const p=Math.floor(c),g=Math.floor(u),v=Math.ceil(a+c-p),h=Math.ceil(s+u-g);d={x:p,y:g,w:v,h}}return{x:c,y:u,h:s,w:a,excavation:d}}function CE(e,t){return t!=null?Math.floor(t):e?Due:Nue}const kue=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),Fue=ie({name:"QRCodeCanvas",inheritAttrs:!1,props:m(m({},D1()),{level:String,bgColor:String,fgColor:String,marginSize:Number}),setup(e,t){let{attrs:n,expose:o}=t;const r=I(()=>{var s;return(s=e.imageSettings)===null||s===void 0?void 0:s.src}),i=oe(null),l=oe(null),a=oe(!1);return o({toDataURL:(s,c)=>{var u;return(u=i.value)===null||u===void 0?void 0:u.toDataURL(s,c)}}),Le(()=>{const{value:s,size:c=qm,level:u=hE,bgColor:d=vE,fgColor:p=mE,includeMargin:g=bE,marginSize:v,imageSettings:h}=e;if(i.value!=null){const b=i.value,y=b.getContext("2d");if(!y)return;let S=Eo.QrCode.encodeText(s,gE[u]).getModules();const $=CE(g,v),x=S.length+$*2,C=$E(S,c,$,h),O=l.value,w=a.value&&C!=null&&O!==null&&O.complete&&O.naturalHeight!==0&&O.naturalWidth!==0;w&&C.excavation!=null&&(S=SE(S,C.excavation));const T=window.devicePixelRatio||1;b.height=b.width=c*T;const E=c/x*T;y.scale(E,E),y.fillStyle=d,y.fillRect(0,0,x,x),y.fillStyle=p,kue?y.fill(new Path2D(yE(S,$))):S.forEach(function(_,M){_.forEach(function(A,R){A&&y.fillRect(R+$,M+$,1,1)})}),w&&y.drawImage(O,C.x+$,C.y+$,C.w,C.h)}},{flush:"post"}),ye(r,()=>{a.value=!1}),()=>{var s;const c=(s=e.size)!==null&&s!==void 0?s:qm,u={height:`${c}px`,width:`${c}px`};let d=null;return r.value!=null&&(d=f("img",{src:r.value,key:r.value,style:{display:"none"},onLoad:()=>{a.value=!0},ref:l},null)),f(He,null,[f("canvas",B(B({},n),{},{style:[u,n.style],ref:i}),null),d])}}}),Lue=ie({name:"QRCodeSVG",inheritAttrs:!1,props:m(m({},D1()),{color:String,level:String,bgColor:String,fgColor:String,marginSize:Number,title:String}),setup(e){let t=null,n=null,o=null,r=null,i=null,l=null;return Le(()=>{const{value:a,size:s=qm,level:c=hE,includeMargin:u=bE,marginSize:d,imageSettings:p}=e;t=Eo.QrCode.encodeText(a,gE[c]).getModules(),n=CE(u,d),o=t.length+n*2,r=$E(t,s,n,p),p!=null&&r!=null&&(r.excavation!=null&&(t=SE(t,r.excavation)),l=f("image",{"xlink:href":p.src,height:r.h,width:r.w,x:r.x+n,y:r.y+n,preserveAspectRatio:"none"},null)),i=yE(t,n)}),()=>{const a=e.bgColor&&vE,s=e.fgColor&&mE;return f("svg",{height:e.size,width:e.size,viewBox:`0 0 ${o} ${o}`},[!!e.title&&f("title",null,[e.title]),f("path",{fill:a,d:`M0,0 h${o}v${o}H0z`,"shape-rendering":"crispEdges"},null),f("path",{fill:s,d:i,"shape-rendering":"crispEdges"},null),l])}}}),zue=ie({name:"AQrcode",inheritAttrs:!1,props:Rue(),emits:["refresh"],setup(e,t){let{emit:n,attrs:o,expose:r}=t;const[i]=ko("QRCode"),{prefixCls:l}=Te("qrcode",e),[a,s]=fue(l),[,c]=Zr(),u=re();r({toDataURL:(p,g)=>{var v;return(v=u.value)===null||v===void 0?void 0:v.toDataURL(p,g)}});const d=I(()=>{const{value:p,icon:g="",size:v=160,iconSize:h=40,color:b=c.value.colorText,bgColor:y="transparent",errorLevel:S="M"}=e,$={src:g,x:void 0,y:void 0,height:h,width:h,excavate:!0};return{value:p,size:v-(c.value.paddingSM+c.value.lineWidth)*2,level:S,bgColor:y,fgColor:b,imageSettings:g?$:void 0}});return()=>{const p=l.value;return a(f("div",B(B({},o),{},{style:[o.style,{width:`${e.size}px`,height:`${e.size}px`,backgroundColor:d.value.bgColor}],class:[s.value,p,{[`${p}-borderless`]:!e.bordered}]}),[e.status!=="active"&&f("div",{class:`${p}-mask`},[e.status==="loading"&&f(mr,null,null),e.status==="expired"&&f(He,null,[f("p",{class:`${p}-expired`},[i.value.expired]),f(jt,{type:"link",onClick:g=>n("refresh",g)},{default:()=>[i.value.refresh],icon:()=>f(_1,null,null)})]),e.status==="scanned"&&f("p",{class:`${p}-scanned`},[i.value.scanned])]),e.type==="canvas"?f(Fue,B({ref:u},d.value),null):f(Lue,d.value,null)]))}}}),Hue=Et(zue);function jue(e){const t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,{top:o,right:r,bottom:i,left:l}=e.getBoundingClientRect();return o>=0&&l>=0&&r<=t&&i<=n}function Vue(e,t,n,o){const[r,i]=bt(void 0);Le(()=>{const u=typeof e.value=="function"?e.value():e.value;i(u||null)},{flush:"post"});const[l,a]=bt(null),s=()=>{if(!t.value){a(null);return}if(r.value){!jue(r.value)&&t.value&&r.value.scrollIntoView(o.value);const{left:u,top:d,width:p,height:g}=r.value.getBoundingClientRect(),v={left:u,top:d,width:p,height:g,radius:0};JSON.stringify(l.value)!==JSON.stringify(v)&&a(v)}else a(null)};return We(()=>{ye([t,r],()=>{s()},{flush:"post",immediate:!0}),window.addEventListener("resize",s)}),Qe(()=>{window.removeEventListener("resize",s)}),[I(()=>{var u,d;if(!l.value)return l.value;const p=((u=n.value)===null||u===void 0?void 0:u.offset)||6,g=((d=n.value)===null||d===void 0?void 0:d.radius)||2;return{left:l.value.left-p,top:l.value.top-p,width:l.value.width+p*2,height:l.value.height+p*2,radius:g}}),r]}const Wue=()=>({arrow:Fe([Boolean,Object]),target:Fe([String,Function,Object]),title:Fe([String,Object]),description:Fe([String,Object]),placement:Ne(),mask:Fe([Object,Boolean],!0),className:{type:String},style:De(),scrollIntoViewOptions:Fe([Boolean,Object])}),N1=()=>m(m({},Wue()),{prefixCls:{type:String},total:{type:Number},current:{type:Number},onClose:ve(),onFinish:ve(),renderPanel:ve(),onPrev:ve(),onNext:ve()}),Kue=ie({name:"DefaultPanel",inheritAttrs:!1,props:N1(),setup(e,t){let{attrs:n}=t;return()=>{const{prefixCls:o,current:r,total:i,title:l,description:a,onClose:s,onPrev:c,onNext:u,onFinish:d}=e;return f("div",B(B({},n),{},{class:ae(`${o}-content`,n.class)}),[f("div",{class:`${o}-inner`},[f("button",{type:"button",onClick:s,"aria-label":"Close",class:`${o}-close`},[f("span",{class:`${o}-close-x`},[vt("×")])]),f("div",{class:`${o}-header`},[f("div",{class:`${o}-title`},[l])]),f("div",{class:`${o}-description`},[a]),f("div",{class:`${o}-footer`},[f("div",{class:`${o}-sliders`},[i>1?[...Array.from({length:i}).keys()].map((p,g)=>f("span",{key:p,class:g===r?"active":""},null)):null]),f("div",{class:`${o}-buttons`},[r!==0?f("button",{class:`${o}-prev-btn`,onClick:c},[vt("Prev")]):null,r===i-1?f("button",{class:`${o}-finish-btn`,onClick:d},[vt("Finish")]):f("button",{class:`${o}-next-btn`,onClick:u},[vt("Next")])])])])])}}}),Gue=ie({name:"TourStep",inheritAttrs:!1,props:N1(),setup(e,t){let{attrs:n}=t;return()=>{const{current:o,renderPanel:r}=e;return f(He,null,[typeof r=="function"?r(m(m({},n),e),o):f(Kue,B(B({},n),e),null)])}}});let P3=0;const Xue=Rn();function Uue(){let e;return Xue?(e=P3,P3+=1):e="TEST_OR_SSR",e}function Yue(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:re("");const t=`vc_unique_${Uue()}`;return e.value||t}const zu={fill:"transparent","pointer-events":"auto"},que=ie({name:"TourMask",props:{prefixCls:{type:String},pos:De(),rootClassName:{type:String},showMask:$e(),fill:{type:String,default:"rgba(0,0,0,0.5)"},open:$e(),animated:Fe([Boolean,Object]),zIndex:{type:Number}},setup(e,t){let{attrs:n}=t;const o=Yue();return()=>{const{prefixCls:r,open:i,rootClassName:l,pos:a,showMask:s,fill:c,animated:u,zIndex:d}=e,p=`${r}-mask-${o}`,g=typeof u=="object"?u?.placeholder:u;return f(Dc,{visible:i,autoLock:!0},{default:()=>i&&f("div",B(B({},n),{},{class:ae(`${r}-mask`,l,n.class),style:[{position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:d,pointerEvents:"none"},n.style]}),[s?f("svg",{style:{width:"100%",height:"100%"}},[f("defs",null,[f("mask",{id:p},[f("rect",{x:"0",y:"0",width:"100vw",height:"100vh",fill:"white"},null),a&&f("rect",{x:a.left,y:a.top,rx:a.radius,width:a.width,height:a.height,fill:"black",class:g?`${r}-placeholder-animated`:""},null)])]),f("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:c,mask:`url(#${p})`},null),a&&f(He,null,[f("rect",B(B({},zu),{},{x:"0",y:"0",width:"100%",height:a.top}),null),f("rect",B(B({},zu),{},{x:"0",y:"0",width:a.left,height:"100%"}),null),f("rect",B(B({},zu),{},{x:"0",y:a.top+a.height,width:"100%",height:`calc(100vh - ${a.top+a.height}px)`}),null),f("rect",B(B({},zu),{},{x:a.left+a.width,y:"0",width:`calc(100vw - ${a.left+a.width}px)`,height:"100%"}),null)])]):null])})}}}),Zue=[0,0],I3={left:{points:["cr","cl"],offset:[-8,0]},right:{points:["cl","cr"],offset:[8,0]},top:{points:["bc","tc"],offset:[0,-8]},bottom:{points:["tc","bc"],offset:[0,8]},topLeft:{points:["bl","tl"],offset:[0,-8]},leftTop:{points:["tr","tl"],offset:[-8,0]},topRight:{points:["br","tr"],offset:[0,-8]},rightTop:{points:["tl","tr"],offset:[8,0]},bottomRight:{points:["tr","br"],offset:[0,8]},rightBottom:{points:["bl","br"],offset:[8,0]},bottomLeft:{points:["tl","bl"],offset:[0,8]},leftBottom:{points:["br","bl"],offset:[-8,0]}};function xE(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const t={};return Object.keys(I3).forEach(n=>{t[n]=m(m({},I3[n]),{autoArrow:e,targetOffset:Zue})}),t}xE();var Que=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{builtinPlacements:e,popupAlign:t}=DP();return{builtinPlacements:e,popupAlign:t,steps:at(),open:$e(),defaultCurrent:{type:Number},current:{type:Number},onChange:ve(),onClose:ve(),onFinish:ve(),mask:Fe([Boolean,Object],!0),arrow:Fe([Boolean,Object],!0),rootClassName:{type:String},placement:Ne("bottom"),prefixCls:{type:String,default:"rc-tour"},renderPanel:ve(),gap:De(),animated:Fe([Boolean,Object]),scrollIntoViewOptions:Fe([Boolean,Object],!0),zIndex:{type:Number,default:1001}}},Jue=ie({name:"Tour",inheritAttrs:!1,props:Ze(wE(),{}),setup(e){const{defaultCurrent:t,placement:n,mask:o,scrollIntoViewOptions:r,open:i,gap:l,arrow:a}=Ko(e),s=re(),[c,u]=Tt(0,{value:I(()=>e.current),defaultValue:t.value}),[d,p]=Tt(void 0,{value:I(()=>e.open),postState:w=>c.value<0||c.value>=e.steps.length?!1:w??!0}),g=oe(d.value);Le(()=>{d.value&&!g.value&&u(0),g.value=d.value});const v=I(()=>e.steps[c.value]||{}),h=I(()=>{var w;return(w=v.value.placement)!==null&&w!==void 0?w:n.value}),b=I(()=>{var w;return d.value&&((w=v.value.mask)!==null&&w!==void 0?w:o.value)}),y=I(()=>{var w;return(w=v.value.scrollIntoViewOptions)!==null&&w!==void 0?w:r.value}),[S,$]=Vue(I(()=>v.value.target),i,l,y),x=I(()=>$.value?typeof v.value.arrow>"u"?a.value:v.value.arrow:!1),C=I(()=>typeof x.value=="object"?x.value.pointAtCenter:!1);ye(C,()=>{var w;(w=s.value)===null||w===void 0||w.forcePopupAlign()}),ye(c,()=>{var w;(w=s.value)===null||w===void 0||w.forcePopupAlign()});const O=w=>{var T;u(w),(T=e.onChange)===null||T===void 0||T.call(e,w)};return()=>{var w;const{prefixCls:T,steps:E,onClose:_,onFinish:M,rootClassName:A,renderPanel:R,animated:L,zIndex:P}=e,D=Que(e,["prefixCls","steps","onClose","onFinish","rootClassName","renderPanel","animated","zIndex"]);if($.value===void 0)return null;const N=()=>{p(!1),_?.(c.value)},k=typeof b.value=="boolean"?b.value:!!b.value,F=typeof b.value=="boolean"?void 0:b.value,z=()=>$.value||document.body,H=()=>f(Gue,B({arrow:x.value,key:"content",prefixCls:T,total:E.length,renderPanel:R,onPrev:()=>{O(c.value-1)},onNext:()=>{O(c.value+1)},onClose:N,current:c.value,onFinish:()=>{N(),M?.()}},v.value),null),j=I(()=>{const Y=S.value||lv,Q={};return Object.keys(Y).forEach(U=>{typeof Y[U]=="number"?Q[U]=`${Y[U]}px`:Q[U]=Y[U]}),Q});return d.value?f(He,null,[f(que,{zIndex:P,prefixCls:T,pos:S.value,showMask:k,style:F?.style,fill:F?.color,open:d.value,animated:L,rootClassName:A},null),f(Ll,B(B({},D),{},{arrow:!!D.arrow,builtinPlacements:v.value.target?(w=D.builtinPlacements)!==null&&w!==void 0?w:xE(C.value):void 0,ref:s,popupStyle:v.value.target?v.value.style:m(m({},v.value.style),{position:"fixed",left:lv.left,top:lv.top,transform:"translate(-50%, -50%)"}),popupPlacement:h.value,popupVisible:d.value,popupClassName:ae(A,v.value.className),prefixCls:T,popup:H,forceRender:!1,destroyPopupOnHide:!0,zIndex:P,mask:!1,getTriggerDOMNode:z}),{default:()=>[f(Dc,{visible:d.value,autoLock:!0},{default:()=>[f("div",{class:ae(A,`${T}-target-placeholder`),style:m(m({},j.value),{position:"fixed",pointerEvents:"none"})},null)]})]})]):null}}}),ede=()=>m(m({},wE()),{steps:{type:Array},prefixCls:{type:String},current:{type:Number},type:{type:String},"onUpdate:current":Function}),tde=()=>m(m({},N1()),{cover:{type:Object},nextButtonProps:{type:Object},prevButtonProps:{type:Object},current:{type:Number},type:{type:String}}),nde=ie({name:"ATourPanel",inheritAttrs:!1,props:tde(),setup(e,t){let{attrs:n,slots:o}=t;const{current:r,total:i}=Ko(e),l=I(()=>r.value===i.value-1),a=c=>{var u;const d=e.prevButtonProps;(u=e.onPrev)===null||u===void 0||u.call(e,c),typeof d?.onClick=="function"&&d?.onClick()},s=c=>{var u,d;const p=e.nextButtonProps;l.value?(u=e.onFinish)===null||u===void 0||u.call(e,c):(d=e.onNext)===null||d===void 0||d.call(e,c),typeof p?.onClick=="function"&&p?.onClick()};return()=>{const{prefixCls:c,title:u,onClose:d,cover:p,description:g,type:v,arrow:h}=e,b=e.prevButtonProps,y=e.nextButtonProps;let S;u&&(S=f("div",{class:`${c}-header`},[f("div",{class:`${c}-title`},[u])]));let $;g&&($=f("div",{class:`${c}-description`},[g]));let x;p&&(x=f("div",{class:`${c}-cover`},[p]));let C;o.indicatorsRender?C=o.indicatorsRender({current:r.value,total:i}):C=[...Array.from({length:i.value}).keys()].map((T,E)=>f("span",{key:T,class:ae(E===r.value&&`${c}-indicator-active`,`${c}-indicator`)},null));const O=v==="primary"?"default":"primary",w={type:"default",ghost:v==="primary"};return f(Rl,{componentName:"Tour",defaultLocale:Un.Tour},{default:T=>{var E;return f("div",B(B({},n),{},{class:ae(v==="primary"?`${c}-primary`:"",n.class,`${c}-content`)}),[h&&f("div",{class:`${c}-arrow`,key:"arrow"},null),f("div",{class:`${c}-inner`},[f(kn,{class:`${c}-close`,onClick:d},null),x,S,$,f("div",{class:`${c}-footer`},[i.value>1&&f("div",{class:`${c}-indicators`},[C]),f("div",{class:`${c}-buttons`},[r.value!==0?f(jt,B(B(B({},w),b),{},{onClick:a,size:"small",class:ae(`${c}-prev-btn`,b?.className)}),{default:()=>[Ov(b?.children)?b.children():(E=b?.children)!==null&&E!==void 0?E:T.Previous]}):null,f(jt,B(B({type:O},y),{},{onClick:s,size:"small",class:ae(`${c}-next-btn`,y?.className)}),{default:()=>[Ov(y?.children)?y?.children():l.value?T.Finish:T.Next]})])])])])}})}}}),ode=e=>{let{defaultType:t,steps:n,current:o,defaultCurrent:r}=e;const i=re(r?.value),l=I(()=>o?.value);ye(l,u=>{i.value=u??r?.value},{immediate:!0});const a=u=>{i.value=u},s=I(()=>{var u,d;return typeof i.value=="number"?n&&((d=(u=n.value)===null||u===void 0?void 0:u[i.value])===null||d===void 0?void 0:d.type):t?.value});return{currentMergedType:I(()=>{var u;return(u=s.value)!==null&&u!==void 0?u:t?.value}),updateInnerCurrent:a}},rde=e=>{const{componentCls:t,lineHeight:n,padding:o,paddingXS:r,borderRadius:i,borderRadiusXS:l,colorPrimary:a,colorText:s,colorFill:c,indicatorHeight:u,indicatorWidth:d,boxShadowTertiary:p,tourZIndexPopup:g,fontSize:v,colorBgContainer:h,fontWeightStrong:b,marginXS:y,colorTextLightSolid:S,tourBorderRadius:$,colorWhite:x,colorBgTextHover:C,tourCloseSize:O,motionDurationSlow:w,antCls:T}=e;return[{[t]:m(m({},Ue(e)),{color:s,position:"absolute",zIndex:g,display:"block",visibility:"visible",fontSize:v,lineHeight:n,width:520,"--antd-arrow-background-color":h,"&-pure":{maxWidth:"100%",position:"relative"},[`&${t}-hidden`]:{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{textAlign:"start",textDecoration:"none",borderRadius:$,boxShadow:p,position:"relative",backgroundColor:h,border:"none",backgroundClip:"padding-box",[`${t}-close`]:{position:"absolute",top:o,insetInlineEnd:o,color:e.colorIcon,outline:"none",width:O,height:O,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:e.colorIconHover,backgroundColor:e.wireframe?"transparent":e.colorFillContent}},[`${t}-cover`]:{textAlign:"center",padding:`${o+O+r}px ${o}px 0`,img:{width:"100%"}},[`${t}-header`]:{padding:`${o}px ${o}px ${r}px`,[`${t}-title`]:{lineHeight:n,fontSize:v,fontWeight:b}},[`${t}-description`]:{padding:`0 ${o}px`,lineHeight:n,wordWrap:"break-word"},[`${t}-footer`]:{padding:`${r}px ${o}px ${o}px`,textAlign:"end",borderRadius:`0 0 ${l}px ${l}px`,display:"flex",[`${t}-indicators`]:{display:"inline-block",[`${t}-indicator`]:{width:d,height:u,display:"inline-block",borderRadius:"50%",background:c,"&:not(:last-child)":{marginInlineEnd:u},"&-active":{background:a}}},[`${t}-buttons`]:{marginInlineStart:"auto",[`${T}-btn`]:{marginInlineStart:y}}}},[`${t}-primary, &${t}-primary`]:{"--antd-arrow-background-color":a,[`${t}-inner`]:{color:S,textAlign:"start",textDecoration:"none",backgroundColor:a,borderRadius:i,boxShadow:p,[`${t}-close`]:{color:S},[`${t}-indicators`]:{[`${t}-indicator`]:{background:new ht(S).setAlpha(.15).toRgbString(),"&-active":{background:S}}},[`${t}-prev-btn`]:{color:S,borderColor:new ht(S).setAlpha(.15).toRgbString(),backgroundColor:a,"&:hover":{backgroundColor:new ht(S).setAlpha(.15).toRgbString(),borderColor:"transparent"}},[`${t}-next-btn`]:{color:a,borderColor:"transparent",background:x,"&:hover":{background:new ht(C).onBackground(x).toRgbString()}}}}}),[`${t}-mask`]:{[`${t}-placeholder-animated`]:{transition:`all ${w}`}},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${t}-inner`]:{borderRadius:Math.min($,_b)}}},Ab(e,{colorBg:"var(--antd-arrow-background-color)",contentRadius:$,limitVerticalRadius:!0})]},ide=Ke("Tour",e=>{const{borderRadiusLG:t,fontSize:n,lineHeight:o}=e,r=ke(e,{tourZIndexPopup:e.zIndexPopupBase+70,indicatorWidth:6,indicatorHeight:6,tourBorderRadius:t,tourCloseSize:n*o});return[rde(r)]});var lde=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{steps:h,current:b,type:y,rootClassName:S}=e,$=lde(e,["steps","current","type","rootClassName"]),x=ae({[`${c.value}-primary`]:g.value==="primary",[`${c.value}-rtl`]:u.value==="rtl"},p.value,S),C=(T,E)=>f(nde,B(B({},T),{},{type:y,current:E}),{indicatorsRender:r.indicatorsRender}),O=T=>{v(T),o("update:current",T),o("change",T)},w=I(()=>Mb({arrowPointAtCenter:!0,autoAdjustOverflow:!0}));return d(f(Jue,B(B(B({},n),$),{},{rootClassName:x,prefixCls:c.value,current:b,defaultCurrent:e.defaultCurrent,animated:!0,renderPanel:C,onChange:O,steps:h,builtinPlacements:w.value}),null))}}}),sde=Et(ade),OE=Symbol("appConfigContext"),cde=e=>Xe(OE,e),ude=()=>je(OE,{}),PE=Symbol("appContext"),dde=e=>Xe(PE,e),fde=ut({message:{},notification:{},modal:{}}),pde=()=>je(PE,fde),gde=e=>{const{componentCls:t,colorText:n,fontSize:o,lineHeight:r,fontFamily:i}=e;return{[t]:{color:n,fontSize:o,lineHeight:r,fontFamily:i}}},hde=Ke("App",e=>[gde(e)]),vde=()=>({rootClassName:String,message:De(),notification:De()}),mde=()=>pde(),Qs=ie({name:"AApp",props:Ze(vde(),{}),setup(e,t){let{slots:n}=t;const{prefixCls:o}=Te("app",e),[r,i]=hde(o),l=I(()=>ae(i.value,o.value,e.rootClassName)),a=ude(),s=I(()=>({message:m(m({},a.message),e.message),notification:m(m({},a.notification),e.notification)}));cde(s.value);const[c,u]=QI(s.value.message),[d,p]=u5(s.value.notification),[g,v]=pT(),h=I(()=>({message:c,notification:d,modal:g}));return dde(h.value),()=>{var b;return r(f("div",{class:l.value},[v(),u(),p(),(b=n.default)===null||b===void 0?void 0:b.call(n)]))}}});Qs.useApp=mde;Qs.install=function(e){e.component(Qs.name,Qs)};const IE=["wrap","nowrap","wrap-reverse"],TE=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],EE=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],bde=(e,t)=>{const n={};return IE.forEach(o=>{n[`${e}-wrap-${o}`]=t.wrap===o}),n},yde=(e,t)=>{const n={};return EE.forEach(o=>{n[`${e}-align-${o}`]=t.align===o}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},Sde=(e,t)=>{const n={};return TE.forEach(o=>{n[`${e}-justify-${o}`]=t.justify===o}),n};function $de(e,t){return ae(m(m(m({},bde(e,t)),yde(e,t)),Sde(e,t)))}const Cde=e=>{const{componentCls:t}=e;return{[t]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},xde=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},wde=e=>{const{componentCls:t}=e,n={};return IE.forEach(o=>{n[`${t}-wrap-${o}`]={flexWrap:o}}),n},Ode=e=>{const{componentCls:t}=e,n={};return EE.forEach(o=>{n[`${t}-align-${o}`]={alignItems:o}}),n},Pde=e=>{const{componentCls:t}=e,n={};return TE.forEach(o=>{n[`${t}-justify-${o}`]={justifyContent:o}}),n},Ide=Ke("Flex",e=>{const t=ke(e,{flexGapSM:e.paddingXS,flexGap:e.padding,flexGapLG:e.paddingLG});return[Cde(t),xde(t),wde(t),Ode(t),Pde(t)]});function T3(e){return["small","middle","large"].includes(e)}const Tde=()=>({prefixCls:Ne(),vertical:$e(),wrap:Ne(),justify:Ne(),align:Ne(),flex:Fe([Number,String]),gap:Fe([Number,String]),component:Ct()});var Ede=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var u;return[l.value,s.value,$de(l.value,e),{[`${l.value}-rtl`]:i.value==="rtl",[`${l.value}-gap-${e.gap}`]:T3(e.gap),[`${l.value}-vertical`]:(u=e.vertical)!==null&&u!==void 0?u:r?.value.vertical}]});return()=>{var u;const{flex:d,gap:p,component:g="div"}=e,v=Ede(e,["flex","gap","component"]),h={};return d&&(h.flex=d),p&&!T3(p)&&(h.gap=`${p}px`),a(f(g,B({class:[o.class,c.value],style:[o.style,h]},nt(v,["justify","wrap","align","vertical"])),{default:()=>[(u=n.default)===null||u===void 0?void 0:u.call(n)]}))}}}),_de=Et(Mde),E3=Object.freeze(Object.defineProperty({__proto__:null,Affix:yP,Alert:UV,Anchor:ol,AnchorLink:k0,App:Qs,AutoComplete:xV,AutoCompleteOptGroup:CV,AutoCompleteOption:$V,Avatar:ml,AvatarGroup:pf,BackTop:kf,Badge:Vs,BadgeRibbon:gf,Breadcrumb:bl,BreadcrumbItem:Sc,BreadcrumbSeparator:xf,Button:jt,ButtonGroup:yf,Calendar:HX,Card:wa,CardGrid:Tf,CardMeta:If,Carousel:IY,Cascader:jZ,CheckableTag:Rf,Checkbox:_o,CheckboxGroup:_f,Col:UZ,Collapse:Ks,CollapsePanel:Ef,Comment:JZ,Compact:df,ConfigProvider:Sl,DatePicker:vJ,Descriptions:la,DescriptionsItem:O5,DirectoryTree:Ed,Divider:EJ,Drawer:WJ,Dropdown:Xo,DropdownButton:yc,Empty:bi,Flex:_de,FloatButton:Ti,FloatButtonGroup:Bf,Form:yi,FormItem:WI,FormItemRest:sf,Grid:XZ,Image:il,ImagePreviewGroup:U5,Input:ln,InputGroup:N5,InputNumber:$te,InputPassword:F5,InputSearch:B5,Layout:Dte,LayoutContent:Rte,LayoutFooter:_te,LayoutHeader:Mte,LayoutSider:Ate,List:di,ListItem:J5,ListItemMeta:Z5,LocaleProvider:UI,Mentions:Hne,MentionsOption:Od,Menu:Gt,MenuDivider:Cc,MenuItem:vr,MenuItemGroup:$c,Modal:Dt,MonthPicker:vd,PageHeader:moe,Pagination:gg,Popconfirm:xoe,Popover:Rb,Progress:Jy,QRCode:Hue,QuarterPicker:md,Radio:jn,RadioButton:Of,RadioGroup:sy,RangePicker:bd,Rate:ure,Result:Cl,Row:Pre,Segmented:uue,Select:mn,SelectOptGroup:bV,SelectOption:mV,Skeleton:In,SkeletonAvatar:by,SkeletonButton:hy,SkeletonImage:my,SkeletonInput:vy,SkeletonTitle:Yp,Slider:Vre,Space:Ta,Spin:mr,Statistic:Br,StatisticCountdown:ooe,Step:Pd,Steps:aie,SubMenu:El,Switch:mie,TabPane:Pf,Table:Eae,TableColumn:_d,TableColumnGroup:Ad,TableSummary:Rd,TableSummaryCell:Kf,TableSummaryRow:Wf,Tabs:yl,Tag:Ia,Textarea:ky,TimePicker:wse,TimeRangePicker:Dd,Timeline:Zs,TimelineItem:Tc,Tooltip:to,Tour:sde,Transfer:Qae,Tree:ZT,TreeNode:Md,TreeSelect:Cse,TreeSelectNode:Ym,Typography:eo,TypographyLink:is,TypographyParagraph:ls,TypographyText:as,TypographyTitle:ss,Upload:Uce,UploadDragger:Xce,Watermark:nue,WeekPicker:hd,message:Gn,notification:_i},Symbol.toStringTag,{value:"Module"})),Ade=function(e){return Object.keys(E3).forEach(t=>{const n=E3[t];n.install&&e.use(n)}),e.use(v9.StyleProvider),e.config.globalProperties.$message=Gn,e.config.globalProperties.$notification=_i,e.config.globalProperties.$info=Dt.info,e.config.globalProperties.$success=Dt.success,e.config.globalProperties.$error=Dt.error,e.config.globalProperties.$warning=Dt.warning,e.config.globalProperties.$confirm=Dt.confirm,e.config.globalProperties.$destroyAll=Dt.destroyAll,e},Rde={version:aP,install:Ade};const aa=typeof document<"u";function ME(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Dde(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&ME(e.default)}const Pt=Object.assign;function av(e,t){const n={};for(const o in t){const r=t[o];n[o]=Jo(r)?r.map(e):e(r)}return n}const Js=()=>{},Jo=Array.isArray;function M3(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}const _E=/#/g,Nde=/&/g,Bde=/\//g,kde=/=/g,Fde=/\?/g,AE=/\+/g,Lde=/%5B/g,zde=/%5D/g,RE=/%5E/g,Hde=/%60/g,DE=/%7B/g,jde=/%7C/g,NE=/%7D/g,Vde=/%20/g;function B1(e){return e==null?"":encodeURI(""+e).replace(jde,"|").replace(Lde,"[").replace(zde,"]")}function Wde(e){return B1(e).replace(DE,"{").replace(NE,"}").replace(RE,"^")}function Zm(e){return B1(e).replace(AE,"%2B").replace(Vde,"+").replace(_E,"%23").replace(Nde,"%26").replace(Hde,"`").replace(DE,"{").replace(NE,"}").replace(RE,"^")}function Kde(e){return Zm(e).replace(kde,"%3D")}function Gde(e){return B1(e).replace(_E,"%23").replace(Fde,"%3F")}function Xde(e){return Gde(e).replace(Bde,"%2F")}function Ec(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Ude=/\/$/,Yde=e=>e.replace(Ude,"");function sv(e,t,n="/"){let o,r={},i="",l="";const a=t.indexOf("#");let s=t.indexOf("?");return s=a>=0&&s>a?-1:s,s>=0&&(o=t.slice(0,s),i=t.slice(s,a>0?a:t.length),r=e(i.slice(1))),a>=0&&(o=o||t.slice(0,a),l=t.slice(a,t.length)),o=Jde(o??t,n),{fullPath:o+i+l,path:o,query:r,hash:Ec(l)}}function qde(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function _3(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Zde(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&ja(t.matched[o],n.matched[r])&&BE(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function ja(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function BE(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Qde(e[n],t[n]))return!1;return!0}function Qde(e,t){return Jo(e)?A3(e,t):Jo(t)?A3(t,e):e?.valueOf()===t?.valueOf()}function A3(e,t){return Jo(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function Jde(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let i=n.length-1,l,a;for(l=0;l1&&i--;else break;return n.slice(0,i).join("/")+"/"+o.slice(l).join("/")}const si={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Qm=(function(e){return e.pop="pop",e.push="push",e})({}),cv=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function efe(e){if(!e)if(aa){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Yde(e)}const tfe=/^[^#]+#/;function nfe(e,t){return e.replace(tfe,"#")+t}function ofe(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const Cg=()=>({left:window.scrollX,top:window.scrollY});function rfe(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=ofe(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function R3(e,t){return(history.state?history.state.position-t:-1)+e}const Jm=new Map;function ife(e,t){Jm.set(e,t)}function lfe(e){const t=Jm.get(e);return Jm.delete(e),t}function afe(e){return typeof e=="string"||e&&typeof e=="object"}function kE(e){return typeof e=="string"||typeof e=="symbol"}let Kt=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const FE=Symbol("");Kt.MATCHER_NOT_FOUND+"",Kt.NAVIGATION_GUARD_REDIRECT+"",Kt.NAVIGATION_ABORTED+"",Kt.NAVIGATION_CANCELLED+"",Kt.NAVIGATION_DUPLICATED+"";function Va(e,t){return Pt(new Error,{type:e,[FE]:!0},t)}function Ir(e,t){return e instanceof Error&&FE in e&&(t==null||!!(e.type&t))}const sfe=["params","query","hash"];function cfe(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of sfe)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function ufe(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;or&&Zm(r)):[o&&Zm(o)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function dfe(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=Jo(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const ffe=Symbol(""),N3=Symbol(""),xg=Symbol(""),LE=Symbol(""),e0=Symbol("");function Ss(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function vi(e,t,n,o,r,i=l=>l()){const l=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((a,s)=>{const c=p=>{p===!1?s(Va(Kt.NAVIGATION_ABORTED,{from:n,to:t})):p instanceof Error?s(p):afe(p)?s(Va(Kt.NAVIGATION_GUARD_REDIRECT,{from:t,to:p})):(l&&o.enterCallbacks[r]===l&&typeof p=="function"&&l.push(p),a())},u=i(()=>e.call(o&&o.instances[r],t,n,c));let d=Promise.resolve(u);e.length<3&&(d=d.then(c)),d.catch(p=>s(p))})}function uv(e,t,n,o,r=i=>i()){const i=[];for(const l of e)for(const a in l.components){let s=l.components[a];if(!(t!=="beforeRouteEnter"&&!l.instances[a]))if(ME(s)){const c=(s.__vccOpts||s)[t];c&&i.push(vi(c,n,o,l,a,r))}else{let c=s();i.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${l.path}"`);const d=Dde(u)?u.default:u;l.mods[a]=u,l.components[a]=d;const p=(d.__vccOpts||d)[t];return p&&vi(p,n,o,l,a,r)()}))}}return i}function pfe(e,t){const n=[],o=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let l=0;lja(c,a))?o.push(a):n.push(a));const s=e.matched[l];s&&(t.matched.find(c=>ja(c,s))||r.push(s))}return[n,o,r]}let gfe=()=>location.protocol+"//"+location.host;function zE(e,t){const{pathname:n,search:o,hash:r}=t,i=e.indexOf("#");if(i>-1){let l=r.includes(e.slice(i))?e.slice(i).length:1,a=r.slice(l);return a[0]!=="/"&&(a="/"+a),_3(a,"")}return _3(n,e)+o+r}function hfe(e,t,n,o){let r=[],i=[],l=null;const a=({state:p})=>{const g=zE(e,location),v=n.value,h=t.value;let b=0;if(p){if(n.value=g,t.value=p,l&&l===v){l=null;return}b=h?p.position-h.position:0}else o(g);r.forEach(y=>{y(n.value,v,{delta:b,type:Qm.pop,direction:b?b>0?cv.forward:cv.back:cv.unknown})})};function s(){l=n.value}function c(p){r.push(p);const g=()=>{const v=r.indexOf(p);v>-1&&r.splice(v,1)};return i.push(g),g}function u(){if(document.visibilityState==="hidden"){const{history:p}=window;if(!p.state)return;p.replaceState(Pt({},p.state,{scroll:Cg()}),"")}}function d(){for(const p of i)p();i=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:s,listen:c,destroy:d}}function B3(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?Cg():null}}function vfe(e){const{history:t,location:n}=window,o={value:zE(e,n)},r={value:t.state};r.value||i(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(s,c,u){const d=e.indexOf("#"),p=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+s:gfe()+e+s;try{t[u?"replaceState":"pushState"](c,"",p),r.value=c}catch(g){console.error(g),n[u?"replace":"assign"](p)}}function l(s,c){i(s,Pt({},t.state,B3(r.value.back,s,r.value.forward,!0),c,{position:r.value.position}),!0),o.value=s}function a(s,c){const u=Pt({},r.value,t.state,{forward:s,scroll:Cg()});i(u.current,u,!0),i(s,Pt({},B3(o.value,s,null),{position:u.position+1},c),!1),o.value=s}return{location:o,state:r,push:a,replace:l}}function mfe(e){e=efe(e);const t=vfe(e),n=hfe(e,t.state,t.location,t.replace);function o(i,l=!0){l||n.pauseListeners(),history.go(i)}const r=Pt({location:"",base:e,go:o,createHref:nfe.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let ul=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var cn=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(cn||{});const bfe={type:ul.Static,value:""},yfe=/[a-zA-Z0-9_]/;function Sfe(e){if(!e)return[[]];if(e==="/")return[[bfe]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(g){throw new Error(`ERR (${n})/"${c}": ${g}`)}let n=cn.Static,o=n;const r=[];let i;function l(){i&&r.push(i),i=[]}let a=0,s,c="",u="";function d(){c&&(n===cn.Static?i.push({type:ul.Static,value:c}):n===cn.Param||n===cn.ParamRegExp||n===cn.ParamRegExpEnd?(i.length>1&&(s==="*"||s==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:ul.Param,value:c,regexp:u,repeatable:s==="*"||s==="+",optional:s==="*"||s==="?"})):t("Invalid state to consume buffer"),c="")}function p(){c+=s}for(;at.length?t.length===1&&t[0]===Hn.Static+Hn.Segment?1:-1:0}function HE(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Ofe={strict:!1,end:!0,sensitive:!1};function Pfe(e,t,n){const o=xfe(Sfe(e.path),n),r=Pt(o,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Ife(e,t){const n=[],o=new Map;t=M3(Ofe,t);function r(d){return o.get(d)}function i(d,p,g){const v=!g,h=z3(d);h.aliasOf=g&&g.record;const b=M3(t,d),y=[h];if("alias"in d){const x=typeof d.alias=="string"?[d.alias]:d.alias;for(const C of x)y.push(z3(Pt({},h,{components:g?g.record.components:h.components,path:C,aliasOf:g?g.record:h})))}let S,$;for(const x of y){const{path:C}=x;if(p&&C[0]!=="/"){const O=p.record.path,w=O[O.length-1]==="/"?"":"/";x.path=p.record.path+(C&&w+C)}if(S=Pfe(x,p,b),g?g.alias.push(S):($=$||S,$!==S&&$.alias.push(S),v&&d.name&&!H3(S)&&l(d.name)),jE(S)&&s(S),h.children){const O=h.children;for(let w=0;w{l($)}:Js}function l(d){if(kE(d)){const p=o.get(d);p&&(o.delete(d),n.splice(n.indexOf(p),1),p.children.forEach(l),p.alias.forEach(l))}else{const p=n.indexOf(d);p>-1&&(n.splice(p,1),d.record.name&&o.delete(d.record.name),d.children.forEach(l),d.alias.forEach(l))}}function a(){return n}function s(d){const p=Mfe(d,n);n.splice(p,0,d),d.record.name&&!H3(d)&&o.set(d.record.name,d)}function c(d,p){let g,v={},h,b;if("name"in d&&d.name){if(g=o.get(d.name),!g)throw Va(Kt.MATCHER_NOT_FOUND,{location:d});b=g.record.name,v=Pt(L3(p.params,g.keys.filter($=>!$.optional).concat(g.parent?g.parent.keys.filter($=>$.optional):[]).map($=>$.name)),d.params&&L3(d.params,g.keys.map($=>$.name))),h=g.stringify(v)}else if(d.path!=null)h=d.path,g=n.find($=>$.re.test(h)),g&&(v=g.parse(h),b=g.record.name);else{if(g=p.name?o.get(p.name):n.find($=>$.re.test(p.path)),!g)throw Va(Kt.MATCHER_NOT_FOUND,{location:d,currentLocation:p});b=g.record.name,v=Pt({},p.params,d.params),h=g.stringify(v)}const y=[];let S=g;for(;S;)y.unshift(S.record),S=S.parent;return{name:b,path:h,params:v,matched:y,meta:Efe(y)}}e.forEach(d=>i(d));function u(){n.length=0,o.clear()}return{addRoute:i,resolve:c,removeRoute:l,clearRoutes:u,getRoutes:a,getRecordMatcher:r}}function L3(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function z3(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Tfe(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Tfe(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function H3(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Efe(e){return e.reduce((t,n)=>Pt(t,n.meta),{})}function Mfe(e,t){let n=0,o=t.length;for(;n!==o;){const i=n+o>>1;HE(e,t[i])<0?o=i:n=i+1}const r=_fe(e);return r&&(o=t.lastIndexOf(r,o-1)),o}function _fe(e){let t=e;for(;t=t.parent;)if(jE(t)&&HE(e,t)===0)return t}function jE({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function j3(e){const t=je(xg),n=je(LE),o=I(()=>{const s=gt(e.to);return t.resolve(s)}),r=I(()=>{const{matched:s}=o.value,{length:c}=s,u=s[c-1],d=n.matched;if(!u||!d.length)return-1;const p=d.findIndex(ja.bind(null,u));if(p>-1)return p;const g=V3(s[c-2]);return c>1&&V3(u)===g&&d[d.length-1].path!==g?d.findIndex(ja.bind(null,s[c-2])):p}),i=I(()=>r.value>-1&&Bfe(n.params,o.value.params)),l=I(()=>r.value>-1&&r.value===n.matched.length-1&&BE(n.params,o.value.params));function a(s={}){if(Nfe(s)){const c=t[gt(e.replace)?"replace":"push"](gt(e.to)).catch(Js);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:o,href:I(()=>o.value.href),isActive:i,isExactActive:l,navigate:a}}function Afe(e){return e.length===1?e[0]:e}const Rfe=ie({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:j3,setup(e,{slots:t}){const n=ut(j3(e)),{options:o}=je(xg),r=I(()=>({[W3(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[W3(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&Afe(t.default(n));return e.custom?i:Gr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},i)}}}),Dfe=Rfe;function Nfe(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Bfe(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!Jo(r)||r.length!==o.length||o.some((i,l)=>i.valueOf()!==r[l].valueOf()))return!1}return!0}function V3(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const W3=(e,t,n)=>e??t??n,kfe=ie({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=je(e0),r=I(()=>e.route||o.value),i=je(N3,0),l=I(()=>{let c=gt(i);const{matched:u}=r.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=I(()=>r.value.matched[l.value]);Xe(N3,I(()=>l.value+1)),Xe(ffe,a),Xe(e0,r);const s=re();return ye(()=>[s.value,a.value,e.name],([c,u,d],[p,g,v])=>{u&&(u.instances[d]=c,g&&g!==u&&c&&c===p&&(u.leaveGuards.size||(u.leaveGuards=g.leaveGuards),u.updateGuards.size||(u.updateGuards=g.updateGuards))),c&&u&&(!g||!ja(u,g)||!p)&&(u.enterCallbacks[d]||[]).forEach(h=>h(c))},{flush:"post"}),()=>{const c=r.value,u=e.name,d=a.value,p=d&&d.components[u];if(!p)return K3(n.default,{Component:p,route:c});const g=d.props[u],v=g?g===!0?c.params:typeof g=="function"?g(c):g:null,b=Gr(p,Pt({},v,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[u]=null)},ref:s}));return K3(n.default,{Component:b,route:c})||b}}});function K3(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Ffe=kfe;function Lfe(e){const t=Ife(e.routes,e),n=e.parseQuery||ufe,o=e.stringifyQuery||D3,r=e.history,i=Ss(),l=Ss(),a=Ss(),s=oe(si);let c=si;aa&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=av.bind(null,X=>""+X),d=av.bind(null,Xde),p=av.bind(null,Ec);function g(X,J){let Z,G;return kE(X)?(Z=t.getRecordMatcher(X),G=J):G=X,t.addRoute(G,Z)}function v(X){const J=t.getRecordMatcher(X);J&&t.removeRoute(J)}function h(){return t.getRoutes().map(X=>X.record)}function b(X){return!!t.getRecordMatcher(X)}function y(X,J){if(J=Pt({},J||s.value),typeof X=="string"){const te=sv(n,X,J.path),ue=t.resolve({path:te.path},J),le=r.createHref(te.fullPath);return Pt(te,ue,{params:p(ue.params),hash:Ec(te.hash),redirectedFrom:void 0,href:le})}let Z;if(X.path!=null)Z=Pt({},X,{path:sv(n,X.path,J.path).path});else{const te=Pt({},X.params);for(const ue in te)te[ue]==null&&delete te[ue];Z=Pt({},X,{params:d(te)}),J.params=d(J.params)}const G=t.resolve(Z,J),q=X.hash||"";G.params=u(p(G.params));const V=qde(o,Pt({},X,{hash:Wde(q),path:G.path})),K=r.createHref(V);return Pt({fullPath:V,hash:q,query:o===D3?dfe(X.query):X.query||{}},G,{redirectedFrom:void 0,href:K})}function S(X){return typeof X=="string"?sv(n,X,s.value.path):Pt({},X)}function $(X,J){if(c!==X)return Va(Kt.NAVIGATION_CANCELLED,{from:J,to:X})}function x(X){return w(X)}function C(X){return x(Pt(S(X),{replace:!0}))}function O(X,J){const Z=X.matched[X.matched.length-1];if(Z&&Z.redirect){const{redirect:G}=Z;let q=typeof G=="function"?G(X,J):G;return typeof q=="string"&&(q=q.includes("?")||q.includes("#")?q=S(q):{path:q},q.params={}),Pt({query:X.query,hash:X.hash,params:q.path!=null?{}:X.params},q)}}function w(X,J){const Z=c=y(X),G=s.value,q=X.state,V=X.force,K=X.replace===!0,te=O(Z,G);if(te)return w(Pt(S(te),{state:typeof te=="object"?Pt({},q,te.state):q,force:V,replace:K}),J||Z);const ue=Z;ue.redirectedFrom=J;let le;return!V&&Zde(o,G,Z)&&(le=Va(Kt.NAVIGATION_DUPLICATED,{to:ue,from:G}),H(G,G,!0,!1)),(le?Promise.resolve(le):_(ue,G)).catch(ne=>Ir(ne)?Ir(ne,Kt.NAVIGATION_GUARD_REDIRECT)?ne:z(ne):k(ne,ue,G)).then(ne=>{if(ne){if(Ir(ne,Kt.NAVIGATION_GUARD_REDIRECT))return w(Pt({replace:K},S(ne.to),{state:typeof ne.to=="object"?Pt({},q,ne.to.state):q,force:V}),J||ue)}else ne=A(ue,G,!0,K,q);return M(ue,G,ne),ne})}function T(X,J){const Z=$(X,J);return Z?Promise.reject(Z):Promise.resolve()}function E(X){const J=Q.values().next().value;return J&&typeof J.runWithContext=="function"?J.runWithContext(X):X()}function _(X,J){let Z;const[G,q,V]=pfe(X,J);Z=uv(G.reverse(),"beforeRouteLeave",X,J);for(const te of G)te.leaveGuards.forEach(ue=>{Z.push(vi(ue,X,J))});const K=T.bind(null,X,J);return Z.push(K),ee(Z).then(()=>{Z=[];for(const te of i.list())Z.push(vi(te,X,J));return Z.push(K),ee(Z)}).then(()=>{Z=uv(q,"beforeRouteUpdate",X,J);for(const te of q)te.updateGuards.forEach(ue=>{Z.push(vi(ue,X,J))});return Z.push(K),ee(Z)}).then(()=>{Z=[];for(const te of V)if(te.beforeEnter)if(Jo(te.beforeEnter))for(const ue of te.beforeEnter)Z.push(vi(ue,X,J));else Z.push(vi(te.beforeEnter,X,J));return Z.push(K),ee(Z)}).then(()=>(X.matched.forEach(te=>te.enterCallbacks={}),Z=uv(V,"beforeRouteEnter",X,J,E),Z.push(K),ee(Z))).then(()=>{Z=[];for(const te of l.list())Z.push(vi(te,X,J));return Z.push(K),ee(Z)}).catch(te=>Ir(te,Kt.NAVIGATION_CANCELLED)?te:Promise.reject(te))}function M(X,J,Z){a.list().forEach(G=>E(()=>G(X,J,Z)))}function A(X,J,Z,G,q){const V=$(X,J);if(V)return V;const K=J===si,te=aa?history.state:{};Z&&(G||K?r.replace(X.fullPath,Pt({scroll:K&&te&&te.scroll},q)):r.push(X.fullPath,q)),s.value=X,H(X,J,Z,K),z()}let R;function L(){R||(R=r.listen((X,J,Z)=>{if(!U.listening)return;const G=y(X),q=O(G,U.currentRoute.value);if(q){w(Pt(q,{replace:!0,force:!0}),G).catch(Js);return}c=G;const V=s.value;aa&&ife(R3(V.fullPath,Z.delta),Cg()),_(G,V).catch(K=>Ir(K,Kt.NAVIGATION_ABORTED|Kt.NAVIGATION_CANCELLED)?K:Ir(K,Kt.NAVIGATION_GUARD_REDIRECT)?(w(Pt(S(K.to),{force:!0}),G).then(te=>{Ir(te,Kt.NAVIGATION_ABORTED|Kt.NAVIGATION_DUPLICATED)&&!Z.delta&&Z.type===Qm.pop&&r.go(-1,!1)}).catch(Js),Promise.reject()):(Z.delta&&r.go(-Z.delta,!1),k(K,G,V))).then(K=>{K=K||A(G,V,!1),K&&(Z.delta&&!Ir(K,Kt.NAVIGATION_CANCELLED)?r.go(-Z.delta,!1):Z.type===Qm.pop&&Ir(K,Kt.NAVIGATION_ABORTED|Kt.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),M(G,V,K)}).catch(Js)}))}let P=Ss(),D=Ss(),N;function k(X,J,Z){z(X);const G=D.list();return G.length?G.forEach(q=>q(X,J,Z)):console.error(X),Promise.reject(X)}function F(){return N&&s.value!==si?Promise.resolve():new Promise((X,J)=>{P.add([X,J])})}function z(X){return N||(N=!X,L(),P.list().forEach(([J,Z])=>X?Z(X):J()),P.reset()),X}function H(X,J,Z,G){const{scrollBehavior:q}=e;if(!aa||!q)return Promise.resolve();const V=!Z&&lfe(R3(X.fullPath,0))||(G||!Z)&&history.state&&history.state.scroll||null;return rt().then(()=>q(X,J,V)).then(K=>K&&rfe(K)).catch(K=>k(K,X,J))}const j=X=>r.go(X);let Y;const Q=new Set,U={currentRoute:s,listening:!0,addRoute:g,removeRoute:v,clearRoutes:t.clearRoutes,hasRoute:b,getRoutes:h,resolve:y,options:e,push:x,replace:C,go:j,back:()=>j(-1),forward:()=>j(1),beforeEach:i.add,beforeResolve:l.add,afterEach:a.add,onError:D.add,isReady:F,install(X){X.component("RouterLink",Dfe),X.component("RouterView",Ffe),X.config.globalProperties.$router=U,Object.defineProperty(X.config.globalProperties,"$route",{enumerable:!0,get:()=>gt(s)}),aa&&!Y&&s.value===si&&(Y=!0,x(r.location).catch(G=>{}));const J={};for(const G in si)Object.defineProperty(J,G,{get:()=>s.value[G],enumerable:!0});X.provide(xg,U),X.provide(LE,b4(J)),X.provide(e0,s);const Z=X.unmount;Q.add(X),X.unmount=function(){Q.delete(X),Q.size<1&&(c=si,R&&R(),R=null,s.value=si,Y=!1,N=!1),Z()}}};function ee(X){return X.reduce((J,Z)=>J.then(()=>E(Z)),Promise.resolve())}return U}function zfe(){return je(xg)}const VE=M_("settings",{state:()=>({token:localStorage.getItem("admin_token")||"",serverConfig:{},browserConfig:{},workerConfig:[],poolConfig:{strategy:"least_busy",failover:{enabled:!1,maxRetries:3}},adapterConfig:{},adaptersMeta:[]}),actions:{setToken(e){this.token=e,e?localStorage.setItem("admin_token",e):localStorage.removeItem("admin_token")},getHeaders(){const e={"Content-Type":"application/json"};return this.token&&(e.Authorization=`Bearer ${this.token}`),e},async checkAuth(){try{return(await fetch("/admin/status",{headers:this.getHeaders()})).status!==401}catch{return!1}},async handleResponse(e,t){let n={};try{n=await e.json()}catch{}if(e.ok)return t&&Gn.success(t),{success:!0,data:n};{console.error("Request failed:",e.status,n);const o=n.error?.message||n.message||`请求未成功: ${e.status} ${e.statusText}`;return Dt.error({title:"保存失败",content:o,okText:"好的"}),{success:!1,data:n}}},async fetchServerConfig(){try{const e=await fetch("/admin/config/server",{headers:this.getHeaders()});e.ok&&(this.serverConfig=await e.json())}catch(e){console.error("Fetch server config failed",e)}},async saveServerConfig(e){try{const t=await fetch("/admin/config/server",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(e)});if((await this.handleResponse(t,"服务器设置保存成功")).success)return this.serverConfig=e,!0}catch(t){Dt.error({title:"保存失败 (网络异常)",content:t.message})}return!1},async fetchBrowserConfig(){try{const e=await fetch("/admin/config/browser",{headers:this.getHeaders()});e.ok&&(this.browserConfig=await e.json())}catch(e){console.error("Fetch browser config failed",e)}},async saveBrowserConfig(e){try{const t=await fetch("/admin/config/browser",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(e)});if((await this.handleResponse(t,"浏览器设置保存成功")).success)return this.browserConfig=e,!0}catch(t){Dt.error({title:"保存失败 (网络异常)",content:t.message})}return!1},async fetchWorkerConfig(){try{const e=await fetch("/admin/config/instances",{headers:this.getHeaders()});e.ok&&(this.workerConfig=await e.json())}catch(e){console.error("Fetch instance configuration failed",e)}},async saveWorkerConfig(e){try{const t=await fetch("/admin/config/instances",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(e)});if((await this.handleResponse(t,"实例配置保存成功")).success)return this.workerConfig=e,!0}catch(t){Dt.error({title:"保存失败 (网络异常)",content:t.message})}return!1},async fetchPoolConfig(){try{const e=await fetch("/admin/config/pool",{headers:this.getHeaders()});if(e.ok){const t=await e.json();this.poolConfig={strategy:t.strategy||"least_busy",failover:{enabled:t.failover?.enabled||!1,maxRetries:t.failover?.maxRetries||3}}}}catch(e){console.error("Fetch pool config failed",e)}},async savePoolConfig(e){try{const t=await fetch("/admin/config/pool",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(e)});if((await this.handleResponse(t,"工作池设置保存成功")).success)return this.poolConfig=e,!0}catch(t){Dt.error({title:"保存失败 (网络异常)",content:t.message})}return!1},async fetchAdaptersMeta(){try{const e=await fetch("/admin/adapters",{headers:this.getHeaders()});e.ok&&(this.adaptersMeta=await e.json())}catch(e){console.error("Fetch adapters meta failed",e)}},async fetchAdapterConfig(){try{const e=await fetch("/admin/config/adapters",{headers:this.getHeaders()});e.ok&&(this.adapterConfig=await e.json())}catch(e){console.error("Fetch adapter config failed",e)}},async saveAdapterConfig(e){try{const t=await fetch("/admin/config/adapters",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(e)});if((await this.handleResponse(t,"适配器设置保存成功")).success)return this.adapterConfig={...this.adapterConfig,...e},!0}catch(t){Dt.error({title:"保存失败 (网络异常)",content:t.message})}return!1}}}),Hfe={style:{padding:"20px 0"}},jfe={style:{"text-align":"center","margin-bottom":"24px"}},Vfe={__name:"LoginModal",props:{visible:{type:Boolean,required:!0}},emits:["update:visible","success"],setup(e,{emit:t}){const n=t,o=VE(),r=re(o.token),i=re(!1),l=async()=>{if(!r.value){Gn.warning("请输入 Token");return}i.value=!0;try{const a=o.token;o.setToken(r.value),await o.checkAuth()?(Gn.success("验证成功"),n("success"),n("update:visible",!1)):(Gn.error("Token 验证失败,请检查是否正确"),o.setToken(a))}catch{Gn.error("验证过程发生错误")}finally{i.value=!1}};return(a,s)=>{const c=_t("a-avatar"),u=_t("a-input-password"),d=_t("a-form-item"),p=_t("a-button"),g=_t("a-form"),v=_t("a-modal");return Mt(),Ji(v,{open:e.visible,title:"需要身份验证",closable:!1,maskClosable:!1,footer:null,width:"400px",centered:""},{default:tt(()=>[xt("div",Hfe,[xt("div",jfe,[f(c,{size:64,style:{"background-color":"#1890ff"}},{icon:tt(()=>[f(gt(Gf))]),_:1}),s[1]||(s[1]=xt("div",{style:{"margin-top":"16px","font-size":"16px","font-weight":"500"}}," WebAI2API 管理面板 ",-1)),s[2]||(s[2]=xt("div",{style:{color:"#8c8c8c","margin-top":"8px"}}," 请输入访问 API Token 以继续 ",-1))]),f(g,{layout:"vertical"},{default:tt(()=>[f(d,{label:"API Token"},{default:tt(()=>[f(u,{value:r.value,"onUpdate:value":s[0]||(s[0]=h=>r.value=h),placeholder:"请输入 API Token",size:"large",onPressEnter:l},{prefix:tt(()=>[f(gt(Gf),{style:{color:"rgba(0,0,0,.25)"}})]),_:1},8,["value"])]),_:1}),f(p,{type:"primary",block:"",size:"large",loading:i.value,onClick:l},{default:tt(()=>[...s[3]||(s[3]=[vt(" 验证并登录 ",-1)])]),_:1},8,["loading"])]),_:1})])]),_:1},8,["open"])}}},Wfe=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Kfe={key:1},Gfe={href:"https://github.com/foxhui/WebAI2API",target:"_blank",style:{color:"#8c8c8c","font-size":"20px"}},Xfe={key:0},Ufe={style:{"margin-top":"8px","font-size":"12px",color:"#8c8c8c"}},Yfe={key:1},qfe={style:{"margin-top":"8px","font-size":"12px",color:"#ff4d4f"}},Zfe={key:2,style:{color:"#8c8c8c","font-size":"12px"}},Qfe={key:0},Jfe={style:{"margin-top":"8px","font-size":"12px",color:"#8c8c8c"}},epe={key:1},tpe={style:{"margin-top":"8px","font-size":"12px",color:"#ff4d4f"}},npe={key:2,style:{color:"#8c8c8c","font-size":"12px"}},ope={style:{"margin-bottom":"12px"}},rpe={style:{"margin-bottom":"12px"}},ipe={style:{"margin-bottom":"12px"}},lpe={style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"4px"}},ape={style:{margin:"0"}},spe={key:0,style:{"margin-top":"8px",display:"flex","flex-wrap":"wrap",gap:"4px"}},cpe={style:{"margin-bottom":"12px"}},upe={key:0},dpe={style:{"margin-bottom":"8px"}},fpe={key:0,style:{"font-size":"12px","max-height":"400px","overflow-y":"auto",background:"#fafafa",padding:"8px","border-radius":"4px"}},ppe={key:0,style:{"white-space":"pre-wrap","word-break":"break-all",margin:"0 0 8px 0"}},gpe={key:1,style:{display:"flex","flex-direction":"column",gap:"8px"}},hpe={style:{"font-size":"11px",color:"#8c8c8c","margin-bottom":"4px"}},vpe=["src","alt"],mpe={key:2,style:{display:"flex","flex-direction":"column",gap:"8px"}},bpe=["src"],ype={key:1},Spe={style:{"margin-top":"8px","font-size":"12px",color:"#ff4d4f"}},$pe={__name:"App",setup(e){const t=zfe(),n=VE(),o=re(["dash"]),r=re(!1),i=re(!1),l=re(!1),a=()=>{l.value=!0,n.setToken(""),setTimeout(()=>{l.value=!1,i.value=!0},500)},s=re(!1),c=re({models:{status:"pending",data:null,error:null},cookies:{status:"pending",data:null,error:null},chat:{status:"pending",data:null,error:null}}),u=re("Say hello in one word"),d=re(""),p=re([]),g=re([]),v=re(!1),h=re(""),b=async()=>{try{const L=await fetch("/v1/models",{headers:n.getHeaders()});if(L.ok){const P=await L.json();p.value=P.data||[],p.value.length>0&&!d.value&&(d.value=p.value[0].id)}}catch(L){console.error("获取模型列表失败",L)}},y=L=>new Promise((P,D)=>{const N=new FileReader;N.readAsDataURL(L),N.onload=()=>P(N.result),N.onerror=D}),S=L=>["image/png","image/jpeg","image/gif","image/webp"].includes(L.type)?(g.value.length>=10&&Gn.error("最多上传 10 张图片"),!1):(Gn.error("仅支持 PNG, JPEG, GIF, WebP 格式"),!1),$=async L=>{const P=L.file;if(P.status==="removed"){g.value=g.value.filter(D=>D.uid!==P.uid);return}try{const D=await y(P.originFileObj||P);g.value.push({uid:P.uid,name:P.name,base64:D})}catch{Gn.error("图片读取失败")}},x=L=>{const P=L.split(","),D=P[0].match(/:(.*?);/)[1],N=atob(P[1]);let k=N.length;const F=new Uint8Array(k);for(;k--;)F[k]=N.charCodeAt(k);return URL.createObjectURL(new Blob([F],{type:D}))},C=L=>{if(!L)return{text:"",images:[],videos:[]};if(L.trim().startsWith("data:video/"))try{const z=x(L.trim());return{text:"",images:[],videos:[{src:z,type:"video/mp4"}]}}catch(z){return console.error("视频转换失败",z),{text:L,images:[],videos:[]}}const P=/!\[([^\]]*)\]\(([^)]+)\)/g,D=[];let N,k=0,F=[];for(;(N=P.exec(L))!==null;)N.index>k&&F.push(L.substring(k,N.index)),D.push({alt:N[1]||"图片",src:N[2],type:"image"}),k=P.lastIndex;return k{c.value[L].status="loading",c.value[L].error=null,c.value[L].data=null,h.value="";try{let P,D;if(L==="models")P="/v1/models",D={headers:n.getHeaders()};else if(L==="cookies")P="/v1/cookies",D={headers:n.getHeaders()};else if(L==="chat"){P="/v1/chat/completions";let F;if(g.value.length>0){F=[{type:"text",text:u.value}];for(const z of g.value)F.push({type:"image_url",image_url:{url:z.base64}})}else F=u.value;if(D={method:"POST",headers:{...n.getHeaders(),"Content-Type":"application/json"},body:JSON.stringify({model:d.value,messages:[{role:"user",content:F}],stream:v.value})},v.value){const z=await fetch(P,D);if(!z.ok){const Q=await z.json();throw new Error(Q.error?.message||`HTTP ${z.status}`)}const H=z.body.getReader(),j=new TextDecoder;let Y="";for(;;){const{done:Q,value:U}=await H.read();if(Q)break;Y+=j.decode(U,{stream:!0});const ee=Y.split(` +`);Y=ee.pop()||"";for(const X of ee)if(X.startsWith("data: ")){const J=X.slice(6).trim();if(J==="[DONE]")continue;try{const G=JSON.parse(J).choices?.[0]?.delta?.content||"";h.value+=G}catch{}}}c.value[L].status="success",c.value[L].data={content:h.value};return}}const N=await fetch(P,D),k=await N.json();N.ok?(c.value[L].status="success",L==="chat"&&k.choices?.[0]?.message?.content?c.value[L].data={content:k.choices[0].message.content}:c.value[L].data=k):(c.value[L].status="error",c.value[L].error=k.error?.message||`HTTP ${N.status}`)}catch(P){c.value[L].status="error",c.value[L].error=P.message}},w=()=>{s.value=!0,Object.keys(c.value).forEach(L=>{c.value[L]={status:"pending",data:null,error:null}}),g.value=[],b()},T={dash:"/","settings-server":"/settings/server","settings-workers":"/settings/workers","settings-browser":"/settings/browser","settings-adapters":"/settings/adapters","tools-display":"/tools/display","tools-cache":"/tools/cache","tools-logs":"/tools/logs"},E=({key:L})=>{const P=T[L];P&&t.push(P)},_=re(!0);let M=null,A=!1;async function R(){try{(await fetch("/admin/status",{headers:n.getHeaders(),signal:AbortSignal.timeout(5e3)})).ok&&A&&(A=!1,Dt.destroyAll(),window.location.reload())}catch{!A&&!_.value&&(A=!0,Dt.warning({title:"后端连接断开",content:"无法连接到后端服务,请检查服务是否正在运行。连接恢复后页面将自动刷新。",okText:"我知道了",centered:!0}))}}return We(async()=>{const L=()=>{window.innerWidth<=768&&(r.value=!0)};L(),window.addEventListener("resize",L);try{n.token?await n.checkAuth()||(n.setToken(""),i.value=!0):i.value=!0}catch(P){console.error("Auth check failed",P),i.value=!0}finally{_.value=!1}M=setInterval(R,5e3),wn(()=>{window.removeEventListener("resize",L),M&&clearInterval(M)})}),(L,P)=>{const D=_t("a-spin"),N=_t("a-button"),k=_t("a-flex"),F=_t("a-layout-header"),z=_t("a-menu-item"),H=_t("a-sub-menu"),j=_t("a-menu"),Y=_t("a-layout-sider"),Q=_t("router-view"),U=_t("a-layout-content"),ee=_t("a-card"),X=_t("a-layout-footer"),J=_t("a-layout"),Z=_t("a-tag"),G=_t("a-select-option"),q=_t("a-select"),V=_t("a-textarea"),K=_t("a-upload-dragger"),te=_t("a-checkbox"),ue=_t("a-space"),le=_t("a-drawer");return _.value?(Mt(),Ji(D,{key:0,spinning:_.value,tip:"正在验证身份...",size:"large",style:{height:"100vh",display:"flex","align-items":"center","justify-content":"center"}},null,8,["spinning"])):(Mt(),rn("div",Kfe,[f(Vfe,{visible:i.value,"onUpdate:visible":P[0]||(P[0]=ne=>i.value=ne)},null,8,["visible"]),f(J,{style:{"min-height":"100vh"},theme:"light"},{default:tt(()=>[f(F,{class:"header",style:{background:"rgba(255, 255, 255, 0.7)","backdrop-filter":"blur(20px)","-webkit-backdrop-filter":"blur(20px)","border-bottom":"1.5px solid rgba(0, 0, 0, 0.05)",display:"flex","align-items":"center",padding:"0 24px",position:"fixed",width:"100%",top:"0","z-index":"1000"}},{default:tt(()=>[P[12]||(P[12]=xt("div",{class:"logo",style:{"font-size":"1.25rem","font-weight":"bold",color:"#1890ff","margin-right":"24px"}}," WebAI2API ",-1)),f(k,{justify:"end",align:"center",style:{flex:"1"},gap:12},{default:tt(()=>[f(N,{onClick:w},{icon:tt(()=>[f(gt(O1))]),default:tt(()=>[P[10]||(P[10]=vt(" 接口测试 ",-1))]),_:1}),f(N,{danger:"",loading:l.value,onClick:a},{icon:tt(()=>[f(gt(M1))]),default:tt(()=>[P[11]||(P[11]=vt(" 退出登录 ",-1))]),_:1},8,["loading"])]),_:1})]),_:1}),f(J,{style:{"margin-top":"64px"}},{default:tt(()=>[f(Y,{collapsed:r.value,"onUpdate:collapsed":P[2]||(P[2]=ne=>r.value=ne),collapsible:"",theme:"light",style:{position:"fixed",left:"0",top:"64px",height:"calc(100vh - 64px)","overflow-y":"auto","z-index":"100"}},{default:tt(()=>[f(j,{selectedKeys:o.value,"onUpdate:selectedKeys":P[1]||(P[1]=ne=>o.value=ne),mode:"inline",onClick:E},{default:tt(()=>[f(z,{key:"dash"},{default:tt(()=>[f(gt(P1)),P[13]||(P[13]=xt("span",null,"状态概览",-1))]),_:1}),f(H,{key:"settings"},{title:tt(()=>[xt("span",null,[f(gt(A1)),P[14]||(P[14]=xt("span",null,"系统设置",-1))])]),default:tt(()=>[f(z,{key:"settings-server"},{default:tt(()=>[...P[15]||(P[15]=[vt("服务器",-1)])]),_:1}),f(z,{key:"settings-workers"},{default:tt(()=>[...P[16]||(P[16]=[vt("工作池",-1)])]),_:1}),f(z,{key:"settings-browser"},{default:tt(()=>[...P[17]||(P[17]=[vt("浏览器",-1)])]),_:1}),f(z,{key:"settings-adapters"},{default:tt(()=>[...P[18]||(P[18]=[vt("适配器",-1)])]),_:1})]),_:1}),f(H,{key:"tools"},{title:tt(()=>[xt("span",null,[f(gt(R1)),P[19]||(P[19]=xt("span",null,"系统管理",-1))])]),default:tt(()=>[f(z,{key:"tools-display"},{default:tt(()=>[...P[20]||(P[20]=[vt("虚拟显示器",-1)])]),_:1}),f(z,{key:"tools-cache"},{default:tt(()=>[...P[21]||(P[21]=[vt("缓存与重启",-1)])]),_:1}),f(z,{key:"tools-logs"},{default:tt(()=>[...P[22]||(P[22]=[vt("日志查看器",-1)])]),_:1})]),_:1})]),_:1},8,["selectedKeys"])]),_:1},8,["collapsed"]),f(J,{style:Jf({marginLeft:r.value?"80px":"200px",padding:"16px",transition:"margin-left 0.2s"})},{default:tt(()=>[f(U,{style:{"min-height":"280px"}},{default:tt(()=>[f(Q)]),_:1}),f(X,{class:"footer",style:{padding:"0px","margin-top":"10px"}},{default:tt(()=>[f(ee,{bordered:!1,bodyStyle:{padding:"16px 24px",display:"flex",justifyContent:"space-between",alignItems:"center"}},{default:tt(()=>[xt("div",null,[xt("a",Gfe,[f(gt(I1))])])]),_:1})]),_:1})]),_:1},8,["style"])]),_:1})]),_:1}),f(le,{open:s.value,"onUpdate:open":P[9]||(P[9]=ne=>s.value=ne),title:"接口测试",placement:"right",width:500},{default:tt(()=>[f(ue,{direction:"vertical",style:{width:"100%"},size:"large"},{default:tt(()=>[f(ee,{title:"GET /v1/models",size:"small"},{extra:tt(()=>[f(N,{size:"small",type:"primary",onClick:P[3]||(P[3]=ne=>O("models")),loading:c.value.models.status==="loading"},{default:tt(()=>[...P[23]||(P[23]=[vt(" 测试 ",-1)])]),_:1},8,["loading"])]),default:tt(()=>[c.value.models.status==="success"?(Mt(),rn("div",Xfe,[f(Z,{color:"success"},{default:tt(()=>[f(gt(hl)),P[24]||(P[24]=vt(" 成功 ",-1))]),_:1}),xt("div",Ufe," 返回 "+ao(c.value.models.data?.data?.length||0)+" 个模型 ",1)])):c.value.models.status==="error"?(Mt(),rn("div",Yfe,[f(Z,{color:"error"},{default:tt(()=>[f(gt(vl)),P[25]||(P[25]=vt(" 失败 ",-1))]),_:1}),xt("div",qfe,ao(c.value.models.error),1)])):(Mt(),rn("div",Zfe,"点击测试按钮开始"))]),_:1}),f(ee,{title:"GET /v1/cookies",size:"small"},{extra:tt(()=>[f(N,{size:"small",type:"primary",onClick:P[4]||(P[4]=ne=>O("cookies")),loading:c.value.cookies.status==="loading"},{default:tt(()=>[...P[26]||(P[26]=[vt(" 测试 ",-1)])]),_:1},8,["loading"])]),default:tt(()=>[c.value.cookies.status==="success"?(Mt(),rn("div",Qfe,[f(Z,{color:"success"},{default:tt(()=>[f(gt(hl)),P[27]||(P[27]=vt(" 成功 ",-1))]),_:1}),xt("div",Jfe," 返回 "+ao(c.value.cookies.data?.cookies?.length||0)+" 个 Cookie ",1)])):c.value.cookies.status==="error"?(Mt(),rn("div",epe,[f(Z,{color:"error"},{default:tt(()=>[f(gt(vl)),P[28]||(P[28]=vt(" 失败 ",-1))]),_:1}),xt("div",tpe,ao(c.value.cookies.error),1)])):(Mt(),rn("div",npe,"点击测试按钮开始"))]),_:1}),f(ee,{title:"POST /v1/chat/completions",size:"small"},{extra:tt(()=>[f(N,{size:"small",type:"primary",onClick:P[5]||(P[5]=ne=>O("chat")),loading:c.value.chat.status==="loading",disabled:!d.value},{default:tt(()=>[...P[29]||(P[29]=[vt(" 测试 ",-1)])]),_:1},8,["loading","disabled"])]),default:tt(()=>[xt("div",ope,[P[30]||(P[30]=xt("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"4px"}},"模型",-1)),f(q,{value:d.value,"onUpdate:value":P[6]||(P[6]=ne=>d.value=ne),style:{width:"100%"},size:"small",placeholder:"选择模型","show-search":""},{default:tt(()=>[(Mt(!0),rn(He,null,lu(p.value,ne=>(Mt(),Ji(G,{key:ne.id,value:ne.id},{default:tt(()=>[vt(ao(ne.id),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),xt("div",rpe,[P[31]||(P[31]=xt("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"4px"}},"提示词",-1)),f(V,{value:u.value,"onUpdate:value":P[7]||(P[7]=ne=>u.value=ne),placeholder:"输入提示词",rows:2,size:"small"},null,8,["value"])]),xt("div",ipe,[xt("div",lpe," 附加图片 ("+ao(g.value.length)+"/10) ",1),f(K,{"file-list":[],multiple:!0,"before-upload":S,onChange:$,accept:".png,.jpg,.jpeg,.gif,.webp","show-upload-list":!1,style:{padding:"8px"}},{default:tt(()=>[xt("p",ape,[f(gt(T1),{style:{"font-size":"24px",color:"#1890ff"}})]),P[32]||(P[32]=xt("p",{style:{"font-size":"12px",margin:"4px 0 0 0",color:"#8c8c8c"}}," 点击或拖拽上传图片 (PNG/JPEG/GIF/WebP) ",-1))]),_:1}),g.value.length>0?(Mt(),rn("div",spe,[(Mt(!0),rn(He,null,lu(g.value,ne=>(Mt(),Ji(Z,{key:ne.uid,closable:"",onClose:ce=>g.value=g.value.filter(se=>se.uid!==ne.uid)},{default:tt(()=>[f(gt(E1)),vt(" "+ao(ne.name.slice(0,15))+ao(ne.name.length>15?"...":""),1)]),_:2},1032,["onClose"]))),128))])):Xl("",!0)]),xt("div",cpe,[f(te,{checked:v.value,"onUpdate:checked":P[8]||(P[8]=ne=>v.value=ne)},{default:tt(()=>[...P[33]||(P[33]=[vt("流式响应",-1)])]),_:1},8,["checked"])]),c.value.chat.status==="loading"||c.value.chat.status==="success"?(Mt(),rn("div",upe,[xt("div",dpe,[c.value.chat.status==="loading"?(Mt(),Ji(Z,{key:0,color:"processing"},{default:tt(()=>[f(gt(Nn)),vt(" "+ao(v.value?"正在接收流式响应...":"请求中,可能需要较长时间..."),1)]),_:1})):(Mt(),Ji(Z,{key:1,color:"success"},{default:tt(()=>[f(gt(hl)),P[34]||(P[34]=vt(" 成功 ",-1))]),_:1}))]),(v.value?h.value:c.value.chat.data?.content)?(Mt(),rn("div",fpe,[C(v.value?h.value:c.value.chat.data?.content).text?(Mt(),rn("pre",ppe,ao(C(v.value?h.value:c.value.chat.data?.content).text),1)):Xl("",!0),C(v.value?h.value:c.value.chat.data?.content).images.length>0?(Mt(),rn("div",gpe,[(Mt(!0),rn(He,null,lu(C(v.value?h.value:c.value.chat.data?.content).images,(ne,ce)=>(Mt(),rn("div",{key:ce,style:{border:"1px solid #d9d9d9","border-radius":"4px",padding:"4px",background:"white"}},[xt("div",hpe,ao(ne.alt),1),xt("img",{src:ne.src,alt:ne.alt,style:{"max-width":"100%",height:"auto",display:"block","border-radius":"2px"}},null,8,vpe)]))),128))])):Xl("",!0),C(v.value?h.value:c.value.chat.data?.content).videos.length>0?(Mt(),rn("div",mpe,[(Mt(!0),rn(He,null,lu(C(v.value?h.value:c.value.chat.data?.content).videos,(ne,ce)=>(Mt(),rn("div",{key:"video-"+ce,style:{border:"1px solid #d9d9d9","border-radius":"4px",padding:"4px",background:"white"}},[P[35]||(P[35]=xt("div",{style:{"font-size":"11px",color:"#8c8c8c","margin-bottom":"4px"}},"生成的视频",-1)),xt("video",{src:ne.src,controls:"",style:{"max-width":"100%",height:"auto",display:"block","border-radius":"2px"}}," 您的浏览器不支持视频播放。 ",8,bpe)]))),128))])):Xl("",!0)])):Xl("",!0)])):c.value.chat.status==="error"?(Mt(),rn("div",ype,[f(Z,{color:"error"},{default:tt(()=>[f(gt(vl)),P[36]||(P[36]=vt(" 失败 ",-1))]),_:1}),xt("div",Spe,ao(c.value.chat.error),1)])):Xl("",!0)]),_:1})]),_:1})]),_:1},8,["open"])]))}}},Cpe=Wfe($pe,[["__scopeId","data-v-5ef25f71"]]),xpe=[{path:"/",component:()=>ii(()=>import("./dash.js"),__vite__mapDeps([0,1,2]))},{path:"/settings/server",component:()=>ii(()=>import("./server.js"),__vite__mapDeps([3,4]))},{path:"/settings/workers",component:()=>ii(()=>import("./workers.js"),[])},{path:"/settings/browser",component:()=>ii(()=>import("./browser.js"),[])},{path:"/settings/adapters",component:()=>ii(()=>import("./adapters.js"),[])},{path:"/tools/display",component:()=>ii(()=>import("./display.js"),__vite__mapDeps([5,2]))},{path:"/tools/cache",component:()=>ii(()=>import("./cache.js"),__vite__mapDeps([6,1]))},{path:"/tools/logs",component:()=>ii(()=>import("./logs.js"),__vite__mapDeps([7,8]))}],wpe=Lfe({history:mfe(),routes:xpe}),Ope=w_(),wg=mO(Cpe);wg.use(Ope);wg.use(wpe);wg.use(Rde);wg.mount("#app");export{r0 as A,Vp as B,hl as C,$g as D,jp as E,He as F,Ve as I,Nn as L,Dt as M,M1 as P,_1 as R,A1 as S,Wfe as _,wn as a,Ji as b,f as c,Mt as d,Xl as e,_t as f,xt as g,vt as h,vl as i,rn as j,VE as k,ut as l,Gn as m,I as n,We as o,lu as p,ii as q,re as r,Gr as s,ao as t,gt as u,g1 as v,tt as w,cg as x,M_ as y,w1 as z}; diff --git a/webui/dist/assets/logs-DZX_S7jR.js b/webui/dist/assets/logs-DZX_S7jR.js deleted file mode 100644 index be49eb0..0000000 --- a/webui/dist/assets/logs-DZX_S7jR.js +++ /dev/null @@ -1,2 +0,0 @@ -import{c as t,I as F,_ as le,k as ne,r as p,m as oe,o as re,a as ce,j as x,d as C,w as n,g as o,f,u as y,C as ie,t as g,i as I,h as _,D as N,R as $,z as ue,e as T,b as de,F as U,n as ve,v as h,M as P,A as fe,B as me}from"./index-BgSomuu7.js";var pe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M304 280h56c4.4 0 8-3.6 8-8 0-28.3 5.9-53.2 17.1-73.5 10.6-19.4 26-34.8 45.4-45.4C450.9 142 475.7 136 504 136h16c28.3 0 53.2 5.9 73.5 17.1 19.4 10.6 34.8 26 45.4 45.4C650 218.9 656 243.7 656 272c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-40-8.8-76.7-25.9-108.1a184.31 184.31 0 00-74-74C596.7 72.8 560 64 520 64h-16c-40 0-76.7 8.8-108.1 25.9a184.31 184.31 0 00-74 74C304.8 195.3 296 232 296 272c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M940 512H792V412c76.8 0 139-62.2 139-139 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8a63 63 0 01-63 63H232a63 63 0 01-63-63c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 76.8 62.2 139 139 139v100H84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h148v96c0 6.5.2 13 .7 19.3C164.1 728.6 116 796.7 116 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-44.2 23.9-82.9 59.6-103.7a273 273 0 0022.7 49c24.3 41.5 59 76.2 100.5 100.5S460.5 960 512 960s99.8-13.9 141.3-38.2a281.38 281.38 0 00123.2-149.5A120 120 0 01836 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-79.3-48.1-147.4-116.7-176.7.4-6.4.7-12.8.7-19.3v-96h148c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM716 680c0 36.8-9.7 72-27.8 102.9-17.7 30.3-43 55.6-73.3 73.3C584 874.3 548.8 884 512 884s-72-9.7-102.9-27.8c-30.3-17.7-55.6-43-73.3-73.3A202.75 202.75 0 01308 680V412h408v268z"}}]},name:"bug",theme:"outlined"};function A(r){for(var a=1;a{i.value=!0;try{const l=await fetch("/admin/logs?lines=500",{headers:a.getHeaders()});if(l.ok){const e=await l.json();s.value=W(e.logs||[]),d.value=e.total||0}}catch{h.error("获取日志失败")}finally{i.value=!1}},W=l=>l.map((e,c)=>{const m=e.match(/^(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3}) \[(\w+)\] \[([^\]]+)\] (.*)$/);return m?{id:c,time:m[1],level:m[2],module:m[3],message:m[4],raw:e}:{id:c,raw:e,level:"INFO",time:"",module:"",message:e}}),z=oe(()=>s.value.filter(e=>{if(k.value!=="all"&&e.level!==k.value)return!1;if(D.value){const c=D.value.toLowerCase();return e.raw.toLowerCase().includes(c)}return!0}).reverse()),G=()=>{P.confirm({title:"确认清除日志",content:"此操作将删除所有系统日志文件,是否继续?",okText:"确认清除",okType:"danger",cancelText:"取消",async onOk(){try{(await fetch("/admin/logs",{method:"DELETE",headers:a.getHeaders()})).ok?(h.success("日志已清除"),s.value=[],d.value=0):h.error("清除失败")}catch{h.error("请求失败")}}})},q=()=>{const l=s.value.map(L=>L.raw).join(` -`),e=new Blob([l],{type:"text/plain"}),c=URL.createObjectURL(e),m=document.createElement("a");m.href=c,m.download=`system-${new Date().toISOString().split("T")[0]}.log`,m.click(),URL.revokeObjectURL(c)},J=l=>{w.value=l,l?(R(),b.value=setInterval(R,5e3)):b.value&&(clearInterval(b.value),b.value=null)},Q=async()=>{if(!v.value||v.value.length!==2){O.value={success:0,failed:0,days:0};return}M.value=!0;try{const[l,e]=v.value,c=await fetch(`/admin/stats/range?start=${l.format("YYYY-MM-DD")}&end=${e.format("YYYY-MM-DD")}`,{headers:a.getHeaders()});c.ok&&(O.value=await c.json())}catch{h.error("获取统计失败")}finally{M.value=!1}},X=()=>{if(!v.value||v.value.length!==2){h.warning("请先选择日期范围");return}P.confirm({title:"确认删除",content:`确定要删除 ${v.value[0].format("YYYY-MM-DD")} 至 ${v.value[1].format("YYYY-MM-DD")} 的统计数据吗?`,okText:"删除",okType:"danger",cancelText:"取消",async onOk(){try{const[l,e]=v.value;(await fetch(`/admin/stats/range?start=${l.format("YYYY-MM-DD")}&end=${e.format("YYYY-MM-DD")}`,{method:"DELETE",headers:a.getHeaders()})).ok&&(h.success("统计数据已删除"),O.value={success:0,failed:0,days:0})}catch{h.error("删除失败")}}})};return re(()=>{R()}),ce(()=>{b.value&&clearInterval(b.value)}),(l,e)=>{const c=f("a-button"),m=f("a-range-picker"),L=f("a-divider"),Z=f("a-spin"),E=f("a-card"),Y=f("a-select-option"),K=f("a-select"),B=f("a-tooltip"),ee=f("a-space"),te=f("a-input-search"),ae=f("a-tag"),se=f("a-empty");return C(),x(U,null,[t(E,{title:"请求统计",bordered:!1},{extra:n(()=>[t(c,{type:"link",danger:"",size:"small",onClick:X,disabled:!v.value||v.value.length!==2},{icon:n(()=>[t(y(N))]),default:n(()=>[e[4]||(e[4]=_(" 删除统计 ",-1))]),_:1},8,["disabled"])]),default:n(()=>[o("div",ye,[t(m,{value:v.value,"onUpdate:value":e[0]||(e[0]=u=>v.value=u),format:"YYYY-MM-DD",placeholder:["开始日期","结束日期"],size:"small",style:{width:"240px"},onChange:Q},null,8,["value"]),t(L,{type:"vertical",style:{height:"32px",margin:"0 16px"}}),t(Z,{spinning:M.value,size:"small"},{default:n(()=>[o("div",be,[o("div",Oe,[t(y(ie)),o("span",we,g(O.value.success),1),e[5]||(e[5]=o("span",{class:"stat-label"},"成功",-1))]),o("div",Ye,[t(y(I)),o("span",Ce,g(O.value.failed),1),e[6]||(e[6]=o("span",{class:"stat-label"},"失败",-1))]),o("div",De,[o("span",ke,g(O.value.days),1),e[7]||(e[7]=o("span",{class:"stat-label"},"天",-1))])])]),_:1},8,["spinning"])])]),_:1}),t(E,{title:"系统日志",bordered:!1,style:{"margin-top":"24px"}},{default:n(()=>[o("div",xe,[o("div",Me,[t(K,{value:k.value,"onUpdate:value":e[1]||(e[1]=u=>k.value=u),style:{width:"90px"},size:"small"},{default:n(()=>[t(Y,{value:"all"},{default:n(()=>[...e[8]||(e[8]=[_("全部",-1)])]),_:1}),t(Y,{value:"INFO"},{default:n(()=>[...e[9]||(e[9]=[_("INFO",-1)])]),_:1}),t(Y,{value:"WARN"},{default:n(()=>[...e[10]||(e[10]=[_("WARN",-1)])]),_:1}),t(Y,{value:"ERRO"},{default:n(()=>[...e[11]||(e[11]=[_("ERROR",-1)])]),_:1}),t(Y,{value:"DBUG"},{default:n(()=>[...e[12]||(e[12]=[_("DEBUG",-1)])]),_:1})]),_:1},8,["value"]),t(ee,{size:4},{default:n(()=>[t(B,{title:w.value?"关闭自动刷新":"开启自动刷新"},{default:n(()=>[t(c,{size:"small",type:w.value?"primary":"default",onClick:e[2]||(e[2]=u=>J(!w.value))},{icon:n(()=>[t(y($))]),_:1},8,["type"])]),_:1},8,["title"]),t(B,{title:"导出日志"},{default:n(()=>[t(c,{size:"small",onClick:q},{icon:n(()=>[t(y(ue))]),_:1})]),_:1}),t(B,{title:"清除日志"},{default:n(()=>[t(c,{size:"small",danger:"",onClick:G},{icon:n(()=>[t(y(N))]),_:1})]),_:1})]),_:1})]),o("div",Re,[t(te,{value:D.value,"onUpdate:value":e[3]||(e[3]=u=>D.value=u),placeholder:"搜索日志",size:"small","enter-button":"","allow-clear":"",style:{width:"100%"}},null,8,["value"])])]),o("div",ze,[_(" 共 "+g(d.value)+" 条日志,当前显示 "+g(z.value.length)+" 条 ",1),w.value?(C(),x("span",Le,[t(y($),{spin:!0}),e[13]||(e[13]=_(" 自动刷新中 ",-1))])):T("",!0)]),o("div",Be,[(C(!0),x(U,null,ve(z.value,u=>(C(),x("div",{key:u.id,class:fe(["log-line","level-"+u.level.toLowerCase()])},[o("span",Se,g(u.time),1),t(ae,{color:V[u.level]?.color||"#8c8c8c",size:"small",style:{margin:"0 8px"}},{default:n(()=>[_(g(u.level),1)]),_:2},1032,["color"]),o("span",je,"["+g(u.module)+"]",1),o("span",Ee,g(u.message),1)],2))),128)),z.value.length===0?(C(),de(se,{key:0,description:"暂无日志"})):T("",!0)])]),_:1})],64)}}},$e=le(Ie,[["__scopeId","data-v-f89c259b"]]);export{$e as default}; diff --git a/webui/dist/assets/logs-lIVamK0l.css b/webui/dist/assets/logs.css similarity index 100% rename from webui/dist/assets/logs-lIVamK0l.css rename to webui/dist/assets/logs.css diff --git a/webui/dist/assets/logs.js b/webui/dist/assets/logs.js new file mode 100644 index 0000000..e61e1af --- /dev/null +++ b/webui/dist/assets/logs.js @@ -0,0 +1,2 @@ +import{c as t,I as F,_ as le,k as ne,r as m,n as oe,o as re,a as ce,j as x,d as C,w as n,g as o,f,u as y,C as ie,t as g,i as I,h as _,D as N,R as $,z as ue,e as T,b as de,F as U,p as ve,m as h,M as P,A as fe,B as pe}from"./index.js";var me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M304 280h56c4.4 0 8-3.6 8-8 0-28.3 5.9-53.2 17.1-73.5 10.6-19.4 26-34.8 45.4-45.4C450.9 142 475.7 136 504 136h16c28.3 0 53.2 5.9 73.5 17.1 19.4 10.6 34.8 26 45.4 45.4C650 218.9 656 243.7 656 272c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-40-8.8-76.7-25.9-108.1a184.31 184.31 0 00-74-74C596.7 72.8 560 64 520 64h-16c-40 0-76.7 8.8-108.1 25.9a184.31 184.31 0 00-74 74C304.8 195.3 296 232 296 272c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M940 512H792V412c76.8 0 139-62.2 139-139 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8a63 63 0 01-63 63H232a63 63 0 01-63-63c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 76.8 62.2 139 139 139v100H84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h148v96c0 6.5.2 13 .7 19.3C164.1 728.6 116 796.7 116 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-44.2 23.9-82.9 59.6-103.7a273 273 0 0022.7 49c24.3 41.5 59 76.2 100.5 100.5S460.5 960 512 960s99.8-13.9 141.3-38.2a281.38 281.38 0 00123.2-149.5A120 120 0 01836 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-79.3-48.1-147.4-116.7-176.7.4-6.4.7-12.8.7-19.3v-96h148c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM716 680c0 36.8-9.7 72-27.8 102.9-17.7 30.3-43 55.6-73.3 73.3C584 874.3 548.8 884 512 884s-72-9.7-102.9-27.8c-30.3-17.7-55.6-43-73.3-73.3A202.75 202.75 0 01308 680V412h408v268z"}}]},name:"bug",theme:"outlined"};function A(r){for(var a=1;a{i.value=!0;try{const l=await fetch("/admin/logs?lines=500",{headers:a.getHeaders()});if(l.ok){const e=await l.json();s.value=W(e.logs||[]),d.value=e.total||0}}catch{h.error("获取日志失败")}finally{i.value=!1}},W=l=>l.map((e,c)=>{const p=e.match(/^(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3}) \[(\w+)\] \[([^\]]+)\] (.*)$/);return p?{id:c,time:p[1],level:p[2],module:p[3],message:p[4],raw:e}:{id:c,raw:e,level:"INFO",time:"",module:"",message:e}}),z=oe(()=>s.value.filter(e=>{if(k.value!=="all"&&e.level!==k.value)return!1;if(D.value){const c=D.value.toLowerCase();return e.raw.toLowerCase().includes(c)}return!0}).reverse()),G=()=>{P.confirm({title:"确认清除日志",content:"此操作将删除所有系统日志文件,是否继续?",okText:"确认清除",okType:"danger",cancelText:"取消",async onOk(){try{(await fetch("/admin/logs",{method:"DELETE",headers:a.getHeaders()})).ok?(h.success("日志已清除"),s.value=[],d.value=0):h.error("清除失败")}catch{h.error("请求失败")}}})},q=()=>{const l=s.value.map(L=>L.raw).join(` +`),e=new Blob([l],{type:"text/plain"}),c=URL.createObjectURL(e),p=document.createElement("a");p.href=c,p.download=`system-${new Date().toISOString().split("T")[0]}.log`,p.click(),URL.revokeObjectURL(c)},J=l=>{w.value=l,l?(R(),b.value=setInterval(R,5e3)):b.value&&(clearInterval(b.value),b.value=null)},Q=async()=>{if(!v.value||v.value.length!==2){O.value={success:0,failed:0,days:0};return}M.value=!0;try{const[l,e]=v.value,c=await fetch(`/admin/stats/range?start=${l.format("YYYY-MM-DD")}&end=${e.format("YYYY-MM-DD")}`,{headers:a.getHeaders()});c.ok&&(O.value=await c.json())}catch{h.error("获取统计失败")}finally{M.value=!1}},X=()=>{if(!v.value||v.value.length!==2){h.warning("请先选择日期范围");return}P.confirm({title:"确认删除",content:`确定要删除 ${v.value[0].format("YYYY-MM-DD")} 至 ${v.value[1].format("YYYY-MM-DD")} 的统计数据吗?`,okText:"删除",okType:"danger",cancelText:"取消",async onOk(){try{const[l,e]=v.value;(await fetch(`/admin/stats/range?start=${l.format("YYYY-MM-DD")}&end=${e.format("YYYY-MM-DD")}`,{method:"DELETE",headers:a.getHeaders()})).ok&&(h.success("统计数据已删除"),O.value={success:0,failed:0,days:0})}catch{h.error("删除失败")}}})};return re(()=>{R()}),ce(()=>{b.value&&clearInterval(b.value)}),(l,e)=>{const c=f("a-button"),p=f("a-range-picker"),L=f("a-divider"),Z=f("a-spin"),E=f("a-card"),Y=f("a-select-option"),K=f("a-select"),B=f("a-tooltip"),ee=f("a-space"),te=f("a-input-search"),ae=f("a-tag"),se=f("a-empty");return C(),x(U,null,[t(E,{title:"请求统计",bordered:!1},{extra:n(()=>[t(c,{type:"link",danger:"",size:"small",onClick:X,disabled:!v.value||v.value.length!==2},{icon:n(()=>[t(y(N))]),default:n(()=>[e[4]||(e[4]=_(" 删除统计 ",-1))]),_:1},8,["disabled"])]),default:n(()=>[o("div",ye,[t(p,{value:v.value,"onUpdate:value":e[0]||(e[0]=u=>v.value=u),format:"YYYY-MM-DD",placeholder:["开始日期","结束日期"],size:"small",style:{width:"240px"},onChange:Q},null,8,["value"]),t(L,{type:"vertical",style:{height:"32px",margin:"0 16px"}}),t(Z,{spinning:M.value,size:"small"},{default:n(()=>[o("div",be,[o("div",Oe,[t(y(ie)),o("span",we,g(O.value.success),1),e[5]||(e[5]=o("span",{class:"stat-label"},"成功",-1))]),o("div",Ye,[t(y(I)),o("span",Ce,g(O.value.failed),1),e[6]||(e[6]=o("span",{class:"stat-label"},"失败",-1))]),o("div",De,[o("span",ke,g(O.value.days),1),e[7]||(e[7]=o("span",{class:"stat-label"},"天",-1))])])]),_:1},8,["spinning"])])]),_:1}),t(E,{title:"系统日志",bordered:!1,style:{"margin-top":"24px"}},{default:n(()=>[o("div",xe,[o("div",Me,[t(K,{value:k.value,"onUpdate:value":e[1]||(e[1]=u=>k.value=u),style:{width:"90px"},size:"small"},{default:n(()=>[t(Y,{value:"all"},{default:n(()=>[...e[8]||(e[8]=[_("全部",-1)])]),_:1}),t(Y,{value:"INFO"},{default:n(()=>[...e[9]||(e[9]=[_("INFO",-1)])]),_:1}),t(Y,{value:"WARN"},{default:n(()=>[...e[10]||(e[10]=[_("WARN",-1)])]),_:1}),t(Y,{value:"ERRO"},{default:n(()=>[...e[11]||(e[11]=[_("ERROR",-1)])]),_:1}),t(Y,{value:"DBUG"},{default:n(()=>[...e[12]||(e[12]=[_("DEBUG",-1)])]),_:1})]),_:1},8,["value"]),t(ee,{size:4},{default:n(()=>[t(B,{title:w.value?"关闭自动刷新":"开启自动刷新"},{default:n(()=>[t(c,{size:"small",type:w.value?"primary":"default",onClick:e[2]||(e[2]=u=>J(!w.value))},{icon:n(()=>[t(y($))]),_:1},8,["type"])]),_:1},8,["title"]),t(B,{title:"导出日志"},{default:n(()=>[t(c,{size:"small",onClick:q},{icon:n(()=>[t(y(ue))]),_:1})]),_:1}),t(B,{title:"清除日志"},{default:n(()=>[t(c,{size:"small",danger:"",onClick:G},{icon:n(()=>[t(y(N))]),_:1})]),_:1})]),_:1})]),o("div",Re,[t(te,{value:D.value,"onUpdate:value":e[3]||(e[3]=u=>D.value=u),placeholder:"搜索日志",size:"small","enter-button":"","allow-clear":"",style:{width:"100%"}},null,8,["value"])])]),o("div",ze,[_(" 共 "+g(d.value)+" 条日志,当前显示 "+g(z.value.length)+" 条 ",1),w.value?(C(),x("span",Le,[t(y($),{spin:!0}),e[13]||(e[13]=_(" 自动刷新中 ",-1))])):T("",!0)]),o("div",Be,[(C(!0),x(U,null,ve(z.value,u=>(C(),x("div",{key:u.id,class:fe(["log-line","level-"+u.level.toLowerCase()])},[o("span",Se,g(u.time),1),t(ae,{color:V[u.level]?.color||"#8c8c8c",size:"small",style:{margin:"0 8px"}},{default:n(()=>[_(g(u.level),1)]),_:2},1032,["color"]),o("span",je,"["+g(u.module)+"]",1),o("span",Ee,g(u.message),1)],2))),128)),z.value.length===0?(C(),de(se,{key:0,description:"暂无日志"})):T("",!0)])]),_:1})],64)}}},$e=le(Ie,[["__scopeId","data-v-f89c259b"]]);export{$e as default}; diff --git a/webui/dist/assets/rfb-BW3Yvshj.js b/webui/dist/assets/rfb.js similarity index 100% rename from webui/dist/assets/rfb-BW3Yvshj.js rename to webui/dist/assets/rfb.js diff --git a/webui/dist/assets/server-BMslIr7R.js b/webui/dist/assets/server-BMslIr7R.js deleted file mode 100644 index 7230a20..0000000 --- a/webui/dist/assets/server-BMslIr7R.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as b,k as w,l as k,o as c,b as C,d as S,w as n,c as o,g as e,f as a,h as i}from"./index-BgSomuu7.js";const B={style:{"margin-bottom":"8px"}},T={style:{"margin-bottom":"8px"}},z={style:{"margin-bottom":"8px"}},U={style:{display:"flex","justify-content":"flex-end","margin-top":"24px"}},M={style:{"margin-bottom":"8px"}},j={style:{"margin-bottom":"8px"}},q={style:{display:"flex","justify-content":"flex-end","margin-top":"24px"}},L={__name:"server",setup(N){const d=w(),s=k({port:5173,authToken:"",keepaliveMode:"comment",queueBuffer:2,imageLimit:5});c(async()=>{await d.fetchServerConfig(),Object.assign(s,d.serverConfig)});const m=async()=>{await d.saveServerConfig(s)};return(V,t)=>{const p=a("a-input-number"),r=a("a-col"),y=a("a-input-password"),u=a("a-select-option"),g=a("a-select"),f=a("a-row"),v=a("a-button"),x=a("a-card"),_=a("a-layout");return S(),C(_,{style:{background:"transparent"}},{default:n(()=>[o(x,{title:"服务器设置",bordered:!1,style:{width:"100%"}},{default:n(()=>[o(f,{gutter:[16,16]},{default:n(()=>[o(r,{xs:24,md:12},{default:n(()=>[e("div",B,[t[5]||(t[5]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"监听端口",-1)),t[6]||(t[6]=e("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}}," 设置服务器监听的端口号,默认为 5173 ",-1)),o(p,{value:s.port,"onUpdate:value":t[0]||(t[0]=l=>s.port=l),min:1,max:65535,placeholder:"请输入端口号",style:{width:"100%"}},null,8,["value"])])]),_:1}),o(r,{xs:24,md:12},{default:n(()=>[e("div",T,[t[7]||(t[7]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"鉴权 Token",-1)),t[8]||(t[8]=e("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}}," 用于 API 请求鉴权的密钥,留空则不启用鉴权 ",-1)),o(y,{value:s.authToken,"onUpdate:value":t[1]||(t[1]=l=>s.authToken=l),placeholder:"请输入 Token",type:"password"},null,8,["value"])])]),_:1}),o(r,{xs:24,md:12},{default:n(()=>[e("div",z,[t[11]||(t[11]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"心跳包类型",-1)),t[12]||(t[12]=e("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}}," 选择 SSE 流式响应的心跳包格式 ",-1)),o(g,{value:s.keepaliveMode,"onUpdate:value":t[2]||(t[2]=l=>s.keepaliveMode=l),style:{width:"100%"},placeholder:"请选择心跳包类型"},{default:n(()=>[o(u,{value:"comment"},{default:n(()=>[...t[9]||(t[9]=[i("Comment - 注释格式",-1)])]),_:1}),o(u,{value:"content"},{default:n(()=>[...t[10]||(t[10]=[i("Content - 内容格式",-1)])]),_:1})]),_:1},8,["value"])])]),_:1})]),_:1}),e("div",U,[o(v,{type:"primary",onClick:m},{default:n(()=>[...t[13]||(t[13]=[i(" 保存设置 ",-1)])]),_:1})])]),_:1}),o(x,{title:"队列设置",bordered:!1,style:{width:"100%","margin-top":"10px"}},{default:n(()=>[o(f,{gutter:[16,16]},{default:n(()=>[o(r,{xs:24,md:12},{default:n(()=>[e("div",M,[t[14]||(t[14]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"队列缓冲区大小",-1)),t[15]||(t[15]=e("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}},[i(" 非流式请求的额外排队数(设为 0 则不限制非流式请求数量)"),e("br"),i(" 实际队列上限 = Workers数量 + 缓冲区大小 ")],-1)),o(p,{value:s.queueBuffer,"onUpdate:value":t[3]||(t[3]=l=>s.queueBuffer=l),min:0,max:100,placeholder:"默认为 2",style:{width:"100%"}},null,8,["value"])])]),_:1}),o(r,{xs:24,md:12},{default:n(()=>[e("div",j,[t[16]||(t[16]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"图片数量上限",-1)),t[17]||(t[17]=e("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}},[i(" 单次请求最多支持的图片附件数量"),e("br"),i(" 网页最多支持10个附件,超出会被丢弃 ")],-1)),o(p,{value:s.imageLimit,"onUpdate:value":t[4]||(t[4]=l=>s.imageLimit=l),min:1,max:10,placeholder:"默认为 5",style:{width:"100%"}},null,8,["value"])])]),_:1})]),_:1}),e("div",q,[o(v,{type:"primary",onClick:m},{default:n(()=>[...t[18]||(t[18]=[i(" 保存设置 ",-1)])]),_:1})])]),_:1})]),_:1})}}},A=b(L,[["__scopeId","data-v-bd32923f"]]);export{A as default}; diff --git a/webui/dist/assets/server-D1vV5anY.css b/webui/dist/assets/server-D1vV5anY.css deleted file mode 100644 index 43db2e0..0000000 --- a/webui/dist/assets/server-D1vV5anY.css +++ /dev/null @@ -1 +0,0 @@ -.ant-input-number[data-v-bd32923f]{width:100%} diff --git a/webui/dist/assets/server.css b/webui/dist/assets/server.css new file mode 100644 index 0000000..371b746 --- /dev/null +++ b/webui/dist/assets/server.css @@ -0,0 +1 @@ +.ant-input-number[data-v-5b571484]{width:100%} diff --git a/webui/dist/assets/server.js b/webui/dist/assets/server.js new file mode 100644 index 0000000..8510a5b --- /dev/null +++ b/webui/dist/assets/server.js @@ -0,0 +1 @@ +import{_ as k,k as w,l as c,o as T,b as C,d as S,w as a,c as o,g as e,f as l,h as i,m as B,M}from"./index.js";const U={style:{"margin-bottom":"8px"}},z={style:{"margin-bottom":"8px"}},I={style:{"margin-bottom":"8px"}},j={style:{display:"flex","justify-content":"flex-end","margin-top":"24px"}},q={style:{"margin-bottom":"8px"}},L={style:{"margin-bottom":"8px"}},N={style:{display:"flex","justify-content":"flex-end","margin-top":"24px"}},V={__name:"server",setup(A){const d=w(),n=c({port:5173,authToken:"",keepaliveMode:"comment",queueBuffer:2,imageLimit:5});T(async()=>{await d.fetchServerConfig(),Object.assign(n,d.serverConfig)});const m=async()=>{await d.saveServerConfig(n)},u=async()=>{if(n.authToken&&n.authToken.length>0&&n.authToken.length<10){B.error("鉴权 Token 如果设置则必须至少 10 个字符,或留空");return}if(!n.authToken){M.confirm({title:"安全警告",content:"您正在将鉴权 Token 留空,这意味着 API 和 WebUI 将无需认证即可访问。请勿在公网环境中使用此配置!确定要继续吗?",okText:"确定留空",okType:"danger",cancelText:"取消",onOk:m});return}await m()};return(O,t)=>{const p=l("a-input-number"),r=l("a-col"),y=l("a-input-password"),f=l("a-select-option"),_=l("a-select"),v=l("a-row"),x=l("a-button"),g=l("a-card"),b=l("a-layout");return S(),C(b,{style:{background:"transparent"}},{default:a(()=>[o(g,{title:"服务器设置",bordered:!1,style:{width:"100%"}},{default:a(()=>[o(v,{gutter:[16,16]},{default:a(()=>[o(r,{xs:24,md:12},{default:a(()=>[e("div",U,[t[5]||(t[5]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"监听端口",-1)),t[6]||(t[6]=e("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}}," 设置服务器监听的端口号,默认为 5173 ",-1)),o(p,{value:n.port,"onUpdate:value":t[0]||(t[0]=s=>n.port=s),min:1,max:65535,placeholder:"请输入端口号",style:{width:"100%"}},null,8,["value"])])]),_:1}),o(r,{xs:24,md:12},{default:a(()=>[e("div",z,[t[7]||(t[7]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"鉴权 Token",-1)),t[8]||(t[8]=e("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}}," 用于 API 请求鉴权的密钥,留空则不启用鉴权 ",-1)),o(y,{value:n.authToken,"onUpdate:value":t[1]||(t[1]=s=>n.authToken=s),placeholder:"请输入 Token",type:"password"},null,8,["value"])])]),_:1}),o(r,{xs:24,md:12},{default:a(()=>[e("div",I,[t[11]||(t[11]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"心跳包类型",-1)),t[12]||(t[12]=e("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}}," 选择 SSE 流式响应的心跳包格式 ",-1)),o(_,{value:n.keepaliveMode,"onUpdate:value":t[2]||(t[2]=s=>n.keepaliveMode=s),style:{width:"100%"},placeholder:"请选择心跳包类型"},{default:a(()=>[o(f,{value:"comment"},{default:a(()=>[...t[9]||(t[9]=[i("Comment - 注释格式",-1)])]),_:1}),o(f,{value:"content"},{default:a(()=>[...t[10]||(t[10]=[i("Content - 内容格式",-1)])]),_:1})]),_:1},8,["value"])])]),_:1})]),_:1}),e("div",j,[o(x,{type:"primary",onClick:u},{default:a(()=>[...t[13]||(t[13]=[i(" 保存设置 ",-1)])]),_:1})])]),_:1}),o(g,{title:"队列设置",bordered:!1,style:{width:"100%","margin-top":"10px"}},{default:a(()=>[o(v,{gutter:[16,16]},{default:a(()=>[o(r,{xs:24,md:12},{default:a(()=>[e("div",q,[t[14]||(t[14]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"队列缓冲区大小",-1)),t[15]||(t[15]=e("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}},[i(" 非流式请求的额外排队数(设为 0 则不限制非流式请求数量)"),e("br"),i(" 实际队列上限 = Workers数量 + 缓冲区大小 ")],-1)),o(p,{value:n.queueBuffer,"onUpdate:value":t[3]||(t[3]=s=>n.queueBuffer=s),min:0,max:100,placeholder:"默认为 2",style:{width:"100%"}},null,8,["value"])])]),_:1}),o(r,{xs:24,md:12},{default:a(()=>[e("div",L,[t[16]||(t[16]=e("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"图片数量上限",-1)),t[17]||(t[17]=e("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}},[i(" 单次请求最多支持的图片附件数量"),e("br"),i(" 网页最多支持10个附件,超出会被丢弃 ")],-1)),o(p,{value:n.imageLimit,"onUpdate:value":t[4]||(t[4]=s=>n.imageLimit=s),min:1,max:10,placeholder:"默认为 5",style:{width:"100%"}},null,8,["value"])])]),_:1})]),_:1}),e("div",N,[o(x,{type:"primary",onClick:u},{default:a(()=>[...t[18]||(t[18]=[i(" 保存设置 ",-1)])]),_:1})])]),_:1})]),_:1})}}},W=k(V,[["__scopeId","data-v-5b571484"]]);export{W as default}; diff --git a/webui/dist/assets/system-CbLTf1UP.js b/webui/dist/assets/system-CbLTf1UP.js deleted file mode 100644 index 731e424..0000000 --- a/webui/dist/assets/system-CbLTf1UP.js +++ /dev/null @@ -1 +0,0 @@ -import{y as i,k as a,v as r}from"./index-BgSomuu7.js";const u=i("system",{state:()=>({status:"",version:"1.0.0",systemVersion:"",uptime:0,cpuUsage:0,memoryUsage:{total:0,used:0,free:0},safeMode:{enabled:!1,reason:null},stats:{totalRequests:0,successRate:0,activeWorkers:0,totalWorkers:0,avgResponseTime:0,success:0,failed:0}}),actions:{async fetchStatus(){const t=a();try{const e=await fetch("/admin/status",{headers:t.getHeaders()});if(e.ok){const s=await e.json();this.$patch(s)}}catch(e){console.error("Failed to fetch system status:",e)}},async fetchStats(){const t=a();try{const e=await fetch("/admin/stats",{headers:t.getHeaders()});if(e.ok){const s=await e.json();this.stats=s}}catch(e){console.error("Failed to fetch stats:",e)}},async restartService(t={}){const e=a(),{loginMode:s,workerName:n}=t;try{const o=await(await fetch("/admin/restart",{method:"POST",headers:{...e.getHeaders(),"Content-Type":"application/json"},body:JSON.stringify({loginMode:s,workerName:n})})).json();return o.success?(r.success(o.message||"服务重启中..."),!0):(r.error("重启失败"),!1)}catch{return r.error("重启请求失败"),!1}},async stopService(){const t=a();try{const s=await(await fetch("/admin/stop",{method:"POST",headers:t.getHeaders()})).json();return s.success?(r.success(s.message||"服务停止中..."),!0):(r.error("停止失败"),!1)}catch{return r.error("停止请求失败"),!1}}}});export{u}; diff --git a/webui/dist/assets/system.js b/webui/dist/assets/system.js new file mode 100644 index 0000000..ea31ce2 --- /dev/null +++ b/webui/dist/assets/system.js @@ -0,0 +1 @@ +import{y as i,k as a,m as r}from"./index.js";const u=i("system",{state:()=>({status:"",version:"1.0.0",systemVersion:"",uptime:0,cpuUsage:0,memoryUsage:{total:0,used:0,free:0},safeMode:{enabled:!1,reason:null},stats:{totalRequests:0,successRate:0,activeWorkers:0,totalWorkers:0,avgResponseTime:0,success:0,failed:0}}),actions:{async fetchStatus(){const t=a();try{const e=await fetch("/admin/status",{headers:t.getHeaders()});if(e.ok){const s=await e.json();this.$patch(s)}}catch(e){console.error("Failed to fetch system status:",e)}},async fetchStats(){const t=a();try{const e=await fetch("/admin/stats",{headers:t.getHeaders()});if(e.ok){const s=await e.json();this.stats=s}}catch(e){console.error("Failed to fetch stats:",e)}},async restartService(t={}){const e=a(),{loginMode:s,workerName:n}=t;try{const o=await(await fetch("/admin/restart",{method:"POST",headers:{...e.getHeaders(),"Content-Type":"application/json"},body:JSON.stringify({loginMode:s,workerName:n})})).json();return o.success?(r.success(o.message||"服务重启中..."),!0):(r.error("重启失败"),!1)}catch{return r.error("重启请求失败"),!1}},async stopService(){const t=a();try{const s=await(await fetch("/admin/stop",{method:"POST",headers:t.getHeaders()})).json();return s.success?(r.success(s.message||"服务停止中..."),!0):(r.error("停止失败"),!1)}catch{return r.error("停止请求失败"),!1}}}});export{u}; diff --git a/webui/dist/assets/workers-DudWKgva.js b/webui/dist/assets/workers-DudWKgva.js deleted file mode 100644 index 61a7b4d..0000000 --- a/webui/dist/assets/workers-DudWKgva.js +++ /dev/null @@ -1 +0,0 @@ -import{k as re,m as D,o as ie,r as _,b as A,d as i,w as s,c as n,g as o,f as r,h as v,j as d,e as y,t as x,F as $,n as pe}from"./index-BgSomuu7.js";const ue={style:{"margin-bottom":"24px"}},de={style:{"margin-bottom":"8px"}},ve={style:{"margin-bottom":"8px"}},me={style:{display:"flex","justify-content":"flex-end","margin-top":"24px"}},ye={style:{display:"flex","justify-content":"space-between","align-items":"center"}},xe={key:0},ge={key:3},fe=["onClick"],ke=["onClick"],we={style:{"margin-bottom":"24px"}},be={style:{"margin-bottom":"16px"}},_e={style:{"margin-bottom":"16px"}},ce={style:{"margin-bottom":"16px"}},Ce={style:{"margin-bottom":"16px"}},Me={style:{"margin-left":"8px"}},Ue={key:0,style:{"margin-bottom":"16px"}},he={key:1,style:{"margin-bottom":"16px"}},Te={key:2,style:{"margin-bottom":"16px"}},Pe={key:3,style:{"margin-bottom":"16px"}},De={style:{"margin-left":"8px"}},Se={key:4,style:{"margin-bottom":"16px"}},We={key:5,style:{"margin-bottom":"16px"}},Ae={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"8px"}},$e=["onClick"],ze=["onClick"],Ie={style:{"font-weight":"600"}},Ne={style:{"font-size":"12px",color:"#8c8c8c"}},He={key:0},je={key:0},Fe={style:{"text-align":"right"}},Oe={style:{"margin-bottom":"16px"}},Ve={style:{"margin-bottom":"16px"}},Be={style:{"margin-bottom":"16px"}},Ee={style:{"margin-bottom":"16px"}},Ke={__name:"workers",setup(Le){const u=re(),g=D({get:()=>u.poolConfig,set:l=>u.poolConfig=l}),H=async()=>{await u.savePoolConfig(g.value)};ie(async()=>{await Promise.all([u.fetchWorkerConfig(),u.fetchPoolConfig(),u.fetchAdaptersMeta()])});const j=D(()=>{const l=u.adaptersMeta.map(e=>({label:e.displayName||e.id,value:e.id}));return l.find(e=>e.value==="merge")||l.unshift({label:"Merge(聚合模式)",value:"merge"}),l}),F=D(()=>u.adaptersMeta.filter(l=>l.id!=="merge").map(l=>({label:l.displayName||l.id,value:l.id}))),h=l=>l==="merge"?"Merge(聚合模式)":u.adaptersMeta.find(k=>k.id===l)?.displayName||l,O=[{title:"实例名称",dataIndex:"name",key:"name"},{title:"Worker 数量",dataIndex:"workerCount",key:"workerCount"},{title:"代理",dataIndex:"proxy",key:"proxy"},{title:"数据标记",key:"userDataMark",dataIndex:"userDataMark"},{title:"操作",key:"action"}],T=D({get:()=>u.workerConfig,set:l=>{u.workerConfig=l}}),w=_(!1),f=_(null),a=_({name:"",userDataMark:"",proxy:!1,proxyType:"socks5",proxyHost:"",proxyPort:1080,proxyAuth:!1,proxyUsername:"",proxyPassword:"",workers:[]}),V=()=>{f.value=null;const l=Math.random().toString(36).substring(2,7);a.value={name:`instance-${(T.value||[]).length+1}-${l}`,userDataMark:"",proxy:!1,proxyType:"socks5",proxyHost:"",proxyPort:1080,proxyAuth:!1,proxyUsername:"",proxyPassword:"",workers:[]},w.value=!0},B=l=>{f.value=l,a.value={name:l.name,userDataMark:l.userDataMark||"",proxy:!!l.proxy,proxyType:l.proxy?.type||"socks5",proxyHost:l.proxy?.host||"",proxyPort:l.proxy?.port||1080,proxyAuth:l.proxy?.auth||!1,proxyUsername:l.proxy?.username||"",proxyPassword:l.proxy?.password||"",workers:l.workers?[...l.workers]:[]},(l.proxy===null||l.proxy===void 0)&&(a.value.proxy=!1),w.value=!0},E=async l=>{const e=T.value.filter(k=>k.id!==l.id);await u.saveWorkerConfig(e)},L=async()=>{const l={id:f.value?f.value.id:`inst_${Date.now()}`,name:a.value.name,userDataMark:a.value.userDataMark,workers:a.value.workers,proxy:a.value.proxy?{enable:!0,type:a.value.proxyType,host:a.value.proxyHost,port:a.value.proxyPort,auth:a.value.proxyAuth,username:a.value.proxyUsername,password:a.value.proxyPassword}:null};let e=[...T.value||[]];if(f.value===null)e.push(l);else{const b=e.findIndex(P=>P.id===f.value.id);b>-1&&(e[b]=l)}await u.saveWorkerConfig(e)&&(w.value=!1)},c=_(-1),C=_(!1),p=_({name:"",type:"lmarena",mergeTypes:[],mergeMonitor:""}),R=()=>{c.value=-1;const l=Math.random().toString(36).substring(2,7);p.value={name:`worker-${a.value.workers.length+1}-${l}`,type:"lmarena",mergeTypes:[],mergeMonitor:""},C.value=!0},K=l=>{c.value=l;const e=a.value.workers[l];p.value={name:e.name,type:e.type,mergeTypes:e.mergeTypes?[...e.mergeTypes]:[],mergeMonitor:e.mergeMonitor||""},C.value=!0},q=()=>{c.value===-1?a.value.workers.push({...p.value}):a.value.workers[c.value]={...p.value},C.value=!1},G=l=>{a.value.workers.splice(l,1)};return(l,e)=>{const k=r("a-segmented"),b=r("a-switch"),P=r("a-col"),z=r("a-input-number"),J=r("a-row"),M=r("a-button"),I=r("a-card"),Q=r("a-tag"),X=r("a-divider"),Y=r("a-table"),U=r("a-input"),Z=r("a-input-password"),ee=r("a-collapse-panel"),te=r("a-collapse"),oe=r("a-list-item"),ae=r("a-list"),le=r("a-drawer"),S=r("a-select"),N=r("a-select-option"),ne=r("a-modal"),se=r("a-layout");return i(),A(se,{style:{background:"transparent"}},{default:s(()=>[n(I,{title:"负载均衡",bordered:!1,style:{width:"100%","margin-bottom":"10px"}},{default:s(()=>[o("div",ue,[e[19]||(e[19]=o("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"调度策略",-1)),e[20]||(e[20]=o("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"12px"}}," 选择任务分配到工作实例的调度算法 ",-1)),n(k,{value:g.value.strategy,"onUpdate:value":e[0]||(e[0]=t=>g.value.strategy=t),block:"",options:[{label:"最少繁忙",value:"least_busy"},{label:"轮询",value:"round_robin"},{label:"随机",value:"random"}]},null,8,["value"])]),n(J,{gutter:16},{default:s(()=>[n(P,{xs:24,md:12},{default:s(()=>[o("div",de,[e[21]||(e[21]=o("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"故障转移",-1)),e[22]||(e[22]=o("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"12px"}}," 启用后,任务失败时会自动切换到其他可用实例重试 ",-1)),n(b,{checked:g.value.failover.enabled,"onUpdate:checked":e[1]||(e[1]=t=>g.value.failover.enabled=t)},null,8,["checked"])])]),_:1}),n(P,{xs:24,md:12},{default:s(()=>[o("div",ve,[e[23]||(e[23]=o("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"重试次数",-1)),e[24]||(e[24]=o("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"12px"}}," 故障转移时最大重试次数,范围 1-10 ",-1)),n(z,{value:g.value.failover.maxRetries,"onUpdate:value":e[2]||(e[2]=t=>g.value.failover.maxRetries=t),min:1,max:10,disabled:!g.value.failover.enabled,style:{width:"100%"},placeholder:"请输入重试次数"},null,8,["value","disabled"])])]),_:1})]),_:1}),o("div",me,[n(M,{type:"primary",onClick:H},{default:s(()=>[...e[25]||(e[25]=[v(" 保存设置 ",-1)])]),_:1})])]),_:1}),n(I,{bordered:!1,style:{width:"100%"}},{title:s(()=>[o("div",ye,[e[27]||(e[27]=o("span",null,"实例列表",-1)),n(M,{type:"primary",onClick:V},{default:s(()=>[...e[26]||(e[26]=[v(" 创建实例 ",-1)])]),_:1})])]),default:s(()=>[n(Y,{columns:O,"data-source":T.value,pagination:!1},{bodyCell:s(({column:t,record:m})=>[t.key==="name"?(i(),d("a",xe,x(m.name),1)):t.key==="workerCount"?(i(),d($,{key:1},[v(x(m.workers?m.workers.length:0),1)],64)):t.key==="proxy"?(i(),A(Q,{key:2,color:m.proxy?"green":"default"},{default:s(()=>[v(x(m.proxy?"已启用":"未启用"),1)]),_:2},1032,["color"])):t.key==="action"?(i(),d("span",ge,[o("a",{onClick:W=>B(m)},"编辑",8,fe),n(X,{type:"vertical"}),o("a",{style:{color:"#ff4d4f"},onClick:W=>E(m)},"删除",8,ke)])):y("",!0)]),_:1},8,["data-source"])]),_:1}),n(le,{open:w.value,"onUpdate:open":e[13]||(e[13]=t=>w.value=t),title:f.value===null?"创建实例":`编辑实例 - ${f.value.name}`,placement:"right",width:"500"},{footer:s(()=>[o("div",Fe,[n(M,{style:{"margin-right":"8px"},onClick:e[12]||(e[12]=t=>w.value=!1)},{default:s(()=>[...e[40]||(e[40]=[v("取消",-1)])]),_:1}),n(M,{type:"primary",onClick:L},{default:s(()=>[...e[41]||(e[41]=[v("保存",-1)])]),_:1})])]),default:s(()=>[o("div",we,[o("div",be,[e[28]||(e[28]=o("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"实例名称",-1)),e[29]||(e[29]=o("div",{style:{"font-size":"12px",color:"#ff4d4f","margin-bottom":"8px"}}," * 名称必须全局唯一,不可重复 ",-1)),n(U,{value:a.value.name,"onUpdate:value":e[3]||(e[3]=t=>a.value.name=t),placeholder:"请输入实例名称"},null,8,["value"])]),o("div",_e,[e[30]||(e[30]=o("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"数据标记",-1)),e[31]||(e[31]=o("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}}," 用于区分实例数据存储的文件夹名称 (userDataMark) ",-1)),n(U,{value:a.value.userDataMark,"onUpdate:value":e[4]||(e[4]=t=>a.value.userDataMark=t),placeholder:"请输入数据标记,如: main-gemini"},null,8,["value"])]),o("div",ce,[n(te,null,{default:s(()=>[n(ee,{key:"proxy",header:"代理设置"},{default:s(()=>[o("div",Ce,[n(b,{checked:a.value.proxy,"onUpdate:checked":e[5]||(e[5]=t=>a.value.proxy=t)},null,8,["checked"]),o("span",Me,x(a.value.proxy?"已启用代理":"未启用代理"),1)]),a.value.proxy?(i(),d("div",Ue,[e[32]||(e[32]=o("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"代理类型",-1)),n(k,{value:a.value.proxyType,"onUpdate:value":e[6]||(e[6]=t=>a.value.proxyType=t),block:"",options:[{label:"SOCKS5",value:"socks5"},{label:"HTTP",value:"http"}],style:{width:"100%"}},null,8,["value"])])):y("",!0),a.value.proxy?(i(),d("div",he,[e[33]||(e[33]=o("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"服务器地址",-1)),n(U,{value:a.value.proxyHost,"onUpdate:value":e[7]||(e[7]=t=>a.value.proxyHost=t),placeholder:"例如: 127.0.0.1"},null,8,["value"])])):y("",!0),a.value.proxy?(i(),d("div",Te,[e[34]||(e[34]=o("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"端口",-1)),n(z,{value:a.value.proxyPort,"onUpdate:value":e[8]||(e[8]=t=>a.value.proxyPort=t),min:1,max:65535,style:{width:"100%"},placeholder:"例如: 1080"},null,8,["value"])])):y("",!0),a.value.proxy?(i(),d("div",Pe,[e[35]||(e[35]=o("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"身份验证",-1)),n(b,{checked:a.value.proxyAuth,"onUpdate:checked":e[9]||(e[9]=t=>a.value.proxyAuth=t)},null,8,["checked"]),o("span",De,x(a.value.proxyAuth?"需要验证":"无需验证"),1)])):y("",!0),a.value.proxy&&a.value.proxyAuth?(i(),d("div",Se,[e[36]||(e[36]=o("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"用户名",-1)),n(U,{value:a.value.proxyUsername,"onUpdate:value":e[10]||(e[10]=t=>a.value.proxyUsername=t),placeholder:"请输入用户名"},null,8,["value"])])):y("",!0),a.value.proxy&&a.value.proxyAuth?(i(),d("div",We,[e[37]||(e[37]=o("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"密码",-1)),n(Z,{value:a.value.proxyPassword,"onUpdate:value":e[11]||(e[11]=t=>a.value.proxyPassword=t),placeholder:"请输入密码"},null,8,["value"])])):y("",!0)]),_:1})]),_:1})]),o("div",null,[o("div",Ae,[e[39]||(e[39]=o("div",{style:{"font-weight":"600"}},"Worker 列表",-1)),n(M,{size:"small",type:"primary",onClick:R},{default:s(()=>[...e[38]||(e[38]=[v(" 添加 Worker ",-1)])]),_:1})]),n(ae,{bordered:"","data-source":a.value.workers,style:{"margin-top":"8px"}},{renderItem:s(({item:t,index:m})=>[n(oe,null,{actions:s(()=>[o("a",{onClick:W=>K(m)},"编辑",8,$e),o("a",{style:{color:"#ff4d4f"},onClick:W=>G(m)},"删除",8,ze)]),default:s(()=>[o("div",null,[o("div",Ie,x(t.name),1),o("div",Ne,[v(" 类型: "+x(h(t.type))+" ",1),t.type==="merge"?(i(),d("span",He,[v(" | 聚合: "+x(t.mergeTypes?.map(h).join(", ")||"无")+" ",1),t.mergeMonitor?(i(),d("span",je," | 监控: "+x(h(t.mergeMonitor)),1)):y("",!0)])):y("",!0)])])]),_:2},1024)]),_:1},8,["data-source"])])])]),_:1},8,["open","title"]),n(ne,{open:C.value,"onUpdate:open":e[18]||(e[18]=t=>C.value=t),title:c.value===-1?"添加 Worker":"编辑 Worker",okText:"确定",cancelText:"取消",onOk:q},{default:s(()=>[o("div",Oe,[e[42]||(e[42]=o("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"Worker 名称",-1)),e[43]||(e[43]=o("div",{style:{"font-size":"12px",color:"#ff4d4f","margin-bottom":"8px"}}," * 名称必须全局唯一,不可重复 ",-1)),n(U,{value:p.value.name,"onUpdate:value":e[14]||(e[14]=t=>p.value.name=t),placeholder:"例如: default"},null,8,["value"])]),o("div",Ve,[e[44]||(e[44]=o("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"适配器类型",-1)),n(S,{value:p.value.type,"onUpdate:value":e[15]||(e[15]=t=>p.value.type=t),style:{width:"100%"},options:j.value},null,8,["value","options"])]),p.value.type==="merge"?(i(),d($,{key:0},[o("div",Be,[e[45]||(e[45]=o("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"聚合类型",-1)),e[46]||(e[46]=o("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}}," 选择要聚合的后端适配器(可多选) ",-1)),n(S,{value:p.value.mergeTypes,"onUpdate:value":e[16]||(e[16]=t=>p.value.mergeTypes=t),mode:"multiple",style:{width:"100%"},placeholder:"选择要聚合的适配器",options:F.value},null,8,["value","options"])]),o("div",Ee,[e[48]||(e[48]=o("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"空闲监控后端",-1)),e[49]||(e[49]=o("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}}," 空闲时挂机监控的后端(可选) ",-1)),n(S,{value:p.value.mergeMonitor,"onUpdate:value":e[17]||(e[17]=t=>p.value.mergeMonitor=t),style:{width:"100%"},placeholder:"选择监控后端(可留空)","allow-clear":""},{default:s(()=>[n(N,{value:""},{default:s(()=>[...e[47]||(e[47]=[v("无",-1)])]),_:1}),(i(!0),d($,null,pe(p.value.mergeTypes,t=>(i(),A(N,{key:t,value:t},{default:s(()=>[v(x(h(t)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])])],64)):y("",!0)]),_:1},8,["open","title"])]),_:1})}}};export{Ke as default}; diff --git a/webui/dist/assets/workers.js b/webui/dist/assets/workers.js new file mode 100644 index 0000000..5471c2f --- /dev/null +++ b/webui/dist/assets/workers.js @@ -0,0 +1 @@ +import{k as re,n as D,o as ie,r as _,b as A,d as i,w as s,c as n,g as o,f as r,h as v,j as d,e as y,t as x,F as $,p as pe}from"./index.js";const ue={style:{"margin-bottom":"24px"}},de={style:{"margin-bottom":"8px"}},ve={style:{"margin-bottom":"8px"}},me={style:{display:"flex","justify-content":"flex-end","margin-top":"24px"}},ye={style:{display:"flex","justify-content":"space-between","align-items":"center"}},xe={key:0},ge={key:3},fe=["onClick"],ke=["onClick"],we={style:{"margin-bottom":"24px"}},be={style:{"margin-bottom":"16px"}},_e={style:{"margin-bottom":"16px"}},ce={style:{"margin-bottom":"16px"}},Ce={style:{"margin-bottom":"16px"}},Me={style:{"margin-left":"8px"}},Ue={key:0,style:{"margin-bottom":"16px"}},he={key:1,style:{"margin-bottom":"16px"}},Te={key:2,style:{"margin-bottom":"16px"}},Pe={key:3,style:{"margin-bottom":"16px"}},De={style:{"margin-left":"8px"}},Se={key:4,style:{"margin-bottom":"16px"}},We={key:5,style:{"margin-bottom":"16px"}},Ae={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"8px"}},$e=["onClick"],ze=["onClick"],Ie={style:{"font-weight":"600"}},Ne={style:{"font-size":"12px",color:"#8c8c8c"}},He={key:0},je={key:0},Fe={style:{"text-align":"right"}},Oe={style:{"margin-bottom":"16px"}},Ve={style:{"margin-bottom":"16px"}},Be={style:{"margin-bottom":"16px"}},Ee={style:{"margin-bottom":"16px"}},Ke={__name:"workers",setup(Le){const u=re(),g=D({get:()=>u.poolConfig,set:l=>u.poolConfig=l}),H=async()=>{await u.savePoolConfig(g.value)};ie(async()=>{await Promise.all([u.fetchWorkerConfig(),u.fetchPoolConfig(),u.fetchAdaptersMeta()])});const j=D(()=>{const l=u.adaptersMeta.map(e=>({label:e.displayName||e.id,value:e.id}));return l.find(e=>e.value==="merge")||l.unshift({label:"Merge(聚合模式)",value:"merge"}),l}),F=D(()=>u.adaptersMeta.filter(l=>l.id!=="merge").map(l=>({label:l.displayName||l.id,value:l.id}))),h=l=>l==="merge"?"Merge(聚合模式)":u.adaptersMeta.find(k=>k.id===l)?.displayName||l,O=[{title:"实例名称",dataIndex:"name",key:"name"},{title:"Worker 数量",dataIndex:"workerCount",key:"workerCount"},{title:"代理",dataIndex:"proxy",key:"proxy"},{title:"数据标记",key:"userDataMark",dataIndex:"userDataMark"},{title:"操作",key:"action"}],T=D({get:()=>u.workerConfig,set:l=>{u.workerConfig=l}}),w=_(!1),f=_(null),a=_({name:"",userDataMark:"",proxy:!1,proxyType:"socks5",proxyHost:"",proxyPort:1080,proxyAuth:!1,proxyUsername:"",proxyPassword:"",workers:[]}),V=()=>{f.value=null;const l=Math.random().toString(36).substring(2,7);a.value={name:`instance-${(T.value||[]).length+1}-${l}`,userDataMark:"",proxy:!1,proxyType:"socks5",proxyHost:"",proxyPort:1080,proxyAuth:!1,proxyUsername:"",proxyPassword:"",workers:[]},w.value=!0},B=l=>{f.value=l,a.value={name:l.name,userDataMark:l.userDataMark||"",proxy:!!l.proxy,proxyType:l.proxy?.type||"socks5",proxyHost:l.proxy?.host||"",proxyPort:l.proxy?.port||1080,proxyAuth:l.proxy?.auth||!1,proxyUsername:l.proxy?.username||"",proxyPassword:l.proxy?.password||"",workers:l.workers?[...l.workers]:[]},(l.proxy===null||l.proxy===void 0)&&(a.value.proxy=!1),w.value=!0},E=async l=>{const e=T.value.filter(k=>k.id!==l.id);await u.saveWorkerConfig(e)},L=async()=>{const l={id:f.value?f.value.id:`inst_${Date.now()}`,name:a.value.name,userDataMark:a.value.userDataMark,workers:a.value.workers,proxy:a.value.proxy?{enable:!0,type:a.value.proxyType,host:a.value.proxyHost,port:a.value.proxyPort,auth:a.value.proxyAuth,username:a.value.proxyUsername,password:a.value.proxyPassword}:null};let e=[...T.value||[]];if(f.value===null)e.push(l);else{const b=e.findIndex(P=>P.id===f.value.id);b>-1&&(e[b]=l)}await u.saveWorkerConfig(e)&&(w.value=!1)},c=_(-1),C=_(!1),p=_({name:"",type:"lmarena",mergeTypes:[],mergeMonitor:""}),R=()=>{c.value=-1;const l=Math.random().toString(36).substring(2,7);p.value={name:`worker-${a.value.workers.length+1}-${l}`,type:"lmarena",mergeTypes:[],mergeMonitor:""},C.value=!0},K=l=>{c.value=l;const e=a.value.workers[l];p.value={name:e.name,type:e.type,mergeTypes:e.mergeTypes?[...e.mergeTypes]:[],mergeMonitor:e.mergeMonitor||""},C.value=!0},q=()=>{c.value===-1?a.value.workers.push({...p.value}):a.value.workers[c.value]={...p.value},C.value=!1},G=l=>{a.value.workers.splice(l,1)};return(l,e)=>{const k=r("a-segmented"),b=r("a-switch"),P=r("a-col"),z=r("a-input-number"),J=r("a-row"),M=r("a-button"),I=r("a-card"),Q=r("a-tag"),X=r("a-divider"),Y=r("a-table"),U=r("a-input"),Z=r("a-input-password"),ee=r("a-collapse-panel"),te=r("a-collapse"),oe=r("a-list-item"),ae=r("a-list"),le=r("a-drawer"),S=r("a-select"),N=r("a-select-option"),ne=r("a-modal"),se=r("a-layout");return i(),A(se,{style:{background:"transparent"}},{default:s(()=>[n(I,{title:"负载均衡",bordered:!1,style:{width:"100%","margin-bottom":"10px"}},{default:s(()=>[o("div",ue,[e[19]||(e[19]=o("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"调度策略",-1)),e[20]||(e[20]=o("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"12px"}}," 选择任务分配到工作实例的调度算法 ",-1)),n(k,{value:g.value.strategy,"onUpdate:value":e[0]||(e[0]=t=>g.value.strategy=t),block:"",options:[{label:"最少繁忙",value:"least_busy"},{label:"轮询",value:"round_robin"},{label:"随机",value:"random"}]},null,8,["value"])]),n(J,{gutter:16},{default:s(()=>[n(P,{xs:24,md:12},{default:s(()=>[o("div",de,[e[21]||(e[21]=o("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"故障转移",-1)),e[22]||(e[22]=o("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"12px"}}," 启用后,任务失败时会自动切换到其他可用实例重试 ",-1)),n(b,{checked:g.value.failover.enabled,"onUpdate:checked":e[1]||(e[1]=t=>g.value.failover.enabled=t)},null,8,["checked"])])]),_:1}),n(P,{xs:24,md:12},{default:s(()=>[o("div",ve,[e[23]||(e[23]=o("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"重试次数",-1)),e[24]||(e[24]=o("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"12px"}}," 故障转移时最大重试次数,范围 1-10 ",-1)),n(z,{value:g.value.failover.maxRetries,"onUpdate:value":e[2]||(e[2]=t=>g.value.failover.maxRetries=t),min:1,max:10,disabled:!g.value.failover.enabled,style:{width:"100%"},placeholder:"请输入重试次数"},null,8,["value","disabled"])])]),_:1})]),_:1}),o("div",me,[n(M,{type:"primary",onClick:H},{default:s(()=>[...e[25]||(e[25]=[v(" 保存设置 ",-1)])]),_:1})])]),_:1}),n(I,{bordered:!1,style:{width:"100%"}},{title:s(()=>[o("div",ye,[e[27]||(e[27]=o("span",null,"实例列表",-1)),n(M,{type:"primary",onClick:V},{default:s(()=>[...e[26]||(e[26]=[v(" 创建实例 ",-1)])]),_:1})])]),default:s(()=>[n(Y,{columns:O,"data-source":T.value,pagination:!1},{bodyCell:s(({column:t,record:m})=>[t.key==="name"?(i(),d("a",xe,x(m.name),1)):t.key==="workerCount"?(i(),d($,{key:1},[v(x(m.workers?m.workers.length:0),1)],64)):t.key==="proxy"?(i(),A(Q,{key:2,color:m.proxy?"green":"default"},{default:s(()=>[v(x(m.proxy?"已启用":"未启用"),1)]),_:2},1032,["color"])):t.key==="action"?(i(),d("span",ge,[o("a",{onClick:W=>B(m)},"编辑",8,fe),n(X,{type:"vertical"}),o("a",{style:{color:"#ff4d4f"},onClick:W=>E(m)},"删除",8,ke)])):y("",!0)]),_:1},8,["data-source"])]),_:1}),n(le,{open:w.value,"onUpdate:open":e[13]||(e[13]=t=>w.value=t),title:f.value===null?"创建实例":`编辑实例 - ${f.value.name}`,placement:"right",width:"500"},{footer:s(()=>[o("div",Fe,[n(M,{style:{"margin-right":"8px"},onClick:e[12]||(e[12]=t=>w.value=!1)},{default:s(()=>[...e[40]||(e[40]=[v("取消",-1)])]),_:1}),n(M,{type:"primary",onClick:L},{default:s(()=>[...e[41]||(e[41]=[v("保存",-1)])]),_:1})])]),default:s(()=>[o("div",we,[o("div",be,[e[28]||(e[28]=o("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"实例名称",-1)),e[29]||(e[29]=o("div",{style:{"font-size":"12px",color:"#ff4d4f","margin-bottom":"8px"}}," * 名称必须全局唯一,不可重复 ",-1)),n(U,{value:a.value.name,"onUpdate:value":e[3]||(e[3]=t=>a.value.name=t),placeholder:"请输入实例名称"},null,8,["value"])]),o("div",_e,[e[30]||(e[30]=o("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"数据标记",-1)),e[31]||(e[31]=o("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}}," 用于区分实例数据存储的文件夹名称 (userDataMark) ",-1)),n(U,{value:a.value.userDataMark,"onUpdate:value":e[4]||(e[4]=t=>a.value.userDataMark=t),placeholder:"请输入数据标记,如: main-gemini"},null,8,["value"])]),o("div",ce,[n(te,null,{default:s(()=>[n(ee,{key:"proxy",header:"代理设置"},{default:s(()=>[o("div",Ce,[n(b,{checked:a.value.proxy,"onUpdate:checked":e[5]||(e[5]=t=>a.value.proxy=t)},null,8,["checked"]),o("span",Me,x(a.value.proxy?"已启用代理":"未启用代理"),1)]),a.value.proxy?(i(),d("div",Ue,[e[32]||(e[32]=o("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"代理类型",-1)),n(k,{value:a.value.proxyType,"onUpdate:value":e[6]||(e[6]=t=>a.value.proxyType=t),block:"",options:[{label:"SOCKS5",value:"socks5"},{label:"HTTP",value:"http"}],style:{width:"100%"}},null,8,["value"])])):y("",!0),a.value.proxy?(i(),d("div",he,[e[33]||(e[33]=o("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"服务器地址",-1)),n(U,{value:a.value.proxyHost,"onUpdate:value":e[7]||(e[7]=t=>a.value.proxyHost=t),placeholder:"例如: 127.0.0.1"},null,8,["value"])])):y("",!0),a.value.proxy?(i(),d("div",Te,[e[34]||(e[34]=o("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"端口",-1)),n(z,{value:a.value.proxyPort,"onUpdate:value":e[8]||(e[8]=t=>a.value.proxyPort=t),min:1,max:65535,style:{width:"100%"},placeholder:"例如: 1080"},null,8,["value"])])):y("",!0),a.value.proxy?(i(),d("div",Pe,[e[35]||(e[35]=o("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"身份验证",-1)),n(b,{checked:a.value.proxyAuth,"onUpdate:checked":e[9]||(e[9]=t=>a.value.proxyAuth=t)},null,8,["checked"]),o("span",De,x(a.value.proxyAuth?"需要验证":"无需验证"),1)])):y("",!0),a.value.proxy&&a.value.proxyAuth?(i(),d("div",Se,[e[36]||(e[36]=o("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"用户名",-1)),n(U,{value:a.value.proxyUsername,"onUpdate:value":e[10]||(e[10]=t=>a.value.proxyUsername=t),placeholder:"请输入用户名"},null,8,["value"])])):y("",!0),a.value.proxy&&a.value.proxyAuth?(i(),d("div",We,[e[37]||(e[37]=o("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"密码",-1)),n(Z,{value:a.value.proxyPassword,"onUpdate:value":e[11]||(e[11]=t=>a.value.proxyPassword=t),placeholder:"请输入密码"},null,8,["value"])])):y("",!0)]),_:1})]),_:1})]),o("div",null,[o("div",Ae,[e[39]||(e[39]=o("div",{style:{"font-weight":"600"}},"Worker 列表",-1)),n(M,{size:"small",type:"primary",onClick:R},{default:s(()=>[...e[38]||(e[38]=[v(" 添加 Worker ",-1)])]),_:1})]),n(ae,{bordered:"","data-source":a.value.workers,style:{"margin-top":"8px"}},{renderItem:s(({item:t,index:m})=>[n(oe,null,{actions:s(()=>[o("a",{onClick:W=>K(m)},"编辑",8,$e),o("a",{style:{color:"#ff4d4f"},onClick:W=>G(m)},"删除",8,ze)]),default:s(()=>[o("div",null,[o("div",Ie,x(t.name),1),o("div",Ne,[v(" 类型: "+x(h(t.type))+" ",1),t.type==="merge"?(i(),d("span",He,[v(" | 聚合: "+x(t.mergeTypes?.map(h).join(", ")||"无")+" ",1),t.mergeMonitor?(i(),d("span",je," | 监控: "+x(h(t.mergeMonitor)),1)):y("",!0)])):y("",!0)])])]),_:2},1024)]),_:1},8,["data-source"])])])]),_:1},8,["open","title"]),n(ne,{open:C.value,"onUpdate:open":e[18]||(e[18]=t=>C.value=t),title:c.value===-1?"添加 Worker":"编辑 Worker",okText:"确定",cancelText:"取消",onOk:q},{default:s(()=>[o("div",Oe,[e[42]||(e[42]=o("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"Worker 名称",-1)),e[43]||(e[43]=o("div",{style:{"font-size":"12px",color:"#ff4d4f","margin-bottom":"8px"}}," * 名称必须全局唯一,不可重复 ",-1)),n(U,{value:p.value.name,"onUpdate:value":e[14]||(e[14]=t=>p.value.name=t),placeholder:"例如: default"},null,8,["value"])]),o("div",Ve,[e[44]||(e[44]=o("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"适配器类型",-1)),n(S,{value:p.value.type,"onUpdate:value":e[15]||(e[15]=t=>p.value.type=t),style:{width:"100%"},options:j.value},null,8,["value","options"])]),p.value.type==="merge"?(i(),d($,{key:0},[o("div",Be,[e[45]||(e[45]=o("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"聚合类型",-1)),e[46]||(e[46]=o("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}}," 选择要聚合的后端适配器(可多选) ",-1)),n(S,{value:p.value.mergeTypes,"onUpdate:value":e[16]||(e[16]=t=>p.value.mergeTypes=t),mode:"multiple",style:{width:"100%"},placeholder:"选择要聚合的适配器",options:F.value},null,8,["value","options"])]),o("div",Ee,[e[48]||(e[48]=o("div",{style:{"font-weight":"600","margin-bottom":"4px"}},"空闲监控后端",-1)),e[49]||(e[49]=o("div",{style:{"font-size":"12px",color:"#8c8c8c","margin-bottom":"8px"}}," 空闲时挂机监控的后端(可选) ",-1)),n(S,{value:p.value.mergeMonitor,"onUpdate:value":e[17]||(e[17]=t=>p.value.mergeMonitor=t),style:{width:"100%"},placeholder:"选择监控后端(可留空)","allow-clear":""},{default:s(()=>[n(N,{value:""},{default:s(()=>[...e[47]||(e[47]=[v("无",-1)])]),_:1}),(i(!0),d($,null,pe(p.value.mergeTypes,t=>(i(),A(N,{key:t,value:t},{default:s(()=>[v(x(h(t)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])])],64)):y("",!0)]),_:1},8,["open","title"])]),_:1})}}};export{Ke as default}; diff --git a/webui/dist/index.html b/webui/dist/index.html index 320cb19..62a2a33 100644 --- a/webui/dist/index.html +++ b/webui/dist/index.html @@ -6,8 +6,8 @@ WebAI2API - - + + diff --git a/webui/src/components/settings/browser.vue b/webui/src/components/settings/browser.vue index 27fa65b..7a06747 100644 --- a/webui/src/components/settings/browser.vue +++ b/webui/src/components/settings/browser.vue @@ -9,6 +9,7 @@ const formData = reactive({ path: '', headless: false, fission: true, + humanizeCursor: false, // false | true | 'camou' // CSS 性能优化 cssAnimation: false, cssFilter: false, @@ -29,6 +30,8 @@ onMounted(async () => { formData.path = cfg.path || ''; formData.headless = cfg.headless || false; formData.fission = cfg.fission !== false; // 默认 true + // humanizeCursor: false=禁用, true=ghost-cursor, 'camou'=Camoufox内置 + formData.humanizeCursor = cfg.humanizeCursor ?? false; // CSS 性能优化 if (cfg.cssInject) { @@ -59,6 +62,7 @@ const handleSave = async () => { font: formData.cssFont }, fission: formData.fission, + humanizeCursor: formData.humanizeCursor, proxy: { enable: formData.proxyEnable, type: formData.proxyType, @@ -120,6 +124,27 @@ const handleSave = async () => { + + + +
+
拟人鼠标轨迹模式
+
+ 控制鼠标点击的拟人化程度,影响性能和反爬检测风险 +
+ +
+ 使用 Playwright 原生点击,性能最好,但可能被检测为自动化 + 使用项目优化的 ghost-cursor + 模拟人类鼠标轨迹(如不会点击正中心),性能稍差 + 使用 Camoufox 内置的 humanize 功能,性能与拟人化的平衡选择 +
+
+
@@ -196,12 +221,8 @@ const handleSave = async () => { - +
@@ -211,7 +232,10 @@ const handleSave = async () => {
移除 transition 和 animation,显著降低 CPU 持续占用
- 风险:极低 + 风险:低 + + 几乎不影响浏览器指纹,但可能导致部分网页布局异常 +
diff --git a/webui/src/components/settings/server.vue b/webui/src/components/settings/server.vue index 7ffc37e..2371c32 100644 --- a/webui/src/components/settings/server.vue +++ b/webui/src/components/settings/server.vue @@ -1,6 +1,7 @@