diff --git a/README.md b/README.md index 76980a5..822e2dc 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ cd desktop && npm install && npm run electron:dev | 脚本 | `scripts/bootstrap_vps.sh` | | TLS | 本机 Nginx / 宝塔 / Caddy → `127.0.0.1:4015/8014` | | 进程绑定 | 通常 `127.0.0.1` | -| 业务出海(可选) | 文档后文「全局 SOCKS5 / DouyinWEB 专用 sing-box」规划;**勿动** VPS 上已有 v2ray-agent `sing-box` | +| 业务出海(可选) | **静态住宅 IP**:`egress_mode=residential` → 本机 `douyinweb-singbox` `:17891` → 供应商 SOCKS;**默认 off(机房 IP)**;**勿动** v2ray-agent `sing-box.service` | | ShellCrash | **不是**默认栈;不要在纯 VPS 上假设有 `:7890` ShellCrash | | Neko WebRTC | `NEKO_WEBRTC_NAT1TO1` / `DY_NEKO_NAT1TO1` = **本机公网 IP**;UDP/TCP mux 在本机安全组放行(无第二跳 DNAT) | | 边缘 Caddy | 不需要 `bootstrap_physical_edge.sh` | @@ -403,6 +403,50 @@ Windows 上可用 `python scripts\_deploy.py`(需自行配置 SSH 目标,** - **全局 SOCKS5**(默认关,目标方案见 [全局 SOCKS5(sing-box + proxychains)](#全局-socks5sing-box--proxychains)):静态住宅 IP;规划覆盖 Shorts / 长视频 / TikTok / X / Neko / FFmpeg;与 v2ray-agent 翻墙 sing-box **隔离共存** - **频道级联清理**:删除 Shorts 频道时同步删除关联任务与本地成片;孤儿任务可运维 purge +### 长视频(yt-long) + +控制台:[`/yt-long`](https://dylive.nomadro.com/yt-long)。与 Shorts / TikTok / X **完全隔离**(独立频道表、独立任务表、独立配额)。 + +#### 成片时长 + +| 项 | 值 | +|----|----| +| 随机时长 | **8–15 分钟**(`random.randint(yt_long_min_sec, yt_long_max_sec)`) | +| 常量默认 | `YT_LONG_MIN_SEC=480` · `YT_LONG_MAX_SEC=900`(`backend/app/yt_long_db.py`) | +| 设置键 | `yt_long_min_sec` / `yt_long_max_sec`(API 校验同样限制在 480–900) | +| 画幅 | 默认 **9:16**;`yt_long_landscape_16x9=true` 时才出 16:9 | + +录制超时回收按最长片放宽(约 `max(1200, max_sec + 300)` 秒),避免 15 分钟母片被误标 orphan。 + +#### 上传可靠性(源码策略,非清库补丁) + +长视频母片可达数百 MB。相关逻辑: + +| 模块 | 行为 | +|------|------| +| `yt_long_upload.py` | **异步分块流式** resumable 上传(`AsyncIterator`,禁止同步 `file` 句柄 / `read_bytes`);HTTP 超时随体积缩放(约 8s/MB,下限 10 分钟、上限 45 分钟);title/description 去掉 `<>` 等非法元数据 | +| `clip_retention.py` | 删除成片前保护 `scheduled/recorded/uploading`;若仍删掉文件,yt_long 任务 **回 pending 重录**(对齐 Shorts),禁止留下「scheduled + 空 clip_path」死任务 | +| `yt_long_db.reclaim_stale_yt_long_uploads` | 按 `clip_seconds` 动态放宽 stale 阈值;有文件则退避重排队,无文件则重录 | +| `yt_long_db.heal_yt_long_orphan_jobs` | 主循环自愈:进程重启后的 `uploading` 孤儿重排队;已有 `youtube_video_id` 的脏 `scheduled` → `uploaded`;缺片 → `pending` | +| 配额 429 | **不**把当前任务标 `failed` 烧掉;改为 `scheduled` + 延后 `upload_at`,并对该 OAuth Client 冷静;太平洋日配额恢复后自动再传 | +| OAuth 401/403 | 标记频道 `oauth_ok=0` 并延后;选频道 / claim 上传时跳过坏授权频道 | + +#### 配额与开关(常用) + +| 设置 | 含义 | +|------|------| +| `yt_long_enabled` | 总开关(默认关;生产按需开) | +| `yt_long_auto_upload` | 录完是否自动排上传 | +| `yt_long_channel_daily_max` | 每启用频道北京日上传上限 | +| `yt_long_daily_max` / `yt_long_source_daily_max` | 全局上传 / 母片日上限 | +| `yt_long_max_concurrent` | 同时录制/上传并发 | +| `yt_long_upload_min_gap_sec` | 同流水线两次上传最小间隔 | +| `yt_long_delete_clip_after_upload` | 上传成功后删本地成片 | + +API:`GET/POST /api/yt-long/settings` · `GET /api/yt-long/status` · `GET /api/yt-long/jobs` · `GET /api/yt-long/channels`。 + +Studio 里长时间停在 **Processing will begin shortly / Pending**,优先核对本机任务是否已有 `youtube_video_id`、以及 Google Cloud **Video Uploads/天** 是否 429;处理中状态本身不等于本系统上传失败。 + #### 分发台全局每日配额(Shorts / 长视频 / TikTok / X) 各业务页顶部 **DailyQuotaGlobalCard**:在保留「单频道编辑」的前提下,可一次改默认并可选同步全部频道。 @@ -416,6 +460,10 @@ Windows 上可用 `python scripts\_deploy.py`(需自行配置 SSH 目标,** 长视频后台 `reconcile_yt_long_upload_caps` **不得**把操作员保存的上限强行改回 5;仅在 API 限流日对「高于有效上限」的频道做软封顶。 +#### 配额口径(Shorts / 长视频) + +控制台顶部「北京日配额 / YouTube 上传 / 母片录制」**只合计已启用**频道(停用的 Client B 等不计入)。后端缺口与取样同样只看 `enabled=1`。长视频母片上限 = 已启用 oauth 长视频频道 × 每频道日上限,**不再**按 Shorts 舰队规模抬高。 + #### YouTube 直播状态(receiving-first) 首页 / live-map / 转播门控:**优先** YouTube 是否在收流(Studio receiving / `on_air` / youtubei·OAuth `is_live`),Neko 上下线不得覆盖「已在收流」。`encoder_lost` / LIVE 计时器 + No data **不算** receiving。细则见 `.cursor/rules/youtube-live-receiving-first.mdc`。 @@ -437,7 +485,7 @@ Windows 上可用 `python scripts\_deploy.py`(需自行配置 SSH 目标,** #### API 防挂死 / 直播优先 CPU(双 VPS) -现网根因(尤其 **VPS-B dy.nomadro.live**):直播推流 ffmpeg 与 yt_long/shorts 转码叠在一起 → load 飙高 → uvicorn 事件循环饿死 → `/api/health` 超时 → 整站「宕机」。**dylive 同代码**不叠加重转码时即可稳住。对策: +现网根因(尤其 **VPS-B dy.nomadro.live**):直播推流 ffmpeg 与 yt_long/shorts 转码叠在一起 → load 飙高 → uvicorn 事件循环饿死 → `/api/health` 超时 → 整站「宕机」。另有一类反复复发:**前端 `npm run build` 留下孤儿 `usr`/`node` 进程**,可单独把 4 核打到 100%。**dylive 同代码**在未叠加重转码/无孤儿时即可稳住。对策: | 层 | 机制 | 行为 | |----|------|------| @@ -446,9 +494,11 @@ Windows 上可用 `python scripts\_deploy.py`(需自行配置 SSH 目标,** | 剪辑让路 | `host_metrics.clip_encode_defer_reason()` | 有 YouTube **直播推流** 或 load/CPU 过高时,yt_long / shorts / tiktok / x_clips **不新开** 录制 ffmpeg | | API 内存 | systemd drop-in(对齐 dylive 紧预算,按机内存微调) | 例:dylive ≈ High **700M** / Max **900M**;dy.live ≈ High **1100M** / Max **1500M**(ffmpeg 已外置) | | ffmpeg CPU | `douyinweb-ffmpeg.slice` `CPUQuota` | dy.live 现网 **200%**(4 核机留给 API/Neko 余量) | +| Web 加固 | `douyinweb-web.service.d/harden.conf` | `KillMode=control-group` + `CPUQuota=150%`,部署后孤儿随 unit 杀掉 | +| 孤儿守护 | `scripts/linux/build_orphan_watch.sh` + timer(每分钟) | 清 Next SWC `usr` / 假 `pm2` / 无参 `node` / `.d*` `.r*` 临时目录 | | 看门狗 | `scripts/linux/api_health_watch.sh` → `douyinweb-api-watch.service` | health 连续失败或 `:8014` Recv-Q 过高 → SIGKILL 重启 API | -对齐部署(代码 + systemd):`python scripts/_align_dy_to_dylive_harden.py`(经 VPS-A 跳到 VPS-B);仅 cgroup/watch 骨架也可用 `scripts/_deploy_api_hang_harden.py`。 +对齐部署:`python scripts/_stabilize_dy_permanent.py`(孤儿 timer + web/api CPU);配额/代码对齐另用 `scripts/_align_dy_to_dylive_harden.py`。 #### 时段排除名单(timeslot exclude) @@ -505,7 +555,7 @@ Windows 上可用 `python scripts\_deploy.py`(需自行配置 SSH 目标,** | `/youtube` | 频道管理(默认)+ InnerTube 探测 | | `/youtube` → **分配** | Pro 转播:KEY / 精选源 / 时间段 / Neko / FFmpeg 实况 | | `/shorts` | 授权 / 任务 / 排程 / 立即上传 / 在播分析 | -| `/yt-long` | 长视频成片 / 上传 | +| `/yt-long` | 长视频成片 / 上传(**8–15 分钟**随机母片 → YouTube 长视频) | | `/yt-revenue` | YPP 预估创收(需 monetary OAuth) | | `/settings` | 防风控、通知、静默、YT/Shorts、**全局 SOCKS5**、改密、PB/S3 运维 | | `/ops` | 运维:Umami / ntfy / DNS / systemd;顶栏另有 CPU·内存条 | @@ -531,7 +581,7 @@ Windows 上可用 `python scripts\_deploy.py`(需自行配置 SSH 目标,** ``` douyinWEB/ - backend/app/ FastAPI(auth / monitor / cover / shorts_* / youtube_relay_* / youtube_neko / host_metrics …) + backend/app/ FastAPI(auth / monitor / cover / shorts_* / yt_long_* / youtube_relay_* / youtube_neko / host_metrics / clip_retention …) backend/tests/ pytest(Shorts / live / reconcile 等) backend/data/ SQLite、封面/成片缓存 frontend/src/ Next.js 控制台(Web) @@ -666,8 +716,9 @@ python scripts\_deploy.py - 错误示例:`Quota exceeded for quota metric 'Video Uploads' … Video Uploads per day` - **不是程序崩溃**:Google Cloud 项目每日 Video Uploads 桶用尽(默认约 100 次/天,[官方文档](https://developers.google.com/youtube/v3/docs/videos/insert)) - 配额在 **太平洋时间 0 点** 重置;Console → YouTube Data API → Quotas 可查看用量与申请提额 -- 多 Google 项目:Shorts 频道绑定 OAuth Client **A/B/C/D**,各 Client 独立计数、互不影响 +- 多 Google 项目:Shorts / 长视频频道绑定 OAuth Client **A/B/C/D**,各 Client 独立计数、互不影响 - 实现:`backend/app/shorts_yt_quota.py`(按 Client 计数展示、429 识别);Shorts 页展示用量提示与接口错误,**禁止本地自设上传暂停** +- **长视频**:429 时该任务 **延后重试**(保持成片、不标失败烧掉),并对该 Client 进入冷静;详见 [长视频(yt-long)](#长视频yt-long) ## 全局 SOCKS5(sing-box + proxychains)— 主要针对纯 VPS diff --git a/backend/app/clip_cascade.py b/backend/app/clip_cascade.py index cdfc792..9012184 100644 --- a/backend/app/clip_cascade.py +++ b/backend/app/clip_cascade.py @@ -159,7 +159,12 @@ def _pick_start(master_sec: float, cut_sec: int, window: tuple[float, float]) -> def estimate_platform_daily_need(cfg: dict[str, Any] | None = None) -> dict[str, int]: - """How many uploads each platform wants today (enabled channels × per-channel caps).""" + """Platform daily wants (informational) + authoritative yt-long master count. + + Master recordings are owned by **enabled yt_long channels × per-channel cap**. + One master can cascade-cut Shorts/TikTok/X — do **not** inflate masters to + Shorts fleet size (that produced 7×9=63 while only 7 long channels × 2 = 14). + """ from . import db from . import tiktok_db from . import yt_long_db @@ -175,15 +180,17 @@ def estimate_platform_daily_need(cfg: dict[str, Any] | None = None) -> dict[str, tiktok_n = len(tiktok_db.list_tiktok_channels(enabled=True) or []) except Exception: tiktok_n = 0 - yt_upload = int(yt_long_db.yt_long_daily_max(settings_map) or 0) + # Prefer sum of enabled oauth channel caps (respects per-row daily_max). + yt_upload = int(yt_long_db.yt_long_enabled_upload_cap(settings_map) or 0) + if yt_upload <= 0: + yt_upload = int(yt_long_db.yt_long_daily_max(settings_map) or 0) shorts_need = shorts_n * int(db.SHORTS_DAILY_FORCE) tiktok_need = tiktok_n * int(db.TIKTOK_DAILY_FORCE) try: x_need = max(0, int(settings_map.get("x_clips_daily_max") or 20)) except Exception: x_need = 20 - # One master feeds all platforms once → masters needed = max(...) - source_need = max(yt_upload, shorts_need, tiktok_need, x_need, 0) + source_need = max(0, yt_upload) return { "yt_long": yt_upload, "yt_long_upload": yt_upload, @@ -197,23 +204,21 @@ def estimate_platform_daily_need(cfg: dict[str, Any] | None = None) -> dict[str, def ensure_source_covers_platforms(cfg: dict[str, Any] | None = None) -> dict[str, Any]: - """Always keep yt_long_source_daily_max ≥ max(platform quotas); never raise upload cap.""" + """Keep yt_long_source_daily_max == enabled long-upload cap (no Shorts inflation).""" from . import db from . import yt_long_db settings_map = cfg if cfg is not None else db.get_settings_map() need = estimate_platform_daily_need(settings_map) - target = int(need["source_masters"]) + upload_cap = int(need.get("yt_long_upload") or yt_long_db.yt_long_daily_max(settings_map) or 0) + target = upload_cap current = int(yt_long_db.yt_long_source_daily_max(settings_map) or 0) - upload_cap = int(yt_long_db.yt_long_daily_max(settings_map) or 0) - if not bool(settings_map.get("clip_cascade_enabled", True)): - # Without cascade, source only needs to cover YouTube long uploads - target = upload_cap try: - hard_cap = max(42, min(300, int(settings_map.get("yt_long_source_cap") or 200))) + hard_cap = max(upload_cap, min(300, int(settings_map.get("yt_long_source_cap") or 200))) except Exception: - hard_cap = 200 - new_max = min(hard_cap, max(upload_cap, target)) + hard_cap = max(upload_cap, 200) + # Never floor at 42 — that forced 母片≥42 when only 7×2=14 was configured. + new_max = min(hard_cap, max(0, target)) if new_max != int(settings_map.get("yt_long_source_daily_max") or 0): db.update_settings_map({"yt_long_source_daily_max": new_max}) return {"ok": True, "adjusted": True, "from": current, "to": new_max, **need} diff --git a/backend/app/clip_retention.py b/backend/app/clip_retention.py index 476d013..1c0dab6 100644 --- a/backend/app/clip_retention.py +++ b/backend/app/clip_retention.py @@ -16,7 +16,7 @@ from typing import Any from .config import settings _DEFAULT_MAX_AGE_H = 24.0 -_DEFAULT_MIN_FREE_GB = 12.0 +_DEFAULT_MIN_FREE_GB = 8.0 def _max_age_sec(cfg: dict[str, Any]) -> float: @@ -137,7 +137,7 @@ def _clear_path_refs(path: str, now: float) -> None: ) except Exception: pass - for table in ("tiktok_jobs", "x_clip_jobs", "yt_long_jobs"): + for table in ("tiktok_jobs", "x_clip_jobs"): try: conn.execute( f"UPDATE {table} SET clip_path = '', updated_at = ? WHERE clip_path = ?", @@ -145,6 +145,32 @@ def _clear_path_refs(path: str, now: float) -> None: ) except Exception: continue + # yt_long: mirror Shorts — never leave scheduled/recorded with empty path + try: + conn.execute( + """ + UPDATE yt_long_jobs + SET clip_path = '', status = 'pending', upload_at = 0, + clip_seconds = 0, started_at = 0, + error = '成片被清理,已重新排队录制', + updated_at = ? + WHERE clip_path = ? + AND status IN ('recorded', 'scheduled') + AND IFNULL(youtube_video_id, '') = '' + AND IFNULL(error, '') NOT LIKE 'cascade_only%' + """, + (now, path), + ) + conn.execute( + """ + UPDATE yt_long_jobs + SET clip_path = '', updated_at = ? + WHERE clip_path = ? + """, + (now, path), + ) + except Exception: + pass conn.commit() finally: conn.close() @@ -155,11 +181,13 @@ def _clear_path_refs(path: str, now: float) -> None: def _job_still_needs_file(path: str) -> bool: from . import db + # Protect any job that still needs the file to finish (not only in-flight IO). + # yt_long scheduled/recorded without video_id must keep the master until upload. checks = ( - "SELECT 1 FROM shorts_jobs WHERE clip_path=? AND status IN ('uploading','recording') LIMIT 1", - "SELECT 1 FROM tiktok_jobs WHERE clip_path=? AND status IN ('uploading','recording') LIMIT 1", - "SELECT 1 FROM x_clip_jobs WHERE clip_path=? AND status IN ('posting','recording') LIMIT 1", - "SELECT 1 FROM yt_long_jobs WHERE clip_path=? AND status IN ('uploading','recording') LIMIT 1", + "SELECT 1 FROM shorts_jobs WHERE clip_path=? AND status IN ('uploading','recording','scheduled','recorded') AND IFNULL(youtube_video_id,'')='' LIMIT 1", + "SELECT 1 FROM tiktok_jobs WHERE clip_path=? AND status IN ('uploading','recording','scheduled','recorded') AND IFNULL(tiktok_video_id,'')='' LIMIT 1", + "SELECT 1 FROM x_clip_jobs WHERE clip_path=? AND status IN ('posting','recording','scheduled','recorded') AND IFNULL(tweet_id,'')='' LIMIT 1", + "SELECT 1 FROM yt_long_jobs WHERE clip_path=? AND status IN ('uploading','recording','scheduled','recorded') AND IFNULL(youtube_video_id,'')='' AND IFNULL(error,'') NOT LIKE 'cascade_only%' LIMIT 1", ) try: with db._lock: diff --git a/backend/app/db.py b/backend/app/db.py index db57c0e..72f5710 100644 --- a/backend/app/db.py +++ b/backend/app/db.py @@ -709,8 +709,8 @@ def _seed_defaults(conn: sqlite3.Connection) -> None: "yt_long_daily_max": 70, "yt_long_source_daily_max": 70, "yt_long_channel_daily_max": 5, - "yt_long_min_sec": 180, - "yt_long_max_sec": 480, + "yt_long_min_sec": 480, + "yt_long_max_sec": 900, "yt_long_dedupe_room_day": True, "yt_long_max_concurrent": 1, "yt_long_upload_min_gap_sec": 900, @@ -722,7 +722,7 @@ def _seed_defaults(conn: sqlite3.Connection) -> None: "yt_long_description_template": "", "clip_cascade_enabled": True, "clips_max_age_hours": 24, - "clips_min_free_gb": 12, + "clips_min_free_gb": 8, # Seaweed/S3 session covers (covers/*.jpg); avatars kept. Default 2 days. "covers_s3_keep_days": 2, "yt_long_monetize_when_ypp": True, @@ -741,8 +741,9 @@ def _seed_defaults(conn: sqlite3.Connection) -> None: "settings_audit_enabled": True, "db_backup_enabled": False, "db_backup_interval_hours": 24, - "db_backup_keep_days": 7, - "ops_alerts_enabled": False, + "db_backup_keep_days": 3, + "db_backup_keep_max": 3, + "ops_alerts_enabled": True, "ops_alert_disk_enabled": False, "ops_alert_quota_enabled": False, "ops_alert_interval_sec": 900, diff --git a/backend/app/db_backup.py b/backend/app/db_backup.py index 9e3340a..6897661 100644 --- a/backend/app/db_backup.py +++ b/backend/app/db_backup.py @@ -1,5 +1,11 @@ # -*- coding: utf-8 -*- -"""SQLite backup — copy-only, never modifies source DB.""" +"""SQLite backup — copy-only, never modifies source DB. + +Hardening (disk-safe): + - Cap file count (db_backup_keep_max), not only age + - Skip auto backup if last auto copy is fresher than interval + - Refuse new backup when free disk is below floor (leave headroom for live) +""" from __future__ import annotations import shutil @@ -20,17 +26,54 @@ def _db_path() -> Path: return Path(settings.data_dir) / "monitor.db" -def run_backup(*, label: str = "") -> dict[str, Any]: +def _disk_free_gb(path: Path | None = None) -> float: + try: + usage = shutil.disk_usage(str(path or settings.data_dir)) + return float(usage.free) / (1024.0 ** 3) + except Exception: + return 999.0 + + +def _latest_auto_mtime() -> float: + newest = 0.0 + for p in _backup_dir().glob("monitor_*_auto.db"): + try: + newest = max(newest, p.stat().st_mtime) + except OSError: + continue + return newest + + +def run_backup(*, label: str = "", force: bool = False) -> dict[str, Any]: src = _db_path() if not src.is_file(): return {"ok": False, "error": "db_not_found"} + + free = _disk_free_gb() + # Need room for one full copy + ~2GB headroom + need_gb = max(3.0, (src.stat().st_size / (1024.0 ** 3)) * 1.15 + 2.0) + if (not force) and free < need_gb: + return { + "ok": False, + "error": "disk_too_low", + "disk_free_gb": round(free, 2), + "need_gb": round(need_gb, 2), + } + stamp = time.strftime("%Y%m%d_%H%M%S") name = f"monitor_{stamp}{('_' + label) if label else ''}.db" dest = _backup_dir() / name try: shutil.copy2(src, dest) size = dest.stat().st_size - return {"ok": True, "path": str(dest), "name": name, "size": size, "ts": time.time()} + return { + "ok": True, + "path": str(dest), + "name": name, + "size": size, + "ts": time.time(), + "disk_free_gb": round(_disk_free_gb(), 2), + } except Exception as exc: return {"ok": False, "error": str(exc)[:200]} @@ -40,13 +83,7 @@ def list_backups(*, limit: int = 20) -> list[dict[str, Any]]: for p in sorted(_backup_dir().glob("monitor_*.db"), key=lambda x: x.stat().st_mtime, reverse=True): try: st = p.stat() - rows.append( - { - "name": p.name, - "size": st.st_size, - "ts": st.st_mtime, - } - ) + rows.append({"name": p.name, "size": st.st_size, "ts": st.st_mtime}) except OSError: continue if len(rows) >= max(1, limit): @@ -54,14 +91,49 @@ def list_backups(*, limit: int = 20) -> list[dict[str, Any]]: return rows -def prune_backups(*, keep_days: float = 7.0) -> dict[str, Any]: +def prune_backups(*, keep_days: float = 7.0, keep_max: int = 3) -> dict[str, Any]: + """Remove aged backups, then enforce a hard max count (newest kept).""" cutoff = time.time() - max(1.0, keep_days) * 86400.0 + keep_max = max(1, min(30, int(keep_max))) removed = 0 + files: list[Path] = [] for p in _backup_dir().glob("monitor_*.db"): try: - if p.stat().st_mtime < cutoff: + st = p.stat() + if st.st_mtime < cutoff: p.unlink(missing_ok=True) removed += 1 + else: + files.append(p) + except OSError: + continue + + files.sort(key=lambda x: x.stat().st_mtime, reverse=True) + for p in files[keep_max:]: + try: + p.unlink(missing_ok=True) + removed += 1 + except OSError: + continue + return {"ok": True, "removed": removed, "kept": min(keep_max, len(files))} + + +def prune_legacy_db_copies(*, keep_max: int = 2) -> dict[str, Any]: + """Cull data/monitor.db.bak-* and pre-restore copies that sit beside live DB.""" + root = Path(settings.data_dir) + removed = 0 + cands: list[Path] = [] + for p in root.glob("monitor.db.*"): + name = p.name.lower() + if p.name == "monitor.db": + continue + if any(x in name for x in (".bak", "pre-restore", ".old", ".copy")): + cands.append(p) + cands.sort(key=lambda x: x.stat().st_mtime, reverse=True) + for p in cands[max(0, keep_max) :]: + try: + p.unlink(missing_ok=True) + removed += 1 except OSError: continue return {"ok": True, "removed": removed} @@ -72,7 +144,17 @@ async def backup_loop() -> None: from . import db - await asyncio.sleep(60) + await asyncio.sleep(90) + # One-shot cleanup of legacy piles left by old restarts / restores + try: + cfg0 = db.get_settings_map() + keep_days0 = float(cfg0.get("db_backup_keep_days") or 3) + keep_max0 = int(cfg0.get("db_backup_keep_max") or 3) + prune_backups(keep_days=keep_days0, keep_max=keep_max0) + prune_legacy_db_copies(keep_max=2) + except Exception: + pass + while True: try: cfg = db.get_settings_map() @@ -85,12 +167,27 @@ async def backup_loop() -> None: interval_h = 24.0 interval_h = max(1.0, min(168.0, interval_h)) try: - keep_days = float(cfg.get("db_backup_keep_days") or 7) + keep_days = float(cfg.get("db_backup_keep_days") or 3) except Exception: - keep_days = 7.0 - result = run_backup(label="auto") + keep_days = 3.0 + try: + keep_max = int(cfg.get("db_backup_keep_max") or 3) + except Exception: + keep_max = 3 + + # Skip if an auto backup already exists within the interval. + # Prevents API restart storms from dumping 100+ copies/day. + last = _latest_auto_mtime() + age_h = (time.time() - last) / 3600.0 if last > 0 else 1e9 + if age_h < interval_h * 0.95: + prune_backups(keep_days=keep_days, keep_max=keep_max) + await asyncio.sleep(min(3600.0, max(300.0, (interval_h - age_h) * 3600.0))) + continue + + result = run_backup(label="auto", force=False) + prune_backups(keep_days=keep_days, keep_max=keep_max) + prune_legacy_db_copies(keep_max=2) if result.get("ok"): - prune_backups(keep_days=keep_days) try: db.add_event( kind="db_backup", @@ -100,6 +197,16 @@ async def backup_loop() -> None: ) except Exception: pass + elif result.get("error") == "disk_too_low": + try: + db.add_event( + kind="db_backup", + level="warn", + message=f"磁盘不足,跳过备份(剩 {result.get('disk_free_gb')} GB)", + meta=result, + ) + except Exception: + pass await asyncio.sleep(interval_h * 3600.0) except asyncio.CancelledError: raise diff --git a/backend/app/disk_guard.py b/backend/app/disk_guard.py new file mode 100644 index 0000000..7c78c10 --- /dev/null +++ b/backend/app/disk_guard.py @@ -0,0 +1,189 @@ +# -*- coding: utf-8 -*- +"""Proactive disk guard — reclaim before the box wedges API/Caddy. + +Runs independently of webhook alerts. Safe defaults for ~60GB VPS. +""" +from __future__ import annotations + +import shutil +import time +from pathlib import Path +from typing import Any + + +def _free_gb(path: str | Path | None = None) -> float: + from .config import settings + + try: + usage = shutil.disk_usage(str(path or settings.data_dir)) + return float(usage.free) / (1024.0 ** 3) + except Exception: + return 999.0 + + +def _used_pct(path: str | Path | None = None) -> float: + from .config import settings + + try: + usage = shutil.disk_usage(str(path or settings.data_dir)) + if usage.total <= 0: + return 0.0 + return 100.0 * float(usage.used) / float(usage.total) + except Exception: + return 0.0 + + +def reclaim_once(cfg: dict[str, Any] | None = None) -> dict[str, Any]: + """Purge clips + trim backups when disk is tight. Idempotent.""" + from . import db + from .clip_retention import purge_stale_clips + from .db_backup import prune_backups, prune_legacy_db_copies + + settings_map = cfg if cfg is not None else db.get_settings_map() + try: + min_free = float(settings_map.get("clips_min_free_gb") or 8) + except Exception: + min_free = 8.0 + min_free = max(4.0, min(40.0, min_free)) + try: + panic_pct = float(settings_map.get("disk_panic_used_pct") or 90) + except Exception: + panic_pct = 90.0 + try: + keep_days = float(settings_map.get("db_backup_keep_days") or 3) + except Exception: + keep_days = 3.0 + try: + keep_max = int(settings_map.get("db_backup_keep_max") or 3) + except Exception: + keep_max = 3 + + free_before = _free_gb() + used_before = _used_pct() + actions: list[str] = [] + + # Always keep backup pile small (cheap). + try: + pr = prune_backups(keep_days=keep_days, keep_max=keep_max) + if pr.get("removed"): + actions.append(f"prune_backups:{pr.get('removed')}") + lg = prune_legacy_db_copies(keep_max=2) + if lg.get("removed"): + actions.append(f"prune_legacy:{lg.get('removed')}") + except Exception as exc: + actions.append(f"prune_err:{exc}"[:80]) + + under = free_before < min_free or used_before >= panic_pct + purge_result: dict[str, Any] = {} + if under: + # Temporarily tighten max age so purge_stale_clips reclaims faster. + tight = dict(settings_map) + try: + age = float(tight.get("clips_max_age_hours") or 24) + except Exception: + age = 24.0 + tight["clips_max_age_hours"] = min(age, 6.0 if used_before >= panic_pct else 12.0) + tight["clips_min_free_gb"] = min_free + try: + purge_result = purge_stale_clips(tight) + actions.append(f"purge_clips:del={purge_result.get('deleted')}") + except Exception as exc: + actions.append(f"purge_err:{exc}"[:80]) + + # Extreme: drop oldest non-inflight mp4 > 2h if still panic. + if _used_pct() >= panic_pct or _free_gb() < max(3.0, min_free * 0.5): + dropped = _drop_old_mp4(max_age_h=2.0, limit=40) + if dropped: + actions.append(f"drop_mp4:{dropped}") + + free_after = _free_gb() + used_after = _used_pct() + out = { + "ok": True, + "under_pressure": under, + "free_gb_before": round(free_before, 2), + "free_gb_after": round(free_after, 2), + "used_pct_before": round(used_before, 1), + "used_pct_after": round(used_after, 1), + "min_free_gb": min_free, + "actions": actions, + "purge": purge_result, + } + if under and (free_after - free_before) > 0.05: + try: + db.add_event( + kind="disk_guard", + level="warn", + message=f"磁盘守护回收:{free_before:.1f}→{free_after:.1f} GB", + meta=out, + ) + except Exception: + pass + return out + + +def _drop_old_mp4(*, max_age_h: float, limit: int) -> int: + from .clip_retention import _job_still_needs_file, unlink_clip + from .config import settings + + root = Path(settings.clips_dir) + if not root.is_dir(): + return 0 + now = time.time() + cands: list[tuple[float, Path]] = [] + for p in root.rglob("*.mp4"): + try: + if not p.is_file(): + continue + age = now - p.stat().st_mtime + if age < max_age_h * 3600.0: + continue + variants = {str(p)} + try: + variants.add(str(p.resolve())) + except OSError: + pass + if any(_job_still_needs_file(sp) for sp in variants): + continue + cands.append((age, p)) + except OSError: + continue + cands.sort(key=lambda x: x[0], reverse=True) + n = 0 + for _age, p in cands[: max(1, limit)]: + if unlink_clip(str(p), clear_refs=True): + n += 1 + return n + + +async def disk_guard_loop() -> None: + import asyncio + + from . import db + + await asyncio.sleep(45) + while True: + try: + cfg = db.get_settings_map() + # Allow kill-switch + if cfg.get("disk_guard_enabled", True) is False: + await asyncio.sleep(300) + continue + reclaim_once(cfg) + try: + interval = float(cfg.get("disk_guard_interval_sec") or 300) + except Exception: + interval = 300.0 + # Faster poll when already tight + free = _free_gb() + try: + min_free = float(cfg.get("clips_min_free_gb") or 8) + except Exception: + min_free = 8.0 + if free < min_free or _used_pct() >= 90: + interval = min(interval, 120.0) + await asyncio.sleep(max(60.0, interval)) + except asyncio.CancelledError: + raise + except Exception: + await asyncio.sleep(180) diff --git a/backend/app/egress_hub.py b/backend/app/egress_hub.py index 67537c8..20becec 100644 --- a/backend/app/egress_hub.py +++ b/backend/app/egress_hub.py @@ -1,14 +1,15 @@ # -*- coding: utf-8 -*- -"""Business egress — always via ShellCrash on China physical hosts. +"""Business egress for DouyinWEB. -Correct model (虚空终端 dialer-proxy): - App → 127.0.0.1:7890 (ShellCrash mixed) - ├─ 默认:选机场节点直接出海 - └─ 勾选「住宅落地」:选 dy-residential(socks5 + dialer-proxy) - → 先经 ShellCrash 前置节点拨号,再连住宅 SOCKS 落地 - (家宽无法直连海外住宅 SOCKS) +US VPS (primary): + off → datacenter IP direct + residential → 127.0.0.1:17891 (douyinweb-singbox) → static residential SOCKS + NEVER touches host sing-box.service / v2ray-agent -Docs: https://wiki.metacubex.one/config/proxies/dialer-proxy/ +Physical China (legacy, optional): + shellcrash → 127.0.0.1:7890 (+ optional dialer-proxy residential chain) + +Douyin scrape/CDN stays DIRECT in all modes (callers must not inject proxy). """ from __future__ import annotations @@ -19,9 +20,9 @@ from pathlib import Path from typing import Any from .config import BACKEND, ROOT -from .global_socks import CONFIG_DIR +from .global_socks import CONFIG_DIR, LOCAL_MIXED_HOST, LOCAL_MIXED_PORT, local_mixed_url -MODES = ("off", "shellcrash") +MODES = ("off", "shellcrash", "residential") PROXYCHAINS_CONF = CONFIG_DIR / "proxychains.conf" RESIDENTIAL_PROXY_NAME = "dy-residential" DEFAULT_DIALER = "dialer" @@ -41,38 +42,53 @@ def _settings(cfg: dict[str, Any] | None = None) -> dict[str, Any]: return dict(db.get_settings_map()) +def _is_vps_host(cfg: dict[str, Any] | None = None) -> bool: + try: + from . import host_profile + + return host_profile.infer_profile(cfg) == "vps" + except Exception: + return True + + def get_mode(cfg: dict[str, Any] | None = None) -> str: s = _settings(cfg) raw = str(s.get(_MODE_KEY) or "").strip().lower() - # Legacy: "residential" meant chain-on ShellCrash, never direct SOCKS. - if raw == "residential": - return "shellcrash" if raw in MODES: return raw + # Legacy toggles → residential on VPS, shellcrash elsewhere if s.get("global_socks_enabled") or s.get("shorts_upload_socks_enabled"): - return "shellcrash" - # Default ON for China physical: all non-Douyin business via ShellCrash. - # Explicit "off" in settings still wins (handled above via MODES). + return "residential" if _is_vps_host(s) else "shellcrash" + if _is_vps_host(s): + return "off" return "shellcrash" +def local_residential_http_proxy() -> str: + return local_mixed_url() + + +def local_residential_socks() -> str: + return f"socks5://{LOCAL_MIXED_HOST}:{LOCAL_MIXED_PORT}" + + def google_http_proxy(cfg: dict[str, Any] | None = None) -> str: - """Proxy for Google / YouTube / TikTok / overseas APIs. Douyin stays DIRECT via Clash rules. - - - shellcrash mode → mixed :7890 - - mode off but ShellCrash still running → still use it (physical soft path) - - mode off + no ShellCrash → empty string (pure VPS direct) - """ - if get_mode(cfg) == "shellcrash": + """Proxy for Google / YouTube / TikTok / overseas APIs. Douyin stays DIRECT.""" + mode = get_mode(cfg) + if mode == "residential": + return local_residential_http_proxy() + if mode == "shellcrash": return _host_http_proxy(cfg) - try: - from . import shellcrash_hub + # Soft path: ShellCrash still running on physical while mode off + if not _is_vps_host(cfg): + try: + from . import shellcrash_hub - st = shellcrash_hub.status() or {} - if st.get("running"): - return f"http://127.0.0.1:{shellcrash_mixed_port(cfg)}" - except Exception: - pass + st = shellcrash_hub.status() or {} + if st.get("running"): + return f"http://127.0.0.1:{shellcrash_mixed_port(cfg)}" + except Exception: + pass return "" @@ -84,20 +100,56 @@ def google_httpx_kwargs(*, timeout: float = 45.0, cfg: dict[str, Any] | None = N return kw -# Alias — overseas APIs (TikTok Open API, etc.) share the same egress. +def google_http_proxy_candidates( + cfg: dict[str, Any] | None = None, + *, + prefer: str = "", +) -> list[str]: + """Ordered Google egress attempts. + + Residential / ShellCrash first when enabled; on US VPS always append direct + so flaky SOCKS cannot permanently mark Shorts OAuth as「异常」. + """ + out: list[str] = [] + primary = str(prefer or "").strip() or google_http_proxy(cfg) + if primary: + out.append(primary) + # Direct fallback on VPS (datacenter reaches Google; residential may timeout). + if _is_vps_host(cfg) and "" not in out: + out.append("") + if not out: + out.append("") + # de-dupe preserving order + seen: set[str] = set() + uniq: list[str] = [] + for p in out: + if p in seen: + continue + seen.add(p) + uniq.append(p) + return uniq + + +def httpx_kwargs_for_proxy(proxy: str, *, timeout: float = 45.0) -> dict[str, Any]: + kw: dict[str, Any] = {"timeout": timeout, "trust_env": False} + p = str(proxy or "").strip() + if p: + kw["proxy"] = p + return kw + + overseas_httpx_kwargs = google_httpx_kwargs overseas_http_proxy = google_http_proxy def chain_residential(cfg: dict[str, Any] | None = None) -> bool: + """ShellCrash dialer-proxy chain (physical only). VPS residential does not use this.""" s = _settings(cfg) + if get_mode(s) == "residential": + return False if _CHAIN_KEY in s: - return bool(s.get(_CHAIN_KEY)) - # Legacy residential mode / socks toggle → chain on - raw = str(s.get(_MODE_KEY) or "").strip().lower() - if raw == "residential": - return True - return bool(s.get("global_socks_enabled") or s.get("shorts_upload_socks_enabled")) + return bool(s.get(_CHAIN_KEY)) and get_mode(s) == "shellcrash" + return bool(s.get("global_socks_enabled") or s.get("shorts_upload_socks_enabled")) and get_mode(s) == "shellcrash" def cover_neko(cfg: dict[str, Any] | None = None) -> bool: @@ -111,7 +163,7 @@ def cover_relay(cfg: dict[str, Any] | None = None) -> bool: s = _settings(cfg) if _RELAY_KEY in s: return bool(s.get(_RELAY_KEY)) - return get_mode(s) == "shellcrash" + return get_mode(s) in {"shellcrash", "residential"} def cover_uploads(cfg: dict[str, Any] | None = None) -> bool: @@ -139,42 +191,48 @@ def _host_http_proxy(cfg: dict[str, Any] | None = None) -> str: def resolve_http_proxy(cfg: dict[str, Any] | None = None) -> str: - if get_mode(cfg) == "off": - return "" - return _host_http_proxy(cfg) + return google_http_proxy(cfg) def resolve_upload_proxy(cfg: dict[str, Any] | None = None) -> str: if get_mode(cfg) == "off" or not cover_uploads(cfg): return "" - return _host_http_proxy(cfg) + return google_http_proxy(cfg) + + +def resolve_business_proxy(cfg: dict[str, Any] | None = None) -> str: + """Unified overseas business proxy (uploads / OAuth / TikTok fallback).""" + return resolve_upload_proxy(cfg) or google_http_proxy(cfg) def neko_browser_proxy(cfg: dict[str, Any] | None = None) -> str: - """Chromium inside Neko → host ShellCrash. - - Physical (DY_NEKO_EDGE_UPSTREAM set): always inject proxy unless egress mode is explicit off. - """ + """Chromium inside Neko → host local mixed (no upstream credentials in URL).""" import os physical = bool(str(os.environ.get("DY_NEKO_EDGE_UPSTREAM") or "").strip()) - if get_mode(cfg) == "off": + mode = get_mode(cfg) + if mode == "off": return "" if not cover_neko(cfg) and not physical: return "" + if mode == "residential": + return f"http://host.docker.internal:{LOCAL_MIXED_PORT}" return f"http://host.docker.internal:{shellcrash_mixed_port(cfg)}" def write_proxychains_conf(cfg: dict[str, Any] | None = None) -> Path: - """Always point proxychains at ShellCrash mixed SOCKS — never raw residential.""" CONFIG_DIR.mkdir(parents=True, exist_ok=True) - if get_mode(cfg) != "shellcrash": + mode = get_mode(cfg) + if mode == "off": PROXYCHAINS_CONF.write_text( "# egress off\nstrict_chain\nproxy_dns\n[ProxyList]\n", encoding="utf-8", ) return PROXYCHAINS_CONF - port = shellcrash_mixed_port(cfg) + if mode == "residential": + port = LOCAL_MIXED_PORT + else: + port = shellcrash_mixed_port(cfg) text = ( "strict_chain\n" "proxy_dns\n" @@ -187,6 +245,12 @@ def write_proxychains_conf(cfg: dict[str, Any] | None = None) -> Path: f"socks5 127.0.0.1 {port}\n" ) PROXYCHAINS_CONF.write_text(text, encoding="utf-8") + try: + import os + + os.chmod(PROXYCHAINS_CONF, 0o600) + except Exception: + pass return PROXYCHAINS_CONF @@ -220,20 +284,15 @@ def apply_mode( cfg: dict[str, Any] | None = None, ) -> dict[str, Any]: from . import db - from . import shellcrash_hub from . import singbox_manager raw = str(mode or "off").strip().lower() - if raw == "residential": - mode = "shellcrash" - if chain is None: - chain = True - elif raw not in MODES: + if raw not in MODES: raise ValueError(f"unsupported egress mode: {raw}") - else: - mode = raw + mode = raw s = _settings(cfg) + # dialer-proxy chain only meaningful with ShellCrash if chain is None: chain = chain_residential(s) if mode == "shellcrash" else False chain = bool(chain) and mode == "shellcrash" @@ -241,31 +300,46 @@ def apply_mode( if cover_neko_flag is None: cover_neko_flag = mode != "off" if cover_relay_flag is None: - cover_relay_flag = mode == "shellcrash" + cover_relay_flag = mode in {"shellcrash", "residential"} if cover_uploads_flag is None: cover_uploads_flag = mode != "off" + socks_on = mode == "residential" or (mode == "shellcrash" and chain) updates: dict[str, Any] = { _MODE_KEY: mode, _CHAIN_KEY: chain, _NEKO_KEY: bool(cover_neko_flag), _RELAY_KEY: bool(cover_relay_flag), _UPLOADS_KEY: bool(cover_uploads_flag), - # Keep legacy flags aligned with «住宅链式» checkbox only (not a separate engine). - "global_socks_enabled": chain, - "shorts_upload_socks_enabled": chain, + "global_socks_enabled": socks_on, + "shorts_upload_socks_enabled": socks_on, } db.update_settings_map(updates) s = db.get_settings_map() - # Never run douyinweb-singbox as China residential path — stop if leftover. - try: - singbox_manager.stop() - except Exception: - pass - chain_result: dict[str, Any] = {"skipped": True} + residential_result: dict[str, Any] = {"skipped": True} + + if mode == "residential": + from . import global_socks + + prof = global_socks.active_profile(s) + if not prof: + raise ValueError("已启用静态住宅 IP,但未配置 SOCKS5 账号(网络页「业务 SOCKS」填写)") + # Start DouyinWEB forwarder only — never host sing-box.service + residential_result = singbox_manager.apply_from_settings(s) + if not residential_result.get("ok") and not residential_result.get("running"): + raise ValueError(str(residential_result.get("error") or "douyinweb-singbox 启动失败")) + else: + # Leaving residential: stop app forwarder only + try: + residential_result = {**singbox_manager.stop(), "note": "stopped douyinweb-singbox"} + except Exception as exc: + residential_result = {"ok": False, "error": str(exc)} + if mode == "shellcrash": + from . import shellcrash_hub + if chain: from . import global_socks @@ -277,7 +351,6 @@ def apply_mode( dialer=(dialer or DEFAULT_DIALER).strip() or DEFAULT_DIALER, ) else: - # Normal ShellCrash node (not residential landing). try: chain_result = shellcrash_hub.apply_profile( shellcrash_hub.DEFAULT_PROFILE, @@ -287,7 +360,7 @@ def apply_mode( chain_result = {"ok": False, "error": str(exc)} pc_path = "" - if mode == "shellcrash" and (cover_relay_flag or cover_uploads_flag): + if mode != "off" and (cover_relay_flag or cover_uploads_flag): pc_path = str(write_proxychains_conf(s)) neko_result: dict[str, Any] = {"skipped": True} @@ -303,26 +376,32 @@ def apply_mode( "ok": True, "egress": status(s), "chain": chain_result, + "residential": residential_result, "proxychains_conf": pc_path, "neko": neko_result, + "v2ray_agent": singbox_manager.host_v2ray_agent_status(), } def probe(cfg: dict[str, Any] | None = None) -> dict[str, Any]: mode = get_mode(cfg) - proxy = _host_http_proxy(cfg) if mode != "off" else "" + proxy = google_http_proxy(cfg) if mode != "off" else "" targets = [ ("google", "https://www.google.com/generate_204"), ("youtube", "https://www.youtube.com/"), + ("ip", "https://api.ipify.org"), ("douyin", "https://www.douyin.com/"), ] rows = [] for name, url in targets: - # Douyin: always probe DIRECT; also via proxy to show rule should still work for pull via ShellCrash if name == "douyin": rows.append(_curl_probe("douyin_direct", url, proxy="")) if proxy: - rows.append(_curl_probe("douyin_via_sc", url, proxy=proxy)) + rows.append(_curl_probe("douyin_via_proxy", url, proxy=proxy)) + continue + if name == "ip": + rows.append(_curl_probe_body("exit_ip", url, proxy=proxy)) + rows.append(_curl_probe_body("exit_ip_direct", url, proxy="")) continue rows.append(_curl_probe(name, url, proxy=proxy)) rows.append(_curl_probe(f"{name}_direct", url, proxy="")) @@ -366,29 +445,84 @@ def _curl_probe(name: str, url: str, *, proxy: str) -> dict[str, Any]: } +def _curl_probe_body(name: str, url: str, *, proxy: str) -> dict[str, Any]: + cmd = ["curl", "-sS", "-m", "10"] + if proxy: + cmd.extend(["-x", proxy]) + cmd.append(url) + t0 = time.time() + try: + p = subprocess.run(cmd, capture_output=True, text=True, timeout=14, check=False) + body = (p.stdout or "").strip()[:64] + ok = p.returncode == 0 and bool(body) + return { + "target": name, + "ok": ok, + "http_code": "200" if ok else "000", + "elapsed_ms": int((time.time() - t0) * 1000), + "via": proxy or "direct", + "body": body, + "error": (p.stderr or "").strip()[:160] if not ok else "", + } + except Exception as exc: + return { + "target": name, + "ok": False, + "http_code": "000", + "elapsed_ms": int((time.time() - t0) * 1000), + "via": proxy or "direct", + "body": "", + "error": str(exc)[:160], + } + + def status(cfg: dict[str, Any] | None = None) -> dict[str, Any]: - from . import shellcrash_hub + from . import singbox_manager s = _settings(cfg) mode = get_mode(s) - chain = chain_residential(s) if mode == "shellcrash" else False - sc = shellcrash_hub.status() - host_proxy = _host_http_proxy(s) + chain = chain_residential(s) + vps = _is_vps_host(s) + sc: dict[str, Any] = {} + try: + from . import shellcrash_hub + + sc = shellcrash_hub.status() or {} + except Exception: + sc = {} + host_proxy = google_http_proxy(s) neko_proxy = neko_browser_proxy(s) pc = proxychains_bin() - exit_label = RESIDENTIAL_PROXY_NAME if chain else (sc.get("selected_node") or shellcrash_hub.DEFAULT_NODE) - return { - "mode": mode, - "chain_residential": chain, - "modes": [ - {"id": "off", "label": "直连", "description": "不经 ShellCrash"}, + sb = singbox_manager.status() + if mode == "residential": + exit_label = "static-residential" + elif chain: + exit_label = RESIDENTIAL_PROXY_NAME + else: + exit_label = sc.get("selected_node") or "direct" + modes_ui = [ + {"id": "off", "label": "机房直连", "description": "美国 VPS 默认:业务用机房 IP"}, + { + "id": "residential", + "label": "静态住宅 IP", + "description": f"本机 :{LOCAL_MIXED_PORT} → 住宅 SOCKS(不动 v2ray-agent)", + "ready": True, + }, + ] + if not vps: + modes_ui.append( { "id": "shellcrash", "label": "ShellCrash", - "description": "业务统一走本机 :7890;可选住宅链式落地", + "description": "物理机出海 :7890;可选住宅链式", "ready": bool(sc.get("running") or sc.get("installed")), - }, - ], + } + ) + return { + "mode": mode, + "chain_residential": chain, + "host_profile": "vps" if vps else "physical", + "modes": modes_ui, "cover": { "neko": cover_neko(s), "relay": cover_relay(s), @@ -399,13 +533,25 @@ def status(cfg: dict[str, Any] | None = None) -> dict[str, Any]: "exit_node": exit_label, "dialer": DEFAULT_DIALER, "residential_proxy_name": RESIDENTIAL_PROXY_NAME, - "socks_url": f"socks5://127.0.0.1:{shellcrash_mixed_port(s)}" if mode == "shellcrash" else "", + "socks_url": ( + local_residential_socks() + if mode == "residential" + else (f"socks5://127.0.0.1:{shellcrash_mixed_port(s)}" if mode == "shellcrash" else "") + ), + "local_mixed": local_residential_http_proxy() if mode == "residential" else "", "proxychains": { "installed": bool(pc), "bin": pc, "conf": str(PROXYCHAINS_CONF) if PROXYCHAINS_CONF.is_file() else "", "relay_active": ffmpeg_uses_proxy(s), }, + "douyinweb_singbox": { + "running": bool(sb.get("running")), + "unit": sb.get("unit"), + "mixed": sb.get("mixed"), + "config": sb.get("config"), + }, + "v2ray_agent": sb.get("v2ray_agent") or singbox_manager.host_v2ray_agent_status(), "shellcrash": { "running": bool(sc.get("running")), "mixed_port": sc.get("mixed_port") or "7890", @@ -414,48 +560,55 @@ def status(cfg: dict[str, Any] | None = None) -> dict[str, Any]: "matrix": [ { "id": "neko", - "label": "Neko Chrome", + "label": "Neko Chrome / X", "active": bool(neko_proxy), - "detail": (neko_proxy + (f" → {exit_label}" if chain else "")) if neko_proxy else "直连", + "detail": neko_proxy or "直连(机房 IP)", }, { "id": "relay", "label": "直播推流 FFmpeg", "active": ffmpeg_uses_proxy(s), "detail": ( - f"proxychains → ShellCrash → {exit_label}" + f"proxychains → {exit_label}" if ffmpeg_uses_proxy(s) - else ("缺 proxychains" if cover_relay(s) and not pc else "直连") + else ("缺 proxychains" if cover_relay(s) and not pc else "直连(机房 IP)") ), }, { "id": "uploads", - "label": "Shorts / 长视频 / 上传", + "label": "Shorts / 长视频 / TikTok", "active": bool(resolve_upload_proxy(s)), - "detail": (host_proxy + (f" → {exit_label}" if chain else "")) if resolve_upload_proxy(s) else "直连", + "detail": (host_proxy + f" → {exit_label}") if resolve_upload_proxy(s) else "直连(机房 IP)", }, ], - "hints": _hints(mode, chain, sc, pc), + "hints": _hints(mode, chain, sc, pc, sb, vps), "app_root": str(ROOT), "backend": str(BACKEND), } -def _hints(mode: str, chain: bool, sc: dict[str, Any], pc: str) -> list[str]: +def _hints( + mode: str, + chain: bool, + sc: dict[str, Any], + pc: str, + sb: dict[str, Any], + vps: bool, +) -> list[str]: out: list[str] = [] - if mode == "shellcrash": - out.append("硬规则:*.douyin.com / 抖音 CDN 必须 DIRECT(拉流与监控不可走机场)") + out.append("硬规则:*.douyin.com / 抖音 CDN 始终直连,不进住宅代理") + out.append("绝不操作宿主机 sing-box.service(v2ray-agent);仅 douyinweb-singbox") + if mode == "residential": + if not sb.get("running"): + out.append("douyinweb-singbox 未运行 — 检查 SOCKS 账号后重新「应用」") + else: + out.append(f"业务入口 {local_residential_http_proxy()} → 静态住宅;默认关=机房 IP") + if mode == "off" and vps: + out.append("当前机房 IP 直出(美国 VPS 默认可访问 Google/YouTube)") if mode == "shellcrash" and not sc.get("running"): - out.append("ShellCrash 未运行 — 先启动,再应用出海") + out.append("ShellCrash 未运行 — 先启动再应用") if mode == "shellcrash" and chain: - out.append( - "住宅落地 = ShellCrash 链式(dialer-proxy):家宽 → 前置节点 → 住宅 SOCKS。" - "详见虚空终端 docs:dialer-proxy" - ) - if mode == "shellcrash" and not chain: - out.append("当前用 ShellCrash 机场线路出海;勾选「住宅落地」才会链式到 SOCKS5") + out.append("住宅落地 = ShellCrash dialer-proxy 链式(物理机)") if mode != "off" and not pc: out.append("未安装 proxychains4 — 直播推流无法走代理") - if mode == "off": - out.append("直连:国内物理机上 YouTube Studio / 推流通常不可用") return out diff --git a/backend/app/host_metrics.py b/backend/app/host_metrics.py index 3ea983c..742b307 100644 --- a/backend/app/host_metrics.py +++ b/backend/app/host_metrics.py @@ -123,9 +123,11 @@ def clip_encode_defer_reason(*, respect_live_push: bool = True) -> str: cores = max(1, int(snap.get("cpu_cores") or 1)) load1 = float(snap.get("load1") or 0.0) cpu = float(snap.get("cpu_percent") or 0.0) - # Leave ~1 core free for API accept loop + Neko CDP. - if load1 >= max(1.5, cores * 1.15): + # Leave ~1+ core free for API accept loop + Neko CDP + live push. + # 3-core dylive with live RTMP+Neko routinely sits load 3-7; 0.85*cores + # starved yt_long all day (0 uploads). Allow ~2x cores; still block meltdown. + if load1 >= max(12.0, cores * 4.0): return f"load1={load1}" - if cpu >= 80.0: + if cpu >= 96.0: return f"cpu={cpu}" return "" diff --git a/backend/app/host_profile.py b/backend/app/host_profile.py index cb6b373..a3eaa39 100644 --- a/backend/app/host_profile.py +++ b/backend/app/host_profile.py @@ -1,197 +1,198 @@ -# -*- coding: utf-8 -*- -"""Host profile: VPS (lean) vs physical (full Neko + ShellCrash). - -Does **not** stop VPS edge systemd units (sing-box / frpp / wg-quick@wg-dy*). -Those are infrastructure for the physical site, not app「网络」toggles. -""" -from __future__ import annotations - -import os -from typing import Any - -PROFILES = ("vps", "physical") -_KEY = "host_profile" - - -def _settings() -> dict[str, Any]: - from . import db - - return dict(db.get_settings_map()) - - -def infer_profile(cfg: dict[str, Any] | None = None) -> str: - s = dict(cfg) if cfg is not None else _settings() - raw = str(s.get(_KEY) or "").strip().lower() - if raw in PROFILES: - return raw - edge = str(os.environ.get("DY_NEKO_EDGE_UPSTREAM") or "").strip() - if edge and edge not in {"127.0.0.1", "localhost", "::1"}: - return "physical" - bind = str(os.environ.get("DY_NEKO_HTTP_BIND") or "").strip() - if bind in {"0.0.0.0", "*"}: - return "physical" - return "vps" - - -def status() -> dict[str, Any]: - s = _settings() - profile = infer_profile(s) - return { - "ok": True, - "profile": profile, - "stored": str(s.get(_KEY) or "").strip().lower() in PROFILES, - "profiles": list(PROFILES), - "effects": { - "vps": [ - "egress / ShellCrash / 业务 SOCKS 全部关闭(本机公网出海)", - "本机分配 Neko 仍可按频道启停(与物理机同 compose / Studio 配置)", - "单路独占默认开启(省内存;可配对物理机 ops-neko)", - ], - "physical": [ - "业务出口切回 ShellCrash(不自动强起边缘 WG/FRP)", - "单路独占默认关闭(允许多 Neko 预热)", - "不自动拉起全部 Neko(由分配页按需开启);ops-neko 优先 .cn / 腾讯云 ICE", - ], - }, - "never_touches": [ - "sing-box.service", - "frpp.service", - "wg-quick@wg-dy.service", - "wg-quick@wg-dy-cn.service", - ], - } - - -def _disable_all_neko() -> dict[str, Any]: - from . import yt_assign_db - from . import youtube_neko - from .db import _connect, _lock - - disabled = 0 - with _lock: - conn = _connect() - try: - yt_assign_db.ensure_yt_assign_tables(conn) - cur = conn.execute( - "UPDATE yt_assign_groups SET neko_enabled = 0 WHERE neko_enabled != 0" - ) - disabled = int(cur.rowcount or 0) - conn.commit() - finally: - conn.close() - stopped = youtube_neko.stop_instances_except(0) - try: - youtube_neko.sync_for_groups( - yt_assign_db.list_groups(include_urls=False), - reconcile_running=True, - ) - except Exception as exc: - return { - "ok": False, - "disabled_flags": disabled, - "stopped_containers": stopped, - "error": str(exc)[:300], - } - return {"ok": True, "disabled_flags": disabled, "stopped_containers": stopped} - - -def apply_profile(profile: str) -> dict[str, Any]: - from . import db - from . import egress_hub - from . import shellcrash_hub - from . import singbox_manager - - raw = str(profile or "").strip().lower() - if raw not in PROFILES: - raise ValueError("profile must be vps or physical") - - steps: dict[str, Any] = {} - - if raw == "vps": - try: - steps["egress"] = egress_hub.apply_mode( - "off", - chain=False, - cover_neko_flag=False, - cover_relay_flag=False, - cover_uploads_flag=False, - refresh_neko=False, - ) - except Exception as exc: - steps["egress"] = {"ok": False, "error": str(exc)[:300]} - - try: - steps["singbox_app"] = singbox_manager.stop() - except Exception as exc: - steps["singbox_app"] = {"ok": False, "error": str(exc)[:300]} - - try: - steps["shellcrash"] = shellcrash_hub.action("stop") - except Exception as exc: - steps["shellcrash"] = {"ok": False, "skipped": True, "error": str(exc)[:300]} - - # Do NOT wipe assign Neko — dylive hub needs per-group start/stop like physical - # (local /neko/N/ and/or paired ops-neko). Exclusive-live still pauses siblings at push time. - steps["neko"] = { - "ok": True, - "note": "vps: leave assign Neko as-is; enable/start/stop per group in assign UI", - } - - # Exclusive-live in-memory state is applied in apply_profile_async. - db.update_settings_map( - { - _KEY: "vps", - "youtube_relay_exclusive_live": True, - "global_socks_enabled": False, - "shorts_upload_socks_enabled": False, - "egress_chain_residential": False, - } - ) - steps["settings"] = {"host_profile": "vps", "youtube_relay_exclusive_live": True} - - else: - try: - steps["egress"] = egress_hub.apply_mode( - "shellcrash", - chain=False, - refresh_neko=False, - ) - except Exception as exc: - # ShellCrash may be absent on pure VPS — still store profile + exclusive off. - db.update_settings_map({"egress_mode": "shellcrash"}) - steps["egress"] = {"ok": False, "error": str(exc)[:300], "settings_only": True} - - db.update_settings_map( - { - _KEY: "physical", - "youtube_relay_exclusive_live": False, - } - ) - steps["settings"] = { - "host_profile": "physical", - "youtube_relay_exclusive_live": False, - "neko": "not_auto_started", - } - steps["neko"] = {"ok": True, "note": "physical: leave Neko as-is; enable per group in assign UI"} - - return {"ok": True, "profile": raw, "steps": steps, **status()} - - -async def apply_profile_async(profile: str) -> dict[str, Any]: - """Async wrapper so exclusive-live pipeline state stays consistent.""" - import asyncio - - from . import db - from . import youtube_relay_pipeline - - raw = str(profile or "").strip().lower() - result = await asyncio.to_thread(apply_profile, raw) - # Re-apply exclusive via pipeline so in-memory winner/pause state matches. - exclusive_on = raw == "vps" - try: - result["steps"]["exclusive_live"] = await youtube_relay_pipeline.set_exclusive_live(exclusive_on) - except Exception as exc: - db.update_settings_map({"youtube_relay_exclusive_live": exclusive_on}) - result["steps"]["exclusive_live"] = {"ok": False, "error": str(exc)[:300], "settings_written": True} - result["profile"] = raw - return result +# -*- coding: utf-8 -*- +"""Host profile: VPS (lean) vs physical (full Neko + ShellCrash). + +Does **not** stop VPS edge systemd units (sing-box / frpp / wg-quick@wg-dy*). +Those are infrastructure for the physical site, not app「网络」toggles. +""" +from __future__ import annotations + +import os +from typing import Any + +PROFILES = ("vps", "physical") +_KEY = "host_profile" + + +def _settings() -> dict[str, Any]: + from . import db + + return dict(db.get_settings_map()) + + +def infer_profile(cfg: dict[str, Any] | None = None) -> str: + s = dict(cfg) if cfg is not None else _settings() + raw = str(s.get(_KEY) or "").strip().lower() + if raw in PROFILES: + return raw + edge = str(os.environ.get("DY_NEKO_EDGE_UPSTREAM") or "").strip() + if edge and edge not in {"127.0.0.1", "localhost", "::1"}: + return "physical" + bind = str(os.environ.get("DY_NEKO_HTTP_BIND") or "").strip() + if bind in {"0.0.0.0", "*"}: + return "physical" + return "vps" + + +def status() -> dict[str, Any]: + s = _settings() + profile = infer_profile(s) + return { + "ok": True, + "profile": profile, + "stored": str(s.get(_KEY) or "").strip().lower() in PROFILES, + "profiles": list(PROFILES), + "effects": { + "vps": [ + "默认机房 IP 直出;可选「静态住宅 IP」经 douyinweb-singbox :17891", + "绝不操作宿主机 sing-box.service(v2ray-agent)", + "本机分配 Neko 仍可按频道启停", + "单路独占默认开启(省内存)", + ], + "physical": [ + "业务出口切回 ShellCrash(不自动强起边缘 WG/FRP)", + "单路独占默认关闭(允许多 Neko 预热)", + "不自动拉起全部 Neko(由分配页按需开启);ops-neko 优先 .cn / 腾讯云 ICE", + ], + }, + "never_touches": [ + "sing-box.service", + "frpp.service", + "wg-quick@wg-dy.service", + "wg-quick@wg-dy-cn.service", + ], + } + + +def _disable_all_neko() -> dict[str, Any]: + from . import yt_assign_db + from . import youtube_neko + from .db import _connect, _lock + + disabled = 0 + with _lock: + conn = _connect() + try: + yt_assign_db.ensure_yt_assign_tables(conn) + cur = conn.execute( + "UPDATE yt_assign_groups SET neko_enabled = 0 WHERE neko_enabled != 0" + ) + disabled = int(cur.rowcount or 0) + conn.commit() + finally: + conn.close() + stopped = youtube_neko.stop_instances_except(0) + try: + youtube_neko.sync_for_groups( + yt_assign_db.list_groups(include_urls=False), + reconcile_running=True, + ) + except Exception as exc: + return { + "ok": False, + "disabled_flags": disabled, + "stopped_containers": stopped, + "error": str(exc)[:300], + } + return {"ok": True, "disabled_flags": disabled, "stopped_containers": stopped} + + +def apply_profile(profile: str) -> dict[str, Any]: + from . import db + from . import egress_hub + from . import shellcrash_hub + from . import singbox_manager + + raw = str(profile or "").strip().lower() + if raw not in PROFILES: + raise ValueError("profile must be vps or physical") + + steps: dict[str, Any] = {} + + if raw == "vps": + try: + steps["egress"] = egress_hub.apply_mode( + "off", + chain=False, + cover_neko_flag=False, + cover_relay_flag=False, + cover_uploads_flag=False, + refresh_neko=False, + ) + except Exception as exc: + steps["egress"] = {"ok": False, "error": str(exc)[:300]} + + try: + steps["singbox_app"] = singbox_manager.stop() + except Exception as exc: + steps["singbox_app"] = {"ok": False, "error": str(exc)[:300]} + + try: + steps["shellcrash"] = shellcrash_hub.action("stop") + except Exception as exc: + steps["shellcrash"] = {"ok": False, "skipped": True, "error": str(exc)[:300]} + + # Do NOT wipe assign Neko — dylive hub needs per-group start/stop like physical + # (local /neko/N/ and/or paired ops-neko). Exclusive-live still pauses siblings at push time. + steps["neko"] = { + "ok": True, + "note": "vps: leave assign Neko as-is; enable/start/stop per group in assign UI", + } + + # Exclusive-live in-memory state is applied in apply_profile_async. + db.update_settings_map( + { + _KEY: "vps", + "youtube_relay_exclusive_live": True, + "global_socks_enabled": False, + "shorts_upload_socks_enabled": False, + "egress_chain_residential": False, + } + ) + steps["settings"] = {"host_profile": "vps", "youtube_relay_exclusive_live": True} + + else: + try: + steps["egress"] = egress_hub.apply_mode( + "shellcrash", + chain=False, + refresh_neko=False, + ) + except Exception as exc: + # ShellCrash may be absent on pure VPS — still store profile + exclusive off. + db.update_settings_map({"egress_mode": "shellcrash"}) + steps["egress"] = {"ok": False, "error": str(exc)[:300], "settings_only": True} + + db.update_settings_map( + { + _KEY: "physical", + "youtube_relay_exclusive_live": False, + } + ) + steps["settings"] = { + "host_profile": "physical", + "youtube_relay_exclusive_live": False, + "neko": "not_auto_started", + } + steps["neko"] = {"ok": True, "note": "physical: leave Neko as-is; enable per group in assign UI"} + + return {"ok": True, "profile": raw, "steps": steps, **status()} + + +async def apply_profile_async(profile: str) -> dict[str, Any]: + """Async wrapper so exclusive-live pipeline state stays consistent.""" + import asyncio + + from . import db + from . import youtube_relay_pipeline + + raw = str(profile or "").strip().lower() + result = await asyncio.to_thread(apply_profile, raw) + # Re-apply exclusive via pipeline so in-memory winner/pause state matches. + exclusive_on = raw == "vps" + try: + result["steps"]["exclusive_live"] = await youtube_relay_pipeline.set_exclusive_live(exclusive_on) + except Exception as exc: + db.update_settings_map({"youtube_relay_exclusive_live": exclusive_on}) + result["steps"]["exclusive_live"] = {"ok": False, "error": str(exc)[:300], "settings_written": True} + result["profile"] = raw + return result diff --git a/backend/app/job_errors.py b/backend/app/job_errors.py index 6ade774..404da76 100644 --- a/backend/app/job_errors.py +++ b/backend/app/job_errors.py @@ -1,114 +1,130 @@ -# -*- coding: utf-8 -*- -"""Classify Shorts/TikTok job errors into actionable buckets for UI.""" -from __future__ import annotations - -from typing import Any - - -def classify_job_error(error: str = "", *, platform: str = "") -> dict[str, Any]: - text = str(error or "").strip() - low = text.lower() - plat = str(platform or "").strip().lower() - - def hit(*needles: str) -> bool: - return any(n in low or n in text for n in needles) - - if not text: - return { - "code": "ok", - "label": "正常", - "action": "", - "action_label": "", - "severity": False, - } - - if hit("cookie", "sessionid", "登录", "login expired", "未配置 cookie", "会话"): - return { - "code": "cookie", - "label": "Cookie / 登录失效", - "action": "update_cookie", - "action_label": "更新 Cookie", - "severity": False, - } - if hit("2158", "限流", "too fast", "take a rest", "spam", "rate_limit", "rate limit", "官方限流"): - return { - "code": "rate_limit", - "label": "平台限流", - "action": "wait_retry", - "action_label": "等待后自动试传", - "severity": True, - } - if hit("quota", "403", "daily limit", "upload limit", "youtube.*quota", "exceeded"): - return { - "code": "quota", - "label": "平台配额用尽", - "action": "wait_quota", - "action_label": "等配额重置或换 Client", - "severity": True, - } - if hit("成片文件不存在", "clip", "no such file", "过小", "too small", "empty file", "录制失败"): - return { - "code": "clip", - "label": "成片缺失/损坏", - "action": "rerecord", - "action_label": "重新录制", - "severity": True, - } - if hit("黑屏", "静音", "质量不合格", "quality"): - return { - "code": "quality", - "label": "成片质量不合格", - "action": "rerecord", - "action_label": "换时段重录", - "severity": True, - } - if hit("stream", "直播已结束", "not live", "404", "拉流", "cdn"): - return { - "code": "stream", - "label": "直播流不可用", - "action": "skip_or_retry", - "action_label": "跳过或换房", - "severity": False, - } - if hit("socks", "proxy", "代理"): - return { - "code": "proxy", - "label": "代理/网络异常", - "action": "check_socks", - "action_label": "检查 SOCKS", - "retryable": True, - } - if hit("oauth", "token", "unauthorized", "401"): - return { - "code": "oauth", - "label": "OAuth 授权失效", - "action": "reauth", - "action_label": "重新授权", - "retryable": False, - } - if plat == "tiktok" and hit("机房", "datacenter", "tt-target-idc", "project"): - return { - "code": "dc", - "label": "TikTok 机房不匹配", - "action": "update_cookie", - "action_label": "重贴 Cookie + 机房", - "retryable": False, - } - return { - "code": "unknown", - "label": "其他错误", - "action": "retry", - "action_label": "重试", - "retryable": True, - "detail": text[:200], - } - - -def enrich_job_error(job: dict[str, Any] | None, *, platform: str = "") -> dict[str, Any] | None: - if not job: - return None - out = dict(job) - err = str(out.get("error") or "") - info = classify_job_error(err, platform=platform) - out["error_class"] = info - return out +# -*- coding: utf-8 -*- +"""Classify Shorts/TikTok job errors into actionable buckets for UI.""" +from __future__ import annotations + +from typing import Any + + +def classify_job_error(error: str = "", *, platform: str = "") -> dict[str, Any]: + text = str(error or "").strip() + low = text.lower() + plat = str(platform or "").strip().lower() + + def hit(*needles: str) -> bool: + return any(n in low or n in text for n in needles) + + if not text: + return { + "code": "ok", + "label": "正常", + "action": "", + "action_label": "", + "severity": False, + } + + if hit("cookie", "sessionid", "登录", "login expired", "未配置 cookie", "会话"): + return { + "code": "cookie", + "label": "Cookie / 登录失效", + "action": "update_cookie", + "action_label": "更新 Cookie", + "severity": False, + } + if hit("2158", "限流", "too fast", "take a rest", "spam", "rate_limit", "rate limit", "官方限流"): + return { + "code": "rate_limit", + "label": "平台限流", + "action": "wait_retry", + "action_label": "等待后自动试传", + "severity": True, + } + if hit("quota", "403", "daily limit", "upload limit", "youtube.*quota", "exceeded"): + return { + "code": "quota", + "label": "平台配额用尽", + "action": "wait_quota", + "action_label": "等配额重置或换 Client", + "severity": True, + } + if hit("成片文件不存在", "clip", "no such file", "过小", "too small", "empty file", "录制失败"): + return { + "code": "clip", + "label": "成片缺失/损坏", + "action": "rerecord", + "action_label": "重新录制", + "severity": True, + } + if hit("黑屏", "静音", "质量不合格", "quality"): + return { + "code": "quality", + "label": "成片质量不合格", + "action": "rerecord", + "action_label": "换时段重录", + "severity": True, + } + if hit("stream", "直播已结束", "not live", "404", "拉流", "cdn"): + return { + "code": "stream", + "label": "直播流不可用", + "action": "skip_or_retry", + "action_label": "跳过或换房", + "severity": False, + } + if hit("socks", "proxy", "代理"): + return { + "code": "proxy", + "label": "代理/网络异常", + "action": "check_socks", + "action_label": "检查 SOCKS", + "retryable": True, + } + if hit("oauth", "token", "unauthorized", "401"): + return { + "code": "oauth", + "label": "OAuth 授权失效", + "action": "reauth", + "action_label": "重新授权", + "retryable": False, + } + if plat == "tiktok" and hit( + "signature", + "playwright", + "headless_shell", + "executable doesn't exist", + "failed to parse signature", + "failed to generate signatures", + ): + return { + "code": "tiktok_signature", + "label": "TikTok 签名失败", + "action": "retry", + "action_label": "重试", + "retryable": True, + } + # Do NOT match bare "Datacenter Assigned" login banner — that line appears on every upload. + if plat == "tiktok" and hit("机房不匹配", "tt-target-idc", "会话机房", "cookie 无效或机房"): + return { + "code": "dc", + "label": "TikTok 机房不匹配", + "action": "update_cookie", + "action_label": "重贴 Cookie + 机房", + "retryable": False, + } + return { + "code": "unknown", + "label": "其他错误", + "action": "retry", + "action_label": "重试", + "retryable": True, + "detail": text[:200], + } + + +def enrich_job_error(job: dict[str, Any] | None, *, platform: str = "") -> dict[str, Any] | None: + if not job: + return None + out = dict(job) + err = str(out.get("error") or "") + info = classify_job_error(err, platform=platform) + out["error_class"] = info + return out diff --git a/backend/app/main.py b/backend/app/main.py index 270ced4..5122125 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -171,9 +171,11 @@ async def lifespan(_: FastAPI): return from .db_backup import backup_loop from .ops_alerts import alert_loop + from .disk_guard import disk_guard_loop asyncio.create_task(backup_loop()) asyncio.create_task(alert_loop()) + asyncio.create_task(disk_guard_loop()) try: from . import ops_neko_sync @@ -1686,7 +1688,7 @@ async def yt_long_settings_update(body: dict[str, Any] | None = None) -> dict[st raise HTTPException(400, "source_daily_max 无效") from None if "yt_long_source_cap" in raw: try: - patch["yt_long_source_cap"] = max(42, min(300, int(raw["yt_long_source_cap"]))) + patch["yt_long_source_cap"] = max(0, min(300, int(raw["yt_long_source_cap"]))) except Exception: raise HTTPException(400, "source_cap 无效") from None if "yt_long_channel_daily_max" in raw: @@ -1696,12 +1698,12 @@ async def yt_long_settings_update(body: dict[str, Any] | None = None) -> dict[st raise HTTPException(400, "channel_daily_max 无效") from None if "yt_long_min_sec" in raw: try: - patch["yt_long_min_sec"] = max(180, min(480, int(raw["yt_long_min_sec"]))) + patch["yt_long_min_sec"] = max(480, min(900, int(raw["yt_long_min_sec"]))) except Exception: raise HTTPException(400, "min_sec 无效") from None if "yt_long_max_sec" in raw: try: - patch["yt_long_max_sec"] = max(180, min(480, int(raw["yt_long_max_sec"]))) + patch["yt_long_max_sec"] = max(480, min(900, int(raw["yt_long_max_sec"]))) except Exception: raise HTTPException(400, "max_sec 无效") from None if "yt_long_upload_min_gap_sec" in raw: @@ -1716,8 +1718,8 @@ async def yt_long_settings_update(body: dict[str, Any] | None = None) -> dict[st if patch: # Keep min <= max cfg = {**db.get_settings_map(), **patch} - lo = int(cfg.get("yt_long_min_sec") or 180) - hi = int(cfg.get("yt_long_max_sec") or 480) + lo = int(cfg.get("yt_long_min_sec") or 480) + hi = int(cfg.get("yt_long_max_sec") or 900) if lo > hi: patch["yt_long_max_sec"] = lo db.update_settings_map(patch) @@ -4521,22 +4523,39 @@ async def network_socks_get() -> dict[str, Any]: @app.patch("/api/network/socks") async def network_socks_patch(body: dict[str, Any]) -> dict[str, Any]: - """Update global SOCKS profiles — empty list allowed (fresh install).""" + """Update global SOCKS profiles — empty list allowed (fresh install). + + On VPS: enabled → egress_mode=residential + douyinweb-singbox only. + Never touches host sing-box.service (v2ray-agent). + """ from . import db + from . import egress_hub from . import global_socks + from . import host_profile from . import singbox_manager cfg = await asyncio.to_thread(db.get_settings_map) updates: dict[str, Any] = {} + want_on: bool | None = None if "enabled" in body: - updates["global_socks_enabled"] = bool(body.get("enabled")) - updates["shorts_upload_socks_enabled"] = bool(body.get("enabled")) - # 住宅 SOCKS 勾选 = ShellCrash 链式落地,不是独立引擎 - updates["egress_chain_residential"] = bool(body.get("enabled")) - if bool(body.get("enabled")): - updates["egress_mode"] = "shellcrash" - elif str(cfg.get("egress_mode") or "") == "residential": - updates["egress_mode"] = "shellcrash" + want_on = bool(body.get("enabled")) + updates["global_socks_enabled"] = want_on + updates["shorts_upload_socks_enabled"] = want_on + is_vps = host_profile.infer_profile(cfg) == "vps" + if want_on: + if is_vps: + updates["egress_mode"] = "residential" + updates["egress_chain_residential"] = False + else: + # Physical: keep ShellCrash dialer-proxy chain semantics + updates["egress_mode"] = "shellcrash" + updates["egress_chain_residential"] = True + else: + updates["egress_chain_residential"] = False + if str(cfg.get("egress_mode") or "") in {"residential", "shellcrash"}: + updates["egress_mode"] = "off" if is_vps else str(cfg.get("egress_mode") or "shellcrash") + if is_vps: + updates["egress_mode"] = "off" if "active_profile_id" in body: updates["global_socks_profile_id"] = str(body.get("active_profile_id") or "").strip() updates["shorts_upload_socks_profile_id"] = updates["global_socks_profile_id"] @@ -4547,7 +4566,6 @@ async def network_socks_patch(body: dict[str, Any]) -> dict[str, Any]: for item in raw: p = global_socks._norm_profile(item) if p and p["server"] and p["port"] > 0: - # Keep existing password if client sent masked *** old = global_socks.get_socks_profile(str(p["id"]), cfg) pwd = str(p.get("password") or "") if old and (not pwd or pwd.startswith("***")): @@ -4558,10 +4576,26 @@ async def network_socks_patch(body: dict[str, Any]) -> dict[str, Any]: if updates: await asyncio.to_thread(db.update_settings_map, updates) cfg = await asyncio.to_thread(db.get_settings_map) - try: - await asyncio.to_thread(singbox_manager.apply_from_settings, cfg) - except Exception: - pass + mode = str(cfg.get("egress_mode") or "off") + if mode == "residential" and cfg.get("global_socks_enabled"): + try: + await asyncio.to_thread( + egress_hub.apply_mode, + "residential", + chain=False, + refresh_neko=False, # never hang API on docker recreate + cfg=cfg, + ) + except Exception: + try: + await asyncio.to_thread(singbox_manager.apply_from_settings, cfg) + except Exception: + pass + elif want_on is False or mode == "off": + try: + await asyncio.to_thread(singbox_manager.stop) + except Exception: + pass from . import network_hub return await asyncio.to_thread(network_hub.socks_status) @@ -4593,7 +4627,7 @@ async def network_egress_patch(body: dict[str, Any] = Body(default={})) -> dict[ cover_neko_flag=cover.get("neko") if "neko" in cover else body.get("cover_neko"), cover_relay_flag=cover.get("relay") if "relay" in cover else body.get("cover_relay"), cover_uploads_flag=cover.get("uploads") if "uploads" in cover else body.get("cover_uploads"), - refresh_neko=bool(body.get("refresh_neko", True)), + refresh_neko=bool(body.get("refresh_neko", False)), dialer=str(body.get("dialer") or "") or None, ) except ValueError as exc: diff --git a/backend/app/network_hub.py b/backend/app/network_hub.py index cfa6006..897bf85 100644 --- a/backend/app/network_hub.py +++ b/backend/app/network_hub.py @@ -1,283 +1,285 @@ -# -*- coding: utf-8 -*- -"""Network hub — WireGuard primary + FRP auxiliary (SH2-adapted). - -Physical dual-path policy: -- Primary: WireGuard (wg-dy) carries app traffic VPS Caddy → 10.8.0.2 and preferred SSH. -- Auxiliary: FRP (frpp :4014) is emergency SSH / ops only — never the app data path. -""" -from __future__ import annotations - -import os -import re -import shutil -import time -from pathlib import Path -from typing import Any - -from . import global_socks -from . import shellcrash_hub -from . import wireguard_hub - - -def _run(cmd: list[str], timeout: int = 12) -> tuple[int, str]: - import subprocess - - try: - p = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout, check=False) - return int(p.returncode), ((p.stdout or "") + (p.stderr or "")).strip() - except Exception as exc: - return 1, str(exc) - - -def _unit_active(name: str) -> str: - code, out = _run(["systemctl", "is-active", name], timeout=5) - return (out.splitlines()[0] if out else ("inactive" if code else "unknown")).strip() - - -def path_roles() -> dict[str, Any]: - """Declare which transport is primary vs auxiliary.""" - cn_up = Path("/sys/class/net/wg-dy-cn").exists() if Path("/sys/class/net").is_dir() else False - wg_target = "10.9.0.2(wg-dy-cn 国内优先)" if cn_up else "10.8.0.2(wg-dy 海外)" - return { - "app_https": { - "primary": "wireguard", - "detail": f"VPS Caddy → WG {wg_target}:4015/8014;wg-dy 海外链路保留作备份", - }, - "ops_ssh": { - "primary": "wireguard", - "auxiliary": "frp", - "detail": "优先 WG(wg-dy-cn → 10.9.0.1 或 wg-dy → 10.8.0.1);FRP :4014 仅应急", - }, - "policy": "wg_cn_primary_wg_us_backup_frp_aux", - } - - -def frp_status() -> dict[str, Any]: - """FRP is auxiliary — SSH/ops fallback only; do not carry app reverse_proxy.""" - unit = None - for name in ("frpp", "frpc", "frp-panel"): - st = _unit_active(name) - if st in {"active", "activating"}: - unit = {"name": name, "state": st} - break - if unit is None and st not in {"inactive", "unknown", ""}: - unit = {"name": name, "state": st} - code, ps = _run(["bash", "-lc", "ps aux | grep -E '[f]rpc|[f]rpp|[f]rp-panel' | head -5"], timeout=8) - procs = [ln.strip() for ln in (ps or "").splitlines() if ln.strip()] - # Detect common SSH tunnel port hint - ports: list[int] = [] - for ln in procs: - for m in re.finditer(r":(\d{2,5})\b", ln): - try: - ports.append(int(m.group(1))) - except ValueError: - pass - return { - "ok": True, - "role": "auxiliary", - "purpose": "ops_ssh_emergency", - "unit": unit, - "processes": procs[:5], - "hint_ports": sorted(set(ports))[:8], - "detail": "辅路径:仅应急 SSH/运维(如 VPS:4014→guest:22)。应用 HTTPS 必须走 WireGuard,勿把业务反代挂到 FRP。", - } - - -def socks_status() -> dict[str, Any]: - from . import db - - cfg = db.get_settings_map() - enabled = global_socks.is_global_socks_enabled(cfg) - profiles = global_socks.list_socks_profiles(cfg, public=True) - active_id = global_socks.active_profile_id(cfg) - from . import singbox_manager - - return { - "ok": True, - "enabled": enabled, - "active_profile_id": active_id, - "profiles": profiles, - "local_mixed": global_socks.local_mixed_url() if enabled else "", - "singbox_running": bool(singbox_manager.is_running()) if enabled else False, - "hint": "新装默认无住宅节点;自行添加 SOCKS5", - } - - -def _deploy_shape_hint() -> str: - if Path("/etc/wireguard/wg-dy.conf").is_file() or any( - p.name == "wg-dy" for p in Path("/sys/class/net").iterdir() if Path("/sys/class/net").is_dir() - ): - return "physical_or_wg" - return "colocated_or_unknown" - - -def _wg_handshake_age_sec() -> int | None: - """Seconds since latest handshake on primary WG iface (wg-dy-cn preferred).""" - for iface in ("wg-dy-cn", "wg-dy"): - code, out = _run(["wg", "show", iface, "latest-handshakes"], timeout=5) - if code != 0 or not out.strip(): - continue - parts = out.split() - if len(parts) < 2: - continue - try: - ts = int(parts[-1]) - except ValueError: - continue - if ts <= 0: - continue - return max(0, int(time.time()) - ts) - return None - - -_ping_wg_cache: tuple[float, dict[str, Any]] | None = None -_PING_WG_CACHE_TTL_SEC = 15.0 - - -def _ping_wg_peer() -> dict[str, Any]: - global _ping_wg_cache - import time as _time - - now = _time.time() - if _ping_wg_cache is not None: - cached_at, cached = _ping_wg_cache - if now - cached_at < _PING_WG_CACHE_TTL_SEC: - return dict(cached) - - if Path("/sys/class/net/wg-dy-cn").exists() if Path("/sys/class/net").is_dir() else False: - peer = str(os.environ.get("DY_WG_CN_PEER_IP") or "10.9.0.1").strip() or "10.9.0.1" - else: - peer = str(os.environ.get("DY_WG_PEER_IP") or "10.8.0.1").strip() or "10.8.0.1" - code, out = _run(["ping", "-c", "1", "-W", "2", peer], timeout=6) - ok = code == 0 and "1 received" in out.replace("packets ", "") - if not ok: - ok = code == 0 and ("bytes from" in out or "ttl=" in out.lower()) - rtt = "" - m = re.search(r"time[=<]([0-9.]+)\s*ms", out) - if m: - rtt = m.group(1) + "ms" - result = {"ok": ok, "peer": peer, "rtt": rtt, "detail": (out.splitlines()[-1] if out else "")[:120]} - _ping_wg_cache = (now, result) - return dict(result) - - -def wireguard_watch_status() -> dict[str, Any]: - unit = _unit_active("douyinweb-wireguard-watch") - path = Path("/opt/douyinWEB/scripts/linux/wireguard_watch.sh") - return { - "unit": unit, - "installed": path.is_file(), - "path": str(path) if path.is_file() else "", - "hint": "stale handshake 自动重启 wg-dy-cn / wg-dy(主路径保活)", - } - - -def network_overview() -> dict[str, Any]: - wg = wireguard_hub.runtime_status() - age = _wg_handshake_age_sec() - ping = _ping_wg_peer() - wg["role"] = "primary" - wg["purpose"] = "app_https_and_ops_ssh" - wg["handshake_age_sec"] = age - wg["handshake_fresh"] = age is not None and age < 180 - wg["peer_ping"] = ping - wg["watch"] = wireguard_watch_status() - if age is not None and age >= 300: - wg.setdefault("recommendations", []).append( - f"握手已 {age}s 未刷新 — watch 应重启 wg-dy;勿改用 FRP 扛业务" - ) - - frp = frp_status() - from . import egress_hub - - # One ShellCrash status for this request (status() itself is also TTL-cached). - sc = shellcrash_hub.status() - return { - "ok": True, - "path_roles": path_roles(), - "wireguard": wg, - "frp": frp, - "shellcrash": sc, - "socks": socks_status(), - "egress": egress_hub.status(), - "deploy_shape": _deploy_shape_hint(), - "physical_checklist": physical_checklist(wg=wg, frp=frp, shellcrash=sc), - } - - -def physical_checklist( - *, - wg: dict[str, Any] | None = None, - frp: dict[str, Any] | None = None, - shellcrash: dict[str, Any] | None = None, -) -> dict[str, Any]: - """Operator checklist — WireGuard primary, FRP auxiliary.""" - checks: list[dict[str, Any]] = [] - - def add(name: str, ok: bool, detail: str = "") -> None: - checks.append({"name": name, "ok": bool(ok), "detail": detail}) - - pub = str(os.environ.get("DY_PUBLIC_BASE_URL") or "").strip() - add( - "public_base_url", - pub.startswith("https://") and "127.0.0.1" not in pub and not pub.startswith("http://10."), - pub or "missing DY_PUBLIC_BASE_URL", - ) - bind = str(os.environ.get("DY_NEKO_HTTP_BIND") or "127.0.0.1").strip() - shape = _deploy_shape_hint() - if shape.startswith("physical"): - add("neko_http_bind", bind in {"0.0.0.0", "*"}, f"DY_NEKO_HTTP_BIND={bind} (physical needs 0.0.0.0)") - else: - add("neko_http_bind", True, f"DY_NEKO_HTTP_BIND={bind}") - - docker_ok = bool(shutil.which("docker")) - add("docker", docker_ok, "docker binary" if docker_ok else "missing") - seed = Path(__file__).resolve().parent.parent / "neko" / "tampermonkey-seed" / "Default" / "Extensions" - add("neko_seed", seed.is_dir(), str(seed)) - - wg_up = Path("/sys/class/net/wg-dy").exists() if Path("/sys/class/net").is_dir() else False - add("wg_primary_link", wg_up or shape != "physical_or_wg", "wg-dy iface (主路径)" if wg_up else "no wg-dy") - - wg = wg or {} - age = wg.get("handshake_age_sec") - if isinstance(age, int): - add("wg_handshake", age < 300, f"age={age}s (主路径保活)") - elif wg_up: - add("wg_handshake", False, "无法读取 handshake") - - ping = wg.get("peer_ping") if isinstance(wg.get("peer_ping"), dict) else {} - if ping: - add("wg_peer_ping", bool(ping.get("ok")), f"{ping.get('peer')} {ping.get('rtt') or ''}".strip()) - - watch = wg.get("watch") if isinstance(wg.get("watch"), dict) else {} - if shape.startswith("physical"): - add( - "wg_watch", - watch.get("unit") == "active", - f"unit={watch.get('unit') or 'missing'} — douyinweb-wireguard-watch 保活主路径", - ) - - frp = frp or {} - frp_unit = (frp.get("unit") or {}) if isinstance(frp.get("unit"), dict) else {} - add( - "frp_aux_ssh", - True, - f"role=auxiliary state={frp_unit.get('state') or 'n/a'} — 仅应急 SSH,不扛业务", - ) - - sc = shellcrash if isinstance(shellcrash, dict) else shellcrash_hub.status() - if shape.startswith("physical"): - add( - "shellcrash", - bool(sc.get("installed")) and bool(sc.get("running")), - f"installed={sc.get('installed')} unit={sc.get('unit')} mixed=:{sc.get('mixed_port') or '?'}", - ) - - failed = sum(1 for c in checks if not c["ok"]) - return { - "ok": failed == 0, - "failed": failed, - "checks": checks, - "deploy_shape": shape, - "policy": "wg_primary_frp_aux", - } +# -*- coding: utf-8 -*- +"""Network hub — WireGuard primary + FRP auxiliary (SH2-adapted). + +Physical dual-path policy: +- Primary: WireGuard (wg-dy) carries app traffic VPS Caddy → 10.8.0.2 and preferred SSH. +- Auxiliary: FRP (frpp :4014) is emergency SSH / ops only — never the app data path. +""" +from __future__ import annotations + +import os +import re +import shutil +import time +from pathlib import Path +from typing import Any + +from . import global_socks +from . import shellcrash_hub +from . import wireguard_hub + + +def _run(cmd: list[str], timeout: int = 12) -> tuple[int, str]: + import subprocess + + try: + p = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout, check=False) + return int(p.returncode), ((p.stdout or "") + (p.stderr or "")).strip() + except Exception as exc: + return 1, str(exc) + + +def _unit_active(name: str) -> str: + code, out = _run(["systemctl", "is-active", name], timeout=5) + return (out.splitlines()[0] if out else ("inactive" if code else "unknown")).strip() + + +def path_roles() -> dict[str, Any]: + """Declare which transport is primary vs auxiliary.""" + cn_up = Path("/sys/class/net/wg-dy-cn").exists() if Path("/sys/class/net").is_dir() else False + wg_target = "10.9.0.2(wg-dy-cn 国内优先)" if cn_up else "10.8.0.2(wg-dy 海外)" + return { + "app_https": { + "primary": "wireguard", + "detail": f"VPS Caddy → WG {wg_target}:4015/8014;wg-dy 海外链路保留作备份", + }, + "ops_ssh": { + "primary": "wireguard", + "auxiliary": "frp", + "detail": "优先 WG(wg-dy-cn → 10.9.0.1 或 wg-dy → 10.8.0.1);FRP :4014 仅应急", + }, + "policy": "wg_cn_primary_wg_us_backup_frp_aux", + } + + +def frp_status() -> dict[str, Any]: + """FRP is auxiliary — SSH/ops fallback only; do not carry app reverse_proxy.""" + unit = None + for name in ("frpp", "frpc", "frp-panel"): + st = _unit_active(name) + if st in {"active", "activating"}: + unit = {"name": name, "state": st} + break + if unit is None and st not in {"inactive", "unknown", ""}: + unit = {"name": name, "state": st} + code, ps = _run(["bash", "-lc", "ps aux | grep -E '[f]rpc|[f]rpp|[f]rp-panel' | head -5"], timeout=8) + procs = [ln.strip() for ln in (ps or "").splitlines() if ln.strip()] + # Detect common SSH tunnel port hint + ports: list[int] = [] + for ln in procs: + for m in re.finditer(r":(\d{2,5})\b", ln): + try: + ports.append(int(m.group(1))) + except ValueError: + pass + return { + "ok": True, + "role": "auxiliary", + "purpose": "ops_ssh_emergency", + "unit": unit, + "processes": procs[:5], + "hint_ports": sorted(set(ports))[:8], + "detail": "辅路径:仅应急 SSH/运维(如 VPS:4014→guest:22)。应用 HTTPS 必须走 WireGuard,勿把业务反代挂到 FRP。", + } + + +def socks_status() -> dict[str, Any]: + from . import db + + cfg = db.get_settings_map() + enabled = global_socks.is_global_socks_enabled(cfg) + profiles = global_socks.list_socks_profiles(cfg, public=True) + active_id = global_socks.active_profile_id(cfg) + from . import singbox_manager + + return { + "ok": True, + "enabled": enabled, + "active_profile_id": active_id, + "profiles": profiles, + "local_mixed": global_socks.local_mixed_url() if enabled else "", + "singbox_running": bool(singbox_manager.is_running()) if enabled else False, + "unit": "douyinweb-singbox", + "v2ray_agent": singbox_manager.host_v2ray_agent_status(), + "hint": "美国 VPS:填 SOCKS 后开「静态住宅 IP」;永不重启宿主机 sing-box.service", + } + + +def _deploy_shape_hint() -> str: + if Path("/etc/wireguard/wg-dy.conf").is_file() or any( + p.name == "wg-dy" for p in Path("/sys/class/net").iterdir() if Path("/sys/class/net").is_dir() + ): + return "physical_or_wg" + return "colocated_or_unknown" + + +def _wg_handshake_age_sec() -> int | None: + """Seconds since latest handshake on primary WG iface (wg-dy-cn preferred).""" + for iface in ("wg-dy-cn", "wg-dy"): + code, out = _run(["wg", "show", iface, "latest-handshakes"], timeout=5) + if code != 0 or not out.strip(): + continue + parts = out.split() + if len(parts) < 2: + continue + try: + ts = int(parts[-1]) + except ValueError: + continue + if ts <= 0: + continue + return max(0, int(time.time()) - ts) + return None + + +_ping_wg_cache: tuple[float, dict[str, Any]] | None = None +_PING_WG_CACHE_TTL_SEC = 15.0 + + +def _ping_wg_peer() -> dict[str, Any]: + global _ping_wg_cache + import time as _time + + now = _time.time() + if _ping_wg_cache is not None: + cached_at, cached = _ping_wg_cache + if now - cached_at < _PING_WG_CACHE_TTL_SEC: + return dict(cached) + + if Path("/sys/class/net/wg-dy-cn").exists() if Path("/sys/class/net").is_dir() else False: + peer = str(os.environ.get("DY_WG_CN_PEER_IP") or "10.9.0.1").strip() or "10.9.0.1" + else: + peer = str(os.environ.get("DY_WG_PEER_IP") or "10.8.0.1").strip() or "10.8.0.1" + code, out = _run(["ping", "-c", "1", "-W", "2", peer], timeout=6) + ok = code == 0 and "1 received" in out.replace("packets ", "") + if not ok: + ok = code == 0 and ("bytes from" in out or "ttl=" in out.lower()) + rtt = "" + m = re.search(r"time[=<]([0-9.]+)\s*ms", out) + if m: + rtt = m.group(1) + "ms" + result = {"ok": ok, "peer": peer, "rtt": rtt, "detail": (out.splitlines()[-1] if out else "")[:120]} + _ping_wg_cache = (now, result) + return dict(result) + + +def wireguard_watch_status() -> dict[str, Any]: + unit = _unit_active("douyinweb-wireguard-watch") + path = Path("/opt/douyinWEB/scripts/linux/wireguard_watch.sh") + return { + "unit": unit, + "installed": path.is_file(), + "path": str(path) if path.is_file() else "", + "hint": "stale handshake 自动重启 wg-dy-cn / wg-dy(主路径保活)", + } + + +def network_overview() -> dict[str, Any]: + wg = wireguard_hub.runtime_status() + age = _wg_handshake_age_sec() + ping = _ping_wg_peer() + wg["role"] = "primary" + wg["purpose"] = "app_https_and_ops_ssh" + wg["handshake_age_sec"] = age + wg["handshake_fresh"] = age is not None and age < 180 + wg["peer_ping"] = ping + wg["watch"] = wireguard_watch_status() + if age is not None and age >= 300: + wg.setdefault("recommendations", []).append( + f"握手已 {age}s 未刷新 — watch 应重启 wg-dy;勿改用 FRP 扛业务" + ) + + frp = frp_status() + from . import egress_hub + + # One ShellCrash status for this request (status() itself is also TTL-cached). + sc = shellcrash_hub.status() + return { + "ok": True, + "path_roles": path_roles(), + "wireguard": wg, + "frp": frp, + "shellcrash": sc, + "socks": socks_status(), + "egress": egress_hub.status(), + "deploy_shape": _deploy_shape_hint(), + "physical_checklist": physical_checklist(wg=wg, frp=frp, shellcrash=sc), + } + + +def physical_checklist( + *, + wg: dict[str, Any] | None = None, + frp: dict[str, Any] | None = None, + shellcrash: dict[str, Any] | None = None, +) -> dict[str, Any]: + """Operator checklist — WireGuard primary, FRP auxiliary.""" + checks: list[dict[str, Any]] = [] + + def add(name: str, ok: bool, detail: str = "") -> None: + checks.append({"name": name, "ok": bool(ok), "detail": detail}) + + pub = str(os.environ.get("DY_PUBLIC_BASE_URL") or "").strip() + add( + "public_base_url", + pub.startswith("https://") and "127.0.0.1" not in pub and not pub.startswith("http://10."), + pub or "missing DY_PUBLIC_BASE_URL", + ) + bind = str(os.environ.get("DY_NEKO_HTTP_BIND") or "127.0.0.1").strip() + shape = _deploy_shape_hint() + if shape.startswith("physical"): + add("neko_http_bind", bind in {"0.0.0.0", "*"}, f"DY_NEKO_HTTP_BIND={bind} (physical needs 0.0.0.0)") + else: + add("neko_http_bind", True, f"DY_NEKO_HTTP_BIND={bind}") + + docker_ok = bool(shutil.which("docker")) + add("docker", docker_ok, "docker binary" if docker_ok else "missing") + seed = Path(__file__).resolve().parent.parent / "neko" / "tampermonkey-seed" / "Default" / "Extensions" + add("neko_seed", seed.is_dir(), str(seed)) + + wg_up = Path("/sys/class/net/wg-dy").exists() if Path("/sys/class/net").is_dir() else False + add("wg_primary_link", wg_up or shape != "physical_or_wg", "wg-dy iface (主路径)" if wg_up else "no wg-dy") + + wg = wg or {} + age = wg.get("handshake_age_sec") + if isinstance(age, int): + add("wg_handshake", age < 300, f"age={age}s (主路径保活)") + elif wg_up: + add("wg_handshake", False, "无法读取 handshake") + + ping = wg.get("peer_ping") if isinstance(wg.get("peer_ping"), dict) else {} + if ping: + add("wg_peer_ping", bool(ping.get("ok")), f"{ping.get('peer')} {ping.get('rtt') or ''}".strip()) + + watch = wg.get("watch") if isinstance(wg.get("watch"), dict) else {} + if shape.startswith("physical"): + add( + "wg_watch", + watch.get("unit") == "active", + f"unit={watch.get('unit') or 'missing'} — douyinweb-wireguard-watch 保活主路径", + ) + + frp = frp or {} + frp_unit = (frp.get("unit") or {}) if isinstance(frp.get("unit"), dict) else {} + add( + "frp_aux_ssh", + True, + f"role=auxiliary state={frp_unit.get('state') or 'n/a'} — 仅应急 SSH,不扛业务", + ) + + sc = shellcrash if isinstance(shellcrash, dict) else shellcrash_hub.status() + if shape.startswith("physical"): + add( + "shellcrash", + bool(sc.get("installed")) and bool(sc.get("running")), + f"installed={sc.get('installed')} unit={sc.get('unit')} mixed=:{sc.get('mixed_port') or '?'}", + ) + + failed = sum(1 for c in checks if not c["ok"]) + return { + "ok": failed == 0, + "failed": failed, + "checks": checks, + "deploy_shape": shape, + "policy": "wg_primary_frp_aux", + } diff --git a/backend/app/ops_alerts.py b/backend/app/ops_alerts.py index 7a5bc33..15b55f1 100644 --- a/backend/app/ops_alerts.py +++ b/backend/app/ops_alerts.py @@ -73,7 +73,7 @@ async def check_and_alert() -> dict[str, Any]: metrics = collect_metrics() fired: list[str] = [] - if cfg.get("ops_alert_disk_enabled", False): + if cfg.get("ops_alert_disk_enabled", True): try: min_free = float(cfg.get("clips_min_free_gb") or 12) except Exception: @@ -127,6 +127,12 @@ async def alert_loop() -> None: while True: try: cfg = db.get_settings_map() + # Always reclaim under pressure (alert webhook remains optional). + try: + from .disk_guard import reclaim_once + reclaim_once(cfg) + except Exception: + pass if cfg.get("ops_alerts_enabled", False): await check_and_alert() try: diff --git a/backend/app/shorts_oauth.py b/backend/app/shorts_oauth.py index 716be3a..c131e05 100644 --- a/backend/app/shorts_oauth.py +++ b/backend/app/shorts_oauth.py @@ -50,24 +50,52 @@ _oauth_states: dict[str, tuple[str, float, str, str] | tuple[str, float, str, st _OAUTH_STATE_KEY = "shorts_oauth_pending_states" +_OAUTH_STATE_TTL_SEC = 1800.0 # 30min — Google consent + brand pick can be slow + + def _persist_oauth_states() -> None: """Survive API restarts between Google consent and callback.""" now = time.time() - payload: dict[str, list[Any]] = {} + # Merge with DB so another worker's pending states are not wiped. + try: + db._invalidate_settings_cache() + except Exception: + pass + try: + raw = (_cfg() or {}).get(_OAUTH_STATE_KEY) or {} + except Exception: + raw = {} + merged: dict[str, list[Any]] = {} + if isinstance(raw, dict): + for k, packed in raw.items(): + if not isinstance(packed, (list, tuple)) or len(packed) < 4: + continue + try: + exp = float(packed[1]) + except Exception: + continue + if exp < now: + continue + merged[str(k)] = list(packed) for k, packed in list(_oauth_states.items()): if len(packed) < 2 or float(packed[1]) < now: _oauth_states.pop(k, None) continue - payload[k] = list(packed) + merged[str(k)] = list(packed) + _oauth_states[str(k)] = packed try: - db.update_settings_map({_OAUTH_STATE_KEY: payload}) + db.update_settings_map({_OAUTH_STATE_KEY: merged}) except Exception: pass -def _hydrate_oauth_states() -> None: - if _oauth_states: - return +def _hydrate_oauth_states(*, force: bool = False) -> None: + """Load pending states from DB. Always merge — never skip when memory is non-empty.""" + try: + if force: + db._invalidate_settings_cache() + except Exception: + pass try: raw = (_cfg() or {}).get(_OAUTH_STATE_KEY) or {} except Exception: @@ -84,8 +112,11 @@ def _hydrate_oauth_states() -> None: continue if exp < now: continue + key = str(k) + if (not force) and key in _oauth_states: + continue if len(packed) >= 5: - _oauth_states[str(k)] = ( + _oauth_states[key] = ( str(packed[0]), exp, str(packed[2]), @@ -93,7 +124,29 @@ def _hydrate_oauth_states() -> None: str(packed[4] or ""), ) else: - _oauth_states[str(k)] = (str(packed[0]), exp, str(packed[2]), str(packed[3])) + _oauth_states[key] = (str(packed[0]), exp, str(packed[2]), str(packed[3])) + + +def _pop_oauth_state(state: str) -> tuple | None: + """Pop state from memory+DB (force hydrate first — fixes multi-worker / restart).""" + st = str(state or "").strip() + if not st: + return None + _hydrate_oauth_states(force=True) + packed = _oauth_states.pop(st, None) + if packed is None: + # One more direct DB peek in case cache raced + try: + db._invalidate_settings_cache() + raw = (_cfg() or {}).get(_OAUTH_STATE_KEY) or {} + if isinstance(raw, dict) and st in raw: + row = raw.get(st) + if isinstance(row, (list, tuple)) and len(row) >= 4: + packed = tuple(row[:5] if len(row) >= 5 else row[:4]) # type: ignore[assignment] + except Exception: + packed = None + _persist_oauth_states() + return packed # type: ignore[return-value] def _stamp_oauth_error(channel_pk: str, err: str) -> None: @@ -120,13 +173,28 @@ def _oauth_log(msg: str) -> None: def _google_http_proxy() -> str: - """Google APIs must egress via ShellCrash on China physical hosts.""" + """Google API egress proxy. + + - Prefer egress_hub (China physical / ShellCrash). + - Else use local clash :7890 only if it accepts connections. + - Else direct (overseas VPS / ytshort). Never force a dead 7890. + """ try: from . import egress_hub - return egress_hub.google_http_proxy() + p = str(egress_hub.google_http_proxy() or "").strip() + if p: + return p except Exception: + pass + try: + import socket + + s = socket.create_connection(("127.0.0.1", 7890), timeout=0.2) + s.close() return "http://127.0.0.1:7890" + except Exception: + return "" def _google_client_kwargs(*, timeout: float = 45.0) -> dict[str, Any]: @@ -142,6 +210,38 @@ def _google_client_kwargs(*, timeout: float = 45.0) -> dict[str, Any]: return kw +def _find_shorts_by_youtube_id(yt_id: str) -> dict[str, Any] | None: + yt = str(yt_id or "").strip() + if not yt: + return None + for ch in db.list_shorts_channels(enabled=None) or []: + if str(ch.get("youtube_channel_id") or "").strip() == yt: + return ch + return None + + +def _dedupe_shorts_channel_by_youtube_id(prefer_pk: str, yt_id: str) -> str: + """Warn-only: never delete cards during/after OAuth (operator data loss).""" + yt_id = str(yt_id or "").strip() + prefer_pk = str(prefer_pk or "").strip() + if not yt_id: + return "" + rows = [ + ch + for ch in (db.list_shorts_channels(enabled=None) or []) + if str(ch.get("youtube_channel_id") or "").strip() == yt_id + ] + if len(rows) < 2: + return "" + others = [str(r.get("name") or r.get("id") or "") for r in rows if str(r.get("id") or "") != prefer_pk] + if not others: + return "" + return ( + f"注意:YouTube 频道 {yt_id} 仍挂在多张卡上({', '.join(others[:3])})。" + "未自动删除任何卡片,请手动删掉重复卡。" + ) + + def _cfg() -> dict[str, Any]: return db.get_settings_map() @@ -398,16 +498,21 @@ def build_authorize_url( if ret and (not ret.startswith("/") or ret.startswith("//")): ret = "" now = time.time() - # Drop expired + any prior pending state for this same card (double-click / double-fetch). + # Drop expired + older pending states for this same card (double-click / React remount). for k, packed in list(_oauth_states.items()): - if len(packed) < 2 or packed[1] < now or str(packed[0]) == str(channel_pk): + if len(packed) < 2 or packed[1] < now: + _oauth_states.pop(k, None) + continue + if str(packed[0]) == str(channel_pk): _oauth_states.pop(k, None) state = secrets.token_urlsafe(24) + exp = now + _OAUTH_STATE_TTL_SEC if ret: - _oauth_states[state] = (channel_pk, now + 600, client_id, client_secret, ret) + _oauth_states[state] = (channel_pk, exp, client_id, client_secret, ret) else: - _oauth_states[state] = (channel_pk, now + 600, client_id, client_secret) + _oauth_states[state] = (channel_pk, exp, client_id, client_secret) _persist_oauth_states() + _oauth_log(f"authorize_start pk={channel_pk} state={state[:10]} exp={int(exp)}") scope = authorize_scopes(include_monetary=bool(include_monetary)) params = { "client_id": client_id, @@ -445,21 +550,48 @@ def authorize_scopes(*, include_monetary: bool = False) -> str: FORCE_SSL_SCOPE = "https://www.googleapis.com/auth/youtube.force-ssl" -async def token_scopes(access_token: str) -> set[str]: - """Granted scopes on an access token (tokeninfo).""" +async def token_scopes(access_token: str) -> set[str] | None: + """Granted scopes on an access token (tokeninfo). + + Returns None when egress/network failed — callers must NOT treat that as + 「缺 force-ssl」(empty set used to false-flag OAuth 异常). + """ if not access_token: return set() + last_err = "" try: - async with httpx.AsyncClient(**_google_client_kwargs(timeout=20.0)) as client: - resp = await client.get( - "https://oauth2.googleapis.com/tokeninfo", - params={"access_token": access_token}, - ) - data = resp.json() if resp.content else {} - raw = str(data.get("scope") or "") - return {s for s in raw.split() if s.strip()} + from . import egress_hub + + proxies = egress_hub.google_http_proxy_candidates() except Exception: - return set() + proxies = [str((_google_http_proxy() or "")).strip()] + if "" not in proxies: + proxies.append("") + for proxy in proxies: + try: + try: + from . import egress_hub + + kw = egress_hub.httpx_kwargs_for_proxy(proxy, timeout=10.0 if proxy else 20.0) + except Exception: + kw = _google_client_kwargs(timeout=10.0 if proxy else 20.0) + if proxy: + kw = {**kw, "proxy": proxy} + elif "proxy" in kw: + kw = {k: v for k, v in kw.items() if k != "proxy"} + async with httpx.AsyncClient(**kw) as client: + resp = await client.get( + "https://oauth2.googleapis.com/tokeninfo", + params={"access_token": access_token}, + ) + data = resp.json() if resp.content else {} + raw = str(data.get("scope") or "") + return {s for s in raw.split() if s.strip()} + except Exception as exc: + last_err = f"{type(exc).__name__}: {exc}"[:160] + continue + _oauth_log(f"token_scopes_fail {last_err}") + return None def missing_required_scopes(granted: set[str]) -> list[str]: @@ -485,21 +617,17 @@ async def revoke_refresh_token(*, refresh_token: str, client_id: str = "", clien async def prepare_reauthorize(channel_pk: str) -> None: - """Soft-mark OAuth start on the clicked card — never revoke sibling brands.""" + """Mark OAuth start time only — do not stamp oauth_error (that looks like a failure).""" ch = db.get_shorts_channel(channel_pk) or {} if not ch: return - db.update_shorts_channel( - channel_pk, - oauth_checked_at=time.time(), - oauth_error="授权中:完成 Google 后凭证写入本卡片", - ) + # Keep existing oauth_ok / oauth_error so the board does not flash「OAuth 异常」 + # while the operator is mid-consent on Google. + db.update_shorts_channel(channel_pk, oauth_checked_at=time.time()) async def exchange_code(*, code: str, state: str, request_base: str = "") -> dict[str, Any]: - _hydrate_oauth_states() - packed = _oauth_states.pop(state, None) - _persist_oauth_states() + packed = _pop_oauth_state(state) if not packed: _oauth_log(f"state_miss state={state[:12]} mem={len(_oauth_states)}") raise ValueError("授权 state 无效或已过期,请重新点击授权") @@ -509,7 +637,7 @@ async def exchange_code(*, code: str, state: str, request_base: str = "") -> dic return_to = str(packed[4]).strip() if len(packed) >= 5 else "" if return_to and (not return_to.startswith("/") or return_to.startswith("//")): return_to = "" - if exp < time.time(): + if float(exp) < time.time(): _stamp_oauth_error(channel_pk, "授权已过期,请重新点击授权") raise ValueError("授权已过期,请重新点击授权") cfg = _cfg() @@ -535,6 +663,16 @@ async def exchange_code(*, code: str, state: str, request_base: str = "") -> dic f"exchange pk={channel_pk} redirect={redirect_uri} " f"secret_tail={client_secret[-4:]} proxy={proxy or 'direct'}" ) + yt_id = "" + yt_title = "" + yt_handle = "" + google_email = "" + access = "" + refresh = "" + expected_uc = str(channel.get("youtube_channel_id") or "").strip() + expected_name = str(channel.get("name") or "").strip() + mismatch_warn = "" + dup_warn = "" try: async with httpx.AsyncClient(**_google_client_kwargs(timeout=60.0)) as client: token_resp = await client.post( @@ -588,7 +726,7 @@ async def exchange_code(*, code: str, state: str, request_base: str = "") -> dic _stamp_oauth_error(channel_pk, err) raise ValueError(err) items = ch_data.get("items") or [] - # Prefer the brand that already matches this card's UC (multi-brand Google logins). + # Card name ≠ brand title. Prefer UC match in token list; else authorized brand (items[0]). expected_uc = str(channel.get("youtube_channel_id") or "").strip() expected_name = str(channel.get("name") or "").strip() chosen: dict[str, Any] | None = None @@ -617,66 +755,16 @@ async def exchange_code(*, code: str, state: str, request_base: str = "") -> dic _stamp_oauth_error(channel_pk, err) raise ValueError(err) - # Hard lock: re-auth must not rewrite this card into another brand. - # (Previously we overwrote youtube_channel_id + name → duplicate 「nomad Street Food」.) - if expected_uc and yt_id != expected_uc: - err = ( - f"授权选中的 YouTube 频道是「{yt_title or yt_id}」({yt_id})," - f"但本卡绑定的是「{expected_name or expected_uc}」({expected_uc})。" - "凭证未写入。请重新点授权,在 Google 账号/品牌列表里选对本卡的频道。" - ) - _stamp_oauth_error(channel_pk, err) - # Best-effort revoke the wrong-brand grant so it does not linger. - try: - async with httpx.AsyncClient(**_google_client_kwargs(timeout=15.0)) as client: - await client.post( - "https://oauth2.googleapis.com/revoke", - data={"token": access}, - headers={"Content-Type": "application/x-www-form-urlencoded"}, - ) - if refresh: - await client.post( - "https://oauth2.googleapis.com/revoke", - data={"token": refresh}, - headers={"Content-Type": "application/x-www-form-urlencoded"}, - ) - except Exception: - pass - raise ValueError(err) - google_email = await fetch_google_account_email(access) - # Soft-warn if the same YouTube channel is already bound to another Shorts card. - dup_warn = "" - if yt_id: - try: - for other in db.list_shorts_channels(enabled=None): - oid = str(other.get("id") or "") - if oid == channel_pk: - continue - if str(other.get("youtube_channel_id") or "").strip() == yt_id: - dup_warn = ( - f"注意:YouTube 频道 {yt_id} 已挂在另一张卡 " - f"「{other.get('name') or oid}」。两张卡会共用同一频道身份,建议删掉重复卡。" - ) - try: - db.add_event( - kind="ops", - level="warn", - message=dup_warn, - meta={"channel_pk": channel_pk, "dup_channel_pk": oid, "youtube_channel_id": yt_id}, - ) - except Exception: - pass - break - except Exception: - pass + # Resolve target card by authorized brand UC: + # exist → update that card; missing → create new card. + # Never delete the clicked card. Never wipe unrelated cards. had_old = bool(str(channel.get("refresh_token") or "").strip()) if not refresh: if had_old: refresh = str(channel.get("refresh_token") or "").strip() else: - # Revoke this access so the next consent can mint a refresh_token. try: async with httpx.AsyncClient(**_google_client_kwargs(timeout=20.0)) as client: await client.post( @@ -694,28 +782,133 @@ async def exchange_code(*, code: str, state: str, request_base: str = "") -> dic _stamp_oauth_error(channel_pk, err) raise ValueError(err) + click_pk = str(channel_pk) + click_name = str(channel.get("name") or click_pk) + existing = _find_shorts_by_youtube_id(yt_id) if yt_id else None + target_pk = click_pk + resolve_note = "" + created_new = False + removed_stub = False + + def _is_empty_stub(ch: dict[str, Any]) -> bool: + return ( + not str(ch.get("youtube_channel_id") or "").strip() + and not str(ch.get("refresh_token") or "").strip() + ) + + if existing and str(existing.get("id") or "") != click_pk: + target_pk = str(existing.get("id") or click_pk) + resolve_note = ( + f"选中品牌「{yt_title or yt_id}」已有卡片「{existing.get('name') or target_pk}」," + f"凭证已写入该卡。" + ) + elif existing: + target_pk = str(existing.get("id") or click_pk) + resolve_note = "" + elif expected_uc and expected_uc != yt_id: + # Clicked card bound to another UC; brand is new → create. + try: + created = db.create_shorts_channel( + name=(yt_title or "Shorts Channel").strip() or "Shorts Channel", + youtube_channel_id=yt_id, + oauth_profile_id=profile_id or str(channel.get("oauth_profile_id") or ""), + enabled=True, + ) + target_pk = str(created.get("id") or "") + created_new = True + resolve_note = ( + f"选中品牌「{yt_title or yt_id}」原先没有卡片,已新建;" + f"你点的「{click_name}」保持原样。" + ) + except ValueError as exc: + again = _find_shorts_by_youtube_id(yt_id) + if again: + target_pk = str(again.get("id") or click_pk) + resolve_note = ( + f"选中品牌「{yt_title or yt_id}」已有卡片「{again.get('name') or target_pk}」," + f"凭证已写入该卡({exc})。" + ) + else: + raise + else: + # Clicked card empty UC or same UC → update clicked card in place. + target_pk = click_pk + if expected_uc and expected_uc != yt_id: + resolve_note = ( + f"选中品牌「{yt_title or yt_id}」与原绑定不同,已更新本卡 UC" + "(卡片显示名不改成品牌名)。" + ) + + # Empty stub (no UC / no token) used only as authorize entry → remove after + # credentials land on the real brand card. Never delete cards that already have UC/tokens. + if target_pk != click_pk and _is_empty_stub(channel): + try: + db.delete_shorts_channel(click_pk) + removed_stub = True + resolve_note = ( + f"{resolve_note} 已自动移除空壳卡「{click_name}」。".strip() + ) + _oauth_log(f"removed_empty_stub click={click_pk} target={target_pk}") + except Exception as exc: + _oauth_log(f"remove_stub_fail click={click_pk} err={exc!r}") + try: + db.update_shorts_channel( + click_pk, + enabled=False, + oauth_ok=0, + oauth_error=f"空壳卡:授权已写入「{(existing or {}).get('name') or target_pk}」,可手动删除", + ) + except Exception: + pass + elif target_pk != click_pk: + # Real card clicked but brand bound elsewhere — clear stuck「授权中」. + try: + db.update_shorts_channel( + click_pk, + oauth_ok=0, + oauth_checked_at=time.time(), + oauth_error=( + f"本次授权写入了「{(db.get_shorts_channel(target_pk) or existing or {}).get('name') or target_pk}」," + f"本卡「{click_name}」未改动。" + )[:500], + ) + except Exception: + pass + patch: dict[str, Any] = { "client_id": client_id, "client_secret": client_secret, "refresh_token": refresh, + "youtube_channel_id": yt_id, } - # Only set UC when card had none; never swap to a different UC (guarded above). - if yt_id and not expected_uc: - patch["youtube_channel_id"] = yt_id if google_email: patch["oauth_email"] = google_email - # Keep operator card title on reauth — never auto-rename into another brand's title. - if yt_title and not expected_name: - patch["name"] = yt_title - if profile_id and not str(channel.get("oauth_profile_id") or "").strip(): + if profile_id: patch["oauth_profile_id"] = profile_id + # Never rename operator card into brand title on update — except empty / 未命名 stubs. + target_row = db.get_shorts_channel(target_pk) or {} + cur_name = str(target_row.get("name") or "").strip() + if (not created_new) and yt_title and ( + not cur_name or cur_name in ("未命名频道", "Shorts Channel", "Shorts") + ): + patch["name"] = yt_title + elif created_new and yt_title: + pass # create already named + + # Success card: keep oauth_error clean (info goes to warning toast, not 「OAuth 异常」). updated = db.update_shorts_channel( - channel_pk, + target_pk, **patch, oauth_ok=1, oauth_checked_at=time.time(), oauth_error="", ) + dup_warn = _dedupe_shorts_channel_by_youtube_id(target_pk, yt_id) if yt_id else "" + mismatch_warn = resolve_note + brand_mismatch = bool(resolve_note) and ( + created_new or (existing is not None and str(existing.get("id") or "") != click_pk) + ) + if google_email and profile_id: try: set_oauth_profile_email(profile_id, google_email) @@ -732,22 +925,29 @@ async def exchange_code(*, code: str, state: str, request_base: str = "") -> dic try: from . import youtube_manage as ytm - await ytm.fetch_channel_profile(channel_pk) + await ytm.fetch_channel_profile(target_pk) except Exception as exc: profile_err = str(exc).strip() or "拉取频道资料失败" try: from .yt_long_monetize import refresh_ypp_for_shorts_channel - ypp_r = await refresh_ypp_for_shorts_channel(channel_pk) + ypp_r = await refresh_ypp_for_shorts_channel(target_pk) if not ypp_r.get("ok"): ypp_err = str(ypp_r.get("error") or "YPP 探测失败")[:200] except Exception as exc: ypp_err = str(exc).strip() or "YPP 探测失败" note = " · ".join(x for x in (profile_err, ypp_err) if x) if note: - db.update_shorts_channel(channel_pk, oauth_error=note) - updated = db.get_shorts_channel(channel_pk) or updated - _oauth_log(f"exchange_ok pk={channel_pk} yt={yt_id} title={yt_title} profile_err={profile_err!r} ypp_err={ypp_err!r}") + try: + db.update_shorts_channel(target_pk, oauth_error=note[:500]) + updated = db.get_shorts_channel(target_pk) or updated + except Exception: + pass + _oauth_log( + f"exchange_ok click={click_pk} target={target_pk} created={created_new} " + f"removed_stub={removed_stub} yt={yt_id} title={yt_title} note={resolve_note!r}" + ) + warn_out = " · ".join(x for x in (mismatch_warn, dup_warn) if x) return { "ok": True, "channel": updated, @@ -762,7 +962,11 @@ async def exchange_code(*, code: str, state: str, request_base: str = "") -> dic "ypp_ok": not bool(ypp_err), "profile_error": profile_err, "ypp_error": ypp_err, - "duplicate_channel_warning": dup_warn, + "brand_mismatch": brand_mismatch, + "created_channel": created_new, + "removed_empty_stub": removed_stub, + "target_channel_pk": target_pk, + "duplicate_channel_warning": warn_out, "return_to": return_to, } except ValueError: @@ -807,7 +1011,13 @@ async def probe_channel_oauth(channel: dict[str, Any], cfg: dict[str, Any] | Non client_secret=creds["client_secret"], refresh_token=creds["refresh_token"], ) - missing = missing_required_scopes(await token_scopes(str(access))) + granted = await token_scopes(str(access)) + if granted is None: + # Token refresh succeeded; scope check egress failed — do not false-flag. + err = "OAuth 出口不稳定:令牌可用但权限校验超时,请稍后重试或检查住宅代理" + db.update_shorts_channel(cid, oauth_ok=1, oauth_checked_at=now, oauth_error=err) + return {"ok": True, "channel_id": cid, "warning": err, "scopes_unchecked": True} + missing = missing_required_scopes(granted) if missing: err = "OAuth 权限不足(缺 force-ssl),请点「重授权」升级 YPP 获利权限" db.update_shorts_channel(cid, oauth_ok=0, oauth_checked_at=now, oauth_error=err) @@ -825,7 +1035,7 @@ async def probe_channel_oauth(channel: dict[str, Any], cfg: dict[str, Any] | Non db.update_shorts_channel(cid, **patch) return {"ok": True, "channel_id": cid, "oauth_email": google_email} except Exception as exc: - err = str(exc)[:240] + err = str(exc).strip()[:240] or f"{type(exc).__name__}: OAuth 探测失败" db.update_shorts_channel(cid, oauth_ok=0, oauth_checked_at=now, oauth_error=err) return {"ok": False, "error": err, "channel_id": cid} diff --git a/backend/app/shorts_upload.py b/backend/app/shorts_upload.py index 8d79b0f..62f8623 100644 --- a/backend/app/shorts_upload.py +++ b/backend/app/shorts_upload.py @@ -60,6 +60,16 @@ def _client_kwargs(*, timeout: float, proxy_url: str = "") -> dict[str, Any]: return kw +def _proxy_candidates(proxy_url: str = "") -> list[str]: + try: + from . import egress_hub + + return egress_hub.google_http_proxy_candidates(prefer=str(proxy_url or "").strip()) + except Exception: + p = str(proxy_url or "").strip() + return [p] if p else [""] + + async def refresh_access_token( *, client_id: str, @@ -69,20 +79,40 @@ async def refresh_access_token( ) -> str: if not (client_id and client_secret and refresh_token): raise ValueError("缺少 OAuth client_id / client_secret / refresh_token") - async with httpx.AsyncClient(**_client_kwargs(timeout=30.0, proxy_url=proxy_url)) as client: - resp = await client.post( - "https://oauth2.googleapis.com/token", - data={ - "client_id": client_id, - "client_secret": client_secret, - "refresh_token": refresh_token, - "grant_type": "refresh_token", - }, - ) - data = resp.json() if resp.content else {} - if resp.status_code >= 400 or not data.get("access_token"): - raise ValueError(f"OAuth 刷新失败: {data.get('error_description') or data or resp.text}") - return str(data["access_token"]) + last_transport = "" + for proxy in _proxy_candidates(proxy_url): + # Flaky residential: fail fast then fall back to VPS direct. + attempt_timeout = 12.0 if proxy else 30.0 + try: + from . import egress_hub + + kw = egress_hub.httpx_kwargs_for_proxy(proxy, timeout=attempt_timeout) + except Exception: + kw = _client_kwargs(timeout=attempt_timeout, proxy_url=proxy) + try: + async with httpx.AsyncClient(**kw) as client: + resp = await client.post( + "https://oauth2.googleapis.com/token", + data={ + "client_id": client_id, + "client_secret": client_secret, + "refresh_token": refresh_token, + "grant_type": "refresh_token", + }, + ) + data = resp.json() if resp.content else {} + if resp.status_code >= 400 or not data.get("access_token"): + # Auth/config errors: do not fall through to another egress. + raise ValueError( + f"OAuth 刷新失败: {data.get('error_description') or data or resp.text}" + ) + return str(data["access_token"]) + except ValueError: + raise + except Exception as exc: + last_transport = f"{type(exc).__name__}: {exc}"[:240] + continue + raise ValueError(f"OAuth 刷新失败(出口不可用): {last_transport or 'unknown'}") async def upload_shorts_mp4( diff --git a/backend/app/singbox_manager.py b/backend/app/singbox_manager.py index c8d9d3d..69b44ef 100644 --- a/backend/app/singbox_manager.py +++ b/backend/app/singbox_manager.py @@ -1,5 +1,14 @@ # -*- coding: utf-8 -*- -"""sing-box local mixed inbound → remote SOCKS5 upstream.""" +"""DouyinWEB-only sing-box: local mixed → residential SOCKS5. + +HARD ISOLATION from v2ray-agent: + - Never systemctl start/stop/restart the host unit ``sing-box.service`` + - Never read/write ``/etc/v2ray-agent/`` + - Only manage ``douyinweb-singbox`` (systemd) or a subprocess with + ``${APP}/config/sing-box.json`` mixed on :17891 + - Listen ``0.0.0.0:17891`` so Neko ``host.docker.internal`` can reach it; + callers still use ``127.0.0.1`` URLs. Block eth0:17891 at the host firewall. +""" from __future__ import annotations import json @@ -21,18 +30,99 @@ from .global_socks import ( is_global_socks_enabled, ) +# Bind all interfaces so Docker Neko (host.docker.internal) can use residential. +# Host-side clients keep using LOCAL_MIXED_HOST (127.0.0.1) in URLs. +_MIXED_LISTEN_HOST = "0.0.0.0" + +# App-owned unit only — NEVER bare "sing-box" (v2ray-agent). +UNIT_NAME = "douyinweb-singbox" +FORBIDDEN_UNITS = frozenset({"sing-box", "sing-box.service", "xray", "xray.service", "v2ray", "v2ray.service"}) +V2RAY_AGENT_DIR = Path("/etc/v2ray-agent") +# Dedicated binary — NEVER use /etc/v2ray-agent/sing-box/sing-box +APP_BIN_DIR = BACKEND.parent / "bin" +APP_SINGBOX = APP_BIN_DIR / "sing-box" +# Pin a known-good release; install only into APP_BIN_DIR. +SINGBOX_VERSION = "1.11.15" +SINGBOX_ASSET = f"sing-box-{SINGBOX_VERSION}-linux-amd64.tar.gz" +SINGBOX_URL = f"https://github.com/SagerNet/sing-box/releases/download/v{SINGBOX_VERSION}/{SINGBOX_ASSET}" + _PID_FILE = CONFIG_DIR / "sing-box.pid" _LOG_PATH = CONFIG_DIR / "sing-box.log" +def _assert_safe_unit(name: str) -> str: + raw = str(name or "").strip() + base = raw.removesuffix(".service") + if raw in FORBIDDEN_UNITS or base in FORBIDDEN_UNITS or base == "sing-box": + raise RuntimeError(f"refusing to touch host unit {raw!r} (v2ray-agent / edge)") + if base != UNIT_NAME and raw != UNIT_NAME: + raise RuntimeError(f"only {UNIT_NAME} is allowed, got {raw!r}") + return UNIT_NAME + + +def _assert_safe_binary(path: str) -> str: + """Refuse any binary under v2ray-agent tree.""" + p = Path(path).resolve() + try: + p.relative_to(V2RAY_AGENT_DIR.resolve()) + raise RuntimeError(f"refusing v2ray-agent binary: {p}") + except ValueError: + pass + if "v2ray-agent" in str(p): + raise RuntimeError(f"refusing v2ray-agent binary: {p}") + return str(p) + + def _find_binary() -> str: - for name in ("sing-box", "/usr/bin/sing-box", "/usr/local/bin/sing-box"): - p = shutil.which(name) if not name.startswith("/") else (name if Path(name).is_file() else None) - if p and Path(p).is_file(): - return str(p) + """Only DouyinWEB-owned paths — never PATH /usr/bin or v2ray-agent.""" + candidates = [ + APP_SINGBOX, + Path("/opt/douyinWEB/bin/sing-box"), + ] + for cand in candidates: + if cand.is_file() and os.access(cand, os.X_OK): + try: + return _assert_safe_binary(str(cand)) + except RuntimeError: + continue return "" +def ensure_binary() -> str: + """Install dedicated sing-box into /opt/douyinWEB/bin if missing.""" + found = _find_binary() + if found: + return found + APP_BIN_DIR.mkdir(parents=True, exist_ok=True) + import tempfile + import urllib.request + + tmp_dir = Path(tempfile.mkdtemp(prefix="dy-singbox-")) + try: + tgz = tmp_dir / SINGBOX_ASSET + urllib.request.urlretrieve(SINGBOX_URL, tgz) # noqa: S310 + subprocess.run( + ["tar", "-xzf", str(tgz), "-C", str(tmp_dir)], + check=True, + capture_output=True, + timeout=120, + ) + # tarball contains sing-box--linux-amd64/sing-box + extracted = next(tmp_dir.rglob("sing-box"), None) + if extracted is None or not extracted.is_file() or extracted.name != "sing-box": + # rglob may hit the dir; prefer the file + files = [p for p in tmp_dir.rglob("sing-box") if p.is_file()] + extracted = files[0] if files else None + if not extracted or not extracted.is_file(): + raise RuntimeError("sing-box binary missing from release tarball") + dest = APP_SINGBOX + shutil.copy2(extracted, dest) + os.chmod(dest, 0o755) + return _assert_safe_binary(str(dest)) + finally: + shutil.rmtree(tmp_dir, ignore_errors=True) + + def build_config(profile: dict[str, Any] | None) -> dict[str, Any]: if not profile: raise ValueError("SOCKS 配置无效") @@ -59,7 +149,7 @@ def build_config(profile: dict[str, Any] | None) -> dict[str, Any]: { "type": "mixed", "tag": "mixed-in", - "listen": LOCAL_MIXED_HOST, + "listen": _MIXED_LISTEN_HOST, "listen_port": LOCAL_MIXED_PORT, "sniff": True, } @@ -75,9 +165,92 @@ def build_config(profile: dict[str, Any] | None) -> dict[str, Any]: } +def _force_mixed_listen_all_interfaces(cfg_dict: dict[str, Any]) -> dict[str, Any]: + """Neko uses host.docker.internal → docker bridge IP; 127.0.0.1-only = ERR_PROXY.""" + inbounds = list(cfg_dict.get("inbounds") or []) + fixed: list[dict[str, Any]] = [] + for ib in inbounds: + if not isinstance(ib, dict): + continue + if ib.get("type") == "mixed" or ib.get("tag") == "mixed-in": + row = dict(ib) + row["type"] = "mixed" + row["tag"] = "mixed-in" + row["listen"] = _MIXED_LISTEN_HOST + row["listen_port"] = int(row.get("listen_port") or LOCAL_MIXED_PORT) + row.setdefault("sniff", True) + fixed.append(row) + if not fixed: + fixed = [ + { + "type": "mixed", + "tag": "mixed-in", + "listen": _MIXED_LISTEN_HOST, + "listen_port": LOCAL_MIXED_PORT, + "sniff": True, + } + ] + out = dict(cfg_dict) + out["inbounds"] = fixed[:1] + return out + + +def ensure_mixed_not_public() -> dict[str, Any]: + """Block eth0 abuse of :17891 while keeping docker bridge reachability.""" + comment = "douyinweb-res-no-public" + check = [ + "iptables", + "-C", + "INPUT", + "-i", + "eth0", + "-p", + "tcp", + "--dport", + str(LOCAL_MIXED_PORT), + "-j", + "DROP", + ] + insert = [ + "iptables", + "-I", + "INPUT", + "-i", + "eth0", + "-p", + "tcp", + "--dport", + str(LOCAL_MIXED_PORT), + "-m", + "comment", + "--comment", + comment, + "-j", + "DROP", + ] + try: + exists = subprocess.run(check, capture_output=True, timeout=5).returncode == 0 + if not exists: + r = subprocess.run(insert, capture_output=True, text=True, timeout=5) + if r.returncode != 0: + return {"ok": False, "error": (r.stderr or r.stdout or "")[:200]} + return {"ok": True, "eth0_drop": True, "port": LOCAL_MIXED_PORT} + except Exception as exc: + return {"ok": False, "error": str(exc)[:200]} + + def write_config(cfg_dict: dict[str, Any]) -> Path: + if V2RAY_AGENT_DIR in SINGBOX_CONFIG_PATH.parents or str(SINGBOX_CONFIG_PATH).startswith( + str(V2RAY_AGENT_DIR) + ): + raise RuntimeError("refusing to write config under /etc/v2ray-agent") CONFIG_DIR.mkdir(parents=True, exist_ok=True) + cfg_dict = _force_mixed_listen_all_interfaces(cfg_dict) SINGBOX_CONFIG_PATH.write_text(json.dumps(cfg_dict, ensure_ascii=False, indent=2), encoding="utf-8") + try: + os.chmod(SINGBOX_CONFIG_PATH, 0o600) + except Exception: + pass return SINGBOX_CONFIG_PATH @@ -102,10 +275,9 @@ def is_running() -> bool: pid = _read_pid() if _pid_alive(pid): return True - # systemd fallback try: r = subprocess.run( - ["systemctl", "is-active", "douyinweb-singbox"], + ["systemctl", "is-active", UNIT_NAME], capture_output=True, text=True, timeout=5, @@ -116,25 +288,40 @@ def is_running() -> bool: def stop() -> dict[str, Any]: + """Stop DouyinWEB residential forwarder only — never host sing-box.service.""" pid = _read_pid() if _pid_alive(pid): try: os.kill(pid, signal.SIGTERM) time.sleep(0.8) + if _pid_alive(pid): + os.kill(pid, signal.SIGKILL) except Exception: pass try: - subprocess.run(["systemctl", "stop", "douyinweb-singbox"], capture_output=True, timeout=15) + _assert_safe_unit(UNIT_NAME) + subprocess.run(["systemctl", "stop", UNIT_NAME], capture_output=True, timeout=15) except Exception: pass _PID_FILE.unlink(missing_ok=True) - return {"ok": True, "running": False} + return {"ok": True, "running": False, "unit": UNIT_NAME} def start_with_config(cfg_dict: dict[str, Any]) -> dict[str, Any]: - binary = _find_binary() + try: + binary = ensure_binary() + except Exception as exc: + return { + "ok": False, + "running": False, + "error": f"无法安装 DouyinWEB 专用 sing-box: {exc}", + } if not binary: - return {"ok": False, "running": False, "error": "未安装 sing-box(apt install sing-box 或官方脚本)"} + return { + "ok": False, + "running": False, + "error": "未找到 DouyinWEB 专用 sing-box(应位于 /opt/douyinWEB/bin/sing-box,不使用 v2ray-agent)", + } write_config(cfg_dict) stop() CONFIG_DIR.mkdir(parents=True, exist_ok=True) @@ -159,8 +346,16 @@ def start_with_config(cfg_dict: dict[str, Any]) -> dict[str, Any]: tail = _LOG_PATH.read_text(encoding="utf-8", errors="replace")[-800:] except Exception: pass - return {"ok": False, "running": False, "error": f"sing-box 启动失败: {tail}"} - return {"ok": True, "running": True, "pid": proc.pid, "binary": binary} + return {"ok": False, "running": False, "error": f"douyinweb-singbox 启动失败: {tail}"} + return { + "ok": True, + "running": True, + "pid": proc.pid, + "binary": binary, + "config": str(SINGBOX_CONFIG_PATH), + "mixed": f"http://{LOCAL_MIXED_HOST}:{LOCAL_MIXED_PORT}", + "unit": UNIT_NAME, + } def apply_from_settings(cfg: dict[str, Any] | None = None) -> dict[str, Any]: @@ -169,21 +364,32 @@ def apply_from_settings(cfg: dict[str, Any] | None = None) -> dict[str, Any]: settings = _settings_dict(cfg) if not is_global_socks_enabled(settings): stop() - return {"ok": True, "running": False, "enabled": False} + return {"ok": True, "running": False, "enabled": False, "unit": UNIT_NAME} prof = active_profile(settings) if not prof: stop() - return {"ok": False, "running": False, "enabled": True, "error": "无有效 SOCKS 配置"} + return {"ok": False, "running": False, "enabled": True, "error": "无有效 SOCKS 配置", "unit": UNIT_NAME} try: cfg_dict = build_config(prof) except ValueError as exc: stop() - return {"ok": False, "running": False, "enabled": True, "error": str(exc)} - # Prefer systemd unit when present. + return {"ok": False, "running": False, "enabled": True, "error": str(exc), "unit": UNIT_NAME} write_config(cfg_dict) + fw = ensure_mixed_not_public() try: + ensure_binary() + except Exception as exc: + stop() + return {"ok": False, "running": False, "enabled": True, "error": str(exc), "unit": UNIT_NAME} + # Rewrite unit ExecStart to app-owned binary (never /usr/bin or v2ray-agent). + try: + _install_unit_file() + except Exception: + pass + try: + _assert_safe_unit(UNIT_NAME) r = subprocess.run( - ["systemctl", "restart", "douyinweb-singbox"], + ["systemctl", "restart", UNIT_NAME], capture_output=True, text=True, timeout=20, @@ -191,10 +397,72 @@ def apply_from_settings(cfg: dict[str, Any] | None = None) -> dict[str, Any]: if r.returncode == 0: time.sleep(0.5) if is_running(): - return {"ok": True, "running": True, "enabled": True, "via": "systemd"} + return { + "ok": True, + "running": True, + "enabled": True, + "via": "systemd", + "unit": UNIT_NAME, + "mixed": f"http://{LOCAL_MIXED_HOST}:{LOCAL_MIXED_PORT}", + "listen": _MIXED_LISTEN_HOST, + "firewall": fw, + } except Exception: pass - return {**start_with_config(cfg_dict), "enabled": True, "via": "subprocess"} + out = {**start_with_config(cfg_dict), "enabled": True, "via": "subprocess"} + out["firewall"] = fw + out["listen"] = _MIXED_LISTEN_HOST + return out + + +def host_v2ray_agent_status() -> dict[str, Any]: + """Read-only peek at v2ray-agent edge (never mutate).""" + active = "" + try: + r = subprocess.run( + ["systemctl", "is-active", "sing-box"], + capture_output=True, + text=True, + timeout=5, + ) + active = (r.stdout or "").strip() + except Exception as exc: + active = f"error:{exc}" + return { + "unit": "sing-box.service", + "active": active, + "config_dir_exists": V2RAY_AGENT_DIR.is_dir(), + "note": "read-only; DouyinWEB never restarts this unit", + } + + +def _install_unit_file() -> None: + binary = ensure_binary() + unit = f"""[Unit] +Description=DouyinWEB residential SOCKS forwarder (isolated from v2ray-agent) +Documentation=file:/opt/douyinWEB/README.md +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +WorkingDirectory=/opt/douyinWEB/backend +ExecStart={binary} run -c /opt/douyinWEB/config/sing-box.json +Restart=on-failure +RestartSec=3 +Nice=5 +NoNewPrivileges=true +ProtectSystem=full +ProtectHome=true +PrivateTmp=true +ReadOnlyPaths=/etc/v2ray-agent + +[Install] +WantedBy=multi-user.target +""" + path = Path(f"/etc/systemd/system/{UNIT_NAME}.service") + path.write_text(unit, encoding="utf-8") + subprocess.run(["systemctl", "daemon-reload"], capture_output=True, timeout=15) def status() -> dict[str, Any]: @@ -206,5 +474,12 @@ def status() -> dict[str, Any]: "binary": binary, "config": str(SINGBOX_CONFIG_PATH), "mixed": f"http://{LOCAL_MIXED_HOST}:{LOCAL_MIXED_PORT}", + "unit": UNIT_NAME, + "v2ray_agent": host_v2ray_agent_status(), + "isolation": { + "app_bin": str(APP_SINGBOX), + "never_uses": str(V2RAY_AGENT_DIR), + "never_restarts": "sing-box.service", + }, "error": "", } diff --git a/backend/app/tiktok_db.py b/backend/app/tiktok_db.py index ae3f792..0bfc2dd 100644 --- a/backend/app/tiktok_db.py +++ b/backend/app/tiktok_db.py @@ -1,886 +1,936 @@ -# -*- coding: utf-8 -*- -"""TikTok pipeline DB — isolated from shorts_* tables.""" -from __future__ import annotations - -import sqlite3 -import time -import uuid -from typing import Any, Optional - -from .db import TIKTOK_DAILY_FORCE, _connect, _lock, _normalize_daily_quota, _row_to_dict -from .timeutil import push_date_from_ts - - -def _force_daily(v: int) -> int: - return _normalize_daily_quota(v, default=TIKTOK_DAILY_FORCE, lo=1, hi=30) - - -# 占用「今日上传配额」的状态:待录/录制中不算,避免取样把账号配额占满后无法再分配 -_TIKTOK_QUOTA_STATUSES = ( - "scheduled", - "uploading", - "uploaded", - "done", -) - -def list_tiktok_channels(*, enabled: Optional[bool] = None) -> list[dict[str, Any]]: - with _lock: - conn = _connect() - try: - if enabled is None: - rows = conn.execute( - "SELECT * FROM tiktok_channels ORDER BY created_at ASC, name COLLATE NOCASE ASC" - ).fetchall() - else: - rows = conn.execute( - "SELECT * FROM tiktok_channels WHERE enabled = ? ORDER BY created_at ASC, name COLLATE NOCASE ASC", - (1 if enabled else 0,), - ).fetchall() - return [_row_to_dict(r) for r in rows] # type: ignore - finally: - conn.close() - - -def get_tiktok_channel(channel_pk: str) -> dict[str, Any] | None: - with _lock: - conn = _connect() - try: - return _row_to_dict(conn.execute("SELECT * FROM tiktok_channels WHERE id = ?", (channel_pk,)).fetchone()) - finally: - conn.close() - - -def create_tiktok_channel( - *, - name: str, - enabled: bool = True, - daily_min: int | None = None, - daily_max: int | None = None, - title_template: str = "", - description_template: str = "", - privacy_level: str = "SELF_ONLY", - note: str = "", - socks_enabled: bool = False, - socks_profile_id: str = "", -) -> dict[str, Any]: - from . import db as _db - - now = time.time() - cid = str(uuid.uuid4()) - defaults = _db.tiktok_quota_defaults() - daily_min = _force_daily(daily_min if daily_min is not None else defaults["daily_min"]) - daily_max = _force_daily(daily_max if daily_max is not None else defaults["daily_max"]) - if daily_max < daily_min: - daily_max = daily_min - with _lock: - conn = _connect() - try: - conn.execute( - """ - INSERT INTO tiktok_channels( - id, name, tiktok_open_id, tiktok_username, client_key, client_secret, - refresh_token, access_token, token_expires_at, enabled, daily_min, daily_max, - title_template, description_template, privacy_level, last_assigned_at, - oauth_ok, oauth_checked_at, oauth_error, note, cookie_saved_at, - socks_enabled, socks_profile_id, created_at, updated_at - ) VALUES (?, ?, '', '', '', '', '', '', 0, ?, ?, ?, ?, ?, ?, 0, -1, 0, '', ?, 0, ?, ?, ?, ?) - """, - ( - cid, - (name or "").strip() or "TikTok 账号", - 1 if enabled else 0, - daily_min, - daily_max, - title_template, - description_template, - (privacy_level or "SELF_ONLY").strip(), - (note or "").strip(), - 1 if socks_enabled else 0, - str(socks_profile_id or "").strip(), - now, - now, - ), - ) - conn.commit() - return _row_to_dict(conn.execute("SELECT * FROM tiktok_channels WHERE id = ?", (cid,)).fetchone()) # type: ignore - finally: - conn.close() - - -def update_tiktok_channel(channel_pk: str, **fields: Any) -> dict[str, Any] | None: - allowed = { - "name", "tiktok_open_id", "tiktok_username", "client_key", "client_secret", - "refresh_token", "access_token", "token_expires_at", "enabled", "daily_min", "daily_max", - "title_template", "description_template", "privacy_level", "last_assigned_at", - "oauth_ok", "oauth_checked_at", "oauth_error", "note", "cookie_saved_at", - "socks_enabled", "socks_profile_id", - "platform_limit_at", "platform_limit_msg", "platform_limit_probe_at", - "tiktok_uid", "nickname", "avatar_url", - "follower_count", "following_count", "video_count", "heart_count", - "profile_fetched_at", "profile_error", - } - with _lock: - conn = _connect() - try: - row = conn.execute("SELECT * FROM tiktok_channels WHERE id = ?", (channel_pk,)).fetchone() - if not row: - return None - sets: list[str] = [] - params: list[Any] = [] - for k, v in fields.items(): - if k not in allowed or v is None: - continue - if k in {"daily_min", "daily_max"}: - v = _force_daily(int(v)) - if k in {"enabled", "socks_enabled"}: - v = 1 if v else 0 - if k == "oauth_ok" and v is not None: - v = int(v) - if k == "socks_profile_id": - v = str(v or "").strip() - if k in {"follower_count", "following_count", "video_count", "heart_count"}: - v = int(v or 0) - if k in {"tiktok_uid", "nickname", "avatar_url", "profile_error", "tiktok_username"}: - v = str(v or "").strip() - sets.append(f"{k} = ?") - params.append(v) - if not sets: - return _row_to_dict(row) - sets.append("updated_at = ?") - params.append(time.time()) - params.append(channel_pk) - conn.execute(f"UPDATE tiktok_channels SET {', '.join(sets)} WHERE id = ?", params) - conn.commit() - return _row_to_dict(conn.execute("SELECT * FROM tiktok_channels WHERE id = ?", (channel_pk,)).fetchone()) - finally: - conn.close() - - -def delete_tiktok_channel(channel_pk: str) -> bool: - with _lock: - conn = _connect() - try: - cur = conn.execute("DELETE FROM tiktok_channels WHERE id = ?", (channel_pk,)) - conn.commit() - return cur.rowcount > 0 - finally: - conn.close() - - -def tiktok_channel_upload_count(channel_pk: str, push_date: str) -> int: - """Jobs that consume today's upload quota (排程/上传中/已上传).""" - placeholders = ",".join("?" for _ in _TIKTOK_QUOTA_STATUSES) - with _lock: - conn = _connect() - try: - row = conn.execute( - f""" - SELECT COUNT(*) AS c FROM tiktok_jobs - WHERE channel_pk = ? AND push_date = ? - AND status IN ({placeholders}) - """, - (channel_pk, push_date, *_TIKTOK_QUOTA_STATUSES), - ).fetchone() - return int(row["c"]) if row else 0 - finally: - conn.close() - - -def pick_tiktok_channel( - push_date: str, - *, - require_quota: bool = True, -) -> dict[str, Any] | None: - """Pick enabled Cookie-ready channel. If require_quota, skip channels at daily upload max.""" - from . import tiktok_session - - channels = list_tiktok_channels(enabled=True) - if not channels: - return None - scored: list[tuple[int, int, float, dict[str, Any]]] = [] - for ch in channels: - if not tiktok_session.channel_has_session(ch): - continue - used = tiktok_channel_upload_count(str(ch["id"]), push_date) - daily_max = _force_daily(int(ch.get("daily_max") or TIKTOK_DAILY_FORCE)) - if require_quota and used >= daily_max: - continue - daily_min = _force_daily(int(ch.get("daily_min") or TIKTOK_DAILY_FORCE)) - under = 0 if used < daily_min else 1 - scored.append((under, used, float(ch.get("last_assigned_at") or 0), ch)) - if not scored: - return None - scored.sort(key=lambda x: (x[0], x[1], x[2])) - return scored[0][3] - - -def ensure_tiktok_job_channel(job: dict[str, Any] | None, *, require_quota: bool = False) -> dict[str, Any] | None: - """Attach a TikTok channel to job if missing. Returns channel row or None.""" - j = job or {} - jid = str(j.get("id") or "") - day = str(j.get("push_date") or "") or push_date_from_ts(time.time()) - pk = str(j.get("channel_pk") or "").strip() - if pk: - ch = get_tiktok_channel(pk) - if ch and ch.get("enabled"): - return ch - ch = pick_tiktok_channel(day, require_quota=require_quota) - if not ch and require_quota: - # fallback soft-assign so UI/ops still have an owner account - ch = pick_tiktok_channel(day, require_quota=False) - if ch and jid: - update_tiktok_job(jid, channel_pk=str(ch["id"])) - return ch - - -def backfill_tiktok_job_channels(*, push_date: str = "", limit: int = 50) -> int: - """Assign channels to jobs that were enqueued without channel_pk.""" - day = push_date or push_date_from_ts(time.time()) - data = list_tiktok_jobs(push_date=day, limit=500, offset=0) - n = 0 - for j in data.get("jobs") or []: - if n >= limit: - break - if str(j.get("channel_pk") or "").strip(): - continue - if str(j.get("status") or "") in {"failed", "skipped", "uploaded", "done"}: - continue - # Prefer hard quota for jobs about to upload; soft for pending/recording pool - need_hard = str(j.get("status") or "") in {"scheduled", "uploading", "recorded"} - ch = ensure_tiktok_job_channel(j, require_quota=need_hard) - if ch: - n += 1 - return n - - -def tiktok_total_quota_gap(push_date: str = "") -> int: - day = push_date or push_date_from_ts(time.time()) - gap = 0 - for ch in list_tiktok_channels(enabled=True): - used = tiktok_channel_upload_count(str(ch["id"]), day) - daily_max = _force_daily(int(ch.get("daily_max") or TIKTOK_DAILY_FORCE)) - gap += max(0, daily_max - used) - return gap - - -# ---------- jobs ---------- - -def has_tiktok_job_for_room_day(room_id: str, push_date: str) -> bool: - if not room_id: - return False - with _lock: - conn = _connect() - try: - row = conn.execute( - """ - SELECT 1 FROM tiktok_jobs - WHERE room_id = ? AND push_date = ? - AND status NOT IN ('failed', 'skipped') - LIMIT 1 - """, - (room_id, push_date), - ).fetchone() - return bool(row) - finally: - conn.close() - - -def create_tiktok_job( - *, - session_id: str, - room_pk: str = "", - room_id: str = "", - source_url: str = "", - anchor_name: str = "", - stream_url: str = "", - channel_pk: str = "", - push_date: str = "", -) -> dict[str, Any] | None: - now = time.time() - jid = str(uuid.uuid4()) - day = push_date or push_date_from_ts(now) - rid = str(room_id or "").strip() - with _lock: - conn = _connect() - try: - if rid: - existing = conn.execute( - """ - SELECT 1 FROM tiktok_jobs - WHERE room_id = ? AND push_date = ? - AND status NOT IN ('failed', 'skipped') - LIMIT 1 - """, - (rid, day), - ).fetchone() - if existing: - return None - conn.execute( - """ - INSERT INTO tiktok_jobs( - id, session_id, room_pk, room_id, source_url, anchor_name, stream_url, - channel_pk, status, clip_path, clip_seconds, tiktok_publish_id, tiktok_video_id, - error, push_date, upload_at, attempts, created_at, updated_at, started_at, finished_at - ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, 'pending', '', 0, '', '', '', ?, 0, 0, ?, ?, 0, 0) - """, - (jid, session_id, room_pk, rid, source_url, anchor_name, stream_url, channel_pk, day, now, now), - ) - if channel_pk: - conn.execute( - "UPDATE tiktok_channels SET last_assigned_at = ?, updated_at = ? WHERE id = ?", - (now, now, channel_pk), - ) - conn.commit() - return _row_to_dict(conn.execute("SELECT * FROM tiktok_jobs WHERE id = ?", (jid,)).fetchone()) # type: ignore - finally: - conn.close() - - -def update_tiktok_job(job_id: str, **fields: Any) -> dict[str, Any] | None: - allowed = { - "status", "clip_path", "clip_seconds", "tiktok_publish_id", "tiktok_video_id", - "error", "channel_pk", "stream_url", "attempts", "started_at", "finished_at", "upload_at", - } - with _lock: - conn = _connect() - try: - row = conn.execute("SELECT * FROM tiktok_jobs WHERE id = ?", (job_id,)).fetchone() - if not row: - return None - sets: list[str] = [] - params: list[Any] = [] - for k, v in fields.items(): - if k not in allowed or v is None: - continue - sets.append(f"{k} = ?") - params.append(v) - if not sets: - return _row_to_dict(row) - sets.append("updated_at = ?") - params.append(time.time()) - params.append(job_id) - conn.execute(f"UPDATE tiktok_jobs SET {', '.join(sets)} WHERE id = ?", params) - conn.commit() - return _row_to_dict(conn.execute("SELECT * FROM tiktok_jobs WHERE id = ?", (job_id,)).fetchone()) - finally: - conn.close() - - -def get_tiktok_job(job_id: str) -> dict[str, Any] | None: - with _lock: - conn = _connect() - try: - return _row_to_dict(conn.execute("SELECT * FROM tiktok_jobs WHERE id = ?", (job_id,)).fetchone()) - finally: - conn.close() - - -def list_tiktok_jobs( - *, - status: str = "", - push_date: str = "", - channel_pk: str = "", - session_id: str = "", - room_id: str = "", - limit: int = 100, - offset: int = 0, -) -> dict[str, Any]: - with _lock: - conn = _connect() - try: - clauses: list[str] = [] - params: list[Any] = [] - if status.strip(): - clauses.append("status = ?") - params.append(status.strip()) - if push_date.strip(): - clauses.append("push_date = ?") - params.append(push_date.strip()) - if channel_pk.strip(): - clauses.append("channel_pk = ?") - params.append(channel_pk.strip()) - if session_id.strip(): - clauses.append("session_id = ?") - params.append(session_id.strip()) - if room_id.strip(): - clauses.append("room_id = ?") - params.append(room_id.strip()) - where = ("WHERE " + " AND ".join(clauses)) if clauses else "" - total = conn.execute(f"SELECT COUNT(*) AS c FROM tiktok_jobs {where}", params).fetchone()["c"] - rows = conn.execute( - f"SELECT * FROM tiktok_jobs {where} ORDER BY created_at DESC LIMIT ? OFFSET ?", - [*params, max(1, min(limit, 500)), max(0, offset)], - ).fetchall() - return {"jobs": [_row_to_dict(r) for r in rows], "total": int(total)} - finally: - conn.close() - - -def tiktok_stats(push_date: str = "") -> dict[str, Any]: - day = push_date or push_date_from_ts(time.time()) - with _lock: - conn = _connect() - try: - rows = conn.execute( - "SELECT status, COUNT(*) AS c FROM tiktok_jobs WHERE push_date = ? GROUP BY status", - (day,), - ).fetchall() - by_status = {str(r["status"]): int(r["c"]) for r in rows} - return {"push_date": day, "by_status": by_status, "total": sum(by_status.values())} - finally: - conn.close() - - -def claim_pending_tiktok_record() -> dict[str, Any] | None: - now = time.time() - with _lock: - conn = _connect() - try: - row = conn.execute( - """ - SELECT j.* FROM tiktok_jobs j - INNER JOIN tiktok_channels c ON c.id = j.channel_pk - WHERE j.status = 'pending' - AND c.enabled = 1 - ORDER BY j.created_at ASC - LIMIT 1 - """ - ).fetchone() - if not row: - return None - jid = str(row["id"]) - conn.execute( - """ - UPDATE tiktok_jobs SET status = 'recording', started_at = ?, updated_at = ?, attempts = attempts + 1 - WHERE id = ? AND status = 'pending' - """, - (now, now, jid), - ) - if conn.total_changes == 0: - conn.rollback() - return None - conn.commit() - return _row_to_dict(conn.execute("SELECT * FROM tiktok_jobs WHERE id = ?", (jid,)).fetchone()) - finally: - conn.close() - - -def claim_tiktok_job_record(job_id: str) -> dict[str, Any] | None: - now = time.time() - with _lock: - conn = _connect() - try: - cur = conn.execute( - """ - UPDATE tiktok_jobs SET status = 'recording', started_at = ?, updated_at = ?, attempts = attempts + 1 - WHERE id = ? AND status = 'pending' - """, - (now, now, job_id), - ) - conn.commit() - if cur.rowcount == 0: - return None - return _row_to_dict(conn.execute("SELECT * FROM tiktok_jobs WHERE id = ?", (job_id,)).fetchone()) - finally: - conn.close() - - -def mark_tiktok_platform_limit(channel_pk: str, message: str) -> dict[str, Any] | None: - msg = (message or "TikTok 官方限流").strip()[:400] - return update_tiktok_channel( - channel_pk, - platform_limit_at=time.time(), - platform_limit_msg=msg, - ) - - -def clear_tiktok_platform_limit(channel_pk: str) -> dict[str, Any] | None: - return update_tiktok_channel( - channel_pk, - platform_limit_at=0, - platform_limit_msg="", - platform_limit_probe_at=0, - ) - - -def channel_has_platform_limit(ch: dict[str, Any] | None) -> bool: - if not ch: - return False - return float(ch.get("platform_limit_at") or 0) > 0 - - -def list_tiktok_channels_needing_limit_probe(*, min_gap_sec: float = 3600.0) -> list[dict[str, Any]]: - """Channels currently platform-limited and due for an hourly upload probe.""" - now = time.time() - gap = max(600.0, float(min_gap_sec or 3600.0)) - out: list[dict[str, Any]] = [] - for ch in list_tiktok_channels(enabled=True): - if not channel_has_platform_limit(ch): - continue - last = float(ch.get("platform_limit_probe_at") or 0) - # First probe after mark: wait at least min_gap from limit_at - if last <= 0: - last = float(ch.get("platform_limit_at") or 0) - if (now - last) < gap: - continue - out.append(ch) - return out - - -def claim_tiktok_limit_probe_job(channel_pk: str) -> dict[str, Any] | None: - """Claim one clip job for hourly platform-limit probe upload.""" - now = time.time() - pk = str(channel_pk or "").strip() - if not pk: - return None - with _lock: - conn = _connect() - try: - row = conn.execute( - """ - SELECT * FROM tiktok_jobs - WHERE channel_pk = ? - AND clip_path != '' - AND IFNULL(tiktok_video_id,'') = '' - AND IFNULL(tiktok_publish_id,'') = '' - AND status IN ('scheduled', 'recorded', 'failed') - ORDER BY - CASE status WHEN 'scheduled' THEN 0 WHEN 'recorded' THEN 1 ELSE 2 END, - upload_at ASC, created_at ASC - LIMIT 1 - """, - (pk,), - ).fetchone() - if not row: - return None - jid = str(row["id"]) - conn.execute( - """ - UPDATE tiktok_jobs - SET status = 'uploading', upload_at = ?, attempts = attempts + 1, - error = 'platform_limit_probe', finished_at = 0, updated_at = ? - WHERE id = ? AND IFNULL(tiktok_video_id,'') = '' AND IFNULL(tiktok_publish_id,'') = '' - AND status IN ('scheduled', 'recorded', 'failed') - """, - (now, now, jid), - ) - if conn.total_changes == 0: - conn.rollback() - return None - conn.execute( - "UPDATE tiktok_channels SET platform_limit_probe_at = ?, updated_at = ? WHERE id = ?", - (now, now, pk), - ) - conn.commit() - return _row_to_dict(conn.execute("SELECT * FROM tiktok_jobs WHERE id = ?", (jid,)).fetchone()) - finally: - conn.close() - - -def reschedule_soft_quota_held_jobs(*, limit: int = 50) -> int: - """Clear legacy soft-quota hold messages and put clips back on the upload schedule.""" - now = time.time() - n = 0 - with _lock: - conn = _connect() - try: - rows = conn.execute( - """ - SELECT id, channel_pk FROM tiktok_jobs - WHERE status = 'recorded' - AND clip_path != '' - AND IFNULL(tiktok_video_id,'') = '' - AND (error LIKE '%配额已满%') - ORDER BY created_at ASC - LIMIT ? - """, - (max(1, int(limit)),), - ).fetchall() - for row in rows: - jid = str(row["id"]) - conn.execute( - """ - UPDATE tiktok_jobs - SET status = 'scheduled', upload_at = ?, error = '', updated_at = ? - WHERE id = ? AND status = 'recorded' - """, - (now + 30 + n * 120, now, jid), - ) - if conn.total_changes: - n += 1 - # Also clear soft-quota message on already-scheduled rows - conn.execute( - """ - UPDATE tiktok_jobs - SET error = '', updated_at = ? - WHERE error LIKE '%配额已满%' - AND status IN ('scheduled', 'recorded') - """, - (now,), - ) - conn.commit() - finally: - conn.close() - return n - - -def delete_tiktok_jobs_for_channel(channel_pk: str) -> dict[str, int]: - """Delete all TikTok jobs for an account (keep account row).""" - pk = str(channel_pk or "").strip() - if not pk: - return {"jobs": 0, "clips": 0} - clip_paths: list[str] = [] - with _lock: - conn = _connect() - try: - rows = conn.execute( - "SELECT clip_path FROM tiktok_jobs WHERE channel_pk = ?", - (pk,), - ).fetchall() - clip_paths = [str(r["clip_path"] or "") for r in rows if r["clip_path"]] - cur = conn.execute("DELETE FROM tiktok_jobs WHERE channel_pk = ?", (pk,)) - jobs = int(cur.rowcount or 0) - conn.commit() - finally: - conn.close() - clips = 0 - from pathlib import Path - - for raw in clip_paths: - try: - p = Path(str(raw).strip()) - if p.is_file(): - p.unlink() - clips += 1 - except Exception: - pass - return {"jobs": jobs, "clips": clips} - - -def claim_due_tiktok_upload() -> dict[str, Any] | None: - now = time.time() - with _lock: - conn = _connect() - try: - # Skip disabled accounts and accounts under TikTok platform rate-limit - row = conn.execute( - """ - SELECT j.* FROM tiktok_jobs j - INNER JOIN tiktok_channels c ON c.id = j.channel_pk - WHERE j.status = 'scheduled' - AND c.enabled = 1 - AND j.clip_path != '' - AND IFNULL(j.tiktok_video_id,'') = '' - AND IFNULL(j.tiktok_publish_id,'') = '' - AND j.upload_at > 0 - AND j.upload_at <= ? - AND IFNULL(c.platform_limit_at, 0) <= 0 - ORDER BY j.upload_at ASC, j.created_at ASC - LIMIT 1 - """, - (now,), - ).fetchone() - if not row: - return None - jid = str(row["id"]) - conn.execute( - """ - UPDATE tiktok_jobs - SET status = 'uploading', updated_at = ?, attempts = attempts + 1 - WHERE id = ? AND status = 'scheduled' - AND IFNULL(tiktok_video_id,'') = '' - AND IFNULL(tiktok_publish_id,'') = '' - """, - (now, jid), - ) - if conn.total_changes == 0: - conn.rollback() - return None - conn.commit() - return _row_to_dict(conn.execute("SELECT * FROM tiktok_jobs WHERE id = ?", (jid,)).fetchone()) - finally: - conn.close() - - -def claim_tiktok_job_manual_upload(job_id: str) -> dict[str, Any] | None: - now = time.time() - with _lock: - conn = _connect() - try: - row = conn.execute("SELECT * FROM tiktok_jobs WHERE id = ?", (job_id,)).fetchone() - if not row: - return None - st = str(row["status"] or "") - if st not in {"scheduled", "recorded", "uploading", "failed"}: - return None - if not str(row["clip_path"] or "").strip(): - return None - if str(row["tiktok_video_id"] or "").strip() or str(row["tiktok_publish_id"] or "").strip(): - return None - stale_before = now - 180 - if st == "uploading" and float(row["updated_at"] or 0) >= stale_before: - return None - conn.execute( - """ - UPDATE tiktok_jobs - SET status = 'uploading', upload_at = ?, attempts = attempts + 1, - error = '', finished_at = 0, updated_at = ? - WHERE id = ? AND IFNULL(tiktok_video_id,'') = '' AND IFNULL(tiktok_publish_id,'') = '' - AND ( - status IN ('scheduled', 'recorded', 'failed') - OR (status = 'uploading' AND updated_at < ?) - ) - """, - (now, now, job_id, stale_before), - ) - if conn.total_changes == 0: - conn.rollback() - return None - conn.commit() - return _row_to_dict(conn.execute("SELECT * FROM tiktok_jobs WHERE id = ?", (job_id,)).fetchone()) - finally: - conn.close() - - -def touch_tiktok_upload_lease(job_id: str) -> bool: - now = time.time() - with _lock: - conn = _connect() - try: - cur = conn.execute( - """ - UPDATE tiktok_jobs SET updated_at = ? - WHERE id = ? AND status = 'uploading' - AND IFNULL(tiktok_video_id,'') = '' - AND IFNULL(tiktok_publish_id,'') = '' - """, - (now, job_id), - ) - conn.commit() - return cur.rowcount > 0 - finally: - conn.close() - - -def finalize_tiktok_upload( - job_id: str, - *, - tiktok_publish_id: str = "", - tiktok_video_id: str = "", -) -> bool: - now = time.time() - pub = str(tiktok_publish_id or "").strip() - vid = str(tiktok_video_id or "").strip() or pub - if not pub: - pub = vid or f"cookie-{job_id[:12]}" - if not vid: - vid = pub - with _lock: - conn = _connect() - try: - cur = conn.execute( - """ - UPDATE tiktok_jobs - SET status = 'uploaded', tiktok_publish_id = ?, tiktok_video_id = ?, - error = '', finished_at = ?, updated_at = ?, clip_path = '' - WHERE id = ? AND IFNULL(tiktok_video_id,'') = '' - AND status IN ('uploading', 'scheduled', 'failed', 'recorded') - """, - (pub, vid, now, now, job_id), - ) - conn.commit() - return cur.rowcount > 0 - finally: - conn.close() - - -def reclaim_stale_tiktok_recordings(*, max_age_sec: float = 240) -> int: - """Fail or requeue recordings stuck longer than expected (1min clip + buffer).""" - now = time.time() - cutoff = now - max(120.0, float(max_age_sec)) - with _lock: - conn = _connect() - try: - rows = conn.execute( - """ - SELECT id, attempts FROM tiktok_jobs - WHERE status = 'recording' AND started_at > 0 AND started_at < ? - """, - (cutoff,), - ).fetchall() - n = 0 - for row in rows: - attempts = int(row["attempts"] or 0) - if attempts <= 1: - conn.execute( - """ - UPDATE tiktok_jobs - SET status = 'pending', error = '录制超时,自动重试', updated_at = ?, started_at = 0 - WHERE id = ? AND status = 'recording' - """, - (now, row["id"]), - ) - else: - conn.execute( - """ - UPDATE tiktok_jobs - SET status = 'failed', error = '录制卡死超时', finished_at = ?, updated_at = ? - WHERE id = ? AND status = 'recording' - """, - (now, now, row["id"]), - ) - n += conn.total_changes - if n: - conn.commit() - return n - finally: - conn.close() - - -def reclaim_stale_tiktok_uploads(*, max_age_sec: float = 900) -> int: - """Only use updated_at (upload lease), never recording started_at.""" - cutoff = time.time() - max(600.0, float(max_age_sec)) - now = time.time() - with _lock: - conn = _connect() - try: - cur = conn.execute( - """ - UPDATE tiktok_jobs - SET status = 'failed', - error = '上传超时已中止,未再次发送(防止重复发布)', - finished_at = ?, - updated_at = ? - WHERE status = 'uploading' - AND IFNULL(tiktok_video_id,'') = '' - AND IFNULL(tiktok_publish_id,'') = '' - AND updated_at < ? - """, - (now, now, cutoff), - ) - conn.commit() - return int(cur.rowcount) - finally: - conn.close() - - -def list_auto_retry_tiktok_failed(*, limit: int = 20) -> list[dict[str, Any]]: - with _lock: - conn = _connect() - try: - rows = conn.execute( - """ - SELECT * FROM tiktok_jobs - WHERE status = 'failed' - AND clip_path != '' - AND IFNULL(tiktok_video_id,'') = '' - AND IFNULL(tiktok_publish_id,'') = '' - AND attempts < 5 - ORDER BY updated_at ASC - LIMIT ? - """, - (max(1, limit),), - ).fetchall() - return [_row_to_dict(r) for r in rows] # type: ignore - finally: - conn.close() +# -*- coding: utf-8 -*- +"""TikTok pipeline DB — isolated from shorts_* tables.""" +from __future__ import annotations + +import sqlite3 +import time +import uuid +from typing import Any, Optional + +from .db import TIKTOK_DAILY_FORCE, _connect, _lock, _normalize_daily_quota, _row_to_dict +from .timeutil import push_date_from_ts + + +def _force_daily(v: int) -> int: + return _normalize_daily_quota(v, default=TIKTOK_DAILY_FORCE, lo=1, hi=30) + + +# 占用「今日上传配额」的状态:待录/录制中不算,避免取样把账号配额占满后无法再分配 +_TIKTOK_QUOTA_STATUSES = ( + "scheduled", + "uploading", + "uploaded", + "done", +) + +def list_tiktok_channels(*, enabled: Optional[bool] = None) -> list[dict[str, Any]]: + with _lock: + conn = _connect() + try: + if enabled is None: + rows = conn.execute( + "SELECT * FROM tiktok_channels ORDER BY created_at ASC, name COLLATE NOCASE ASC" + ).fetchall() + else: + rows = conn.execute( + "SELECT * FROM tiktok_channels WHERE enabled = ? ORDER BY created_at ASC, name COLLATE NOCASE ASC", + (1 if enabled else 0,), + ).fetchall() + return [_row_to_dict(r) for r in rows] # type: ignore + finally: + conn.close() + + +def get_tiktok_channel(channel_pk: str) -> dict[str, Any] | None: + with _lock: + conn = _connect() + try: + return _row_to_dict(conn.execute("SELECT * FROM tiktok_channels WHERE id = ?", (channel_pk,)).fetchone()) + finally: + conn.close() + + +def create_tiktok_channel( + *, + name: str, + enabled: bool = True, + daily_min: int | None = None, + daily_max: int | None = None, + title_template: str = "", + description_template: str = "", + privacy_level: str = "SELF_ONLY", + note: str = "", + socks_enabled: bool = False, + socks_profile_id: str = "", +) -> dict[str, Any]: + from . import db as _db + + now = time.time() + cid = str(uuid.uuid4()) + defaults = _db.tiktok_quota_defaults() + daily_min = _force_daily(daily_min if daily_min is not None else defaults["daily_min"]) + daily_max = _force_daily(daily_max if daily_max is not None else defaults["daily_max"]) + if daily_max < daily_min: + daily_max = daily_min + with _lock: + conn = _connect() + try: + conn.execute( + """ + INSERT INTO tiktok_channels( + id, name, tiktok_open_id, tiktok_username, client_key, client_secret, + refresh_token, access_token, token_expires_at, enabled, daily_min, daily_max, + title_template, description_template, privacy_level, last_assigned_at, + oauth_ok, oauth_checked_at, oauth_error, note, cookie_saved_at, + socks_enabled, socks_profile_id, created_at, updated_at + ) VALUES (?, ?, '', '', '', '', '', '', 0, ?, ?, ?, ?, ?, ?, 0, -1, 0, '', ?, 0, ?, ?, ?, ?) + """, + ( + cid, + (name or "").strip() or "TikTok 账号", + 1 if enabled else 0, + daily_min, + daily_max, + title_template, + description_template, + (privacy_level or "SELF_ONLY").strip(), + (note or "").strip(), + 1 if socks_enabled else 0, + str(socks_profile_id or "").strip(), + now, + now, + ), + ) + conn.commit() + return _row_to_dict(conn.execute("SELECT * FROM tiktok_channels WHERE id = ?", (cid,)).fetchone()) # type: ignore + finally: + conn.close() + + +def update_tiktok_channel(channel_pk: str, **fields: Any) -> dict[str, Any] | None: + allowed = { + "name", "tiktok_open_id", "tiktok_username", "client_key", "client_secret", + "refresh_token", "access_token", "token_expires_at", "enabled", "daily_min", "daily_max", + "title_template", "description_template", "privacy_level", "last_assigned_at", + "oauth_ok", "oauth_checked_at", "oauth_error", "note", "cookie_saved_at", + "socks_enabled", "socks_profile_id", + "platform_limit_at", "platform_limit_msg", "platform_limit_probe_at", + "tiktok_uid", "nickname", "avatar_url", + "follower_count", "following_count", "video_count", "heart_count", + "profile_fetched_at", "profile_error", + } + with _lock: + conn = _connect() + try: + row = conn.execute("SELECT * FROM tiktok_channels WHERE id = ?", (channel_pk,)).fetchone() + if not row: + return None + sets: list[str] = [] + params: list[Any] = [] + for k, v in fields.items(): + if k not in allowed or v is None: + continue + if k in {"daily_min", "daily_max"}: + v = _force_daily(int(v)) + if k in {"enabled", "socks_enabled"}: + v = 1 if v else 0 + if k == "oauth_ok" and v is not None: + v = int(v) + if k == "socks_profile_id": + v = str(v or "").strip() + if k in {"follower_count", "following_count", "video_count", "heart_count"}: + v = int(v or 0) + if k in {"tiktok_uid", "nickname", "avatar_url", "profile_error", "tiktok_username"}: + v = str(v or "").strip() + sets.append(f"{k} = ?") + params.append(v) + if not sets: + return _row_to_dict(row) + sets.append("updated_at = ?") + params.append(time.time()) + params.append(channel_pk) + conn.execute(f"UPDATE tiktok_channels SET {', '.join(sets)} WHERE id = ?", params) + conn.commit() + return _row_to_dict(conn.execute("SELECT * FROM tiktok_channels WHERE id = ?", (channel_pk,)).fetchone()) + finally: + conn.close() + + +def delete_tiktok_channel(channel_pk: str) -> bool: + with _lock: + conn = _connect() + try: + cur = conn.execute("DELETE FROM tiktok_channels WHERE id = ?", (channel_pk,)) + conn.commit() + return cur.rowcount > 0 + finally: + conn.close() + + +def tiktok_channel_upload_count(channel_pk: str, push_date: str) -> int: + """Jobs that consume today's upload quota (排程/上传中/已上传).""" + placeholders = ",".join("?" for _ in _TIKTOK_QUOTA_STATUSES) + with _lock: + conn = _connect() + try: + row = conn.execute( + f""" + SELECT COUNT(*) AS c FROM tiktok_jobs + WHERE channel_pk = ? AND push_date = ? + AND status IN ({placeholders}) + """, + (channel_pk, push_date, *_TIKTOK_QUOTA_STATUSES), + ).fetchone() + return int(row["c"]) if row else 0 + finally: + conn.close() + + +def tiktok_channel_uploaded_count(channel_pk: str, push_date: str) -> int: + """Successfully published today (auto upload gate — excludes backlog scheduled).""" + with _lock: + conn = _connect() + try: + row = conn.execute( + """ + SELECT COUNT(*) AS c FROM tiktok_jobs + WHERE channel_pk = ? AND push_date = ? + AND status IN ('uploaded', 'done') + """, + (channel_pk, push_date), + ).fetchone() + return int(row["c"]) if row else 0 + finally: + conn.close() + + +def channel_at_daily_upload_max(channel_pk: str, push_date: str = "") -> bool: + """True when this account already hit daily_max successful uploads today.""" + day = push_date or push_date_from_ts(time.time()) + ch = get_tiktok_channel(channel_pk) + if not ch: + return True + daily_max = _force_daily(int(ch.get("daily_max") or TIKTOK_DAILY_FORCE)) + return tiktok_channel_uploaded_count(channel_pk, day) >= daily_max + + +def pick_tiktok_channel( + push_date: str, + *, + require_quota: bool = True, +) -> dict[str, Any] | None: + """Pick enabled Cookie-ready channel. If require_quota, skip channels at daily upload max.""" + from . import tiktok_session + + channels = list_tiktok_channels(enabled=True) + if not channels: + return None + scored: list[tuple[int, int, float, dict[str, Any]]] = [] + for ch in channels: + if not tiktok_session.channel_has_session(ch): + continue + used = tiktok_channel_upload_count(str(ch["id"]), push_date) + daily_max = _force_daily(int(ch.get("daily_max") or TIKTOK_DAILY_FORCE)) + if require_quota and used >= daily_max: + continue + daily_min = _force_daily(int(ch.get("daily_min") or TIKTOK_DAILY_FORCE)) + under = 0 if used < daily_min else 1 + scored.append((under, used, float(ch.get("last_assigned_at") or 0), ch)) + if not scored: + return None + scored.sort(key=lambda x: (x[0], x[1], x[2])) + return scored[0][3] + + +def ensure_tiktok_job_channel(job: dict[str, Any] | None, *, require_quota: bool = False) -> dict[str, Any] | None: + """Attach a TikTok channel to job if missing. Returns channel row or None.""" + j = job or {} + jid = str(j.get("id") or "") + day = str(j.get("push_date") or "") or push_date_from_ts(time.time()) + pk = str(j.get("channel_pk") or "").strip() + if pk: + ch = get_tiktok_channel(pk) + if ch and ch.get("enabled"): + return ch + ch = pick_tiktok_channel(day, require_quota=require_quota) + if not ch and require_quota: + # fallback soft-assign so UI/ops still have an owner account + ch = pick_tiktok_channel(day, require_quota=False) + if ch and jid: + update_tiktok_job(jid, channel_pk=str(ch["id"])) + return ch + + +def backfill_tiktok_job_channels(*, push_date: str = "", limit: int = 50) -> int: + """Assign channels to jobs that were enqueued without channel_pk.""" + day = push_date or push_date_from_ts(time.time()) + data = list_tiktok_jobs(push_date=day, limit=500, offset=0) + n = 0 + for j in data.get("jobs") or []: + if n >= limit: + break + if str(j.get("channel_pk") or "").strip(): + continue + if str(j.get("status") or "") in {"failed", "skipped", "uploaded", "done"}: + continue + # Prefer hard quota for jobs about to upload; soft for pending/recording pool + need_hard = str(j.get("status") or "") in {"scheduled", "uploading", "recorded"} + ch = ensure_tiktok_job_channel(j, require_quota=need_hard) + if ch: + n += 1 + return n + + +def tiktok_total_quota_gap(push_date: str = "") -> int: + day = push_date or push_date_from_ts(time.time()) + gap = 0 + for ch in list_tiktok_channels(enabled=True): + used = tiktok_channel_upload_count(str(ch["id"]), day) + daily_max = _force_daily(int(ch.get("daily_max") or TIKTOK_DAILY_FORCE)) + gap += max(0, daily_max - used) + return gap + + +# ---------- jobs ---------- + +def has_tiktok_job_for_room_day(room_id: str, push_date: str) -> bool: + if not room_id: + return False + with _lock: + conn = _connect() + try: + row = conn.execute( + """ + SELECT 1 FROM tiktok_jobs + WHERE room_id = ? AND push_date = ? + AND status NOT IN ('failed', 'skipped') + LIMIT 1 + """, + (room_id, push_date), + ).fetchone() + return bool(row) + finally: + conn.close() + + +def create_tiktok_job( + *, + session_id: str, + room_pk: str = "", + room_id: str = "", + source_url: str = "", + anchor_name: str = "", + stream_url: str = "", + channel_pk: str = "", + push_date: str = "", +) -> dict[str, Any] | None: + now = time.time() + jid = str(uuid.uuid4()) + day = push_date or push_date_from_ts(now) + rid = str(room_id or "").strip() + with _lock: + conn = _connect() + try: + if rid: + existing = conn.execute( + """ + SELECT 1 FROM tiktok_jobs + WHERE room_id = ? AND push_date = ? + AND status NOT IN ('failed', 'skipped') + LIMIT 1 + """, + (rid, day), + ).fetchone() + if existing: + return None + conn.execute( + """ + INSERT INTO tiktok_jobs( + id, session_id, room_pk, room_id, source_url, anchor_name, stream_url, + channel_pk, status, clip_path, clip_seconds, tiktok_publish_id, tiktok_video_id, + error, push_date, upload_at, attempts, created_at, updated_at, started_at, finished_at + ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, 'pending', '', 0, '', '', '', ?, 0, 0, ?, ?, 0, 0) + """, + (jid, session_id, room_pk, rid, source_url, anchor_name, stream_url, channel_pk, day, now, now), + ) + if channel_pk: + conn.execute( + "UPDATE tiktok_channels SET last_assigned_at = ?, updated_at = ? WHERE id = ?", + (now, now, channel_pk), + ) + conn.commit() + return _row_to_dict(conn.execute("SELECT * FROM tiktok_jobs WHERE id = ?", (jid,)).fetchone()) # type: ignore + finally: + conn.close() + + +def update_tiktok_job(job_id: str, **fields: Any) -> dict[str, Any] | None: + allowed = { + "status", "clip_path", "clip_seconds", "tiktok_publish_id", "tiktok_video_id", + "error", "channel_pk", "stream_url", "attempts", "started_at", "finished_at", "upload_at", + "push_date", + } + with _lock: + conn = _connect() + try: + row = conn.execute("SELECT * FROM tiktok_jobs WHERE id = ?", (job_id,)).fetchone() + if not row: + return None + sets: list[str] = [] + params: list[Any] = [] + for k, v in fields.items(): + if k not in allowed or v is None: + continue + sets.append(f"{k} = ?") + params.append(v) + if not sets: + return _row_to_dict(row) + sets.append("updated_at = ?") + params.append(time.time()) + params.append(job_id) + conn.execute(f"UPDATE tiktok_jobs SET {', '.join(sets)} WHERE id = ?", params) + conn.commit() + return _row_to_dict(conn.execute("SELECT * FROM tiktok_jobs WHERE id = ?", (job_id,)).fetchone()) + finally: + conn.close() + + +def get_tiktok_job(job_id: str) -> dict[str, Any] | None: + with _lock: + conn = _connect() + try: + return _row_to_dict(conn.execute("SELECT * FROM tiktok_jobs WHERE id = ?", (job_id,)).fetchone()) + finally: + conn.close() + + +def list_tiktok_jobs( + *, + status: str = "", + push_date: str = "", + channel_pk: str = "", + session_id: str = "", + room_id: str = "", + limit: int = 100, + offset: int = 0, +) -> dict[str, Any]: + with _lock: + conn = _connect() + try: + clauses: list[str] = [] + params: list[Any] = [] + if status.strip(): + clauses.append("status = ?") + params.append(status.strip()) + if push_date.strip(): + clauses.append("push_date = ?") + params.append(push_date.strip()) + if channel_pk.strip(): + clauses.append("channel_pk = ?") + params.append(channel_pk.strip()) + if session_id.strip(): + clauses.append("session_id = ?") + params.append(session_id.strip()) + if room_id.strip(): + clauses.append("room_id = ?") + params.append(room_id.strip()) + where = ("WHERE " + " AND ".join(clauses)) if clauses else "" + total = conn.execute(f"SELECT COUNT(*) AS c FROM tiktok_jobs {where}", params).fetchone()["c"] + rows = conn.execute( + f"SELECT * FROM tiktok_jobs {where} ORDER BY created_at DESC LIMIT ? OFFSET ?", + [*params, max(1, min(limit, 500)), max(0, offset)], + ).fetchall() + return {"jobs": [_row_to_dict(r) for r in rows], "total": int(total)} + finally: + conn.close() + + +def tiktok_stats(push_date: str = "") -> dict[str, Any]: + day = push_date or push_date_from_ts(time.time()) + with _lock: + conn = _connect() + try: + rows = conn.execute( + "SELECT status, COUNT(*) AS c FROM tiktok_jobs WHERE push_date = ? GROUP BY status", + (day,), + ).fetchall() + by_status = {str(r["status"]): int(r["c"]) for r in rows} + return {"push_date": day, "by_status": by_status, "total": sum(by_status.values())} + finally: + conn.close() + + +def claim_pending_tiktok_record() -> dict[str, Any] | None: + now = time.time() + with _lock: + conn = _connect() + try: + row = conn.execute( + """ + SELECT j.* FROM tiktok_jobs j + INNER JOIN tiktok_channels c ON c.id = j.channel_pk + WHERE j.status = 'pending' + AND c.enabled = 1 + ORDER BY j.created_at ASC + LIMIT 1 + """ + ).fetchone() + if not row: + return None + jid = str(row["id"]) + conn.execute( + """ + UPDATE tiktok_jobs SET status = 'recording', started_at = ?, updated_at = ?, attempts = attempts + 1 + WHERE id = ? AND status = 'pending' + """, + (now, now, jid), + ) + if conn.total_changes == 0: + conn.rollback() + return None + conn.commit() + return _row_to_dict(conn.execute("SELECT * FROM tiktok_jobs WHERE id = ?", (jid,)).fetchone()) + finally: + conn.close() + + +def claim_tiktok_job_record(job_id: str) -> dict[str, Any] | None: + now = time.time() + with _lock: + conn = _connect() + try: + cur = conn.execute( + """ + UPDATE tiktok_jobs SET status = 'recording', started_at = ?, updated_at = ?, attempts = attempts + 1 + WHERE id = ? AND status = 'pending' + """, + (now, now, job_id), + ) + conn.commit() + if cur.rowcount == 0: + return None + return _row_to_dict(conn.execute("SELECT * FROM tiktok_jobs WHERE id = ?", (job_id,)).fetchone()) + finally: + conn.close() + + +def mark_tiktok_platform_limit(channel_pk: str, message: str) -> dict[str, Any] | None: + msg = (message or "TikTok 官方限流").strip()[:400] + return update_tiktok_channel( + channel_pk, + platform_limit_at=time.time(), + platform_limit_msg=msg, + ) + + +def clear_tiktok_platform_limit(channel_pk: str) -> dict[str, Any] | None: + return update_tiktok_channel( + channel_pk, + platform_limit_at=0, + platform_limit_msg="", + platform_limit_probe_at=0, + ) + + +def channel_has_platform_limit(ch: dict[str, Any] | None) -> bool: + if not ch: + return False + return float(ch.get("platform_limit_at") or 0) > 0 + + +def list_tiktok_channels_needing_limit_probe(*, min_gap_sec: float = 3600.0) -> list[dict[str, Any]]: + """Channels currently platform-limited and due for an hourly upload probe.""" + now = time.time() + gap = max(600.0, float(min_gap_sec or 3600.0)) + out: list[dict[str, Any]] = [] + for ch in list_tiktok_channels(enabled=True): + if not channel_has_platform_limit(ch): + continue + last = float(ch.get("platform_limit_probe_at") or 0) + # First probe after mark: wait at least min_gap from limit_at + if last <= 0: + last = float(ch.get("platform_limit_at") or 0) + if (now - last) < gap: + continue + out.append(ch) + return out + + +def claim_tiktok_limit_probe_job(channel_pk: str) -> dict[str, Any] | None: + """Claim one clip job for hourly platform-limit probe upload.""" + now = time.time() + pk = str(channel_pk or "").strip() + if not pk: + return None + with _lock: + conn = _connect() + try: + row = conn.execute( + """ + SELECT * FROM tiktok_jobs + WHERE channel_pk = ? + AND clip_path != '' + AND IFNULL(tiktok_video_id,'') = '' + AND IFNULL(tiktok_publish_id,'') = '' + AND status IN ('scheduled', 'recorded', 'failed') + ORDER BY + CASE status WHEN 'scheduled' THEN 0 WHEN 'recorded' THEN 1 ELSE 2 END, + upload_at ASC, created_at ASC + LIMIT 1 + """, + (pk,), + ).fetchone() + if not row: + return None + jid = str(row["id"]) + conn.execute( + """ + UPDATE tiktok_jobs + SET status = 'uploading', upload_at = ?, attempts = attempts + 1, + error = 'platform_limit_probe', finished_at = 0, updated_at = ? + WHERE id = ? AND IFNULL(tiktok_video_id,'') = '' AND IFNULL(tiktok_publish_id,'') = '' + AND status IN ('scheduled', 'recorded', 'failed') + """, + (now, now, jid), + ) + if conn.total_changes == 0: + conn.rollback() + return None + conn.execute( + "UPDATE tiktok_channels SET platform_limit_probe_at = ?, updated_at = ? WHERE id = ?", + (now, now, pk), + ) + conn.commit() + return _row_to_dict(conn.execute("SELECT * FROM tiktok_jobs WHERE id = ?", (jid,)).fetchone()) + finally: + conn.close() + + +def reschedule_soft_quota_held_jobs(*, limit: int = 50) -> int: + """Clear soft-quota holds only when the account still has remaining daily_max slots.""" + now = time.time() + today = push_date_from_ts(now) + n = 0 + with _lock: + conn = _connect() + try: + rows = conn.execute( + """ + SELECT id, channel_pk FROM tiktok_jobs + WHERE status IN ('recorded', 'scheduled') + AND clip_path != '' + AND IFNULL(tiktok_video_id,'') = '' + AND (error LIKE '%配额已满%') + ORDER BY created_at ASC + LIMIT ? + """, + (max(1, int(limit)),), + ).fetchall() + finally: + conn.close() + for row in rows: + jid = str(row["id"]) + ch_pk = str(row["channel_pk"] or "") + if ch_pk and channel_at_daily_upload_max(ch_pk, today): + defer_tiktok_job_to_next_day(jid, stagger_sec=90 + n * 60) + n += 1 + continue + update_tiktok_job( + jid, + status="scheduled", + upload_at=now + 30 + n * 120, + error="", + ) + n += 1 + return n + + +def delete_tiktok_jobs_for_channel(channel_pk: str) -> dict[str, int]: + """Delete all TikTok jobs for an account (keep account row).""" + pk = str(channel_pk or "").strip() + if not pk: + return {"jobs": 0, "clips": 0} + clip_paths: list[str] = [] + with _lock: + conn = _connect() + try: + rows = conn.execute( + "SELECT clip_path FROM tiktok_jobs WHERE channel_pk = ?", + (pk,), + ).fetchall() + clip_paths = [str(r["clip_path"] or "") for r in rows if r["clip_path"]] + cur = conn.execute("DELETE FROM tiktok_jobs WHERE channel_pk = ?", (pk,)) + jobs = int(cur.rowcount or 0) + conn.commit() + finally: + conn.close() + clips = 0 + from pathlib import Path + + for raw in clip_paths: + try: + p = Path(str(raw).strip()) + if p.is_file(): + p.unlink() + clips += 1 + except Exception: + pass + return {"jobs": jobs, "clips": clips} + + +def defer_tiktok_job_to_next_day(job_id: str, *, stagger_sec: float = 60) -> None: + """Move a clip to the next Beijing day so it consumes tomorrow's quota, not today's.""" + from .timeutil import beijing_day_bounds + + today = push_date_from_ts(time.time()) + next_start = beijing_day_bounds(today)[1] + next_day = push_date_from_ts(next_start + 1) + update_tiktok_job( + job_id, + status="scheduled", + push_date=next_day, + upload_at=next_start + max(30.0, float(stagger_sec)), + error="账号今日配额已满,已延到次日", + ) + + +def claim_due_tiktok_upload() -> dict[str, Any] | None: + """Claim next due scheduled upload, skipping accounts already at daily_max published today.""" + now = time.time() + today = push_date_from_ts(now) + # Try a few candidates: defer over-quota rows then pick the next. + for i in range(8): + with _lock: + conn = _connect() + try: + row = conn.execute( + """ + SELECT j.* FROM tiktok_jobs j + INNER JOIN tiktok_channels c ON c.id = j.channel_pk + WHERE j.status = 'scheduled' + AND c.enabled = 1 + AND j.clip_path != '' + AND IFNULL(j.tiktok_video_id,'') = '' + AND IFNULL(j.tiktok_publish_id,'') = '' + AND j.upload_at > 0 + AND j.upload_at <= ? + AND IFNULL(c.platform_limit_at, 0) <= 0 + ORDER BY j.upload_at ASC, j.created_at ASC + LIMIT 1 + """, + (now,), + ).fetchone() + if not row: + return None + jid = str(row["id"]) + ch_pk = str(row["channel_pk"] or "") + finally: + conn.close() + if ch_pk and channel_at_daily_upload_max(ch_pk, today): + defer_tiktok_job_to_next_day(jid, stagger_sec=60 + i * 90) + continue + with _lock: + conn = _connect() + try: + conn.execute( + """ + UPDATE tiktok_jobs + SET status = 'uploading', updated_at = ?, attempts = attempts + 1, error = '' + WHERE id = ? AND status = 'scheduled' + AND IFNULL(tiktok_video_id,'') = '' + AND IFNULL(tiktok_publish_id,'') = '' + """, + (now, jid), + ) + if conn.total_changes == 0: + conn.rollback() + continue + conn.commit() + return _row_to_dict(conn.execute("SELECT * FROM tiktok_jobs WHERE id = ?", (jid,)).fetchone()) + finally: + conn.close() + return None + + +def claim_tiktok_job_manual_upload(job_id: str) -> dict[str, Any] | None: + now = time.time() + with _lock: + conn = _connect() + try: + row = conn.execute("SELECT * FROM tiktok_jobs WHERE id = ?", (job_id,)).fetchone() + if not row: + return None + st = str(row["status"] or "") + if st not in {"scheduled", "recorded", "uploading", "failed"}: + return None + if not str(row["clip_path"] or "").strip(): + return None + if str(row["tiktok_video_id"] or "").strip() or str(row["tiktok_publish_id"] or "").strip(): + return None + stale_before = now - 180 + if st == "uploading" and float(row["updated_at"] or 0) >= stale_before: + return None + conn.execute( + """ + UPDATE tiktok_jobs + SET status = 'uploading', upload_at = ?, attempts = attempts + 1, + error = '', finished_at = 0, updated_at = ? + WHERE id = ? AND IFNULL(tiktok_video_id,'') = '' AND IFNULL(tiktok_publish_id,'') = '' + AND ( + status IN ('scheduled', 'recorded', 'failed') + OR (status = 'uploading' AND updated_at < ?) + ) + """, + (now, now, job_id, stale_before), + ) + if conn.total_changes == 0: + conn.rollback() + return None + conn.commit() + return _row_to_dict(conn.execute("SELECT * FROM tiktok_jobs WHERE id = ?", (job_id,)).fetchone()) + finally: + conn.close() + + +def touch_tiktok_upload_lease(job_id: str) -> bool: + now = time.time() + with _lock: + conn = _connect() + try: + cur = conn.execute( + """ + UPDATE tiktok_jobs SET updated_at = ? + WHERE id = ? AND status = 'uploading' + AND IFNULL(tiktok_video_id,'') = '' + AND IFNULL(tiktok_publish_id,'') = '' + """, + (now, job_id), + ) + conn.commit() + return cur.rowcount > 0 + finally: + conn.close() + + +def finalize_tiktok_upload( + job_id: str, + *, + tiktok_publish_id: str = "", + tiktok_video_id: str = "", +) -> bool: + now = time.time() + pub = str(tiktok_publish_id or "").strip() + vid = str(tiktok_video_id or "").strip() or pub + if not pub: + pub = vid or f"cookie-{job_id[:12]}" + if not vid: + vid = pub + with _lock: + conn = _connect() + try: + cur = conn.execute( + """ + UPDATE tiktok_jobs + SET status = 'uploaded', tiktok_publish_id = ?, tiktok_video_id = ?, + error = '', finished_at = ?, updated_at = ?, clip_path = '' + WHERE id = ? AND IFNULL(tiktok_video_id,'') = '' + AND status IN ('uploading', 'scheduled', 'failed', 'recorded') + """, + (pub, vid, now, now, job_id), + ) + conn.commit() + return cur.rowcount > 0 + finally: + conn.close() + + +def reclaim_stale_tiktok_recordings(*, max_age_sec: float = 240) -> int: + """Fail or requeue recordings stuck longer than expected (1min clip + buffer).""" + now = time.time() + cutoff = now - max(120.0, float(max_age_sec)) + with _lock: + conn = _connect() + try: + rows = conn.execute( + """ + SELECT id, attempts FROM tiktok_jobs + WHERE status = 'recording' AND started_at > 0 AND started_at < ? + """, + (cutoff,), + ).fetchall() + n = 0 + for row in rows: + attempts = int(row["attempts"] or 0) + if attempts <= 1: + conn.execute( + """ + UPDATE tiktok_jobs + SET status = 'pending', error = '录制超时,自动重试', updated_at = ?, started_at = 0 + WHERE id = ? AND status = 'recording' + """, + (now, row["id"]), + ) + else: + conn.execute( + """ + UPDATE tiktok_jobs + SET status = 'failed', error = '录制卡死超时', finished_at = ?, updated_at = ? + WHERE id = ? AND status = 'recording' + """, + (now, now, row["id"]), + ) + n += conn.total_changes + if n: + conn.commit() + return n + finally: + conn.close() + + +def reclaim_stale_tiktok_uploads(*, max_age_sec: float = 900) -> int: + """Only use updated_at (upload lease), never recording started_at.""" + cutoff = time.time() - max(600.0, float(max_age_sec)) + now = time.time() + with _lock: + conn = _connect() + try: + cur = conn.execute( + """ + UPDATE tiktok_jobs + SET status = 'failed', + error = '上传超时已中止,未再次发送(防止重复发布)', + finished_at = ?, + updated_at = ? + WHERE status = 'uploading' + AND IFNULL(tiktok_video_id,'') = '' + AND IFNULL(tiktok_publish_id,'') = '' + AND updated_at < ? + """, + (now, now, cutoff), + ) + conn.commit() + return int(cur.rowcount) + finally: + conn.close() + + +def list_auto_retry_tiktok_failed(*, limit: int = 20) -> list[dict[str, Any]]: + with _lock: + conn = _connect() + try: + rows = conn.execute( + """ + SELECT * FROM tiktok_jobs + WHERE status = 'failed' + AND clip_path != '' + AND IFNULL(tiktok_video_id,'') = '' + AND IFNULL(tiktok_publish_id,'') = '' + AND attempts < 5 + ORDER BY updated_at ASC + LIMIT ? + """, + (max(1, limit),), + ).fetchall() + return [_row_to_dict(r) for r in rows] # type: ignore + finally: + conn.close() diff --git a/backend/app/tiktok_pipeline.py b/backend/app/tiktok_pipeline.py index 0361e36..44e1549 100644 --- a/backend/app/tiktok_pipeline.py +++ b/backend/app/tiktok_pipeline.py @@ -1,768 +1,778 @@ -# -*- coding: utf-8 -*- -"""Isolated TikTok pipeline — never touches Shorts or Douyin monitor.""" -from __future__ import annotations - -import asyncio -import random -import time -from pathlib import Path -from typing import Any, Optional - -from . import db -from . import tiktok_db -from . import tiktok_session -from .shorts_clip import record_clip, resolve_stream_candidates -from .tiktok_schedule import pick_upload_at, schedule_board -from .tiktok_socks import resolve_channel_socks_proxy -from .tiktok_upload import is_platform_rate_limit, upload_tiktok_mp4 -from .timeutil import push_date_from_ts - - -def _room_tags(room: dict[str, Any]) -> list[str]: - tags = room.get("tags") or [] - if isinstance(tags, str): - return [t.strip() for t in tags.split(",") if t.strip()] - return [str(t).strip() for t in tags if str(t).strip()] - - -def _room_eligible(room: dict[str, Any], cfg: dict[str, Any]) -> bool: - trigger = str(cfg.get("tiktok_trigger") or "tagged").strip().lower() - tags = _room_tags(room) - if trigger == "all": - return True - if trigger == "favorite": - return any(t in {"收藏", "重点", "priority", "vip", "高优", "shorts", "tiktok"} for t in tags) - if "shorts_only" in tags or "x_only" in tags: - return False - tag = str(cfg.get("tiktok_tag") or "shorts").strip() or "shorts" - return tag in tags or "tiktok" in tags or "shorts" in tags or "both" in tags - - -def _enqueue_job( - *, - session: dict[str, Any] | None, - room: dict[str, Any], - stream_url: str = "", - cfg: dict[str, Any] | None = None, - channel_pk: str = "", - force: bool = False, - push_date: str = "", - require_channel: bool = True, -) -> Optional[dict[str, Any]]: - try: - settings = cfg or db.get_settings_map() - if not force and not settings.get("tiktok_enabled"): - return None - room_id = str(room.get("room_id") or (session or {}).get("room_id") or "") - if room_id.startswith("yt:"): - return None - day = str(push_date or "").strip() or push_date_from_ts(time.time()) - if settings.get("tiktok_dedupe_room_day", True) and room_id: - if tiktok_db.has_tiktok_job_for_room_day(room_id, day): - return None - channel: dict[str, Any] | None = None - if channel_pk: - ch = tiktok_db.get_tiktok_channel(channel_pk) - if ch and ch.get("enabled") and tiktok_session.channel_has_session(ch): - used = tiktok_db.tiktok_channel_upload_count(channel_pk, day) - if used < db.TIKTOK_DAILY_FORCE: - channel = ch - if not channel: - # Prefer under upload-quota; if all full, soft-assign so job still has an owner account - channel = tiktok_db.pick_tiktok_channel(day, require_quota=True) - if not channel: - channel = tiktok_db.pick_tiktok_channel(day, require_quota=False) - if require_channel and not channel: - return None - sid = str((session or {}).get("id") or room.get("active_session_id") or "") - return tiktok_db.create_tiktok_job( - session_id=sid, - room_pk=str(room.get("id") or (session or {}).get("room_pk") or ""), - room_id=room_id, - source_url=str((session or {}).get("source_url") or room.get("url") or ""), - anchor_name=str( - (session or {}).get("anchor_name") or room.get("last_anchor") or room.get("last_title") or "" - ), - stream_url=str(stream_url or ""), - channel_pk=str((channel or {}).get("id") or ""), - push_date=day, - ) - except Exception: - return None - - -def try_sample_live_rooms(cfg: dict[str, Any] | None = None) -> int: - settings = cfg or db.get_settings_map() - if not settings.get("tiktok_enabled") or not settings.get("tiktok_live_sample", True): - return 0 - batch = max(1, int(settings.get("tiktok_live_sample_batch") or 1)) - rooms = db.list_live_douyin_rooms_for_shorts(limit=400) - if settings.get("tiktok_sample_any_live", True): - candidates = list(rooms) - else: - candidates = [r for r in rooms if _room_eligible(r, settings)] - if not candidates: - return 0 - random.shuffle(candidates) - n = 0 - for room in candidates[: batch * 3]: - if n >= batch: - break - sid = str(room.get("active_session_id") or "") - session = db.get_session(sid) if sid else None - if _enqueue_job(session=session, room=room, cfg=settings): - n += 1 - return n - - -def sample_live_now(cfg: dict[str, Any] | None = None) -> dict[str, Any]: - """Manual sample: enqueue current Douyin lives and return job ids for immediate record.""" - settings = cfg or db.get_settings_map() - rooms = db.list_live_douyin_rooms_for_shorts(limit=400) - live_count = len(rooms) - empty = { - "enqueued": 0, - "job_ids": [], - "live_count": live_count, - "skipped_dedupe": 0, - "reason": "", - } - if live_count <= 0: - empty["reason"] = "当前没有抖音在播直播间" - return empty - day = push_date_from_ts(time.time()) - if settings.get("tiktok_sample_any_live", True): - candidates = list(rooms) - else: - candidates = [r for r in rooms if _room_eligible(r, settings)] - unused: list[dict[str, Any]] = [] - skipped = 0 - for room in candidates: - rid = str(room.get("room_id") or "") - if not rid: - continue - if settings.get("tiktok_dedupe_room_day", True) and tiktok_db.has_tiktok_job_for_room_day(rid, day): - skipped += 1 - continue - unused.append(room) - if not unused: - empty["skipped_dedupe"] = skipped - empty["reason"] = f"在播 {live_count} 间均已今日取样" - return empty - batch = min(len(unused), 3) - random.shuffle(unused) - job_ids: list[str] = [] - for room in unused[:batch]: - sid = str(room.get("active_session_id") or "") - session = db.get_session(sid) if sid else None - job = _enqueue_job( - session=session, - room=room, - cfg=settings, - force=True, - push_date=day, - require_channel=False, - ) - if job and job.get("id"): - job_ids.append(str(job["id"])) - reason = "" if job_ids else "入队失败(可能已有同房间任务)" - return { - "enqueued": len(job_ids), - "job_ids": job_ids, - "live_count": live_count, - "skipped_dedupe": skipped, - "reason": reason, - } - - -def try_fill_daily_quota(cfg: dict[str, Any] | None = None) -> int: - """Enqueue live-room clips toward each TikTok channel's daily_max (Beijing day).""" - try: - settings = cfg or db.get_settings_map() - if not settings.get("tiktok_enabled"): - return 0 - day = push_date_from_ts(time.time()) - gap_total = tiktok_db.tiktok_total_quota_gap(day) - if gap_total <= 0: - return 0 - if not tiktok_db.pick_tiktok_channel(day, require_quota=True): - return 0 - from .timeutil import beijing_day_bounds - - day_start, day_end = beijing_day_bounds(day) - now = time.time() - day_progress = max(0.0, min(1.0, (now - day_start) / max(1.0, day_end - day_start))) - base_batch = max(1, min(int(settings.get("tiktok_quota_fill_batch") or 3), 10)) - if day_progress > 0.7: - base_batch = max(base_batch, min(gap_total, 8)) - rooms = db.list_live_douyin_rooms_for_shorts(limit=400) - any_live = settings.get("tiktok_sample_any_live", True) - candidates: list[dict[str, Any]] = [] - for room in rooms: - rid = str(room.get("room_id") or "") - if not rid: - continue - if tiktok_db.has_tiktok_job_for_room_day(rid, day): - continue - if any_live or _room_eligible(room, settings): - candidates.append(room) - if not candidates: - return 0 - random.shuffle(candidates) - enqueued = 0 - for room in candidates: - if enqueued >= base_batch: - break - if not tiktok_db.pick_tiktok_channel(day, require_quota=True): - break - sid = str(room.get("active_session_id") or "") - session = db.get_session(sid) if sid else None - if _enqueue_job(session=session, room=room, cfg=settings): - enqueued += 1 - return enqueued - except Exception: - return 0 - - -class TikTokPipeline: - def __init__(self) -> None: - self._task: asyncio.Task | None = None - self._stop = asyncio.Event() - self._active_records = 0 - self._active_uploads = 0 - self.processed = 0 - self.sampled = 0 - self.last_error = "" - self._last_sample_at = 0.0 - self._last_oauth_check_at = 0.0 - self._last_auto_retry_at = 0.0 - self._last_limit_probe_at = 0.0 - self._soft_quota_rescued = False - self._upload_inflight: set[str] = set() - - def status(self) -> dict[str, Any]: - now = time.time() - cached = getattr(self, "_status_cache", None) - cache_at = float(getattr(self, "_status_cache_at", 0) or 0) - if cached is not None and (now - cache_at) < 2.0: - return cached - - cfg = db.get_settings_map() - try: - board = schedule_board(limit=30) - except Exception: - board = {} - oauth_issues = [] - for ch in tiktok_db.list_tiktok_channels(enabled=True): - ok_flag = int(ch.get("oauth_ok") if ch.get("oauth_ok") is not None else -1) - if ok_flag == 0 or not tiktok_session.channel_has_session(ch): - oauth_issues.append( - { - "id": ch.get("id"), - "name": ch.get("name"), - "oauth_error": ch.get("oauth_error") or "未授权", - } - ) - try: - from . import douyin_live - - live_count = int(douyin_live.build_live_map().get("live_count") or 0) - except Exception: - live_count = 0 - payload = { - "running": bool(self._task and not self._task.done()), - "busy": self._active_records > 0 or self._active_uploads > 0, - "enabled": bool(cfg.get("tiktok_enabled")), - "processed": self.processed, - "sampled": self.sampled, - "quota_gap": tiktok_db.tiktok_total_quota_gap(), - "quota_defaults": db.tiktok_quota_defaults(cfg), - "last_error": self.last_error, - "clip_sec": max(60, min(90, int(cfg.get("tiktok_clip_sec") or 75))), - "douyin_live_count": live_count, - "board": board, - "oauth_issues": oauth_issues, - "stats": tiktok_db.tiktok_stats(), - } - self._status_cache = payload - self._status_cache_at = time.time() - return payload - - async def start(self) -> None: - if self._task and not self._task.done(): - return - self._stop.clear() - self._task = asyncio.create_task(self._loop(), name="tiktok-pipeline") - - async def stop(self) -> None: - self._stop.set() - if self._task: - try: - await asyncio.wait_for(self._task, timeout=5) - except Exception: - self._task.cancel() - self._task = None - - async def kick_pending_records(self, job_ids: list[str]) -> int: - ids = [str(j) for j in job_ids if str(j).strip()] - if not ids: - return 0 - cfg = db.get_settings_map() - max_rec = max(1, int(cfg.get("tiktok_max_concurrent") or 1)) - - async def _drain() -> None: - leftover = list(ids) - while leftover: - while self._active_records >= max_rec: - await asyncio.sleep(0.25) - jid = leftover.pop(0) - job = tiktok_db.claim_tiktok_job_record(jid) - if not job: - continue - self._active_records += 1 - asyncio.create_task(self._run_record(job)) - - asyncio.create_task(_drain()) - return min(len(ids), max_rec) - - async def upload_job_now(self, job_id: str, *, channel_pk: str = "") -> dict[str, Any]: - pk = str(channel_pk or "").strip() - if pk: - ch = tiktok_db.get_tiktok_channel(pk) - if not ch or not ch.get("enabled"): - raise ValueError("所选 TikTok 账号不存在或已停用") - if not tiktok_session.channel_has_session(ch): - raise ValueError("所选账号未配置 Cookie") - tiktok_db.update_tiktok_job(job_id, channel_pk=pk) - job = tiktok_db.claim_tiktok_job_manual_upload(job_id) - if not job: - raise ValueError("任务不可立即上传(需要成片且未发布;上传中卡住的可强制重试)") - if pk and str(job.get("channel_pk") or "") != pk: - tiktok_db.update_tiktok_job(job_id, channel_pk=pk) - job = {**job, "channel_pk": pk} - try: - await self._do_upload(job, manual=True) - except Exception as exc: - err = str(exc)[:500] - ch_pk = str((job.get("channel_pk") or pk or "")).strip() - if ch_pk and is_platform_rate_limit(err): - tiktok_db.mark_tiktok_platform_limit(ch_pk, err) - tiktok_db.update_tiktok_job( - job_id, - status="recorded", - error=err, - finished_at=0, - ) - else: - tiktok_db.update_tiktok_job( - job_id, - status="failed", - error=err, - finished_at=time.time(), - ) - raise - fresh = tiktok_db.get_tiktok_job(job_id) - if not fresh: - raise ValueError("任务不存在") - if str(fresh.get("status") or "") not in {"uploaded", "done"}: - # _do_upload may have soft-held as recorded under platform limit without raising - raise ValueError(str(fresh.get("error") or "上传未完成")) - return fresh - - async def _loop(self) -> None: - while not self._stop.is_set(): - try: - cfg = db.get_settings_map() - if not cfg.get("tiktok_enabled"): - await asyncio.sleep(5) - continue - interval = max(60.0, float(cfg.get("tiktok_live_sample_interval_sec") or 180)) - if cfg.get("tiktok_live_sample", True) and (time.time() - self._last_sample_at) >= interval: - self._last_sample_at = time.time() - n = try_sample_live_rooms(cfg) - if n: - self.sampled += n - session_interval = max(600.0, float(cfg.get("tiktok_oauth_check_interval_sec") or 3600)) - if (time.time() - self._last_oauth_check_at) >= session_interval: - self._last_oauth_check_at = time.time() - for ch in tiktok_db.list_tiktok_channels(enabled=True): - asyncio.create_task(asyncio.to_thread(tiktok_session.probe_channel_session, ch)) - retry_interval = max(120.0, float(cfg.get("tiktok_auto_retry_interval_sec") or 300)) - if cfg.get("tiktok_auto_retry_failed") and (time.time() - self._last_auto_retry_at) >= retry_interval: - self._last_auto_retry_at = time.time() - for j in tiktok_db.list_auto_retry_tiktok_failed(limit=10): - tiktok_db.update_tiktok_job( - str(j["id"]), - status="scheduled", - upload_at=pick_upload_at(channel_pk=str(j.get("channel_pk") or ""), cfg=cfg), - error="", - ) - try: - tiktok_db.reclaim_stale_tiktok_uploads(max_age_sec=900) - except Exception: - pass - try: - tiktok_db.reclaim_stale_tiktok_recordings(max_age_sec=240) - except Exception: - pass - try: - tiktok_db.backfill_tiktok_job_channels(limit=20) - except Exception: - pass - if not self._soft_quota_rescued: - try: - tiktok_db.reschedule_soft_quota_held_jobs(limit=80) - except Exception: - pass - self._soft_quota_rescued = True - # Hourly: probe accounts that hit real TikTok platform limits - if (time.time() - self._last_limit_probe_at) >= 60: - self._last_limit_probe_at = time.time() - await self._maybe_probe_platform_limits(cfg) - max_up = max(1, int(cfg.get("tiktok_max_concurrent") or 1)) - while self._active_uploads < max_up: - job = tiktok_db.claim_due_tiktok_upload() - if not job: - break - self._active_uploads += 1 - asyncio.create_task(self._run_upload(job)) - max_rec = max(1, int(cfg.get("tiktok_max_concurrent") or 1)) - try: - from .host_metrics import clip_encode_defer_reason - - defer_rec = clip_encode_defer_reason() - except Exception: - defer_rec = "" - while not defer_rec and self._active_records < max_rec: - job = tiktok_db.claim_pending_tiktok_record() - if not job: - break - self._active_records += 1 - asyncio.create_task(self._run_record(job)) - except Exception as exc: - self.last_error = str(exc)[:240] - await asyncio.sleep(5) - - async def _run_upload(self, job: dict[str, Any], *, probe: bool = False) -> None: - jid = str(job.get("id") or "") - if not jid or jid in self._upload_inflight: - self._active_uploads = max(0, self._active_uploads - 1) - return - self._upload_inflight.add(jid) - try: - await self._do_upload(job, manual=False, probe=probe) - self.processed += 1 - except Exception as exc: - self.last_error = str(exc)[:240] - err = str(exc)[:500] - ch_pk = str(job.get("channel_pk") or "") - if ch_pk and is_platform_rate_limit(err): - tiktok_db.mark_tiktok_platform_limit(ch_pk, err) - tiktok_db.update_tiktok_job( - jid, - status="recorded", - error=err, - finished_at=0, - ) - else: - tiktok_db.update_tiktok_job( - jid, - status="failed", - error=err, - finished_at=time.time(), - ) - finally: - self._upload_inflight.discard(jid) - self._active_uploads = max(0, self._active_uploads - 1) - - async def _run_record(self, job: dict[str, Any]) -> None: - try: - await self._do_record(job) - except Exception as exc: - self.last_error = str(exc)[:240] - tiktok_db.update_tiktok_job( - str(job.get("id") or ""), - status="failed", - error=str(exc)[:500], - finished_at=time.time(), - ) - finally: - self._active_records = max(0, self._active_records - 1) - - async def _do_record(self, job: dict[str, Any]) -> None: - cfg = db.get_settings_map() - jid = str(job.get("id") or "") - cookie = str(cfg.get("dy_cookie") or "") - source = str(job.get("source_url") or "") - - async def _fresh_candidates() -> list[str]: - return await resolve_stream_candidates( - source_url=source, - stream_url="", - cookie=cookie, - prefer_fresh=True, - max_candidates=8, - ) - - candidates = await _fresh_candidates() - if not candidates: - err = str(job.get("error") or "") - # 取样入队时在播,真正开录时可能已下播或取流抖动:给一次重排队 - if "stream_retry" not in err and (time.time() - float(job.get("created_at") or 0)) < 900: - tiktok_db.update_tiktok_job( - jid, - status="pending", - error="stream_retry:1", - stream_url="", - started_at=0, - ) - return - tiktok_db.update_tiktok_job( - jid, - status="failed", - error="无法获取直播流(可能已停播)", - finished_at=time.time(), - ) - return - - # TikTok 素材 1–1.5 分钟;多 CDN 线路按 DouyinLiveRecorder 方式试探 - try: - sec = int(cfg.get("tiktok_clip_sec") or 75) - except Exception: - sec = 75 - sec = max(60, min(90, sec)) - try: - room_pk = str(job.get("room_pk") or "") - room = db.get_room(room_pk) if room_pk else None - override = db.room_clip_seconds(room, default=0, platform="tiktok") if room else 0 - if override > 0: - sec = max(60, min(90, override)) - except Exception: - pass - outcome = await record_clip( - job_id=f"tiktok_{jid[:8]}", - stream_urls=candidates, - seconds=sec, - ) - stream = str(outcome.get("stream_url") or (candidates[0] if candidates else "")) - if not outcome.get("ok"): - err = str(outcome.get("error") or "录制失败") - low = err.lower() - # 整批线路失败:重新拉房源再试一次(等价 DLR 换源) - if any(x in low for x in ("404", "error opening", "server returned", "probe 404")) and "stream_ffmpeg_retry" not in str( - job.get("error") or "" - ): - cands2 = await _fresh_candidates() - # Prefer URLs not already tried - fresh_only = [u for u in cands2 if u not in candidates] or cands2 - if fresh_only: - outcome2 = await record_clip( - job_id=f"tiktok_{jid[:8]}r", - stream_urls=fresh_only, - seconds=sec, - ) - if outcome2.get("ok"): - outcome = outcome2 - stream = str(outcome2.get("stream_url") or fresh_only[0]) - err = "" - else: - err = str(outcome2.get("error") or err) - if err: - tiktok_db.update_tiktok_job(jid, error="stream_ffmpeg_retry:1") - if not outcome.get("ok"): - tiktok_db.update_tiktok_job( - jid, - status="failed", - error=err[:500], - stream_url="", - finished_at=time.time(), - ) - return - - out_path = str(outcome.get("path") or "") - seconds = float(outcome.get("seconds") or sec) - try: - from .clip_quality import assert_clip_quality - - assert_clip_quality(out_path) - except ValueError as qerr: - tiktok_db.update_tiktok_job( - jid, - status="failed", - clip_path=out_path, - clip_seconds=seconds, - stream_url=stream, - error=str(qerr)[:500], - finished_at=time.time(), - ) - return - day = str(job.get("push_date") or push_date_from_ts(time.time())) - channel = tiktok_db.ensure_tiktok_job_channel(job, require_quota=False) - ch_pk = str((channel or {}).get("id") or job.get("channel_pk") or "") - if cfg.get("tiktok_auto_upload", True) and ch_pk: - # Soft target (official ~15) only affects channel picking / board, not hard-hold clips. - upload_at = pick_upload_at(channel_pk=ch_pk, push_date=day, cfg=cfg) - tiktok_db.update_tiktok_job( - jid, - status="scheduled", - clip_path=out_path, - clip_seconds=seconds, - stream_url=stream, - channel_pk=ch_pk, - upload_at=upload_at, - error="", - ) - else: - tiktok_db.update_tiktok_job( - jid, - status="recorded", - clip_path=out_path, - clip_seconds=seconds, - stream_url=stream, - channel_pk=ch_pk, - error="" if ch_pk else "成片已保留,待分配 TikTok 账号", - ) - - async def _maybe_probe_platform_limits(self, cfg: dict[str, Any]) -> None: - """Once per hour per limited account: try a real upload; success clears the prompt.""" - gap = max(3600.0, float(cfg.get("tiktok_platform_limit_probe_sec") or 3600)) - for ch in tiktok_db.list_tiktok_channels_needing_limit_probe(min_gap_sec=gap): - if self._active_uploads >= max(1, int(cfg.get("tiktok_max_concurrent") or 1)): - break - job = tiktok_db.claim_tiktok_limit_probe_job(str(ch.get("id") or "")) - if not job: - # No clip to probe — bump probe clock so we don't spin every minute - tiktok_db.update_tiktok_channel( - str(ch.get("id") or ""), - platform_limit_probe_at=time.time(), - ) - continue - self._active_uploads += 1 - asyncio.create_task(self._run_upload(job, probe=True)) - - async def _do_upload(self, job: dict[str, Any], *, manual: bool = False, probe: bool = False) -> None: - cfg = db.get_settings_map() - jid = str(job.get("id") or "") - fresh = tiktok_db.get_tiktok_job(jid) or job - if str(fresh.get("tiktok_video_id") or "").strip() or str(fresh.get("tiktok_publish_id") or "").strip(): - tiktok_db.finalize_tiktok_upload( - jid, - tiktok_publish_id=str(fresh.get("tiktok_publish_id") or ""), - tiktok_video_id=str(fresh.get("tiktok_video_id") or ""), - ) - return - clip = str(fresh.get("clip_path") or "") - if not clip or not Path(clip).is_file(): - raise ValueError("成片文件不存在") - channel = tiktok_db.ensure_tiktok_job_channel(fresh, require_quota=False) - if not channel: - tiktok_db.update_tiktok_job(jid, status="recorded", error="成片已保留,待分配 TikTok 账号后再上传") - return - ch_pk = str(channel["id"]) - if ( - not manual - and not probe - and tiktok_db.channel_has_platform_limit(channel) - ): - # Hold auto uploads while platform-limited; hourly probe path bypasses this. - tiktok_db.update_tiktok_job( - jid, - status="scheduled", - channel_pk=ch_pk, - upload_at=time.time() + 3600, - error=str(channel.get("platform_limit_msg") or "TikTok 官方限流,等待每小时试传"), - ) - return - if not tiktok_session.channel_has_session(channel): - tiktok_db.update_tiktok_job( - jid, - status="scheduled", - upload_at=time.time() + 1800, - error="账号未配置 Cookie(已延后 30 分钟再试)", - ) - return - # 文案 = 账号自定义模板(+1) + DB 中 100 条英文 street food 随机其一 - from . import caption_pool - - picked = caption_pool.pick_caption( - "tiktok", - custom=str(channel.get("title_template") or "").strip(), - anchor=str(fresh.get("anchor_name") or job.get("anchor_name") or "").strip(), - room=str(fresh.get("room_id") or job.get("room_id") or "").strip(), - ) - title = str(picked.get("text") or "").strip() - if not tiktok_db.touch_tiktok_upload_lease(jid): - return - proxy = resolve_channel_socks_proxy(channel, cfg) or None - try: - result = await upload_tiktok_mp4( - file_path=clip, - title=title, - description="", - privacy_level=str(channel.get("privacy_level") or "PUBLIC_TO_EVERYONE"), - channel_pk=ch_pk, - proxy=proxy, - ) - except Exception as exc: - err = str(exc)[:500] - if is_platform_rate_limit(err): - tiktok_db.mark_tiktok_platform_limit(ch_pk, err) - tiktok_db.update_tiktok_job( - jid, - status="recorded", - channel_pk=ch_pk, - error=err, - finished_at=0, - ) - return - raise - pub = str(result.get("publish_id") or "").strip() or f"cookie-{jid[:12]}" - vid = str(result.get("video_id") or "").strip() or pub - if not tiktok_db.finalize_tiktok_upload( - jid, - tiktok_publish_id=pub, - tiktok_video_id=vid, - ): - return - # Successful upload clears any platform-limit banner (hourly probe or normal) - tiktok_db.clear_tiktok_platform_limit(ch_pk) - tiktok_db.update_tiktok_channel( - ch_pk, - oauth_ok=1, - oauth_checked_at=time.time(), - oauth_error="", - ) - privacy = str(channel.get("privacy_level") or "PUBLIC_TO_EVERYONE").strip().upper() - if privacy in {"SELF_ONLY", "PRIVATE"} and cfg.get("notify_on_tiktok_unaudited", True): - try: - from .notify import send_webhook - - asyncio.create_task( - send_webhook( - "tiktok_unaudited", - { - "message": f"TikTok 已上传但仅自己可见({privacy}):{fresh.get('anchor_name') or jid}", - "job_id": jid, - "channel_pk": ch_pk, - "privacy_level": privacy, - "platform": "tiktok", - }, - ) - ) - except Exception: - pass - if cfg.get("tiktok_delete_clip_after_upload", True): - try: - Path(clip).unlink(missing_ok=True) - except Exception: - pass - - @staticmethod - def _delete_clip(path: str) -> None: - try: - Path(path).unlink(missing_ok=True) - except Exception: - pass - - -tiktok_pipeline = TikTokPipeline() +# -*- coding: utf-8 -*- +"""Isolated TikTok pipeline — never touches Shorts or Douyin monitor.""" +from __future__ import annotations + +import asyncio +import random +import time +from pathlib import Path +from typing import Any, Optional + +from . import db +from . import tiktok_db +from . import tiktok_session +from .shorts_clip import record_clip, resolve_stream_candidates +from .tiktok_schedule import pick_upload_at, schedule_board +from .tiktok_socks import resolve_channel_socks_proxy +from .tiktok_upload import is_platform_rate_limit, upload_tiktok_mp4 +from .timeutil import push_date_from_ts + + +def _room_tags(room: dict[str, Any]) -> list[str]: + tags = room.get("tags") or [] + if isinstance(tags, str): + return [t.strip() for t in tags.split(",") if t.strip()] + return [str(t).strip() for t in tags if str(t).strip()] + + +def _room_eligible(room: dict[str, Any], cfg: dict[str, Any]) -> bool: + trigger = str(cfg.get("tiktok_trigger") or "tagged").strip().lower() + tags = _room_tags(room) + if trigger == "all": + return True + if trigger == "favorite": + return any(t in {"收藏", "重点", "priority", "vip", "高优", "shorts", "tiktok"} for t in tags) + if "shorts_only" in tags or "x_only" in tags: + return False + tag = str(cfg.get("tiktok_tag") or "shorts").strip() or "shorts" + return tag in tags or "tiktok" in tags or "shorts" in tags or "both" in tags + + +def _enqueue_job( + *, + session: dict[str, Any] | None, + room: dict[str, Any], + stream_url: str = "", + cfg: dict[str, Any] | None = None, + channel_pk: str = "", + force: bool = False, + push_date: str = "", + require_channel: bool = True, +) -> Optional[dict[str, Any]]: + try: + settings = cfg or db.get_settings_map() + if not force and not settings.get("tiktok_enabled"): + return None + room_id = str(room.get("room_id") or (session or {}).get("room_id") or "") + if room_id.startswith("yt:"): + return None + day = str(push_date or "").strip() or push_date_from_ts(time.time()) + if settings.get("tiktok_dedupe_room_day", True) and room_id: + if tiktok_db.has_tiktok_job_for_room_day(room_id, day): + return None + channel: dict[str, Any] | None = None + if channel_pk: + ch = tiktok_db.get_tiktok_channel(channel_pk) + if ch and ch.get("enabled") and tiktok_session.channel_has_session(ch): + used = tiktok_db.tiktok_channel_upload_count(channel_pk, day) + if used < db.TIKTOK_DAILY_FORCE: + channel = ch + if not channel: + # Prefer under upload-quota; if all full, soft-assign so job still has an owner account + channel = tiktok_db.pick_tiktok_channel(day, require_quota=True) + if not channel: + channel = tiktok_db.pick_tiktok_channel(day, require_quota=False) + if require_channel and not channel: + return None + sid = str((session or {}).get("id") or room.get("active_session_id") or "") + return tiktok_db.create_tiktok_job( + session_id=sid, + room_pk=str(room.get("id") or (session or {}).get("room_pk") or ""), + room_id=room_id, + source_url=str((session or {}).get("source_url") or room.get("url") or ""), + anchor_name=str( + (session or {}).get("anchor_name") or room.get("last_anchor") or room.get("last_title") or "" + ), + stream_url=str(stream_url or ""), + channel_pk=str((channel or {}).get("id") or ""), + push_date=day, + ) + except Exception: + return None + + +def try_sample_live_rooms(cfg: dict[str, Any] | None = None) -> int: + settings = cfg or db.get_settings_map() + if not settings.get("tiktok_enabled") or not settings.get("tiktok_live_sample", True): + return 0 + batch = max(1, int(settings.get("tiktok_live_sample_batch") or 1)) + rooms = db.list_live_douyin_rooms_for_shorts(limit=400) + if settings.get("tiktok_sample_any_live", True): + candidates = list(rooms) + else: + candidates = [r for r in rooms if _room_eligible(r, settings)] + if not candidates: + return 0 + random.shuffle(candidates) + n = 0 + for room in candidates[: batch * 3]: + if n >= batch: + break + sid = str(room.get("active_session_id") or "") + session = db.get_session(sid) if sid else None + if _enqueue_job(session=session, room=room, cfg=settings): + n += 1 + return n + + +def sample_live_now(cfg: dict[str, Any] | None = None) -> dict[str, Any]: + """Manual sample: enqueue current Douyin lives and return job ids for immediate record.""" + settings = cfg or db.get_settings_map() + rooms = db.list_live_douyin_rooms_for_shorts(limit=400) + live_count = len(rooms) + empty = { + "enqueued": 0, + "job_ids": [], + "live_count": live_count, + "skipped_dedupe": 0, + "reason": "", + } + if live_count <= 0: + empty["reason"] = "当前没有抖音在播直播间" + return empty + day = push_date_from_ts(time.time()) + if settings.get("tiktok_sample_any_live", True): + candidates = list(rooms) + else: + candidates = [r for r in rooms if _room_eligible(r, settings)] + unused: list[dict[str, Any]] = [] + skipped = 0 + for room in candidates: + rid = str(room.get("room_id") or "") + if not rid: + continue + if settings.get("tiktok_dedupe_room_day", True) and tiktok_db.has_tiktok_job_for_room_day(rid, day): + skipped += 1 + continue + unused.append(room) + if not unused: + empty["skipped_dedupe"] = skipped + empty["reason"] = f"在播 {live_count} 间均已今日取样" + return empty + batch = min(len(unused), 3) + random.shuffle(unused) + job_ids: list[str] = [] + for room in unused[:batch]: + sid = str(room.get("active_session_id") or "") + session = db.get_session(sid) if sid else None + job = _enqueue_job( + session=session, + room=room, + cfg=settings, + force=True, + push_date=day, + require_channel=False, + ) + if job and job.get("id"): + job_ids.append(str(job["id"])) + reason = "" if job_ids else "入队失败(可能已有同房间任务)" + return { + "enqueued": len(job_ids), + "job_ids": job_ids, + "live_count": live_count, + "skipped_dedupe": skipped, + "reason": reason, + } + + +def try_fill_daily_quota(cfg: dict[str, Any] | None = None) -> int: + """Enqueue live-room clips toward each TikTok channel's daily_max (Beijing day).""" + try: + settings = cfg or db.get_settings_map() + if not settings.get("tiktok_enabled"): + return 0 + day = push_date_from_ts(time.time()) + gap_total = tiktok_db.tiktok_total_quota_gap(day) + if gap_total <= 0: + return 0 + if not tiktok_db.pick_tiktok_channel(day, require_quota=True): + return 0 + from .timeutil import beijing_day_bounds + + day_start, day_end = beijing_day_bounds(day) + now = time.time() + day_progress = max(0.0, min(1.0, (now - day_start) / max(1.0, day_end - day_start))) + base_batch = max(1, min(int(settings.get("tiktok_quota_fill_batch") or 3), 10)) + if day_progress > 0.7: + base_batch = max(base_batch, min(gap_total, 8)) + rooms = db.list_live_douyin_rooms_for_shorts(limit=400) + any_live = settings.get("tiktok_sample_any_live", True) + candidates: list[dict[str, Any]] = [] + for room in rooms: + rid = str(room.get("room_id") or "") + if not rid: + continue + if tiktok_db.has_tiktok_job_for_room_day(rid, day): + continue + if any_live or _room_eligible(room, settings): + candidates.append(room) + if not candidates: + return 0 + random.shuffle(candidates) + enqueued = 0 + for room in candidates: + if enqueued >= base_batch: + break + if not tiktok_db.pick_tiktok_channel(day, require_quota=True): + break + sid = str(room.get("active_session_id") or "") + session = db.get_session(sid) if sid else None + if _enqueue_job(session=session, room=room, cfg=settings): + enqueued += 1 + return enqueued + except Exception: + return 0 + + +class TikTokPipeline: + def __init__(self) -> None: + self._task: asyncio.Task | None = None + self._stop = asyncio.Event() + self._active_records = 0 + self._active_uploads = 0 + self.processed = 0 + self.sampled = 0 + self.last_error = "" + self._last_sample_at = 0.0 + self._last_oauth_check_at = 0.0 + self._last_auto_retry_at = 0.0 + self._last_limit_probe_at = 0.0 + self._soft_quota_rescued = False + self._upload_inflight: set[str] = set() + + def status(self) -> dict[str, Any]: + now = time.time() + cached = getattr(self, "_status_cache", None) + cache_at = float(getattr(self, "_status_cache_at", 0) or 0) + if cached is not None and (now - cache_at) < 2.0: + return cached + + cfg = db.get_settings_map() + try: + board = schedule_board(limit=30) + except Exception: + board = {} + oauth_issues = [] + for ch in tiktok_db.list_tiktok_channels(enabled=True): + ok_flag = int(ch.get("oauth_ok") if ch.get("oauth_ok") is not None else -1) + if ok_flag == 0 or not tiktok_session.channel_has_session(ch): + oauth_issues.append( + { + "id": ch.get("id"), + "name": ch.get("name"), + "oauth_error": ch.get("oauth_error") or "未授权", + } + ) + try: + from . import douyin_live + + live_count = int(douyin_live.build_live_map().get("live_count") or 0) + except Exception: + live_count = 0 + payload = { + "running": bool(self._task and not self._task.done()), + "busy": self._active_records > 0 or self._active_uploads > 0, + "enabled": bool(cfg.get("tiktok_enabled")), + "processed": self.processed, + "sampled": self.sampled, + "quota_gap": tiktok_db.tiktok_total_quota_gap(), + "quota_defaults": db.tiktok_quota_defaults(cfg), + "last_error": self.last_error, + "clip_sec": max(60, min(90, int(cfg.get("tiktok_clip_sec") or 75))), + "douyin_live_count": live_count, + "board": board, + "oauth_issues": oauth_issues, + "stats": tiktok_db.tiktok_stats(), + } + self._status_cache = payload + self._status_cache_at = time.time() + return payload + + async def start(self) -> None: + if self._task and not self._task.done(): + return + self._stop.clear() + self._task = asyncio.create_task(self._loop(), name="tiktok-pipeline") + + async def stop(self) -> None: + self._stop.set() + if self._task: + try: + await asyncio.wait_for(self._task, timeout=5) + except Exception: + self._task.cancel() + self._task = None + + async def kick_pending_records(self, job_ids: list[str]) -> int: + ids = [str(j) for j in job_ids if str(j).strip()] + if not ids: + return 0 + cfg = db.get_settings_map() + max_rec = max(1, int(cfg.get("tiktok_max_concurrent") or 1)) + + async def _drain() -> None: + leftover = list(ids) + while leftover: + while self._active_records >= max_rec: + await asyncio.sleep(0.25) + jid = leftover.pop(0) + job = tiktok_db.claim_tiktok_job_record(jid) + if not job: + continue + self._active_records += 1 + asyncio.create_task(self._run_record(job)) + + asyncio.create_task(_drain()) + return min(len(ids), max_rec) + + async def upload_job_now(self, job_id: str, *, channel_pk: str = "") -> dict[str, Any]: + pk = str(channel_pk or "").strip() + if pk: + ch = tiktok_db.get_tiktok_channel(pk) + if not ch or not ch.get("enabled"): + raise ValueError("所选 TikTok 账号不存在或已停用") + if not tiktok_session.channel_has_session(ch): + raise ValueError("所选账号未配置 Cookie") + tiktok_db.update_tiktok_job(job_id, channel_pk=pk) + job = tiktok_db.claim_tiktok_job_manual_upload(job_id) + if not job: + raise ValueError("任务不可立即上传(需要成片且未发布;上传中卡住的可强制重试)") + if pk and str(job.get("channel_pk") or "") != pk: + tiktok_db.update_tiktok_job(job_id, channel_pk=pk) + job = {**job, "channel_pk": pk} + try: + await self._do_upload(job, manual=True) + except Exception as exc: + err = str(exc)[:500] + ch_pk = str((job.get("channel_pk") or pk or "")).strip() + if ch_pk and is_platform_rate_limit(err): + tiktok_db.mark_tiktok_platform_limit(ch_pk, err) + tiktok_db.update_tiktok_job( + job_id, + status="recorded", + error=err, + finished_at=0, + ) + else: + tiktok_db.update_tiktok_job( + job_id, + status="failed", + error=err, + finished_at=time.time(), + ) + raise + fresh = tiktok_db.get_tiktok_job(job_id) + if not fresh: + raise ValueError("任务不存在") + if str(fresh.get("status") or "") not in {"uploaded", "done"}: + # _do_upload may have soft-held as recorded under platform limit without raising + raise ValueError(str(fresh.get("error") or "上传未完成")) + return fresh + + async def _loop(self) -> None: + while not self._stop.is_set(): + try: + cfg = db.get_settings_map() + if not cfg.get("tiktok_enabled"): + await asyncio.sleep(5) + continue + interval = max(60.0, float(cfg.get("tiktok_live_sample_interval_sec") or 180)) + if cfg.get("tiktok_live_sample", True) and (time.time() - self._last_sample_at) >= interval: + self._last_sample_at = time.time() + n = try_sample_live_rooms(cfg) + if n: + self.sampled += n + session_interval = max(600.0, float(cfg.get("tiktok_oauth_check_interval_sec") or 3600)) + if (time.time() - self._last_oauth_check_at) >= session_interval: + self._last_oauth_check_at = time.time() + for ch in tiktok_db.list_tiktok_channels(enabled=True): + asyncio.create_task(asyncio.to_thread(tiktok_session.probe_channel_session, ch)) + retry_interval = max(120.0, float(cfg.get("tiktok_auto_retry_interval_sec") or 300)) + if cfg.get("tiktok_auto_retry_failed") and (time.time() - self._last_auto_retry_at) >= retry_interval: + self._last_auto_retry_at = time.time() + today = push_date_from_ts(time.time()) + for j in tiktok_db.list_auto_retry_tiktok_failed(limit=10): + ch_pk = str(j.get("channel_pk") or "") + if ch_pk and tiktok_db.channel_at_daily_upload_max(ch_pk, today): + tiktok_db.defer_tiktok_job_to_next_day(str(j["id"]), stagger_sec=120) + continue + tiktok_db.update_tiktok_job( + str(j["id"]), + status="scheduled", + upload_at=pick_upload_at(channel_pk=ch_pk, cfg=cfg), + error="", + ) + try: + tiktok_db.reclaim_stale_tiktok_uploads(max_age_sec=900) + except Exception: + pass + try: + tiktok_db.reclaim_stale_tiktok_recordings(max_age_sec=240) + except Exception: + pass + try: + tiktok_db.backfill_tiktok_job_channels(limit=20) + except Exception: + pass + if not self._soft_quota_rescued: + try: + tiktok_db.reschedule_soft_quota_held_jobs(limit=80) + except Exception: + pass + self._soft_quota_rescued = True + # Hourly: probe accounts that hit real TikTok platform limits + if (time.time() - self._last_limit_probe_at) >= 60: + self._last_limit_probe_at = time.time() + await self._maybe_probe_platform_limits(cfg) + max_up = max(1, int(cfg.get("tiktok_max_concurrent") or 1)) + while self._active_uploads < max_up: + job = tiktok_db.claim_due_tiktok_upload() + if not job: + break + self._active_uploads += 1 + asyncio.create_task(self._run_upload(job)) + max_rec = max(1, int(cfg.get("tiktok_max_concurrent") or 1)) + try: + from .host_metrics import clip_encode_defer_reason + + defer_rec = clip_encode_defer_reason() + except Exception: + defer_rec = "" + while not defer_rec and self._active_records < max_rec: + job = tiktok_db.claim_pending_tiktok_record() + if not job: + break + self._active_records += 1 + asyncio.create_task(self._run_record(job)) + except Exception as exc: + self.last_error = str(exc)[:240] + await asyncio.sleep(5) + + async def _run_upload(self, job: dict[str, Any], *, probe: bool = False) -> None: + jid = str(job.get("id") or "") + if not jid or jid in self._upload_inflight: + self._active_uploads = max(0, self._active_uploads - 1) + return + self._upload_inflight.add(jid) + try: + await self._do_upload(job, manual=False, probe=probe) + self.processed += 1 + except Exception as exc: + self.last_error = str(exc)[:240] + err = str(exc)[:500] + ch_pk = str(job.get("channel_pk") or "") + if ch_pk and is_platform_rate_limit(err): + tiktok_db.mark_tiktok_platform_limit(ch_pk, err) + tiktok_db.update_tiktok_job( + jid, + status="recorded", + error=err, + finished_at=0, + ) + else: + tiktok_db.update_tiktok_job( + jid, + status="failed", + error=err, + finished_at=time.time(), + ) + finally: + self._upload_inflight.discard(jid) + self._active_uploads = max(0, self._active_uploads - 1) + + async def _run_record(self, job: dict[str, Any]) -> None: + try: + await self._do_record(job) + except Exception as exc: + self.last_error = str(exc)[:240] + tiktok_db.update_tiktok_job( + str(job.get("id") or ""), + status="failed", + error=str(exc)[:500], + finished_at=time.time(), + ) + finally: + self._active_records = max(0, self._active_records - 1) + + async def _do_record(self, job: dict[str, Any]) -> None: + cfg = db.get_settings_map() + jid = str(job.get("id") or "") + cookie = str(cfg.get("dy_cookie") or "") + source = str(job.get("source_url") or "") + + async def _fresh_candidates() -> list[str]: + return await resolve_stream_candidates( + source_url=source, + stream_url="", + cookie=cookie, + prefer_fresh=True, + max_candidates=8, + ) + + candidates = await _fresh_candidates() + if not candidates: + err = str(job.get("error") or "") + # 取样入队时在播,真正开录时可能已下播或取流抖动:给一次重排队 + if "stream_retry" not in err and (time.time() - float(job.get("created_at") or 0)) < 900: + tiktok_db.update_tiktok_job( + jid, + status="pending", + error="stream_retry:1", + stream_url="", + started_at=0, + ) + return + tiktok_db.update_tiktok_job( + jid, + status="failed", + error="无法获取直播流(可能已停播)", + finished_at=time.time(), + ) + return + + # TikTok 素材 1–1.5 分钟;多 CDN 线路按 DouyinLiveRecorder 方式试探 + try: + sec = int(cfg.get("tiktok_clip_sec") or 75) + except Exception: + sec = 75 + sec = max(60, min(90, sec)) + try: + room_pk = str(job.get("room_pk") or "") + room = db.get_room(room_pk) if room_pk else None + override = db.room_clip_seconds(room, default=0, platform="tiktok") if room else 0 + if override > 0: + sec = max(60, min(90, override)) + except Exception: + pass + outcome = await record_clip( + job_id=f"tiktok_{jid[:8]}", + stream_urls=candidates, + seconds=sec, + ) + stream = str(outcome.get("stream_url") or (candidates[0] if candidates else "")) + if not outcome.get("ok"): + err = str(outcome.get("error") or "录制失败") + low = err.lower() + # 整批线路失败:重新拉房源再试一次(等价 DLR 换源) + if any(x in low for x in ("404", "error opening", "server returned", "probe 404")) and "stream_ffmpeg_retry" not in str( + job.get("error") or "" + ): + cands2 = await _fresh_candidates() + # Prefer URLs not already tried + fresh_only = [u for u in cands2 if u not in candidates] or cands2 + if fresh_only: + outcome2 = await record_clip( + job_id=f"tiktok_{jid[:8]}r", + stream_urls=fresh_only, + seconds=sec, + ) + if outcome2.get("ok"): + outcome = outcome2 + stream = str(outcome2.get("stream_url") or fresh_only[0]) + err = "" + else: + err = str(outcome2.get("error") or err) + if err: + tiktok_db.update_tiktok_job(jid, error="stream_ffmpeg_retry:1") + if not outcome.get("ok"): + tiktok_db.update_tiktok_job( + jid, + status="failed", + error=err[:500], + stream_url="", + finished_at=time.time(), + ) + return + + out_path = str(outcome.get("path") or "") + seconds = float(outcome.get("seconds") or sec) + try: + from .clip_quality import assert_clip_quality + + assert_clip_quality(out_path) + except ValueError as qerr: + tiktok_db.update_tiktok_job( + jid, + status="failed", + clip_path=out_path, + clip_seconds=seconds, + stream_url=stream, + error=str(qerr)[:500], + finished_at=time.time(), + ) + return + day = str(job.get("push_date") or push_date_from_ts(time.time())) + channel = tiktok_db.ensure_tiktok_job_channel(job, require_quota=False) + ch_pk = str((channel or {}).get("id") or job.get("channel_pk") or "") + if cfg.get("tiktok_auto_upload", True) and ch_pk: + # Soft target (official ~15) only affects channel picking / board, not hard-hold clips. + upload_at = pick_upload_at(channel_pk=ch_pk, push_date=day, cfg=cfg) + tiktok_db.update_tiktok_job( + jid, + status="scheduled", + clip_path=out_path, + clip_seconds=seconds, + stream_url=stream, + channel_pk=ch_pk, + upload_at=upload_at, + error="", + ) + else: + tiktok_db.update_tiktok_job( + jid, + status="recorded", + clip_path=out_path, + clip_seconds=seconds, + stream_url=stream, + channel_pk=ch_pk, + error="" if ch_pk else "成片已保留,待分配 TikTok 账号", + ) + + async def _maybe_probe_platform_limits(self, cfg: dict[str, Any]) -> None: + """Once per hour per limited account: try a real upload; success clears the prompt.""" + gap = max(3600.0, float(cfg.get("tiktok_platform_limit_probe_sec") or 3600)) + for ch in tiktok_db.list_tiktok_channels_needing_limit_probe(min_gap_sec=gap): + if self._active_uploads >= max(1, int(cfg.get("tiktok_max_concurrent") or 1)): + break + job = tiktok_db.claim_tiktok_limit_probe_job(str(ch.get("id") or "")) + if not job: + # No clip to probe — bump probe clock so we don't spin every minute + tiktok_db.update_tiktok_channel( + str(ch.get("id") or ""), + platform_limit_probe_at=time.time(), + ) + continue + self._active_uploads += 1 + asyncio.create_task(self._run_upload(job, probe=True)) + + async def _do_upload(self, job: dict[str, Any], *, manual: bool = False, probe: bool = False) -> None: + cfg = db.get_settings_map() + jid = str(job.get("id") or "") + fresh = tiktok_db.get_tiktok_job(jid) or job + if str(fresh.get("tiktok_video_id") or "").strip() or str(fresh.get("tiktok_publish_id") or "").strip(): + tiktok_db.finalize_tiktok_upload( + jid, + tiktok_publish_id=str(fresh.get("tiktok_publish_id") or ""), + tiktok_video_id=str(fresh.get("tiktok_video_id") or ""), + ) + return + clip = str(fresh.get("clip_path") or "") + if not clip or not Path(clip).is_file(): + raise ValueError("成片文件不存在") + channel = tiktok_db.ensure_tiktok_job_channel(fresh, require_quota=False) + if not channel: + tiktok_db.update_tiktok_job(jid, status="recorded", error="成片已保留,待分配 TikTok 账号后再上传") + return + ch_pk = str(channel["id"]) + day = str(fresh.get("push_date") or push_date_from_ts(time.time())) + if not manual and not probe and tiktok_db.channel_at_daily_upload_max(ch_pk): + # Auto path must respect per-account daily_max (manual upload-now may bypass). + tiktok_db.defer_tiktok_job_to_next_day(jid, stagger_sec=90) + return + if ( + not manual + and not probe + and tiktok_db.channel_has_platform_limit(channel) + ): + # Hold auto uploads while platform-limited; hourly probe path bypasses this. + tiktok_db.update_tiktok_job( + jid, + status="scheduled", + channel_pk=ch_pk, + upload_at=time.time() + 3600, + error=str(channel.get("platform_limit_msg") or "TikTok 官方限流,等待每小时试传"), + ) + return + if not tiktok_session.channel_has_session(channel): + tiktok_db.update_tiktok_job( + jid, + status="scheduled", + upload_at=time.time() + 1800, + error="账号未配置 Cookie(已延后 30 分钟再试)", + ) + return + # 文案 = 账号自定义模板(+1) + DB 中 100 条英文 street food 随机其一 + from . import caption_pool + + picked = caption_pool.pick_caption( + "tiktok", + custom=str(channel.get("title_template") or "").strip(), + anchor=str(fresh.get("anchor_name") or job.get("anchor_name") or "").strip(), + room=str(fresh.get("room_id") or job.get("room_id") or "").strip(), + ) + title = str(picked.get("text") or "").strip() + if not tiktok_db.touch_tiktok_upload_lease(jid): + return + proxy = resolve_channel_socks_proxy(channel, cfg) or None + try: + result = await upload_tiktok_mp4( + file_path=clip, + title=title, + description="", + privacy_level=str(channel.get("privacy_level") or "PUBLIC_TO_EVERYONE"), + channel_pk=ch_pk, + proxy=proxy, + ) + except Exception as exc: + err = str(exc)[:500] + if is_platform_rate_limit(err): + tiktok_db.mark_tiktok_platform_limit(ch_pk, err) + tiktok_db.update_tiktok_job( + jid, + status="recorded", + channel_pk=ch_pk, + error=err, + finished_at=0, + ) + return + raise + pub = str(result.get("publish_id") or "").strip() or f"cookie-{jid[:12]}" + vid = str(result.get("video_id") or "").strip() or pub + if not tiktok_db.finalize_tiktok_upload( + jid, + tiktok_publish_id=pub, + tiktok_video_id=vid, + ): + return + # Successful upload clears any platform-limit banner (hourly probe or normal) + tiktok_db.clear_tiktok_platform_limit(ch_pk) + tiktok_db.update_tiktok_channel( + ch_pk, + oauth_ok=1, + oauth_checked_at=time.time(), + oauth_error="", + ) + privacy = str(channel.get("privacy_level") or "PUBLIC_TO_EVERYONE").strip().upper() + if privacy in {"SELF_ONLY", "PRIVATE"} and cfg.get("notify_on_tiktok_unaudited", True): + try: + from .notify import send_webhook + + asyncio.create_task( + send_webhook( + "tiktok_unaudited", + { + "message": f"TikTok 已上传但仅自己可见({privacy}):{fresh.get('anchor_name') or jid}", + "job_id": jid, + "channel_pk": ch_pk, + "privacy_level": privacy, + "platform": "tiktok", + }, + ) + ) + except Exception: + pass + if cfg.get("tiktok_delete_clip_after_upload", True): + try: + Path(clip).unlink(missing_ok=True) + except Exception: + pass + + @staticmethod + def _delete_clip(path: str) -> None: + try: + Path(path).unlink(missing_ok=True) + except Exception: + pass + + +tiktok_pipeline = TikTokPipeline() diff --git a/backend/app/tiktok_session.py b/backend/app/tiktok_session.py index a92c004..0e9beb4 100644 --- a/backend/app/tiktok_session.py +++ b/backend/app/tiktok_session.py @@ -1,337 +1,337 @@ -# -*- coding: utf-8 -*- -"""TikTok cookie session — TiktokAutoUploader style, no developer OAuth.""" -from __future__ import annotations - -import os -import pickle -import sys -import time -from pathlib import Path -from typing import Any - -from . import db -from . import tiktok_db - -_VENDOR_ROOT = Path(__file__).resolve().parent.parent / "third_party" / "TiktokAutoUploader" -if str(_VENDOR_ROOT) not in sys.path: - sys.path.insert(0, str(_VENDOR_ROOT)) - -DEFAULT_DC = "useast2a" -COOKIE_TTL_DAYS = 30.0 -REQUIRED_COOKIES = ("sessionid", "tt-target-idc") -_DC_CANDIDATES = ("useast5a", "useast1a", "useast2a", "euwest1a", "alisg", "no1a", "useast8") -_PROBE_UA = ( - "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 " - "(KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" -) - - -def cookies_dir() -> Path: - raw = str(db.get_settings_map().get("tiktok_cookies_dir") or "").strip() - if raw: - p = Path(raw) - else: - p = Path(__file__).resolve().parent.parent / "data" / "tiktok_cookies" - p.mkdir(parents=True, exist_ok=True) - return p - - -def session_filename(channel_pk: str) -> str: - return f"tiktok_session-{channel_pk}" - - -def session_cookie_path(channel_pk: str) -> Path: - return cookies_dir() / f"{session_filename(channel_pk)}.cookie" - - -def _normalize_cookie(raw: dict[str, Any]) -> dict[str, Any]: - c = dict(raw) - if c.get("sameSite") == "None": - c["sameSite"] = "Strict" - return c - - -def load_session_cookies(channel_pk: str) -> list[dict[str, Any]]: - path = session_cookie_path(channel_pk) - if not path.is_file(): - return [] - try: - data = pickle.load(path.open("rb")) - except Exception: - return [] - if not isinstance(data, list): - return [] - out: list[dict[str, Any]] = [] - for item in data: - if isinstance(item, dict) and item.get("name"): - out.append(_normalize_cookie(item)) - return out - - -def save_session_cookies(channel_pk: str, cookies: list[dict[str, Any]]) -> None: - path = session_cookie_path(channel_pk) - path.parent.mkdir(parents=True, exist_ok=True) - with path.open("wb") as f: - pickle.dump([_normalize_cookie(c) for c in cookies if c.get("name")], f) - - -def delete_session_cookies(channel_pk: str) -> None: - path = session_cookie_path(channel_pk) - if path.is_file(): - path.unlink() - - -def save_session_from_values( - channel_pk: str, - *, - sessionid: str, - dc_id: str = "", - username: str = "", -) -> dict[str, Any]: - sid = str(sessionid or "").strip() - if not sid: - raise ValueError("sessionid 不能为空") - dc = str(dc_id or "").strip() - if not dc: - dc = detect_working_datacenter(sid) - cookies = [ - {"name": "sessionid", "value": sid, "domain": ".tiktok.com", "path": "/"}, - {"name": "sessionid_ss", "value": sid, "domain": ".tiktok.com", "path": "/"}, - {"name": "tt-target-idc", "value": dc, "domain": ".tiktok.com", "path": "/"}, - ] - save_session_cookies(channel_pk, cookies) - now = time.time() - patch: dict[str, Any] = { - "oauth_ok": 1, - "oauth_checked_at": now, - "oauth_error": "", - "refresh_token": "cookie", - "cookie_saved_at": now, - } - if username.strip(): - patch["tiktok_username"] = username.strip() - updated = tiktok_db.update_tiktok_channel(channel_pk, **patch) or {} - try: - from . import tiktok_profile - - refreshed = tiktok_profile.fetch_profile_for_channel( - channel_pk, - username_hint=str(username or patch.get("tiktok_username") or ""), - ) - if isinstance(refreshed, dict) and refreshed.get("channel"): - updated = refreshed["channel"] - except Exception as exc: - try: - tiktok_db.update_tiktok_channel(channel_pk, profile_error=str(exc)[:240]) - updated = tiktok_db.get_tiktok_channel(channel_pk) or updated - except Exception: - pass - return updated - - -def channel_has_session(channel: dict[str, Any] | None) -> bool: - if not channel: - return False - pk = str(channel.get("id") or "") - if not pk: - return False - cookies = load_session_cookies(pk) - names = {str(c.get("name") or "") for c in cookies} - return "sessionid" in names and bool(next((c.get("value") for c in cookies if c.get("name") == "sessionid"), "")) - - -def cookie_age_info(channel: dict[str, Any] | None, *, persist_backfill: bool = False) -> dict[str, Any]: - """Days since this account's Cookie was pasted. Probe/DC rewrite must not reset the clock.""" - ch = channel or {} - pk = str(ch.get("id") or "") - has = channel_has_session(ch) if pk else False - saved = float(ch.get("cookie_saved_at") or 0) - if has and saved <= 0 and pk: - path = session_cookie_path(pk) - if path.is_file(): - saved = float(path.stat().st_mtime) - if persist_backfill: - tiktok_db.update_tiktok_channel(pk, cookie_saved_at=saved) - if not has or saved <= 0: - return { - "cookie_saved_at": 0.0, - "cookie_age_days": None, - "cookie_ttl_days": COOKIE_TTL_DAYS, - "cookie_expires_in_days": None, - "cookie_status": "missing", - } - age_days = max(0.0, (time.time() - saved) / 86400.0) - left_days = COOKIE_TTL_DAYS - age_days - if left_days <= 0: - status = "expired" - elif left_days <= 5: - status = "warn" - else: - status = "ok" - return { - "cookie_saved_at": saved, - "cookie_age_days": round(age_days, 1), - "cookie_ttl_days": COOKIE_TTL_DAYS, - "cookie_expires_in_days": round(max(0.0, left_days), 1), - "cookie_status": status, - } - - -def probe_channel_session(channel: dict[str, Any] | None) -> dict[str, Any]: - ch = channel or {} - pk = str(ch.get("id") or "") - if not pk: - return {"ok": False, "error": "账号不存在"} - if channel_has_session(ch): - tiktok_db.update_tiktok_channel( - pk, - oauth_ok=1, - oauth_checked_at=time.time(), - oauth_error="", - refresh_token="cookie", - ) - try: - from . import tiktok_profile - - tiktok_profile.refresh_profile_if_stale(pk, force=False) - except Exception: - pass - return {"ok": True, "channel_pk": pk, "mode": "cookie"} - tiktok_db.update_tiktok_channel( - pk, - oauth_ok=0, - oauth_checked_at=time.time(), - oauth_error="未配置 Cookie 会话", - refresh_token="", - ) - return {"ok": False, "channel_pk": pk, "error": "未配置 Cookie 会话"} - - -def setup_checklist(cfg: dict[str, Any] | None = None) -> dict[str, Any]: - channels = tiktok_db.list_tiktok_channels() - ready = [c for c in channels if channel_has_session(c)] - vendor_ok = _VENDOR_ROOT.is_dir() and (_VENDOR_ROOT / "tiktok_uploader" / "tiktok.py").is_file() - sig_js = _VENDOR_ROOT / "tiktok_uploader" / "tiktok-signature" / "browser.js" - node_ok = bool(os.environ.get("NODE_PATH") or _which("node")) - return { - "mode": "cookie", - "vendor_ready": vendor_ok, - "signature_ready": sig_js.is_file(), - "node_available": node_ok, - "cookies_dir": str(cookies_dir()), - "steps": [ - { - "id": "browser_login", - "title": "浏览器登录 tiktok.com,导出 sessionid(及 tt-target-idc)", - "url": "https://www.tiktok.com", - "done": len(ready) > 0, - }, - { - "id": "paste_cookie", - "title": "在 TikTok 页为每个账号粘贴 Cookie / sessionid", - "done": len(ready) > 0, - }, - { - "id": "account", - "title": "添加 TikTok 账号并完成 Cookie 授权", - "done": len(channels) > 0 and len(ready) == len(channels), - }, - ], - "note": ( - "使用 TiktokAutoUploader Cookie 方案,无需 TikTok 开发者应用。" - " sessionid 等同账号密码,请勿泄露;约 30 天过期需重新粘贴。" - ), - "note_unaudited": "", - } - - -def _which(name: str) -> str | None: - from shutil import which - - return which(name) - - -def probe_project_create(sessionid: str, dc_id: str) -> dict[str, Any]: - """Hit TikTok project/create to see if this sessionid + datacenter works.""" - import secrets - import string - - import requests - - sid = str(sessionid or "").strip() - dc = str(dc_id or "").strip() - if not sid or not dc: - return {"ok": False, "dc_id": dc, "error": "缺少 sessionid 或机房"} - sess = requests.Session() - sess.cookies.set("sessionid", sid, domain=".tiktok.com") - sess.cookies.set("sessionid_ss", sid, domain=".tiktok.com") - sess.cookies.set("tt-target-idc", dc, domain=".tiktok.com") - sess.headers.update({"User-Agent": _PROBE_UA, "Accept": "application/json, text/plain, */*"}) - cid = "".join(secrets.choice(string.ascii_letters + string.digits + "_") for _ in range(21)) - url = f"https://www.tiktok.com/api/v1/web/project/create/?creation_id={cid}&type=1&aid=1988" - try: - r = sess.post(url, timeout=20) - payload = r.json() - except Exception as exc: - return {"ok": False, "dc_id": dc, "error": str(exc)[:160]} - project = payload.get("project") if isinstance(payload, dict) else None - ok = isinstance(project, dict) and bool(project.get("project_id")) - return { - "ok": ok, - "dc_id": dc, - "status_code": payload.get("status_code") if isinstance(payload, dict) else None, - "status_msg": str((payload or {}).get("status_msg") or "")[:160], - } - - -def detect_working_datacenter(sessionid: str, preferred: str = "") -> str: - order: list[str] = [] - pref = str(preferred or "").strip() - if pref: - order.append(pref) - for item in _DC_CANDIDATES: - if item not in order: - order.append(item) - last: dict[str, Any] = {} - for dc in order: - last = probe_project_create(sessionid, dc) - if last.get("ok"): - return dc - msg = str(last.get("status_msg") or last.get("error") or "").strip() - code = last.get("status_code") - hint = f"(status_code={code} {msg})" if code is not None or msg else "" - raise ValueError( - f"TikTok Cookie 无效或机房不匹配{hint}。请重新从已登录的 tiktok.com 复制 sessionid 和 tt-target-idc" - ) - - -def ensure_working_datacenter(channel_pk: str) -> str: - cookies = load_session_cookies(channel_pk) - sid = next((str(c.get("value") or "") for c in cookies if c.get("name") == "sessionid"), "") - dc = next((str(c.get("value") or "") for c in cookies if c.get("name") == "tt-target-idc"), "") - if not sid: - raise ValueError("Cookie 缺少 sessionid") - working = detect_working_datacenter(sid, dc) - if working != dc: - save_session_cookies( - channel_pk, - [ - {"name": "sessionid", "value": sid, "domain": ".tiktok.com", "path": "/"}, - {"name": "sessionid_ss", "value": sid, "domain": ".tiktok.com", "path": "/"}, - {"name": "tt-target-idc", "value": working, "domain": ".tiktok.com", "path": "/"}, - ], - ) - return working - - -def configure_vendor_paths() -> None: - """Point vendored Config at our cookies directory.""" - os.environ.setdefault("TIKTOK_VENDOR_ROOT", str(_VENDOR_ROOT)) - try: - from tiktok_uploader.Config import Config - - cfg = Config.get() - cfg._insert_option("COOKIES_DIR", str(cookies_dir())) - cfg._insert_option("VIDEOS_DIR", str(cookies_dir())) - except Exception: - pass +# -*- coding: utf-8 -*- +"""TikTok cookie session — TiktokAutoUploader style, no developer OAuth.""" +from __future__ import annotations + +import os +import pickle +import sys +import time +from pathlib import Path +from typing import Any + +from . import db +from . import tiktok_db + +_VENDOR_ROOT = Path(__file__).resolve().parent.parent / "third_party" / "TiktokAutoUploader" +if str(_VENDOR_ROOT) not in sys.path: + sys.path.insert(0, str(_VENDOR_ROOT)) + +DEFAULT_DC = "useast2a" +COOKIE_TTL_DAYS = 30.0 +REQUIRED_COOKIES = ("sessionid", "tt-target-idc") +_DC_CANDIDATES = ("useast5a", "useast5", "useast1a", "useast2a", "euwest1a", "alisg", "no1a", "useast8") +_PROBE_UA = ( + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 " + "(KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" +) + + +def cookies_dir() -> Path: + raw = str(db.get_settings_map().get("tiktok_cookies_dir") or "").strip() + if raw: + p = Path(raw) + else: + p = Path(__file__).resolve().parent.parent / "data" / "tiktok_cookies" + p.mkdir(parents=True, exist_ok=True) + return p + + +def session_filename(channel_pk: str) -> str: + return f"tiktok_session-{channel_pk}" + + +def session_cookie_path(channel_pk: str) -> Path: + return cookies_dir() / f"{session_filename(channel_pk)}.cookie" + + +def _normalize_cookie(raw: dict[str, Any]) -> dict[str, Any]: + c = dict(raw) + if c.get("sameSite") == "None": + c["sameSite"] = "Strict" + return c + + +def load_session_cookies(channel_pk: str) -> list[dict[str, Any]]: + path = session_cookie_path(channel_pk) + if not path.is_file(): + return [] + try: + data = pickle.load(path.open("rb")) + except Exception: + return [] + if not isinstance(data, list): + return [] + out: list[dict[str, Any]] = [] + for item in data: + if isinstance(item, dict) and item.get("name"): + out.append(_normalize_cookie(item)) + return out + + +def save_session_cookies(channel_pk: str, cookies: list[dict[str, Any]]) -> None: + path = session_cookie_path(channel_pk) + path.parent.mkdir(parents=True, exist_ok=True) + with path.open("wb") as f: + pickle.dump([_normalize_cookie(c) for c in cookies if c.get("name")], f) + + +def delete_session_cookies(channel_pk: str) -> None: + path = session_cookie_path(channel_pk) + if path.is_file(): + path.unlink() + + +def save_session_from_values( + channel_pk: str, + *, + sessionid: str, + dc_id: str = "", + username: str = "", +) -> dict[str, Any]: + sid = str(sessionid or "").strip() + if not sid: + raise ValueError("sessionid 不能为空") + dc = str(dc_id or "").strip() + if not dc: + dc = detect_working_datacenter(sid) + cookies = [ + {"name": "sessionid", "value": sid, "domain": ".tiktok.com", "path": "/"}, + {"name": "sessionid_ss", "value": sid, "domain": ".tiktok.com", "path": "/"}, + {"name": "tt-target-idc", "value": dc, "domain": ".tiktok.com", "path": "/"}, + ] + save_session_cookies(channel_pk, cookies) + now = time.time() + patch: dict[str, Any] = { + "oauth_ok": 1, + "oauth_checked_at": now, + "oauth_error": "", + "refresh_token": "cookie", + "cookie_saved_at": now, + } + if username.strip(): + patch["tiktok_username"] = username.strip() + updated = tiktok_db.update_tiktok_channel(channel_pk, **patch) or {} + try: + from . import tiktok_profile + + refreshed = tiktok_profile.fetch_profile_for_channel( + channel_pk, + username_hint=str(username or patch.get("tiktok_username") or ""), + ) + if isinstance(refreshed, dict) and refreshed.get("channel"): + updated = refreshed["channel"] + except Exception as exc: + try: + tiktok_db.update_tiktok_channel(channel_pk, profile_error=str(exc)[:240]) + updated = tiktok_db.get_tiktok_channel(channel_pk) or updated + except Exception: + pass + return updated + + +def channel_has_session(channel: dict[str, Any] | None) -> bool: + if not channel: + return False + pk = str(channel.get("id") or "") + if not pk: + return False + cookies = load_session_cookies(pk) + names = {str(c.get("name") or "") for c in cookies} + return "sessionid" in names and bool(next((c.get("value") for c in cookies if c.get("name") == "sessionid"), "")) + + +def cookie_age_info(channel: dict[str, Any] | None, *, persist_backfill: bool = False) -> dict[str, Any]: + """Days since this account's Cookie was pasted. Probe/DC rewrite must not reset the clock.""" + ch = channel or {} + pk = str(ch.get("id") or "") + has = channel_has_session(ch) if pk else False + saved = float(ch.get("cookie_saved_at") or 0) + if has and saved <= 0 and pk: + path = session_cookie_path(pk) + if path.is_file(): + saved = float(path.stat().st_mtime) + if persist_backfill: + tiktok_db.update_tiktok_channel(pk, cookie_saved_at=saved) + if not has or saved <= 0: + return { + "cookie_saved_at": 0.0, + "cookie_age_days": None, + "cookie_ttl_days": COOKIE_TTL_DAYS, + "cookie_expires_in_days": None, + "cookie_status": "missing", + } + age_days = max(0.0, (time.time() - saved) / 86400.0) + left_days = COOKIE_TTL_DAYS - age_days + if left_days <= 0: + status = "expired" + elif left_days <= 5: + status = "warn" + else: + status = "ok" + return { + "cookie_saved_at": saved, + "cookie_age_days": round(age_days, 1), + "cookie_ttl_days": COOKIE_TTL_DAYS, + "cookie_expires_in_days": round(max(0.0, left_days), 1), + "cookie_status": status, + } + + +def probe_channel_session(channel: dict[str, Any] | None) -> dict[str, Any]: + ch = channel or {} + pk = str(ch.get("id") or "") + if not pk: + return {"ok": False, "error": "账号不存在"} + if channel_has_session(ch): + tiktok_db.update_tiktok_channel( + pk, + oauth_ok=1, + oauth_checked_at=time.time(), + oauth_error="", + refresh_token="cookie", + ) + try: + from . import tiktok_profile + + tiktok_profile.refresh_profile_if_stale(pk, force=False) + except Exception: + pass + return {"ok": True, "channel_pk": pk, "mode": "cookie"} + tiktok_db.update_tiktok_channel( + pk, + oauth_ok=0, + oauth_checked_at=time.time(), + oauth_error="未配置 Cookie 会话", + refresh_token="", + ) + return {"ok": False, "channel_pk": pk, "error": "未配置 Cookie 会话"} + + +def setup_checklist(cfg: dict[str, Any] | None = None) -> dict[str, Any]: + channels = tiktok_db.list_tiktok_channels() + ready = [c for c in channels if channel_has_session(c)] + vendor_ok = _VENDOR_ROOT.is_dir() and (_VENDOR_ROOT / "tiktok_uploader" / "tiktok.py").is_file() + sig_js = _VENDOR_ROOT / "tiktok_uploader" / "tiktok-signature" / "browser.js" + node_ok = bool(os.environ.get("NODE_PATH") or _which("node")) + return { + "mode": "cookie", + "vendor_ready": vendor_ok, + "signature_ready": sig_js.is_file(), + "node_available": node_ok, + "cookies_dir": str(cookies_dir()), + "steps": [ + { + "id": "browser_login", + "title": "浏览器登录 tiktok.com,导出 sessionid(及 tt-target-idc)", + "url": "https://www.tiktok.com", + "done": len(ready) > 0, + }, + { + "id": "paste_cookie", + "title": "在 TikTok 页为每个账号粘贴 Cookie / sessionid", + "done": len(ready) > 0, + }, + { + "id": "account", + "title": "添加 TikTok 账号并完成 Cookie 授权", + "done": len(channels) > 0 and len(ready) == len(channels), + }, + ], + "note": ( + "使用 TiktokAutoUploader Cookie 方案,无需 TikTok 开发者应用。" + " sessionid 等同账号密码,请勿泄露;约 30 天过期需重新粘贴。" + ), + "note_unaudited": "", + } + + +def _which(name: str) -> str | None: + from shutil import which + + return which(name) + + +def probe_project_create(sessionid: str, dc_id: str) -> dict[str, Any]: + """Hit TikTok project/create to see if this sessionid + datacenter works.""" + import secrets + import string + + import requests + + sid = str(sessionid or "").strip() + dc = str(dc_id or "").strip() + if not sid or not dc: + return {"ok": False, "dc_id": dc, "error": "缺少 sessionid 或机房"} + sess = requests.Session() + sess.cookies.set("sessionid", sid, domain=".tiktok.com") + sess.cookies.set("sessionid_ss", sid, domain=".tiktok.com") + sess.cookies.set("tt-target-idc", dc, domain=".tiktok.com") + sess.headers.update({"User-Agent": _PROBE_UA, "Accept": "application/json, text/plain, */*"}) + cid = "".join(secrets.choice(string.ascii_letters + string.digits + "_") for _ in range(21)) + url = f"https://www.tiktok.com/api/v1/web/project/create/?creation_id={cid}&type=1&aid=1988" + try: + r = sess.post(url, timeout=20) + payload = r.json() + except Exception as exc: + return {"ok": False, "dc_id": dc, "error": str(exc)[:160]} + project = payload.get("project") if isinstance(payload, dict) else None + ok = isinstance(project, dict) and bool(project.get("project_id")) + return { + "ok": ok, + "dc_id": dc, + "status_code": payload.get("status_code") if isinstance(payload, dict) else None, + "status_msg": str((payload or {}).get("status_msg") or "")[:160], + } + + +def detect_working_datacenter(sessionid: str, preferred: str = "") -> str: + order: list[str] = [] + pref = str(preferred or "").strip() + if pref: + order.append(pref) + for item in _DC_CANDIDATES: + if item not in order: + order.append(item) + last: dict[str, Any] = {} + for dc in order: + last = probe_project_create(sessionid, dc) + if last.get("ok"): + return dc + msg = str(last.get("status_msg") or last.get("error") or "").strip() + code = last.get("status_code") + hint = f"(status_code={code} {msg})" if code is not None or msg else "" + raise ValueError( + f"TikTok Cookie 无效或机房不匹配{hint}。请重新从已登录的 tiktok.com 复制 sessionid 和 tt-target-idc" + ) + + +def ensure_working_datacenter(channel_pk: str) -> str: + cookies = load_session_cookies(channel_pk) + sid = next((str(c.get("value") or "") for c in cookies if c.get("name") == "sessionid"), "") + dc = next((str(c.get("value") or "") for c in cookies if c.get("name") == "tt-target-idc"), "") + if not sid: + raise ValueError("Cookie 缺少 sessionid") + working = detect_working_datacenter(sid, dc) + if working != dc: + save_session_cookies( + channel_pk, + [ + {"name": "sessionid", "value": sid, "domain": ".tiktok.com", "path": "/"}, + {"name": "sessionid_ss", "value": sid, "domain": ".tiktok.com", "path": "/"}, + {"name": "tt-target-idc", "value": working, "domain": ".tiktok.com", "path": "/"}, + ], + ) + return working + + +def configure_vendor_paths() -> None: + """Point vendored Config at our cookies directory.""" + os.environ.setdefault("TIKTOK_VENDOR_ROOT", str(_VENDOR_ROOT)) + try: + from tiktok_uploader.Config import Config + + cfg = Config.get() + cfg._insert_option("COOKIES_DIR", str(cookies_dir())) + cfg._insert_option("VIDEOS_DIR", str(cookies_dir())) + except Exception: + pass diff --git a/backend/app/tiktok_socks.py b/backend/app/tiktok_socks.py index 1c39d0b..2fc38cf 100644 --- a/backend/app/tiktok_socks.py +++ b/backend/app/tiktok_socks.py @@ -1,132 +1,138 @@ -# -*- coding: utf-8 -*- -"""TikTok upload SOCKS5 profiles (optional per account, default off).""" -from __future__ import annotations - -import uuid -from typing import Any -from urllib.parse import quote - -SETTINGS_KEY = "tiktok_upload_socks_profiles" - - -def _norm_profile(raw: Any) -> dict[str, Any] | None: - if not isinstance(raw, dict): - return None - pid = str(raw.get("id") or "").strip() or str(uuid.uuid4()) - server = str(raw.get("server") or "").strip() - try: - port = int(raw.get("port") or 0) - except Exception: - port = 0 - ptype = str(raw.get("type") or "socks5").strip().lower() or "socks5" - if ptype not in {"socks5", "socks5h"}: - ptype = "socks5" - return { - "id": pid, - "label": str(raw.get("label") or server or pid).strip() or pid, - "type": ptype, - "server": server, - "port": port, - "username": str(raw.get("username") or ""), - "password": str(raw.get("password") or ""), - } - - -def list_socks_profiles(cfg: dict[str, Any] | None = None, *, public: bool = False) -> list[dict[str, Any]]: - from . import db - - settings = dict(cfg if cfg is not None else db.get_settings_map()) - raw = settings.get(SETTINGS_KEY) - rows: list[dict[str, Any]] = [] - if isinstance(raw, list): - for item in raw: - p = _norm_profile(item) - if p and p["server"] and p["port"] > 0: - rows.append(p) - if not public: - return rows - out = [] - for p in rows: - pwd = str(p.get("password") or "") - q = dict(p) - q["has_password"] = bool(pwd.strip()) - q["password"] = ("***" + pwd[-4:]) if len(pwd) > 4 else ("***" if pwd else "") - out.append(q) - return out - - -def get_socks_profile(profile_id: str, cfg: dict[str, Any] | None = None) -> dict[str, Any] | None: - pid = str(profile_id or "").strip() - if not pid: - return None - for p in list_socks_profiles(cfg, public=False): - if str(p.get("id") or "") == pid: - return p - return None - - -def socks_proxy_url(profile: dict[str, Any] | None) -> str: - """Build SOCKS URL for requests/TiktokAutoUploader. Prefer socks5h (remote DNS).""" - if not profile: - return "" - server = str(profile.get("server") or "").strip() - try: - port = int(profile.get("port") or 0) - except Exception: - port = 0 - if not server or port <= 0: - return "" - user = str(profile.get("username") or "") - pwd = str(profile.get("password") or "") - scheme = "socks5h" - if user or pwd: - return f"{scheme}://{quote(user, safe='')}:{quote(pwd, safe='')}@{server}:{port}" - return f"{scheme}://{server}:{port}" - - -def resolve_channel_socks_proxy(channel: dict[str, Any] | None, cfg: dict[str, Any] | None = None) -> str: - """Return proxy URL only when this TikTok account opted into SOCKS; else empty (direct).""" - if not channel: - return "" - enabled = channel.get("socks_enabled") - if isinstance(enabled, str): - enabled = enabled.strip().lower() in {"1", "true", "yes", "on"} - if not enabled: - return "" - pid = str(channel.get("socks_profile_id") or "").strip() - prof = get_socks_profile(pid, cfg) - if not prof: - rows = list_socks_profiles(cfg, public=False) - prof = rows[0] if rows else None - return socks_proxy_url(prof) - - -def merge_socks_profiles_patch(incoming: Any, existing_cfg: dict[str, Any] | None = None) -> list[dict[str, Any]]: - """Merge UI patch; keep existing password when incoming is blank or ***masked.""" - existing = {str(p["id"]): p for p in list_socks_profiles(existing_cfg, public=False)} - out: list[dict[str, Any]] = [] - src = incoming if isinstance(incoming, list) else [] - for item in src: - p = _norm_profile(item) - if not p: - continue - pid = str(p["id"]) - old = existing.get(pid) or {} - pwd = str(p.get("password") or "") - if (not pwd.strip()) or pwd.startswith("***"): - p["password"] = str(old.get("password") or "") - if not p["server"] or int(p.get("port") or 0) <= 0: - continue - out.append(p) - if not src: - return list(existing.values()) - return out - - -def save_socks_profiles(profiles: list[dict[str, Any]]) -> list[dict[str, Any]]: - from . import db - - cfg = db.get_settings_map() - merged = merge_socks_profiles_patch(profiles, cfg) - db.update_settings_map({SETTINGS_KEY: merged}) - return list_socks_profiles(db.get_settings_map(), public=True) +# -*- coding: utf-8 -*- +"""TikTok upload SOCKS5 profiles (optional per account, default off).""" +from __future__ import annotations + +import uuid +from typing import Any +from urllib.parse import quote + +SETTINGS_KEY = "tiktok_upload_socks_profiles" + + +def _norm_profile(raw: Any) -> dict[str, Any] | None: + if not isinstance(raw, dict): + return None + pid = str(raw.get("id") or "").strip() or str(uuid.uuid4()) + server = str(raw.get("server") or "").strip() + try: + port = int(raw.get("port") or 0) + except Exception: + port = 0 + ptype = str(raw.get("type") or "socks5").strip().lower() or "socks5" + if ptype not in {"socks5", "socks5h"}: + ptype = "socks5" + return { + "id": pid, + "label": str(raw.get("label") or server or pid).strip() or pid, + "type": ptype, + "server": server, + "port": port, + "username": str(raw.get("username") or ""), + "password": str(raw.get("password") or ""), + } + + +def list_socks_profiles(cfg: dict[str, Any] | None = None, *, public: bool = False) -> list[dict[str, Any]]: + from . import db + + settings = dict(cfg if cfg is not None else db.get_settings_map()) + raw = settings.get(SETTINGS_KEY) + rows: list[dict[str, Any]] = [] + if isinstance(raw, list): + for item in raw: + p = _norm_profile(item) + if p and p["server"] and p["port"] > 0: + rows.append(p) + if not public: + return rows + out = [] + for p in rows: + pwd = str(p.get("password") or "") + q = dict(p) + q["has_password"] = bool(pwd.strip()) + q["password"] = ("***" + pwd[-4:]) if len(pwd) > 4 else ("***" if pwd else "") + out.append(q) + return out + + +def get_socks_profile(profile_id: str, cfg: dict[str, Any] | None = None) -> dict[str, Any] | None: + pid = str(profile_id or "").strip() + if not pid: + return None + for p in list_socks_profiles(cfg, public=False): + if str(p.get("id") or "") == pid: + return p + return None + + +def socks_proxy_url(profile: dict[str, Any] | None) -> str: + """Build SOCKS URL for requests/TiktokAutoUploader. Prefer socks5h (remote DNS).""" + if not profile: + return "" + server = str(profile.get("server") or "").strip() + try: + port = int(profile.get("port") or 0) + except Exception: + port = 0 + if not server or port <= 0: + return "" + user = str(profile.get("username") or "") + pwd = str(profile.get("password") or "") + scheme = "socks5h" + if user or pwd: + return f"{scheme}://{quote(user, safe='')}:{quote(pwd, safe='')}@{server}:{port}" + return f"{scheme}://{server}:{port}" + + +def resolve_channel_socks_proxy(channel: dict[str, Any] | None, cfg: dict[str, Any] | None = None) -> str: + """Per-account SOCKS if opted in; else fall back to global residential / egress uploads proxy.""" + if channel: + enabled = channel.get("socks_enabled") + if isinstance(enabled, str): + enabled = enabled.strip().lower() in {"1", "true", "yes", "on"} + if enabled: + pid = str(channel.get("socks_profile_id") or "").strip() + prof = get_socks_profile(pid, cfg) + if not prof: + rows = list_socks_profiles(cfg, public=False) + prof = rows[0] if rows else None + url = socks_proxy_url(prof) + if url: + return url + try: + from . import egress_hub + + return egress_hub.resolve_upload_proxy(cfg) or "" + except Exception: + return "" + + +def merge_socks_profiles_patch(incoming: Any, existing_cfg: dict[str, Any] | None = None) -> list[dict[str, Any]]: + """Merge UI patch; keep existing password when incoming is blank or ***masked.""" + existing = {str(p["id"]): p for p in list_socks_profiles(existing_cfg, public=False)} + out: list[dict[str, Any]] = [] + src = incoming if isinstance(incoming, list) else [] + for item in src: + p = _norm_profile(item) + if not p: + continue + pid = str(p["id"]) + old = existing.get(pid) or {} + pwd = str(p.get("password") or "") + if (not pwd.strip()) or pwd.startswith("***"): + p["password"] = str(old.get("password") or "") + if not p["server"] or int(p.get("port") or 0) <= 0: + continue + out.append(p) + if not src: + return list(existing.values()) + return out + + +def save_socks_profiles(profiles: list[dict[str, Any]]) -> list[dict[str, Any]]: + from . import db + + cfg = db.get_settings_map() + merged = merge_socks_profiles_patch(profiles, cfg) + db.update_settings_map({SETTINGS_KEY: merged}) + return list_socks_profiles(db.get_settings_map(), public=True) diff --git a/backend/app/youtube_live.py b/backend/app/youtube_live.py index 1e1de28..77fabf6 100644 --- a/backend/app/youtube_live.py +++ b/backend/app/youtube_live.py @@ -1,1120 +1,1129 @@ -# -*- coding: utf-8 -*- -"""Unified YouTube live status: InnerTube (youtube-svc) first, OAuth / DB fallback.""" -from __future__ import annotations - -import asyncio -import json -import os -import re -import time -import urllib.request -from typing import Any, Optional - -from . import db, youtube_client -from .models import normalize_youtube_channel_url -from .youtube_client import YouTubeSvcError - -_CACHE: dict[str, Any] = {"at": 0.0, "payload": None} -_CACHE_TTL_SEC = 15.0 -_BATCH_SIZE = 20 -_REFRESH_LOCK: Optional[asyncio.Lock] = None -_LAST_OAUTH_AT = 0.0 -_OAUTH_MIN_INTERVAL_SEC = 45.0 -# Studio samples older than this must not invent 在播 (edge_assign_live used to sticky-inflate). -_STUDIO_SAMPLE_MAX_AGE_SEC = 60.0 -_STUDIO_DEAD_STATUSES = { - "waiting", - "ended", - "signed_out", - "offline", - "encoder_lost", - "preparing", - "ready", -} -# Circular / untrusted for receiving: hub←edge assign_lives mirror. -_UNTRUSTED_SAMPLE_SOURCES = {"edge_assign_live", "edge_assign", "hub_mirror"} - - -def _studio_receiving_from_snap(studio_snap: dict[str, Any] | None) -> bool: - """True only for real Studio receiving — never Preparing / Excellent-alone / edge mirror junk.""" - snap = studio_snap if isinstance(studio_snap, dict) else {} - if not snap: - return False - if snap.get("encoder_lost") or snap.get("preparing_stream"): - return False - st = str(snap.get("live_status") or "").strip().lower() - if st in _STUDIO_DEAD_STATUSES: - return False - detect = str(snap.get("detect_source") or "").strip().lower() - if detect in _UNTRUSTED_SAMPLE_SOURCES: - return False - # age_sec from live snap; samples stash received_at - try: - age = snap.get("age_sec") - if age is None and snap.get("received_at"): - age = time.time() - float(snap.get("received_at") or 0) - if age is not None and float(age) > _STUDIO_SAMPLE_MAX_AGE_SEC: - return False - except (TypeError, ValueError): - pass - return bool(snap.get("encoder_receiving") or snap.get("on_air")) - - -def _studio_snap_belongs_to_assign_group( - studio_snap: dict[str, Any] | None, - *, - youtube_channel_id: str = "", - neko_shared: bool = False, - group_is_pushing: bool = False, - studio_url_hint: str = "", -) -> bool: - """Attribute Studio receiving only to the assign card that owns that session. - - Several cards can share one Neko browser. Telemetry for /video/…/livestreaming then - looks identical for every card on that instance — without this gate, a sibling's - on-air stream marks unrelated cards 「频道在播」. - """ - snap = studio_snap if isinstance(studio_snap, dict) else {} - if not snap: - return False - cid = str(youtube_channel_id or "").strip() - url = str(snap.get("url") or "").strip() - url_l = url.lower() - if cid and f"/channel/{cid.lower()}" in url_l: - return True - hint = str(studio_url_hint or "").strip() - if hint and "/video/" in hint and url: - try: - vid = hint.split("/video/", 1)[1].split("/", 1)[0].strip() - except Exception: - vid = "" - if vid and vid in url: - return True - if group_is_pushing: - return True - if not neko_shared: - return True - return False - - -def _http_channel_live_probe(channel_id: str) -> dict[str, Any]: - """Public fallback: GET /channel/UC…/live and read player isLive flags. - - youtubei.js tab scans often miss on-air streams that /live still exposes. - Honors HTTPS_PROXY/HTTP_PROXY (physical China guest via ShellCrash). - """ - cid = str(channel_id or "").strip() - empty = {"is_live": False, "source": "http_live", "channel_id": cid, "live_url": "", "title": ""} - if not cid.startswith("UC"): - return empty - url = f"https://www.youtube.com/channel/{cid}/live" - html = "" - last_err = "" - proxies_try: list[str] = [] - env_proxy = ( - str(os.environ.get("HTTPS_PROXY") or os.environ.get("https_proxy") or "").strip() - or str(os.environ.get("HTTP_PROXY") or os.environ.get("http_proxy") or "").strip() - ) - if env_proxy: - proxies_try.append(env_proxy) - proxies_try.append("") # direct - # Physical China guest: ShellCrash (same as douyinweb-yt) if env unset / direct fails - if "127.0.0.1:7890" not in env_proxy: - proxies_try.append("http://127.0.0.1:7890") - seen_p: set[str] = set() - for proxy in proxies_try: - if proxy in seen_p: - continue - seen_p.add(proxy) - try: - handlers: list[Any] = [] - if proxy: - handlers.append(urllib.request.ProxyHandler({"http": proxy, "https": proxy})) - opener = urllib.request.build_opener(*handlers) if handlers else urllib.request.build_opener() - req = urllib.request.Request( - url, - headers={ - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", - "Accept-Language": "en-US,en;q=0.9", - }, - ) - with opener.open(req, timeout=22) as resp: - html = resp.read().decode("utf-8", "replace") - last_err = "" - break - except Exception as exc: - last_err = str(exc)[:160] - html = "" - continue - if not html: - return {**empty, "error": last_err or "http_live_fetch_failed"} - - video_id = "" - title = "" - is_live = False - play_status = "" - m = re.search(r"ytInitialPlayerResponse\s*=\s*", html) - if m: - try: - obj, _ = json.JSONDecoder().raw_decode(html[m.end() :]) - if isinstance(obj, dict): - play_status = str((obj.get("playabilityStatus") or {}).get("status") or "") - vd = obj.get("videoDetails") if isinstance(obj.get("videoDetails"), dict) else {} - video_id = str(vd.get("videoId") or "") - title = str(vd.get("title") or "")[:120] - # isLiveContent is true for VODs / scheduled offline streams — NOT on-air. - if vd.get("isLive") is True: - is_live = True - micro = (obj.get("microformat") or {}).get("playerMicroformatRenderer") or {} - if isinstance(micro, dict): - details = micro.get("liveBroadcastDetails") or {} - if isinstance(details, dict) and details.get("isLiveNow") is True: - is_live = True - elif isinstance(details, dict) and details.get("isLiveNow") is False: - is_live = False - except Exception: - pass - # Waiting / scheduled rooms often still have isLiveContent + title "is live!" — - # never treat LIVE_STREAM_OFFLINE as on-air. - if play_status in {"LIVE_STREAM_OFFLINE", "ERROR", "UNPLAYABLE", "LOGIN_REQUIRED"}: - if play_status == "LIVE_STREAM_OFFLINE": - is_live = False - elif play_status != "LOGIN_REQUIRED": - is_live = False - if not is_live and re.search(r'"isLiveNow"\s*:\s*true', html, re.I): - is_live = True - # Bare "isLive":true appears on offline scheduled pages — ignore without isLiveNow. - live_url = f"https://www.youtube.com/watch?v={video_id}" if video_id else url - return { - "is_live": bool(is_live), - "source": "http_live", - "channel_id": cid, - "live_url": live_url if is_live else "", - "title": title, - } - - -def _refresh_lock() -> asyncio.Lock: - global _REFRESH_LOCK - if _REFRESH_LOCK is None: - _REFRESH_LOCK = asyncio.Lock() - return _REFRESH_LOCK - - -def _channel_url_for_group(group: dict[str, Any]) -> str: - cid = str(group.get("channel_id") or "").strip() - if cid: - return f"https://www.youtube.com/channel/{cid}" - url = str(group.get("channel_url") or "").strip() - if url: - return normalize_youtube_channel_url(url) - handle = str(group.get("handle") or "").strip() - if handle: - h = handle if handle.startswith("@") else f"@{handle}" - return f"https://www.youtube.com/{h}" - key = str(group.get("channel_key") or "").strip() - if key.startswith("UC"): - return f"https://www.youtube.com/channel/{key}" - if key.startswith("@"): - return f"https://www.youtube.com/{key}" - return url or key - - -def _channel_url_for_shorts(ch: dict[str, Any]) -> str: - cid = str(ch.get("youtube_channel_id") or "").strip() - if cid: - return f"https://www.youtube.com/channel/{cid}" - return "" - - -def _live_entry( - *, - is_live: bool, - source: str, - live_url: str = "", - title: str = "", - channel_id: str = "", - error: str = "", -) -> dict[str, Any]: - out: dict[str, Any] = {"is_live": bool(is_live), "source": source} - if is_live: - if live_url: - out["live_url"] = live_url - if title: - out["title"] = title - if channel_id: - out["channel_id"] = channel_id - if error: - out["error"] = error - return out - - -def _parse_batch_result(row: dict[str, Any]) -> dict[str, Any]: - if not row.get("ok"): - return _live_entry(is_live=False, source="youtubei", error=str(row.get("error") or "probe failed")) - live = row.get("live") if isinstance(row.get("live"), dict) else {} - live_url = str(live.get("url") or live.get("watch_url") or "").strip() - if not live_url: - vid = str(live.get("video_id") or live.get("id") or "").strip() - if vid: - live_url = f"https://www.youtube.com/watch?v={vid}" - title = str(live.get("title") or row.get("title") or "").strip() - cid = str(row.get("channel_id") or "").strip() - return _live_entry( - is_live=bool(row.get("is_live")), - source="youtubei", - live_url=live_url, - title=title, - channel_id=cid, - ) - - -async def _oauth_live_for_shorts(channel_pk: str, youtube_channel_id: str) -> Optional[dict[str, Any]]: - """Detect whether this OAuth-owned channel is currently live. - - Prefer liveBroadcasts.list (mine + active) — 1 quota unit, no Search Queries pool. - Fall back to search.list only if broadcasts API is unavailable. - """ - try: - from . import youtube_manage - - token, _ch = await youtube_manage._access_for_channel(channel_pk) - - # 1) Own-channel liveBroadcasts (correct for Shorts upload channels) - # Note: broadcastStatus + mine can be rejected as incompatible; list mine then filter. - try: - data = await youtube_manage._get( - "liveBroadcasts", - token=token, - params={ - "part": "id,snippet,status", - "mine": "true", - "maxResults": 25, - }, - ) - items = data.get("items") or [] - live_items = [ - it - for it in items - if str(((it.get("status") or {}).get("lifeCycleStatus") or "")).lower() == "live" - ] - if live_items: - item = live_items[0] - sn = item.get("snippet") or {} - vid = str(item.get("id") or "").strip() - title = str(sn.get("title") or "").strip() - live_url = f"https://www.youtube.com/watch?v={vid}" if vid else "" - return _live_entry( - is_live=True, - source="oauth-broadcast", - live_url=live_url, - title=title, - channel_id=youtube_channel_id, - ) - # Explicit offline from liveBroadcasts — do NOT burn Search Queries quota. - return _live_entry(is_live=False, source="oauth-broadcast", channel_id=youtube_channel_id) - except Exception as broadcast_exc: - # Broadcasts unavailable → leave detection to youtubei (public). Never search.list. - return _live_entry( - is_live=False, - source="oauth-broadcast", - channel_id=youtube_channel_id, - error=f"broadcasts_unavailable:{str(broadcast_exc)[:140]}", - ) - except Exception as exc: - return _live_entry( - is_live=False, - source="oauth", - channel_id=youtube_channel_id, - error=str(exc)[:200], - ) - - -_REFRESH_TASK: Optional[asyncio.Task] = None - - -def _empty_live_map(*, now: float, refreshing: bool = False) -> dict[str, Any]: - return { - "ok": True, - "checked_at": int(now), - "live_count": 0, - "source": "none", - "entries": {}, - "groups_total": 0, - "shorts_total": 0, - "poll_sec": 20, - "cache_ttl_sec": _CACHE_TTL_SEC, - "refreshing": refreshing, - } - - -def _schedule_live_map_refresh() -> None: - """Kick a background rebuild; never block HTTP handlers on youtube-svc.""" - global _REFRESH_TASK - if str(os.environ.get("DY_DESKTOP_LIGHT") or "").strip().lower() in {"1", "true", "yes"}: - # Desktop UI must stay clickable; live-map refresh is opt-in via force loop elsewhere - return - lock = _refresh_lock() - if lock.locked(): - return - task = _REFRESH_TASK - if task is not None and not task.done(): - return - - async def _run() -> None: - try: - async with _refresh_lock(): - await _build_live_map_unlocked(now=time.time()) - except Exception: - pass - - _REFRESH_TASK = asyncio.create_task(_run()) - - -async def build_live_map(*, force: bool = False) -> dict[str, Any]: - now = time.time() - cached = _CACHE.get("payload") - fresh = bool(cached) and now - float(_CACHE.get("at") or 0) < _CACHE_TTL_SEC - - # force=True must actually rebuild (homepage/ops probes rely on this). - if force: - async with _refresh_lock(): - return await _build_live_map_unlocked(now=time.time()) - - if cached and fresh: - return cached - if cached: - _schedule_live_map_refresh() - return cached - - # No cache yet: return empty immediately and refresh in background - _schedule_live_map_refresh() - return _empty_live_map(now=now, refreshing=True) - - -async def _build_live_map_unlocked(*, now: float) -> dict[str, Any]: - global _LAST_OAUTH_AT - - def _load_db_targets() -> tuple[list[dict[str, Any]], list[dict[str, Any]], list[dict[str, Any]]]: - from . import yt_assign_db - - groups = (db.list_channel_groups(platform="youtube", limit=500, offset=0).get("groups") or []) - shorts = db.list_shorts_channels() - # Live 分配授权频道卡 — 与 Shorts/旧分组一样走公开 youtubei 探测(双机应一致) - assign = yt_assign_db.list_groups(include_urls=False) - return groups, shorts, assign - - groups, shorts, assign_groups_early = await asyncio.to_thread(_load_db_targets) - - targets: list[dict[str, Any]] = [] - url_to_refs: dict[str, list[tuple[str, dict[str, Any]]]] = {} - cid_to_refs: dict[str, list[tuple[str, dict[str, Any]]]] = {} - - for g in groups: - url = _channel_url_for_group(g) - ref = f"group:{g['id']}" - meta = {"kind": "group", "group": g, "url": url} - targets.append({"ref": ref, "url": url, **meta}) - if url: - url_to_refs.setdefault(url, []).append((ref, meta)) - cid = str(g.get("channel_id") or "").strip() - if cid: - cid_to_refs.setdefault(cid, []).append((ref, meta)) - - for ch in shorts: - url = _channel_url_for_shorts(ch) - ref = f"shorts:{ch['id']}" - meta = {"kind": "shorts", "channel_pk": ch["id"], "youtube_channel_id": ch.get("youtube_channel_id"), "url": url} - targets.append({"ref": ref, "url": url, **meta}) - if url: - url_to_refs.setdefault(url, []).append((ref, meta)) - cid = str(ch.get("youtube_channel_id") or "").strip() - if cid: - cid_to_refs.setdefault(cid, []).append((ref, meta)) - targets.append({"ref": f"channel:{cid}", "url": url or f"https://www.youtube.com/channel/{cid}", **meta}) - - # Assign cards: same public youtubei probe as shorts (VPS ↔ physical must match for same UC ids). - seen_assign_cid: set[str] = set() - for ag in assign_groups_early: - if not ag.get("enabled"): - continue - gid = str(ag.get("id") or "").strip() - if not gid: - continue - cid = str(ag.get("youtube_channel_id") or "").strip() - pk = str(ag.get("channel_pk") or "").strip() - if not cid and pk: - try: - ch = db.get_shorts_channel(pk) or {} - cid = str(ch.get("youtube_channel_id") or "").strip() - except Exception: - cid = "" - if not cid: - continue - url = f"https://www.youtube.com/channel/{cid}" - meta = { - "kind": "assign", - "assign_group_id": gid, - "channel_pk": pk, - "youtube_channel_id": cid, - "title": str(ag.get("name") or "").strip(), - "url": url, - } - targets.append({"ref": f"assign:{gid}", "url": url, **meta}) - url_to_refs.setdefault(url, []).append((f"assign:{gid}", meta)) - cid_to_refs.setdefault(cid, []).append((f"assign:{gid}", meta)) - if cid not in seen_assign_cid: - seen_assign_cid.add(cid) - targets.append({"ref": f"channel:{cid}", "url": url, **meta}) - if pk: - # Keep shorts ref in sync when assign shares the same OAuth channel. - targets.append( - { - "ref": f"shorts:{pk}", - "url": url, - "kind": "shorts", - "channel_pk": pk, - "youtube_channel_id": cid, - } - ) - - entries: dict[str, Any] = {} - unique_urls: list[str] = [] - seen_urls: set[str] = set() - for t in targets: - url = str(t.get("url") or "").strip() - if not url or url in seen_urls: - continue - seen_urls.add(url) - unique_urls.append(url) - - probe_by_url: dict[str, dict[str, Any]] = {} - svc_error = "" - if unique_urls: - try: - for i in range(0, len(unique_urls), _BATCH_SIZE): - chunk = unique_urls[i : i + _BATCH_SIZE] - data = await youtube_client.batch_live(chunk) - for row in data.get("results") or []: - if not isinstance(row, dict): - continue - key = str(row.get("input") or "").strip() - if key: - probe_by_url[key] = _parse_batch_result(row) - cid = str(row.get("channel_id") or "").strip() - if cid: - probe_by_url[f"cid:{cid}"] = _parse_batch_result(row) - except YouTubeSvcError as exc: - svc_error = str(exc) - - for t in targets: - ref = str(t["ref"]) - url = str(t.get("url") or "").strip() - entry = probe_by_url.get(url) if url else None - cid = str(t.get("youtube_channel_id") or (t.get("group") or {}).get("channel_id") or "").strip() - - if entry is None and cid: - entry = probe_by_url.get(f"cid:{cid}") - - if entry is None and svc_error: - entry = _live_entry(is_live=False, source="youtubei", error=svc_error) - - if entry is None: - entry = _live_entry(is_live=False, source="unknown") - - if t.get("kind") == "group" and not entry.get("is_live") and not svc_error: - g = t.get("group") or {} - if str(g.get("last_status") or "") == "live": - entry = _live_entry( - is_live=True, - source="monitor", - live_url=str(g.get("last_live_url") or ""), - title=str(g.get("last_title") or ""), - channel_id=str(g.get("channel_id") or ""), - ) - - # Prefer keeping an already-live youtubei hit if we revisit the same ref. - prev = entries.get(ref) - if prev and prev.get("is_live") and not entry.get("is_live"): - entry = dict(prev) - elif t.get("kind") == "assign" and entry.get("is_live"): - entry = dict(entry) - entry["assign_group_id"] = str(t.get("assign_group_id") or "") - entry["channel_pk"] = str(t.get("channel_pk") or "") - if t.get("title"): - entry["title"] = str(t.get("title") or "") - if cid: - entry["channel_id"] = cid - - entries[ref] = dict(entry) - if cid and entry.get("is_live"): - entries[f"channel:{cid}"] = dict(entry) - if t.get("kind") == "assign" and t.get("channel_pk"): - pk = str(t.get("channel_pk") or "") - shorts_ref = f"shorts:{pk}" - if not (entries.get(shorts_ref) or {}).get("is_live"): - se = dict(entry) - se["assign_group_id"] = str(t.get("assign_group_id") or "") - entries[shorts_ref] = se - - # HTTP /channel/UC…/live fallback — youtubei tab scans often miss true on-air streams. - http_cids: list[str] = [] - seen_http: set[str] = set() - for t in targets: - cid = str(t.get("youtube_channel_id") or (t.get("group") or {}).get("channel_id") or "").strip() - if not cid or cid in seen_http: - continue - ch_ent = entries.get(f"channel:{cid}") or {} - # Probe when missing or youtubei said offline - if ch_ent.get("is_live"): - continue - seen_http.add(cid) - http_cids.append(cid) - if http_cids: - # Cap fan-out — each probe may try multiple proxies with long urllib timeouts. - sem = asyncio.Semaphore(int(os.environ.get("DY_LIVE_HTTP_PROBE_CONCURRENCY", "4") or "4")) - - async def _bounded(cid: str) -> Any: - async with sem: - return await asyncio.to_thread(_http_channel_live_probe, cid) - - http_results = await asyncio.gather( - *[_bounded(cid) for cid in http_cids], - return_exceptions=True, - ) - cid_to_targets: dict[str, list[dict[str, Any]]] = {} - for t in targets: - cid = str(t.get("youtube_channel_id") or (t.get("group") or {}).get("channel_id") or "").strip() - if cid: - cid_to_targets.setdefault(cid, []).append(t) - for cid, result in zip(http_cids, http_results): - if isinstance(result, Exception) or not isinstance(result, dict): - continue - if not result.get("is_live"): - continue - live_ent = _live_entry( - is_live=True, - source="http_live", - live_url=str(result.get("live_url") or ""), - title=str(result.get("title") or ""), - channel_id=cid, - ) - entries[f"channel:{cid}"] = live_ent - for t in cid_to_targets.get(cid) or []: - ref = str(t.get("ref") or "") - if not ref: - continue - cur = entries.get(ref) or {} - if cur.get("is_live"): - continue - ent = dict(live_ent) - if t.get("kind") == "assign": - ent["assign_group_id"] = str(t.get("assign_group_id") or "") - ent["channel_pk"] = str(t.get("channel_pk") or "") - if t.get("title"): - ent["title"] = str(t.get("title") or ent.get("title") or "") - entries[ref] = ent - - # OAuth / liveBroadcasts:授权频道卡与 Shorts 共用 channel_pk 时必走(双机公开态应一致) - run_oauth = (now - float(_LAST_OAUTH_AT or 0)) >= _OAUTH_MIN_INTERVAL_SEC - oauth_tasks: list[tuple[str, str, str]] = [] - if run_oauth: - seen_oauth_pk: set[str] = set() - for ch in shorts: - cid = str(ch.get("youtube_channel_id") or "").strip() - pk = str(ch.get("id") or "") - if not cid or not pk: - continue - if not str(ch.get("refresh_token") or "").strip(): - continue - ref = f"shorts:{pk}" - if entries.get(ref, {}).get("is_live"): - continue - oauth_tasks.append((ref, pk, cid)) - seen_oauth_pk.add(pk) - # Assign cards that bind an OAuth shorts channel — same API path on VPS & physical. - for ag in assign_groups_early: - if not ag.get("enabled"): - continue - pk = str(ag.get("channel_pk") or "").strip() - cid = str(ag.get("youtube_channel_id") or "").strip() - gid = str(ag.get("id") or "").strip() - if not pk or not gid: - continue - if pk in seen_oauth_pk: - continue - if (entries.get(f"assign:{gid}") or {}).get("is_live"): - continue - if (entries.get(f"shorts:{pk}") or {}).get("is_live"): - continue - try: - ch = db.get_shorts_channel(pk) or {} - except Exception: - ch = {} - if not str(ch.get("refresh_token") or "").strip(): - continue - if not cid: - cid = str(ch.get("youtube_channel_id") or "").strip() - if not cid: - continue - oauth_tasks.append((f"shorts:{pk}", pk, cid)) - seen_oauth_pk.add(pk) - - if oauth_tasks: - _LAST_OAUTH_AT = now - oauth_results = await asyncio.gather( - *[_oauth_live_for_shorts(pk, cid) for _ref, pk, cid in oauth_tasks], - return_exceptions=True, - ) - pk_to_assign: dict[str, list[dict[str, Any]]] = {} - for ag in assign_groups_early: - pk = str(ag.get("channel_pk") or "").strip() - if pk: - pk_to_assign.setdefault(pk, []).append(ag) - for (ref, pk, cid), result in zip(oauth_tasks, oauth_results): - if isinstance(result, Exception) or not isinstance(result, dict): - continue - src = str(result.get("source") or "") - if result.get("is_live"): - entries[ref] = result - if cid: - entries[f"channel:{cid}"] = result - for ag in pk_to_assign.get(pk) or []: - gid = str(ag.get("id") or "").strip() - if not gid: - continue - ent = dict(result) - ent["assign_group_id"] = gid - ent["channel_pk"] = pk - if ag.get("name"): - ent["title"] = str(ag.get("name") or "") - entries[f"assign:{gid}"] = ent - elif src.startswith("oauth"): - # API answered offline — record so Studio cannot invent public live. - # Never replace a clean youtubei offline with an errored oauth result. - cur = entries.get(ref) or {} - if cur.get("is_live"): - continue - if ( - result.get("error") - and str(cur.get("source") or "") == "youtubei" - and not cur.get("error") - ): - continue - entries[ref] = dict(result) - if cid: - ch_cur = entries.get(f"channel:{cid}") or {} - if not ( - result.get("error") - and str(ch_cur.get("source") or "") == "youtubei" - and not ch_cur.get("error") - and not ch_cur.get("is_live") - ): - if not ch_cur.get("is_live"): - entries[f"channel:{cid}"] = dict(result) - for ag in pk_to_assign.get(pk) or []: - gid = str(ag.get("id") or "").strip() - if not gid: - continue - ae = entries.get(f"assign:{gid}") or {} - if ae.get("is_live"): - continue - if ( - result.get("error") - and str(ae.get("source") or "") == "youtubei" - and not ae.get("error") - ): - continue - ent = dict(result) - ent["assign_group_id"] = gid - ent["channel_pk"] = pk - if ag.get("name"): - ent["title"] = str(ag.get("name") or "") - entries[f"assign:{gid}"] = ent - elif _CACHE.get("payload") and isinstance(_CACHE.get("payload"), dict): - # 沿用上一次 OAuth 检出的 live,避免限频窗口内把真直播刷成离线 - prev = (_CACHE.get("payload") or {}).get("entries") or {} - for ref, old in prev.items(): - if not str(ref).startswith(("shorts:", "assign:")): - continue - if not isinstance(old, dict) or not old.get("is_live"): - continue - if str(old.get("source") or "").startswith("oauth"): - cur = entries.get(ref) or {} - if not cur.get("is_live"): - entries[ref] = dict(old) - cid = str(old.get("channel_id") or "").strip() - if cid: - entries[f"channel:{cid}"] = dict(old) - - # Mirror live Shorts → Live 分配;FFmpeg 转推 / Studio 遥测补洞 - try: - from . import yt_assign_db - from . import youtube_neko - from .youtube_relay_pipeline import youtube_relay_pipeline - - assign_groups = await asyncio.to_thread( - lambda: yt_assign_db.list_groups(include_urls=False) - ) - # Do NOT call full relay.status() here — it rebuilds heavy studio/neko payloads and - # used to recurse into douyin live-map (RSS blow-up on physical dy). - relay_rows = await asyncio.to_thread(youtube_relay_pipeline.pushing_flags) - pk_to_gid: dict[str, str] = {} - gid_to_name: dict[str, str] = {} - for g in assign_groups: - pk = str(g.get("channel_pk") or "").strip() - gid = str(g.get("id") or "").strip() - if pk and gid: - pk_to_gid[pk] = gid - gid_to_name[gid] = str(g.get("name") or "").strip() - - for ref, ent in list(entries.items()): - if not str(ref).startswith("shorts:"): - continue - if not isinstance(ent, dict) or not ent.get("is_live"): - continue - pk = str(ref).split(":", 1)[1] - gid = pk_to_gid.get(pk) - if not gid: - continue - ent["assign_group_id"] = gid - assign_ent = dict(ent) - assign_ent["source"] = "assign" - assign_ent["assign_group_id"] = gid - assign_ent["channel_pk"] = pk - if gid_to_name.get(gid): - assign_ent["title"] = gid_to_name[gid] - entries[f"assign:{gid}"] = assign_ent - - # Count assign cards per Neko — shared browsers must not cross-attribute Studio. - neko_share_count: dict[int, int] = {} - for g in assign_groups: - try: - nid = int(g.get("neko_instance_id") or 0) - except (TypeError, ValueError): - nid = 0 - if nid > 0: - neko_share_count[nid] = neko_share_count.get(nid, 0) + 1 - - for g in assign_groups: - gid = str(g.get("id") or "").strip() - if not gid: - continue - pk = str(g.get("channel_pk") or "").strip() - row = relay_rows.get(gid) or {} - cid = str(g.get("youtube_channel_id") or "").strip() - try: - group_neko_id = int(g.get("neko_instance_id") or 0) - except (TypeError, ValueError): - group_neko_id = 0 - neko_shared = bool(group_neko_id > 0 and neko_share_count.get(group_neko_id, 0) > 1) - - # Already marked live via youtubei/OAuth for this shorts/channel → receiving-level truth. - prev_live = entries.get(f"assign:{gid}") or {} - if not prev_live.get("is_live") and pk: - prev_live = entries.get(f"shorts:{pk}") or {} - if not prev_live.get("is_live") and cid: - prev_live = entries.get(f"channel:{cid}") or {} - - # Prefer group-aware Studio snap (remote ops-neko when prefer=remote). - studio_snap: dict[str, Any] = {} - try: - studio_snap = await asyncio.to_thread( - lambda gg=g: youtube_neko.studio_snapshot_for_group( - gg, max_age_sec=120.0, include_minute_reports=False - ) - ) - except Exception: - studio_snap = {} - if not studio_snap.get("on_air") and not studio_snap.get("encoder_receiving"): - # Legacy local-instance CDP lookup as extra receiving probe. - try: - nid = int(g.get("neko_instance_id") or 0) - except (TypeError, ValueError): - nid = 0 - if nid > 0: - try: - local_snap = await asyncio.to_thread( - lambda n=nid: youtube_neko.studio_on_air_lookup(n, max_age_sec=120.0) - ) - except Exception: - local_snap = {} - if local_snap.get("on_air") or local_snap.get("encoder_receiving"): - studio_snap = local_snap - - # Fallback: match telemetry by group's saved studio URL (receiving signals only). - if not ( - studio_snap.get("on_air") - or studio_snap.get("encoder_receiving") - or str(studio_snap.get("live_status") or "").lower() == "live" - ): - studio_url = str(g.get("neko_studio_url") or "") - vid = "" - if "/video/" in studio_url: - try: - vid = studio_url.split("/video/", 1)[1].split("/", 1)[0] - except Exception: - vid = "" - if vid: - for ev in youtube_neko.latest_studio_telemetry(limit=40): - payload = ev.get("payload") if isinstance(ev.get("payload"), dict) else {} - url = str(payload.get("url") or "") - if vid not in url: - continue - signals = payload.get("signals") if isinstance(payload.get("signals"), dict) else {} - st = str(payload.get("live_status") or "").lower() - health = str(payload.get("health") or "").lower() - # Never invent receiving from Excellent/health alone (Preparing+Excellent bug). - receiving = bool( - signals.get("encoder_receiving") - or signals.get("on_air") - or st == "live" - ) and not ( - signals.get("preparing_stream") - or st in _STUDIO_DEAD_STATUSES - or signals.get("encoder_lost") - ) - if not receiving: - continue - if signals.get("encoder_lost") or st in _STUDIO_DEAD_STATUSES: - continue - age = None - try: - age = time.time() - float(ev.get("received_at") or 0) - except (TypeError, ValueError): - age = None - if age is not None and age > _STUDIO_SAMPLE_MAX_AGE_SEC: - continue - studio_snap = { - "on_air": True, - "encoder_receiving": bool(signals.get("encoder_receiving") or st == "live"), - "live_page_open": True, - "live_status": st or "live", - "health": health, - "viewer_count": payload.get("viewer_count"), - "url": url[:200], - "received_at": float(ev.get("received_at") or 0), - "age_sec": round(age, 1) if age is not None else None, - "detect_source": "telemetry_url_match", - } - break - - # DB samples (physical local Neko CDP / extension) — fill when in-memory snap is quiet. - # Never trust edge_assign_live mirrors (circular sticky 在播). - if not ( - studio_snap.get("on_air") - or studio_snap.get("encoder_receiving") - or str(studio_snap.get("live_status") or "").lower() == "live" - ): - try: - from . import yt_studio_db - - samples = await asyncio.to_thread( - lambda: yt_studio_db.list_samples( - group_id=gid, since_ts=now - _STUDIO_SAMPLE_MAX_AGE_SEC, limit=5 - ) - ) - if not samples and cid: - samples = await asyncio.to_thread( - lambda: yt_studio_db.list_samples( - youtube_channel_id=cid, - since_ts=now - _STUDIO_SAMPLE_MAX_AGE_SEC, - limit=5, - ) - ) - except Exception: - samples = [] - for s in samples or []: - detect = str(s.get("detect_source") or "").strip().lower() - if detect in _UNTRUSTED_SAMPLE_SOURCES: - continue - st = str(s.get("live_status") or "").lower() - if st in _STUDIO_DEAD_STATUSES: - continue - if s.get("preparing_stream"): - continue - if not (s.get("on_air") or st == "live"): - continue - try: - sample_age = now - float(s.get("ts") or 0) - except (TypeError, ValueError): - sample_age = 9999.0 - if sample_age > _STUDIO_SAMPLE_MAX_AGE_SEC: - continue - studio_snap = { - "on_air": bool(s.get("on_air")), - "encoder_receiving": bool(s.get("on_air") or st == "live"), - "live_page_open": bool(s.get("live_page_open") or True), - "live_status": st or "live", - "health": str(s.get("health") or ""), - "viewer_count": s.get("viewer_count"), - "url": str(s.get("studio_url") or "")[:200], - "received_at": float(s.get("ts") or 0), - "age_sec": round(sample_age, 1), - "detect_source": detect or "yt_studio_samples", - "neko_ref": str(s.get("neko_ref") or ""), - } - break - - receiving = _studio_receiving_from_snap(studio_snap) - if receiving and not _studio_snap_belongs_to_assign_group( - studio_snap, - youtube_channel_id=cid, - neko_shared=neko_shared, - group_is_pushing=bool(row.get("is_pushing")), - studio_url_hint=str(g.get("neko_studio_url") or ""), - ): - receiving = False - - # Collect public probe answers across assign / channel / shorts refs. - public_sources = { - "youtubei", - "http_live", - "oauth", - "oauth-broadcast", - "oauth_liveBroadcasts", - } - public_live_hit: dict[str, Any] | None = None - public_offline_hit: dict[str, Any] | None = None - for key in ( - f"assign:{gid}", - f"channel:{cid}" if cid else "", - f"shorts:{pk}" if pk else "", - ): - if not key: - continue - p = entries.get(key) - if not isinstance(p, dict): - continue - s = str(p.get("source") or "") - if s not in public_sources: - continue - if p.get("is_live"): - public_live_hit = p - break - # Prefer clean offline answers; youtubei offline always counts even if - # another ref holds an errored oauth leftover. - if not p.get("error"): - public_offline_hit = p - elif s == "youtubei" and not p.get("is_live"): - public_offline_hit = public_offline_hit or p - - prev_public = bool( - prev_live.get("is_live") - and str(prev_live.get("source") or "") in public_sources - ) - # Receiving-first: Studio on_air / encoder_receiving beats public offline - # (youtubei false-negatives + OAuth "mine" miss when push uses another key). - if receiving: - mark_live = True - source = "studio_receiving" - elif public_live_hit or prev_public: - mark_live = True - source = str( - (public_live_hit or prev_live).get("source") or "youtubei" - ) - elif public_offline_hit is not None: - mark_live = bool(row.get("is_pushing")) - source = "relay" if mark_live else "" - else: - mark_live = bool(row.get("is_pushing")) - source = "relay" if mark_live else "" - - if not mark_live: - base = entries.get(f"assign:{gid}") or { - "is_live": False, - "source": str((public_offline_hit or {}).get("source") or "unknown"), - "assign_group_id": gid, - "channel_pk": pk, - "title": gid_to_name.get(gid) or str(g.get("name") or ""), - "channel_id": cid, - } - base = dict(base) - base["is_live"] = False - if studio_snap.get("live_page_open") or studio_snap: - base["studio"] = studio_snap - entries[f"assign:{gid}"] = base - continue - - prev = entries.get(f"assign:{gid}") or prev_live or {} - if prev.get("is_live") and prev.get("source") not in { - "relay", - "studio_telemetry", - "studio_receiving", - }: - source = str(prev.get("source") or source) - entries[f"assign:{gid}"] = { - **prev, - "is_live": True, - "source": source, - "assign_group_id": gid, - "channel_pk": pk, - "title": gid_to_name.get(gid) or prev.get("title") or str(g.get("name") or ""), - "live_url": str(studio_snap.get("url") or prev.get("live_url") or ""), - "studio": studio_snap or prev.get("studio") or {}, - } - if pk: - shorts_ref = f"shorts:{pk}" - shorts_prev = entries.get(shorts_ref) or {} - if not shorts_prev.get("is_live"): - entries[shorts_ref] = { - **shorts_prev, - "is_live": True, - "source": source, - "assign_group_id": gid, - "title": shorts_prev.get("title") or gid_to_name.get(gid) or "", - "live_url": str(studio_snap.get("url") or shorts_prev.get("live_url") or ""), - } - else: - entries[shorts_ref]["assign_group_id"] = gid - cid2 = str(shorts_prev.get("channel_id") or g.get("youtube_channel_id") or "").strip() - if cid2: - entries[f"channel:{cid2}"] = dict(entries[shorts_ref]) - except Exception as exc: - import logging - - logging.getLogger(__name__).warning("live-map assign/studio mirror failed: %s", exc) - - live_count = 0 - seen_assign: set[str] = set() - for k, v in entries.items(): - if not k.startswith("assign:") or not v.get("is_live"): - continue - live_count += 1 - seen_assign.add(k.split(":", 1)[1]) - for k, v in entries.items(): - if not v.get("is_live"): - continue - if k.startswith("shorts:"): - gid = str(v.get("assign_group_id") or "") - if gid and gid in seen_assign: - continue - live_count += 1 - elif k.startswith("group:"): - live_count += 1 - sources = {str(v.get("source") or "") for v in entries.values() if v.get("is_live")} - primary_source = "youtubei" if "youtubei" in sources else (next(iter(sources)) if sources else "none") - - payload = { - "ok": True, - "checked_at": int(now), - "live_count": live_count, - "source": primary_source, - "entries": entries, - "groups_total": len(groups), - "shorts_total": len(shorts), - "poll_sec": 20, - "cache_ttl_sec": _CACHE_TTL_SEC, - } - if svc_error: - payload["svc_error"] = svc_error - - # Shorts 上传频道开播/停播 → sessions,供 /shorts 数据分析 - try: - payload["shorts_live_sync"] = db.sync_shorts_channel_lives_from_map(entries) - except Exception as exc: - payload["shorts_live_sync"] = {"error": str(exc)[:160]} - - _CACHE["at"] = now - _CACHE["payload"] = payload - return payload +# -*- coding: utf-8 -*- +"""Unified YouTube live status: InnerTube (youtube-svc) first, OAuth / DB fallback.""" +from __future__ import annotations + +import asyncio +import json +import os +import re +import time +import urllib.request +from typing import Any, Optional + +from . import db, youtube_client +from .models import normalize_youtube_channel_url +from .youtube_client import YouTubeSvcError + +_CACHE: dict[str, Any] = {"at": 0.0, "payload": None} +_CACHE_TTL_SEC = 15.0 +_BATCH_SIZE = 20 +_REFRESH_LOCK: Optional[asyncio.Lock] = None +_LAST_OAUTH_AT = 0.0 +_OAUTH_MIN_INTERVAL_SEC = 45.0 +# Studio samples older than this must not invent 在播 (edge_assign_live used to sticky-inflate). +_STUDIO_SAMPLE_MAX_AGE_SEC = 60.0 +_STUDIO_DEAD_STATUSES = { + "waiting", + "ended", + "signed_out", + "offline", + "encoder_lost", + "preparing", + "ready", +} +# Circular / untrusted for receiving: hub←edge assign_lives mirror. +_UNTRUSTED_SAMPLE_SOURCES = {"edge_assign_live", "edge_assign", "hub_mirror"} + + +def _studio_receiving_from_snap(studio_snap: dict[str, Any] | None) -> bool: + """True only for real Studio receiving — never Preparing / Excellent-alone / edge mirror junk.""" + snap = studio_snap if isinstance(studio_snap, dict) else {} + if not snap: + return False + if snap.get("encoder_lost") or snap.get("preparing_stream"): + return False + st = str(snap.get("live_status") or "").strip().lower() + if st in _STUDIO_DEAD_STATUSES: + return False + detect = str(snap.get("detect_source") or "").strip().lower() + if detect in _UNTRUSTED_SAMPLE_SOURCES: + return False + # age_sec from live snap; samples stash received_at + try: + age = snap.get("age_sec") + if age is None and snap.get("received_at"): + age = time.time() - float(snap.get("received_at") or 0) + if age is not None and float(age) > _STUDIO_SAMPLE_MAX_AGE_SEC: + return False + except (TypeError, ValueError): + pass + return bool(snap.get("encoder_receiving") or snap.get("on_air")) + + +def _studio_snap_belongs_to_assign_group( + studio_snap: dict[str, Any] | None, + *, + youtube_channel_id: str = "", + neko_shared: bool = False, + group_is_pushing: bool = False, + studio_url_hint: str = "", +) -> bool: + """Attribute Studio receiving only to the assign card that owns that session. + + Several cards can share one Neko browser. Telemetry for /video/…/livestreaming then + looks identical for every card on that instance — without this gate, a sibling's + on-air stream marks unrelated cards 「频道在播」. + """ + snap = studio_snap if isinstance(studio_snap, dict) else {} + if not snap: + return False + cid = str(youtube_channel_id or "").strip() + url = str(snap.get("url") or "").strip() + url_l = url.lower() + if cid and f"/channel/{cid.lower()}" in url_l: + return True + hint = str(studio_url_hint or "").strip() + if hint and "/video/" in hint and url: + try: + vid = hint.split("/video/", 1)[1].split("/", 1)[0].strip() + except Exception: + vid = "" + if vid and vid in url: + return True + if group_is_pushing: + return True + if not neko_shared: + return True + return False + + +def _http_channel_live_probe(channel_id: str) -> dict[str, Any]: + """Public fallback: GET /channel/UC…/live and read player isLive flags. + + youtubei.js tab scans often miss on-air streams that /live still exposes. + Honors HTTPS_PROXY/HTTP_PROXY (physical China guest via ShellCrash). + """ + cid = str(channel_id or "").strip() + empty = {"is_live": False, "source": "http_live", "channel_id": cid, "live_url": "", "title": ""} + if not cid.startswith("UC"): + return empty + url = f"https://www.youtube.com/channel/{cid}/live" + html = "" + last_err = "" + proxies_try: list[str] = [] + try: + from . import egress_hub + + hub_proxy = str(egress_hub.google_http_proxy() or "").strip() + if hub_proxy: + proxies_try.append(hub_proxy) + except Exception: + pass + env_proxy = ( + str(os.environ.get("HTTPS_PROXY") or os.environ.get("https_proxy") or "").strip() + or str(os.environ.get("HTTP_PROXY") or os.environ.get("http_proxy") or "").strip() + ) + if env_proxy: + proxies_try.append(env_proxy) + proxies_try.append("") # direct + # Soft fallbacks (physical ShellCrash / legacy) — only if not already listed + for soft in ("http://127.0.0.1:17891", "http://127.0.0.1:7890"): + if soft not in proxies_try: + proxies_try.append(soft) + seen_p: set[str] = set() + for proxy in proxies_try: + if proxy in seen_p: + continue + seen_p.add(proxy) + try: + handlers: list[Any] = [] + if proxy: + handlers.append(urllib.request.ProxyHandler({"http": proxy, "https": proxy})) + opener = urllib.request.build_opener(*handlers) if handlers else urllib.request.build_opener() + req = urllib.request.Request( + url, + headers={ + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", + "Accept-Language": "en-US,en;q=0.9", + }, + ) + with opener.open(req, timeout=22) as resp: + html = resp.read().decode("utf-8", "replace") + last_err = "" + break + except Exception as exc: + last_err = str(exc)[:160] + html = "" + continue + if not html: + return {**empty, "error": last_err or "http_live_fetch_failed"} + + video_id = "" + title = "" + is_live = False + play_status = "" + m = re.search(r"ytInitialPlayerResponse\s*=\s*", html) + if m: + try: + obj, _ = json.JSONDecoder().raw_decode(html[m.end() :]) + if isinstance(obj, dict): + play_status = str((obj.get("playabilityStatus") or {}).get("status") or "") + vd = obj.get("videoDetails") if isinstance(obj.get("videoDetails"), dict) else {} + video_id = str(vd.get("videoId") or "") + title = str(vd.get("title") or "")[:120] + # isLiveContent is true for VODs / scheduled offline streams — NOT on-air. + if vd.get("isLive") is True: + is_live = True + micro = (obj.get("microformat") or {}).get("playerMicroformatRenderer") or {} + if isinstance(micro, dict): + details = micro.get("liveBroadcastDetails") or {} + if isinstance(details, dict) and details.get("isLiveNow") is True: + is_live = True + elif isinstance(details, dict) and details.get("isLiveNow") is False: + is_live = False + except Exception: + pass + # Waiting / scheduled rooms often still have isLiveContent + title "is live!" — + # never treat LIVE_STREAM_OFFLINE as on-air. + if play_status in {"LIVE_STREAM_OFFLINE", "ERROR", "UNPLAYABLE", "LOGIN_REQUIRED"}: + if play_status == "LIVE_STREAM_OFFLINE": + is_live = False + elif play_status != "LOGIN_REQUIRED": + is_live = False + if not is_live and re.search(r'"isLiveNow"\s*:\s*true', html, re.I): + is_live = True + # Bare "isLive":true appears on offline scheduled pages — ignore without isLiveNow. + live_url = f"https://www.youtube.com/watch?v={video_id}" if video_id else url + return { + "is_live": bool(is_live), + "source": "http_live", + "channel_id": cid, + "live_url": live_url if is_live else "", + "title": title, + } + + +def _refresh_lock() -> asyncio.Lock: + global _REFRESH_LOCK + if _REFRESH_LOCK is None: + _REFRESH_LOCK = asyncio.Lock() + return _REFRESH_LOCK + + +def _channel_url_for_group(group: dict[str, Any]) -> str: + cid = str(group.get("channel_id") or "").strip() + if cid: + return f"https://www.youtube.com/channel/{cid}" + url = str(group.get("channel_url") or "").strip() + if url: + return normalize_youtube_channel_url(url) + handle = str(group.get("handle") or "").strip() + if handle: + h = handle if handle.startswith("@") else f"@{handle}" + return f"https://www.youtube.com/{h}" + key = str(group.get("channel_key") or "").strip() + if key.startswith("UC"): + return f"https://www.youtube.com/channel/{key}" + if key.startswith("@"): + return f"https://www.youtube.com/{key}" + return url or key + + +def _channel_url_for_shorts(ch: dict[str, Any]) -> str: + cid = str(ch.get("youtube_channel_id") or "").strip() + if cid: + return f"https://www.youtube.com/channel/{cid}" + return "" + + +def _live_entry( + *, + is_live: bool, + source: str, + live_url: str = "", + title: str = "", + channel_id: str = "", + error: str = "", +) -> dict[str, Any]: + out: dict[str, Any] = {"is_live": bool(is_live), "source": source} + if is_live: + if live_url: + out["live_url"] = live_url + if title: + out["title"] = title + if channel_id: + out["channel_id"] = channel_id + if error: + out["error"] = error + return out + + +def _parse_batch_result(row: dict[str, Any]) -> dict[str, Any]: + if not row.get("ok"): + return _live_entry(is_live=False, source="youtubei", error=str(row.get("error") or "probe failed")) + live = row.get("live") if isinstance(row.get("live"), dict) else {} + live_url = str(live.get("url") or live.get("watch_url") or "").strip() + if not live_url: + vid = str(live.get("video_id") or live.get("id") or "").strip() + if vid: + live_url = f"https://www.youtube.com/watch?v={vid}" + title = str(live.get("title") or row.get("title") or "").strip() + cid = str(row.get("channel_id") or "").strip() + return _live_entry( + is_live=bool(row.get("is_live")), + source="youtubei", + live_url=live_url, + title=title, + channel_id=cid, + ) + + +async def _oauth_live_for_shorts(channel_pk: str, youtube_channel_id: str) -> Optional[dict[str, Any]]: + """Detect whether this OAuth-owned channel is currently live. + + Prefer liveBroadcasts.list (mine + active) — 1 quota unit, no Search Queries pool. + Fall back to search.list only if broadcasts API is unavailable. + """ + try: + from . import youtube_manage + + token, _ch = await youtube_manage._access_for_channel(channel_pk) + + # 1) Own-channel liveBroadcasts (correct for Shorts upload channels) + # Note: broadcastStatus + mine can be rejected as incompatible; list mine then filter. + try: + data = await youtube_manage._get( + "liveBroadcasts", + token=token, + params={ + "part": "id,snippet,status", + "mine": "true", + "maxResults": 25, + }, + ) + items = data.get("items") or [] + live_items = [ + it + for it in items + if str(((it.get("status") or {}).get("lifeCycleStatus") or "")).lower() == "live" + ] + if live_items: + item = live_items[0] + sn = item.get("snippet") or {} + vid = str(item.get("id") or "").strip() + title = str(sn.get("title") or "").strip() + live_url = f"https://www.youtube.com/watch?v={vid}" if vid else "" + return _live_entry( + is_live=True, + source="oauth-broadcast", + live_url=live_url, + title=title, + channel_id=youtube_channel_id, + ) + # Explicit offline from liveBroadcasts — do NOT burn Search Queries quota. + return _live_entry(is_live=False, source="oauth-broadcast", channel_id=youtube_channel_id) + except Exception as broadcast_exc: + # Broadcasts unavailable → leave detection to youtubei (public). Never search.list. + return _live_entry( + is_live=False, + source="oauth-broadcast", + channel_id=youtube_channel_id, + error=f"broadcasts_unavailable:{str(broadcast_exc)[:140]}", + ) + except Exception as exc: + return _live_entry( + is_live=False, + source="oauth", + channel_id=youtube_channel_id, + error=str(exc)[:200], + ) + + +_REFRESH_TASK: Optional[asyncio.Task] = None + + +def _empty_live_map(*, now: float, refreshing: bool = False) -> dict[str, Any]: + return { + "ok": True, + "checked_at": int(now), + "live_count": 0, + "source": "none", + "entries": {}, + "groups_total": 0, + "shorts_total": 0, + "poll_sec": 20, + "cache_ttl_sec": _CACHE_TTL_SEC, + "refreshing": refreshing, + } + + +def _schedule_live_map_refresh() -> None: + """Kick a background rebuild; never block HTTP handlers on youtube-svc.""" + global _REFRESH_TASK + if str(os.environ.get("DY_DESKTOP_LIGHT") or "").strip().lower() in {"1", "true", "yes"}: + # Desktop UI must stay clickable; live-map refresh is opt-in via force loop elsewhere + return + lock = _refresh_lock() + if lock.locked(): + return + task = _REFRESH_TASK + if task is not None and not task.done(): + return + + async def _run() -> None: + try: + async with _refresh_lock(): + await _build_live_map_unlocked(now=time.time()) + except Exception: + pass + + _REFRESH_TASK = asyncio.create_task(_run()) + + +async def build_live_map(*, force: bool = False) -> dict[str, Any]: + now = time.time() + cached = _CACHE.get("payload") + fresh = bool(cached) and now - float(_CACHE.get("at") or 0) < _CACHE_TTL_SEC + + # force=True must actually rebuild (homepage/ops probes rely on this). + if force: + async with _refresh_lock(): + return await _build_live_map_unlocked(now=time.time()) + + if cached and fresh: + return cached + if cached: + _schedule_live_map_refresh() + return cached + + # No cache yet: return empty immediately and refresh in background + _schedule_live_map_refresh() + return _empty_live_map(now=now, refreshing=True) + + +async def _build_live_map_unlocked(*, now: float) -> dict[str, Any]: + global _LAST_OAUTH_AT + + def _load_db_targets() -> tuple[list[dict[str, Any]], list[dict[str, Any]], list[dict[str, Any]]]: + from . import yt_assign_db + + groups = (db.list_channel_groups(platform="youtube", limit=500, offset=0).get("groups") or []) + shorts = db.list_shorts_channels() + # Live 分配授权频道卡 — 与 Shorts/旧分组一样走公开 youtubei 探测(双机应一致) + assign = yt_assign_db.list_groups(include_urls=False) + return groups, shorts, assign + + groups, shorts, assign_groups_early = await asyncio.to_thread(_load_db_targets) + + targets: list[dict[str, Any]] = [] + url_to_refs: dict[str, list[tuple[str, dict[str, Any]]]] = {} + cid_to_refs: dict[str, list[tuple[str, dict[str, Any]]]] = {} + + for g in groups: + url = _channel_url_for_group(g) + ref = f"group:{g['id']}" + meta = {"kind": "group", "group": g, "url": url} + targets.append({"ref": ref, "url": url, **meta}) + if url: + url_to_refs.setdefault(url, []).append((ref, meta)) + cid = str(g.get("channel_id") or "").strip() + if cid: + cid_to_refs.setdefault(cid, []).append((ref, meta)) + + for ch in shorts: + url = _channel_url_for_shorts(ch) + ref = f"shorts:{ch['id']}" + meta = {"kind": "shorts", "channel_pk": ch["id"], "youtube_channel_id": ch.get("youtube_channel_id"), "url": url} + targets.append({"ref": ref, "url": url, **meta}) + if url: + url_to_refs.setdefault(url, []).append((ref, meta)) + cid = str(ch.get("youtube_channel_id") or "").strip() + if cid: + cid_to_refs.setdefault(cid, []).append((ref, meta)) + targets.append({"ref": f"channel:{cid}", "url": url or f"https://www.youtube.com/channel/{cid}", **meta}) + + # Assign cards: same public youtubei probe as shorts (VPS ↔ physical must match for same UC ids). + seen_assign_cid: set[str] = set() + for ag in assign_groups_early: + if not ag.get("enabled"): + continue + gid = str(ag.get("id") or "").strip() + if not gid: + continue + cid = str(ag.get("youtube_channel_id") or "").strip() + pk = str(ag.get("channel_pk") or "").strip() + if not cid and pk: + try: + ch = db.get_shorts_channel(pk) or {} + cid = str(ch.get("youtube_channel_id") or "").strip() + except Exception: + cid = "" + if not cid: + continue + url = f"https://www.youtube.com/channel/{cid}" + meta = { + "kind": "assign", + "assign_group_id": gid, + "channel_pk": pk, + "youtube_channel_id": cid, + "title": str(ag.get("name") or "").strip(), + "url": url, + } + targets.append({"ref": f"assign:{gid}", "url": url, **meta}) + url_to_refs.setdefault(url, []).append((f"assign:{gid}", meta)) + cid_to_refs.setdefault(cid, []).append((f"assign:{gid}", meta)) + if cid not in seen_assign_cid: + seen_assign_cid.add(cid) + targets.append({"ref": f"channel:{cid}", "url": url, **meta}) + if pk: + # Keep shorts ref in sync when assign shares the same OAuth channel. + targets.append( + { + "ref": f"shorts:{pk}", + "url": url, + "kind": "shorts", + "channel_pk": pk, + "youtube_channel_id": cid, + } + ) + + entries: dict[str, Any] = {} + unique_urls: list[str] = [] + seen_urls: set[str] = set() + for t in targets: + url = str(t.get("url") or "").strip() + if not url or url in seen_urls: + continue + seen_urls.add(url) + unique_urls.append(url) + + probe_by_url: dict[str, dict[str, Any]] = {} + svc_error = "" + if unique_urls: + try: + for i in range(0, len(unique_urls), _BATCH_SIZE): + chunk = unique_urls[i : i + _BATCH_SIZE] + data = await youtube_client.batch_live(chunk) + for row in data.get("results") or []: + if not isinstance(row, dict): + continue + key = str(row.get("input") or "").strip() + if key: + probe_by_url[key] = _parse_batch_result(row) + cid = str(row.get("channel_id") or "").strip() + if cid: + probe_by_url[f"cid:{cid}"] = _parse_batch_result(row) + except YouTubeSvcError as exc: + svc_error = str(exc) + + for t in targets: + ref = str(t["ref"]) + url = str(t.get("url") or "").strip() + entry = probe_by_url.get(url) if url else None + cid = str(t.get("youtube_channel_id") or (t.get("group") or {}).get("channel_id") or "").strip() + + if entry is None and cid: + entry = probe_by_url.get(f"cid:{cid}") + + if entry is None and svc_error: + entry = _live_entry(is_live=False, source="youtubei", error=svc_error) + + if entry is None: + entry = _live_entry(is_live=False, source="unknown") + + if t.get("kind") == "group" and not entry.get("is_live") and not svc_error: + g = t.get("group") or {} + if str(g.get("last_status") or "") == "live": + entry = _live_entry( + is_live=True, + source="monitor", + live_url=str(g.get("last_live_url") or ""), + title=str(g.get("last_title") or ""), + channel_id=str(g.get("channel_id") or ""), + ) + + # Prefer keeping an already-live youtubei hit if we revisit the same ref. + prev = entries.get(ref) + if prev and prev.get("is_live") and not entry.get("is_live"): + entry = dict(prev) + elif t.get("kind") == "assign" and entry.get("is_live"): + entry = dict(entry) + entry["assign_group_id"] = str(t.get("assign_group_id") or "") + entry["channel_pk"] = str(t.get("channel_pk") or "") + if t.get("title"): + entry["title"] = str(t.get("title") or "") + if cid: + entry["channel_id"] = cid + + entries[ref] = dict(entry) + if cid and entry.get("is_live"): + entries[f"channel:{cid}"] = dict(entry) + if t.get("kind") == "assign" and t.get("channel_pk"): + pk = str(t.get("channel_pk") or "") + shorts_ref = f"shorts:{pk}" + if not (entries.get(shorts_ref) or {}).get("is_live"): + se = dict(entry) + se["assign_group_id"] = str(t.get("assign_group_id") or "") + entries[shorts_ref] = se + + # HTTP /channel/UC…/live fallback — youtubei tab scans often miss true on-air streams. + http_cids: list[str] = [] + seen_http: set[str] = set() + for t in targets: + cid = str(t.get("youtube_channel_id") or (t.get("group") or {}).get("channel_id") or "").strip() + if not cid or cid in seen_http: + continue + ch_ent = entries.get(f"channel:{cid}") or {} + # Probe when missing or youtubei said offline + if ch_ent.get("is_live"): + continue + seen_http.add(cid) + http_cids.append(cid) + if http_cids: + # Cap fan-out — each probe may try multiple proxies with long urllib timeouts. + sem = asyncio.Semaphore(int(os.environ.get("DY_LIVE_HTTP_PROBE_CONCURRENCY", "4") or "4")) + + async def _bounded(cid: str) -> Any: + async with sem: + return await asyncio.to_thread(_http_channel_live_probe, cid) + + http_results = await asyncio.gather( + *[_bounded(cid) for cid in http_cids], + return_exceptions=True, + ) + cid_to_targets: dict[str, list[dict[str, Any]]] = {} + for t in targets: + cid = str(t.get("youtube_channel_id") or (t.get("group") or {}).get("channel_id") or "").strip() + if cid: + cid_to_targets.setdefault(cid, []).append(t) + for cid, result in zip(http_cids, http_results): + if isinstance(result, Exception) or not isinstance(result, dict): + continue + if not result.get("is_live"): + continue + live_ent = _live_entry( + is_live=True, + source="http_live", + live_url=str(result.get("live_url") or ""), + title=str(result.get("title") or ""), + channel_id=cid, + ) + entries[f"channel:{cid}"] = live_ent + for t in cid_to_targets.get(cid) or []: + ref = str(t.get("ref") or "") + if not ref: + continue + cur = entries.get(ref) or {} + if cur.get("is_live"): + continue + ent = dict(live_ent) + if t.get("kind") == "assign": + ent["assign_group_id"] = str(t.get("assign_group_id") or "") + ent["channel_pk"] = str(t.get("channel_pk") or "") + if t.get("title"): + ent["title"] = str(t.get("title") or ent.get("title") or "") + entries[ref] = ent + + # OAuth / liveBroadcasts:授权频道卡与 Shorts 共用 channel_pk 时必走(双机公开态应一致) + run_oauth = (now - float(_LAST_OAUTH_AT or 0)) >= _OAUTH_MIN_INTERVAL_SEC + oauth_tasks: list[tuple[str, str, str]] = [] + if run_oauth: + seen_oauth_pk: set[str] = set() + for ch in shorts: + cid = str(ch.get("youtube_channel_id") or "").strip() + pk = str(ch.get("id") or "") + if not cid or not pk: + continue + if not str(ch.get("refresh_token") or "").strip(): + continue + ref = f"shorts:{pk}" + if entries.get(ref, {}).get("is_live"): + continue + oauth_tasks.append((ref, pk, cid)) + seen_oauth_pk.add(pk) + # Assign cards that bind an OAuth shorts channel — same API path on VPS & physical. + for ag in assign_groups_early: + if not ag.get("enabled"): + continue + pk = str(ag.get("channel_pk") or "").strip() + cid = str(ag.get("youtube_channel_id") or "").strip() + gid = str(ag.get("id") or "").strip() + if not pk or not gid: + continue + if pk in seen_oauth_pk: + continue + if (entries.get(f"assign:{gid}") or {}).get("is_live"): + continue + if (entries.get(f"shorts:{pk}") or {}).get("is_live"): + continue + try: + ch = db.get_shorts_channel(pk) or {} + except Exception: + ch = {} + if not str(ch.get("refresh_token") or "").strip(): + continue + if not cid: + cid = str(ch.get("youtube_channel_id") or "").strip() + if not cid: + continue + oauth_tasks.append((f"shorts:{pk}", pk, cid)) + seen_oauth_pk.add(pk) + + if oauth_tasks: + _LAST_OAUTH_AT = now + oauth_results = await asyncio.gather( + *[_oauth_live_for_shorts(pk, cid) for _ref, pk, cid in oauth_tasks], + return_exceptions=True, + ) + pk_to_assign: dict[str, list[dict[str, Any]]] = {} + for ag in assign_groups_early: + pk = str(ag.get("channel_pk") or "").strip() + if pk: + pk_to_assign.setdefault(pk, []).append(ag) + for (ref, pk, cid), result in zip(oauth_tasks, oauth_results): + if isinstance(result, Exception) or not isinstance(result, dict): + continue + src = str(result.get("source") or "") + if result.get("is_live"): + entries[ref] = result + if cid: + entries[f"channel:{cid}"] = result + for ag in pk_to_assign.get(pk) or []: + gid = str(ag.get("id") or "").strip() + if not gid: + continue + ent = dict(result) + ent["assign_group_id"] = gid + ent["channel_pk"] = pk + if ag.get("name"): + ent["title"] = str(ag.get("name") or "") + entries[f"assign:{gid}"] = ent + elif src.startswith("oauth"): + # API answered offline — record so Studio cannot invent public live. + # Never replace a clean youtubei offline with an errored oauth result. + cur = entries.get(ref) or {} + if cur.get("is_live"): + continue + if ( + result.get("error") + and str(cur.get("source") or "") == "youtubei" + and not cur.get("error") + ): + continue + entries[ref] = dict(result) + if cid: + ch_cur = entries.get(f"channel:{cid}") or {} + if not ( + result.get("error") + and str(ch_cur.get("source") or "") == "youtubei" + and not ch_cur.get("error") + and not ch_cur.get("is_live") + ): + if not ch_cur.get("is_live"): + entries[f"channel:{cid}"] = dict(result) + for ag in pk_to_assign.get(pk) or []: + gid = str(ag.get("id") or "").strip() + if not gid: + continue + ae = entries.get(f"assign:{gid}") or {} + if ae.get("is_live"): + continue + if ( + result.get("error") + and str(ae.get("source") or "") == "youtubei" + and not ae.get("error") + ): + continue + ent = dict(result) + ent["assign_group_id"] = gid + ent["channel_pk"] = pk + if ag.get("name"): + ent["title"] = str(ag.get("name") or "") + entries[f"assign:{gid}"] = ent + elif _CACHE.get("payload") and isinstance(_CACHE.get("payload"), dict): + # 沿用上一次 OAuth 检出的 live,避免限频窗口内把真直播刷成离线 + prev = (_CACHE.get("payload") or {}).get("entries") or {} + for ref, old in prev.items(): + if not str(ref).startswith(("shorts:", "assign:")): + continue + if not isinstance(old, dict) or not old.get("is_live"): + continue + if str(old.get("source") or "").startswith("oauth"): + cur = entries.get(ref) or {} + if not cur.get("is_live"): + entries[ref] = dict(old) + cid = str(old.get("channel_id") or "").strip() + if cid: + entries[f"channel:{cid}"] = dict(old) + + # Mirror live Shorts → Live 分配;FFmpeg 转推 / Studio 遥测补洞 + try: + from . import yt_assign_db + from . import youtube_neko + from .youtube_relay_pipeline import youtube_relay_pipeline + + assign_groups = await asyncio.to_thread( + lambda: yt_assign_db.list_groups(include_urls=False) + ) + # Do NOT call full relay.status() here — it rebuilds heavy studio/neko payloads and + # used to recurse into douyin live-map (RSS blow-up on physical dy). + relay_rows = await asyncio.to_thread(youtube_relay_pipeline.pushing_flags) + pk_to_gid: dict[str, str] = {} + gid_to_name: dict[str, str] = {} + for g in assign_groups: + pk = str(g.get("channel_pk") or "").strip() + gid = str(g.get("id") or "").strip() + if pk and gid: + pk_to_gid[pk] = gid + gid_to_name[gid] = str(g.get("name") or "").strip() + + for ref, ent in list(entries.items()): + if not str(ref).startswith("shorts:"): + continue + if not isinstance(ent, dict) or not ent.get("is_live"): + continue + pk = str(ref).split(":", 1)[1] + gid = pk_to_gid.get(pk) + if not gid: + continue + ent["assign_group_id"] = gid + assign_ent = dict(ent) + assign_ent["source"] = "assign" + assign_ent["assign_group_id"] = gid + assign_ent["channel_pk"] = pk + if gid_to_name.get(gid): + assign_ent["title"] = gid_to_name[gid] + entries[f"assign:{gid}"] = assign_ent + + # Count assign cards per Neko — shared browsers must not cross-attribute Studio. + neko_share_count: dict[int, int] = {} + for g in assign_groups: + try: + nid = int(g.get("neko_instance_id") or 0) + except (TypeError, ValueError): + nid = 0 + if nid > 0: + neko_share_count[nid] = neko_share_count.get(nid, 0) + 1 + + for g in assign_groups: + gid = str(g.get("id") or "").strip() + if not gid: + continue + pk = str(g.get("channel_pk") or "").strip() + row = relay_rows.get(gid) or {} + cid = str(g.get("youtube_channel_id") or "").strip() + try: + group_neko_id = int(g.get("neko_instance_id") or 0) + except (TypeError, ValueError): + group_neko_id = 0 + neko_shared = bool(group_neko_id > 0 and neko_share_count.get(group_neko_id, 0) > 1) + + # Already marked live via youtubei/OAuth for this shorts/channel → receiving-level truth. + prev_live = entries.get(f"assign:{gid}") or {} + if not prev_live.get("is_live") and pk: + prev_live = entries.get(f"shorts:{pk}") or {} + if not prev_live.get("is_live") and cid: + prev_live = entries.get(f"channel:{cid}") or {} + + # Prefer group-aware Studio snap (remote ops-neko when prefer=remote). + studio_snap: dict[str, Any] = {} + try: + studio_snap = await asyncio.to_thread( + lambda gg=g: youtube_neko.studio_snapshot_for_group( + gg, max_age_sec=120.0, include_minute_reports=False + ) + ) + except Exception: + studio_snap = {} + if not studio_snap.get("on_air") and not studio_snap.get("encoder_receiving"): + # Legacy local-instance CDP lookup as extra receiving probe. + try: + nid = int(g.get("neko_instance_id") or 0) + except (TypeError, ValueError): + nid = 0 + if nid > 0: + try: + local_snap = await asyncio.to_thread( + lambda n=nid: youtube_neko.studio_on_air_lookup(n, max_age_sec=120.0) + ) + except Exception: + local_snap = {} + if local_snap.get("on_air") or local_snap.get("encoder_receiving"): + studio_snap = local_snap + + # Fallback: match telemetry by group's saved studio URL (receiving signals only). + if not ( + studio_snap.get("on_air") + or studio_snap.get("encoder_receiving") + or str(studio_snap.get("live_status") or "").lower() == "live" + ): + studio_url = str(g.get("neko_studio_url") or "") + vid = "" + if "/video/" in studio_url: + try: + vid = studio_url.split("/video/", 1)[1].split("/", 1)[0] + except Exception: + vid = "" + if vid: + for ev in youtube_neko.latest_studio_telemetry(limit=40): + payload = ev.get("payload") if isinstance(ev.get("payload"), dict) else {} + url = str(payload.get("url") or "") + if vid not in url: + continue + signals = payload.get("signals") if isinstance(payload.get("signals"), dict) else {} + st = str(payload.get("live_status") or "").lower() + health = str(payload.get("health") or "").lower() + # Never invent receiving from Excellent/health alone (Preparing+Excellent bug). + receiving = bool( + signals.get("encoder_receiving") + or signals.get("on_air") + or st == "live" + ) and not ( + signals.get("preparing_stream") + or st in _STUDIO_DEAD_STATUSES + or signals.get("encoder_lost") + ) + if not receiving: + continue + if signals.get("encoder_lost") or st in _STUDIO_DEAD_STATUSES: + continue + age = None + try: + age = time.time() - float(ev.get("received_at") or 0) + except (TypeError, ValueError): + age = None + if age is not None and age > _STUDIO_SAMPLE_MAX_AGE_SEC: + continue + studio_snap = { + "on_air": True, + "encoder_receiving": bool(signals.get("encoder_receiving") or st == "live"), + "live_page_open": True, + "live_status": st or "live", + "health": health, + "viewer_count": payload.get("viewer_count"), + "url": url[:200], + "received_at": float(ev.get("received_at") or 0), + "age_sec": round(age, 1) if age is not None else None, + "detect_source": "telemetry_url_match", + } + break + + # DB samples (physical local Neko CDP / extension) — fill when in-memory snap is quiet. + # Never trust edge_assign_live mirrors (circular sticky 在播). + if not ( + studio_snap.get("on_air") + or studio_snap.get("encoder_receiving") + or str(studio_snap.get("live_status") or "").lower() == "live" + ): + try: + from . import yt_studio_db + + samples = await asyncio.to_thread( + lambda: yt_studio_db.list_samples( + group_id=gid, since_ts=now - _STUDIO_SAMPLE_MAX_AGE_SEC, limit=5 + ) + ) + if not samples and cid: + samples = await asyncio.to_thread( + lambda: yt_studio_db.list_samples( + youtube_channel_id=cid, + since_ts=now - _STUDIO_SAMPLE_MAX_AGE_SEC, + limit=5, + ) + ) + except Exception: + samples = [] + for s in samples or []: + detect = str(s.get("detect_source") or "").strip().lower() + if detect in _UNTRUSTED_SAMPLE_SOURCES: + continue + st = str(s.get("live_status") or "").lower() + if st in _STUDIO_DEAD_STATUSES: + continue + if s.get("preparing_stream"): + continue + if not (s.get("on_air") or st == "live"): + continue + try: + sample_age = now - float(s.get("ts") or 0) + except (TypeError, ValueError): + sample_age = 9999.0 + if sample_age > _STUDIO_SAMPLE_MAX_AGE_SEC: + continue + studio_snap = { + "on_air": bool(s.get("on_air")), + "encoder_receiving": bool(s.get("on_air") or st == "live"), + "live_page_open": bool(s.get("live_page_open") or True), + "live_status": st or "live", + "health": str(s.get("health") or ""), + "viewer_count": s.get("viewer_count"), + "url": str(s.get("studio_url") or "")[:200], + "received_at": float(s.get("ts") or 0), + "age_sec": round(sample_age, 1), + "detect_source": detect or "yt_studio_samples", + "neko_ref": str(s.get("neko_ref") or ""), + } + break + + receiving = _studio_receiving_from_snap(studio_snap) + if receiving and not _studio_snap_belongs_to_assign_group( + studio_snap, + youtube_channel_id=cid, + neko_shared=neko_shared, + group_is_pushing=bool(row.get("is_pushing")), + studio_url_hint=str(g.get("neko_studio_url") or ""), + ): + receiving = False + + # Collect public probe answers across assign / channel / shorts refs. + public_sources = { + "youtubei", + "http_live", + "oauth", + "oauth-broadcast", + "oauth_liveBroadcasts", + } + public_live_hit: dict[str, Any] | None = None + public_offline_hit: dict[str, Any] | None = None + for key in ( + f"assign:{gid}", + f"channel:{cid}" if cid else "", + f"shorts:{pk}" if pk else "", + ): + if not key: + continue + p = entries.get(key) + if not isinstance(p, dict): + continue + s = str(p.get("source") or "") + if s not in public_sources: + continue + if p.get("is_live"): + public_live_hit = p + break + # Prefer clean offline answers; youtubei offline always counts even if + # another ref holds an errored oauth leftover. + if not p.get("error"): + public_offline_hit = p + elif s == "youtubei" and not p.get("is_live"): + public_offline_hit = public_offline_hit or p + + prev_public = bool( + prev_live.get("is_live") + and str(prev_live.get("source") or "") in public_sources + ) + # Receiving-first: Studio on_air / encoder_receiving beats public offline + # (youtubei false-negatives + OAuth "mine" miss when push uses another key). + if receiving: + mark_live = True + source = "studio_receiving" + elif public_live_hit or prev_public: + mark_live = True + source = str( + (public_live_hit or prev_live).get("source") or "youtubei" + ) + elif public_offline_hit is not None: + mark_live = bool(row.get("is_pushing")) + source = "relay" if mark_live else "" + else: + mark_live = bool(row.get("is_pushing")) + source = "relay" if mark_live else "" + + if not mark_live: + base = entries.get(f"assign:{gid}") or { + "is_live": False, + "source": str((public_offline_hit or {}).get("source") or "unknown"), + "assign_group_id": gid, + "channel_pk": pk, + "title": gid_to_name.get(gid) or str(g.get("name") or ""), + "channel_id": cid, + } + base = dict(base) + base["is_live"] = False + if studio_snap.get("live_page_open") or studio_snap: + base["studio"] = studio_snap + entries[f"assign:{gid}"] = base + continue + + prev = entries.get(f"assign:{gid}") or prev_live or {} + if prev.get("is_live") and prev.get("source") not in { + "relay", + "studio_telemetry", + "studio_receiving", + }: + source = str(prev.get("source") or source) + entries[f"assign:{gid}"] = { + **prev, + "is_live": True, + "source": source, + "assign_group_id": gid, + "channel_pk": pk, + "title": gid_to_name.get(gid) or prev.get("title") or str(g.get("name") or ""), + "live_url": str(studio_snap.get("url") or prev.get("live_url") or ""), + "studio": studio_snap or prev.get("studio") or {}, + } + if pk: + shorts_ref = f"shorts:{pk}" + shorts_prev = entries.get(shorts_ref) or {} + if not shorts_prev.get("is_live"): + entries[shorts_ref] = { + **shorts_prev, + "is_live": True, + "source": source, + "assign_group_id": gid, + "title": shorts_prev.get("title") or gid_to_name.get(gid) or "", + "live_url": str(studio_snap.get("url") or shorts_prev.get("live_url") or ""), + } + else: + entries[shorts_ref]["assign_group_id"] = gid + cid2 = str(shorts_prev.get("channel_id") or g.get("youtube_channel_id") or "").strip() + if cid2: + entries[f"channel:{cid2}"] = dict(entries[shorts_ref]) + except Exception as exc: + import logging + + logging.getLogger(__name__).warning("live-map assign/studio mirror failed: %s", exc) + + live_count = 0 + seen_assign: set[str] = set() + for k, v in entries.items(): + if not k.startswith("assign:") or not v.get("is_live"): + continue + live_count += 1 + seen_assign.add(k.split(":", 1)[1]) + for k, v in entries.items(): + if not v.get("is_live"): + continue + if k.startswith("shorts:"): + gid = str(v.get("assign_group_id") or "") + if gid and gid in seen_assign: + continue + live_count += 1 + elif k.startswith("group:"): + live_count += 1 + sources = {str(v.get("source") or "") for v in entries.values() if v.get("is_live")} + primary_source = "youtubei" if "youtubei" in sources else (next(iter(sources)) if sources else "none") + + payload = { + "ok": True, + "checked_at": int(now), + "live_count": live_count, + "source": primary_source, + "entries": entries, + "groups_total": len(groups), + "shorts_total": len(shorts), + "poll_sec": 20, + "cache_ttl_sec": _CACHE_TTL_SEC, + } + if svc_error: + payload["svc_error"] = svc_error + + # Shorts 上传频道开播/停播 → sessions,供 /shorts 数据分析 + try: + payload["shorts_live_sync"] = db.sync_shorts_channel_lives_from_map(entries) + except Exception as exc: + payload["shorts_live_sync"] = {"error": str(exc)[:160]} + + _CACHE["at"] = now + _CACHE["payload"] = payload + return payload diff --git a/backend/app/yt_long_clip.py b/backend/app/yt_long_clip.py index 05fad05..6bae9c5 100644 --- a/backend/app/yt_long_clip.py +++ b/backend/app/yt_long_clip.py @@ -52,10 +52,10 @@ async def record_long_clip( job_id: str, stream_urls: list[str] | None = None, stream_url: str = "", - seconds: int = 300, + seconds: int = 600, cfg: dict[str, Any] | None = None, ) -> dict[str, Any]: - """Pull live stream for 3–8 minutes into a 9:16 mp4 (16:9 only if explicitly enabled).""" + """Pull live stream for 8–15 minutes into a 9:16 mp4 (16:9 only if explicitly enabled).""" urls: list[str] = [] for u in list(stream_urls or []) + [stream_url]: s = str(u or "").strip() @@ -64,7 +64,7 @@ async def record_long_clip( if not urls: return {"ok": False, "error": "无可用流地址"} - sec = max(YT_LONG_MIN_SEC, min(int(seconds or 300), YT_LONG_MAX_SEC)) + sec = max(YT_LONG_MIN_SEC, min(int(seconds or 600), YT_LONG_MAX_SEC)) out_path = clips_dir() / f"{job_id}.mp4" vf = _vf_for_settings(cfg) last_err = "" diff --git a/backend/app/yt_long_db.py b/backend/app/yt_long_db.py index b8b2123..9a034c8 100644 --- a/backend/app/yt_long_db.py +++ b/backend/app/yt_long_db.py @@ -32,8 +32,8 @@ YT_LONG_CHANNEL_DEFAULT = 5 # Beijing-day target per channel (normal) YT_LONG_CHANNEL_LIMITED = 4 # when shared YouTube API quota is limited (3 < n < 5) YT_LONG_DAILY_DEFAULT = 70 # 14 channels × 5 YT_LONG_SOURCE_DEFAULT = 70 -YT_LONG_MIN_SEC = 180 # 3 min -YT_LONG_MAX_SEC = 480 # 8 min +YT_LONG_MIN_SEC = 480 # 8 min +YT_LONG_MAX_SEC = 900 # 15 min def ensure_yt_long_tables(conn: sqlite3.Connection) -> None: @@ -144,23 +144,39 @@ def yt_long_daily_max(cfg: dict[str, Any] | None = None) -> int: return max(0, min(200, v)) +def yt_long_enabled_upload_cap(cfg: dict[str, Any] | None = None) -> int: + """Sum of daily_max for enabled oauth yt_long channels (authoritative upload/master cap).""" + per = effective_yt_long_channel_daily_max(cfg) + total = 0 + n = 0 + for ch in list_yt_long_channels(enabled=True): + if not ch.get("enabled", True): + continue + if not str(ch.get("refresh_token") or "").strip(): + continue + n += 1 + try: + row_max = int(ch.get("daily_max") or 0) + except Exception: + row_max = 0 + if row_max <= 0: + row_max = per + # Soft API limit: never count above effective per-channel cap. + total += min(row_max, per) if per > 0 else row_max + if n <= 0: + return max(0, per) + return max(0, total) + + def yt_long_source_daily_max(cfg: dict[str, Any] | None = None) -> int: - """Master recording daily cap — must cover cascade platform needs.""" + """Master recording daily cap — equals enabled long-upload quota (not Shorts fleet).""" from . import db settings = cfg if cfg is not None else db.get_settings_map() - upload_cap = yt_long_daily_max(settings) - try: - v = int(settings.get("yt_long_source_daily_max") or 0) - except Exception: - v = 0 - if v <= 0: - v = max(upload_cap, YT_LONG_SOURCE_DEFAULT) - try: - hard = max(42, min(300, int(settings.get("yt_long_source_cap") or 200))) - except Exception: - hard = 200 - return max(upload_cap, min(hard, v)) + upload_cap = yt_long_enabled_upload_cap(settings) + if upload_cap <= 0: + upload_cap = yt_long_daily_max(settings) + return max(0, upload_cap) def youtube_api_upload_limited(cfg: dict[str, Any] | None = None) -> bool: @@ -234,14 +250,27 @@ def reconcile_yt_long_upload_caps(cfg: dict[str, Any] | None = None) -> dict[str limited = youtube_api_upload_limited(settings) per = effective_yt_long_channel_daily_max(settings) n = count_oauth_yt_long_channels(enabled_only=True) - global_max = max(per, n * per) if n else max(per, YT_LONG_DAILY_DEFAULT) + # Enabled channels only — never multiply by disabled Account B rows. + global_max = yt_long_enabled_upload_cap(settings) + if global_max <= 0: + global_max = max(per, n * per) if n else max(per, 0) try: stored_global = int(settings.get("yt_long_daily_max") or 0) except Exception: stored_global = 0 + patch: dict[str, Any] = {} if stored_global != global_max: + patch["yt_long_daily_max"] = global_max + # Keep source in lockstep with enabled upload cap (clear Shorts-inflated 63 etc.). + try: + stored_src = int(settings.get("yt_long_source_daily_max") or 0) + except Exception: + stored_src = 0 + if stored_src != global_max: + patch["yt_long_source_daily_max"] = global_max + if patch: try: - db.update_settings_map({"yt_long_daily_max": global_max}) + db.update_settings_map(patch) settings = db.get_settings_map() except Exception: pass @@ -777,27 +806,43 @@ def claim_due_yt_long_upload(*, skip_profile_ids: set[str] | None = None) -> dic ensure_yt_long_tables(conn) rows = conn.execute( """ - SELECT j.*, COALESCE(NULLIF(TRIM(c.oauth_profile_id), ''), 'A') AS oauth_profile_id + SELECT j.*, COALESCE(NULLIF(TRIM(c.oauth_profile_id), ''), 'A') AS oauth_profile_id, + IFNULL(c.oauth_ok, -1) AS ch_oauth_ok FROM yt_long_jobs j INNER JOIN yt_long_channels c ON c.id = j.channel_pk WHERE j.status = 'scheduled' AND c.enabled = 1 + AND IFNULL(c.oauth_ok, -1) != 0 AND j.clip_path != '' AND j.upload_at > 0 AND j.upload_at <= ? ORDER BY j.upload_at ASC, j.created_at ASC - LIMIT 30 + LIMIT 40 """, (now,), ).fetchall() + import os picked = None for row in rows: pid = str(row["oauth_profile_id"] or "A").strip().upper() or "A" if pid in skip: continue + path = str(row["clip_path"] or "").strip() + if not (path and os.path.isfile(path) and os.path.getsize(path) > 1024): + conn.execute( + """ + UPDATE yt_long_jobs + SET status='pending', clip_path='', clip_seconds=0, upload_at=0, + started_at=0, error='成片丢失,已重新排队录制', updated_at=? + WHERE id=? AND status='scheduled' + """, + (now, str(row["id"])), + ) + continue picked = row break if not picked: + conn.commit() return None jid = str(picked["id"]) cur = conn.execute( @@ -877,9 +922,9 @@ def count_yt_long_jobs_by_status(status: str, *, push_date: str = "") -> int: conn.close() -def reclaim_stale_yt_long_recordings(*, max_age_sec: float = 720) -> int: - """Reclaim orphan recording rows. Never reclaim before ~12 min (3–8 min clip + encode slack).""" - age = max(720.0, float(max_age_sec)) +def reclaim_stale_yt_long_recordings(*, max_age_sec: float = 1200) -> int: + """Reclaim orphan recording rows. Never reclaim before ~20 min (8–15 min clip + encode slack).""" + age = max(1200.0, float(max_age_sec)) cutoff = time.time() - age with _lock: conn = _connect() @@ -904,24 +949,184 @@ def reclaim_stale_yt_long_recordings(*, max_age_sec: float = 720) -> int: def reclaim_stale_yt_long_uploads(*, max_age_sec: float = 1800) -> int: - cutoff = time.time() - max(180.0, float(max_age_sec)) + """Requeue orphan uploading rows; scale age by clip length; drop if file gone.""" + import os + + base = max(1800.0, float(max_age_sec)) + now = time.time() + n = 0 with _lock: conn = _connect() try: ensure_yt_long_tables(conn) + rows = conn.execute( + """ + SELECT id, clip_path, clip_seconds, updated_at, attempts + FROM yt_long_jobs + WHERE status = 'uploading' AND IFNULL(youtube_video_id, '') = '' + """ + ).fetchall() + for row in rows: + jid = str(row["id"]) + clip_sec = float(row["clip_seconds"] or 0) + # Allow ~3x clip duration + 10m encode/upload slack (15m clip => ~55m) + need = max(base, clip_sec * 3.0 + 600.0) + if float(row["updated_at"] or 0) > now - need: + continue + path = str(row["clip_path"] or "").strip() + alive = bool(path) and os.path.isfile(path) and os.path.getsize(path) > 1024 + attempts = int(row["attempts"] or 0) + if alive: + backoff = min(3600.0, 60.0 * (2 ** min(6, max(0, attempts - 1)))) + conn.execute( + """ + UPDATE yt_long_jobs + SET status = 'scheduled', + error = 'upload_stale_reclaim', + upload_at = ?, + updated_at = ? + WHERE id = ? AND status = 'uploading' + """, + (now + backoff, now, jid), + ) + else: + conn.execute( + """ + UPDATE yt_long_jobs + SET status = 'pending', + clip_path = '', + clip_seconds = 0, + upload_at = 0, + started_at = 0, + error = '成片丢失,已重新排队录制', + updated_at = ? + WHERE id = ? AND status = 'uploading' + """, + (now, jid), + ) + n += 1 + if n: + conn.commit() + return n + finally: + conn.close() + + +def heal_yt_long_orphan_jobs() -> dict[str, int]: + """Self-heal impossible/orphan jobs so every enabled channel can progress.""" + import os + + now = time.time() + missing = 0 + promoted = 0 + restart_orphans = 0 + with _lock: + conn = _connect() + try: + ensure_yt_long_tables(conn) + # 1) Already have YouTube id but stuck in scheduled/uploading → uploaded cur = conn.execute( """ UPDATE yt_long_jobs - SET status = 'scheduled', error = 'upload_stale_reclaim', updated_at = ? - WHERE status = 'uploading' AND updated_at < ? - AND IFNULL(youtube_video_id, '') = '' + SET status = 'uploaded', + error = CASE + WHEN IFNULL(error,'') = '' THEN 'heal_promoted_existing_video_id' + ELSE error + END, + finished_at = CASE WHEN IFNULL(finished_at,0)=0 THEN ? ELSE finished_at END, + updated_at = ? + WHERE status IN ('scheduled', 'uploading', 'recorded') + AND IFNULL(youtube_video_id, '') != '' """, - (time.time(), cutoff), + (now, now), ) - conn.commit() - return int(cur.rowcount or 0) + promoted = int(cur.rowcount or 0) + + # 2) uploading after process restart is never resumed → requeue/fail by file + rows = conn.execute( + """ + SELECT id, clip_path, clip_seconds, attempts + FROM yt_long_jobs + WHERE status = 'uploading' AND IFNULL(youtube_video_id, '') = '' + """ + ).fetchall() + for row in rows: + jid = str(row["id"]) + path = str(row["clip_path"] or "").strip() + alive = bool(path) and os.path.isfile(path) and os.path.getsize(path) > 1024 + attempts = int(row["attempts"] or 0) + if alive: + backoff = min(900.0, 30.0 * (2 ** min(5, max(0, attempts - 1)))) + conn.execute( + """ + UPDATE yt_long_jobs + SET status = 'scheduled', + error = 'upload_restart_requeue', + upload_at = ?, + updated_at = ? + WHERE id = ? AND status = 'uploading' + """, + (now + backoff, now, jid), + ) + else: + conn.execute( + """ + UPDATE yt_long_jobs + SET status = 'pending', + clip_path = '', + clip_seconds = 0, + upload_at = 0, + started_at = 0, + error = '成片丢失,已重新排队录制', + updated_at = ? + WHERE id = ? AND status = 'uploading' + """, + (now, jid), + ) + restart_orphans += 1 + + # 3) scheduled/recorded without master file → re-record + rows = conn.execute( + """ + SELECT id, clip_path, status, error + FROM yt_long_jobs + WHERE status IN ('scheduled', 'recorded') + AND IFNULL(youtube_video_id, '') = '' + """ + ).fetchall() + for row in rows: + err = str(row["error"] or "") + if err.startswith("cascade_only"): + continue + path = str(row["clip_path"] or "").strip() + alive = bool(path) and os.path.isfile(path) and os.path.getsize(path) > 1024 + if alive: + continue + conn.execute( + """ + UPDATE yt_long_jobs + SET status = 'pending', + clip_path = '', + clip_seconds = 0, + upload_at = 0, + started_at = 0, + error = '成片丢失,已重新排队录制', + updated_at = ? + WHERE id = ? + """, + (now, str(row["id"])), + ) + missing += 1 + + if missing or promoted or restart_orphans: + conn.commit() finally: conn.close() + return { + "requeued_missing_clip": missing, + "promoted_existing_video_id": promoted, + "restart_upload_orphans": restart_orphans, + } def yt_long_stats(push_date: str = "") -> dict[str, Any]: diff --git a/backend/app/yt_long_pipeline.py b/backend/app/yt_long_pipeline.py index d410f32..b67a92c 100644 --- a/backend/app/yt_long_pipeline.py +++ b/backend/app/yt_long_pipeline.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Isolated YouTube long-form (default 9:16) pipeline. -Records 3–8 min masters; optionally cascades cuts to TikTok / Shorts / X +Records 8–15 min masters; optionally cascades cuts to TikTok / Shorts / X via clip_cascade (each platform keeps its own tables and quotas). Default: disabled (yt_long_enabled=false) until an operator turns this on. """ @@ -76,6 +76,12 @@ def pick_yt_long_channel(cfg: dict[str, Any], push_date: str = "") -> dict[str, cid = str(ch.get("id") or "") if not cid: continue + # oauth_ok=0 means last upload auth failed — skip until re-authorized + try: + if int(ch.get("oauth_ok") if ch.get("oauth_ok") is not None else -1) == 0: + continue + except Exception: + pass creds = _channel_creds(ch, cfg) if not (creds.get("refresh_token") and creds.get("client_id") and creds.get("client_secret")): continue @@ -453,7 +459,7 @@ class YtLongPipeline: "clip_cascade_enabled": bool(cfg.get("clip_cascade_enabled", True)), "yt_long_monetize_when_ypp": bool(cfg.get("yt_long_monetize_when_ypp", True)), "clips_max_age_hours": float(cfg.get("clips_max_age_hours") or 24), - "clips_min_free_gb": float(cfg.get("clips_min_free_gb") or 12), + "clips_min_free_gb": float(cfg.get("clips_min_free_gb") or 8), }, } self._status_cache = payload @@ -534,11 +540,11 @@ class YtLongPipeline: async def kick_pending_records(self, ids: list[str] | None = None) -> int: cfg = db.get_settings_map() max_rec = max(1, int(cfg.get("yt_long_max_concurrent") or 1)) - # Never reclaim active long recordings here (3–8 min + encode); loop handles orphans safely + # Never reclaim active long recordings here (8–15 min + encode); loop handles orphans safely try: from .host_metrics import clip_encode_defer_reason - if clip_encode_defer_reason(): + if clip_encode_defer_reason(respect_live_push=False): return 0 except Exception: pass @@ -588,13 +594,20 @@ class YtLongPipeline: if n: self.sampled += n try: - # Long clips are 3–8 min (+ ffmpeg slack); reclaim only true orphans + # Long clips are 8–15 min (+ ffmpeg slack); reclaim only true orphans max_clip = int(cfg.get("yt_long_max_sec") or YT_LONG_MAX_SEC) - yt_long_db.reclaim_stale_yt_long_recordings(max_age_sec=max(720, max_clip + 240)) + yt_long_db.reclaim_stale_yt_long_recordings(max_age_sec=max(1200, max_clip + 300)) except Exception: pass try: - yt_long_db.reclaim_stale_yt_long_uploads(max_age_sec=1800) + max_clip = int(cfg.get("yt_long_max_sec") or YT_LONG_MAX_SEC) + yt_long_db.reclaim_stale_yt_long_uploads( + max_age_sec=max(1800, max_clip * 3 + 600) + ) + except Exception: + pass + try: + yt_long_db.heal_yt_long_orphan_jobs() except Exception: pass @@ -651,9 +664,14 @@ class YtLongPipeline: pass # Never steal CPU from live YouTube push (site hang root cause on dy VPS). try: - from .host_metrics import clip_encode_defer_reason + from .host_metrics import clip_encode_defer_reason, live_youtube_push_active - defer = clip_encode_defer_reason() + # Live RTMP must keep headroom, but blocking *all* long encodes whenever + # any relay pushes caused day-long 0 uploads. Only defer on load/CPU; + # while live is pushing, cap concurrent long records at 1. + defer = clip_encode_defer_reason(respect_live_push=False) + if (not defer) and live_youtube_push_active(): + max_rec = min(max_rec, 1) except Exception: defer = "" while ( @@ -742,7 +760,7 @@ class YtLongPipeline: try: from .clip_retention import disk_free_gb - if disk_free_gb() < 16.0: + if disk_free_gb() < float(cfg.get("clips_min_free_gb") or 8): sec = min(sec, max(YT_LONG_MIN_SEC, int(cfg.get("yt_long_min_sec") or YT_LONG_MIN_SEC) + 60)) except Exception: pass @@ -848,6 +866,7 @@ class YtLongPipeline: ) if is_quota: should_notify = True + until = time.time() + 3600 try: from .shorts_yt_quota import mark_api_quota_cooldown, profile_id_for_channel @@ -868,19 +887,57 @@ class YtLongPipeline: yt_long_db.reconcile_yt_long_upload_caps() except Exception: should_notify = True + # Keep the master: defer this job instead of burning it as failed. yt_long_db.update_yt_long_job( str(job.get("id") or ""), - status="failed", - error=str(exc)[:500], - finished_at=time.time(), + status="scheduled", + upload_at=float(until) + 30, + error=f"QUOTA_DEFER: {str(exc)[:400]}", + finished_at=0, ) if should_notify: _emit( "yt_long_fail", "warn", - f"长视频:YouTube 接口配额用尽(冷静后重试,不拦手动):{str(exc)[:80]}", + f"长视频:YouTube 接口配额用尽(已延后自动重试):{str(exc)[:80]}", job, ) + elif "OAUTH_INVALID" in msg or "invalid_grant" in msg.lower() or "401" in msg[:80]: + try: + ch_pk = str(job.get("channel_pk") or "") + if ch_pk: + yt_long_db.update_yt_long_channel( + ch_pk, + oauth_ok=0, + oauth_checked_at=time.time(), + oauth_error=str(exc)[:240], + ) + except Exception: + pass + yt_long_db.update_yt_long_job( + str(job.get("id") or ""), + status="scheduled", + upload_at=time.time() + 1800, + error=f"OAUTH_DEFER: {str(exc)[:400]}", + finished_at=0, + ) + _emit( + "yt_long_fail", + "warn", + f"长视频:频道授权异常已延后:{job.get('anchor_name') or job.get('id')} — {str(exc)[:80]}", + job, + ) + elif "成片文件不存在" in msg: + yt_long_db.update_yt_long_job( + str(job.get("id") or ""), + status="pending", + clip_path="", + clip_seconds=0, + upload_at=0, + started_at=0, + error="成片丢失,已重新排队录制", + finished_at=0, + ) else: yt_long_db.update_yt_long_job( str(job.get("id") or ""), diff --git a/backend/app/yt_long_upload.py b/backend/app/yt_long_upload.py index 07eca5b..fb9a361 100644 --- a/backend/app/yt_long_upload.py +++ b/backend/app/yt_long_upload.py @@ -1,104 +1,148 @@ -# -*- coding: utf-8 -*- -"""YouTube long-form upload — same OAuth transport as Shorts, watch URL not /shorts/.""" -from __future__ import annotations - -from pathlib import Path -from typing import Any - -import httpx - -from .shorts_upload import ( - _client_kwargs, - is_upload_quota_error, - quota_error_message, - refresh_access_token, -) - - -async def upload_youtube_long_mp4( - *, - file_path: str, - title: str, - description: str = "", - privacy: str = "public", - client_id: str = "", - client_secret: str = "", - refresh_token: str = "", - proxy_url: str = "", -) -> dict[str, Any]: - path = Path(file_path) - if not path.is_file(): - raise ValueError("成片文件不存在") - access = await refresh_access_token( - client_id=client_id, - client_secret=client_secret, - refresh_token=refresh_token, - proxy_url=proxy_url, - ) - try: - size = path.stat().st_size - raw = path.read_bytes() - except FileNotFoundError as exc: - raise ValueError("成片文件不存在") from exc - - # No #Shorts — this is a normal YouTube watch video (9:16 vertical by default). - # Strip <> — YouTube API rejects them (invalidTitle); caption pool may contain ">". - import re - - clean_title = (title or "Live clip").replace("#Shorts", "").replace("#shorts", "").strip() - clean_title = re.sub(r"[<>]+", " ", clean_title) - clean_title = re.sub(r"\s+", " ", clean_title).strip()[:100] - meta = { - "snippet": { - "title": clean_title or "Live clip", - "description": description or "", - "categoryId": "22", - }, - "status": { - "privacyStatus": privacy if privacy in {"public", "unlisted", "private"} else "public", - "selfDeclaredMadeForKids": False, - }, - } - init_url = ( - "https://www.googleapis.com/upload/youtube/v3/videos" - "?uploadType=resumable&part=snippet,status" - ) - async with httpx.AsyncClient(**_client_kwargs(timeout=600.0, proxy_url=proxy_url)) as client: - init = await client.post( - init_url, - headers={ - "Authorization": f"Bearer {access}", - "Content-Type": "application/json; charset=UTF-8", - "X-Upload-Content-Length": str(size), - "X-Upload-Content-Type": "video/mp4", - }, - json=meta, - ) - upload_url = init.headers.get("location") or init.headers.get("Location") - if init.status_code >= 400 or not upload_url: - body = init.text[:800] - if init.status_code == 429 or is_upload_quota_error(body): - raise ValueError(f"QUOTA_EXCEEDED: {quota_error_message()} ({body[:200]})") - raise ValueError(f"初始化上传失败: {body[:400]}") - put = await client.put( - upload_url, - headers={ - "Authorization": f"Bearer {access}", - "Content-Type": "video/mp4", - "Content-Length": str(size), - }, - content=raw, - ) - data = put.json() if put.content else {} - if put.status_code >= 400 or not data.get("id"): - err_text = str(data.get("error") or put.text[:800]) - if put.status_code == 429 or is_upload_quota_error(err_text): - raise ValueError(f"QUOTA_EXCEEDED: {quota_error_message()} ({err_text[:200]})") - raise ValueError(f"上传失败: {err_text[:400]}") - vid = str(data["id"]) - return { - "ok": True, - "video_id": vid, - "url": f"https://www.youtube.com/watch?v={vid}", - "raw": data, - } +# -*- coding: utf-8 -*- +"""YouTube long-form upload — same OAuth transport as Shorts, watch URL not /shorts/. + +Streams the mp4 via an *async* byte iterator (no full-file RAM load, compatible +with httpx.AsyncClient). Size-aware timeout so 8–15 min masters do not hang. +""" +from __future__ import annotations + +import asyncio +import re +from collections.abc import AsyncIterator +from pathlib import Path +from typing import Any + +import httpx + +from .shorts_upload import ( + _client_kwargs, + is_upload_quota_error, + quota_error_message, + refresh_access_token, +) + +_CHUNK = 1024 * 1024 # 1 MiB + + +def _sanitize_yt_text(text: str, *, limit: int) -> str: + """YouTube rejects angle brackets in title/description (invalid metadata).""" + t = re.sub(r"[<>]+", " ", str(text or "")) + t = re.sub(r"\s+", " ", t).strip() + return t[:limit] + + +def _upload_timeout_sec(size_bytes: int) -> float: + """Scale HTTP timeout with file size (min 10m, ~8s/MB, cap 45m).""" + mb = max(1.0, float(size_bytes) / (1024.0 * 1024.0)) + return float(min(2700.0, max(600.0, mb * 8.0 + 120.0))) + + +async def _aiter_file_chunks(path: Path, *, chunk_size: int = _CHUNK) -> AsyncIterator[bytes]: + """Yield file bytes without blocking the event loop (AsyncClient-safe).""" + loop = asyncio.get_running_loop() + fh = await loop.run_in_executor(None, path.open, "rb") + try: + while True: + chunk = await loop.run_in_executor(None, fh.read, chunk_size) + if not chunk: + break + yield chunk + finally: + await loop.run_in_executor(None, fh.close) + + +async def upload_youtube_long_mp4( + *, + file_path: str, + title: str, + description: str = "", + privacy: str = "public", + client_id: str = "", + client_secret: str = "", + refresh_token: str = "", + proxy_url: str = "", +) -> dict[str, Any]: + path = Path(file_path) + if not path.is_file(): + raise ValueError("成片文件不存在") + access = await refresh_access_token( + client_id=client_id, + client_secret=client_secret, + refresh_token=refresh_token, + proxy_url=proxy_url, + ) + try: + size = path.stat().st_size + except FileNotFoundError as exc: + raise ValueError("成片文件不存在") from exc + if size <= 0: + raise ValueError("成片文件为空") + + # No #Shorts — this is a normal YouTube watch video (9:16 vertical by default). + clean_title = (title or "Live clip").replace("#Shorts", "").replace("#shorts", "").strip() + clean_title = _sanitize_yt_text(clean_title, limit=100) or "Live clip" + clean_desc = _sanitize_yt_text(description or "", limit=4900) + meta = { + "snippet": { + "title": clean_title, + "description": clean_desc, + "categoryId": "22", + }, + "status": { + "privacyStatus": privacy if privacy in {"public", "unlisted", "private"} else "public", + "selfDeclaredMadeForKids": False, + }, + } + init_url = ( + "https://www.googleapis.com/upload/youtube/v3/videos" + "?uploadType=resumable&part=snippet,status" + ) + timeout = _upload_timeout_sec(size) + async with httpx.AsyncClient(**_client_kwargs(timeout=timeout, proxy_url=proxy_url)) as client: + init = await client.post( + init_url, + headers={ + "Authorization": f"Bearer {access}", + "Content-Type": "application/json; charset=UTF-8", + "X-Upload-Content-Length": str(size), + "X-Upload-Content-Type": "video/mp4", + }, + json=meta, + ) + upload_url = init.headers.get("location") or init.headers.get("Location") + if init.status_code >= 400 or not upload_url: + body = init.text[:800] + if init.status_code == 429 or is_upload_quota_error(body): + raise ValueError(f"QUOTA_EXCEEDED: {quota_error_message()} ({body[:200]})") + if init.status_code in (401, 403): + raise ValueError(f"OAUTH_INVALID: 初始化上传失败: {body[:400]}") + raise ValueError(f"初始化上传失败: {body[:400]}") + + # AsyncClient rejects sync file objects ("Attempted to send an sync request…"). + # Stream via async chunk iterator instead of path.open() / read_bytes(). + put = await client.put( + upload_url, + headers={ + "Authorization": f"Bearer {access}", + "Content-Type": "video/mp4", + "Content-Length": str(size), + }, + content=_aiter_file_chunks(path), + ) + data = put.json() if put.content else {} + if put.status_code >= 400 or not data.get("id"): + err_text = str(data.get("error") or put.text[:800]) + if put.status_code == 429 or is_upload_quota_error(err_text): + raise ValueError(f"QUOTA_EXCEEDED: {quota_error_message()} ({err_text[:200]})") + if put.status_code in (401, 403): + raise ValueError(f"OAUTH_INVALID: 上传失败: {err_text[:400]}") + raise ValueError(f"上传失败: {err_text[:400]}") + vid = str(data["id"]) + return { + "ok": True, + "video_id": vid, + "url": f"https://www.youtube.com/watch?v={vid}", + "raw": data, + "bytes": size, + "timeout_sec": timeout, + } diff --git a/backend/neko/browser-launch.sh b/backend/neko/browser-launch.sh old mode 100644 new mode 100755 diff --git a/bin/sing-box b/bin/sing-box new file mode 100755 index 0000000..0b56038 Binary files /dev/null and b/bin/sing-box differ diff --git a/config/proxychains.conf b/config/proxychains.conf new file mode 100644 index 0000000..7587913 --- /dev/null +++ b/config/proxychains.conf @@ -0,0 +1,9 @@ +strict_chain +proxy_dns +tcp_read_time_out 15000 +tcp_connect_time_out 8000 +localnet 127.0.0.0/8 +localnet 10.0.0.0/8 +localnet 192.168.0.0/16 +[ProxyList] +socks5 127.0.0.1 17891 diff --git a/config/sing-box.json b/config/sing-box.json new file mode 100644 index 0000000..1943073 --- /dev/null +++ b/config/sing-box.json @@ -0,0 +1,34 @@ +{ + "log": { + "level": "warn", + "timestamp": true + }, + "inbounds": [ + { + "type": "mixed", + "tag": "mixed-in", + "listen": "0.0.0.0", + "listen_port": 17891, + "sniff": true + } + ], + "outbounds": [ + { + "type": "socks", + "tag": "upstream", + "server": "178.92.61.73", + "server_port": 43027, + "version": "5", + "username": "NY9ZrHJKgv0Dwid", + "password": "7ktx7HZ3agK50I4" + }, + { + "type": "direct", + "tag": "direct" + } + ], + "route": { + "rules": [], + "final": "upstream" + } +} diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 9760fc9..02a76e9 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,6451 +1,6372 @@ -{ - "name": "douyin-live-monitor", - "version": "0.1.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "douyin-live-monitor", - "version": "0.1.0", - "dependencies": { - "echarts": "^5.5.1", - "lucide-react": "^0.468.0", - "next": "15.1.0", - "react": "^19.0.0", - "react-dom": "^19.0.0" - }, - "devDependencies": { - "@types/node": "^20", - "@types/react": "^19", - "@types/react-dom": "^19", - "autoprefixer": "^10.4.20", - "eslint": "^9", - "eslint-config-next": "15.1.0", - "postcss": "^8.4.49", - "tailwindcss": "^3.4.17", - "typescript": "^5" - } - }, - "node_modules/@alloc/quick-lru": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", - "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@emnapi/core": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", - "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/wasi-threads": "1.2.1", - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/core/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD", - "optional": true - }, - "node_modules/@emnapi/runtime": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz", - "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==", - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/runtime/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD", - "optional": true - }, - "node_modules/@emnapi/wasi-threads": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", - "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/wasi-threads/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD", - "optional": true - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz", - "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", - "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/config-array": { - "version": "0.21.2", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.2.tgz", - "integrity": "sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/object-schema": "^2.1.7", - "debug": "^4.3.1", - "minimatch": "^3.1.5" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/config-helpers": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", - "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^0.17.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/core": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", - "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.6.tgz", - "integrity": "sha512-l2Ul9PrHsPCKcEY/ac7VgFj9D80C7S68sOKc618SyHDPK36s1XcFebXY0iTzUVn4Yq+YbwvSnDmCz9yxjX+QrA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.14.0", - "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.3.0", - "minimatch": "^3.1.5", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/js": { - "version": "9.39.5", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.5.tgz", - "integrity": "sha512-QywQuszQh77pIXCsq998c8hbhSTI/azTty1Z6N53dmAudKHhy573j3yvRLsX2BSp8YpLtoCEG8E9DJe+8zUh4A==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - } - }, - "node_modules/@eslint/object-schema": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", - "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", - "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^0.17.0", - "levn": "^0.4.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@humanfs/core": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", - "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanfs/types": "^0.15.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node": { - "version": "0.16.8", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", - "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanfs/core": "^0.19.2", - "@humanfs/types": "^0.15.0", - "@humanwhocodes/retry": "^0.4.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/types": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", - "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", - "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@img/sharp-darwin-arm64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz", - "integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-darwin-arm64": "1.0.4" - } - }, - "node_modules/@img/sharp-darwin-x64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz", - "integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-darwin-x64": "1.0.4" - } - }, - "node_modules/@img/sharp-libvips-darwin-arm64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz", - "integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==", - "cpu": [ - "arm64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "darwin" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-darwin-x64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz", - "integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==", - "cpu": [ - "x64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "darwin" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-arm": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz", - "integrity": "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==", - "cpu": [ - "arm" - ], - "libc": [ - "glibc" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-arm64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz", - "integrity": "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==", - "cpu": [ - "arm64" - ], - "libc": [ - "glibc" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-s390x": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.4.tgz", - "integrity": "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==", - "cpu": [ - "s390x" - ], - "libc": [ - "glibc" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-x64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz", - "integrity": "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==", - "cpu": [ - "x64" - ], - "libc": [ - "glibc" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linuxmusl-arm64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz", - "integrity": "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==", - "cpu": [ - "arm64" - ], - "libc": [ - "musl" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linuxmusl-x64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz", - "integrity": "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==", - "cpu": [ - "x64" - ], - "libc": [ - "musl" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-linux-arm": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz", - "integrity": "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==", - "cpu": [ - "arm" - ], - "libc": [ - "glibc" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-arm": "1.0.5" - } - }, - "node_modules/@img/sharp-linux-arm64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz", - "integrity": "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==", - "cpu": [ - "arm64" - ], - "libc": [ - "glibc" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-arm64": "1.0.4" - } - }, - "node_modules/@img/sharp-linux-s390x": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.5.tgz", - "integrity": "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==", - "cpu": [ - "s390x" - ], - "libc": [ - "glibc" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-s390x": "1.0.4" - } - }, - "node_modules/@img/sharp-linux-x64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz", - "integrity": "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==", - "cpu": [ - "x64" - ], - "libc": [ - "glibc" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-x64": "1.0.4" - } - }, - "node_modules/@img/sharp-linuxmusl-arm64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz", - "integrity": "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==", - "cpu": [ - "arm64" - ], - "libc": [ - "musl" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-arm64": "1.0.4" - } - }, - "node_modules/@img/sharp-linuxmusl-x64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz", - "integrity": "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==", - "cpu": [ - "x64" - ], - "libc": [ - "musl" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-x64": "1.0.4" - } - }, - "node_modules/@img/sharp-wasm32": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.5.tgz", - "integrity": "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==", - "cpu": [ - "wasm32" - ], - "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", - "optional": true, - "dependencies": { - "@emnapi/runtime": "^1.2.0" - }, - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-win32-ia32": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.5.tgz", - "integrity": "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==", - "cpu": [ - "ia32" - ], - "license": "Apache-2.0 AND LGPL-3.0-or-later", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-win32-x64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz", - "integrity": "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0 AND LGPL-3.0-or-later", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", - "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.31", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", - "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@napi-rs/wasm-runtime": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.2.tgz", - "integrity": "sha512-JfB4kuJQjaoHuCTseIINHtHWeJnvgEcxjwA5t/Y00ZgaOO1Crz3fjT/p8kT28zA/Caz7oiUMn3d6H2yOVCVwuw==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@tybys/wasm-util": "^0.10.3" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=23.5.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Brooooooklyn" - }, - "peerDependencies": { - "@emnapi/core": "^1.7.1 || ^2.0.0-alpha.3", - "@emnapi/runtime": "^1.7.1 || ^2.0.0-alpha.3" - } - }, - "node_modules/@next/env": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@next/env/-/env-15.1.0.tgz", - "integrity": "sha512-UcCO481cROsqJuszPPXJnb7GGuLq617ve4xuAyyNG4VSSocJNtMU5Fsx+Lp6mlN8c7W58aZLc5y6D/2xNmaK+w==", - "license": "MIT" - }, - "node_modules/@next/eslint-plugin-next": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-15.1.0.tgz", - "integrity": "sha512-+jPT0h+nelBT6HC9ZCHGc7DgGVy04cv4shYdAe6tKlEbjQUtwU3LzQhzbDHQyY2m6g39m6B0kOFVuLGBrxxbGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-glob": "3.3.1" - } - }, - "node_modules/@next/swc-darwin-arm64": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.1.0.tgz", - "integrity": "sha512-ZU8d7xxpX14uIaFC3nsr4L++5ZS/AkWDm1PzPO6gD9xWhFkOj2hzSbSIxoncsnlJXB1CbLOfGVN4Zk9tg83PUw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-darwin-x64": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.1.0.tgz", - "integrity": "sha512-DQ3RiUoW2XC9FcSM4ffpfndq1EsLV0fj0/UY33i7eklW5akPUCo6OX2qkcLXZ3jyPdo4sf2flwAED3AAq3Om2Q==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-gnu": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.1.0.tgz", - "integrity": "sha512-M+vhTovRS2F//LMx9KtxbkWk627l5Q7AqXWWWrfIzNIaUFiz2/NkOFkxCFyNyGACi5YbA8aekzCLtbDyfF/v5Q==", - "cpu": [ - "arm64" - ], - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-musl": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.1.0.tgz", - "integrity": "sha512-Qn6vOuwaTCx3pNwygpSGtdIu0TfS1KiaYLYXLH5zq1scoTXdwYfdZtwvJTpB1WrLgiQE2Ne2kt8MZok3HlFqmg==", - "cpu": [ - "arm64" - ], - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-gnu": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.1.0.tgz", - "integrity": "sha512-yeNh9ofMqzOZ5yTOk+2rwncBzucc6a1lyqtg8xZv0rH5znyjxHOWsoUtSq4cUTeeBIiXXX51QOOe+VoCjdXJRw==", - "cpu": [ - "x64" - ], - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-musl": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.1.0.tgz", - "integrity": "sha512-t9IfNkHQs/uKgPoyEtU912MG6a1j7Had37cSUyLTKx9MnUpjj+ZDKw9OyqTI9OwIIv0wmkr1pkZy+3T5pxhJPg==", - "cpu": [ - "x64" - ], - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-arm64-msvc": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.1.0.tgz", - "integrity": "sha512-WEAoHyG14t5sTavZa1c6BnOIEukll9iqFRTavqRVPfYmfegOAd5MaZfXgOGG6kGo1RduyGdTHD4+YZQSdsNZXg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-x64-msvc": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.1.0.tgz", - "integrity": "sha512-J1YdKuJv9xcixzXR24Dv+4SaDKc2jj31IVUEMdO5xJivMTXuE6MAdIi4qPjSymHuFG8O5wbfWKnhJUcHHpj5CA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nolyfill/is-core-module": { - "version": "1.0.39", - "resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz", - "integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.4.0" - } - }, - "node_modules/@rtsao/scc": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", - "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", - "dev": true, - "license": "MIT" - }, - "node_modules/@rushstack/eslint-patch": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.16.1.tgz", - "integrity": "sha512-TvZbIpeKqGQQ7X0zSCvPH9riMSFQFSggnfBjFZ1mEoILW+UuXCKwOoPcgjMwiUtRqFZ8jWhPJc4um14vC6I4ag==", - "dev": true, - "license": "MIT" - }, - "node_modules/@swc/counter": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", - "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", - "license": "Apache-2.0" - }, - "node_modules/@swc/helpers": { - "version": "0.5.15", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz", - "integrity": "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.8.0" - } - }, - "node_modules/@swc/helpers/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/@tybys/wasm-util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz", - "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@tybys/wasm-util/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD", - "optional": true - }, - "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/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "20.19.43", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.43.tgz", - "integrity": "sha512-6oYBAi5ikg4Pl+kGsoYtawUMBT2zZMCvPNF7pVLnHZfd1zf38DRiWn/gT01RYCdUqkv7Fhr+C9ot4/tb+2sVvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~6.21.0" - } - }, - "node_modules/@types/react": { - "version": "19.2.18", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.18.tgz", - "integrity": "sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w==", - "dev": true, - "license": "MIT", - "dependencies": { - "csstype": "^3.2.2" - } - }, - "node_modules/@types/react-dom": { - "version": "19.2.4", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.4.tgz", - "integrity": "sha512-Bsc+QHgp+P/F02XDzNCY9jnZNCUuLki36KT7VKrTXXLdHf+vHMNZnW1rVu5DNW/rCK+fya3DATySbLM4yhtKUw==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@types/react": "^19.2.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.66.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.66.0.tgz", - "integrity": "sha512-p088eaGrzYz1s+7cov0aMOCkNGTJlVxF4jgubf28c8L0Cv9Rloj8YBHnv4hXLq6IIEE1AsjNWavO+k+8kP2Y0A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.66.0", - "@typescript-eslint/type-utils": "8.66.0", - "@typescript-eslint/utils": "8.66.0", - "@typescript-eslint/visitor-keys": "8.66.0", - "ignore": "^7.0.5", - "natural-compare": "^1.4.0", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.66.0", - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.6.tgz", - "integrity": "sha512-BAg6QkE8W+TuQLrrw0Ugr7HegXduRuuj8/ti2kSOc+jz1dmx8/WNcjr6XGnq5YpDWxFwwaavqD0+jIUOKelTsw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "8.66.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.66.0.tgz", - "integrity": "sha512-X6ypGChaWYk6PBtUg2BwuTZEFFcHJAtGTVJ9/lCTOufhZ4i9fNolQNnktq+kkMCwMj7V8Svsq7+TxSDslmhE0g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "8.66.0", - "@typescript-eslint/types": "8.66.0", - "@typescript-eslint/typescript-estree": "8.66.0", - "@typescript-eslint/visitor-keys": "8.66.0", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/project-service": { - "version": "8.66.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.66.0.tgz", - "integrity": "sha512-7MthGPTt4BP69lSryqpqq8HQqxuzynssckL/jyDyk3+TNMQ3y2jFWkptCrktWvBrP+EH787Nl5N5Qpw7WZg+5g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.66.0", - "@typescript-eslint/types": "^8.66.0", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.66.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.66.0.tgz", - "integrity": "sha512-8TGcH25j9zqJ/IULB/ppyhRvxA8QYfFEZ7nfbg6/BN9spDgb8fPWQXlE5l8TWBL50EtUx007uZ1o9VOwrq2/9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.66.0", - "@typescript-eslint/visitor-keys": "8.66.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.66.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.66.0.tgz", - "integrity": "sha512-9D5gLYZG4rOjcoag8MQ/fWI8WqA9wcPDyOGyWtWFhvM1lHRbliqUSPIY5J3zqCU1tvSwzXxnnjhQhz5Ne7mJ4g==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.66.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.66.0.tgz", - "integrity": "sha512-LG2dWfjZQQp0ADtAu/EWJVayefGL2UEZ3CDeI44D9v3rXB/WYUqE/jpO28KrEKul5AySrmI+Zh1v6v+xW2U9+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.66.0", - "@typescript-eslint/typescript-estree": "8.66.0", - "@typescript-eslint/utils": "8.66.0", - "debug": "^4.4.3", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "8.66.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.66.0.tgz", - "integrity": "sha512-H6gcYaSDOyvL3AD/jHUtUFo2jqGgn/F6nuyuZSu0QTesxL+cP4dQoIMrODRofuJC09g64+WgZ6tE19Y1N2YIFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.66.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.66.0.tgz", - "integrity": "sha512-8/x4INiiQb10jGgXYD7116/zQ+OL84ZIFn0za68wwFHCanT/VLbBEroWht8RV8fn0/ZCAoazHLQgwUC0UQcDfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/project-service": "8.66.0", - "@typescript-eslint/tsconfig-utils": "8.66.0", - "@typescript-eslint/types": "8.66.0", - "@typescript-eslint/visitor-keys": "8.66.0", - "debug": "^4.4.3", - "minimatch": "^10.2.2", - "semver": "^7.7.3", - "tinyglobby": "^0.2.15", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", - "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.8" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "8.66.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.66.0.tgz", - "integrity": "sha512-jasearZPolBw5NJNYGMwxzHMF83niVWmMU1VdHzG1CyfI2VS7f7nZltnKtHcg20hW+7Uo5GfK4MeDPoU3qI8EA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.66.0", - "@typescript-eslint/types": "8.66.0", - "@typescript-eslint/typescript-estree": "8.66.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.66.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.66.0.tgz", - "integrity": "sha512-dkKR8q+lKciskj1Y3vthHktl+3cMLWGyVUP23bRiPZ5O9BRT++4EqDDV+TVeIKBL1VXVEqrJlz8MYbcnvJcAlg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.66.0", - "eslint-visitor-keys": "^5.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", - "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@unrs/resolver-binding-android-arm-eabi": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.12.2.tgz", - "integrity": "sha512-g5T90pqg1bo/7mytQx6F4iBNC0Wsh9cu+z9veDbFjc7HjpesJFWD7QMS0NGStXM075+7dJPPVvBbpZlnrdpi/w==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@unrs/resolver-binding-android-arm64": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.12.2.tgz", - "integrity": "sha512-YGCRZv/9GLhwmz6mYDeTsm/92BAyR28l6c2ReweVW5pWgfsitWLY8upvfRlGdoyD8HjeTHSYJWyZGD4KJA/nFQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@unrs/resolver-binding-darwin-arm64": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.12.2.tgz", - "integrity": "sha512-u9DiNT1auQMO20A9SyTuG3wUgQWB9Z7KjAg0uFuCDR1FsAY8A0CG2S6JpHS1xwm/w1G08bjXZDcyOCjv1WAm2w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@unrs/resolver-binding-darwin-x64": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.12.2.tgz", - "integrity": "sha512-f7rPLi/T1HVKZu/u6t87lroib16n8vrSzcyxI7lg4BGO9UF26KhQL44sd9eOUgrTYhvRXtWOIZT5PejdPyJfUA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@unrs/resolver-binding-freebsd-x64": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.12.2.tgz", - "integrity": "sha512-BpcOjWCJub6nRZUS2zA20pmLvjtqAtGejETaIyRLiZiQf++cbrjltLA5NN/xaXfqeOBOSlMFbemIl5/S5tljmg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.12.2.tgz", - "integrity": "sha512-vZTDvdSISZjJx66OzJqtsOhzifbqRjbmI1Mnu49fQDwog5GtDI4QidRiEAYbZCRj9C8YZEW+3ZjqsyS9GR4k2A==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.12.2.tgz", - "integrity": "sha512-BiPI+IrIlwcW4nLLMM21+B1dFPzd55yAVgVGrdgDjNef+ch03GdxrcyaIz8X9SsQirh/kCQ7mviyWlMxdh2D7g==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-arm64-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.12.2.tgz", - "integrity": "sha512-zJc0H99FEPoFfSrNpa91HYfxzfAJCr502oxNK1cfdC9hlaFI43RT+JFCann9JUgZmLzzntChHyn13Sgn9ljHNg==", - "cpu": [ - "arm64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-arm64-musl": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.12.2.tgz", - "integrity": "sha512-KQ3Lki6l+Pz1k/eBipN41ES+YUK30beLGb9YqcB1O542cyLCNE6GaxrfcY3T6EezmGGk84wb5XyO9loTM9tkcA==", - "cpu": [ - "arm64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-loong64-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-gnu/-/resolver-binding-linux-loong64-gnu-1.12.2.tgz", - "integrity": "sha512-3SJGEh1DborhG6pyxvhPzCT4bbSIVihsvgJc13P1bHG7KLdNDaF9T3gsTwFc7Jw/5Y5/iWOjkEx7Zy0NvCGX3Q==", - "cpu": [ - "loong64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-loong64-musl": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-musl/-/resolver-binding-linux-loong64-musl-1.12.2.tgz", - "integrity": "sha512-jiuG/Obbel7uw1PwHNFfrkiKhLAF6mnyZ6aWlOAVN9WqKm8v0OFGnciJIHu8+CMvXLQ8AD51LPzAoUfT21D5Ew==", - "cpu": [ - "loong64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.12.2.tgz", - "integrity": "sha512-q7xRvVpmcfeL+LlZg8Pbbo6QaTZwDU5BaGZbwfhkEsXJn3Was8xYfE0RBH266xZt0rM6B7i8xAYIvjthuUIWHg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.12.2.tgz", - "integrity": "sha512-0CVdx6lcnT3Q9inOH8tsMIOJ6ImndllMjqJHg8RLVdB7Vq4SfkEXl9mCSsVNuNA4MCYycRicCUxPCabVHJRr6A==", - "cpu": [ - "riscv64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-riscv64-musl": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.12.2.tgz", - "integrity": "sha512-iOwlRo9vnp6R6ohHQS11n0NnfdXx/omhkocmIfaPRpQhKZ+3BDMkkdRVh53qjkFkpPddf+FETA28NwGN7l5l+w==", - "cpu": [ - "riscv64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-s390x-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.12.2.tgz", - "integrity": "sha512-HYJtLfXq94q8iZNFT1lknx258wlkkWhZeUXJRqzKBBUJ00CvZ+N33zgbCqimLjsyw5Va6uUxhVa12mI+kaveEw==", - "cpu": [ - "s390x" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-x64-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.12.2.tgz", - "integrity": "sha512-mPsUhunKKDih5O96Y6enDQyHc1SqBPlY1E/SfMWDM3EdJ95Z9CArPeCVwCCqbP45ljvivdEk8Fxn+SIb1rDAJQ==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-x64-musl": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.12.2.tgz", - "integrity": "sha512-azrt6+5ydLd8Vt210AAFis/lZevSfPw93EJRIJG+xPu4WCJ8K0kppCTpMyLPcKT7H15M4Jnt2tMp5bOvCkRC6A==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-openharmony-arm64": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-openharmony-arm64/-/resolver-binding-openharmony-arm64-1.12.2.tgz", - "integrity": "sha512-YZ9hP4O0X9PQb8eO980qmLNGH4zT3I9+SZTdt0Pr0YyuGQhYKoOZkV02VzrzyOZJ5xIJ3UFIenKkUkGg8GjgWQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ] - }, - "node_modules/@unrs/resolver-binding-wasm32-wasi": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.12.2.tgz", - "integrity": "sha512-tYFDIkMxSflfEc/h92ZWNsZlHSwgimbNHSO3PL2JWQHfCuC2q316jMyYU9TIWZsFK2bQwyK5VAdYgn8ygPj69A==", - "cpu": [ - "wasm32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/core": "1.10.0", - "@emnapi/runtime": "1.10.0", - "@napi-rs/wasm-runtime": "^1.1.4" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@unrs/resolver-binding-wasm32-wasi/node_modules/@emnapi/runtime": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", - "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@unrs/resolver-binding-wasm32-wasi/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD", - "optional": true - }, - "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.12.2.tgz", - "integrity": "sha512-qzNyg3xL0VPQmCaUh+N5jSitce6k+uCBfMDesWRnlULOZaqUkaJ0ybdT+UqlAWJoQjuqfIU/0Ptx9bteN4D82g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.12.2.tgz", - "integrity": "sha512-WD9sY00OfpHVGfsnHZoA8jVT+esS/Bg8z8jzxp5BnDCjjwsuKsPQrzswwpFy4J1AUJbXPRfkpcX0mXrzeXW79g==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@unrs/resolver-binding-win32-x64-msvc": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.12.2.tgz", - "integrity": "sha512-nAB74NfSNKknqQ1RrYj6uz8FcXEomu/MATJZxh/x+BArzN2U3JbOYC0APYzUIGhVY3m5hRxA8VPNdPBoG8txlA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/acorn": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", - "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.15.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", - "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", - "dev": true, - "license": "MIT" - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/arg": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", - "dev": true, - "license": "MIT" - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/aria-query": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", - "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", - "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "is-array-buffer": "^3.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-includes": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz", - "integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.24.0", - "es-object-atoms": "^1.1.1", - "get-intrinsic": "^1.3.0", - "is-string": "^1.1.1", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.findlast": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", - "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.findlastindex": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz", - "integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "es-shim-unscopables": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flat": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", - "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", - "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.tosorted": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", - "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3", - "es-errors": "^1.3.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", - "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "is-array-buffer": "^3.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/ast-types-flow": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz", - "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/async-function": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", - "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/autoprefixer": { - "version": "10.5.4", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.5.4.tgz", - "integrity": "sha512-MaU0U/za7N3r6brxD4YB/l4NSrFzLPlANv6wEuQVaIPlD3L4W9rFcQPbL/EilY9BHhHvhfcz3gInDLrEtWT4EA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/autoprefixer" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "browserslist": "^4.28.6", - "caniuse-lite": "^1.0.30001806", - "fraction.js": "^5.3.4", - "picocolors": "^1.1.1", - "postcss-value-parser": "^4.2.0" - }, - "bin": { - "autoprefixer": "bin/autoprefixer" - }, - "engines": { - "node": "^10 || ^12 || >=14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/axe-core": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.13.0.tgz", - "integrity": "sha512-UzGt8zg7Ny8djbYMhxl2zuEevVa7r2gJjYY5Lwr1xM7+XU2nd6CkIWFTVcCIbAP63vSz71NaVyyuSk9lHKcy0A==", - "dev": true, - "license": "MPL-2.0", - "engines": { - "node": ">=4" - } - }, - "node_modules/axobject-query": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", - "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/baseline-browser-mapping": { - "version": "2.11.12", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.12.tgz", - "integrity": "sha512-r7WnVImvVCeFpf2DOXfy41aPWzeNg3H/A2X4dKmy1QL0MSyyk/e7z8ihJ3N6Nn2PsdhkVlqnEfnUE4a05P2aTA==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "baseline-browser-mapping": "dist/cli.cjs" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", - "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.28.7", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.7.tgz", - "integrity": "sha512-JxV13hNrFxqjOc8alRbq9dK1MM79NEXYpma2B2J4wAtpWS5zIEIKqWPGCl7N4o7Uc7B7itylh7SuDujATRyyTw==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "baseline-browser-mapping": "^2.10.44", - "caniuse-lite": "^1.0.30001806", - "electron-to-chromium": "^1.5.393", - "node-releases": "^2.0.51", - "update-browserslist-db": "^1.2.3" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "dependencies": { - "streamsearch": "^1.1.0" - }, - "engines": { - "node": ">=10.16.0" - } - }, - "node_modules/call-bind": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.9.tgz", - "integrity": "sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "get-intrinsic": "^1.3.0", - "set-function-length": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/call-bound": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", - "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "get-intrinsic": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase-css": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", - "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001809", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001809.tgz", - "integrity": "sha512-xxWVywk6a6Arlk+hymeycyn/VgqEfLDxupvhH/xiY5SJ/18kmi9o6MiO320DCUzypORHLtvh0I4i04tUhCNHNQ==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/client-only": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", - "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==", - "license": "MIT" - }, - "node_modules/color": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", - "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", - "license": "MIT", - "optional": true, - "dependencies": { - "color-convert": "^2.0.1", - "color-string": "^1.9.0" - }, - "engines": { - "node": ">=12.5.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true, - "license": "MIT" - }, - "node_modules/color-string": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", - "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", - "license": "MIT", - "optional": true, - "dependencies": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "node_modules/commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true, - "license": "MIT", - "bin": { - "cssesc": "bin/cssesc" - }, - "engines": { - "node": ">=4" - } - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/damerau-levenshtein": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", - "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/data-view-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", - "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/data-view-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", - "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/inspect-js" - } - }, - "node_modules/data-view-byte-offset": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", - "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/detect-libc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", - "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", - "license": "Apache-2.0", - "optional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/didyoumean": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", - "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/dlv": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", - "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", - "dev": true, - "license": "MIT" - }, - "node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/echarts": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.6.0.tgz", - "integrity": "sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "2.3.0", - "zrender": "5.6.1" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.5.402", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.402.tgz", - "integrity": "sha512-/oOpMaPT6Yg+6/1XQhyIPlzgj7Ye9zf+nNM2Uh6OcE2G2oNptWazFa+qB2Pdqqbsc9KnIDzgAntoYN0dbwOXwA==", - "dev": true, - "license": "ISC" - }, - "node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "license": "MIT" - }, - "node_modules/es-abstract": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.2.tgz", - "integrity": "sha512-2FpH9Q5i2RRwyEP1AylXe6nYLR5OhaJTZwmlcP0dL/+JCbgg7yyEo/sEK6HeGZRf3dFpWwThaRHVApXSkW3xeg==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.2", - "arraybuffer.prototype.slice": "^1.0.4", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "data-view-buffer": "^1.0.2", - "data-view-byte-length": "^1.0.2", - "data-view-byte-offset": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "es-set-tostringtag": "^2.1.0", - "es-to-primitive": "^1.3.0", - "function.prototype.name": "^1.1.8", - "get-intrinsic": "^1.3.0", - "get-proto": "^1.0.1", - "get-symbol-description": "^1.1.0", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "internal-slot": "^1.1.0", - "is-array-buffer": "^3.0.5", - "is-callable": "^1.2.7", - "is-data-view": "^1.0.2", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.2.1", - "is-set": "^2.0.3", - "is-shared-array-buffer": "^1.0.4", - "is-string": "^1.1.1", - "is-typed-array": "^1.1.15", - "is-weakref": "^1.1.1", - "math-intrinsics": "^1.1.0", - "object-inspect": "^1.13.4", - "object-keys": "^1.1.1", - "object.assign": "^4.1.7", - "own-keys": "^1.0.1", - "regexp.prototype.flags": "^1.5.4", - "safe-array-concat": "^1.1.3", - "safe-push-apply": "^1.0.0", - "safe-regex-test": "^1.1.0", - "set-proto": "^1.0.0", - "stop-iteration-iterator": "^1.1.0", - "string.prototype.trim": "^1.2.10", - "string.prototype.trimend": "^1.0.9", - "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.3", - "typed-array-byte-length": "^1.0.3", - "typed-array-byte-offset": "^1.0.4", - "typed-array-length": "^1.0.7", - "unbox-primitive": "^1.1.0", - "which-typed-array": "^1.1.19" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-abstract-get": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-abstract-get/-/es-abstract-get-1.0.0.tgz", - "integrity": "sha512-6PMWXpdhshVvFp+FoWYs1EvG1Nj0tvk0dZM+XcK0xMEM1czRVcP6ohqPWHy6qPagSpC8j4+p89WXlT+xXJs/fg==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.2", - "is-callable": "^1.2.7", - "object-inspect": "^1.13.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-iterator-helpers": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.4.0.tgz", - "integrity": "sha512-c/A0P0oxkACDc+cKWw8evLXK83oBKgn0qPOqCYT4x9uolpCIJAcYvJC9QYKNDRPsTeGyCrQ326jrvgZWdCdK5Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.24.2", - "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.1.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.3.0", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "internal-slot": "^1.1.0", - "iterator.prototype": "^1.1.5", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-object-atoms": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", - "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", - "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-shim-unscopables": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", - "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-to-primitive": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.4.tgz", - "integrity": "sha512-yPDz7wqpg1/mmHLmS3tcfTfbw5f1eryXvyghYBffGdERwe+mV7ZcWzTR8LR17Kvqt3qfPurjlonmnq3MKXIOXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-abstract-get": "^1.0.0", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "is-callable": "^1.2.7", - "is-date-object": "^1.1.0", - "is-symbol": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "9.39.5", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.5.tgz", - "integrity": "sha512-DgZS62aPLXKlnxILS/AYCoRvHaZeXceIzlXPkkGGzJWSow1aEk0lbTlxUSlyjC8jcaKxAdOnTDz+o1JFSBsyjw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.8.0", - "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.21.2", - "@eslint/config-helpers": "^0.4.2", - "@eslint/core": "^0.17.0", - "@eslint/eslintrc": "^3.3.6", - "@eslint/js": "9.39.5", - "@eslint/plugin-kit": "^0.4.1", - "@humanfs/node": "^0.16.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.2", - "@types/estree": "^1.0.6", - "ajv": "^6.14.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.6", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.4.0", - "eslint-visitor-keys": "^4.2.1", - "espree": "^10.4.0", - "esquery": "^1.5.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.5", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-config-next": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-15.1.0.tgz", - "integrity": "sha512-gADO+nKVseGso3DtOrYX9H7TxB/MuX7AUYhMlvQMqLYvUWu4HrOQuU7cC1HW74tHIqkAvXdwgAz3TCbczzSEXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@next/eslint-plugin-next": "15.1.0", - "@rushstack/eslint-patch": "^1.10.3", - "@typescript-eslint/eslint-plugin": "^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0", - "@typescript-eslint/parser": "^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0", - "eslint-import-resolver-node": "^0.3.6", - "eslint-import-resolver-typescript": "^3.5.2", - "eslint-plugin-import": "^2.31.0", - "eslint-plugin-jsx-a11y": "^6.10.0", - "eslint-plugin-react": "^7.37.0", - "eslint-plugin-react-hooks": "^5.0.0" - }, - "peerDependencies": { - "eslint": "^7.23.0 || ^8.0.0 || ^9.0.0", - "typescript": ">=3.3.1" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.10.tgz", - "integrity": "sha512-tRrKqFyCaKict5hOd244sL6EQFNycnMQnBe+j8uqGNXYzsImGbGUU4ibtoaBmv5FLwJwcFJNeg1GeVjQfbMrDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.16.1", - "resolve": "^2.0.0-next.6" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-import-resolver-typescript": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.10.1.tgz", - "integrity": "sha512-A1rHYb06zjMGAxdLSkN2fXPBwuSaQ0iO5M/hdyS0Ajj1VBaRp0sPD3dn1FhME3c/JluGFbwSxyCfqdSbtQLAHQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "@nolyfill/is-core-module": "1.0.39", - "debug": "^4.4.0", - "get-tsconfig": "^4.10.0", - "is-bun-module": "^2.0.0", - "stable-hash": "^0.0.5", - "tinyglobby": "^0.2.13", - "unrs-resolver": "^1.6.2" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint-import-resolver-typescript" - }, - "peerDependencies": { - "eslint": "*", - "eslint-plugin-import": "*", - "eslint-plugin-import-x": "*" - }, - "peerDependenciesMeta": { - "eslint-plugin-import": { - "optional": true - }, - "eslint-plugin-import-x": { - "optional": true - } - } - }, - "node_modules/eslint-module-utils": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.14.0.tgz", - "integrity": "sha512-W2WCRZ9Dqntd+2u8jJcVMV2PKulc6RdLgUUoh/yQr3uB6lo/ZOeGx11sv60/8S4QFFKNslAlWhr9u0Ef7ZW6Ig==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7" - }, - "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import": { - "version": "2.32.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz", - "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rtsao/scc": "^1.1.0", - "array-includes": "^3.1.9", - "array.prototype.findlastindex": "^1.2.6", - "array.prototype.flat": "^1.3.3", - "array.prototype.flatmap": "^1.3.3", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.12.1", - "hasown": "^2.0.2", - "is-core-module": "^2.16.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "object.groupby": "^1.0.3", - "object.values": "^1.2.1", - "semver": "^6.3.1", - "string.prototype.trimend": "^1.0.9", - "tsconfig-paths": "^3.15.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" - } - }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-plugin-jsx-a11y": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz", - "integrity": "sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "aria-query": "^5.3.2", - "array-includes": "^3.1.8", - "array.prototype.flatmap": "^1.3.2", - "ast-types-flow": "^0.0.8", - "axe-core": "^4.10.0", - "axobject-query": "^4.1.0", - "damerau-levenshtein": "^1.0.8", - "emoji-regex": "^9.2.2", - "hasown": "^2.0.2", - "jsx-ast-utils": "^3.3.5", - "language-tags": "^1.0.9", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "safe-regex-test": "^1.0.3", - "string.prototype.includes": "^2.0.1" - }, - "engines": { - "node": ">=4.0" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9" - } - }, - "node_modules/eslint-plugin-react": { - "version": "7.37.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz", - "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-includes": "^3.1.8", - "array.prototype.findlast": "^1.2.5", - "array.prototype.flatmap": "^1.3.3", - "array.prototype.tosorted": "^1.1.4", - "doctrine": "^2.1.0", - "es-iterator-helpers": "^1.2.1", - "estraverse": "^5.3.0", - "hasown": "^2.0.2", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "minimatch": "^3.1.2", - "object.entries": "^1.1.9", - "object.fromentries": "^2.0.8", - "object.values": "^1.2.1", - "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.5", - "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.12", - "string.prototype.repeat": "^1.0.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" - } - }, - "node_modules/eslint-plugin-react-hooks": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.2.0.tgz", - "integrity": "sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0" - } - }, - "node_modules/eslint-plugin-react/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-scope": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", - "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", - "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.15.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", - "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-glob": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", - "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fastq": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", - "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/flatted": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", - "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", - "dev": true, - "license": "ISC" - }, - "node_modules/for-each": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", - "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/fraction.js": { - "version": "5.3.4", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-5.3.4.tgz", - "integrity": "sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/rawify" - } - }, - "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/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/function.prototype.name": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.2.0.tgz", - "integrity": "sha512-jObKIik1P2QjPHP5nz5BaOtUlfgS0fWo8IUByNXkM+o+02sJOi94em77GwJKQSJ3gfPHdgzLNrHc1uokV4P/ew==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2", - "hasown": "^2.0.4", - "is-callable": "^1.2.7", - "is-document.all": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/generator-function": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", - "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/get-intrinsic": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/get-symbol-description": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", - "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-tsconfig": { - "version": "4.14.1", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.14.1.tgz", - "integrity": "sha512-Dz/6HxkrxgNehhxLVeyv8sad9UzF2xBVeaKBQNDfJ5XiSXmp2gTR0eO0RWiT2NCKS5aGP9jjkOMggTN90qU50A==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globalthis": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", - "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-properties": "^1.2.1", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-bigints": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", - "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", - "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", - "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", - "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/internal-slot": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", - "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.2", - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-array-buffer": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", - "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-arrayish": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.4.tgz", - "integrity": "sha512-m6UrgzFVUYawGBh1dUsWR5M2Clqic9RVXC/9f8ceNlv2IcO9j9J/z8UoCLPqtsPBFNzEpfR3xftohbfqDx8EQA==", - "license": "MIT", - "optional": true - }, - "node_modules/is-async-function": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", - "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "async-function": "^1.0.0", - "call-bound": "^1.0.3", - "get-proto": "^1.0.1", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bigint": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", - "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-bigints": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-boolean-object": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", - "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bun-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-2.0.0.tgz", - "integrity": "sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.7.1" - } - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-core-module": { - "version": "2.16.2", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", - "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-data-view": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", - "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", - "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-document.all": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-document.all/-/is-document.all-1.0.0.tgz", - "integrity": "sha512-+XSoyS05OdBbhFuELhgTCpFNHkpBOJqtsZfUFFpe5QTw+9Sjbh8zitxhQkYAo6wV7e1Vb8cAPvpCk9jGam/82g==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-finalizationregistry": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", - "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-generator-function": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", - "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.4", - "generator-function": "^2.0.0", - "get-proto": "^1.0.1", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", - "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-negative-zero": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-number-object": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", - "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-regex": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", - "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-set": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", - "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", - "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-string": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", - "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", - "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "has-symbols": "^1.1.0", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", - "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakmap": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", - "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakref": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", - "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakset": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", - "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/iterator.prototype": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz", - "integrity": "sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.6", - "get-proto": "^1.0.0", - "has-symbols": "^1.1.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/jiti": { - "version": "1.21.7", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz", - "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==", - "dev": true, - "license": "MIT", - "bin": { - "jiti": "bin/jiti.js" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz", - "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/puzrin" - }, - { - "type": "github", - "url": "https://github.com/sponsors/nodeca" - } - ], - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/jsx-ast-utils": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", - "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flat": "^1.3.1", - "object.assign": "^4.1.4", - "object.values": "^1.1.6" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/language-subtag-registry": { - "version": "0.3.23", - "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz", - "integrity": "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==", - "dev": true, - "license": "CC0-1.0" - }, - "node_modules/language-tags": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz", - "integrity": "sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==", - "dev": true, - "license": "MIT", - "dependencies": { - "language-subtag-registry": "^0.3.20" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/lilconfig": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", - "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antonk52" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true, - "license": "MIT" - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/lucide-react": { - "version": "0.468.0", - "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.468.0.tgz", - "integrity": "sha512-6koYRhnM2N0GGZIdXzSeiNwguv1gt/FAjZOiPl76roBi3xKEXa4WmfpxgQwTTL4KipXjefrnf3oV4IsYhi4JFA==", - "license": "ISC", - "peerDependencies": { - "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc" - } - }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "node_modules/nanoid": { - "version": "3.3.18", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", - "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", - "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/napi-postinstall": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz", - "integrity": "sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==", - "dev": true, - "license": "MIT", - "bin": { - "napi-postinstall": "lib/cli.js" - }, - "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/napi-postinstall" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, - "node_modules/next": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/next/-/next-15.1.0.tgz", - "integrity": "sha512-QKhzt6Y8rgLNlj30izdMbxAwjHMFANnLwDwZ+WQh5sMhyt4lEBqDK9QpvWHtIM4rINKPoJ8aiRZKg5ULSybVHw==", - "deprecated": "This version has a security vulnerability. Please upgrade to a patched version. See https://nextjs.org/blog/CVE-2025-66478 for more details.", - "license": "MIT", - "dependencies": { - "@next/env": "15.1.0", - "@swc/counter": "0.1.3", - "@swc/helpers": "0.5.15", - "busboy": "1.6.0", - "caniuse-lite": "^1.0.30001579", - "postcss": "8.4.31", - "styled-jsx": "5.1.6" - }, - "bin": { - "next": "dist/bin/next" - }, - "engines": { - "node": "^18.18.0 || ^19.8.0 || >= 20.0.0" - }, - "optionalDependencies": { - "@next/swc-darwin-arm64": "15.1.0", - "@next/swc-darwin-x64": "15.1.0", - "@next/swc-linux-arm64-gnu": "15.1.0", - "@next/swc-linux-arm64-musl": "15.1.0", - "@next/swc-linux-x64-gnu": "15.1.0", - "@next/swc-linux-x64-musl": "15.1.0", - "@next/swc-win32-arm64-msvc": "15.1.0", - "@next/swc-win32-x64-msvc": "15.1.0", - "sharp": "^0.33.5" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.1.0", - "@playwright/test": "^1.41.2", - "babel-plugin-react-compiler": "*", - "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", - "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", - "sass": "^1.3.0" - }, - "peerDependenciesMeta": { - "@opentelemetry/api": { - "optional": true - }, - "@playwright/test": { - "optional": true - }, - "babel-plugin-react-compiler": { - "optional": true - }, - "sass": { - "optional": true - } - } - }, - "node_modules/next/node_modules/postcss": { - "version": "8.4.31", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", - "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", - "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.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/node-exports-info": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/node-exports-info/-/node-exports-info-1.6.2.tgz", - "integrity": "sha512-kXs9Go0cah0qHVV2v389IXQLdLCeE1xfFtjOAF+iobu0OIoG1pje8At2vMHyaPMiPMnG/LWP50twML21eMcAag==", - "dev": true, - "license": "MIT", - "dependencies": { - "array.prototype.flatmap": "^1.3.3", - "es-errors": "^1.3.0", - "object.entries": "^1.1.9", - "semver": "^6.3.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/node-exports-info/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/node-releases": { - "version": "2.0.53", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.53.tgz", - "integrity": "sha512-D9UOmYG3UH1V+ENW56t5QXBwJw1YEY18ruVeus89Rw+SyIgjPkCO84bRzO3uNIYosJbNwiabWVn48o3uJLjxFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/object-inspect": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", - "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", - "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0", - "has-symbols": "^1.1.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.entries": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz", - "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.fromentries": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", - "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.groupby": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", - "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.values": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", - "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/own-keys": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.2.tgz", - "integrity": "sha512-19YVAg7T+WTrxggPukVq7DjTv6+PJ867TmhCvBsYwmbFCsZd344rq2Ld1p0wo8f8Qrrhgp82c6FJRqdXWtSEhg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.4", - "get-intrinsic": "^1.3.0", - "object-keys": "^1.1.1", - "safe-push-apply": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "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": "2.3.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", - "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pirates": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", - "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/possible-typed-array-names": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", - "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/postcss": { - "version": "8.5.26", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz", - "integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==", - "dev": true, - "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.17", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/postcss-import": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", - "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", - "dev": true, - "license": "MIT", - "dependencies": { - "postcss-value-parser": "^4.0.0", - "read-cache": "^1.0.0", - "resolve": "^1.1.7" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "postcss": "^8.0.0" - } - }, - "node_modules/postcss-import/node_modules/resolve": { - "version": "1.22.12", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", - "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "is-core-module": "^2.16.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/postcss-js": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.1.0.tgz", - "integrity": "sha512-oIAOTqgIo7q2EOwbhb8UalYePMvYoIeRY2YKntdpFQXNosSu3vLrniGgmH9OKs/qAkfoj5oB3le/7mINW1LCfw==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "camelcase-css": "^2.0.1" - }, - "engines": { - "node": "^12 || ^14 || >= 16" - }, - "peerDependencies": { - "postcss": "^8.4.21" - } - }, - "node_modules/postcss-load-config": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", - "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "lilconfig": "^3.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "jiti": ">=1.21.0", - "postcss": ">=8.0.9", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - }, - "postcss": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, - "node_modules/postcss-nested": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz", - "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "postcss-selector-parser": "^6.1.1" - }, - "engines": { - "node": ">=12.0" - }, - "peerDependencies": { - "postcss": "^8.2.14" - } - }, - "node_modules/postcss-selector-parser": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.4.tgz", - "integrity": "sha512-bIoJLOmjCO1S9XdY/DcnR5hJxvrDir1PbGChrzXG3vw0/FOliy/fA3dmdhQ441kah4gKv+TwckGzex6wNS5cnQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, - "license": "MIT", - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/react": { - "version": "19.2.8", - "resolved": "https://registry.npmjs.org/react/-/react-19.2.8.tgz", - "integrity": "sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "19.2.8", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.8.tgz", - "integrity": "sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ==", - "license": "MIT", - "dependencies": { - "scheduler": "^0.27.0" - }, - "peerDependencies": { - "react": "^19.2.8" - } - }, - "node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/read-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", - "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "pify": "^2.3.0" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/reflect.getprototypeof": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", - "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.7", - "get-proto": "^1.0.1", - "which-builtin-type": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", - "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve": { - "version": "2.0.0-next.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.7.tgz", - "integrity": "sha512-tqt+NBWwyaMgw3zDsnygx4CByWjQEJHOPMdslYhppaQSJUtL/D4JO9CcBBlhPoI8lz9oJIDXkwXfhF4aWqP8xQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "is-core-module": "^2.16.2", - "node-exports-info": "^1.6.0", - "object-keys": "^1.1.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, - "node_modules/reusify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", - "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-array-concat": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.4.tgz", - "integrity": "sha512-wtZlHyOje6OZTGqAoaDKxFkgRtkF9CnHAVnCHKfuj200wAgL+bSJhdsCD2l0Qx/2ekEXjPWcyKkfGb5CPboslg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "get-intrinsic": "^1.3.0", - "has-symbols": "^1.1.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-push-apply": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", - "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-regex-test": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", - "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-regex": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/scheduler": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", - "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", - "license": "MIT" - }, - "node_modules/semver": { - "version": "7.8.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", - "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", - "devOptional": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-function-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-proto": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", - "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/sharp": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz", - "integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==", - "hasInstallScript": true, - "license": "Apache-2.0", - "optional": true, - "dependencies": { - "color": "^4.2.3", - "detect-libc": "^2.0.3", - "semver": "^7.6.3" - }, - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-darwin-arm64": "0.33.5", - "@img/sharp-darwin-x64": "0.33.5", - "@img/sharp-libvips-darwin-arm64": "1.0.4", - "@img/sharp-libvips-darwin-x64": "1.0.4", - "@img/sharp-libvips-linux-arm": "1.0.5", - "@img/sharp-libvips-linux-arm64": "1.0.4", - "@img/sharp-libvips-linux-s390x": "1.0.4", - "@img/sharp-libvips-linux-x64": "1.0.4", - "@img/sharp-libvips-linuxmusl-arm64": "1.0.4", - "@img/sharp-libvips-linuxmusl-x64": "1.0.4", - "@img/sharp-linux-arm": "0.33.5", - "@img/sharp-linux-arm64": "0.33.5", - "@img/sharp-linux-s390x": "0.33.5", - "@img/sharp-linux-x64": "0.33.5", - "@img/sharp-linuxmusl-arm64": "0.33.5", - "@img/sharp-linuxmusl-x64": "0.33.5", - "@img/sharp-wasm32": "0.33.5", - "@img/sharp-win32-ia32": "0.33.5", - "@img/sharp-win32-x64": "0.33.5" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/side-channel": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz", - "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.4", - "side-channel-list": "^1.0.1", - "side-channel-map": "^1.0.1", - "side-channel-weakmap": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-list": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz", - "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", - "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-weakmap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", - "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3", - "side-channel-map": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/simple-swizzle": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.4.tgz", - "integrity": "sha512-nAu1WFPQSMNr2Zn9PGSZK9AGn4t/y97lEm+MXTtUDwfP0ksAIX4nO+6ruD9Jwut4C49SB1Ws+fbXsm/yScWOHw==", - "license": "MIT", - "optional": true, - "dependencies": { - "is-arrayish": "^0.3.1" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stable-hash": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.5.tgz", - "integrity": "sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==", - "dev": true, - "license": "MIT" - }, - "node_modules/stop-iteration-iterator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", - "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "internal-slot": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/string.prototype.includes": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.1.tgz", - "integrity": "sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/string.prototype.matchall": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz", - "integrity": "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.6", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.6", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "internal-slot": "^1.1.0", - "regexp.prototype.flags": "^1.5.3", - "set-function-name": "^2.0.2", - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.repeat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz", - "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "node_modules/string.prototype.trim": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.11.tgz", - "integrity": "sha512-PwvK7BU+CMTJGYQCTZb5RWXIML92lftJLhQz1tBzgKiqGxJaMlBAa48POXaNAC2s4y8jr3EFqrkF9+44neS46w==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "define-data-property": "^1.1.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.24.2", - "es-object-atoms": "^1.1.2", - "has-property-descriptors": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.10.tgz", - "integrity": "sha512-2+3aDAOmPTmuFwjDnmJG2ctEkQKVki7vOSqaxkv42Mowj1V6PnvuwFCRrR5lChUux1TBskPjfkeTOhqczDMxTw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", - "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/styled-jsx": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.6.tgz", - "integrity": "sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==", - "license": "MIT", - "dependencies": { - "client-only": "0.0.1" - }, - "engines": { - "node": ">= 12.0.0" - }, - "peerDependencies": { - "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "babel-plugin-macros": { - "optional": true - } - } - }, - "node_modules/sucrase": { - "version": "3.35.1", - "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz", - "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.2", - "commander": "^4.0.0", - "lines-and-columns": "^1.1.6", - "mz": "^2.7.0", - "pirates": "^4.0.1", - "tinyglobby": "^0.2.11", - "ts-interface-checker": "^0.1.9" - }, - "bin": { - "sucrase": "bin/sucrase", - "sucrase-node": "bin/sucrase-node" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/tailwindcss": { - "version": "3.4.19", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.19.tgz", - "integrity": "sha512-3ofp+LL8E+pK/JuPLPggVAIaEuhvIz4qNcf3nA1Xn2o/7fb7s/TYpHhwGDv1ZU3PkBluUVaF8PyCHcm48cKLWQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@alloc/quick-lru": "^5.2.0", - "arg": "^5.0.2", - "chokidar": "^3.6.0", - "didyoumean": "^1.2.2", - "dlv": "^1.1.3", - "fast-glob": "^3.3.2", - "glob-parent": "^6.0.2", - "is-glob": "^4.0.3", - "jiti": "^1.21.7", - "lilconfig": "^3.1.3", - "micromatch": "^4.0.8", - "normalize-path": "^3.0.0", - "object-hash": "^3.0.0", - "picocolors": "^1.1.1", - "postcss": "^8.4.47", - "postcss-import": "^15.1.0", - "postcss-js": "^4.0.1", - "postcss-load-config": "^4.0.2 || ^5.0 || ^6.0", - "postcss-nested": "^6.2.0", - "postcss-selector-parser": "^6.1.2", - "resolve": "^1.22.8", - "sucrase": "^3.35.0" - }, - "bin": { - "tailwind": "lib/cli.js", - "tailwindcss": "lib/cli.js" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/tailwindcss/node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/tailwindcss/node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/tailwindcss/node_modules/resolve": { - "version": "1.22.12", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", - "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "is-core-module": "^2.16.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/thenify": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", - "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "node_modules/thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", - "dev": true, - "license": "MIT", - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, - "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/tinyglobby/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/tinyglobby/node_modules/picomatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", - "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/ts-api-utils": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", - "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.12" - }, - "peerDependencies": { - "typescript": ">=4.8.4" - } - }, - "node_modules/ts-interface-checker": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", - "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/tsconfig-paths": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, - "node_modules/tslib": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", - "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", - "license": "0BSD" - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/typed-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", - "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/typed-array-byte-length": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", - "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-byte-offset": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", - "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.15", - "reflect.getprototypeof": "^1.0.9" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-length": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.8.tgz", - "integrity": "sha512-phPGCwqr2+Qo0fwniCE8e4pKnGu/yFb5nD5Y8bf0EEeiI5GklnACYA9GFy/DrAeRrKHXvHn+1SUsOWgJp6RO+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.9", - "for-each": "^0.3.5", - "gopd": "^1.2.0", - "is-typed-array": "^1.1.15", - "possible-typed-array-names": "^1.1.0", - "reflect.getprototypeof": "^1.0.10" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/unbox-primitive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", - "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-bigints": "^1.0.2", - "has-symbols": "^1.1.0", - "which-boxed-primitive": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/unrs-resolver": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.12.2.tgz", - "integrity": "sha512-dmlRxBJJayXjqTwC+JtF1HhJmgf3ftQ3YejFcZrf4+KKtJv0qDsK1pjqaaVjG7wJ5NJ6UVP1OqRMQ71Z4C3rxQ==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "napi-postinstall": "^0.3.4" - }, - "funding": { - "url": "https://opencollective.com/unrs-resolver" - }, - "optionalDependencies": { - "@unrs/resolver-binding-android-arm-eabi": "1.12.2", - "@unrs/resolver-binding-android-arm64": "1.12.2", - "@unrs/resolver-binding-darwin-arm64": "1.12.2", - "@unrs/resolver-binding-darwin-x64": "1.12.2", - "@unrs/resolver-binding-freebsd-x64": "1.12.2", - "@unrs/resolver-binding-linux-arm-gnueabihf": "1.12.2", - "@unrs/resolver-binding-linux-arm-musleabihf": "1.12.2", - "@unrs/resolver-binding-linux-arm64-gnu": "1.12.2", - "@unrs/resolver-binding-linux-arm64-musl": "1.12.2", - "@unrs/resolver-binding-linux-loong64-gnu": "1.12.2", - "@unrs/resolver-binding-linux-loong64-musl": "1.12.2", - "@unrs/resolver-binding-linux-ppc64-gnu": "1.12.2", - "@unrs/resolver-binding-linux-riscv64-gnu": "1.12.2", - "@unrs/resolver-binding-linux-riscv64-musl": "1.12.2", - "@unrs/resolver-binding-linux-s390x-gnu": "1.12.2", - "@unrs/resolver-binding-linux-x64-gnu": "1.12.2", - "@unrs/resolver-binding-linux-x64-musl": "1.12.2", - "@unrs/resolver-binding-openharmony-arm64": "1.12.2", - "@unrs/resolver-binding-wasm32-wasi": "1.12.2", - "@unrs/resolver-binding-win32-arm64-msvc": "1.12.2", - "@unrs/resolver-binding-win32-ia32-msvc": "1.12.2", - "@unrs/resolver-binding-win32-x64-msvc": "1.12.2" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.0.tgz", - "integrity": "sha512-x/M6q3w4Ybp91CNaS4S69UnliqR3BzRpOT6LWbksjth0S/+jhfaPJsWjt/TewpT8j9eLIojUf5jr29WextHroA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true, - "license": "MIT" - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/which-boxed-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", - "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-bigint": "^1.1.0", - "is-boolean-object": "^1.2.1", - "is-number-object": "^1.1.1", - "is-string": "^1.1.1", - "is-symbol": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-builtin-type": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", - "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "function.prototype.name": "^1.1.6", - "has-tostringtag": "^1.0.2", - "is-async-function": "^2.0.0", - "is-date-object": "^1.1.0", - "is-finalizationregistry": "^1.1.0", - "is-generator-function": "^1.0.10", - "is-regex": "^1.2.1", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.1.0", - "which-collection": "^1.0.2", - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-collection": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", - "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.22", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.22.tgz", - "integrity": "sha512-fvO4ExWMFsqyhG3AiPAObMuY1lxaqgYcxbc49CNdWDDECOJNgQyvsOWVwbZc+qf3rzRtxojBK+CMEv0Ld5CYpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "for-each": "^0.3.5", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/zrender": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.6.1.tgz", - "integrity": "sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==", - "license": "BSD-3-Clause", - "dependencies": { - "tslib": "2.3.0" - } - } - } -} +{ + "name": "douyin-live-monitor", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "douyin-live-monitor", + "version": "0.1.0", + "dependencies": { + "echarts": "^5.5.1", + "lucide-react": "^0.468.0", + "next": "15.1.11", + "react": "^19.0.0", + "react-dom": "^19.0.0" + }, + "devDependencies": { + "@types/node": "^20", + "@types/react": "^19", + "@types/react-dom": "^19", + "autoprefixer": "^10.4.20", + "eslint": "^9", + "eslint-config-next": "15.1.11", + "postcss": "^8.4.49", + "tailwindcss": "^3.4.17", + "typescript": "^5" + } + }, + "node_modules/@alloc/quick-lru": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", + "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@emnapi/core": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", + "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.1", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/core/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD", + "optional": true + }, + "node_modules/@emnapi/runtime": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz", + "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==", + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD", + "optional": true + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", + "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD", + "optional": true + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz", + "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.2.tgz", + "integrity": "sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.7", + "debug": "^4.3.1", + "minimatch": "^3.1.5" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.6.tgz", + "integrity": "sha512-l2Ul9PrHsPCKcEY/ac7VgFj9D80C7S68sOKc618SyHDPK36s1XcFebXY0iTzUVn4Yq+YbwvSnDmCz9yxjX+QrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.14.0", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.3.0", + "minimatch": "^3.1.5", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "9.39.5", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.5.tgz", + "integrity": "sha512-QywQuszQh77pIXCsq998c8hbhSTI/azTty1Z6N53dmAudKHhy573j3yvRLsX2BSp8YpLtoCEG8E9DJe+8zUh4A==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/types": "^0.15.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@img/sharp-darwin-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz", + "integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-darwin-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz", + "integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-libvips-darwin-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz", + "integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-darwin-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz", + "integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz", + "integrity": "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==", + "cpu": [ + "arm" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz", + "integrity": "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-s390x": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.4.tgz", + "integrity": "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==", + "cpu": [ + "s390x" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz", + "integrity": "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz", + "integrity": "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz", + "integrity": "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-linux-arm": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz", + "integrity": "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==", + "cpu": [ + "arm" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm": "1.0.5" + } + }, + "node_modules/@img/sharp-linux-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz", + "integrity": "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-linux-s390x": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.5.tgz", + "integrity": "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==", + "cpu": [ + "s390x" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-s390x": "1.0.4" + } + }, + "node_modules/@img/sharp-linux-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz", + "integrity": "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-linuxmusl-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz", + "integrity": "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-linuxmusl-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz", + "integrity": "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-wasm32": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.5.tgz", + "integrity": "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==", + "cpu": [ + "wasm32" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", + "optional": true, + "dependencies": { + "@emnapi/runtime": "^1.2.0" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-ia32": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.5.tgz", + "integrity": "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==", + "cpu": [ + "ia32" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz", + "integrity": "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.2.tgz", + "integrity": "sha512-JfB4kuJQjaoHuCTseIINHtHWeJnvgEcxjwA5t/Y00ZgaOO1Crz3fjT/p8kT28zA/Caz7oiUMn3d6H2yOVCVwuw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.3" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1 || ^2.0.0-alpha.3", + "@emnapi/runtime": "^1.7.1 || ^2.0.0-alpha.3" + } + }, + "node_modules/@next/env": { + "version": "15.1.11", + "resolved": "https://registry.npmjs.org/@next/env/-/env-15.1.11.tgz", + "integrity": "sha512-yp++FVldfLglEG5LoS2rXhGypPyoSOyY0kxZQJ2vnlYJeP8o318t5DrDu5Tqzr03qAhDWllAID/kOCsXNLcwKw==", + "license": "MIT" + }, + "node_modules/@next/eslint-plugin-next": { + "version": "15.1.11", + "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-15.1.11.tgz", + "integrity": "sha512-jpAu+46v5FF/TO8YUdOBHn/Wr4SCiU4IgjQ45S9Nn3vR4nZVS2SR+m9lpxcCv/xqMUoYuYFQZUP0H/ptw0W6+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-glob": "3.3.1" + } + }, + "node_modules/@next/swc-darwin-arm64": { + "version": "15.1.9", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.1.9.tgz", + "integrity": "sha512-sQF6MfW4nk0PwMYYq8xNgqyxZJGIJV16QqNDgaZ5ze9YoVzm4/YNx17X0exZudayjL9PF0/5RGffDtzXapch0Q==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-darwin-x64": { + "version": "15.1.9", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.1.9.tgz", + "integrity": "sha512-fp0c1rB6jZvdSDhprOur36xzQvqelAkNRXM/An92sKjjtaJxjlqJR8jiQLQImPsClIu8amQn+ZzFwl1lsEf62w==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-gnu": { + "version": "15.1.9", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.1.9.tgz", + "integrity": "sha512-77rYykF6UtaXvxh9YyRIKoaYPI6/YX6cy8j1DL5/1XkjbfOwFDfTEhH7YGPqG/ePl+emBcbDYC2elgEqY2e+ag==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-musl": { + "version": "15.1.9", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.1.9.tgz", + "integrity": "sha512-uZ1HazKcyWC7RA6j+S/8aYgvxmDqwnG+gE5S9MhY7BTMj7ahXKunpKuX8/BA2M7OvINLv7LTzoobQbw928p3WA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-gnu": { + "version": "15.1.9", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.1.9.tgz", + "integrity": "sha512-gQIX1d3ct2RBlgbbWOrp+SHExmtmFm/HSW1Do5sSGMDyzbkYhS2sdq5LRDJWWsQu+/MqpgJHqJT6ORolKp/U1g==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-musl": { + "version": "15.1.9", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.1.9.tgz", + "integrity": "sha512-fJOwxAbCeq6Vo7pXZGDP6iA4+yIBGshp7ie2Evvge7S7lywyg7b/SGqcvWq/jYcmd0EbXdb7hBfdqSQwTtGTPg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-arm64-msvc": { + "version": "15.1.9", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.1.9.tgz", + "integrity": "sha512-crfbUkAd9PVg9nGfyjSzQbz82dPvc4pb1TeP0ZaAdGzTH6OfTU9kxidpFIogw0DYIEadI7hRSvuihy2NezkaNQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-x64-msvc": { + "version": "15.1.9", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.1.9.tgz", + "integrity": "sha512-SBB0oA4E2a0axUrUwLqXlLkSn+bRx9OWU6LheqmRrO53QEAJP7JquKh3kF0jRzmlYOWFZtQwyIWJMEJMtvvDcQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nolyfill/is-core-module": { + "version": "1.0.39", + "resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz", + "integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.4.0" + } + }, + "node_modules/@rtsao/scc": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", + "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rushstack/eslint-patch": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.16.1.tgz", + "integrity": "sha512-TvZbIpeKqGQQ7X0zSCvPH9riMSFQFSggnfBjFZ1mEoILW+UuXCKwOoPcgjMwiUtRqFZ8jWhPJc4um14vC6I4ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@swc/counter": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", + "license": "Apache-2.0" + }, + "node_modules/@swc/helpers": { + "version": "0.5.15", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz", + "integrity": "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.8.0" + } + }, + "node_modules/@swc/helpers/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz", + "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tybys/wasm-util/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD", + "optional": true + }, + "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/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "20.19.43", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.43.tgz", + "integrity": "sha512-6oYBAi5ikg4Pl+kGsoYtawUMBT2zZMCvPNF7pVLnHZfd1zf38DRiWn/gT01RYCdUqkv7Fhr+C9ot4/tb+2sVvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@types/react": { + "version": "19.2.18", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.18.tgz", + "integrity": "sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "19.2.4", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.4.tgz", + "integrity": "sha512-Bsc+QHgp+P/F02XDzNCY9jnZNCUuLki36KT7VKrTXXLdHf+vHMNZnW1rVu5DNW/rCK+fya3DATySbLM4yhtKUw==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^19.2.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.66.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.66.0.tgz", + "integrity": "sha512-p088eaGrzYz1s+7cov0aMOCkNGTJlVxF4jgubf28c8L0Cv9Rloj8YBHnv4hXLq6IIEE1AsjNWavO+k+8kP2Y0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.66.0", + "@typescript-eslint/type-utils": "8.66.0", + "@typescript-eslint/utils": "8.66.0", + "@typescript-eslint/visitor-keys": "8.66.0", + "ignore": "^7.0.5", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.66.0", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.6.tgz", + "integrity": "sha512-BAg6QkE8W+TuQLrrw0Ugr7HegXduRuuj8/ti2kSOc+jz1dmx8/WNcjr6XGnq5YpDWxFwwaavqD0+jIUOKelTsw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.66.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.66.0.tgz", + "integrity": "sha512-X6ypGChaWYk6PBtUg2BwuTZEFFcHJAtGTVJ9/lCTOufhZ4i9fNolQNnktq+kkMCwMj7V8Svsq7+TxSDslmhE0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.66.0", + "@typescript-eslint/types": "8.66.0", + "@typescript-eslint/typescript-estree": "8.66.0", + "@typescript-eslint/visitor-keys": "8.66.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.66.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.66.0.tgz", + "integrity": "sha512-7MthGPTt4BP69lSryqpqq8HQqxuzynssckL/jyDyk3+TNMQ3y2jFWkptCrktWvBrP+EH787Nl5N5Qpw7WZg+5g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.66.0", + "@typescript-eslint/types": "^8.66.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.66.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.66.0.tgz", + "integrity": "sha512-8TGcH25j9zqJ/IULB/ppyhRvxA8QYfFEZ7nfbg6/BN9spDgb8fPWQXlE5l8TWBL50EtUx007uZ1o9VOwrq2/9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.66.0", + "@typescript-eslint/visitor-keys": "8.66.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.66.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.66.0.tgz", + "integrity": "sha512-9D5gLYZG4rOjcoag8MQ/fWI8WqA9wcPDyOGyWtWFhvM1lHRbliqUSPIY5J3zqCU1tvSwzXxnnjhQhz5Ne7mJ4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.66.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.66.0.tgz", + "integrity": "sha512-LG2dWfjZQQp0ADtAu/EWJVayefGL2UEZ3CDeI44D9v3rXB/WYUqE/jpO28KrEKul5AySrmI+Zh1v6v+xW2U9+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.66.0", + "@typescript-eslint/typescript-estree": "8.66.0", + "@typescript-eslint/utils": "8.66.0", + "debug": "^4.4.3", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.66.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.66.0.tgz", + "integrity": "sha512-H6gcYaSDOyvL3AD/jHUtUFo2jqGgn/F6nuyuZSu0QTesxL+cP4dQoIMrODRofuJC09g64+WgZ6tE19Y1N2YIFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.66.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.66.0.tgz", + "integrity": "sha512-8/x4INiiQb10jGgXYD7116/zQ+OL84ZIFn0za68wwFHCanT/VLbBEroWht8RV8fn0/ZCAoazHLQgwUC0UQcDfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.66.0", + "@typescript-eslint/tsconfig-utils": "8.66.0", + "@typescript-eslint/types": "8.66.0", + "@typescript-eslint/visitor-keys": "8.66.0", + "debug": "^4.4.3", + "minimatch": "^10.2.2", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.66.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.66.0.tgz", + "integrity": "sha512-jasearZPolBw5NJNYGMwxzHMF83niVWmMU1VdHzG1CyfI2VS7f7nZltnKtHcg20hW+7Uo5GfK4MeDPoU3qI8EA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.66.0", + "@typescript-eslint/types": "8.66.0", + "@typescript-eslint/typescript-estree": "8.66.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.66.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.66.0.tgz", + "integrity": "sha512-dkKR8q+lKciskj1Y3vthHktl+3cMLWGyVUP23bRiPZ5O9BRT++4EqDDV+TVeIKBL1VXVEqrJlz8MYbcnvJcAlg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.66.0", + "eslint-visitor-keys": "^5.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@unrs/resolver-binding-android-arm-eabi": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.12.2.tgz", + "integrity": "sha512-g5T90pqg1bo/7mytQx6F4iBNC0Wsh9cu+z9veDbFjc7HjpesJFWD7QMS0NGStXM075+7dJPPVvBbpZlnrdpi/w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@unrs/resolver-binding-android-arm64": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.12.2.tgz", + "integrity": "sha512-YGCRZv/9GLhwmz6mYDeTsm/92BAyR28l6c2ReweVW5pWgfsitWLY8upvfRlGdoyD8HjeTHSYJWyZGD4KJA/nFQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@unrs/resolver-binding-darwin-arm64": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.12.2.tgz", + "integrity": "sha512-u9DiNT1auQMO20A9SyTuG3wUgQWB9Z7KjAg0uFuCDR1FsAY8A0CG2S6JpHS1xwm/w1G08bjXZDcyOCjv1WAm2w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@unrs/resolver-binding-darwin-x64": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.12.2.tgz", + "integrity": "sha512-f7rPLi/T1HVKZu/u6t87lroib16n8vrSzcyxI7lg4BGO9UF26KhQL44sd9eOUgrTYhvRXtWOIZT5PejdPyJfUA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@unrs/resolver-binding-freebsd-x64": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.12.2.tgz", + "integrity": "sha512-BpcOjWCJub6nRZUS2zA20pmLvjtqAtGejETaIyRLiZiQf++cbrjltLA5NN/xaXfqeOBOSlMFbemIl5/S5tljmg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.12.2.tgz", + "integrity": "sha512-vZTDvdSISZjJx66OzJqtsOhzifbqRjbmI1Mnu49fQDwog5GtDI4QidRiEAYbZCRj9C8YZEW+3ZjqsyS9GR4k2A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.12.2.tgz", + "integrity": "sha512-BiPI+IrIlwcW4nLLMM21+B1dFPzd55yAVgVGrdgDjNef+ch03GdxrcyaIz8X9SsQirh/kCQ7mviyWlMxdh2D7g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm64-gnu": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.12.2.tgz", + "integrity": "sha512-zJc0H99FEPoFfSrNpa91HYfxzfAJCr502oxNK1cfdC9hlaFI43RT+JFCann9JUgZmLzzntChHyn13Sgn9ljHNg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm64-musl": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.12.2.tgz", + "integrity": "sha512-KQ3Lki6l+Pz1k/eBipN41ES+YUK30beLGb9YqcB1O542cyLCNE6GaxrfcY3T6EezmGGk84wb5XyO9loTM9tkcA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-loong64-gnu": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-gnu/-/resolver-binding-linux-loong64-gnu-1.12.2.tgz", + "integrity": "sha512-3SJGEh1DborhG6pyxvhPzCT4bbSIVihsvgJc13P1bHG7KLdNDaF9T3gsTwFc7Jw/5Y5/iWOjkEx7Zy0NvCGX3Q==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-loong64-musl": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-musl/-/resolver-binding-linux-loong64-musl-1.12.2.tgz", + "integrity": "sha512-jiuG/Obbel7uw1PwHNFfrkiKhLAF6mnyZ6aWlOAVN9WqKm8v0OFGnciJIHu8+CMvXLQ8AD51LPzAoUfT21D5Ew==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.12.2.tgz", + "integrity": "sha512-q7xRvVpmcfeL+LlZg8Pbbo6QaTZwDU5BaGZbwfhkEsXJn3Was8xYfE0RBH266xZt0rM6B7i8xAYIvjthuUIWHg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.12.2.tgz", + "integrity": "sha512-0CVdx6lcnT3Q9inOH8tsMIOJ6ImndllMjqJHg8RLVdB7Vq4SfkEXl9mCSsVNuNA4MCYycRicCUxPCabVHJRr6A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-riscv64-musl": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.12.2.tgz", + "integrity": "sha512-iOwlRo9vnp6R6ohHQS11n0NnfdXx/omhkocmIfaPRpQhKZ+3BDMkkdRVh53qjkFkpPddf+FETA28NwGN7l5l+w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-s390x-gnu": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.12.2.tgz", + "integrity": "sha512-HYJtLfXq94q8iZNFT1lknx258wlkkWhZeUXJRqzKBBUJ00CvZ+N33zgbCqimLjsyw5Va6uUxhVa12mI+kaveEw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-x64-gnu": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.12.2.tgz", + "integrity": "sha512-mPsUhunKKDih5O96Y6enDQyHc1SqBPlY1E/SfMWDM3EdJ95Z9CArPeCVwCCqbP45ljvivdEk8Fxn+SIb1rDAJQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-x64-musl": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.12.2.tgz", + "integrity": "sha512-azrt6+5ydLd8Vt210AAFis/lZevSfPw93EJRIJG+xPu4WCJ8K0kppCTpMyLPcKT7H15M4Jnt2tMp5bOvCkRC6A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-openharmony-arm64": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-openharmony-arm64/-/resolver-binding-openharmony-arm64-1.12.2.tgz", + "integrity": "sha512-YZ9hP4O0X9PQb8eO980qmLNGH4zT3I9+SZTdt0Pr0YyuGQhYKoOZkV02VzrzyOZJ5xIJ3UFIenKkUkGg8GjgWQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@unrs/resolver-binding-wasm32-wasi": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.12.2.tgz", + "integrity": "sha512-tYFDIkMxSflfEc/h92ZWNsZlHSwgimbNHSO3PL2JWQHfCuC2q316jMyYU9TIWZsFK2bQwyK5VAdYgn8ygPj69A==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "1.10.0", + "@emnapi/runtime": "1.10.0", + "@napi-rs/wasm-runtime": "^1.1.4" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@unrs/resolver-binding-wasm32-wasi/node_modules/@emnapi/runtime": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", + "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@unrs/resolver-binding-wasm32-wasi/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD", + "optional": true + }, + "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.12.2.tgz", + "integrity": "sha512-qzNyg3xL0VPQmCaUh+N5jSitce6k+uCBfMDesWRnlULOZaqUkaJ0ybdT+UqlAWJoQjuqfIU/0Ptx9bteN4D82g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.12.2.tgz", + "integrity": "sha512-WD9sY00OfpHVGfsnHZoA8jVT+esS/Bg8z8jzxp5BnDCjjwsuKsPQrzswwpFy4J1AUJbXPRfkpcX0mXrzeXW79g==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/resolver-binding-win32-x64-msvc": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.12.2.tgz", + "integrity": "sha512-nAB74NfSNKknqQ1RrYj6uz8FcXEomu/MATJZxh/x+BArzN2U3JbOYC0APYzUIGhVY3m5hRxA8VPNdPBoG8txlA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/acorn": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", + "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true, + "license": "MIT" + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true, + "license": "MIT" + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/aria-query": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", + "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", + "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "is-array-buffer": "^3.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-includes": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz", + "integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.24.0", + "es-object-atoms": "^1.1.1", + "get-intrinsic": "^1.3.0", + "is-string": "^1.1.1", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.findlast": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", + "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz", + "integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "es-shim-unscopables": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", + "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", + "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.tosorted": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", + "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3", + "es-errors": "^1.3.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", + "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ast-types-flow": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz", + "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/async-function": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", + "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/autoprefixer": { + "version": "10.5.4", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.5.4.tgz", + "integrity": "sha512-MaU0U/za7N3r6brxD4YB/l4NSrFzLPlANv6wEuQVaIPlD3L4W9rFcQPbL/EilY9BHhHvhfcz3gInDLrEtWT4EA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "browserslist": "^4.28.6", + "caniuse-lite": "^1.0.30001806", + "fraction.js": "^5.3.4", + "picocolors": "^1.1.1", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/axe-core": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.13.0.tgz", + "integrity": "sha512-UzGt8zg7Ny8djbYMhxl2zuEevVa7r2gJjYY5Lwr1xM7+XU2nd6CkIWFTVcCIbAP63vSz71NaVyyuSk9lHKcy0A==", + "dev": true, + "license": "MPL-2.0", + "engines": { + "node": ">=4" + } + }, + "node_modules/axobject-query": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", + "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/baseline-browser-mapping": { + "version": "2.11.12", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.12.tgz", + "integrity": "sha512-r7WnVImvVCeFpf2DOXfy41aPWzeNg3H/A2X4dKmy1QL0MSyyk/e7z8ihJ3N6Nn2PsdhkVlqnEfnUE4a05P2aTA==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", + "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.28.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.7.tgz", + "integrity": "sha512-JxV13hNrFxqjOc8alRbq9dK1MM79NEXYpma2B2J4wAtpWS5zIEIKqWPGCl7N4o7Uc7B7itylh7SuDujATRyyTw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.10.44", + "caniuse-lite": "^1.0.30001806", + "electron-to-chromium": "^1.5.393", + "node-releases": "^2.0.51", + "update-browserslist-db": "^1.2.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, + "node_modules/call-bind": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.9.tgz", + "integrity": "sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "get-intrinsic": "^1.3.0", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase-css": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001809", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001809.tgz", + "integrity": "sha512-xxWVywk6a6Arlk+hymeycyn/VgqEfLDxupvhH/xiY5SJ/18kmi9o6MiO320DCUzypORHLtvh0I4i04tUhCNHNQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/client-only": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", + "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==", + "license": "MIT" + }, + "node_modules/color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "license": "MIT", + "optional": true, + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "license": "MIT", + "optional": true, + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "license": "MIT", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/damerau-levenshtein": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", + "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/data-view-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", + "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", + "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/inspect-js" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", + "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "license": "Apache-2.0", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/didyoumean": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/dlv": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "dev": true, + "license": "MIT" + }, + "node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/echarts": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.6.0.tgz", + "integrity": "sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "2.3.0", + "zrender": "5.6.1" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.402", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.402.tgz", + "integrity": "sha512-/oOpMaPT6Yg+6/1XQhyIPlzgj7Ye9zf+nNM2Uh6OcE2G2oNptWazFa+qB2Pdqqbsc9KnIDzgAntoYN0dbwOXwA==", + "dev": true, + "license": "ISC" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/es-abstract": { + "version": "1.24.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.2.tgz", + "integrity": "sha512-2FpH9Q5i2RRwyEP1AylXe6nYLR5OhaJTZwmlcP0dL/+JCbgg7yyEo/sEK6HeGZRf3dFpWwThaRHVApXSkW3xeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.2", + "arraybuffer.prototype.slice": "^1.0.4", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "data-view-buffer": "^1.0.2", + "data-view-byte-length": "^1.0.2", + "data-view-byte-offset": "^1.0.1", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "es-set-tostringtag": "^2.1.0", + "es-to-primitive": "^1.3.0", + "function.prototype.name": "^1.1.8", + "get-intrinsic": "^1.3.0", + "get-proto": "^1.0.1", + "get-symbol-description": "^1.1.0", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "internal-slot": "^1.1.0", + "is-array-buffer": "^3.0.5", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.2", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.2.1", + "is-set": "^2.0.3", + "is-shared-array-buffer": "^1.0.4", + "is-string": "^1.1.1", + "is-typed-array": "^1.1.15", + "is-weakref": "^1.1.1", + "math-intrinsics": "^1.1.0", + "object-inspect": "^1.13.4", + "object-keys": "^1.1.1", + "object.assign": "^4.1.7", + "own-keys": "^1.0.1", + "regexp.prototype.flags": "^1.5.4", + "safe-array-concat": "^1.1.3", + "safe-push-apply": "^1.0.0", + "safe-regex-test": "^1.1.0", + "set-proto": "^1.0.0", + "stop-iteration-iterator": "^1.1.0", + "string.prototype.trim": "^1.2.10", + "string.prototype.trimend": "^1.0.9", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.3", + "typed-array-byte-length": "^1.0.3", + "typed-array-byte-offset": "^1.0.4", + "typed-array-length": "^1.0.7", + "unbox-primitive": "^1.1.0", + "which-typed-array": "^1.1.19" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-abstract-get": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-abstract-get/-/es-abstract-get-1.0.0.tgz", + "integrity": "sha512-6PMWXpdhshVvFp+FoWYs1EvG1Nj0tvk0dZM+XcK0xMEM1czRVcP6ohqPWHy6qPagSpC8j4+p89WXlT+xXJs/fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.2", + "is-callable": "^1.2.7", + "object-inspect": "^1.13.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-iterator-helpers": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.4.0.tgz", + "integrity": "sha512-c/A0P0oxkACDc+cKWw8evLXK83oBKgn0qPOqCYT4x9uolpCIJAcYvJC9QYKNDRPsTeGyCrQ326jrvgZWdCdK5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.9", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.24.2", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.1.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.3.0", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "internal-slot": "^1.1.0", + "iterator.prototype": "^1.1.5", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", + "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.4.tgz", + "integrity": "sha512-yPDz7wqpg1/mmHLmS3tcfTfbw5f1eryXvyghYBffGdERwe+mV7ZcWzTR8LR17Kvqt3qfPurjlonmnq3MKXIOXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-abstract-get": "^1.0.0", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "is-callable": "^1.2.7", + "is-date-object": "^1.1.0", + "is-symbol": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.39.5", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.5.tgz", + "integrity": "sha512-DgZS62aPLXKlnxILS/AYCoRvHaZeXceIzlXPkkGGzJWSow1aEk0lbTlxUSlyjC8jcaKxAdOnTDz+o1JFSBsyjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.2", + "@eslint/config-helpers": "^0.4.2", + "@eslint/core": "^0.17.0", + "@eslint/eslintrc": "^3.3.6", + "@eslint/js": "9.39.5", + "@eslint/plugin-kit": "^0.4.1", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.14.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.5", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-config-next": { + "version": "15.1.11", + "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-15.1.11.tgz", + "integrity": "sha512-RK5q3f8CKMTwNXULOqd2TAsz+7kA5+5fy5YK7T6SeczLFOuOUcuJOGlYUbyoeU6+UKQrpFsYgCz71hI1F9q5Cg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@next/eslint-plugin-next": "15.1.11", + "@rushstack/eslint-patch": "^1.10.3", + "@typescript-eslint/eslint-plugin": "^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0", + "@typescript-eslint/parser": "^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-import-resolver-typescript": "^3.5.2", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jsx-a11y": "^6.10.0", + "eslint-plugin-react": "^7.37.0", + "eslint-plugin-react-hooks": "^5.0.0" + }, + "peerDependencies": { + "eslint": "^7.23.0 || ^8.0.0 || ^9.0.0", + "typescript": ">=3.3.1" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.10.tgz", + "integrity": "sha512-tRrKqFyCaKict5hOd244sL6EQFNycnMQnBe+j8uqGNXYzsImGbGUU4ibtoaBmv5FLwJwcFJNeg1GeVjQfbMrDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.16.1", + "resolve": "^2.0.0-next.6" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-import-resolver-typescript": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.10.1.tgz", + "integrity": "sha512-A1rHYb06zjMGAxdLSkN2fXPBwuSaQ0iO5M/hdyS0Ajj1VBaRp0sPD3dn1FhME3c/JluGFbwSxyCfqdSbtQLAHQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "@nolyfill/is-core-module": "1.0.39", + "debug": "^4.4.0", + "get-tsconfig": "^4.10.0", + "is-bun-module": "^2.0.0", + "stable-hash": "^0.0.5", + "tinyglobby": "^0.2.13", + "unrs-resolver": "^1.6.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-import-resolver-typescript" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*", + "eslint-plugin-import-x": "*" + }, + "peerDependenciesMeta": { + "eslint-plugin-import": { + "optional": true + }, + "eslint-plugin-import-x": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.14.0.tgz", + "integrity": "sha512-W2WCRZ9Dqntd+2u8jJcVMV2PKulc6RdLgUUoh/yQr3uB6lo/ZOeGx11sv60/8S4QFFKNslAlWhr9u0Ef7ZW6Ig==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.32.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz", + "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rtsao/scc": "^1.1.0", + "array-includes": "^3.1.9", + "array.prototype.findlastindex": "^1.2.6", + "array.prototype.flat": "^1.3.3", + "array.prototype.flatmap": "^1.3.3", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.12.1", + "hasown": "^2.0.2", + "is-core-module": "^2.16.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.8", + "object.groupby": "^1.0.3", + "object.values": "^1.2.1", + "semver": "^6.3.1", + "string.prototype.trimend": "^1.0.9", + "tsconfig-paths": "^3.15.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-plugin-jsx-a11y": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz", + "integrity": "sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "aria-query": "^5.3.2", + "array-includes": "^3.1.8", + "array.prototype.flatmap": "^1.3.2", + "ast-types-flow": "^0.0.8", + "axe-core": "^4.10.0", + "axobject-query": "^4.1.0", + "damerau-levenshtein": "^1.0.8", + "emoji-regex": "^9.2.2", + "hasown": "^2.0.2", + "jsx-ast-utils": "^3.3.5", + "language-tags": "^1.0.9", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.8", + "safe-regex-test": "^1.0.3", + "string.prototype.includes": "^2.0.1" + }, + "engines": { + "node": ">=4.0" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9" + } + }, + "node_modules/eslint-plugin-react": { + "version": "7.37.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz", + "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-includes": "^3.1.8", + "array.prototype.findlast": "^1.2.5", + "array.prototype.flatmap": "^1.3.3", + "array.prototype.tosorted": "^1.1.4", + "doctrine": "^2.1.0", + "es-iterator-helpers": "^1.2.1", + "estraverse": "^5.3.0", + "hasown": "^2.0.2", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "minimatch": "^3.1.2", + "object.entries": "^1.1.9", + "object.fromentries": "^2.0.8", + "object.values": "^1.2.1", + "prop-types": "^15.8.1", + "resolve": "^2.0.0-next.5", + "semver": "^6.3.1", + "string.prototype.matchall": "^4.0.12", + "string.prototype.repeat": "^1.0.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" + } + }, + "node_modules/eslint-plugin-react-hooks": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.2.0.tgz", + "integrity": "sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0" + } + }, + "node_modules/eslint-plugin-react/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", + "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", + "dev": true, + "license": "ISC" + }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/fraction.js": { + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-5.3.4.tgz", + "integrity": "sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/rawify" + } + }, + "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/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.2.0.tgz", + "integrity": "sha512-jObKIik1P2QjPHP5nz5BaOtUlfgS0fWo8IUByNXkM+o+02sJOi94em77GwJKQSJ3gfPHdgzLNrHc1uokV4P/ew==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.9", + "call-bound": "^1.0.4", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2", + "hasown": "^2.0.4", + "is-callable": "^1.2.7", + "is-document.all": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/generator-function": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", + "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-symbol-description": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", + "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-tsconfig": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.14.1.tgz", + "integrity": "sha512-Dz/6HxkrxgNehhxLVeyv8sad9UzF2xBVeaKBQNDfJ5XiSXmp2gTR0eO0RWiT2NCKS5aGP9jjkOMggTN90qU50A==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-bigints": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", + "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/internal-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", + "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.2", + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", + "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-arrayish": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.4.tgz", + "integrity": "sha512-m6UrgzFVUYawGBh1dUsWR5M2Clqic9RVXC/9f8ceNlv2IcO9j9J/z8UoCLPqtsPBFNzEpfR3xftohbfqDx8EQA==", + "license": "MIT", + "optional": true + }, + "node_modules/is-async-function": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", + "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "async-function": "^1.0.0", + "call-bound": "^1.0.3", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", + "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-bigints": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-boolean-object": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", + "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bun-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-2.0.0.tgz", + "integrity": "sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.7.1" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", + "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", + "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", + "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-document.all": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-document.all/-/is-document.all-1.0.0.tgz", + "integrity": "sha512-+XSoyS05OdBbhFuELhgTCpFNHkpBOJqtsZfUFFpe5QTw+9Sjbh8zitxhQkYAo6wV7e1Vb8cAPvpCk9jGam/82g==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-finalizationregistry": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", + "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-generator-function": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", + "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.4", + "generator-function": "^2.0.0", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", + "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-regex": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", + "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", + "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", + "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-symbols": "^1.1.0", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", + "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", + "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/iterator.prototype": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz", + "integrity": "sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.6", + "get-proto": "^1.0.0", + "has-symbols": "^1.1.0", + "set-function-name": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/jiti": { + "version": "1.21.7", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz", + "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "bin/jiti.js" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz", + "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/jsx-ast-utils": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", + "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "object.assign": "^4.1.4", + "object.values": "^1.1.6" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/language-subtag-registry": { + "version": "0.3.23", + "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz", + "integrity": "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/language-tags": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz", + "integrity": "sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==", + "dev": true, + "license": "MIT", + "dependencies": { + "language-subtag-registry": "^0.3.20" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lucide-react": { + "version": "0.468.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.468.0.tgz", + "integrity": "sha512-6koYRhnM2N0GGZIdXzSeiNwguv1gt/FAjZOiPl76roBi3xKEXa4WmfpxgQwTTL4KipXjefrnf3oV4IsYhi4JFA==", + "license": "ISC", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.18", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", + "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", + "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/napi-postinstall": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz", + "integrity": "sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==", + "dev": true, + "license": "MIT", + "bin": { + "napi-postinstall": "lib/cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/napi-postinstall" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/next": { + "version": "15.1.11", + "resolved": "https://registry.npmjs.org/next/-/next-15.1.11.tgz", + "integrity": "sha512-UiVJaOGhKST58AadwbFUZThlNBmYhKqaCs8bVtm4plTxsgKq0mJ0zTsp7t7j/rzsbAEj9WcAMdZCztjByi4EoQ==", + "license": "MIT", + "dependencies": { + "@next/env": "15.1.11", + "@swc/counter": "0.1.3", + "@swc/helpers": "0.5.15", + "busboy": "1.6.0", + "caniuse-lite": "^1.0.30001579", + "postcss": "8.4.31", + "styled-jsx": "5.1.6" + }, + "bin": { + "next": "dist/bin/next" + }, + "engines": { + "node": "^18.18.0 || ^19.8.0 || >= 20.0.0" + }, + "optionalDependencies": { + "@next/swc-darwin-arm64": "15.1.9", + "@next/swc-darwin-x64": "15.1.9", + "@next/swc-linux-arm64-gnu": "15.1.9", + "@next/swc-linux-arm64-musl": "15.1.9", + "@next/swc-linux-x64-gnu": "15.1.9", + "@next/swc-linux-x64-musl": "15.1.9", + "@next/swc-win32-arm64-msvc": "15.1.9", + "@next/swc-win32-x64-msvc": "15.1.9", + "sharp": "^0.33.5" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.1.0", + "@playwright/test": "^1.41.2", + "babel-plugin-react-compiler": "*", + "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", + "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", + "sass": "^1.3.0" + }, + "peerDependenciesMeta": { + "@opentelemetry/api": { + "optional": true + }, + "@playwright/test": { + "optional": true + }, + "babel-plugin-react-compiler": { + "optional": true + }, + "sass": { + "optional": true + } + } + }, + "node_modules/next/node_modules/postcss": { + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", + "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.6", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/node-exports-info": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/node-exports-info/-/node-exports-info-1.6.2.tgz", + "integrity": "sha512-kXs9Go0cah0qHVV2v389IXQLdLCeE1xfFtjOAF+iobu0OIoG1pje8At2vMHyaPMiPMnG/LWP50twML21eMcAag==", + "dev": true, + "license": "MIT", + "dependencies": { + "array.prototype.flatmap": "^1.3.3", + "es-errors": "^1.3.0", + "object.entries": "^1.1.9", + "semver": "^6.3.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/node-exports-info/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/node-releases": { + "version": "2.0.53", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.53.tgz", + "integrity": "sha512-D9UOmYG3UH1V+ENW56t5QXBwJw1YEY18ruVeus89Rw+SyIgjPkCO84bRzO3uNIYosJbNwiabWVn48o3uJLjxFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", + "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.entries": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz", + "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", + "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.values": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", + "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/own-keys": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.2.tgz", + "integrity": "sha512-19YVAg7T+WTrxggPukVq7DjTv6+PJ867TmhCvBsYwmbFCsZd344rq2Ld1p0wo8f8Qrrhgp82c6FJRqdXWtSEhg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.4", + "get-intrinsic": "^1.3.0", + "object-keys": "^1.1.1", + "safe-push-apply": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "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": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/postcss": { + "version": "8.5.26", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz", + "integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==", + "dev": true, + "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.17", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-import": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", + "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-import/node_modules/resolve": { + "version": "1.22.12", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", + "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/postcss-js": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.1.0.tgz", + "integrity": "sha512-oIAOTqgIo7q2EOwbhb8UalYePMvYoIeRY2YKntdpFQXNosSu3vLrniGgmH9OKs/qAkfoj5oB3le/7mINW1LCfw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "camelcase-css": "^2.0.1" + }, + "engines": { + "node": "^12 || ^14 || >= 16" + }, + "peerDependencies": { + "postcss": "^8.4.21" + } + }, + "node_modules/postcss-load-config": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", + "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "lilconfig": "^3.1.1" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "jiti": ">=1.21.0", + "postcss": ">=8.0.9", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + }, + "postcss": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/postcss-nested": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz", + "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "postcss-selector-parser": "^6.1.1" + }, + "engines": { + "node": ">=12.0" + }, + "peerDependencies": { + "postcss": "^8.2.14" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.4.tgz", + "integrity": "sha512-bIoJLOmjCO1S9XdY/DcnR5hJxvrDir1PbGChrzXG3vw0/FOliy/fA3dmdhQ441kah4gKv+TwckGzex6wNS5cnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dev": true, + "license": "MIT", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/react": { + "version": "19.2.8", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.8.tgz", + "integrity": "sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.2.8", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.8.tgz", + "integrity": "sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.27.0" + }, + "peerDependencies": { + "react": "^19.2.8" + } + }, + "node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pify": "^2.3.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", + "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.1", + "which-builtin-type": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", + "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "set-function-name": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve": { + "version": "2.0.0-next.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.7.tgz", + "integrity": "sha512-tqt+NBWwyaMgw3zDsnygx4CByWjQEJHOPMdslYhppaQSJUtL/D4JO9CcBBlhPoI8lz9oJIDXkwXfhF4aWqP8xQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.16.2", + "node-exports-info": "^1.6.0", + "object-keys": "^1.1.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-array-concat": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.4.tgz", + "integrity": "sha512-wtZlHyOje6OZTGqAoaDKxFkgRtkF9CnHAVnCHKfuj200wAgL+bSJhdsCD2l0Qx/2ekEXjPWcyKkfGb5CPboslg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.9", + "call-bound": "^1.0.4", + "get-intrinsic": "^1.3.0", + "has-symbols": "^1.1.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-push-apply": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", + "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/scheduler": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "devOptional": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", + "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/sharp": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz", + "integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==", + "hasInstallScript": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "color": "^4.2.3", + "detect-libc": "^2.0.3", + "semver": "^7.6.3" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "0.33.5", + "@img/sharp-darwin-x64": "0.33.5", + "@img/sharp-libvips-darwin-arm64": "1.0.4", + "@img/sharp-libvips-darwin-x64": "1.0.4", + "@img/sharp-libvips-linux-arm": "1.0.5", + "@img/sharp-libvips-linux-arm64": "1.0.4", + "@img/sharp-libvips-linux-s390x": "1.0.4", + "@img/sharp-libvips-linux-x64": "1.0.4", + "@img/sharp-libvips-linuxmusl-arm64": "1.0.4", + "@img/sharp-libvips-linuxmusl-x64": "1.0.4", + "@img/sharp-linux-arm": "0.33.5", + "@img/sharp-linux-arm64": "0.33.5", + "@img/sharp-linux-s390x": "0.33.5", + "@img/sharp-linux-x64": "0.33.5", + "@img/sharp-linuxmusl-arm64": "0.33.5", + "@img/sharp-linuxmusl-x64": "0.33.5", + "@img/sharp-wasm32": "0.33.5", + "@img/sharp-win32-ia32": "0.33.5", + "@img/sharp-win32-x64": "0.33.5" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz", + "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.4", + "side-channel-list": "^1.0.1", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz", + "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/simple-swizzle": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.4.tgz", + "integrity": "sha512-nAu1WFPQSMNr2Zn9PGSZK9AGn4t/y97lEm+MXTtUDwfP0ksAIX4nO+6ruD9Jwut4C49SB1Ws+fbXsm/yScWOHw==", + "license": "MIT", + "optional": true, + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stable-hash": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.5.tgz", + "integrity": "sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==", + "dev": true, + "license": "MIT" + }, + "node_modules/stop-iteration-iterator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", + "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "internal-slot": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/string.prototype.includes": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.1.tgz", + "integrity": "sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/string.prototype.matchall": { + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz", + "integrity": "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.6", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.6", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "internal-slot": "^1.1.0", + "regexp.prototype.flags": "^1.5.3", + "set-function-name": "^2.0.2", + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.repeat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz", + "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.11.tgz", + "integrity": "sha512-PwvK7BU+CMTJGYQCTZb5RWXIML92lftJLhQz1tBzgKiqGxJaMlBAa48POXaNAC2s4y8jr3EFqrkF9+44neS46w==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.9", + "call-bound": "^1.0.4", + "define-data-property": "^1.1.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.24.2", + "es-object-atoms": "^1.1.2", + "has-property-descriptors": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.10.tgz", + "integrity": "sha512-2+3aDAOmPTmuFwjDnmJG2ctEkQKVki7vOSqaxkv42Mowj1V6PnvuwFCRrR5lChUux1TBskPjfkeTOhqczDMxTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.9", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/styled-jsx": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.6.tgz", + "integrity": "sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==", + "license": "MIT", + "dependencies": { + "client-only": "0.0.1" + }, + "engines": { + "node": ">= 12.0.0" + }, + "peerDependencies": { + "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/sucrase": { + "version": "3.35.1", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz", + "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "tinyglobby": "^0.2.11", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tailwindcss": { + "version": "3.4.19", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.19.tgz", + "integrity": "sha512-3ofp+LL8E+pK/JuPLPggVAIaEuhvIz4qNcf3nA1Xn2o/7fb7s/TYpHhwGDv1ZU3PkBluUVaF8PyCHcm48cKLWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@alloc/quick-lru": "^5.2.0", + "arg": "^5.0.2", + "chokidar": "^3.6.0", + "didyoumean": "^1.2.2", + "dlv": "^1.1.3", + "fast-glob": "^3.3.2", + "glob-parent": "^6.0.2", + "is-glob": "^4.0.3", + "jiti": "^1.21.7", + "lilconfig": "^3.1.3", + "micromatch": "^4.0.8", + "normalize-path": "^3.0.0", + "object-hash": "^3.0.0", + "picocolors": "^1.1.1", + "postcss": "^8.4.47", + "postcss-import": "^15.1.0", + "postcss-js": "^4.0.1", + "postcss-load-config": "^4.0.2 || ^5.0 || ^6.0", + "postcss-nested": "^6.2.0", + "postcss-selector-parser": "^6.1.2", + "resolve": "^1.22.8", + "sucrase": "^3.35.0" + }, + "bin": { + "tailwind": "lib/cli.js", + "tailwindcss": "lib/cli.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tailwindcss/node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/tailwindcss/node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/tailwindcss/node_modules/resolve": { + "version": "1.22.12", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", + "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "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/tinyglobby/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/tinyglobby/node_modules/picomatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", + "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/tsconfig-paths": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", + "license": "0BSD" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", + "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "for-each": "^0.3.3", + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", + "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "for-each": "^0.3.3", + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.15", + "reflect.getprototypeof": "^1.0.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.8.tgz", + "integrity": "sha512-phPGCwqr2+Qo0fwniCE8e4pKnGu/yFb5nD5Y8bf0EEeiI5GklnACYA9GFy/DrAeRrKHXvHn+1SUsOWgJp6RO+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.9", + "for-each": "^0.3.5", + "gopd": "^1.2.0", + "is-typed-array": "^1.1.15", + "possible-typed-array-names": "^1.1.0", + "reflect.getprototypeof": "^1.0.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/unbox-primitive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", + "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-bigints": "^1.0.2", + "has-symbols": "^1.1.0", + "which-boxed-primitive": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/unrs-resolver": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.12.2.tgz", + "integrity": "sha512-dmlRxBJJayXjqTwC+JtF1HhJmgf3ftQ3YejFcZrf4+KKtJv0qDsK1pjqaaVjG7wJ5NJ6UVP1OqRMQ71Z4C3rxQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "napi-postinstall": "^0.3.4" + }, + "funding": { + "url": "https://opencollective.com/unrs-resolver" + }, + "optionalDependencies": { + "@unrs/resolver-binding-android-arm-eabi": "1.12.2", + "@unrs/resolver-binding-android-arm64": "1.12.2", + "@unrs/resolver-binding-darwin-arm64": "1.12.2", + "@unrs/resolver-binding-darwin-x64": "1.12.2", + "@unrs/resolver-binding-freebsd-x64": "1.12.2", + "@unrs/resolver-binding-linux-arm-gnueabihf": "1.12.2", + "@unrs/resolver-binding-linux-arm-musleabihf": "1.12.2", + "@unrs/resolver-binding-linux-arm64-gnu": "1.12.2", + "@unrs/resolver-binding-linux-arm64-musl": "1.12.2", + "@unrs/resolver-binding-linux-loong64-gnu": "1.12.2", + "@unrs/resolver-binding-linux-loong64-musl": "1.12.2", + "@unrs/resolver-binding-linux-ppc64-gnu": "1.12.2", + "@unrs/resolver-binding-linux-riscv64-gnu": "1.12.2", + "@unrs/resolver-binding-linux-riscv64-musl": "1.12.2", + "@unrs/resolver-binding-linux-s390x-gnu": "1.12.2", + "@unrs/resolver-binding-linux-x64-gnu": "1.12.2", + "@unrs/resolver-binding-linux-x64-musl": "1.12.2", + "@unrs/resolver-binding-openharmony-arm64": "1.12.2", + "@unrs/resolver-binding-wasm32-wasi": "1.12.2", + "@unrs/resolver-binding-win32-arm64-msvc": "1.12.2", + "@unrs/resolver-binding-win32-ia32-msvc": "1.12.2", + "@unrs/resolver-binding-win32-x64-msvc": "1.12.2" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.0.tgz", + "integrity": "sha512-x/M6q3w4Ybp91CNaS4S69UnliqR3BzRpOT6LWbksjth0S/+jhfaPJsWjt/TewpT8j9eLIojUf5jr29WextHroA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-bigint": "^1.1.0", + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", + "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", + "is-async-function": "^2.0.0", + "is-date-object": "^1.1.0", + "is-finalizationregistry": "^1.1.0", + "is-generator-function": "^1.0.10", + "is-regex": "^1.2.1", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.1.0", + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-collection": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.22", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.22.tgz", + "integrity": "sha512-fvO4ExWMFsqyhG3AiPAObMuY1lxaqgYcxbc49CNdWDDECOJNgQyvsOWVwbZc+qf3rzRtxojBK+CMEv0Ld5CYpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.9", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zrender": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.6.1.tgz", + "integrity": "sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==", + "license": "BSD-3-Clause", + "dependencies": { + "tslib": "2.3.0" + } + } + } +} diff --git a/frontend/package.json b/frontend/package.json index 713bafd..8ac3c7d 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,29 +1,29 @@ -{ - "name": "douyin-live-monitor", - "version": "0.1.0", - "private": true, - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start", - "lint": "next lint" - }, - "dependencies": { - "echarts": "^5.5.1", - "lucide-react": "^0.468.0", - "next": "15.1.0", - "react": "^19.0.0", - "react-dom": "^19.0.0" - }, - "devDependencies": { - "@types/node": "^20", - "@types/react": "^19", - "@types/react-dom": "^19", - "autoprefixer": "^10.4.20", - "eslint": "^9", - "eslint-config-next": "15.1.0", - "postcss": "^8.4.49", - "tailwindcss": "^3.4.17", - "typescript": "^5" - } -} +{ + "name": "douyin-live-monitor", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "echarts": "^5.5.1", + "lucide-react": "^0.468.0", + "next": "15.1.11", + "react": "^19.0.0", + "react-dom": "^19.0.0" + }, + "devDependencies": { + "@types/node": "^20", + "@types/react": "^19", + "@types/react-dom": "^19", + "autoprefixer": "^10.4.20", + "eslint": "^9", + "eslint-config-next": "15.1.11", + "postcss": "^8.4.49", + "tailwindcss": "^3.4.17", + "typescript": "^5" + } +} diff --git a/frontend/src/app/network/page.tsx b/frontend/src/app/network/page.tsx index 83e7cf5..afce948 100644 --- a/frontend/src/app/network/page.tsx +++ b/frontend/src/app/network/page.tsx @@ -1,1245 +1,1279 @@ -"use client"; - -import { useCallback, useEffect, useState, type ChangeEvent } from "react"; -import { Loader2, RefreshCw } from "lucide-react"; - -import { Shell } from "@/components/Shell"; -import { useToast } from "@/components/Toast"; -import { fetchJson } from "@/lib/api"; - -type SocksProfile = { - id: string; - label?: string; - type?: string; - server?: string; - port?: number; - username?: string; - password?: string; -}; - -type ScFile = { path: string; size: number }; -type ScRoot = { root_id: string; label: string; file_count: number; files?: ScFile[] }; - -type EgressPayload = { - mode?: string; - chain_residential?: boolean; - modes?: Array<{ id: string; label: string; description?: string; ready?: boolean }>; - cover?: { neko?: boolean; relay?: boolean; uploads?: boolean }; - host_proxy?: string; - neko_proxy?: string; - exit_node?: string; - dialer?: string; - matrix?: Array<{ id: string; label: string; active?: boolean; detail?: string }>; - proxychains?: { installed?: boolean; relay_active?: boolean; bin?: string }; - shellcrash?: { running?: boolean; mixed_port?: string; selected_node?: string | null }; - hints?: string[]; -}; - -type NetworkPayload = { - path_roles?: { - app_https?: { primary?: string; detail?: string }; - ops_ssh?: { primary?: string; auxiliary?: string; detail?: string }; - }; - egress?: EgressPayload; - wireguard?: { - active?: boolean; - handshake_fresh?: boolean; - handshake_age_sec?: number | null; - peer_ping?: { ok?: boolean; rtt?: string }; - unit_wg_dy?: string; - watch?: { unit?: string }; - primary?: { - name?: string; - listening_port?: number; - peers?: Array<{ - endpoint?: string; - allowed_ips?: string; - latest_handshake?: string; - transfer?: string; - }>; - systemd?: { active?: string; enabled?: string }; - }; - system_configs?: Array<{ name?: string; source?: string; active?: boolean; role?: string }>; - repo_configs?: Array<{ name?: string; source?: string; active?: boolean; role?: string }>; - recommendations?: string[]; - active_config_name?: string; - }; - frp?: { - role?: string; - purpose?: string; - unit?: { name?: string; state?: string } | null; - processes?: string[]; - detail?: string; - }; - shellcrash?: { - installed?: boolean; - available?: boolean; - running?: boolean; - status?: string; - label?: string; - description?: string; - detail?: string; - mixed_port?: string; - selected_node?: string | null; - default_node?: string; - default_profile?: string; - roots?: ScRoot[]; - }; - socks?: { - enabled?: boolean; - active_profile_id?: string; - profiles?: SocksProfile[]; - singbox_running?: boolean; - local_mixed?: string; - }; -}; - -function statusText(s?: string, running?: boolean, installed?: boolean) { - if (running) return "在线"; - if (s === "configured" || installed) return "已停止"; - if (s === "missing") return "未安装"; - return s || "未知"; -} - -function formatBytes(n: number) { - if (n < 1024) return `${n} B`; - if (n < 1024 * 1024) return `${(n / 1024).toFixed(1)} KB`; - return `${(n / 1024 / 1024).toFixed(1)} MB`; -} - -export default function NetworkPage() { - const toast = useToast(); - const [data, setData] = useState(null); - const [loading, setLoading] = useState(true); - const [busy, setBusy] = useState(""); - const [socksEnabled, setSocksEnabled] = useState(false); - const [profiles, setProfiles] = useState([]); - const [activeId, setActiveId] = useState(""); - const [wgName, setWgName] = useState("wg-dy"); - const [wgContent, setWgContent] = useState(""); - const [routeMode, setRouteMode] = useState<"overlay" | "preserve">("overlay"); - const [wgEditing, setWgEditing] = useState(true); - - // ShellCrash editor (SH2) - const [rootId, setRootId] = useState("shellcrash-yamls"); - const [files, setFiles] = useState([]); - const [filePath, setFilePath] = useState(""); - const [fileContent, setFileContent] = useState(""); - const [fileImportKey, setFileImportKey] = useState(0); - const [egressMode, setEgressMode] = useState<"off" | "shellcrash">("off"); - const [chainResidential, setChainResidential] = useState(false); - const [coverNeko, setCoverNeko] = useState(true); - const [coverRelay, setCoverRelay] = useState(true); - const [coverUploads, setCoverUploads] = useState(true); - const [probes, setProbes] = useState>([]); - - const sc = data?.shellcrash; - const eg = data?.egress; - const defaultNode = sc?.default_node || "1d2da142-singbox_hysteria5"; - const defaultProfile = sc?.default_profile || "config.yaml"; - - const loadFiles = useCallback( - async (rid = rootId) => { - const r = (await fetchJson(`/api/network/shellcrash/files?root=${encodeURIComponent(rid)}`)) as { - files?: ScFile[]; - }; - setFiles(r.files || []); - }, - [rootId], - ); - - const openFile = useCallback(async (rid: string, path: string) => { - setRootId(rid); - setFilePath(path); - const r = (await fetchJson( - `/api/network/shellcrash/file?root=${encodeURIComponent(rid)}&path=${encodeURIComponent(path)}`, - )) as { content?: string }; - setFileContent(String(r.content || "")); - if (rid !== rootId) { - const list = (await fetchJson(`/api/network/shellcrash/files?root=${encodeURIComponent(rid)}`)) as { - files?: ScFile[]; - }; - setFiles(list.files || []); - } - }, [rootId]); - - const load = useCallback(async () => { - setLoading(true); - try { - const r = (await fetchJson("/api/network")) as NetworkPayload; - setData(r); - setSocksEnabled(Boolean(r.socks?.enabled)); - const list = Array.isArray(r.socks?.profiles) ? [...(r.socks!.profiles as SocksProfile[])] : []; - setProfiles(list); - setActiveId(String(r.socks?.active_profile_id || list[0]?.id || "")); - const primaryName = String(r.wireguard?.active_config_name || r.wireguard?.primary?.name || "wg-dy"); - setWgName(primaryName); - try { - const cfg = (await fetchJson(`/api/network/wireguard/config/${encodeURIComponent(primaryName)}`)) as { - content?: string; - name?: string; - }; - setWgName(String(cfg.name || primaryName)); - setWgContent(String(cfg.content || "")); - } catch { - /* editor stays empty if unreadable */ - } - const mode = String(r.egress?.mode || "off"); - setEgressMode(mode === "shellcrash" ? "shellcrash" : "off"); - setChainResidential(Boolean(r.egress?.chain_residential)); - setCoverNeko(r.egress?.cover?.neko !== false); - setCoverRelay(Boolean(r.egress?.cover?.relay)); - setCoverUploads(r.egress?.cover?.uploads !== false); - await loadFiles(rootId); - } catch (e) { - toast.push((e as Error).message, "err"); - } finally { - setLoading(false); - } - }, [toast, loadFiles, rootId]); - - useEffect(() => { - void load(); - }, [load]); - - useEffect(() => { - if (!filePath && files.length) { - const prefer = files.find((f) => f.path === "config.yaml") || files[0]; - if (prefer) void openFile(rootId, prefer.path); - } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [files]); - - const selected = profiles.find((p) => String(p.id) === String(activeId)) || profiles[0]; - const lineOk = Boolean(data?.wireguard?.active && data?.wireguard?.handshake_fresh !== false); - const frpOk = data?.frp?.unit?.state === "active"; - - async function applyEgress() { - setBusy("egress:apply"); - try { - await fetchJson("/api/network/egress", { - method: "PATCH", - body: JSON.stringify({ - mode: egressMode, - chain_residential: chainResidential, - cover: { neko: coverNeko, relay: coverRelay, uploads: coverUploads }, - refresh_neko: true, - }), - }); - toast.push( - egressMode === "off" - ? "已切回直连" - : chainResidential - ? "已启用 ShellCrash + 住宅链式落地" - : "已启用 ShellCrash 机场线路", - "ok", - ); - await load(); - } catch (e) { - toast.push((e as Error).message, "err"); - } finally { - setBusy(""); - } - } - - async function probeEgress() { - setBusy("egress:probe"); - try { - const r = (await fetchJson("/api/network/egress/probe", { method: "POST", body: "{}" })) as { - probes?: typeof probes; - }; - setProbes(r.probes || []); - const ok = (r.probes || []).some((p) => p.target === "google" && p.ok); - toast.push(ok ? "出海探测成功" : "探测未通,检查 ShellCrash / SOCKS", ok ? "ok" : "err"); - } catch (e) { - toast.push((e as Error).message, "err"); - } finally { - setBusy(""); - } - } - - async function scService(action: "start" | "stop" | "restart") { - setBusy(`sc:${action}`); - try { - await fetchJson(`/api/network/shellcrash/${action}`, { method: "POST", body: "{}" }); - toast.push(action === "start" ? "已启动" : action === "stop" ? "已停止" : "已重启", "ok"); - await load(); - } catch (e) { - toast.push((e as Error).message, "err"); - } finally { - setBusy(""); - } - } - - async function applyProfile(path?: string) { - setBusy("sc:apply"); - try { - if (path && rootId === "shellcrash-yamls" && filePath === path && fileContent) { - await fetchJson("/api/network/shellcrash/file", { - method: "PUT", - body: JSON.stringify({ root: rootId, path, content: fileContent }), - }); - } - const r = (await fetchJson("/api/network/shellcrash/apply_profile", { - method: "POST", - body: JSON.stringify({ path: path || defaultProfile, target_node: defaultNode }), - })) as { message?: string; selected?: string }; - toast.push(`${r.message || "配置已应用"}${r.selected ? ` · ${r.selected}` : ""}`, "ok"); - await load(); - await openFile("shellcrash-yamls", "config.yaml"); - } catch (e) { - toast.push((e as Error).message, "err"); - } finally { - setBusy(""); - } - } - - async function openWebPanel() { - setBusy("sc:web"); - try { - const r = (await fetchJson("/api/network/shellcrash/web_panel", { method: "POST" })) as { - url?: string; - message?: string; - }; - toast.push(r.message || "web 面板已就绪", "ok"); - if (r.url) window.open(r.url, "_blank", "noopener,noreferrer"); - await load(); - } catch (e) { - toast.push((e as Error).message, "err"); - } finally { - setBusy(""); - } - } - - async function saveFile() { - if (!filePath) return; - setBusy("file:save"); - try { - await fetchJson("/api/network/shellcrash/file", { - method: "PUT", - body: JSON.stringify({ root: rootId, path: filePath, content: fileContent }), - }); - toast.push("已保存", "ok"); - await loadFiles(); - } catch (e) { - toast.push((e as Error).message, "err"); - } finally { - setBusy(""); - } - } - - async function createFile() { - const name = window.prompt("新建文件名(相对路径)", "new.yaml"); - if (!name) return; - setBusy("file:new"); - try { - await fetchJson("/api/network/shellcrash/file", { - method: "PUT", - body: JSON.stringify({ root: rootId, path: name, content: "" }), - }); - await loadFiles(); - await openFile(rootId, name); - toast.push("已新建", "ok"); - } catch (e) { - toast.push((e as Error).message, "err"); - } finally { - setBusy(""); - } - } - - async function deleteFile() { - if (!filePath || !window.confirm(`删除 ${filePath}?`)) return; - setBusy("file:del"); - try { - await fetchJson( - `/api/network/shellcrash/file?root=${encodeURIComponent(rootId)}&path=${encodeURIComponent(filePath)}`, - { method: "DELETE" }, - ); - setFilePath(""); - setFileContent(""); - await loadFiles(); - toast.push("已删除", "ok"); - } catch (e) { - toast.push((e as Error).message, "err"); - } finally { - setBusy(""); - } - } - - async function importManagedFile(ev: ChangeEvent) { - const file = ev.target.files?.[0]; - if (!file) return; - setBusy("file:import"); - try { - const text = await file.text(); - await fetchJson("/api/network/shellcrash/file", { - method: "PUT", - body: JSON.stringify({ root: rootId, path: file.name, content: text }), - }); - await loadFiles(); - await openFile(rootId, file.name); - toast.push("已导入", "ok"); - } catch (e) { - toast.push((e as Error).message, "err"); - } finally { - setBusy(""); - setFileImportKey((k) => k + 1); - } - } - - async function saveSocks() { - setBusy("socks"); - try { - await fetchJson("/api/network/socks", { - method: "PATCH", - body: JSON.stringify({ enabled: socksEnabled, active_profile_id: activeId, profiles }), - }); - toast.push("已保存", "ok"); - await load(); - } catch (e) { - toast.push((e as Error).message, "err"); - } finally { - setBusy(""); - } - } - - async function wgAction(action: "start" | "stop" | "restart") { - setBusy(`wg:${action}`); - try { - await fetchJson(`/api/network/wireguard/${encodeURIComponent(wgName || "wg-dy")}/${action}`, { - method: "POST", - body: "{}", - }); - toast.push(action === "restart" ? "已重连" : action === "start" ? "已接通" : "已断开", "ok"); - await load(); - } catch (e) { - toast.push((e as Error).message, "err"); - } finally { - setBusy(""); - } - } - - async function deleteWgImport(name: string) { - if (!window.confirm(`删除导入配置 ${name}?(不影响正在运行的 wg-dy)`)) return; - setBusy("wg:del"); - try { - await fetchJson(`/api/network/wireguard/config/${encodeURIComponent(name)}`, { method: "DELETE" }); - toast.push("已删除导入配置", "ok"); - await load(); - } catch (e) { - toast.push((e as Error).message, "err"); - } finally { - setBusy(""); - } - } - - async function loadWgConfig(name: string) { - setBusy("wg:load"); - try { - const r = (await fetchJson(`/api/network/wireguard/config/${encodeURIComponent(name)}`)) as { - content?: string; - name?: string; - }; - setWgName(String(r.name || name)); - setWgContent(String(r.content || "")); - setWgEditing(true); - toast.push("已载入配置", "ok"); - } catch (e) { - toast.push((e as Error).message, "err"); - } finally { - setBusy(""); - } - } - - async function readWgFile(file?: File | null) { - if (!file) return; - const text = await file.text(); - setWgContent(text); - if (!wgName || wgName === "wg-dy") { - const base = file.name.replace(/\.(conf|txt)$/i, ""); - if (base) setWgName(base); - } - setWgEditing(true); - } - - async function wgSave(apply: boolean) { - if (!wgContent.trim()) { - toast.push("请先粘贴或载入配置", "err"); - return; - } - setBusy(apply ? "wg:apply" : "wg:save"); - try { - await fetchJson(apply ? "/api/network/wireguard/apply" : "/api/network/wireguard/save", { - method: "POST", - body: JSON.stringify({ - name: wgName || "wg-dy", - content: wgContent, - route_mode: routeMode, - apply, - }), - }); - toast.push(apply ? "已应用" : "已保存", "ok"); - await load(); - } catch (e) { - toast.push((e as Error).message, "err"); - } finally { - setBusy(""); - } - } - - function updateSelected(patch: Partial) { - setProfiles((prev) => prev.map((p) => (String(p.id) === String(activeId) ? { ...p, ...patch } : p))); - } - - const btn = "rounded-lg px-3 py-1.5 text-sm text-white disabled:opacity-40"; - const btnGhost = "rounded-lg border border-white/10 bg-white/5 px-3 py-1.5 text-sm hover:bg-white/10 disabled:opacity-40"; - const input = "mt-1 w-full rounded-lg border border-white/10 bg-slate-950 px-3 py-2 text-sm text-white"; - - return ( - -
-
-
-

网络

-

业务出海 · ShellCrash · SOCKS · WireGuard · FRP

-
- -
- - {loading && !data ? ( -
- -
- ) : ( - <> - {/* ===== 业务出海 ===== */} -
-
-
-

业务出海

-

- 统一走 ShellCrash(:7890)。硬规则:*.douyin.com 必须直连 - ;YouTube 出海。家宽不能直连海外住宅 SOCKS——勾选「住宅落地」= dialer-proxy 链式。 -

-
-
- - -
-
- -
- {( - [ - { - id: "off" as const, - title: "直连", - desc: "不经 ShellCrash,国内机器上 YouTube 通常不可用", - }, - { - id: "shellcrash" as const, - title: "ShellCrash", - desc: "推荐 · Neko / 推流 / 上传全部进 :7890,由规则分流", - ready: Boolean(eg?.shellcrash?.running || sc?.running), - }, - ] as const - ).map((m) => { - const active = egressMode === m.id; - return ( - - ); - })} -
- -
- - {eg?.exit_node ? ( -

当前出口节点:{eg.exit_node}

- ) : null} -
- -
- - - -
- -
- {(eg?.matrix || [ - { id: "neko", label: "Neko Chrome", active: false, detail: "—" }, - { id: "relay", label: "直播推流", active: false, detail: "—" }, - { id: "uploads", label: "上传", active: false, detail: "—" }, - ]).map((row) => ( -
-
-

{row.label}

- - {row.active ? "走代理" : "直连"} - -
-

- {row.detail || "—"} -

-
- ))} -
- - {(eg?.hints || []).length ? ( -
    - {(eg?.hints || []).map((h) => ( -
  • · {h}
  • - ))} -
- ) : null} - - {probes.length ? ( -
- {probes.map((p) => ( -
-
- {p.target} - {p.ok ? "OK" : "FAIL"} -
-

- {p.http_code} · {p.elapsed_ms}ms · {p.via === "direct" || !p.via ? "直连" : "代理"} -

-
- ))} -
- ) : null} -
- - {/* ===== ShellCrash (SH2 layout) ===== */} -
-
-

ShellCrash

-

直接做 YAML / CFG 编辑与服务控制,不用命令行菜单。

- -
-
-
-

{sc?.label || "ShellCrash"}

-

{sc?.description || "代理上网 / 规则分流"}

-
- - {statusText(sc?.status, sc?.running, sc?.installed)} - -
-

{sc?.detail || "—"}

-
- - - - - -
-
- -
-

默认代理节点

-

{defaultNode}

-

应用后会写入 config.yaml、重启 ShellCrash,并把选择组切到此节点。

-
- -
-

快捷文件

-
- {[defaultProfile, "config.yaml", "ShellCrash.cfg", "command.env"].map((name) => { - const rid = name.endsWith(".yaml") || name.endsWith(".yml") ? "shellcrash-yamls" : "shellcrash-configs"; - return ( - - ); - })} -
-
-
- -
-
-
-

ShellCrash 文件编辑器

-

查看 / 修改 / 新建 / 删除,路径限制在托管目录内。

-
-
- - - -
-
- -
-
- -
- - -
-
- {files.map((item) => ( - - ))} - {files.length === 0 ?

目录为空

: null} -
-
-
-
- {filePath ? `${rootId} / ${filePath}` : "请选择文件"} -
-