Peach: Local-first video metadata scraper and media manager.
feat(review): 复核页按批次预览并撤回核查结算的自动写入
longmeidaoe92ba380565b
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 4320837a4..197cdc572 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -37,7 +37,7 @@ Removed / Fixed / Security。- **播放**:小窗和沉浸模式的进度条也显示当前指向时刻的画面和时间,和详情页播放器一致。手机上按住进度条拖动或在沉浸模式里横划时同样显示。- **播放**:从详情用 mpv、VLC(Windows)或 IINA、mpv(macOS)打开作品后,Peach 会记下这次观看:起播计一次播放,观看时长、拖动次数和离开位置写进与网页播放器相同的记录,放完记为看完。播放器异常退出或连不上时只是不记,不会弹出提示。PotPlayer 和系统默认播放器仍只负责打开文件。- **账本**:「应用与维护」新增「账本备份」:可以立即备份账本,也可以从列表里的一份备份恢复。列表写明每份备份的时间、来源(手动或写入前自动)和大小;恢复只在写入端执行,会先检查备份并把当前账本另存一份,被中断后下次启动时自动收拾到完整的账本。-- **复核**:有 NFO 或升级后重新核对资料的影片,在线来源与现有资料的差异不再一律交人复核。只差写法、打码或店铺装饰的,和只有社区站有异议的,保留现有资料;来源多给的标签自动补上,一个不删;官方来源一致的标题与发行日期直接更新。厂牌、系列、出演者的官方异议,以及 NFO 与官方来源对不上的,仍留在复核页。升级后对已有的这批差异自动整理一次,自动写入的可用 `revert_auto_landing.py` 按规则名整批撤回。+- **复核**:有 NFO 或升级后重新核对资料的影片,在线来源与现有资料的差异不再一律交人复核。只差写法、打码或店铺装饰的,和只有社区站有异议的,保留现有资料;来源多给的标签自动补上,一个不删;官方来源一致的标题与发行日期直接更新。厂牌、系列、出演者的官方异议,以及 NFO 与官方来源对不上的,仍留在复核页。升级后对已有的这批差异自动整理一次。自动写入的标题、日期与标签列在复核页「元数据字段」下的「自动写入的资料」里,勾选批次后先预览会改回哪些值、删掉哪些标签,确认后整批撤回;写入后又被修改过的作品保留现值,撤回前自动备份账本。- **采集**:随附用户脚本更新至 0.7.2。浮卡「其他任务」展开、折叠有高度过渡,进出番号的进度页沿用设置面板的进场动效。别的页面添加的任务结束后一直留在列表里,直到点行尾的关闭键、进度页的「标为已读」或列表底部的「全部标为已读」;没有进行中的任务时,收成图标的角标显示未读的已结束数量。列表底部的「重试失败项」按失败原因逐项重试:整理失败的重试整理,磁力失效的换一个磁力,其余从原网页重新加入。Peach 自动重新提交的云下载显示「等待自动重新提交」。更新脚本并刷新来源页面后生效。### 修复diff --git a/docs/ROUTES.md b/docs/ROUTES.mdindex e6151a430..ea09c3c49 100644--- a/docs/ROUTES.md+++ b/docs/ROUTES.md@@ -100,7 +100,7 @@| `/tasks` | 任务中心与云下载进度 || `/stats` | 统计 || `/taste` | 口味分析 |-| `/review` | 人工复核 |+| `/review` | 人工复核;元数据字段下列出核查结算自动写入的批次,可预览后整批撤回 || `/data-cleanup` | 数据管理概览;日常扫描、待处理摘要、维护与清理入口 || `/data-cleanup/organize` | 文件整理与批次历史 || `/data-cleanup/resource-sync` | 核对文件与馆藏记录,清理失效条目、空目录与缓存 |@@ -116,6 +116,8 @@用户脚本通过专用令牌调用 `POST /api/jav-browser/errors`,仅接收白名单错误字段并写入本机日志;批次、体积、限频与诊断包范围见 [浏览器添加 JAV](JAV_BROWSER.md)。状态接口 `GET /api/jav-browser` 同时投影真实下载与整理进度,`GET /api/jav-browser/active` 以同一结构列出进行中与最近结束的任务,均不授予配置、账号或账本写入权限。`POST /api/jav-browser/postprocess` 只能重试该番号已失败的整理,走任务中心同一入口。`POST /api/jav-browser/dismiss` 只记下脚本确认过哪些已结束的任务,不改任务与账本。+`GET /api/review/auto-landings` 列出 ADR-0139 两条规则仍在的自动写入批次;带 `batches=<批次号>,…` 时只读返回这几批要改回的值、要删的标签、写入后被改过或已删除而不动的作品,以及计划摘要 `token`。`POST /api/review/auto-landings/revert` 接收 `batches` 与 `token`,在写锁里重算计划,对不上返回 400 要求重新预览;对上后先备份账本再撤回,回执带备份文件名与未改动的作品。批次号不属于这两条规则时拒绝,其余自动落库来源仍由 `scripts/revert_auto_landing.py` 撤回;只读端拒绝撤回(ADR-0140)。+`GET /api/client-updates` 要求应用鉴权,返回运行版本与构建标记、发行版检查结果、安装状态、用户脚本版本和自动补修状态,不触发外部检查。`GET /api/jav-browser/updates` 使用用户脚本专用令牌,无需番号,返回运行与发行版、脚本版本快照,不暴露补修明细。`POST /api/configuration/upgrade-repairs/retry` 限本机同源请求,重试失败项;`GET /api/configuration/upgrade-repairs/review` 限本机管理权限,下载 JSON 复核记录,无记录时返回 404。`GET /api/configuration/cloud-proxies` 返回已添加媒体库对应的 CloudDrive 账号及 API/数据代理、未匹配媒体库和账号修订号,不回显代理密码;尚未填写 CloudDrive2 地址时返回空列表与 `configured: false`。`POST` 接受账号 `id`、`revision` 和本次修改的 `api`/`data`,写回 CloudDrive 后返回该账号当前状态;配置冲突返回 409。这两条接口均限本机管理权限,写入还要求同源请求。diff --git a/docs/adr/0139-verification-differences-settle-by-rule.md b/docs/adr/0139-verification-differences-settle-by-rule.mdindex 3c8fc8c8e..f699d1867 100644--- a/docs/adr/0139-verification-differences-settle-by-rule.md+++ b/docs/adr/0139-verification-differences-settle-by-rule.md@@ -3,6 +3,7 @@- 状态:已采纳- 日期:2026-11-04- 关系:修订 [ADR-0108](0108-nfo-verification-and-reviewed-overwrites.md)「覆盖已有值必须复核」;ADR-0025 否决的归一化比对与来源优先级取舍只在本 ADR 划定的范围内放开;沿用 [ADR-0033](0033-online-sources-only-fill-empty-fields.md) 的社区来源只补空、[ADR-0038](0038-field-priority-chain-settles-dissent.md) 的字段优先级链与 [ADR-0052](0052-entity-results-land-when-evidence-is-sufficient.md) 的可撤回自动落库+- 补充:[ADR-0140](0140-review-page-reverts-settlement-batches.md) 让复核页按批次预览并撤回这两条规则的写入,覆盖改为一次结算一个批次号## 背景diff --git a/docs/adr/0140-review-page-reverts-settlement-batches.md b/docs/adr/0140-review-page-reverts-settlement-batches.mdnew file mode 100644index 000000000..0b5c59cd8--- /dev/null+++ b/docs/adr/0140-review-page-reverts-settlement-batches.md@@ -0,0 +1,43 @@+# ADR-0140:复核页按批次撤回核查结算的自动写入++- 状态:已采纳+- 日期:2026-11-04+- 关系:补充 [ADR-0139](0139-verification-differences-settle-by-rule.md) 的撤回入口;沿用 [ADR-0052](0052-entity-results-land-when-evidence-is-sufficient.md) 的「能按来源与批次整批撤回」、[ADR-0138](0138-user-triggered-ledger-backup-and-restore.md) 的账本备份++## 背景++ADR-0139 让核查差异按确定判据自动落库,撤回入口是 `scripts/revert_auto_landing.py --source <规则名> [--batch …]`。升级后结算一次存量,真实账本 2026-11-04 写下标签并集 829 行、官方覆盖 100 行。用户要撤回就得进终端、读懂规则名与批次号,再记得加 `--apply --backup`;单人自托管的普通用户不该为此进终端。++同一天的真实账本里,那 100 行覆盖分在 20 个批次里:覆盖的批次号取的是每个小事务的写入时刻(`rule@<now>`),一次结算跨了两分钟;并集一次运行只有一个批次号。++## 决策++**一、撤回逻辑只有一份。** 脚本里的计划与执行挪进 `peach.auto_landing_revert`:`plan` 只读,`apply` 在调用方的事务里写账本,`remove_files` 等提交后再删盘上文件。脚本只剩参数、打印与备份;复核页调用同一个 `plan` 与 `apply`,被人改过或已删除的资产照旧记在 `changed` 里不动。++**二、复核页只放行 ADR-0139 的两条规则。** 「元数据字段」分类下的「自动写入的资料」列出 `adr-0139-official-replaces-verified` 与 `adr-0139-verified-tags-union` 仍在的决定,按批次给出时间与影响面。两条规则只改账本、不删文件,决定里存着撤回要用的全部依据。别的自动落库来源(种子、别名、样张、无番号封面……)有的要删盘上文件、有的要按任务行认批次,仍只在脚本里撤。接口按批次号反查规则,查不到就拒绝。++**三、先预览,再按同一份计划写。** `GET /api/review/auto-landings?batches=…` 返回逐条要改回的值、要删的标签、不动的资产和计划摘要 `token`。`POST /api/review/auto-landings/revert` 在写锁(`BEGIN IMMEDIATE`)里重算计划,`token` 对不上就拒绝;对上了先经 `ledger_backups.create` 留一份 `ledger.pre-auto-landing-revert-<时间>.db`,再撤回。回执写出备份文件名与被跳过的作品,作品可以点开核对。++并集决定按决定撤:一条决定之后又补过一次时带着两个批次,选中其中一个也会删掉另一个批次补的标签。预览单独写出连带的批次数,不让确认的数字与实际删除的对不上。++**四、一次结算一个批次号。** 覆盖的批次号改用与并集同一个运行时刻(`<规则名>@<本机时间>`),此后一次结算在列表里是两行。2026-11-04 已写下的 20 个覆盖批次保持原样,按批次号里的 UTC 时刻显示;要整次撤回就在列表里全选。++## 理由++- 撤回是 ADR-0052 落库的前提。入口只在终端时,「能撤回」对普通用户只是纸面上成立。+- 一份实现让网页与脚本的判据不会分叉:人工字段的保护、被改过就不动、决定一并删除,都只在一处。+- 写锁里重算加 `token`,确认弹层里看到的就是将要写的;中间又有一轮结算或人工修改时,提示重新预览而不是悄悄多撤或少撤。+- 白名单而不是全部来源:页面上看不到、预览也列不出的来源,不该经网页触发删除文件。++## 被否决的方案++- **网页列出全部自动落库来源。** 每种来源的批次存在不同的表和边车里,有的撤回要删盘上文件或重建旧行;逐一做成可预览的列表远超这次的需要,脚本仍覆盖它们。+- **按规则整条撤回、不分批次。** 判据改错往往只影响某一次运行;列出批次也让人看得出是哪一次写的。全选仍能整条撤回。+- **把存量的 20 个覆盖批次合并成一批。** 要改写决定里的批次号,撤回依据随之变化,换来的只是列表短一些。++## 后果++- 复核页「元数据字段」在有自动写入时多一张批次表;只读端可以浏览,撤回按钮不可用。+- 「账本备份」列表里多一种用途「撤回自动写入前」,按同一套保留规则清退。+- 撤回后决定被删,下一轮资料处理仍按同一判据判断,可能再次写入;改判据仍要先于撤回,弹层里写明这一点。+- `scripts/revert_auto_landing.py` 的参数与输出不变。diff --git a/frontend/src/react/review/auto-landings-card.tsx b/frontend/src/react/review/auto-landings-card.tsxnew file mode 100644index 000000000..a370be2cf--- /dev/null+++ b/frontend/src/react/review/auto-landings-card.tsx@@ -0,0 +1,98 @@+/* 复核页元数据分类下的「自动写入的资料」(ADR-0140)。+ *+ * 资料处理按确定判据自动写下的标题、发行日期与标签,按批次列出。勾选批次后先读一次撤回预览,+ * 弹层里逐条列出会改回的值、会删的标签和之后被人改过、不动的作品,确认后才写账本。撤回的回执+ * 留在表上方,被跳过的作品可以点开核对。没有批次也没有回执时整块不出现。 */+import { useState } from 'react';+import { useMutation, useQuery } from '@tanstack/react-query';+import { confirmModal } from '@peach/legacy/ui';++import { Button } from '@/components/base/buttons/button';+import { LinkButton } from '@/components/base/buttons/link-button';+import { errorMessage } from '../../api';+import { DataTable, type DataColumn } from '../components/data-table';+import { Note } from '../components/note';+import { queryClient } from '../query';+import { busyProps } from '../settings/use-action';+import {+ AUTO_LANDINGS_KEY, batchTime, fetchAutoLandings, impactText, previewAutoLandings, previewBody, previewLines,+ resultText, revertAutoLandings, type AutoLandingBatch, type AutoLandingResult,+} from './auto-landings';+import { REVIEW_KEY } from './review';++const DESCRIPTION = '资料处理按确定判据自动写入的标题、发行日期与标签。撤回会把覆盖的值改回写入前、删掉补上的标签;写入后又被修改过的作品保留现值。';++export function AutoLandingsCard(+ { locked, openItem, toast }: { locked: boolean; openItem(id: number): void; toast(message: string): void },+) {+ const [selected, setSelected] = useState<string[]>([]);+ const [receipt, setReceipt] = useState<AutoLandingResult | null>(null);+ const query = useQuery({ queryKey: AUTO_LANDINGS_KEY, queryFn: ({ signal }) => fetchAutoLandings(signal) });+ const items = query.data?.items ?? [];+ const revert = useMutation({+ mutationFn: async (batches: string[]) => {+ const preview = await previewAutoLandings(batches);+ const { confirmed, result } = await confirmModal({+ title: '撤回自动写入', body: previewBody(preview), items: previewLines(preview),+ confirmLabel: '撤回', onConfirm: () => revertAutoLandings(preview.batches, preview.token),+ });+ return confirmed ? result as AutoLandingResult : null;+ },+ onSuccess: (result) => {+ if (!result) return;+ setReceipt(result);+ setSelected([]);+ toast(resultText(result));+ void queryClient.invalidateQueries({ queryKey: REVIEW_KEY });+ },+ onError: (error) => toast(errorMessage(error)),+ });+ if (!items.length && !receipt && !query.isError) return null;+ const columns: DataColumn<AutoLandingBatch>[] = [+ { id: 'rule', label: '规则', width: 360, min: 260, value: (item) => item.label, render: (item) => (+ <span className="flex min-w-0 flex-col gap-0.5">+ <span className="truncate text-body-regular text-text-primary">{item.label}</span>+ <small title={item.batch} className="truncate text-caption-1-regular text-text-secondary">{item.batch}</small>+ </span>+ ) },+ { id: 'at', label: '时间', width: 160, min: 136, value: (item) => item.at ?? 0,+ render: (item) => <span className="tabular-nums">{batchTime(item) || '未知'}</span> },+ { id: 'impact', label: '影响', width: 200, min: 160, value: (item) => item.items, render: (item) => impactText(item) },+ ];+ return (+ <section aria-labelledby="auto-landings-title" className="flex flex-col gap-4">+ {receipt ? (+ <Note tone="success" title={resultText(receipt)}>+ <p className="text-body-2-regular">{`撤回前的账本已备份为 ${receipt.backup}。`}</p>+ {receipt.changed.length ? (+ <p className="flex flex-wrap items-center gap-x-2 gap-y-1 text-body-2-regular">+ {`${receipt.changed.length} 部作品写入后又被修改或已删除,未改动:`}+ {receipt.changed.map((row) => row.gone ? (+ <span key={`${row.asset_id}:${row.field}`} className="text-text-secondary">{`#${row.asset_id}(已删除)`}</span>+ ) : (+ <LinkButton key={`${row.asset_id}:${row.field}`} size="small" onClick={() => openItem(row.asset_id)}>+ {row.code || row.name || `#${row.asset_id}`}+ </LinkButton>+ ))}+ </p>+ ) : null}+ </Note>+ ) : null}+ {query.isError ? (+ <Note tone="error" title="读取自动写入的资料失败">{errorMessage(query.error)}</Note>+ ) : items.length ? (+ <DataTable label="自动写入的批次" items={items} columns={columns}+ title="自动写入的资料" titleId="auto-landings-title" unit="批"+ description={DESCRIPTION}+ rowId={(item) => item.batch} rowLabel={(item) => `${item.label} ${batchTime(item)}`}+ selected={selected} onSelected={setSelected}+ actions={(chosen) => (+ <Button variant="secondary" size="small" disabled={locked || !chosen.length}+ {...busyProps(revert.isPending)} onClick={() => revert.mutate(chosen.map((item) => item.batch))}>+ {`撤回所选(${chosen.length})`}+ </Button>+ )} />+ ) : null}+ </section>+ );+}diff --git a/frontend/src/react/review/auto-landings.ts b/frontend/src/react/review/auto-landings.tsnew file mode 100644index 000000000..1e58b80c3--- /dev/null+++ b/frontend/src/react/review/auto-landings.ts@@ -0,0 +1,109 @@+/* 复核页「自动写入的资料」的数据契约(ADR-0140)。+ *+ * 一个读端点、一个写端点。列表是核查结算自动写下的批次;带 `batches` 读到的是这几批的撤回预览+ * 与 token。撤回把同一个 token 交回去,服务端在写锁里重算,对不上就拒绝。 */+import { apiGet, apiSend } from '../../api';+import { localTime } from '../time';++export const AUTO_LANDINGS_URL = '/api/review/auto-landings';+export const AUTO_LANDING_REVERT_URL = '/api/review/auto-landings/revert';+export const AUTO_LANDINGS_KEY = ['review', 'auto-landings'] as const;++export interface AutoLandingBatch {+ rule: string;+ /** 规则写给人看的名字。 */+ label: string;+ batch: string;+ /** 批次时刻,秒;读不出时为 null。 */+ at: number | null;+ /** 这批写下的决定条数,每条是一部作品的一格资料。 */+ items: number;+ /** 覆盖改过的作品数;并集为 0。 */+ assets: number;+ /** 并集补进、仍在账本里的标签数;覆盖为 0。 */+ tags: number;+}++interface AssetRef {+ asset_id: number; name: string; code: string;+ /** 作品已不在账本里。 */+ gone?: boolean;+}+export interface RestoreRow extends AssetRef { field: string; current: string; previous: string }+export interface ChangedRow extends AssetRef { field: string; written: string }+export interface TagRow extends AssetRef { tag: string; batch: string }++export interface AutoLandingPreview {+ batches: string[];+ token: string;+ decisions: number;+ restores: RestoreRow[];+ changed: ChangedRow[];+ tags: TagRow[];+ /** 并集决定按整条撤,连带的那几个没选中的批次。 */+ other_batches: string[];+}++export interface AutoLandingResult {+ ok: boolean;+ batches: string[];+ restored: number;+ removed_tags: number;+ decisions: number;+ changed: ChangedRow[];+ backup: string;+}++export const fetchAutoLandings = (signal?: AbortSignal) =>+ apiGet<{ items: AutoLandingBatch[] }>(AUTO_LANDINGS_URL, signal);++export const previewAutoLandings = (batches: string[]) =>+ apiGet<AutoLandingPreview>(`${AUTO_LANDINGS_URL}?batches=${encodeURIComponent(batches.join(','))}`);++/** 真实 ledger 写入:服务端先备份,再按预览的那份计划撤回。 */+export const revertAutoLandings = (batches: string[], token: string) =>+ apiSend<AutoLandingResult>(AUTO_LANDING_REVERT_URL, { batches, token });++export const batchTime = (item: AutoLandingBatch) =>+ item.at === null ? '' : localTime(new Date(item.at * 1000).toISOString());++export function impactText(item: AutoLandingBatch): string {+ return item.assets+ ? `${item.items} 项资料 · ${item.assets} 部作品`+ : `${item.items} 项资料 · ${item.tags} 个标签`;+}++const work = (row: AssetRef) => row.code || row.name || `#${row.asset_id}`;+const shown = (value: string) => (value ? `「${value}」` : '空');++/** 确认弹层里逐条列出的改动:改回的值、删掉的标签,最后是被人改过、不动的作品。 */+export function previewLines(preview: AutoLandingPreview): string[] {+ return [+ ...preview.restores.map((row) => `${work(row)} ${row.field}:${shown(row.current)} 改回 ${shown(row.previous)}`),+ ...preview.tags.map((row) => `${work(row)} 删除标签「${row.tag}」`),+ ...preview.changed.map((row) => row.gone+ ? `${work(row)} ${row.field}:作品已不在账本中,跳过`+ : `${work(row)} ${row.field}:之后已被修改,保留现值`),+ ];+}++export function previewBody(preview: AutoLandingPreview): string {+ const parts = [+ preview.restores.length ? `改回 ${preview.restores.length} 部作品的资料` : '',+ preview.tags.length ? `删除 ${preview.tags.length} 个自动补上的标签` : '',+ ].filter(Boolean);+ return [+ `将撤回 ${preview.batches.length} 批自动写入:${parts.join(',') || '没有要改的资料'}。`,+ preview.changed.length ? `${preview.changed.length} 部作品写入后又被修改或已删除,不改动。` : '',+ preview.other_batches.length ? `所选标签的补写记录还连带 ${preview.other_batches.length} 个其他批次,一并撤回。` : '',+ '撤回前会自动备份账本。下一轮资料处理仍按同一判据判断,可能再次写入。',+ ].filter(Boolean).join('');+}++export function resultText(result: AutoLandingResult): string {+ const parts = [+ result.restored ? `改回 ${result.restored} 部作品的资料` : '',+ result.removed_tags ? `删除 ${result.removed_tags} 个标签` : '',+ ].filter(Boolean);+ return `已撤回 ${result.batches.length} 批自动写入${parts.length ? `:${parts.join(',')}` : ''}`;+}diff --git a/frontend/src/react/review/review-page.tsx b/frontend/src/react/review/review-page.tsxindex 5bd5d1c6b..1f6465406 100644--- a/frontend/src/react/review/review-page.tsx+++ b/frontend/src/react/review/review-page.tsx@@ -23,6 +23,7 @@ import { Note } from '../components/note';import { Page } from '../components/page';import { PillAriaTabList } from '../components/pill-aria-tab-list';import { ExternalLink } from '../settings/section';+import { AutoLandingsCard } from './auto-landings-card';import { BulkToolbar } from './bulk-toolbar';import { GenreTagList } from './candidate-form';import { ReviewCard } from './review-card';@@ -383,6 +384,9 @@ export function ReviewPage(props: ReviewProps) {)}<Pagination page={win.page} pages={win.pages} onPage={setPage} />+ {metadata && queueView === 'pending'+ ? <AutoLandingsCard locked={locked} openItem={openItem} toast={toast} />+ : null}</TabPanel></Tabs></div>diff --git a/frontend/test/react/review.test.tsx b/frontend/test/react/review.test.tsxindex e0e01b07a..a20dd4cc6 100644--- a/frontend/test/react/review.test.tsx+++ b/frontend/test/react/review.test.tsx@@ -14,6 +14,7 @@ import {reviewWindow, type ReviewCandidate, type ReviewData, type ReviewRow,type DecisionResult,} from '../../src/react/review/review';+import { AUTO_LANDINGS_URL, type AutoLandingBatch } from '../../src/react/review/auto-landings';import { ReviewPage } from '../../src/react/review/review-page';import { actionOrder, choose, click, mountRoot, settle } from './render';@@ -58,6 +59,8 @@ interface Plan {data?: ReviewData;/** 判定的回答:给一串就按顺序一条一条回(最后一条之后一直回它)。 */decisions?: DecisionResult[];+ /** 「自动写入的资料」列出的批次;缺省没有,那一块不出现。 */+ autoLandings?: AutoLandingBatch[];}function serve(plan: Plan = {}) {@@ -67,6 +70,7 @@ function serve(plan: Plan = {}) {if (url === REVIEW_DECISION_URL) {return ok(decisions.length > 1 ? decisions.shift()! : decisions[0]!);}+ if (url.startsWith(AUTO_LANDINGS_URL)) return ok({ items: plan.autoLandings ?? [] });if (url.startsWith(REVIEW_URL)) return ok(plan.data ?? review());throw new Error(`没有安排这个端点:${url}`);});@@ -337,7 +341,9 @@ it('只读数据库上判定与批量都不给点', async () => {const { host, fetcher } = await open({ data: review({ mirror: { state: 'live' } }) },{ readOnly: true, writerUrl: 'https://writer.example/review' });- expect(fetcher.mock.calls.map(([url]) => String(url))).toEqual([REVIEW_URL]);+ // 只读:队列与自动写入批次各读一次,一个写请求都不发。+ expect(fetcher.mock.calls.map(([url]) => String(url)).sort()).toEqual([REVIEW_URL, AUTO_LANDINGS_URL]);+ expect(fetcher.mock.calls.every(([, init]) => !init?.method || init.method === 'GET')).toBe(true);expect(noteText(host).join()).toContain('正在显示写入端的实时复核队列');expect(host.querySelector('a[href="https://writer.example/review"]')).toBeTruthy();// 勾选与批量操作整条都不出现:没有可写的东西,工具条只是一排点不动的按钮。@@ -350,7 +356,9 @@ it('只读数据库上判定与批量都不给点', async () => {it('打开复核页只读队列,不再触发自动落库写操作', async () => {const { fetcher } = await open();- expect(fetcher.mock.calls.map(([url]) => String(url))).toEqual([REVIEW_URL]);+ // 读两样:复核队列与「自动写入的资料」的批次列表;都是 GET。+ expect(fetcher.mock.calls.map(([url]) => String(url)).sort()).toEqual([REVIEW_URL, AUTO_LANDINGS_URL]);+ expect(fetcher.mock.calls.every(([, init]) => !init?.method || init.method === 'GET')).toBe(true);});it('稍后处理切换独立队列,刷新地址可还原且恢复保持原排序', async () => {@@ -463,3 +471,23 @@ it('没有可采纳候选的卡仍可忽略或稍后处理,通过键不可用'expect([...footer.querySelectorAll('button')].map((button) => button.textContent?.trim())).toEqual(['忽略', '稍后处理', '不可通过']);});++const BATCHES: AutoLandingBatch[] = [+ { rule: 'adr-0139-official-replaces-verified', label: '官方来源覆盖标题与日期',+ batch: 'adr-0139-official-replaces-verified@20261104T141053', at: 1793772653, items: 4, assets: 3, tags: 0 },+ { rule: 'adr-0139-verified-tags-union', label: '补齐来源多给的标签',+ batch: 'auto:metadata-tags@20261104T141053', at: 1793772653, items: 2, assets: 0, tags: 5 },+];++it('元数据字段下列出自动写入的批次与影响面,只读端也能浏览', async () => {+ const { host } = await open({ autoLandings: BATCHES }, { readOnly: true });+ const section = host.querySelector('[aria-labelledby="auto-landings-title"]')!;+ expect(section.textContent).toContain('自动写入的资料');+ expect(section.textContent).toContain('4 项资料 · 3 部作品');+ expect(section.textContent).toContain('2 项资料 · 5 个标签');+});++it('没有自动写入的批次时不出现那一块', async () => {+ const { host } = await open();+ expect(host.querySelector('[aria-labelledby="auto-landings-title"]')).toBeNull();+});diff --git a/scripts/test_runner.py b/scripts/test_runner.pyindex 13893521f..89b075ad3 100644--- a/scripts/test_runner.py+++ b/scripts/test_runner.py@@ -260,6 +260,10 @@ AUTO_SCOPE_FILES: dict[str, tuple[str, ...]] = {# 失效标记由资料页、网页链接体检、维护脚本与种子导出共用。"src/peach/link_status.py": ("catalog", "metadata", "tooling", "web"),"scripts/revert_auto_landing.py": ("catalog", "metadata", "tooling"),+ # 撤回的实现与复核页入口(ADR-0140):脚本用例散在 catalog、metadata、tooling,网页用例在+ # `test_metadata_verification.py`,路由登记在 `test_rm_web.py`。+ "src/peach/auto_landing_revert.py": ("catalog", "metadata", "tooling"),+ "src/peach/web_auto_landings.py": ("catalog", "metadata", "web"),# 实体事实种子包(ADR-0073):导出导入的逻辑与命令行,测试都在 `test_seed_pack.py`;# 扫描结算后自动导入的后继(ADR-0075)在 `test_seed_followup.py`。"src/peach/seed_pack.py": ("metadata", "tooling"),diff --git a/src/peach/ledger_backups.py b/src/peach/ledger_backups.pyindex 98cc12c22..8d9691e51 100644--- a/src/peach/ledger_backups.py+++ b/src/peach/ledger_backups.py@@ -62,6 +62,7 @@ PURPOSE_LABELS = {MANUAL_PURPOSE: "手动备份", RESTORE_PURPOSE: "恢复前另存","migrate": "迁移前", "schema": "迁移前", "upgrade": "自动修复前","organize": "整理前", "download": "下载后整理前", "tag-management": "标签管理前",+ "auto-landing-revert": "撤回自动写入前",}ORGANIZE_DIRNAME = "organize-backups"diff --git a/src/peach/metadata_auto_apply.py b/src/peach/metadata_auto_apply.pyindex bbdf688f9..8f671cdaf 100644--- a/src/peach/metadata_auto_apply.py+++ b/src/peach/metadata_auto_apply.py@@ -2024,7 +2024,8 @@ def _land_verification(connection, item_key: str, prior: dict | None, row: dict,_write_auto_decision(connection, item_key, {"auto_applied": True, "rule": verified.rule,"candidate_key": candidate.get("candidate_key"), "source": source, "value": written,- "batch": f"{verified.rule}@{now}", "previous": previous,+ # 与并集同一个运行时刻:一次结算一个批次,复核页按批次列出、整批撤回。+ "batch": f"{verified.rule}@{batch.rpartition('@')[2]}", "previous": previous,"reviewed_candidate_keys": reviewed,}, now)return {"item_key": item_key, "field": field, "value": written, "assets": count}diff --git a/src/peach/web_auto_landings.py b/src/peach/web_auto_landings.pynew file mode 100644index 000000000..57dc28a8e--- /dev/null+++ b/src/peach/web_auto_landings.py@@ -0,0 +1,181 @@+"""复核页的「自动写入的资料」:列出核查结算自动写下的批次,预览后整批撤回(ADR-0140)。++只放行 ADR-0139 的两条规则:官方一致的标题、日期覆盖与标签并集。它们只改账本、不删盘上+文件,决定里存着撤回要用的全部依据。别的自动落库来源(种子、别名、样张、封面……)仍只在+`scripts/revert_auto_landing.py` 撤;接口按批次号反查规则,查不到就拒绝,挡住会删文件的来源。++预览与撤回调同一个 `auto_landing_revert.plan`,撤回再调同一个 `apply`,和命令行一字不差:+被人改过的资产照旧不动、单独报出。预览给出计划摘要的 `token`;撤回在写锁里重算计划,+对不上就拒绝,确认的就是将要写的。写入前经 `ledger_backups.create` 留一份并查过完整性,回执写出文件名。+"""+from __future__ import annotations++import hashlib+import json+import time+from datetime import datetime, timezone++from . import auto_landing_revert, ledger_backups+from .library_processing import LABELS+from .metadata_auto_apply import VERIFIED_REPLACE_RULE, VERIFIED_UNION_RULE+from .web_state import WebContract++#: 网页能撤的规则,顺序就是列表里的顺序。+RULES = {VERIFIED_REPLACE_RULE: "官方来源覆盖标题与日期", VERIFIED_UNION_RULE: "补齐来源多给的标签"}+#: 撤回前那份账本备份的用途名,「账本备份」列表里显示 `ledger_backups.PURPOSE_LABELS` 的写法。+BACKUP_PURPOSE = "auto-landing-revert"+++def batch_time(batch: str) -> float | None:+ """批次号里的时刻:覆盖早先记 UTC `2026-11-04T06:10:56Z`,并集与此后的覆盖记本机时间 `20261104T141053`。"""+ stamp = batch.rpartition("@")[2]+ try:+ if stamp.endswith("Z"):+ return datetime.strptime(stamp, "%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=timezone.utc).timestamp()+ return time.mktime(time.strptime(stamp, "%Y%m%dT%H%M%S"))+ except ValueError:+ return None+++def _decisions(connection) -> list[tuple[str, str, dict]]:+ """两条规则写下、仍在的决定:(规则,item_key,note)。"""+ found = []+ for row in connection.execute(+ "SELECT item_key,note FROM review_decision WHERE category='metadata_fields'"+ " AND status='approved' AND note LIKE '%adr-0139-%'"):+ try:+ note = json.loads(row["note"] or "{}")+ except ValueError:+ continue+ if isinstance(note, dict) and note.get("rule") in RULES:+ found.append((note["rule"], row["item_key"], note))+ return found+++def _batches_of(note: dict) -> list[str]:+ return [batch for batch in (note.get("batches") or [note.get("batch", "")]) if batch]+++def list_batches(connection) -> list[dict]:+ """每条规则的每个批次:时间、决定条数与影响面,新的在前。++ 并集一条决定可以带几个批次(之后收录了生词又补过一次),它在每个批次里都算一条;+ 标签数按那个批次真正写下、仍在账本里的行数。+ """+ groups: dict[tuple[str, str], dict] = {}+ for rule, item_key, note in _decisions(connection):+ for batch in _batches_of(note):+ group = groups.setdefault((rule, batch), {"rule": rule, "batch": batch, "items": set(), "assets": set()})+ group["items"].add(item_key)+ group["assets"].update(int(before["asset_id"]) for before in note.get("previous") or [])+ tags: dict[str, dict[str, int]] = {}+ for rule, batch in groups:+ if rule == VERIFIED_UNION_RULE:+ tags[batch] = {str(row[0] or ""): row[1] for row in connection.execute(+ "SELECT json_extract(metadata_json,'$.review_item'),COUNT(*) FROM asset_entity"+ " WHERE role='tag' AND source=? GROUP BY 1", (batch,))}+ listed = []+ for (rule, batch), group in groups.items():+ written = tags.get(batch, {})+ listed.append({+ "rule": rule, "label": RULES[rule], "batch": batch, "at": batch_time(batch),+ "items": len(group["items"]), "assets": len(group["assets"]),+ "tags": sum(written.get(key, 0) for key in group["items"]) if rule == VERIFIED_UNION_RULE else 0,+ })+ order = list(RULES)+ return sorted(listed, key=lambda item: (-(item["at"] or 0), order.index(item["rule"]), item["batch"]))+++def _plans(contract: WebContract, connection, batches: list[str]) -> list[dict]:+ """选中批次各自的撤回计划。同一条并集决定出现在两个选中批次里时只算一次。"""+ if not batches:+ raise ValueError("请选择要撤回的批次")+ rules = {item["batch"]: item["rule"] for item in list_batches(connection)}+ unknown = [batch for batch in batches if batch not in rules]+ if unknown:+ raise ValueError(f"这批自动写入已不在,请刷新后重试:{unknown[0]}")+ plans, seen = [], set()+ for batch in dict.fromkeys(batches):+ planned = auto_landing_revert.plan(connection, rules[batch], batch,+ logo_root=contract.logo_root, cover_root=contract.cover_root)+ planned["verified"] = [entry for entry in planned["verified"] if entry["item_key"] not in seen]+ seen.update(entry["item_key"] for entry in planned["verified"])+ plans.append(planned)+ return plans+++def _token(plans: list[dict]) -> str:+ entries = [entry for planned in plans for entry in planned["verified"]]+ return hashlib.sha256(json.dumps(entries, ensure_ascii=False, sort_keys=True, default=str)+ .encode("utf-8")).hexdigest()[:24]+++def _assets(connection, ids: set[int]) -> dict[int, dict]:+ """作品的显示名与番号;资产已删的不出现。"""+ if not ids:+ return {}+ marks = ",".join("?" * len(ids))+ return {row["id"]: {"name": row["catalog_title"] or row["name"] or "", "code": row["code"] or ""}+ for row in connection.execute(+ f"SELECT id,name,code,catalog_title FROM asset WHERE id IN ({marks})", sorted(ids))}+++def _summary(connection, plans: list[dict]) -> dict:+ """计划里每条要改的:还原哪部作品的哪一格、改回什么,已被改过不动的,删哪些标签。"""+ restores, changed, tags, selected = [], [], [], set()+ for planned in plans:+ selected.add(planned["batch"])+ for entry in planned["verified"]:+ field = entry["item_key"].rpartition(":")[2]+ label = LABELS.get(field, field)+ restores += [{"asset_id": int(before["asset_id"]), "field": label, "current": entry["value"],+ "previous": before.get("value") or ""} for before in entry.get("restores") or []]+ changed += [{"asset_id": int(asset_id), "field": label, "written": entry["value"]}+ for asset_id in entry.get("changed") or []]+ tags += [{"asset_id": tag["asset_id"], "tag": tag["tag"], "batch": tag["batch"]}+ for tag in entry.get("tags") or []]+ names = _assets(connection, {row["asset_id"] for row in [*restores, *changed, *tags]})+ for row in [*restores, *changed, *tags]:+ # 写入后作品被删掉的,计划同样记在 `changed` 里不动;`gone` 让页面说清是哪一种。+ row.update(names.get(row["asset_id"], {"name": "", "code": "", "gone": True}))+ return {"decisions": sum(len(planned["verified"]) for planned in plans),+ "restores": restores, "changed": changed, "tags": tags,+ # 并集决定按决定撤:选中的批次连带它更早或更晚补的那几个。+ "other_batches": sorted({tag["batch"] for tag in tags} - selected)}+++def _requested(args) -> list[str]:+ raw = args.get("batches") if isinstance(args, dict) else None+ if isinstance(raw, list):+ return [str(batch).strip() for batch in raw if str(batch).strip()]+ return [batch.strip() for batch in str(raw or "").split(",") if batch.strip()]+++def q_auto_landings(contract: WebContract, args=None):+ """`GET /api/review/auto-landings`:批次列表;带 `batches=a,b` 时返回这几批的撤回预览与 token。"""+ batches = _requested(args or {})+ with contract.read_connection() as connection:+ if not batches:+ return {"items": list_batches(connection)}+ plans = _plans(contract, connection, batches)+ return {"batches": [planned["batch"] for planned in plans], "token": _token(plans),+ **_summary(connection, plans)}+++def w_auto_landing_revert(contract: WebContract, body):+ """`POST /api/review/auto-landings/revert`:在写锁里重算计划,token 对上才备份并撤回。"""+ batches = _requested(body or {})+ with contract.write_transaction() as connection:+ connection.execute("BEGIN IMMEDIATE")+ plans = _plans(contract, connection, batches)+ if _token(plans) != str((body or {}).get("token") or ""):+ raise ValueError("这几批自动写入已有变化,请重新预览")+ summary = _summary(connection, plans)+ backup = ledger_backups.create(contract.db_path, purpose=BACKUP_PURPOSE)+ results = [auto_landing_revert.apply(connection, planned) for planned in plans]+ contract.cache_bust()+ return {"ok": True, "batches": [planned["batch"] for planned in plans],+ "restored": sum(result["还原核查覆盖"] for result in results),+ "removed_tags": sum(result["删除核查并集标签"] for result in results),+ "decisions": sum(result["删除核查决定"] for result in results),+ "changed": summary["changed"], "backup": backup.name}diff --git a/src/peach/web_router.py b/src/peach/web_router.pyindex 69e1c062d..08a3f8ce8 100644--- a/src/peach/web_router.py+++ b/src/peach/web_router.py@@ -103,6 +103,7 @@ from .web_playlists import q_playlist, q_playlists, w_playlistfrom .web_custom_metadata import q_custom_metadata, w_custom_metadatafrom .web_resource_sync import w_purge_missing, w_resource_sync_apply, w_resource_sync_scanfrom .web_review import q_review, w_review_decision, w_review_genre+from .web_auto_landings import q_auto_landings, w_auto_landing_revertfrom .web_settings import q_settings, w_settingsfrom .web_library_shortcuts import q_library_shortcuts, w_library_shortcutsfrom .web_tutorial import q_tutorial_progress, w_tutorial_progress@@ -418,6 +419,7 @@ GET_HANDLERS = {"/api/search/recommendations": q_search_recommendations,"/api/taste": _get_taste,"/api/review": _get_review,+ "/api/review/auto-landings": q_auto_landings,"/api/post-setup-tutorial": _get_post_setup_tutorial,}@@ -484,6 +486,7 @@ POST_HANDLERS = {"/api/media-repair": w_media_repair,"/api/review/decision": w_review_decision,"/api/review/genre": w_review_genre,+ "/api/review/auto-landings/revert": w_auto_landing_revert,"/api/settings": w_settings,"/api/library-shortcuts": w_library_shortcuts,"/api/tutorial-progress": w_tutorial_progress,diff --git a/tests/test_metadata_verification.py b/tests/test_metadata_verification.pyindex 55a75cbc8..51df9824e 100644--- a/tests/test_metadata_verification.py+++ b/tests/test_metadata_verification.py@@ -13,6 +13,7 @@ import tempfileimport unittestfrom pathlib import Path+from peach import ledger_backups, web_auto_landingsfrom peach import metadata_auto_apply as rm_autofrom peach import web_contract as rm_webfrom peach import web_review as rm_review@@ -314,6 +315,76 @@ class VerificationSettlementTests(unittest.TestCase):rm_auto.revert_verified(connection, plan)self.assertEqual(self.value(asset_id, "release_date"), ("2024-09-11", USER_MANUAL))+ # ---- 复核页撤回(ADR-0140) ----++ def test_review_page_previews_and_reverts_a_settlement_batch(self):+ replaced = self.asset("DASS-468", release_date="2024-09-06")+ edited = self.asset("DASS-469", release_date="2024-09-07")+ tagged = self.asset("ROYD-083", tags=("中出内射",))+ self.row("DASS-468", "release_date", "2024-09-06", ("makers", "2024-09-10"))+ self.row("DASS-469", "release_date", "2024-09-07", ("makers", "2024-09-12"))+ self.row("ROYD-083", "tags", "中出内射", ("makers", ["中出内射", "痴女"]))+ self.settle()+ with contextlib.closing(sqlite3.connect(self.db_path)) as connection, connection:+ write_owned_fields(connection, [edited], {"release_date": "2024-09-13"}, USER_MANUAL)++ listed = rm_web.dispatch_api_get(self.contract, "/api/review/auto-landings", {})["items"]+ self.assertEqual([(item["rule"], item["items"], item["assets"], item["tags"]) for item in listed],+ [(rm_auto.VERIFIED_REPLACE_RULE, 2, 2, 0), (rm_auto.VERIFIED_UNION_RULE, 1, 0, 1)])+ # 一次结算一个运行时刻:覆盖与并集的批次号带同一个时刻。+ self.assertEqual(len({item["batch"].rpartition("@")[2] for item in listed}), 1)+ self.assertIsNotNone(listed[0]["at"])+ batch = listed[0]["batch"]++ preview = rm_web.dispatch_api_get(self.contract, "/api/review/auto-landings", {"batches": batch})+ self.assertEqual([(row["asset_id"], row["code"], row["current"], row["previous"])+ for row in preview["restores"]], [(replaced, "DASS-468", "2024-09-10", "2024-09-06")])+ self.assertEqual([row["asset_id"] for row in preview["changed"]], [edited])+ self.assertEqual((preview["decisions"], preview["tags"]), (2, []))++ with self.assertRaisesRegex(ValueError, "重新预览"):+ rm_web.dispatch_api_post(self.contract, "/api/review/auto-landings/revert",+ {"batches": [batch], "token": "stale"})+ self.assertEqual(self.value(replaced, "release_date"), ("2024-09-10", "auto:makers"))++ result = rm_web.dispatch_api_post(self.contract, "/api/review/auto-landings/revert",+ {"batches": [batch], "token": preview["token"]})+ self.assertEqual((result["restored"], result["decisions"]), (1, 2))+ self.assertEqual([row["asset_id"] for row in result["changed"]], [edited])+ self.assertEqual(self.value(replaced, "release_date"), ("2024-09-06", ""))+ self.assertEqual(self.value(edited, "release_date"), ("2024-09-13", USER_MANUAL))+ self.assertIn("痴女", self.tags(tagged))+ backup = Path(self.db_path).with_name(result["backup"])+ self.assertTrue(backup.is_file())+ self.assertEqual(ledger_backups.describe(backup, "database")["purpose"], "撤回自动写入前")+ self.assertEqual([item["rule"] for item in rm_web.dispatch_api_get(+ self.contract, "/api/review/auto-landings", {})["items"]], [rm_auto.VERIFIED_UNION_RULE])++ def test_review_page_reverts_union_tags_like_the_script(self):+ tagged = self.asset("ROYD-083", tags=("中出内射",))+ self.row("ROYD-083", "tags", "中出内射", ("makers", ["中出内射", "痴女"]))+ self.settle()+ batch = rm_web.dispatch_api_get(self.contract, "/api/review/auto-landings", {})["items"][0]["batch"]+ preview = rm_web.dispatch_api_get(self.contract, "/api/review/auto-landings", {"batches": batch})+ self.assertEqual([(row["code"], row["tag"]) for row in preview["tags"]], [("ROYD-083", "痴女")])+ result = rm_web.dispatch_api_post(self.contract, "/api/review/auto-landings/revert",+ {"batches": [batch], "token": preview["token"]})+ self.assertEqual((result["removed_tags"], result["decisions"]), (1, 1))+ self.assertEqual(self.tags(tagged), {"中出内射"})+ self.assertEqual(self.decisions(), {})++ def test_review_page_refuses_batches_it_does_not_list(self):+ for batches in ([], ["auto:western-artwork@20261008T000000Z"]):+ with self.subTest(batches=batches), self.assertRaises(ValueError):+ rm_web.dispatch_api_post(self.contract, "/api/review/auto-landings/revert",+ {"batches": batches, "token": ""})++ def test_batch_time_reads_both_stamp_formats(self):+ self.assertEqual(web_auto_landings.batch_time(f"{rm_auto.VERIFIED_REPLACE_RULE}@2026-11-04T06:10:56Z"),+ 1793772656.0)+ self.assertIsNotNone(web_auto_landings.batch_time(f"{rm_auto.UNION_TAGS_SOURCE}@20261104T141053"))+ self.assertIsNone(web_auto_landings.batch_time("adr-0139-official-replaces-verified@now"))+# ---- 看起来像但必须交人 ----def assertForHuman(self, key, rule):diff --git a/tests/test_rm_web.py b/tests/test_rm_web.pyindex 6c70b82c3..19749390c 100644--- a/tests/test_rm_web.py+++ b/tests/test_rm_web.py@@ -1550,7 +1550,8 @@ class WebDataTests(unittest.TestCase):"/api/index", "/api/parts", "/api/editions", "/api/duplicates", "/api/quality-goals","/api/stats", "/api/tops", "/api/ads", "/api/related", "/api/facets","/api/suggest",- "/api/search-history", "/api/search/recommendations", "/api/review", "/api/playlists", "/api/playlist",+ "/api/search-history", "/api/search/recommendations", "/api/review", "/api/review/auto-landings",+ "/api/playlists", "/api/playlist","/api/post-setup-tutorial","/api/tutorial-progress", "/api/performer/delete-candidates", "/api/performer/delete-plan","/api/library-shortcuts", "/api/folders",@@ -1581,7 +1582,7 @@ class WebDataTests(unittest.TestCase):"/api/custom-metadata","/api/preference", "/api/quality-goal", "/api/item-tag", "/api/batch","/api/search-history", "/api/trash/empty",- "/api/review/decision", "/api/review/genre",+ "/api/review/decision", "/api/review/genre", "/api/review/auto-landings/revert","/api/purge-missing", "/api/orphan-records/attach","/api/links/check", "/api/links/prune","/api/resource-sync/scan", "/api/resource-sync/apply",diff --git a/web/dist/peach-app.js b/web/dist/peach-app.jsindex 1c95481ff..33b38e4ac 100644--- a/web/dist/peach-app.js+++ b/web/dist/peach-app.js@@ -2,7 +2,7 @@(function() {try {var e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, t = new e.Error().stack;- t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "f801708c-39a2-426c-b8b8-125b72b1203f", e._sentryDebugIdIdentifier = "sentry-dbid-f801708c-39a2-426c-b8b8-125b72b1203f");+ t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "55ad84bc-7f0e-4837-a16a-dc8d88edf1a7", e._sentryDebugIdIdentifier = "sentry-dbid-55ad84bc-7f0e-4837-a16a-dc8d88edf1a7");} catch {}})();var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), s = (e, n) => {@@ -79350,7 +79350,7 @@ async function T6(e, t) {if (r.status === "rejected") throw r.reason;if (n.status === "rejected") throw n.reason;}-var E6 = w6(() => import("./peach-app.jav-page-CvsnSwyE.js")), D6 = w6(() => import("./peach-app.stats-page-Domc7MK7.js")), O6 = w6(() => import("./peach-app.taste-page-DBsNS6-3.js")), k6 = w6(() => import("./peach-app.review-page-DL1KGdJQ.js")), A6 = w6(() => import("./peach-app.data-cleanup-page-CZOBqkVd.js")), j6 = w6(() => import("./peach-app.duplicates-page-Bau8HIlx.js")), M6 = w6(() => import("./peach-app.quality-goals-page-Deoy7rhD.js")), N6 = w6(() => import("./peach-app.scraping-page-C4xFEKWF.js")), P6 = w6(async () => {+var E6 = w6(() => import("./peach-app.jav-page-CvsnSwyE.js")), D6 = w6(() => import("./peach-app.stats-page-Domc7MK7.js")), O6 = w6(() => import("./peach-app.taste-page-DBsNS6-3.js")), k6 = w6(() => import("./peach-app.review-page-CO7z9DNb.js")), A6 = w6(() => import("./peach-app.data-cleanup-page-CZOBqkVd.js")), j6 = w6(() => import("./peach-app.duplicates-page-Bau8HIlx.js")), M6 = w6(() => import("./peach-app.quality-goals-page-Deoy7rhD.js")), N6 = w6(() => import("./peach-app.scraping-page-C4xFEKWF.js")), P6 = w6(async () => {let [{ ConfigurationPage: e }, { DiagnosticsPage: t }] = await Promise.all([import("./peach-app.configuration-page-ubxQHJd0.js"), import("./peach-app.diagnostics-page-DS1L_wLs.js")]);return {ConfigurationPage: e,@@ -84597,4 +84597,4 @@ if (!$9) throw Error("主界面宿主缺失");BBe($9);export { BL as $2ec61d1d4f780267$export$a8a3e93435678ff9, JL as $3a442827418ebe87$export$eb2fcfdbd7ba97d4, dz as $542a13ca2fa5b484$export$5b6b19405a83ff9d, wD as $72abaeab4d80592f$export$78efe591171d7d45, rB as $76d00c5a4edb230a$export$76ccd210b9029917, eB as $76d00c5a4edb230a$export$816b5d811295e6bc, oB as $76d00c5a4edb230a$export$b59bdbef9ce70de2, cB as $76d00c5a4edb230a$export$f6f0c3fe4ec306ea, $z as $76d00c5a4edb230a$export$f850895b287ef28e, Uhe as $b4f18e3395fe64d7$export$3d96ec278d3efce4, Hhe as $b4f18e3395fe64d7$export$3e41faf802a29e71, zhe as $b4f18e3395fe64d7$export$b2539bed5023c21c, fB as $b4f18e3395fe64d7$export$e51a686c67fdaa2d, Khe as $bd263d78e9bf3c56$export$f5c9f3c2c4054eec, dE as $ea3928288112382f$export$439d29a4e110a164, wz as $f2ff30fde7b014be$export$3ddf2d174ce01153, jz as $fe21c36db05242bb$export$a98f0dcb43a68a25, Mz as $fe21c36db05242bb$export$d7b12c4107be0d61, kge as $l, Uj as ACCENTS, IAe as AMANE_BRIDGE_CHECK_URL, M$ as AMANE_BRIDGE_KEY, LAe as AMANE_BRIDGE_REBUILD_URL, sr as ApiError, KU as ArtSlot, S2 as BATCH_DELETE_TEXT, J as Button, vL as ButtonLink, WB as Bx, s$ as CLEANUP_ENTRY, o$ as CLEANUP_ENTRY_GRID, Zf as CLEANUP_HASH_REDIRECTS, Yf as CLEANUP_TOOLS, vn as CLOUD_LOCATIONS, J1 as CLOUD_PROXY_HELP, Kr as COLUMN_SORT, Y$ as CONFIGURATION_KEY, HY as CONFIGURATION_URL, RAe as COOKIE_TEXT_LIMIT, j$ as COVER_JOB_KEY, Yi as CREDENTIAL_STATE, D$ as CUSTOM_SOURCES_KEY, E$ as CUSTOM_SOURCES_URL, oG as CatalogViewToggle, RV as Checkbox, LV as CheckboxGlyph, OV as ChevronSortDown, GU as Chip, tW as CloudDownloadDialog, MH as CollapseChevron, jH as CollapseRegion, e$ as CollectionSummary, mTe as DEFAULT_CATEGORY, dr as DEFAULT_SORT, EQ as DIAGNOSTICS_KEY, mEe as DIRECTORY_TEMPLATE_ERROR, cW as DISCOVERY_SORTS, JU as DOWNLOADS_KEY, qU as DOWNLOADS_URL, cY as DUPLICATES_KEY, HJ as DataTableFooter, RJ as DataTableFrame, VJ as DataTableSort, RH as Disclosure, wye as DownloadsPanel, vge as E3, hTe as ENTITY_REVIEW_KINDS, K1 as ENTRY_LINKS_HELP, q1 as ENTRY_LINKS_HINT, IB as Ea, n_e as EmptyFocusButton, uV as EmptyState, IH as ErrorText, Kge as Eu, vve as ExternalLink, Vr as FEEDS_KEY, XY as FEED_SCHEDULE_KEY, i$ as FIELDSET_FOOT, pIe as FLOW_LABEL_X, n6 as FLOW_VIEWBOX, zr as FOLLOW_CHECK_KEY, Rr as FOLLOW_CREDENTIALS_KEY, z8 as FOLLOW_INITIAL_RANGE_OPTIONS, Lr as FOLLOW_MANAGE_KEY, kZ as FOLLOW_MANAGE_NAV, Br as FOLLOW_RESOLVE_KEY, YY as FOLLOW_SCHEDULE_KEY, xve as Fact, bve as FactList, LH as FieldLabel, _$ as Fieldset, g$ as FieldsetTitle, Bpe as FilterGlass, dL as FilterGlassRows, uL as FilterIconButton, fL as FilterPill, _ve as Footer, VB as Gg, pL as GlassPill, JB as HN, FH as Help, tV as HintText, aIe as IDLE_POLL_MS, rTe as IDLE_REPAIR, oL as IconButton, OQ as IndexSearch, oV as Input, aV as InputBase, y$ as IssueRow, sM as JAV_LAYOUTS, V0 as JAV_RECOMMENDATION_GRID, bX as JUNK_KEY, _W as JavHeader, Zwe as KEEP_LABELS, cge as L1, Ur as LAYOUTS, G1 as LIBRARY_FOLDER_HELP, ZV as LIBRARY_PROCESSING_KEY, PY as LINKS_KEY, FY as LINK_CHECK_KEY, zTe as LINK_KINDS, IY as LINK_PRUNE_KEY, nr as LOC, eV as Label, S$ as LibraryProcessingCard, DV as LibraryShortcuts, pH as LinkButton, jge as Lo, EH as LoadingDots, bge as M6, GTe as MEDIA_PROCESSING_KEY, WTe as MEDIA_PROCESSING_URL, pY as MEDIA_REPAIR_KEY, fY as MEDIA_REPAIR_URL, yr as MEDIA_SOURCES_KEY, _s as MEDIA_SOURCE_ICONS, gn as MEDIA_SOURCE_OPTIONS, MV as MENU_ITEM, NV as MENU_ITEM_INTERACTIVE, jV as MENU_POPOVER_SURFACE, Nge as Ma, _H as MenuDialog, gK as MixCard, sV as ModalFrame, Sx as MotionConfigContext, QB as NR, v$ as NameLink, lV as Note, Qge as OA, eX as ORGANIZE_KEY, y2 as ORGANIZE_PARAMETER_HINT, v2 as ORGANIZE_SCOPE_HINT, _2 as ORGANIZE_TEXT, rX as ORPHAN_RECORDS_KEY, x2 as ORPHAN_RECORDS_TEXT, zB as OV, wB as P7, _X as PERFORMER_DELETE_KEY, Nye as PHASES, UY as PICK_FOLDER_URL, l$ as PLAIN_STAT_STRIP, w$ as PLAYLISTS_KEY, eMe as POLICY_COLUMNS, nMe as POLICY_COVER_NOTE, tMe as POLICY_MATRIX, W1 as POLICY_SUMMARY, BJ as Pagination, x$ as PathLine, XB as Pf, FI as PillTabList, iAe as PlainStat, OH as Progress, vY as QUALITY_GOALS_KEY, YB as RB, R0 as RELEASE_COLUMN_VISIBILITY_KEY, L0 as RELEASE_COLUMN_WIDTHS_KEY, lW as RELEASE_SORTS, AMe as RELEASE_SORT_COLUMNS, d$ as REPAIR_CARD_TEXT, mY as REPAIR_LIBRARIES_KEY, cX as RESOURCE_APPLY_KEY, sX as RESOURCE_SCAN_KEY, b2 as RESOURCE_SYNC_TEXT, uAe as RESULT_PANEL, dAe as RESULT_SECTION, pTe as REVIEW_CATEGORIES, yX as REVIEW_COUNTS_KEY, gTe as REVIEW_DECISION_LABELS, xY as REVIEW_KEY, SY as REVIEW_LABELS, wY as REVIEW_QUEUES, TY as REVIEW_QUEUE_LABELS, LG as RetryNote, Xge as Rf, $B as Rk, mve as Rows, PAe as SCRAPING_CHECK_URL, k$ as SCRAPING_COVER_URL, A$ as SCRAPING_KEY, NAe as SCRAPING_SETTINGS_URL, iU as SEGMENT, rU as SEGMENTED_TRACK, JY as SETTINGS_KEY, WY as SETTINGS_URL, fr as SORT_DEFAULT_DIR, ur as SORT_OPTIONS, yn as SOURCE_LABELS, D3 as STATS_KEY, nAe as STAT_STRIP, rAe as STAT_STRIP_SIX, pve as Section, fAe as SectionHeading, gve as SectionSkeleton, nU as SegmentedRadioGroup, Ive as SegmentedTabList, AG as Segments, zJ as Select, HU as Select$1, $$ as SelectField, UU as SelectItem, YJ as SelectionActions, xj as SelectionDock, XJ as SelectionPopover, NH as SettingsCard, fve as SettingsRow, PH as SettingsSectionLabel, jG as Shuffle, Tve as SiteLabel, cG as SortDirectionIcon, MG as SortKeys, lQ as SourceAvatar, HH as SourceLabel, zH as SourceMark, hve as Stack, aAe as StatCard, b$ as StatusLabel, qge as Su, a4 as Switch, WI as TASKS_KEY, JFe as TASTE_REFRESH_KEY, YFe as TASTE_WINDOWS, ZY as THUMBNAIL_JOBS_KEY, SX as TRASH_KEY, ype as TRIGGER_LABELS, DJ as Table, ZJ as TableColumnControls, QJ as TableColumnResizer, eY as TableSelectionHeader, YQ as TagManager, yve as TaskCenterLink, kH as TaskProgress, rV as TextField, nV as TextFieldContext, LB as Un, Zge as Uz, rW as WANTS_KEY, b4 as WantMagnets, Yg as WithPromise, OB as Wt, FB as Xc, ZB as Xf, AB as Xl, kB as Xt, EB as _8, o as __commonJSMin, s as __exportAll, l as __toESM, qB as _p, Yge as aB, Ei as addAlias, Ti as addSource, aW as addWant, dS as animate, B as apiGet, V as apiSend, tM as appSettingsStore, NEe as applyConfirmText, gX as applyLeftovers, MEe as applyPlanText, FEe as applyText, aM as applyTheme, by as asNumber, xEe as attachOrphan, ci as authorAvatar, ui as authorGroups, si as authorInitial, oi as authorName, hq as autoResetPageIndex, _o as avatarInner, N3 as bandRows, hEe as baseName, nTe as batchOperate, Fue as beginPlayerGuidePreview, Ej as boundedPreference, $we as bulkCloudPreferences, mV as busyProps, Jge as cB, CPe as cachedMagnetStates, Ug as calcGeneratorVelocity, CTe as canApprove, vg as cancelFrame, EEe as candidateText, SU as cardClass, bM as cardRatio, FJ as catalogListSkeletonCellHtml, PB as cc, Gi as checkEvidenceGap, Wi as checkFailures, Fi as checkFeeds, UTe as checkLine, Hi as checkReceipt, Ui as checkSummary, BAe as checkText, Ki as checkedText, rK as clickedBlank, Q5 as closeDrawerAfterNav, Gwe as cloudLocations, T0 as cloudProxySkeleton, WC as clsx, Ige as cn, lv as collectMotionValues, Fq as columnVisibilityFeature, SJ as column_getCanSort, vJ as column_getSortFn, xTe as commonReviewSources, eW as composingKey, Af as configurationSection, $Fe as configureTasteBrowser, ll as confirmModal, _pe as controlTask, ZK as copyInstancePropertiesWithoutMemos, lo as coverUrl, Eq as createColumnHelper, DAe as createPlaylist, Xi as credentialDone, x0 as credentialsSkeleton, MTe as currentReviewRow, q as cx, xge as d6, UB as dZ, kTe as decisionPayload, ATe as decisionReceipt, OTe as defaultChoice, LEe as deletePerformerVideos, kAe as deletePlaylist, k0 as devicesSkeleton, x as diagnosticHeaders, U1 as diagnosticsSkeleton, Hye as discoveryArtwork, uW as discoveryKey, zye as discoveryScore, d9 as disposeStage, Ywe as distinctName, Bi as dropSources, Gge as du, eTe as duplicateVictims, ZI as elapsedText, nn as entityDisplayName, go as entityFaceImg, Pn as entityPath, ti as errorHeadline, lr as errorMessage, z as esc, mq as expandRowModel, _B as f1, bo as facePos, ei as feedIntervalText, F$ as fetchAmaneBridge, vi as fetchCheckJob, X$ as fetchConfiguration, P$ as fetchCoverJob, _i as fetchCredentials, O$ as fetchCustomSources, vX as fetchDeletePerformers, IEe as fetchDeletePlan, DQ as fetchDiagnostics, dW as fetchDiscoveries, uY as fetchDuplicates, ppe as fetchEarlier, JTe as fetchFeedSchedule, Mi as fetchFeeds, gi as fetchFollow, qTe as fetchFollowSchedule, wX as fetchJunkSummary, aH as fetchLibraryProcessing, zY as fetchLinkCheck, BY as fetchLinkPrune, RY as fetchLinkStats, KTe as fetchMediaProcessing, hY as fetchMediaRepair, br as fetchMediaSources, tX as fetchOrganize, sEe as fetchOrganizeExample, iX as fetchOrphanRecords, ji as fetchPending, T$ as fetchPlaylists, yY as fetchQualityGoals, mW as fetchReleases, gY as fetchRepairLibraries, yi as fetchResolveJob, uX as fetchResourceApply, lX as fetchResourceScan, jY as fetchReview, CX as fetchReviewCounts, QY as fetchSettings, N$ as fetchSources, O3 as fetchStats, bi as fetchSuggestions, KI as fetchTasks, $3 as fetchTaste, eIe as fetchTasteJob, YTe as fetchThumbnailJobs, TX as fetchTrashSummary, iW as fetchWants, yTe as filterReviewRows, er as firstGrapheme, NK as flexRender, hIe as flowGraph, gIe as flowLabel, mFe as fmtCount, Jn as fmtDur, Xn as fmtSize, fpe as foldByKind, kpe as foldRoutine, Li as followFeedByName, Hr as followSuggestKey, jpe as followupDetail, dpe as followupTally, _g as frame, SB as g4, Rq as getDefaultPaginationState, yM as gridLayout, li as groupByAuthor, Ope as groupFollowups, OY as groupReviewRows, AEe as hasChanges, dX as hasResourceRoots, JI as hasResultProblems, oIe as historySpan, vB as i2, iIe as importTasteExport, S0 as indexersSkeleton, zg as interpolate, sW as invalidateWants, XI as isActive, $r as isBroken, qr as isLayout, bv as isMotionValue, CY as isReviewCategory, Ape as isRoutine, C0 as javBrowserSkeleton, U0 as javContentSkeleton, fM as javLayout, H0 as javTagSkeleton, HEe as junkBreakdown, AAe as keepPlaylist, ke as keepPreviousData, pi as keepSelected, k3 as known, sge as l1, mge as l7, Dpe as latestOfKind, $n as leadingGraphemes, EFe as lengthRows, Cr as localTime, po as logoUrl, Ii as lookupFeedActor, CB as m7, HB as mM, Dn as mapLimit, Ai as markItem, P3 as max, wFe as mediumRows, mpe as mergeFinished, F3 as min, LTe as mirrorText, oTe as missingToolText, dY as mixedCloudPreferences, tL as momentText, fS as motion, dv as motionValue, rn as nameFallback, Ue as notifyManager, Sge as oe, _Ee as organizeOutcome, a2 as overlayHost, Jr as pageSizeOf, fi as pageWindow, hr as paginationRange, zi as patchSource, Np as peachHistory, Np as peachHistory$1, DTe as pendingGenres, gFe as percentText, uEe as pickOrganizeFolder, c$ as plainStatClass, gEe as planSummary, A3 as playedFor, vFe as playedItemUrl, GI as pollInterval, Ys as popCount, EAe as posterUrl, hxe as previewLibraryColor, lEe as previewOrganize, lTe as previewUrl, Tpe as problemDestination, eH as processingActive, QI as progressText, VH as providerIcon, HTe as pruneText, pX as purgeCount, SEe as purgeOrphan, GB as pv, Wge as qE, H as queryClient, yB as r2, fIe as radarRows, xFe as radialArc, SFe as radialBarSize, bFe as radialCeiling, yFe as radialSlices, IN as randomId, uIe as rankDetail, dIe as rankShares, M3 as reachedShare, $I as readableErrorHeadline, Bye as recommendationScore, NTe as recordGenre, wEe as recordsText, jAe as recreatePlaylist, wAe as refreshPlaylists, El as relayoutCovers, z0 as releaseColumns, fW as releaseFilters, pW as releaseKey, Vi as reloadFollowManage, ITe as reloadReview, aMe as rememberShape, fEe as rememberTemplates, Di as removeAlias, Pi as removeFeed, wi as removeSource, rIe as removeTasteSource, oW as removeWants, Oi as renameAliasGroup, OAe as renamePlaylist, Se as replaceEqualDeep, OFe as replayRows, re as require_jsx_runtime, A as require_react, N as require_react_dom, qK as require_with_selector, Iye as resetWants, mr as resolveFollowSort, Kg as resolveStartTime, J_e as restartEffectText, TAe as resumeAssetId, vTe as reviewGroupingOptions, DY as reviewQueueData, EY as reviewQueueOf, VEe as reviewSummary, bTe as reviewWindow, TTe as rowEvidence, AY as rowFieldName, Gq as rowPaginationFeature, fJ as rowSelectionFeature, TJ as rowSortingFeature, kY as rowSubject, ETe as rowTags, wTe as rowTitle, dge as s5, ki as saveCredential, jEe as scanLine, eEe as schedulePollInterval, Rye as searchNote, STe as selectReviewRange, mi as selectionState, Ni as setFeedEnabled, Ci as setSourceEnabled, Pf as settingsPath, FTe as settleReviewRows, Jwe as sharedNamePrefix, Pp as shellNavigate, D8 as showToast, Bn as siteMarkUrl, aq as skipFirstRun, NI as sortCx, Xr as sortLabel, bn as sourceDefaultCost, Ji as sourceIconUrl, PEe as sourceMeta, Bs as spinnerHtml, Lg as spring, fV as spriteGlyph, xi as startCheck, BTe as startLinkCheck, VTe as startLinkPrune, dEe as startOrganize, Si as startResolve, OEe as startResourceApply, DEe as startResourceScan, nIe as startTasteRefresh, tAe as statCardClass, xpe as statusLabel, aTe as statusLine, Qr as statusText, xM as storeJavLayout, jTe as submitDecision, nL as summaryItems, Dq as tableFeatures, oq as tableMemo, di as tableRows, wpe as taskIssues, Epe as taskSubject, e6 as tasteDate, cIe as tasteDimensions, sIe as tasteHours, Q3 as tasteKey, ZFe as tasteRefetchInterval, QFe as tasteTime, zI as textLang, I0 as tierPlaceholdersHtml, ch as time, Dge as tl, hi as toggleGroup, t6 as topScores, Rge as um, Mge as uo, mH as useAction, wZ as useBackgroundJob, aG as useCatalogView, PU as useClientUpdates, bm as useConstant, rL as useEntityNames, lL as useHorizontalScroller, xm as useIsomorphicLayoutEffect, nK as useLibraryTints, It as useMutation, zV as useOverlayScrollbar, Ft as useQuery, ae as useQueryClient, eS as useReducedMotion, $Te as useRunSchedule, ZTe as useSaveFollowSchedule, $Y as useSaveSettings, tEe as useSaveThumbnailMode, EJ as useTable, GJ as useTablePreferences, gL as useViewGlide, tTe as victimBytes, Oge as vl, Lye as wantName, _Fe as watchNote, j3 as watchedShare, Ac as wireHorizontalScroller, pEe as withOrganizeJob, Vye as writeJavQuery, yge as z3 };-//# debugId=f801708c-39a2-426c-b8b8-125b72b1203f\ No newline at end of file+//# debugId=55ad84bc-7f0e-4837-a16a-dc8d88edf1a7\ No newline at end of filediff --git a/web/dist/peach-app.review-page-DL1KGdJQ.js b/web/dist/peach-app.review-page-CO7z9DNb.jssimilarity index 58%rename from web/dist/peach-app.review-page-DL1KGdJQ.jsrename to web/dist/peach-app.review-page-CO7z9DNb.jsindex 215d00e53..77bedbb49 100644--- a/web/dist/peach-app.review-page-DL1KGdJQ.js+++ b/web/dist/peach-app.review-page-CO7z9DNb.js@@ -1,28 +1,164 @@(function() {try {var e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, t = new e.Error().stack;- t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "b2e6e0df-6153-423b-bbad-573b949ff2f1", e._sentryDebugIdIdentifier = "sentry-dbid-b2e6e0df-6153-423b-bbad-573b949ff2f1");+ t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "1782917c-5973-404e-b283-0af9db690636", e._sentryDebugIdIdentifier = "sentry-dbid-1782917c-5973-404e-b283-0af9db690636");} catch {}})();-import { $b4f18e3395fe64d7$export$3d96ec278d3efce4 as e, $b4f18e3395fe64d7$export$3e41faf802a29e71 as t, $b4f18e3395fe64d7$export$b2539bed5023c21c as n, $ea3928288112382f$export$439d29a4e110a164 as r, $fe21c36db05242bb$export$a98f0dcb43a68a25 as i, $fe21c36db05242bb$export$d7b12c4107be0d61 as a, Button as o, ButtonLink as s, Checkbox as c, CheckboxGlyph as l, Chip as u, CollapseChevron as d, CollapseRegion as f, DEFAULT_CATEGORY as p, ENTITY_REVIEW_KINDS as m, Ea as h, EmptyState as ee, ExternalLink as g, FIELDSET_FOOT as _, FilterGlassRows as v, Gg as y, InputBase as b, LinkButton as te, Note as ne, REVIEW_CATEGORIES as x, REVIEW_DECISION_LABELS as re, REVIEW_KEY as S, REVIEW_LABELS as C, REVIEW_QUEUES as w, REVIEW_QUEUE_LABELS as T, Select as E, SelectItem as D, SelectionActions as O, SelectionDock as k, TextField as A, Wt as j, __toESM as M, avatarInner as N, busyProps as P, canApprove as ie, cardClass as F, commonReviewSources as ae, composingKey as I, currentReviewRow as oe, cx as L, decisionPayload as se, decisionReceipt as ce, defaultChoice as le, errorMessage as ue, fetchReview as de, filterReviewRows as fe, groupReviewRows as pe, isReviewCategory as me, l7 as R, m7 as he, mirrorText as ge, paginationRange as _e, pendingGenres as ve, recordGenre as ye, reloadReview as be, require_jsx_runtime as xe, require_react as Se, reviewGroupingOptions as Ce, reviewQueueData as we, reviewQueueOf as Te, reviewWindow as Ee, rowEvidence as z, rowFieldName as De, rowSubject as Oe, rowTags as ke, rowTitle as B, selectReviewRange as Ae, settleReviewRows as je, spinnerHtml as V, submitDecision as Me, useMutation as Ne, useOverlayScrollbar as Pe, useQuery as Fe, useViewGlide as Ie } from "./peach-app.js";+import { $b4f18e3395fe64d7$export$3d96ec278d3efce4 as e, $b4f18e3395fe64d7$export$3e41faf802a29e71 as t, $b4f18e3395fe64d7$export$b2539bed5023c21c as n, $ea3928288112382f$export$439d29a4e110a164 as r, $fe21c36db05242bb$export$a98f0dcb43a68a25 as i, $fe21c36db05242bb$export$d7b12c4107be0d61 as a, Button as o, ButtonLink as s, Checkbox as c, CheckboxGlyph as l, Chip as u, CollapseChevron as d, CollapseRegion as f, DEFAULT_CATEGORY as p, ENTITY_REVIEW_KINDS as m, Ea as h, EmptyState as ee, ExternalLink as g, FIELDSET_FOOT as _, FilterGlassRows as v, Gg as y, InputBase as te, LinkButton as ne, Note as b, REVIEW_CATEGORIES as x, REVIEW_DECISION_LABELS as re, REVIEW_KEY as S, REVIEW_LABELS as C, REVIEW_QUEUES as w, REVIEW_QUEUE_LABELS as T, Select as E, SelectItem as D, SelectionActions as O, SelectionDock as k, TextField as A, Wt as j, __toESM as M, apiGet as N, apiSend as P, avatarInner as F, busyProps as I, canApprove as ie, cardClass as L, commonReviewSources as ae, composingKey as R, confirmModal as oe, currentReviewRow as se, cx as z, decisionPayload as ce, decisionReceipt as le, defaultChoice as ue, errorMessage as B, fetchReview as de, filterReviewRows as fe, groupReviewRows as pe, isReviewCategory as me, l7 as he, localTime as ge, m7 as _e, mirrorText as ve, paginationRange as ye, pendingGenres as be, queryClient as V, recordGenre as xe, reloadReview as Se, require_jsx_runtime as Ce, require_react as H, reviewGroupingOptions as we, reviewQueueData as Te, reviewQueueOf as Ee, reviewWindow as De, rowEvidence as U, rowFieldName as W, rowSubject as Oe, rowTags as ke, rowTitle as G, selectReviewRange as Ae, settleReviewRows as je, spinnerHtml as Me, submitDecision as Ne, useMutation as Pe, useOverlayScrollbar as K, useQuery as Fe, useViewGlide as Ie } from "./peach-app.js";import { Page as Le } from "./peach-app.page-QAncjzM1.js";-import { LEGACY_AVATAR_IMG as Re } from "./peach-app.legacy-avatar-NSITxLRS.js";-import { PillAriaTabList as ze } from "./peach-app.pill-aria-tab-list-BMY1ZEv1.js";+import { DataTable as Re } from "./peach-app.data-table-aWN3V7mT.js";+import { LEGACY_AVATAR_IMG as ze } from "./peach-app.legacy-avatar-NSITxLRS.js";+import { PillAriaTabList as Be } from "./peach-app.pill-aria-tab-list-BMY1ZEv1.js";+// src/react/review/auto-landings.ts+var q = /* @__PURE__ */ M(H(), 1), Ve = "/api/review/auto-landings", He = "/api/review/auto-landings/revert", Ue = ["review", "auto-landings"], J = (e) => N(Ve, e), Y = (e) => N(`${Ve}?batches=${encodeURIComponent(e.join(","))}`), We = (e, t) => P(He, {+ batches: e,+ token: t+}), Ge = (e) => e.at === null ? "" : ge((/* @__PURE__ */ new Date(e.at * 1e3)).toISOString());+function Ke(e) {+ return e.assets ? `${e.items} 项资料 · ${e.assets} 部作品` : `${e.items} 项资料 · ${e.tags} 个标签`;+}+var qe = (e) => e.code || e.name || `#${e.asset_id}`, Je = (e) => e ? `「${e}」` : "空";+function X(e) {+ return [+ ...e.restores.map((e) => `${qe(e)} ${e.field}:${Je(e.current)} 改回 ${Je(e.previous)}`),+ ...e.tags.map((e) => `${qe(e)} 删除标签「${e.tag}」`),+ ...e.changed.map((e) => e.gone ? `${qe(e)} ${e.field}:作品已不在账本中,跳过` : `${qe(e)} ${e.field}:之后已被修改,保留现值`)+ ];+}+function Z(e) {+ let t = [e.restores.length ? `改回 ${e.restores.length} 部作品的资料` : "", e.tags.length ? `删除 ${e.tags.length} 个自动补上的标签` : ""].filter(Boolean);+ return [+ `将撤回 ${e.batches.length} 批自动写入:${t.join(",") || "没有要改的资料"}。`,+ e.changed.length ? `${e.changed.length} 部作品写入后又被修改或已删除,不改动。` : "",+ e.other_batches.length ? `所选标签的补写记录还连带 ${e.other_batches.length} 个其他批次,一并撤回。` : "",+ "撤回前会自动备份账本。下一轮资料处理仍按同一判据判断,可能再次写入。"+ ].filter(Boolean).join("");+}+function Ye(e) {+ let t = [e.restored ? `改回 ${e.restored} 部作品的资料` : "", e.removed_tags ? `删除 ${e.removed_tags} 个标签` : ""].filter(Boolean);+ return `已撤回 ${e.batches.length} 批自动写入${t.length ? `:${t.join(",")}` : ""}`;+}+// src/react/review/auto-landings-card.tsx+var Q = Ce(), Xe = "资料处理按确定判据自动写入的标题、发行日期与标签。撤回会把覆盖的值改回写入前、删掉补上的标签;写入后又被修改过的作品保留现值。";+function Ze({ locked: e, openItem: t, toast: n }) {+ let [r, i] = (0, q.useState)([]), [a, s] = (0, q.useState)(null), c = Fe({+ queryKey: Ue,+ queryFn: ({ signal: e }) => J(e)+ }), l = c.data?.items ?? [], u = Pe({+ mutationFn: async (e) => {+ let t = await Y(e), { confirmed: n, result: r } = await oe({+ title: "撤回自动写入",+ body: Z(t),+ items: X(t),+ confirmLabel: "撤回",+ onConfirm: () => We(t.batches, t.token)+ });+ return n ? r : null;+ },+ onSuccess: (e) => {+ e && (s(e), i([]), n(Ye(e)), V.invalidateQueries({ queryKey: S }));+ },+ onError: (e) => n(B(e))+ });+ return !l.length && !a && !c.isError ? null : /* @__PURE__ */ (0, Q.jsxs)("section", {+ "aria-labelledby": "auto-landings-title",+ className: "flex flex-col gap-4",+ children: [a ? /* @__PURE__ */ (0, Q.jsxs)(b, {+ tone: "success",+ title: Ye(a),+ children: [/* @__PURE__ */ (0, Q.jsx)("p", {+ className: "text-body-2-regular",+ children: `撤回前的账本已备份为 ${a.backup}。`+ }), a.changed.length ? /* @__PURE__ */ (0, Q.jsxs)("p", {+ className: "flex flex-wrap items-center gap-x-2 gap-y-1 text-body-2-regular",+ children: [`${a.changed.length} 部作品写入后又被修改或已删除,未改动:`, a.changed.map((e) => e.gone ? /* @__PURE__ */ (0, Q.jsx)("span", {+ className: "text-text-secondary",+ children: `#${e.asset_id}(已删除)`+ }, `${e.asset_id}:${e.field}`) : /* @__PURE__ */ (0, Q.jsx)(ne, {+ size: "small",+ onClick: () => t(e.asset_id),+ children: e.code || e.name || `#${e.asset_id}`+ }, `${e.asset_id}:${e.field}`))]+ }) : null]+ }) : null, c.isError ? /* @__PURE__ */ (0, Q.jsx)(b, {+ tone: "error",+ title: "读取自动写入的资料失败",+ children: B(c.error)+ }) : l.length ? /* @__PURE__ */ (0, Q.jsx)(Re, {+ label: "自动写入的批次",+ items: l,+ columns: [+ {+ id: "rule",+ label: "规则",+ width: 360,+ min: 260,+ value: (e) => e.label,+ render: (e) => /* @__PURE__ */ (0, Q.jsxs)("span", {+ className: "flex min-w-0 flex-col gap-0.5",+ children: [/* @__PURE__ */ (0, Q.jsx)("span", {+ className: "truncate text-body-regular text-text-primary",+ children: e.label+ }), /* @__PURE__ */ (0, Q.jsx)("small", {+ title: e.batch,+ className: "truncate text-caption-1-regular text-text-secondary",+ children: e.batch+ })]+ })+ },+ {+ id: "at",+ label: "时间",+ width: 160,+ min: 136,+ value: (e) => e.at ?? 0,+ render: (e) => /* @__PURE__ */ (0, Q.jsx)("span", {+ className: "tabular-nums",+ children: Ge(e) || "未知"+ })+ },+ {+ id: "impact",+ label: "影响",+ width: 200,+ min: 160,+ value: (e) => e.items,+ render: (e) => Ke(e)+ }+ ],+ title: "自动写入的资料",+ titleId: "auto-landings-title",+ unit: "批",+ description: Xe,+ rowId: (e) => e.batch,+ rowLabel: (e) => `${e.label} ${Ge(e)}`,+ selected: r,+ onSelected: i,+ actions: (t) => /* @__PURE__ */ (0, Q.jsx)(o, {+ variant: "secondary",+ size: "small",+ disabled: e || !t.length,+ ...I(u.isPending),+ onClick: () => u.mutate(t.map((e) => e.batch)),+ children: `撤回所选(${t.length})`+ })+ }) : null]+ });+}// src/react/review/bulk-toolbar.tsx-var H = /* @__PURE__ */ M(Se(), 1), U = xe();-function Be(e) {- let { groupOptions: t, groupBy: n, onGroupBy: r, groups: i, filter: a, onFilter: s, pageKeys: c, selected: l, onSelected: u, selectedRows: d, metadata: f, approvable: p, busy: m, feedback: h, onUnifySource: ee, onRun: g, queueView: _ = "pending", queueCounts: y, onQueueChange: b, locked: te, fields: ne, fieldFilter: x, onFieldFilter: re } = e, S = c.filter((e) => l.has(e)), C = S.length > 0 && S.length === c.length, O = ae(d), A = f && d.some((e) => (e.candidates?.length || 0) > 1), j = O.length ? "统一选择来源" : "所选项目无共同来源", M = (0, H.useRef)(null), N = (0, H.useRef)(null), P = (0, H.useRef)(null), [ie, F] = (0, H.useState)(!1), I = Ie(M, N, "[data-entity-state][aria-pressed=\"true\"]", _);- return (0, H.useLayoutEffect)(() => {+function Qe(e) {+ let { groupOptions: t, groupBy: n, onGroupBy: r, groups: i, filter: a, onFilter: s, pageKeys: c, selected: l, onSelected: u, selectedRows: d, metadata: f, approvable: p, busy: m, feedback: h, onUnifySource: ee, onRun: g, queueView: _ = "pending", queueCounts: y, onQueueChange: te, locked: ne, fields: b, fieldFilter: x, onFieldFilter: re } = e, S = c.filter((e) => l.has(e)), C = S.length > 0 && S.length === c.length, O = ae(d), A = f && d.some((e) => (e.candidates?.length || 0) > 1), j = O.length ? "统一选择来源" : "所选项目无共同来源", M = (0, q.useRef)(null), N = (0, q.useRef)(null), P = (0, q.useRef)(null), [F, I] = (0, q.useState)(!1), ie = Ie(M, N, "[data-entity-state][aria-pressed=\"true\"]", _);+ return (0, q.useLayoutEffect)(() => {let e = N.current, t = P.current, n = e?.parentElement, r = e?.closest("[data-review-filter]");if (!e || !t || !n || !r) return;- let i = () => F(t.offsetHeight > 0 && Math.abs(n.getBoundingClientRect().top - t.getBoundingClientRect().top) < 1), a = new ResizeObserver(i);+ let i = () => I(t.offsetHeight > 0 && Math.abs(n.getBoundingClientRect().top - t.getBoundingClientRect().top) < 1), a = new ResizeObserver(i);for (let n of [r,e,t]) a.observe(n);return i(), () => a.disconnect();- }, []), /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsx)(v, {+ }, []), /* @__PURE__ */ (0, Q.jsxs)(Q.Fragment, { children: [/* @__PURE__ */ (0, Q.jsx)(v, {label: "复核筛选",topLabel: "处理状态",attrs: { "data-review-filter": "" },@@ -30,49 +166,49 @@ function Be(e) {topClassName: "max-w-full flex-none",bottomClassName: c.length ? "min-h-12 max-w-full flex-none flex-wrap" : "hidden",bottomRef: P,- panes: /* @__PURE__ */ (0, U.jsx)("span", {+ panes: /* @__PURE__ */ (0, Q.jsx)("span", {ref: M,"data-view-glide": "","aria-hidden": "true"}),- top: /* @__PURE__ */ (0, U.jsxs)("div", {+ top: /* @__PURE__ */ (0, Q.jsxs)("div", {ref: N,role: "group","aria-label": "复核状态","data-entity-states": "",- onPointerLeave: I.leave,- children: [w.map((e) => /* @__PURE__ */ (0, U.jsxs)("button", {+ onPointerLeave: ie.leave,+ children: [w.map((e) => /* @__PURE__ */ (0, Q.jsxs)("button", {type: "button","data-entity-state": e,"data-entity-press": "",disabled: m,"aria-pressed": _ === e,- onPointerEnter: I.hover,+ onPointerEnter: ie.hover,onClick: () => {- e !== _ && b(e);+ e !== _ && te(e);},children: [- /* @__PURE__ */ (0, U.jsx)("span", {+ /* @__PURE__ */ (0, Q.jsx)("span", {"data-copy-key": `review.queue.${e}`,children: T[e]})," ",- /* @__PURE__ */ (0, U.jsx)("span", {+ /* @__PURE__ */ (0, Q.jsx)("span", {className: "ms-1.5 tabular-nums text-caption-1-medium text-text-secondary",children: y ? y[e].toLocaleString() : "…"})]- }, e)), /* @__PURE__ */ (0, U.jsx)("span", {+ }, e)), /* @__PURE__ */ (0, Q.jsx)("span", {"data-entity-sep": "","aria-hidden": "true",- className: ie ? void 0 : "invisible"+ className: F ? void 0 : "invisible"})]}),- bottom: c.length ? /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [- f && ne.length ? /* @__PURE__ */ (0, U.jsxs)(E, {+ bottom: c.length ? /* @__PURE__ */ (0, Q.jsxs)(Q.Fragment, { children: [+ f && b.length ? /* @__PURE__ */ (0, Q.jsxs)(E, {"aria-label": "筛选资料字段",size: "sm",- prefix: /* @__PURE__ */ (0, U.jsx)("span", {+ prefix: /* @__PURE__ */ (0, Q.jsx)("span", {"data-copy-key": "review.filter.field",className: "pointer-events-auto",children: "字段"@@ -82,27 +218,27 @@ function Be(e) {onSelectionChange: (e) => {e !== null && re(String(e) === "*" ? "" : String(e));},- children: [/* @__PURE__ */ (0, U.jsx)(D, {+ children: [/* @__PURE__ */ (0, Q.jsx)(D, {id: "*",children: "全部"- }), ne.map((e) => /* @__PURE__ */ (0, U.jsx)(D, {+ }), b.map((e) => /* @__PURE__ */ (0, Q.jsx)(D, {id: e.key,children: `${e.title} · ${e.rows.length}`}, e.key))]}) : null,- /* @__PURE__ */ (0, U.jsx)(E, {+ /* @__PURE__ */ (0, Q.jsx)(E, {"aria-label": "筛选分组方式",size: "sm",selectedKey: n,onSelectionChange: (e) => {e !== null && r(String(e));},- children: t.map(([e, t]) => /* @__PURE__ */ (0, U.jsx)(D, {+ children: t.map(([e, t]) => /* @__PURE__ */ (0, Q.jsx)(D, {id: e,children: t}, e))}),- i.length > 1 ? /* @__PURE__ */ (0, U.jsxs)(E, {+ i.length > 1 ? /* @__PURE__ */ (0, Q.jsxs)(E, {"aria-label": n === "field" ? "筛选字段分类" : "筛选当前分类",size: "sm",prefix: "分类",@@ -110,18 +246,18 @@ function Be(e) {onSelectionChange: (e) => {e !== null && s(String(e) === "*" ? "" : String(e));},- children: [/* @__PURE__ */ (0, U.jsx)(D, {+ children: [/* @__PURE__ */ (0, Q.jsx)(D, {id: "*",children: "全部"- }), i.map((e) => /* @__PURE__ */ (0, U.jsx)(D, {+ }), i.map((e) => /* @__PURE__ */ (0, Q.jsx)(D, {id: e.key,children: `${e.title} · ${e.rows.length}`}, e.key))]}) : null,- te ? null : /* @__PURE__ */ (0, U.jsx)(o, {+ ne ? null : /* @__PURE__ */ (0, Q.jsx)(o, {variant: "secondary",size: "small",- leadingIcon: R,+ leadingIcon: he,"aria-pressed": C,disabled: m,onClick: () => {@@ -132,12 +268,12 @@ function Be(e) {children: C ? "清空当前选择" : a ? "全选当前分类" : "全选本页"})] }) : null- }), /* @__PURE__ */ (0, U.jsxs)(k, {+ }), /* @__PURE__ */ (0, Q.jsxs)(k, {label: "复核所选项目",- visible: !te && l.size > 0,+ visible: !ne && l.size > 0,count: `已选 ${l.size} 项`,children: [- A && _ !== "ignored" ? /* @__PURE__ */ (0, U.jsxs)(E, {+ A && _ !== "ignored" ? /* @__PURE__ */ (0, Q.jsxs)(E, {"aria-label": "统一选择来源",size: "sm",selectedKey: "",@@ -145,49 +281,49 @@ function Be(e) {onSelectionChange: (e) => {e !== null && e !== "" && ee(String(e));},- children: [/* @__PURE__ */ (0, U.jsx)(D, {+ children: [/* @__PURE__ */ (0, Q.jsx)(D, {id: "",children: j- }), O.map((e) => /* @__PURE__ */ (0, U.jsx)(D, {+ }), O.map((e) => /* @__PURE__ */ (0, Q.jsx)(D, {id: e,children: e}, e))]}) : null,- _ === "ignored" ? null : /* @__PURE__ */ (0, U.jsx)(o, {+ _ === "ignored" ? null : /* @__PURE__ */ (0, Q.jsx)(o, {variant: "ghost",size: "small",disabled: m || !l.size,onClick: () => g("rejected"),children: "忽略所选"}),- _ === "pending" ? /* @__PURE__ */ (0, U.jsx)(o, {+ _ === "pending" ? /* @__PURE__ */ (0, Q.jsx)(o, {variant: "secondary",size: "small",disabled: m || !l.size,onClick: () => g("skipped"),children: "稍后处理所选"- }) : /* @__PURE__ */ (0, U.jsx)(o, {+ }) : /* @__PURE__ */ (0, Q.jsx)(o, {variant: _ === "ignored" ? "primary" : "secondary",size: "small",disabled: m || !l.size,onClick: () => g("restore"),children: "恢复所选"}),- _ === "ignored" ? null : /* @__PURE__ */ (0, U.jsx)(o, {+ _ === "ignored" ? null : /* @__PURE__ */ (0, Q.jsx)(o, {variant: "primary",size: "small",disabled: m || !l.size || !p,onClick: () => g("approved"),children: "通过所选"}),- /* @__PURE__ */ (0, U.jsx)(o, {+ /* @__PURE__ */ (0, Q.jsx)(o, {variant: "ghost",size: "small",disabled: m,onClick: () => u(/* @__PURE__ */ new Set()),children: "取消选择"}),- h ? /* @__PURE__ */ (0, U.jsx)("p", {+ h ? /* @__PURE__ */ (0, Q.jsx)("p", {role: "status",className: "w-full text-body-2-regular text-text-secondary",children: h@@ -196,7 +332,7 @@ function Be(e) {})] });}// src/react/boardui/components/base/radio/radio.tsx-var W = {+var $e = {sm: {dot: "size-3.5",inner: "size-[5px]",@@ -214,44 +350,44 @@ var W = {label: "text-body-medium"}};-function Ve({ selected: e = !1, size: t = "sm", focusVisible: n = !1, className: r }) {- let i = W[t];- return /* @__PURE__ */ (0, U.jsxs)("span", {+function et({ selected: e = !1, size: t = "sm", focusVisible: n = !1, className: r }) {+ let i = $e[t];+ return /* @__PURE__ */ (0, Q.jsxs)("span", {"aria-hidden": !0,- className: L("relative flex shrink-0 items-center justify-center rounded-full", i.dot, n && "ring-2 ring-border-focus-ring ring-offset-2", r),+ className: z("relative flex shrink-0 items-center justify-center rounded-full", i.dot, n && "ring-2 ring-border-focus-ring ring-offset-2", r),children: [- /* @__PURE__ */ (0, U.jsx)("span", { className: L("absolute inset-0 rounded-full border-border-checkbox-default bg-background-primary-default shadow-xs", "transition-opacity duration-200 ease", i.border, e && "opacity-0") }),- /* @__PURE__ */ (0, U.jsx)("span", { className: L("absolute inset-0 rounded-full", "transition-opacity duration-200 ease", i.selected, !e && "opacity-0") }),- /* @__PURE__ */ (0, U.jsx)("span", { className: L("absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-control-indicator-background", "transition-[scale,opacity] duration-200 ease", i.inner, e ? "scale-100 opacity-100" : "scale-0 opacity-0") })+ /* @__PURE__ */ (0, Q.jsx)("span", { className: z("absolute inset-0 rounded-full border-border-checkbox-default bg-background-primary-default shadow-xs", "transition-opacity duration-200 ease", i.border, e && "opacity-0") }),+ /* @__PURE__ */ (0, Q.jsx)("span", { className: z("absolute inset-0 rounded-full", "transition-opacity duration-200 ease", i.selected, !e && "opacity-0") }),+ /* @__PURE__ */ (0, Q.jsx)("span", { className: z("absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-control-indicator-background", "transition-[scale,opacity] duration-200 ease", i.inner, e ? "scale-100 opacity-100" : "scale-0 opacity-0") })]});}-function G({ className: e, children: t, ref: n, ...r }) {- return /* @__PURE__ */ (0, U.jsx)(i, {+function tt({ className: e, children: t, ref: n, ...r }) {+ return /* @__PURE__ */ (0, Q.jsx)(i, {ref: n,...r,- className: (t) => L("flex flex-col gap-2", typeof e == "function" ? e(t) : e),+ className: (t) => z("flex flex-col gap-2", typeof e == "function" ? e(t) : e),children: t});}// src/react/boardui/components/base/radio/radio-card.tsx-function He({ className: e, title: t, description: n, ref: r, ...i }) {- return /* @__PURE__ */ (0, U.jsx)(a, {+function nt({ className: e, title: t, description: n, ref: r, ...i }) {+ return /* @__PURE__ */ (0, Q.jsx)(a, {ref: r,...i,- className: (t) => L("group flex w-full items-center justify-between gap-3 rounded-2lg border border-border-button-default py-3 pe-5 ps-4 select-none", "transition-colors duration-150 ease", t.isHovered && !t.isDisabled ? "bg-background-primary-hover" : "bg-background-primary-default", t.isDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer", typeof e == "function" ? e(t) : e),- children: (e) => /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsxs)("span", {+ className: (t) => z("group flex w-full items-center justify-between gap-3 rounded-2lg border border-border-button-default py-3 pe-5 ps-4 select-none", "transition-colors duration-150 ease", t.isHovered && !t.isDisabled ? "bg-background-primary-hover" : "bg-background-primary-default", t.isDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer", typeof e == "function" ? e(t) : e),+ children: (e) => /* @__PURE__ */ (0, Q.jsxs)(Q.Fragment, { children: [/* @__PURE__ */ (0, Q.jsxs)("span", {className: "flex min-w-0 flex-col gap-0.5",- children: [/* @__PURE__ */ (0, U.jsx)("span", {+ children: [/* @__PURE__ */ (0, Q.jsx)("span", {className: "truncate text-body-medium text-text-primary",children: t- }), n != null && /* @__PURE__ */ (0, U.jsx)("span", {+ }), n != null && /* @__PURE__ */ (0, Q.jsx)("span", {className: "truncate text-body-regular text-text-secondary",children: n})]- }), /* @__PURE__ */ (0, U.jsx)("span", {+ }), /* @__PURE__ */ (0, Q.jsx)("span", {className: "flex shrink-0 items-center py-1",- children: /* @__PURE__ */ (0, U.jsx)(Ve, {+ children: /* @__PURE__ */ (0, Q.jsx)(et, {size: "md",selected: e.isSelected,focusVisible: e.isFocusVisible@@ -260,7 +396,7 @@ function He({ className: e, title: t, description: n, ref: r, ...i }) {});}// node_modules/diff/libesm/diff/base.js-var K = class {+var $ = class {diff(e, t, n = {}) {let r;typeof n == "function" ? (r = n, n = {}) : "callback" in n && (r = n.callback);@@ -388,41 +524,41 @@ var K = class {}return r;}-}, Ue = new class extends K {}();-function We(e, t, n) {- return Ue.diff(e, t, n);+}, rt = new class extends $ {}();+function it(e, t, n) {+ return rt.diff(e, t, n);}// node_modules/diff/libesm/util/string.js-function Ge(e, t) {+function at(e, t) {let n = 0;for (; n < e.length && n < t.length; n++) if (e[n] != t[n]) return e.slice(0, n);return e.slice(0, n);}-function Ke(e, t) {+function ot(e, t) {let n;if (!e || !t || e[e.length - 1] != t[t.length - 1]) return "";for (n = 0; n < e.length && n < t.length; n++) if (e[e.length - (n + 1)] != t[t.length - (n + 1)]) return e.slice(-n);return e.slice(-n);}-function q(e, t, n) {+function st(e, t, n) {if (e.slice(0, t.length) != t) throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n + e.slice(t.length);}-function J(e, t, n) {+function ct(e, t, n) {if (!t) return e + n;if (e.slice(-t.length) != t) throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0, -t.length) + n;}-function Y(e, t) {- return q(e, t, "");+function lt(e, t) {+ return st(e, t, "");}-function X(e, t) {- return J(e, t, "");+function ut(e, t) {+ return ct(e, t, "");}-function qe(e, t) {- return t.slice(0, Je(e, t));+function dt(e, t) {+ return t.slice(0, ft(e, t));}-function Je(e, t) {+function ft(e, t) {let n = 0;e.length > t.length && (n = e.length - t.length);let r = t.length;@@ -440,7 +576,7 @@ function Je(e, t) {}return a;}-function Ye(e, t) {+function pt(e, t) {let n = [];for (let r of Array.from(t.segment(e))) {let e = r.segment;@@ -448,26 +584,26 @@ function Ye(e, t) {}return n;}-function Z(e, t) {- if (t) return $(e, t)[1];+function mt(e, t) {+ if (t) return gt(e, t)[1];let n;for (n = e.length - 1; n >= 0 && e[n].match(/\s/); n--);return e.substring(n + 1);}-function Q(e, t) {- if (t) return $(e, t)[0];+function ht(e, t) {+ if (t) return gt(e, t)[0];let n = e.match(/^\s*/);return n ? n[0] : "";}-function $(e, t) {- if (!t) return [Q(e), Z(e)];+function gt(e, t) {+ if (!t) return [ht(e), mt(e)];if (t.resolvedOptions().granularity != "word") throw Error("The segmenter passed must have a granularity of \"word\"");- let n = Ye(e, t), r = n[0], i = n[n.length - 1];+ let n = pt(e, t), r = n[0], i = n[n.length - 1];return [/\s/.test(r) ? r : "", /\s/.test(i) ? i : ""];}// node_modules/diff/libesm/diff/word.js-var Xe = "a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}", Ze = RegExp(`[${Xe}]+|\\s+|[^${Xe}]`, "ug");-new class extends K {+var _t = "a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}", vt = RegExp(`[${_t}]+|\\s+|[^${_t}]`, "ug");+new class extends $ {equals(e, t, n) {return n.ignoreCase && (e = e.toLowerCase(), t = t.toLowerCase()), e.trim() === t.trim();}@@ -476,8 +612,8 @@ new class extends K {if (t.intlSegmenter) {let r = t.intlSegmenter;if (r.resolvedOptions().granularity != "word") throw Error("The segmenter passed must have a granularity of \"word\"");- n = Ye(e, r);- } else n = e.match(Ze) || [];+ n = pt(e, r);+ } else n = e.match(vt) || [];let r = [], i = null;return n.forEach((e) => {/\s/.test(e) ? i == null ? r.push(e) : r.push(r.pop() + e) : i != null && /\s/.test(i) ? r[r.length - 1] == i ? r.push(r.pop() + e) : r.push(i + e) : r.push(e), i = e;@@ -490,57 +626,57 @@ new class extends K {if (!e || t.oneChangePerToken) return e;let n = null, r = null, i = null;return e.forEach((e) => {- e.added ? r = e : e.removed ? i = e : ((r || i) && Qe(n, i, r, e, t.intlSegmenter), n = e, r = null, i = null);- }), (r || i) && Qe(n, i, r, null, t.intlSegmenter), e;+ e.added ? r = e : e.removed ? i = e : ((r || i) && yt(n, i, r, e, t.intlSegmenter), n = e, r = null, i = null);+ }), (r || i) && yt(n, i, r, null, t.intlSegmenter), e;}}();-function Qe(e, t, n, r, i) {+function yt(e, t, n, r, i) {if (t && n) {- let [a, o] = $(t.value, i), [s, c] = $(n.value, i);+ let [a, o] = gt(t.value, i), [s, c] = gt(n.value, i);if (e) {- let r = Ge(a, s);- e.value = J(e.value, s, r), t.value = Y(t.value, r), n.value = Y(n.value, r);+ let r = at(a, s);+ e.value = ct(e.value, s, r), t.value = lt(t.value, r), n.value = lt(n.value, r);}if (r) {- let e = Ke(o, c);- r.value = q(r.value, c, e), t.value = X(t.value, e), n.value = X(n.value, e);+ let e = ot(o, c);+ r.value = st(r.value, c, e), t.value = ut(t.value, e), n.value = ut(n.value, e);}} else if (n) {if (e) {- let e = Q(n.value, i);+ let e = ht(n.value, i);n.value = n.value.substring(e.length);}if (r) {- let e = Q(r.value, i);+ let e = ht(r.value, i);r.value = r.value.substring(e.length);}} else if (e && r) {- let n = Q(r.value, i), [a, o] = $(t.value, i), s = Ge(n, a);- t.value = Y(t.value, s);- let c = Ke(Y(n, s), o);- t.value = X(t.value, c), r.value = q(r.value, n, c), e.value = J(e.value, n, n.slice(0, n.length - c.length));+ let n = ht(r.value, i), [a, o] = gt(t.value, i), s = at(n, a);+ t.value = lt(t.value, s);+ let c = ot(lt(n, s), o);+ t.value = ut(t.value, c), r.value = st(r.value, n, c), e.value = ct(e.value, n, n.slice(0, n.length - c.length));} else if (r) {- let e = Q(r.value, i), n = qe(Z(t.value, i), e);- t.value = X(t.value, n);+ let e = ht(r.value, i), n = dt(mt(t.value, i), e);+ t.value = ut(t.value, n);} else if (e) {- let n = qe(Z(e.value, i), Q(t.value, i));- t.value = Y(t.value, n);+ let n = dt(mt(e.value, i), ht(t.value, i));+ t.value = lt(t.value, n);}}-new class extends K {+new class extends $ {tokenize(e) {- let t = RegExp(`(\\r?\\n)|[${Xe}]+|[^\\S\\n\\r]+|[^${Xe}]`, "ug");+ let t = RegExp(`(\\r?\\n)|[${_t}]+|[^\\S\\n\\r]+|[^${_t}]`, "ug");return e.match(t) || [];}-}(), new class extends K {+}(), new class extends $ {constructor() {- super(...arguments), this.tokenize = $e;+ super(...arguments), this.tokenize = bt;}equals(e, t, n) {return n.ignoreWhitespace ? (n.newlineIsToken && e.includes("\n") || (e = e.trim()), n.newlineIsToken && t.includes("\n") || (t = t.trim())) : n.ignoreNewlineAtEof && !n.newlineIsToken && (e.endsWith("\n") && (e = e.slice(0, -1)), t.endsWith("\n") && (t = t.slice(0, -1))), super.equals(e, t, n);}}();-function $e(e, t) {+function bt(e, t) {t.stripTrailingCr && (e = e.replace(/\r\n/g, "\n"));let n = [], r = e.split(/(\n|\r\n)/);r[r.length - 1] || r.pop();@@ -551,10 +687,10 @@ function $e(e, t) {return n;}// node_modules/diff/libesm/diff/sentence.js-function et(e) {+function xt(e) {return e == "." || e == "!" || e == "?";}-new class extends K {+new class extends $ {tokenize(e) {let t = [], n = 0;for (let r = 0; r < e.length; r++) {@@ -562,39 +698,39 @@ new class extends K {t.push(e.slice(n));break;}- if (et(e[r]) && e[r + 1].match(/\s/)) {+ if (xt(e[r]) && e[r + 1].match(/\s/)) {for (t.push(e.slice(n, r + 1)), r = n = r + 1; e[r + 1]?.match(/\s/);) r++;t.push(e.slice(n, r + 1)), n = r + 1;}}return t;}-}(), new class extends K {+}(), new class extends $ {tokenize(e) {return e.split(/([{}:;,]|\s+)/);}-}(), new class extends K {+}(), new class extends $ {constructor() {- super(...arguments), this.tokenize = $e;+ super(...arguments), this.tokenize = bt;}get useLongestToken() {return !0;}castInput(e, t) {let { undefinedReplacement: n, stringifyReplacer: r = (e, t) => t === void 0 ? n : t } = t;- return typeof e == "string" ? e : JSON.stringify(tt(e, null, null, r), null, " ");+ return typeof e == "string" ? e : JSON.stringify(St(e, null, null, r), null, " ");}equals(e, t, n) {return super.equals(e.replace(/,([\r\n])/g, "$1"), t.replace(/,([\r\n])/g, "$1"), n);}}();-function tt(e, t, n, r, i) {+function St(e, t, n, r, i) {t ||= [], n ||= [], r && (e = r(i === void 0 ? "" : i, e));let a = 0;for (; a < t.length; a += 1) if (t[a] === e) return n[a];let o;if (Object.prototype.toString.call(e) === "[object Array]") {- for (t.push(e), o = Array(e.length), n.push(o), a = 0; a < e.length; a += 1) o[a] = tt(e[a], t, n, r, String(a));+ for (t.push(e), o = Array(e.length), n.push(o), a = 0; a < e.length; a += 1) o[a] = St(e[a], t, n, r, String(a));return t.pop(), n.pop(), o;}if (e && e.toJSON && (e = e.toJSON()), typeof e == "object" && e) {@@ -603,12 +739,12 @@ function tt(e, t, n, r, i) {for (s in e)/* istanbul ignore else */Object.prototype.hasOwnProperty.call(e, s) && i.push(s);- for (i.sort(), a = 0; a < i.length; a += 1) s = i[a], o[s] = tt(e[s], t, n, r, s);+ for (i.sort(), a = 0; a < i.length; a += 1) s = i[a], o[s] = St(e[s], t, n, r, s);t.pop(), n.pop();} else o = e;return o;}-new class extends K {+new class extends $ {tokenize(e) {return e.slice();}@@ -620,19 +756,19 @@ new class extends K {}}();// src/react/review/comparison-text.tsx-function nt({ value: e, reference: t }) {- let n = (0, H.useMemo)(() => t ? We(t, e).filter((e) => !e.removed) : [{+function Ct({ value: e, reference: t }) {+ let n = (0, q.useMemo)(() => t ? it(t, e).filter((e) => !e.removed) : [{value: e,added: !1}], [e, t]);- return /* @__PURE__ */ (0, U.jsx)(U.Fragment, { children: n.map((e, t) => e.added ? /* @__PURE__ */ (0, U.jsx)("mark", {+ return /* @__PURE__ */ (0, Q.jsx)(Q.Fragment, { children: n.map((e, t) => e.added ? /* @__PURE__ */ (0, Q.jsx)("mark", {"data-review-difference": "",className: "rounded-sm bg-status-yellow-background text-status-yellow-text",children: e.value- }, t) : /* @__PURE__ */ (0, U.jsx)("span", { children: e.value }, t)) });+ }, t) : /* @__PURE__ */ (0, Q.jsx)("span", { children: e.value }, t)) });}// src/react/review/candidate-form.tsx-var rt = {+var wt = {title: "标题",original_title: "原标题",runtime: "来源时长",@@ -642,18 +778,18 @@ var rt = {cover_url: "封面",screenshot_urls: "截图",trailer_url: "预告片"-}, it = "reviewgenretags";-function at({ tags: e }) {- return e.length ? /* @__PURE__ */ (0, U.jsx)("datalist", {- id: it,- children: e.map((e) => /* @__PURE__ */ (0, U.jsx)("option", { value: e }, e))+}, Tt = "reviewgenretags";+function Et({ tags: e }) {+ return e.length ? /* @__PURE__ */ (0, Q.jsx)("datalist", {+ id: Tt,+ children: e.map((e) => /* @__PURE__ */ (0, Q.jsx)("option", { value: e }, e))}) : null;}-function ot({ candidate: e, row: t }) {- let [n, r] = (0, H.useState)(!1), i = (0, H.useId)(), a = Object.entries(e.catalog_evidence || {}).filter(([, e]) => e && e.display_value);- return a.length ? /* @__PURE__ */ (0, U.jsxs)("div", {+function Dt({ candidate: e, row: t }) {+ let [n, r] = (0, q.useState)(!1), i = (0, q.useId)(), a = Object.entries(e.catalog_evidence || {}).filter(([, e]) => e && e.display_value);+ return a.length ? /* @__PURE__ */ (0, Q.jsxs)("div", {className: "min-w-0",- children: [/* @__PURE__ */ (0, U.jsxs)(o, {+ children: [/* @__PURE__ */ (0, Q.jsxs)(o, {variant: "secondary",size: "small",leadingIcon: d,@@ -661,30 +797,30 @@ function ot({ candidate: e, row: t }) {"aria-controls": i,"aria-label": `${n ? "收起" : "展开"} ${e.source || "该来源"} 的来源依据`,onClick: () => r(!n),- children: [/* @__PURE__ */ (0, U.jsx)("span", {+ children: [/* @__PURE__ */ (0, Q.jsx)("span", {"data-copy-key": "review.card.source_evidence",children: "来源依据"}), ` · ${a.length}`]- }), /* @__PURE__ */ (0, U.jsx)(f, {+ }), /* @__PURE__ */ (0, Q.jsx)(f, {id: i,open: n,- children: /* @__PURE__ */ (0, U.jsx)("dl", {+ children: /* @__PURE__ */ (0, Q.jsx)("dl", {className: "flex min-w-0 flex-col gap-2 px-3 pt-2 pb-1",- children: a.map(([n, r]) => /* @__PURE__ */ (0, U.jsxs)("div", {+ children: a.map(([n, r]) => /* @__PURE__ */ (0, Q.jsxs)("div", {className: "flex min-w-0 flex-wrap gap-x-2",children: [- /* @__PURE__ */ (0, U.jsx)("dt", {+ /* @__PURE__ */ (0, Q.jsx)("dt", {className: "text-caption-1-regular text-text-tertiary",- children: rt[n] || n+ children: wt[n] || n}),- /* @__PURE__ */ (0, U.jsx)("dd", {+ /* @__PURE__ */ (0, Q.jsx)("dd", {className: "min-w-0 text-body-2-regular break-words text-text-primary",- children: /* @__PURE__ */ (0, U.jsx)(nt, {+ children: /* @__PURE__ */ (0, Q.jsx)(Ct, {value: r.display_value || "",reference: n === t.field && t.current_value ? t.current_value : t.candidates?.find((t) => t.candidate_key !== e.candidate_key && t.catalog_evidence?.[n]?.display_value)?.catalog_evidence?.[n]?.display_value})}),- (r.warnings || []).map((e) => /* @__PURE__ */ (0, U.jsx)("small", {+ (r.warnings || []).map((e) => /* @__PURE__ */ (0, Q.jsx)("small", {className: "w-full text-caption-1-regular text-status-yellow-text",children: e}, e))@@ -694,63 +830,63 @@ function ot({ candidate: e, row: t }) {})]}) : null;}-function st(e) {+function Ot(e) {let t = e.content_id || e.provider_id;return `${e.source || "未标注来源"}${e.official ? " · 官方优先" : ""}${t ? ` · ID ${t}` : ""}`;}-function ct({ candidate: e, reference: t }) {- return /* @__PURE__ */ (0, U.jsxs)("span", {+function kt({ candidate: e, reference: t }) {+ return /* @__PURE__ */ (0, Q.jsxs)("span", {className: "flex min-w-0 flex-col gap-2 whitespace-normal wrap-anywhere",- children: [/* @__PURE__ */ (0, U.jsx)("span", {+ children: [/* @__PURE__ */ (0, Q.jsx)("span", {className: "text-body-regular text-text-primary",- children: /* @__PURE__ */ (0, U.jsx)(nt, {+ children: /* @__PURE__ */ (0, Q.jsx)(Ct, {value: e.display_value || "",reference: t})- }), (e.warnings || []).map((e) => /* @__PURE__ */ (0, U.jsx)("span", {+ }), (e.warnings || []).map((e) => /* @__PURE__ */ (0, Q.jsx)("span", {className: "text-body-2-regular text-status-yellow-text",children: e}, e))]});}-function lt({ row: e, fieldName: t, value: n, onChange: r, locked: i }) {+function At({ row: e, fieldName: t, value: n, onChange: r, locked: i }) {let a = e.candidates || [];- return a.length ? a.length === 1 ? /* @__PURE__ */ (0, U.jsxs)("div", {+ return a.length ? a.length === 1 ? /* @__PURE__ */ (0, Q.jsxs)("div", {className: "flex min-w-0 flex-col gap-2",- children: [/* @__PURE__ */ (0, U.jsxs)("div", {+ children: [/* @__PURE__ */ (0, Q.jsxs)("div", {className: "flex min-w-0 flex-col gap-2 rounded-2lg bg-background-primary-default px-4 py-3",- children: [/* @__PURE__ */ (0, U.jsx)("p", {+ children: [/* @__PURE__ */ (0, Q.jsx)("p", {className: "text-body-medium text-text-primary",- children: st(a[0])- }), /* @__PURE__ */ (0, U.jsx)(ct, {+ children: Ot(a[0])+ }), /* @__PURE__ */ (0, Q.jsx)(kt, {candidate: a[0],reference: e.current_value || void 0})]- }), /* @__PURE__ */ (0, U.jsx)(ot, {+ }), /* @__PURE__ */ (0, Q.jsx)(Dt, {candidate: a[0],row: e})]- }) : /* @__PURE__ */ (0, U.jsx)(G, {+ }) : /* @__PURE__ */ (0, Q.jsx)(tt, {"aria-label": `${t || "资料"}的来源`,value: n,isDisabled: i,onChange: r,- children: /* @__PURE__ */ (0, U.jsx)("div", {+ children: /* @__PURE__ */ (0, Q.jsx)("div", {className: "flex min-w-0 flex-col gap-3",- children: a.map((t) => /* @__PURE__ */ (0, U.jsxs)("div", {+ children: a.map((t) => /* @__PURE__ */ (0, Q.jsxs)("div", {className: "flex min-w-0 flex-col gap-1",- children: [/* @__PURE__ */ (0, U.jsx)(He, {+ children: [/* @__PURE__ */ (0, Q.jsx)(nt, {value: t.candidate_key,className: "relative items-start",- title: /* @__PURE__ */ (0, U.jsx)("span", {- title: st(t),- children: st(t)+ title: /* @__PURE__ */ (0, Q.jsx)("span", {+ title: Ot(t),+ children: Ot(t)}),- description: /* @__PURE__ */ (0, U.jsx)(ct, {+ description: /* @__PURE__ */ (0, Q.jsx)(kt, {candidate: t,reference: e.current_value || a.find((e) => e.candidate_key !== t.candidate_key)?.display_value})- }), /* @__PURE__ */ (0, U.jsx)(ot, {+ }), /* @__PURE__ */ (0, Q.jsx)(Dt, {candidate: t,row: e})]@@ -758,50 +894,50 @@ function lt({ row: e, fieldName: t, value: n, onChange: r, locked: i }) {})}) : null;}-function ut({ genre: e, tags: t, locked: n, toast: r }) {- let [i, a] = (0, H.useState)(""), [s, c] = (0, H.useState)(""), l = Ne({- mutationFn: (t) => ye(e, t),+function jt({ genre: e, tags: t, locked: n, toast: r }) {+ let [i, a] = (0, q.useState)(""), [s, c] = (0, q.useState)(""), l = Pe({+ mutationFn: (t) => xe(e, t),onSuccess: async (t, n) => {- t.ok ? (r(n ? `已把「${e}」收录为标签「${n}」` : `已把「${e}」判为非内容标签`), await be()) : c(t.error || "服务端拒绝了这次收录");+ t.ok ? (r(n ? `已把「${e}」收录为标签「${n}」` : `已把「${e}」判为非内容标签`), await Se()) : c(t.error || "服务端拒绝了这次收录");},- onError: (e) => c(ue(e))+ onError: (e) => c(B(e))}), u = () => {let e = i.trim();e ? (c(""), l.mutate(e)) : c("先给它一个中文标签");};- return /* @__PURE__ */ (0, U.jsxs)("div", {+ return /* @__PURE__ */ (0, Q.jsxs)("div", {className: "flex flex-wrap items-center gap-2",children: [- /* @__PURE__ */ (0, U.jsx)("b", {+ /* @__PURE__ */ (0, Q.jsx)("b", {lang: "ja",className: "text-body-medium text-text-primary",children: e}),- /* @__PURE__ */ (0, U.jsx)(A, {+ /* @__PURE__ */ (0, Q.jsx)(A, {"aria-label": `「${e}」收录成的中文标签`,value: i,onChange: a,maxLength: 40,isDisabled: n || l.isPending,className: "min-w-40 flex-1",- children: /* @__PURE__ */ (0, U.jsx)(b, {+ children: /* @__PURE__ */ (0, Q.jsx)(te, {size: "small",- list: t.length ? it : void 0,+ list: t.length ? Tt : void 0,autoComplete: "off",placeholder: "中文标签",onKeyDown: (e) => {- e.key !== "Enter" || I(e.nativeEvent) || (e.preventDefault(), u());+ e.key !== "Enter" || R(e.nativeEvent) || (e.preventDefault(), u());}})}),- /* @__PURE__ */ (0, U.jsx)(o, {+ /* @__PURE__ */ (0, Q.jsx)(o, {variant: "secondary",size: "small",disabled: n || l.isPending,onClick: u,children: "收录"}),- /* @__PURE__ */ (0, U.jsx)(o, {+ /* @__PURE__ */ (0, Q.jsx)(o, {variant: "secondary",size: "small",disabled: n || l.isPending,@@ -810,7 +946,7 @@ function ut({ genre: e, tags: t, locked: n, toast: r }) {},children: "不是内容"}),- s ? /* @__PURE__ */ (0, U.jsx)("p", {+ s ? /* @__PURE__ */ (0, Q.jsx)("p", {role: "status",className: "w-full text-body-2-regular text-text-error-primary",children: s@@ -818,22 +954,22 @@ function ut({ genre: e, tags: t, locked: n, toast: r }) {]});}-function dt({ row: e, tags: t, locked: n, toast: r }) {- let i = ve(e);- return i.length ? /* @__PURE__ */ (0, U.jsxs)("div", {+function Mt({ row: e, tags: t, locked: n, toast: r }) {+ let i = be(e);+ return i.length ? /* @__PURE__ */ (0, Q.jsxs)("div", {role: "group","aria-label": "未收录 genre",className: "flex flex-col gap-2 border-t border-separator-border pt-4",- children: [/* @__PURE__ */ (0, U.jsx)("h5", {+ children: [/* @__PURE__ */ (0, Q.jsx)("h5", {className: "text-body-2-medium text-text-secondary",children: `未收录 genre · ${i.length}`- }), /* @__PURE__ */ (0, U.jsx)("div", {+ }), /* @__PURE__ */ (0, Q.jsx)("div", {role: "list",className: "flex flex-col",- children: i.map((e, i) => /* @__PURE__ */ (0, U.jsx)("div", {+ children: i.map((e, i) => /* @__PURE__ */ (0, Q.jsx)("div", {role: "listitem",className: `py-3 first:pt-0 last:pb-0 ${i ? "border-t border-separator-border" : ""}`,- children: /* @__PURE__ */ (0, U.jsx)(ut, {+ children: /* @__PURE__ */ (0, Q.jsx)(jt, {genre: e,tags: t,locked: n,@@ -844,24 +980,24 @@ function dt({ row: e, tags: t, locked: n, toast: r }) {}) : null;}// src/react/review/review-evidence.tsx-var ft = (e = "") => /^https?:\/\//i.test(e) ? e : "", pt = (e = "") => ft(e) || (e.startsWith("/") && !e.startsWith("//") ? e : "");-function mt({ url: e }) {- let t = pt(e || "");- return /* @__PURE__ */ (0, U.jsx)(ht, { source: t }, t);+var Nt = (e = "") => /^https?:\/\//i.test(e) ? e : "", Pt = (e = "") => Nt(e) || (e.startsWith("/") && !e.startsWith("//") ? e : "");+function Ft({ url: e }) {+ let t = Pt(e || "");+ return /* @__PURE__ */ (0, Q.jsx)(It, { source: t }, t);}-function ht({ source: e }) {- let [t, n] = (0, H.useState)("idle");- return (0, H.useEffect)(() => {+function It({ source: e }) {+ let [t, n] = (0, q.useState)("idle");+ return (0, q.useEffect)(() => {if (t !== "loading") return;let e = setTimeout(() => n("failed"), 3e4);return () => clearTimeout(e);- }, [t]), /* @__PURE__ */ (0, U.jsxs)("div", {+ }, [t]), /* @__PURE__ */ (0, Q.jsxs)("div", {className: "relative flex h-review-image items-center justify-center overflow-hidden rounded-surface bg-background-secondary-default",- children: [t === "loading" ? /* @__PURE__ */ (0, U.jsxs)("span", {+ children: [t === "loading" ? /* @__PURE__ */ (0, Q.jsxs)("span", {role: "status",className: "absolute flex items-center gap-2 text-body-2-regular text-text-secondary",- children: [/* @__PURE__ */ (0, U.jsx)("span", { dangerouslySetInnerHTML: { __html: V("正在加载图片") } }), "正在加载图片"]- }) : null, e && (t === "loading" || t === "ready") ? /* @__PURE__ */ (0, U.jsx)("img", {+ children: [/* @__PURE__ */ (0, Q.jsx)("span", { dangerouslySetInnerHTML: { __html: Me("正在加载图片") } }), "正在加载图片"]+ }) : null, e && (t === "loading" || t === "ready") ? /* @__PURE__ */ (0, Q.jsx)("img", {src: e,alt: "来源提供的备选图片",referrerPolicy: "no-referrer",@@ -869,48 +1005,48 @@ function ht({ source: e }) {className: `size-full object-contain ${t === "loading" ? "invisible" : ""}`,onLoad: () => n("ready"),onError: () => n("failed")- }) : e ? /* @__PURE__ */ (0, U.jsxs)("div", {+ }) : e ? /* @__PURE__ */ (0, Q.jsxs)("div", {className: "flex flex-col items-center gap-2",- children: [t === "failed" ? /* @__PURE__ */ (0, U.jsx)("span", {+ children: [t === "failed" ? /* @__PURE__ */ (0, Q.jsx)("span", {className: "text-body-2-regular text-text-secondary",children: "未取得来源图片"- }) : null, /* @__PURE__ */ (0, U.jsx)(o, {+ }) : null, /* @__PURE__ */ (0, Q.jsx)(o, {variant: "secondary",size: "small","aria-label": t === "failed" ? "立即重试加载来源图片" : void 0,onClick: () => n("loading"),children: t === "failed" ? "立即重试" : "查看来源图片"})]- }) : /* @__PURE__ */ (0, U.jsx)("span", {+ }) : /* @__PURE__ */ (0, Q.jsx)("span", {className: "text-body-2-regular text-text-secondary",children: "未取得来源图片"})]});}-function gt({ asset: e, openItem: t }) {+function Lt({ asset: e, openItem: t }) {let n = e.name || "";- return /* @__PURE__ */ (0, U.jsxs)("div", {+ return /* @__PURE__ */ (0, Q.jsxs)("div", {className: "flex min-w-0 items-center gap-3",- children: [/* @__PURE__ */ (0, U.jsxs)("button", {+ children: [/* @__PURE__ */ (0, Q.jsxs)("button", {type: "button",onClick: () => t(e.id),className: "flex aspect-card-cover w-20 shrink-0 cursor-pointer items-center justify-center overflow-hidden rounded-2lg bg-background-tertiary-default outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring",- children: [e.preview_url ? /* @__PURE__ */ (0, U.jsx)("img", {+ children: [e.preview_url ? /* @__PURE__ */ (0, Q.jsx)("img", {src: e.preview_url,alt: "",loading: "lazy",className: "size-full object-cover"- }) : /* @__PURE__ */ (0, U.jsx)("span", {+ }) : /* @__PURE__ */ (0, Q.jsx)("span", {className: "text-caption-1-regular text-text-secondary",children: "无封面"- }), /* @__PURE__ */ (0, U.jsx)(r, { children: `打开原视频 ${n}` })]- }), /* @__PURE__ */ (0, U.jsxs)("div", {+ }), /* @__PURE__ */ (0, Q.jsx)(r, { children: `打开原视频 ${n}` })]+ }), /* @__PURE__ */ (0, Q.jsxs)("div", {className: "flex min-w-0 flex-col items-start gap-1",- children: [/* @__PURE__ */ (0, U.jsx)("b", {+ children: [/* @__PURE__ */ (0, Q.jsx)("b", {title: n,className: "w-full truncate text-body-medium text-text-primary",children: e.code || n || "原视频"- }), /* @__PURE__ */ (0, U.jsx)(o, {+ }), /* @__PURE__ */ (0, Q.jsx)(o, {variant: "secondary",size: "small",leadingIcon: y,@@ -920,41 +1056,41 @@ function gt({ asset: e, openItem: t }) {})]});}-function _t({ kind: e, name: t, works: n, avatar: r, openEntity: i }) {- return /* @__PURE__ */ (0, U.jsxs)("div", {+function Rt({ kind: e, name: t, works: n, avatar: r, openEntity: i }) {+ return /* @__PURE__ */ (0, Q.jsxs)("div", {className: "flex min-w-0 items-center gap-3",- children: [/* @__PURE__ */ (0, U.jsx)("button", {+ children: [/* @__PURE__ */ (0, Q.jsx)("button", {type: "button","aria-label": `打开创作者页:${t}`,onClick: () => i(e, t),- className: `relative inline-grid size-11 shrink-0 cursor-pointer place-items-center overflow-hidden rounded-full bg-background-secondary-default text-caption-1-medium text-text-secondary outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring ${Re}`,+ className: `relative inline-grid size-11 shrink-0 cursor-pointer place-items-center overflow-hidden rounded-full bg-background-secondary-default text-caption-1-medium text-text-secondary outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring ${ze}`,dangerouslySetInnerHTML: { __html: r }- }), /* @__PURE__ */ (0, U.jsxs)("div", {+ }), /* @__PURE__ */ (0, Q.jsxs)("div", {className: "flex min-w-0 flex-col items-start",- children: [/* @__PURE__ */ (0, U.jsx)("button", {+ children: [/* @__PURE__ */ (0, Q.jsx)("button", {type: "button",onClick: () => i(e, t),className: "max-w-full cursor-pointer truncate text-body-medium text-text-primary underline-offset-2 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-border-focus-ring",children: t- }), n ? /* @__PURE__ */ (0, U.jsx)("small", {+ }), n ? /* @__PURE__ */ (0, Q.jsx)("small", {className: "tabular-nums text-body-2-regular text-text-secondary",children: `${n.toLocaleString()} 部作品`}) : null]})]});}-function vt({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, note: a }) {- let c = ft(e.profile_url || ""), l = (e.preview_assets || []).slice(0, 6), u = Math.max(0, Number(e.video_count || e.videos || 0));- return /* @__PURE__ */ (0, U.jsxs)("section", {+function zt({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, note: a }) {+ let c = Nt(e.profile_url || ""), l = (e.preview_assets || []).slice(0, 6), u = Math.max(0, Number(e.video_count || e.videos || 0));+ return /* @__PURE__ */ (0, Q.jsxs)("section", {className: "flex flex-col gap-3",children: [- /* @__PURE__ */ (0, U.jsx)("h5", {+ /* @__PURE__ */ (0, Q.jsx)("h5", {className: "text-body-medium text-text-primary",children: `待确认人物:${e.babepedia_name || "未标注"}`}),- /* @__PURE__ */ (0, U.jsxs)("div", {+ /* @__PURE__ */ (0, Q.jsxs)("div", {className: "flex flex-wrap items-center gap-2",- children: [c ? /* @__PURE__ */ (0, U.jsx)(s, {+ children: [c ? /* @__PURE__ */ (0, Q.jsx)(s, {variant: "secondary",size: "small",trailingIcon: j,@@ -962,49 +1098,49 @@ function vt({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, nottarget: "_blank",rel: "noopener noreferrer",children: "来源资料"- }) : null, /* @__PURE__ */ (0, U.jsx)(o, {+ }) : null, /* @__PURE__ */ (0, Q.jsx)(o, {variant: "secondary",size: "small",onClick: () => n("creator", e.creator || ""),children: `查看全部 ${u.toLocaleString()} 部作品`})]}),- /* @__PURE__ */ (0, U.jsx)(mt, { url: e.preview_url }),- /* @__PURE__ */ (0, U.jsx)("p", {+ /* @__PURE__ */ (0, Q.jsx)(Ft, { url: e.preview_url }),+ /* @__PURE__ */ (0, Q.jsx)("p", {className: "text-body-2-regular text-text-secondary",children: "通过后记录身份判断。"}),- l.length ? /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsx)("h5", {+ l.length ? /* @__PURE__ */ (0, Q.jsxs)(Q.Fragment, { children: [/* @__PURE__ */ (0, Q.jsx)("h5", {className: "text-body-medium text-text-primary",children: "本地作品样本"- }), /* @__PURE__ */ (0, U.jsx)("ul", {+ }), /* @__PURE__ */ (0, Q.jsx)("ul", {className: "flex flex-col gap-1",- children: l.map((e) => /* @__PURE__ */ (0, U.jsxs)("li", {+ children: l.map((e) => /* @__PURE__ */ (0, Q.jsxs)("li", {className: "flex min-w-0 items-center gap-2",- children: [/* @__PURE__ */ (0, U.jsx)(o, {+ children: [/* @__PURE__ */ (0, Q.jsx)(o, {variant: "ghost",size: "small",className: "min-w-0",onClick: () => t(e.id),- children: /* @__PURE__ */ (0, U.jsx)("span", {+ children: /* @__PURE__ */ (0, Q.jsx)("span", {title: e.name,className: "block max-w-full truncate",children: e.name})- }), /* @__PURE__ */ (0, U.jsx)(o, {+ }), /* @__PURE__ */ (0, Q.jsx)(o, {variant: "ghost",size: "small","aria-label": `打开 ${e.name} 的文件位置`,- ...P(i === e.id),+ ...I(i === e.id),onClick: () => r(e.id),children: "文件位置"})]}, e.id))- })] }) : /* @__PURE__ */ (0, U.jsx)("p", {+ })] }) : /* @__PURE__ */ (0, Q.jsx)("p", {className: "text-body-2-regular text-text-secondary",children: "暂无本地作品样本,打开全部作品核对。"}),- a ? /* @__PURE__ */ (0, U.jsx)("p", {+ a ? /* @__PURE__ */ (0, Q.jsx)("p", {role: "status",className: "text-body-2-regular text-text-error-primary",children: a@@ -1012,8 +1148,8 @@ function vt({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, not]});}-function yt({ assets: e, picked: t, onPicked: n, locked: i }) {- let [a, o] = (0, H.useState)(null), s = new Set(t), c = (t, r) => {+function Bt({ assets: e, picked: t, onPicked: n, locked: i }) {+ let [a, o] = (0, q.useState)(null), s = new Set(t), c = (t, r) => {if (i) return;let c = new Set(s);if (r && a !== null) {@@ -1025,10 +1161,10 @@ function yt({ assets: e, picked: t, onPicked: n, locked: i }) {}o(t), n(e.filter((e) => c.has(e.id)).map((e) => e.id));};- return /* @__PURE__ */ (0, U.jsxs)("div", {+ return /* @__PURE__ */ (0, Q.jsxs)("div", {className: "flex flex-col gap-2",- children: [/* @__PURE__ */ (0, U.jsx)(O, {- prefix: /* @__PURE__ */ (0, U.jsx)("span", {+ children: [/* @__PURE__ */ (0, Q.jsx)(O, {+ prefix: /* @__PURE__ */ (0, Q.jsx)("span", {className: "tabular-nums text-body-2-regular text-text-secondary",children: `已选 ${s.size} / ${e.length}`}),@@ -1041,26 +1177,26 @@ function yt({ assets: e, picked: t, onPicked: n, locked: i }) {disabled: i,onPress: () => n([])}]- }), /* @__PURE__ */ (0, U.jsx)("div", {+ }), /* @__PURE__ */ (0, Q.jsx)("div", {className: "review-asset-grid gap-1.5",children: e.map((e, t) => {let n = s.has(e.id);- return /* @__PURE__ */ (0, U.jsxs)("button", {+ return /* @__PURE__ */ (0, Q.jsxs)("button", {type: "button","aria-pressed": n,title: e.name,onClick: (e) => c(t, e.shiftKey),className: `relative aspect-card-cover cursor-pointer overflow-hidden rounded-surface bg-background-tertiary-default outline-none transition-opacity focus-visible:ring-2 focus-visible:ring-border-focus-ring ${n ? "opacity-100 ring-2 ring-border-button-active ring-inset" : "opacity-50"}`,children: [- /* @__PURE__ */ (0, U.jsx)("img", {+ /* @__PURE__ */ (0, Q.jsx)("img", {src: `/poster?id=${e.id}&c=4`,alt: "",loading: "lazy",className: "size-full object-cover"}),- /* @__PURE__ */ (0, U.jsx)("span", {+ /* @__PURE__ */ (0, Q.jsx)("span", {className: "absolute top-1 right-1",- children: /* @__PURE__ */ (0, U.jsx)(l, {+ children: /* @__PURE__ */ (0, Q.jsx)(l, {size: "sm",state: {isSelected: n,@@ -1071,7 +1207,7 @@ function yt({ assets: e, picked: t, onPicked: n, locked: i }) {}})}),- /* @__PURE__ */ (0, U.jsx)(r, { children: `${n ? "已选" : "未选"} ${e.name || e.id}` })+ /* @__PURE__ */ (0, Q.jsx)(r, { children: `${n ? "已选" : "未选"} ${e.name || e.id}` })]}, e.id);})@@ -1079,33 +1215,33 @@ function yt({ assets: e, picked: t, onPicked: n, locked: i }) {});}// src/react/review/review-card.tsx-var bt = F({+var Vt = L({variant: "filled",padding: "none",className: "flex flex-col overflow-hidden"-}), xt = "flex min-h-6 min-w-0 items-center", St = 2, Ct = (e) => e === "western_identity" ? "h-review-card-tall" : "h-review-card";-function wt(e) {- let { category: t, row: n, choice: r, onChoice: i, selected: a, onSelect: s, locked: l, busy: d, problem: f, genreTags: p, onDecide: g, handlers: v, queueView: y = "pending" } = e, b = (0, H.useRef)(!1), ne = Pe(), x = t === "metadata_fields", S = m[t] || "", C = String(n.creator || "").trim(), w = !!S && !!C, T = B(t, n), E = De(t, n), D = Oe(t, n), O = z(n), k = ke(n), A = ie(t, n), j = n.comparison_assets || [], M = n.preview_assets || [], F = re[n.decision || ""], ae = j.length > 1 ? /* @__PURE__ */ (0, U.jsxs)("div", {+}), Ht = "flex min-h-6 min-w-0 items-center", Ut = 2, Wt = (e) => e === "western_identity" ? "h-review-card-tall" : "h-review-card";+function Gt(e) {+ let { category: t, row: n, choice: r, onChoice: i, selected: a, onSelect: s, locked: l, busy: d, problem: f, genreTags: p, onDecide: g, handlers: v, queueView: y = "pending" } = e, te = (0, q.useRef)(!1), b = K(), x = t === "metadata_fields", S = m[t] || "", C = String(n.creator || "").trim(), w = !!S && !!C, T = G(t, n), E = W(t, n), D = Oe(t, n), O = U(n), k = ke(n), A = ie(t, n), j = n.comparison_assets || [], M = n.preview_assets || [], N = re[n.decision || ""], P = j.length > 1 ? /* @__PURE__ */ (0, Q.jsxs)("div", {className: "flex flex-col gap-3",- children: [j.slice(0, St).map((e) => /* @__PURE__ */ (0, U.jsx)(gt, {+ children: [j.slice(0, Ut).map((e) => /* @__PURE__ */ (0, Q.jsx)(Lt, {asset: e,openItem: v.openItem- }, e.id)), j.length > St ? /* @__PURE__ */ (0, U.jsx)("p", {+ }, e.id)), j.length > Ut ? /* @__PURE__ */ (0, Q.jsx)("p", {className: "text-body-2-regular text-text-secondary",- children: `另有 ${(j.length - St).toLocaleString()} 部对照作品`+ children: `另有 ${(j.length - Ut).toLocaleString()} 部对照作品`}) : null]- }) : w ? /* @__PURE__ */ (0, U.jsx)(_t, {+ }) : w ? /* @__PURE__ */ (0, Q.jsx)(Rt, {kind: S,name: C,works: Number(n.video_count || n.videos || 0),openEntity: v.openEntity,- avatar: N(C, n.entity_id ? {+ avatar: F(C, n.entity_id ? {id: n.entity_id,has_image: !!n.has_image,image_version: n.image_version,avatar_focus: n.avatar_focus} : null, null, S)- }) : n.asset_id ? /* @__PURE__ */ (0, U.jsx)(gt, {+ }) : n.asset_id ? /* @__PURE__ */ (0, Q.jsx)(Lt, {openItem: v.openItem,asset: {id: n.asset_id,@@ -1113,7 +1249,7 @@ function wt(e) {code: n.code,preview_url: n.asset_preview_url}- }) : null, I = x ? /* @__PURE__ */ (0, U.jsx)(lt, {+ }) : null, L = x ? /* @__PURE__ */ (0, Q.jsx)(At, {row: n,fieldName: E,value: r.candidateKey,@@ -1122,7 +1258,7 @@ function wt(e) {candidateKey: e}),locked: l- }) : t === "creator_tags" ? M.length ? /* @__PURE__ */ (0, U.jsx)(yt, {+ }) : t === "creator_tags" ? M.length ? /* @__PURE__ */ (0, Q.jsx)(Bt, {assets: M,picked: r.assets,locked: l,@@ -1130,195 +1266,195 @@ function wt(e) {...r,assets: e})- }) : /* @__PURE__ */ (0, U.jsx)(ee, {+ }) : /* @__PURE__ */ (0, Q.jsx)(ee, {size: "compact",icon: h,title: "这批作品尚未抽帧",children: `${n.video_count || ""} 条作品还没有可用预览;批准后仍会按所选资料写入标签。`- }) : t === "fc2_similarity" ? null : t === "western_identity" ? /* @__PURE__ */ (0, U.jsx)(vt, {+ }) : t === "fc2_similarity" ? null : t === "western_identity" ? /* @__PURE__ */ (0, Q.jsx)(zt, {row: n,openItem: v.openItem,openEntity: v.openEntity,onReveal: v.onReveal,revealing: v.revealing,note: v.revealNote- }) : /* @__PURE__ */ (0, U.jsx)(mt, { url: n.preview_url }), oe = w ? ae : E ? /* @__PURE__ */ (0, U.jsxs)("h4", {- className: L(xt, "flex-wrap gap-2"),- children: [/* @__PURE__ */ (0, U.jsx)("span", {+ }) : /* @__PURE__ */ (0, Q.jsx)(Ft, { url: n.preview_url }), ae = w ? P : E ? /* @__PURE__ */ (0, Q.jsxs)("h4", {+ className: z(Ht, "flex-wrap gap-2"),+ children: [/* @__PURE__ */ (0, Q.jsx)("span", {title: E,className: "flex max-w-full min-w-0 overflow-hidden rounded-md",- children: /* @__PURE__ */ (0, U.jsx)(u, {+ children: /* @__PURE__ */ (0, Q.jsx)(u, {variant: "caption",color: "neutral",children: E})- }), /* @__PURE__ */ (0, U.jsx)("span", {+ }), /* @__PURE__ */ (0, Q.jsx)("span", {title: D,className: "min-w-0 truncate text-body-medium text-text-primary",children: D})]- }) : /* @__PURE__ */ (0, U.jsx)("h4", {- className: xt,- children: /* @__PURE__ */ (0, U.jsx)("span", {+ }) : /* @__PURE__ */ (0, Q.jsx)("h4", {+ className: Ht,+ children: /* @__PURE__ */ (0, Q.jsx)("span", {title: T,className: "min-w-0 truncate text-body-medium text-text-primary",children: T})});- return /* @__PURE__ */ (0, U.jsxs)("section", {+ return /* @__PURE__ */ (0, Q.jsxs)("section", {"aria-label": T,"data-review-key": n.item_key,- className: L(bt, Ct(t)),+ className: z(Vt, Wt(t)),children: [- /* @__PURE__ */ (0, U.jsxs)("header", {+ /* @__PURE__ */ (0, Q.jsxs)("header", {className: "flex min-w-0 shrink-0 items-center gap-2 border-b border-separator-border px-5 py-4",children: [- l ? null : /* @__PURE__ */ (0, U.jsx)("span", {- className: L(xt, "shrink-0"),+ l ? null : /* @__PURE__ */ (0, Q.jsx)("span", {+ className: z(Ht, "shrink-0"),onPointerDownCapture: (e) => {- b.current = e.shiftKey;+ te.current = e.shiftKey;},onKeyDownCapture: (e) => {- b.current = e.shiftKey;+ te.current = e.shiftKey;},- children: /* @__PURE__ */ (0, U.jsx)(c, {+ children: /* @__PURE__ */ (0, Q.jsx)(c, {isSelected: a,"aria-label": `选择 ${T}`,- onChange: (e) => s(b.current, e)+ onChange: (e) => s(te.current, e)})}),- /* @__PURE__ */ (0, U.jsx)("div", {+ /* @__PURE__ */ (0, Q.jsx)("div", {className: "min-w-0 flex-1",- children: oe+ children: ae}),- F ? /* @__PURE__ */ (0, U.jsx)(u, {+ N ? /* @__PURE__ */ (0, Q.jsx)(u, {variant: "caption",color: "neutral",- children: F+ children: N}) : null]}),- /* @__PURE__ */ (0, U.jsx)("div", {+ /* @__PURE__ */ (0, Q.jsx)("div", {className: "relative mx-5 flex min-w-0 min-h-0 flex-1 flex-col",- children: /* @__PURE__ */ (0, U.jsxs)("div", {- ref: ne,+ children: /* @__PURE__ */ (0, Q.jsxs)("div", {+ ref: b,className: "flex min-w-0 min-h-0 flex-1 flex-col gap-4 overflow-y-auto py-4",children: [- n.source_name ? /* @__PURE__ */ (0, U.jsx)("p", {+ n.source_name ? /* @__PURE__ */ (0, Q.jsx)("p", {className: "text-body-2-regular text-text-secondary",children: `来源写法:${n.source_name}`}) : null,- !w && (n.board || n.assets) ? /* @__PURE__ */ (0, U.jsx)("p", {+ !w && (n.board || n.assets) ? /* @__PURE__ */ (0, Q.jsx)("p", {className: "text-body-2-regular text-text-secondary",children: `对照文件:${Number(n.video_count || n.assets || 0).toLocaleString()}`}) : null,- !w && ae ? ae : null,- x && (O || n.current_value !== void 0) ? /* @__PURE__ */ (0, U.jsxs)("div", {+ !w && P ? P : null,+ x && (O || n.current_value !== void 0) ? /* @__PURE__ */ (0, Q.jsxs)("div", {role: "region","aria-label": "当前信息",className: "flex min-w-0 flex-col gap-1 border-b border-separator-border pb-4",children: [- /* @__PURE__ */ (0, U.jsxs)("div", {+ /* @__PURE__ */ (0, Q.jsxs)("div", {className: "flex flex-wrap items-center gap-2",- children: [/* @__PURE__ */ (0, U.jsx)("h5", {+ children: [/* @__PURE__ */ (0, Q.jsx)("h5", {"data-copy-key": "review.card.current_value",className: "text-caption-1-medium text-text-secondary",children: "当前值"- }), n.current_owner?.startsWith("user:") || n.current_owner?.startsWith("review:") ? /* @__PURE__ */ (0, U.jsx)(u, {+ }), n.current_owner?.startsWith("user:") || n.current_owner?.startsWith("review:") ? /* @__PURE__ */ (0, Q.jsx)(u, {variant: "caption",color: "neutral",children: "人工确认"}) : null]}),- /* @__PURE__ */ (0, U.jsx)("p", {+ /* @__PURE__ */ (0, Q.jsx)("p", {className: "text-body-2-regular text-text-primary wrap-anywhere",- children: n.current_value === void 0 ? O : n.current_value ? /* @__PURE__ */ (0, U.jsx)(nt, {+ children: n.current_value === void 0 ? O : n.current_value ? /* @__PURE__ */ (0, Q.jsx)(Ct, {value: n.current_value,reference: (n.candidates?.find((e) => e.candidate_key === r.candidateKey) || n.candidates?.[0])?.display_value}) : "尚无资料"}),- n.videos === void 0 ? null : /* @__PURE__ */ (0, U.jsx)("p", {+ n.videos === void 0 ? null : /* @__PURE__ */ (0, Q.jsx)("p", {className: "text-caption-1-regular text-text-secondary",children: `${Number(n.videos).toLocaleString()} 个${n.asset_path ? "匹配文件" : "同番号文件"}`})]}) : null,- k.length || t === "creator_tags" ? /* @__PURE__ */ (0, U.jsx)("div", {+ k.length || t === "creator_tags" ? /* @__PURE__ */ (0, Q.jsx)("div", {className: "flex flex-wrap gap-1",- children: k.length ? k.map((e) => /* @__PURE__ */ (0, U.jsx)(u, {+ children: k.length ? k.map((e) => /* @__PURE__ */ (0, Q.jsx)(u, {variant: "caption",color: "soft",children: e- }, e)) : /* @__PURE__ */ (0, U.jsx)("small", {+ }, e)) : /* @__PURE__ */ (0, Q.jsx)("small", {className: "text-body-2-regular text-text-secondary",children: "暂无待确认标签"})}) : null,- x ? /* @__PURE__ */ (0, U.jsxs)("div", {+ x ? /* @__PURE__ */ (0, Q.jsxs)("div", {className: "flex flex-wrap items-center justify-between gap-2",- children: [/* @__PURE__ */ (0, U.jsxs)("h5", {+ children: [/* @__PURE__ */ (0, Q.jsxs)("h5", {className: "text-caption-1-medium text-text-secondary",- children: [/* @__PURE__ */ (0, U.jsx)("span", {+ children: [/* @__PURE__ */ (0, Q.jsx)("span", {"data-copy-key": "review.card.candidate_sources",children: "候选来源"}), ` · ${n.candidates?.length || 0}`]- }), n.current_value || (n.candidates?.length || 0) > 1 ? /* @__PURE__ */ (0, U.jsx)("span", {+ }), n.current_value || (n.candidates?.length || 0) > 1 ? /* @__PURE__ */ (0, Q.jsx)("span", {"data-copy-key": n.current_value ? "review.card.compare_current" : "review.card.compare_sources",className: "text-caption-1-regular text-text-tertiary",children: n.current_value ? "与当前值比较" : "来源间差异"}) : null]}) : null,- I,- /* @__PURE__ */ (0, U.jsx)(dt, {+ L,+ /* @__PURE__ */ (0, Q.jsx)(Mt, {row: n,tags: p,locked: l,toast: v.toast}),- !x && O ? /* @__PURE__ */ (0, U.jsx)("p", {+ !x && O ? /* @__PURE__ */ (0, Q.jsx)("p", {className: "text-body-2-regular text-text-secondary wrap-anywhere",children: O}) : null]})}),- /* @__PURE__ */ (0, U.jsxs)("footer", {- className: L(_.stack, "shrink-0"),+ /* @__PURE__ */ (0, Q.jsxs)("footer", {+ className: z(_.stack, "shrink-0"),children: [- y === "ignored" ? null : /* @__PURE__ */ (0, U.jsx)(te, {+ y === "ignored" ? null : /* @__PURE__ */ (0, Q.jsx)(ne, {variant: "secondary",size: "small",className: "me-auto",disabled: l,- ...P(d),+ ...I(d),onClick: () => g("rejected"),children: "忽略"}),- y === "pending" ? /* @__PURE__ */ (0, U.jsx)(o, {+ y === "pending" ? /* @__PURE__ */ (0, Q.jsx)(o, {variant: "secondary",size: "small",disabled: l,- ...P(d),+ ...I(d),onClick: () => g("skipped"),children: "稍后处理"- }) : /* @__PURE__ */ (0, U.jsx)(o, {+ }) : /* @__PURE__ */ (0, Q.jsx)(o, {variant: y === "ignored" ? "primary" : "secondary",size: "small",disabled: l,- ...P(d),+ ...I(d),onClick: () => g("restore"),children: "恢复待处理"}),- y === "ignored" ? null : /* @__PURE__ */ (0, U.jsx)(o, {+ y === "ignored" ? null : /* @__PURE__ */ (0, Q.jsx)(o, {variant: "primary",size: "small",disabled: l || !A,- ...P(d),+ ...I(d),title: A ? void 0 : "没有可采用的资料,可先保留或忽略",onClick: () => g("approved"),children: A ? "通过" : "不可通过"}),- f ? /* @__PURE__ */ (0, U.jsx)("p", {+ f ? /* @__PURE__ */ (0, Q.jsx)("p", {role: "status",className: "w-full text-body-2-regular text-text-error-primary",children: f@@ -1329,27 +1465,27 @@ function wt(e) {});}// src/react/review/review-page.tsx-var Tt = "flex cursor-pointer items-center justify-between gap-2";-function Et({ page: e, pages: t, onPage: n }) {- return t <= 1 ? null : /* @__PURE__ */ (0, U.jsxs)("nav", {+var Kt = "flex cursor-pointer items-center justify-between gap-2";+function qt({ page: e, pages: t, onPage: n }) {+ return t <= 1 ? null : /* @__PURE__ */ (0, Q.jsxs)("nav", {"aria-label": "复核分页","data-pagination-layout": "",className: "inline-grid w-full min-w-0 items-center gap-2",children: [- /* @__PURE__ */ (0, U.jsx)(o, {+ /* @__PURE__ */ (0, Q.jsx)(o, {variant: "secondary",size: "small",disabled: e <= 1,onClick: () => n(e - 1),children: "上一页"}),- /* @__PURE__ */ (0, U.jsx)("ul", {+ /* @__PURE__ */ (0, Q.jsx)("ul", {className: "flex min-w-0 flex-wrap items-center justify-center gap-1",- children: _e(e, t).map((t, r) => /* @__PURE__ */ (0, U.jsx)("li", { children: t === "…" ? /* @__PURE__ */ (0, U.jsx)("span", {+ children: ye(e, t).map((t, r) => /* @__PURE__ */ (0, Q.jsx)("li", { children: t === "…" ? /* @__PURE__ */ (0, Q.jsx)("span", {"aria-hidden": !0,className: "px-1 text-body-2-regular text-text-tertiary",children: "…"- }) : /* @__PURE__ */ (0, U.jsx)(o, {+ }) : /* @__PURE__ */ (0, Q.jsx)(o, {variant: t === e ? "secondary" : "ghost",size: "small","aria-label": `第 ${t} 页`,@@ -1358,7 +1494,7 @@ function Et({ page: e, pages: t, onPage: n }) {children: t}) }, t === "…" ? `dots-${r}` : t))}),- /* @__PURE__ */ (0, U.jsx)(o, {+ /* @__PURE__ */ (0, Q.jsx)(o, {variant: "secondary",size: "small",disabled: e >= t,@@ -1368,20 +1504,20 @@ function Et({ page: e, pages: t, onPage: n }) {]});}-function Dt(r) {- let [i, a] = (0, H.useState)(() => matchMedia("(max-width:900px)").matches);- (0, H.useEffect)(() => {+function Jt(r) {+ let [i, a] = (0, q.useState)(() => matchMedia("(max-width:900px)").matches);+ (0, q.useEffect)(() => {let e = matchMedia("(max-width:900px)"), t = () => a(e.matches);return e.addEventListener("change", t), () => e.removeEventListener("change", t);}, []);- let { route: s, openItem: c, openEntity: l, revealSource: u, toast: d, readOnly: f, readOnlyMessage: m, writerUrl: h } = r, [_, v] = (0, H.useState)(me(r.category) ? r.category : p), [y, b] = (0, H.useState)(() => Te(r.queue)), [te, re] = (0, H.useState)("candidates"), [E, D] = (0, H.useState)(""), [O, k] = (0, H.useState)(""), [A, j] = (0, H.useState)(1), [M, N] = (0, H.useState)(/* @__PURE__ */ new Set()), [P, F] = (0, H.useState)(/* @__PURE__ */ new Map()), [ae, I] = (0, H.useState)(/* @__PURE__ */ new Map()), [L, R] = (0, H.useState)(""), _e = (0, H.useRef)(null), [ve, ye] = (0, H.useState)(0), [be, xe] = (0, H.useState)(""), Se = (0, H.useRef)(!0);- (0, H.useEffect)(() => () => {- Se.current = !1;+ let { route: s, openItem: c, openEntity: l, revealSource: u, toast: d, readOnly: f, readOnlyMessage: m, writerUrl: h } = r, [_, v] = (0, q.useState)(me(r.category) ? r.category : p), [y, te] = (0, q.useState)(() => Ee(r.queue)), [ne, re] = (0, q.useState)("candidates"), [E, D] = (0, q.useState)(""), [O, k] = (0, q.useState)(""), [A, j] = (0, q.useState)(1), [M, N] = (0, q.useState)(/* @__PURE__ */ new Set()), [P, F] = (0, q.useState)(/* @__PURE__ */ new Map()), [I, L] = (0, q.useState)(/* @__PURE__ */ new Map()), [ae, R] = (0, q.useState)(""), oe = (0, q.useRef)(null), [z, he] = (0, q.useState)(0), [ge, ye] = (0, q.useState)(""), be = (0, q.useRef)(!0);+ (0, q.useEffect)(() => () => {+ be.current = !1;}, []);- let z = Fe({+ let V = Fe({queryKey: S,queryFn: ({ signal: e }) => de(e)- }), De = z.data || {+ }), xe = V.data || {sections: {},counts: {},queues: {@@ -1394,65 +1530,65 @@ function Dt(r) {counts: {}}}- }, Oe = we(De, y), ke = z.data ? Object.fromEntries(w.map((e) => [e, x.reduce((t, n) => t + Number(we(De, e).counts[n] || 0), 0)])) : void 0, B = Oe.sections[_] || [], V = _ === "metadata_fields", Pe = f;- (0, H.useEffect)(() => {- let e = new Set(B.map((e) => e.item_key));+ }, Se = Te(xe, y), Ce = V.data ? Object.fromEntries(w.map((e) => [e, x.reduce((t, n) => t + Number(Te(xe, e).counts[n] || 0), 0)])) : void 0, H = Se.sections[_] || [], U = _ === "metadata_fields", W = f;+ (0, q.useEffect)(() => {+ let e = new Set(H.map((e) => e.item_key));N((t) => {let n = [...t].filter((t) => e.has(t));return n.length === t.size ? t : new Set(n);}), F((t) => {let n = [...t].filter(([t]) => e.has(t));return n.length === t.size ? t : new Map(n);- }), I((t) => {+ }), L((t) => {let n = [...t].filter(([t]) => e.has(t));return n.length === t.size ? t : new Map(n);});- }, [B]);- let Ie = (0, H.useMemo)(() => V ? pe(B, "field") : [], [B, V]), Re = Ie.some((e) => e.key === O) ? O : "", W = (0, H.useMemo)(() => V ? fe(B, "field", Re) : B, [- B,- V,- Re- ]), Ve = (0, H.useMemo)(() => Ce(W, V), [W, V]), G = Ve.some(([e]) => e === te) ? te : "candidates", He = (0, H.useMemo)(() => pe(W, G), [W, G]), K = He.some((e) => e.key === E) ? E : "", Ue = (0, H.useMemo)(() => Ee(fe(W, G, K), A), [- W,+ }, [H]);+ let Oe = (0, q.useMemo)(() => U ? pe(H, "field") : [], [H, U]), ke = Oe.some((e) => e.key === O) ? O : "", G = (0, q.useMemo)(() => U ? fe(H, "field", ke) : H, [+ H,+ U,+ ke+ ]), Me = (0, q.useMemo)(() => we(G, U), [G, U]), K = Me.some(([e]) => e === ne) ? ne : "candidates", Ie = (0, q.useMemo)(() => pe(G, K), [G, K]), Re = Ie.some((e) => e.key === E) ? E : "", ze = (0, q.useMemo)(() => De(fe(G, K, Re), A), [G,K,+ Re,A- ]), We = Ue.rows.map((e) => e.item_key), Ge = new Set(We), Ke = He.map((e) => ({+ ]), Ve = ze.rows.map((e) => e.item_key), He = new Set(Ve), Ue = Ie.map((e) => ({...e,- rows: e.rows.filter((e) => Ge.has(e.item_key))- })).filter((e) => e.rows.length), q = (e) => P.get(e.item_key) || le(e), J = (0, H.useMemo)(() => B.filter((e) => M.has(e.item_key)), [B, M]), Y = (e) => {+ rows: e.rows.filter((e) => He.has(e.item_key))+ })).filter((e) => e.rows.length), J = (e) => P.get(e.item_key) || ue(e), Y = (0, q.useMemo)(() => H.filter((e) => M.has(e.item_key)), [H, M]), We = (e) => {let t = new Set(e);- N((e) => new Set([...e].filter((e) => !t.has(e)))), F((e) => new Map([...e].filter(([e]) => !t.has(e)))), I((e) => new Map([...e].filter(([e]) => !t.has(e))));- }, X = (e, t) => I((n) => new Map(n).set(e, t)), qe = () => {- re("candidates"), D(""), k(""), j(1), N(/* @__PURE__ */ new Set()), F(/* @__PURE__ */ new Map()), I(/* @__PURE__ */ new Map()), R(""), _e.current = null;- }, Je = (e) => {- v(e), qe(), s({+ N((e) => new Set([...e].filter((e) => !t.has(e)))), F((e) => new Map([...e].filter(([e]) => !t.has(e)))), L((e) => new Map([...e].filter(([e]) => !t.has(e))));+ }, Ge = (e, t) => L((n) => new Map(n).set(e, t)), Ke = () => {+ re("candidates"), D(""), k(""), j(1), N(/* @__PURE__ */ new Set()), F(/* @__PURE__ */ new Map()), L(/* @__PURE__ */ new Map()), R(""), oe.current = null;+ }, qe = (e) => {+ v(e), Ke(), s({category: e === "metadata_fields" ? "" : e,queue: y === "pending" ? "" : y});- }, Ye = (e) => {- b(e), qe(), s({+ }, Je = (e) => {+ te(e), Ke(), s({category: _ === "metadata_fields" ? "" : _,queue: e === "pending" ? "" : e});- }, Z = Ne({- mutationFn: ({ row: e, status: t, category: n }) => Me(se(n, oe(n, e), t, q(e))),+ }, X = Pe({+ mutationFn: ({ row: e, status: t, category: n }) => Ne(ce(n, se(n, e), t, J(e))),onSuccess: (e, { row: t, status: n, category: r }) => {- e.ok ? (je(r, [t.item_key], n), Y([t.item_key]), d(ce(n))) : X(t.item_key, e.error || "服务端拒绝了这次判定");+ e.ok ? (je(r, [t.item_key], n), We([t.item_key]), d(le(n))) : Ge(t.item_key, e.error || "服务端拒绝了这次判定");},- onError: (e, { row: t }) => X(t.item_key, ue(e))- }), Q = Ne({+ onError: (e, { row: t }) => Ge(t.item_key, B(e))+ }), Z = Pe({mutationFn: async ({ status: e, category: t, rows: n }) => {let r = [], i = [];for (let [a, o] of n.entries()) {- if (!Se.current) break;+ if (!be.current) break;R(`正在处理 ${a} / ${n.length}`);try {- let n = await Me(se(t, oe(t, o), e, q(o)));+ let n = await Ne(ce(t, se(t, o), e, J(o)));if (!n.ok) throw Error(n.error || "服务端未采用该项");r.push(o.item_key);} catch (e) {- i.push([o.item_key, ue(e)]);+ i.push([o.item_key, B(e)]);}}return {@@ -1463,7 +1599,7 @@ function Dt(r) {};},onSuccess: ({ status: e, category: t, done: n, failures: r }) => {- je(t, n, e), Y(n), r.forEach(([e, t]) => X(e, t)), R("");+ je(t, n, e), We(n), r.forEach(([e, t]) => Ge(e, t)), R("");let i = {approved: "通过",rejected: "忽略",@@ -1473,132 +1609,132 @@ function Dt(r) {d(`已${i} ${n.length} 项` + (r.length ? `,${r.length} 项未完成` : ""));},onError: (e) => {- R(ue(e));+ R(B(e));}- }), $ = (e) => {- !Q.isPending && J.length && (e === "approved" && V && J.some((e) => !q(e).candidateKey) ? R("请先为所选资料选择要采用的来源。") : (R(""), Q.mutate({+ }), Ye = (e) => {+ !Z.isPending && Y.length && (e === "approved" && U && Y.some((e) => !J(e).candidateKey) ? R("请先为所选资料选择要采用的来源。") : (R(""), Z.mutate({status: e,category: _,- rows: J+ rows: Y})));}, Xe = (e) => {F((t) => {let n = new Map(t);- for (let t of J) {+ for (let t of Y) {let r = t.candidates?.find((t) => t.source === e);r && n.set(t.item_key, {- ...q(t),+ ...J(t),candidateKey: r.candidate_key});}return n;}), R(`已选择 ${e},点击通过所选采用。`);- }, Ze = async (e) => {- if (ve) return;- ye(e), xe("");+ }, $e = async (e) => {+ if (z) return;+ he(e), ye("");let t = await u(e);- Se.current && (ye(0), xe(t));- }, Qe = ge(De.mirror, m), $e = De.genre_tags || [], et = {+ be.current && (he(0), ye(t));+ }, et = ve(xe.mirror, m), tt = xe.genre_tags || [], nt = {openItem: c,openEntity: l,- onReveal: Ze,- revealing: ve,- revealNote: be,+ onReveal: $e,+ revealing: z,+ revealNote: ge,toast: d};- return /* @__PURE__ */ (0, U.jsx)(Le, { children: /* @__PURE__ */ (0, U.jsxs)("div", {+ return /* @__PURE__ */ (0, Q.jsx)(Le, { children: /* @__PURE__ */ (0, Q.jsxs)("div", {className: "flex flex-col gap-5 pb-10",children: [- Pe ? /* @__PURE__ */ (0, U.jsx)(ne, {+ W ? /* @__PURE__ */ (0, Q.jsx)(b, {tone: "warning",title: "本机只能浏览",- extra: h ? /* @__PURE__ */ (0, U.jsx)("p", {+ extra: h ? /* @__PURE__ */ (0, Q.jsx)("p", {className: "text-body-2-regular",- children: /* @__PURE__ */ (0, U.jsx)(g, {+ children: /* @__PURE__ */ (0, Q.jsx)(g, {href: h,children: "前往写入端复核"})}) : void 0,- children: Qe+ children: et}) : null,- /* @__PURE__ */ (0, U.jsx)(at, { tags: $e }),- /* @__PURE__ */ (0, U.jsxs)(n, {+ /* @__PURE__ */ (0, Q.jsx)(Et, { tags: tt }),+ /* @__PURE__ */ (0, Q.jsxs)(n, {orientation: i ? "horizontal" : "vertical",selectedKey: _,onSelectionChange: (e) => {let t = String(e);- me(t) && Je(t);+ me(t) && qe(t);},className: "flex flex-col gap-5 review-split:flex-row review-split:items-start review-split:gap-6",- children: [/* @__PURE__ */ (0, U.jsxs)("div", {+ children: [/* @__PURE__ */ (0, Q.jsxs)("div", {"data-section-nav": !0,className: "w-full min-w-0 review-split:sticky review-split:top-topbar review-split:w-review-tabs review-split:shrink-0",- children: [/* @__PURE__ */ (0, U.jsx)("h2", {+ children: [/* @__PURE__ */ (0, Q.jsx)("h2", {id: "reviewcategories",children: "复核分类"- }), /* @__PURE__ */ (0, U.jsx)(ze, {+ }), /* @__PURE__ */ (0, Q.jsx)(Be, {scrollable: i,"aria-labelledby": "reviewcategories","data-section-items": !0,className: "flex review-split:flex-col review-split:items-stretch",children: x.map((e) => {- let n = Number(Oe.counts[e] || 0);- return /* @__PURE__ */ (0, U.jsxs)(t, {+ let n = Number(Se.counts[e] || 0);+ return /* @__PURE__ */ (0, Q.jsxs)(t, {id: e,- className: Tt,- isDisabled: Z.isPending || Q.isPending,+ className: Kt,+ isDisabled: X.isPending || Z.isPending,"data-pill-selected": _ === e ? "" : void 0,"data-pill-variant": "gray",- children: [C[e], n ? /* @__PURE__ */ (0, U.jsx)("span", {+ children: [C[e], n ? /* @__PURE__ */ (0, Q.jsx)("span", {className: "tabular-nums text-caption-1-medium text-text-secondary",children: n.toLocaleString()}) : null]}, e);})})]- }), /* @__PURE__ */ (0, U.jsxs)(e, {+ }), /* @__PURE__ */ (0, Q.jsxs)(e, {id: _,className: "flex min-w-0 flex-1 flex-col gap-5",children: [- /* @__PURE__ */ (0, U.jsx)(Be, {+ /* @__PURE__ */ (0, Q.jsx)(Qe, {queueView: y,- queueCounts: ke,- onQueueChange: Ye,- locked: Pe,- fields: Ie,- fieldFilter: Re,+ queueCounts: Ce,+ onQueueChange: Je,+ locked: W,+ fields: Oe,+ fieldFilter: ke,onFieldFilter: (e) => {k(e), D(""), j(1);},- groupOptions: Ve,- groupBy: G,+ groupOptions: Me,+ groupBy: K,onGroupBy: (e) => {re(e), D(""), j(1);},- groups: He,- filter: K,+ groups: Ie,+ filter: Re,onFilter: (e) => {D(e), j(1);},- pageKeys: We,+ pageKeys: Ve,selected: M,onSelected: N,- selectedRows: J,- metadata: V,- approvable: J.every((e) => ie(_, e)),- busy: Q.isPending || Z.isPending,- feedback: L,+ selectedRows: Y,+ metadata: U,+ approvable: Y.every((e) => ie(_, e)),+ busy: Z.isPending || X.isPending,+ feedback: ae,onUnifySource: Xe,- onRun: $+ onRun: Ye}),- Ue.rows.length ? Ke.map((e) => /* @__PURE__ */ (0, U.jsxs)("section", {+ ze.rows.length ? Ue.map((e) => /* @__PURE__ */ (0, Q.jsxs)("section", {className: "flex flex-col gap-3",- children: [Ke.length > 1 || G !== "candidates" ? /* @__PURE__ */ (0, U.jsxs)("div", {+ children: [Ue.length > 1 || K !== "candidates" ? /* @__PURE__ */ (0, Q.jsxs)("div", {className: "flex flex-wrap items-center gap-2",- children: [/* @__PURE__ */ (0, U.jsx)("h3", {+ children: [/* @__PURE__ */ (0, Q.jsx)("h3", {className: "text-body-medium text-text-primary",children: `${e.title} · ${e.rows.length}`- }), Pe ? null : /* @__PURE__ */ (0, U.jsx)(o, {+ }), W ? null : /* @__PURE__ */ (0, Q.jsx)(o, {variant: "ghost",size: "small",onClick: () => {@@ -1608,68 +1744,73 @@ function Dt(r) {},children: e.rows.every((e) => M.has(e.item_key)) ? "清空本组" : "全选本组"})]- }) : null, /* @__PURE__ */ (0, U.jsx)("div", {+ }) : null, /* @__PURE__ */ (0, Q.jsx)("div", {className: "review-grid gap-5",- children: e.rows.map((e) => /* @__PURE__ */ (0, U.jsx)(wt, {+ children: e.rows.map((e) => /* @__PURE__ */ (0, Q.jsx)(Gt, {category: _,row: e,queueView: y,- choice: q(e),+ choice: J(e),onChoice: (t) => F((n) => new Map(n).set(e.item_key, t)),selected: M.has(e.item_key),onSelect: (t, n) => N((r) => {let i = new Set(r);- return _e.current = Ae(i, We, _e.current, e.item_key, t, n), i;+ return oe.current = Ae(i, Ve, oe.current, e.item_key, t, n), i;}),- locked: Pe,- busy: Q.isPending || Z.isPending && Z.variables?.row.item_key === e.item_key,- problem: ae.get(e.item_key) || "",- genreTags: $e,+ locked: W,+ busy: Z.isPending || X.isPending && X.variables?.row.item_key === e.item_key,+ problem: I.get(e.item_key) || "",+ genreTags: tt,onDecide: (t) => {- Z.isPending || Q.isPending || (I((t) => new Map([...t].filter(([t]) => t !== e.item_key))), Z.mutate({+ X.isPending || Z.isPending || (L((t) => new Map([...t].filter(([t]) => t !== e.item_key))), X.mutate({row: e,status: t,category: _}));},- handlers: et+ handlers: nt}, e.item_key))})]- }, e.key)) : z.isError && !z.data ? /* @__PURE__ */ (0, U.jsx)(ne, {+ }, e.key)) : V.isError && !V.data ? /* @__PURE__ */ (0, Q.jsx)(b, {tone: "error",title: "复核队列读取失败",- action: /* @__PURE__ */ (0, U.jsx)(o, {+ action: /* @__PURE__ */ (0, Q.jsx)(o, {variant: "secondary",size: "small",- disabled: z.isFetching,- onClick: () => void z.refetch(),+ disabled: V.isFetching,+ onClick: () => void V.refetch(),children: "立即重试"}),- children: ue(z.error)- }) : /* @__PURE__ */ (0, U.jsx)(ee, {- icon: he,+ children: B(V.error)+ }) : /* @__PURE__ */ (0, Q.jsx)(ee, {+ icon: _e,title: `此分类没有${T[y]}项目`,- actions: x.some((e) => e !== _ && Number(Oe.counts[e] || 0) > 0) ? /* @__PURE__ */ (0, U.jsx)(o, {+ actions: x.some((e) => e !== _ && Number(Se.counts[e] || 0) > 0) ? /* @__PURE__ */ (0, Q.jsx)(o, {size: "small",onClick: () => {- let e = x.find((e) => e !== _ && Number(Oe.counts[e] || 0) > 0);- e && Je(e);+ let e = x.find((e) => e !== _ && Number(Se.counts[e] || 0) > 0);+ e && qe(e);},children: "查看其他分类"}) : void 0,children: y === "pending" ? "可切换分类查看其他待确认资料。" : `${T[y]}的资料会保留在这里,可恢复到待处理。`}),- /* @__PURE__ */ (0, U.jsx)(Et, {- page: Ue.page,- pages: Ue.pages,+ /* @__PURE__ */ (0, Q.jsx)(qt, {+ page: ze.page,+ pages: ze.pages,onPage: j- })+ }),+ U && y === "pending" ? /* @__PURE__ */ (0, Q.jsx)(Ze, {+ locked: W,+ openItem: c,+ toast: d+ }) : null]})]})]}) });}-export { Dt as ReviewPage };+export { Jt as ReviewPage };-//# debugId=b2e6e0df-6153-423b-bbad-573b949ff2f1\ No newline at end of file+//# debugId=1782917c-5973-404e-b283-0af9db690636\ No newline at end of file