From 626f9eab5cf22c0d1f0265d7c006eb1ffdf2588d Mon Sep 17 00:00:00 2001 From: Nixevol Date: Mon, 26 Oct 2026 12:10:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E3=80=81=E5=AD=A6=E6=97=B6=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=92=8C=E5=AE=9A=E6=97=B6=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dockerignore | 8 + .env.example | 3 + .gitignore | 3 + Dockerfile | 21 + alembic.ini | 25 + alembic/env.py | 33 + alembic/script.py.mako | 21 + alembic/versions/0001_init.py | 44 + app/__init__.py | 1 + app/db.py | 48 + app/main.py | 75 ++ app/models.py | 43 + app/service.py | 100 ++ docker-compose.yml | 25 + euniv_client/__init__.py | 5 + euniv_client/client.py | 298 ++++++ euniv_client/crypto.py | 25 + requirements.txt | 5 + scripts/login_check.py | 263 +---- tests/conftest.py | 7 + tests/test_app.py | 103 ++ web/index.html | 12 + web/package-lock.json | 1696 +++++++++++++++++++++++++++++++++ web/package.json | 19 + web/src/App.vue | 10 + web/src/LoginPage.vue | 165 ++++ web/src/main.ts | 6 + web/src/styles.css | 10 + web/tsconfig.json | 13 + web/vite.config.ts | 11 + worker/__init__.py | 1 + worker/__main__.py | 74 ++ 32 files changed, 2924 insertions(+), 249 deletions(-) create mode 100644 .dockerignore create mode 100644 .env.example create mode 100644 Dockerfile create mode 100644 alembic.ini create mode 100644 alembic/env.py create mode 100644 alembic/script.py.mako create mode 100644 alembic/versions/0001_init.py create mode 100644 app/__init__.py create mode 100644 app/db.py create mode 100644 app/main.py create mode 100644 app/models.py create mode 100644 app/service.py create mode 100644 docker-compose.yml create mode 100644 euniv_client/__init__.py create mode 100644 euniv_client/client.py create mode 100644 euniv_client/crypto.py create mode 100644 tests/conftest.py create mode 100644 tests/test_app.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/LoginPage.vue create mode 100644 web/src/main.ts create mode 100644 web/src/styles.css create mode 100644 web/tsconfig.json create mode 100644 web/vite.config.ts create mode 100644 worker/__init__.py create mode 100644 worker/__main__.py diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..b0b0939 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +.venv +.git +Temp +data +web/node_modules +web/dist +**/__pycache__ +.env diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..f6ed45a --- /dev/null +++ b/.env.example @@ -0,0 +1,3 @@ +EUNIV_SECRET_KEY=请换成一串只放在服务器上的密钥 +EUNIV_DB_PATH=data/euniv.db +EUNIV_WORKER_INTERVAL=20 diff --git a/.gitignore b/.gitignore index 0b4abf0..df0c405 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ Temp/ __pycache__/ *.py[cod] .env +data/ +web/node_modules/ +web/dist/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6e6bd7e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM node:22-alpine AS web +WORKDIR /src/web +COPY web/package.json web/package-lock.json* ./ +RUN npm install +COPY web/ ./ +RUN npm run build + +FROM python:3.13-slim +WORKDIR /app +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt +COPY euniv_client euniv_client +COPY app app +COPY worker worker +COPY alembic alembic +COPY alembic.ini . +COPY scripts scripts +COPY --from=web /src/web/dist web/dist +ENV EUNIV_DB_PATH=/data/euniv.db +EXPOSE 8000 +CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] diff --git a/alembic.ini b/alembic.ini new file mode 100644 index 0000000..3767dda --- /dev/null +++ b/alembic.ini @@ -0,0 +1,25 @@ +[alembic] +script_location = alembic +sqlalchemy.url = sqlite:///data/euniv.db + +[loggers] +keys = root + +[handlers] +keys = console + +[formatters] +keys = generic + +[logger_root] +level = WARN +handlers = console + +[handler_console] +class = StreamHandler +args = (sys.stderr,) +level = NOTSET +formatter = generic + +[formatter_generic] +format = %(levelname)-5.5s [%(name)s] %(message)s diff --git a/alembic/env.py b/alembic/env.py new file mode 100644 index 0000000..11fcbeb --- /dev/null +++ b/alembic/env.py @@ -0,0 +1,33 @@ +from alembic import context +from sqlalchemy import engine_from_config, pool + +from app.db import database_url +from app.models import Base + +config = context.config +config.set_main_option("sqlalchemy.url", database_url()) +target_metadata = Base.metadata + + +def run_migrations_offline() -> None: + context.configure(url=database_url(), target_metadata=target_metadata, literal_binds=True) + with context.begin_transaction(): + context.run_migrations() + + +def run_migrations_online() -> None: + connectable = engine_from_config( + config.get_section(config.config_ini_section) or {}, + prefix="sqlalchemy.", + poolclass=pool.NullPool, + ) + with connectable.connect() as connection: + context.configure(connection=connection, target_metadata=target_metadata) + with context.begin_transaction(): + context.run_migrations() + + +if context.is_offline_mode(): + run_migrations_offline() +else: + run_migrations_online() diff --git a/alembic/script.py.mako b/alembic/script.py.mako new file mode 100644 index 0000000..cfaabf4 --- /dev/null +++ b/alembic/script.py.mako @@ -0,0 +1,21 @@ +"""${message} + +Revision ID: ${up_revision} +Revises: ${down_revision | comma,n} +""" +from alembic import op +import sqlalchemy as sa +${imports if imports else ""} + +revision = ${repr(up_revision)} +down_revision = ${repr(down_revision)} +branch_labels = ${repr(branch_labels)} +depends_on = ${repr(depends_on)} + + +def upgrade() -> None: + ${upgrades if upgrades else "pass"} + + +def downgrade() -> None: + ${downgrades if downgrades else "pass"} diff --git a/alembic/versions/0001_init.py b/alembic/versions/0001_init.py new file mode 100644 index 0000000..c75ea30 --- /dev/null +++ b/alembic/versions/0001_init.py @@ -0,0 +1,44 @@ +"""账号与定时配置。""" + +from alembic import op +import sqlalchemy as sa + +revision = "0001_init" +down_revision = None +branch_labels = None +depends_on = None + + +def upgrade() -> None: + op.create_table( + "accounts", + sa.Column("employee_id", sa.String(32), primary_key=True), + sa.Column("cn_name", sa.String(64), nullable=False, server_default=""), + sa.Column("department_name", sa.String(128), nullable=False, server_default=""), + sa.Column("level_name", sa.String(64), nullable=False, server_default=""), + sa.Column("email", sa.String(128), nullable=False, server_default=""), + sa.Column("password_cipher", sa.Text(), nullable=False), + sa.Column("actual_study_hour", sa.String(32), nullable=False, server_default=""), + sa.Column("actual_study_score", sa.String(32), nullable=False, server_default=""), + sa.Column("points", sa.String(32), nullable=False, server_default=""), + sa.Column("today_hours", sa.String(32), nullable=False, server_default=""), + sa.Column("today_score", sa.String(32), nullable=False, server_default=""), + sa.Column("today", sa.String(16), nullable=False, server_default=""), + sa.Column("class_count", sa.String(16), nullable=False, server_default=""), + sa.Column("last_login_at", sa.DateTime(), nullable=False), + sa.Column("updated_at", sa.DateTime(), nullable=False), + ) + op.create_table( + "schedules", + sa.Column("employee_id", sa.String(32), primary_key=True), + sa.Column("run_time", sa.String(5), nullable=False, server_default="08:00"), + sa.Column("enabled", sa.Boolean(), nullable=False, server_default=sa.true()), + sa.Column("status", sa.String(16), nullable=False, server_default="idle"), + sa.Column("last_run_at", sa.DateTime(), nullable=True), + sa.Column("last_message", sa.String(255), nullable=False, server_default=""), + ) + + +def downgrade() -> None: + op.drop_table("schedules") + op.drop_table("accounts") diff --git a/app/__init__.py b/app/__init__.py new file mode 100644 index 0000000..34721ff --- /dev/null +++ b/app/__init__.py @@ -0,0 +1 @@ +"""EunivTools Web API。""" diff --git a/app/db.py b/app/db.py new file mode 100644 index 0000000..60bf7a0 --- /dev/null +++ b/app/db.py @@ -0,0 +1,48 @@ +"""SQLite 连接。开启 WAL,供 Web 和 Worker 同时读取。""" + +from __future__ import annotations + +import os +from collections.abc import Generator +from pathlib import Path + +from sqlalchemy import create_engine, event +from sqlalchemy.orm import Session, sessionmaker + +def database_url() -> str: + path = os.environ.get("EUNIV_DB_PATH", "data/euniv.db") + Path(path).parent.mkdir(parents=True, exist_ok=True) + return "sqlite:///" + path.replace("\\", "/") + + +engine = create_engine(database_url(), connect_args={"check_same_thread": False}) +SessionLocal = sessionmaker(bind=engine, autoflush=False, expire_on_commit=False) + + +@event.listens_for(engine, "connect") +def _enable_wal(dbapi_connection, _connection_record) -> None: + cursor = dbapi_connection.cursor() + cursor.execute("PRAGMA journal_mode=WAL") + cursor.execute("PRAGMA busy_timeout=5000") + cursor.close() + + +def init_db() -> None: + from pathlib import Path + + from alembic import command + from alembic.config import Config + + root = Path(__file__).resolve().parents[1] + config = Config(str(root / "alembic.ini")) + config.set_main_option("script_location", str(root / "alembic")) + config.set_main_option("sqlalchemy.url", database_url()) + command.upgrade(config, "head") + + +def get_db() -> Generator[Session, None, None]: + db = SessionLocal() + try: + yield db + finally: + db.close() diff --git a/app/main.py b/app/main.py new file mode 100644 index 0000000..c17970d --- /dev/null +++ b/app/main.py @@ -0,0 +1,75 @@ +"""登录、使用者记录和定时配置接口。""" + +from __future__ import annotations + +from contextlib import asynccontextmanager +from pathlib import Path + +from fastapi import Depends, FastAPI, HTTPException +from fastapi.staticfiles import StaticFiles +from pydantic import BaseModel, Field +from sqlalchemy.orm import Session + +from app.db import get_db, init_db +from app.service import list_accounts, list_schedules, login_and_store, public_account, public_schedule, save_schedule + + +@asynccontextmanager +async def lifespan(_app: FastAPI): + init_db() + yield + + +app = FastAPI(title="EunivTools", lifespan=lifespan) + + +class LoginBody(BaseModel): + employee_id: str = Field(min_length=1, max_length=32) + password: str = Field(min_length=1, max_length=128) + + +class ScheduleBody(BaseModel): + employee_id: str = Field(min_length=1, max_length=32) + run_time: str = Field(pattern=r"^\d{2}:\d{2}$") + enabled: bool = True + + +@app.get("/api/health") +def health() -> dict: + return {"ok": True} + + +@app.post("/api/login") +def login(body: LoginBody, db: Session = Depends(get_db)) -> dict: + try: + account = login_and_store(db, body.employee_id.strip(), body.password) + except RuntimeError as exc: + raise HTTPException(status_code=400, detail=str(exc)) from exc + return public_account(account) + + +@app.get("/api/accounts") +def accounts(db: Session = Depends(get_db)) -> list[dict]: + return [public_account(item) for item in list_accounts(db)] + + +@app.get("/api/schedules") +def schedules(db: Session = Depends(get_db)) -> list[dict]: + return [public_schedule(item) for item in list_schedules(db)] + + +@app.post("/api/schedules") +def upsert_schedule(body: ScheduleBody, db: Session = Depends(get_db)) -> dict: + hour, minute = body.run_time.split(":") + if not (0 <= int(hour) <= 23 and 0 <= int(minute) <= 59): + raise HTTPException(status_code=400, detail="时间格式应为 HH:MM") + try: + schedule = save_schedule(db, body.employee_id.strip(), body.run_time, body.enabled) + except LookupError as exc: + raise HTTPException(status_code=404, detail=str(exc)) from exc + return public_schedule(schedule) + + +_dist = Path(__file__).resolve().parents[1] / "web" / "dist" +if _dist.is_dir(): + app.mount("/", StaticFiles(directory=_dist, html=True), name="web") diff --git a/app/models.py b/app/models.py new file mode 100644 index 0000000..def93a9 --- /dev/null +++ b/app/models.py @@ -0,0 +1,43 @@ +"""账号、定时配置和调度状态。不保存每节课的实时记录。""" + +from __future__ import annotations + +from datetime import datetime + +from sqlalchemy import Boolean, DateTime, String, Text +from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column + + +class Base(DeclarativeBase): + pass + + +class Account(Base): + __tablename__ = "accounts" + + employee_id: Mapped[str] = mapped_column(String(32), primary_key=True) + cn_name: Mapped[str] = mapped_column(String(64), default="") + department_name: Mapped[str] = mapped_column(String(128), default="") + level_name: Mapped[str] = mapped_column(String(64), default="") + email: Mapped[str] = mapped_column(String(128), default="") + password_cipher: Mapped[str] = mapped_column(Text) + actual_study_hour: Mapped[str] = mapped_column(String(32), default="") + actual_study_score: Mapped[str] = mapped_column(String(32), default="") + points: Mapped[str] = mapped_column(String(32), default="") + today_hours: Mapped[str] = mapped_column(String(32), default="") + today_score: Mapped[str] = mapped_column(String(32), default="") + today: Mapped[str] = mapped_column(String(16), default="") + class_count: Mapped[str] = mapped_column(String(16), default="") + last_login_at: Mapped[datetime] = mapped_column(DateTime) + updated_at: Mapped[datetime] = mapped_column(DateTime) + + +class Schedule(Base): + __tablename__ = "schedules" + + employee_id: Mapped[str] = mapped_column(String(32), primary_key=True) + run_time: Mapped[str] = mapped_column(String(5), default="08:00") + enabled: Mapped[bool] = mapped_column(Boolean, default=True) + status: Mapped[str] = mapped_column(String(16), default="idle") + last_run_at: Mapped[datetime | None] = mapped_column(DateTime, nullable=True) + last_message: Mapped[str] = mapped_column(String(255), default="") diff --git a/app/service.py b/app/service.py new file mode 100644 index 0000000..836d064 --- /dev/null +++ b/app/service.py @@ -0,0 +1,100 @@ +"""登录、保存使用者和读取调度配置。""" + +from __future__ import annotations + +from datetime import datetime + +from sqlalchemy import select +from sqlalchemy.orm import Session + +from app.models import Account, Schedule +from euniv_client import EunivClient +from euniv_client.crypto import encrypt_secret + + +def public_account(account: Account) -> dict: + return { + "employee_id": account.employee_id, + "cn_name": account.cn_name, + "department_name": account.department_name, + "level_name": account.level_name, + "email": account.email, + "actual_study_hour": account.actual_study_hour, + "actual_study_score": account.actual_study_score, + "points": account.points, + "today_hours": account.today_hours, + "today_score": account.today_score, + "today": account.today, + "class_count": account.class_count, + "last_login_at": account.last_login_at.isoformat(timespec="seconds"), + } + + +def public_schedule(schedule: Schedule) -> dict: + return { + "employee_id": schedule.employee_id, + "run_time": schedule.run_time, + "enabled": schedule.enabled, + "status": schedule.status, + "last_run_at": schedule.last_run_at.isoformat(timespec="seconds") if schedule.last_run_at else None, + "last_message": schedule.last_message, + } + + +def apply_session(account: Account, employee_id: str, password: str, session: dict, now: datetime) -> None: + profile = session["profile"] + summary = session["summary"] + account.employee_id = employee_id + account.cn_name = str(profile.get("cnName") or "") + account.department_name = str(profile.get("departmentName") or "") + account.level_name = str(profile.get("userClassLevelName") or "") + account.email = str(profile.get("email") or "") + account.password_cipher = encrypt_secret(password) + account.actual_study_hour = str(summary.get("actual_study_hour") or "") + account.actual_study_score = str(summary.get("actual_study_score") or "") + account.points = str(summary.get("points") or "") + account.today_hours = "" if summary.get("today_hours") is None else str(summary.get("today_hours")) + account.today_score = "" if summary.get("today_score") is None else str(summary.get("today_score")) + account.today = str(summary.get("today") or "") + account.class_count = "" if summary.get("class_count") is None else str(summary.get("class_count")) + account.last_login_at = now + account.updated_at = now + + +def login_and_store(db: Session, employee_id: str, password: str, client_factory=EunivClient) -> Account: + client = client_factory(employee_id, password) + try: + session = client.open_session() + finally: + client.close() + now = datetime.now() + account = db.get(Account, employee_id) + if account is None: + account = Account(employee_id=employee_id, password_cipher="", last_login_at=now, updated_at=now) + db.add(account) + apply_session(account, employee_id, password, session, now) + db.commit() + db.refresh(account) + return account + + +def list_accounts(db: Session) -> list[Account]: + return list(db.scalars(select(Account).order_by(Account.last_login_at.desc()))) + + +def save_schedule(db: Session, employee_id: str, run_time: str, enabled: bool) -> Schedule: + if db.get(Account, employee_id) is None: + raise LookupError("请先登录该工号") + schedule = db.get(Schedule, employee_id) + if schedule is None: + schedule = Schedule(employee_id=employee_id) + db.add(schedule) + schedule.run_time = run_time + schedule.enabled = enabled + db.commit() + db.refresh(schedule) + return schedule + + +def list_schedules(db: Session) -> list[Schedule]: + return list(db.scalars(select(Schedule).order_by(Schedule.employee_id))) diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..724d75e --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,25 @@ +# Web 监听 8000。用 1Panel 反代到该端口,对外提供页面和 /api。 +services: + web: + build: . + ports: + - "8000:8000" + environment: + EUNIV_SECRET_KEY: ${EUNIV_SECRET_KEY:?请在环境变量或 .env 中设置 EUNIV_SECRET_KEY} + EUNIV_DB_PATH: /data/euniv.db + volumes: + - euniv-data:/data + worker: + build: . + command: ["python", "-m", "worker"] + environment: + EUNIV_SECRET_KEY: ${EUNIV_SECRET_KEY:?请在环境变量或 .env 中设置 EUNIV_SECRET_KEY} + EUNIV_DB_PATH: /data/euniv.db + EUNIV_WORKER_INTERVAL: "20" + volumes: + - euniv-data:/data + depends_on: + - web + +volumes: + euniv-data: diff --git a/euniv_client/__init__.py b/euniv_client/__init__.py new file mode 100644 index 0000000..fe6eddc --- /dev/null +++ b/euniv_client/__init__.py @@ -0,0 +1,5 @@ +"""中兴 e 学登录与学习数据查询。""" + +from euniv_client.client import EunivClient + +__all__ = ["EunivClient"] diff --git a/euniv_client/client.py b/euniv_client/client.py new file mode 100644 index 0000000..50908cc --- /dev/null +++ b/euniv_client/client.py @@ -0,0 +1,298 @@ +"""登录中兴 e 学并查询学时、学分汇总。""" + +from __future__ import annotations + +import base64 +import io +import random +import time +import uuid +from urllib.parse import quote + +import httpx +from cryptography.hazmat.primitives import serialization +from cryptography.hazmat.primitives.asymmetric import padding +from PIL import Image + +PORTAL = "https://bmtucportal.zte.com.cn" +EUNIV = "https://euniv.zte.com.cn" +YXT_API = "https://api-qidacustomc1.yunxuetang.cn" +STUDY_API = "https://api-qidac1.yunxuetang.cn" +CLASS_API = "https://sdcs-api-ztec1.yunxuetang.cn" +REDIRECT_URI = f"{YXT_API}/v1/ztctech/sso" +CLIENT_ID = "30051" +TENANT_ID = "10001" +APP_ID = "10051" +USER_AGENT = ( + "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:158.0) " + "Gecko/20100101 Firefox/158.0" +) + + +def now_ms() -> int: + return int(time.time() * 1000) + + +def make_kid(prefix: str = "t") -> str: + return prefix + "".join(random.choice("1234567890") for _ in range(4)) + + +def encrypt_password(public_key_b64: str, password: str) -> str: + key = serialization.load_der_public_key(base64.b64decode(public_key_b64)) + cipher = key.encrypt(password.encode("utf-8"), padding.PKCS1v15()) + return base64.b64encode(cipher).decode("ascii") + + +def decode_data_uri(value: str) -> bytes: + payload = value.split(",", 1)[1] if "," in value else value + return base64.b64decode(payload) + + +def jigsaw_offset(big_png: bytes, small_png: bytes, top: int) -> int: + """返回滑块左边缘在底图上的横坐标。""" + big = Image.open(io.BytesIO(big_png)).convert("RGBA") + small = Image.open(io.BytesIO(small_png)).convert("RGBA") + width, height = big.size + piece_w, piece_h = small.size + mask: list[tuple[int, int, tuple[int, int, int]]] = [] + for y in range(piece_h): + for x in range(piece_w): + red, green, blue, alpha = small.getpixel((x, y)) + if alpha > 128: + mask.append((x, y, (red, green, blue))) + best_x = 0 + best_score = None + limit = width - piece_w + for origin in range(max(limit, 0)): + score = 0 + for x, y, color in mask: + pixel = big.getpixel((origin + x, top + y)) + score += abs(pixel[0] - color[0]) + abs(pixel[1] - color[1]) + abs(pixel[2] - color[2]) + if best_score is None or score < best_score: + best_score = score + best_x = origin + if top + piece_h > height: + raise RuntimeError("拼图纵坐标超出底图高度") + return best_x + + +class EunivClient: + def __init__(self, login_name: str, password: str) -> None: + self.login_name = login_name.strip() + self.password = password + self.client = httpx.Client(timeout=30, follow_redirects=True, headers={"User-Agent": USER_AGENT}) + + def close(self) -> None: + self.client.close() + + def portal_headers(self) -> dict[str, str]: + referer = ( + f"{PORTAL}/uc/{TENANT_ID}/oauthLogin?client_id={CLIENT_ID}" + f"&scope=profile&redirect_uri={quote(REDIRECT_URI, safe='')}" + "&response_type=code" + ) + return { + "Accept": "application/json, text/plain, */*", + "Content-Type": "application/json;charset=UTF-8", + "Origin": PORTAL, + "Referer": referer, + "X-App-Id": APP_ID, + "X-Device-Type": "pc", + "X-Itp-Value": "from=ucs-portal;client=pc;platform=portal", + "X-Lang-Id": "zh_CN", + "X-Tenant-Id": TENANT_ID, + "x_uuid": str(uuid.uuid4()), + } + + def code_of(self, payload: dict) -> tuple[str, str, object]: + block = payload.get("code") or {} + return block.get("code") or "", block.get("msg") or "", payload.get("bo") + + def login(self) -> dict: + self.client.get(EUNIV + "/") + self.client.post( + f"{PORTAL}/zte-bmt-ucs-portalbff/oauth/validate", + headers=self.portal_headers(), + json={ + "clientId": CLIENT_ID, + "redirectUri": REDIRECT_URI, + "responseType": "code", + "scope": "profile", + "_t": now_ms(), + }, + ) + key_resp = self.client.post( + f"{PORTAL}/zte-bmt-ucs-portalbff/srv/password/publicKey/{TENANT_ID}", + headers=self.portal_headers(), + json={"_t": now_ms()}, + ) + key_code, key_message, public_key = self.code_of(key_resp.json()) + if key_code != "0000" or not isinstance(public_key, str): + raise RuntimeError(f"获取密码公钥失败:{key_message or key_resp.status_code}") + + check_resp = self.client.post( + f"{PORTAL}/zte-bmt-ucs-portalbff/srv/pas/securitycode/check", + headers=self.portal_headers(), + json={"accountId": self.login_name, "callerId": APP_ID, "_t": now_ms()}, + ) + check_code, check_message, needs_security_code = self.code_of(check_resp.json()) + if check_code == "0000" and needs_security_code is True: + raise RuntimeError("这个账号开启了动态安全码,当前登录流程还不能提交安全码") + if check_code not in ("", "0000"): + raise RuntimeError(f"安全码检查失败:{check_message}") + + cipher = encrypt_password(public_key, self.password) + last_message = "登录未完成" + for _ in range(3): + kid = make_kid("t") + image_resp = self.client.get( + f"{PORTAL}/zte-bmt-ucs-portalbff/srv/kaptcha/jigsaw", + params={"kid": kid, "_t": now_ms()}, + headers=self.portal_headers(), + ) + image_code, image_message, image = self.code_of(image_resp.json()) + if image_code != "0000": + raise RuntimeError(f"获取拼图失败:{image_message}") + if not isinstance(image, dict): + raise RuntimeError("拼图返回无法识别") + offset = jigsaw_offset( + decode_data_uri(image["bigImg"]), + decode_data_uri(image["smallImg"]), + int(image["yHeight"]), + ) + headers = self.portal_headers() + headers.update({"kcode": "", "kid": make_kid(""), "kskip": "true", "source": APP_ID}) + login_resp = self.client.post( + f"{PORTAL}/zte-bmt-ucs-portalbff/srv/login", + headers=headers, + json={ + "loginName": self.login_name, + "password": cipher, + "kid": kid, + "jigsawCode": offset, + "_t": now_ms(), + }, + ) + login_code, last_message, profile = self.code_of(login_resp.json()) + if login_code == "0000" and isinstance(profile, dict): + return profile + if any(word in last_message for word in ("验证码", "拼图", "滑块")): + continue + raise RuntimeError(f"登录失败:{last_message}") + raise RuntimeError(f"登录失败:{last_message}") + + def authorize(self, profile: dict) -> None: + account_id = str(profile["accountId"]) + user_id = str(profile["userId"]) + token = str(profile["token"]) + domain = "zte.com.cn" + jar = { + "UCSLoginName": account_id, + "UCSSSOAccount": account_id, + "UCSSSOUser": user_id, + "UCSSSOToken": token, + "UCSSSOInfo": str(profile.get("ssoinfo") or ""), + "UCSSSOLanguage": "zh_CN", + "UCSLoginTime": str(now_ms()), + "iAuthTenantId_prod": TENANT_ID, + "iAuthUserId_prod": user_id, + "iAuthUid_prod": account_id, + "iAuthTid_prod": token, + "iAuthLanguage_prod": "zh_CN", + } + if profile.get("unionId"): + jar["iuacUnionId"] = str(profile["unionId"]) + for name, value in jar.items(): + self.client.cookies.set(name, value, domain=domain, path="/") + + response = self.client.post( + f"{PORTAL}/zte-bmt-ucs-portalbff/oauth/authorize", + params={ + "redirect_uri": REDIRECT_URI, + "client_id": CLIENT_ID, + "response_type": "code", + "scope": "profile", + }, + headers=self.portal_headers(), + json={"accountId": account_id, "token": token, "userId": user_id, "_t": now_ms()}, + ) + code, message, redirect_url = self.code_of(response.json()) + if code != "0000" or not isinstance(redirect_url, str): + raise RuntimeError(f"申请学习平台授权码失败:{message}") + self.client.get(redirect_url, headers={"Referer": PORTAL + "/", "User-Agent": USER_AGENT}) + + def session_token(self) -> str: + for cookie in self.client.cookies.jar: + if cookie.name == "ELEARNING_00024" and cookie.value: + return cookie.value + names = sorted({cookie.name for cookie in self.client.cookies.jar}) + raise RuntimeError("学习平台没有返回登录会话,现有 Cookie 名称:" + ", ".join(names)) + + def user_info(self) -> dict: + response = self.client.post( + f"{YXT_API}/v1/customdiy/user/getuserinfobyid", + content=b"", + headers=self.api_headers(), + ) + response.raise_for_status() + payload = response.json() + if not isinstance(payload, dict) or "cnName" not in payload: + raise RuntimeError("用户信息返回无法识别") + return payload + + def api_headers(self) -> dict[str, str]: + return { + "Accept": "application/json, text/plain, */*", + "Content-Type": "application/json", + "Origin": EUNIV, + "Referer": EUNIV + "/", + "source": "501", + "token": self.session_token(), + "User-Agent": USER_AGENT, + } + + def study_snapshot(self) -> dict: + """查询学时、学分和积分汇总,以及今日数据、我的班级数量。""" + headers = self.api_headers() + score_resp = self.client.post( + f"{YXT_API}/v1/customapiforweb/getscoreorpointorhour", + json={}, + headers=headers, + ) + score_resp.raise_for_status() + score_payload = score_resp.json() + data = score_payload.get("data") or {} + if score_payload.get("code") not in (None, "0", 0): + raise RuntimeError(score_payload.get("message") or "学时学分查询失败") + + today_resp = self.client.get( + f"{STUDY_API}/v1/studyapi/studyhour/todayscorehours", + headers=headers, + ) + today_resp.raise_for_status() + today = today_resp.json() + + class_count = None + class_resp = self.client.get( + f"{CLASS_API}/v1/zte/my/class", + params={"limit": 10, "offset": 0, "lang": 0}, + headers=headers, + ) + if class_resp.status_code == 200: + paging = ((class_resp.json().get("data") or {}).get("paging") or {}) + class_count = paging.get("totalCount") + + return { + "actual_study_hour": data.get("actualStudyHour"), + "actual_study_score": data.get("actualStudyScore"), + "points": data.get("totalUserPoint") or data.get("ablePoint"), + "today_hours": today.get("studyHours"), + "today_score": today.get("studyScore"), + "today": today.get("toDate"), + "class_count": class_count, + } + + def open_session(self) -> dict: + profile = self.login() + self.authorize(profile) + return {"profile": self.user_info(), "summary": self.study_snapshot()} diff --git a/euniv_client/crypto.py b/euniv_client/crypto.py new file mode 100644 index 0000000..6664a7a --- /dev/null +++ b/euniv_client/crypto.py @@ -0,0 +1,25 @@ +"""用服务端密钥对 e 学密码做可逆加密。""" + +from __future__ import annotations + +import base64 +import hashlib +import os + +from cryptography.fernet import Fernet + + +def _fernet() -> Fernet: + secret = os.environ.get("EUNIV_SECRET_KEY", "") + if not secret: + raise RuntimeError("请设置环境变量 EUNIV_SECRET_KEY") + digest = hashlib.sha256(secret.encode("utf-8")).digest() + return Fernet(base64.urlsafe_b64encode(digest)) + + +def encrypt_secret(value: str) -> str: + return _fernet().encrypt(value.encode("utf-8")).decode("ascii") + + +def decrypt_secret(value: str) -> str: + return _fernet().decrypt(value.encode("ascii")).decode("utf-8") diff --git a/requirements.txt b/requirements.txt index 7d8044a..1ce95e9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,8 @@ httpx==0.28.1 cryptography==50.0.2 pillow==13.0.0 +fastapi==0.162.0 +uvicorn==0.54.0 +sqlalchemy==2.1.6 +alembic==1.20.1 +pydantic==2.14.1 diff --git a/scripts/login_check.py b/scripts/login_check.py index de92ccf..f769ca7 100644 --- a/scripts/login_check.py +++ b/scripts/login_check.py @@ -1,254 +1,14 @@ -"""登录中兴 e 学并打印当前用户资料。 - -账号从环境变量 EUNIV_LOGIN、EUNIV_PASSWORD 读取,不写入文件。 -""" +"""命令行登录中兴 e 学并打印用户资料与学时汇总。""" from __future__ import annotations -import base64 -import io import os -import random import sys -import time -import uuid -from urllib.parse import quote +from pathlib import Path -import httpx -from cryptography.hazmat.primitives import serialization -from cryptography.hazmat.primitives.asymmetric import padding -from PIL import Image +sys.path.insert(0, str(Path(__file__).resolve().parents[1])) -PORTAL = "https://bmtucportal.zte.com.cn" -EUNIV = "https://euniv.zte.com.cn" -YXT_API = "https://api-qidacustomc1.yunxuetang.cn" -REDIRECT_URI = f"{YXT_API}/v1/ztctech/sso" -CLIENT_ID = "30051" -TENANT_ID = "10001" -APP_ID = "10051" -USER_AGENT = ( - "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:158.0) " - "Gecko/20100101 Firefox/158.0" -) - - -def now_ms() -> int: - return int(time.time() * 1000) - - -def make_kid(prefix: str = "t") -> str: - return prefix + "".join(random.choice("1234567890") for _ in range(4)) - - -def encrypt_password(public_key_b64: str, password: str) -> str: - key = serialization.load_der_public_key(base64.b64decode(public_key_b64)) - cipher = key.encrypt(password.encode("utf-8"), padding.PKCS1v15()) - return base64.b64encode(cipher).decode("ascii") - - -def decode_data_uri(value: str) -> bytes: - payload = value.split(",", 1)[1] if "," in value else value - return base64.b64decode(payload) - - -def jigsaw_offset(big_png: bytes, small_png: bytes, top: int) -> int: - """返回滑块左边缘在底图上的横坐标。样本上与抓包提交值一致。""" - big = Image.open(io.BytesIO(big_png)).convert("RGBA") - small = Image.open(io.BytesIO(small_png)).convert("RGBA") - width, height = big.size - piece_w, piece_h = small.size - mask: list[tuple[int, int, tuple[int, int, int]]] = [] - for y in range(piece_h): - for x in range(piece_w): - red, green, blue, alpha = small.getpixel((x, y)) - if alpha > 128: - mask.append((x, y, (red, green, blue))) - best_x = 0 - best_score = None - limit = width - piece_w - for origin in range(max(limit, 0)): - score = 0 - for x, y, color in mask: - pixel = big.getpixel((origin + x, top + y)) - score += abs(pixel[0] - color[0]) + abs(pixel[1] - color[1]) + abs(pixel[2] - color[2]) - if best_score is None or score < best_score: - best_score = score - best_x = origin - if top + piece_h > height: - raise RuntimeError("拼图纵坐标超出底图高度") - return best_x - - -class EunivLogin: - def __init__(self, login_name: str, password: str) -> None: - self.login_name = login_name.strip() - self.password = password - self.client = httpx.Client(timeout=30, follow_redirects=True, headers={"User-Agent": USER_AGENT}) - - def close(self) -> None: - self.client.close() - - def portal_headers(self) -> dict[str, str]: - referer = ( - f"{PORTAL}/uc/{TENANT_ID}/oauthLogin?client_id={CLIENT_ID}" - f"&scope=profile&redirect_uri={quote(REDIRECT_URI, safe='')}" - "&response_type=code" - ) - return { - "Accept": "application/json, text/plain, */*", - "Content-Type": "application/json;charset=UTF-8", - "Origin": PORTAL, - "Referer": referer, - "X-App-Id": APP_ID, - "X-Device-Type": "pc", - "X-Itp-Value": "from=ucs-portal;client=pc;platform=portal", - "X-Lang-Id": "zh_CN", - "X-Tenant-Id": TENANT_ID, - "x_uuid": str(uuid.uuid4()), - } - - def code_of(self, payload: dict) -> tuple[str, str, object]: - block = payload.get("code") or {} - return block.get("code") or "", block.get("msg") or "", payload.get("bo") - - def login(self) -> dict: - self.client.get(EUNIV + "/") - self.client.post( - f"{PORTAL}/zte-bmt-ucs-portalbff/oauth/validate", - headers=self.portal_headers(), - json={ - "clientId": CLIENT_ID, - "redirectUri": REDIRECT_URI, - "responseType": "code", - "scope": "profile", - "_t": now_ms(), - }, - ) - key_resp = self.client.post( - f"{PORTAL}/zte-bmt-ucs-portalbff/srv/password/publicKey/{TENANT_ID}", - headers=self.portal_headers(), - json={"_t": now_ms()}, - ) - key_code, key_message, public_key = self.code_of(key_resp.json()) - if key_code != "0000" or not isinstance(public_key, str): - raise RuntimeError(f"获取密码公钥失败:{key_message or key_resp.status_code}") - - check_resp = self.client.post( - f"{PORTAL}/zte-bmt-ucs-portalbff/srv/pas/securitycode/check", - headers=self.portal_headers(), - json={"accountId": self.login_name, "callerId": APP_ID, "_t": now_ms()}, - ) - check_code, check_message, needs_security_code = self.code_of(check_resp.json()) - if check_code == "0000" and needs_security_code is True: - raise RuntimeError("这个账号开启了动态安全码,当前登录流程还不能提交安全码") - if check_code not in ("", "0000"): - raise RuntimeError(f"安全码检查失败:{check_message}") - - cipher = encrypt_password(public_key, self.password) - last_message = "登录未完成" - for _ in range(3): - kid = make_kid("t") - image_resp = self.client.get( - f"{PORTAL}/zte-bmt-ucs-portalbff/srv/kaptcha/jigsaw", - params={"kid": kid, "_t": now_ms()}, - headers=self.portal_headers(), - ) - image_code, image_message, image = self.code_of(image_resp.json()) - if image_code != "0000": - raise RuntimeError(f"获取拼图失败:{image_message}") - offset = jigsaw_offset( - decode_data_uri(image["bigImg"]), - decode_data_uri(image["smallImg"]), - int(image["yHeight"]), - ) - headers = self.portal_headers() - headers.update({"kcode": "", "kid": make_kid(""), "kskip": "true", "source": APP_ID}) - login_resp = self.client.post( - f"{PORTAL}/zte-bmt-ucs-portalbff/srv/login", - headers=headers, - json={ - "loginName": self.login_name, - "password": cipher, - "kid": kid, - "jigsawCode": offset, - "_t": now_ms(), - }, - ) - login_code, last_message, profile = self.code_of(login_resp.json()) - if login_code == "0000": - return profile - if any(word in last_message for word in ("验证码", "拼图", "滑块")): - continue - raise RuntimeError(f"登录失败:{last_message}") - raise RuntimeError(f"登录失败:{last_message}") - - def authorize(self, profile: dict) -> None: - account_id = str(profile["accountId"]) - user_id = str(profile["userId"]) - token = str(profile["token"]) - domain = "zte.com.cn" - jar = { - "UCSLoginName": account_id, - "UCSSSOAccount": account_id, - "UCSSSOUser": user_id, - "UCSSSOToken": token, - "UCSSSOInfo": str(profile.get("ssoinfo") or ""), - "UCSSSOLanguage": "zh_CN", - "UCSLoginTime": str(now_ms()), - "iAuthTenantId_prod": TENANT_ID, - "iAuthUserId_prod": user_id, - "iAuthUid_prod": account_id, - "iAuthTid_prod": token, - "iAuthLanguage_prod": "zh_CN", - } - if profile.get("unionId"): - jar["iuacUnionId"] = str(profile["unionId"]) - for name, value in jar.items(): - self.client.cookies.set(name, value, domain=domain, path="/") - - response = self.client.post( - f"{PORTAL}/zte-bmt-ucs-portalbff/oauth/authorize", - params={ - "redirect_uri": REDIRECT_URI, - "client_id": CLIENT_ID, - "response_type": "code", - "scope": "profile", - }, - headers=self.portal_headers(), - json={"accountId": account_id, "token": token, "userId": user_id, "_t": now_ms()}, - ) - code, message, redirect_url = self.code_of(response.json()) - if code != "0000" or not isinstance(redirect_url, str): - raise RuntimeError(f"申请学习平台授权码失败:{message}") - self.client.get(redirect_url, headers={"Referer": PORTAL + "/", "User-Agent": USER_AGENT}) - - def user_info(self) -> dict: - token = None - for cookie in self.client.cookies.jar: - if cookie.name == "ELEARNING_00024" and cookie.value: - token = cookie.value - break - if not token: - names = sorted({cookie.name for cookie in self.client.cookies.jar}) - raise RuntimeError("学习平台没有返回登录会话,现有 Cookie 名称:" + ", ".join(names)) - response = self.client.post( - f"{YXT_API}/v1/customdiy/user/getuserinfobyid", - content=b"", - headers={ - "Accept": "application/json, text/plain, */*", - "Content-Type": "application/json", - "Origin": EUNIV, - "Referer": EUNIV + "/", - "source": "501", - "token": token, - "User-Agent": USER_AGENT, - }, - ) - response.raise_for_status() - payload = response.json() - if not isinstance(payload, dict) or "cnName" not in payload: - raise RuntimeError("用户信息返回无法识别") - return payload +from euniv_client import EunivClient def main() -> int: @@ -257,23 +17,28 @@ def main() -> int: if not login_name or not password: print("请设置环境变量 EUNIV_LOGIN 和 EUNIV_PASSWORD", file=sys.stderr) return 2 - client = EunivLogin(login_name, password) + client = EunivClient(login_name, password) try: - profile = client.login() - client.authorize(profile) - info = client.user_info() + session = client.open_session() finally: client.close() + info = session["profile"] + summary = session["summary"] fields = [ ("工号", info.get("username")), ("姓名", info.get("cnName")), ("部门", info.get("departmentName")), ("岗位层级", info.get("userClassLevelName")), ("邮箱", info.get("email")), + ("累计学时", summary.get("actual_study_hour")), + ("累计学分", summary.get("actual_study_score")), + ("积分", summary.get("points")), + ("今日学时", summary.get("today_hours")), + ("今日学分", summary.get("today_score")), ] print("登录成功") for label, value in fields: - if value: + if value is not None and value != "": print(f"{label}:{value}") return 0 diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..f603547 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,7 @@ +import os +from pathlib import Path + +_root = Path(__file__).resolve().parents[1] / "Temp" / "pytest" +_root.mkdir(parents=True, exist_ok=True) +os.environ["EUNIV_SECRET_KEY"] = "test-secret-key" +os.environ["EUNIV_DB_PATH"] = str(_root / "euniv.db") diff --git a/tests/test_app.py b/tests/test_app.py new file mode 100644 index 0000000..6a9e67b --- /dev/null +++ b/tests/test_app.py @@ -0,0 +1,103 @@ +from datetime import datetime + +from fastapi.testclient import TestClient + +from app.db import SessionLocal, init_db +from app.models import Account, Schedule +from worker.__main__ import due, run_once + + +class FakeClient: + def __init__(self, login_name: str, password: str) -> None: + self.login_name = login_name + self.password = password + + def close(self) -> None: + return None + + def open_session(self) -> dict: + return { + "profile": { + "username": self.login_name, + "cnName": "莫英达", + "departmentName": "广州处", + "userClassLevelName": "Scientist", + "email": "mo@example.com", + }, + "summary": { + "actual_study_hour": "10", + "actual_study_score": "3.5", + "points": "20", + "today_hours": 1.5, + "today_score": 0, + "today": "2026-10-26", + "class_count": 0, + }, + } + + +def setup_function() -> None: + from sqlalchemy import text + + from app.db import engine + + with engine.begin() as connection: + connection.execute(text("DROP TABLE IF EXISTS accounts")) + connection.execute(text("DROP TABLE IF EXISTS schedules")) + connection.execute(text("DROP TABLE IF EXISTS alembic_version")) + init_db() + + +def test_login_stores_account_without_returning_password() -> None: + from app.main import app + import app.main as main_module + import app.service as service_module + + service_module.EunivClient = FakeClient + main_module.login_and_store = lambda db, employee_id, password: service_module.login_and_store( + db, employee_id, password, FakeClient + ) + client = TestClient(app) + response = client.post("/api/login", json={"employee_id": "6650000146", "password": "secret-pass"}) + assert response.status_code == 200 + body = response.json() + assert body["cn_name"] == "莫英达" + assert body["actual_study_hour"] == "10" + assert "password" not in body + listed = client.get("/api/accounts").json() + assert listed[0]["employee_id"] == "6650000146" + assert "password" not in listed[0] + + +def test_schedule_and_worker_sync() -> None: + from app.main import app + + with SessionLocal() as db: + db.add( + Account( + employee_id="10001", + password_cipher="", + last_login_at=datetime.now(), + updated_at=datetime.now(), + ) + ) + db.commit() + from app.service import login_and_store + + with SessionLocal() as db: + login_and_store(db, "10001", "secret-pass", FakeClient) + client = TestClient(app) + saved = client.post("/api/schedules", json={"employee_id": "10001", "run_time": "00:00", "enabled": True}) + assert saved.status_code == 200 + assert run_once(FakeClient) == 1 + with SessionLocal() as db: + schedule = db.get(Schedule, "10001") + assert schedule is not None + assert schedule.status == "ok" + + +def test_due_skips_completed_today() -> None: + now = datetime(2026, 10, 26, 9, 0) + schedule = Schedule(employee_id="1", run_time="08:00", enabled=True, status="ok", last_run_at=now) + assert due(schedule, now) is False + assert due(schedule, datetime(2026, 10, 27, 8, 0)) is True diff --git a/web/index.html b/web/index.html new file mode 100644 index 0000000..6ff828b --- /dev/null +++ b/web/index.html @@ -0,0 +1,12 @@ + + + + + + EunivTools + + +
+ + + diff --git a/web/package-lock.json b/web/package-lock.json new file mode 100644 index 0000000..1598cae --- /dev/null +++ b/web/package-lock.json @@ -0,0 +1,1696 @@ +{ + "name": "euniv-web", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "euniv-web", + "dependencies": { + "naive-ui": "^2.43.2", + "vue": "^3.5.22" + }, + "devDependencies": { + "@vitejs/plugin-vue": "^6.0.1", + "typescript": "^5.9.3", + "vite": "^7.1.12", + "vue-tsc": "^3.1.2" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.11", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.11.tgz", + "integrity": "sha512-snZbO7MEDOof+hvNa97EjEY7qD7h2kwvQr5AJC3ZhQudKW5dnej6k3kP9NQV88hJwaS8vDqRLFo9rivLEhle2g==", + "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.11", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.11.tgz", + "integrity": "sha512-OZ6+oaK7GMyg3IfCpj8JOmn8n+w2rJbDT0LLfVDTLb1ZFeKDh3AiNELgCMUw175IJHSkLl74hG0M0VLsvx+gag==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.11" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.11", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.11.tgz", + "integrity": "sha512-WCsemW40Cpc6gouC1SrY6PBaZ+oLRlEVY9XBvZBI7il/HyUrb2nJ505wE1MHEFyDZNnrWDEuy4jL50WVHfTTSQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.11", + "@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/@esbuild/aix-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", + "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz", + "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", + "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz", + "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", + "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", + "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", + "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", + "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", + "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", + "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", + "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", + "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", + "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", + "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", + "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", + "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", + "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", + "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", + "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", + "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", + "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", + "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", + "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", + "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", + "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", + "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "license": "MIT" + }, + "node_modules/@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/@napi-rs/lzma-linux-x64-gnu": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", + "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^22.20 || ^24.12 || >=25" + } + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.65.0.tgz", + "integrity": "sha512-t2AnVba25baFdq7gczzS13JyVcdubLVbFX1X04mxrggDrTQPUXNv3XM0k9H1hr5tqvg7AVvtQ720QHAj0iYqhg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.65.0.tgz", + "integrity": "sha512-dNONUaEwPGhl/nuO2KV8VABWlcjYyU6KtZGN8dQv5OS5JU7JSCxPijVNKXbRJd0iuTzTiJ4TjPt/4bbvDRNiMQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.65.0.tgz", + "integrity": "sha512-zWQqUH+9zavr2Bxuzfpuv2SIF3X31cr58TvSQC9o1GhpOvkqRwr60GkZdQcudyT/BEgdpdSafjgd2I13MbTL7g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.65.0.tgz", + "integrity": "sha512-RQYreBFWtO4//hIuOaZkYUnF/lPU4lz35dveDimDshWCJvVisVtJ/shmT9bkXK8wFJY+FJF89X6F3Cq1qI3LCw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.65.0.tgz", + "integrity": "sha512-A0NfMj6Cuh/9BE5k3awJKv6HoxFVXIcLAb6SZqAMoxUHPA1ZNNK4RsGuUPD/vL7nEAm9LG+ZzXWWTrnC0XtkpA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.65.0.tgz", + "integrity": "sha512-BI6/H7q3aP0I7S7GOrjyxTjgEJlSnovXE38+bdxBpuKN6z+d//uF+T+VQ3Q7ltJL/71p17ufartARX9Ja5gOGQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.65.0.tgz", + "integrity": "sha512-W1vUprf09RWaVWnsFP1vlUkEWJzTZlpObOEAYZXt9Fq0UVAOYEkeGr7wBX7McKqqIQskXdBnpiOMgwPujordgA==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.65.0.tgz", + "integrity": "sha512-s8QTcZWgrl9haFzEGIqyE5BWyo89pFDGLMBFZ752WYxk8DJwNU/O1X6pZgPw829d9/sm6CCHyrMP3aurt76p1Q==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.65.0.tgz", + "integrity": "sha512-ke1f6dLRzkqveyjjF2fkEwQYZvxHtNNwjegY8nJrwcO0Bdqr8CzFO/pKE0Bns13cx0qz2Ba2Y0Hs3dSwMdnHxA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.65.0.tgz", + "integrity": "sha512-926SMeUcy4y18Rz/w2aJiUKOnyAnm6czg72bXkQEaeemsll+Wr0hnsjb2BGRpHvWgwAMYy5ACJCotbvfLCfj0A==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.65.0.tgz", + "integrity": "sha512-6T7JNRP1hc4hqF2dUsEoVLOt9K8tmODoCLldtQRYnrddGGQY8Gqe2pM/qMMUo7EMowpP7oa2N95k0/8sYK/ipw==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.65.0.tgz", + "integrity": "sha512-SImGFl1Je5kpyAgOCPONVT7h6ASV8mAUwGRjY7eZvVjPg//PfHOXgI+P241RF/+HqsA4PP3qD527ysWFKNQyhQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.65.0.tgz", + "integrity": "sha512-XeDTbmPF1Yu5asfXGPrMkWoxTDhgryQbmw5Q1+R582O51VNCk23J6f2pDrsAp5YkneBVBwtExx6ZGOb9D2aQ6A==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.65.0.tgz", + "integrity": "sha512-VS55JUI/1nsljmV/jfqNkLZXFw8uMO8nNlfoHmSevNf6fO3neuhyDvx9dv3c/Ytt8r/431SL8Qax1dpYvOMZTg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.65.0.tgz", + "integrity": "sha512-Vblw84TbX7RS4la1Y4+yQ7aore/oSyaNtFbppuBr5Vs/4LfBeXKq9dIfoExw6zOvRERqd2rRAjnZRaMhH/0x5w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.65.0.tgz", + "integrity": "sha512-7+gHjtONvKgwR9InTKFaLq53f6YzBJkgeMRBENdWTsQr+spahGqQm8HF5aXpq8i4JaRrOqYyv6Zn1WltDTxaZQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.65.0.tgz", + "integrity": "sha512-KvNDC0J6s4vVHhtJ6KrDXU0Er0au/hmRIBq/+1maCV8TseGupeKizq0bWcrbp2HE1T8xoknvN0Q/KZ/YF0qX3w==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.65.0.tgz", + "integrity": "sha512-GExdD15WPvu/x/drELjVam7vX8EsPgvTMOa/iJL/p/4m/oOqzbb7JXZg8fXR4hlXtg/sF2zyTZ3bR0AEtEMlhQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.65.0.tgz", + "integrity": "sha512-8sT9PemIZfIMED4Vd4KGoOXVDj5CMSWNcGdbheRUx9TYS03yOWdT2Q0lXPyEyNBB9YTilwewIQKNIBk6Nxi0Kg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.65.0.tgz", + "integrity": "sha512-pO6Ehi0jo5yE0R6PltKhJhv9mlIiyzBJk5N5NUF2OF6xtVKI+1bdXxj/rb0jGXy3hck1ELVT0QPY3tzkAm360w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.65.0.tgz", + "integrity": "sha512-vo7N3/+cjjPDYr8vtxC+qSNgWa9sDvJ7g8N8R5SWqFY4WiNH1ULcAU70SKVyHeiIZOYYwNP9pTipmhN5sl1NPw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.65.0.tgz", + "integrity": "sha512-ArwvgFAbjKcDM7qqotZ4OVYf+UMT9xH2YzkCzK4+AuZSDihMlz1Ekoe4INwBVXzn2mnJzuIYOcSx07iTBijGRQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.65.0.tgz", + "integrity": "sha512-QGMmK4/cxKE/36FoLMSHQBCyymv/eFTnsCvvsBF0rgmOvVbvX78VWZRerL3dHa77f4pM6Xcc2iGDhJ10w/svKQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.65.0.tgz", + "integrity": "sha512-XfKYFWHIPs4HPODIMsGF1IKlS3H1e3WokUZIgpmn4+uNnZBlnRDDHEylNyazbQXwhMKZre68OjtRYbKqb5+j8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.65.0.tgz", + "integrity": "sha512-wPWi++K4Bs1VR4XihOhfGi4IGX6Cub7FlerTf8X2v+2BtDHddgSqWCXwGD+h2yAe4/niIhNDwAltioOC+wEogQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/lodash": { + "version": "4.17.27", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.27.tgz", + "integrity": "sha512-VenMRv/eKNrspX9v3H4dbmjsrnCOYdYBG3kxXKk3dG6X+urBGcj2Prww3xw1U5K4FV/mE4h5GbWd0szEKf+9ew==", + "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/@volar/language-core": { + "version": "2.4.28", + "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.4.28.tgz", + "integrity": "sha512-w4qhIJ8ZSitgLAkVay6AbcnC7gP3glYM3fYwKV3srj8m494E3xtrCv6E+bWviiK/8hs6e6t1ij1s2Endql7vzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/source-map": "2.4.28" + } + }, + "node_modules/@volar/source-map": { + "version": "2.4.28", + "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.4.28.tgz", + "integrity": "sha512-yX2BDBqJkRXfKw8my8VarTyjv48QwxdJtvRgUpNE5erCsgEUdI2DsLbpa+rOQVAJYshY99szEcRDmyHbF10ggQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@volar/typescript": { + "version": "2.4.28", + "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.4.28.tgz", + "integrity": "sha512-Ja6yvWrbis2QtN4ClAKreeUZPVYMARDYZl9LMEv1iQ1QdepB6wn0jTRxA9MftYmYa4DQ4k/DaSZpFPUfxl8giw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/language-core": "2.4.28", + "path-browserify": "^1.0.1", + "vscode-uri": "^3.0.8" + } + }, + "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/language-core": { + "version": "3.3.13", + "resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-3.3.13.tgz", + "integrity": "sha512-axA0Xemn5LuUKuKWob0/kVq7xQ2mJJM6VqA9Exvt35nM9yRC31goWVve/G/Zb2ZCLsXC8FHYjjfXlnshknSCew==", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/language-core": "2.4.28", + "@vue/compiler-dom": "^3.5.0", + "@vue/shared": "^3.5.0", + "alien-signals": "^3.2.1", + "muggle-string": "^0.4.1", + "path-browserify": "^1.0.1", + "picomatch": "^4.0.4" + } + }, + "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/alien-signals": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/alien-signals/-/alien-signals-3.2.1.tgz", + "integrity": "sha512-I8FjmltrfnDFoZedi5CG8DghVYNhzb/Ijluz7tCSJH0xpd0484Kowhbb1XDYOxfJpU1p5wnM2X54dA+IfGyD1g==", + "dev": true, + "license": "MIT" + }, + "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/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/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/esbuild": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", + "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.2", + "@esbuild/android-arm": "0.28.2", + "@esbuild/android-arm64": "0.28.2", + "@esbuild/android-x64": "0.28.2", + "@esbuild/darwin-arm64": "0.28.2", + "@esbuild/darwin-x64": "0.28.2", + "@esbuild/freebsd-arm64": "0.28.2", + "@esbuild/freebsd-x64": "0.28.2", + "@esbuild/linux-arm": "0.28.2", + "@esbuild/linux-arm64": "0.28.2", + "@esbuild/linux-ia32": "0.28.2", + "@esbuild/linux-loong64": "0.28.2", + "@esbuild/linux-mips64el": "0.28.2", + "@esbuild/linux-ppc64": "0.28.2", + "@esbuild/linux-riscv64": "0.28.2", + "@esbuild/linux-s390x": "0.28.2", + "@esbuild/linux-x64": "0.28.2", + "@esbuild/netbsd-arm64": "0.28.2", + "@esbuild/netbsd-x64": "0.28.2", + "@esbuild/openbsd-arm64": "0.28.2", + "@esbuild/openbsd-x64": "0.28.2", + "@esbuild/openharmony-arm64": "0.28.2", + "@esbuild/sunos-x64": "0.28.2", + "@esbuild/win32-arm64": "0.28.2", + "@esbuild/win32-ia32": "0.28.2", + "@esbuild/win32-x64": "0.28.2" + } + }, + "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/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/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/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/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==", + "dev": true, + "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/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dev": true, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.31.tgz", + "integrity": "sha512-YUbWYCgErwnMAVkjUnYa+KlMBzGpHwiIt/DE7f0G33AuX2LH9UcTk6KgWxd3zRU+pN3u/C+Xl3EnMLM4Hea7Sg==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.20", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/rollup": { + "version": "4.65.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.65.0.tgz", + "integrity": "sha512-QVCvQUTGDN6JRwi3jVGCY3H4aTHvi9rX0LyoBMkGUvdh/Z6O51CzcLz85BWZaTCDGhl6ySGqYZs+xI1jmPqGcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.9" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@napi-rs/lzma-linux-x64-gnu": "1.5.1", + "@rollup/rollup-android-arm-eabi": "4.65.0", + "@rollup/rollup-android-arm64": "4.65.0", + "@rollup/rollup-darwin-arm64": "4.65.0", + "@rollup/rollup-darwin-x64": "4.65.0", + "@rollup/rollup-freebsd-arm64": "4.65.0", + "@rollup/rollup-freebsd-x64": "4.65.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.65.0", + "@rollup/rollup-linux-arm-musleabihf": "4.65.0", + "@rollup/rollup-linux-arm64-gnu": "4.65.0", + "@rollup/rollup-linux-arm64-musl": "4.65.0", + "@rollup/rollup-linux-loong64-gnu": "4.65.0", + "@rollup/rollup-linux-loong64-musl": "4.65.0", + "@rollup/rollup-linux-ppc64-gnu": "4.65.0", + "@rollup/rollup-linux-ppc64-musl": "4.65.0", + "@rollup/rollup-linux-riscv64-gnu": "4.65.0", + "@rollup/rollup-linux-riscv64-musl": "4.65.0", + "@rollup/rollup-linux-s390x-gnu": "4.65.0", + "@rollup/rollup-linux-x64-gnu": "4.65.0", + "@rollup/rollup-linux-x64-musl": "4.65.0", + "@rollup/rollup-openbsd-x64": "4.65.0", + "@rollup/rollup-openharmony-arm64": "4.65.0", + "@rollup/rollup-win32-arm64-msvc": "4.65.0", + "@rollup/rollup-win32-ia32-msvc": "4.65.0", + "@rollup/rollup-win32-x64-gnu": "4.65.0", + "@rollup/rollup-win32-x64-msvc": "4.65.0", + "fsevents": "~2.3.2" + } + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/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/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "devOptional": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "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": "7.3.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.7.tgz", + "integrity": "sha512-AHEzTORMbi7/7aXp7w7KZ5+DCUdSeLsJz0grY8xHpc9DHdYb0vQu6DqJfm2tOw3gDExNgPgnJTXxM6syYFHaCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.27.0 || ^0.28.0", + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" + }, + "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", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "lightningcss": "^1.21.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 + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/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/vscode-uri": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.2.0.tgz", + "integrity": "sha512-m2gXo3bn0G1kT9InzMf07fTbqMbGtyckj3bH5ktLO+1Ssv+yiATZ4dhwaQv9UZWxJh6E9IFGnQyjgWVDWVBDrg==", + "dev": true, + "license": "MIT" + }, + "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-tsc": { + "version": "3.3.13", + "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-3.3.13.tgz", + "integrity": "sha512-jE4/bXdOMSHVxEGgQCqNllJy+9N3Gx6tfSAsg0yhFK/MAN6eXqISihupnDEKSCt12VVnjN2gI3AqLYcqoh5x/A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/typescript": "2.4.28", + "@vue/language-core": "3.3.13" + }, + "bin": { + "vue-tsc": "bin/vue-tsc.js" + }, + "peerDependencies": { + "typescript": ">=5.0.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" + } + } + } +} diff --git a/web/package.json b/web/package.json new file mode 100644 index 0000000..22d61c3 --- /dev/null +++ b/web/package.json @@ -0,0 +1,19 @@ +{ + "name": "euniv-web", + "private": true, + "type": "module", + "scripts": { + "dev": "vite", + "build": "vue-tsc --noEmit && vite build" + }, + "dependencies": { + "naive-ui": "^2.43.2", + "vue": "^3.5.22" + }, + "devDependencies": { + "@vitejs/plugin-vue": "^6.0.1", + "typescript": "^5.9.3", + "vite": "^7.1.12", + "vue-tsc": "^3.1.2" + } +} diff --git a/web/src/App.vue b/web/src/App.vue new file mode 100644 index 0000000..5eb68ec --- /dev/null +++ b/web/src/App.vue @@ -0,0 +1,10 @@ + + + diff --git a/web/src/LoginPage.vue b/web/src/LoginPage.vue new file mode 100644 index 0000000..194966f --- /dev/null +++ b/web/src/LoginPage.vue @@ -0,0 +1,165 @@ + + + diff --git a/web/src/main.ts b/web/src/main.ts new file mode 100644 index 0000000..9b65c56 --- /dev/null +++ b/web/src/main.ts @@ -0,0 +1,6 @@ +import { createApp } from "vue"; +import naive from "naive-ui"; +import App from "./App.vue"; +import "./styles.css"; + +createApp(App).use(naive).mount("#app"); diff --git a/web/src/styles.css b/web/src/styles.css new file mode 100644 index 0000000..3fefe5d --- /dev/null +++ b/web/src/styles.css @@ -0,0 +1,10 @@ +html, +body, +#app { + margin: 0; + height: 100%; +} + +body { + background: #f5f7f6; +} diff --git a/web/tsconfig.json b/web/tsconfig.json new file mode 100644 index 0000000..ee52135 --- /dev/null +++ b/web/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "ESNext", + "moduleResolution": "bundler", + "strict": true, + "jsx": "preserve", + "noEmit": true, + "skipLibCheck": true, + "lib": ["ES2022", "DOM"] + }, + "include": ["src"] +} diff --git a/web/vite.config.ts b/web/vite.config.ts new file mode 100644 index 0000000..6c33634 --- /dev/null +++ b/web/vite.config.ts @@ -0,0 +1,11 @@ +import { defineConfig } from "vite"; +import vue from "@vitejs/plugin-vue"; + +export default defineConfig({ + plugins: [vue()], + server: { + proxy: { + "/api": "http://127.0.0.1:8000", + }, + }, +}); diff --git a/worker/__init__.py b/worker/__init__.py new file mode 100644 index 0000000..bb7376e --- /dev/null +++ b/worker/__init__.py @@ -0,0 +1 @@ +"""定时同步学习汇总。""" diff --git a/worker/__main__.py b/worker/__main__.py new file mode 100644 index 0000000..7e7bd4b --- /dev/null +++ b/worker/__main__.py @@ -0,0 +1,74 @@ +"""轮询定时配置,到点登录并刷新学时学分汇总。""" + +from __future__ import annotations + +import os +import time +from datetime import datetime + +from sqlalchemy import select + +from app.db import SessionLocal, init_db +from app.models import Account, Schedule +from app.service import apply_session +from euniv_client import EunivClient +from euniv_client.crypto import decrypt_secret + + +def due(schedule: Schedule, now: datetime) -> bool: + if not schedule.enabled: + return False + hour, minute = schedule.run_time.split(":") + if (now.hour, now.minute) < (int(hour), int(minute)): + return False + if schedule.last_run_at and schedule.last_run_at.date() == now.date() and schedule.status == "ok": + return False + return True + + +def run_once(client_factory=EunivClient) -> int: + init_db() + now = datetime.now() + ran = 0 + with SessionLocal() as db: + schedules = list(db.scalars(select(Schedule))) + for schedule in schedules: + if not due(schedule, now): + continue + account = db.get(Account, schedule.employee_id) + if account is None: + schedule.status = "error" + schedule.last_message = "账号不存在" + db.commit() + continue + schedule.status = "running" + db.commit() + try: + password = decrypt_secret(account.password_cipher) + client = client_factory(account.employee_id, password) + try: + session = client.open_session() + finally: + client.close() + apply_session(account, account.employee_id, password, session, now) + schedule.status = "ok" + schedule.last_message = "已同步学时学分" + schedule.last_run_at = now + ran += 1 + except Exception as exc: + schedule.status = "error" + schedule.last_message = str(exc)[:255] + schedule.last_run_at = now + db.commit() + return ran + + +def main() -> None: + interval = int(os.environ.get("EUNIV_WORKER_INTERVAL", "20")) + while True: + run_once() + time.sleep(interval) + + +if __name__ == "__main__": + main()