From e51d981695b0764141a978321ef237781ab04af1 Mon Sep 17 00:00:00 2001 From: nixevol Date: Wed, 14 Oct 2026 17:29:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=20Vue=20=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E7=AE=B1=E4=BE=9B=E5=AF=B9=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 + README.md | 13 + api/__init__.py | 1 + api/__main__.py | 9 + api/app.py | 496 +++++++++ requirements-web.txt | 5 + start-web.cmd | 3 + start-web.ps1 | 143 +++ tests/test_web_api.py | 182 ++++ web/index.html | 12 + web/package-lock.json | 1752 ++++++++++++++++++++++++++++++ web/package.json | 20 + web/src/App.vue | 100 ++ web/src/api.js | 75 ++ web/src/components/FileField.vue | 110 ++ web/src/components/TaskCard.vue | 143 +++ web/src/main.js | 24 + web/src/styles.css | 64 ++ web/src/views/Buildings.vue | 193 ++++ web/src/views/Home.vue | 75 ++ web/src/views/Market.vue | 252 +++++ web/src/views/Results.vue | 124 +++ web/src/views/Tasks.vue | 86 ++ web/vite.config.js | 22 + 24 files changed, 3907 insertions(+) create mode 100644 api/__init__.py create mode 100644 api/__main__.py create mode 100644 api/app.py create mode 100644 requirements-web.txt create mode 100644 start-web.cmd create mode 100644 start-web.ps1 create mode 100644 tests/test_web_api.py create mode 100644 web/index.html create mode 100644 web/package-lock.json create mode 100644 web/package.json create mode 100644 web/src/App.vue create mode 100644 web/src/api.js create mode 100644 web/src/components/FileField.vue create mode 100644 web/src/components/TaskCard.vue create mode 100644 web/src/main.js create mode 100644 web/src/styles.css create mode 100644 web/src/views/Buildings.vue create mode 100644 web/src/views/Home.vue create mode 100644 web/src/views/Market.vue create mode 100644 web/src/views/Results.vue create mode 100644 web/src/views/Tasks.vue create mode 100644 web/vite.config.js diff --git a/.gitignore b/.gitignore index e5d9870..991fb13 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,10 @@ .venv/ .venv-ui/ +.venv-web/ __pycache__/ *.py[cod] +node_modules/ +web/dist/ # Local data artifacts source/* diff --git a/README.md b/README.md index d1e90b3..a4bfd8c 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,18 @@ python -m streamlit run app.py 界面导入 `source/江门市AOI级报表.csv` 后,按 AOI 与市场网格的最大接触面积自动写入 `source/AOI级报表_市场网格匹配.gpkg` 的 `所属市场网格`。只贴边、没有正面积的不归属。用户量和 4G 流程仍停用。 +## Vue 对比界面 + +现有 Streamlit 工具箱保持不变,仍用 `start-ui.cmd` 打开 `http://127.0.0.1:8501`。本节是同一仓库里的另一套界面,用来对照体验,不替换 `ui/`。两套可以同时开着,端口互不占用。 + +Windows 双击 `start-web.cmd`,或在项目目录运行 `./start-web.ps1`。脚本会先结束本项目已有的 Vue 界面和接口进程,再用独立的 `.venv-web` 安装 `requirements-web.txt`,并在 `web/` 安装前端依赖。接口只监听 `http://127.0.0.1:8765`,页面是 `http://127.0.0.1:5173`(开发服务把 `/api` 代理到接口)。控制台打印这两个地址并打开浏览器。关闭窗口会停止页面和接口。 + +五个页面与 Streamlit 对齐:工具箱首页、市场网格出图、楼宇数据查询、任务中心、成果浏览。出图和查询仍由原来的 Python 任务进程执行,同一时间只运行一个任务。连接信息仍写在 `output/toolbox/nr_connection.json`,只经任务进程的标准输入传递,不写入任务配置或日志。成果按文件下载;超过 128 MB 的文件请从本地目录复制。 + +几何编辑和规则引擎这次没有做。 + +接口测试:`.venv-web/Scripts/python.exe -m unittest tests.test_web_api -v`。前端构建:在 `web/` 执行 `npm run build`。 + ## 代码结构 `main.py` 保留为命令行入口;默认配置位于 `marketgrid/config.py`。 @@ -42,6 +54,7 @@ python -m streamlit run app.py | `marketgrid/legacy_user_count.py`、`metrics.py` | 保留的历史用户量与指标算法 | | `toolbox/` | 输入验证、独立任务进程、任务记录和成果读取 | | `ui/` | 页面和通用文件导入、任务进度组件 | +| `api/`、`web/` | Vue 对比界面的本地接口和页面;Streamlit 的 `ui/` 仍保留 | | `GetNRBuildingsData.py` | 可独立运行的异步楼宇查询 | 测试:`.venv-ui/Scripts/python.exe -m unittest discover -s tests -v`。 diff --git a/api/__init__.py b/api/__init__.py new file mode 100644 index 0000000..6f8a06f --- /dev/null +++ b/api/__init__.py @@ -0,0 +1 @@ +"""Vue 对比界面的本地接口包。""" diff --git a/api/__main__.py b/api/__main__.py new file mode 100644 index 0000000..ddb840d --- /dev/null +++ b/api/__main__.py @@ -0,0 +1,9 @@ +import uvicorn + + +def main(): + uvicorn.run("api.app:app", host="127.0.0.1", port=8765, log_level="info") + + +if __name__ == "__main__": + main() diff --git a/api/app.py b/api/app.py new file mode 100644 index 0000000..5e495ed --- /dev/null +++ b/api/app.py @@ -0,0 +1,496 @@ +"""Vue 对比界面的本地接口。只绑定 127.0.0.1,计算仍交给 toolbox 任务进程。""" +import json +import os +import sqlite3 +from pathlib import Path +from urllib.parse import quote +import uuid +import zipfile + +from fastapi import FastAPI, HTTPException, UploadFile +from fastapi.responses import JSONResponse, StreamingResponse +from pydantic import BaseModel + +from toolbox import tasks +from toolbox.tasks import ACTIVE, KINDS, LABELS, ROOT +from toolbox.validation import SOURCES, market_options, validate + +MAX_INLINE_DOWNLOAD = 128 * 1024**2 +CONNECTION_KEYS = ("URL", "COOKIES", "REFERER") +CONNECTION_FILE = ROOT / "output" / "toolbox" / "nr_connection.json" +SECRET_KEYS = {"URL", "COOKIES", "REFERER", "PASSWORD", "TOKEN", "SECRET"} +IMPORT_SUFFIXES = {".gpkg", ".csv", ".qgz"} +POLYGON_CSV = ROOT / "source" / "NRBuildPolygon.csv" +BUILDINGS_GPKG = ROOT / "source" / "NRBuildingsData.gpkg" + +app = FastAPI(title="MarketGrid", docs_url=None, redoc_url=None, openapi_url=None) + + +class TaskRequest(BaseModel): + kind: str + params: dict = {} + credentials: dict | None = None + + +def resolve_path(value): + text = str(value or "").strip().strip('"') + if not text: + return "" + path = Path(text).expanduser() + if not path.is_absolute(): + path = ROOT / path + return str(path.resolve()) + + +def require_int(params, key, low, high, label): + value = params.get(key) + if isinstance(value, bool) or not isinstance(value, int): + raise ValueError(f"{label}必须为整数。") + if not low <= value <= high: + raise ValueError(f"{label}超出范围。") + return value + + +def require_float(params, key, low, high, label): + value = params.get(key) + if isinstance(value, bool) or not isinstance(value, (int, float)): + raise ValueError(f"{label}必须为数字。") + if not low <= float(value) <= high: + raise ValueError(f"{label}超出范围。") + return float(value) + + +def script_defaults(): + import GetNRBuildingsData as script + return {key: str(getattr(script, key, "") or "") for key in CONNECTION_KEYS} + + +def load_connection(): + defaults = script_defaults() + try: + data = json.loads(CONNECTION_FILE.read_text(encoding="utf-8")) + except (OSError, ValueError): + return defaults + if not isinstance(data, dict): + return defaults + return {key: str(data.get(key, "") or "") or defaults[key] for key in CONNECTION_KEYS} + + +def save_connection(values): + if values is None: + CONNECTION_FILE.unlink(missing_ok=True) + return + CONNECTION_FILE.parent.mkdir(parents=True, exist_ok=True) + CONNECTION_FILE.write_text(json.dumps(values, ensure_ascii=False, indent=2), encoding="utf-8") + + +def public_task(state): + params = state.get("params") if isinstance(state.get("params"), dict) else {} + safe_params = {key: value for key, value in params.items() if str(key).upper() not in SECRET_KEYS} + status = state.get("status") or "" + kind = state.get("kind") or "" + return { + "id": state.get("id") or "", + "kind": kind, + "kind_label": KINDS.get(kind, kind), + "status": status, + "status_label": LABELS.get(status, status), + "active": status in ACTIVE, + "created": state.get("created"), + "finished": state.get("finished"), + "message": state.get("message") or "", + "done": state.get("done") or 0, + "total": state.get("total") or 0, + "counts": state.get("counts"), + "output": state.get("output") or "", + "stop_requested": bool(state.get("stop_requested")), + "params": safe_params, + } + + +def archive_count(task_list): + total = 0 + for task in task_list: + directory = Path(task.get("output") or "") + if not directory.is_dir(): + continue + total += sum(1 for path in directory.glob("*.zip") if path.is_file()) + return total + + +def source_rows(): + rows = [] + for label, relative, _extension in SOURCES.values(): + path = ROOT / relative + ready = path.is_file() + size = round(path.stat().st_size / 1024**2, 1) if ready else 0 + rows.append({ + "label": label, + "file": relative, + "status": "已就绪" if ready else "缺失", + "ready": ready, + "size_mb": size, + }) + return rows + + +def safe_task_dir(task_id): + if not task_id or task_id in {".", ".."} or any(part in task_id for part in ("/", "\\", ":")): + raise HTTPException(status_code=404, detail="任务不存在。") + root = tasks.TASKS.resolve() + directory = (root / task_id).resolve() + if directory.parent != root: + raise HTTPException(status_code=404, detail="任务不存在。") + return directory + + +def require_task(task_id): + directory = safe_task_dir(task_id) + if not (directory / "state.json").is_file(): + raise HTTPException(status_code=404, detail="任务不存在。") + state = tasks.read_task(directory) + return directory, state + + +def result_root(task_id): + directory, state = require_task(task_id) + root = Path(state.get("output") or "").resolve() + if root != directory and directory not in root.parents: + raise HTTPException(status_code=404, detail="成果目录不存在。") + return state, root + + +def result_file(task_id, name): + if not name or name != Path(name).name or name.startswith("."): + raise HTTPException(status_code=404, detail="文件不存在。") + state, root = result_root(task_id) + target = (root / name).resolve() + if target.parent != root or not target.is_file(): + raise HTTPException(status_code=404, detail="文件不存在。") + return state, target + + +def file_chunks(path, size=1024 * 1024): + with path.open("rb") as source: + while True: + block = source.read(size) + if not block: + break + yield block + + +def prepare_market(raw): + params = dict(raw or {}) + for key in SOURCES: + if params.get(key) in (None, ""): + raise ValueError("请完成所需数据的导入。") + params[key] = resolve_path(params[key]) + chosen = params.get("SELECTED_MARKET_IDS") + if not isinstance(chosen, list) or not chosen: + raise ValueError("请至少选择一个市场网格。") + ids = [] + for item in chosen: + if isinstance(item, bool) or not isinstance(item, int): + raise ValueError("市场选择无效。") + ids.append(item) + params["SELECTED_MARKET_IDS"] = ids + params["MAX_WORKERS"] = require_int(params, "MAX_WORKERS", 1, 16, "并行进程数") + params["SCALE"] = require_float(params, "SCALE", 0.1, 20, "分辨率倍数") + params["MAX_RASTER_PIXELS"] = require_int(params, "MAX_RASTER_PIXELS", 1_000_000, 100_000_000, "单市场像元上限") + params["SUMMARY_MAX_RASTER_PIXELS"] = require_int( + params, "SUMMARY_MAX_RASTER_PIXELS", 1_000_000, 200_000_000, "汇总像元上限") + params["PROJECT_EXTENT_PADDING_RATIO"] = require_float( + params, "PROJECT_EXTENT_PADDING_RATIO", 0, 1, "地图留白比例") + if params.get("CLIP_MODE") not in {"intersects", "center"}: + raise ValueError("网格纳入方式无效。") + if not isinstance(params.get("SUMMARY_OUTPUT_ENABLED"), bool): + raise ValueError("生成全量汇总包参数无效。") + for key, (label, _, _) in SOURCES.items(): + if not Path(params[key]).is_file(): + raise ValueError(f"{label}文件不存在:{params[key]}") + data_csv = resolve_path(params.get("NR_BUILDINGS_DATA_CSV") or "") + if not data_csv or not Path(data_csv).is_file() or not POLYGON_CSV.is_file(): + raise ValueError("缺少 source/NRBuildingsData.csv 或 source/NRBuildPolygon.csv。") + data_csv_path = Path(data_csv) + if (not BUILDINGS_GPKG.exists() + or BUILDINGS_GPKG.stat().st_mtime < max(data_csv_path.stat().st_mtime, POLYGON_CSV.stat().st_mtime)): + from marketgrid.nrdata import build_gpkg + build_gpkg(data_csv_path, POLYGON_CSV, BUILDINGS_GPKG) + params["NR_BUILDINGS_DATA_GPKG"] = str(BUILDINGS_GPKG) + params.pop("NR_BUILDINGS_DATA_CSV", None) + return params + + +def prepare_buildings(raw, credentials): + params = dict(raw or {}) + params["START_ROW"] = require_int(params, "START_ROW", 1, 10**9, "起始行") + limit = params.get("LIMIT") + if limit in (0, None): + params["LIMIT"] = None + else: + params["LIMIT"] = require_int(params, "LIMIT", 1, 10**9, "查询数量") + params["CONCURRENCY"] = require_int(params, "CONCURRENCY", 1, 32, "并发数") + params["TIMEOUT"] = require_int(params, "TIMEOUT", 1, 300, "超时") + params["MAX_RETRIES"] = require_int(params, "MAX_RETRIES", 0, 10, "失败重试") + params["REQUEST_INTERVAL"] = require_float(params, "REQUEST_INTERVAL", 0, 60, "请求间隔") + if params.get("INPUT_ENCODING") not in {"gbk", "utf-8-sig"}: + raise ValueError("文件编码无效。") + source = resolve_path(params.get("INPUT_CSV") or "") + if not source: + raise ValueError("请先导入楼宇轮廓文件。") + if not Path(source).is_file(): + raise ValueError(f"楼宇轮廓文件不存在:{source}") + params["INPUT_CSV"] = source + incoming = credentials or {} + url = str(incoming.get("URL") or "").strip() + cookies = str(incoming.get("COOKIES") or "").strip() + referer = str(incoming.get("REFERER") or "").strip() + override = bool(url or cookies) + if override and (not url.startswith(("http://", "https://")) or not cookies): + raise ValueError("服务地址和登录信息需同时填写,且地址以 http(s):// 开头。") + validate("buildings", params) + payload = {"URL": url, "COOKIES": cookies, "REFERER": referer} if override else None + save_connection(payload) + return params, payload + + +def content_disposition(name): + fallback = "".join(ch if ch.isascii() and ch not in '"\\;' else "_" for ch in name) or "download" + return f"attachment; filename=\"{fallback}\"; filename*=UTF-8''{quote(name)}" + + +@app.exception_handler(ValueError) +async def value_error(_, exc): + return JSONResponse(status_code=400, content={"detail": str(exc)}) + + +@app.exception_handler(OSError) +async def os_error(_, exc): + return JSONResponse(status_code=400, content={"detail": str(exc)}) + + +@app.exception_handler(sqlite3.Error) +async def sqlite_error(_, exc): + return JSONResponse(status_code=400, content={"detail": str(exc)}) + + +@app.exception_handler(zipfile.BadZipFile) +async def zip_error(_, exc): + return JSONResponse(status_code=400, content={"detail": str(exc)}) + + +@app.exception_handler(UnicodeError) +async def unicode_error(_, exc): + return JSONResponse(status_code=400, content={"detail": str(exc)}) + + +@app.get("/api/health") +def health(): + return {"ok": True} + + +@app.get("/api/home") +def home(): + task_list = tasks.list_tasks() + return { + "running": sum(task["status"] in ACTIVE for task in task_list), + "tasks": len(task_list), + "archives": archive_count(task_list), + "sources": source_rows(), + } + + +@app.get("/api/catalog") +def catalog(): + sources = [{ + "key": key, + "label": label, + "path": str((ROOT / relative).resolve()), + "relative": relative, + "extension": extension, + } for key, (label, relative, extension) in SOURCES.items()] + return { + "sources": sources, + "nr_csv": { + "key": "NR_BUILDINGS_DATA_CSV", + "label": "楼宇查询结果", + "path": str((ROOT / "source" / "NRBuildingsData.csv").resolve()), + "extension": "csv", + }, + "building_csv": { + "key": "INPUT_CSV", + "label": "楼宇轮廓清单", + "path": str((ROOT / "source" / "NRBuildPolygon.csv").resolve()), + "extension": "csv", + }, + } + + +@app.get("/api/files/stat") +def file_stat(path: str = ""): + resolved = resolve_path(path) + target = Path(resolved) if resolved else None + if target is None or not target.is_file(): + return {"path": resolved, "exists": False, "size": 0} + return {"path": str(target), "exists": True, "size": target.stat().st_size} + + +@app.get("/api/markets") +def market_list(path: str = ""): + resolved = resolve_path(path) + if not resolved or not Path(resolved).is_file(): + raise ValueError("请先导入可用的市场边界。") + try: + options = market_options(resolved) + except (OSError, sqlite3.Error, ValueError) as error: + raise ValueError(f"市场边界不可用:{error}") from error + return {"options": [{"id": fid, "name": name} for fid, name in options]} + + +@app.get("/api/connection") +def connection(): + return JSONResponse(content=load_connection(), headers={"Cache-Control": "no-store"}) + + +@app.post("/api/imports") +async def import_file(file: UploadFile): + name = Path(file.filename or "").name + suffix = Path(name).suffix.lower() + if not name or name.startswith(".") or suffix not in IMPORT_SUFFIXES: + raise ValueError("请选择 gpkg、csv 或 qgz 文件。") + folder = ROOT / "output" / "toolbox" / "imports" / uuid.uuid4().hex + folder.mkdir(parents=True) + target = folder / name + size = 0 + try: + with target.open("wb") as output: + while True: + chunk = await file.read(8 * 1024 * 1024) + if not chunk: + break + output.write(chunk) + size += len(chunk) + except Exception: + target.unlink(missing_ok=True) + raise + finally: + await file.close() + if size <= 0: + target.unlink(missing_ok=True) + raise ValueError("文件是空的。") + return {"path": str(target.resolve()), "name": name, "size": size} + + +@app.get("/api/tasks") +def list_task_view(): + return {"tasks": [public_task(task) for task in tasks.list_tasks()]} + + +@app.get("/api/tasks/{task_id}") +def task_view(task_id: str): + _, state = require_task(task_id) + return public_task(state) + + +@app.get("/api/tasks/{task_id}/log") +def task_log(task_id: str): + directory, _state = require_task(task_id) + return {"text": tasks.tail_log(directory)} + + +@app.post("/api/tasks") +def create_task(body: TaskRequest): + if body.kind == "market": + params = prepare_market(body.params) + task_id = tasks.start_task("market", params) + elif body.kind == "buildings": + params, credentials = prepare_buildings(body.params, body.credentials) + task_id = tasks.start_task("buildings", params, credentials) + else: + raise ValueError("未知工具。") + return {"id": task_id} + + +@app.post("/api/tasks/{task_id}/stop") +def stop(task_id: str): + require_task(task_id) + tasks.stop_task(task_id) + return {"ok": True} + + +@app.delete("/api/tasks/{task_id}") +def remove(task_id: str): + require_task(task_id) + tasks.delete_task(task_id) + return {"ok": True} + + +@app.post("/api/tasks/clear") +def clear(): + deleted, skipped = tasks.clear_tasks() + message = f"已删除 {deleted} 个任务。" + if skipped: + message += f" {skipped} 个运行中的任务已跳过。" + return {"deleted": deleted, "skipped": skipped, "message": message} + + +@app.get("/api/results") +def results(): + rows = [] + for task in tasks.list_tasks(): + view = public_task(task) + rows.append({ + "id": view["id"], + "label": f"{view['id']} · {view['kind_label']} · {view['status_label']}", + "output": view["output"], + "kind": view["kind"], + "status": view["status"], + }) + return {"tasks": rows} + + +@app.get("/api/results/{task_id}/files") +def result_files(task_id: str): + _state, root = result_root(task_id) + if not root.is_dir(): + return {"directory": str(root), "files": []} + files = sorted( + (path for path in root.iterdir() if path.is_file() and not path.name.startswith(".")), + key=lambda path: path.name.lower(), + ) + return { + "directory": str(root), + "files": [{ + "name": path.name, + "size": path.stat().st_size, + "too_large": path.stat().st_size > MAX_INLINE_DOWNLOAD, + } for path in files], + } + + +@app.get("/api/results/{task_id}/files/{name}") +def download_result(task_id: str, name: str): + _state, target = result_file(task_id, name) + size = target.stat().st_size + if size > MAX_INLINE_DOWNLOAD: + return JSONResponse(status_code=413, content={ + "detail": "文件较大,请从本地目录复制。", + "path": str(target), + "directory": str(target.parent), + }) + headers = { + "Content-Disposition": content_disposition(target.name), + "Content-Length": str(size), + } + return StreamingResponse(file_chunks(target), media_type="application/octet-stream", headers=headers) + + +@app.post("/api/results/{task_id}/open") +def open_result(task_id: str): + _state, root = result_root(task_id) + if not root.is_dir(): + raise ValueError("成果目录不存在。") + if os.name != "nt": + raise ValueError(f"请从本地目录复制:{root}") + os.startfile(root) + return {"ok": True} diff --git a/requirements-web.txt b/requirements-web.txt new file mode 100644 index 0000000..8463c3e --- /dev/null +++ b/requirements-web.txt @@ -0,0 +1,5 @@ +-r requirements-ui.txt +fastapi==0.143.0 +uvicorn==0.54.0 +python-multipart==0.0.32 +httpx==0.28.1 diff --git a/start-web.cmd b/start-web.cmd new file mode 100644 index 0000000..85947c7 --- /dev/null +++ b/start-web.cmd @@ -0,0 +1,3 @@ +@echo off +powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0start-web.ps1" +if errorlevel 1 pause diff --git a/start-web.ps1 b/start-web.ps1 new file mode 100644 index 0000000..ec764dd --- /dev/null +++ b/start-web.ps1 @@ -0,0 +1,143 @@ +$ErrorActionPreference = 'Stop' +Set-Location -LiteralPath $PSScriptRoot +$env:PYTHONIOENCODING = 'utf-8' +$env:PYTHONUTF8 = '1' +$ApiHost = '127.0.0.1' +$ApiPort = 8765 +$WebPort = 5173 +$PageUrl = "http://${ApiHost}:${WebPort}" +$ApiUrl = "http://${ApiHost}:${ApiPort}" +$Python = Join-Path $PSScriptRoot '.venv-web\Scripts\python.exe' +$WebDir = Join-Path $PSScriptRoot 'web' + +function Test-Listening([int] $Port) { + $pattern = ":$Port\s+" + netstat -ano | Where-Object { $_ -match $pattern -and $_ -match 'LISTENING' } +} + +function Stop-Tree($Proc) { + if (-not $Proc) { return } + $children = @(Get-CimInstance Win32_Process -Filter "ParentProcessId=$($Proc.Id)" -ErrorAction SilentlyContinue) + foreach ($child in $children) { + $childProc = Get-Process -Id $child.ProcessId -ErrorAction SilentlyContinue + if ($childProc) { Stop-Tree $childProc } + } + if (-not $Proc.HasExited) { + Stop-Process -Id $Proc.Id -Force -ErrorAction SilentlyContinue + } +} + +function Stop-ListenerIfOurs([int] $Port, [scriptblock] $Belongs) { + foreach ($line in @(Test-Listening $Port)) { + if ($line -notmatch '\s(\d+)\s*$') { continue } + $procId = [int]$Matches[1] + if ($procId -le 0) { continue } + $owner = Get-CimInstance Win32_Process -Filter "ProcessId=$procId" -ErrorAction SilentlyContinue + $cmd = if ($owner) { $owner.CommandLine } else { '' } + if (-not $cmd -or -not (& $Belongs $cmd)) { + throw "端口 $Port 被其他程序占用,无法启动。" + } + Stop-Process -Id $procId -Force -ErrorAction SilentlyContinue + } +} + +function Stop-ExistingWeb { + $root = $PSScriptRoot + $web = Join-Path $root 'web' + Get-CimInstance Win32_Process | Where-Object { + $_.CommandLine -and $_.ProcessId -ne $PID -and ( + ($_.Name -match 'python' -and $_.CommandLine -match 'api\.app' -and $_.CommandLine -match [regex]::Escape($root)) -or + ($_.Name -match 'node' -and $_.CommandLine -match 'vite' -and $_.CommandLine -match [regex]::Escape($web)) + ) + } | ForEach-Object { + Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue + } + Stop-ListenerIfOurs $ApiPort { param($cmd) $cmd -match 'api\.app' -and $cmd -match [regex]::Escape($PSScriptRoot) } + Stop-ListenerIfOurs $WebPort { param($cmd) $cmd -match 'vite' -and $cmd -match [regex]::Escape($WebDir) } + $deadline = (Get-Date).AddSeconds(10) + do { + if (-not (Test-Listening $ApiPort) -and -not (Test-Listening $WebPort)) { return } + Start-Sleep -Milliseconds 200 + } while ((Get-Date) -lt $deadline) + throw "端口 $ApiPort 或 $WebPort 仍被占用,无法启动。" +} + +function Wait-Port([int] $Port, $Proc, [string] $Name) { + $deadline = (Get-Date).AddSeconds(90) + while ((Get-Date) -lt $deadline) { + if ($Proc.HasExited) { throw "$Name 进程已退出,启动失败。" } + if (Test-Listening $Port) { return } + Start-Sleep -Milliseconds 300 + } + throw "等待${Name}启动超时。" +} + +function Start-Tool([string] $File, [string] $Arguments, [string] $Workdir) { + $psi = New-Object System.Diagnostics.ProcessStartInfo + $psi.FileName = $File + $psi.Arguments = $Arguments + $psi.WorkingDirectory = $Workdir + $psi.UseShellExecute = $false + return [System.Diagnostics.Process]::Start($psi) +} + +function Ensure-WebEnvironment { + if (Get-Command uv -ErrorAction SilentlyContinue) { + if (-not (Test-Path -LiteralPath $Python)) { + uv venv .venv-web --python 3.13 + if ($LASTEXITCODE -ne 0) { throw '创建 Python 环境失败。' } + } + uv pip install --python $Python -r requirements-web.txt + if ($LASTEXITCODE -ne 0) { throw '安装 Python 依赖失败。' } + return + } + if (-not (Test-Path -LiteralPath $Python)) { + python -m venv .venv-web + if ($LASTEXITCODE -ne 0) { throw '创建 Python 环境失败。' } + } + & $Python -m pip install -r requirements-web.txt + if ($LASTEXITCODE -ne 0) { throw '安装 Python 依赖失败。' } +} + +if (-not (Get-Command node -ErrorAction SilentlyContinue) -or -not (Get-Command npm.cmd -ErrorAction SilentlyContinue)) { + throw '未找到 Node.js 或 npm,无法启动 Vue 界面。请先安装 Node.js 后再运行 start-web。' +} + +Stop-ExistingWeb +Ensure-WebEnvironment +Push-Location -LiteralPath $WebDir +try { + & npm.cmd install --no-audit --no-fund + if ($LASTEXITCODE -ne 0) { throw '安装前端依赖失败。' } +} finally { + Pop-Location +} + +Write-Host '' +Write-Host '正在启动 MarketGrid Vue 对比界面' +Write-Host "页面:$PageUrl" +Write-Host "接口:$ApiUrl" +Write-Host 'Streamlit 工具箱仍使用 start-ui.cmd(http://127.0.0.1:8501)' +Write-Host '关闭本窗口会停止页面和接口。' +Write-Host '' + +$npm = (Get-Command npm.cmd).Source +$api = Start-Tool $Python '-m uvicorn api.app:app --host 127.0.0.1 --port 8765 --log-level info' $PSScriptRoot +try { + Wait-Port $ApiPort $api '接口' + $web = Start-Tool $npm 'run dev' $WebDir + try { + Wait-Port $WebPort $web '页面' + Write-Host "已启动:$PageUrl" + Start-Process $PageUrl + while (-not $api.HasExited -and -not $web.HasExited) { + Start-Sleep -Milliseconds 400 + } + if ($api.HasExited) { $code = $api.ExitCode } else { $code = $web.ExitCode } + exit $code + } finally { + Stop-Tree $web + } +} finally { + Stop-Tree $api +} diff --git a/tests/test_web_api.py b/tests/test_web_api.py new file mode 100644 index 0000000..c6a1a0c --- /dev/null +++ b/tests/test_web_api.py @@ -0,0 +1,182 @@ +"""Vue 接口测试。不启动真实出图,不打开 Grid 大文件。""" +import importlib.util +import json +from pathlib import Path +import tempfile +import unittest +from unittest.mock import patch + +from toolbox import tasks +from toolbox.tasks import ROOT + +FASTAPI_READY = importlib.util.find_spec("fastapi") is not None and importlib.util.find_spec("httpx") is not None + + +def _stamp(path): + if not path.exists(): + return None + stat = path.stat() + return (stat.st_mtime_ns, stat.st_size) + + +@unittest.skipUnless(FASTAPI_READY, "未安装 FastAPI,跳过 Vue 接口测试") +class WebApiTests(unittest.TestCase): + def setUp(self): + from fastapi.testclient import TestClient + from api.app import CONNECTION_FILE, app + + self.connection_file = CONNECTION_FILE + self.real_connection = _stamp(ROOT / "output" / "toolbox" / "nr_connection.json") + self.temp = tempfile.TemporaryDirectory(prefix="webapi_") + self.root = Path(self.temp.name) + self.addCleanup(self.temp.cleanup) + self.tasks_patch = patch("toolbox.tasks.TASKS", self.root / "tasks") + self.connection_patch = patch("api.app.CONNECTION_FILE", self.root / "nr_connection.json") + self.tasks_patch.start() + self.connection_patch.start() + self.addCleanup(self.tasks_patch.stop) + self.addCleanup(self.connection_patch.stop) + self.client = TestClient(app) + self.addCleanup(self.client.close) + + def tearDown(self): + self.assertEqual(_stamp(ROOT / "output" / "toolbox" / "nr_connection.json"), self.real_connection) + + def add_task(self, name, files): + folder = tasks.TASKS / name + results = folder / "results" + results.mkdir(parents=True) + for filename, payload in files.items(): + (results / filename).write_bytes(payload) + tasks.write_json(folder / "state.json", { + "id": name, "kind": "market", "status": "success", "created": 1700000000, + "output": str(results), "directory": str(folder), + "params": {"COOKIES": "should-not-appear", "MAX_WORKERS": 4}, + "done": 1, "total": 2, "message": "处理完成", + }) + return results + + def test_list_tasks(self): + marker = b"UNIQUE-BYTES-NOT-IN-TASK-LIST" + self.add_task("done-1", {"成果.zip": marker}) + with patch.object(Path, "read_bytes", side_effect=AssertionError("不应整文件读入")): + response = self.client.get("/api/tasks") + self.assertEqual(response.status_code, 200) + self.assertNotIn(marker, response.content) + self.assertNotIn("should-not-appear", response.text) + body = response.json() + self.assertEqual(len(body["tasks"]), 1) + task = body["tasks"][0] + self.assertEqual(task["id"], "done-1") + self.assertEqual(task["status_label"], "已完成") + self.assertEqual(task["params"], {"MAX_WORKERS": 4}) + self.assertNotIn("content", task) + cleared = self.client.post("/api/tasks/clear") + self.assertEqual(cleared.status_code, 200) + self.assertEqual(cleared.json()["deleted"], 1) + self.assertFalse((tasks.TASKS / "done-1").exists()) + + def test_start_validation_failure(self): + market = { + "kind": "market", + "params": { + "MARKET_GPKG": str(self.root / "missing.gpkg"), + "GRID_5G_GPKG": str(self.root / "missing-grid.gpkg"), + "BUILDING_INFO_GPKG": str(self.root / "missing-building.gpkg"), + "AOI_CSV": str(self.root / "missing.csv"), + "GIS_PROJECT_SOURCE": str(self.root / "missing.qgz"), + "NR_BUILDINGS_DATA_CSV": str(self.root / "missing-nr.csv"), + "SELECTED_MARKET_IDS": [1], + "MAX_WORKERS": 4, + "SCALE": 5, + "SUMMARY_OUTPUT_ENABLED": True, + "MAX_RASTER_PIXELS": 25_000_000, + "SUMMARY_MAX_RASTER_PIXELS": 100_000_000, + "CLIP_MODE": "intersects", + "PROJECT_EXTENT_PADDING_RATIO": 0.05, + }, + } + buildings = { + "kind": "buildings", + "params": { + "INPUT_CSV": str(self.root / "missing.csv"), + "INPUT_ENCODING": "gbk", + "START_ROW": 0, + "LIMIT": 1, + "CONCURRENCY": 1, + "TIMEOUT": 5, + "MAX_RETRIES": 0, + "REQUEST_INTERVAL": 0, + }, + "credentials": { + "URL": "http://127.0.0.1/wfs", + "COOKIES": "private-cookie-should-not-leak", + "REFERER": "", + }, + } + with patch("marketgrid.nrdata.build_gpkg", side_effect=AssertionError("不应整理楼宇")), \ + patch("api.app.tasks.start_task", side_effect=AssertionError("不应启动任务")): + market_response = self.client.post("/api/tasks", json=market) + buildings_response = self.client.post("/api/tasks", json=buildings) + self.assertEqual(market_response.status_code, 400) + self.assertIn("不存在", market_response.json()["detail"]) + self.assertEqual(buildings_response.status_code, 400) + self.assertIn("起始行", buildings_response.json()["detail"]) + self.assertNotIn("private-cookie-should-not-leak", buildings_response.text) + self.assertFalse((self.root / "nr_connection.json").exists()) + self.assertFalse(tasks.TASKS.exists() and any(tasks.TASKS.glob("*/state.json"))) + + def test_building_credentials_stay_out_of_task_response(self): + source = self.root / "楼宇轮廓.csv" + source.write_text("WKT,building_id\n", encoding="gbk") + cookie = "private-cookie-should-not-leak" + with patch("api.app.tasks.start_task", return_value="task-1") as start: + response = self.client.post("/api/tasks", json={ + "kind": "buildings", + "params": { + "INPUT_CSV": str(source), + "INPUT_ENCODING": "gbk", + "START_ROW": 1, + "LIMIT": 1, + "CONCURRENCY": 1, + "TIMEOUT": 5, + "MAX_RETRIES": 0, + "REQUEST_INTERVAL": 0, + }, + "credentials": {"URL": "http://127.0.0.1/wfs", "COOKIES": cookie, "REFERER": ""}, + }) + self.assertEqual(response.status_code, 200) + self.assertEqual(response.json(), {"id": "task-1"}) + self.assertNotIn(cookie, response.text) + kind, params, credentials = start.call_args.args + self.assertEqual(kind, "buildings") + self.assertNotIn("COOKIES", params) + self.assertNotIn("URL", params) + self.assertEqual(credentials["COOKIES"], cookie) + saved = json.loads((self.root / "nr_connection.json").read_text(encoding="utf-8")) + self.assertEqual(saved["COOKIES"], cookie) + self.assertNotIn(cookie, json.dumps(params, ensure_ascii=False)) + + def test_result_list_and_download_do_not_inline_file(self): + small = "成果内容".encode() + large = b"UNIQUE-BYTES-NOT-IN-JSON" + self.add_task("pack-1", {"成果.zip": small, "large.bin": large}) + with patch("api.app.MAX_INLINE_DOWNLOAD", len(small)), \ + patch.object(Path, "read_bytes", side_effect=AssertionError("不应整文件读入")): + listed = self.client.get("/api/results/pack-1/files") + downloaded = self.client.get("/api/results/pack-1/files/" + "成果.zip") + refused = self.client.get("/api/results/pack-1/files/large.bin") + self.assertEqual(listed.status_code, 200) + self.assertNotIn(large, listed.content) + self.assertNotIn(small, listed.content) + files = {item["name"]: item for item in listed.json()["files"]} + self.assertEqual(set(files), {"成果.zip", "large.bin"}) + self.assertFalse(files["成果.zip"]["too_large"]) + self.assertTrue(files["large.bin"]["too_large"]) + self.assertNotIn("content", files["成果.zip"]) + self.assertEqual(downloaded.status_code, 200) + self.assertEqual(downloaded.content, small) + self.assertIn("filename*=UTF-8''", downloaded.headers["content-disposition"]) + self.assertEqual(refused.status_code, 413) + self.assertNotIn(large, refused.content) + self.assertIn("本地目录", refused.json()["detail"]) diff --git a/web/index.html b/web/index.html new file mode 100644 index 0000000..c3412aa --- /dev/null +++ b/web/index.html @@ -0,0 +1,12 @@ + + + + + + MarketGrid 工具箱 + + +
+ + + diff --git a/web/package-lock.json b/web/package-lock.json new file mode 100644 index 0000000..c5f0c3b --- /dev/null +++ b/web/package-lock.json @@ -0,0 +1,1752 @@ +{ + "name": "marketgrid-web", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "marketgrid-web", + "version": "0.1.0", + "dependencies": { + "naive-ui": "2.45.3", + "vue": "3.5.44", + "vue-router": "5.4.0" + }, + "devDependencies": { + "@vitejs/plugin-vue": "6.0.10", + "vite": "8.3.4" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", + "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.9.tgz", + "integrity": "sha512-CjXrNHTnvqBVqHgdBysY3vk2T8tpJHb5/RMeHJBTyVa9xgugCB0CJTx/3oO8RV2QRQP391RWpB7D6hLjm8V9uA==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.8" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz", + "integrity": "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@css-render/plugin-bem": { + "version": "0.15.14", + "resolved": "https://registry.npmjs.org/@css-render/plugin-bem/-/plugin-bem-0.15.14.tgz", + "integrity": "sha512-QK513CJ7yEQxm/P3EwsI+d+ha8kSOcjGvD6SevM41neEMxdULE+18iuQK6tEChAWMOQNQPLG/Rw3Khb69r5neg==", + "license": "MIT", + "peerDependencies": { + "css-render": "~0.15.14" + } + }, + "node_modules/@css-render/vue3-ssr": { + "version": "0.15.14", + "resolved": "https://registry.npmjs.org/@css-render/vue3-ssr/-/vue3-ssr-0.15.14.tgz", + "integrity": "sha512-//8027GSbxE9n3QlD73xFY6z4ZbHbvrOVB7AO6hsmrEzGbg+h2A09HboUyDgu+xsmj7JnvJD39Irt+2D0+iV8g==", + "license": "MIT", + "peerDependencies": { + "vue": "^3.0.11" + } + }, + "node_modules/@emotion/hash": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz", + "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==", + "license": "MIT" + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@juggle/resize-observer": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@juggle/resize-observer/-/resize-observer-3.4.0.tgz", + "integrity": "sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==", + "license": "Apache-2.0" + }, + "node_modules/@oxc-project/types": { + "version": "0.153.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.153.0.tgz", + "integrity": "sha512-jSNrRIyvPVLL5E1z/tS5zLAprosGz/FuI1PWwEOz59j3E4TTTzSpqKb/RDGqJhhW0QHYISGXxq582wGx6T11Tw==", + "devOptional": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/oxc-project" + } + }, + "node_modules/@rolldown/binding-android-arm-eabi": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.13.tgz", + "integrity": "sha512-Vu/NICrgdRvUOeaJZIyB2FP63s6fO/4ud5l8dXmxDx9yDyn+mN0y+gsvsVviSli+T361Aqo0h46EuMoobrwawA==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.13.tgz", + "integrity": "sha512-6LEoIrGy5vvCd2boNnv2soPSUZj/PRvhp8R/t9KlX+mIZxThIE/ZqxrGXxmuNX0FuvQFvLdZr7S4HrYpYBVhEQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.13.tgz", + "integrity": "sha512-CaJSRzlQ6Q+zkDMVA9OkVxBjVoPRCDEE3v0FSJ9kIQBgRjFApA3Si4ijhbNVUji7ZJt+PfO0e46qy4nPInHUPA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.13.tgz", + "integrity": "sha512-e4r340I5hxSzJkD3YJBxgzq/rJ3wwxwdLLb2FPt1Zpyem20nrQPT11DDEEkazwxaHumH8wpglsp/Ozgj/wT6mw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.13.tgz", + "integrity": "sha512-hoBWDZ4/K/mJKVMbsgUd1jfpA2DiOrJ54mpegObU9TBHBBrtX4FLIXJJQRDPZ/2Dn91GvPob+Z2hwKJzf4E5SQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.13.tgz", + "integrity": "sha512-oF9fZu3vTWnTiVAkDFxU9PJLt1nh20K9RRpuHsR7ZnE2L7XookBbDBVLojCVSLGbvtSlxeUNnjAj6DbNsKyzbg==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.13.tgz", + "integrity": "sha512-DTpb/+jMiqWMPgphn4ksW1zW+XLJ6dJJ9FMvnIk9I291LhCctMPhMYJrP5t9p6C9qa3KXadDdUEZHBaPh3kNxQ==", + "cpu": [ + "arm64" + ], + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.13.tgz", + "integrity": "sha512-xU+Kvv9N2A3SY35zFh1FWWNjxbadE/BKeqnkXe7vScU4GZsw757BlVmDLITZEq8DPpk6m7uoDYkK7P+x/uU5Ow==", + "cpu": [ + "arm64" + ], + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.13.tgz", + "integrity": "sha512-XMk/hnhh25oQ756Lclb1Q11h4ll0xC0Esa5w4Vzp+mAE2S3AGJgeM0SonrIgY8fHhjarb6hcoTuwoFG0VVP2ig==", + "cpu": [ + "ppc64" + ], + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.13.tgz", + "integrity": "sha512-U1BoTHYmlywE2n3HUWjzZ+8EQsKr+OwpxYuDWaubx42tUL8QSL7nOqRz/NVHanibbFP3M1Rxuprz/wNcbMKjqw==", + "cpu": [ + "s390x" + ], + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.13.tgz", + "integrity": "sha512-J4cm80Pc6wEwV5AZ42o62sIQgDk+Y7R2s646jIwuvO+4V46QB58N4vVuMPWCBaNgursXLpmUWJV//WQAkPvHBQ==", + "cpu": [ + "x64" + ], + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.13.tgz", + "integrity": "sha512-W0euZS40U4V6JkmEnVCIX9mcsL6cbXQ4X8c2w+MMOIjFg68TXUW+u3RT+2e1t1pv9mg/EP3pDtK3POXdQ7Rxyw==", + "cpu": [ + "x64" + ], + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.13.tgz", + "integrity": "sha512-do/AF/4n9MRshia3a5aXoy8xM2c6mgfT6D7H/dY6my5z+hfCIR4ab7mk4IRj++nsEQpKy39kd0DQnDq+r692tw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.13.tgz", + "integrity": "sha512-6FtUf2cJZobutJdxnGYX8z0vtbgqU0b2v8vfBhkXb9wp2MppMFtkunE+IaOntyi01rkIQoPW2GHABtfzsC0BRQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.13.tgz", + "integrity": "sha512-UKhFaZTeTcbKrb3iU82m17jVcPEAoqDkCN5MBqgPyZSwp/cQmib21crTS0DdH7T1B7wZRWEI89YQAOJMet5yhg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "license": "MIT" + }, + "node_modules/@types/lodash": { + "version": "4.17.26", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.26.tgz", + "integrity": "sha512-48NWfiY6oNcKOh47Z4h+sIvwcQR91h6KPhaYKgeMIrkT2jV82Gy90SErj60vW8jQbeMSOSbhIv3bZ7JoqPPVhA==", + "license": "MIT" + }, + "node_modules/@types/lodash-es": { + "version": "4.17.12", + "resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.12.tgz", + "integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==", + "license": "MIT", + "dependencies": { + "@types/lodash": "*" + } + }, + "node_modules/@vitejs/plugin-vue": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-6.0.10.tgz", + "integrity": "sha512-b80aUQh3n+qEzzZm5oQp3rT2QImeCx58K6eFl/RkJ3d65KW0kTuv5lNsLRVAjbW9YRUpo/wzmvzMgV34bTAItA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rolldown/pluginutils": "^1.0.1" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", + "vue": "^3.2.25 || ^3.6.0-rc.10" + } + }, + "node_modules/@vue-macros/common": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@vue-macros/common/-/common-3.1.4.tgz", + "integrity": "sha512-/5Fv+6DgIcM9ajY05ZmKBv+LMX1M9A0X+IUwDRVdt67ciw8OV9bvG2r34p3RiEadlsQybjhKPRKNXDC8Bp23cw==", + "license": "MIT", + "dependencies": { + "@vue/compiler-sfc": "^3.5.22", + "ast-kit": "^2.1.2", + "local-pkg": "^1.1.2", + "magic-string-ast": "^1.0.2", + "unplugin-utils": "^0.3.0" + }, + "engines": { + "node": ">=20.19.0" + }, + "funding": { + "url": "https://github.com/sponsors/vue-macros" + }, + "peerDependencies": { + "vue": "^2.7.0 || ^3.2.25" + }, + "peerDependenciesMeta": { + "vue": { + "optional": true + } + } + }, + "node_modules/@vue/compiler-core": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.44.tgz", + "integrity": "sha512-k34nCytbK8PQ1gR2mGROYOw6Pnv/mumqIdrZ3x2tbyXZDWm7ViKGLTfdB+DRrWqEQsLgGJvn0WN9jBif5zCTLQ==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.9", + "@vue/shared": "3.5.44", + "entities": "^7.0.1", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.2" + } + }, + "node_modules/@vue/compiler-dom": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.44.tgz", + "integrity": "sha512-W5AoBFWdw1lQAKiHowkfgFKFab82oSRT6sGsPfw/q1GRjsy/ZJFLHGhJyBRIFN9APLTUduDH9U2JAiPOIyKuYg==", + "license": "MIT", + "dependencies": { + "@vue/compiler-core": "3.5.44", + "@vue/shared": "3.5.44" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.44.tgz", + "integrity": "sha512-dzHmQ4jXTpdr5FjIQUeykVakN/uzqFbUo9/C5ikBFg3a3PeM6uRxeczx1ZbXBML0/zJstEh3ygYipzR5Z7b2Pw==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.9", + "@vue/compiler-core": "3.5.44", + "@vue/compiler-dom": "3.5.44", + "@vue/compiler-ssr": "3.5.44", + "@vue/shared": "3.5.44", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.21", + "postcss": "^8.5.29", + "source-map-js": "^1.2.2" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.44.tgz", + "integrity": "sha512-xr5gb1JVHlfXJwSlRz1FeP6uxoazdzHuMTVLE7up+4Vrqxk219CvxLPxD9NXBt47yvZW7+p4DXfyp4O1fkByIA==", + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.44", + "@vue/shared": "3.5.44" + } + }, + "node_modules/@vue/devtools-api": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-8.2.1.tgz", + "integrity": "sha512-6u4vXBlIBAC1wMplIZgpyPn7uh/s4Bf6F5bMzvLv+EdJ0aHs/+4B7Ygv864EStQSjRbsRzTko/kUG1A1IejQ3A==", + "license": "MIT", + "dependencies": { + "@vue/devtools-kit": "^8.2.1" + } + }, + "node_modules/@vue/devtools-kit": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-8.2.1.tgz", + "integrity": "sha512-FIGIuq3AWReEpbAHY/cRGeHDfI0qOb8OCQ3YjbEAX04uaxIDbGc9rhkbVcG7rnfHPXE3RsU5KrWOu9V/okd8AQ==", + "license": "MIT", + "dependencies": { + "@vue/devtools-shared": "^8.2.1", + "birpc": "^2.6.1", + "hookable": "^5.5.3", + "perfect-debounce": "^2.0.0" + } + }, + "node_modules/@vue/devtools-shared": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-8.2.1.tgz", + "integrity": "sha512-Fkac7lUdGReh6pVOi3AYPRGe82LQqRmAfThW7RRligOAP0ZA/Z1z9XLHDM9dv34pV2HRc79DK8uKPeG2fLnA/g==", + "license": "MIT" + }, + "node_modules/@vue/reactivity": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.44.tgz", + "integrity": "sha512-u+QJdKeBBEADkPdevsL+6E12QlYVfBD8Zcw5qjDQKtamI6l14KyqazJMobhCKelhWN5zpyKUiEDoTyHE93cqWw==", + "license": "MIT", + "dependencies": { + "@vue/shared": "3.5.44" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.44.tgz", + "integrity": "sha512-uEa/ndwjhrrhnOfb2p+sZy6zeoamJOISqaLSJGk/8R6nABT1ZldpzcJoPzKj+zHVomVBPcmQYyC2r4LtvDV6CQ==", + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.44", + "@vue/shared": "3.5.44" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.44.tgz", + "integrity": "sha512-3fc4ARcXVhVBaJ3ujWiNZJARD6pkyRcwG+ZYhMzjKtKUp7MAY0HLwr7r3Smep3Li6ZaWT6ewdmx8XqdaD5oNZg==", + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.44", + "@vue/runtime-core": "3.5.44", + "@vue/shared": "3.5.44", + "csstype": "^3.2.3" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.44.tgz", + "integrity": "sha512-R4S1UoH4h5Frrauv8Z5XE5TxV9oBiUSgWIC4TyVK1FK+RocRnOLwFA5Xcmo2011RlgJp+AbZCnw6afrhlgRuUQ==", + "license": "MIT", + "dependencies": { + "@vue/compiler-ssr": "3.5.44", + "@vue/runtime-dom": "3.5.44", + "@vue/shared": "3.5.44" + } + }, + "node_modules/@vue/shared": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.44.tgz", + "integrity": "sha512-H82XLH0DjmSOdbEwO15x3QTo1f5PWEtv237eLpYKc0mqLu+B8hnq16lFWmuBmNurkeiG3wr+oM1FhOll/YVFRg==", + "license": "MIT" + }, + "node_modules/acorn": { + "version": "8.19.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.19.0.tgz", + "integrity": "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ast-kit": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ast-kit/-/ast-kit-2.2.0.tgz", + "integrity": "sha512-m1Q/RaVOnTp9JxPX+F+Zn7IcLYMzM8kZofDImfsKZd8MbR+ikdOzTeztStWqfrqIxZnYWryyI9ePm3NGjnZgGw==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.28.5", + "pathe": "^2.0.3" + }, + "engines": { + "node": ">=20.19.0" + }, + "funding": { + "url": "https://github.com/sponsors/sxzz" + } + }, + "node_modules/ast-walker-scope": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/ast-walker-scope/-/ast-walker-scope-0.10.0.tgz", + "integrity": "sha512-KzvoxDfXNz2Gm8KYLh47K3qcY3Zza3WKOuh2xoqa7LBu6MDKWAZLovJtU9DuAd/Er+rhQHCRn619lHS5U+qmhw==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^8.0.0", + "@babel/types": "^8.0.0", + "ast-kit": "^3.0.0" + }, + "engines": { + "node": "^22.18.0 || >=24.11.0" + }, + "funding": { + "url": "https://github.com/sponsors/sxzz" + } + }, + "node_modules/ast-walker-scope/node_modules/@babel/helper-string-parser": { + "version": "8.0.6", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-8.0.6.tgz", + "integrity": "sha512-+6HYEBnsDRZHJtUTAEfMQd0zMDqdFHS7C+5vAsEZqBUr3vEMWOWlHJ0Jz1gS8jJIlCvLsuA6ivmeoqzH936YcA==", + "license": "MIT", + "engines": { + "node": "^22.18.0 || >=24.11.0" + } + }, + "node_modules/ast-walker-scope/node_modules/@babel/helper-validator-identifier": { + "version": "8.0.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-8.0.6.tgz", + "integrity": "sha512-HYx0YmuchRxRSpnjvcNffnPS8DCauKNmnumIuHG3jnQAVewRA7kfJGwF13ayEpSZs7s4R/oBH4eppuXcAQd5JQ==", + "license": "MIT", + "engines": { + "node": "^22.18.0 || >=24.11.0" + } + }, + "node_modules/ast-walker-scope/node_modules/@babel/parser": { + "version": "8.0.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-8.0.7.tgz", + "integrity": "sha512-UkDwEbPO1px2JQSrdh4qIgaH1JgG7GO/pFeJkpxhDxIETkT/QvGpnigXIw75ViHYPtIgKITmVUJqLjiO+JuWjA==", + "license": "MIT", + "dependencies": { + "@babel/types": "^8.0.6" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": "^22.18.0 || >=24.11.0" + } + }, + "node_modules/ast-walker-scope/node_modules/@babel/types": { + "version": "8.0.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-8.0.6.tgz", + "integrity": "sha512-c+xgSWboV2pdwXP67BUWDVRHi2BO5Q3KwxyFVs7taVTY+fsK47/L51ZXQoV9rozHJDNHvJ4v4WEsI/IlxV2l2A==", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^8.0.6", + "@babel/helper-validator-identifier": "^8.0.6" + }, + "engines": { + "node": "^22.18.0 || >=24.11.0" + } + }, + "node_modules/ast-walker-scope/node_modules/ast-kit": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ast-kit/-/ast-kit-3.0.0.tgz", + "integrity": "sha512-8OG92q3R35qjC/4i6BLBMg8IB+fClWu/1PEwg2Z9Rn+BuNaiEgJzpzn+pxWOdHJWDCAwu2JP0wCDTozAM4QirQ==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^8.0.0", + "estree-walker": "^3.0.3", + "pathe": "^2.0.3" + }, + "engines": { + "node": "^22.18.0 || >=24.11.0" + }, + "funding": { + "url": "https://github.com/sponsors/sxzz" + } + }, + "node_modules/ast-walker-scope/node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/async-validator": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-4.2.5.tgz", + "integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==", + "license": "MIT" + }, + "node_modules/birpc": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/birpc/-/birpc-2.9.0.tgz", + "integrity": "sha512-KrayHS5pBi69Xi9JmvoqrIgYGDkD6mcSe/i6YKi3w5kekCLzrX4+nawcXqrj2tIp50Kw/mT/s3p+GVK0A0sKxw==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/chokidar": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", + "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", + "license": "MIT", + "dependencies": { + "readdirp": "^5.0.0" + }, + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/confbox": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.3.1.tgz", + "integrity": "sha512-cKUSoKa8YxFZZSmraVi7onONx3amu77ngK3kGpsYHDH7drPwCRkQE1RYMPlLRrMtnciRj274XNRxcHxnKmDSnA==", + "license": "MIT" + }, + "node_modules/css-render": { + "version": "0.15.14", + "resolved": "https://registry.npmjs.org/css-render/-/css-render-0.15.14.tgz", + "integrity": "sha512-9nF4PdUle+5ta4W5SyZdLCCmFd37uVimSjg1evcTqKJCyvCEEj12WKzOSBNak6r4im4J4iYXKH1OWpUV5LBYFg==", + "license": "MIT", + "dependencies": { + "@emotion/hash": "~0.8.0", + "csstype": "~3.0.5" + } + }, + "node_modules/css-render/node_modules/csstype": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.11.tgz", + "integrity": "sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==", + "license": "MIT" + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "license": "MIT" + }, + "node_modules/date-fns": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.4.0.tgz", + "integrity": "sha512-+1UMbeh68lH1SegH83CGWwpb6OHHbpSgr3+s5Eww5M4CAgswBpoWS0AjTOfEJ33HiYKz1hdj/KTFprzXHmq/6w==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/kossnocorp" + } + }, + "node_modules/date-fns-tz": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/date-fns-tz/-/date-fns-tz-3.2.0.tgz", + "integrity": "sha512-sg8HqoTEulcbbbVXeg84u5UnlsQa8GS5QXMqjjYIhS4abEVVKIUwe0/l/UhrZdKaL/W5eWZNlbTeEIiOXTcsBQ==", + "license": "MIT", + "peerDependencies": { + "date-fns": "^3.0.0 || ^4.0.0" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "devOptional": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "license": "MIT" + }, + "node_modules/evtd": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/evtd/-/evtd-0.2.4.tgz", + "integrity": "sha512-qaeGN5bx63s/AXgQo8gj6fBkxge+OoLddLniox5qtLAEY5HSnuSlISXVPxnSae1dWblvTh4/HoMIB+mbMsvZzw==", + "license": "MIT" + }, + "node_modules/exsolve": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.1.3.tgz", + "integrity": "sha512-kuzL9zherLQoqDeQaS55AiiIg1kb4KYXaSusTtgZTPlvKP2gGCI82LNmBNh5RjDVUXIcmgx+/Mx7vPwRzBbhJA==", + "license": "MIT" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/highlight.js": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.12.0.tgz", + "integrity": "sha512-nbfWpyRMcMrPMmDwJB+dhX/eiaPKtc2RB+0QZskqJ3WjRA/FDS0e9hZrx8EC/lbEv8gXy98FcDbNa/dspAaJMg==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/hookable": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/hookable/-/hookable-5.5.3.tgz", + "integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==", + "license": "MIT" + }, + "node_modules/lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", + "devOptional": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", + "cpu": [ + "arm" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", + "cpu": [ + "arm64" + ], + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", + "cpu": [ + "arm64" + ], + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", + "cpu": [ + "x64" + ], + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", + "cpu": [ + "x64" + ], + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/local-pkg": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-1.2.1.tgz", + "integrity": "sha512-++gUqRDEvcnN6Zhqrr+y/CkVEHhlrR96vZn3nZZPYzMcBUyBtTKzB9NadClFIsIVSsu+3i9tfk/erqy9kAmt7Q==", + "license": "MIT", + "dependencies": { + "mlly": "^1.7.4", + "pkg-types": "^2.3.0", + "quansync": "^0.2.11" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/lodash": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", + "license": "MIT" + }, + "node_modules/lodash-es": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.18.1.tgz", + "integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==", + "license": "MIT" + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/magic-string-ast": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/magic-string-ast/-/magic-string-ast-1.0.3.tgz", + "integrity": "sha512-CvkkH1i81zl7mmb94DsRiFeG9V2fR2JeuK8yDgS8oiZSFa++wWLEgZ5ufEOyLHbvSbD1gTRKv9NdX69Rnvr9JA==", + "license": "MIT", + "dependencies": { + "magic-string": "^0.30.19" + }, + "engines": { + "node": ">=20.19.0" + }, + "funding": { + "url": "https://github.com/sponsors/sxzz" + } + }, + "node_modules/mlly": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.2.tgz", + "integrity": "sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA==", + "license": "MIT", + "dependencies": { + "acorn": "^8.16.0", + "pathe": "^2.0.3", + "pkg-types": "^1.3.1", + "ufo": "^1.6.3" + } + }, + "node_modules/mlly/node_modules/confbox": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", + "license": "MIT" + }, + "node_modules/mlly/node_modules/pkg-types": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", + "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", + "license": "MIT", + "dependencies": { + "confbox": "^0.1.8", + "mlly": "^1.7.4", + "pathe": "^2.0.1" + } + }, + "node_modules/muggle-string": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/muggle-string/-/muggle-string-0.4.1.tgz", + "integrity": "sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==", + "license": "MIT" + }, + "node_modules/naive-ui": { + "version": "2.45.3", + "resolved": "https://registry.npmjs.org/naive-ui/-/naive-ui-2.45.3.tgz", + "integrity": "sha512-D83gJ+6zUdkQ5DuUbmlfyaM1t8pV5WMPa6KmL9mByqQuiL12qBdA0n/iEIth4dQw1x/duNGpOS2anpt5FKO1kw==", + "license": "MIT", + "dependencies": { + "@css-render/plugin-bem": "^0.15.14", + "@css-render/vue3-ssr": "^0.15.14", + "@types/lodash": "^4.17.20", + "@types/lodash-es": "^4.17.12", + "async-validator": "^4.2.5", + "css-render": "^0.15.14", + "csstype": "^3.1.3", + "date-fns": "^4.1.0", + "date-fns-tz": "^3.2.0", + "evtd": "^0.2.4", + "highlight.js": "^11.8.0", + "lodash": "^4.17.21", + "lodash-es": "^4.17.21", + "seemly": "^0.3.10", + "treemate": "^0.3.11", + "vdirs": "^0.1.8", + "vooks": "^0.2.12", + "vueuc": "^0.4.66" + }, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "vue": "^3.0.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/nostics": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/nostics/-/nostics-1.3.0.tgz", + "integrity": "sha512-wzRsrJwNlFbqIRQt8aCeL2WE8USip/uuvGSOZV1D02CxX8ABTMbw8IywKjH7yWHETMXbWJI4OBpihg9rmz2Vyg==", + "license": "MIT" + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "license": "MIT" + }, + "node_modules/perfect-debounce": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-2.1.0.tgz", + "integrity": "sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==", + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-types": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.3.3.tgz", + "integrity": "sha512-j/lCFdcppV0JxWpCEITdbDltBxPP6cHT+yNJ6Go2OgoSA9518X847X9z0p6LtA4Nc16+eQzCZjRrWanTGvHJ5w==", + "license": "MIT", + "dependencies": { + "confbox": "^0.3.1", + "exsolve": "^1.1.1", + "pathe": "^2.0.3" + } + }, + "node_modules/postcss": { + "version": "8.5.30", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.30.tgz", + "integrity": "sha512-zkd+e9S1AQHhmaBKye9zlFHWjOwVgqXl1q3ECYy8561K7qxR2cREf/STLskulBFd78k6AOFeA+ff1TtEzk9bAA==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.20", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/quansync": { + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/quansync/-/quansync-0.2.11.tgz", + "integrity": "sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/antfu" + }, + { + "type": "individual", + "url": "https://github.com/sponsors/sxzz" + } + ], + "license": "MIT" + }, + "node_modules/readdirp": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.1.1.tgz", + "integrity": "sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA==", + "license": "MIT", + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/rolldown": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.13.tgz", + "integrity": "sha512-/5apOkwWxtACcQtZ5WlrAsKS4JwXVThQPJZ3RqIruRY9UG9M8e0VlXN068xum/JRKA4aIUoJ13ghe/kGCvidiQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.153.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm-eabi": "1.2.13", + "@rolldown/binding-android-arm64": "1.2.13", + "@rolldown/binding-darwin-arm64": "1.2.13", + "@rolldown/binding-darwin-x64": "1.2.13", + "@rolldown/binding-freebsd-x64": "1.2.13", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.13", + "@rolldown/binding-linux-arm64-gnu": "1.2.13", + "@rolldown/binding-linux-arm64-musl": "1.2.13", + "@rolldown/binding-linux-ppc64-gnu": "1.2.13", + "@rolldown/binding-linux-s390x-gnu": "1.2.13", + "@rolldown/binding-linux-x64-gnu": "1.2.13", + "@rolldown/binding-linux-x64-musl": "1.2.13", + "@rolldown/binding-openharmony-arm64": "1.2.13", + "@rolldown/binding-win32-arm64-msvc": "1.2.13", + "@rolldown/binding-win32-x64-msvc": "1.2.13" + } + }, + "node_modules/scule": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/scule/-/scule-1.3.0.tgz", + "integrity": "sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==", + "license": "MIT" + }, + "node_modules/seemly": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/seemly/-/seemly-0.3.10.tgz", + "integrity": "sha512-2+SMxtG1PcsL0uyhkumlOU6Qo9TAQ/WyH7tthnPIOQB05/12jz9naq6GZ6iZ6ApVsO3rr2gsnTf3++OV63kE1Q==", + "license": "MIT" + }, + "node_modules/source-map-js": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/treemate": { + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/treemate/-/treemate-0.3.11.tgz", + "integrity": "sha512-M8RGFoKtZ8dF+iwJfAJTOH/SM4KluKOKRJpjCMhI8bG3qB74zrFoArKZ62ll0Fr3mqkMJiQOmWYkdYgDeITYQg==", + "license": "MIT" + }, + "node_modules/ufo": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.4.tgz", + "integrity": "sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==", + "license": "MIT" + }, + "node_modules/unplugin": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-3.4.0.tgz", + "integrity": "sha512-9skdIFlCsPdFV7wUfZxNsFInlW+7nJmGu2gkTu0OUhF56aXGsHab9x52/QhdJ4lC7ZDPWTxbiC4ANqVlsuaW3w==", + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "picomatch": "^4.0.7", + "webpack-virtual-modules": "^0.6.2" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "@farmfe/core": "*", + "@rsbuild/core": "*", + "@rspack/core": "*", + "bun-types-no-globals": "*", + "esbuild": "*", + "rolldown": "*", + "rollup": "*", + "unloader": "*", + "vite": "*", + "webpack": "*" + }, + "peerDependenciesMeta": { + "@farmfe/core": { + "optional": true + }, + "@rsbuild/core": { + "optional": true + }, + "@rspack/core": { + "optional": true + }, + "bun-types-no-globals": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "rolldown": { + "optional": true + }, + "rollup": { + "optional": true + }, + "unloader": { + "optional": true + }, + "vite": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/unplugin-utils": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/unplugin-utils/-/unplugin-utils-0.3.2.tgz", + "integrity": "sha512-xVToRh2CTmLk2HnEG7ac4rl1MJTT3RFkpS8B++/SnB0kXvuaavD+n3m/vrzyWQOdJNSZQACnbz01pnppbwV5BA==", + "license": "MIT", + "dependencies": { + "pathe": "^2.0.3", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=20.19.0" + }, + "funding": { + "url": "https://github.com/sponsors/sxzz" + } + }, + "node_modules/vdirs": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/vdirs/-/vdirs-0.1.8.tgz", + "integrity": "sha512-H9V1zGRLQZg9b+GdMk8MXDN2Lva0zx72MPahDKc30v+DtwKjfyOSXWRIX4t2mhDubM1H09gPhWeth/BJWPHGUw==", + "license": "MIT", + "dependencies": { + "evtd": "^0.2.2" + }, + "peerDependencies": { + "vue": "^3.0.11" + } + }, + "node_modules/vite": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.4.tgz", + "integrity": "sha512-IftLE8phJhdNRIGNEV4JCCvfNScoZQVfcXaN8TQropWGJtOHcu+iAB9pHcuGvmEb/kddw0LBe/jS8ztdC6xdiQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.33.0", + "picomatch": "^4.0.7", + "postcss": "^8.5.29", + "rolldown": "~1.2.12", + "tinyglobby": "^0.2.17" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.7.1", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vooks": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/vooks/-/vooks-0.2.12.tgz", + "integrity": "sha512-iox0I3RZzxtKlcgYaStQYKEzWWGAduMmq+jS7OrNdQo1FgGfPMubGL3uGHOU9n97NIvfFDBGnpSvkWyb/NSn/Q==", + "license": "MIT", + "dependencies": { + "evtd": "^0.2.2" + }, + "peerDependencies": { + "vue": "^3.0.0" + } + }, + "node_modules/vue": { + "version": "3.5.44", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.44.tgz", + "integrity": "sha512-dvvmaOCG7lAMkJTPqPwWeGMsPS6DIsFsfZDUgBp9V6mHf9b3+/wyVwYR4Es+WV6uJC0FKRxp81Obcq0ZwUcGFQ==", + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.44", + "@vue/compiler-sfc": "3.5.44", + "@vue/runtime-dom": "3.5.44", + "@vue/server-renderer": "3.5.44", + "@vue/shared": "3.5.44" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/vue-router": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-5.4.0.tgz", + "integrity": "sha512-pFvcYcxinDHjZUlf7AzFBrT8r8Xqvv4uMHoJnjc+EqPawXQvHTkF8S4tfSmQLpriVHUGfkaKlI7Et0KRjTMTdw==", + "license": "MIT", + "dependencies": { + "@vue-macros/common": "^3.1.3", + "@vue/devtools-api": "^8.1.5", + "ast-walker-scope": "^0.10.0", + "chokidar": "^5.0.0", + "confbox": "^0.3.1", + "local-pkg": "^1.2.1", + "magic-string": "^1.4.3", + "mlly": "^1.8.2", + "muggle-string": "^0.4.1", + "nostics": "^1.3.0", + "pathe": "^2.0.3", + "picomatch": "^4.0.7", + "scule": "^1.3.0", + "tinyglobby": "^0.2.17", + "unplugin": "^3.4.0", + "unplugin-utils": "^0.3.2" + }, + "funding": { + "url": "https://github.com/sponsors/posva" + }, + "peerDependencies": { + "@pinia/colada": ">=0.21.2", + "@vue/compiler-sfc": "^3.5.34 || ^4.0.0", + "pinia": "^3.0.4 || ^4.0.2", + "vite": "^7.3.0 || ^8.0.0", + "vue": "^3.5.34 || ^4.0.0" + }, + "peerDependenciesMeta": { + "@pinia/colada": { + "optional": true + }, + "@vue/compiler-sfc": { + "optional": true + }, + "pinia": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/vue-router/node_modules/magic-string": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.3.tgz", + "integrity": "sha512-z12OxmaPGE0F4xlpGdjuAUckipLpQlTAuAmyGhNoD7ODpYUzvDfvtxUbjM/jwznyP178oju/KDdyi220wNJ0RQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.6.0" + } + }, + "node_modules/vueuc": { + "version": "0.4.66", + "resolved": "https://registry.npmjs.org/vueuc/-/vueuc-0.4.66.tgz", + "integrity": "sha512-hHrZl+0AsrUvqYPBXSXQ2QaSrO3razjeUseLAhJWlOS/Hdfw/Y2MU05fOTP1qn1A3121gMxsHLaEz2V6CkWdTg==", + "license": "MIT", + "dependencies": { + "@css-render/vue3-ssr": "^0.15.10", + "@juggle/resize-observer": "^3.3.1", + "css-render": "^0.15.10", + "evtd": "^0.2.4", + "seemly": "^0.3.6", + "vdirs": "^0.1.4", + "vooks": "^0.2.4" + }, + "peerDependencies": { + "vue": "^3.0.11" + } + }, + "node_modules/webpack-virtual-modules": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz", + "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==", + "license": "MIT" + } + } +} diff --git a/web/package.json b/web/package.json new file mode 100644 index 0000000..004e8df --- /dev/null +++ b/web/package.json @@ -0,0 +1,20 @@ +{ + "name": "marketgrid-web", + "private": true, + "version": "0.1.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview --host 127.0.0.1 --port 5173 --strictPort" + }, + "dependencies": { + "naive-ui": "2.45.3", + "vue": "3.5.44", + "vue-router": "5.4.0" + }, + "devDependencies": { + "@vitejs/plugin-vue": "6.0.10", + "vite": "8.3.4" + } +} diff --git a/web/src/App.vue b/web/src/App.vue new file mode 100644 index 0000000..3ee04b9 --- /dev/null +++ b/web/src/App.vue @@ -0,0 +1,100 @@ + + + + + diff --git a/web/src/api.js b/web/src/api.js new file mode 100644 index 0000000..5209198 --- /dev/null +++ b/web/src/api.js @@ -0,0 +1,75 @@ +export class ApiError extends Error {} + +function errorMessage(data) { + const detail = data && data.detail + if (typeof detail === 'string' && detail) return detail + if (Array.isArray(detail)) { + const text = detail.map((item) => item.msg || '').filter(Boolean).join(';') + if (text) return text + } + return '请求失败' +} + +export async function request(path, options = {}) { + const headers = { ...(options.headers || {}) } + if (options.body && !(options.body instanceof FormData) && !headers['Content-Type']) { + headers['Content-Type'] = 'application/json' + } + let response + try { + response = await fetch(path, { ...options, headers }) + } catch { + throw new ApiError('无法连接接口。请确认已运行 start-web。') + } + const text = await response.text() + let data = null + if (text) { + try { + data = JSON.parse(text) + } catch { + data = { detail: text } + } + } + if (!response.ok) throw new ApiError(errorMessage(data)) + return data +} + +export function getJSON(path) { + return request(path) +} + +export function postJSON(path, body) { + return request(path, { method: 'POST', body: JSON.stringify(body) }) +} + +export function del(path) { + return request(path, { method: 'DELETE' }) +} + +export function uploadFile(file) { + const body = new FormData() + body.append('file', file) + return request('/api/imports', { method: 'POST', body }) +} + +export function statFile(path) { + return getJSON(`/api/files/stat?path=${encodeURIComponent(path)}`) +} + +export function downloadHref(taskId, name) { + return `/api/results/${encodeURIComponent(taskId)}/files/${encodeURIComponent(name)}` +} + +export function formatTime(ts) { + if (!ts) return '' + const date = new Date(ts * 1000) + const pad = (value) => String(value).padStart(2, '0') + return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())}` +} + +export function formatMb(bytes, digits = 2) { + return `${(bytes / 1024 / 1024).toLocaleString('zh-CN', { + minimumFractionDigits: digits, + maximumFractionDigits: digits, + })} MB` +} diff --git a/web/src/components/FileField.vue b/web/src/components/FileField.vue new file mode 100644 index 0000000..fdf0e79 --- /dev/null +++ b/web/src/components/FileField.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/web/src/components/TaskCard.vue b/web/src/components/TaskCard.vue new file mode 100644 index 0000000..22c87cd --- /dev/null +++ b/web/src/components/TaskCard.vue @@ -0,0 +1,143 @@ + + + + + diff --git a/web/src/main.js b/web/src/main.js new file mode 100644 index 0000000..ef0a3ac --- /dev/null +++ b/web/src/main.js @@ -0,0 +1,24 @@ +import { createApp } from 'vue' +import { createRouter, createWebHistory } from 'vue-router' +import naive from 'naive-ui' +import App from './App.vue' +import './styles.css' +import Home from './views/Home.vue' +import Market from './views/Market.vue' +import Buildings from './views/Buildings.vue' +import Tasks from './views/Tasks.vue' +import Results from './views/Results.vue' + +const router = createRouter({ + history: createWebHistory(), + routes: [ + { path: '/', name: 'home', component: Home, meta: { title: '工具箱首页' } }, + { path: '/market', name: 'market', component: Market, meta: { title: '市场网格出图' } }, + { path: '/buildings', name: 'buildings', component: Buildings, meta: { title: '楼宇数据查询' } }, + { path: '/tasks', name: 'tasks', component: Tasks, meta: { title: '任务中心' } }, + { path: '/results', name: 'results', component: Results, meta: { title: '成果浏览' } }, + { path: '/:pathMatch(.*)*', redirect: '/' }, + ], +}) + +createApp(App).use(router).use(naive).mount('#app') diff --git a/web/src/styles.css b/web/src/styles.css new file mode 100644 index 0000000..ebeae88 --- /dev/null +++ b/web/src/styles.css @@ -0,0 +1,64 @@ +html, body, #app { + height: 100%; + margin: 0; + overflow: hidden; +} + +body { + color: #1f2a33; + background: #f5f7f9; + font-family: "Segoe UI", "Microsoft YaHei", sans-serif; +} + +.page { + display: flex; + flex-direction: column; + gap: 10px; + max-width: 1120px; +} + +.section-title { + margin: 4px 0 0; + font-size: 14px; + font-weight: 600; +} + +.two-col, +.three-col, +.metrics { + display: grid; + gap: 10px; +} + +.two-col { grid-template-columns: 1fr 1fr; } +.three-col, +.metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } + +.panel { + border: 1px solid #e4ebf1; + border-radius: 8px; + background: #fff; + padding: 10px 12px; +} + +.muted { + margin: 0; + color: #66788a; + font-size: 12px; + line-height: 1.5; +} + +.scroll-box { + max-height: 280px; + overflow: auto; + border: 1px solid #e4ebf1; + border-radius: 6px; + padding: 6px 10px; + background: #fff; +} + +@media (max-width: 860px) { + .two-col, + .three-col, + .metrics { grid-template-columns: 1fr; } +} diff --git a/web/src/views/Buildings.vue b/web/src/views/Buildings.vue new file mode 100644 index 0000000..d0a71c8 --- /dev/null +++ b/web/src/views/Buildings.vue @@ -0,0 +1,193 @@ + + + + + diff --git a/web/src/views/Home.vue b/web/src/views/Home.vue new file mode 100644 index 0000000..27cfe42 --- /dev/null +++ b/web/src/views/Home.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/web/src/views/Market.vue b/web/src/views/Market.vue new file mode 100644 index 0000000..f32906b --- /dev/null +++ b/web/src/views/Market.vue @@ -0,0 +1,252 @@ + + + + + diff --git a/web/src/views/Results.vue b/web/src/views/Results.vue new file mode 100644 index 0000000..7dc3616 --- /dev/null +++ b/web/src/views/Results.vue @@ -0,0 +1,124 @@ + + + + + diff --git a/web/src/views/Tasks.vue b/web/src/views/Tasks.vue new file mode 100644 index 0000000..1c21c4b --- /dev/null +++ b/web/src/views/Tasks.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/web/vite.config.js b/web/vite.config.js new file mode 100644 index 0000000..1c6e585 --- /dev/null +++ b/web/vite.config.js @@ -0,0 +1,22 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' + +export default defineConfig({ + plugins: [vue()], + server: { + host: '127.0.0.1', + port: 5173, + strictPort: true, + proxy: { + '/api': { + target: 'http://127.0.0.1:8765', + changeOrigin: false, + }, + }, + }, + preview: { + host: '127.0.0.1', + port: 5173, + strictPort: true, + }, +})