Skip to content

armgit / peach

Public Imported from GitHub
0

Peach: Local-first video metadata scraper and media manager.

fix(web): 稳定封面取景并统一视频大小与开发改字入口

longmeidaoc801c4dd7adb
diff --git a/docs/OPERATIONS.md b/docs/OPERATIONS.md
index acc1ab1ba..e546c9704 100644
--- a/docs/OPERATIONS.md
+++ b/docs/OPERATIONS.md
@@ -340,6 +340,16 @@ curl -s --noproxy '*' -o /dev/null -w '%{http_code}\n' https://peach.local/healt
- `--swap-from <暂存包>` 在旧托盘退出后、新托盘启动前顺手换掉二进制,这是整个换包过程中唯一一个目标文件没有被进程占用的时机。换生产二进制请用 `deploy_windows_tray.py`,不要单独调用它。
- 找不到打包托盘的窗口时,命令自动改走源码托盘:`find_source_tray_windows()` 按同一窗口类名加「命令行含 `peach.tray`」认出源码托盘,`restart_source_tray()` 照原命令行(含 `--show`/数据根)在托盘退出后重新启动,不换包也不备份。`--source` 显式跳过打包入口。
+#### 源码环境改字
+
+页面地址加 `?edit` 开启文字编辑,点文字后回车保存、Esc 取消。「暂停编辑」可继续操作页面。
+静态文案写回 `web/index.html`、`web/app.js` 或 `frontend/src` 中选定的来源;同一文字有多个位置时需选择来源。
+保存前校验源文件摘要,备份位于 `build/copy-editor/backups/`。React 文案重建前端后在普通模式生效。
+修改记录可从工具栏导出。界面里的馆藏数据与动态计数没有静态文案来源,不能借此修改账本。
+
+工具脚本位于 `scripts/dev/`,不作为网页资产分发;冻结的发布包不提供改字端点。
+演示站的 `?edit` 只保存当前浏览器的文案草稿,可导出,普通访问不应用草稿。
+
#### 换掉生产托盘二进制:`deploy_windows_tray.py`
适用于生产入口的 EXE 本身要换成新构建的情况。换生产入口是发布动作,执行前需要人工确认,脚本不代替这次确认。
diff --git a/docs/REUSE.md b/docs/REUSE.md
index 0bf09f3a3..3190f13da 100644
--- a/docs/REUSE.md
+++ b/docs/REUSE.md
@@ -57,7 +57,7 @@
- Web 复用 Fieldset、Progress、confirmModal;状态由 `standalone-update.json` 保存。下载按字节计量,解压按文件数计量,替换使用阶段进度;服务重启期间保留等待状态,恢复连接后核对版本。
- 新版有待应用迁移时,重启安装复用 `migrate upgrade --yes`,先保存 SQLite 备份;迁移或启动失败时恢复数据库与程序。数据库备份位于用户数据根的 `state/update-backups/`。
-JAV 默认封面(官方封面/预览图)与默认大小(大图/小图)独立保存,复用 localStorage、共享 Switch 和既有 `/cover`、`/poster` 接口,不新增依赖。`frontend/src/jav-artwork.ts` 负责作品身份、偏好恢复与缺图回退;首页、接着看、实体作品、详情推荐、Mix 静止与翻图、播放队列共用封面选择。小图保留所选来源,设置换图保留播放和滚动位置。
+JAV 默认封面(官方封面/预览图)与视频默认大小(大图/小图)独立保存,复用 localStorage、共享 Switch 和既有 `/cover`、`/poster` 接口,不新增依赖。设置弹窗同步首页与 JAV 的版式,筛选条可单独调整当前视图。`frontend/src/jav-artwork.ts` 负责作品身份、偏好恢复与缺图回退;首页、接着看、实体作品、详情推荐、Mix 静止与翻图、播放队列共用封面选择。小图展示完整封套,竖版正封完整放入大图卡片。新作封面完成取景才显示,缓存图在插入时重算取景。
## 复用决策门槛
@@ -299,7 +299,7 @@ CloudDrive 为外部应用,本项目不捆绑其二进制或依赖其管理 AP
| 厂牌字标名录 | 发行商与发行平台自己的厂牌名录,入口登记在 `harvest_maker_directories.DIRECTORIES`:MGStage `/ppv/makers.php` 十一页 351 家、Prestige `/api/maker` 11 家、KMP `/label` 42 家(大半是 SVG);另有 jae.tokyo 展会名录 20 家 | slug↔账本对账(四路判据、空罗马字形当不可比)、按形状分三张指定表(方标原样装大位、字标烤方两位共用、方标只管小位)、改地址后靠 provenance 边车重新收人、复核 CSV 与安装闸门。存入口不存图片地址:KMP 的文件名带时间戳,厂牌换一次标识地址就变。不推导 URL、不猜名字:名录给什么用什么 |
| JAV 元数据查询 | 每个站只有一个归属(ADR-0048):自写解析器持有 r18.dev、DMM/FANZA、一本道、FC2、fc2cmadb、FC2PPV-DB、JAVten、JavArchive、AVBase、JavBus、javdb,片商官网与转载站经 amane 桥(ADR-0043、ADR-0044);MetaTube SDK `6a5e6128c725187aeaf921d48ed7d9cd9f30671b`(Apache-2.0)只作来源身份与丰富字段模型参考;DMM 的 GraphQL 接口地址、`ppvContent` 与 `legacySearchPPV` 两条查询的取法参照 OpenAver(MIT)`core/scrapers/dmm.py`,cid 匹配与身份核对是 Peach 自己的(ADR-0059) | 只发送规范番号;Peach 管来源链(`metadata_routes`)、`provider_id`/`content_id`、逐字段优先级、原始证据、丰富目录证据、健康统计、候选复核与批准后的 ledger 投影。amane 的 POC 判据、字段缺口与三条路线的前提见 [docs/reference-snapshots/amane-crawlers-poc.md](reference-snapshots/amane-crawlers-poc.md),采纳结果见下一行 |
| Javinizer-Go 历史快照 | `sources/metadata/javinizer-go/<番号>/<来源>.json`,由 Javinizer-Go v1.5.x(MIT,`dd56998328d078c9baf68ff4fde2e6fcaa2a691a`)在 2026-09 之前取回;二进制与快照留在磁盘,没有调用路径(ADR-0044) | 只作离线证据:封面层读它的 `cover_url` 与 `content_id`,别名解析读企划名义,账本里 `javinizer:<站>:<字段>` 的 provenance 按 `metadata_policy.HISTORICAL_SOURCES` 认级别。`scrape_codes` 写进同一目录的新快照 `provider` 记解析器名、`provider_version` 记 Peach 版本 |
-| amane 刮削站点(官方档 makers、prestige、faleno、dahlia、mgstage;转载站 fc2club、freejavbt、airav、avsox) | amane `79ecfa763cc786318e1964a3d7f4e244a7d5c96d`(v0.16.1,GPL-3.0),经 `tools/amane-bridge/` 薄桥子进程接入(ADR-0043、ADR-0048;`makers` 是 amane 的 `official` 模块):独立 `pyproject.toml`/`uv.lock` 钉 sha,venv 建在 `<数据根>/tools/amane-bridge/.venv`,桥只用 `amane.crawlers.sites.<站>` 与 `amane.net.*`,不碰 `aggregate` | 许可义务:amane 为 GPL-3.0,Peach 为 AGPL-3.0-or-later,两者以进程边界相接;仓库与分发件只含清单、锁与桥脚本(Peach 自己的文件),amane 源码由用户机器上的 uv 按锁下载,不随 Peach 分发;清单、桥脚本与设置页都写明上游地址与许可。升级是人做的:改 sha → `uv lock --project tools/amane-bridge` → 读上游 diff 核字段语义 → 同批改 `peach.metadata_amane.AMANE_REASONS`/`SITE_CONFIGS` 与本行。已知性质:上游 `WebClient` 以 `verify=False` 发请求,只取公开页面、不带凭据;`amane.crawlers` 包 `__init__` 连带 SQLAlchemy,每次子进程约 0.6~1 秒 import。Peach 管来源链位置、身份核对、失败分档与冷却、候选与结算 |
+| amane 刮削站点(官方档 makers、prestige、faleno、dahlia、mgstage;转载站 fc2club、freejavbt、airav、avsox) | amane `3c416618a9617be1c377694b1a150bf9821a7e6d`(v0.17.0,GPL-3.0),经 `tools/amane-bridge/` 薄桥子进程接入(ADR-0043、ADR-0048;`makers` 是 amane 的 `official` 模块):独立 `pyproject.toml`/`uv.lock` 钉 sha,venv 建在 `<数据根>/tools/amane-bridge/.venv`,桥只用 `amane.crawlers.sites.<站>` 与 `amane.net.*`,不碰 `aggregate` | 许可义务:amane 为 GPL-3.0,Peach 为 AGPL-3.0-or-later,两者以进程边界相接;仓库与分发件只含清单、锁与桥脚本(Peach 自己的文件),amane 源码由 uv 按锁下载,不随 Peach 分发。升级核对清单、锁、字段语义与失败分档;v0.17.0 的 `api_error` 归服务端失败,Prestige 的横向封套与竖版正封分别投影到封面和海报,发行日仍按既有 MGS 配信规则结算。设置页显示独立运行环境实际安装的包版本。上游 `WebClient` 以 `verify=False` 发公开请求,不带凭据;每次子进程约 0.6~1 秒 import。Peach 管来源链位置、身份核对、冷却、候选与结算 |
| 已确认厂牌的目录归位 | Javinizer-Go v1.5.2 organizer(MIT)只作冲突预检、模板化目录和回滚边界的协议参考,不调用它,不让它持有 Peach ledger | `rehome_unknown_jav.py` 只消费人工确认映射;先出逐文件 CSV,拒绝扁平化重名与厂牌冲突,SQLite 备份后移动文件并同步 Peach 路径/实体 provenance |
| FC2 目录元数据与跨号证据 | 已缓存的 fc2cmadb Inertia `article`/评论收获;Javinizer-Go v1.5.2 的 FC2 解析器(MIT)只作官方商品页字段边界的协议参考 | 2026-08-31 登录态实测旧文章仍提供标题、原始标签、日期、时长、卖家、FC2 CDN 封面与 `comments`;Peach 只把无歧义标签翻译成现有词表,标题/标签进入 `/review`,实测 `w1200` 封面经尺寸与解码门槛落生成产物;稳定 pair、合集/分片保护、hash/时长/尺寸佐证、库外 evidence、健康统计和人工复核仍由 Peach 管,不依赖 FC2-Leak-Detector/JavSP,也不把镜像候选直写 ledger |
| 缺索引 MP4 重建 | untrunc(anthwlock,GPL-2.0,用户自行解压到 `<数据根>/tools/untrunc/`,也认 `PEACH_UNTRUNC` 与 PATH),按 `-n -s -dst` 借一部同编码器的完整片子当参照切 `mdat`;不随 Peach 分发,「运行信息」给下载入口 | `src/peach/mp4recover.py` 挑参照(同目录按文件名挨得最近的先试,最多 4 部)、验收(解码错误不超过 3 行、音视频时长差不超过 5%)、换回原路径并把坏原件改名成同目录的 `.文件名.peach-original` 留着;缺整个 `moov` 的片子在任何播放器里都打不开,所以结果替换原文件,不像缺 `ctts` 那样另存头。2026-09-23 实测 115 上 5 部:同日期、同分辨率的邻居参照能整部或 73%~100% 切回,参照分辨率不对时每帧报宏块错误,找不到同编码参数的参照就修不了 |
diff --git a/docs/reference-snapshots/task-progress-surfaces.md b/docs/reference-snapshots/task-progress-surfaces.md
index e53ae009d..b50265de0 100644
--- a/docs/reference-snapshots/task-progress-surfaces.md
+++ b/docs/reference-snapshots/task-progress-surfaces.md
@@ -1,5 +1,7 @@
# 任务进度与容器清单
+此清单依据用户截图整理,没有可重抓的上游文档 URL,因此不登记到 `docs/reference-sources.json`。
+
按用户于 2026-09-29 提供的口味、扫描与链接管理截图复核。后台任务有确定总量时显示进度条;未知总量时显示 Loading Dots,同一位置只显示一次状态文字。
独立状态块使用描边卡片;已有任务卡、设置分组或结果面板的状态使用所在容器,不叠加第二层框。两种主题共用语义边框和背景 token。`TaskProgress` 负责这两种容器,`Progress` 只负责数值图形。
diff --git a/frontend/e2e/feed-cover.test.ts b/frontend/e2e/feed-cover.test.ts
new file mode 100644
index 000000000..c311d4d48
--- /dev/null
+++ b/frontend/e2e/feed-cover.test.ts
@@ -0,0 +1,92 @@
+import assert from 'node:assert/strict';
+import {after,before,describe,it} from 'node:test';
+import type {Browser} from 'playwright-core';
+import {launch,requiredEnv,VIEWPORTS} from './harness.ts';
+
+describe('新作封面显示时机',()=>{
+ let browser:Browser;
+ before(async()=>{browser=await launch()});
+ after(async()=>{await browser?.close()});
+ for(const viewport of VIEWPORTS)for(const delay of [0,1800]){
+ it(`${viewport.name} ${delay?'慢图':'预加载'}完成取景才显示`,{timeout:60000},async()=>{
+ const context=await browser.newContext({viewport:{width:viewport.width,height:viewport.height}});
+ try{
+ await context.addInitScript(()=>{
+ localStorage.setItem('peach.settings.v1',JSON.stringify({detailAutoplay:false}));
+ (window as any).__unframed=[];
+ const check=(img:HTMLImageElement)=>{
+ if(!img.matches('.feednew img.cover')||img.dataset.frame)return;
+ if(getComputedStyle(img).visibility==='visible'&&img.naturalWidth)
+ (window as any).__unframed.push({src:img.src,complete:img.complete});
+ };
+ // 捕获监听先于应用执行,记录加载图尚未取景的那一刻。
+ document.addEventListener('load',event=>{
+ if(event.target instanceof HTMLImageElement)check(event.target);
+ },true);
+ const sample=()=>{document.querySelectorAll<HTMLImageElement>('.feednew img.cover').forEach(check);requestAnimationFrame(sample)};
+ requestAnimationFrame(sample);
+ });
+ const page=await context.newPage();
+ const remote='https://covers.example.test/framing.svg';
+ await page.route(remote,async route=>{
+ if(delay)await new Promise(resolve=>setTimeout(resolve,delay));
+ await route.fulfill({contentType:'image/svg+xml',body:'<svg xmlns="http://www.w3.org/2000/svg" width="1500" height="1000"><rect width="796" height="1000" fill="#f00"/><rect x="796" width="704" height="1000" fill="#0f0"/></svg>'});
+ });
+ await page.route(/\/api\/feeds\/discoveries\?/,route=>route.fulfill({json:{ok:true,items:[{id:1,code:'EXM-001',title:'示例新作',has_cover:false,cover_url:remote}]}}));
+ await page.goto(requiredEnv('PEACH_E2E_ORIGIN')+'/stats');
+ for(let round=0;round<2;round++){
+ await page.evaluate(()=>{history.pushState({},'','/');window.dispatchEvent(new PopStateEvent('popstate'))});
+ const image=page.locator('#feedNew img.cover.panel');
+ await image.waitFor({state:'visible'});
+ assert.equal(await image.evaluate(img=>img.style.getPropertyValue('--panel-clip')),'0% 0% 0% 53.07%');
+ const positions=await image.evaluate(async img=>{
+ const samples:string[]=[];
+ for(let n=0;n<12;n++){
+ await new Promise(requestAnimationFrame);
+ const css=getComputedStyle(img);
+ samples.push([css.left,css.top,css.width,css.height,css.clipPath].join('|'));
+ }
+ return samples;
+ });
+ assert.equal(new Set(positions).size,1,'可见封面的取景保持稳定');
+ assert.deepEqual(await page.evaluate(()=>(window as any).__unframed),[],'已加载封面在取景完成前保持隐藏');
+ await page.evaluate(()=>{history.pushState({},'','/stats');window.dispatchEvent(new PopStateEvent('popstate'))});
+ await page.locator('#feedNew').waitFor({state:'hidden'});
+ }
+ }finally{await context.close()}
+ });
+ }
+ for(const viewport of VIEWPORTS){
+ it(`${viewport.name} 设置里的视频大小同步首页和 JAV`,{timeout:60000},async()=>{
+ const context=await browser.newContext({viewport:{width:viewport.width,height:viewport.height},reducedMotion:'reduce'});
+ try{
+ await context.addInitScript(()=>localStorage.setItem('peach.settings.v1',JSON.stringify({detailAutoplay:false,homeLayout:'big',javLayout:'big'})));
+ const page=await context.newPage();
+ await page.goto(requiredEnv('PEACH_E2E_ORIGIN')+'/');
+ await page.locator('#grid [data-media-card]').first().waitFor({state:'visible'});
+ if(viewport.name==='mobile')await page.locator('#filterBtn').click();
+ await page.locator('#settingsBtn').click();
+ await page.locator('#settingsPanel').getByRole('tab',{name:'浏览',exact:true}).click();
+ await page.locator('#javSizeSetting label:has(input[value="small"])').click();
+ const saved=await page.evaluate(()=>JSON.parse(localStorage.getItem('peach.settings.v1')||'{}'));
+ assert.equal(saved.homeLayout,'small');assert.equal(saved.javLayout,'small');
+ await page.locator('#settingsClose').click();
+ const ratio=await page.locator('#grid [data-media-pic]').first().evaluate(node=>{
+ const rect=node.getBoundingClientRect();return rect.width/rect.height;
+ });
+ assert.ok(Math.abs(ratio-16/9)<.01);
+ }finally{await context.close()}
+ });
+ it(`${viewport.name} 竖版正封完整放入卡片`,{timeout:60000},async()=>{
+ const context=await browser.newContext({viewport:{width:viewport.width,height:viewport.height}});
+ try{
+ const page=await context.newPage(),remote='https://covers.example.test/front.svg';
+ await page.route(remote,route=>route.fulfill({contentType:'image/svg+xml',body:'<svg xmlns="http://www.w3.org/2000/svg" width="632" height="900"><rect width="632" height="900" fill="#0f0"/></svg>'}));
+ await page.route(/\/api\/feeds\/discoveries\?/,route=>route.fulfill({json:{ok:true,items:[{id:1,code:'EXM-001',title:'示例新作',has_cover:false,cover_url:remote}]}}));
+ await page.goto(requiredEnv('PEACH_E2E_ORIGIN')+'/');
+ const image=page.locator('#feedNew img.cover[data-frame="front"]');await image.waitFor({state:'visible'});
+ assert.equal(await image.evaluate(img=>getComputedStyle(img).objectFit),'contain');
+ }finally{await context.close()}
+ });
+ }
+});
diff --git a/frontend/src/react/scraping/scraping-page.tsx b/frontend/src/react/scraping/scraping-page.tsx
index 491028bb0..5074af572 100644
--- a/frontend/src/react/scraping/scraping-page.tsx
+++ b/frontend/src/react/scraping/scraping-page.tsx
@@ -47,8 +47,10 @@ const COOKIE_METHODS = [['paste', '粘贴 Cookie'], ['file', '导入文件']] as
`/favicon.ico` 那一枚 16px,站点自己备好的 apple-touch-icon 和 SVG 问都不问;
需要代理才通的来源更是常年空着。取不到时把 `<img>` 摘掉,不留破图。 */
function SiteMark({ source }: { source: string }) {
+ // 这几站的公开图标随静态资源提供,验证页和离线回放不影响来源身份。
+ const bundled = ['javten', 'fc2ppvdb', 'avwikidb', 'github'].includes(source);
return (
- <img src={siteMarkUrl({ source })} alt="" width={16} height={16} loading="lazy"
+ <img src={bundled ? `/vendor/site-marks/${source}.png` : siteMarkUrl({ source })} alt="" width={16} height={16} loading="lazy"
onError={(event) => event.currentTarget.remove()}
className="size-4 shrink-0 rounded-sm object-contain" />
);
@@ -291,7 +293,7 @@ function AmaneBridgeCard({ toast }: ScrapingProps) {
if (!data) {
return bridge.error
- ? <Section title="amane 桥"><Stack><Note tone="error">{errorMessage(bridge.error)}</Note></Stack></Section>
+ ? <Section title="amane"><Stack><Note tone="error">{errorMessage(bridge.error)}</Note></Stack></Section>
: null;
}
const busy = running || rebuild.isPending || check.isPending;
@@ -299,17 +301,17 @@ function AmaneBridgeCard({ toast }: ScrapingProps) {
: check.error ? errorMessage(check.error)
: outcome?.status === 'failed' ? (outcome.error || '重建未完成') : '';
return (
- <Section title="amane 桥" aside={<ExternalLink href={data.repository}>{data.repository}</ExternalLink>}>
+ <Section title="amane" aside={<ExternalLink href={data.repository}><SiteMark source="github" />{data.repository}</ExternalLink>}>
<FactList>
- <Fact term="钉住的版本">{data.version ? `${data.version} · ` : ''}{data.revision.slice(0, 12)}</Fact>
+ <Fact term="已安装版本">{data.installed_version || '未安装'}</Fact>
<Fact term="上游最新版本">{check.data?.latest ?? '尚未检查'}</Fact>
<Fact term="运行环境">{data.installed ? '已安装' : '未安装'}</Fact>
- <Fact term="开放的站">{data.sites.map((site) => site.label).join('、')}</Fact>
+ <Fact term="内置站点">{data.sites.map((site) => site.label).join('、')}</Fact>
</FactList>
<Stack divided>
<Help>
- 这几站由 amane({data.license})的解析器经独立子进程回答,运行环境按钉住的版本单独安装,
- 不随上游自动升级;换版本要人读过上游改动再改清单。首次安装约需下载 98 MB。
+ 已安装版本:{data.installed_version || '未安装'}。amane({data.license})提供这些内置站点的解析能力。
+ 重新安装会使用 Peach 内置的 {data.version} 版本,不随上游自动升级。
</Help>
{running ? <LoadingDots label="正在重建运行环境" /> : null}
{problem ? <Note tone="error">{problem}</Note> : null}
diff --git a/frontend/src/react/scraping/scraping.ts b/frontend/src/react/scraping/scraping.ts
index 8fce9490e..d9197708a 100644
--- a/frontend/src/react/scraping/scraping.ts
+++ b/frontend/src/react/scraping/scraping.ts
@@ -67,6 +67,7 @@ export interface AmaneBridge {
revision: string;
version: string;
installed: boolean;
+ installed_version: string;
python: string;
sites: { source: string; label: string }[];
job: CoverJob;
diff --git a/frontend/test/react/scraping.test.tsx b/frontend/test/react/scraping.test.tsx
index 70a9d5afa..0e2047b23 100644
--- a/frontend/test/react/scraping.test.tsx
+++ b/frontend/test/react/scraping.test.tsx
@@ -82,6 +82,7 @@ async function open(handlers: Record<string, (body: never) => Reply | Promise<Re
const BRIDGE: AmaneBridge = {
repository: 'https://github.com/sqzw-x/amane', license: 'GPL-3.0',
revision: '79ecfa763cc786318e1964a3d7f4e244a7d5c96d', version: '0.16.1', installed: true,
+ installed_version: '0.16.1',
python: 'T:/tools/amane-bridge/.venv/Scripts/python.exe',
sites: [{ source: 'fc2ppvdb', label: 'FC2PPVDB' }, { source: 'avsox', label: 'AVSOX' }],
job: { status: 'idle' },
@@ -106,9 +107,9 @@ it('首屏用 prefetch 落进缓存的三份画出来,挂载时不再请求一
expect(calls.map((call) => call.path)).toEqual(FIRST_SCREEN);
expect(section(host, 'JavBus')).not.toBeNull();
expect(section(host, '高清封面')).not.toBeNull();
- const bridge = section(host, 'amane 桥');
+ const bridge = section(host, 'amane');
expect(bridge).not.toBeNull();
- expect(bridge?.textContent).toContain('0.16.1 · 79ecfa763cc7');
+ expect(bridge?.textContent).toContain('已安装版本0.16.1');
expect(bridge?.textContent).toContain('FC2PPVDB、AVSOX');
expect(buttonNamed('重新安装', bridge!)).not.toBeNull();
// 连接方式是 BoardUI 的 Select,画出来的是按钮;原生 select 是 React Aria 藏在后面
@@ -300,14 +301,14 @@ it('amane 桥:检查上游只填「上游最新版本」那一行,重建跟
});
await prefetchScraping(new AbortController().signal);
const host = await mount(page(toast));
- const bridge = section(host, 'amane 桥')!;
+ const bridge = section(host, 'amane')!;
expect(bridge.textContent).toContain('尚未检查');
await click(buttonNamed('检查上游版本', bridge));
await settle();
expect(calls[FIRST_SCREEN.length]).toMatchObject({ path: '/api/scraping/amane-bridge/check', method: 'POST' });
expect(bridge.textContent).toContain('v0.17.0');
- expect(bridge.textContent, '钉住的版本不因上游有新版而改变').toContain('0.16.1 · 79ecfa763cc7');
+ expect(bridge.textContent, '检查上游不改变已安装版本').toContain('已安装版本0.16.1');
await click(buttonNamed('重新安装', bridge));
await settle();
diff --git a/scripts/dev/copy-editor.js b/scripts/dev/copy-editor.js
new file mode 100644
index 000000000..543a09c02
--- /dev/null
+++ b/scripts/dev/copy-editor.js
@@ -0,0 +1,62 @@
+/* 源码与演示预览的改字工具,仅由 ?edit 页面加载。 */
+(()=>{
+ const source=document.body.dataset.peachCopyMode==='source',key='peach.copy-edits.v1';
+ let edits={},active=true,editing=false;
+ try{edits=JSON.parse(localStorage.getItem(key)||'{}')}catch{}
+ const bar=document.createElement('div');bar.dataset.copyEditor='';
+ Object.assign(bar.style,{position:'fixed',bottom:'calc(16px + var(--demo-notice-height,0px))',left:'50%',transform:'translateX(-50%)',zIndex:'2147483647',padding:'10px 14px',borderRadius:'12px',display:'flex',gap:'10px',alignItems:'center',background:'var(--ground,#fff)',color:'var(--ink,#111)',boxShadow:'0 2px 18px #0003',font:'13px system-ui',maxWidth:'calc(100vw - 32px)'});
+ const label=document.createElement('b');label.textContent='改字模式';bar.append(label);
+ const status=document.createElement('span');status.textContent=source?'点文字修改并保存到源码':'点文字修改,保存到本浏览器';bar.append(status);
+ const button=(text,fn)=>{const b=document.createElement('button');b.textContent=text;b.type='button';b.onclick=fn;bar.append(b);return b};
+ const toggle=button('暂停编辑',()=>{active=!active;toggle.textContent=active?'暂停编辑':'继续编辑'});
+ button('导出修改',()=>{const url=URL.createObjectURL(new Blob([JSON.stringify(edits,null,2)],{type:'application/json'}));const a=document.createElement('a');a.href=url;a.download='peach-copy-edits.json';a.click();setTimeout(()=>URL.revokeObjectURL(url),1000)});
+ button('退出',()=>{const url=new URL(location.href);url.searchParams.delete('edit');location.href=url});
+ document.body.append(bar);
+ const apply=()=>{
+ if(editing)return;
+ const walk=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT);let node;
+ while((node=walk.nextNode())){
+ if(node.parentElement.closest('[data-copy-editor],script,style,textarea,input'))continue;
+ const original=node.textContent.trim();if(original&&edits[original])node.textContent=node.textContent.replace(original,edits[original]);
+ }
+ };
+ new MutationObserver(apply).observe(document.body,{childList:true,subtree:true});apply();
+ if(source)fetch('/dev/copy-edits').then(r=>r.ok?r.json():{}).then(saved=>{edits={...edits,...saved};apply()});
+ const textAt=(x,y)=>{if(document.caretPositionFromPoint){const p=document.caretPositionFromPoint(x,y);return p?.offsetNode?.nodeType===3?p.offsetNode:null}const r=document.caretRangeFromPoint?.(x,y);return r?.startContainer?.nodeType===3?r.startContainer:null};
+ document.addEventListener('click',async event=>{
+ if(!active||editing||event.target.closest('[data-copy-editor]'))return;
+ const node=textAt(event.clientX,event.clientY);if(!node||!node.textContent.trim())return;
+ event.preventDefault();event.stopImmediatePropagation();editing=true;
+ const original=node.textContent.trim(),input=document.createElement('input');input.value=original;
+ input.dataset.copyEditor='';input.style.cssText='position:fixed;z-index:2147483647;left:16px;right:16px;top:16px;padding:12px;font:16px system-ui;background:var(--ground,#fff);color:var(--ink,#111);border:2px solid var(--tungsten,#007aff);border-radius:10px';
+ document.body.append(input);input.focus();input.select();status.textContent='回车保存,Esc 取消';
+ const cancel=()=>{input.remove();editing=false};
+ input.addEventListener('keydown',async event=>{
+ if(event.key==='Escape'){cancel();status.textContent='已取消';return}
+ if(event.key!=='Enter')return;
+ event.preventDefault();const replacement=input.value.trim();if(!replacement)return;
+ input.disabled=true;
+ try{
+ if(source){
+ // 刷新后显示的是本地修改,源文件查找仍按当前可见文案。
+ const response=await fetch('/dev/copy-candidates?text='+encodeURIComponent(original));
+ const candidates=await response.json();if(!response.ok||!candidates.length)throw Error('未找到静态源文案;可先导出修改');
+ let candidate=candidates[0];
+ if(candidates.length>1){
+ const select=document.createElement('select');select.dataset.copyEditor='';
+ select.style.cssText=input.style.cssText+';top:70px';
+ select.add(new Option('请选择文案来源',''));
+ candidates.forEach((x,i)=>select.add(new Option(`${x.file}:${x.line}`,String(i))));
+ document.body.append(select);status.textContent='这段文案有多个位置,请选择来源';
+ candidate=await new Promise(resolve=>{select.onchange=()=>{select.remove();resolve(candidates[Number(select.value)])};input.addEventListener('keydown',event=>{if(event.key==='Escape'){select.remove();resolve(null)}},{once:true})});
+ if(!candidate)throw Error('未选择源位置');
+ }
+ const saved=await fetch('/dev/copy-save',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({original,replacement,candidate})});
+ const result=await saved.json();if(!saved.ok)throw Error(result.error||'保存失败');
+ status.textContent=result.needs_build?'已保存源码;前端重建后在普通模式生效':'已保存源码';
+ }else status.textContent='已保存到本浏览器,可导出修改';
+ edits[original]=replacement;localStorage.setItem(key,JSON.stringify(edits));node.textContent=node.textContent.replace(original,replacement);cancel();apply();
+ }catch(error){input.disabled=false;status.textContent=error.message}
+ });
+ },true);
+})();
diff --git a/scripts/test_runner.py b/scripts/test_runner.py
index 6e809c86c..3bdf5aeb0 100644
--- a/scripts/test_runner.py
+++ b/scripts/test_runner.py
@@ -126,7 +126,7 @@ SCOPES: dict[str, tuple[str, ...]] = {
"test_legacy_shell_routes.py",
"test_web_perf.py", "test_copy_final_state.py",
"test_agency_entity.py", "test_label_maker.py", "test_dependency_policy.py",
- "test_desktop_settings.py",
+ "test_desktop_settings.py", "test_dev_copy.py",
"test_fastapi_api.py", "test_follow_assets.py", "test_follow_web.py",
"test_metadata_library.py", "test_studio_icon_variants.py", "test_web_settings.py"),
"core": ("test_access.py", "test_auth.py", "test_config.py", "test_field_owners.py",
@@ -155,6 +155,8 @@ SCOPE_TEST_IDS: dict[str, tuple[str, ...]] = {
# 一个文件可以落到多个域:读它的测试登记在哪个域,改它就得跑到哪个域。
# `tests/test_test_planning.py` 按测试源码里真实读到的路径反查这两张表,漏一条本地就红。
AUTO_SCOPE_FILES: dict[str, tuple[str, ...]] = {
+ "src/peach/dev_copy.py": ("web",),
+ "scripts/dev/copy-editor.js": ("web",),
# 路由页面同时被目录、工具与前端三个域的测试读源码。
"src/peach/routes_pages.py": ("catalog", "tooling", "web"),
# 托盘既是 sync 域的服务编排,也被版本与桌面设置那些 tooling 测试读源码。
diff --git a/src/peach/dev_copy.py b/src/peach/dev_copy.py
new file mode 100644
index 000000000..4f762ef97
--- /dev/null
+++ b/src/peach/dev_copy.py
@@ -0,0 +1,69 @@
+"""源码检出的改字工具:定位静态文案,核对文件摘要后保存。"""
+from __future__ import annotations
+import hashlib
+import json
+from pathlib import Path
+import re
+
+
+def files(root: Path):
+ yield root / "web/index.html"
+ yield root / "web/app.js"
+ yield from sorted((root / "frontend/src").rglob("*.tsx"))
+ yield from sorted((root / "frontend/src").rglob("*.ts"))
+
+
+def candidates(root: Path, original: str) -> list[dict]:
+ if not isinstance(original, str) or not original.strip() or len(original) > 2000:
+ raise ValueError("请选择不超过 2000 字的静态文案")
+ found = []
+ for path in files(root):
+ if not path.is_file() or ".test." in path.name:
+ continue
+ source = path.read_text(encoding="utf-8")
+ if len(source) > 2_000_000:
+ continue
+ # 只定位完整文字节点或完整字符串,避免改到标识和代码的一部分。
+ pattern = re.compile(r"(?P<quote>['\"`])" + re.escape(original) + r"(?P=quote)|>\s*(?P<jsx>" + re.escape(original) + r")\s*<")
+ for match in pattern.finditer(source):
+ start = match.start("jsx") if match.group("jsx") else match.start() + 1
+ end = start + len(original)
+ found.append({"file": path.relative_to(root).as_posix(), "start": start, "end": end,
+ "hash": hashlib.sha256(source.encode()).hexdigest(),
+ "line": source[:start].count("\n") + 1,
+ "quote": match.group("quote") or ""})
+ return found[:100]
+
+
+def save(root: Path, body: dict) -> dict:
+ if not isinstance(body, dict):
+ raise ValueError("修改内容必须是对象")
+ original, replacement = body.get("original", ""), body.get("replacement", "")
+ if not isinstance(replacement, str) or not replacement.strip() or len(replacement) > 2000:
+ raise ValueError("新文案不能为空,且不能超过 2000 字")
+ selected = body.get("candidate")
+ if selected not in candidates(root, original):
+ raise ValueError("源文件已变化,请重新选择文字")
+ path = (root / selected["file"]).resolve()
+ if path not in {p.resolve() for p in files(root)}:
+ raise ValueError("不能修改这个文件")
+ source = path.read_text(encoding="utf-8")
+ quote = selected["quote"]
+ if quote:
+ escaped = replacement.replace("\\", "\\\\").replace(quote, "\\" + quote).replace("\n", "\\n").replace("\r", "\\r")
+ if quote == "`":
+ escaped = escaped.replace("${", "\\${")
+ else:
+ escaped = replacement.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+ if path.suffix == ".tsx":
+ escaped = escaped.replace("{", "&#123;").replace("}", "&#125;")
+ backup = root / "build/copy-editor/backups" / selected["hash"] / selected["file"]
+ backup.parent.mkdir(parents=True, exist_ok=True)
+ if not backup.exists():
+ backup.write_text(source, encoding="utf-8")
+ path.write_text(source[:selected["start"]] + escaped + source[selected["end"]:], encoding="utf-8")
+ record = root / "build/copy-editor/edits.json"
+ edits = json.loads(record.read_text(encoding="utf-8")) if record.exists() else {}
+ edits[original] = replacement
+ record.write_text(json.dumps(edits, ensure_ascii=False, indent=2), encoding="utf-8")
+ return {"ok": True, "file": selected["file"], "needs_build": selected["file"].startswith("frontend/")}
diff --git a/src/peach/metadata_amane.py b/src/peach/metadata_amane.py
index c83e74a98..d0744036a 100644
--- a/src/peach/metadata_amane.py
+++ b/src/peach/metadata_amane.py
@@ -60,7 +60,7 @@ SITES: dict[str, str] = {name: config.label for name, config in SITE_CONFIGS.ite
#: 都是 2020-12-11、2025-07-18。它不当 `release_date` 候选,只记在 `extra['delivery_date']`,发行日留给链上下一档。
DELIVERY_DATE_SITES = frozenset({"prestige"})
-#: amane 的 `FailureReason`(桥脚本 `FAILURE_REASONS` 那十六档)→ 契约的 `FailureReason`,一对一。
+#: amane 的 `FailureReason`(桥脚本 `FAILURE_REASONS` 那十七档)→ 契约的 `FailureReason`,一对一。
#: 三档分类、冷却动作与可否重试都由契约那张表定(`sources.base.REASON_KINDS` 等),这里只做名字翻译:
#: `cloudflare_blocked`(Ray ID 拦截页)与 `ip_banned` 同属出口被封;`age_verification` 是要 Cookie 的门;
#: `http_error`、`empty_response`、`crawler_unavailable` 都是「桥那一侧这次没答上」,归服务端错误;
@@ -73,6 +73,7 @@ AMANE_REASONS: dict[str, FailureReason] = {
"timeout": FailureReason.TIMEOUT,
"network": FailureReason.NETWORK,
"http_error": FailureReason.SERVER_ERROR,
+ "api_error": FailureReason.SERVER_ERROR,
"empty_response": FailureReason.SERVER_ERROR,
"unexpected": FailureReason.NETWORK,
"crawler_unavailable": FailureReason.SERVER_ERROR,
@@ -192,11 +193,24 @@ def describe(tools_root: Path, *, root: Path = BRIDGE_ROOT) -> dict:
"revision": pinned_revision(root),
"version": locked_version(root),
"installed": python.is_file(),
+ "installed_version": installed_version(tools_root),
"python": str(python),
"sites": [{"source": name, "label": label} for name, label in SITES.items()],
}
+def installed_version(tools_root: Path) -> str:
+ """从独立运行环境的包元数据读取版本,不导入上游或启动子进程。"""
+ from importlib.metadata import distributions
+
+ venv = bridge_home(tools_root) / ".venv"
+ paths = [venv / "Lib" / "site-packages", *venv.glob("lib/python*/site-packages")]
+ for distribution in distributions(path=[str(path) for path in paths if path.is_dir()]):
+ if distribution.metadata.get("Name", "").casefold() == "amane":
+ return distribution.version
+ return ""
+
+
def latest_upstream_tag(client_options: Mapping[str, object], *, timeout: float = 10.0) -> str:
"""上游最新 release 的 tag,只读 GitHub API;取不到一律回「未取得」,不猜。"""
import httpx
diff --git a/src/peach/routes_pages.py b/src/peach/routes_pages.py
index efd15b718..eabde1468 100644
--- a/src/peach/routes_pages.py
+++ b/src/peach/routes_pages.py
@@ -16,8 +16,10 @@
from __future__ import annotations
import hashlib
+import json
import os
import shutil
+import sys
from collections.abc import Mapping, Sequence
import re
@@ -29,6 +31,7 @@ from fastapi import APIRouter, Depends, HTTPException, Request
from fastapi.responses import (
FileResponse,
HTMLResponse,
+ JSONResponse,
PlainTextResponse,
RedirectResponse,
Response,
@@ -521,12 +524,65 @@ def index(request: Request, args: dict[str, str] = Depends(require_page_auth)):
return HTMLResponse(setup_page(settings_file.active(), windows=os.name == "nt"))
if not settings.page_path.is_file():
return PlainTextResponse("Peach page missing", status_code=500)
- response = FileResponse(settings.page_path, media_type="text/html")
+ if "edit" in request.query_params and _copy_editor_available():
+ html = settings.page_path.read_text(encoding="utf-8")
+ html = html.replace("<body", '<body data-peach-copy-mode="source"', 1)
+ html = html.replace("</body>", '<script src="/dev/copy-editor.js" defer></script></body>')
+ response = HTMLResponse(html)
+ else:
+ response = FileResponse(settings.page_path, media_type="text/html")
response.headers["Cache-Control"] = "no-store"
set_auth_cookie(response, request)
return response
+def _copy_editor_available() -> bool:
+ return not getattr(sys, "frozen", False) and (PROJECT_ROOT / "scripts/dev/copy-editor.js").is_file()
+
+
+def _require_copy_editor():
+ if not _copy_editor_available():
+ raise HTTPException(404, "missing")
+
+
[email protected]("/dev/copy-editor.js")
+def copy_editor_script(request: Request, args: dict[str, str] = Depends(require_asset_auth)):
+ _require_copy_editor()
+ return asset_response(request, PROJECT_ROOT / "scripts/dev/copy-editor.js", "text/javascript")
+
+
[email protected]("/dev/copy-edits")
+def copy_editor_edits(args: dict[str, str] = Depends(require_asset_auth)):
+ _require_copy_editor()
+ path = PROJECT_ROOT / "build/copy-editor/edits.json"
+ return JSONResponse(json.loads(path.read_text(encoding="utf-8")) if path.is_file() else {},
+ headers={"Cache-Control": "no-store"})
+
+
[email protected]("/dev/copy-candidates")
+def copy_editor_candidates(text: str = "", args: dict[str, str] = Depends(require_asset_auth)):
+ _require_copy_editor()
+ from . import dev_copy
+ try:
+ return JSONResponse(dev_copy.candidates(PROJECT_ROOT, text), headers={"Cache-Control": "no-store"})
+ except ValueError as error:
+ raise HTTPException(400, str(error)) from error
+
+
[email protected]("/dev/copy-save")
+async def copy_editor_save(request: Request, args: dict[str, str] = Depends(require_asset_auth)):
+ _require_copy_editor()
+ if request.headers.get("origin") != str(request.base_url).rstrip("/"):
+ raise HTTPException(403, "same origin required")
+ if len(await request.body()) > 32768:
+ raise HTTPException(413, "too large")
+ from . import dev_copy
+ try:
+ return JSONResponse(dev_copy.save(PROJECT_ROOT, await request.json()))
+ except (ValueError, TypeError, KeyError) as error:
+ return JSONResponse({"error": str(error)}, status_code=409)
+
+
@router.post("/setup")
async def setup_submit(request: Request):
"""首次运行表单的提交端点。落盘逻辑全在 `peach.onboarding`,这里只做守卫和渲染。
diff --git a/tests/test_dev_copy.py b/tests/test_dev_copy.py
new file mode 100644
index 000000000..39774d25c
--- /dev/null
+++ b/tests/test_dev_copy.py
@@ -0,0 +1,47 @@
+"""改字工具只保存静态源文案,冲突与代码路径不能误写。"""
+from pathlib import Path
+import tempfile
+import unittest
+from peach import dev_copy
+
+
+class DevCopyTests(unittest.TestCase):
+ def test_jsx_text_keeps_braces_literal_and_invalid_values_are_rejected(self):
+ with tempfile.TemporaryDirectory() as tmp:
+ root = Path(tmp)
+ (root / "frontend/src").mkdir(parents=True)
+ path = root / "frontend/src/example.tsx"
+ path.write_text('<p>示例</p>', encoding="utf-8")
+ candidate, = dev_copy.candidates(root, "示例")
+ dev_copy.save(root, {"original": "示例", "replacement": "文字{原样}", "candidate": candidate})
+ self.assertEqual(path.read_text(encoding="utf-8"), '<p>文字&#123;原样&#125;</p>')
+ for body in [[], {"original": None, "replacement": "文字"}]:
+ with self.assertRaises(ValueError):
+ dev_copy.save(root, body)
+
+ def test_save_preserves_code_and_records_the_original_file(self):
+ with tempfile.TemporaryDirectory() as tmp:
+ root = Path(tmp)
+ (root / "web").mkdir()
+ path = root / "web/app.js"
+ path.write_text("const label='示例文字';", encoding="utf-8")
+ candidate, = dev_copy.candidates(root, "示例文字")
+ result = dev_copy.save(root, {"original": "示例文字", "replacement": "新的'文字", "candidate": candidate})
+ self.assertTrue(result["ok"])
+ self.assertEqual(path.read_text(encoding="utf-8"), "const label='新的\\'文字';")
+ self.assertEqual(len(list((root / "build/copy-editor/backups").rglob("app.js"))), 1)
+ with self.assertRaises(ValueError):
+ dev_copy.save(root, {"original": "示例文字", "replacement": "错误", "candidate": candidate})
+
+ def test_ambiguous_labels_require_a_specific_unchanged_candidate(self):
+ with tempfile.TemporaryDirectory() as tmp:
+ root = Path(tmp)
+ (root / "web").mkdir()
+ path = root / "web/index.html"
+ path.write_text('<p>示例</p><button>示例</button>', encoding="utf-8")
+ choices = dev_copy.candidates(root, "示例")
+ self.assertEqual(len(choices), 2)
+ dev_copy.save(root, {"original": "示例", "replacement": "按钮", "candidate": choices[1]})
+ self.assertEqual(path.read_text(encoding="utf-8"), '<p>示例</p><button>按钮</button>')
+ with self.assertRaises(ValueError):
+ dev_copy.save(root, {"original": "示例", "replacement": "错误", "candidate": {"file": "../secret"}})
diff --git a/tests/test_fastapi_api.py b/tests/test_fastapi_api.py
index dc80e7876..2f585b2de 100644
--- a/tests/test_fastapi_api.py
+++ b/tests/test_fastapi_api.py
@@ -876,6 +876,18 @@ class FastApiContractTests(unittest.IsolatedAsyncioTestCase):
await self.client.get("/site-mark?t=secret&domain=kemono.cr")
self.assertTrue(any(host.endswith("kemono.cr") for host in hosts[reached:]), hosts)
+ async def test_copy_editor_is_source_only_and_rejects_cross_origin_saves(self):
+ from unittest.mock import patch
+ from peach import routes_pages
+ with patch.object(routes_pages.sys, "frozen", True, create=True):
+ refused = await self.client.get('/dev/copy-editor.js?t=secret')
+ self.assertEqual(refused.status_code, 404)
+ page = await self.client.get('/?edit&t=secret', follow_redirects=True)
+ self.assertNotIn('data-peach-copy-mode', page.text)
+ refused = await self.client.post('/dev/copy-save?t=secret', json={},
+ headers={'Origin': 'https://another.example'})
+ self.assertEqual(refused.status_code, 403)
+
def _archive_links(self, colour_of):
"""两条存档链接;上游按 `colour_of(url)` 给一枚圆形图标,给 None 就 404。返回请求过的地址。"""
from PIL import Image, ImageDraw
diff --git a/tests/test_metadata_amane.py b/tests/test_metadata_amane.py
index 9ed22bdbb..56db93444 100644
--- a/tests/test_metadata_amane.py
+++ b/tests/test_metadata_amane.py
@@ -81,7 +81,7 @@ class ManifestTests(unittest.TestCase):
reasons = set(__import__("re").findall(r'"([a-z_]+)",?\s', (
metadata_amane.BRIDGE_SCRIPT).read_text(encoding="utf-8").split("FAILURE_REASONS = (", 1)[1]
.split(")", 1)[0]))
- self.assertEqual(len(reasons), 16)
+ self.assertEqual(len(reasons), 17)
self.assertEqual(reasons - set(metadata_amane.AMANE_REASONS), set())
for upstream, reason in metadata_amane.AMANE_REASONS.items():
with self.subTest(upstream=upstream):
@@ -89,11 +89,11 @@ class ManifestTests(unittest.TestCase):
self.assertIn(REASON_KINDS[reason], {"auth", "unavailable", "not_found"})
def test_the_three_tier_classification_of_every_upstream_reason(self):
- """十六档各落到哪一档是冷却与重试的依据,逐条钉住;契约表改了这里要跟着改。"""
+ """十七档各落到哪一档是冷却与重试的依据,逐条钉住;契约表改了这里要跟着改。"""
expected = {
"not_found": "not_found", "no_usable_metadata": "not_found",
"rate_limited": "unavailable", "server_error": "unavailable", "timeout": "unavailable",
- "network": "unavailable", "http_error": "unavailable", "empty_response": "unavailable",
+ "network": "unavailable", "http_error": "unavailable", "api_error": "unavailable", "empty_response": "unavailable",
"unexpected": "unavailable", "crawler_unavailable": "unavailable", "parse_error": "unavailable",
"cloudflare_challenge": "auth", "cloudflare_blocked": "auth", "ip_banned": "auth",
"geo_restricted": "auth", "age_verification": "auth",
@@ -153,10 +153,18 @@ class RebuildTests(unittest.TestCase):
def test_describe_lists_the_facts_the_settings_card_shows(self):
with tempfile.TemporaryDirectory() as tmp:
facts = metadata_amane.describe(Path(tmp))
- self.assertEqual(set(facts), {"repository", "license", "revision", "version", "installed", "python", "sites"})
+ self.assertEqual(set(facts), {"repository", "license", "revision", "version", "installed", "installed_version", "python", "sites"})
self.assertFalse(facts["installed"])
+ self.assertEqual(facts["installed_version"], "")
self.assertEqual([site["source"] for site in facts["sites"]], list(metadata_amane.SITES))
+ def test_installed_version_reads_the_isolated_package_metadata(self):
+ with tempfile.TemporaryDirectory() as tmp:
+ tools = Path(tmp)
+ package = metadata_amane.bridge_home(tools) / ".venv" / "Lib" / "site-packages" / "amane-0.17.0.dist-info"
+ package.mkdir(parents=True)
+ (package / "METADATA").write_text("Metadata-Version: 2.1\nName: amane\nVersion: 0.17.0\n", encoding="utf-8")
+ self.assertEqual(metadata_amane.describe(tools)["installed_version"], "0.17.0")
def test_the_upstream_tag_is_never_guessed(self):
class Client:
def __init__(self, status, body):
diff --git a/tests/test_metadata_amane_bridge.py b/tests/test_metadata_amane_bridge.py
index 84245a467..a4f2e859c 100644
--- a/tests/test_metadata_amane_bridge.py
+++ b/tests/test_metadata_amane_bridge.py
@@ -70,8 +70,8 @@ def run_main(argv, runtime):
class BridgeContractTests(unittest.TestCase):
def test_the_failure_reasons_are_the_upstream_sixteen(self):
- self.assertEqual(len(bridge.FAILURE_REASONS), 16)
- self.assertEqual(len(set(bridge.FAILURE_REASONS)), 16)
+ self.assertEqual(len(bridge.FAILURE_REASONS), 17)
+ self.assertEqual(len(set(bridge.FAILURE_REASONS)), 17)
def test_a_hit_prints_one_json_line_and_exits_zero(self):
runtime = make_runtime({
diff --git a/tests/test_web_ui.py b/tests/test_web_ui.py
index db339b43a..f67ab90be 100644
--- a/tests/test_web_ui.py
+++ b/tests/test_web_ui.py
@@ -2078,7 +2078,7 @@ class WebUiSourceTests(unittest.TestCase):
self.assertPageLacks(gone, "站点图标不得由浏览器向站外取")
react = Path(__file__).resolve().parents[1] / "frontend/src/react"
scraping = (react / "scraping/scraping-page.tsx").read_text(encoding="utf-8")
- self.assertIn("<img src={siteMarkUrl({ source })}", scraping)
+ self.assertIn("siteMarkUrl({ source })}", scraping)
self.assertNotIn("faviconUrl", scraping)
taste = (react / "taste/taste-page.tsx").read_text(encoding="utf-8")
self.assertIn('<img src={siteMarkUrl({ domain })} alt="" loading="lazy"', taste)
@@ -9644,11 +9644,11 @@ class WebUiSourceTests(unittest.TestCase):
def test_jav_cover_source_and_size_are_independent_settings(self):
self.assertPageContains('JAV 默认封面')
- self.assertPageContains('JAV 封面默认大小')
+ self.assertPageContains('视频封面默认大小')
self.assertPageContains("[['cover','官方封面',''],['thumbnail','预览图','']]")
- self.assertPageContains("JAV_LAYOUTS,javLayout(),{attr:'data-jav-layout',className:'javimageswitch',text:true}")
+ self.assertPageContains("JAV_LAYOUTS,cardLayout(),{attr:'data-video-layout',className:'javimageswitch',text:true}")
self.assertPageContains('id="javSizeSetting"')
- self.assertPageContains("wireJavLayoutButtons(size)")
+ self.assertPageContains("wireIconSwitch(size,'data-video-layout',setVideoLayout)")
size_body = self.app_js.split('function setJavLayout(value){', 1)[1].split('\n}', 1)[0]
self.assertNotIn('appSettings.javImage=', size_body)
cover_body = self.app_js.split("wireIconSwitch(mount,'data-jav-image-choice',choice=>{", 1)[1].split('});', 1)[0]
diff --git a/tools/amane-bridge/bridge.py b/tools/amane-bridge/bridge.py
index e56c5a276..086ced2a3 100644
--- a/tools/amane-bridge/bridge.py
+++ b/tools/amane-bridge/bridge.py
@@ -5,7 +5,7 @@
与网络层——`amane.crawlers.sites.<站>`、`amane.crawlers.http`、`amane.net.*`;不碰
`amane.aggregate`(它把配置层与数据库层一起拖进来,聚合逻辑 Peach 自己在
`metadata_policy` 里做),也不经 `observability.invoke_source`(失败原因会被它吞进
-Recorder,返回值只剩站点名)。这里自己 catch `SourceError`,把 `FailureReason` 那 16 档
+Recorder,返回值只剩站点名)。这里自己 catch `SourceError`,把 `FailureReason` 那 17 档
原样写进 JSON,冷却与分档由 Peach 一侧决定。
已知代价:`amane.crawlers` 的包 `__init__` 会连带 SQLAlchemy 等模块(实测导入约 0.6~1 秒),
@@ -64,7 +64,7 @@ EXIT_FOUND, EXIT_NOT_FOUND, EXIT_FAILED, EXIT_USAGE = 0, 2, 3, 4
#: 上游 `FailureReason` 的全部取值,照抄 `amane/net/errors.py`。桥不解释它们,只保证写进
#: JSON 的 `reason` 落在这张表里;上游加档时这里要跟着改,Peach 一侧的映射也是。
FAILURE_REASONS = (
- "http_error", "not_found", "rate_limited", "server_error", "timeout", "network",
+ "http_error", "api_error", "not_found", "rate_limited", "server_error", "timeout", "network",
"cloudflare_challenge", "cloudflare_blocked", "ip_banned", "geo_restricted",
"age_verification", "empty_response", "no_usable_metadata", "parse_error",
"crawler_unavailable", "unexpected",
diff --git a/tools/amane-bridge/pyproject.toml b/tools/amane-bridge/pyproject.toml
index d5096dc96..0c1002213 100644
--- a/tools/amane-bridge/pyproject.toml
+++ b/tools/amane-bridge/pyproject.toml
@@ -12,7 +12,7 @@ description = "Peach 调用 amane 刮削站点的薄桥子进程"
requires-python = ">=3.14"
license = "AGPL-3.0-or-later"
dependencies = [
- "amane @ git+https://github.com/sqzw-x/amane@79ecfa763cc786318e1964a3d7f4e244a7d5c96d",
+ "amane @ git+https://github.com/sqzw-x/amane@3c416618a9617be1c377694b1a150bf9821a7e6d",
]
[tool.uv]
diff --git a/tools/amane-bridge/uv.lock b/tools/amane-bridge/uv.lock
index a6c1e16c2..4c11a50ea 100644
--- a/tools/amane-bridge/uv.lock
+++ b/tools/amane-bridge/uv.lock
@@ -45,8 +45,8 @@ wheels = [
[[package]]
name = "amane"
-version = "0.16.1"
-source = { git = "https://github.com/sqzw-x/amane?rev=79ecfa763cc786318e1964a3d7f4e244a7d5c96d#79ecfa763cc786318e1964a3d7f4e244a7d5c96d" }
+version = "0.17.0"
+source = { git = "https://github.com/sqzw-x/amane?rev=3c416618a9617be1c377694b1a150bf9821a7e6d#3c416618a9617be1c377694b1a150bf9821a7e6d" }
dependencies = [
{ name = "aiofiles" },
{ name = "aiolimiter" },
@@ -828,7 +828,7 @@ dependencies = [
]
[package.metadata]
-requires-dist = [{ name = "amane", git = "https://github.com/sqzw-x/amane?rev=79ecfa763cc786318e1964a3d7f4e244a7d5c96d" }]
+requires-dist = [{ name = "amane", git = "https://github.com/sqzw-x/amane?rev=3c416618a9617be1c377694b1a150bf9821a7e6d" }]
[[package]]
name = "pillow"
diff --git a/web/app.js b/web/app.js
index d5a1c93c4..8d426dbb0 100644
--- a/web/app.js
+++ b/web/app.js
@@ -672,9 +672,9 @@ function renderJavImageSetting(){
repaintDetailPoster();
});
const size=$('#javSizeSetting');
- size.innerHTML=iconSwitchHtml('jav-size','JAV 封面默认大小',
- JAV_LAYOUTS,javLayout(),{attr:'data-jav-layout',className:'javimageswitch',text:true});
- wireJavLayoutButtons(size);
+ size.innerHTML=iconSwitchHtml('video-size','视频封面默认大小',
+ JAV_LAYOUTS,cardLayout(),{attr:'data-video-layout',className:'javimageswitch',text:true});
+ wireIconSwitch(size,'data-video-layout',setVideoLayout);
}
/* 侧栏光晕的详细设置照 feralui.dev/gradients 的工作台面板来:参数行是「84px 标签 +
自绘拉条 + 右侧等宽读数」,颜色行点开在自己下方弹一张色板。
@@ -3243,21 +3243,20 @@ function coverAnchor(img){
posterPanel(img,car);
/* 小图版式整张放进卡片(`.whole`):FC2 那种方图、竖版正封放进横卡片,两侧同样留出
两条,垫模糊底而不是黑边。比例差不到 2% 的那一丝留白看不出来,不必多解一张图。 */
- if(img.classList.contains('whole')&&Math.abs(r/car-1)>.02)coverBackdrop(img);
+ if((img.classList.contains('whole')||img.dataset.frame==='front')&&Math.abs(r/car-1)>.02)coverBackdrop(img);
}
/* 只把折痕右边那块正封摆进卡片,封底一个像素都不露。折痕位置在 `data-posterbox` 里,
换算要的容器比例只有页面知道,两边在这里才凑齐。整张封套和「剧照 | 正封 | 剧照」
的 16:9 拼图才有正封可切;没有框(本机 1516 张封面里 771 张判定为不裁,永远拿不到)
就一个字都不写,CSS 里那份贴右缘或按人脸的回退照旧生效。 */
-/* 正封的宽高比先验,与 `jav_poster_crop.PANEL_ASPECT` 同一个数。只给还没装进本机的
- 远程封套用:它没有边车,贴右缘时 0.75 的卡片比正封宽,会带进一条书脊。 */
+/* 正封的宽高比先验,与 `jav_poster_crop.PANEL_ASPECT` 同一个数。没有边车的封套
+ 按正封宽度取景,贴右缘时 0.75 的卡片比正封宽,会带进一条书脊。 */
const PANEL_ASPECT=0.704;
function posterPanel(img,ratio){
if(img.dataset.frame==='front')return;
let [x0,imgW,imgH,y0,x1,y1]=String(img.dataset.posterbox||'').split(' ').map(Number);
- /* 本机封面没有框是判定过「不该裁」,照回退走;远程封套是还没判过,按先验从右缘量回去,
- 和服务端折痕找不到时的 `ratio` 那一档同一个框。 */
- if(!img.dataset.posterbox&&img.dataset.panelPrior&&img.dataset.frame==='sleeve'){
+ /* 没有框的双页封套按先验从右缘量回去,与服务端折痕找不到时的比例框一致。 */
+ if(!img.dataset.posterbox&&img.dataset.frame==='sleeve'){
imgW=img.naturalWidth;imgH=img.naturalHeight;
x0=Math.round(imgW-PANEL_ASPECT*imgH);y0=0;x1=imgW;y1=imgH;
}
@@ -3333,8 +3332,12 @@ const PENDING_IMAGES='.pic>img.poster,[data-media-art]>img,.ring>img,[data-perso
const pendingSince=new WeakMap();
function watchPendingImages(node){
const found=node.matches(PENDING_IMAGES)?[node]:node.querySelectorAll(PENDING_IMAGES);
- for(const img of found)if(!img.complete){
- img.parentElement.classList.add('imgwait');pendingSince.set(img.parentElement,performance.now());
+ for(const img of found){
+ // 缓存图插入时先完成取景;load 尚未派发也不露出默认的居中封套。
+ if(img.complete&&img.naturalWidth&&img.classList.contains('cover'))coverAnchor(img);
+ if(!img.complete){
+ img.parentElement.classList.add('imgwait');pendingSince.set(img.parentElement,performance.now());
+ }
}
}
function settleImage(img){
@@ -6609,6 +6612,7 @@ function setHomeLayout(value){
appSettings.homeLayout=normalizeJavLayout(value);
saveSettings();
document.querySelectorAll('[data-home-layout]').forEach(input=>{input.checked=input.value===appSettings.homeLayout});
+ syncVideoLayoutSetting();
if(!$('#grid').hidden)repaintCatalogGrid();
}
function wireJavLayoutButtons(root){wireIconSwitch(root,'data-jav-layout',setJavLayout)}
@@ -6616,9 +6620,19 @@ function setJavLayout(value){
appSettings.javLayout=normalizeJavLayout(value);
saveSettings();
document.querySelectorAll('[data-jav-layout]').forEach(input=>{input.checked=input.value===appSettings.javLayout});
+ syncVideoLayoutSetting();
// 只重画卡片,不重新请求:版式是纯展示层的事。资料页保留已经载入的分页。
repaintCatalogGrid();
}
+function syncVideoLayoutSetting(){
+ document.querySelectorAll('[data-video-layout]').forEach(input=>{input.checked=input.value===cardLayout()});
+}
+function setVideoLayout(value){
+ appSettings.homeLayout=appSettings.javLayout=normalizeJavLayout(value);
+ saveSettings();
+ document.querySelectorAll('[data-home-layout],[data-jav-layout],[data-video-layout]').forEach(input=>{input.checked=input.value===appSettings.javLayout});
+ repaintCatalogGrid();
+}
function paintJavBar(){
// 版式按钮现在长在排序行里(见 renderCount),这里只负责收掉旧容器。
const bar=$('#javbar');if(bar)bar.hidden=true;
diff --git a/web/css/12-cards.css b/web/css/12-cards.css
index f6fa9bfae..32a9e818d 100644
--- a/web/css/12-cards.css
+++ b/web/css/12-cards.css
@@ -380,3 +380,5 @@ body[data-density="dense"] .card .meta .why{display:none}
/* 占位卡不是在等哪一张图,它本身就是等待态:微光和骨架同一帧出现。`.imgwait` 那 180ms
的淡入门槛是给本地图的,套在这里,那 180ms 里露出来的是 `.pic` 的黑底。 */
.feednewskeleton .pic.imgwait::after{transition:none}
+/* 新作先完成封套识别与正封取景再显示,慢图和缓存图共用加载监听与插入检查。 */
+.feednew .poster.cover:not([data-frame]){visibility:hidden}
diff --git a/web/css/19-immersive.css b/web/css/19-immersive.css
index 9e7976b66..88a86f744 100644
--- a/web/css/19-immersive.css
+++ b/web/css/19-immersive.css
@@ -264,7 +264,7 @@ body:has(#batchbar:not([hidden])) #stage{padding-bottom:180px}
.poster.cover.front.panel{inset:var(--panel-top,0%) auto auto var(--panel-left,0%);width:auto;
max-width:none;height:var(--panel-height,100%);object-fit:fill;
clip-path:inset(var(--panel-clip,0 0 0 0))}
-.poster.cover.front[data-frame="front"]{object-position:50% var(--cover-y,22%)}
+.poster.cover.front[data-frame="front"]{object-fit:contain;object-position:50% 50%}
/* 剧照比大图容器宽得多,裁的是横向,所以横向锚点必须跟着人走。没检出时回落
居中:那是取不到人脸时唯一站得住的猜测。 */
.poster.cover.front[data-frame="still"]{object-position:var(--cover-x,50%) var(--cover-y,22%)}
@@ -281,4 +281,3 @@ body:has(#batchbar:not([hidden])) #stage{padding-bottom:180px}
button,那条规则选不到它。照片那一排的大小开关是同一个控件,走同一条。 */
.sorts .iconswitch{display:inline-flex;gap:2px;margin:0 6px;flex:none}
-
diff --git a/web/dist/peach-react.js b/web/dist/peach-react.js
index 3e167f21a..1a45ba81a 100644
--- a/web/dist/peach-react.js
+++ b/web/dist/peach-react.js
@@ -11898,44 +11898,44 @@ var $ee = /*#__PURE__*/ I.forwardRef(({ children: e, ...t }, n) => {
r.current ||= !0;
}, []), /*#__PURE__*/ I.createElement(Kg.Provider, { value: a }, e);
});
-function _y({ children: e }) {
+function ete({ children: e }) {
let t = (0, I.useMemo)(() => ({ register: () => {} }), []);
return /*#__PURE__*/ I.createElement(Kg.Provider, { value: t }, e);
}
//#endregion
//#region node_modules/react-aria/dist/private/overlays/PortalProvider.mjs
-var vy = /*#__PURE__*/ (0, I.createContext)({});
-function yy(e) {
- let { getContainer: t } = e, { getContainer: n } = by();
- return /*#__PURE__*/ I.createElement(vy.Provider, { value: { getContainer: t === null ? void 0 : t ?? n } }, e.children);
+var _y = /*#__PURE__*/ (0, I.createContext)({});
+function vy(e) {
+ let { getContainer: t } = e, { getContainer: n } = yy();
+ return /*#__PURE__*/ I.createElement(_y.Provider, { value: { getContainer: t === null ? void 0 : t ?? n } }, e.children);
}
-function by() {
- return (0, I.useContext)(vy) ?? {};
+function yy() {
+ return (0, I.useContext)(_y) ?? {};
}
//#endregion
//#region node_modules/react-aria/dist/private/overlays/Overlay.mjs
-var xy = /*#__PURE__*/ I.createContext(null);
-function Sy(e) {
+var by = /*#__PURE__*/ I.createContext(null);
+function xy(e) {
let t = jm(), { portalContainer: n = t ? null : document.body, isExiting: r } = e, [i, a] = (0, I.useState)(!1), o = (0, I.useMemo)(() => ({
contain: i,
setContain: a
- }), [i, a]), { getContainer: s } = by();
+ }), [i, a]), { getContainer: s } = yy();
if (!e.portalContainer && s && (n = s()), !n) return null;
let c = e.children;
return e.disableFocusManagement || (c = /*#__PURE__*/ I.createElement(l_, {
restoreFocus: !0,
contain: (e.shouldContainFocus || i) && !r
- }, c)), c = /*#__PURE__*/ I.createElement(xy.Provider, { value: o }, /*#__PURE__*/ I.createElement(_y, null, /*#__PURE__*/ I.createElement(Rh.Provider, { value: null }, c))), /*#__PURE__*/ Yh.createPortal(c, n);
+ }, c)), c = /*#__PURE__*/ I.createElement(by.Provider, { value: o }, /*#__PURE__*/ I.createElement(ete, null, /*#__PURE__*/ I.createElement(Rh.Provider, { value: null }, c))), /*#__PURE__*/ Yh.createPortal(c, n);
}
-function Cy() {
- let e = (0, I.useContext)(xy)?.setContain;
+function Sy() {
+ let e = (0, I.useContext)(by)?.setContain;
Gp(() => {
e?.(!0);
}, [e]);
}
//#endregion
//#region node_modules/react-aria/dist/private/dialog/useDialog.mjs
-function wy(e, t) {
+function Cy(e, t) {
let { role: n = "dialog" } = e, r = gh();
r = e["aria-label"] ? void 0 : r;
let i = gh();
@@ -11951,7 +11951,7 @@ function wy(e, t) {
clearTimeout(e);
};
}
- }, [t]), Cy(), (0, I.useRef)(!1), (0, I.useEffect)(() => {});
+ }, [t]), Sy(), (0, I.useRef)(!1), (0, I.useEffect)(() => {});
let o = e["aria-describedby"] ?? i;
return {
dialogProps: {
@@ -11970,7 +11970,7 @@ function wy(e, t) {
}
//#endregion
//#region node_modules/react-aria/dist/private/focus/useFocusRing.mjs
-function Ty(e = {}) {
+function wy(e = {}) {
let { autoFocus: t = !1, isTextInput: n, within: r } = e, i = (0, I.useRef)({
isFocused: !1,
isFocusVisible: t || Jm()
@@ -11998,35 +11998,35 @@ function Ty(e = {}) {
}
//#endregion
//#region node_modules/react-aria/dist/private/i18n/useListFormatter.mjs
-function Ey(e = {}) {
+function Ty(e = {}) {
let { locale: t } = Eg();
return (0, I.useMemo)(() => new Intl.ListFormat(t, e), [t, e]);
}
//#endregion
//#region node_modules/react-aria/dist/private/interactions/useHover.mjs
-var Dy = !1, Oy = 0;
-function ky() {
- Dy = !0, setTimeout(() => {
- Dy = !1;
+var Ey = !1, Dy = 0;
+function Oy() {
+ Ey = !0, setTimeout(() => {
+ Ey = !1;
}, 500);
}
-function Ay(e) {
- e.pointerType === "touch" && ky();
+function ky(e) {
+ e.pointerType === "touch" && Oy();
}
-function jy() {
+function Ay() {
let e = xp(null);
- if (e !== void 0) return Oy === 0 && typeof PointerEvent < "u" && e.addEventListener("pointerup", Ay), Oy++, () => {
- Oy--, !(Oy > 0) && typeof PointerEvent < "u" && e.removeEventListener("pointerup", Ay);
+ if (e !== void 0) return Dy === 0 && typeof PointerEvent < "u" && e.addEventListener("pointerup", ky), Dy++, () => {
+ Dy--, !(Dy > 0) && typeof PointerEvent < "u" && e.removeEventListener("pointerup", ky);
};
}
-function My(e) {
+function jy(e) {
let { onHoverStart: t, onHoverChange: n, onHoverEnd: r, isDisabled: i } = e, [a, o] = (0, I.useState)(!1), s = (0, I.useRef)({
isHovered: !1,
ignoreEmulatedMouseEvents: !1,
pointerType: "",
target: null
}).current;
- (0, I.useEffect)(jy, []);
+ (0, I.useEffect)(Ay, []);
let { addGlobalListener: c, removeAllGlobalListeners: l } = qg(), { hoverProps: u, triggerHoverEnd: d } = (0, I.useMemo)(() => {
let e = (e, r) => {
if (s.pointerType = r, i || r === "touch" || s.isHovered || !jp(e.currentTarget, V(e))) return;
@@ -12048,7 +12048,7 @@ function My(e) {
}), n && n(!1), o(!1));
}, u = {};
return typeof PointerEvent < "u" && (u.onPointerEnter = (t) => {
- Dy && t.pointerType === "mouse" || e(t, t.pointerType);
+ Ey && t.pointerType === "mouse" || e(t, t.pointerType);
}, u.onPointerLeave = (e) => {
!i && jp(e.currentTarget, V(e)) && a(e, e.pointerType);
}), {
@@ -12073,12 +12073,12 @@ function My(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/interactions/useInteractOutside.mjs
-function Ny(e) {
+function My(e) {
let { ref: t, onInteractOutside: n, isDisabled: r, onInteractOutsideStart: i } = e, a = (0, I.useRef)({
isPointerDown: !1,
ignoreEmulatedMouseEvents: !1
}), o = _g((e) => {
- n && Py(e, t) && (i && i(e), a.current.isPointerDown = !0);
+ n && Ny(e, t) && (i && i(e), a.current.isPointerDown = !0);
}), s = _g((e) => {
n && n(e);
});
@@ -12088,7 +12088,7 @@ function Ny(e) {
let n = t.current, i = xp(n);
if (typeof PointerEvent < "u") {
let n = (n) => {
- e.isPointerDown && Py(n, t) && s(n), e.isPointerDown = !1;
+ e.isPointerDown && Ny(n, t) && s(n), e.isPointerDown = !1;
};
return i.addEventListener("pointerdown", o, !0), i.addEventListener("click", n, !0), () => {
i.removeEventListener("pointerdown", o, !0), i.removeEventListener("click", n, !0);
@@ -12096,7 +12096,7 @@ function Ny(e) {
}
}, [t, r]);
}
-function Py(e, t) {
+function Ny(e, t) {
if (e.button > 0) return !1;
let n = V(e);
if (n) {
@@ -12107,8 +12107,8 @@ function Py(e, t) {
}
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/ar-AE.mjs
-var Fy = {};
-Fy = {
+var Py = {};
+Py = {
deselectedItem: (e) => `${e.item} \u{63A}\u{64A}\u{631} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,
longPressToSelect: "اضغط مطولًا للدخول إلى وضع التحديد.",
select: "تحديد",
@@ -12122,8 +12122,8 @@ Fy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/bg-BG.mjs
-var Iy = {};
-Iy = {
+var Fy = {};
+Fy = {
deselectedItem: (e) => `${e.item} \u{43D}\u{435} \u{435} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}.`,
longPressToSelect: "Натиснете и задръжте за да влезете в избирателен режим.",
select: "Изберете",
@@ -12137,8 +12137,8 @@ Iy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/cs-CZ.mjs
-var Ly = {};
-Ly = {
+var Iy = {};
+Iy = {
deselectedItem: (e) => `Polo\u{17E}ka ${e.item} nen\xed vybr\xe1na.`,
longPressToSelect: "Dlouhým stisknutím přejdete do režimu výběru.",
select: "Vybrat",
@@ -12152,8 +12152,8 @@ Ly = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/da-DK.mjs
-var Ry = {};
-Ry = {
+var Ly = {};
+Ly = {
deselectedItem: (e) => `${e.item} ikke valgt.`,
longPressToSelect: "Lav et langt tryk for at aktivere valgtilstand.",
select: "Vælg",
@@ -12167,8 +12167,8 @@ Ry = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/de-DE.mjs
-var zy = {};
-zy = {
+var Ry = {};
+Ry = {
deselectedItem: (e) => `${e.item} nicht ausgew\xe4hlt.`,
longPressToSelect: "Gedrückt halten, um Auswahlmodus zu öffnen.",
select: "Auswählen",
@@ -12182,8 +12182,8 @@ zy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/el-GR.mjs
-var By = {};
-By = {
+var zy = {};
+zy = {
deselectedItem: (e) => `\u{394}\u{3B5}\u{3BD} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} \u{3C4}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF} ${e.item}.`,
longPressToSelect: "Πατήστε παρατεταμένα για να μπείτε σε λειτουργία επιλογής.",
select: "Επιλογή",
@@ -12197,8 +12197,8 @@ By = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/en-US.mjs
-var Vy = {};
-Vy = {
+var By = {};
+By = {
deselectedItem: (e) => `${e.item} not selected.`,
select: "Select",
selectedCount: (e, t) => `${t.plural(e.count, {
@@ -12212,8 +12212,8 @@ Vy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/es-ES.mjs
-var Hy = {};
-Hy = {
+var Vy = {};
+Vy = {
deselectedItem: (e) => `${e.item} no seleccionado.`,
longPressToSelect: "Mantenga pulsado para abrir el modo de selección.",
select: "Seleccionar",
@@ -12227,8 +12227,8 @@ Hy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/et-EE.mjs
-var Uy = {};
-Uy = {
+var Hy = {};
+Hy = {
deselectedItem: (e) => `${e.item} pole valitud.`,
longPressToSelect: "Valikurežiimi sisenemiseks vajutage pikalt.",
select: "Vali",
@@ -12242,8 +12242,8 @@ Uy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/fi-FI.mjs
-var Wy = {};
-Wy = {
+var Uy = {};
+Uy = {
deselectedItem: (e) => `Kohdetta ${e.item} ei valittu.`,
longPressToSelect: "Siirry valintatilaan painamalla pitkään.",
select: "Valitse",
@@ -12257,8 +12257,8 @@ Wy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/fr-FR.mjs
-var Gy = {};
-Gy = {
+var Wy = {};
+Wy = {
deselectedItem: (e) => `${e.item} non s\xe9lectionn\xe9.`,
longPressToSelect: "Appuyez de manière prolongée pour passer en mode de sélection.",
select: "Sélectionner",
@@ -12272,8 +12272,8 @@ Gy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/he-IL.mjs
-var Ky = {};
-Ky = {
+var Gy = {};
+Gy = {
deselectedItem: (e) => `${e.item} \u{5DC}\u{5D0} \u{5E0}\u{5D1}\u{5D7}\u{5E8}.`,
longPressToSelect: "הקשה ארוכה לכניסה למצב בחירה.",
select: "בחר",
@@ -12287,8 +12287,8 @@ Ky = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/hr-HR.mjs
-var qy = {};
-qy = {
+var Ky = {};
+Ky = {
deselectedItem: (e) => `Stavka ${e.item} nije odabrana.`,
longPressToSelect: "Dugo pritisnite za ulazak u način odabira.",
select: "Odaberite",
@@ -12302,8 +12302,8 @@ qy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/hu-HU.mjs
-var Jy = {};
-Jy = {
+var qy = {};
+qy = {
deselectedItem: (e) => `${e.item} nincs kijel\xf6lve.`,
longPressToSelect: "Nyomja hosszan a kijelöléshez.",
select: "Kijelölés",
@@ -12317,8 +12317,8 @@ Jy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/it-IT.mjs
-var Yy = {};
-Yy = {
+var Jy = {};
+Jy = {
deselectedItem: (e) => `${e.item} non selezionato.`,
longPressToSelect: "Premi a lungo per passare alla modalità di selezione.",
select: "Seleziona",
@@ -12332,8 +12332,8 @@ Yy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/ja-JP.mjs
-var Xy = {};
-Xy = {
+var Yy = {};
+Yy = {
deselectedItem: (e) => `${e.item} \u{304C}\u{9078}\u{629E}\u{3055}\u{308C}\u{3066}\u{3044}\u{307E}\u{305B}\u{3093}\u{3002}`,
longPressToSelect: "長押しして選択モードを開きます。",
select: "選択",
@@ -12347,8 +12347,8 @@ Xy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/ko-KR.mjs
-var Zy = {};
-Zy = {
+var Xy = {};
+Xy = {
deselectedItem: (e) => `${e.item}\u{C774}(\u{AC00}) \u{C120}\u{D0DD}\u{B418}\u{C9C0} \u{C54A}\u{C558}\u{C2B5}\u{B2C8}\u{B2E4}.`,
longPressToSelect: "선택 모드로 들어가려면 길게 누르십시오.",
select: "선택",
@@ -12362,8 +12362,8 @@ Zy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/lt-LT.mjs
-var Qy = {};
-Qy = {
+var Zy = {};
+Zy = {
deselectedItem: (e) => `${e.item} nepasirinkta.`,
longPressToSelect: "Norėdami įjungti pasirinkimo režimą, paspauskite ir palaikykite.",
select: "Pasirinkti",
@@ -12377,8 +12377,8 @@ Qy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/lv-LV.mjs
-var $y = {};
-$y = {
+var Qy = {};
+Qy = {
deselectedItem: (e) => `Vienums ${e.item} nav atlas\u{12B}ts.`,
longPressToSelect: "Ilgi turiet nospiestu. lai ieslēgtu atlases režīmu.",
select: "Atlasīt",
@@ -12392,8 +12392,8 @@ $y = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/nb-NO.mjs
-var eb = {};
-eb = {
+var $y = {};
+$y = {
deselectedItem: (e) => `${e.item} er ikke valgt.`,
longPressToSelect: "Bruk et langt trykk for å gå inn i valgmodus.",
select: "Velg",
@@ -12407,8 +12407,8 @@ eb = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/nl-NL.mjs
-var tb = {};
-tb = {
+var eb = {};
+eb = {
deselectedItem: (e) => `${e.item} niet geselecteerd.`,
longPressToSelect: "Druk lang om de selectiemodus te openen.",
select: "Selecteren",
@@ -12422,8 +12422,8 @@ tb = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/pl-PL.mjs
-var nb = {};
-nb = {
+var tb = {};
+tb = {
deselectedItem: (e) => `Nie zaznaczono ${e.item}.`,
longPressToSelect: "Naciśnij i przytrzymaj, aby wejść do trybu wyboru.",
select: "Zaznacz",
@@ -12437,8 +12437,8 @@ nb = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/pt-BR.mjs
-var rb = {};
-rb = {
+var nb = {};
+nb = {
deselectedItem: (e) => `${e.item} n\xe3o selecionado.`,
longPressToSelect: "Mantenha pressionado para entrar no modo de seleção.",
select: "Selecionar",
@@ -12452,8 +12452,8 @@ rb = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/pt-PT.mjs
-var ib = {};
-ib = {
+var rb = {};
+rb = {
deselectedItem: (e) => `${e.item} n\xe3o selecionado.`,
longPressToSelect: "Prima continuamente para entrar no modo de seleção.",
select: "Selecionar",
@@ -12467,8 +12467,8 @@ ib = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/ro-RO.mjs
-var ab = {};
-ab = {
+var ib = {};
+ib = {
deselectedItem: (e) => `${e.item} neselectat.`,
longPressToSelect: "Apăsați lung pentru a intra în modul de selectare.",
select: "Selectare",
@@ -12482,8 +12482,8 @@ ab = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/ru-RU.mjs
-var ob = {};
-ob = {
+var ab = {};
+ab = {
deselectedItem: (e) => `${e.item} \u{43D}\u{435} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`,
longPressToSelect: "Нажмите и удерживайте для входа в режим выбора.",
select: "Выбрать",
@@ -12497,8 +12497,8 @@ ob = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/sk-SK.mjs
-var sb = {};
-sb = {
+var ob = {};
+ob = {
deselectedItem: (e) => `Nevybrat\xe9 polo\u{17E}ky: ${e.item}.`,
longPressToSelect: "Dlhším stlačením prejdite do režimu výberu.",
select: "Vybrať",
@@ -12512,8 +12512,8 @@ sb = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/sl-SI.mjs
-var cb = {};
-cb = {
+var sb = {};
+sb = {
deselectedItem: (e) => `Element ${e.item} ni izbran.`,
longPressToSelect: "Za izbirni način pritisnite in dlje časa držite.",
select: "Izberite",
@@ -12527,8 +12527,8 @@ cb = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/sr-SP.mjs
-var lb = {};
-lb = {
+var cb = {};
+cb = {
deselectedItem: (e) => `${e.item} nije izabrano.`,
longPressToSelect: "Dugo pritisnite za ulazak u režim biranja.",
select: "Izaberite",
@@ -12542,8 +12542,8 @@ lb = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/sv-SE.mjs
-var ub = {};
-ub = {
+var lb = {};
+lb = {
deselectedItem: (e) => `${e.item} ej markerat.`,
longPressToSelect: "Tryck länge när du vill öppna väljarläge.",
select: "Markera",
@@ -12557,8 +12557,8 @@ ub = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/tr-TR.mjs
-var db = {};
-db = {
+var ub = {};
+ub = {
deselectedItem: (e) => `${e.item} se\xe7ilmedi.`,
longPressToSelect: "Seçim moduna girmek için uzun basın.",
select: "Seç",
@@ -12572,8 +12572,8 @@ db = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/uk-UA.mjs
-var fb = {};
-fb = {
+var db = {};
+db = {
deselectedItem: (e) => `${e.item} \u{43D}\u{435} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`,
longPressToSelect: "Виконайте довге натиснення, щоб перейти в режим вибору.",
select: "Вибрати",
@@ -12587,8 +12587,8 @@ fb = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/zh-CN.mjs
-var pb = {};
-pb = {
+var fb = {};
+fb = {
deselectedItem: (e) => `\u{672A}\u{9009}\u{62E9} ${e.item}\u{3002}`,
longPressToSelect: "长按以进入选择模式。",
select: "选择",
@@ -12602,8 +12602,8 @@ pb = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/zh-TW.mjs
-var mb = {};
-mb = {
+var pb = {};
+pb = {
deselectedItem: (e) => `\u{672A}\u{9078}\u{53D6}\u{300C}${e.item}\u{300D}\u{3002}`,
longPressToSelect: "長按以進入選擇模式。",
select: "選取",
@@ -12617,55 +12617,55 @@ mb = {
};
//#endregion
//#region node_modules/react-aria/dist/private/grid/intlStrings.mjs
-var hb = {};
-hb = {
- "ar-AE": Fy,
- "bg-BG": Iy,
- "cs-CZ": Ly,
- "da-DK": Ry,
- "de-DE": zy,
- "el-GR": By,
- "en-US": Vy,
- "es-ES": Hy,
- "et-EE": Uy,
- "fi-FI": Wy,
- "fr-FR": Gy,
- "he-IL": Ky,
- "hr-HR": qy,
- "hu-HU": Jy,
- "it-IT": Yy,
- "ja-JP": Xy,
- "ko-KR": Zy,
- "lt-LT": Qy,
- "lv-LV": $y,
- "nb-NO": eb,
- "nl-NL": tb,
- "pl-PL": nb,
- "pt-BR": rb,
- "pt-PT": ib,
- "ro-RO": ab,
- "ru-RU": ob,
- "sk-SK": sb,
- "sl-SI": cb,
- "sr-SP": lb,
- "sv-SE": ub,
- "tr-TR": db,
- "uk-UA": fb,
- "zh-CN": pb,
- "zh-TW": mb
+var mb = {};
+mb = {
+ "ar-AE": Py,
+ "bg-BG": Fy,
+ "cs-CZ": Iy,
+ "da-DK": Ly,
+ "de-DE": Ry,
+ "el-GR": zy,
+ "en-US": By,
+ "es-ES": Vy,
+ "et-EE": Hy,
+ "fi-FI": Uy,
+ "fr-FR": Wy,
+ "he-IL": Gy,
+ "hr-HR": Ky,
+ "hu-HU": qy,
+ "it-IT": Jy,
+ "ja-JP": Yy,
+ "ko-KR": Xy,
+ "lt-LT": Zy,
+ "lv-LV": Qy,
+ "nb-NO": $y,
+ "nl-NL": eb,
+ "pl-PL": tb,
+ "pt-BR": nb,
+ "pt-PT": rb,
+ "ro-RO": ib,
+ "ru-RU": ab,
+ "sk-SK": ob,
+ "sl-SI": sb,
+ "sr-SP": cb,
+ "sv-SE": lb,
+ "tr-TR": ub,
+ "uk-UA": db,
+ "zh-CN": fb,
+ "zh-TW": pb
};
//#endregion
//#region node_modules/react-aria/dist/private/grid/useGridSelectionAnnouncement.mjs
-function ete(e) {
+function tte(e) {
return e && e.__esModule ? e.default : e;
}
-function tte(e, t) {
- let { getRowText: n = (e) => t.collection.getTextValue?.(e) ?? t.collection.getItem(e)?.textValue } = e, r = Lg(ete(hb), "@react-aria/grid"), i = t.selectionManager.rawSelection, a = (0, I.useRef)(i), o = (0, I.useCallback)(() => {
+function nte(e, t) {
+ let { getRowText: n = (e) => t.collection.getTextValue?.(e) ?? t.collection.getItem(e)?.textValue } = e, r = Lg(tte(mb), "@react-aria/grid"), i = t.selectionManager.rawSelection, a = (0, I.useRef)(i), o = (0, I.useCallback)(() => {
if (!t.selectionManager.isFocused || i === a.current) {
a.current = i;
return;
}
- let e = gb(i, a.current), o = gb(a.current, i), s = t.selectionManager.selectionBehavior === "replace", c = [];
+ let e = hb(i, a.current), o = hb(a.current, i), s = t.selectionManager.selectionBehavior === "replace", c = [];
if (t.selectionManager.selectedKeys.size === 1 && s) {
let e = t.selectionManager.selectedKeys.keys().next().value;
if (e != null && t.collection.getItem(e)) {
@@ -12704,7 +12704,7 @@ function tte(e, t) {
}
}, [i, t.selectionManager.isFocused]);
}
-function gb(e, t) {
+function hb(e, t) {
let n = /* @__PURE__ */ new Set();
if (e === "all" || t === "all") return n;
for (let r of e.keys()) t.has(r) || n.add(r);
@@ -12712,7 +12712,7 @@ function gb(e, t) {
}
//#endregion
//#region node_modules/react-aria/dist/private/focus/useHasTabbableChild.mjs
-function _b(e, t) {
+function gb(e, t) {
let n = t?.isDisabled, [r, i] = (0, I.useState)(!1);
return Gp(() => {
if (e?.current && !n) {
@@ -12737,11 +12737,11 @@ function _b(e, t) {
}
//#endregion
//#region node_modules/react-aria/dist/private/grid/useHighlightSelectionDescription.mjs
-function nte(e) {
+function rte(e) {
return e && e.__esModule ? e.default : e;
}
-function rte(e) {
- let t = Lg(nte(hb), "@react-aria/grid"), n = Zm(), r = (n === "pointer" || n === "virtual" || n == null) && typeof window < "u" && "ontouchstart" in window;
+function ite(e) {
+ let t = Lg(rte(mb), "@react-aria/grid"), n = Zm(), r = (n === "pointer" || n === "virtual" || n == null) && typeof window < "u" && "ontouchstart" in window;
return I_((0, I.useMemo)(() => {
let n = e.selectionManager.selectionMode, i = e.selectionManager.selectionBehavior, a;
return r && (a = t.format("longPressToSelect")), i === "replace" && n !== "none" && e.hasItemActions ? a : void 0;
@@ -12755,7 +12755,7 @@ function rte(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/selection/useSelectableList.mjs
-function vb(e) {
+function _b(e) {
let { selectionManager: t, collection: n, disabledKeys: r, ref: i, keyboardDelegate: a, layoutDelegate: o, orientation: s } = e, c = gy({
usage: "search",
sensitivity: "base"
@@ -12786,7 +12786,7 @@ function vb(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/selection/useSelectableItem.mjs
-function yb(e) {
+function vb(e) {
let { id: t, selectionManager: n, key: r, ref: i, shouldSelectOnPressUp: a, shouldUseVirtualFocus: o, focus: s, isDisabled: c, onAction: l, allowsDifferentPressOrigin: u, linkBehavior: d = "action" } = e, f = fm();
t = mh(t);
let p = (e) => {
@@ -12833,20 +12833,20 @@ function yb(e) {
l && (l(), i.current?.dispatchEvent(new CustomEvent("react-aria-item-action", { bubbles: !0 }))), _ && i.current && f.open(i.current, e, D.href, D.routerOptions);
}, k = { ref: i };
a ? (k.onPressStart = (e) => {
- C.current = e.pointerType, T.current = w, e.pointerType === "keyboard" && (!S || xb(e.key)) && p(e);
+ C.current = e.pointerType, T.current = w, e.pointerType === "keyboard" && (!S || bb(e.key)) && p(e);
}, u ? (k.onPressUp = b ? void 0 : (e) => {
e.pointerType === "mouse" && v && p(e);
}, k.onPress = b ? O : (e) => {
e.pointerType !== "keyboard" && e.pointerType !== "mouse" && v && p(e);
}) : k.onPress = (e) => {
if (b || x && e.pointerType !== "mouse") {
- if (e.pointerType === "keyboard" && !bb(e.key)) return;
+ if (e.pointerType === "keyboard" && !yb(e.key)) return;
O(e);
} else e.pointerType !== "keyboard" && v && p(e);
}) : (k.onPressStart = (e) => {
- C.current = e.pointerType, T.current = w, E.current = b, v && (e.pointerType === "mouse" && !b || e.pointerType === "keyboard" && (!y || xb(e.key))) && p(e);
+ C.current = e.pointerType, T.current = w, E.current = b, v && (e.pointerType === "mouse" && !b || e.pointerType === "keyboard" && (!y || bb(e.key))) && p(e);
}, k.onPress = (e) => {
- (e.pointerType === "touch" || e.pointerType === "pen" || e.pointerType === "virtual" || e.pointerType === "keyboard" && S && bb(e.key) || e.pointerType === "mouse" && E.current) && (S ? O(e) : v && p(e));
+ (e.pointerType === "touch" || e.pointerType === "pen" || e.pointerType === "virtual" || e.pointerType === "keyboard" && S && yb(e.key) || e.pointerType === "mouse" && E.current) && (S ? O(e) : v && p(e));
});
let A = gv(n.collection);
if (m["data-collection"] = A, m["data-key"] = r, k.preventFocusOnPress = o, o && (k = H(k, {
@@ -12915,22 +12915,22 @@ function yb(e) {
hasAction: S
};
}
-function bb(e) {
+function yb(e) {
return e === "Enter";
}
-function xb(e) {
+function bb(e) {
return e === " ";
}
//#endregion
//#region node_modules/react-aria/dist/private/grid/useGridSelectionCheckbox.mjs
-function ite(e) {
+function ate(e) {
return e && e.__esModule ? e.default : e;
}
-function ate(e, t) {
+function ote(e, t) {
let { key: n } = e, r = t.selectionManager, i = mh(), a = !t.selectionManager.canSelectItem(n), o = t.selectionManager.isSelected(n);
return { checkboxProps: {
id: i,
- "aria-label": Lg(ite(hb), "@react-aria/grid").format("select"),
+ "aria-label": Lg(ate(mb), "@react-aria/grid").format("select"),
isSelected: o,
isDisabled: a,
onChange: () => r.toggleSelection(n)
@@ -12938,10 +12938,10 @@ function ate(e, t) {
}
//#endregion
//#region node_modules/react-aria/dist/private/listbox/useListBox.mjs
-function ote(e, t, n) {
+function ste(e, t, n) {
let r = zg(e, { labelable: !0 }), i = e.selectionBehavior || "toggle", a = e.orientation || "vertical", o = e.linkBehavior || (i === "replace" ? "action" : "override");
i === "toggle" && o === "action" && (o = "override");
- let { listProps: s } = vb({
+ let { listProps: s } = _b({
...e,
ref: n,
selectionManager: t.selectionManager,
@@ -12979,7 +12979,7 @@ function ote(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/listbox/useListBoxSection.mjs
-function ste(e) {
+function cte(e) {
let { heading: t, "aria-label": n } = e, r = mh();
return {
itemProps: { role: "presentation" },
@@ -12999,7 +12999,7 @@ function ste(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/listbox/useOption.mjs
-function cte(e, t, n) {
+function lte(e, t, n) {
let { key: r } = e, i = lv.get(t), a = e.isDisabled ?? t.selectionManager.isDisabled(r), o = e.isSelected ?? t.selectionManager.isSelected(r), s = e.shouldSelectOnPressUp ?? i?.shouldSelectOnPressUp, c = e.shouldFocusOnHover ?? i?.shouldFocusOnHover, l = e.shouldUseVirtualFocus ?? i?.shouldUseVirtualFocus, u = e.isVirtualized ?? i?.isVirtualized, d = gh(), f = gh(), p = {
role: "option",
"aria-disabled": a || void 0,
@@ -13012,7 +13012,7 @@ function cte(e, t, n) {
let e = Number(m?.index);
p["aria-posinset"] = Number.isNaN(e) ? void 0 : e + 1, p["aria-setsize"] = my(t.collection);
}
- let h = i?.onAction ? () => i?.onAction?.(r) : void 0, g = dv(t, r), { itemProps: _, isPressed: v, isFocused: y, hasAction: b, allowsSelection: x } = yb({
+ let h = i?.onAction ? () => i?.onAction?.(r) : void 0, g = dv(t, r), { itemProps: _, isPressed: v, isFocused: y, hasAction: b, allowsSelection: x } = vb({
selectionManager: t.selectionManager,
key: r,
ref: n,
@@ -13025,7 +13025,7 @@ function cte(e, t, n) {
linkBehavior: i?.linkBehavior,
UNSTABLE_itemBehavior: i?.UNSTABLE_itemBehavior,
id: g
- }), { hoverProps: S } = My({
+ }), { hoverProps: S } = jy({
isDisabled: a || !c,
onHoverStart() {
Jm() || (t.selectionManager.setFocused(!0), t.selectionManager.setFocusedKey(r));
@@ -13052,13 +13052,13 @@ function cte(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/menu/utils.mjs
-var Sb = /* @__PURE__ */ new WeakMap();
+var xb = /* @__PURE__ */ new WeakMap();
//#endregion
//#region node_modules/react-aria/dist/private/menu/useMenu.mjs
-function lte(e, t, n) {
+function ute(e, t, n) {
let { shouldFocusWrap: r = !0, onKeyDown: i, onKeyUp: a, ...o } = e;
!e["aria-label"] && e["aria-labelledby"];
- let s = zg(e, { labelable: !0 }), { listProps: c } = vb({
+ let s = zg(e, { labelable: !0 }), { listProps: c } = _b({
...o,
ref: n,
selectionManager: t.selectionManager,
@@ -13067,7 +13067,7 @@ function lte(e, t, n) {
shouldFocusWrap: r,
linkBehavior: "override"
});
- return Sb.set(t, {
+ return xb.set(t, {
onClose: e.onClose,
onAction: e.onAction,
shouldUseVirtualFocus: e.shouldUseVirtualFocus
@@ -13084,8 +13084,8 @@ function lte(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/menu/useMenuItem.mjs
-function ute(e, t, n) {
- let { id: r, key: i, closeOnSelect: a, shouldCloseOnSelect: o, isVirtualized: s, "aria-haspopup": c, onPressStart: l, onPressUp: u, onPress: d, onPressChange: f, onPressEnd: p, onClick: m, onHoverStart: h, onHoverChange: g, onHoverEnd: _, onKeyDown: v, onKeyUp: y, onFocus: b, onFocusChange: x, onBlur: S, selectionManager: C = t.selectionManager } = e, w = !!c, T = w && e["aria-expanded"] === "true", E = e.isDisabled ?? C.isDisabled(i), D = e.isSelected ?? C.isSelected(i), O = Sb.get(t), k = t.collection.getItem(i), A = e.onClose || O.onClose, j = fm(), M = () => {
+function dte(e, t, n) {
+ let { id: r, key: i, closeOnSelect: a, shouldCloseOnSelect: o, isVirtualized: s, "aria-haspopup": c, onPressStart: l, onPressUp: u, onPress: d, onPressChange: f, onPressEnd: p, onClick: m, onHoverStart: h, onHoverChange: g, onHoverEnd: _, onKeyDown: v, onKeyUp: y, onFocus: b, onFocusChange: x, onBlur: S, selectionManager: C = t.selectionManager } = e, w = !!c, T = w && e["aria-expanded"] === "true", E = e.isDisabled ?? C.isDisabled(i), D = e.isSelected ?? C.isSelected(i), O = xb.get(t), k = t.collection.getItem(i), A = e.onClose || O.onClose, j = fm(), M = () => {
if (!w && (k?.props?.onAction ? k.props.onAction() : e.onAction && e.onAction(i), O.onAction)) {
let e = O.onAction;
e(i, k?.value);
@@ -13119,7 +13119,7 @@ function ute(e, t, n) {
m?.(e), M(), ym(e, j, k.props.href, k?.props.routerOptions);
let t = ie.current?.pointerType === "keyboard" ? ie.current?.key === "Enter" || C.selectionMode === "none" || C.isLink(i) : C.selectionMode !== "multiple" || C.isLink(i);
t = o ?? a ?? t, A && !w && t && A(), ie.current = null;
- }, { itemProps: se, isFocused: ce } = yb({
+ }, { itemProps: se, isFocused: ce } = vb({
id: r,
selectionManager: C,
key: i,
@@ -13135,7 +13135,7 @@ function ute(e, t, n) {
onPressChange: re,
onPressEnd: p,
isDisabled: E
- }), { hoverProps: L } = My({
+ }), { hoverProps: L } = jy({
isDisabled: E,
onHoverStart(e) {
!Jm() && !(T && c) && (C.setFocused(!0), C.setFocusedKey(i)), h?.(e);
@@ -13197,7 +13197,7 @@ function ute(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/menu/useMenuSection.mjs
-function dte(e) {
+function fte(e) {
let { heading: t, "aria-label": n } = e, r = mh();
return {
itemProps: { role: "presentation" },
@@ -13214,15 +13214,15 @@ function dte(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/utils/useResizeObserver.mjs
-function fte() {
+function pte() {
return window.ResizeObserver !== void 0;
}
-function Cb(e) {
+function Sb(e) {
let { ref: t, box: n, onResize: r } = e, i = _g(r);
(0, I.useEffect)(() => {
let e = t?.current;
if (e) {
- if (fte()) {
+ if (pte()) {
let t = new window.ResizeObserver((e) => {
e.length && i();
});
@@ -13238,186 +13238,186 @@ function Cb(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/ar-AE.mjs
-var wb = {};
-wb = { dismiss: "تجاهل" };
+var Cb = {};
+Cb = { dismiss: "تجاهل" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/bg-BG.mjs
-var Tb = {};
-Tb = { dismiss: "Отхвърляне" };
+var wb = {};
+wb = { dismiss: "Отхвърляне" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/cs-CZ.mjs
-var Eb = {};
-Eb = { dismiss: "Odstranit" };
+var Tb = {};
+Tb = { dismiss: "Odstranit" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/da-DK.mjs
-var Db = {};
-Db = { dismiss: "Luk" };
+var Eb = {};
+Eb = { dismiss: "Luk" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/de-DE.mjs
-var Ob = {};
-Ob = { dismiss: "Schließen" };
+var Db = {};
+Db = { dismiss: "Schließen" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/el-GR.mjs
-var kb = {};
-kb = { dismiss: "Απόρριψη" };
+var Ob = {};
+Ob = { dismiss: "Απόρριψη" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/en-US.mjs
-var Ab = {};
-Ab = { dismiss: "Dismiss" };
+var kb = {};
+kb = { dismiss: "Dismiss" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/es-ES.mjs
-var jb = {};
-jb = { dismiss: "Descartar" };
+var Ab = {};
+Ab = { dismiss: "Descartar" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/et-EE.mjs
-var Mb = {};
-Mb = { dismiss: "Lõpeta" };
+var jb = {};
+jb = { dismiss: "Lõpeta" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/fi-FI.mjs
-var Nb = {};
-Nb = { dismiss: "Hylkää" };
+var Mb = {};
+Mb = { dismiss: "Hylkää" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/fr-FR.mjs
-var Pb = {};
-Pb = { dismiss: "Rejeter" };
+var Nb = {};
+Nb = { dismiss: "Rejeter" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/he-IL.mjs
-var Fb = {};
-Fb = { dismiss: "התעלם" };
+var Pb = {};
+Pb = { dismiss: "התעלם" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/hr-HR.mjs
-var Ib = {};
-Ib = { dismiss: "Odbaci" };
+var Fb = {};
+Fb = { dismiss: "Odbaci" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/hu-HU.mjs
-var Lb = {};
-Lb = { dismiss: "Elutasítás" };
+var Ib = {};
+Ib = { dismiss: "Elutasítás" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/it-IT.mjs
-var Rb = {};
-Rb = { dismiss: "Ignora" };
+var Lb = {};
+Lb = { dismiss: "Ignora" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/ja-JP.mjs
-var zb = {};
-zb = { dismiss: "閉じる" };
+var Rb = {};
+Rb = { dismiss: "閉じる" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/ko-KR.mjs
-var Bb = {};
-Bb = { dismiss: "무시" };
+var zb = {};
+zb = { dismiss: "무시" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/lt-LT.mjs
-var Vb = {};
-Vb = { dismiss: "Atmesti" };
+var Bb = {};
+Bb = { dismiss: "Atmesti" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/lv-LV.mjs
-var Hb = {};
-Hb = { dismiss: "Nerādīt" };
+var Vb = {};
+Vb = { dismiss: "Nerādīt" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/nb-NO.mjs
-var Ub = {};
-Ub = { dismiss: "Lukk" };
+var Hb = {};
+Hb = { dismiss: "Lukk" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/nl-NL.mjs
-var Wb = {};
-Wb = { dismiss: "Negeren" };
+var Ub = {};
+Ub = { dismiss: "Negeren" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/pl-PL.mjs
-var Gb = {};
-Gb = { dismiss: "Zignoruj" };
+var Wb = {};
+Wb = { dismiss: "Zignoruj" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/pt-BR.mjs
-var Kb = {};
-Kb = { dismiss: "Descartar" };
+var Gb = {};
+Gb = { dismiss: "Descartar" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/pt-PT.mjs
-var qb = {};
-qb = { dismiss: "Dispensar" };
+var Kb = {};
+Kb = { dismiss: "Dispensar" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/ro-RO.mjs
-var Jb = {};
-Jb = { dismiss: "Revocare" };
+var qb = {};
+qb = { dismiss: "Revocare" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/ru-RU.mjs
-var Yb = {};
-Yb = { dismiss: "Пропустить" };
+var Jb = {};
+Jb = { dismiss: "Пропустить" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/sk-SK.mjs
-var Xb = {};
-Xb = { dismiss: "Zrušiť" };
+var Yb = {};
+Yb = { dismiss: "Zrušiť" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/sl-SI.mjs
-var Zb = {};
-Zb = { dismiss: "Opusti" };
+var Xb = {};
+Xb = { dismiss: "Opusti" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/sr-SP.mjs
-var Qb = {};
-Qb = { dismiss: "Odbaci" };
+var Zb = {};
+Zb = { dismiss: "Odbaci" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/sv-SE.mjs
-var $b = {};
-$b = { dismiss: "Avvisa" };
+var Qb = {};
+Qb = { dismiss: "Avvisa" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/tr-TR.mjs
-var ex = {};
-ex = { dismiss: "Kapat" };
+var $b = {};
+$b = { dismiss: "Kapat" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/uk-UA.mjs
-var tx = {};
-tx = { dismiss: "Скасувати" };
+var ex = {};
+ex = { dismiss: "Скасувати" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/zh-CN.mjs
-var nx = {};
-nx = { dismiss: "取消" };
+var tx = {};
+tx = { dismiss: "取消" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/zh-TW.mjs
-var rx = {};
-rx = { dismiss: "關閉" };
+var nx = {};
+nx = { dismiss: "關閉" };
//#endregion
//#region node_modules/react-aria/dist/private/overlays/intlStrings.mjs
-var ix = {};
-ix = {
- "ar-AE": wb,
- "bg-BG": Tb,
- "cs-CZ": Eb,
- "da-DK": Db,
- "de-DE": Ob,
- "el-GR": kb,
- "en-US": Ab,
- "es-ES": jb,
- "et-EE": Mb,
- "fi-FI": Nb,
- "fr-FR": Pb,
- "he-IL": Fb,
- "hr-HR": Ib,
- "hu-HU": Lb,
- "it-IT": Rb,
- "ja-JP": zb,
- "ko-KR": Bb,
- "lt-LT": Vb,
- "lv-LV": Hb,
- "nb-NO": Ub,
- "nl-NL": Wb,
- "pl-PL": Gb,
- "pt-BR": Kb,
- "pt-PT": qb,
- "ro-RO": Jb,
- "ru-RU": Yb,
- "sk-SK": Xb,
- "sl-SI": Zb,
- "sr-SP": Qb,
- "sv-SE": $b,
- "tr-TR": ex,
- "uk-UA": tx,
- "zh-CN": nx,
- "zh-TW": rx
+var rx = {};
+rx = {
+ "ar-AE": Cb,
+ "bg-BG": wb,
+ "cs-CZ": Tb,
+ "da-DK": Eb,
+ "de-DE": Db,
+ "el-GR": Ob,
+ "en-US": kb,
+ "es-ES": Ab,
+ "et-EE": jb,
+ "fi-FI": Mb,
+ "fr-FR": Nb,
+ "he-IL": Pb,
+ "hr-HR": Fb,
+ "hu-HU": Ib,
+ "it-IT": Lb,
+ "ja-JP": Rb,
+ "ko-KR": zb,
+ "lt-LT": Bb,
+ "lv-LV": Vb,
+ "nb-NO": Hb,
+ "nl-NL": Ub,
+ "pl-PL": Wb,
+ "pt-BR": Gb,
+ "pt-PT": Kb,
+ "ro-RO": qb,
+ "ru-RU": Jb,
+ "sk-SK": Yb,
+ "sl-SI": Xb,
+ "sr-SP": Zb,
+ "sv-SE": Qb,
+ "tr-TR": $b,
+ "uk-UA": ex,
+ "zh-CN": tx,
+ "zh-TW": nx
};
//#endregion
//#region node_modules/react-aria/dist/private/overlays/DismissButton.mjs
-function pte(e) {
+function mte(e) {
return e && e.__esModule ? e.default : e;
}
-function ax(e) {
- let { onDismiss: t, ...n } = e, r = yg(n, Lg(pte(ix), "@react-aria/overlays").format("dismiss")), i = () => {
+function ix(e) {
+ let { onDismiss: t, ...n } = e, r = yg(n, Lg(mte(rx), "@react-aria/overlays").format("dismiss")), i = () => {
t && t();
};
return /*#__PURE__*/ I.createElement(iv, null, /*#__PURE__*/ I.createElement("button", {
@@ -13432,22 +13432,22 @@ function ax(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/overlays/useOverlay.mjs
-var ox = [];
-function sx(e, t) {
+var ax = [];
+function ox(e, t) {
let { onClose: n, shouldCloseOnBlur: r, isOpen: i, isDismissable: a = !1, isKeyboardDismissDisabled: o = !1, shouldCloseOnInteractOutside: s } = e, c = (0, I.useRef)(void 0);
(0, I.useEffect)(() => {
- if (i && !ox.includes(t)) return ox.push(t), () => {
- let e = ox.indexOf(t);
- e >= 0 && ox.splice(e, 1);
+ if (i && !ax.includes(t)) return ax.push(t), () => {
+ let e = ax.indexOf(t);
+ e >= 0 && ax.splice(e, 1);
};
}, [i, t]);
let l = () => {
- ox[ox.length - 1] === t && n && n();
+ ax[ax.length - 1] === t && n && n();
}, u = (e) => {
- let n = ox[ox.length - 1];
+ let n = ax[ax.length - 1];
c.current = n, (!s || s(V(e))) && n === t && e.stopPropagation();
}, d = (e) => {
- (!s || s(V(e))) && (ox[ox.length - 1] === t && e.stopPropagation(), c.current === t && l()), c.current = void 0;
+ (!s || s(V(e))) && (ax[ax.length - 1] === t && e.stopPropagation(), c.current === t && l()), c.current = void 0;
}, { keyboardProps: f } = Fh({ shortcuts: { Escape: () => {
if (!o) {
l();
@@ -13455,7 +13455,7 @@ function sx(e, t) {
}
return !1;
} } });
- Ny({
+ My({
ref: t,
onInteractOutside: a && i ? d : void 0,
onInteractOutsideStart: u
@@ -13476,20 +13476,20 @@ function sx(e, t) {
}
//#endregion
//#region node_modules/react-aria/dist/private/overlays/usePreventScroll.mjs
-var cx = typeof document < "u" && window.visualViewport, lx = 0, ux;
-function dx(e = {}) {
+var sx = typeof document < "u" && window.visualViewport, cx = 0, lx;
+function ux(e = {}) {
let { isDisabled: t } = e;
Gp(() => {
- if (!t) return lx++, lx === 1 && (ux = rm() && am() ? hte() : mte()), () => {
- lx--, lx === 0 && ux();
+ if (!t) return cx++, cx === 1 && (lx = rm() && am() ? gte() : hte()), () => {
+ cx--, cx === 0 && lx();
};
}, [t]);
}
-function mte() {
+function hte() {
let e = window.innerWidth - document.documentElement.clientWidth;
return ch(e > 0 && ("scrollbarGutter" in document.documentElement.style ? Op(document.documentElement, "scrollbar-gutter", "stable") : Op(document.documentElement, "padding-right", `${e}px`)), Op(document.documentElement, "overflow", "hidden"));
}
-function hte() {
+function gte() {
let e = Op(document.documentElement, "overflow", "hidden"), t, n = !1, r = (e) => {
let r = V(e);
t = A_(r) ? r : j_(r, !0), n = !1;
@@ -13507,7 +13507,7 @@ function hte() {
}
}, s = (e) => {
let t = V(e), n = e.relatedTarget;
- n && gg(n) ? (n.focus({ preventScroll: !0 }), fx(n, gg(t))) : n || (t.parentElement?.closest("[tabindex]"))?.focus({ preventScroll: !0 });
+ n && gg(n) ? (n.focus({ preventScroll: !0 }), dx(n, gg(t))) : n || (t.parentElement?.closest("[tabindex]"))?.focus({ preventScroll: !0 });
}, c = HTMLElement.prototype.focus;
Reflect.defineProperty(HTMLElement.prototype, "focus", {
configurable: !0,
@@ -13517,7 +13517,7 @@ function hte() {
c.call(this, {
...e,
preventScroll: !0
- }), (!e || !e.preventScroll) && fx(this, n);
+ }), (!e || !e.preventScroll) && dx(this, n);
}
});
let l = ch(Dp(document, "touchstart", r, {
@@ -13535,10 +13535,10 @@ function hte() {
});
};
}
-function fx(e, t) {
- t || !cx ? px(e) : cx.addEventListener("resize", () => px(e), { once: !0 });
+function dx(e, t) {
+ t || !sx ? fx(e) : sx.addEventListener("resize", () => fx(e), { once: !0 });
}
-function px(e) {
+function fx(e) {
let t = document.scrollingElement || document.documentElement, n = e;
for (; n && n !== t;) {
let e = j_(n);
@@ -13546,7 +13546,7 @@ function px(e) {
let t = e.getBoundingClientRect(), r = n.getBoundingClientRect();
if (r.top < t.top || r.bottom > t.top + n.clientHeight) {
let n = t.bottom;
- cx && (n = Math.min(n, cx.offsetTop + cx.height));
+ sx && (n = Math.min(n, sx.offsetTop + sx.height));
let i = r.top - t.top - ((n - t.top) / 2 - r.height / 2);
e.scrollTo({
top: Math.max(0, Math.min(e.scrollHeight - e.clientHeight, e.scrollTop + i)),
@@ -13559,13 +13559,13 @@ function px(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/overlays/useModalOverlay.mjs
-function gte(e, t, n) {
- let { overlayProps: r, underlayProps: i } = sx({
+function _te(e, t, n) {
+ let { overlayProps: r, underlayProps: i } = ox({
...e,
isOpen: t.isOpen,
onClose: t.close
}, n);
- return dx({ isDisabled: !t.isOpen }), Cy(), (0, I.useEffect)(() => {
+ return ux({ isDisabled: !t.isOpen }), Sy(), (0, I.useEffect)(() => {
if (t.isOpen && n.current) return cv([n.current], { shouldUseInert: !0 });
}, [t.isOpen, n]), {
modalProps: H(r),
@@ -13574,32 +13574,32 @@ function gte(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/overlays/calculatePosition.mjs
-var mx = {
+var px = {
top: "top",
bottom: "top",
left: "left",
right: "left"
-}, hx = {
+}, mx = {
top: "bottom",
bottom: "top",
left: "right",
right: "left"
-}, _te = {
+}, vte = {
top: "left",
left: "top"
-}, gx = {
+}, hx = {
top: "height",
left: "width"
-}, _x = {
+}, gx = {
width: "totalWidth",
height: "totalHeight"
-}, vx = {}, vte = () => typeof document < "u" ? window.visualViewport : null;
-function yx(e, t) {
+}, _x = {}, yte = () => typeof document < "u" ? window.visualViewport : null;
+function vx(e, t) {
let n = 0, r = 0, i = 0, a = 0, o = 0, s = 0, c = {}, l = (t?.scale ?? 1) > 1;
if (e.tagName === "BODY" || e.tagName === "HTML") {
let l = document.documentElement;
i = l.clientWidth, a = l.clientHeight, n = t?.width ?? i, r = t?.height ?? a, c.top = l.scrollTop || e.scrollTop, c.left = l.scrollLeft || e.scrollLeft, t && (o = Math.max(0, t.pageTop - (c.top ?? 0)), s = Math.max(0, t.pageLeft - (c.left ?? 0)));
- } else ({width: n, height: r, top: o, left: s} = Tx(e, !1)), c.top = e.scrollTop, c.left = e.scrollLeft, i = n, a = r;
+ } else ({width: n, height: r, top: o, left: s} = wx(e, !1)), c.top = e.scrollTop, c.left = e.scrollLeft, i = n, a = r;
return am() && (e.tagName === "BODY" || e.tagName === "HTML") && l && (c.top = 0, c.left = 0, o = t?.pageTop ?? 0, s = t?.pageLeft ?? 0), {
width: n,
height: r,
@@ -13610,7 +13610,7 @@ function yx(e, t) {
left: s
};
}
-function yte(e) {
+function bte(e) {
return {
top: e.scrollTop,
left: e.scrollLeft,
@@ -13618,11 +13618,11 @@ function yte(e) {
height: e.scrollHeight
};
}
-function bx(e, t, n, r, i, a, o) {
- let s = i.scroll[e] ?? 0, c = r[gx[e]], l = o[e] + r.scroll[mx[e]] + a, u = o[e] + r.scroll[mx[e]] + c - a, d = t - s + r.scroll[mx[e]] + o[e] - r[mx[e]], f = t - s + n + r.scroll[mx[e]] + o[e] - r[mx[e]];
+function yx(e, t, n, r, i, a, o) {
+ let s = i.scroll[e] ?? 0, c = r[hx[e]], l = o[e] + r.scroll[px[e]] + a, u = o[e] + r.scroll[px[e]] + c - a, d = t - s + r.scroll[px[e]] + o[e] - r[px[e]], f = t - s + n + r.scroll[px[e]] + o[e] - r[px[e]];
return d < l ? l - d : f > u ? Math.max(u - f, l - d) : 0;
}
-function bte(e) {
+function xte(e) {
let t = window.getComputedStyle(e);
return {
top: parseInt(t.marginTop, 10) || 0,
@@ -13631,55 +13631,55 @@ function bte(e) {
right: parseInt(t.marginRight, 10) || 0
};
}
-function xx(e) {
- if (vx[e]) return vx[e];
- let [t, n] = e.split(" "), r = mx[t] || "right", i = _te[r];
- mx[n] || (n = "center");
- let a = gx[r], o = gx[i];
- return vx[e] = {
+function bx(e) {
+ if (_x[e]) return _x[e];
+ let [t, n] = e.split(" "), r = px[t] || "right", i = vte[r];
+ px[n] || (n = "center");
+ let a = hx[r], o = hx[i];
+ return _x[e] = {
placement: t,
crossPlacement: n,
axis: r,
crossAxis: i,
size: a,
crossSize: o
- }, vx[e];
+ }, _x[e];
}
-function Sx(e, t, n, r, i, a, o, s, c, l, u) {
+function xx(e, t, n, r, i, a, o, s, c, l, u) {
let { placement: d, crossPlacement: f, axis: p, crossAxis: m, size: h, crossSize: g } = r, _ = {};
_[m] = e[m] ?? 0, f === "center" ? _[m] += ((e[g] ?? 0) - (n[g] ?? 0)) / 2 : f !== m && (_[m] += (e[g] ?? 0) - (n[g] ?? 0)), _[m] += a;
let v = e[m] - n[g] + c + l, y = e[m] + e[g] - c - l;
if (_[m] = tv(_[m], v, y), d === p) {
- let t = s ? u[h] : u[_x[h]];
- _[hx[p]] = Math.floor(t - e[p] + i);
+ let t = s ? u[h] : u[gx[h]];
+ _[mx[p]] = Math.floor(t - e[p] + i);
} else _[p] = Math.floor(e[p] + e[h] + i);
return _;
}
-function xte(e, t, n, r, i, a, o, s, c, l, u) {
- let d = (e.top == null ? c[_x.height] - (e.bottom ?? 0) - o : e.top) - (c.scroll.top ?? 0), f = l ? n.top : 0, p = {
+function Ste(e, t, n, r, i, a, o, s, c, l, u) {
+ let d = (e.top == null ? c[gx.height] - (e.bottom ?? 0) - o : e.top) - (c.scroll.top ?? 0), f = l ? n.top : 0, p = {
top: Math.max(t.top + f, (u?.offsetTop ?? t.top) + f),
bottom: Math.min(t.top + t.height + f, (u?.offsetTop ?? 0) + (u?.height ?? 0))
};
return s === "top" ? Math.max(0, d + o - p.top - ((i.top ?? 0) + (i.bottom ?? 0) + a)) : Math.max(0, p.bottom - d - ((i.top ?? 0) + (i.bottom ?? 0) + a));
}
-function Cx(e, t, n, r, i, a, o, s) {
+function Sx(e, t, n, r, i, a, o, s) {
let { placement: c, axis: l, size: u } = a;
- return c === l ? Math.max(0, n[l] - (o.scroll[l] ?? 0) - (e[l] + (s ? t[l] : 0)) - (r[l] ?? 0) - r[hx[l]] - i) : Math.max(0, e[u] + e[l] + (s ? t[l] : 0) - n[l] - n[u] + (o.scroll[l] ?? 0) - (r[l] ?? 0) - r[hx[l]] - i);
+ return c === l ? Math.max(0, n[l] - (o.scroll[l] ?? 0) - (e[l] + (s ? t[l] : 0)) - (r[l] ?? 0) - r[mx[l]] - i) : Math.max(0, e[u] + e[l] + (s ? t[l] : 0) - n[l] - n[u] + (o.scroll[l] ?? 0) - (r[l] ?? 0) - r[mx[l]] - i);
}
-function Ste(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _) {
- let v = xx(e), { size: y, crossAxis: b, crossSize: x, placement: S, crossPlacement: C } = v, w = Sx(t, s, n, v, u, d, l, f, m, h, c), T = u, E = Cx(s, l, t, i, a + u, v, c, g);
+function Cte(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _) {
+ let v = bx(e), { size: y, crossAxis: b, crossSize: x, placement: S, crossPlacement: C } = v, w = xx(t, s, n, v, u, d, l, f, m, h, c), T = u, E = Sx(s, l, t, i, a + u, v, c, g);
if (o && n[y] > E) {
- let e = xx(`${hx[S]} ${C}`), r = Sx(t, s, n, e, u, d, l, f, m, h, c);
- Cx(s, l, t, i, a + u, e, c, g) > E && (v = e, w = r, T = u);
+ let e = bx(`${mx[S]} ${C}`), r = xx(t, s, n, e, u, d, l, f, m, h, c);
+ Sx(s, l, t, i, a + u, e, c, g) > E && (v = e, w = r, T = u);
}
let D = "bottom";
v.axis === "top" ? v.placement === "top" ? D = "top" : v.placement === "bottom" && (D = "bottom") : v.crossAxis === "top" && (v.crossPlacement === "top" ? D = "bottom" : v.crossPlacement === "bottom" && (D = "top"));
- let O = bx(b, w[b], n[x], s, c, a, l);
+ let O = yx(b, w[b], n[x], s, c, a, l);
w[b] += O;
- let k = xte(w, s, l, f, i, a, n.height, D, c, g, _);
- p && p < k && (k = p), n.height = Math.min(n.height, k), w = Sx(t, s, n, v, T, d, l, f, m, h, c), O = bx(b, w[b], n[x], s, c, a, l), w[b] += O;
- let A = {}, j = t[b] - w[b] - i[mx[b]], M = j + .5 * t[x], N = m / 2 + h, ee = mx[b] === "left" ? (i.left ?? 0) + (i.right ?? 0) : (i.top ?? 0) + (i.bottom ?? 0), te = n[x] - ee - m / 2 - h;
- A[b] = tv(tv(M, t[b] + m / 2 - (w[b] + i[mx[b]]), t[b] + t[x] - m / 2 - (w[b] + i[mx[b]])), N, te), {placement: S, crossPlacement: C} = v, m ? j = A[b] : C === "right" ? j += t[x] : C === "center" && (j += t[x] / 2);
+ let k = Ste(w, s, l, f, i, a, n.height, D, c, g, _);
+ p && p < k && (k = p), n.height = Math.min(n.height, k), w = xx(t, s, n, v, T, d, l, f, m, h, c), O = yx(b, w[b], n[x], s, c, a, l), w[b] += O;
+ let A = {}, j = t[b] - w[b] - i[px[b]], M = j + .5 * t[x], N = m / 2 + h, ee = px[b] === "left" ? (i.left ?? 0) + (i.right ?? 0) : (i.top ?? 0) + (i.bottom ?? 0), te = n[x] - ee - m / 2 - h;
+ A[b] = tv(tv(M, t[b] + m / 2 - (w[b] + i[px[b]]), t[b] + t[x] - m / 2 - (w[b] + i[px[b]])), N, te), {placement: S, crossPlacement: C} = v, m ? j = A[b] : C === "right" ? j += t[x] : C === "center" && (j += t[x] / 2);
let P = S === "left" || S === "top" ? n[y] : 0, ne = {
x: S === "top" || S === "bottom" ? j : P,
y: S === "left" || S === "right" ? j : P
@@ -13693,17 +13693,17 @@ function Ste(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _) {
triggerAnchorPoint: ne
};
}
-function Cte(e) {
- let { placement: t, targetNode: n, overlayNode: r, scrollNode: i, padding: a, shouldFlip: o, boundaryElement: s, offset: c, crossOffset: l, maxHeight: u, arrowSize: d = 0, arrowBoundaryOffset: f = 0, targetRect: p } = e, m = vte(), h = r instanceof HTMLElement ? wte(r) : document.documentElement, g = h === document.documentElement, _ = window.getComputedStyle(h).position, v = !!_ && _ !== "static", y = g ? Tx(n, !1, p) : Ex(n, h, !1, p);
+function wte(e) {
+ let { placement: t, targetNode: n, overlayNode: r, scrollNode: i, padding: a, shouldFlip: o, boundaryElement: s, offset: c, crossOffset: l, maxHeight: u, arrowSize: d = 0, arrowBoundaryOffset: f = 0, targetRect: p } = e, m = yte(), h = r instanceof HTMLElement ? Tte(r) : document.documentElement, g = h === document.documentElement, _ = window.getComputedStyle(h).position, v = !!_ && _ !== "static", y = g ? wx(n, !1, p) : Tx(n, h, !1, p);
if (!g) {
let { marginTop: e, marginLeft: t } = window.getComputedStyle(n);
y.top += parseInt(e, 10) || 0, y.left += parseInt(t, 10) || 0;
}
- let b = Tx(r, !0), x = bte(r);
+ let b = wx(r, !0), x = xte(r);
b.width += (x.left ?? 0) + (x.right ?? 0), b.height += (x.top ?? 0) + (x.bottom ?? 0);
- let S = yte(i), C = yx(s, m), w = yx(h, m), T;
+ let S = bte(i), C = vx(s, m), w = vx(h, m), T;
if ((s.tagName === "BODY" || s.tagName === "HTML") && !g) {
- let e = wx(h, !1);
+ let e = Cx(h, !1);
T = {
top: -(e.top - C.top),
left: -(e.left - C.left),
@@ -13715,11 +13715,11 @@ function Cte(e) {
left: 0,
width: 0,
height: 0
- } : Ex(s, h, !1);
+ } : Tx(s, h, !1);
let E = jp(s, h);
- return Ste(t, y, b, S, x, a, o, C, w, T, c, l, v, u, d, f, E, m);
+ return Cte(t, y, b, S, x, a, o, C, w, T, c, l, v, u, d, f, E, m);
}
-function wx(e, t) {
+function Cx(e, t) {
let { top: n, left: r, width: i, height: a } = e.getBoundingClientRect();
return t && e instanceof e.ownerDocument.defaultView.HTMLElement && (i = e.offsetWidth, a = e.offsetHeight), {
top: n,
@@ -13728,8 +13728,8 @@ function wx(e, t) {
height: a
};
}
-function Tx(e, t, n) {
- let { top: r, left: i, width: a, height: o } = n || wx(e, t), { scrollTop: s, scrollLeft: c, clientTop: l, clientLeft: u } = document.documentElement;
+function wx(e, t, n) {
+ let { top: r, left: i, width: a, height: o } = n || Cx(e, t), { scrollTop: s, scrollLeft: c, clientTop: l, clientLeft: u } = document.documentElement;
return {
top: r + s - l,
left: i + c - u,
@@ -13737,29 +13737,29 @@ function Tx(e, t, n) {
height: o
};
}
-function Ex(e, t, n, r) {
+function Tx(e, t, n, r) {
let i = window.getComputedStyle(e), a;
- if (i.position === "fixed") a = r || wx(e, n);
+ if (i.position === "fixed") a = r || Cx(e, n);
else {
- a = Tx(e, n, r);
- let i = Tx(t, n), o = window.getComputedStyle(t);
+ a = wx(e, n, r);
+ let i = wx(t, n), o = window.getComputedStyle(t);
i.top += (parseInt(o.borderTopWidth, 10) || 0) - t.scrollTop, i.left += (parseInt(o.borderLeftWidth, 10) || 0) - t.scrollLeft, a.top -= i.top, a.left -= i.left;
}
return a.top -= parseInt(i.marginTop, 10) || 0, a.left -= parseInt(i.marginLeft, 10) || 0, a;
}
-function wte(e) {
+function Tte(e) {
let t = e.offsetParent;
- if (t && t === document.body && window.getComputedStyle(t).position === "static" && !Dx(t) && (t = document.documentElement), t == null) for (t = e.parentElement; t && !Dx(t);) t = t.parentElement;
+ if (t && t === document.body && window.getComputedStyle(t).position === "static" && !Ex(t) && (t = document.documentElement), t == null) for (t = e.parentElement; t && !Ex(t);) t = t.parentElement;
return t || document.documentElement;
}
-function Dx(e) {
+function Ex(e) {
let t = window.getComputedStyle(e);
return t.transform !== "none" || /transform|perspective/.test(t.willChange) || t.filter !== "none" || t.contain === "paint" || "backdropFilter" in t && t.backdropFilter !== "none" || "WebkitBackdropFilter" in t && t.WebkitBackdropFilter !== "none";
}
//#endregion
//#region node_modules/react-aria/dist/private/overlays/useOverlayPosition.mjs
-var Ox = typeof document < "u" ? window.visualViewport : null;
-function Tte(e) {
+var Dx = typeof document < "u" ? window.visualViewport : null;
+function Ete(e) {
let { direction: t } = Eg(), { arrowSize: n, targetRef: r, overlayRef: i, arrowRef: a, scrollRef: o = i, placement: s = "bottom", containerPadding: c = 12, shouldFlip: l = !0, boundaryElement: u = typeof document < "u" ? document.body : null, offset: d = 0, crossOffset: f = 0, shouldUpdatePosition: p = !0, isOpen: m = !0, onClose: h, maxHeight: g, arrowBoundaryOffset: _ = 0, getTargetRect: v } = e, [y, b] = (0, I.useState)(null), x = [
p,
s,
@@ -13777,12 +13777,12 @@ function Tte(e) {
g,
_,
n
- ], S = (0, I.useRef)(Ox?.scale);
+ ], S = (0, I.useRef)(Dx?.scale);
(0, I.useEffect)(() => {
- m && (S.current = Ox?.scale);
+ m && (S.current = Dx?.scale);
}, [m]);
let C = (0, I.useCallback)(() => {
- if (p === !1 || !m || !i.current || !r.current || !u || Ox?.scale !== S.current) return;
+ if (p === !1 || !m || !i.current || !r.current || !u || Dx?.scale !== S.current) return;
let e = null;
if (o.current && Pp(o.current)) {
let t = Mp()?.getBoundingClientRect(), n = o.current.getBoundingClientRect();
@@ -13793,8 +13793,8 @@ function Tte(e) {
}
let h = i.current;
!g && i.current && (h.style.top = "0px", h.style.bottom = "", h.style.maxHeight = (window.visualViewport?.height ?? window.innerHeight) + "px");
- let y = Cte({
- placement: Dte(s, t),
+ let y = wte({
+ placement: Ote(s, t),
overlayNode: i.current,
targetNode: r.current,
scrollNode: o.current || i.current,
@@ -13804,7 +13804,7 @@ function Tte(e) {
offset: d,
crossOffset: f,
maxHeight: g,
- arrowSize: n ?? (a?.current ? wx(a.current, !0).width : 0),
+ arrowSize: n ?? (a?.current ? Cx(a.current, !0).width : 0),
arrowBoundaryOffset: _,
targetRect: v?.(r.current)
});
@@ -13817,10 +13817,10 @@ function Tte(e) {
}
b(y);
}, x);
- Gp(C, x), Ete(C), Cb({
+ Gp(C, x), Dte(C), Sb({
ref: i,
onResize: C
- }), Cb({
+ }), Sb({
ref: r,
onResize: C
});
@@ -13833,10 +13833,10 @@ function Tte(e) {
}, n = () => {
w.current && t();
};
- Ox?.addEventListener("resize", t), Ox?.addEventListener("scroll", n);
+ Dx?.addEventListener("resize", t), Dx?.addEventListener("scroll", n);
let r = Dp(Np(window), "scroll", n);
return () => {
- Ox?.removeEventListener("resize", t), Ox?.removeEventListener("scroll", n), r();
+ Dx?.removeEventListener("resize", t), Dx?.removeEventListener("scroll", n), r();
};
}, [C]);
let T = (0, I.useCallback)(() => {
@@ -13868,25 +13868,25 @@ function Tte(e) {
updatePosition: C
};
}
-function Ete(e) {
+function Dte(e) {
Gp(() => (window.addEventListener("resize", e, !1), () => {
window.removeEventListener("resize", e, !1);
}), [e]);
}
-function Dte(e, t) {
+function Ote(e, t) {
return t === "rtl" ? e.replace("start", "right").replace("end", "left") : e.replace("start", "left").replace("end", "right");
}
//#endregion
//#region node_modules/react-aria/dist/private/overlays/usePopover.mjs
-function Ote(e, t) {
- let { triggerRef: n, popoverRef: r, groupRef: i, isNonModal: a, isKeyboardDismissDisabled: o, shouldCloseOnInteractOutside: s, ...c } = e, l = c.trigger === "SubmenuTrigger", { overlayProps: u, underlayProps: d } = sx({
+function kte(e, t) {
+ let { triggerRef: n, popoverRef: r, groupRef: i, isNonModal: a, isKeyboardDismissDisabled: o, shouldCloseOnInteractOutside: s, ...c } = e, l = c.trigger === "SubmenuTrigger", { overlayProps: u, underlayProps: d } = ox({
isOpen: t.isOpen,
onClose: t.close,
shouldCloseOnBlur: !0,
isDismissable: !a || l,
isKeyboardDismissDisabled: o,
shouldCloseOnInteractOutside: s
- }, i ?? r), { overlayProps: f, arrowProps: p, placement: m, triggerAnchorPoint: h } = Tte({
+ }, i ?? r), { overlayProps: f, arrowProps: p, placement: m, triggerAnchorPoint: h } = Ete({
...c,
targetRef: n,
overlayRef: r,
@@ -13894,7 +13894,7 @@ function Ote(e, t) {
onClose: a && !l ? t.close : null,
getTargetRect: c.getTargetRect ?? (t.point ? () => new DOMRect(t.point.x, t.point.y, 0, 0) : void 0)
});
- dx({ isDisabled: a || !t.isOpen }), (0, I.useEffect)(() => {
+ ux({ isDisabled: a || !t.isOpen }), (0, I.useEffect)(() => {
if (t.isOpen && r.current) return a ? Kee(i?.current ?? r.current) : cv([i?.current ?? r.current], { shouldUseInert: !0 });
}, [
a,
@@ -13913,10 +13913,10 @@ function Ote(e, t) {
}
//#endregion
//#region node_modules/react-aria/dist/private/radio/utils.mjs
-var kx = /* @__PURE__ */ new WeakMap();
+var Ox = /* @__PURE__ */ new WeakMap();
//#endregion
//#region node_modules/react-aria/dist/private/radio/useRadio.mjs
-function kte(e, t, n) {
+function Ate(e, t, n) {
let { value: r, children: i, "aria-label": a, "aria-labelledby": o, onPressStart: s, onPressEnd: c, onPressChange: l, onPress: u, onPressUp: d, onClick: f } = e, p = e.isDisabled || t.isDisabled, m = t.selectedValue === r, h = (e) => {
e.stopPropagation(), t.setSelectedValue(r);
}, { pressProps: g, isPressed: _ } = $g({
@@ -13939,7 +13939,7 @@ function kte(e, t, n) {
}
}), { focusableProps: b } = Bh(H(e, { onFocus: () => t.setLastFocusedValue(r) }), n), x = H(g, b), S = zg(e, { labelable: !0 }), C = -1;
t.selectedValue == null ? (t.lastFocusedValue === r || t.lastFocusedValue == null) && (C = 0) : t.selectedValue === r && (C = 0), p && (C = void 0);
- let { name: w, form: T, descriptionId: E, errorMessageId: D, validationBehavior: O } = kx.get(t);
+ let { name: w, form: T, descriptionId: E, errorMessageId: D, validationBehavior: O } = Ox.get(t);
L_(n, t.defaultSelectedValue, t.setSelectedValue), R_({ validationBehavior: O }, t, n);
let k = z_();
return {
@@ -13973,7 +13973,7 @@ function kte(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/radio/useRadioGroup.mjs
-function Ate(e, t) {
+function jte(e, t) {
let { name: n, form: r, isReadOnly: i, isRequired: a, isDisabled: o, orientation: s = "vertical", validationBehavior: c = "aria" } = e, { direction: l } = Eg(), { isInvalid: u, validationErrors: d, validationDetails: f } = t.displayValidation, { labelProps: p, fieldProps: m, descriptionProps: h, errorMessageProps: g } = Z_({
...e,
labelElementType: "span",
@@ -14002,7 +14002,7 @@ function Ate(e, t) {
},
allowRepeats: !0
}), x = mh(n);
- return kx.set(t, {
+ return Ox.set(t, {
name: x,
form: r,
descriptionId: h.id,
@@ -14031,8 +14031,8 @@ function Ate(e, t) {
}
//#endregion
//#region node_modules/react-aria/dist/private/select/useSelect.mjs
-var Ax = /* @__PURE__ */ new WeakMap();
-function jte(e, t, n) {
+var kx = /* @__PURE__ */ new WeakMap();
+function Mte(e, t, n) {
let { keyboardDelegate: r, isDisabled: i, isRequired: a, name: o, form: s, validationBehavior: c = "aria" } = e, l = gy({
usage: "search",
sensitivity: "base"
@@ -14075,7 +14075,7 @@ function jte(e, t, n) {
});
t.selectionManager.selectionMode === "multiple" && (m = {});
let S = zg(e, { labelable: !0 }), C = H(m, d, y), w = mh();
- return Ax.set(t, {
+ return kx.set(t, {
isDisabled: i,
isRequired: a,
name: o,
@@ -14136,8 +14136,8 @@ function jte(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/select/HiddenSelect.mjs
-function Mte(e, t, n) {
- let r = Ax.get(t) || {}, { autoComplete: i, name: a = r.name, form: o = r.form, isDisabled: s = r.isDisabled } = e, { validationBehavior: c, isRequired: l } = r, { visuallyHiddenProps: u } = rv({ style: {
+function Nte(e, t, n) {
+ let r = kx.get(t) || {}, { autoComplete: i, name: a = r.name, form: o = r.form, isDisabled: s = r.isDisabled } = e, { validationBehavior: c, isRequired: l } = r, { visuallyHiddenProps: u } = rv({ style: {
position: "fixed",
top: 0,
left: 0
@@ -14172,8 +14172,8 @@ function Mte(e, t, n) {
}
};
}
-function Nte(e) {
- let { state: t, triggerRef: n, label: r, name: i, form: a, isDisabled: o } = e, s = (0, I.useRef)(null), c = (0, I.useRef)(null), { containerProps: l, selectProps: u } = Mte({
+function Pte(e) {
+ let { state: t, triggerRef: n, label: r, name: i, form: a, isDisabled: o } = e, s = (0, I.useRef)(null), c = (0, I.useRef)(null), { containerProps: l, selectProps: u } = Nte({
...e,
selectRef: t.collection.size <= 300 ? s : c
}, t, n), d = Array.isArray(t.value) ? t.value : [t.value];
@@ -14197,7 +14197,7 @@ function Nte(e) {
value: e ?? ""
})))));
if (i) {
- let { validationBehavior: e } = Ax.get(t) || {};
+ let { validationBehavior: e } = kx.get(t) || {};
d.length === 0 && (d = [null]);
let n = d.map((t, n) => {
let r = {
@@ -14228,7 +14228,7 @@ function Nte(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/separator/useSeparator.mjs
-function Pte(e) {
+function Fte(e) {
let t = zg(e, { labelable: !0 }), n;
return e.orientation === "vertical" && (n = "vertical"), e.elementType === "hr" ? { separatorProps: t } : { separatorProps: {
...t,
@@ -14238,7 +14238,7 @@ function Pte(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/switch/useSwitch.mjs
-function Fte(e, t, n) {
+function Ite(e, t, n) {
let { labelProps: r, inputProps: i, isSelected: a, ...o } = J_(e, t, n);
return {
labelProps: r,
@@ -14253,10 +14253,10 @@ function Fte(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/grid/GridKeyboardDelegate.mjs
-var jx = class {
+var Ax = class {
constructor(e) {
if (this.collection = e.collection, this.disabledKeys = e.disabledKeys, this.disabledBehavior = e.disabledBehavior || "all", this.direction = e.direction, this.collator = e.collator, !e.layout && !e.ref) throw Error("Either a layout or a ref must be specified.");
- this.layoutDelegate = e.layoutDelegate || (e.layout ? new Ite(e.layout) : new _v(e.ref)), this.focusMode = e.focusMode ?? "row";
+ this.layoutDelegate = e.layoutDelegate || (e.layout ? new Lte(e.layout) : new _v(e.ref)), this.focusMode = e.focusMode ?? "row";
}
isCell(e) {
return e.type === "cell";
@@ -14422,7 +14422,7 @@ var jx = class {
}
return null;
}
-}, Ite = class {
+}, Lte = class {
constructor(e) {
this.layout = e;
}
@@ -14435,16 +14435,16 @@ var jx = class {
getVisibleRect() {
return this.layout.virtualizer.visibleRect;
}
-}, Mx = /* @__PURE__ */ new WeakMap();
+}, jx = /* @__PURE__ */ new WeakMap();
//#endregion
//#region node_modules/react-aria/dist/private/grid/useGrid.mjs
-function Lte(e, t, n) {
+function Rte(e, t, n) {
let { isVirtualized: r, disallowTypeAhead: i, keyboardDelegate: a, focusMode: o, scrollRef: s, getRowText: c, onRowAction: l, onCellAction: u, escapeKeyBehavior: d = "clearSelection", shouldSelectOnPressUp: f, keyboardNavigationBehavior: p = "arrow" } = e, { selectionManager: m } = t;
!e["aria-label"] && !e["aria-labelledby"] && console.warn("An aria-label or aria-labelledby prop is required for accessibility.");
let h = gy({
usage: "search",
sensitivity: "base"
- }), { direction: g } = Eg(), _ = t.selectionManager.disabledBehavior, v = (0, I.useMemo)(() => a || new jx({
+ }), { direction: g } = Eg(), _ = t.selectionManager.disabledBehavior, v = (0, I.useMemo)(() => a || new Ax({
collection: t.collection,
disabledKeys: t.disabledKeys,
disabledBehavior: _,
@@ -14470,7 +14470,7 @@ function Lte(e, t, n) {
disallowTypeAhead: i,
escapeKeyBehavior: d
}), b = mh(e.id);
- Mx.set(t, {
+ jx.set(t, {
keyboardDelegate: v,
actions: {
onRowAction: l,
@@ -14479,7 +14479,7 @@ function Lte(e, t, n) {
shouldSelectOnPressUp: f,
keyboardNavigationBehavior: p
});
- let x = rte({
+ let x = ite({
selectionManager: m,
hasItemActions: !!(l || u)
}), S = zg(e, { labelable: !0 }), C = (0, I.useCallback)((e) => {
@@ -14491,36 +14491,36 @@ function Lte(e, t, n) {
}, [m]), w = (0, I.useMemo)(() => ({
onBlur: y.onBlur,
onFocus: C
- }), [C, y.onBlur]), T = _b(n, { isDisabled: t.collection.size !== 0 }), E = H(S, {
+ }), [C, y.onBlur]), T = gb(n, { isDisabled: t.collection.size !== 0 }), E = H(S, {
role: "grid",
id: b,
"aria-multiselectable": m.selectionMode === "multiple" ? "true" : void 0
}, t.isKeyboardNavigationDisabled ? w : y, t.collection.size === 0 && { tabIndex: T ? -1 : 0 } || void 0, x);
- return r && (E["aria-rowcount"] = t.collection.size, E["aria-colcount"] = t.collection.columnCount), tte({ getRowText: c }, t), { gridProps: E };
+ return r && (E["aria-rowcount"] = t.collection.size, E["aria-colcount"] = t.collection.columnCount), nte({ getRowText: c }, t), { gridProps: E };
}
//#endregion
//#region node_modules/react-aria/dist/private/table/utils.mjs
-var Nx = /* @__PURE__ */ new WeakMap();
-function Px(e) {
+var Mx = /* @__PURE__ */ new WeakMap();
+function Nx(e) {
return typeof e == "string" ? e.replace(/\s*/g, "") : "" + e;
}
-function Rte(e, t) {
- let n = Nx.get(e);
+function zte(e, t) {
+ let n = Mx.get(e);
if (!n) throw Error("Unknown grid");
- return `${n}-${Px(t)}`;
+ return `${n}-${Nx(t)}`;
}
-function Fx(e, t, n) {
- let r = Nx.get(e);
+function Px(e, t, n) {
+ let r = Mx.get(e);
if (!r) throw Error("Unknown grid");
- return `${r}-${Px(t)}-${Px(n)}`;
+ return `${r}-${Nx(t)}-${Nx(n)}`;
}
-function Ix(e, t) {
- return [...e.collection.rowHeaderColumnKeys].map((n) => Fx(e, t, n)).join(" ");
+function Fx(e, t) {
+ return [...e.collection.rowHeaderColumnKeys].map((n) => Px(e, t, n)).join(" ");
}
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/ar-AE.mjs
-var Lx = {};
-Lx = {
+var Ix = {};
+Ix = {
ascending: "تصاعدي",
ascendingSort: (e) => `\u{62A}\u{631}\u{62A}\u{64A}\u{628} \u{62D}\u{633}\u{628} \u{627}\u{644}\u{639}\u{645}\u{648}\u{62F} ${e.columnName} \u{628}\u{62A}\u{631}\u{62A}\u{64A}\u{628} \u{62A}\u{635}\u{627}\u{639}\u{62F}\u{64A}`,
collapse: "طي",
@@ -14535,8 +14535,8 @@ Lx = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/bg-BG.mjs
-var Rx = {};
-Rx = {
+var Lx = {};
+Lx = {
ascending: "възходящ",
ascendingSort: (e) => `\u{441}\u{43E}\u{440}\u{442}\u{438}\u{440}\u{430}\u{43D}\u{43E} \u{43F}\u{43E} \u{43A}\u{43E}\u{43B}\u{43E}\u{43D}\u{430} ${e.columnName} \u{432}\u{44A}\u{432} \u{432}\u{44A}\u{437}\u{445}\u{43E}\u{434}\u{44F}\u{449} \u{440}\u{435}\u{434}`,
collapse: "Свиване",
@@ -14551,8 +14551,8 @@ Rx = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/cs-CZ.mjs
-var zx = {};
-zx = {
+var Rx = {};
+Rx = {
ascending: "vzestupně",
ascendingSort: (e) => `\u{159}azeno vzestupn\u{11B} podle sloupce ${e.columnName}`,
collapse: "Sbalit",
@@ -14567,8 +14567,8 @@ zx = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/da-DK.mjs
-var Bx = {};
-Bx = {
+var zx = {};
+zx = {
ascending: "stigende",
ascendingSort: (e) => `sorteret efter kolonne ${e.columnName} i stigende r\xe6kkef\xf8lge`,
collapse: "Skjul",
@@ -14583,8 +14583,8 @@ Bx = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/de-DE.mjs
-var Vx = {};
-Vx = {
+var Bx = {};
+Bx = {
ascending: "aufsteigend",
ascendingSort: (e) => `sortiert nach Spalte ${e.columnName} in aufsteigender Reihenfolge`,
collapse: "Reduzieren",
@@ -14599,8 +14599,8 @@ Vx = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/el-GR.mjs
-var Hx = {};
-Hx = {
+var Vx = {};
+Vx = {
ascending: "αύξουσα",
ascendingSort: (e) => `\u{3B4}\u{3B9}\u{3B1}\u{3BB}\u{3BF}\u{3B3}\u{3AE} \u{3B1}\u{3BD}\u{3AC} \u{3C3}\u{3C4}\u{3AE}\u{3BB}\u{3B7} ${e.columnName} \u{3C3}\u{3B5} \u{3B1}\u{3CD}\u{3BE}\u{3BF}\u{3C5}\u{3C3}\u{3B1} \u{3C3}\u{3B5}\u{3B9}\u{3C1}\u{3AC}`,
collapse: "Σύμπτυξη",
@@ -14615,8 +14615,8 @@ Hx = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/en-US.mjs
-var Ux = {};
-Ux = {
+var Hx = {};
+Hx = {
select: "Select",
selectAll: "Select All",
sortable: "sortable column",
@@ -14631,8 +14631,8 @@ Ux = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/es-ES.mjs
-var Wx = {};
-Wx = {
+var Ux = {};
+Ux = {
ascending: "ascendente",
ascendingSort: (e) => `ordenado por columna ${e.columnName} en sentido ascendente`,
collapse: "Contraer",
@@ -14647,8 +14647,8 @@ Wx = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/et-EE.mjs
-var Gx = {};
-Gx = {
+var Wx = {};
+Wx = {
ascending: "tõusev järjestus",
ascendingSort: (e) => `sorditud veeru j\xe4rgi ${e.columnName} t\xf5usvas j\xe4rjestuses`,
collapse: "Ahenda",
@@ -14663,8 +14663,8 @@ Gx = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/fi-FI.mjs
-var Kx = {};
-Kx = {
+var Gx = {};
+Gx = {
ascending: "nouseva",
ascendingSort: (e) => `lajiteltu sarakkeen ${e.columnName} mukaan nousevassa j\xe4rjestyksess\xe4`,
collapse: "Pienennä",
@@ -14679,8 +14679,8 @@ Kx = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/fr-FR.mjs
-var qx = {};
-qx = {
+var Kx = {};
+Kx = {
ascending: "croissant",
ascendingSort: (e) => `tri\xe9 en fonction de la colonne\xa0${e.columnName} par ordre croissant`,
collapse: "Réduire",
@@ -14695,8 +14695,8 @@ qx = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/he-IL.mjs
-var Jx = {};
-Jx = {
+var qx = {};
+qx = {
ascending: "עולה",
ascendingSort: (e) => `\u{5DE}\u{5D5}\u{5D9}\u{5DF} \u{5DC}\u{5E4}\u{5D9} \u{5E2}\u{5DE}\u{5D5}\u{5D3}\u{5D4} ${e.columnName} \u{5D1}\u{5E1}\u{5D3}\u{5E8} \u{5E2}\u{5D5}\u{5DC}\u{5D4}`,
collapse: "כווץ",
@@ -14711,8 +14711,8 @@ Jx = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/hr-HR.mjs
-var Yx = {};
-Yx = {
+var Jx = {};
+Jx = {
ascending: "rastući",
ascendingSort: (e) => `razvrstano po stupcima ${e.columnName} rastu\u{107}em redoslijedom`,
collapse: "Sažmi",
@@ -14727,8 +14727,8 @@ Yx = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/hu-HU.mjs
-var Xx = {};
-Xx = {
+var Yx = {};
+Yx = {
ascending: "növekvő",
ascendingSort: (e) => `rendezve a(z) ${e.columnName} oszlop szerint, n\xf6vekv\u{151} sorrendben`,
collapse: "Összecsukás",
@@ -14743,8 +14743,8 @@ Xx = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/it-IT.mjs
-var Zx = {};
-Zx = {
+var Xx = {};
+Xx = {
ascending: "crescente",
ascendingSort: (e) => `in ordine crescente in base alla colonna ${e.columnName}`,
collapse: "Comprimi",
@@ -14759,8 +14759,8 @@ Zx = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/ja-JP.mjs
-var Qx = {};
-Qx = {
+var Zx = {};
+Zx = {
ascending: "昇順",
ascendingSort: (e) => `\u{5217} ${e.columnName} \u{3092}\u{6607}\u{9806}\u{3067}\u{4E26}\u{3079}\u{66FF}\u{3048}`,
collapse: "折りたたむ",
@@ -14775,8 +14775,8 @@ Qx = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/ko-KR.mjs
-var $x = {};
-$x = {
+var Qx = {};
+Qx = {
ascending: "오름차순",
ascendingSort: (e) => `${e.columnName} \u{C5F4}\u{C744} \u{AE30}\u{C900}\u{C73C}\u{B85C} \u{C624}\u{B984}\u{CC28}\u{C21C}\u{C73C}\u{B85C} \u{C815}\u{B82C}\u{B428}`,
collapse: "접기",
@@ -14791,8 +14791,8 @@ $x = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/lt-LT.mjs
-var eS = {};
-eS = {
+var $x = {};
+$x = {
ascending: "didėjančia tvarka",
ascendingSort: (e) => `surikiuota pagal stulpel\u{12F} ${e.columnName} did\u{117}jan\u{10D}ia tvarka`,
collapse: "Sutraukti",
@@ -14807,8 +14807,8 @@ eS = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/lv-LV.mjs
-var tS = {};
-tS = {
+var eS = {};
+eS = {
ascending: "augošā secībā",
ascendingSort: (e) => `k\u{101}rtots p\u{113}c kolonnas ${e.columnName} augo\u{161}\u{101} sec\u{12B}b\u{101}`,
collapse: "Sakļaut",
@@ -14823,8 +14823,8 @@ tS = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/nb-NO.mjs
-var nS = {};
-nS = {
+var tS = {};
+tS = {
ascending: "stigende",
ascendingSort: (e) => `sortert etter kolonne ${e.columnName} i stigende rekkef\xf8lge`,
collapse: "Skjul",
@@ -14839,8 +14839,8 @@ nS = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/nl-NL.mjs
-var rS = {};
-rS = {
+var nS = {};
+nS = {
ascending: "oplopend",
ascendingSort: (e) => `gesorteerd in oplopende volgorde in kolom ${e.columnName}`,
collapse: "Samenvouwen",
@@ -14855,8 +14855,8 @@ rS = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/pl-PL.mjs
-var iS = {};
-iS = {
+var rS = {};
+rS = {
ascending: "rosnąco",
ascendingSort: (e) => `posortowano wed\u{142}ug kolumny ${e.columnName} w porz\u{105}dku rosn\u{105}cym`,
collapse: "Zwiń",
@@ -14871,8 +14871,8 @@ iS = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/pt-BR.mjs
-var aS = {};
-aS = {
+var iS = {};
+iS = {
ascending: "crescente",
ascendingSort: (e) => `classificado pela coluna ${e.columnName} em ordem crescente`,
collapse: "Recolher",
@@ -14887,8 +14887,8 @@ aS = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/pt-PT.mjs
-var oS = {};
-oS = {
+var aS = {};
+aS = {
ascending: "ascendente",
ascendingSort: (e) => `Ordenar por coluna ${e.columnName} em ordem ascendente`,
collapse: "Colapsar",
@@ -14903,8 +14903,8 @@ oS = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/ro-RO.mjs
-var sS = {};
-sS = {
+var oS = {};
+oS = {
ascending: "crescătoare",
ascendingSort: (e) => `sortate dup\u{103} coloana ${e.columnName} \xeen ordine cresc\u{103}toare`,
collapse: "Restrângeți",
@@ -14919,8 +14919,8 @@ sS = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/ru-RU.mjs
-var cS = {};
-cS = {
+var sS = {};
+sS = {
ascending: "возрастание",
ascendingSort: (e) => `\u{441}\u{43E}\u{440}\u{442}\u{438}\u{440}\u{43E}\u{432}\u{430}\u{442}\u{44C} \u{441}\u{442}\u{43E}\u{43B}\u{431}\u{435}\u{446} ${e.columnName} \u{432} \u{43F}\u{43E}\u{440}\u{44F}\u{434}\u{43A}\u{435} \u{432}\u{43E}\u{437}\u{440}\u{430}\u{441}\u{442}\u{430}\u{43D}\u{438}\u{44F}`,
collapse: "Свернуть",
@@ -14935,8 +14935,8 @@ cS = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/sk-SK.mjs
-var lS = {};
-lS = {
+var cS = {};
+cS = {
ascending: "vzostupne",
ascendingSort: (e) => `zoraden\xe9 zostupne pod\u{13E}a st\u{13A}pca ${e.columnName}`,
collapse: "Zbaliť",
@@ -14951,8 +14951,8 @@ lS = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/sl-SI.mjs
-var uS = {};
-uS = {
+var lS = {};
+lS = {
ascending: "naraščajoče",
ascendingSort: (e) => `razvr\u{161}\u{10D}eno po stolpcu ${e.columnName} v nara\u{161}\u{10D}ajo\u{10D}em vrstnem redu`,
collapse: "Strni",
@@ -14967,8 +14967,8 @@ uS = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/sr-SP.mjs
-var dS = {};
-dS = {
+var uS = {};
+uS = {
ascending: "rastući",
ascendingSort: (e) => `sortirano po kolonama ${e.columnName} rastu\u{107}im redosledom`,
collapse: "Skupi",
@@ -14983,8 +14983,8 @@ dS = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/sv-SE.mjs
-var fS = {};
-fS = {
+var dS = {};
+dS = {
ascending: "stigande",
ascendingSort: (e) => `sorterat p\xe5 kolumn ${e.columnName} i stigande ordning`,
collapse: "Dölj",
@@ -14999,8 +14999,8 @@ fS = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/tr-TR.mjs
-var pS = {};
-pS = {
+var fS = {};
+fS = {
ascending: "artan sırada",
ascendingSort: (e) => `${e.columnName} s\xfctuna g\xf6re artan d\xfczende s\u{131}rala`,
collapse: "Daralt",
@@ -15015,8 +15015,8 @@ pS = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/uk-UA.mjs
-var mS = {};
-mS = {
+var pS = {};
+pS = {
ascending: "висхідний",
ascendingSort: (e) => `\u{432}\u{456}\u{434}\u{441}\u{43E}\u{440}\u{442}\u{43E}\u{432}\u{430}\u{43D}\u{43E} \u{437}\u{430} \u{441}\u{442}\u{43E}\u{432}\u{43F}\u{446}\u{435}\u{43C} ${e.columnName} \u{443} \u{432}\u{438}\u{441}\u{445}\u{456}\u{434}\u{43D}\u{43E}\u{43C}\u{443} \u{43F}\u{43E}\u{440}\u{44F}\u{434}\u{43A}\u{443}`,
collapse: "Згорнути",
@@ -15031,8 +15031,8 @@ mS = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/zh-CN.mjs
-var hS = {};
-hS = {
+var mS = {};
+mS = {
ascending: "升序",
ascendingSort: (e) => `\u{6309}\u{5217} ${e.columnName} \u{5347}\u{5E8F}\u{6392}\u{5E8F}`,
collapse: "折叠",
@@ -15047,8 +15047,8 @@ hS = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/table/zh-TW.mjs
-var gS = {};
-gS = {
+var hS = {};
+hS = {
ascending: "遞增",
ascendingSort: (e) => `\u{5DF2}\u{4F9D}\u{64DA}\u{300C}${e.columnName}\u{300D}\u{6B04}\u{905E}\u{589E}\u{6392}\u{5E8F}`,
collapse: "收合",
@@ -15063,46 +15063,46 @@ gS = {
};
//#endregion
//#region node_modules/react-aria/dist/private/table/intlStrings.mjs
-var _S = {};
-_S = {
- "ar-AE": Lx,
- "bg-BG": Rx,
- "cs-CZ": zx,
- "da-DK": Bx,
- "de-DE": Vx,
- "el-GR": Hx,
- "en-US": Ux,
- "es-ES": Wx,
- "et-EE": Gx,
- "fi-FI": Kx,
- "fr-FR": qx,
- "he-IL": Jx,
- "hr-HR": Yx,
- "hu-HU": Xx,
- "it-IT": Zx,
- "ja-JP": Qx,
- "ko-KR": $x,
- "lt-LT": eS,
- "lv-LV": tS,
- "nb-NO": nS,
- "nl-NL": rS,
- "pl-PL": iS,
- "pt-BR": aS,
- "pt-PT": oS,
- "ro-RO": sS,
- "ru-RU": cS,
- "sk-SK": lS,
- "sl-SI": uS,
- "sr-SP": dS,
- "sv-SE": fS,
- "tr-TR": pS,
- "uk-UA": mS,
- "zh-CN": hS,
- "zh-TW": gS
+var gS = {};
+gS = {
+ "ar-AE": Ix,
+ "bg-BG": Lx,
+ "cs-CZ": Rx,
+ "da-DK": zx,
+ "de-DE": Bx,
+ "el-GR": Vx,
+ "en-US": Hx,
+ "es-ES": Ux,
+ "et-EE": Wx,
+ "fi-FI": Gx,
+ "fr-FR": Kx,
+ "he-IL": qx,
+ "hr-HR": Jx,
+ "hu-HU": Yx,
+ "it-IT": Xx,
+ "ja-JP": Zx,
+ "ko-KR": Qx,
+ "lt-LT": $x,
+ "lv-LV": eS,
+ "nb-NO": tS,
+ "nl-NL": nS,
+ "pl-PL": rS,
+ "pt-BR": iS,
+ "pt-PT": aS,
+ "ro-RO": oS,
+ "ru-RU": sS,
+ "sk-SK": cS,
+ "sl-SI": lS,
+ "sr-SP": uS,
+ "sv-SE": dS,
+ "tr-TR": fS,
+ "uk-UA": pS,
+ "zh-CN": mS,
+ "zh-TW": hS
};
//#endregion
//#region node_modules/react-aria/dist/private/table/TableKeyboardDelegate.mjs
-var zte = class extends jx {
+var Bte = class extends Ax {
isCell(e) {
return e.type === "cell" || e.type === "rowheader" || e.type === "column";
}
@@ -15180,14 +15180,14 @@ var zte = class extends jx {
};
//#endregion
//#region node_modules/react-aria/dist/private/table/useTable.mjs
-function Bte(e) {
+function Vte(e) {
return e && e.__esModule ? e.default : e;
}
-function Vte(e, t, n) {
+function Hte(e, t, n) {
let { keyboardDelegate: r, isVirtualized: i, layoutDelegate: a, layout: o } = e, s = gy({
usage: "search",
sensitivity: "base"
- }), { direction: c } = Eg(), l = t.selectionManager.disabledBehavior, u = (0, I.useMemo)(() => r || new zte({
+ }), { direction: c } = Eg(), l = t.selectionManager.disabledBehavior, u = (0, I.useMemo)(() => r || new Bte({
collection: t.collection,
disabledKeys: t.disabledKeys,
disabledBehavior: l,
@@ -15207,14 +15207,14 @@ function Vte(e, t, n) {
a,
o
]), d = mh(e.id);
- Nx.set(t, d);
- let { gridProps: f } = Lte({
+ Mx.set(t, d);
+ let { gridProps: f } = Rte({
...e,
id: d,
keyboardDelegate: u
}, t, n);
i && (f["aria-rowcount"] = t.collection.size + t.collection.headerRows.length), t.treeColumn != null && (f.role = "treegrid");
- let { column: p, direction: m } = t.sortDescriptor || {}, h = Lg(Bte(_S), "@react-aria/table"), g = (0, I.useMemo)(() => {
+ let { column: p, direction: m } = t.sortDescriptor || {}, h = Lg(Vte(gS), "@react-aria/table"), g = (0, I.useMemo)(() => {
let e = t.collection.columns.find((e) => e.key === p)?.textValue ?? "";
return m && p ? h.format(`${m}Sort`, { columnName: e }) : void 0;
}, [
@@ -15228,13 +15228,13 @@ function Vte(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/grid/useGridCell.mjs
-function vS(e, t, n) {
- let { node: r, isVirtualized: i, focusMode: a, allowsArrowNavigation: o, shouldSelectOnPressUp: s, onAction: c } = e, { direction: l } = Eg(), { keyboardDelegate: u, actions: { onCellAction: d }, keyboardNavigationBehavior: f } = Mx.get(t), p = a ?? (f === "tab" ? "cell" : "child"), m = (0, I.useRef)(null), h = () => {
+function _S(e, t, n) {
+ let { node: r, isVirtualized: i, focusMode: a, allowsArrowNavigation: o, shouldSelectOnPressUp: s, onAction: c } = e, { direction: l } = Eg(), { keyboardDelegate: u, actions: { onCellAction: d }, keyboardNavigationBehavior: f } = jx.get(t), p = a ?? (f === "tab" ? "cell" : "child"), m = (0, I.useRef)(null), h = () => {
if (n.current) {
let e = x_(n.current);
if (p === "child") {
if (Pp(n.current) && n.current !== Mp(xp(n.current))) return;
- let r = t.selectionManager.childFocusStrategy === "last" ? yS(e) : e.firstChild();
+ let r = t.selectionManager.childFocusStrategy === "last" ? vS(e) : e.firstChild();
if (r) {
sh(r);
return;
@@ -15242,7 +15242,7 @@ function vS(e, t, n) {
}
(m.current != null && r.key !== m.current || !Pp(n.current)) && sh(n.current);
}
- }, { itemProps: g, isPressed: _ } = yb({
+ }, { itemProps: g, isPressed: _ } = vb({
selectionManager: t.selectionManager,
key: r.key,
ref: n,
@@ -15266,7 +15266,7 @@ function vS(e, t, n) {
n.current.parentElement?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent));
break;
}
- p === "cell" && l === "rtl" ? (sh(n.current), P_(n.current, { containingElement: j_(n.current) })) : (a.currentNode = n.current, t = l === "rtl" ? a.firstChild() : yS(a), t && (sh(t), P_(t, { containingElement: j_(n.current) })));
+ p === "cell" && l === "rtl" ? (sh(n.current), P_(n.current, { containingElement: j_(n.current) })) : (a.currentNode = n.current, t = l === "rtl" ? a.firstChild() : vS(a), t && (sh(t), P_(t, { containingElement: j_(n.current) })));
}
break;
}
@@ -15278,7 +15278,7 @@ function vS(e, t, n) {
n.current.parentElement?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent));
break;
}
- p === "cell" && l === "ltr" ? (sh(n.current), P_(n.current, { containingElement: j_(n.current) })) : (a.currentNode = n.current, t = l === "rtl" ? yS(a) : a.firstChild(), t && (sh(t), P_(t, { containingElement: j_(n.current) })));
+ p === "cell" && l === "ltr" ? (sh(n.current), P_(n.current, { containingElement: j_(n.current) })) : (a.currentNode = n.current, t = l === "rtl" ? vS(a) : a.firstChild(), t && (sh(t), P_(t, { containingElement: j_(n.current) })));
}
break;
}
@@ -15323,7 +15323,7 @@ function vS(e, t, n) {
isPressed: _
};
}
-function yS(e) {
+function vS(e) {
let t = null, n = null;
do
n = e.lastChild(), n && (t = n);
@@ -15332,20 +15332,20 @@ function yS(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/table/useTableCell.mjs
-function bS(e, t, n) {
- let { gridCellProps: r, isPressed: i } = vS(e, t, n), a = e.node.column?.key;
- return a != null && t.collection.rowHeaderColumnKeys.has(a) && (r.role = "rowheader", r.id = Fx(t, e.node.parentKey, a)), {
+function yS(e, t, n) {
+ let { gridCellProps: r, isPressed: i } = _S(e, t, n), a = e.node.column?.key;
+ return a != null && t.collection.rowHeaderColumnKeys.has(a) && (r.role = "rowheader", r.id = Px(t, e.node.parentKey, a)), {
gridCellProps: r,
isPressed: i
};
}
//#endregion
//#region node_modules/react-aria/dist/private/table/useTableColumnHeader.mjs
-function xS(e) {
+function bS(e) {
return e && e.__esModule ? e.default : e;
}
-function SS(e, t, n) {
- let { node: r } = e, i = r.props.allowsSorting, { gridCellProps: a } = vS({
+function xS(e, t, n) {
+ let { node: r } = e, i = r.props.allowsSorting, { gridCellProps: a } = _S({
focusMode: "child",
...e
}, t, n), o = r.props.isSelectionCell && t.selectionManager.selectionMode === "single", { pressProps: s, isPressed: c } = $g({
@@ -15356,7 +15356,7 @@ function SS(e, t, n) {
ref: n
}), { focusableProps: l } = Bh({}, n), u, d = t.sortDescriptor?.column === r.key, f = t.sortDescriptor?.direction;
r.props.allowsSorting && !sm() && (u = d ? f : "none");
- let p = Lg(xS(_S), "@react-aria/table"), m;
+ let p = Lg(bS(gS), "@react-aria/table"), m;
i && (m = `${p.format("sortable")}`, d && f && sm() && (m = `${m}, ${p.format(f)}`));
let h = I_(m), g = t.collection.size === 0;
return (0, I.useEffect)(() => {
@@ -15369,7 +15369,7 @@ function SS(e, t, n) {
columnHeaderProps: {
...H(l, a, s, h, g ? { tabIndex: -1 } : null),
role: "columnheader",
- id: Rte(t, r.key),
+ id: zte(t, r.key),
"aria-colspan": r.colSpan && r.colSpan > 1 ? r.colSpan : void 0,
"aria-sort": u
},
@@ -15378,14 +15378,14 @@ function SS(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/table/useTableHeaderRow.mjs
-function CS(e, t, n) {
+function SS(e, t, n) {
let { node: r, isVirtualized: i } = e, a = { role: "row" };
return i && t.treeColumn == null && (a["aria-rowindex"] = r.index + 1), { rowProps: a };
}
//#endregion
//#region node_modules/react-aria/dist/private/grid/useGridRow.mjs
-function wS(e, t, n) {
- let { node: r, isVirtualized: i, shouldSelectOnPressUp: a, onAction: o } = e, { actions: s, shouldSelectOnPressUp: c } = Mx.get(t), l = s.onRowAction ? () => s.onRowAction?.(r.key) : o, { itemProps: u, ...d } = yb({
+function CS(e, t, n) {
+ let { node: r, isVirtualized: i, shouldSelectOnPressUp: a, onAction: o } = e, { actions: s, shouldSelectOnPressUp: c } = jx.get(t), l = s.onRowAction ? () => s.onRowAction?.(r.key) : o, { itemProps: u, ...d } = vb({
selectionManager: t.selectionManager,
key: r.key,
ref: n,
@@ -15406,10 +15406,10 @@ function wS(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/table/useTableRow.mjs
-function TS(e) {
+function wS(e) {
return e && e.__esModule ? e.default : e;
}
-var ES = {
+var TS = {
expand: {
ltr: "ArrowRight",
rtl: "ArrowLeft"
@@ -15419,21 +15419,21 @@ var ES = {
rtl: "ArrowRight"
}
};
-function DS(e, t, n) {
- let { node: r, isVirtualized: i } = e, { rowProps: a, ...o } = wS(e, t, n), { direction: s } = Eg();
+function ES(e, t, n) {
+ let { node: r, isVirtualized: i } = e, { rowProps: a, ...o } = CS(e, t, n), { direction: s } = Eg();
i && t.treeColumn == null ? a["aria-rowindex"] = r.index + 1 + t.collection.headerRows.length : delete a["aria-rowindex"];
- let c = t.treeColumn != null && (t.expandedKeys === "all" || t.expandedKeys.has(r.key)), l = Lg(TS(_S), "@react-aria/table"), u = yg({
+ let c = t.treeColumn != null && (t.expandedKeys === "all" || t.expandedKeys.has(r.key)), l = Lg(wS(gS), "@react-aria/table"), u = yg({
"aria-label": c ? l.format("collapse") : l.format("expand"),
- "aria-labelledby": Ix(t, r.key)
+ "aria-labelledby": Fx(t, r.key)
}), d = {}, f = {};
if (t.treeColumn != null) {
let e = t.collection.getItem(r.key);
if (e != null) {
- let n = OS(t.collection, r), i = e.props?.hasChildRows || e.props?.UNSTABLE_childItems || n?.type !== "cell", a = t.collection.getItem(r.parentKey), c = a.type === "tablebody" || a.type === "body", l = OS(t.collection, a);
+ let n = DS(t.collection, r), i = e.props?.hasChildRows || e.props?.UNSTABLE_childItems || n?.type !== "cell", a = t.collection.getItem(r.parentKey), c = a.type === "tablebody" || a.type === "body", l = DS(t.collection, a);
for (; l && l.type !== "item" && l.prevKey != null;) l = t.collection.getItem(l.prevKey);
d = {
onKeyDown: (n) => {
- n.key === ES.expand[s] && t.selectionManager.focusedKey === e.key && i && t.expandedKeys !== "all" && !t.expandedKeys.has(e.key) ? (t.toggleKey(e.key), n.stopPropagation()) : n.key === ES.collapse[s] && t.selectionManager.focusedKey === e.key && (t.expandedKeys === "all" ? t.expandedKeys === "all" && (t.toggleKey(e.key), n.stopPropagation()) : i && t.expandedKeys.has(e.key) ? (t.toggleKey(e.key), n.stopPropagation()) : !t.expandedKeys.has(e.key) && e.parentKey != null && e.level > 0 && (t.selectionManager.setFocusedKey(e.parentKey), n.stopPropagation()));
+ n.key === TS.expand[s] && t.selectionManager.focusedKey === e.key && i && t.expandedKeys !== "all" && !t.expandedKeys.has(e.key) ? (t.toggleKey(e.key), n.stopPropagation()) : n.key === TS.collapse[s] && t.selectionManager.focusedKey === e.key && (t.expandedKeys === "all" ? t.expandedKeys === "all" && (t.toggleKey(e.key), n.stopPropagation()) : i && t.expandedKeys.has(e.key) ? (t.toggleKey(e.key), n.stopPropagation()) : !t.expandedKeys.has(e.key) && e.parentKey != null && e.level > 0 && (t.selectionManager.setFocusedKey(e.parentKey), n.stopPropagation()));
},
"aria-expanded": i ? t.expandedKeys === "all" || t.expandedKeys.has(r.key) : void 0,
"aria-level": e.level + 1,
@@ -15455,41 +15455,41 @@ function DS(e, t, n) {
return {
rowProps: {
...H(a, d, m),
- "aria-labelledby": Ix(t, r.key)
+ "aria-labelledby": Fx(t, r.key)
},
expandButtonProps: f,
...o
};
}
-function OS(e, t) {
+function DS(e, t) {
return "lastChildKey" in t ? t.lastChildKey == null ? null : e.getItem(t.lastChildKey) : Array.from(t.childNodes).findLast((e) => e.parentKey === t.key);
}
//#endregion
//#region node_modules/react-aria/dist/private/grid/useGridRowGroup.mjs
-function kS() {
+function OS() {
return { rowGroupProps: { role: "rowgroup" } };
}
//#endregion
//#region node_modules/react-aria/dist/private/table/useTableRowGroup.mjs
-function AS() {
- return kS();
+function kS() {
+ return OS();
}
//#endregion
//#region node_modules/react-aria/dist/private/table/useTableSelectionCheckbox.mjs
-function jS(e) {
+function AS(e) {
return e && e.__esModule ? e.default : e;
}
-function MS(e, t) {
- let { key: n } = e, { checkboxProps: r } = ate(e, t);
+function jS(e, t) {
+ let { key: n } = e, { checkboxProps: r } = ote(e, t);
return { checkboxProps: {
...r,
- "aria-labelledby": `${r.id} ${Ix(t, n)}`
+ "aria-labelledby": `${r.id} ${Fx(t, n)}`
} };
}
-function NS(e) {
+function MS(e) {
let { isEmpty: t, isSelectAll: n, selectionMode: r } = e.selectionManager;
return { checkboxProps: {
- "aria-label": Lg(jS(_S), "@react-aria/table").format(r === "single" ? "select" : "selectAll"),
+ "aria-label": Lg(AS(gS), "@react-aria/table").format(r === "single" ? "select" : "selectAll"),
isSelected: n,
isDisabled: r !== "multiple" || e.collection.size === 0 || e.collection.rows.length === 1 && e.collection.rows[0].type === "loader",
isIndeterminate: !t && !n,
@@ -15498,21 +15498,21 @@ function NS(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/tabs/utils.mjs
-var PS = /* @__PURE__ */ new WeakMap();
-function FS(e, t, n) {
- return e ? (typeof t == "string" && (t = t.replace(/\s+/g, "")), `${PS.get(e)}-${n}-${t}`) : "";
+var NS = /* @__PURE__ */ new WeakMap();
+function PS(e, t, n) {
+ return e ? (typeof t == "string" && (t = t.replace(/\s+/g, "")), `${NS.get(e)}-${n}-${t}`) : "";
}
//#endregion
//#region node_modules/react-aria/dist/private/tabs/useTab.mjs
-function IS(e, t, n) {
- let { key: r, isDisabled: i, shouldSelectOnPressUp: a } = e, { selectionManager: o, selectedKey: s } = t, c = r === s, l = i || t.isDisabled || t.selectionManager.isDisabled(r), u = t.collection.getItem(r), { itemProps: d, isPressed: f } = yb({
+function FS(e, t, n) {
+ let { key: r, isDisabled: i, shouldSelectOnPressUp: a } = e, { selectionManager: o, selectedKey: s } = t, c = r === s, l = i || t.isDisabled || t.selectionManager.isDisabled(r), u = t.collection.getItem(r), { itemProps: d, isPressed: f } = vb({
selectionManager: o,
key: r,
ref: n,
isDisabled: l,
shouldSelectOnPressUp: a ?? u?.props.href != null,
linkBehavior: "selection"
- }), p = FS(t, r, "tab"), m = FS(t, r, "tabpanel"), { tabIndex: h } = d, g = zg(u?.props, { labelable: !0 });
+ }), p = PS(t, r, "tab"), m = PS(t, r, "tabpanel"), { tabIndex: h } = d, g = zg(u?.props, { labelable: !0 });
delete g.id;
let _ = vm(u?.props), { focusableProps: v } = Bh({
...u?.props,
@@ -15534,7 +15534,7 @@ function IS(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/tabs/TabsKeyboardDelegate.mjs
-var LS = class {
+var IS = class {
constructor(e, t, n, r = /* @__PURE__ */ new Set()) {
this.collection = e, this.flipDirection = t === "rtl", this.disabledKeys = r, this.tabDirection = n === "horizontal";
}
@@ -15578,11 +15578,11 @@ var LS = class {
};
//#endregion
//#region node_modules/react-aria/dist/private/tabs/useTabList.mjs
-function RS(e, t, n) {
+function LS(e, t, n) {
let { orientation: r = "horizontal", keyboardActivation: i = "automatic" } = e, { collection: a, selectionManager: o, disabledKeys: s } = t, { direction: c } = Eg(), { collectionProps: l } = oy({
ref: n,
selectionManager: o,
- keyboardDelegate: (0, I.useMemo)(() => new LS(a, c, r, s), [
+ keyboardDelegate: (0, I.useMemo)(() => new IS(a, c, r, s), [
a,
s,
r,
@@ -15593,7 +15593,7 @@ function RS(e, t, n) {
scrollRef: n,
linkBehavior: "selection"
}), u = mh();
- return PS.set(t, u), { tabListProps: {
+ return NS.set(t, u), { tabListProps: {
...H(l, yg({
...e,
id: u
@@ -15605,12 +15605,12 @@ function RS(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/tabs/useTabPanel.mjs
-function zS(e, t, n) {
- let r = _b(n) ? void 0 : 0, i = FS(t, e.id ?? t?.selectedKey, "tabpanel");
+function RS(e, t, n) {
+ let r = gb(n) ? void 0 : 0, i = PS(t, e.id ?? t?.selectedKey, "tabpanel");
return { tabPanelProps: H(yg({
...e,
id: i,
- "aria-labelledby": FS(t, t?.selectedKey, "tab")
+ "aria-labelledby": PS(t, t?.selectedKey, "tab")
}), {
tabIndex: r,
role: "tabpanel",
@@ -15620,7 +15620,7 @@ function zS(e, t, n) {
}
//#endregion
//#region node_modules/scheduler/cjs/scheduler.production.js
-var BS = /* @__PURE__ */ F(((e) => {
+var zS = /* @__PURE__ */ F(((e) => {
function t(e, t) {
var n = e.length;
e.push(t);
@@ -15819,10 +15819,10 @@ var BS = /* @__PURE__ */ F(((e) => {
}
};
};
-})), VS = /* @__PURE__ */ F(((e, t) => {
- t.exports = BS();
-})), HS = /* @__PURE__ */ F(((e) => {
- var t = VS(), n = ce(), r = Kh();
+})), BS = /* @__PURE__ */ F(((e, t) => {
+ t.exports = zS();
+})), VS = /* @__PURE__ */ F(((e) => {
+ var t = BS(), n = ce(), r = Kh();
function i(e) {
var t = "https://react.dev/errors/" + e;
if (1 < arguments.length) {
@@ -24232,7 +24232,7 @@ var BS = /* @__PURE__ */ F(((e) => {
var n = !1, r = "", o = wc, s = Tc, c = Ec;
return t != null && (!0 === t.unstable_strictMode && (n = !0), t.identifierPrefix !== void 0 && (r = t.identifierPrefix), t.onUncaughtError !== void 0 && (o = t.onUncaughtError), t.onCaughtError !== void 0 && (s = t.onCaughtError), t.onRecoverableError !== void 0 && (c = t.onRecoverableError)), t = yh(e, 1, !1, null, null, n, r, null, o, s, c, $h), e[xt] = t.current, ep(e), new eg(t);
};
-})), US = (/* @__PURE__ */ F(((e, t) => {
+})), HS = (/* @__PURE__ */ F(((e, t) => {
function n() {
if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function")) try {
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n);
@@ -24240,8 +24240,8 @@ var BS = /* @__PURE__ */ F(((e) => {
console.error(e);
}
}
- n(), t.exports = HS();
-})))(), WS = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+ n(), t.exports = VS();
+})))(), US = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24249,7 +24249,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M11 11V5H13V11H19V13H13V19H11V13H5V11H11Z" })), GS = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M11 11V5H13V11H19V13H13V19H11V13H5V11H11Z" })), WS = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24257,7 +24257,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M13.0001 16.1716L18.3641 10.8076L19.7783 12.2218L12.0001 20L4.22192 12.2218L5.63614 10.8076L11.0001 16.1716V4H13.0001V16.1716Z" })), KS = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M13.0001 16.1716L18.3641 10.8076L19.7783 12.2218L12.0001 20L4.22192 12.2218L5.63614 10.8076L11.0001 16.1716V4H13.0001V16.1716Z" })), GS = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24265,7 +24265,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z" })), qS = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z" })), KS = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24273,7 +24273,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M16.1716 10.9999L10.8076 5.63589L12.2218 4.22168L20 11.9999L12.2218 19.778L10.8076 18.3638L16.1716 12.9999H4V10.9999H16.1716Z" })), JS = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M16.1716 10.9999L10.8076 5.63589L12.2218 4.22168L20 11.9999L12.2218 19.778L10.8076 18.3638L16.1716 12.9999H4V10.9999H16.1716Z" })), qS = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24281,7 +24281,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z" })), YS = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z" })), JS = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24289,7 +24289,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M13.0001 7.82843V20H11.0001V7.82843L5.63614 13.1924L4.22192 11.7782L12.0001 4L19.7783 11.7782L18.3641 13.1924L13.0001 7.82843Z" })), XS = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M13.0001 7.82843V20H11.0001V7.82843L5.63614 13.1924L4.22192 11.7782L12.0001 4L19.7783 11.7782L18.3641 13.1924L13.0001 7.82843Z" })), YS = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24297,7 +24297,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z" })), ZS = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z" })), XS = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24305,7 +24305,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M11.602 13.7599L13.014 15.1719L21.4795 6.7063L22.8938 8.12051L13.014 18.0003L6.65 11.6363L8.06421 10.2221L10.189 12.3469L11.6025 13.7594L11.602 13.7599ZM11.6037 10.9322L16.5563 5.97949L17.9666 7.38977L13.014 12.3424L11.6037 10.9322ZM8.77698 16.5873L7.36396 18.0003L1 11.6363L2.41421 10.2221L3.82723 11.6352L3.82604 11.6363L8.77698 16.5873Z" })), QS = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M11.602 13.7599L13.014 15.1719L21.4795 6.7063L22.8938 8.12051L13.014 18.0003L6.65 11.6363L8.06421 10.2221L10.189 12.3469L11.6025 13.7594L11.602 13.7599ZM11.6037 10.9322L16.5563 5.97949L17.9666 7.38977L13.014 12.3424L11.6037 10.9322ZM8.77698 16.5873L7.36396 18.0003L1 11.6363L2.41421 10.2221L3.82723 11.6352L3.82604 11.6363L8.77698 16.5873Z" })), ZS = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24313,7 +24313,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12ZM12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM17.4571 9.45711L16.0429 8.04289L11 13.0858L8.20711 10.2929L6.79289 11.7071L11 15.9142L17.4571 9.45711Z" })), $S = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12ZM12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM17.4571 9.45711L16.0429 8.04289L11 13.0858L8.20711 10.2929L6.79289 11.7071L11 15.9142L17.4571 9.45711Z" })), QS = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24321,7 +24321,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z" })), eC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z" })), $S = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24329,7 +24329,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM15.5 8.5L13.5 13.5L8.5 15.5L10.5 10.5L15.5 8.5Z" })), tC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM15.5 8.5L13.5 13.5L8.5 15.5L10.5 10.5L15.5 8.5Z" })), eC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24337,7 +24337,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M5 12.5C5 12.8134 5.46101 13.3584 6.53047 13.8931C7.91405 14.5849 9.87677 15 12 15C14.1232 15 16.0859 14.5849 17.4695 13.8931C18.539 13.3584 19 12.8134 19 12.5V10.3287C17.35 11.3482 14.8273 12 12 12C9.17273 12 6.64996 11.3482 5 10.3287V12.5ZM19 15.3287C17.35 16.3482 14.8273 17 12 17C9.17273 17 6.64996 16.3482 5 15.3287V17.5C5 17.8134 5.46101 18.3584 6.53047 18.8931C7.91405 19.5849 9.87677 20 12 20C14.1232 20 16.0859 19.5849 17.4695 18.8931C18.539 18.3584 19 17.8134 19 17.5V15.3287ZM3 17.5V7.5C3 5.01472 7.02944 3 12 3C16.9706 3 21 5.01472 21 7.5V17.5C21 19.9853 16.9706 22 12 22C7.02944 22 3 19.9853 3 17.5ZM12 10C14.1232 10 16.0859 9.58492 17.4695 8.89313C18.539 8.3584 19 7.81342 19 7.5C19 7.18658 18.539 6.6416 17.4695 6.10687C16.0859 5.41508 14.1232 5 12 5C9.87677 5 7.91405 5.41508 6.53047 6.10687C5.46101 6.6416 5 7.18658 5 7.5C5 7.81342 5.46101 8.3584 6.53047 8.89313C7.91405 9.58492 9.87677 10 12 10Z" })), nC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M5 12.5C5 12.8134 5.46101 13.3584 6.53047 13.8931C7.91405 14.5849 9.87677 15 12 15C14.1232 15 16.0859 14.5849 17.4695 13.8931C18.539 13.3584 19 12.8134 19 12.5V10.3287C17.35 11.3482 14.8273 12 12 12C9.17273 12 6.64996 11.3482 5 10.3287V12.5ZM19 15.3287C17.35 16.3482 14.8273 17 12 17C9.17273 17 6.64996 16.3482 5 15.3287V17.5C5 17.8134 5.46101 18.3584 6.53047 18.8931C7.91405 19.5849 9.87677 20 12 20C14.1232 20 16.0859 19.5849 17.4695 18.8931C18.539 18.3584 19 17.8134 19 17.5V15.3287ZM3 17.5V7.5C3 5.01472 7.02944 3 12 3C16.9706 3 21 5.01472 21 7.5V17.5C21 19.9853 16.9706 22 12 22C7.02944 22 3 19.9853 3 17.5ZM12 10C14.1232 10 16.0859 9.58492 17.4695 8.89313C18.539 8.3584 19 7.81342 19 7.5C19 7.18658 18.539 6.6416 17.4695 6.10687C16.0859 5.41508 14.1232 5 12 5C9.87677 5 7.91405 5.41508 6.53047 6.10687C5.46101 6.6416 5 7.18658 5 7.5C5 7.81342 5.46101 8.3584 6.53047 8.89313C7.91405 9.58492 9.87677 10 12 10Z" })), tC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24345,7 +24345,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM9 11H11V17H9V11ZM13 11H15V17H13V11ZM9 4V6H15V4H9Z" })), rC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM9 11H11V17H9V11ZM13 11H15V17H13V11ZM9 4V6H15V4H9Z" })), nC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24353,7 +24353,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 15H13V17H11V15ZM11 7H13V13H11V7Z" })), iC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 15H13V17H11V15ZM11 7H13V13H11V7Z" })), rC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24361,7 +24361,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M10 6V8H5V19H16V14H18V20C18 20.5523 17.5523 21 17 21H4C3.44772 21 3 20.5523 3 20V7C3 6.44772 3.44772 6 4 6H10ZM21 3V11H19L18.9999 6.413L11.2071 14.2071L9.79289 12.7929L17.5849 5H13V3H21Z" })), aC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M10 6V8H5V19H16V14H18V20C18 20.5523 17.5523 21 17 21H4C3.44772 21 3 20.5523 3 20V7C3 6.44772 3.44772 6 4 6H10ZM21 3V11H19L18.9999 6.413L11.2071 14.2071L9.79289 12.7929L17.5849 5H13V3H21Z" })), iC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24369,7 +24369,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3ZM12.0003 19C16.2359 19 19.8603 16.052 20.7777 12C19.8603 7.94803 16.2359 5 12.0003 5C7.7646 5 4.14022 7.94803 3.22278 12C4.14022 16.052 7.7646 19 12.0003 19ZM12.0003 16.5C9.51498 16.5 7.50026 14.4853 7.50026 12C7.50026 9.51472 9.51498 7.5 12.0003 7.5C14.4855 7.5 16.5003 9.51472 16.5003 12C16.5003 14.4853 14.4855 16.5 12.0003 16.5ZM12.0003 14.5C13.381 14.5 14.5003 13.3807 14.5003 12C14.5003 10.6193 13.381 9.5 12.0003 9.5C10.6196 9.5 9.50026 10.6193 9.50026 12C9.50026 13.3807 10.6196 14.5 12.0003 14.5Z" })), oC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3ZM12.0003 19C16.2359 19 19.8603 16.052 20.7777 12C19.8603 7.94803 16.2359 5 12.0003 5C7.7646 5 4.14022 7.94803 3.22278 12C4.14022 16.052 7.7646 19 12.0003 19ZM12.0003 16.5C9.51498 16.5 7.50026 14.4853 7.50026 12C7.50026 9.51472 9.51498 7.5 12.0003 7.5C14.4855 7.5 16.5003 9.51472 16.5003 12C16.5003 14.4853 14.4855 16.5 12.0003 16.5ZM12.0003 14.5C13.381 14.5 14.5003 13.3807 14.5003 12C14.5003 10.6193 13.381 9.5 12.0003 9.5C10.6196 9.5 9.50026 10.6193 9.50026 12C9.50026 13.3807 10.6196 14.5 12.0003 14.5Z" })), aC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24377,7 +24377,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M10 18H14V16H10V18ZM3 6V8H21V6H3ZM6 13H18V11H6V13Z" })), sC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M10 18H14V16H10V18ZM3 6V8H21V6H3ZM6 13H18V11H6V13Z" })), oC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24385,7 +24385,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM9.71002 19.6674C8.74743 17.6259 8.15732 15.3742 8.02731 13H4.06189C4.458 16.1765 6.71639 18.7747 9.71002 19.6674ZM10.0307 13C10.1811 15.4388 10.8778 17.7297 12 19.752C13.1222 17.7297 13.8189 15.4388 13.9693 13H10.0307ZM19.9381 13H15.9727C15.8427 15.3742 15.2526 17.6259 14.29 19.6674C17.2836 18.7747 19.542 16.1765 19.9381 13ZM4.06189 11H8.02731C8.15732 8.62577 8.74743 6.37407 9.71002 4.33256C6.71639 5.22533 4.458 7.8235 4.06189 11ZM10.0307 11H13.9693C13.8189 8.56122 13.1222 6.27025 12 4.24799C10.8778 6.27025 10.1811 8.56122 10.0307 11ZM14.29 4.33256C15.2526 6.37407 15.8427 8.62577 15.9727 11H19.9381C19.542 7.8235 17.2836 5.22533 14.29 4.33256Z" })), cC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM9.71002 19.6674C8.74743 17.6259 8.15732 15.3742 8.02731 13H4.06189C4.458 16.1765 6.71639 18.7747 9.71002 19.6674ZM10.0307 13C10.1811 15.4388 10.8778 17.7297 12 19.752C13.1222 17.7297 13.8189 15.4388 13.9693 13H10.0307ZM19.9381 13H15.9727C15.8427 15.3742 15.2526 17.6259 14.29 19.6674C17.2836 18.7747 19.542 16.1765 19.9381 13ZM4.06189 11H8.02731C8.15732 8.62577 8.74743 6.37407 9.71002 4.33256C6.71639 5.22533 4.458 7.8235 4.06189 11ZM10.0307 11H13.9693C13.8189 8.56122 13.1222 6.27025 12 4.24799C10.8778 6.27025 10.1811 8.56122 10.0307 11ZM14.29 4.33256C15.2526 6.37407 15.8427 8.62577 15.9727 11H19.9381C19.542 7.8235 17.2836 5.22533 14.29 4.33256Z" })), sC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24393,7 +24393,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M5 14H19V4H5V14ZM5 16V20H19V16H5ZM4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2ZM15 17H17V19H15V17Z" })), lC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M5 14H19V4H5V14ZM5 16V20H19V16H5ZM4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2ZM15 17H17V19H15V17Z" })), cC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24401,7 +24401,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12H4C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C9.25022 4 6.82447 5.38734 5.38451 7.50024L8 7.5V9.5H2V3.5H4L3.99989 5.99918C5.82434 3.57075 8.72873 2 12 2ZM13 7L12.9998 11.585L16.2426 14.8284L14.8284 16.2426L10.9998 12.413L11 7H13Z" })), uC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12H4C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C9.25022 4 6.82447 5.38734 5.38451 7.50024L8 7.5V9.5H2V3.5H4L3.99989 5.99918C5.82434 3.57075 8.72873 2 12 2ZM13 7L12.9998 11.585L16.2426 14.8284L14.8284 16.2426L10.9998 12.413L11 7H13Z" })), lC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24409,7 +24409,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M2.9918 21C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918ZM20 15V5H4V19L14 9L20 15ZM20 17.8284L14 11.8284L6.82843 19H20V17.8284ZM8 11C6.89543 11 6 10.1046 6 9C6 7.89543 6.89543 7 8 7C9.10457 7 10 7.89543 10 9C10 10.1046 9.10457 11 8 11Z" })), dC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M2.9918 21C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918ZM20 15V5H4V19L14 9L20 15ZM20 17.8284L14 11.8284L6.82843 19H20V17.8284ZM8 11C6.89543 11 6 10.1046 6 9C6 7.89543 6.89543 7 8 7C9.10457 7 10 7.89543 10 9C10 10.1046 9.10457 11 8 11Z" })), uC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24417,7 +24417,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 11V17H13V11H11ZM11 7V9H13V7H11Z" })), fC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 11V17H13V11H11ZM11 7V9H13V7H11Z" })), dC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24425,7 +24425,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 7H13V9H11V7ZM11 11H13V17H11V11Z" })), pC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 7H13V9H11V7ZM11 11H13V17H11V11Z" })), fC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24433,7 +24433,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M10.7577 11.8281L18.6066 3.97919L20.0208 5.3934L18.6066 6.80761L21.0815 9.28249L19.6673 10.6967L17.1924 8.22183L15.7782 9.63604L17.8995 11.7574L16.4853 13.1716L14.364 11.0503L12.1719 13.2423C13.4581 15.1837 13.246 17.8251 11.5355 19.5355C9.58291 21.4882 6.41709 21.4882 4.46447 19.5355C2.51184 17.5829 2.51184 14.4171 4.46447 12.4645C6.17493 10.754 8.81633 10.5419 10.7577 11.8281ZM10.1213 18.1213C11.2929 16.9497 11.2929 15.0503 10.1213 13.8787C8.94975 12.7071 7.05025 12.7071 5.87868 13.8787C4.70711 15.0503 4.70711 16.9497 5.87868 18.1213C7.05025 19.2929 8.94975 19.2929 10.1213 18.1213Z" })), Hte = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M10.7577 11.8281L18.6066 3.97919L20.0208 5.3934L18.6066 6.80761L21.0815 9.28249L19.6673 10.6967L17.1924 8.22183L15.7782 9.63604L17.8995 11.7574L16.4853 13.1716L14.364 11.0503L12.1719 13.2423C13.4581 15.1837 13.246 17.8251 11.5355 19.5355C9.58291 21.4882 6.41709 21.4882 4.46447 19.5355C2.51184 17.5829 2.51184 14.4171 4.46447 12.4645C6.17493 10.754 8.81633 10.5419 10.7577 11.8281ZM10.1213 18.1213C11.2929 16.9497 11.2929 15.0503 10.1213 13.8787C8.94975 12.7071 7.05025 12.7071 5.87868 13.8787C4.70711 15.0503 4.70711 16.9497 5.87868 18.1213C7.05025 19.2929 8.94975 19.2929 10.1213 18.1213Z" })), Ute = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24441,7 +24441,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M21 3C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H21ZM11 13H4V19H11V13ZM20 13H13V19H20V13ZM11 5H4V11H11V5ZM20 5H13V11H20V5Z" })), Ute = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M21 3C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H21ZM11 13H4V19H11V13ZM20 13H13V19H20V13ZM11 5H4V11H11V5ZM20 5H13V11H20V5Z" })), Wte = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24449,7 +24449,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M16.3944 12.0001L10 7.7371V16.263L16.3944 12.0001ZM19.376 12.4161L8.77735 19.4818C8.54759 19.635 8.23715 19.5729 8.08397 19.3432C8.02922 19.261 8 19.1645 8 19.0658V4.93433C8 4.65818 8.22386 4.43433 8.5 4.43433C8.59871 4.43433 8.69522 4.46355 8.77735 4.5183L19.376 11.584C19.6057 11.7372 19.6678 12.0477 19.5146 12.2774C19.478 12.3323 19.4309 12.3795 19.376 12.4161Z" })), mC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M16.3944 12.0001L10 7.7371V16.263L16.3944 12.0001ZM19.376 12.4161L8.77735 19.4818C8.54759 19.635 8.23715 19.5729 8.08397 19.3432C8.02922 19.261 8 19.1645 8 19.0658V4.93433C8 4.65818 8.22386 4.43433 8.5 4.43433C8.59871 4.43433 8.69522 4.46355 8.77735 4.5183L19.376 11.584C19.6057 11.7372 19.6678 12.0477 19.5146 12.2774C19.478 12.3323 19.4309 12.3795 19.376 12.4161Z" })), pC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24457,7 +24457,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M10.9042 2.10025L20.8037 3.51446L22.2179 13.414L13.0255 22.6063C12.635 22.9969 12.0019 22.9969 11.6113 22.6063L1.71184 12.7069C1.32131 12.3163 1.32131 11.6832 1.71184 11.2926L10.9042 2.10025ZM11.6113 4.22157L3.83316 11.9997L12.3184 20.485L20.0966 12.7069L19.036 5.28223L11.6113 4.22157ZM13.7327 10.5855C12.9516 9.80448 12.9516 8.53815 13.7327 7.7571C14.5137 6.97606 15.78 6.97606 16.5611 7.7571C17.3421 8.53815 17.3421 9.80448 16.5611 10.5855C15.78 11.3666 14.5137 11.3666 13.7327 10.5855Z" })), hC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M10.9042 2.10025L20.8037 3.51446L22.2179 13.414L13.0255 22.6063C12.635 22.9969 12.0019 22.9969 11.6113 22.6063L1.71184 12.7069C1.32131 12.3163 1.32131 11.6832 1.71184 11.2926L10.9042 2.10025ZM11.6113 4.22157L3.83316 11.9997L12.3184 20.485L20.0966 12.7069L19.036 5.28223L11.6113 4.22157ZM13.7327 10.5855C12.9516 9.80448 12.9516 8.53815 13.7327 7.7571C14.5137 6.97606 15.78 6.97606 16.5611 7.7571C17.3421 8.53815 17.3421 9.80448 16.5611 10.5855C15.78 11.3666 14.5137 11.3666 13.7327 10.5855Z" })), mC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24465,7 +24465,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M5.46257 4.43262C7.21556 2.91688 9.5007 2 12 2C17.5228 2 22 6.47715 22 12C22 14.1361 21.3302 16.1158 20.1892 17.7406L17 12H20C20 7.58172 16.4183 4 12 4C9.84982 4 7.89777 4.84827 6.46023 6.22842L5.46257 4.43262ZM18.5374 19.5674C16.7844 21.0831 14.4993 22 12 22C6.47715 22 2 17.5228 2 12C2 9.86386 2.66979 7.88416 3.8108 6.25944L7 12H4C4 16.4183 7.58172 20 12 20C14.1502 20 16.1022 19.1517 17.5398 17.7716L18.5374 19.5674Z" })), gC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M5.46257 4.43262C7.21556 2.91688 9.5007 2 12 2C17.5228 2 22 6.47715 22 12C22 14.1361 21.3302 16.1158 20.1892 17.7406L17 12H20C20 7.58172 16.4183 4 12 4C9.84982 4 7.89777 4.84827 6.46023 6.22842L5.46257 4.43262ZM18.5374 19.5674C16.7844 21.0831 14.4993 22 12 22C6.47715 22 2 17.5228 2 12C2 9.86386 2.66979 7.88416 3.8108 6.25944L7 12H4C4 16.4183 7.58172 20 12 20C14.1502 20 16.1022 19.1517 17.5398 17.7716L18.5374 19.5674Z" })), hC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24473,7 +24473,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M3 17C5.20914 17 7 18.7909 7 21H3V17ZM3 10C9.07513 10 14 14.9249 14 21H12C12 16.0294 7.97056 12 3 12V10ZM3 3C12.9411 3 21 11.0589 21 21H19C19 12.1634 11.8366 5 3 5V3Z" })), _C = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M3 17C5.20914 17 7 18.7909 7 21H3V17ZM3 10C9.07513 10 14 14.9249 14 21H12C12 16.0294 7.97056 12 3 12V10ZM3 3C12.9411 3 21 11.0589 21 21H19C19 12.1634 11.8366 5 3 5V3Z" })), gC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24481,7 +24481,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M18.031 16.6168L22.3137 20.8995L20.8995 22.3137L16.6168 18.031C15.0769 19.263 13.124 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2C15.968 2 20 6.032 20 11C20 13.124 19.263 15.0769 18.031 16.6168ZM16.0247 15.8748C17.2475 14.6146 18 12.8956 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18C12.8956 18 14.6146 17.2475 15.8748 16.0247L16.0247 15.8748Z" })), Wte = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M18.031 16.6168L22.3137 20.8995L20.8995 22.3137L16.6168 18.031C15.0769 19.263 13.124 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2C15.968 2 20 6.032 20 11C20 13.124 19.263 15.0769 18.031 16.6168ZM16.0247 15.8748C17.2475 14.6146 18 12.8956 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18C12.8956 18 14.6146 17.2475 15.8748 16.0247L16.0247 15.8748Z" })), Gte = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24489,7 +24489,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M4 8H20V5H4V8ZM14 19V10H10V19H14ZM16 19H20V10H16V19ZM8 19V10H4V19H8ZM3 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3Z" })), Gte = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M4 8H20V5H4V8ZM14 19V10H10V19H14ZM16 19H20V10H16V19ZM8 19V10H4V19H8ZM3 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3Z" })), Kte = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24497,7 +24497,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M9.40017 16H3C1.89543 16 1 15.1046 1 14V11.8957C1 11.6344 1.05118 11.3757 1.15064 11.1342L4.24501 3.61925C4.3993 3.24455 4.76447 3 5.16969 3H22C22.5523 3 23 3.44772 23 4V14C23 14.5523 22.5523 15 22 15H18.5182C18.1932 15 17.8886 15.1579 17.7012 15.4233L12.2478 23.149C12.1053 23.3508 11.8367 23.4184 11.6157 23.3078L9.80163 22.4008C8.74998 21.875 8.20687 20.6874 8.49694 19.548L9.40017 16ZM17 13.4125V5H5.83939L3 11.8957V14H9.40017C10.7049 14 11.6602 15.229 11.3384 16.4934L10.4351 20.0414C10.3771 20.2693 10.4857 20.5068 10.6961 20.612L11.3572 20.9425L16.0673 14.27C16.3172 13.9159 16.6366 13.6257 17 13.4125ZM19 13H21V5H19V13Z" })), Kte = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M9.40017 16H3C1.89543 16 1 15.1046 1 14V11.8957C1 11.6344 1.05118 11.3757 1.15064 11.1342L4.24501 3.61925C4.3993 3.24455 4.76447 3 5.16969 3H22C22.5523 3 23 3.44772 23 4V14C23 14.5523 22.5523 15 22 15H18.5182C18.1932 15 17.8886 15.1579 17.7012 15.4233L12.2478 23.149C12.1053 23.3508 11.8367 23.4184 11.6157 23.3078L9.80163 22.4008C8.74998 21.875 8.20687 20.6874 8.49694 19.548L9.40017 16ZM17 13.4125V5H5.83939L3 11.8957V14H9.40017C10.7049 14 11.6602 15.229 11.3384 16.4934L10.4351 20.0414C10.3771 20.2693 10.4857 20.5068 10.6961 20.612L11.3572 20.9425L16.0673 14.27C16.3172 13.9159 16.6366 13.6257 17 13.4125ZM19 13H21V5H19V13Z" })), qte = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24505,7 +24505,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M14.5998 8.00033H21C22.1046 8.00033 23 8.89576 23 10.0003V12.1047C23 12.3659 22.9488 12.6246 22.8494 12.8662L19.755 20.3811C19.6007 20.7558 19.2355 21.0003 18.8303 21.0003H2C1.44772 21.0003 1 20.5526 1 20.0003V10.0003C1 9.44804 1.44772 9.00033 2 9.00033H5.48184C5.80677 9.00033 6.11143 8.84246 6.29881 8.57701L11.7522 0.851355C11.8947 0.649486 12.1633 0.581978 12.3843 0.692483L14.1984 1.59951C15.25 2.12534 15.7931 3.31292 15.5031 4.45235L14.5998 8.00033ZM7 10.5878V19.0003H18.1606L21 12.1047V10.0003H14.5998C13.2951 10.0003 12.3398 8.77128 12.6616 7.50691L13.5649 3.95894C13.6229 3.73105 13.5143 3.49353 13.3039 3.38837L12.6428 3.0578L7.93275 9.73038C7.68285 10.0844 7.36341 10.3746 7 10.5878ZM5 11.0003H3V19.0003H5V11.0003Z" })), vC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M14.5998 8.00033H21C22.1046 8.00033 23 8.89576 23 10.0003V12.1047C23 12.3659 22.9488 12.6246 22.8494 12.8662L19.755 20.3811C19.6007 20.7558 19.2355 21.0003 18.8303 21.0003H2C1.44772 21.0003 1 20.5526 1 20.0003V10.0003C1 9.44804 1.44772 9.00033 2 9.00033H5.48184C5.80677 9.00033 6.11143 8.84246 6.29881 8.57701L11.7522 0.851355C11.8947 0.649486 12.1633 0.581978 12.3843 0.692483L14.1984 1.59951C15.25 2.12534 15.7931 3.31292 15.5031 4.45235L14.5998 8.00033ZM7 10.5878V19.0003H18.1606L21 12.1047V10.0003H14.5998C13.2951 10.0003 12.3398 8.77128 12.6616 7.50691L13.5649 3.95894C13.6229 3.73105 13.5143 3.49353 13.3039 3.38837L12.6428 3.0578L7.93275 9.73038C7.68285 10.0844 7.36341 10.3746 7 10.5878ZM5 11.0003H3V19.0003H5V11.0003Z" })), _C = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24513,7 +24513,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M3 19H21V21H3V19ZM13 5.82843V17H11V5.82843L4.92893 11.8995L3.51472 10.4853L12 2L20.4853 10.4853L19.0711 11.8995L13 5.82843Z" })), yC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M3 19H21V21H3V19ZM13 5.82843V17H11V5.82843L4.92893 11.8995L3.51472 10.4853L12 2L20.4853 10.4853L19.0711 11.8995L13 5.82843Z" })), vC = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24521,7 +24521,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M4 22C4 17.5817 7.58172 14 12 14C16.4183 14 20 17.5817 20 22H18C18 18.6863 15.3137 16 12 16C8.68629 16 6 18.6863 6 22H4ZM12 13C8.685 13 6 10.315 6 7C6 3.685 8.685 1 12 1C15.315 1 18 3.685 18 7C18 10.315 15.315 13 12 13ZM12 11C14.21 11 16 9.21 16 7C16 4.79 14.21 3 12 3C9.79 3 8 4.79 8 7C8 9.21 9.79 11 12 11Z" })), qte = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M4 22C4 17.5817 7.58172 14 12 14C16.4183 14 20 17.5817 20 22H18C18 18.6863 15.3137 16 12 16C8.68629 16 6 18.6863 6 22H4ZM12 13C8.685 13 6 10.315 6 7C6 3.685 8.685 1 12 1C15.315 1 18 3.685 18 7C18 10.315 15.315 13 12 13ZM12 11C14.21 11 16 9.21 16 7C16 4.79 14.21 3 12 3C9.79 3 8 4.79 8 7C8 9.21 9.79 11 12 11Z" })), Jte = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24529,7 +24529,7 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M3 3.9934C3 3.44476 3.44495 3 3.9934 3H20.0066C20.5552 3 21 3.44495 21 3.9934V20.0066C21 20.5552 20.5551 21 20.0066 21H3.9934C3.44476 21 3 20.5551 3 20.0066V3.9934ZM5 5V19H19V5H5ZM10.6219 8.41459L15.5008 11.6672C15.6846 11.7897 15.7343 12.0381 15.6117 12.2219C15.5824 12.2658 15.5447 12.3035 15.5008 12.3328L10.6219 15.5854C10.4381 15.708 10.1897 15.6583 10.0672 15.4745C10.0234 15.4088 10 15.3316 10 15.2526V8.74741C10 8.52649 10.1791 8.34741 10.4 8.34741C10.479 8.34741 10.5562 8.37078 10.6219 8.41459Z" })), Jte = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
+}, I.createElement("path", { d: "M3 3.9934C3 3.44476 3.44495 3 3.9934 3H20.0066C20.5552 3 21 3.44495 21 3.9934V20.0066C21 20.5552 20.5551 21 20.0066 21H3.9934C3.44476 21 3 20.5551 3 20.0066V3.9934ZM5 5V19H19V5H5ZM10.6219 8.41459L15.5008 11.6672C15.6846 11.7897 15.7343 12.0381 15.6117 12.2219C15.5824 12.2658 15.5447 12.3035 15.5008 12.3328L10.6219 15.5854C10.4381 15.708 10.1897 15.6583 10.0672 15.4745C10.0234 15.4088 10 15.3316 10 15.2526V8.74741C10 8.52649 10.1791 8.34741 10.4 8.34741C10.479 8.34741 10.5562 8.37078 10.6219 8.41459Z" })), Yte = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => I.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -24537,100 +24537,100 @@ var BS = /* @__PURE__ */ F(((e) => {
fill: e,
...r,
className: "remixicon " + (n || "")
-}, I.createElement("path", { d: "M14 4.4375C15.3462 4.4375 16.4375 3.34619 16.4375 2H17.5625C17.5625 3.34619 18.6538 4.4375 20 4.4375V5.5625C18.6538 5.5625 17.5625 6.65381 17.5625 8H16.4375C16.4375 6.65381 15.3462 5.5625 14 5.5625V4.4375ZM1 11C4.31371 11 7 8.31371 7 5H9C9 8.31371 11.6863 11 15 11V13C11.6863 13 9 15.6863 9 19H7C7 15.6863 4.31371 13 1 13V11ZM4.87601 12C6.18717 12.7276 7.27243 13.8128 8 15.124 8.72757 13.8128 9.81283 12.7276 11.124 12 9.81283 11.2724 8.72757 10.1872 8 8.87601 7.27243 10.1872 6.18717 11.2724 4.87601 12ZM17.25 14C17.25 15.7949 15.7949 17.25 14 17.25V18.75C15.7949 18.75 17.25 20.2051 17.25 22H18.75C18.75 20.2051 20.2051 18.75 22 18.75V17.25C20.2051 17.25 18.75 15.7949 18.75 14H17.25Z" })), Yte = (e, t) => {
+}, I.createElement("path", { d: "M14 4.4375C15.3462 4.4375 16.4375 3.34619 16.4375 2H17.5625C17.5625 3.34619 18.6538 4.4375 20 4.4375V5.5625C18.6538 5.5625 17.5625 6.65381 17.5625 8H16.4375C16.4375 6.65381 15.3462 5.5625 14 5.5625V4.4375ZM1 11C4.31371 11 7 8.31371 7 5H9C9 8.31371 11.6863 11 15 11V13C11.6863 13 9 15.6863 9 19H7C7 15.6863 4.31371 13 1 13V11ZM4.87601 12C6.18717 12.7276 7.27243 13.8128 8 15.124 8.72757 13.8128 9.81283 12.7276 11.124 12 9.81283 11.2724 8.72757 10.1872 8 8.87601 7.27243 10.1872 6.18717 11.2724 4.87601 12ZM17.25 14C17.25 15.7949 15.7949 17.25 14 17.25V18.75C15.7949 18.75 17.25 20.2051 17.25 22H18.75C18.75 20.2051 20.2051 18.75 22 18.75V17.25C20.2051 17.25 18.75 15.7949 18.75 14H17.25Z" })), Xte = (e, t) => {
let n = Array(e.length + t.length);
for (let t = 0; t < e.length; t++) n[t] = e[t];
for (let r = 0; r < t.length; r++) n[e.length + r] = t[r];
return n;
-}, Xte = (e, t) => ({
+}, Zte = (e, t) => ({
classGroupId: e,
validator: t
-}), bC = (e = /* @__PURE__ */ new Map(), t = null, n) => ({
+}), yC = (e = /* @__PURE__ */ new Map(), t = null, n) => ({
nextPart: e,
validators: t,
classGroupId: n
-}), xC = "-", SC = [], Zte = "arbitrary..", Qte = (e) => {
- let t = ene(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: r } = e;
+}), bC = "-", xC = [], Qte = "arbitrary..", $te = (e) => {
+ let t = tne(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: r } = e;
return {
getClassGroupId: (e) => {
- if (e.startsWith("[") && e.endsWith("]")) return $te(e);
- let n = e.split(xC);
- return CC(n, +(n[0] === "" && n.length > 1), t);
+ if (e.startsWith("[") && e.endsWith("]")) return ene(e);
+ let n = e.split(bC);
+ return SC(n, +(n[0] === "" && n.length > 1), t);
},
getConflictingClassGroupIds: (e, t) => {
if (t) {
let t = r[e], i = n[e];
- return t ? i ? Yte(i, t) : t : i || SC;
+ return t ? i ? Xte(i, t) : t : i || xC;
}
- return n[e] || SC;
+ return n[e] || xC;
}
};
-}, CC = (e, t, n) => {
+}, SC = (e, t, n) => {
if (e.length - t === 0) return n.classGroupId;
let r = e[t], i = n.nextPart.get(r);
if (i) {
- let n = CC(e, t + 1, i);
+ let n = SC(e, t + 1, i);
if (n) return n;
}
let a = n.validators;
if (a === null) return;
- let o = t === 0 ? e.join(xC) : e.slice(t).join(xC), s = a.length;
+ let o = t === 0 ? e.join(bC) : e.slice(t).join(bC), s = a.length;
for (let e = 0; e < s; e++) {
let t = a[e];
if (t.validator(o)) return t.classGroupId;
}
-}, $te = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
+}, ene = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
let t = e.slice(1, -1), n = t.indexOf(":"), r = t.slice(0, n);
- return r ? Zte + r : void 0;
-})(), ene = (e) => {
+ return r ? Qte + r : void 0;
+})(), tne = (e) => {
let { theme: t, classGroups: n } = e;
- return tne(n, t);
-}, tne = (e, t) => {
- let n = bC();
+ return nne(n, t);
+}, nne = (e, t) => {
+ let n = yC();
for (let r in e) {
let i = e[r];
- wC(i, n, r, t);
+ CC(i, n, r, t);
}
return n;
-}, wC = (e, t, n, r) => {
+}, CC = (e, t, n, r) => {
let i = e.length;
for (let a = 0; a < i; a++) {
let i = e[a];
- nne(i, t, n, r);
+ rne(i, t, n, r);
}
-}, nne = (e, t, n, r) => {
+}, rne = (e, t, n, r) => {
if (typeof e == "string") {
- rne(e, t, n);
+ ine(e, t, n);
return;
}
if (typeof e == "function") {
- ine(e, t, n, r);
+ ane(e, t, n, r);
return;
}
- ane(e, t, n, r);
-}, rne = (e, t, n) => {
- let r = e === "" ? t : TC(t, e);
+ one(e, t, n, r);
+}, ine = (e, t, n) => {
+ let r = e === "" ? t : wC(t, e);
r.classGroupId = n;
-}, ine = (e, t, n, r) => {
- if (one(e)) {
- wC(e(r), t, n, r);
+}, ane = (e, t, n, r) => {
+ if (sne(e)) {
+ CC(e(r), t, n, r);
return;
}
- t.validators === null && (t.validators = []), t.validators.push(Xte(n, e));
-}, ane = (e, t, n, r) => {
+ t.validators === null && (t.validators = []), t.validators.push(Zte(n, e));
+}, one = (e, t, n, r) => {
let i = Object.entries(e), a = i.length;
for (let e = 0; e < a; e++) {
let [a, o] = i[e];
- wC(o, TC(t, a), n, r);
+ CC(o, wC(t, a), n, r);
}
-}, TC = (e, t) => {
- let n = e, r = t.split(xC), i = r.length;
+}, wC = (e, t) => {
+ let n = e, r = t.split(bC), i = r.length;
for (let e = 0; e < i; e++) {
let t = r[e], i = n.nextPart.get(t);
- i || (i = bC(), n.nextPart.set(t, i)), n = i;
+ i || (i = yC(), n.nextPart.set(t, i)), n = i;
}
return n;
-}, one = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, sne = (e) => {
+}, sne = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, cne = (e) => {
if (e < 1) return {
get: () => void 0,
set: () => {}
@@ -24648,19 +24648,19 @@ var BS = /* @__PURE__ */ F(((e) => {
e in n ? n[e] = t : i(e, t);
}
};
-}, EC = "!", DC = ":", cne = [], OC = (e, t, n, r, i) => ({
+}, TC = "!", EC = ":", lne = [], DC = (e, t, n, r, i) => ({
modifiers: e,
hasImportantModifier: t,
baseClassName: n,
maybePostfixModifierPosition: r,
isExternal: i
-}), lne = (e) => {
+}), une = (e) => {
let { prefix: t, experimentalParseClassName: n } = e, r = (e) => {
let t = [], n = 0, r = 0, i = 0, a, o = e.length;
for (let s = 0; s < o; s++) {
let o = e[s];
if (n === 0 && r === 0) {
- if (o === DC) {
+ if (o === EC) {
t.push(e.slice(i, s)), i = s + 1;
continue;
}
@@ -24672,13 +24672,13 @@ var BS = /* @__PURE__ */ F(((e) => {
o === "[" ? n++ : o === "]" ? n-- : o === "(" ? r++ : o === ")" && r--;
}
let s = t.length === 0 ? e : e.slice(i), c = s, l = !1;
- s.endsWith(EC) ? (c = s.slice(0, -1), l = !0) : s.startsWith(EC) && (c = s.slice(1), l = !0);
+ s.endsWith(TC) ? (c = s.slice(0, -1), l = !0) : s.startsWith(TC) && (c = s.slice(1), l = !0);
let u = a && a > i ? a - i : void 0;
- return OC(t, l, c, u);
+ return DC(t, l, c, u);
};
if (t) {
- let e = t + DC, n = r;
- r = (t) => t.startsWith(e) ? n(t.slice(e.length)) : OC(cne, !1, t, void 0, !0);
+ let e = t + EC, n = r;
+ r = (t) => t.startsWith(e) ? n(t.slice(e.length)) : DC(lne, !1, t, void 0, !0);
}
if (n) {
let e = r;
@@ -24688,7 +24688,7 @@ var BS = /* @__PURE__ */ F(((e) => {
});
}
return r;
-}, une = (e) => {
+}, dne = (e) => {
let t = /* @__PURE__ */ new Map();
return e.orderSensitiveModifiers.forEach((e, n) => {
t.set(e, 1e6 + n);
@@ -24700,18 +24700,18 @@ var BS = /* @__PURE__ */ F(((e) => {
}
return r.length > 0 && (r.sort(), n.push(...r)), n;
};
-}, dne = (e) => ({
- cache: sne(e.cacheSize),
- parseClassName: lne(e),
- sortModifiers: une(e),
- postfixLookupClassGroupIds: fne(e),
- ...Qte(e)
-}), fne = (e) => {
+}, fne = (e) => ({
+ cache: cne(e.cacheSize),
+ parseClassName: une(e),
+ sortModifiers: dne(e),
+ postfixLookupClassGroupIds: pne(e),
+ ...$te(e)
+}), pne = (e) => {
let t = Object.create(null), n = e.postfixLookupClassGroups;
if (n) for (let e = 0; e < n.length; e++) t[n[e]] = !0;
return t;
-}, pne = /\s+/, mne = (e, t) => {
- let { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: i, sortModifiers: a, postfixLookupClassGroupIds: o } = t, s = [], c = e.trim().split(pne), l = "";
+}, mne = /\s+/, hne = (e, t) => {
+ let { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: i, sortModifiers: a, postfixLookupClassGroupIds: o } = t, s = [], c = e.trim().split(mne), l = "";
for (let e = c.length - 1; e >= 0; --e) {
let t = c[e], { isExternal: u, modifiers: d, hasImportantModifier: f, baseClassName: p, maybePostfixModifierPosition: m } = n(t);
if (u) {
@@ -24735,7 +24735,7 @@ var BS = /* @__PURE__ */ F(((e) => {
}
h = !1;
}
- let _ = d.length === 0 ? "" : d.length === 1 ? d[0] : a(d).join(":"), v = f ? _ + EC : _, y = v + g;
+ let _ = d.length === 0 ? "" : d.length === 1 ? d[0] : a(d).join(":"), v = f ? _ + TC : _, y = v + g;
if (s.indexOf(y) > -1) continue;
s.push(y);
let b = i(g, h);
@@ -24746,34 +24746,34 @@ var BS = /* @__PURE__ */ F(((e) => {
l = t + (l.length > 0 ? " " + l : l);
}
return l;
-}, hne = (...e) => {
+}, gne = (...e) => {
let t = 0, n, r, i = "";
- for (; t < e.length;) (n = e[t++]) && (r = kC(n)) && (i && (i += " "), i += r);
+ for (; t < e.length;) (n = e[t++]) && (r = OC(n)) && (i && (i += " "), i += r);
return i;
-}, kC = (e) => {
+}, OC = (e) => {
if (typeof e == "string") return e;
let t, n = "";
- for (let r = 0; r < e.length; r++) e[r] && (t = kC(e[r])) && (n && (n += " "), n += t);
+ for (let r = 0; r < e.length; r++) e[r] && (t = OC(e[r])) && (n && (n += " "), n += t);
return n;
-}, AC = (e, ...t) => {
- let n, r, i, a, o = (o) => (n = dne(t.reduce((e, t) => t(e), e())), r = n.cache.get, i = n.cache.set, a = s, s(o)), s = (e) => {
+}, kC = (e, ...t) => {
+ let n, r, i, a, o = (o) => (n = fne(t.reduce((e, t) => t(e), e())), r = n.cache.get, i = n.cache.set, a = s, s(o)), s = (e) => {
let t = r(e);
if (t) return t;
- let a = mne(e, n);
+ let a = hne(e, n);
return i(e, a), a;
};
- return a = o, (...e) => a(hne(...e));
-}, gne = [], jC = (e) => {
- let t = (t) => t[e] || gne;
+ return a = o, (...e) => a(gne(...e));
+}, _ne = [], AC = (e) => {
+ let t = (t) => t[e] || _ne;
return t.isThemeGetter = !0, t.themeKey = e, t;
-}, MC = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, NC = /^\((?:(\w[\w-]*):)?(.+)\)$/i, _ne = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, vne = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, yne = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, bne = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/, xne = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Sne = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, PC = (e) => _ne.test(e), FC = (e) => !!e && !Number.isNaN(Number(e)), IC = (e) => !!e && Number.isInteger(Number(e)), LC = (e) => e.endsWith("%") && FC(e.slice(0, -1)), RC = (e) => vne.test(e), zC = () => !0, Cne = (e) => yne.test(e) && !bne.test(e), BC = () => !1, wne = (e) => xne.test(e), Tne = (e) => Sne.test(e), Ene = (e) => !U(e) && !W(e), Dne = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), One = (e) => JC(e, QC, BC), U = (e) => MC.test(e), VC = (e) => JC(e, $C, Cne), HC = (e) => JC(e, Ine, FC), kne = (e) => JC(e, tw, zC), Ane = (e) => JC(e, ew, BC), UC = (e) => JC(e, XC, BC), jne = (e) => JC(e, ZC, Tne), WC = (e) => JC(e, nw, wne), W = (e) => NC.test(e), GC = (e) => YC(e, $C), Mne = (e) => YC(e, ew), KC = (e) => YC(e, XC), Nne = (e) => YC(e, QC), Pne = (e) => YC(e, ZC), qC = (e) => YC(e, nw, !0), Fne = (e) => YC(e, tw, !0), JC = (e, t, n) => {
- let r = MC.exec(e);
+}, jC = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, MC = /^\((?:(\w[\w-]*):)?(.+)\)$/i, vne = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, yne = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, bne = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, xne = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/, Sne = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Cne = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, NC = (e) => vne.test(e), PC = (e) => !!e && !Number.isNaN(Number(e)), FC = (e) => !!e && Number.isInteger(Number(e)), IC = (e) => e.endsWith("%") && PC(e.slice(0, -1)), LC = (e) => yne.test(e), RC = () => !0, wne = (e) => bne.test(e) && !xne.test(e), zC = () => !1, Tne = (e) => Sne.test(e), Ene = (e) => Cne.test(e), Dne = (e) => !U(e) && !W(e), One = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), kne = (e) => qC(e, ZC, zC), U = (e) => jC.test(e), BC = (e) => qC(e, QC, wne), VC = (e) => qC(e, Lne, PC), Ane = (e) => qC(e, ew, RC), jne = (e) => qC(e, $C, zC), HC = (e) => qC(e, YC, zC), Mne = (e) => qC(e, XC, Ene), UC = (e) => qC(e, tw, Tne), W = (e) => MC.test(e), WC = (e) => JC(e, QC), Nne = (e) => JC(e, $C), GC = (e) => JC(e, YC), Pne = (e) => JC(e, ZC), Fne = (e) => JC(e, XC), KC = (e) => JC(e, tw, !0), Ine = (e) => JC(e, ew, !0), qC = (e, t, n) => {
+ let r = jC.exec(e);
return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
-}, YC = (e, t, n = !1) => {
- let r = NC.exec(e);
+}, JC = (e, t, n = !1) => {
+ let r = MC.exec(e);
return r ? r[1] ? t(r[1]) : n : !1;
-}, XC = (e) => e === "position" || e === "percentage", ZC = (e) => e === "image" || e === "url", QC = (e) => e === "length" || e === "size" || e === "bg-size", $C = (e) => e === "length", Ine = (e) => e === "number", ew = (e) => e === "family-name", tw = (e) => e === "number" || e === "weight", nw = (e) => e === "shadow", rw = () => {
- let e = jC("color"), t = jC("font"), n = jC("text"), r = jC("font-weight"), i = jC("tracking"), a = jC("leading"), o = jC("breakpoint"), s = jC("container"), c = jC("spacing"), l = jC("radius"), u = jC("shadow"), d = jC("inset-shadow"), f = jC("text-shadow"), p = jC("drop-shadow"), m = jC("blur"), h = jC("perspective"), g = jC("aspect"), _ = jC("ease"), v = jC("animate"), y = () => [
+}, YC = (e) => e === "position" || e === "percentage", XC = (e) => e === "image" || e === "url", ZC = (e) => e === "length" || e === "size" || e === "bg-size", QC = (e) => e === "length", Lne = (e) => e === "number", $C = (e) => e === "family-name", ew = (e) => e === "number" || e === "weight", tw = (e) => e === "shadow", nw = () => {
+ let e = AC("color"), t = AC("font"), n = AC("text"), r = AC("font-weight"), i = AC("tracking"), a = AC("leading"), o = AC("breakpoint"), s = AC("container"), c = AC("spacing"), l = AC("radius"), u = AC("shadow"), d = AC("inset-shadow"), f = AC("text-shadow"), p = AC("drop-shadow"), m = AC("blur"), h = AC("perspective"), g = AC("aspect"), _ = AC("ease"), v = AC("animate"), y = () => [
"auto",
"avoid",
"all",
@@ -24815,12 +24815,12 @@ var BS = /* @__PURE__ */ F(((e) => {
U,
c
], T = () => [
- PC,
+ NC,
"full",
"auto",
...w()
], E = () => [
- IC,
+ FC,
"none",
"subgrid",
W,
@@ -24829,15 +24829,15 @@ var BS = /* @__PURE__ */ F(((e) => {
"auto",
{ span: [
"full",
- IC,
+ FC,
W,
U
] },
- IC,
+ FC,
W,
U
], O = () => [
- IC,
+ FC,
"auto",
W,
U
@@ -24867,7 +24867,7 @@ var BS = /* @__PURE__ */ F(((e) => {
"center-safe",
"end-safe"
], M = () => ["auto", ...w()], N = () => [
- PC,
+ NC,
"auto",
"full",
"dvw",
@@ -24882,7 +24882,7 @@ var BS = /* @__PURE__ */ F(((e) => {
...w()
], ee = () => [
s,
- PC,
+ NC,
"screen",
"full",
"dvw",
@@ -24893,7 +24893,7 @@ var BS = /* @__PURE__ */ F(((e) => {
"fit",
...w()
], te = () => [
- PC,
+ NC,
"screen",
"full",
"lh",
@@ -24910,8 +24910,8 @@ var BS = /* @__PURE__ */ F(((e) => {
U
], ne = () => [
...b(),
- KC,
- UC,
+ GC,
+ HC,
{ position: [W, U] }
], F = () => ["no-repeat", { repeat: [
"",
@@ -24923,13 +24923,13 @@ var BS = /* @__PURE__ */ F(((e) => {
"auto",
"cover",
"contain",
- Nne,
- One,
+ Pne,
+ kne,
{ size: [W, U] }
], ie = () => [
- LC,
- GC,
- VC
+ IC,
+ WC,
+ BC
], ae = () => [
"",
"none",
@@ -24939,9 +24939,9 @@ var BS = /* @__PURE__ */ F(((e) => {
U
], oe = () => [
"",
- FC,
- GC,
- VC
+ PC,
+ WC,
+ BC
], se = () => [
"solid",
"dashed",
@@ -24965,10 +24965,10 @@ var BS = /* @__PURE__ */ F(((e) => {
"color",
"luminosity"
], le = () => [
- FC,
- LC,
- KC,
- UC
+ PC,
+ IC,
+ GC,
+ HC
], ue = () => [
"",
"none",
@@ -24977,20 +24977,20 @@ var BS = /* @__PURE__ */ F(((e) => {
U
], I = () => [
"none",
- FC,
+ PC,
W,
U
], L = () => [
"none",
- FC,
+ PC,
W,
U
], R = () => [
- FC,
+ PC,
W,
U
], z = () => [
- PC,
+ NC,
"full",
...w()
];
@@ -25004,17 +25004,17 @@ var BS = /* @__PURE__ */ F(((e) => {
"bounce"
],
aspect: ["video"],
- blur: [RC],
- breakpoint: [RC],
- color: [zC],
- container: [RC],
- "drop-shadow": [RC],
+ blur: [LC],
+ breakpoint: [LC],
+ color: [RC],
+ container: [LC],
+ "drop-shadow": [LC],
ease: [
"in",
"out",
"in-out"
],
- font: [Ene],
+ font: [Dne],
"font-weight": [
"thin",
"extralight",
@@ -25026,7 +25026,7 @@ var BS = /* @__PURE__ */ F(((e) => {
"extrabold",
"black"
],
- "inset-shadow": [RC],
+ "inset-shadow": [LC],
leading: [
"none",
"tight",
@@ -25043,11 +25043,11 @@ var BS = /* @__PURE__ */ F(((e) => {
"distant",
"none"
],
- radius: [RC],
- shadow: [RC],
- spacing: ["px", FC],
- text: [RC],
- "text-shadow": [RC],
+ radius: [LC],
+ shadow: [LC],
+ spacing: ["px", PC],
+ text: [LC],
+ "text-shadow": [LC],
tracking: [
"tighter",
"tight",
@@ -25061,7 +25061,7 @@ var BS = /* @__PURE__ */ F(((e) => {
aspect: [{ aspect: [
"auto",
"square",
- PC,
+ NC,
U,
W,
g
@@ -25074,9 +25074,9 @@ var BS = /* @__PURE__ */ F(((e) => {
W,
U
] }],
- "container-named": [Dne],
+ "container-named": [One],
columns: [{ columns: [
- FC,
+ PC,
"auto",
U,
W,
@@ -25176,13 +25176,13 @@ var BS = /* @__PURE__ */ F(((e) => {
"collapse"
],
z: [{ z: [
- IC,
+ FC,
"auto",
W,
U
] }],
basis: [{ basis: [
- PC,
+ NC,
"full",
"auto",
s,
@@ -25200,8 +25200,8 @@ var BS = /* @__PURE__ */ F(((e) => {
"wrap-reverse"
] }],
flex: [{ flex: [
- FC,
PC,
+ NC,
"auto",
"initial",
"none",
@@ -25209,18 +25209,18 @@ var BS = /* @__PURE__ */ F(((e) => {
] }],
grow: [{ grow: [
"",
- FC,
+ PC,
W,
U
] }],
shrink: [{ shrink: [
"",
- FC,
+ PC,
W,
U
] }],
order: [{ order: [
- IC,
+ FC,
"first",
"last",
"none",
@@ -25332,15 +25332,15 @@ var BS = /* @__PURE__ */ F(((e) => {
"font-size": [{ text: [
"base",
n,
- GC,
- VC
+ WC,
+ BC
] }],
"font-smoothing": ["antialiased", "subpixel-antialiased"],
"font-style": ["italic", "not-italic"],
"font-weight": [{ font: [
r,
- Fne,
- kne
+ Ine,
+ Ane
] }],
"font-stretch": [{ "font-stretch": [
"ultra-condensed",
@@ -25352,12 +25352,12 @@ var BS = /* @__PURE__ */ F(((e) => {
"expanded",
"extra-expanded",
"ultra-expanded",
- LC,
+ IC,
U
] }],
"font-family": [{ font: [
- Mne,
- Ane,
+ Nne,
+ jne,
t
] }],
"font-features": [{ "font-features": [U] }],
@@ -25373,10 +25373,10 @@ var BS = /* @__PURE__ */ F(((e) => {
U
] }],
"line-clamp": [{ "line-clamp": [
- FC,
+ PC,
"none",
W,
- HC
+ VC
] }],
leading: [{ leading: [
"none",
@@ -25414,15 +25414,15 @@ var BS = /* @__PURE__ */ F(((e) => {
],
"text-decoration-style": [{ decoration: [...se(), "wavy"] }],
"text-decoration-thickness": [{ decoration: [
- FC,
+ PC,
"from-font",
"auto",
W,
- VC
+ BC
] }],
"text-decoration-color": [{ decoration: P() }],
"underline-offset": [{ "underline-offset": [
- FC,
+ PC,
"auto",
W,
U
@@ -25446,7 +25446,7 @@ var BS = /* @__PURE__ */ F(((e) => {
] }],
indent: [{ indent: w() }],
"tab-size": [{ tab: [
- IC,
+ FC,
W,
U
] }],
@@ -25524,7 +25524,7 @@ var BS = /* @__PURE__ */ F(((e) => {
"l",
"tl"
] },
- IC,
+ FC,
W,
U
],
@@ -25535,13 +25535,13 @@ var BS = /* @__PURE__ */ F(((e) => {
],
conic: [
"",
- IC,
+ FC,
W,
U
]
},
- Pne,
- jne
+ Fne,
+ Mne
] }],
"bg-color": [{ bg: P() }],
"gradient-from-pos": [{ from: ie() }],
@@ -25608,15 +25608,15 @@ var BS = /* @__PURE__ */ F(((e) => {
"hidden"
] }],
"outline-offset": [{ "outline-offset": [
- FC,
+ PC,
W,
U
] }],
"outline-w": [{ outline: [
"",
- FC,
- GC,
- VC
+ PC,
+ WC,
+ BC
] }],
"outline-color": [{ outline: P() }],
shadow: [{ shadow: [
@@ -25624,33 +25624,33 @@ var BS = /* @__PURE__ */ F(((e) => {
"inner",
"none",
u,
- qC,
- WC
+ KC,
+ UC
] }],
"shadow-color": [{ shadow: P() }],
"inset-shadow": [{ "inset-shadow": [
"none",
d,
- qC,
- WC
+ KC,
+ UC
] }],
"inset-shadow-color": [{ "inset-shadow": P() }],
"ring-w": [{ ring: oe() }],
"ring-w-inset": ["ring-inset"],
"ring-color": [{ ring: P() }],
- "ring-offset-w": [{ "ring-offset": [FC, VC] }],
+ "ring-offset-w": [{ "ring-offset": [PC, BC] }],
"ring-offset-color": [{ "ring-offset": P() }],
"inset-ring-w": [{ "inset-ring": oe() }],
"inset-ring-color": [{ "inset-ring": P() }],
"text-shadow": [{ "text-shadow": [
"none",
f,
- qC,
- WC
+ KC,
+ UC
] }],
"text-shadow-color": [{ "text-shadow": P() }],
opacity: [{ opacity: [
- FC,
+ PC,
W,
U
] }],
@@ -25674,7 +25674,7 @@ var BS = /* @__PURE__ */ F(((e) => {
"intersect",
"exclude"
] }],
- "mask-image-linear-pos": [{ "mask-linear": [FC] }],
+ "mask-image-linear-pos": [{ "mask-linear": [PC] }],
"mask-image-linear-from-pos": [{ "mask-linear-from": le() }],
"mask-image-linear-to-pos": [{ "mask-linear-to": le() }],
"mask-image-linear-from-color": [{ "mask-linear-from": P() }],
@@ -25714,7 +25714,7 @@ var BS = /* @__PURE__ */ F(((e) => {
farthest: ["side", "corner"]
}] }],
"mask-image-radial-pos": [{ "mask-radial-at": b() }],
- "mask-image-conic-pos": [{ "mask-conic": [FC] }],
+ "mask-image-conic-pos": [{ "mask-conic": [PC] }],
"mask-image-conic-from-pos": [{ "mask-conic-from": le() }],
"mask-image-conic-to-pos": [{ "mask-conic-to": le() }],
"mask-image-conic-from-color": [{ "mask-conic-from": P() }],
@@ -25749,12 +25749,12 @@ var BS = /* @__PURE__ */ F(((e) => {
] }],
blur: [{ blur: ue() }],
brightness: [{ brightness: [
- FC,
+ PC,
W,
U
] }],
contrast: [{ contrast: [
- FC,
+ PC,
W,
U
] }],
@@ -25762,35 +25762,35 @@ var BS = /* @__PURE__ */ F(((e) => {
"",
"none",
p,
- qC,
- WC
+ KC,
+ UC
] }],
"drop-shadow-color": [{ "drop-shadow": P() }],
grayscale: [{ grayscale: [
"",
- FC,
+ PC,
W,
U
] }],
"hue-rotate": [{ "hue-rotate": [
- FC,
+ PC,
W,
U
] }],
invert: [{ invert: [
"",
- FC,
+ PC,
W,
U
] }],
saturate: [{ saturate: [
- FC,
+ PC,
W,
U
] }],
sepia: [{ sepia: [
"",
- FC,
+ PC,
W,
U
] }],
@@ -25802,45 +25802,45 @@ var BS = /* @__PURE__ */ F(((e) => {
] }],
"backdrop-blur": [{ "backdrop-blur": ue() }],
"backdrop-brightness": [{ "backdrop-brightness": [
- FC,
+ PC,
W,
U
] }],
"backdrop-contrast": [{ "backdrop-contrast": [
- FC,
+ PC,
W,
U
] }],
"backdrop-grayscale": [{ "backdrop-grayscale": [
"",
- FC,
+ PC,
W,
U
] }],
"backdrop-hue-rotate": [{ "backdrop-hue-rotate": [
- FC,
+ PC,
W,
U
] }],
"backdrop-invert": [{ "backdrop-invert": [
"",
- FC,
+ PC,
W,
U
] }],
"backdrop-opacity": [{ "backdrop-opacity": [
- FC,
+ PC,
W,
U
] }],
"backdrop-saturate": [{ "backdrop-saturate": [
- FC,
+ PC,
W,
U
] }],
"backdrop-sepia": [{ "backdrop-sepia": [
"",
- FC,
+ PC,
W,
U
] }],
@@ -25863,7 +25863,7 @@ var BS = /* @__PURE__ */ F(((e) => {
] }],
"transition-behavior": [{ transition: ["normal", "discrete"] }],
duration: [{ duration: [
- FC,
+ PC,
"initial",
W,
U
@@ -25876,7 +25876,7 @@ var BS = /* @__PURE__ */ F(((e) => {
U
] }],
delay: [{ delay: [
- FC,
+ PC,
W,
U
] }],
@@ -25921,7 +25921,7 @@ var BS = /* @__PURE__ */ F(((e) => {
"translate-z": [{ "translate-z": z() }],
"translate-none": ["translate-none"],
zoom: [{ zoom: [
- IC,
+ FC,
W,
U
] }],
@@ -26065,10 +26065,10 @@ var BS = /* @__PURE__ */ F(((e) => {
] }],
fill: [{ fill: ["none", ...P()] }],
"stroke-w": [{ stroke: [
- FC,
- GC,
- VC,
- HC
+ PC,
+ WC,
+ BC,
+ VC
] }],
stroke: [{ stroke: ["none", ...P()] }],
"forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
@@ -26326,16 +26326,16 @@ var BS = /* @__PURE__ */ F(((e) => {
"selection"
]
};
-}, Lne = (e, { cacheSize: t, prefix: n, experimentalParseClassName: r, extend: i = {}, override: a = {} }) => (iw(e, "cacheSize", t), iw(e, "prefix", n), iw(e, "experimentalParseClassName", r), aw(e.theme, a.theme), aw(e.classGroups, a.classGroups), aw(e.conflictingClassGroups, a.conflictingClassGroups), aw(e.conflictingClassGroupModifiers, a.conflictingClassGroupModifiers), iw(e, "postfixLookupClassGroups", a.postfixLookupClassGroups), iw(e, "orderSensitiveModifiers", a.orderSensitiveModifiers), ow(e.theme, i.theme), ow(e.classGroups, i.classGroups), ow(e.conflictingClassGroups, i.conflictingClassGroups), ow(e.conflictingClassGroupModifiers, i.conflictingClassGroupModifiers), sw(e, i, "postfixLookupClassGroups"), sw(e, i, "orderSensitiveModifiers"), e), iw = (e, t, n) => {
+}, Rne = (e, { cacheSize: t, prefix: n, experimentalParseClassName: r, extend: i = {}, override: a = {} }) => (rw(e, "cacheSize", t), rw(e, "prefix", n), rw(e, "experimentalParseClassName", r), iw(e.theme, a.theme), iw(e.classGroups, a.classGroups), iw(e.conflictingClassGroups, a.conflictingClassGroups), iw(e.conflictingClassGroupModifiers, a.conflictingClassGroupModifiers), rw(e, "postfixLookupClassGroups", a.postfixLookupClassGroups), rw(e, "orderSensitiveModifiers", a.orderSensitiveModifiers), aw(e.theme, i.theme), aw(e.classGroups, i.classGroups), aw(e.conflictingClassGroups, i.conflictingClassGroups), aw(e.conflictingClassGroupModifiers, i.conflictingClassGroupModifiers), ow(e, i, "postfixLookupClassGroups"), ow(e, i, "orderSensitiveModifiers"), e), rw = (e, t, n) => {
n !== void 0 && (e[t] = n);
+}, iw = (e, t) => {
+ if (t) for (let n in t) rw(e, n, t[n]);
}, aw = (e, t) => {
- if (t) for (let n in t) iw(e, n, t[n]);
-}, ow = (e, t) => {
- if (t) for (let n in t) sw(e, t, n);
-}, sw = (e, t, n) => {
+ if (t) for (let n in t) ow(e, t, n);
+}, ow = (e, t, n) => {
let r = t[n];
r !== void 0 && (e[n] = e[n] ? e[n].concat(r) : r);
-}, Rne = (e, ...t) => typeof e == "function" ? AC(rw, e, ...t) : AC(() => Lne(rw(), e), ...t), zne = [
+}, zne = (e, ...t) => typeof e == "function" ? kC(nw, e, ...t) : kC(() => Rne(nw(), e), ...t), Bne = [
"large-title",
"display-1",
"display-2",
@@ -26349,18 +26349,18 @@ var BS = /* @__PURE__ */ F(((e) => {
"body-2",
"caption-1",
"caption-2"
-], Bne = [
+], Vne = [
"regular",
"medium",
"semibold",
"bold"
-], cw = Rne({ extend: { classGroups: { "font-size": [{ text: zne.flatMap((e) => Bne.map((t) => `${e}-${t}`)) }] } } });
-function lw(e) {
+], sw = zne({ extend: { classGroups: { "font-size": [{ text: Bne.flatMap((e) => Vne.map((t) => `${e}-${t}`)) }] } } });
+function cw(e) {
return e;
}
//#endregion
//#region src/react/boardui/components/base/badges/chip.tsx
-var uw = lw({
+var lw = cw({
base: "inline-flex items-center justify-center rounded-md px-1.5 whitespace-nowrap transition-[padding,font-size] duration-200 ease",
variant: {
bold: "py-0.5 text-body-medium",
@@ -26379,16 +26379,16 @@ var uw = lw({
soft: "bg-background-secondary-default text-text-secondary"
}
});
-function dw({ variant: e = "bold", color: t = "neutral", className: n, ref: r, ...i }) {
+function uw({ variant: e = "bold", color: t = "neutral", className: n, ref: r, ...i }) {
return /* @__PURE__ */ (0, L.jsx)("span", {
ref: r,
- className: cw(uw.base, uw.variant[e], uw.color[t], n),
+ className: sw(lw.base, lw.variant[e], lw.color[t], n),
...i
});
}
//#endregion
//#region src/react/boardui/components/base/buttons/button.tsx
-var fw = lw({
+var dw = cw({
base: [
"inline-flex items-center justify-center gap-0.5 whitespace-nowrap overflow-hidden",
"font-sans select-none cursor-pointer",
@@ -26447,40 +26447,40 @@ function G({ variant: e = "primary", size: t = "medium", iconOnly: n = !1, leadi
return /* @__PURE__ */ (0, L.jsxs)("button", {
ref: c,
type: s,
- className: cw(fw.base, fw.size[t], fw.variant[e], n && fw.iconOnlySize[t], o),
+ className: sw(dw.base, dw.size[t], dw.variant[e], n && dw.iconOnlySize[t], o),
...l,
children: [
r ? /* @__PURE__ */ (0, L.jsx)(r, {
- className: fw.icon[t],
+ className: dw.icon[t],
"aria-hidden": !0
}) : null,
!n && a != null && /* @__PURE__ */ (0, L.jsx)("span", {
- className: fw.label[t],
+ className: dw.label[t],
children: a
}),
!n && i ? /* @__PURE__ */ (0, L.jsx)(i, {
- className: fw.icon[t],
+ className: dw.icon[t],
"aria-hidden": !0
}) : null
]
});
}
-function pw({ variant: e = "primary", size: t = "medium", iconOnly: n = !1, leadingIcon: r, trailingIcon: i, children: a, className: o, ref: s, ...c }) {
+function fw({ variant: e = "primary", size: t = "medium", iconOnly: n = !1, leadingIcon: r, trailingIcon: i, children: a, className: o, ref: s, ...c }) {
return /* @__PURE__ */ (0, L.jsxs)("a", {
ref: s,
- className: cw(fw.base, fw.size[t], fw.variant[e], n && fw.iconOnlySize[t], o),
+ className: sw(dw.base, dw.size[t], dw.variant[e], n && dw.iconOnlySize[t], o),
...c,
children: [
r ? /* @__PURE__ */ (0, L.jsx)(r, {
- className: fw.icon[t],
+ className: dw.icon[t],
"aria-hidden": !0
}) : null,
!n && a != null && /* @__PURE__ */ (0, L.jsx)("span", {
- className: fw.label[t],
+ className: dw.label[t],
children: a
}),
!n && i ? /* @__PURE__ */ (0, L.jsx)(i, {
- className: fw.icon[t],
+ className: dw.icon[t],
"aria-hidden": !0
}) : null
]
@@ -26488,13 +26488,13 @@ function pw({ variant: e = "primary", size: t = "medium", iconOnly: n = !1, lead
}
//#endregion
//#region src/api.ts
-var mw = class extends Error {
+var pw = class extends Error {
status;
body;
constructor(e, t, n = null) {
super(d(e, t)), this.name = "ApiError", this.status = t, this.body = n;
}
-}, hw = (e) => {
+}, mw = (e) => {
if (!e || typeof e != "object") return "";
let t = e;
for (let e of [
@@ -26507,7 +26507,7 @@ var mw = class extends Error {
}
return "";
}, K = (e) => d(e);
-async function gw(e, t) {
+async function hw(e, t) {
let n = await fetch(e, {
headers: { Accept: "application/json" },
credentials: "same-origin",
@@ -26516,7 +26516,7 @@ async function gw(e, t) {
try {
r = await n.json();
} catch {}
- if (!n.ok) throw new mw(hw(r) || `请求失败(${n.status})`, n.status);
+ if (!n.ok) throw new pw(mw(r) || `请求失败(${n.status})`, n.status);
return r;
}
async function q(e, t, n = "POST", r) {
@@ -26533,52 +26533,52 @@ async function q(e, t, n = "POST", r) {
try {
a = await i.json();
} catch {}
- if (!i.ok) throw new mw(hw(a) || `请求失败(${i.status})`, i.status, a);
+ if (!i.ok) throw new pw(mw(a) || `请求失败(${i.status})`, i.status, a);
return a;
}
//#endregion
//#region src/react/components/card.tsx
-var Vne = "min-w-0", Hne = {
+var Hne = "min-w-0", Une = {
filled: "bg-background-secondary-default",
outlined: "border border-separator-border bg-background-primary-default",
raised: "bg-background-primary-default"
-}, Une = {
+}, Wne = {
default: "rounded-2xl shadow-card",
chart: "rounded-2-5xl",
surface: "rounded-surface",
plain: "rounded-2xl"
-}, Wne = {
+}, Gne = {
line: "border border-border-button-default",
soft: "border border-separator-border"
-}, Gne = {
+}, Kne = {
none: "",
default: "p-5"
-}, Kne = "cursor-pointer outline-none not-data-selected:hover:bg-card-hover focus-visible:ring-2 focus-visible:ring-border-focus-ring focus-visible:ring-offset-3", qne = "relative data-selected:bg-background-primary-default data-selected:shadow-none data-selected:after:pointer-events-none data-selected:after:absolute data-selected:after:inset-0 data-selected:after:z-1 data-selected:after:rounded-[inherit] data-selected:after:border-2 data-selected:after:border-border-focus-ring";
-function _w(e = {}) {
+}, qne = "cursor-pointer outline-none not-data-selected:hover:bg-card-hover focus-visible:ring-2 focus-visible:ring-border-focus-ring focus-visible:ring-offset-3", Jne = "relative data-selected:bg-background-primary-default data-selected:shadow-none data-selected:after:pointer-events-none data-selected:after:absolute data-selected:after:inset-0 data-selected:after:z-1 data-selected:after:rounded-[inherit] data-selected:after:border-2 data-selected:after:border-border-focus-ring";
+function gw(e = {}) {
let { variant: t = "filled", padding: n = "default", interactive: r, selectable: i, bordered: a, className: o } = e, s = e.radius ?? (t === "outlined" ? "surface" : "default");
return [
- Vne,
- Hne[t],
- Une[s],
- Gne[n],
- a ? Wne[a] : "",
- r ? Kne : "",
- i ? qne : "",
+ Hne,
+ Une[t],
+ Wne[s],
+ Kne[n],
+ a ? Gne[a] : "",
+ r ? qne : "",
+ i ? Jne : "",
o ?? ""
].filter(Boolean).join(" ");
}
//#endregion
//#region src/react/components/empty-state.tsx
-var Jne = {
+var Yne = {
page: "min-h-80 justify-center rounded-floating border border-separator-border bg-background-secondary-default px-6 py-12",
plain: "px-6 py-12",
inset: "min-h-40 justify-center rounded-xl bg-background-secondary-default px-4 py-4"
};
-function vw({ icon: e, title: t, actions: n, children: r, shell: i = "page" }) {
+function _w({ icon: e, title: t, actions: n, children: r, shell: i = "page" }) {
let a = i === "page";
return /* @__PURE__ */ (0, L.jsxs)("div", {
"data-empty-state": "",
- className: `flex flex-col items-center gap-2 text-center ${Jne[i]}`,
+ className: `flex flex-col items-center gap-2 text-center ${Yne[i]}`,
children: [
a ? /* @__PURE__ */ (0, L.jsx)("span", {
"aria-hidden": !0,
@@ -26608,7 +26608,7 @@ function vw({ icon: e, title: t, actions: n, children: r, shell: i = "page" }) {
}
//#endregion
//#region src/react/components/loading-dots.tsx
-function yw({ label: e, inline: t = !1 }) {
+function vw({ label: e, inline: t = !1 }) {
let n = /* @__PURE__ */ (0, L.jsxs)("span", {
"aria-hidden": !0,
className: "inline-flex items-center gap-1",
@@ -26674,7 +26674,7 @@ function J({ tone: e, title: t, action: n, extra: r, children: i }) {
}
//#endregion
//#region src/react/components/page.tsx
-function bw({ children: e }) {
+function yw({ children: e }) {
return /* @__PURE__ */ (0, L.jsx)("div", {
className: "mx-auto flex w-full max-w-board flex-col gap-8",
children: e
@@ -26682,21 +26682,21 @@ function bw({ children: e }) {
}
//#endregion
//#region src/react/components/progress.tsx
-var xw = 100, Yne = .4;
-function Sw({ label: e, value: t, max: n = 100, stops: r = [] }) {
- let i = n > 0 ? n : 1, a = (e) => Math.min(Math.max(e, 0), i) / i * xw;
+var bw = 100, Xne = .4;
+function xw({ label: e, value: t, max: n = 100, stops: r = [] }) {
+ let i = n > 0 ? n : 1, a = (e) => Math.min(Math.max(e, 0), i) / i * bw;
return /* @__PURE__ */ (0, L.jsxs)("svg", {
role: "progressbar",
"aria-label": e,
"aria-valuemin": 0,
"aria-valuemax": n,
"aria-valuenow": t,
- viewBox: `0 0 ${xw} 1`,
+ viewBox: `0 0 ${bw} 1`,
preserveAspectRatio: "none",
className: "h-1.5 w-full overflow-hidden rounded-full",
children: [
/* @__PURE__ */ (0, L.jsx)("rect", {
- width: xw,
+ width: bw,
height: 1,
className: "fill-background-tertiary-default"
}),
@@ -26707,7 +26707,7 @@ function Sw({ label: e, value: t, max: n = 100, stops: r = [] }) {
}),
r.map((e) => /* @__PURE__ */ (0, L.jsx)("rect", {
x: a(e),
- width: Yne,
+ width: Xne,
height: 1,
className: "fill-background-secondary-default"
}, e))
@@ -26716,7 +26716,7 @@ function Sw({ label: e, value: t, max: n = 100, stops: r = [] }) {
}
//#endregion
//#region src/react/settings/use-action.ts
-function Cw(e = "") {
+function Sw(e = "") {
let t = (0, I.useRef)(null), [n, r] = (0, I.useState)(""), [i, a] = (0, I.useState)(e);
(0, I.useEffect)(() => () => t.current?.abort(), []);
async function o(e, n, i, o) {
@@ -26754,11 +26754,11 @@ var X = new St({ defaultOptions: { queries: {
refetchOnWindowFocus: !1,
refetchOnMount: !1,
retryOnMount: !1
-} } }), ww = "/api/tasks", Tw = ["tasks"], Xne = (e, t) => gw(`${ww}?${new URLSearchParams({
+} } }), Cw = "/api/tasks", ww = ["tasks"], Zne = (e, t) => hw(`${Cw}?${new URLSearchParams({
before_finished_at: e.finished_at || "",
before_id: String(e.id)
})}`, t);
-function Ew(...e) {
+function Tw(...e) {
let t = /* @__PURE__ */ new Map();
for (let n of e) for (let e of n) t.has(e.id) || t.set(e.id, e);
return [...t.values()].sort((e, t) => {
@@ -26766,26 +26766,26 @@ function Ew(...e) {
return n === r ? t.id - e.id : n < r ? 1 : -1;
});
}
-var Zne = 2e3, Qne = 1e4, $ne = (e) => e?.running.length ? Zne : Qne, Dw = (e) => gw(ww, e);
-async function ere(e) {
+var Qne = 2e3, $ne = 1e4, ere = (e) => e?.running.length ? Qne : $ne, Ew = (e) => hw(Cw, e);
+async function tre(e) {
await X.fetchQuery({
- queryKey: Tw,
- queryFn: () => Dw(e)
+ queryKey: ww,
+ queryFn: () => Ew(e)
});
}
-var Ow = {
+var Dw = {
manual: "手动",
scheduled: "定时",
startup: "启动",
cli: "命令行"
-}, tre = {
+}, nre = {
pending: "排队中",
running: "进行中",
succeeded: "已完成",
failed: "失败",
cancelled: "已取消",
interrupted: "被打断"
-}, nre = (e) => tre[e] || e, rre = {
+}, rre = (e) => nre[e] || e, ire = {
checked: "已检查",
total: "总数",
scanned: "已扫描",
@@ -26815,7 +26815,7 @@ var Ow = {
source: "来源",
cover_network: "封面连不上图片主机"
};
-function ire(e) {
+function are(e) {
let t = /* @__PURE__ */ new Map();
for (let n of e) {
if (!n.followup_key || n.parent_run_id == null) continue;
@@ -26824,7 +26824,7 @@ function ire(e) {
}
return t;
}
-function are(e, t) {
+function ore(e, t) {
let n = [], r = /* @__PURE__ */ new Map();
for (let i of e) {
if (!t(i)) {
@@ -26846,19 +26846,19 @@ function are(e, t) {
}
return n;
}
-var ore = (e) => e.trigger === "scheduled" && e.status === "succeeded" && !e.error && !(Number(e.result_summary?.added) > 0) && !(Number(e.result_summary?.followups) > 0), kw = (e) => e.status === "pending" || e.status === "running";
-function sre(e) {
+var sre = (e) => e.trigger === "scheduled" && e.status === "succeeded" && !e.error && !(Number(e.result_summary?.added) > 0) && !(Number(e.result_summary?.followups) > 0), Ow = (e) => e.status === "pending" || e.status === "running";
+function cre(e) {
let t = `${e.task_label}:`, n = e.progress_label || "", r = n.startsWith(t) ? n.slice(t.length) : n === e.task_label ? "" : n, i = e.progress_total || 0;
- return [r, e.error || Mw(e.result_summary) || (kw(e) && i > 0 ? `${e.progress_current || 0} / ${i} 项` : "")].filter(Boolean).join(" · ");
+ return [r, e.error || jw(e.result_summary) || (Ow(e) && i > 0 ? `${e.progress_current || 0} / ${i} 项` : "")].filter(Boolean).join(" · ");
}
-function Aw(e) {
+function kw(e) {
if (typeof e != "number" || !Number.isFinite(e) || e < 0) return "";
let t = Math.floor(e);
if (t < 60) return `${t} 秒`;
let n = Math.floor(t / 60);
return n < 60 ? `${n} 分 ${t % 60} 秒` : `${Math.floor(n / 60)} 小时 ${n % 60} 分`;
}
-function jw(e) {
+function Aw(e) {
if (!e) return "";
let t = new Date(e);
return Number.isNaN(t.getTime()) ? "" : t.toLocaleString(void 0, {
@@ -26868,7 +26868,7 @@ function jw(e) {
minute: "2-digit"
});
}
-var cre = /* @__PURE__ */ new Set([
+var lre = /* @__PURE__ */ new Set([
"blocked_by",
"status",
"run_id",
@@ -26877,28 +26877,28 @@ var cre = /* @__PURE__ */ new Set([
"completed_at",
"finished_at"
]);
-function Mw(e) {
- return Object.entries(e || {}).filter(([e, t]) => !cre.has(e) && (typeof t == "number" || typeof t == "string") && String(t) !== "").map(([e, t]) => `${rre[e] || e} ${t}`).join(" · ");
+function jw(e) {
+ return Object.entries(e || {}).filter(([e, t]) => !lre.has(e) && (typeof t == "number" || typeof t == "string") && String(t) !== "").map(([e, t]) => `${ire[e] || e} ${t}`).join(" · ");
}
//#endregion
//#region src/react/activity/activity-page.tsx
-var lre = {
+var ure = {
succeeded: "lime",
failed: "rose",
cancelled: "yellow",
interrupted: "yellow"
};
-function Nw({ status: e }) {
- return /* @__PURE__ */ (0, L.jsx)(dw, {
- color: lre[e] ?? "neutral",
- children: nre(e)
+function Mw({ status: e }) {
+ return /* @__PURE__ */ (0, L.jsx)(uw, {
+ color: ure[e] ?? "neutral",
+ children: rre(e)
});
}
-function ure({ rows: e }) {
+function dre({ rows: e }) {
return /* @__PURE__ */ (0, L.jsx)("ul", {
className: "flex min-w-0 flex-col",
children: e.map((e) => {
- let t = sre(e);
+ let t = cre(e);
return /* @__PURE__ */ (0, L.jsxs)("li", {
"data-status": e.status,
"data-followup-key": e.followup_key,
@@ -26908,7 +26908,7 @@ function ure({ rows: e }) {
className: "min-w-0 break-words text-caption-1-regular text-text-primary",
children: e.task_label
}),
- /* @__PURE__ */ (0, L.jsx)(Nw, { status: e.status }),
+ /* @__PURE__ */ (0, L.jsx)(Mw, { status: e.status }),
t ? /* @__PURE__ */ (0, L.jsx)("span", {
className: "min-w-0 break-words text-caption-1-regular text-text-secondary",
children: t
@@ -26918,12 +26918,12 @@ function ure({ rows: e }) {
})
});
}
-function Pw({ run: e, meta: t, children: n, footer: r, followups: i }) {
+function Nw({ run: e, meta: t, children: n, footer: r, followups: i }) {
return /* @__PURE__ */ (0, L.jsxs)("li", {
"data-status": e.status,
"data-task-key": e.task_key,
"data-run-id": e.id,
- className: _w({
+ className: gw({
padding: "none",
bordered: "line",
className: e.status === "failed" ? "flex flex-col border-border-error-default" : "flex flex-col"
@@ -26937,7 +26937,7 @@ function Pw({ run: e, meta: t, children: n, footer: r, followups: i }) {
children: [/* @__PURE__ */ (0, L.jsx)("strong", {
className: "min-w-0 break-words text-title-1-medium text-text-primary",
children: e.task_label
- }), /* @__PURE__ */ (0, L.jsx)(Nw, { status: e.status })]
+ }), /* @__PURE__ */ (0, L.jsx)(Mw, { status: e.status })]
}),
/* @__PURE__ */ (0, L.jsx)("p", {
className: "text-caption-1-regular text-text-secondary",
@@ -26946,7 +26946,7 @@ function Pw({ run: e, meta: t, children: n, footer: r, followups: i }) {
n
]
}),
- i?.length ? /* @__PURE__ */ (0, L.jsx)(ure, { rows: i }) : null,
+ i?.length ? /* @__PURE__ */ (0, L.jsx)(dre, { rows: i }) : null,
r ? /* @__PURE__ */ (0, L.jsx)("div", {
className: "flex min-h-14 flex-col justify-center rounded-b-2xl border-t border-separator-border bg-card-footer px-5 py-3",
children: /* @__PURE__ */ (0, L.jsx)("p", {
@@ -26957,15 +26957,15 @@ function Pw({ run: e, meta: t, children: n, footer: r, followups: i }) {
]
});
}
-function dre({ run: e, followups: t }) {
- let n = e.progress_total || 0, r = e.progress_current || 0, i = e.progress_label || "正在进行", a = Aw(e.elapsed_seconds), o = [Ow[e.trigger] || e.trigger, a && `已跑 ${a}`].filter(Boolean).join(" · ");
- return /* @__PURE__ */ (0, L.jsx)(Pw, {
+function fre({ run: e, followups: t }) {
+ let n = e.progress_total || 0, r = e.progress_current || 0, i = e.progress_label || "正在进行", a = kw(e.elapsed_seconds), o = [Dw[e.trigger] || e.trigger, a && `已跑 ${a}`].filter(Boolean).join(" · ");
+ return /* @__PURE__ */ (0, L.jsx)(Nw, {
run: e,
meta: o,
followups: t,
children: n > 0 ? /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col gap-1.5",
- children: [/* @__PURE__ */ (0, L.jsx)(Sw, {
+ children: [/* @__PURE__ */ (0, L.jsx)(xw, {
label: i,
value: r,
max: n
@@ -26980,20 +26980,20 @@ function dre({ run: e, followups: t }) {
" 项"
]
})]
- }) : /* @__PURE__ */ (0, L.jsx)(yw, { label: i })
+ }) : /* @__PURE__ */ (0, L.jsx)(vw, { label: i })
});
}
-function Fw({ run: e, followups: t, runs: n }) {
- let r = Mw(e.result_summary), i = Aw(e.elapsed_seconds), a = n && n.length > 1 ? n[n.length - 1] : void 0, o = (a ? [
- Ow[e.trigger] || e.trigger,
+function Pw({ run: e, followups: t, runs: n }) {
+ let r = jw(e.result_summary), i = kw(e.elapsed_seconds), a = n && n.length > 1 ? n[n.length - 1] : void 0, o = (a ? [
+ Dw[e.trigger] || e.trigger,
`近 ${n.length} 轮`,
- `${jw(a.finished_at)} – ${jw(e.finished_at)}`
+ `${Aw(a.finished_at)} – ${Aw(e.finished_at)}`
] : [
- Ow[e.trigger] || e.trigger,
- jw(e.finished_at),
+ Dw[e.trigger] || e.trigger,
+ Aw(e.finished_at),
i && `用时 ${i}`
]).filter(Boolean).join(" · ");
- return /* @__PURE__ */ (0, L.jsx)(Pw, {
+ return /* @__PURE__ */ (0, L.jsx)(Nw, {
run: e,
meta: o,
footer: e.error,
@@ -27004,7 +27004,7 @@ function Fw({ run: e, followups: t, runs: n }) {
}) : null
});
}
-function Iw({ title: e, children: t }) {
+function Fw({ title: e, children: t }) {
let n = (0, I.useId)();
return /* @__PURE__ */ (0, L.jsxs)("section", {
"aria-labelledby": n,
@@ -27016,41 +27016,41 @@ function Iw({ title: e, children: t }) {
}), t]
});
}
-function Lw({ live: e = !1, children: t }) {
+function Iw({ live: e = !1, children: t }) {
return /* @__PURE__ */ (0, L.jsx)("ul", {
"aria-live": e ? "polite" : void 0,
className: "flex min-w-0 flex-col gap-3",
children: t
});
}
-function fre(e) {
+function pre(e) {
let t = Ft({
- queryKey: Tw,
- queryFn: ({ signal: e }) => Dw(e),
- refetchInterval: (e) => $ne(e.state.data)
+ queryKey: ww,
+ queryFn: ({ signal: e }) => Ew(e),
+ refetchInterval: (e) => ere(e.state.data)
}), n = t.data, r = n?.finished, [i, a] = (0, I.useState)([]), [o, s] = (0, I.useState)(!1), [c, l] = (0, I.useState)(r);
- r !== c && (l(r), i.length && c && a(Ew(i, c)));
+ r !== c && (l(r), i.length && c && a(Tw(i, c)));
let u = It({
- mutationFn: ({ oldest: e }) => Xne(e),
+ mutationFn: ({ oldest: e }) => Zne(e),
onSuccess: (e, { shown: t }) => {
- a((n) => Ew(n, t, e.finished || [])), s(!!e.finished_has_more);
+ a((n) => Tw(n, t, e.finished || [])), s(!!e.finished_has_more);
}
}), d = t.error ? K(t.error) : "";
- if (!n) return /* @__PURE__ */ (0, L.jsx)(bw, { children: /* @__PURE__ */ (0, L.jsx)(J, {
+ if (!n) return /* @__PURE__ */ (0, L.jsx)(yw, { children: /* @__PURE__ */ (0, L.jsx)(J, {
tone: "error",
children: d || "读取任务中心失败"
}) });
- let f = Ew(n.finished || [], i), p = [
+ let f = Tw(n.finished || [], i), p = [
...n.running || [],
...n.skipped || [],
...f
- ], m = ire(p), h = new Set(p.map((e) => e.id)), g = (e) => e.filter((e) => !(e.followup_key && e.parent_run_id != null && h.has(e.parent_run_id))), _ = g(f), v = _[_.length - 1], y = !!v && (i.length ? o : !!n.finished_has_more), b = () => {
+ ], m = are(p), h = new Set(p.map((e) => e.id)), g = (e) => e.filter((e) => !(e.followup_key && e.parent_run_id != null && h.has(e.parent_run_id))), _ = g(f), v = _[_.length - 1], y = !!v && (i.length ? o : !!n.finished_has_more), b = () => {
!u.isPending && v && u.mutate({
oldest: v,
shown: f
});
- }, x = _.filter((e) => m.get(e.id)?.some(kw)), S = g(n.running || []), C = g(n.skipped || []), w = _.filter((e) => !x.includes(e) && !C.some((t) => t.id === e.id)), T = are(w, (e) => ore(e) && !m.get(e.id)?.length), E = !S.length && !x.length && !C.length && !w.length;
- return /* @__PURE__ */ (0, L.jsxs)(bw, { children: [
+ }, x = _.filter((e) => m.get(e.id)?.some(Ow)), S = g(n.running || []), C = g(n.skipped || []), w = _.filter((e) => !x.includes(e) && !C.some((t) => t.id === e.id)), T = ore(w, (e) => sre(e) && !m.get(e.id)?.length), E = !S.length && !x.length && !C.length && !w.length;
+ return /* @__PURE__ */ (0, L.jsxs)(yw, { children: [
d ? /* @__PURE__ */ (0, L.jsx)(J, {
tone: "error",
children: d
@@ -27059,20 +27059,20 @@ function fre(e) {
tone: "warning",
children: n.message || "账本上还没有任务中心的表"
}) : null,
- E ? /* @__PURE__ */ (0, L.jsx)(vw, {
+ E ? /* @__PURE__ */ (0, L.jsx)(_w, {
shell: "plain",
- icon: lC,
+ icon: cC,
title: "还没有任务记录",
children: "扫描、追更检查、批量操作和命令行批处理跑起来之后,这里会显示它们的进度与结果。"
}) : /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [
- /* @__PURE__ */ (0, L.jsx)(Iw, {
+ /* @__PURE__ */ (0, L.jsx)(Fw, {
title: "正在进行",
- children: S.length || x.length ? /* @__PURE__ */ (0, L.jsxs)(Lw, {
+ children: S.length || x.length ? /* @__PURE__ */ (0, L.jsxs)(Iw, {
live: !0,
- children: [S.map((e) => /* @__PURE__ */ (0, L.jsx)(dre, {
+ children: [S.map((e) => /* @__PURE__ */ (0, L.jsx)(fre, {
run: e,
followups: m.get(e.id)
- }, e.id)), x.map((e) => /* @__PURE__ */ (0, L.jsx)(Fw, {
+ }, e.id)), x.map((e) => /* @__PURE__ */ (0, L.jsx)(Pw, {
run: e,
followups: m.get(e.id)
}, e.id))]
@@ -27081,17 +27081,17 @@ function fre(e) {
children: "没有任务在跑。"
})
}),
- C.length ? /* @__PURE__ */ (0, L.jsx)(Iw, {
+ C.length ? /* @__PURE__ */ (0, L.jsx)(Fw, {
title: "被挡下的",
- children: /* @__PURE__ */ (0, L.jsx)(Lw, { children: C.map((e) => /* @__PURE__ */ (0, L.jsx)(Fw, {
+ children: /* @__PURE__ */ (0, L.jsx)(Iw, { children: C.map((e) => /* @__PURE__ */ (0, L.jsx)(Pw, {
run: e,
followups: m.get(e.id)
}, e.id)) })
}) : null,
- w.length || y ? /* @__PURE__ */ (0, L.jsxs)(Iw, {
+ w.length || y ? /* @__PURE__ */ (0, L.jsxs)(Fw, {
title: "最近完成",
children: [
- w.length ? /* @__PURE__ */ (0, L.jsx)(Lw, { children: T.map(({ run: e, runs: t }) => /* @__PURE__ */ (0, L.jsx)(Fw, {
+ w.length ? /* @__PURE__ */ (0, L.jsx)(Iw, { children: T.map(({ run: e, runs: t }) => /* @__PURE__ */ (0, L.jsx)(Pw, {
run: e,
runs: t,
followups: m.get(e.id)
@@ -27103,7 +27103,7 @@ function fre(e) {
y ? /* @__PURE__ */ (0, L.jsx)(G, {
variant: "secondary",
size: "small",
- leadingIcon: KS,
+ leadingIcon: GS,
className: "self-start",
...Y(u.isPending),
onClick: b,
@@ -27116,56 +27116,56 @@ function fre(e) {
}
//#endregion
//#region src/jav-artwork.ts
-function pre(e) {
+function mre(e) {
return e === "thumbnail" ? "thumbnail" : "cover";
}
-function Rw(e, t) {
- return e.is_jav && e.code && e.has_cover && (pre(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";
+function Lw(e, t) {
+ return e.is_jav && e.code && e.has_cover && (mre(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";
}
-function zw(e, t) {
+function Rw(e, t) {
let n = new URLSearchParams(Object.entries(e).filter(([, e]) => e));
return t && n.set("exclude_vertical", "1"), n.toString();
}
-var mre = (e, t) => [
+var hre = (e, t) => [
"catalog-grid",
"catalog",
e,
t
-], hre = (e, t) => [
+], gre = (e, t) => [
"catalog-grid",
"entity",
e,
t
];
-async function gre(e, t, n, r, i) {
+async function _re(e, t, n, r, i) {
let a = new URLSearchParams(e);
a.set("limit", String(n)), a.set("offset", String(t)), t && a.set("count", "0");
- let o = await gw(`/api/items?${a}`, i), s = {
+ let o = await hw(`/api/items?${a}`, i), s = {
...o,
items: o.items || [],
offset: t
};
- return !t && !s.items.length && !r && (s.libraryEmpty = (await gw("/api/items?limit=1&thumb=0", i)).total === 0), s;
+ return !t && !s.items.length && !r && (s.libraryEmpty = (await hw("/api/items?limit=1&thumb=0", i)).total === 0), s;
}
-var _re = (e) => (t) => (t.offset === 0 ? t.items.length < (t.total || 0) : t.has_more) ? t.offset + e : void 0, vre = (e, t) => {
+var vre = (e) => (t) => (t.offset === 0 ? t.items.length < (t.total || 0) : t.has_more) ? t.offset + e : void 0, yre = (e, t) => {
let n = t.reduce((e, t) => e + t.items.length, 0);
return (e.has_more == null ? n < (e.total || 0) : e.has_more) ? n : void 0;
};
-function Bw(e) {
- let t = zw(e.filters || {}, !!e.excludeVertical), n = e.batchSize || 60, r = e.filters?.state === "trash";
+function zw(e) {
+ let t = Rw(e.filters || {}, !!e.excludeVertical), n = e.batchSize || 60, r = e.filters?.state === "trash";
return {
- queryKey: mre(t, e.revision || 0),
+ queryKey: hre(t, e.revision || 0),
queryFn: async ({ pageParam: i, signal: a }) => {
- let o = await gre(t, i, n, r, a);
+ let o = await _re(t, i, n, r, a);
return e.cache(o.items), o;
},
initialPageParam: 0,
- getNextPageParam: _re(n)
+ getNextPageParam: vre(n)
};
}
-function yre(e) {
+function bre(e) {
return {
- queryKey: hre(e.entityKey || "", e.revision || 0),
+ queryKey: gre(e.entityKey || "", e.revision || 0),
queryFn: async ({ pageParam: t, signal: n }) => {
if (!e.fetchPage) return {
items: [],
@@ -27180,12 +27180,12 @@ function yre(e) {
};
},
initialPageParam: 0,
- getNextPageParam: vre
+ getNextPageParam: yre
};
}
-async function bre(e, t) {
+async function xre(e, t) {
if (e.mode !== "catalog") return;
- let n = Bw(e);
+ let n = zw(e);
await X.fetchInfiniteQuery({
...n,
queryFn: ({ pageParam: e }) => n.queryFn({
@@ -27194,7 +27194,7 @@ async function bre(e, t) {
})
});
}
-function xre(e, t, n) {
+function Sre(e, t, n) {
return n ? e.filter((e) => {
let n = e.part_group?.key;
if (n) {
@@ -27209,28 +27209,28 @@ function xre(e, t, n) {
return !0;
}) : [...e];
}
-var Vw = (e, t) => !!e && !!Rw(e, t);
-function Sre(e, t) {
+var Bw = (e, t) => !!e && !!Lw(e, t);
+function Cre(e, t) {
let n = (e.performers || [])[0];
return (e.is_jav && n ? n : e.creator) || n || e.studio || e.code || t((e.tags || [])[0] || "") || "为你推荐";
}
-function Cre(e, t) {
- let n = (e) => Vw(e, t) && !!(e.creator || (e.performers || []).length || e.studio);
- return e.slice(15).find(n) || e.slice(8).find(n) || e.slice(8).find((e) => Vw(e, t)) || e[e.length - 1];
+function wre(e, t) {
+ let n = (e) => Bw(e, t) && !!(e.creator || (e.performers || []).length || e.studio);
+ return e.slice(15).find(n) || e.slice(8).find(n) || e.slice(8).find((e) => Bw(e, t)) || e[e.length - 1];
}
-function wre(e, { collapse: t, mix: n, javImage: r }) {
+function Tre(e, { collapse: t, mix: n, javImage: r }) {
let i = {
parts: /* @__PURE__ */ new Set(),
editions: /* @__PURE__ */ new Set()
}, a = /* @__PURE__ */ new Set(), o = [], s = [];
for (let c of e) {
s.push(o.length);
- let e = xre(c.items.filter((e) => !a.has(e.id) && !!a.add(e.id)), i, t), l = e.map((e) => ({
+ let e = Sre(c.items.filter((e) => !a.has(e.id) && !!a.add(e.id)), i, t), l = e.map((e) => ({
kind: "card",
item: e
}));
if (n && e.length >= 8) {
- let t = Cre(e, r);
+ let t = wre(e, r);
t && l.splice(7, 0, {
kind: "mix",
seed: t
@@ -27243,16 +27243,16 @@ function wre(e, { collapse: t, mix: n, javImage: r }) {
pageStarts: s
};
}
-function Tre(e, t, n) {
+function Ere(e, t, n) {
let r = Math.max(1, n), i = [];
for (let n = Math.max(r, Math.ceil(Math.max(0, t) / r) * r); n < e; n += r) i.push(n);
return i;
}
-function Ere(e, t) {
+function Dre(e, t) {
let n = new URLSearchParams(Object.entries(e).filter(([, e]) => e));
return n.set("orient", "竖屏"), n.set("limit", "18"), n.set("offset", String(t)), n.toString();
}
-function Dre(e, t) {
+function Ore(e, t) {
let n = [...t].sort((e, t) => e.at - t.at), r = [], i = 0;
for (let t of n) r.push({
start: i,
@@ -27265,7 +27265,7 @@ function Dre(e, t) {
strip: null
}), r;
}
-function Ore(e, t) {
+function kre(e, t) {
X.setQueriesData({
queryKey: ["catalog-grid"],
predicate: (e) => Array.isArray(e.state.data?.pages)
@@ -27282,7 +27282,7 @@ function Ore(e, t) {
}
//#endregion
//#region src/react/components/grid-reveal.tsx
-function Hw(e, t) {
+function Vw(e, t) {
let [n, r] = (0, I.useState)(e ? "skeleton" : "none"), [i] = (0, I.useState)(() => e ? t() : ""), a = (0, I.useRef)(null);
return (0, I.useLayoutEffect)(() => {
a.current && y(a.current);
@@ -27308,7 +27308,7 @@ function Hw(e, t) {
fading: n === "fade"
};
}
-function Uw({ message: e, onRetry: t }) {
+function Hw({ message: e, onRetry: t }) {
return /* @__PURE__ */ (0, L.jsx)("div", {
"data-media-error": "",
onClick: (e) => {
@@ -27322,21 +27322,21 @@ function Uw({ message: e, onRetry: t }) {
}
//#endregion
//#region src/react/catalog-grid/artwork.ts
-var Ww = {
+var Uw = {
kind: "",
html: ""
};
-function Gw(e, t, n, i, a) {
- let o = Rw(e, i);
- if (!o) return Ww;
+function Ww(e, t, n, i, a) {
+ let o = Lw(e, i);
+ if (!o) return Uw;
let s = e.has_cover && e.code ? `/cover?code=${encodeURIComponent(e.code)}&thumb=1` : "", c = e.has_thumb || e.has_local_poster ? `/poster?id=${e.id}&c=4` : "", l = a(e, t, n), u = (l.match(/ data-(?:c[xy]|posterbox)="[^"]*"/g) || []).join(""), d = o === "cover" ? l : `<img class="poster" src="${c}" alt="" loading="${n ? "eager" : "lazy"}"${u}>`;
return {
kind: o === "cover" ? "cover" : "thumb",
html: d.replace("<img ", `<img data-jav-image="${e.id}" data-jav-cover="${r(s)}" data-jav-thumb="${r(c)}" data-jav-image-layout="${t}" `)
};
}
-function Kw(e, t, n, i, a) {
- if (e.is_jav) return Gw(e, t, n, i, a);
+function Gw(e, t, n, i, a) {
+ if (e.is_jav) return Ww(e, t, n, i, a);
let o = n ? "eager" : "lazy";
return e.follow_thumb_url ? {
kind: "thumb",
@@ -27344,11 +27344,11 @@ function Kw(e, t, n, i, a) {
} : e.has_thumb || e.has_local_poster ? {
kind: "thumb",
html: `<img class="poster" src="/poster?id=${e.id}&c=4" alt="" loading="${o}">`
- } : Ww;
+ } : Uw;
}
//#endregion
//#region src/react/components/art-slot.tsx
-function qw({ artwork: e, identity: t = e.html, relayout: n }) {
+function Kw({ artwork: e, identity: t = e.html, relayout: n }) {
let [r, i] = (0, I.useState)({
identity: t,
artwork: e
@@ -27368,25 +27368,25 @@ function qw({ artwork: e, identity: t = e.html, relayout: n }) {
}
//#endregion
//#region src/react/components/media-card.tsx
-var kre = .75, Are = 9 / 16;
-function Jw({ name: e }) {
+var Are = .75, jre = 9 / 16;
+function qw({ name: e }) {
return /* @__PURE__ */ (0, L.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, L.jsx)("use", { href: `#i-${e}` })
});
}
-var Yw = {
+var Mre = {
image: "图片",
audio: "音频",
archive: "压缩包",
other: "其它文件"
-}, Xw = (e) => e.is_jav ? "女优" : "艺人";
-function Zw(e, t, n) {
- return t === "short" || n.portrait ? Are : n.active && n.size === "big" ? kre : 16 / 9;
+}, Jw = (e) => e.is_jav ? "女优" : "艺人";
+function Yw(e, t, n) {
+ return t === "short" || n.portrait ? jre : n.active && n.size === "big" ? Are : 16 / 9;
}
-function Qw(e, t) {
- let n = e.performers || [], r = e.performer_entities || [], i = n[0] || "", a = e.is_jav && i ? "" : e.creator || "", o = a ? "creator" : i ? "performer" : "", s = a || i || "未归属", c = n.length > 1 && !a, l = Xw(e);
+function Xw(e, t) {
+ let n = e.performers || [], r = e.performer_entities || [], i = n[0] || "", a = e.is_jav && i ? "" : e.creator || "", o = a ? "creator" : i ? "performer" : "", s = a || i || "未归属", c = n.length > 1 && !a, l = Jw(e);
return {
avatar: c ? /* @__PURE__ */ (0, L.jsx)("div", {
"data-media-avatars": "",
@@ -27432,7 +27432,7 @@ function Qw(e, t) {
})
};
}
-function $w() {
+function Zw() {
return /* @__PURE__ */ (0, L.jsxs)("button", {
type: "button",
"data-media-preview": "",
@@ -27451,7 +27451,7 @@ function $w() {
})]
});
}
-function eT({ item: e, actions: t }) {
+function Qw({ item: e, actions: t }) {
let [n, r] = (0, I.useState)(null), [i, a] = (0, I.useState)(!1), o = n?.id === e.id ? n.on : !!e.watch_later;
return /* @__PURE__ */ (0, L.jsx)("div", {
"data-media-later": "",
@@ -27469,15 +27469,15 @@ function eT({ item: e, actions: t }) {
},
"aria-busy": i || void 0,
"aria-disabled": i || void 0,
- children: /* @__PURE__ */ (0, L.jsx)(Jw, { name: o ? "check" : "bookmark-plus" })
+ children: /* @__PURE__ */ (0, L.jsx)(qw, { name: o ? "check" : "bookmark-plus" })
})
});
}
-function tT(e, t) {
+function $w(e, t) {
let n = e?.querySelector("video.hv");
!n || !Number.isFinite(n.duration) || (n._hop &&= (clearInterval(n._hop), null), n.currentTime = Math.max(0, Math.min(n.duration, n.currentTime + t)));
}
-function nT({ item: e, variant: t, layout: n, selected: r, selectMode: o, seekSeconds: s, helpers: c, actions: l, onOpen: u }) {
+function eT({ item: e, variant: t, layout: n, selected: r, selectMode: o, seekSeconds: s, helpers: c, actions: l, onOpen: u }) {
let d = (0, I.useRef)(null), f = (0, I.useRef)({
item: e,
helpers: c
@@ -27489,7 +27489,7 @@ function nT({ item: e, variant: t, layout: n, selected: r, selectMode: o, seekSe
let p = (0, I.useCallback)((e) => {
let { item: t, helpers: n } = f.current;
d.current && d.current !== e && n.releaseHover(d.current), d.current = e, e && (!t.medium || t.medium === "video") && n.wireHover(e, t);
- }, []), m = e.part_group || null, h = e.edition_group || null, g = !!(m || h), _ = n.active && e.is_jav ? n.size : "small", v = Kw(e, _, !1, n.javImage, c.coverHtml), y = _ === "small" ? v.html : Kw(e, "small", !1, n.javImage, c.coverHtml).html, b = m?.title || e.name || "", x = c.displayName(e, b), S = m?.total_size ?? e.size, C = m?.total_duration ?? e.duration, w = !m && Number(e.play_seconds) > 0 && Number(e.duration) > 0 ? Math.min(Number(e.play_seconds) / Number(e.duration), 1) : 0, { avatar: T, who: E } = Qw(e, c), D = (e.follow_tags || e.tags || []).slice(0, 3), O = [
+ }, []), m = e.part_group || null, h = e.edition_group || null, g = !!(m || h), _ = n.active && e.is_jav ? n.size : "small", v = Gw(e, _, !1, n.javImage, c.coverHtml), y = _ === "small" ? v.html : Gw(e, "small", !1, n.javImage, c.coverHtml).html, b = m?.title || e.name || "", x = c.displayName(e, b), S = m?.total_size ?? e.size, C = m?.total_duration ?? e.duration, w = !m && Number(e.play_seconds) > 0 && Number(e.duration) > 0 ? Math.min(Number(e.play_seconds) / Number(e.duration), 1) : 0, { avatar: T, who: E } = Xw(e, c), D = (e.follow_tags || e.tags || []).slice(0, 3), O = [
e.feedback === "dislike" && "dislike",
e.feedback === "seen" && "seen",
e.disposal === "trash" && "dispose",
@@ -27523,9 +27523,9 @@ function nT({ item: e, variant: t, layout: n, selected: r, selectMode: o, seekSe
u(e, r);
}, A = /* @__PURE__ */ (0, L.jsxs)("div", {
"data-media-pic": "",
- style: { "--card-ratio": String(Zw(e, t, n)) },
+ style: { "--card-ratio": String(Yw(e, t, n)) },
children: [
- v.html ? /* @__PURE__ */ (0, L.jsx)(qw, {
+ v.html ? /* @__PURE__ */ (0, L.jsx)(Kw, {
artwork: v,
identity: y,
relayout: (e) => c.relayoutArt(e, _)
@@ -27539,11 +27539,11 @@ function nT({ item: e, variant: t, layout: n, selected: r, selectMode: o, seekSe
}),
/* @__PURE__ */ (0, L.jsx)("span", {
"data-media-check": "",
- children: /* @__PURE__ */ (0, L.jsx)(Jw, { name: "check" })
+ children: /* @__PURE__ */ (0, L.jsx)(qw, { name: "check" })
}),
/* @__PURE__ */ (0, L.jsxs)("span", {
"data-media-trash-mark": "",
- children: [/* @__PURE__ */ (0, L.jsx)(Jw, { name: "trash" }), /* @__PURE__ */ (0, L.jsx)("b", { children: "回收站" })]
+ children: [/* @__PURE__ */ (0, L.jsx)(qw, { name: "trash" }), /* @__PURE__ */ (0, L.jsx)("b", { children: "回收站" })]
}),
m ? /* @__PURE__ */ (0, L.jsx)("span", {
"data-media-group": "",
@@ -27570,8 +27570,8 @@ function nT({ item: e, variant: t, layout: n, selected: r, selectMode: o, seekSe
"data-media-scrub": "",
children: /* @__PURE__ */ (0, L.jsx)("i", { style: { "--media-fill": `${Math.round(e.leave_ratio * 100)}%` } })
}),
- /* @__PURE__ */ (0, L.jsx)($w, {}),
- /* @__PURE__ */ (0, L.jsx)(eT, {
+ /* @__PURE__ */ (0, L.jsx)(Zw, {}),
+ /* @__PURE__ */ (0, L.jsx)(Qw, {
item: e,
actions: l
}),
@@ -27581,27 +27581,27 @@ function nT({ item: e, variant: t, layout: n, selected: r, selectMode: o, seekSe
/* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
onClick: (e) => {
- e.stopPropagation(), tT(d.current, -s);
+ e.stopPropagation(), $w(d.current, -s);
},
title: `后退 ${s} 秒`,
"aria-label": `后退 ${s} 秒`,
- children: /* @__PURE__ */ (0, L.jsx)(Jw, { name: "rotate-ccw" })
+ children: /* @__PURE__ */ (0, L.jsx)(qw, { name: "rotate-ccw" })
}),
/* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
onClick: (e) => {
- e.stopPropagation(), tT(d.current, s);
+ e.stopPropagation(), $w(d.current, s);
},
title: `前进 ${s} 秒`,
"aria-label": `前进 ${s} 秒`,
- children: /* @__PURE__ */ (0, L.jsx)(Jw, { name: "rotate-cw" })
+ children: /* @__PURE__ */ (0, L.jsx)(qw, { name: "rotate-cw" })
}),
/* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
"data-open": "",
title: "打开详情",
"aria-label": "打开详情",
- children: /* @__PURE__ */ (0, L.jsx)(Jw, { name: "expand" })
+ children: /* @__PURE__ */ (0, L.jsx)(qw, { name: "expand" })
})
]
})
@@ -27677,8 +27677,8 @@ function nT({ item: e, variant: t, layout: n, selected: r, selectMode: o, seekSe
]
});
}
-function rT({ item: e, selected: t, selectMode: n, helpers: i, actions: o, onOpen: s }) {
- let c = (0, I.useRef)(null), [l, u] = (0, I.useState)(!1), d = e.medium === "image" && e.location !== "online", f = String(e.name || ""), p = f.toLowerCase().endsWith(".url") ? "网址快捷方式" : Yw[e.medium || ""] || "其它文件", m = d ? "pics" : p === "网址快捷方式" ? "globe" : "hard-drive", h = e.disposal === "trash" ? "restore" : "dispose", g = h === "restore" ? "还原" : "移入回收站", _ = (t) => {
+function tT({ item: e, selected: t, selectMode: n, helpers: i, actions: o, onOpen: s }) {
+ let c = (0, I.useRef)(null), [l, u] = (0, I.useState)(!1), d = e.medium === "image" && e.location !== "online", f = String(e.name || ""), p = f.toLowerCase().endsWith(".url") ? "网址快捷方式" : Mre[e.medium || ""] || "其它文件", m = d ? "pics" : p === "网址快捷方式" ? "globe" : "hard-drive", h = e.disposal === "trash" ? "restore" : "dispose", g = h === "restore" ? "还原" : "移入回收站", _ = (t) => {
t.preventDefault(), t.stopPropagation(), !l && (u(!0), o.resourceOperation(e, h).catch(() => {}).finally(() => u(!1)));
}, v = (t) => {
if (c.current) {
@@ -27704,7 +27704,7 @@ function rT({ item: e, selected: t, selectMode: n, helpers: i, actions: o, onOpe
children: [
/* @__PURE__ */ (0, L.jsxs)("span", {
"data-media-glyph": "",
- children: [/* @__PURE__ */ (0, L.jsx)(Jw, { name: m }), /* @__PURE__ */ (0, L.jsx)("b", { children: p })]
+ children: [/* @__PURE__ */ (0, L.jsx)(qw, { name: m }), /* @__PURE__ */ (0, L.jsx)("b", { children: p })]
}),
d ? /* @__PURE__ */ (0, L.jsx)("span", {
"data-media-art": "thumb",
@@ -27716,11 +27716,11 @@ function rT({ item: e, selected: t, selectMode: n, helpers: i, actions: o, onOpe
}),
/* @__PURE__ */ (0, L.jsx)("span", {
"data-media-check": "",
- children: /* @__PURE__ */ (0, L.jsx)(Jw, { name: "check" })
+ children: /* @__PURE__ */ (0, L.jsx)(qw, { name: "check" })
}),
/* @__PURE__ */ (0, L.jsxs)("span", {
"data-media-trash-mark": "",
- children: [/* @__PURE__ */ (0, L.jsx)(Jw, { name: "trash" }), /* @__PURE__ */ (0, L.jsx)("b", { children: "回收站" })]
+ children: [/* @__PURE__ */ (0, L.jsx)(qw, { name: "trash" }), /* @__PURE__ */ (0, L.jsx)("b", { children: "回收站" })]
}),
/* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
@@ -27730,7 +27730,7 @@ function rT({ item: e, selected: t, selectMode: n, helpers: i, actions: o, onOpe
onClick: _,
"aria-busy": l || void 0,
"aria-disabled": l || void 0,
- children: l ? /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)("span", { dangerouslySetInnerHTML: { __html: k(h === "restore" ? "正在还原" : "正在移入回收站") } }), /* @__PURE__ */ (0, L.jsx)("span", { children: y })] }) : /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(Jw, { name: h === "restore" ? "rotate-ccw" : "trash" }), /* @__PURE__ */ (0, L.jsx)("span", { children: g })] })
+ children: l ? /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)("span", { dangerouslySetInnerHTML: { __html: k(h === "restore" ? "正在还原" : "正在移入回收站") } }), /* @__PURE__ */ (0, L.jsx)("span", { children: y })] }) : /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(qw, { name: h === "restore" ? "rotate-ccw" : "trash" }), /* @__PURE__ */ (0, L.jsx)("span", { children: g })] })
})
]
}), /* @__PURE__ */ (0, L.jsxs)("div", {
@@ -27739,7 +27739,7 @@ function rT({ item: e, selected: t, selectMode: n, helpers: i, actions: o, onOpe
"data-media-avatar": "",
"data-media-kind-glyph": "",
"aria-hidden": "true",
- children: /* @__PURE__ */ (0, L.jsx)(Jw, { name: m })
+ children: /* @__PURE__ */ (0, L.jsx)(qw, { name: m })
}), /* @__PURE__ */ (0, L.jsxs)("div", {
"data-media-text": "",
children: [/* @__PURE__ */ (0, L.jsx)("span", {
@@ -27768,14 +27768,14 @@ function rT({ item: e, selected: t, selectMode: n, helpers: i, actions: o, onOpe
})]
});
}
-function iT(e) {
- return e.variant === "resource" ? /* @__PURE__ */ (0, L.jsx)(rT, { ...e }) : /* @__PURE__ */ (0, L.jsx)(nT, { ...e });
+function nT(e) {
+ return e.variant === "resource" ? /* @__PURE__ */ (0, L.jsx)(tT, { ...e }) : /* @__PURE__ */ (0, L.jsx)(eT, { ...e });
}
-var aT = (0, I.memo)(iT), oT = { "text-aa": 1.435 }, sT = /* @__PURE__ */ new Map();
-function cT(e) {
- let t = sT.get(e);
+var rT = (0, I.memo)(nT), iT = { "text-aa": 1.435 }, aT = /* @__PURE__ */ new Map();
+function oT(e) {
+ let t = aT.get(e);
if (t) return t;
- let n = oT[e], r = n ? ({ className: t }) => /* @__PURE__ */ (0, L.jsx)("svg", {
+ let n = iT[e], r = n ? ({ className: t }) => /* @__PURE__ */ (0, L.jsx)("svg", {
"aria-hidden": !0,
viewBox: `0 0 ${(24 * n).toFixed(2)} 24`,
className: `shrink-0 fill-current ${t ?? "h-4 w-auto"}`,
@@ -27789,18 +27789,18 @@ function cT(e) {
className: `shrink-0 stroke-current stroke-2 ${t ?? "size-4"}`,
children: /* @__PURE__ */ (0, L.jsx)("use", { href: `#i-${e}` })
});
- return r.displayName = `SpriteGlyph(${e})`, sT.set(e, r), r;
+ return r.displayName = `SpriteGlyph(${e})`, aT.set(e, r), r;
}
//#endregion
//#region src/react/components/use-stack-flip.ts
-var lT = 1100, uT = 340, dT = 5e3;
-function fT(e, t, n) {
+var sT = 1100, cT = 340, lT = 5e3;
+function uT(e, t, n) {
return new Promise((r) => {
let i = new Image();
n && (i.referrerPolicy = n);
let a = !1, o = (e) => {
a || (a = !0, clearTimeout(c), i.onload = null, i.onerror = null, t.cancels.delete(s), r(e));
- }, s = () => o(!1), c = setTimeout(s, dT);
+ }, s = () => o(!1), c = setTimeout(s, lT);
t.cancels.add(s), i.onerror = s, i.onload = () => {
if (!i.naturalWidth) {
o(!1);
@@ -27810,7 +27810,7 @@ function fT(e, t, n) {
}, i.src = e;
});
}
-function pT({ load: e, canFlip: t, referrerPolicy: n }) {
+function dT({ load: e, canFlip: t, referrerPolicy: n }) {
let [r, i] = (0, I.useState)([]), [a, o] = (0, I.useState)(0), [s, c] = (0, I.useState)(null), l = (0, I.useRef)({
live: !1,
generation: 0,
@@ -27852,11 +27852,11 @@ function pT({ load: e, canFlip: t, referrerPolicy: n }) {
return;
}
if (!r() || !u.current.canFlip() || a.length < 2) return;
- let s = await Promise.all(a.map((t) => fT(t, e, n)));
+ let s = await Promise.all(a.map((t) => uT(t, e, n)));
if (!r() || !u.current.canFlip()) return;
let d = a.filter((e, t) => s[t]);
d.length < 2 || (e.count = d.length, e.at = 0, i(d), o(0), c(null), f(420, () => {
- p(), e.cycle = setInterval(p, lT);
+ p(), e.cycle = setInterval(p, sT);
}));
};
return (0, I.useEffect)(() => d, [d]), {
@@ -27865,7 +27865,7 @@ function pT({ load: e, canFlip: t, referrerPolicy: n }) {
leaving: s,
onPointerEnter: () => {
let e = l.current;
- e.armed !== null && (clearTimeout(e.armed), e.timers.delete(e.armed)), e.armed = f(uT, () => {
+ e.armed !== null && (clearTimeout(e.armed), e.timers.delete(e.armed)), e.armed = f(cT, () => {
e.armed = null, m();
});
},
@@ -27876,8 +27876,8 @@ function pT({ load: e, canFlip: t, referrerPolicy: n }) {
}
//#endregion
//#region src/react/components/mix-card.tsx
-var mT = cT("play");
-function hT({ src: e }) {
+var fT = oT("play");
+function pT({ src: e }) {
let [t, n] = (0, I.useState)(!1);
return t ? null : /* @__PURE__ */ (0, L.jsx)("img", {
"data-mix-poster": "",
@@ -27888,8 +27888,8 @@ function hT({ src: e }) {
className: "absolute inset-0 block size-full object-contain"
});
}
-var gT = "relative inline-grid size-9.5 flex-none place-items-center overflow-hidden rounded-full bg-background-secondary-default text-body-2-regular text-text-secondary [&_img]:absolute [&_img]:inset-0 [&_img]:block [&_img]:size-full [&_img]:object-cover";
-function _T({ faces: e, fallback: t, faceAvatar: n, onOpenEntity: r }) {
+var mT = "relative inline-grid size-9.5 flex-none place-items-center overflow-hidden rounded-full bg-background-secondary-default text-body-2-regular text-text-secondary [&_img]:absolute [&_img]:inset-0 [&_img]:block [&_img]:size-full [&_img]:object-cover";
+function hT({ faces: e, fallback: t, faceAvatar: n, onOpenEntity: r }) {
return e.length ? /* @__PURE__ */ (0, L.jsx)("div", {
"data-mix-avatars": "",
children: e.slice(0, 5).map((e) => /* @__PURE__ */ (0, L.jsx)("button", {
@@ -27897,18 +27897,18 @@ function _T({ faces: e, fallback: t, faceAvatar: n, onOpenEntity: r }) {
title: `打开资料页:${e.name}`,
"aria-label": `打开资料页:${e.name}`,
onClick: () => r(e.kind, e.name),
- className: `${gT} cursor-pointer outline-none`,
+ className: `${mT} cursor-pointer outline-none`,
dangerouslySetInnerHTML: { __html: n(e) }
}, `${e.kind}:${e.id}`))
}) : /* @__PURE__ */ (0, L.jsx)("span", {
"data-mix-initial": "",
"aria-hidden": !0,
- className: `${gT} mt-0.5`,
+ className: `${mT} mt-0.5`,
children: t
});
}
-function vT({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip: a, faces: o, faceAvatar: s, onOpenEntity: c, onOpen: l, openLabel: u, menu: d, ratio: f, artwork: p, artworkIdentity: m, relayoutArt: h, faceHtml: g, badge: _, glyph: v, wholeCard: y, ...b }) {
- let x = pT({
+function gT({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip: a, faces: o, faceAvatar: s, onOpenEntity: c, onOpen: l, openLabel: u, menu: d, ratio: f, artwork: p, artworkIdentity: m, relayoutArt: h, faceHtml: g, badge: _, glyph: v, wholeCard: y, ...b }) {
+ let x = dT({
load: i,
canFlip: a
}), S = (0, I.useRef)(x.onPointerLeave);
@@ -27935,11 +27935,11 @@ function vT({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip:
style: f === void 0 ? void 0 : { "--card-ratio": String(f) },
className: "relative z-1 flex aspect-video items-center justify-center overflow-hidden rounded-surface",
children: [
- p?.html ? /* @__PURE__ */ (0, L.jsx)(qw, {
+ p?.html ? /* @__PURE__ */ (0, L.jsx)(Kw, {
artwork: p,
identity: m,
relayout: h
- }) : r ? /* @__PURE__ */ (0, L.jsx)(hT, { src: r }, r) : /* @__PURE__ */ (0, L.jsx)("span", {
+ }) : r ? /* @__PURE__ */ (0, L.jsx)(pT, { src: r }, r) : /* @__PURE__ */ (0, L.jsx)("span", {
className: "text-caption-1-regular tracking-caps text-text-secondary uppercase",
children: "无预览"
}),
@@ -27969,7 +27969,7 @@ function vT({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip:
/* @__PURE__ */ (0, L.jsxs)("span", {
"data-mix-badge": "",
className: "absolute right-2.25 bottom-2.25 z-6 flex min-h-7 items-center gap-1.5 rounded-2lg px-2.25 py-1 text-caption-1-semibold text-text-white",
- children: [/* @__PURE__ */ (0, L.jsx)(mT, {
+ children: [/* @__PURE__ */ (0, L.jsx)(fT, {
"aria-hidden": !0,
className: "size-3.75"
}), _ ?? `${n} 个视频`]
@@ -27982,8 +27982,8 @@ function vT({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip:
v ? /* @__PURE__ */ (0, L.jsx)("span", {
"data-mix-glyph": "",
"aria-hidden": !0,
- children: /* @__PURE__ */ (0, L.jsx)(mT, {})
- }) : /* @__PURE__ */ (0, L.jsx)(_T, {
+ children: /* @__PURE__ */ (0, L.jsx)(fT, {})
+ }) : /* @__PURE__ */ (0, L.jsx)(hT, {
faces: o,
fallback: e.slice(0, 1),
faceAvatar: s,
@@ -28008,21 +28008,21 @@ function vT({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip:
}
//#endregion
//#region src/react/catalog-grid/catalog-grid-page.tsx
-var yT = "";
-function bT(e) {
- if (e.mode === "items") return /* @__PURE__ */ (0, L.jsx)(ST, { ...e });
- let t = e.mode === "entity" ? `entity:${e.entityKey || ""}:${e.revision}` : `catalog:${zw(e.filters || {}, !!e.excludeVertical)}:${e.batchSize || 60}:${e.revision}`;
- return /* @__PURE__ */ (0, L.jsx)(CT, { ...e }, t);
+var _T = "";
+function vT(e) {
+ if (e.mode === "items") return /* @__PURE__ */ (0, L.jsx)(bT, { ...e });
+ let t = e.mode === "entity" ? `entity:${e.entityKey || ""}:${e.revision}` : `catalog:${Rw(e.filters || {}, !!e.excludeVertical)}:${e.batchSize || 60}:${e.revision}`;
+ return /* @__PURE__ */ (0, L.jsx)(xT, { ...e }, t);
}
-function xT({ name: e }) {
+function yT({ name: e }) {
return /* @__PURE__ */ (0, L.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, L.jsx)("use", { href: `#i-${e}` })
});
}
-function ST(e) {
- let { actions: t } = e, n = (0, I.useCallback)((e, n) => t.open(e, n), [t]), r = e.variant === "next" ? "next" : "grid", i = (e.items || []).map((i) => /* @__PURE__ */ (0, L.jsx)(aT, {
+function bT(e) {
+ let { actions: t } = e, n = (0, I.useCallback)((e, n) => t.open(e, n), [t]), r = e.variant === "next" ? "next" : "grid", i = (e.items || []).map((i) => /* @__PURE__ */ (0, L.jsx)(rT, {
item: i,
variant: r,
layout: e.layout,
@@ -28042,8 +28042,8 @@ function ST(e) {
children: i
});
}
-function CT(e) {
- let { helpers: t, actions: n, layout: r } = e, i = e.mode === "entity", a = !i && e.filters?.state === "trash", o = i ? yre(e) : Bw(e), s = i && e.initial ? {
+function xT(e) {
+ let { helpers: t, actions: n, layout: r } = e, i = e.mode === "entity", a = !i && e.filters?.state === "trash", o = i ? bre(e) : zw(e), s = i && e.initial ? {
pages: [{
...e.initial,
items: e.initial.items || [],
@@ -28063,7 +28063,7 @@ function CT(e) {
(0, I.useEffect)(() => {
c.isPending || l.current || (l.current = !0, e.settled?.(e.revision));
}, [c.isPending]);
- let { tiles: u, pageStarts: f } = (0, I.useMemo)(() => wre(c.data?.pages || [], {
+ let { tiles: u, pageStarts: f } = (0, I.useMemo)(() => Tre(c.data?.pages || [], {
collapse: e.groupCollapse !== !1,
mix: !!e.mix && !a,
javImage: r.javImage
@@ -28073,14 +28073,14 @@ function CT(e) {
e.mix,
a,
r.javImage
- ]), p = u.reduce((e, t) => e + +(t.kind === "card"), 0), m = Number(c.data?.pages[0]?.total || 0), h = Hw(c.isPending, e.skeletonHtml), g = (0, I.useRef)(null), _ = TT(e, c.data, u, f, g);
+ ]), p = u.reduce((e, t) => e + +(t.kind === "card"), 0), m = Number(c.data?.pages[0]?.total || 0), h = Vw(c.isPending, e.skeletonHtml), g = (0, I.useRef)(null), _ = CT(e, c.data, u, f, g);
(0, I.useLayoutEffect)(() => {
if (!c.data) return;
e.onCount?.(m, p);
let t = a ? null : e.countRow?.querySelector("[data-count-readout]");
if (!t) return;
let n = `${m.toLocaleString()} 个符合 · 显示 ${p}`;
- yT && (t.dataset.popCount = yT), yT = n, T(t, n);
+ _T && (t.dataset.popCount = _T), _T = n, T(t, n);
}, [
c.data,
m,
@@ -28089,12 +28089,12 @@ function CT(e) {
let v = (0, I.useCallback)((e, t) => n.open(e, t), [n]), y = (0, I.useCallback)((e, t) => n.openResource(e, t), [n]), b = (0, I.useCallback)((e) => n.openShort(e), [n]), x = (0, I.useCallback)(async () => {
let e = await c.fetchNextPage({ cancelRefetch: !1 });
if (e.isFetchNextPageError) throw e.error;
- }, [c.fetchNextPage]), S = (i) => i.kind === "mix" ? /* @__PURE__ */ (0, L.jsx)(OT, {
+ }, [c.fetchNextPage]), S = (i) => i.kind === "mix" ? /* @__PURE__ */ (0, L.jsx)(ET, {
seed: i.seed,
layout: r,
helpers: t,
actions: n
- }, `mix:${i.seed.id}`) : /* @__PURE__ */ (0, L.jsx)(aT, {
+ }, `mix:${i.seed.id}`) : /* @__PURE__ */ (0, L.jsx)(rT, {
item: i.item,
variant: a && i.item.medium && i.item.medium !== "video" ? "resource" : "grid",
layout: r,
@@ -28111,7 +28111,7 @@ function CT(e) {
"data-grid-reveal": h.fading ? "" : void 0,
children: [h.layer, (() => {
if (c.isPending) return null;
- if (!c.data) return /* @__PURE__ */ (0, L.jsx)(Uw, {
+ if (!c.data) return /* @__PURE__ */ (0, L.jsx)(Hw, {
message: d(c.error),
onRetry: () => void c.refetch()
});
@@ -28128,15 +28128,15 @@ function CT(e) {
return /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)("div", {
"data-media-sections": "",
"data-select-mode": e.selectMode ? "" : void 0,
- children: Dre(u, _).map((t) => /* @__PURE__ */ (0, L.jsxs)(I.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)("div", {
+ children: Ore(u, _).map((t) => /* @__PURE__ */ (0, L.jsxs)(I.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)("div", {
"data-media-grid": "",
children: t.tiles.map(S)
- }), t.strip ? /* @__PURE__ */ (0, L.jsx)(ET, {
+ }), t.strip ? /* @__PURE__ */ (0, L.jsx)(wT, {
cut: t.strip,
props: e,
onOpen: b
}) : null] }, t.start))
- }), c.hasNextPage ? /* @__PURE__ */ (0, L.jsx)(wT, {
+ }), c.hasNextPage ? /* @__PURE__ */ (0, L.jsx)(ST, {
entity: i,
load: x,
enabled: () => e.canLoadMore?.() !== !1
@@ -28144,7 +28144,7 @@ function CT(e) {
})()]
});
}
-function wT({ entity: e, load: t, enabled: n, children: r }) {
+function ST({ entity: e, load: t, enabled: n, children: r }) {
let i = (0, I.useRef)(null), a = (0, I.useRef)(!1), o = (0, I.useRef)(!1), [s, c] = (0, I.useState)({
busy: !1,
error: ""
@@ -28205,12 +28205,12 @@ function wT({ entity: e, load: t, enabled: n, children: r }) {
...p,
onClick: () => void u(!0),
dangerouslySetInnerHTML: { __html: x("继续载入中…") }
- }), s.error ? /* @__PURE__ */ (0, L.jsx)(Uw, {
+ }), s.error ? /* @__PURE__ */ (0, L.jsx)(Hw, {
message: s.error,
onRetry: () => void u(!0)
}) : null] });
}
-function TT(e, t, n, r, i) {
+function CT(e, t, n, r, i) {
let [a, o] = (0, I.useState)([]), [s, c] = (0, I.useState)(null), l = (0, I.useRef)(0), u = (0, I.useRef)(0), d = (0, I.useRef)([]);
return (0, I.useEffect)(() => () => d.current.forEach((e) => e.abort()), []), (0, I.useEffect)(() => {
let n = t?.pages.length || 0;
@@ -28219,7 +28219,7 @@ function TT(e, t, n, r, i) {
let r = new AbortController();
d.current.push(r);
let i = n - 1;
- gw(`/api/items?${Ere(e.filters || {}, l.current)}`, r.signal).then((t) => {
+ hw(`/api/items?${Dre(e.filters || {}, l.current)}`, r.signal).then((t) => {
let n = t.items || [];
if (!n.length) {
l.current = 0;
@@ -28235,7 +28235,7 @@ function TT(e, t, n, r, i) {
}, [t]), (0, I.useLayoutEffect)(() => {
if (!s) return;
c(null);
- let e = a.reduce((e, t) => Math.max(e, t.at), 0), t = i.current?.querySelectorAll("[data-media-sections] > [data-media-grid]"), u = t?.[t.length - 1], d = u ? Math.max(1, getComputedStyle(u).gridTemplateColumns.split(" ").length) : 1, f = Math.max(0, (r[s.page] ?? 0) - e), p = Tre(n.length - e, f, d);
+ let e = a.reduce((e, t) => Math.max(e, t.at), 0), t = i.current?.querySelectorAll("[data-media-sections] > [data-media-grid]"), u = t?.[t.length - 1], d = u ? Math.max(1, getComputedStyle(u).gridTemplateColumns.split(" ").length) : 1, f = Math.max(0, (r[s.page] ?? 0) - e), p = Ere(n.length - e, f, d);
if (!p.length) return;
let m = e + (p[Math.floor(Math.random() * p.length)] ?? 0);
l.current = s.more ? l.current + 18 : 0, o((e) => [...e, {
@@ -28245,7 +28245,7 @@ function TT(e, t, n, r, i) {
}]);
}, [s]), a;
}
-function ET({ cut: e, props: t, onOpen: n }) {
+function wT({ cut: e, props: t, onOpen: n }) {
let r = (0, I.useRef)(null), { wireDrag: i } = t;
return (0, I.useEffect)(() => {
r.current && i(r.current);
@@ -28261,12 +28261,12 @@ function ET({ cut: e, props: t, onOpen: n }) {
type: "button",
"data-shorts-enter": "",
onClick: () => t.actions.openShorts(),
- children: [/* @__PURE__ */ (0, L.jsx)(xT, { name: "gallery-vertical-end" }), /* @__PURE__ */ (0, L.jsx)("span", { children: "进入沉浸模式" })]
+ children: [/* @__PURE__ */ (0, L.jsx)(yT, { name: "gallery-vertical-end" }), /* @__PURE__ */ (0, L.jsx)("span", { children: "进入沉浸模式" })]
})
] }), /* @__PURE__ */ (0, L.jsx)("div", {
ref: r,
"data-shorts-row": "",
- children: e.items.map((e) => /* @__PURE__ */ (0, L.jsx)(aT, {
+ children: e.items.map((e) => /* @__PURE__ */ (0, L.jsx)(rT, {
item: e,
variant: "short",
layout: t.layout,
@@ -28280,9 +28280,9 @@ function ET({ cut: e, props: t, onOpen: n }) {
})]
});
}
-function DT(e, t, n, r) {
+function TT(e, t, n, r) {
let i = t.active && !!e.is_jav;
- return e.is_jav ? Gw(e, i ? t.size : "small", n, t.javImage, r.coverHtml) : !e.has_thumb && !e.has_local_poster ? {
+ return e.is_jav ? Ww(e, i ? t.size : "small", n, t.javImage, r.coverHtml) : !e.has_thumb && !e.has_local_poster ? {
kind: "",
html: ""
} : {
@@ -28290,18 +28290,18 @@ function DT(e, t, n, r) {
html: `<img class="poster" src="/poster?id=${e.id}&c=4" alt="" loading="${n ? "eager" : "lazy"}">`
};
}
-function OT({ seed: e, layout: t, helpers: n, actions: r }) {
+function ET({ seed: e, layout: t, helpers: n, actions: r }) {
let i = (0, I.useRef)(/* @__PURE__ */ new Map()), a = (0, I.useRef)(t);
a.current = t;
- let o = Sre(e, n.tagLabel), s = (0, I.useCallback)(async () => {
- let t = a.current, o = [e, ...await r.mixRelated(e.id)].filter((e) => Vw(e, t.javImage)).slice(0, 9);
- return i.current = new Map(o.map((e) => [String(e.id), DT(e, t, !0, n).html])), o.map((e) => String(e.id));
+ let o = Cre(e, n.tagLabel), s = (0, I.useCallback)(async () => {
+ let t = a.current, o = [e, ...await r.mixRelated(e.id)].filter((e) => Bw(e, t.javImage)).slice(0, 9);
+ return i.current = new Map(o.map((e) => [String(e.id), TT(e, t, !0, n).html])), o.map((e) => String(e.id));
}, [
e,
r,
n
- ]), c = t.active && e.is_jav ? t.size : "small", l = DT(e, t, !1, n);
- return /* @__PURE__ */ (0, L.jsx)(vT, {
+ ]), c = t.active && e.is_jav ? t.size : "small", l = TT(e, t, !1, n);
+ return /* @__PURE__ */ (0, L.jsx)(gT, {
"data-mix-seed": String(e.id),
name: `Mix · ${o}`,
caption: `${n.displayName(e, e.name || "")}及相似作品`,
@@ -28311,12 +28311,12 @@ function OT({ seed: e, layout: t, helpers: n, actions: r }) {
wholeCard: !0,
poster: null,
artwork: l,
- artworkIdentity: c === "small" ? l.html : DT(e, {
+ artworkIdentity: c === "small" ? l.html : TT(e, {
...t,
size: "small"
}, !1, n).html,
relayoutArt: (e) => n.relayoutArt(e, c),
- ratio: Zw(e, "grid", t),
+ ratio: Yw(e, "grid", t),
flipImages: s,
faceHtml: (e) => i.current.get(e) || "",
canFlip: r.canFlip,
@@ -28329,32 +28329,32 @@ function OT({ seed: e, layout: t, helpers: n, actions: r }) {
}
//#endregion
//#region src/react/media-sources.ts
-var kT = "/api/sources", AT = ["media-sources"], jT = (e) => gw(kT, e);
-async function MT(e) {
+var DT = "/api/sources", OT = ["media-sources"], kT = (e) => hw(DT, e);
+async function AT(e) {
await X.fetchQuery({
- queryKey: AT,
- queryFn: () => jT(e)
+ queryKey: OT,
+ queryFn: () => kT(e)
});
}
-var NT = [
+var jT = [
"local",
"115",
"pikpak"
-], PT = (e) => (e?.sources ?? []).filter((e) => ["115", "pikpak"].includes(e.location) && (e.roots === void 0 || e.roots.length > 0)).map((e) => e.location), FT = "/api/duplicates?limit=120", IT = ["duplicates"], LT = "/api/batch", RT = (e) => gw(FT, e);
-async function zT(e) {
+], MT = (e) => (e?.sources ?? []).filter((e) => ["115", "pikpak"].includes(e.location) && (e.roots === void 0 || e.roots.length > 0)).map((e) => e.location), NT = "/api/duplicates?limit=120", PT = ["duplicates"], FT = "/api/batch", IT = (e) => hw(NT, e);
+async function LT(e) {
await Promise.all([X.fetchQuery({
- queryKey: IT,
- queryFn: () => RT(e)
- }), MT(e)]);
+ queryKey: PT,
+ queryFn: () => IT(e)
+ }), AT(e)]);
}
-var BT = {
+var RT = {
largest: "最大的一个",
longest: "最长的一个",
115: "115(没有则留最大)",
pikpak: "PikPak(没有则留最大)",
all: "零个文件"
-}, VT = (e, t) => t.filter((t) => e.some((e) => e.location === t)), HT = (e, t) => VT(e, t).filter((t) => e.some((e) => e.location !== t)), UT = (e, t) => t.filter((t) => e.some((e) => HT(e.files, [t]).length));
-function WT(e, t) {
+}, zT = (e, t) => t.filter((t) => e.some((e) => e.location === t)), BT = (e, t) => zT(e, t).filter((t) => e.some((e) => e.location !== t)), VT = (e, t) => t.filter((t) => e.some((e) => BT(e.files, [t]).length));
+function HT(e, t) {
let n = [];
for (let r of e) {
if (t === "all") {
@@ -28373,47 +28373,47 @@ function WT(e, t) {
}
return n;
}
-function GT(e, t) {
+function UT(e, t) {
let n = new Set(t);
return e.reduce((e, t) => e + t.files.reduce((e, t) => e + (n.has(t.id) && t.size || 0), 0), 0);
}
-async function KT(e, t) {
- for (let n = 0; n < e.length; n += 200) await q(LT, {
+async function WT(e, t) {
+ for (let n = 0; n < e.length; n += 200) await q(FT, {
ids: e.slice(n, n + 200),
operation: t
});
}
//#endregion
//#region src/react/library-processing/library-processing.ts
-var qT = "/api/library-processing", JT = ["library-processing"], YT = (e) => gw(qT, e);
-async function XT(e) {
+var GT = "/api/library-processing", KT = ["library-processing"], qT = (e) => hw(GT, e);
+async function JT(e) {
await X.fetchQuery({
- queryKey: JT,
- queryFn: () => YT(e)
+ queryKey: KT,
+ queryFn: () => qT(e)
});
}
-var ZT = 2e3, QT = 1e4, $T = "连接中断,正在重新读取处理进度";
-function eE(e, t) {
- return e?.status === "running" ? ZT : t ? QT : !1;
+var YT = 2e3, XT = 1e4, ZT = "连接中断,正在重新读取处理进度";
+function QT(e, t) {
+ return e?.status === "running" ? YT : t ? XT : !1;
}
-var tE = {
+var $T = {
reading_local: "读取本地资料",
querying_metadata: "查询外部资料",
fetching_cover: "采集缺失封面",
writing_candidates: "保存资料候选"
-}, nE = {
+}, eE = {
querying_metadata: "没有资料",
fetching_cover: "没有封面"
};
-function rE(e) {
- let t = Object.entries(e).filter(([e, t]) => nE[e] && t > 0).map(([e, t]) => `${nE[e]} ${t} 部`);
+function tE(e) {
+ let t = Object.entries(e).filter(([e, t]) => eE[e] && t > 0).map(([e, t]) => `${eE[e]} ${t} 部`);
return t.length ? `外部来源${t.join("、")},7 天内不再问。` : "";
}
-function iE(e) {
- let t = tE[e.current_action || ""] || e.stage || "正在处理", n = e.waited_seconds ? ` · 已等待 ${e.waited_seconds} 秒` : "";
+function nE(e) {
+ let t = $T[e.current_action || ""] || e.stage || "正在处理", n = e.waited_seconds ? ` · 已等待 ${e.waited_seconds} 秒` : "";
return e.current_asset_name ? `当前:${e.current_asset_name} · ${t}${n}` : t + n;
}
-function aE(e) {
+function rE(e) {
let t = e.issue_preview || [];
return t.length ? {
label: e.issues_truncated ? `问题清单:共 ${e.issue_count || 0} 项,展开查看前 ${t.length} 项` : `问题清单:共 ${e.issue_count || 0} 项`,
@@ -28427,21 +28427,21 @@ function aE(e) {
log: e.issues_log || ""
} : null;
}
-var oE = "peach.library-processing.announced", sE = 120;
-function cE(e, t, n) {
+var iE = "peach.library-processing.announced", aE = 120;
+function oE(e, t, n) {
if (e.status !== "complete") return;
- let r = !!e.job_id && !!e.completed_at && Date.now() / 1e3 - e.completed_at < sE;
+ let r = !!e.job_id && !!e.completed_at && Date.now() / 1e3 - e.completed_at < aE;
if (!(!n && !r)) {
try {
- if (e.job_id && localStorage.getItem(oE) === e.job_id) return;
- e.job_id && localStorage.setItem(oE, e.job_id);
+ if (e.job_id && localStorage.getItem(iE) === e.job_id) return;
+ e.job_id && localStorage.setItem(iE, e.job_id);
} catch {}
t(`扫描与资料采集已完成:识别 ${e.identified || 0} 个番号,整理 ${e.candidates || 0} 组资料候选,自动落库 ${e.auto_applied || 0} 条`);
}
}
//#endregion
//#region src/react/media-repair/media-repair.ts
-var lE = "/api/media-repair", uE = ["media-repair"], dE = ["media-repair", "libraries"], fE = {
+var sE = "/api/media-repair", cE = ["media-repair"], lE = ["media-repair", "libraries"], uE = {
status: "idle",
library: "",
stage: "",
@@ -28453,33 +28453,33 @@ var lE = "/api/media-repair", uE = ["media-repair"], dE = ["media-repair", "libr
missing_tool: 0,
skipped: 0,
message: ""
-}, pE = (e) => gw(lE, e), mE = async (e) => (await gw("/api/libraries", e)).libraries || [];
-async function hE(e) {
+}, dE = (e) => hw(sE, e), fE = async (e) => (await hw("/api/libraries", e)).libraries || [];
+async function pE(e) {
await Promise.all([X.fetchQuery({
- queryKey: uE,
- queryFn: () => pE(e)
+ queryKey: cE,
+ queryFn: () => dE(e)
}), X.fetchQuery({
- queryKey: dE,
- queryFn: () => mE(e)
+ queryKey: lE,
+ queryFn: () => fE(e)
})]);
}
-var gE = (e) => Number(e).toLocaleString();
-function _E(e) {
+var mE = (e) => Number(e).toLocaleString();
+function hE(e) {
if (e.status === "running") {
- let t = e.total ? `${gE(e.checked)} / ${gE(e.total)}` : "准备中";
+ let t = e.total ? `${mE(e.checked)} / ${mE(e.total)}` : "准备中";
return e.stage === "修复" && e.message ? `修复 ${t} · ${e.message}` : `${e.stage || "扫描"} ${t}`;
}
- return e.status === "complete" && (e.repaired || e.failed) ? e.failed ? `修好 ${gE(e.repaired)} 部,${gE(e.failed)} 部修不了` : `修好 ${gE(e.repaired)} 部` : "";
+ return e.status === "complete" && (e.repaired || e.failed) ? e.failed ? `修好 ${mE(e.repaired)} 部,${mE(e.failed)} 部修不了` : `修好 ${mE(e.repaired)} 部` : "";
}
-var vE = (e) => `${gE(e.missing_tool)} 部缺索引的片子要装上 untrunc 才修得了,下载入口在配置页的「运行信息」里。`, yE = "/api/quality-goals?limit=200", bE = ["quality-goals"], xE = (e) => gw(yE, e);
-async function SE(e) {
+var gE = (e) => `${mE(e.missing_tool)} 部缺索引的片子要装上 untrunc 才修得了,下载入口在配置页的「运行信息」里。`, _E = "/api/quality-goals?limit=200", vE = ["quality-goals"], yE = (e) => hw(_E, e);
+async function bE(e) {
await X.fetchQuery({
- queryKey: bE,
- queryFn: () => xE(e)
+ queryKey: vE,
+ queryFn: () => yE(e)
});
}
-var CE = (e) => e.has_cover ? `/cover?code=${encodeURIComponent(e.code ?? "")}` : `/poster?id=${e.id}&c=4`;
-function wE(e, t, n = 1) {
+var xE = (e) => e.has_cover ? `/cover?code=${encodeURIComponent(e.code ?? "")}` : `/poster?id=${e.id}&c=4`;
+function SE(e, t, n = 1) {
let r = (e, t) => Array.from({ length: t - e + 1 }, (t, n) => e + n);
if (n * 2 + 5 >= t) return r(1, t);
let i = Math.max(e - n, 1), a = Math.min(e + n, t), o = i > 2, s = a < t - 2;
@@ -28499,21 +28499,21 @@ function wE(e, t, n = 1) {
t
];
}
-function TE(e, t) {
+function CE(e, t) {
return Math.max(1, Math.ceil(e / t));
}
-function EE(e, t) {
+function wE(e, t) {
return Math.min(Math.max(1, Math.floor(e) || 1), t);
}
//#endregion
//#region src/selection.ts
-function DE(e, t, n, r, i, a = i || !e.has(r)) {
+function TE(e, t, n, r, i, a = i || !e.has(r)) {
let o = n === null ? -1 : t.indexOf(n), s = t.indexOf(r);
return i && o >= 0 && s >= 0 ? t.slice(Math.min(o, s), Math.max(o, s) + 1).forEach((t) => e.add(t)) : a ? e.add(r) : e.delete(r), r;
}
//#endregion
//#region src/react/time.ts
-function OE(e) {
+function EE(e) {
if (!e) return "";
let t = /[Zz]|[+-]\d\d:?\d\d$/.test(e) ? e : `${e}Z`, n = new Date(t);
if (Number.isNaN(n.getTime())) return String(e).replace("T", " ").slice(0, 16);
@@ -28522,7 +28522,7 @@ function OE(e) {
}
//#endregion
//#region src/react/review/review.ts
-var kE = "/api/review", AE = "/api/review/decision", jE = "/api/review/genre", ME = ["review"], NE = {
+var DE = "/api/review", OE = "/api/review/decision", kE = "/api/review/genre", AE = ["review"], jE = {
metadata_fields: "元数据字段",
creator_tags: "创作者标签",
studio_logos: "厂牌 Logo",
@@ -28532,15 +28532,15 @@ var kE = "/api/review", AE = "/api/review/decision", jE = "/api/review/genre", M
fc2_markings: "FC2 评论标记",
fc2_similarity: "FC2 跨号相似",
video_endcards: "片尾/出处证据"
-}, PE = Object.keys(NE), FE = "metadata_fields", IE = (e) => typeof e == "string" && Object.hasOwn(NE, e), LE = {
+}, ME = Object.keys(jE), NE = "metadata_fields", PE = (e) => typeof e == "string" && Object.hasOwn(jE, e), FE = {
creator_tags: "creator",
western_identity: "creator"
};
-function RE(e, t) {
+function IE(e, t) {
let n = [["candidates", t ? "按候选数量" : "全部待复核"]];
return e.some((e) => e.source || e.candidates?.some((e) => e.source)) && n.push(["source", "按来源"]), e.some((e) => e.field) && n.push(["field", "按字段"]), n;
}
-function zE(e, t) {
+function LE(e, t) {
let n = /* @__PURE__ */ new Map();
for (let r of e) {
let e, i;
@@ -28557,43 +28557,43 @@ function zE(e, t) {
}
return [...n.values()];
}
-function BE(e, t, n) {
- return n && zE(e, t).find((e) => e.key === n)?.rows || e;
+function RE(e, t, n) {
+ return n && LE(e, t).find((e) => e.key === n)?.rows || e;
}
-function VE(e, t) {
- let n = TE(e.length, 20), r = EE(t, n);
+function zE(e, t) {
+ let n = CE(e.length, 20), r = wE(t, n);
return {
page: r,
pages: n,
rows: e.slice((r - 1) * 20, r * 20)
};
}
-function HE(e) {
+function BE(e) {
return e.length ? [...new Set(e.flatMap((e) => e.candidates?.map((e) => e.source || "") || []))].filter((t) => t && e.every((e) => e.candidates?.filter((e) => e.source === t).length === 1)) : [];
}
-function UE(e, t, n, r, i, a) {
- return DE(e, t, n, r, i, a);
+function VE(e, t, n, r, i, a) {
+ return TE(e, t, n, r, i, a);
}
-function WE(e, t) {
+function HE(e, t) {
return e === "metadata_fields" ? (t.candidates?.length || 0) > 0 : e !== "creator_tags" || String(t.status || "").trim() === "candidate";
}
-function GE(e, t) {
+function UE(e, t) {
return String(e === "metadata_fields" ? t.query || t.code || "" : t.creator || t.studio || t.current_name || t.name || t.item_key);
}
-var KE = (e, t) => e === "metadata_fields" ? String(t.field_label || t.field || "").trim() : "";
-function qE(e, t) {
- let n = GE(e, t), r = KE(e, t);
+var WE = (e, t) => e === "metadata_fields" ? String(t.field_label || t.field || "").trim() : "";
+function GE(e, t) {
+ let n = UE(e, t), r = WE(e, t);
return r ? `${n} · ${r}` : n;
}
-var JE = (e) => e.reason || e.evidence || e.note || e.decision_note || "", YE = (e) => String(e.tags || "").split("|").filter(Boolean), XE = (e) => [...new Set((e.candidates || []).flatMap((e) => e.unmapped_genres || []))];
-function ZE(e) {
+var KE = (e) => e.reason || e.evidence || e.note || e.decision_note || "", qE = (e) => String(e.tags || "").split("|").filter(Boolean), JE = (e) => [...new Set((e.candidates || []).flatMap((e) => e.unmapped_genres || []))];
+function YE(e) {
let t = e.candidates || [];
return {
candidateKey: t.length === 1 ? t[0].candidate_key : "",
assets: (e.preview_assets || []).map((e) => e.id)
};
}
-function QE(e, t, n, r) {
+function XE(e, t, n, r) {
let i = !!t.asset_path && t.asset_mutation_revision != null;
return {
category: e,
@@ -28609,19 +28609,19 @@ function QE(e, t, n, r) {
...i ? { expected_revision: t.asset_mutation_revision } : {}
};
}
-var jre = (e) => e === "approved" ? "已通过候选" : e === "rejected" ? "已拒绝候选" : "已跳过候选", $E = (e) => gw(kE, e), eD = (e) => q(AE, e), Mre = (e, t) => q(jE, {
+var Nre = (e) => e === "approved" ? "已通过候选" : e === "rejected" ? "已拒绝候选" : "已跳过候选", ZE = (e) => hw(DE, e), QE = (e) => q(OE, e), Pre = (e, t) => q(kE, {
genre: e,
tag: t
});
-async function Nre(e) {
+async function Fre(e) {
await X.fetchQuery({
- queryKey: ME,
- queryFn: () => $E(e)
+ queryKey: AE,
+ queryFn: () => ZE(e)
});
}
-function tD(e, t) {
+function $E(e, t) {
let n = new Set(t);
- n.size && X.setQueryData(ME, (t) => {
+ n.size && X.setQueryData(AE, (t) => {
if (!t) return t;
let r = t.sections[e] || [], i = r.filter((e) => !n.has(String(e.item_key)));
return i.length === r.length ? t : {
@@ -28637,161 +28637,161 @@ function tD(e, t) {
};
});
}
-var Pre = () => X.invalidateQueries({
- queryKey: ME,
+var Ire = () => X.invalidateQueries({
+ queryKey: AE,
exact: !0
});
-function Fre(e, t) {
- return e?.state === "live" ? "正在显示写入端的实时复核队列" : e?.state === "cached" ? `写入端暂时不可达,显示 ${OE(e.fetched_at)} 的缓存` : e?.error || t;
+function Lre(e, t) {
+ return e?.state === "live" ? "正在显示写入端的实时复核队列" : e?.state === "cached" ? `写入端暂时不可达,显示 ${EE(e.fetched_at)} 的缓存` : e?.error || t;
}
//#endregion
//#region src/react/data-cleanup/links.ts
-var Ire = "/api/links", nD = "/api/links/check", rD = "/api/links/prune", iD = ["links"], aD = ["links", "check"], oD = ["links", "prune"], sD = {
+var Rre = "/api/links", eD = "/api/links/check", tD = "/api/links/prune", nD = ["links"], rD = ["links", "check"], iD = ["links", "prune"], aD = {
official: "官网/事务所",
social: "社交账号",
catalog: "作品资料站",
source_reference: "资料出处"
};
-async function cD(e) {
+async function oD(e) {
let t = await e;
if (t.ok === !1) throw Error(t.error || "操作未完成,请重试");
return t;
}
-var lD = (e) => gw(Ire, e), uD = (e) => q(nD, { status_only: !0 }, "POST", e), Lre = ({ retry: e, checkId: t }) => cD(q(nD, e ? {
+var sD = (e) => hw(Rre, e), cD = (e) => q(eD, { status_only: !0 }, "POST", e), zre = ({ retry: e, checkId: t }) => oD(q(eD, e ? {
retry: e,
check_id: t
-} : { restart: !0 })), dD = (e) => gw(rD, e), Rre = (e) => cD(q(rD, {
+} : { restart: !0 })), lD = (e) => hw(tD, e), Bre = (e) => oD(q(tD, {
confirm: !0,
check_id: e,
background: !0
-})), fD = (e) => Number(e || 0).toLocaleString(), zre = (e) => `已删除 ${fD(e.removed)} 条;${e.marked ? `已隐退女优的 ${fD(e.marked)} 条留作不可点的记录;` : ""}保留 ${fD(e.recovered)} 条未确认失效的链接。`;
-function Bre(e) {
+})), uD = (e) => Number(e || 0).toLocaleString(), Vre = (e) => `已删除 ${uD(e.removed)} 条;${e.marked ? `已隐退女优的 ${uD(e.marked)} 条留作不可点的记录;` : ""}保留 ${uD(e.recovered)} 条未确认失效的链接。`;
+function Hre(e) {
let t = e.scope === "retry";
- return e.total ? `${t ? "已重验" : "已检查"} ${fD(e.checked)} / ${fD(e.total)} 条链接` : t ? "正在重验链接" : "正在检查链接";
+ return e.total ? `${t ? "已重验" : "已检查"} ${uD(e.checked)} / ${uD(e.total)} 条链接` : t ? "正在重验链接" : "正在检查链接";
}
//#endregion
//#region src/react/data-cleanup/organize.ts
-var Vre = "/api/organize", Hre = "/api/organize/preview", Ure = "/api/organize/apply", Wre = "/api/organize/rollback", Gre = "/api/settings", pD = ["organize"], mD = (e) => gw(Vre, e);
-async function Kre(e) {
+var Ure = "/api/organize", Wre = "/api/organize/preview", Gre = "/api/organize/apply", Kre = "/api/organize/rollback", qre = "/api/settings", dD = ["organize"], fD = (e) => hw(Ure, e);
+async function Jre(e) {
await X.fetchQuery({
- queryKey: pD,
- queryFn: () => mD(e)
+ queryKey: dD,
+ queryFn: () => fD(e)
});
}
-var qre = (e) => q(Hre, e), Jre = (e) => e.kind === "apply" ? q(Ure, {
+var Yre = (e) => q(Wre, e), Xre = (e) => e.kind === "apply" ? q(Gre, {
...e.request,
confirm: !0
-}) : q(Wre, { confirm: !0 });
-async function Yre(e) {
- X.setQueryData(pD, (t) => t && {
+}) : q(Kre, { confirm: !0 });
+async function Zre(e) {
+ X.setQueryData(dD, (t) => t && {
...t,
templates: e
});
try {
- await q(Gre, { organizeTemplates: e });
+ await q(qre, { organizeTemplates: e });
} catch {}
}
-var Xre = (e, t) => e && {
+var Qre = (e, t) => e && {
...e,
...t
-}, Zre = /目录模板|分隔符|盘符|`\.`/;
-function hD(e) {
+}, $re = /目录模板|分隔符|盘符|`\.`/;
+function pD(e) {
let t = String(e || "");
return t.slice(Math.max(t.lastIndexOf("\\"), t.lastIndexOf("/")) + 1);
}
-var gD = (e) => Number(e || 0).toLocaleString();
-function Qre(e) {
- let t = Object.entries(e.reasons || {}).sort((e, t) => t[1] - e[1]).map(([e, t]) => `${e} ${gD(t)}`).join(" · ");
- return Number(e.counts?.change || 0) ? `${gD(e.counts.change)} 个文件会改名或移动,${gD(e.counts.unchanged)} 个已经就是目标名字${t ? `;跳过 ${t}` : ""}。` : `没有要改的文件。${t ? `跳过:${t}。` : ""}`;
+var mD = (e) => Number(e || 0).toLocaleString();
+function eie(e) {
+ let t = Object.entries(e.reasons || {}).sort((e, t) => t[1] - e[1]).map(([e, t]) => `${e} ${mD(t)}`).join(" · ");
+ return Number(e.counts?.change || 0) ? `${mD(e.counts.change)} 个文件会改名或移动,${mD(e.counts.unchanged)} 个已经就是目标名字${t ? `;跳过 ${t}` : ""}。` : `没有要改的文件。${t ? `跳过:${t}。` : ""}`;
}
-function _D(e) {
+function hD(e) {
let t = e.restored !== void 0, n = Number(e.failed || 0), r = Number(t ? e.restored : e.moved || 0);
return {
- text: t ? `已退回 ${gD(r)} 个文件${n ? `,${gD(n)} 行未能退回` : ""}。` : `已整理 ${gD(r)} 个文件${n ? `,${gD(n)} 行未能处理` : ""}。`,
+ text: t ? `已退回 ${mD(r)} 个文件${n ? `,${mD(n)} 行未能退回` : ""}。` : `已整理 ${mD(r)} 个文件${n ? `,${mD(n)} 行未能处理` : ""}。`,
failed: n,
rollback: t
};
}
//#endregion
//#region src/react/data-cleanup/resource-sync.ts
-var vD = "/api/resource-sync/scan", yD = "/api/resource-sync/apply", bD = ["resource-sync", "scan"], xD = ["resource-sync", "apply"], SD = (e) => q(vD, {
+var gD = "/api/resource-sync/scan", _D = "/api/resource-sync/apply", vD = ["resource-sync", "scan"], yD = ["resource-sync", "apply"], bD = (e) => q(gD, {
background: !0,
status_only: !0
-}, "POST", e), $re = () => q(vD, {
+}, "POST", e), tie = () => q(gD, {
background: !0,
restart: !0
-}), CD = (e) => gw(yD, e), eie = (e) => q(yD, {
+}), xD = (e) => hw(_D, e), nie = (e) => q(_D, {
confirm: !0,
clean_cache: !0,
scan_id: e,
background: !0
-}), wD = (e) => (e?.sources ?? []).some((e) => NT.includes(e.location) && Array.isArray(e.roots) && e.roots.length > 0);
-async function tie(e) {
- wD(X.getQueryData(AT)) && await Promise.all([X.fetchQuery({
- queryKey: bD,
- queryFn: () => SD(e)
+}), SD = (e) => (e?.sources ?? []).some((e) => jT.includes(e.location) && Array.isArray(e.roots) && e.roots.length > 0);
+async function rie(e) {
+ SD(X.getQueryData(OT)) && await Promise.all([X.fetchQuery({
+ queryKey: vD,
+ queryFn: () => bD(e)
}), X.fetchQuery({
- queryKey: xD,
- queryFn: () => CD(e)
+ queryKey: yD,
+ queryFn: () => xD(e)
})]);
}
-var nie = (e) => !!(e?.missing || e?.empty || e?.cache?.files), rie = {
+var iie = (e) => !!(e?.missing || e?.empty || e?.cache?.files), aie = {
local: "本地磁盘",
115: "115",
pikpak: "PikPak"
-}, TD = (e) => Number(e || 0).toLocaleString(), iie = (e) => e.total_sources ? `已扫描 ${e.completed_sources || 0}/${e.total_sources} 个来源` : "正在扫描来源", aie = (e) => `将永久删除文件已不在盘上的 ${TD(e.missing)} 条记录和 ${TD(e.empty)} 个空文件夹,并清理 ${TD(e.cache?.files)} 个闲置缓存。这一步不可撤销。`, oie = (e) => `将永久删除文件已不在盘上的 ${TD(e.missing)} 条记录(含回收站里的)、${TD(e.empty)} 个空文件夹,并清理 ${TD(e.cache?.files)} 个闲置缓存。来源根目录保留。这一步不可撤销。`, sie = (e) => e.online ? [
- `找不到文件 · 共 ${TD(e.total)} 项`,
- e.empty ? `空文件夹 ${TD(e.empty)} 个` : "",
- e.unreadable ? `${TD(e.unreadable)} 个目录读取失败,已跳过` : ""
-].filter(Boolean).join(" · ") : `馆藏中有 ${TD(e.total)} 项`;
-function ED(e) {
+}, CD = (e) => Number(e || 0).toLocaleString(), oie = (e) => e.total_sources ? `已扫描 ${e.completed_sources || 0}/${e.total_sources} 个来源` : "正在扫描来源", sie = (e) => `将永久删除文件已不在盘上的 ${CD(e.missing)} 条记录和 ${CD(e.empty)} 个空文件夹,并清理 ${CD(e.cache?.files)} 个闲置缓存。这一步不可撤销。`, cie = (e) => `将永久删除文件已不在盘上的 ${CD(e.missing)} 条记录(含回收站里的)、${CD(e.empty)} 个空文件夹,并清理 ${CD(e.cache?.files)} 个闲置缓存。来源根目录保留。这一步不可撤销。`, lie = (e) => e.online ? [
+ `找不到文件 · 共 ${CD(e.total)} 项`,
+ e.empty ? `空文件夹 ${CD(e.empty)} 个` : "",
+ e.unreadable ? `${CD(e.unreadable)} 个目录读取失败,已跳过` : ""
+].filter(Boolean).join(" · ") : `馆藏中有 ${CD(e.total)} 项`;
+function wD(e) {
let t = e.blocked ?? [], n = Number(e.dir_errors || 0), r = e.cache_blocked ?? [], i = Number(e.purged || 0) + Number(e.dirs_removed || 0) + Number(e.cache_removed || 0), a = t.length + n + r.length, o = t.slice(0, 3).map((e) => `「${e.name}」`).join("、") + (t.length > 3 ? " 等" : "");
return {
done: i,
left: a,
rest: [
- t.length ? `${TD(t.length)} 条记录没有删除(${o})` : "",
- n ? `${TD(n)} 个文件夹没有删除` : "",
- r.length ? `${TD(r.length)} 个缓存没有清理` : ""
+ t.length ? `${CD(t.length)} 条记录没有删除(${o})` : "",
+ n ? `${CD(n)} 个文件夹没有删除` : "",
+ r.length ? `${CD(r.length)} 个缓存没有清理` : ""
].filter(Boolean).join(",")
};
}
-var cie = (e, t) => {
- let { rest: n } = ED(e), r = `已永久删除 ${TD(e.purged)} 条失效记录和 ${TD(e.dirs_removed)} 个空文件夹,清理 ${TD(e.cache_removed)} 个缓存,释放 ${t(e.bytes_reclaimed || 0)}。`;
+var uie = (e, t) => {
+ let { rest: n } = wD(e), r = `已永久删除 ${CD(e.purged)} 条失效记录和 ${CD(e.dirs_removed)} 个空文件夹,清理 ${CD(e.cache_removed)} 个缓存,释放 ${t(e.bytes_reclaimed || 0)}。`;
return n ? `${r}${n},重新检查后可再试。` : r;
-}, lie = "/api/review?counts=1", DD = ["review", "counts"], uie = "/api/ads?limit=1", OD = ["junk-summary"], kD = "/api/items?state=trash&limit=1", AD = ["trash-summary"], die = [
+}, die = "/api/review?counts=1", TD = ["review", "counts"], fie = "/api/ads?limit=1", ED = ["junk-summary"], DD = "/api/items?state=trash&limit=1", OD = ["trash-summary"], pie = [
["video", "视频"],
["image", "图片"],
["archive", "压缩包"],
["audio", "音频"],
["url", "网址"],
["other", "其它"]
-], jD = (e) => gw(lie, e), MD = (e) => gw(uie, e), ND = (e) => {
+], kD = (e) => hw(die, e), AD = (e) => hw(fie, e), jD = (e) => {
let t = sessionStorage.getItem("peach.library");
- return gw(t ? `${kD}&library=${encodeURIComponent(t)}` : kD, e);
-}, PD = (e) => Number(e || 0).toLocaleString();
-function fie(e) {
- let t = NE, n = Object.entries(e?.counts ?? {}).map(([e, n]) => [t[e] || e, Number(n) || 0]).filter(([, e]) => e > 0).sort((e, t) => t[1] - e[1]), r = n.reduce((e, [, t]) => e + t, 0), i = n.slice(0, 3).map(([e, t]) => `${e} ${t.toLocaleString()}`), a = n.slice(3).reduce((e, [, t]) => e + t, 0);
+ return hw(t ? `${DD}&library=${encodeURIComponent(t)}` : DD, e);
+}, MD = (e) => Number(e || 0).toLocaleString();
+function mie(e) {
+ let t = jE, n = Object.entries(e?.counts ?? {}).map(([e, n]) => [t[e] || e, Number(n) || 0]).filter(([, e]) => e > 0).sort((e, t) => t[1] - e[1]), r = n.reduce((e, [, t]) => e + t, 0), i = n.slice(0, 3).map(([e, t]) => `${e} ${t.toLocaleString()}`), a = n.slice(3).reduce((e, [, t]) => e + t, 0);
return a && i.push(`其余 ${a.toLocaleString()}`), {
figure: `${r.toLocaleString()} 条待复核`,
meta: i.join(" · ")
};
}
-function pie(e) {
+function hie(e) {
if (!e) return "";
- let t = die.filter(([t]) => Number(e.counts?.[t]) > 0).map(([t, n]) => `${n} ${PD(e.counts[t])}`);
- return Number(e.dismissed_total) > 0 && t.push(`已忽略 ${PD(e.dismissed_total)}`), t.join(" · ");
-}
-var mie = [
- [DD, ({ signal: e }) => jD(e)],
- [bE, ({ signal: e }) => xE(e)],
- [AD, ({ signal: e }) => ND(e)],
- [iD, ({ signal: e }) => lD(e)],
- [aD, ({ signal: e }) => uD(e)],
- [oD, ({ signal: e }) => dD(e)]
+ let t = pie.filter(([t]) => Number(e.counts?.[t]) > 0).map(([t, n]) => `${n} ${MD(e.counts[t])}`);
+ return Number(e.dismissed_total) > 0 && t.push(`已忽略 ${MD(e.dismissed_total)}`), t.join(" · ");
+}
+var gie = [
+ [TD, ({ signal: e }) => kD(e)],
+ [vE, ({ signal: e }) => yE(e)],
+ [OD, ({ signal: e }) => jD(e)],
+ [nD, ({ signal: e }) => sD(e)],
+ [rD, ({ signal: e }) => cD(e)],
+ [iD, ({ signal: e }) => lD(e)]
];
-async function hie(e) {
- let t = location.hash === "#resource-sync", n = mie.map(([n, r]) => {
+async function _ie(e) {
+ let t = location.hash === "#resource-sync", n = gie.map(([n, r]) => {
if (t) return X.fetchQuery({
queryKey: n,
queryFn: () => r({ signal: e })
@@ -28804,49 +28804,49 @@ async function hie(e) {
await Promise.all([
...n,
X.fetchQuery({
- queryKey: OD,
- queryFn: () => MD(e)
+ queryKey: ED,
+ queryFn: () => AD(e)
}),
X.fetchQuery({
- queryKey: IT,
- queryFn: () => RT(e)
+ queryKey: PT,
+ queryFn: () => IT(e)
}),
- MT(e).then(() => tie(e)),
- XT(e),
- hE(e),
- Kre(e)
+ AT(e).then(() => rie(e)),
+ JT(e),
+ pE(e),
+ Jre(e)
]);
}
//#endregion
//#region src/react/components/stat-card.tsx
-var gie = [
+var vie = [
"text-chart-6",
"text-chart-5",
"text-chart-7",
"text-chart-8"
-], _ie = [
+], yie = [
"bg-chart-6/10",
"bg-chart-5/10",
"bg-chart-7/10",
"bg-chart-8/10"
];
-function FD(e = {}) {
- return `${_w({
+function ND(e = {}) {
+ return `${gw({
...e,
padding: "none"
})} flex flex-col overflow-hidden pt-4 text-left`;
}
-var ID = "inline-grid w-full grid-cols-2 gap-3 sm:gap-4 lg:grid-cols-4", vie = "inline-grid w-full grid-cols-2 gap-3 sm:grid-cols-3 sm:gap-4 xl:grid-cols-6";
-function LD({ interactive: e = !1 } = {}) {
- return _w({
+var PD = "inline-grid w-full grid-cols-2 gap-3 sm:gap-4 lg:grid-cols-4", bie = "inline-grid w-full grid-cols-2 gap-3 sm:grid-cols-3 sm:gap-4 xl:grid-cols-6";
+function FD({ interactive: e = !1 } = {}) {
+ return gw({
padding: "none",
radius: "plain",
interactive: e,
className: "flex min-h-33 flex-col gap-2 p-4 text-left"
});
}
-var yie = "inline-grid w-full grid-cols-5 gap-4 max-plain-stat-pair:grid-cols-2 max-plain-stat-single:grid-cols-1";
-function RD({ label: e, icon: t, mark: n, aside: r, figure: i, meta: a, wrapMeta: o = !1 }) {
+var xie = "inline-grid w-full grid-cols-5 gap-4 max-plain-stat-pair:grid-cols-2 max-plain-stat-single:grid-cols-1";
+function ID({ label: e, icon: t, mark: n, aside: r, figure: i, meta: a, wrapMeta: o = !1 }) {
return /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [
/* @__PURE__ */ (0, L.jsxs)("span", {
className: "flex min-w-0 items-center gap-2 text-body-medium text-text-secondary",
@@ -28879,13 +28879,13 @@ function RD({ label: e, icon: t, mark: n, aside: r, figure: i, meta: a, wrapMeta
})
] });
}
-function zD({ label: e, icon: t, accent: n = 0, figure: r, footer: i }) {
+function LD({ label: e, icon: t, accent: n = 0, figure: r, footer: i }) {
return /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [
/* @__PURE__ */ (0, L.jsxs)("span", {
className: "flex min-w-0 items-center gap-2 px-4 text-body-regular text-text-secondary max-sm:gap-1.5 max-sm:px-3",
children: [t ? /* @__PURE__ */ (0, L.jsx)("i", {
"aria-hidden": !0,
- className: `flex size-7 shrink-0 items-center justify-center rounded-lg max-sm:size-6 ${gie[n % 4]} ${_ie[n % 4]}`,
+ className: `flex size-7 shrink-0 items-center justify-center rounded-lg max-sm:size-6 ${vie[n % 4]} ${yie[n % 4]}`,
children: /* @__PURE__ */ (0, L.jsx)(t, {
"aria-hidden": !0,
className: "size-4"
@@ -28907,12 +28907,12 @@ function zD({ label: e, icon: t, accent: n = 0, figure: r, footer: i }) {
}
//#endregion
//#region node_modules/react-aria-components/dist/private/utils.mjs
-var BD = Symbol("default");
-function VD({ values: e, children: t }) {
+var RD = Symbol("default");
+function zD({ values: e, children: t }) {
for (let [n, r] of e) t = /*#__PURE__*/ I.createElement(n.Provider, { value: r }, t);
return t;
}
-function HD(e) {
+function BD(e) {
let { className: t, style: n, children: r, defaultClassName: i, defaultChildren: a, defaultStyle: o, values: s, render: c } = e;
return (0, I.useMemo)(() => {
let e, l, u;
@@ -28946,11 +28946,11 @@ function HD(e) {
c
]);
}
-function UD(e, t) {
+function VD(e, t) {
let n = (0, I.useContext)(e);
if (t === null) return null;
if (n && typeof n == "object" && "slots" in n && n.slots) {
- let e = t || BD;
+ let e = t || RD;
if (!n.slots[e]) {
let e = new Intl.ListFormat().format(Object.keys(n.slots).map((e) => `"${e}"`)), r = t ? `Invalid slot "${t}".` : "A slot prop is required.";
throw Error(`${r} Valid slot names are ${e}.`);
@@ -28959,8 +28959,8 @@ function UD(e, t) {
}
return n;
}
-function WD(e, t, n) {
- let { ref: r, ...i } = UD(n, e.slot) || {}, a = Ih((0, I.useMemo)(() => _h(t, r), [t, r])), o = H(i, e);
+function HD(e, t, n) {
+ let { ref: r, ...i } = VD(n, e.slot) || {}, a = Ih((0, I.useMemo)(() => _h(t, r), [t, r])), o = H(i, e);
return "style" in i && i.style && "style" in e && e.style && (o.style = typeof i.style == "function" || typeof e.style == "function" ? (t) => {
let n = typeof i.style == "function" ? i.style(t) : i.style, r = {
...t.defaultStyle,
@@ -28978,7 +28978,7 @@ function WD(e, t, n) {
...e.style
}), [o, a];
}
-function GD(e = !0) {
+function UD(e = !0) {
let [t, n] = (0, I.useState)(e), r = (0, I.useRef)(!1), i = (0, I.useCallback)((e) => {
r.current = !0, n(!!e);
}, []);
@@ -28986,12 +28986,12 @@ function GD(e = !0) {
r.current || n(!1);
}, []), [i, t];
}
-function KD(e) {
+function WD(e) {
let t = /^(data-.*)$/, n = {};
for (let r in e) t.test(r) || (n[r] = e[r]);
return n;
}
-function bie(e, t, n) {
+function Sie(e, t, n) {
let { render: r, ...i } = t, a = (0, I.useRef)(null), o = (0, I.useMemo)(() => _h(n, a), [n, a]);
Gp(() => {}, [e, r]);
let s = {
@@ -29000,19 +29000,19 @@ function bie(e, t, n) {
};
return r ? r(s, void 0) : /*#__PURE__*/ I.createElement(e, s);
}
-var qD = {}, JD = new Proxy({}, { get(e, t) {
+var GD = {}, KD = new Proxy({}, { get(e, t) {
if (typeof t != "string") return;
- let n = qD[t];
- return n || (n = /*#__PURE__*/ (0, I.forwardRef)(bie.bind(null, t)), qD[t] = n), n;
-} }), YD = /*#__PURE__*/ (0, I.createContext)(null), XD = /*#__PURE__*/ (0, I.createContext)(null), ZD = /*#__PURE__*/ (0, I.createContext)(null), QD = {
+ let n = GD[t];
+ return n || (n = /*#__PURE__*/ (0, I.forwardRef)(Sie.bind(null, t)), GD[t] = n), n;
+} }), qD = /*#__PURE__*/ (0, I.createContext)(null), JD = /*#__PURE__*/ (0, I.createContext)(null), YD = /*#__PURE__*/ (0, I.createContext)(null), XD = {
CollectionRoot({ collection: e, renderDropIndicator: t }) {
- return $D(e, null, t);
+ return ZD(e, null, t);
},
CollectionBranch({ collection: e, parent: t, renderDropIndicator: n }) {
- return $D(e, t, n);
+ return ZD(e, t, n);
}
};
-function $D(e, t, n) {
+function ZD(e, t, n) {
return mp({
items: t ? e.getChildren(t.key) : e,
dependencies: [n],
@@ -29023,11 +29023,11 @@ function $D(e, t, n) {
type: "item",
key: t.key,
dropPosition: "before"
- }), r, xie(e, t, n));
+ }), r, Cie(e, t, n));
}
});
}
-function xie(e, t, n) {
+function Cie(e, t, n) {
let r = t.key, i = e.getKeyAfter(r), a = i == null ? null : e.getItem(i);
for (; a != null && a.type !== "item";) i = e.getKeyAfter(a.key), a = i == null ? null : e.getItem(i);
let o = t.nextKey == null ? null : e.getItem(t.nextKey);
@@ -29046,25 +29046,25 @@ function xie(e, t, n) {
}
return s;
}
-var eO = /*#__PURE__*/ (0, I.createContext)(QD);
-function tO(e) {
+var QD = /*#__PURE__*/ (0, I.createContext)(XD);
+function $D(e) {
return (0, I.useMemo)(() => e == null ? null : /* @__PURE__ */ new Set([e]), [e]);
}
//#endregion
//#region node_modules/react-aria-components/dist/private/Label.mjs
-var nO = /*#__PURE__*/ (0, I.createContext)({}), Sie = /*#__PURE__*/ Uh(function(e, t) {
- [e, t] = WD(e, t, nO);
- let { elementType: n = "label", ...r } = e, i = JD[n];
+var eO = /*#__PURE__*/ (0, I.createContext)({}), wie = /*#__PURE__*/ Uh(function(e, t) {
+ [e, t] = HD(e, t, eO);
+ let { elementType: n = "label", ...r } = e, i = KD[n];
return /*#__PURE__*/ I.createElement(i, {
className: "react-aria-Label",
...r,
ref: t
});
-}), Cie = /*#__PURE__*/ (0, I.createContext)(null), rO = /*#__PURE__*/ (0, I.createContext)({}), iO = /*#__PURE__*/ Uh(function(e, t) {
- [e, t] = WD(e, t, rO);
+}), Tie = /*#__PURE__*/ (0, I.createContext)(null), tO = /*#__PURE__*/ (0, I.createContext)({}), nO = /*#__PURE__*/ Uh(function(e, t) {
+ [e, t] = HD(e, t, tO);
let n = e, { isPending: r } = n, { buttonProps: i, isPressed: a } = See(e, t);
- i = Tie(i, r);
- let { focusProps: o, isFocused: s, isFocusVisible: c } = Ty(e), { hoverProps: l, isHovered: u } = My({
+ i = Die(i, r);
+ let { focusProps: o, isFocused: s, isFocusVisible: c } = wy(e), { hoverProps: l, isHovered: u } = jy({
...e,
isDisabled: e.isDisabled || r
}), d = {
@@ -29074,7 +29074,7 @@ var nO = /*#__PURE__*/ (0, I.createContext)({}), Sie = /*#__PURE__*/ Uh(function
isFocusVisible: c,
isDisabled: e.isDisabled || !1,
isPending: r ?? !1
- }, f = HD({
+ }, f = BD({
...e,
values: d,
defaultClassName: "react-aria-Button"
@@ -29091,7 +29091,7 @@ var nO = /*#__PURE__*/ (0, I.createContext)({}), Sie = /*#__PURE__*/ Uh(function
p
]);
let _ = zg(e, { global: !0 });
- return delete _.onClick, /*#__PURE__*/ I.createElement(JD.button, {
+ return delete _.onClick, /*#__PURE__*/ I.createElement(KD.button, {
...H(_, f, i, o, l),
type: i.type === "submit" && r ? "button" : i.type,
id: p,
@@ -29105,62 +29105,62 @@ var nO = /*#__PURE__*/ (0, I.createContext)({}), Sie = /*#__PURE__*/ Uh(function
"data-focused": s || void 0,
"data-pending": r || void 0,
"data-focus-visible": c || void 0
- }, /*#__PURE__*/ I.createElement(Cie.Provider, { value: { id: m } }, f.children));
-}), wie = /Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;
-function Tie(e, t) {
+ }, /*#__PURE__*/ I.createElement(Tie.Provider, { value: { id: m } }, f.children));
+}), Eie = /Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;
+function Die(e, t) {
if (t) {
- for (let t in e) t.startsWith("on") && !wie.test(t) && (e[t] = void 0);
+ for (let t in e) t.startsWith("on") && !Eie.test(t) && (e[t] = void 0);
e.href = void 0, e.target = void 0;
}
return e;
}
//#endregion
//#region node_modules/react-aria-components/dist/private/Heading.mjs
-var aO = /*#__PURE__*/ (0, I.createContext)({}), oO = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- [e, t] = WD(e, t, aO);
- let { children: n, level: r = 3, className: i, ...a } = e, o = JD[`h${r}`];
+var rO = /*#__PURE__*/ (0, I.createContext)({}), iO = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ [e, t] = HD(e, t, rO);
+ let { children: n, level: r = 3, className: i, ...a } = e, o = KD[`h${r}`];
return /*#__PURE__*/ I.createElement(o, {
...a,
ref: t,
className: i ?? "react-aria-Heading"
}, n);
-}), sO = /*#__PURE__*/ (0, I.createContext)({}), Eie = /*#__PURE__*/ Uh(function(e, t) {
- [e, t] = WD(e, t, sO);
- let { elementType: n = "span", ...r } = e, i = JD[n];
+}), aO = /*#__PURE__*/ (0, I.createContext)({}), Oie = /*#__PURE__*/ Uh(function(e, t) {
+ [e, t] = HD(e, t, aO);
+ let { elementType: n = "span", ...r } = e, i = KD[n];
return /*#__PURE__*/ I.createElement(i, {
className: "react-aria-Text",
...r,
ref: t
});
-}), cO = /*#__PURE__*/ (0, I.createContext)(null), lO = /*#__PURE__*/ (0, I.createContext)(null), uO = /*#__PURE__*/ (0, I.createContext)(null), dO = /*#__PURE__*/ (0, I.createContext)(null), Die = /*#__PURE__*/ (0, I.createContext)(null), fO = /*#__PURE__*/ (0, I.createContext)(null);
-function Oie(e, t) {
- let { validationBehavior: n } = UD(lO) || {}, r = e.validationBehavior ?? n ?? "native", i = (0, I.useContext)(Die), a = Ih((0, I.useMemo)(() => _h(t, e.inputRef === void 0 ? null : e.inputRef), [t, e.inputRef])), o = {
- ...KD(e),
+}), oO = /*#__PURE__*/ (0, I.createContext)(null), sO = /*#__PURE__*/ (0, I.createContext)(null), cO = /*#__PURE__*/ (0, I.createContext)(null), lO = /*#__PURE__*/ (0, I.createContext)(null), kie = /*#__PURE__*/ (0, I.createContext)(null), uO = /*#__PURE__*/ (0, I.createContext)(null);
+function Aie(e, t) {
+ let { validationBehavior: n } = VD(sO) || {}, r = e.validationBehavior ?? n ?? "native", i = (0, I.useContext)(kie), a = Ih((0, I.useMemo)(() => _h(t, e.inputRef === void 0 ? null : e.inputRef), [t, e.inputRef])), o = {
+ ...WD(e),
children: typeof e.children == "function" || e.children,
value: e.value,
validationBehavior: r
};
return [i ? Uee(o, i, a) : Y_(o, ev(e), a), a];
}
-var kie = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+var jie = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
let { inputRef: n = null, ...r } = e;
- [e, t] = WD(r, t, uO);
- let [i, a] = Oie(e, n);
- return /*#__PURE__*/ I.createElement(fO.Provider, { value: {
+ [e, t] = HD(r, t, cO);
+ let [i, a] = Aie(e, n);
+ return /*#__PURE__*/ I.createElement(uO.Provider, { value: {
...i,
inputRef: a,
defaultClassName: "react-aria-Checkbox",
isIndeterminate: e.isIndeterminate,
isRequired: e.isRequired
- } }, /*#__PURE__*/ I.createElement(Aie, {
+ } }, /*#__PURE__*/ I.createElement(Mie, {
...e,
ref: t
}));
-}), Aie = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- let { labelProps: n, inputProps: r, isSelected: i, isDisabled: a, isReadOnly: o, isPressed: s, isInvalid: c, inputRef: l, defaultClassName: u, isIndeterminate: d, isRequired: f } = (0, I.useContext)(fO), { isFocused: p, isFocusVisible: m, focusProps: h } = Ty(), g = a || o, { hoverProps: _, isHovered: v } = My({
+}), Mie = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ let { labelProps: n, inputProps: r, isSelected: i, isDisabled: a, isReadOnly: o, isPressed: s, isInvalid: c, inputRef: l, defaultClassName: u, isIndeterminate: d, isRequired: f } = (0, I.useContext)(uO), { isFocused: p, isFocusVisible: m, focusProps: h } = wy(), g = a || o, { hoverProps: _, isHovered: v } = jy({
...e,
isDisabled: g
- }), y = HD({
+ }), y = BD({
...e,
defaultClassName: u,
values: {
@@ -29176,7 +29176,7 @@ var kie = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
isRequired: f || !1
}
}), b = zg(e, { global: !0 });
- return delete b.id, delete b.onClick, /*#__PURE__*/ I.createElement(JD.label, {
+ return delete b.id, delete b.onClick, /*#__PURE__*/ I.createElement(KD.label, {
...H(b, n, _, y),
ref: t,
slot: e.slot || void 0,
@@ -29194,16 +29194,16 @@ var kie = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
...H(r, h),
ref: l
})), y.children);
-}), pO = /*#__PURE__*/ (0, I.createContext)({}), jie = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- [e, t] = WD(e, t, pO);
+}), dO = /*#__PURE__*/ (0, I.createContext)({}), Nie = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ [e, t] = HD(e, t, dO);
let { isDisabled: n, isInvalid: r, isReadOnly: i, onHoverStart: a, onHoverChange: o, onHoverEnd: s, ...c } = e;
n ??= !!e["aria-disabled"] && e["aria-disabled"] !== "false", r ??= !!e["aria-invalid"] && e["aria-invalid"] !== "false";
- let { hoverProps: l, isHovered: u } = My({
+ let { hoverProps: l, isHovered: u } = jy({
onHoverStart: a,
onHoverChange: o,
onHoverEnd: s,
isDisabled: n
- }), { isFocused: d, isFocusVisible: f, focusProps: p } = Ty({ within: !0 }), m = HD({
+ }), { isFocused: d, isFocusVisible: f, focusProps: p } = wy({ within: !0 }), m = BD({
...e,
values: {
isHovered: u,
@@ -29214,7 +29214,7 @@ var kie = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
},
defaultClassName: "react-aria-Group"
});
- return /*#__PURE__*/ I.createElement(JD.div, {
+ return /*#__PURE__*/ I.createElement(KD.div, {
...H(c, p, l),
...m,
ref: t,
@@ -29227,18 +29227,18 @@ var kie = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
"data-invalid": r || void 0,
"data-readonly": i || void 0
}, m.children);
-}), mO = /*#__PURE__*/ (0, I.createContext)({}), Mie = (e) => {
+}), fO = /*#__PURE__*/ (0, I.createContext)({}), Pie = (e) => {
let { onHoverStart: t, onHoverChange: n, onHoverEnd: r, ...i } = e;
return i;
-}, Nie = /*#__PURE__*/ Uh(function(e, t) {
- [e, t] = WD(e, t, mO);
- let { hoverProps: n, isHovered: r } = My({
+}, Fie = /*#__PURE__*/ Uh(function(e, t) {
+ [e, t] = HD(e, t, fO);
+ let { hoverProps: n, isHovered: r } = jy({
...e,
isDisabled: e.disabled
- }), { isFocused: i, isFocusVisible: a, focusProps: o } = Ty({
+ }), { isFocused: i, isFocusVisible: a, focusProps: o } = wy({
isTextInput: !0,
autoFocus: e.autoFocus
- }), s = !!e["aria-invalid"] && e["aria-invalid"] !== "false", c = HD({
+ }), s = !!e["aria-invalid"] && e["aria-invalid"] !== "false", c = BD({
...e,
values: {
isHovered: r,
@@ -29249,8 +29249,8 @@ var kie = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
},
defaultClassName: "react-aria-Input"
});
- return /*#__PURE__*/ I.createElement(JD.input, {
- ...H(Mie(e), o, n),
+ return /*#__PURE__*/ I.createElement(KD.input, {
+ ...H(Pie(e), o, n),
...c,
ref: t,
"data-focused": i || void 0,
@@ -29259,8 +29259,8 @@ var kie = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
"data-focus-visible": a || void 0,
"data-invalid": s || void 0
});
-}), hO = {};
-hO = {
+}), pO = {};
+pO = {
colorSwatchPicker: "تغييرات الألوان",
dropzoneLabel: "DropZone",
selectPlaceholder: "حدد عنصرًا",
@@ -29268,8 +29268,8 @@ hO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/bg-BG.mjs
-var gO = {};
-gO = {
+var mO = {};
+mO = {
colorSwatchPicker: "Цветови мостри",
dropzoneLabel: "DropZone",
selectPlaceholder: "Изберете предмет",
@@ -29277,8 +29277,8 @@ gO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/cs-CZ.mjs
-var _O = {};
-_O = {
+var hO = {};
+hO = {
colorSwatchPicker: "Vzorky barev",
dropzoneLabel: "Místo pro přetažení",
selectPlaceholder: "Vyberte položku",
@@ -29286,8 +29286,8 @@ _O = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/da-DK.mjs
-var vO = {};
-vO = {
+var gO = {};
+gO = {
colorSwatchPicker: "Farveprøver",
dropzoneLabel: "DropZone",
selectPlaceholder: "Vælg et element",
@@ -29295,8 +29295,8 @@ vO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/de-DE.mjs
-var yO = {};
-yO = {
+var _O = {};
+_O = {
colorSwatchPicker: "Farbfelder",
dropzoneLabel: "Ablegebereich",
selectPlaceholder: "Element wählen",
@@ -29304,8 +29304,8 @@ yO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/el-GR.mjs
-var bO = {};
-bO = {
+var vO = {};
+vO = {
colorSwatchPicker: "Χρωματικά δείγματα",
dropzoneLabel: "DropZone",
selectPlaceholder: "Επιλέξτε ένα αντικείμενο",
@@ -29313,8 +29313,8 @@ bO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/en-US.mjs
-var xO = {};
-xO = {
+var yO = {};
+yO = {
selectPlaceholder: "Select an item",
tableResizer: "Resizer",
dropzoneLabel: "DropZone",
@@ -29322,8 +29322,8 @@ xO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/es-ES.mjs
-var SO = {};
-SO = {
+var bO = {};
+bO = {
colorSwatchPicker: "Muestras de colores",
dropzoneLabel: "DropZone",
selectPlaceholder: "Seleccionar un artículo",
@@ -29331,8 +29331,8 @@ SO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/et-EE.mjs
-var CO = {};
-CO = {
+var xO = {};
+xO = {
colorSwatchPicker: "Värvinäidised",
dropzoneLabel: "DropZone",
selectPlaceholder: "Valige üksus",
@@ -29340,8 +29340,8 @@ CO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/fi-FI.mjs
-var wO = {};
-wO = {
+var SO = {};
+SO = {
colorSwatchPicker: "Värimallit",
dropzoneLabel: "DropZone",
selectPlaceholder: "Valitse kohde",
@@ -29349,8 +29349,8 @@ wO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/fr-FR.mjs
-var TO = {};
-TO = {
+var CO = {};
+CO = {
colorSwatchPicker: "Échantillons de couleurs",
dropzoneLabel: "DropZone",
selectPlaceholder: "Sélectionner un élément",
@@ -29358,8 +29358,8 @@ TO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/he-IL.mjs
-var EO = {};
-EO = {
+var wO = {};
+wO = {
colorSwatchPicker: "דוגמיות צבע",
dropzoneLabel: "DropZone",
selectPlaceholder: "בחר פריט",
@@ -29367,8 +29367,8 @@ EO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/hr-HR.mjs
-var DO = {};
-DO = {
+var TO = {};
+TO = {
colorSwatchPicker: "Uzorci boja",
dropzoneLabel: "Zona spuštanja",
selectPlaceholder: "Odaberite stavku",
@@ -29376,8 +29376,8 @@ DO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/hu-HU.mjs
-var OO = {};
-OO = {
+var EO = {};
+EO = {
colorSwatchPicker: "Színtárak",
dropzoneLabel: "DropZone",
selectPlaceholder: "Válasszon ki egy elemet",
@@ -29385,8 +29385,8 @@ OO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/it-IT.mjs
-var kO = {};
-kO = {
+var DO = {};
+DO = {
colorSwatchPicker: "Campioni di colore",
dropzoneLabel: "Zona di rilascio",
selectPlaceholder: "Seleziona un elemento",
@@ -29394,8 +29394,8 @@ kO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/ja-JP.mjs
-var AO = {};
-AO = {
+var OO = {};
+OO = {
colorSwatchPicker: "カラースウォッチ",
dropzoneLabel: "ドロップゾーン",
selectPlaceholder: "項目を選択",
@@ -29403,8 +29403,8 @@ AO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/ko-KR.mjs
-var jO = {};
-jO = {
+var kO = {};
+kO = {
colorSwatchPicker: "색상 견본",
dropzoneLabel: "드롭 영역",
selectPlaceholder: "항목 선택",
@@ -29412,8 +29412,8 @@ jO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/lt-LT.mjs
-var MO = {};
-MO = {
+var AO = {};
+AO = {
colorSwatchPicker: "Spalvų pavyzdžiai",
dropzoneLabel: "„DropZone“",
selectPlaceholder: "Pasirinkite elementą",
@@ -29421,8 +29421,8 @@ MO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/lv-LV.mjs
-var NO = {};
-NO = {
+var jO = {};
+jO = {
colorSwatchPicker: "Krāsu paraugi",
dropzoneLabel: "DropZone",
selectPlaceholder: "Izvēlēties vienumu",
@@ -29430,8 +29430,8 @@ NO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/nb-NO.mjs
-var PO = {};
-PO = {
+var MO = {};
+MO = {
colorSwatchPicker: "Fargekart",
dropzoneLabel: "Droppsone",
selectPlaceholder: "Velg et element",
@@ -29439,8 +29439,8 @@ PO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/nl-NL.mjs
-var FO = {};
-FO = {
+var NO = {};
+NO = {
colorSwatchPicker: "kleurstalen",
dropzoneLabel: "DropZone",
selectPlaceholder: "Selecteer een item",
@@ -29448,8 +29448,8 @@ FO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/pl-PL.mjs
-var IO = {};
-IO = {
+var PO = {};
+PO = {
colorSwatchPicker: "Próbki kolorów",
dropzoneLabel: "Strefa upuszczania",
selectPlaceholder: "Wybierz element",
@@ -29457,8 +29457,8 @@ IO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/pt-BR.mjs
-var LO = {};
-LO = {
+var FO = {};
+FO = {
colorSwatchPicker: "Amostras de cores",
dropzoneLabel: "DropZone",
selectPlaceholder: "Selecione um item",
@@ -29466,8 +29466,8 @@ LO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/pt-PT.mjs
-var RO = {};
-RO = {
+var IO = {};
+IO = {
colorSwatchPicker: "Amostras de cores",
dropzoneLabel: "DropZone",
selectPlaceholder: "Selecione um item",
@@ -29475,8 +29475,8 @@ RO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/ro-RO.mjs
-var zO = {};
-zO = {
+var LO = {};
+LO = {
colorSwatchPicker: "Specimene de culoare",
dropzoneLabel: "Zonă de plasare",
selectPlaceholder: "Selectați un element",
@@ -29484,8 +29484,8 @@ zO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/ru-RU.mjs
-var BO = {};
-BO = {
+var RO = {};
+RO = {
colorSwatchPicker: "Цветовые образцы",
dropzoneLabel: "DropZone",
selectPlaceholder: "Выберите элемент",
@@ -29493,8 +29493,8 @@ BO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/sk-SK.mjs
-var VO = {};
-VO = {
+var zO = {};
+zO = {
colorSwatchPicker: "Vzorkovníky farieb",
dropzoneLabel: "DropZone",
selectPlaceholder: "Vyberte položku",
@@ -29502,8 +29502,8 @@ VO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/sl-SI.mjs
-var HO = {};
-HO = {
+var BO = {};
+BO = {
colorSwatchPicker: "Barvne palete",
dropzoneLabel: "DropZone",
selectPlaceholder: "Izberite element",
@@ -29511,8 +29511,8 @@ HO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/sr-SP.mjs
-var UO = {};
-UO = {
+var VO = {};
+VO = {
colorSwatchPicker: "Uzorci boje",
dropzoneLabel: "DropZone",
selectPlaceholder: "Izaberite stavku",
@@ -29520,8 +29520,8 @@ UO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/sv-SE.mjs
-var WO = {};
-WO = {
+var HO = {};
+HO = {
colorSwatchPicker: "Färgrutor",
dropzoneLabel: "DropZone",
selectPlaceholder: "Välj en artikel",
@@ -29529,8 +29529,8 @@ WO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/tr-TR.mjs
-var GO = {};
-GO = {
+var UO = {};
+UO = {
colorSwatchPicker: "Renk örnekleri",
dropzoneLabel: "Bırakma Bölgesi",
selectPlaceholder: "Bir öğe seçin",
@@ -29538,8 +29538,8 @@ GO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/uk-UA.mjs
-var KO = {};
-KO = {
+var WO = {};
+WO = {
colorSwatchPicker: "Зразки кольорів",
dropzoneLabel: "DropZone",
selectPlaceholder: "Виберіть елемент",
@@ -29547,8 +29547,8 @@ KO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/zh-CN.mjs
-var qO = {};
-qO = {
+var GO = {};
+GO = {
colorSwatchPicker: "颜色色板",
dropzoneLabel: "放置区域",
selectPlaceholder: "选择一个项目",
@@ -29556,8 +29556,8 @@ qO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intl/zh-TW.mjs
-var JO = {};
-JO = {
+var KO = {};
+KO = {
colorSwatchPicker: "色票",
dropzoneLabel: "放置區",
selectPlaceholder: "選取項目",
@@ -29565,52 +29565,52 @@ JO = {
};
//#endregion
//#region node_modules/react-aria-components/dist/private/intlStrings.mjs
-var YO = {};
-YO = {
- "ar-AE": hO,
- "bg-BG": gO,
- "cs-CZ": _O,
- "da-DK": vO,
- "de-DE": yO,
- "el-GR": bO,
- "en-US": xO,
- "es-ES": SO,
- "et-EE": CO,
- "fi-FI": wO,
- "fr-FR": TO,
- "he-IL": EO,
- "hr-HR": DO,
- "hu-HU": OO,
- "it-IT": kO,
- "ja-JP": AO,
- "ko-KR": jO,
- "lt-LT": MO,
- "lv-LV": NO,
- "nb-NO": PO,
- "nl-NL": FO,
- "pl-PL": IO,
- "pt-BR": LO,
- "pt-PT": RO,
- "ro-RO": zO,
- "ru-RU": BO,
- "sk-SK": VO,
- "sl-SI": HO,
- "sr-SP": UO,
- "sv-SE": WO,
- "tr-TR": GO,
- "uk-UA": KO,
- "zh-CN": qO,
- "zh-TW": JO
+var qO = {};
+qO = {
+ "ar-AE": pO,
+ "bg-BG": mO,
+ "cs-CZ": hO,
+ "da-DK": gO,
+ "de-DE": _O,
+ "el-GR": vO,
+ "en-US": yO,
+ "es-ES": bO,
+ "et-EE": xO,
+ "fi-FI": SO,
+ "fr-FR": CO,
+ "he-IL": wO,
+ "hr-HR": TO,
+ "hu-HU": EO,
+ "it-IT": DO,
+ "ja-JP": OO,
+ "ko-KR": kO,
+ "lt-LT": AO,
+ "lv-LV": jO,
+ "nb-NO": MO,
+ "nl-NL": NO,
+ "pl-PL": PO,
+ "pt-BR": FO,
+ "pt-PT": IO,
+ "ro-RO": LO,
+ "ru-RU": RO,
+ "sk-SK": zO,
+ "sl-SI": BO,
+ "sr-SP": VO,
+ "sv-SE": HO,
+ "tr-TR": UO,
+ "uk-UA": WO,
+ "zh-CN": GO,
+ "zh-TW": KO
};
//#endregion
//#region node_modules/react-aria-components/dist/private/DragAndDrop.mjs
-var XO = /*#__PURE__*/ (0, I.createContext)({}), ZO = /*#__PURE__*/ (0, I.createContext)(null), Pie = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- let { render: n } = (0, I.useContext)(ZO);
+var JO = /*#__PURE__*/ (0, I.createContext)({}), YO = /*#__PURE__*/ (0, I.createContext)(null), Iie = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ let { render: n } = (0, I.useContext)(YO);
return /*#__PURE__*/ I.createElement(I.Fragment, null, n(e, t));
});
-function QO(e, t) {
+function XO(e, t) {
let n = e?.renderDropIndicator, r = e?.isVirtualDragging?.(), i = (0, I.useCallback)((e) => {
- if (r || t?.isDropTarget(e)) return n ? n(e) : /*#__PURE__*/ I.createElement(Pie, { target: e });
+ if (r || t?.isDropTarget(e)) return n ? n(e) : /*#__PURE__*/ I.createElement(Iie, { target: e });
}, [
t?.target,
r,
@@ -29618,7 +29618,7 @@ function QO(e, t) {
]);
return e?.useDropIndicator ? i : void 0;
}
-function $O(e, t, n) {
+function ZO(e, t, n) {
let r = e.focusedKey, i = null;
if (t?.isVirtualDragging?.() && n?.target?.type === "item" && (i = n.target.key, n.target.dropPosition === "after")) {
let e = n.collection.getKeyAfter(i), t = null;
@@ -29641,14 +29641,14 @@ function $O(e, t, n) {
}
//#endregion
//#region node_modules/react-aria-components/dist/private/Header.mjs
-var ek = /*#__PURE__*/ (0, I.createContext)({}), Fie = /*#__PURE__*/ (0, I.createContext)(null);
-function tk(e) {
+var QO = /*#__PURE__*/ (0, I.createContext)({}), Lie = /*#__PURE__*/ (0, I.createContext)(null);
+function $O(e) {
let t = (0, I.useRef)({});
- return /*#__PURE__*/ I.createElement(Fie.Provider, { value: t }, e.children);
+ return /*#__PURE__*/ I.createElement(Lie.Provider, { value: t }, e.children);
}
//#endregion
//#region node_modules/react-aria-components/dist/private/SelectionIndicator.mjs
-var nk = /*#__PURE__*/ (0, I.createContext)({ isSelected: !1 }), rk = /*#__PURE__*/ (0, I.createContext)({}), Iie = /*#__PURE__*/ og(class extends ip {
+var ek = /*#__PURE__*/ (0, I.createContext)({ isSelected: !1 }), tk = /*#__PURE__*/ (0, I.createContext)({}), Rie = /*#__PURE__*/ og(class extends ip {
static {
this.type = "separator";
}
@@ -29661,10 +29661,10 @@ var nk = /*#__PURE__*/ (0, I.createContext)({ isSelected: !1 }), rk = /*#__PURE_
return null;
}
}, function(e, t) {
- [e, t] = WD(e, t, rk);
+ [e, t] = HD(e, t, tk);
let { elementType: n, orientation: r, style: i, className: a, slot: o, ...s } = e, c = n || "hr";
c === "hr" && r === "vertical" && (c = "div");
- let l = JD[c], { separatorProps: u } = Pte({
+ let l = KD[c], { separatorProps: u } = Fte({
...s,
elementType: n,
orientation: r
@@ -29680,13 +29680,13 @@ var nk = /*#__PURE__*/ (0, I.createContext)({ isSelected: !1 }), rk = /*#__PURE_
});
//#endregion
//#region node_modules/react-aria/dist/private/utils/inertValue.mjs
-function ik(e) {
+function nk(e) {
let t = I.version.split(".");
return parseInt(t[0], 10) >= 19 ? e : e ? "true" : void 0;
}
//#endregion
//#region node_modules/react-stately/dist/private/list/ListCollection.mjs
-var ak = class {
+var rk = class {
constructor(e) {
this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.iterable = e;
let t = (e) => {
@@ -29730,20 +29730,20 @@ var ak = class {
getChildren(e) {
return this.keyMap.get(e)?.childNodes || [];
}
-}, ok = class e extends Set {
+}, ik = class e extends Set {
constructor(t, n, r) {
super(t), t instanceof e ? (this.anchorKey = n ?? t.anchorKey, this.currentKey = r ?? t.currentKey) : (this.anchorKey = n ?? null, this.currentKey = r ?? null);
}
};
//#endregion
//#region node_modules/react-stately/dist/private/selection/useMultipleSelectionState.mjs
-function Lie(e, t) {
+function zie(e, t) {
if (e.size !== t.size) return !1;
for (let n of e) if (!t.has(n)) return !1;
return !0;
}
-function sk(e) {
- let { selectionMode: t = "none", disallowEmptySelection: n = !1, allowDuplicateSelectionEvents: r, selectionBehavior: i = "toggle", disabledBehavior: a = "all" } = e, o = (0, I.useRef)(!1), [, s] = (0, I.useState)(!1), c = (0, I.useRef)(null), l = (0, I.useRef)(null), [, u] = (0, I.useState)(null), [d, f] = $_((0, I.useMemo)(() => ck(e.selectedKeys), [e.selectedKeys]), (0, I.useMemo)(() => ck(e.defaultSelectedKeys, new ok()), [e.defaultSelectedKeys]), e.onSelectionChange), p = (0, I.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), [m, h] = (0, I.useState)(i);
+function ak(e) {
+ let { selectionMode: t = "none", disallowEmptySelection: n = !1, allowDuplicateSelectionEvents: r, selectionBehavior: i = "toggle", disabledBehavior: a = "all" } = e, o = (0, I.useRef)(!1), [, s] = (0, I.useState)(!1), c = (0, I.useRef)(null), l = (0, I.useRef)(null), [, u] = (0, I.useState)(null), [d, f] = $_((0, I.useMemo)(() => ok(e.selectedKeys), [e.selectedKeys]), (0, I.useMemo)(() => ok(e.defaultSelectedKeys, new ik()), [e.defaultSelectedKeys]), e.onSelectionChange), p = (0, I.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), [m, h] = (0, I.useState)(i);
i === "replace" && m === "toggle" && typeof d == "object" && d.size === 0 && h("replace");
let g = (0, I.useRef)(i);
return (0, I.useEffect)(() => {
@@ -29770,18 +29770,18 @@ function sk(e) {
},
selectedKeys: d,
setSelectedKeys(e) {
- (r || !Lie(e, d)) && f(e);
+ (r || !zie(e, d)) && f(e);
},
disabledKeys: p,
disabledBehavior: a
};
}
-function ck(e, t) {
- return e ? e === "all" ? "all" : new ok(e) : t;
+function ok(e, t) {
+ return e ? e === "all" ? "all" : new ik(e) : t;
}
//#endregion
//#region node_modules/react-stately/dist/private/selection/SelectionManager.mjs
-var lk = class e {
+var sk = class e {
constructor(e, t, n) {
this.collection = e, this.state = t, this.allowsCellSelection = n?.allowsCellSelection ?? !1, this._isSelectAll = null, this.layoutDelegate = n?.layoutDelegate || null, this.fullCollection = n?.fullCollection || null;
}
@@ -29864,10 +29864,10 @@ var lk = class e {
let t = this.getKey(e);
if (t == null) return;
let n;
- if (this.state.selectedKeys === "all") n = new ok([t], t, t);
+ if (this.state.selectedKeys === "all") n = new ik([t], t, t);
else {
let e = this.state.selectedKeys, r = e.anchorKey ?? t;
- n = new ok(e, r, t);
+ n = new ik(e, r, t);
for (let i of this.getKeyRange(r, e.currentKey ?? t)) n.delete(i);
for (let e of this.getKeyRange(t, r)) this.canSelectItem(e) && n.add(e);
}
@@ -29901,19 +29901,19 @@ var lk = class e {
}
let t = this.getKey(e);
if (t == null) return;
- let n = new ok(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
+ let n = new ik(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
n.has(t) ? n.delete(t) : this.canSelectItem(t) && (n.add(t), n.anchorKey = t, n.currentKey = t), !(this.disallowEmptySelection && n.size === 0) && this.state.setSelectedKeys(n);
}
replaceSelection(e) {
if (this.selectionMode === "none") return;
let t = this.getKey(e);
if (t == null) return;
- let n = this.canSelectItem(t) ? new ok([t], t, t) : new ok();
+ let n = this.canSelectItem(t) ? new ik([t], t, t) : new ik();
this.state.setSelectedKeys(n);
}
setSelectedKeys(e) {
if (this.selectionMode === "none") return;
- let t = new ok();
+ let t = new ik();
for (let n of e) {
let e = this.getKey(n);
if (e != null && (t.add(e), this.selectionMode === "single")) break;
@@ -29936,7 +29936,7 @@ var lk = class e {
!this.isSelectAll && this.selectionMode === "multiple" && this.state.setSelectedKeys("all");
}
clearSelection() {
- !this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new ok());
+ !this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new ik());
}
toggleSelectAll() {
this.isSelectAll ? this.clearSelection() : this.selectAll();
@@ -29977,9 +29977,9 @@ var lk = class e {
fullCollection: this.fullCollection ?? this.collection
});
}
-}, Rie = class {
+}, Bie = class {
build(e, t) {
- return this.context = t, uk(() => this.iterateCollection(e));
+ return this.context = t, ck(() => this.iterateCollection(e));
}
*iterateCollection(e) {
let { children: t, items: n } = e;
@@ -30061,10 +30061,10 @@ var lk = class e {
...a,
key: l,
index: s,
- wrapper: zie(e.wrapper, a.wrapper)
+ wrapper: Vie(e.wrapper, a.wrapper)
}, this.getChildState(t, a), n ? `${n}${i.key}` : i.key, r)];
for (let t of u) {
- if (t.value = a.value ?? e.value ?? null, t.value && this.cache.set(t.value, t), e.type && t.type !== e.type) throw Error(`Unsupported type <${dk(t.type)}> in <${dk(r?.type ?? "unknown parent type")}>. Only <${dk(e.type)}> is supported.`);
+ if (t.value = a.value ?? e.value ?? null, t.value && this.cache.set(t.value, t), e.type && t.type !== e.type) throw Error(`Unsupported type <${lk(t.type)}> in <${lk(r?.type ?? "unknown parent type")}>. Only <${lk(e.type)}> is supported.`);
s++, yield t;
}
c = o.next(u);
@@ -30086,7 +30086,7 @@ var lk = class e {
wrapper: e.wrapper,
shouldInvalidate: e.shouldInvalidate,
hasChildNodes: e.hasChildNodes || !1,
- childNodes: uk(function* () {
+ childNodes: ck(function* () {
if (!e.hasChildNodes || !e.childNodes) return;
let n = 0;
for (let r of e.childNodes()) {
@@ -30105,7 +30105,7 @@ var lk = class e {
this.cache = /* @__PURE__ */ new WeakMap();
}
};
-function uk(e) {
+function ck(e) {
let t = [], n = null;
return { *[Symbol.iterator]() {
for (let e of t) yield e;
@@ -30113,18 +30113,18 @@ function uk(e) {
for (let e of n) t.push(e), yield e;
} };
}
-function zie(e, t) {
+function Vie(e, t) {
if (e && t) return (n) => e(t(n));
if (e) return e;
if (t) return t;
}
-function dk(e) {
+function lk(e) {
return e[0].toUpperCase() + e.slice(1);
}
//#endregion
//#region node_modules/react-stately/dist/private/collections/useCollection.mjs
-function fk(e, t, n) {
- let r = (0, I.useMemo)(() => new Rie(), []), { children: i, items: a, collection: o } = e;
+function uk(e, t, n) {
+ let r = (0, I.useMemo)(() => new Bie(), []), { children: i, items: a, collection: o } = e;
return (0, I.useMemo)(() => o || t(r.build({
children: i,
items: a
@@ -30139,27 +30139,27 @@ function fk(e, t, n) {
}
//#endregion
//#region node_modules/react-stately/dist/private/list/useListState.mjs
-function pk(e) {
- let { filter: t, layoutDelegate: n } = e, r = sk(e), i = (0, I.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), a = fk(e, (0, I.useCallback)((e) => t ? new ak(t(e)) : new ak(e), [t]), (0, I.useMemo)(() => ({ suppressTextValueWarning: e.suppressTextValueWarning }), [e.suppressTextValueWarning])), o = (0, I.useMemo)(() => new lk(a, r, { layoutDelegate: n }), [
+function dk(e) {
+ let { filter: t, layoutDelegate: n } = e, r = ak(e), i = (0, I.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), a = uk(e, (0, I.useCallback)((e) => t ? new rk(t(e)) : new rk(e), [t]), (0, I.useMemo)(() => ({ suppressTextValueWarning: e.suppressTextValueWarning }), [e.suppressTextValueWarning])), o = (0, I.useMemo)(() => new sk(a, r, { layoutDelegate: n }), [
a,
r,
n
]);
- return mk(a, o), {
+ return fk(a, o), {
collection: a,
disabledKeys: i,
selectionManager: o
};
}
-function Bie(e, t) {
+function Hie(e, t) {
let n = (0, I.useMemo)(() => t ? e.collection.filter(t) : e.collection, [e.collection, t]), r = e.selectionManager.withCollection(n);
- return mk(n, r), {
+ return fk(n, r), {
collection: n,
selectionManager: r,
disabledKeys: e.disabledKeys
};
}
-function mk(e, t) {
+function fk(e, t) {
let n = (0, I.useRef)(null);
(0, I.useEffect)(() => {
if (t.focusedKey != null && !e.getItem(t.focusedKey) && n.current) {
@@ -30187,7 +30187,7 @@ function mk(e, t) {
}
//#endregion
//#region node_modules/react-aria/dist/private/utils/useLoadMoreSentinel.mjs
-function hk(e, t) {
+function pk(e, t) {
let { collection: n, onLoadMore: r, scrollOffset: i = 1, direction: a = "end" } = e, o = (0, I.useRef)(null), s = _g((e) => {
for (let t of e) t.isIntersecting && r && r();
});
@@ -30211,42 +30211,42 @@ function hk(e, t) {
}
//#endregion
//#region node_modules/react-aria-components/dist/private/ListBox.mjs
-var gk = /*#__PURE__*/ (0, I.createContext)(null), _k = /*#__PURE__*/ (0, I.createContext)(null), Vie = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- [e, t] = WD(e, t, gk);
- let n = (0, I.useContext)(_k);
- return n ? /*#__PURE__*/ I.createElement(vk, {
+var mk = /*#__PURE__*/ (0, I.createContext)(null), hk = /*#__PURE__*/ (0, I.createContext)(null), Uie = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ [e, t] = HD(e, t, mk);
+ let n = (0, I.useContext)(hk);
+ return n ? /*#__PURE__*/ I.createElement(gk, {
state: n,
props: e,
listBoxRef: t
- }) : /*#__PURE__*/ I.createElement($h, { content: /*#__PURE__*/ I.createElement(ug, e) }, (n) => /*#__PURE__*/ I.createElement(Hie, {
+ }) : /*#__PURE__*/ I.createElement($h, { content: /*#__PURE__*/ I.createElement(ug, e) }, (n) => /*#__PURE__*/ I.createElement(Wie, {
props: e,
listBoxRef: t,
collection: n
}));
});
-function Hie({ props: e, listBoxRef: t, collection: n }) {
+function Wie({ props: e, listBoxRef: t, collection: n }) {
e = {
...e,
collection: n,
children: null,
items: null
};
- let { layoutDelegate: r } = (0, I.useContext)(eO), i = pk({
+ let { layoutDelegate: r } = (0, I.useContext)(QD), i = dk({
...e,
layoutDelegate: r
});
- return /*#__PURE__*/ I.createElement(vk, {
+ return /*#__PURE__*/ I.createElement(gk, {
state: i,
props: e,
listBoxRef: t
});
}
-function vk({ state: e, props: t, listBoxRef: n }) {
- [t, n] = WD(t, n, YD);
- let { dragAndDropHooks: r, layout: i = "stack", orientation: a = "vertical", filter: o } = t, s = Bie(e, o), { collection: c, selectionManager: l } = s, u = !!r?.useDraggableCollectionState, d = !!r?.useDroppableCollectionState, { direction: f } = Eg(), { disabledBehavior: p, disabledKeys: m } = l, h = gy({
+function gk({ state: e, props: t, listBoxRef: n }) {
+ [t, n] = HD(t, n, qD);
+ let { dragAndDropHooks: r, layout: i = "stack", orientation: a = "vertical", filter: o } = t, s = Hie(e, o), { collection: c, selectionManager: l } = s, u = !!r?.useDraggableCollectionState, d = !!r?.useDroppableCollectionState, { direction: f } = Eg(), { disabledBehavior: p, disabledKeys: m } = l, h = gy({
usage: "search",
sensitivity: "base"
- }), { isVirtualized: g, layoutDelegate: _, dropTargetDelegate: v, CollectionRoot: y } = (0, I.useContext)(eO), b = (0, I.useMemo)(() => t.keyboardDelegate || new vv({
+ }), { isVirtualized: g, layoutDelegate: _, dropTargetDelegate: v, CollectionRoot: y } = (0, I.useContext)(QD), b = (0, I.useMemo)(() => t.keyboardDelegate || new vv({
collection: c,
collator: h,
ref: n,
@@ -30267,7 +30267,7 @@ function vk({ state: e, props: t, listBoxRef: n }) {
t.keyboardDelegate,
i,
_
- ]), { listBoxProps: x } = ote({
+ ]), { listBoxProps: x } = ste({
...t,
shouldSelectOnPressUp: u || t.shouldSelectOnPressUp,
keyboardDelegate: b,
@@ -30299,7 +30299,7 @@ function vk({ state: e, props: t, listBoxRef: n }) {
dropTargetDelegate: e
}, C, n), T = C.isDropTarget({ type: "root" });
}
- let { focusProps: O, isFocused: k, isFocusVisible: A } = Ty(), j = s.collection.size === 0, M = {
+ let { focusProps: O, isFocused: k, isFocusVisible: A } = wy(), j = s.collection.size === 0, M = {
isDropTarget: T,
isEmpty: j,
isFocused: k,
@@ -30307,7 +30307,7 @@ function vk({ state: e, props: t, listBoxRef: n }) {
layout: t.layout || "stack",
orientation: a,
state: s
- }, N = HD({
+ }, N = BD({
...t,
children: void 0,
defaultClassName: "react-aria-ListBox",
@@ -30318,7 +30318,7 @@ function vk({ state: e, props: t, listBoxRef: n }) {
style: { display: "contents" }
}, t.renderEmptyState(M)));
let te = zg(t, { global: !0 });
- return /*#__PURE__*/ I.createElement(l_, null, /*#__PURE__*/ I.createElement(JD.div, {
+ return /*#__PURE__*/ I.createElement(l_, null, /*#__PURE__*/ I.createElement(KD.div, {
...H(te, N, x, O, w?.collectionProps),
ref: n,
slot: t.slot || void 0,
@@ -30329,55 +30329,55 @@ function vk({ state: e, props: t, listBoxRef: n }) {
"data-focus-visible": A || void 0,
"data-layout": t.layout || "stack",
"data-orientation": a
- }, /*#__PURE__*/ I.createElement(VD, { values: [
- [gk, t],
- [_k, s],
- [XO, {
+ }, /*#__PURE__*/ I.createElement(zD, { values: [
+ [mk, t],
+ [hk, s],
+ [JO, {
dragAndDropHooks: r,
dragState: S,
dropState: C
}],
- [rk, { elementType: "div" }],
- [ZO, { render: Gie }],
- [ZD, {
+ [tk, { elementType: "div" }],
+ [YO, { render: qie }],
+ [YD, {
name: "ListBoxSection",
- render: Uie
+ render: Gie
}]
- ] }, /*#__PURE__*/ I.createElement(tk, null, /*#__PURE__*/ I.createElement(y, {
+ ] }, /*#__PURE__*/ I.createElement($O, null, /*#__PURE__*/ I.createElement(y, {
collection: c,
scrollRef: n,
- persistedKeys: $O(l, r, C),
- renderDropIndicator: QO(r, C)
+ persistedKeys: ZO(l, r, C),
+ renderDropIndicator: XO(r, C)
}))), ee, E));
}
-function Uie(e, t, n, r = "react-aria-ListBoxSection") {
- let i = (0, I.useContext)(_k), { dragAndDropHooks: a, dropState: o } = (0, I.useContext)(XO), { CollectionBranch: s } = (0, I.useContext)(eO), [c, l] = GD(), { headingProps: u, groupProps: d } = ste({
+function Gie(e, t, n, r = "react-aria-ListBoxSection") {
+ let i = (0, I.useContext)(hk), { dragAndDropHooks: a, dropState: o } = (0, I.useContext)(JO), { CollectionBranch: s } = (0, I.useContext)(QD), [c, l] = UD(), { headingProps: u, groupProps: d } = cte({
heading: l,
"aria-label": e["aria-label"] ?? void 0
- }), f = HD({
+ }), f = BD({
...e,
id: void 0,
children: void 0,
defaultClassName: r,
values: void 0
}), p = zg(e, { global: !0 });
- return delete p.id, /*#__PURE__*/ I.createElement(JD.section, {
+ return delete p.id, /*#__PURE__*/ I.createElement(KD.section, {
...H(p, f, d),
ref: t
- }, /*#__PURE__*/ I.createElement(ek.Provider, { value: {
+ }, /*#__PURE__*/ I.createElement(QO.Provider, { value: {
...u,
ref: c
} }, /*#__PURE__*/ I.createElement(s, {
collection: i.collection,
parent: n,
- renderDropIndicator: QO(a, o)
+ renderDropIndicator: XO(a, o)
})));
}
-var Wie = /*#__PURE__*/ og(sp, function(e, t, n) {
- let r = Ih(t), i = (0, I.useContext)(_k), { dragAndDropHooks: a, dragState: o, dropState: s } = (0, I.useContext)(XO), c = o && !(o.isDisabled || o.selectionManager.isDisabled(n.key)), { optionProps: l, labelProps: u, descriptionProps: d, ...f } = cte({
+var Kie = /*#__PURE__*/ og(sp, function(e, t, n) {
+ let r = Ih(t), i = (0, I.useContext)(hk), { dragAndDropHooks: a, dragState: o, dropState: s } = (0, I.useContext)(JO), c = o && !(o.isDisabled || o.selectionManager.isDisabled(n.key)), { optionProps: l, labelProps: u, descriptionProps: d, ...f } = lte({
key: n.key,
"aria-label": e?.["aria-label"]
- }, i, r), { hoverProps: p, isHovered: m } = My({
+ }, i, r), { hoverProps: p, isHovered: m } = jy({
isDisabled: !f.allowsSelection && !f.hasAction && !c,
onHoverStart: n.props.onHoverStart,
onHoverChange: n.props.onHoverChange,
@@ -30393,7 +30393,7 @@ var Wie = /*#__PURE__*/ og(sp, function(e, t, n) {
key: n.key,
dropPosition: "on"
} }, s, r));
- let y = o && o.isDragging(n.key), b = HD({
+ let y = o && o.isDragging(n.key), b = BD({
...e,
id: void 0,
children: e.children,
@@ -30411,7 +30411,7 @@ var Wie = /*#__PURE__*/ og(sp, function(e, t, n) {
(0, I.useEffect)(() => {
n.textValue;
}, [n.textValue]);
- let x = e.href ? JD.a : JD.div, S = zg(e, { global: !0 });
+ let x = e.href ? KD.a : KD.div, S = zg(e, { global: !0 });
return delete S.id, delete S.onClick, e.href && l.tabIndex == null && (l.tabIndex = -1), /*#__PURE__*/ I.createElement(x, {
...H(S, b, l, p, h, g, _?.dragProps, v?.dropProps),
ref: r,
@@ -30425,29 +30425,29 @@ var Wie = /*#__PURE__*/ og(sp, function(e, t, n) {
"data-dragging": y || void 0,
"data-drop-target": v?.isDropTarget || void 0,
"data-selection-mode": i.selectionManager.selectionMode === "none" ? void 0 : i.selectionManager.selectionMode
- }, /*#__PURE__*/ I.createElement(VD, { values: [[sO, { slots: {
- [BD]: u,
+ }, /*#__PURE__*/ I.createElement(zD, { values: [[aO, { slots: {
+ [RD]: u,
label: u,
description: d
- } }], [nk, { isSelected: f.isSelected }]] }, b.children));
+ } }], [ek, { isSelected: f.isSelected }]] }, b.children));
});
-function Gie(e, t) {
+function qie(e, t) {
t = Ih(t);
- let { dragAndDropHooks: n, dropState: r } = (0, I.useContext)(XO), { dropIndicatorProps: i, isHidden: a, isDropTarget: o } = n.useDropIndicator(e, r, t);
- return a ? null : /*#__PURE__*/ I.createElement(qie, {
+ let { dragAndDropHooks: n, dropState: r } = (0, I.useContext)(JO), { dropIndicatorProps: i, isHidden: a, isDropTarget: o } = n.useDropIndicator(e, r, t);
+ return a ? null : /*#__PURE__*/ I.createElement(Yie, {
...e,
dropIndicatorProps: i,
isDropTarget: o,
ref: t
});
}
-function Kie(e, t) {
- let { dropIndicatorProps: n, isDropTarget: r, ...i } = e, a = HD({
+function Jie(e, t) {
+ let { dropIndicatorProps: n, isDropTarget: r, ...i } = e, a = BD({
...i,
defaultClassName: "react-aria-DropIndicator",
values: { isDropTarget: r }
});
- return /*#__PURE__*/ I.createElement(I.Fragment, null, /*#__PURE__*/ I.createElement(JD.div, {
+ return /*#__PURE__*/ I.createElement(I.Fragment, null, /*#__PURE__*/ I.createElement(KD.div, {
...n,
...a,
role: "option",
@@ -30455,10 +30455,10 @@ function Kie(e, t) {
"data-drop-target": r || void 0
}));
}
-var qie = /*#__PURE__*/ (0, I.forwardRef)(Kie);
+var Yie = /*#__PURE__*/ (0, I.forwardRef)(Jie);
og(op, function(e, t, n) {
- let r = (0, I.useContext)(_k), { isLoading: i, onLoadMore: a, scrollOffset: o, ...s } = e, c = (0, I.useRef)(null);
- hk((0, I.useMemo)(() => ({
+ let r = (0, I.useContext)(hk), { isLoading: i, onLoadMore: a, scrollOffset: o, ...s } = e, c = (0, I.useRef)(null);
+ pk((0, I.useMemo)(() => ({
onLoadMore: a,
collection: r?.collection,
sentinelRef: c,
@@ -30468,7 +30468,7 @@ og(op, function(e, t, n) {
o,
r?.collection
]), c);
- let l = HD({
+ let l = BD({
...s,
id: void 0,
children: n.rendered,
@@ -30481,7 +30481,7 @@ og(op, function(e, t, n) {
width: 0,
height: 0
},
- inert: ik(!0)
+ inert: nk(!0)
}, /*#__PURE__*/ I.createElement("div", {
"data-testid": "loadMoreSentinel",
ref: c,
@@ -30490,7 +30490,7 @@ og(op, function(e, t, n) {
height: 1,
width: 1
}
- })), i && l.children && /*#__PURE__*/ I.createElement(I.Fragment, null, /*#__PURE__*/ I.createElement(JD.div, {
+ })), i && l.children && /*#__PURE__*/ I.createElement(I.Fragment, null, /*#__PURE__*/ I.createElement(KD.div, {
...H(zg(e, { global: !0 }), { tabIndex: -1 }),
...l,
role: "option",
@@ -30499,10 +30499,10 @@ og(op, function(e, t, n) {
});
//#endregion
//#region node_modules/react-aria-components/dist/private/OverlayArrow.mjs
-var Jie = /*#__PURE__*/ (0, I.createContext)({ placement: "bottom" });
+var Xie = /*#__PURE__*/ (0, I.createContext)({ placement: "bottom" });
//#endregion
//#region node_modules/react-stately/dist/private/overlays/useOverlayTriggerState.mjs
-function yk(e) {
+function _k(e) {
let [t, n] = $_(e.isOpen, e.defaultOpen || !1, e.onOpenChange), [r, i] = (0, I.useState)(null);
return {
isOpen: t,
@@ -30522,13 +30522,13 @@ function yk(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/utils/animation.mjs
-function bk(e, t = !0) {
+function vk(e, t = !0) {
let [n, r] = (0, I.useState)(!0), i = n && t;
return Gp(() => {
if (i && e.current && "getAnimations" in e.current) for (let t of e.current.getAnimations()) t instanceof CSSTransition && t.cancel();
- }, [e, i]), Sk(e, i, (0, I.useCallback)(() => r(!1), [])), i;
+ }, [e, i]), bk(e, i, (0, I.useCallback)(() => r(!1), [])), i;
}
-function xk(e, t) {
+function yk(e, t) {
let [n, r] = (0, I.useState)(t ? "open" : "closed");
switch (n) {
case "open":
@@ -30538,11 +30538,11 @@ function xk(e, t) {
case "exiting": t && r("open");
}
let i = n === "exiting";
- return Sk(e, i, (0, I.useCallback)(() => {
+ return bk(e, i, (0, I.useCallback)(() => {
r((e) => e === "exiting" ? "closed" : e);
}, [])), i;
}
-function Sk(e, t, n) {
+function bk(e, t, n) {
Gp(() => {
if (t && e.current) {
if (!("getAnimations" in e.current)) {
@@ -30571,9 +30571,9 @@ function Sk(e, t, n) {
}
//#endregion
//#region node_modules/react-aria-components/dist/private/Popover.mjs
-var Ck = /*#__PURE__*/ (0, I.createContext)(null), wk = /*#__PURE__*/ (0, I.createContext)(null), Tk = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- [e, t] = WD(e, t, Ck);
- let n = (0, I.useContext)(Fk), r = yk(e), i = e.isOpen != null || e.defaultOpen != null || !n ? r : n, a = xk(t, i.isOpen), o = e.isExiting || !e.shouldSkipAnimation && a || !1, s = Wh(), { direction: c } = Eg();
+var xk = /*#__PURE__*/ (0, I.createContext)(null), Sk = /*#__PURE__*/ (0, I.createContext)(null), Ck = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ [e, t] = HD(e, t, xk);
+ let n = (0, I.useContext)(Nk), r = _k(e), i = e.isOpen != null || e.defaultOpen != null || !n ? r : n, a = yk(t, i.isOpen), o = e.isExiting || !e.shouldSkipAnimation && a || !1, s = Wh(), { direction: c } = Eg();
if (s) {
let t = e.children;
return typeof t == "function" && (t = t({
@@ -30584,7 +30584,7 @@ var Ck = /*#__PURE__*/ (0, I.createContext)(null), wk = /*#__PURE__*/ (0, I.crea
defaultChildren: null
})), /*#__PURE__*/ I.createElement(I.Fragment, null, t);
}
- return i && !i.isOpen && !o ? null : /*#__PURE__*/ I.createElement(Yie, {
+ return i && !i.isOpen && !o ? null : /*#__PURE__*/ I.createElement(Zie, {
...e,
triggerRef: e.triggerRef,
state: i,
@@ -30593,13 +30593,13 @@ var Ck = /*#__PURE__*/ (0, I.createContext)(null), wk = /*#__PURE__*/ (0, I.crea
dir: c
});
});
-function Yie({ state: e, isExiting: t, UNSTABLE_portalContainer: n, clearContexts: r, ...i }) {
- let a = (0, I.useRef)(null), o = (0, I.useRef)(null), s = (0, I.useContext)(wk), c = s && i.trigger === "SubmenuTrigger", { popoverProps: l, underlayProps: u, arrowProps: d, placement: f, triggerAnchorPoint: p } = Ote({
+function Zie({ state: e, isExiting: t, UNSTABLE_portalContainer: n, clearContexts: r, ...i }) {
+ let a = (0, I.useRef)(null), o = (0, I.useRef)(null), s = (0, I.useContext)(Sk), c = s && i.trigger === "SubmenuTrigger", { popoverProps: l, underlayProps: u, arrowProps: d, placement: f, triggerAnchorPoint: p } = kte({
...i,
offset: i.offset ?? 8,
arrowRef: a,
groupRef: c ? s : o
- }, e), m = i.popoverRef, h = bk(m, !!f), g = i.isEntering || !i.shouldSkipAnimation && h || !1, _ = HD({
+ }, e), m = i.popoverRef, h = vk(m, !!f), g = i.isEntering || !i.shouldSkipAnimation && h || !1, _ = BD({
...i,
defaultClassName: "react-aria-Popover",
values: {
@@ -30625,7 +30625,7 @@ function Yie({ state: e, isExiting: t, UNSTABLE_portalContainer: n, clearContext
}, [_.children, r]), [S, C] = (0, I.useState)(null), w = (0, I.useCallback)(() => {
i.triggerRef.current && C(i.triggerRef.current.getBoundingClientRect().width + "px");
}, [i.triggerRef]);
- Gp(w, [w]), Cb({
+ Gp(w, [w]), Sb({
ref: _.style?.["--trigger-width"] ? void 0 : i.triggerRef,
onResize: w
});
@@ -30634,7 +30634,7 @@ function Yie({ state: e, isExiting: t, UNSTABLE_portalContainer: n, clearContext
"--trigger-anchor-point": p ? `${p.x}px ${p.y}px` : void 0,
..._.style,
"--trigger-width": _.style?.["--trigger-width"] || S
- }, E = /*#__PURE__*/ I.createElement(JD.div, {
+ }, E = /*#__PURE__*/ I.createElement(KD.div, {
...H(zg(i, { global: !0 }), l),
..._,
id: y ? i.id : void 0,
@@ -30650,17 +30650,17 @@ function Yie({ state: e, isExiting: t, UNSTABLE_portalContainer: n, clearContext
"data-placement": f,
"data-entering": g || void 0,
"data-exiting": t || void 0
- }, !i.isNonModal && /*#__PURE__*/ I.createElement(ax, { onDismiss: e.close }), /*#__PURE__*/ I.createElement(Jie.Provider, { value: {
+ }, !i.isNonModal && /*#__PURE__*/ I.createElement(ix, { onDismiss: e.close }), /*#__PURE__*/ I.createElement(Xie.Provider, { value: {
...d,
placement: f,
ref: a
- } }, x), /*#__PURE__*/ I.createElement(ax, { onDismiss: e.close }));
- return c ? /*#__PURE__*/ I.createElement(Sy, {
+ } }, x), /*#__PURE__*/ I.createElement(ix, { onDismiss: e.close }));
+ return c ? /*#__PURE__*/ I.createElement(xy, {
...i,
shouldContainFocus: y && i.trigger !== "PreviewTrigger",
isExiting: t,
portalContainer: n ?? s?.current ?? void 0
- }, E) : /*#__PURE__*/ I.createElement(Sy, {
+ }, E) : /*#__PURE__*/ I.createElement(xy, {
...i,
shouldContainFocus: y && i.trigger !== "PreviewTrigger",
isExiting: t,
@@ -30675,15 +30675,15 @@ function Yie({ state: e, isExiting: t, UNSTABLE_portalContainer: n, clearContext
}), /*#__PURE__*/ I.createElement("div", {
ref: o,
style: { display: "contents" }
- }, /*#__PURE__*/ I.createElement(wk.Provider, { value: o }, E)));
+ }, /*#__PURE__*/ I.createElement(Sk.Provider, { value: o }, E)));
}
//#endregion
//#region node_modules/react-aria-components/dist/private/Keyboard.mjs
-var Xie = /*#__PURE__*/ (0, I.createContext)({});
+var Qie = /*#__PURE__*/ (0, I.createContext)({});
//#endregion
//#region node_modules/react-stately/dist/private/menu/useMenuTriggerState.mjs
-function Ek(e) {
- let t = yk(e), [n, r] = (0, I.useState)(null), [i, a] = (0, I.useState)([]), o = () => {
+function wk(e) {
+ let t = _k(e), [n, r] = (0, I.useState)(null), [i, a] = (0, I.useState)([]), o = () => {
a([]), t.close();
}, s = (e, t) => {
a((n) => t > n.length ? n : [...n.slice(0, t), e]);
@@ -30709,7 +30709,7 @@ function Ek(e) {
}
//#endregion
//#region node_modules/react-stately/dist/private/tree/TreeCollection.mjs
-var Zie = class {
+var $ie = class {
constructor(e, { expandedKeys: t } = {}) {
this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.iterable = e, t ||= /* @__PURE__ */ new Set();
let n = (e) => {
@@ -30753,8 +30753,8 @@ var Zie = class {
};
//#endregion
//#region node_modules/react-stately/dist/private/tree/useTreeState.mjs
-function Qie(e) {
- let { onExpandedChange: t } = e, [n, r] = $_(e.expandedKeys ? new Set(e.expandedKeys) : void 0, e.defaultExpandedKeys ? new Set(e.defaultExpandedKeys) : /* @__PURE__ */ new Set(), t), i = sk(e), a = (0, I.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), o = fk(e, (0, I.useCallback)((e) => new Zie(e, { expandedKeys: n }), [n]), null);
+function eae(e) {
+ let { onExpandedChange: t } = e, [n, r] = $_(e.expandedKeys ? new Set(e.expandedKeys) : void 0, e.defaultExpandedKeys ? new Set(e.defaultExpandedKeys) : /* @__PURE__ */ new Set(), t), i = ak(e), a = (0, I.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), o = uk(e, (0, I.useCallback)((e) => new $ie(e, { expandedKeys: n }), [n]), null);
return (0, I.useEffect)(() => {
i.focusedKey != null && !o.getItem(i.focusedKey) && i.setFocusedKey(null);
}, [o, i.focusedKey]), {
@@ -30762,32 +30762,32 @@ function Qie(e) {
expandedKeys: n,
disabledKeys: a,
toggleKey: (e) => {
- r($ie(n, e));
+ r(tae(n, e));
},
setExpandedKeys: r,
- selectionManager: new lk(o, i)
+ selectionManager: new sk(o, i)
};
}
-function $ie(e, t) {
+function tae(e, t) {
let n = new Set(e);
return n.has(t) ? n.delete(t) : n.add(t), n;
}
//#endregion
//#region node_modules/react-aria-components/dist/private/Menu.mjs
-var Dk = /*#__PURE__*/ (0, I.createContext)(null), Ok = /*#__PURE__*/ (0, I.createContext)(null), kk = /*#__PURE__*/ (0, I.createContext)(null), Ak = /*#__PURE__*/ (0, I.createContext)(null);
-function eae(e) {
- let t = Ek(e), n = (0, I.useRef)(null), { menuTriggerProps: r, menuProps: i } = ny({
+var Tk = /*#__PURE__*/ (0, I.createContext)(null), Ek = /*#__PURE__*/ (0, I.createContext)(null), Dk = /*#__PURE__*/ (0, I.createContext)(null), Ok = /*#__PURE__*/ (0, I.createContext)(null);
+function nae(e) {
+ let t = wk(e), n = (0, I.useRef)(null), { menuTriggerProps: r, menuProps: i } = ny({
...e,
type: "menu"
}, t, n), a = (0, I.useRef)(null);
- return Wh() ? null : /*#__PURE__*/ I.createElement(VD, { values: [
- [Dk, {
+ return Wh() ? null : /*#__PURE__*/ I.createElement(zD, { values: [
+ [Tk, {
...i,
ref: a
}],
- [Fk, t],
- [kk, t],
- [Ck, {
+ [Nk, t],
+ [Dk, t],
+ [xk, {
trigger: "MenuTrigger",
triggerRef: n,
scrollRef: a,
@@ -30801,7 +30801,7 @@ function eae(e) {
isPressed: t.isOpen
}, e.children));
}
-var tae = /*#__PURE__*/ (0, I.createContext)(null);
+var rae = /*#__PURE__*/ (0, I.createContext)(null);
(class extends ip {
static {
this.type = "submenutrigger";
@@ -30815,24 +30815,24 @@ var tae = /*#__PURE__*/ (0, I.createContext)(null);
return null;
}
});
-var nae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- return [e, t] = WD(e, t, Dk), /*#__PURE__*/ I.createElement($h, { content: /*#__PURE__*/ I.createElement(ug, e) }, (n) => /*#__PURE__*/ I.createElement(rae, {
+var iae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ return [e, t] = HD(e, t, Tk), /*#__PURE__*/ I.createElement($h, { content: /*#__PURE__*/ I.createElement(ug, e) }, (n) => /*#__PURE__*/ I.createElement(aae, {
props: e,
collection: n,
menuRef: t
}));
});
-function rae({ props: e, collection: t, menuRef: n }) {
- [e, n] = WD(e, n, YD);
- let { filter: r, ...i } = e, a = (0, I.useMemo)(() => r ? t.filter(r) : t, [t, r]), o = Qie({
+function aae({ props: e, collection: t, menuRef: n }) {
+ [e, n] = HD(e, n, qD);
+ let { filter: r, ...i } = e, a = (0, I.useMemo)(() => r ? t.filter(r) : t, [t, r]), o = eae({
...e,
collection: a,
children: void 0
- }), s = (0, I.useContext)(kk), { isVirtualized: c, CollectionRoot: l } = (0, I.useContext)(eO), { menuProps: u } = lte({
+ }), s = (0, I.useContext)(Dk), { isVirtualized: c, CollectionRoot: l } = (0, I.useContext)(QD), { menuProps: u } = ute({
...e,
isVirtualized: c,
onClose: e.onClose || s?.close
- }, o, n), d = HD({
+ }, o, n), d = BD({
...e,
children: void 0,
defaultClassName: "react-aria-Menu",
@@ -30843,35 +30843,35 @@ function rae({ props: e, collection: t, menuRef: n }) {
style: { display: "contents" }
}, e.renderEmptyState()));
let p = zg(e, { global: !0 });
- return /*#__PURE__*/ I.createElement(l_, null, /*#__PURE__*/ I.createElement(JD.div, {
+ return /*#__PURE__*/ I.createElement(l_, null, /*#__PURE__*/ I.createElement(KD.div, {
...H(p, d, u),
ref: n,
slot: e.slot || void 0,
"data-empty": o.collection.size === 0 || void 0,
onScroll: e.onScroll
- }, /*#__PURE__*/ I.createElement(VD, { values: [
- [Ok, o],
- [rk, { elementType: "div" }],
- [ZD, {
+ }, /*#__PURE__*/ I.createElement(zD, { values: [
+ [Ek, o],
+ [tk, { elementType: "div" }],
+ [YD, {
name: "MenuSection",
- render: jk
+ render: kk
}],
- [tae, {
+ [rae, {
parentMenuRef: n,
shouldUseVirtualFocus: i?.shouldUseVirtualFocus
}],
- [Nk, { shouldCloseOnSelect: e.shouldCloseOnSelect }],
- [YD, null],
- [XD, null],
- [Ak, o.selectionManager],
- [kk, s ?? Ek({})]
- ] }, /*#__PURE__*/ I.createElement(tk, null, /*#__PURE__*/ I.createElement(l, {
+ [jk, { shouldCloseOnSelect: e.shouldCloseOnSelect }],
+ [qD, null],
+ [JD, null],
+ [Ok, o.selectionManager],
+ [Dk, s ?? wk({})]
+ ] }, /*#__PURE__*/ I.createElement($O, null, /*#__PURE__*/ I.createElement(l, {
collection: o.collection,
- persistedKeys: tO(o.selectionManager.focusedKey),
+ persistedKeys: $D(o.selectionManager.focusedKey),
scrollRef: n
}))), f));
}
-var iae = class extends lk {
+var oae = class extends sk {
constructor(e, t) {
super(e.collection, t), this.parent = e;
}
@@ -30891,11 +30891,11 @@ var iae = class extends lk {
return this.parent.childFocusStrategy;
}
};
-function jk(e, t, n, r = "react-aria-MenuSection") {
- let i = (0, I.useContext)(Ok), { CollectionBranch: a } = (0, I.useContext)(eO), [o, s] = GD(), { headingProps: c, groupProps: l } = dte({
+function kk(e, t, n, r = "react-aria-MenuSection") {
+ let i = (0, I.useContext)(Ek), { CollectionBranch: a } = (0, I.useContext)(QD), [o, s] = UD(), { headingProps: c, groupProps: l } = fte({
heading: s,
"aria-label": n.props["aria-label"] ?? void 0
- }), u = HD({
+ }), u = BD({
...e,
id: void 0,
children: void 0,
@@ -30903,31 +30903,31 @@ function jk(e, t, n, r = "react-aria-MenuSection") {
className: n.props?.className,
style: n.props?.style,
values: void 0
- }), d = (0, I.useContext)(Ak), f = sk(e), p = e.selectionMode == null ? d : new iae(d, f), m = UD(Nk)?.shouldCloseOnSelect, h = zg(e, { global: !0 });
- return delete h.id, /*#__PURE__*/ I.createElement(JD.section, {
+ }), d = (0, I.useContext)(Ok), f = ak(e), p = e.selectionMode == null ? d : new oae(d, f), m = VD(jk)?.shouldCloseOnSelect, h = zg(e, { global: !0 });
+ return delete h.id, /*#__PURE__*/ I.createElement(KD.section, {
...H(h, u, l),
ref: t
- }, /*#__PURE__*/ I.createElement(VD, { values: [
- [ek, {
+ }, /*#__PURE__*/ I.createElement(zD, { values: [
+ [QO, {
...c,
ref: o
}],
- [Ak, p],
- [Nk, { shouldCloseOnSelect: e.shouldCloseOnSelect ?? m }]
+ [Ok, p],
+ [jk, { shouldCloseOnSelect: e.shouldCloseOnSelect ?? m }]
] }, /*#__PURE__*/ I.createElement(a, {
collection: i.collection,
parent: n
})));
}
-var Mk = /*#__PURE__*/ sg(cp, jk), Nk = /*#__PURE__*/ (0, I.createContext)(null), Pk = /*#__PURE__*/ og(sp, function(e, t, n) {
- [e, t] = WD(e, t, Nk);
- let r = UD(Nk)?.id, i = (0, I.useContext)(Ok), a = Ih(t), o = (0, I.useContext)(Ak), { isVirtualized: s } = (0, I.useContext)(eO), { menuItemProps: c, labelProps: l, descriptionProps: u, keyboardShortcutProps: d, ...f } = ute({
+var Ak = /*#__PURE__*/ sg(cp, kk), jk = /*#__PURE__*/ (0, I.createContext)(null), Mk = /*#__PURE__*/ og(sp, function(e, t, n) {
+ [e, t] = HD(e, t, jk);
+ let r = VD(jk)?.id, i = (0, I.useContext)(Ek), a = Ih(t), o = (0, I.useContext)(Ok), { isVirtualized: s } = (0, I.useContext)(QD), { menuItemProps: c, labelProps: l, descriptionProps: u, keyboardShortcutProps: d, ...f } = dte({
...e,
id: r,
key: n.key,
selectionManager: o,
isVirtualized: s
- }, i, a), { hoverProps: p, isHovered: m } = My({ isDisabled: f.isDisabled }), h = HD({
+ }, i, a), { hoverProps: p, isHovered: m } = jy({ isDisabled: f.isDisabled }), h = BD({
...e,
id: void 0,
children: n.rendered,
@@ -30941,7 +30941,7 @@ var Mk = /*#__PURE__*/ sg(cp, jk), Nk = /*#__PURE__*/ (0, I.createContext)(null)
hasSubmenu: !!e["aria-haspopup"],
isOpen: e["aria-expanded"] === "true"
}
- }), g = e.href ? JD.a : JD.div, _ = zg(e, { global: !0 });
+ }), g = e.href ? KD.a : KD.div, _ = zg(e, { global: !0 });
return delete _.id, delete _.onClick, /*#__PURE__*/ I.createElement(g, {
...H(_, h, c, p),
ref: a,
@@ -30954,19 +30954,19 @@ var Mk = /*#__PURE__*/ sg(cp, jk), Nk = /*#__PURE__*/ (0, I.createContext)(null)
"data-selection-mode": o.selectionMode === "none" ? void 0 : o.selectionMode,
"data-has-submenu": !!e["aria-haspopup"] || void 0,
"data-open": e["aria-expanded"] === "true" || void 0
- }, /*#__PURE__*/ I.createElement(VD, { values: [
- [sO, { slots: {
- [BD]: l,
+ }, /*#__PURE__*/ I.createElement(zD, { values: [
+ [aO, { slots: {
+ [RD]: l,
label: l,
description: u
} }],
- [Xie, d],
- [nk, { isSelected: f.isSelected }]
+ [Qie, d],
+ [ek, { isSelected: f.isSelected }]
] }, h.children));
});
og(op, function(e, t, n) {
- let r = (0, I.useContext)(Ok), { isLoading: i, onLoadMore: a, scrollOffset: o, ...s } = e, c = (0, I.useRef)(null);
- hk((0, I.useMemo)(() => ({
+ let r = (0, I.useContext)(Ek), { isLoading: i, onLoadMore: a, scrollOffset: o, ...s } = e, c = (0, I.useRef)(null);
+ pk((0, I.useMemo)(() => ({
onLoadMore: a,
collection: r?.collection,
sentinelRef: c,
@@ -30976,7 +30976,7 @@ og(op, function(e, t, n) {
o,
r?.collection
]), c);
- let l = HD({
+ let l = BD({
...s,
id: void 0,
children: n.rendered,
@@ -30989,7 +30989,7 @@ og(op, function(e, t, n) {
width: 0,
height: 0
},
- inert: ik(!0)
+ inert: nk(!0)
}, /*#__PURE__*/ I.createElement("div", {
"data-testid": "loadMoreSentinel",
ref: c,
@@ -30998,7 +30998,7 @@ og(op, function(e, t, n) {
height: 1,
width: 1
}
- })), i && l.children && /*#__PURE__*/ I.createElement(I.Fragment, null, /*#__PURE__*/ I.createElement(JD.div, {
+ })), i && l.children && /*#__PURE__*/ I.createElement(I.Fragment, null, /*#__PURE__*/ I.createElement(KD.div, {
...H(zg(e, { global: !0 }), { tabIndex: -1 }),
...l,
role: "menuitem",
@@ -31007,56 +31007,56 @@ og(op, function(e, t, n) {
});
//#endregion
//#region node_modules/react-aria-components/dist/private/Dialog.mjs
-var aae = /*#__PURE__*/ (0, I.createContext)(null), Fk = /*#__PURE__*/ (0, I.createContext)(null), Ik = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+var sae = /*#__PURE__*/ (0, I.createContext)(null), Nk = /*#__PURE__*/ (0, I.createContext)(null), Pk = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
let n = e["aria-labelledby"];
- [e, t] = WD(e, t, aae);
- let { dialogProps: r, titleProps: i, contentProps: a } = wy({
+ [e, t] = HD(e, t, sae);
+ let { dialogProps: r, titleProps: i, contentProps: a } = Cy({
...e,
"aria-labelledby": n
- }, t), o = (0, I.useContext)(Fk);
+ }, t), o = (0, I.useContext)(Nk);
!r["aria-label"] && !r["aria-labelledby"] && e["aria-labelledby"] && (r["aria-labelledby"] = e["aria-labelledby"]);
- let s = HD({
+ let s = BD({
defaultClassName: "react-aria-Dialog",
className: e.className,
style: e.style,
children: e.children,
values: { close: o?.close || (() => {}) }
}), c = zg(e, { global: !0 });
- return /*#__PURE__*/ I.createElement(JD.section, {
+ return /*#__PURE__*/ I.createElement(KD.section, {
...H(c, s, r),
render: e.render,
ref: t,
slot: e.slot || void 0
- }, /*#__PURE__*/ I.createElement(VD, { values: [
- [aO, { slots: {
- [BD]: {},
+ }, /*#__PURE__*/ I.createElement(zD, { values: [
+ [rO, { slots: {
+ [RD]: {},
title: {
...i,
level: 2
}
} }],
- [sO, { slots: {
- [BD]: {},
+ [aO, { slots: {
+ [RD]: {},
description: a
} }],
- [rO, { slots: {
- [BD]: {},
+ [tO, { slots: {
+ [RD]: {},
close: { onPress: () => o?.close() }
} }]
] }, s.children));
-}), Lk = typeof document < "u" && window.visualViewport;
-function oae() {
+}), Fk = typeof document < "u" && window.visualViewport;
+function cae() {
let e = jm(), [t, n] = (0, I.useState)(() => e ? {
width: 0,
height: 0
- } : Rk());
+ } : Ik());
return (0, I.useEffect)(() => {
let e = (e) => {
n((t) => e.width === t.width && e.height === t.height ? t : e);
}, t = () => {
- Lk && Lk.scale > 1 || e(Rk());
+ Fk && Fk.scale > 1 || e(Ik());
}, r, i = (t) => {
- Lk && Lk.scale > 1 || gg(V(t)) && (r = requestAnimationFrame(() => {
+ Fk && Fk.scale > 1 || gg(V(t)) && (r = requestAnimationFrame(() => {
let t = Mp();
(!t || !gg(t)) && e({
width: document.documentElement.clientWidth,
@@ -31064,26 +31064,26 @@ function oae() {
});
}));
};
- return e(Rk()), rm() && am() && window.addEventListener("blur", i, !0), Lk ? Lk.addEventListener("resize", t) : window.addEventListener("resize", t), () => {
- cancelAnimationFrame(r), rm() && am() && window.removeEventListener("blur", i, !0), Lk ? Lk.removeEventListener("resize", t) : window.removeEventListener("resize", t);
+ return e(Ik()), rm() && am() && window.addEventListener("blur", i, !0), Fk ? Fk.addEventListener("resize", t) : window.addEventListener("resize", t), () => {
+ cancelAnimationFrame(r), rm() && am() && window.removeEventListener("blur", i, !0), Fk ? Fk.removeEventListener("resize", t) : window.removeEventListener("resize", t);
};
}, []), t;
}
-function Rk() {
+function Ik() {
return {
- width: Lk ? Math.min(Lk.width * Lk.scale, document.documentElement.clientWidth) : document.documentElement.clientWidth,
- height: Lk ? Lk.height * Lk.scale : document.documentElement.clientHeight
+ width: Fk ? Math.min(Fk.width * Fk.scale, document.documentElement.clientWidth) : document.documentElement.clientWidth,
+ height: Fk ? Fk.height * Fk.scale : document.documentElement.clientHeight
};
}
//#endregion
//#region node_modules/react-aria-components/dist/private/Modal.mjs
-var sae = /*#__PURE__*/ (0, I.createContext)(null), zk = /*#__PURE__*/ (0, I.createContext)(null), cae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- if ((0, I.useContext)(zk)) return /*#__PURE__*/ I.createElement(Vk, {
+var lae = /*#__PURE__*/ (0, I.createContext)(null), Lk = /*#__PURE__*/ (0, I.createContext)(null), uae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ if ((0, I.useContext)(Lk)) return /*#__PURE__*/ I.createElement(zk, {
...e,
modalRef: t
}, e.children);
let { isDismissable: n, isKeyboardDismissDisabled: r, isOpen: i, defaultOpen: a, onOpenChange: o, children: s, isEntering: c, isExiting: l, UNSTABLE_portalContainer: u, shouldCloseOnInteractOutside: d, ...f } = e;
- return /*#__PURE__*/ I.createElement(Bk, {
+ return /*#__PURE__*/ I.createElement(Rk, {
isDismissable: n,
isKeyboardDismissDisabled: r,
isOpen: i,
@@ -31093,15 +31093,15 @@ var sae = /*#__PURE__*/ (0, I.createContext)(null), zk = /*#__PURE__*/ (0, I.cre
isExiting: l,
UNSTABLE_portalContainer: u,
shouldCloseOnInteractOutside: d
- }, /*#__PURE__*/ I.createElement(Vk, {
+ }, /*#__PURE__*/ I.createElement(zk, {
...f,
modalRef: t
}, s));
});
-function lae(e, t) {
- [e, t] = WD(e, t, sae);
- let n = (0, I.useContext)(Fk), r = yk(e), i = e.isOpen != null || e.defaultOpen != null || !n ? r : n, a = Ih(t), o = (0, I.useRef)(null), s = xk(a, i.isOpen), c = xk(o, i.isOpen), l = s || c || e.isExiting || !1, u = jm();
- return !i.isOpen && !l || u ? null : /*#__PURE__*/ I.createElement(uae, {
+function dae(e, t) {
+ [e, t] = HD(e, t, lae);
+ let n = (0, I.useContext)(Nk), r = _k(e), i = e.isOpen != null || e.defaultOpen != null || !n ? r : n, a = Ih(t), o = (0, I.useRef)(null), s = yk(a, i.isOpen), c = yk(o, i.isOpen), l = s || c || e.isExiting || !1, u = jm();
+ return !i.isOpen && !l || u ? null : /*#__PURE__*/ I.createElement(fae, {
...e,
state: i,
isExiting: l,
@@ -31109,9 +31109,9 @@ function lae(e, t) {
modalRef: o
});
}
-var Bk = /*#__PURE__*/ (0, I.forwardRef)(lae);
-function uae({ UNSTABLE_portalContainer: e, ...t }) {
- let n = t.modalRef, { state: r } = t, { modalProps: i, underlayProps: a } = gte(t, r, n), o = bk(t.overlayRef) || t.isEntering || !1, s = HD({
+var Rk = /*#__PURE__*/ (0, I.forwardRef)(dae);
+function fae({ UNSTABLE_portalContainer: e, ...t }) {
+ let n = t.modalRef, { state: r } = t, { modalProps: i, underlayProps: a } = _te(t, r, n), o = vk(t.overlayRef) || t.isEntering || !1, s = BD({
...t,
defaultClassName: "react-aria-ModalOverlay",
values: {
@@ -31119,7 +31119,7 @@ function uae({ UNSTABLE_portalContainer: e, ...t }) {
isExiting: t.isExiting,
state: r
}
- }), c = oae(), l, u;
+ }), c = cae(), l, u;
if (typeof document < "u") {
let e = A_(document.body) ? document.body : document.scrollingElement || document.documentElement, t = e.getBoundingClientRect().width % 1, n = e.getBoundingClientRect().height % 1;
l = e.scrollWidth - t, u = e.scrollHeight - n;
@@ -31131,25 +31131,25 @@ function uae({ UNSTABLE_portalContainer: e, ...t }) {
"--page-width": l === void 0 ? void 0 : l + "px",
"--page-height": u === void 0 ? void 0 : u + "px"
};
- return /*#__PURE__*/ I.createElement(Sy, {
+ return /*#__PURE__*/ I.createElement(xy, {
isExiting: t.isExiting,
portalContainer: e
- }, /*#__PURE__*/ I.createElement(JD.div, {
+ }, /*#__PURE__*/ I.createElement(KD.div, {
...H(zg(t, { global: !0 }), a),
...s,
style: d,
ref: t.overlayRef,
"data-entering": o || void 0,
"data-exiting": t.isExiting || void 0
- }, /*#__PURE__*/ I.createElement(VD, { values: [[zk, {
+ }, /*#__PURE__*/ I.createElement(zD, { values: [[Lk, {
modalProps: i,
modalRef: n,
isExiting: t.isExiting,
isDismissable: t.isDismissable
- }], [Fk, r]] }, s.children)));
+ }], [Nk, r]] }, s.children)));
}
-function Vk(e) {
- let { modalProps: t, modalRef: n, isExiting: r, isDismissable: i } = (0, I.useContext)(zk), a = (0, I.useContext)(Fk), o = Ih((0, I.useMemo)(() => _h(e.modalRef, n), [e.modalRef, n])), s = bk(o), c = HD({
+function zk(e) {
+ let { modalProps: t, modalRef: n, isExiting: r, isDismissable: i } = (0, I.useContext)(Lk), a = (0, I.useContext)(Nk), o = Ih((0, I.useMemo)(() => _h(e.modalRef, n), [e.modalRef, n])), s = vk(o), c = BD({
...e,
defaultClassName: "react-aria-Modal",
values: {
@@ -31158,19 +31158,19 @@ function Vk(e) {
state: a
}
});
- return /*#__PURE__*/ I.createElement(JD.div, {
+ return /*#__PURE__*/ I.createElement(KD.div, {
...H(zg(e, { global: !0 }), t),
...c,
ref: o,
"data-entering": s || void 0,
"data-exiting": r || void 0
- }, i && /*#__PURE__*/ I.createElement(ax, { onDismiss: a.close }), c.children);
+ }, i && /*#__PURE__*/ I.createElement(ix, { onDismiss: a.close }), c.children);
}
//#endregion
//#region node_modules/react-stately/dist/private/radio/useRadioGroupState.mjs
-var dae = Math.round(Math.random() * 1e10), fae = 0;
-function pae(e) {
- let t = (0, I.useMemo)(() => e.name || `radio-group-${dae}-${++fae}`, [e.name]), [n, r] = $_(e.value, e.defaultValue ?? null, e.onChange), [i] = (0, I.useState)(n), [a, o] = (0, I.useState)(null), s = W_({
+var pae = Math.round(Math.random() * 1e10), mae = 0;
+function hae(e) {
+ let t = (0, I.useMemo)(() => e.name || `radio-group-${pae}-${++mae}`, [e.name]), [n, r] = $_(e.value, e.defaultValue ?? null, e.onChange), [i] = (0, I.useState)(n), [a, o] = (0, I.useState)(null), s = W_({
...e,
value: n
}), c = (t) => {
@@ -31193,16 +31193,16 @@ function pae(e) {
}
//#endregion
//#region node_modules/react-aria-components/dist/private/RadioGroup.mjs
-var mae = /*#__PURE__*/ (0, I.createContext)(null), hae = /*#__PURE__*/ (0, I.createContext)(null), Hk = /*#__PURE__*/ (0, I.createContext)(null), Uk = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- [e, t] = WD(e, t, mae);
- let { validationBehavior: n } = UD(lO) || {}, r = e.validationBehavior ?? n ?? "native", i = pae({
+var gae = /*#__PURE__*/ (0, I.createContext)(null), _ae = /*#__PURE__*/ (0, I.createContext)(null), Bk = /*#__PURE__*/ (0, I.createContext)(null), Vk = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ [e, t] = HD(e, t, gae);
+ let { validationBehavior: n } = VD(sO) || {}, r = e.validationBehavior ?? n ?? "native", i = hae({
...e,
validationBehavior: r
- }), [a, o] = GD(!e["aria-label"] && !e["aria-labelledby"]), { radioGroupProps: s, labelProps: c, descriptionProps: l, errorMessageProps: u, ...d } = Ate({
+ }), [a, o] = UD(!e["aria-label"] && !e["aria-labelledby"]), { radioGroupProps: s, labelProps: c, descriptionProps: l, errorMessageProps: u, ...d } = jte({
...e,
label: o,
validationBehavior: r
- }, i), f = HD({
+ }, i), f = BD({
...e,
values: {
orientation: e.orientation || "vertical",
@@ -31214,7 +31214,7 @@ var mae = /*#__PURE__*/ (0, I.createContext)(null), hae = /*#__PURE__*/ (0, I.cr
},
defaultClassName: "react-aria-RadioGroup"
}), p = zg(e, { global: !0 });
- return /*#__PURE__*/ I.createElement(JD.div, {
+ return /*#__PURE__*/ I.createElement(KD.div, {
...H(p, f, s),
ref: t,
slot: e.slot || void 0,
@@ -31223,39 +31223,39 @@ var mae = /*#__PURE__*/ (0, I.createContext)(null), hae = /*#__PURE__*/ (0, I.cr
"data-disabled": i.isDisabled || void 0,
"data-readonly": i.isReadOnly || void 0,
"data-required": i.isRequired || void 0
- }, /*#__PURE__*/ I.createElement(VD, { values: [
- [Hk, i],
- [nO, {
+ }, /*#__PURE__*/ I.createElement(zD, { values: [
+ [Bk, i],
+ [eO, {
...c,
ref: a,
elementType: "span"
}],
- [sO, { slots: {
+ [aO, { slots: {
description: l,
errorMessage: u
} }],
- [cO, d]
- ] }, /*#__PURE__*/ I.createElement(tk, null, f.children)));
-}), Wk = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ [oO, d]
+ ] }, /*#__PURE__*/ I.createElement($O, null, f.children)));
+}), Hk = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
let { inputRef: n = null, ...r } = e;
- [e, t] = WD(r, t, hae);
- let i = I.useContext(Hk), a = Ih((0, I.useMemo)(() => _h(n, e.inputRef === void 0 ? null : e.inputRef), [n, e.inputRef])), o = kte({
- ...KD(e),
+ [e, t] = HD(r, t, _ae);
+ let i = I.useContext(Bk), a = Ih((0, I.useMemo)(() => _h(n, e.inputRef === void 0 ? null : e.inputRef), [n, e.inputRef])), o = Ate({
+ ...WD(e),
children: typeof e.children == "function" || e.children
}, i, a);
- return /*#__PURE__*/ I.createElement(Gk.Provider, { value: {
+ return /*#__PURE__*/ I.createElement(Uk.Provider, { value: {
...o,
inputRef: a,
defaultClassName: "react-aria-Radio"
- } }, /*#__PURE__*/ I.createElement(gae, {
+ } }, /*#__PURE__*/ I.createElement(vae, {
...e,
ref: t
}));
-}), Gk = /*#__PURE__*/ (0, I.createContext)(null), gae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- let { labelProps: n, inputProps: r, isSelected: i, isDisabled: a, isPressed: o, defaultClassName: s, inputRef: c } = (0, I.useContext)(Gk), l = I.useContext(Hk), { isFocused: u, isFocusVisible: d, focusProps: f } = Ty(), p = a || l.isReadOnly, { hoverProps: m, isHovered: h } = My({
+}), Uk = /*#__PURE__*/ (0, I.createContext)(null), vae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ let { labelProps: n, inputProps: r, isSelected: i, isDisabled: a, isPressed: o, defaultClassName: s, inputRef: c } = (0, I.useContext)(Uk), l = I.useContext(Bk), { isFocused: u, isFocusVisible: d, focusProps: f } = wy(), p = a || l.isReadOnly, { hoverProps: m, isHovered: h } = jy({
...e,
isDisabled: p
- }), g = HD({
+ }), g = BD({
...e,
defaultClassName: s,
values: {
@@ -31270,7 +31270,7 @@ var mae = /*#__PURE__*/ (0, I.createContext)(null), hae = /*#__PURE__*/ (0, I.cr
isRequired: l.isRequired
}
}), _ = zg(e, { global: !0 });
- return delete _.id, delete _.onClick, /*#__PURE__*/ I.createElement(JD.label, {
+ return delete _.id, delete _.onClick, /*#__PURE__*/ I.createElement(KD.label, {
...H(_, n, m, g),
ref: t,
"data-selected": i || void 0,
@@ -31289,8 +31289,8 @@ var mae = /*#__PURE__*/ (0, I.createContext)(null), hae = /*#__PURE__*/ (0, I.cr
});
//#endregion
//#region node_modules/react-stately/dist/private/select/useSelectState.mjs
-function _ae(e) {
- let { selectionMode: t = "single", shouldCloseOnSelect: n = t === "single" } = e, r = yk(e), [i, a] = (0, I.useState)(null), o = (0, I.useMemo)(() => e.defaultValue === void 0 ? t === "single" ? e.defaultSelectedKey ?? null : [] : e.defaultValue, [
+function yae(e) {
+ let { selectionMode: t = "single", shouldCloseOnSelect: n = t === "single" } = e, r = _k(e), [i, a] = (0, I.useState)(null), o = (0, I.useMemo)(() => e.defaultValue === void 0 ? t === "single" ? e.defaultSelectedKey ?? null : [] : e.defaultValue, [
e.defaultValue,
e.defaultSelectedKey,
t
@@ -31306,12 +31306,12 @@ function _ae(e) {
let e = [];
Array.isArray(n) ? e = n : n != null && (e = [n]), c(e);
}
- }, d = pk({
+ }, d = dk({
...e,
selectionMode: t,
disallowEmptySelection: t === "single",
allowDuplicateSelectionEvents: !0,
- selectedKeys: (0, I.useMemo)(() => vae(l), [l]),
+ selectedKeys: (0, I.useMemo)(() => bae(l), [l]),
onSelectionChange: (e) => {
if (e !== "all") {
if (t === "single") {
@@ -31348,16 +31348,16 @@ function _ae(e) {
setFocused: g
};
}
-function vae(e) {
+function bae(e) {
if (e !== void 0) return e === null ? [] : Array.isArray(e) ? e : [e];
}
//#endregion
//#region node_modules/react-aria-components/dist/private/Select.mjs
-function yae(e) {
+function xae(e) {
return e && e.__esModule ? e.default : e;
}
-var Kk = /*#__PURE__*/ (0, I.createContext)(null), qk = /*#__PURE__*/ (0, I.createContext)(null), bae = /*#__PURE__*/ Uh(function(e, t) {
- [e, t] = WD(e, t, Kk);
+var Wk = /*#__PURE__*/ (0, I.createContext)(null), Gk = /*#__PURE__*/ (0, I.createContext)(null), Sae = /*#__PURE__*/ Uh(function(e, t) {
+ [e, t] = HD(e, t, Wk);
let { children: n, isDisabled: r = !1, isInvalid: i = !1, isRequired: a = !1 } = e, o = (0, I.useMemo)(() => typeof n == "function" ? n({
isOpen: !1,
isDisabled: r,
@@ -31372,24 +31372,24 @@ var Kk = /*#__PURE__*/ (0, I.createContext)(null), qk = /*#__PURE__*/ (0, I.crea
i,
a
]);
- return /*#__PURE__*/ I.createElement($h, { content: o }, (n) => /*#__PURE__*/ I.createElement(Sae, {
+ return /*#__PURE__*/ I.createElement($h, { content: o }, (n) => /*#__PURE__*/ I.createElement(wae, {
props: e,
collection: n,
selectRef: t
}));
-}), xae = [
- nO,
- rO,
- sO
+}), Cae = [
+ eO,
+ tO,
+ aO
];
-function Sae({ props: e, selectRef: t, collection: n }) {
- let { validationBehavior: r } = UD(lO) || {}, i = e.validationBehavior ?? r ?? "native", a = _ae({
+function wae({ props: e, selectRef: t, collection: n }) {
+ let { validationBehavior: r } = VD(sO) || {}, i = e.validationBehavior ?? r ?? "native", a = yae({
...e,
collection: n,
children: void 0,
validationBehavior: i
- }), { isFocusVisible: o, focusProps: s } = Ty({ within: !0 }), c = (0, I.useRef)(null), [l, u] = GD(!e["aria-label"] && !e["aria-labelledby"]), { labelProps: d, triggerProps: f, valueProps: p, menuProps: m, descriptionProps: h, errorMessageProps: g, hiddenSelectProps: _, ...v } = jte({
- ...KD(e),
+ }), { isFocusVisible: o, focusProps: s } = wy({ within: !0 }), c = (0, I.useRef)(null), [l, u] = UD(!e["aria-label"] && !e["aria-labelledby"]), { labelProps: d, triggerProps: f, valueProps: p, menuProps: m, descriptionProps: h, errorMessageProps: g, hiddenSelectProps: _, ...v } = Mte({
+ ...WD(e),
label: u,
validationBehavior: i
}, a, c), y = (0, I.useMemo)(() => ({
@@ -31406,48 +31406,48 @@ function Sae({ props: e, selectRef: t, collection: n }) {
e.isDisabled,
v.isInvalid,
e.isRequired
- ]), b = HD({
+ ]), b = BD({
...e,
values: y,
defaultClassName: "react-aria-Select"
}), x = zg(e, { global: !0 });
delete x.id;
let S = (0, I.useRef)(null);
- return /*#__PURE__*/ I.createElement(VD, { values: [
- [Kk, e],
- [qk, a],
- [Jk, p],
- [nO, {
+ return /*#__PURE__*/ I.createElement(zD, { values: [
+ [Wk, e],
+ [Gk, a],
+ [Kk, p],
+ [eO, {
...d,
ref: l,
elementType: "span"
}],
- [rO, {
+ [tO, {
...f,
ref: c,
isPressed: a.isOpen,
autoFocus: e.autoFocus
}],
- [Fk, a],
- [Ck, {
+ [Nk, a],
+ [xk, {
trigger: "Select",
triggerRef: c,
scrollRef: S,
placement: "bottom start",
"aria-labelledby": m["aria-labelledby"],
- clearContexts: xae
+ clearContexts: Cae
}],
- [gk, {
+ [mk, {
...m,
ref: S
}],
- [_k, a],
- [sO, { slots: {
+ [hk, a],
+ [aO, { slots: {
description: h,
errorMessage: g
} }],
- [cO, v]
- ] }, /*#__PURE__*/ I.createElement(JD.div, {
+ [oO, v]
+ ] }, /*#__PURE__*/ I.createElement(KD.div, {
...H(x, b, s),
ref: t,
slot: e.slot || void 0,
@@ -31457,14 +31457,14 @@ function Sae({ props: e, selectRef: t, collection: n }) {
"data-disabled": e.isDisabled || void 0,
"data-invalid": v.isInvalid || void 0,
"data-required": e.isRequired || void 0
- }, b.children, /*#__PURE__*/ I.createElement(Nte, {
+ }, b.children, /*#__PURE__*/ I.createElement(Pte, {
..._,
autoComplete: e.autoComplete
})));
}
-for (var Jk = /*#__PURE__*/ (0, I.createContext)(null), Cae = /*#__PURE__*/ Uh(function(e, t) {
- [e, t] = WD(e, t, Jk);
- let n = (0, I.useContext)(qk), { placeholder: r } = UD(Kk), i = n.selectedItems.map((e) => {
+for (var Kk = /*#__PURE__*/ (0, I.createContext)(null), Tae = /*#__PURE__*/ Uh(function(e, t) {
+ [e, t] = HD(e, t, Kk);
+ let n = (0, I.useContext)(Gk), { placeholder: r } = VD(Wk), i = n.selectedItems.map((e) => {
let t = e.props?.children;
return typeof t == "function" && (t = t({
isHovered: !1,
@@ -31476,7 +31476,7 @@ for (var Jk = /*#__PURE__*/ (0, I.createContext)(null), Cae = /*#__PURE__*/ Uh(f
selectionMode: "single",
selectionBehavior: "toggle"
})), t;
- }), a = Ey(), o = (0, I.useMemo)(() => n.selectedItems.map((e) => e?.textValue), [n.selectedItems]), s = n.selectionManager.selectionMode, c = (0, I.useMemo)(() => s === "single" ? o[0] ?? "" : a.format(o), [
+ }), a = Ty(), o = (0, I.useMemo)(() => n.selectedItems.map((e) => e?.textValue), [n.selectedItems]), s = n.selectionManager.selectionMode, c = (0, I.useMemo)(() => s === "single" ? o[0] ?? "" : a.format(o), [
s,
a,
o
@@ -31491,7 +31491,7 @@ for (var Jk = /*#__PURE__*/ (0, I.createContext)(null), Cae = /*#__PURE__*/ Uh(f
a,
o,
i
- ]), u = Lg(yae(YO), "react-aria-components"), d = HD({
+ ]), u = Lg(xae(qO), "react-aria-components"), d = BD({
...e,
defaultChildren: l ?? r ?? u.format("selectPlaceholder"),
defaultClassName: "react-aria-SelectValue",
@@ -31503,32 +31503,32 @@ for (var Jk = /*#__PURE__*/ (0, I.createContext)(null), Cae = /*#__PURE__*/ Uh(f
state: n
}
}), f = zg(e, { global: !0 });
- return /*#__PURE__*/ I.createElement(JD.span, {
+ return /*#__PURE__*/ I.createElement(KD.span, {
ref: t,
...f,
...d,
"data-placeholder": n.selectedItems.length === 0 || void 0
- }, /*#__PURE__*/ I.createElement(sO.Provider, { value: void 0 }, d.children));
-}), wae = /*#__PURE__*/ (0, I.createContext)(null), Yk = /*#__PURE__*/ (0, I.createContext)(null), Tae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ }, /*#__PURE__*/ I.createElement(aO.Provider, { value: void 0 }, d.children));
+}), Eae = /*#__PURE__*/ (0, I.createContext)(null), qk = /*#__PURE__*/ (0, I.createContext)(null), Dae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
let { inputRef: n = null, ...r } = e;
- [e, t] = WD(r, t, wae);
- let i = Ih((0, I.useMemo)(() => _h(n, e.inputRef === void 0 ? null : e.inputRef), [n, e.inputRef])), a = ev(e), o = Fte({
- ...KD(e),
+ [e, t] = HD(r, t, Eae);
+ let i = Ih((0, I.useMemo)(() => _h(n, e.inputRef === void 0 ? null : e.inputRef), [n, e.inputRef])), a = ev(e), o = Ite({
+ ...WD(e),
children: typeof e.children == "function" || e.children
}, a, i);
- return /*#__PURE__*/ I.createElement(VD, { values: [[Yk, a], [Xk, {
+ return /*#__PURE__*/ I.createElement(zD, { values: [[qk, a], [Jk, {
...o,
inputRef: i,
defaultClassName: "react-aria-Switch"
- }]] }, /*#__PURE__*/ I.createElement(Eae, {
+ }]] }, /*#__PURE__*/ I.createElement(Oae, {
...e,
ref: t
}));
-}), Xk = /*#__PURE__*/ (0, I.createContext)(null), Eae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- let { labelProps: n, inputProps: r, isSelected: i, isDisabled: a, isReadOnly: o, isPressed: s, isInvalid: c, inputRef: l, defaultClassName: u, isRequired: d } = (0, I.useContext)(Xk), { isFocused: f, isFocusVisible: p, focusProps: m } = Ty(), h = a || o, g = (0, I.useContext)(Yk), { hoverProps: _, isHovered: v } = My({
+}), Jk = /*#__PURE__*/ (0, I.createContext)(null), Oae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ let { labelProps: n, inputProps: r, isSelected: i, isDisabled: a, isReadOnly: o, isPressed: s, isInvalid: c, inputRef: l, defaultClassName: u, isRequired: d } = (0, I.useContext)(Jk), { isFocused: f, isFocusVisible: p, focusProps: m } = wy(), h = a || o, g = (0, I.useContext)(qk), { hoverProps: _, isHovered: v } = jy({
...e,
isDisabled: h
- }), y = HD({
+ }), y = BD({
...e,
defaultClassName: u,
values: {
@@ -31544,7 +31544,7 @@ for (var Jk = /*#__PURE__*/ (0, I.createContext)(null), Cae = /*#__PURE__*/ Uh(f
state: g
}
}), b = zg(e, { global: !0 });
- return delete b.id, delete b.onClick, /*#__PURE__*/ I.createElement(JD.label, {
+ return delete b.id, delete b.onClick, /*#__PURE__*/ I.createElement(KD.label, {
...H(b, n, _, y),
ref: t,
slot: e.slot || void 0,
@@ -31561,7 +31561,7 @@ for (var Jk = /*#__PURE__*/ (0, I.createContext)(null), Cae = /*#__PURE__*/ Uh(f
...H(r, m),
ref: l
})), y.children);
-}), Zk = 10, Qk = 5, Dae = class {
+}), Yk = 10, Xk = 5, kae = class {
setup(e, t, n) {
this.delegate = e, this.state = t, this.direction = n;
}
@@ -31571,7 +31571,7 @@ for (var Jk = /*#__PURE__*/ (0, I.createContext)(null), Cae = /*#__PURE__*/ Uh(f
}
resolveDropTarget(e, t, n, r) {
let i = this.pointerTracking, a = n - i.lastY, o = t - i.lastX, s = i.yDirection, c = i.xDirection;
- if (Math.abs(a) > Qk && (s = a > 0 ? "down" : "up", i.yDirection = s, i.lastY = n), Math.abs(o) > Zk && (c = o > 0 ? "right" : "left", i.xDirection = c, i.lastX = t), e.dropPosition === "before") {
+ if (Math.abs(a) > Xk && (s = a > 0 ? "down" : "up", i.yDirection = s, i.lastY = n), Math.abs(o) > Yk && (c = o > 0 ? "right" : "left", i.xDirection = c, i.lastX = t), e.dropPosition === "before") {
let t = this.state.collection.getKeyBefore(e.key);
for (; t != null;) {
let e = this.state.collection.getItem(t);
@@ -31650,11 +31650,11 @@ for (var Jk = /*#__PURE__*/ (0, I.createContext)(null), Cae = /*#__PURE__*/ Uh(f
lastSwitchX: n
});
let c = o.boundaryContext, l = Math.abs(n - c.lastSwitchX);
- if (Math.abs(r - c.lastSwitchY) > Qk && i) {
+ if (Math.abs(r - c.lastSwitchY) > Xk && i) {
let t = c.preferredTargetIndex || 0;
i === "down" && t === 0 ? c.preferredTargetIndex = e.length - 1 : i === "up" && t === e.length - 1 && (c.preferredTargetIndex = 0), o.xDirection = null;
}
- if (l > Zk && a) {
+ if (l > Yk && a) {
let t = c.preferredTargetIndex || 0;
a === "left" ? this.direction === "ltr" ? t < e.length - 1 && (c.preferredTargetIndex = t + 1, c.lastSwitchX = n) : t > 0 && (c.preferredTargetIndex = t - 1, c.lastSwitchX = n) : a === "right" && (this.direction === "ltr" ? t > 0 && (c.preferredTargetIndex = t - 1, c.lastSwitchX = n) : t < e.length - 1 && (c.preferredTargetIndex = t + 1, c.lastSwitchX = n)), o.yDirection = null;
}
@@ -31669,7 +31669,7 @@ for (var Jk = /*#__PURE__*/ (0, I.createContext)(null), Cae = /*#__PURE__*/ Uh(f
boundaryContext: null
};
}
-}, Oae = class {
+}, Aae = class {
constructor(e) {
this.keyMap = /* @__PURE__ */ new Map(), this.keyMap = /* @__PURE__ */ new Map(), this.columnCount = e?.columnCount, this.rows = [];
let t = (r) => {
@@ -31739,8 +31739,8 @@ for (var Jk = /*#__PURE__*/ (0, I.createContext)(null), Cae = /*#__PURE__*/ Uh(f
getChildren(e) {
return this.keyMap.get(e)?.childNodes || [];
}
-}, $k = "row-header-column-" + Math.random().toString(36).slice(2), eA = "row-header-column-" + Math.random().toString(36).slice(2); $k === eA;) eA = "row-header-column-" + Math.random().toString(36).slice(2);
-function tA(e, t) {
+}, Zk = "row-header-column-" + Math.random().toString(36).slice(2), Qk = "row-header-column-" + Math.random().toString(36).slice(2); Zk === Qk;) Qk = "row-header-column-" + Math.random().toString(36).slice(2);
+function $k(e, t) {
if (t.length === 0) return [];
let n = [], r = /* @__PURE__ */ new Map();
for (let i of t) {
@@ -31824,13 +31824,13 @@ function tA(e, t) {
textValue: ""
}));
}
-var kae = class extends Oae {
+var jae = class extends Aae {
constructor(e, t, n) {
let r = /* @__PURE__ */ new Set(), i = null, a = [];
if (n?.showSelectionCheckboxes) {
let e = {
type: "column",
- key: $k,
+ key: Zk,
value: null,
textValue: "",
level: 0,
@@ -31845,7 +31845,7 @@ var kae = class extends Oae {
if (n?.showDragButtons) {
let e = {
type: "column",
- key: eA,
+ key: Qk,
value: null,
textValue: "",
level: 0,
@@ -31872,7 +31872,7 @@ var kae = class extends Oae {
for (let t of e.childNodes) c(t);
};
for (let t of e) c(t);
- let l = tA(s, a);
+ let l = $k(s, a);
if (l.forEach((e, t) => o.splice(t, 0, e)), super({
columnCount: a.length,
items: o,
@@ -31933,8 +31933,8 @@ var kae = class extends Oae {
};
//#endregion
//#region node_modules/react-stately/dist/private/grid/useGridState.mjs
-function Aae(e) {
- let { collection: t, focusMode: n } = e, r = e.UNSAFE_selectionState || sk(e), i = (0, I.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), a = r.setFocusedKey;
+function Mae(e) {
+ let { collection: t, focusMode: n } = e, r = e.UNSAFE_selectionState || ak(e), i = (0, I.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), a = r.setFocusedKey;
r.setFocusedKey = (e, r) => {
if (n === "cell" && e != null) {
let n = t.getItem(e);
@@ -31945,7 +31945,7 @@ function Aae(e) {
}
a(e, r);
};
- let o = (0, I.useMemo)(() => new lk(t, r), [t, r]), s = (0, I.useRef)(null);
+ let o = (0, I.useMemo)(() => new sk(t, r), [t, r]), s = (0, I.useRef)(null);
return (0, I.useEffect)(() => {
if (r.focusedKey != null && s.current && !t.getItem(r.focusedKey)) {
let e = s.current.getItem(r.focusedKey), n = e?.parentKey != null && (e.type === "cell" || e.type === "rowheader" || e.type === "column") ? s.current.getItem(e.parentKey) : e;
@@ -31984,11 +31984,11 @@ function Aae(e) {
}
//#endregion
//#region node_modules/react-stately/dist/private/table/useTableState.mjs
-var jae = {
+var Nae = {
ascending: "descending",
descending: "ascending"
};
-function Mae(e) {
+function Pae(e) {
let [t, n] = (0, I.useState)(!1), { selectionMode: r = "none", showSelectionCheckboxes: i, showDragButtons: a, treeColumn: o = null } = e, s = (0, I.useMemo)(() => ({
showSelectionCheckboxes: i && r !== "none",
showDragButtons: a,
@@ -31999,7 +31999,7 @@ function Mae(e) {
i,
r,
a
- ]), c = fk(e, (0, I.useCallback)((e) => new kae(e, null, s), [s]), s), { disabledKeys: l, selectionManager: u } = Aae({
+ ]), c = uk(e, (0, I.useCallback)((e) => new jae(e, null, s), [s]), s), { disabledKeys: l, selectionManager: u } = Mae({
...e,
collection: c,
disabledBehavior: e.disabledBehavior || "selection"
@@ -32015,7 +32015,7 @@ function Mae(e) {
sort(t, n) {
e.onSortChange?.({
column: t,
- direction: n ?? (e.sortDescriptor?.column === t ? jae[e.sortDescriptor.direction] : "ascending")
+ direction: n ?? (e.sortDescriptor?.column === t ? Nae[e.sortDescriptor.direction] : "ascending")
});
},
expandedKeys: d,
@@ -32028,7 +32028,7 @@ function Mae(e) {
treeColumn: o
};
}
-function Nae(e, t) {
+function Fae(e, t) {
let n = (0, I.useMemo)(() => t ? e.collection.filter(t) : e.collection, [e.collection, t]), r = e.selectionManager.withCollection(n);
return {
...e,
@@ -32038,7 +32038,7 @@ function Nae(e, t) {
}
//#endregion
//#region node_modules/react-aria-components/dist/private/Table.mjs
-var Pae = class extends lp {
+var Iae = class extends lp {
withExpandedKeys(e) {
let t = this.clone();
return t.expandedKeys = e, t.frozen = this.frozen, t.rows = Array.from(t.getRows()), t;
@@ -32053,7 +32053,7 @@ var Pae = class extends lp {
}
get body() {
for (let e of this) if (e.type === "tablebody") return e;
- return new cA(-2);
+ return new oA(-2);
}
commit(e, t, n = !1) {
this.updateColumns(n), this.firstKey = e, this.lastKey = t, this.rows = [];
@@ -32079,7 +32079,7 @@ var Pae = class extends lp {
for (let t of this.getChildren(e.key)) n(t);
};
for (let e of this.getChildren(this.head.key)) n(e);
- if (this.headerRows = tA(t, this.columns), this.columnsDirty = !1, this.rowHeaderColumnKeys.size === 0 && this.columns.length > 0 && !e) throw Error("A table must have at least one Column with the isRowHeader prop set to true");
+ if (this.headerRows = $k(t, this.columns), this.columnsDirty = !1, this.rowHeaderColumnKeys.size === 0 && this.columns.length > 0 && !e) throw Error("A table must have at least one Column with the isRowHeader prop set to true");
}
get columnCount() {
return this.columns.length;
@@ -32160,11 +32160,11 @@ var Pae = class extends lp {
return r.join(" ");
}
constructor(...e) {
- super(...e), this.headerRows = [], this.columns = [], this.rows = [], this.rowHeaderColumnKeys = /* @__PURE__ */ new Set(), this.head = new aA(-1), this.columnsDirty = !0, this.expandedKeys = /* @__PURE__ */ new Set();
+ super(...e), this.headerRows = [], this.columns = [], this.rows = [], this.rowHeaderColumnKeys = /* @__PURE__ */ new Set(), this.head = new rA(-1), this.columnsDirty = !0, this.expandedKeys = /* @__PURE__ */ new Set();
}
-}, Fae = /*#__PURE__*/ (0, I.createContext)(null), Iae = /*#__PURE__*/ (0, I.createContext)(null), nA = /*#__PURE__*/ (0, I.createContext)(null), rA = /*#__PURE__*/ (0, I.createContext)(null), Lae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- [e, t] = WD(e, t, Iae);
- let n = sk(e), { selectionBehavior: r, selectionMode: i, disallowEmptySelection: a } = n, o = !!e.dragAndDropHooks?.useDraggableCollectionState, s = (0, I.useMemo)(() => ({
+}, Lae = /*#__PURE__*/ (0, I.createContext)(null), Rae = /*#__PURE__*/ (0, I.createContext)(null), eA = /*#__PURE__*/ (0, I.createContext)(null), tA = /*#__PURE__*/ (0, I.createContext)(null), zae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ [e, t] = HD(e, t, Rae);
+ let n = ak(e), { selectionBehavior: r, selectionMode: i, disallowEmptySelection: a } = n, o = !!e.dragAndDropHooks?.useDraggableCollectionState, s = (0, I.useMemo)(() => ({
selectionBehavior: i === "none" ? null : r,
selectionMode: i,
disallowEmptySelection: a,
@@ -32174,26 +32174,26 @@ var Pae = class extends lp {
i,
a,
o
- ]), c = /*#__PURE__*/ I.createElement(Bae.Provider, { value: s }, /*#__PURE__*/ I.createElement(ug, e));
+ ]), c = /*#__PURE__*/ I.createElement(Hae.Provider, { value: s }, /*#__PURE__*/ I.createElement(ug, e));
return /*#__PURE__*/ I.createElement($h, {
content: c,
- createCollection: () => new Pae()
- }, (r) => /*#__PURE__*/ I.createElement(zae, {
+ createCollection: () => new Iae()
+ }, (r) => /*#__PURE__*/ I.createElement(Vae, {
props: e,
forwardedRef: t,
selectionState: n,
collection: r
}));
-}), Rae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, I.useContext)(eO);
- return n ? /*#__PURE__*/ I.createElement(JD.div, {
+}), Bae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, I.useContext)(QD);
+ return n ? /*#__PURE__*/ I.createElement(KD.div, {
...e,
ref: t
- }) : /*#__PURE__*/ I.createElement(JD.table, {
+ }) : /*#__PURE__*/ I.createElement(KD.table, {
...e,
ref: t
});
-}), iA = {
+}), nA = {
expand: {
ltr: "ArrowRight",
rtl: "ArrowLeft"
@@ -32203,26 +32203,26 @@ var Pae = class extends lp {
rtl: "ArrowRight"
}
};
-function zae({ props: e, forwardedRef: t, selectionState: n, collection: r }) {
- [e, t] = WD(e, t, YD);
- let { shouldUseVirtualFocus: i, disallowTypeAhead: a, filter: o, ...s } = e, c = (0, I.useContext)(Fae);
+function Vae({ props: e, forwardedRef: t, selectionState: n, collection: r }) {
+ [e, t] = HD(e, t, qD);
+ let { shouldUseVirtualFocus: i, disallowTypeAhead: a, filter: o, ...s } = e, c = (0, I.useContext)(Lae);
t = Ih((0, I.useMemo)(() => _h(t, c?.tableRef), [t, c?.tableRef]));
let [l, u] = $_(e.expandedKeys ? new Set(e.expandedKeys) : void 0, e.defaultExpandedKeys ? new Set(e.defaultExpandedKeys) : /* @__PURE__ */ new Set(), e.onExpandedChange);
r = (0, I.useMemo)(() => r.withExpandedKeys(l), [r, l]);
- let d = Mae({
+ let d = Pae({
...s,
collection: r,
children: void 0,
UNSAFE_selectionState: n,
expandedKeys: l,
onExpandedChange: u
- }), f = Nae(d, o), { isVirtualized: p, layoutDelegate: m, dropTargetDelegate: h, CollectionRoot: g } = (0, I.useContext)(eO), { dragAndDropHooks: _ } = e, { gridProps: v } = Vte({
+ }), f = Fae(d, o), { isVirtualized: p, layoutDelegate: m, dropTargetDelegate: h, CollectionRoot: g } = (0, I.useContext)(QD), { dragAndDropHooks: _ } = e, { gridProps: v } = Hte({
...s,
layoutDelegate: m,
isVirtualized: p
}, f, t), y = f.selectionManager, b = !!_?.useDraggableCollectionState, x = !!_?.useDroppableCollectionState;
(0, I.useRef)(b), (0, I.useRef)(x), (0, I.useEffect)(() => {}, [b, x]);
- let S, C, w, T = !1, E = null, D = (0, I.useRef)(null), { direction: O } = Eg(), [k] = (0, I.useState)(() => new Dae());
+ let S, C, w, T = !1, E = null, D = (0, I.useRef)(null), { direction: O } = Eg(), [k] = (0, I.useState)(() => new kae());
if (b && _) {
S = _.useDraggableCollectionState({
collection: f.collection,
@@ -32257,12 +32257,12 @@ function zae({ props: e, forwardedRef: t, selectionState: n, collection: r }) {
let t = C?.target;
if (t && t.type === "item" && t.dropPosition === "on") {
let n = d.collection.getItem(t.key);
- (e.key === iA.expand[O] && n?.hasChildNodes && !d.expandedKeys.has(t.key) || e.key === iA.collapse[O] && n?.hasChildNodes && d.expandedKeys.has(t.key)) && d.toggleKey(t.key);
+ (e.key === nA.expand[O] && n?.hasChildNodes && !d.expandedKeys.has(t.key) || e.key === nA.collapse[O] && n?.hasChildNodes && d.expandedKeys.has(t.key)) && d.toggleKey(t.key);
}
}
}, C, t), T = C.isDropTarget({ type: "root" });
}
- let { focusProps: A, isFocused: j, isFocusVisible: M } = Ty(), N = HD({
+ let { focusProps: A, isFocused: j, isFocusVisible: M } = wy(), N = BD({
...e,
children: void 0,
defaultClassName: "react-aria-Table",
@@ -32279,18 +32279,18 @@ function zae({ props: e, forwardedRef: t, selectionState: n, collection: r }) {
width: "min-content"
}));
let ne = zg(e, { global: !0 });
- return /*#__PURE__*/ I.createElement(VD, { values: [
- [nA, f],
- [rA, P],
- [XO, {
+ return /*#__PURE__*/ I.createElement(zD, { values: [
+ [eA, f],
+ [tA, P],
+ [JO, {
dragAndDropHooks: _,
dragState: S,
dropState: C
}],
- [ZO, { render: Xae }],
- [YD, null],
- [XD, null]
- ] }, /*#__PURE__*/ I.createElement(l_, null, /*#__PURE__*/ I.createElement(Rae, {
+ [YO, { render: Qae }],
+ [qD, null],
+ [JD, null]
+ ] }, /*#__PURE__*/ I.createElement(l_, null, /*#__PURE__*/ I.createElement(Bae, {
...H(ne, N, v, A, w?.collectionProps),
style: te,
ref: t,
@@ -32300,45 +32300,45 @@ function zae({ props: e, forwardedRef: t, selectionState: n, collection: r }) {
"data-drop-target": T || void 0,
"data-focused": j || void 0,
"data-focus-visible": M || void 0
- }, /*#__PURE__*/ I.createElement(tk, null, /*#__PURE__*/ I.createElement(g, {
+ }, /*#__PURE__*/ I.createElement($O, null, /*#__PURE__*/ I.createElement(g, {
collection: f.collection,
scrollRef: c?.scrollRef ?? t,
- persistedKeys: $O(y, _, C)
+ persistedKeys: ZO(y, _, C)
})))), E);
}
-var Bae = /*#__PURE__*/ (0, I.createContext)(null), aA = class extends ip {
+var Hae = /*#__PURE__*/ (0, I.createContext)(null), rA = class extends ip {
static {
this.type = "tableheader";
}
-}, Vae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, I.useContext)(eO);
- return n ? /*#__PURE__*/ I.createElement(JD.div, {
+}, Uae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, I.useContext)(QD);
+ return n ? /*#__PURE__*/ I.createElement(KD.div, {
...e,
ref: t
- }) : /*#__PURE__*/ I.createElement(JD.thead, {
+ }) : /*#__PURE__*/ I.createElement(KD.thead, {
...e,
ref: t
});
-}), oA = /*#__PURE__*/ sg(aA, (e, t) => {
- let n = (0, I.useContext)(nA).collection, r = mp({
+}), iA = /*#__PURE__*/ sg(rA, (e, t) => {
+ let n = (0, I.useContext)(eA).collection, r = mp({
items: n.headerRows,
children: (0, I.useCallback)((e) => {
switch (e.type) {
- case "headerrow": return /*#__PURE__*/ I.createElement(Uae, { item: e });
+ case "headerrow": return /*#__PURE__*/ I.createElement(Gae, { item: e });
default: throw Error("Unsupported node type in TableHeader: " + e.type);
}
}, [])
- }), { rowGroupProps: i } = AS(), { hoverProps: a, isHovered: o } = My({
+ }), { rowGroupProps: i } = kS(), { hoverProps: a, isHovered: o } = jy({
onHoverStart: e.onHoverStart,
onHoverChange: e.onHoverChange,
onHoverEnd: e.onHoverEnd
- }), s = HD({
+ }), s = BD({
...e,
children: void 0,
defaultClassName: "react-aria-TableHeader",
values: { isHovered: o }
});
- return /*#__PURE__*/ I.createElement(Vae, {
+ return /*#__PURE__*/ I.createElement(Uae, {
...H(zg(e, { global: !0 }), i, a),
...s,
ref: t,
@@ -32347,8 +32347,8 @@ var Bae = /*#__PURE__*/ (0, I.createContext)(null), aA = class extends ip {
}, (e) => /*#__PURE__*/ I.createElement(ug, {
dependencies: e.dependencies,
items: e.columns
-}, e.children)), Hae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, I.useContext)(eO);
+}, e.children)), Wae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, I.useContext)(QD);
return n ? /*#__PURE__*/ I.createElement("div", {
...e,
ref: t
@@ -32357,41 +32357,41 @@ var Bae = /*#__PURE__*/ (0, I.createContext)(null), aA = class extends ip {
ref: t
});
});
-function Uae({ item: e }) {
- let t = (0, I.useRef)(null), n = (0, I.useContext)(nA), { isVirtualized: r, CollectionBranch: i } = (0, I.useContext)(eO), { rowProps: a } = CS({
+function Gae({ item: e }) {
+ let t = (0, I.useRef)(null), n = (0, I.useContext)(eA), { isVirtualized: r, CollectionBranch: i } = (0, I.useContext)(QD), { rowProps: a } = SS({
node: e,
isVirtualized: r
- }, n, t), { checkboxProps: o } = NS(n);
- return /*#__PURE__*/ I.createElement(Hae, {
+ }, n, t), { checkboxProps: o } = MS(n);
+ return /*#__PURE__*/ I.createElement(Wae, {
...a,
ref: t
- }, /*#__PURE__*/ I.createElement(VD, { values: [[uO, { slots: { selection: o } }], [dO, { slots: { selection: o } }]] }, /*#__PURE__*/ I.createElement(i, {
+ }, /*#__PURE__*/ I.createElement(zD, { values: [[cO, { slots: { selection: o } }], [lO, { slots: { selection: o } }]] }, /*#__PURE__*/ I.createElement(i, {
collection: n.collection,
parent: e
})));
}
-var Wae = class extends ip {
+var Kae = class extends ip {
static {
this.type = "column";
}
-}, Gae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, I.useContext)(eO);
- return n ? /*#__PURE__*/ I.createElement(JD.div, {
+}, qae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, I.useContext)(QD);
+ return n ? /*#__PURE__*/ I.createElement(KD.div, {
...e,
ref: t
- }) : /*#__PURE__*/ I.createElement(JD.th, {
+ }) : /*#__PURE__*/ I.createElement(KD.th, {
...e,
ref: t
});
-}), sA = /*#__PURE__*/ og(Wae, (e, t, n) => {
- let r = Ih(t), i = (0, I.useContext)(nA), { isVirtualized: a } = (0, I.useContext)(eO), { columnHeaderProps: o, isPressed: s } = SS({
+}), aA = /*#__PURE__*/ og(Kae, (e, t, n) => {
+ let r = Ih(t), i = (0, I.useContext)(eA), { isVirtualized: a } = (0, I.useContext)(QD), { columnHeaderProps: o, isPressed: s } = xS({
node: n,
isVirtualized: a,
focusMode: e.focusMode,
allowsArrowNavigation: e.allowsArrowNavigation
- }, i, r), { isFocused: c, isFocusVisible: l, focusProps: u } = Ty(), d = (0, I.useContext)(rA), f = !1;
+ }, i, r), { isFocused: c, isFocusVisible: l, focusProps: u } = wy(), d = (0, I.useContext)(tA), f = !1;
d && (f = d.resizingColumn === n.key);
- let { hoverProps: p, isHovered: m } = My({ isDisabled: !e.allowsSorting }), h = HD({
+ let { hoverProps: p, isHovered: m } = jy({ isDisabled: !e.allowsSorting }), h = BD({
...e,
id: void 0,
children: n.rendered,
@@ -32418,7 +32418,7 @@ var Wae = class extends ip {
width: d.getColumnWidth(n.key)
});
let _ = zg(e, { global: !0 });
- return delete _.id, /*#__PURE__*/ I.createElement(Gae, {
+ return delete _.id, /*#__PURE__*/ I.createElement(qae, {
...H(_, o, u, p),
...h,
style: g,
@@ -32430,28 +32430,28 @@ var Wae = class extends ip {
"data-resizing": f || void 0,
"data-allows-sorting": n.props.allowsSorting || void 0,
"data-sort-direction": i.sortDescriptor?.column === n.key ? i.sortDescriptor.direction : void 0
- }, /*#__PURE__*/ I.createElement(VD, { values: [[Kae, {
+ }, /*#__PURE__*/ I.createElement(zD, { values: [[Jae, {
column: n,
triggerRef: r
- }], [eO, QD]] }, h.children));
-}), Kae = /*#__PURE__*/ (0, I.createContext)(null), cA = class extends ap {
+ }], [QD, XD]] }, h.children));
+}), Jae = /*#__PURE__*/ (0, I.createContext)(null), oA = class extends ap {
static {
this.type = "tablebody";
}
-}, qae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, I.useContext)(eO);
- return n ? /*#__PURE__*/ I.createElement(JD.div, {
+}, Yae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, I.useContext)(QD);
+ return n ? /*#__PURE__*/ I.createElement(KD.div, {
...e,
ref: t
- }) : /*#__PURE__*/ I.createElement(JD.tbody, {
+ }) : /*#__PURE__*/ I.createElement(KD.tbody, {
...e,
ref: t
});
-}), lA = /*#__PURE__*/ sg(cA, (e, t, n) => {
- let r = (0, I.useContext)(nA), { isVirtualized: i } = (0, I.useContext)(eO), a = r.collection, { CollectionBranch: o } = (0, I.useContext)(eO), { dragAndDropHooks: s, dropState: c } = (0, I.useContext)(XO), l = !!s?.useDroppableCollectionState && !c?.isDisabled, u = l && !!c && (c.isDropTarget({ type: "root" }) ?? !1), d = a.size === 0, f = {
+}), sA = /*#__PURE__*/ sg(oA, (e, t, n) => {
+ let r = (0, I.useContext)(eA), { isVirtualized: i } = (0, I.useContext)(QD), a = r.collection, { CollectionBranch: o } = (0, I.useContext)(QD), { dragAndDropHooks: s, dropState: c } = (0, I.useContext)(JO), l = !!s?.useDroppableCollectionState && !c?.isDisabled, u = l && !!c && (c.isDropTarget({ type: "root" }) ?? !1), d = a.size === 0, f = {
isDropTarget: u,
isEmpty: d
- }, p = HD({
+ }, p = BD({
...e,
id: void 0,
children: void 0,
@@ -32460,25 +32460,25 @@ var Wae = class extends ip {
}), m, h = a.columnCount;
if (d && e.renderEmptyState && r) {
let t = {}, n = {}, r = {};
- i ? (n["aria-colspan"] = h, r = { display: "contents" }) : n.colSpan = h, m = /*#__PURE__*/ I.createElement(dA, {
+ i ? (n["aria-colspan"] = h, r = { display: "contents" }) : n.colSpan = h, m = /*#__PURE__*/ I.createElement(lA, {
role: "row",
...t,
style: r
- }, /*#__PURE__*/ I.createElement(pA, {
+ }, /*#__PURE__*/ I.createElement(dA, {
role: "rowheader",
...n,
style: r
}, e.renderEmptyState(f)));
}
- let { rowGroupProps: g } = AS(), _ = zg(e, { global: !0 });
- return /*#__PURE__*/ I.createElement(qae, {
+ let { rowGroupProps: g } = kS(), _ = zg(e, { global: !0 });
+ return /*#__PURE__*/ I.createElement(Yae, {
...H(_, p, g),
ref: t,
"data-empty": d || void 0
- }, l && /*#__PURE__*/ I.createElement(toe, null), /*#__PURE__*/ I.createElement(o, {
+ }, l && /*#__PURE__*/ I.createElement(roe, null), /*#__PURE__*/ I.createElement(o, {
collection: a,
parent: n,
- renderDropIndicator: QO(s, c)
+ renderDropIndicator: XO(s, c)
}), m);
});
(class extends ap {
@@ -32486,7 +32486,7 @@ var Wae = class extends ip {
this.type = "tablefooter";
}
});
-var uA = /*#__PURE__*/ (0, I.createContext)({ isFocusVisibleWithinRow: !1 }), Jae = class extends ip {
+var cA = /*#__PURE__*/ (0, I.createContext)({ isFocusVisibleWithinRow: !1 }), Xae = class extends ip {
static {
this.type = "item";
}
@@ -32498,26 +32498,26 @@ var uA = /*#__PURE__*/ (0, I.createContext)({ isFocusVisibleWithinRow: !1 }), Ja
}
return null;
}
-}, dA = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, I.useContext)(eO);
- return n ? /*#__PURE__*/ I.createElement(JD.div, {
+}, lA = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, I.useContext)(QD);
+ return n ? /*#__PURE__*/ I.createElement(KD.div, {
...e,
ref: t
- }) : /*#__PURE__*/ I.createElement(JD.tr, {
+ }) : /*#__PURE__*/ I.createElement(KD.tr, {
...e,
ref: t
});
-}), fA = /*#__PURE__*/ sg(Jae, (e, t, n) => {
- let r = Ih(t), i = (0, I.useContext)(nA), { dragAndDropHooks: a, dragState: o, dropState: s } = (0, I.useContext)(XO), { isVirtualized: c, CollectionBranch: l } = (0, I.useContext)(eO), u = o && !(o.isDisabled || o.selectionManager.isDisabled(n.key)), { rowProps: d, expandButtonProps: f, ...p } = DS({
+}), uA = /*#__PURE__*/ sg(Xae, (e, t, n) => {
+ let r = Ih(t), i = (0, I.useContext)(eA), { dragAndDropHooks: a, dragState: o, dropState: s } = (0, I.useContext)(JO), { isVirtualized: c, CollectionBranch: l } = (0, I.useContext)(QD), u = o && !(o.isDisabled || o.selectionManager.isDisabled(n.key)), { rowProps: d, expandButtonProps: f, ...p } = ES({
node: n,
shouldSelectOnPressUp: !!o,
isVirtualized: c
- }, i, r), { isFocused: m, isFocusVisible: h, focusProps: g } = Ty(), { isFocusVisible: _, focusProps: v } = Ty({ within: !0 }), { hoverProps: y, isHovered: b } = My({
+ }, i, r), { isFocused: m, isFocusVisible: h, focusProps: g } = wy(), { isFocusVisible: _, focusProps: v } = wy({ within: !0 }), { hoverProps: y, isHovered: b } = jy({
isDisabled: !p.allowsSelection && !p.hasAction && !u,
onHoverStart: e.onHoverStart,
onHoverChange: e.onHoverChange,
onHoverEnd: e.onHoverEnd
- }), { checkboxProps: x } = MS({ key: n.key }, i), S;
+ }), { checkboxProps: x } = jS({ key: n.key }, i), S;
o && a && (S = a.useDraggableItem({
key: n.key,
hasDragButton: !0
@@ -32532,7 +32532,7 @@ var uA = /*#__PURE__*/ (0, I.createContext)({ isFocusVisibleWithinRow: !1 }), Ja
(0, I.useEffect)(() => {
o && E.current;
}, []);
- let D = o && o.isDragging(n.key), { children: O, ...k } = e, A = e.hasChildItems || i.collection.getItem(n.lastChildKey)?.type !== "cell", j = A && i.expandedKeys.has(n.key), M = HD({
+ let D = o && o.isDragging(n.key), { children: O, ...k } = e, A = e.hasChildItems || i.collection.getItem(n.lastChildKey)?.type !== "cell", j = A && i.expandedKeys.has(n.key), M = BD({
...k,
id: void 0,
defaultClassName: "react-aria-Row",
@@ -32554,10 +32554,10 @@ var uA = /*#__PURE__*/ (0, I.createContext)({ isFocusVisibleWithinRow: !1 }), Ja
level: n.level + 1
}
}), N = zg(e, { global: !0 });
- return delete N.id, delete N.onClick, /*#__PURE__*/ I.createElement(I.Fragment, null, C && !C.isHidden && /*#__PURE__*/ I.createElement(dA, {
+ return delete N.id, delete N.onClick, /*#__PURE__*/ I.createElement(I.Fragment, null, C && !C.isHidden && /*#__PURE__*/ I.createElement(lA, {
role: "row",
style: { height: 0 }
- }, /*#__PURE__*/ I.createElement(pA, {
+ }, /*#__PURE__*/ I.createElement(dA, {
role: "gridcell",
colSpan: i.collection.columnCount,
style: { padding: 0 }
@@ -32566,7 +32566,7 @@ var uA = /*#__PURE__*/ (0, I.createContext)({ isFocusVisibleWithinRow: !1 }), Ja
...T,
...C.dropIndicatorProps,
ref: w
- }))), /*#__PURE__*/ I.createElement(dA, {
+ }))), /*#__PURE__*/ I.createElement(lA, {
...H(N, M, d, g, y, S?.dragProps, v),
ref: r,
"data-disabled": p.isDisabled || void 0,
@@ -32582,17 +32582,17 @@ var uA = /*#__PURE__*/ (0, I.createContext)({ isFocusVisibleWithinRow: !1 }), Ja
"data-expanded": j || void 0,
"data-has-child-items": A || void 0,
"data-level": n.level + 1
- }, /*#__PURE__*/ I.createElement(VD, { values: [
- [uO, { slots: {
- [BD]: {},
+ }, /*#__PURE__*/ I.createElement(zD, { values: [
+ [cO, { slots: {
+ [RD]: {},
selection: x
} }],
- [dO, { slots: {
- [BD]: {},
+ [lO, { slots: {
+ [RD]: {},
selection: x
} }],
- [rO, { slots: {
- [BD]: {},
+ [tO, { slots: {
+ [RD]: {},
chevron: f,
drag: {
...S?.dragButtonProps,
@@ -32600,8 +32600,8 @@ var uA = /*#__PURE__*/ (0, I.createContext)({ isFocusVisibleWithinRow: !1 }), Ja
style: { pointerEvents: "none" }
}
} }],
- [nk, { isSelected: p.isSelected }],
- [uA, { isFocusVisibleWithinRow: _ }]
+ [ek, { isSelected: p.isSelected }],
+ [cA, { isFocusVisibleWithinRow: _ }]
] }, /*#__PURE__*/ I.createElement(l, {
collection: i.collection,
parent: n
@@ -32614,29 +32614,29 @@ var uA = /*#__PURE__*/ (0, I.createContext)({ isFocusVisibleWithinRow: !1 }), Ja
items: e.columns,
idScope: e.id
}, e.children);
-}), Yae = class extends ip {
+}), Zae = class extends ip {
static {
this.type = "cell";
}
-}, pA = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, I.useContext)(eO);
- return n ? /*#__PURE__*/ I.createElement(JD.div, {
+}, dA = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, I.useContext)(QD);
+ return n ? /*#__PURE__*/ I.createElement(KD.div, {
...e,
ref: t
- }) : /*#__PURE__*/ I.createElement(JD.td, {
+ }) : /*#__PURE__*/ I.createElement(KD.td, {
...e,
ref: t
});
-}), mA = /*#__PURE__*/ og(Yae, (e, t, n) => {
- let r = Ih(t), i = (0, I.useContext)(nA), { dragState: a } = (0, I.useContext)(XO), { isVirtualized: o } = (0, I.useContext)(eO);
+}), fA = /*#__PURE__*/ og(Zae, (e, t, n) => {
+ let r = Ih(t), i = (0, I.useContext)(eA), { dragState: a } = (0, I.useContext)(JO), { isVirtualized: o } = (0, I.useContext)(QD);
n.column = i.collection.columns[n.index];
- let { gridCellProps: s, isPressed: c } = bS({
+ let { gridCellProps: s, isPressed: c } = yS({
node: n,
shouldSelectOnPressUp: !!a,
isVirtualized: o,
focusMode: e.focusMode,
allowsArrowNavigation: e.allowsArrowNavigation
- }, i, r), { isFocused: l, isFocusVisible: u, focusProps: d } = Ty(), { hoverProps: f, isHovered: p } = My({}), { isFocusVisibleWithinRow: m } = (0, I.useContext)(uA), h = n.parentKey != null && i.selectionManager.isSelected(n.parentKey), g = n.colIndex || n.index, _ = i.collection.getItem(n.parentKey), v = _.props.hasChildItems || i.collection.getItem(_.lastChildKey)?.type !== "cell", y = v && i.expandedKeys.has(n.parentKey), b = i.selectionManager.isDisabled(n.parentKey), x = HD({
+ }, i, r), { isFocused: l, isFocusVisible: u, focusProps: d } = wy(), { hoverProps: f, isHovered: p } = jy({}), { isFocusVisibleWithinRow: m } = (0, I.useContext)(cA), h = n.parentKey != null && i.selectionManager.isSelected(n.parentKey), g = n.colIndex || n.index, _ = i.collection.getItem(n.parentKey), v = _.props.hasChildItems || i.collection.getItem(_.lastChildKey)?.type !== "cell", y = v && i.expandedKeys.has(n.parentKey), b = i.selectionManager.isDisabled(n.parentKey), x = BD({
...e,
id: void 0,
defaultClassName: "react-aria-Cell",
@@ -32656,7 +32656,7 @@ var uA = /*#__PURE__*/ (0, I.createContext)({ isFocusVisibleWithinRow: !1 }), Ja
isTreeColumn: n.column.key === i.treeColumn
}
}), S = zg(e, { global: !0 });
- return delete S.id, /*#__PURE__*/ I.createElement(pA, {
+ return delete S.id, /*#__PURE__*/ I.createElement(dA, {
...H(S, x, s, d, f),
ref: r,
"data-focused": l || void 0,
@@ -32670,14 +32670,14 @@ var uA = /*#__PURE__*/ (0, I.createContext)({ isFocusVisibleWithinRow: !1 }), Ja
"data-level": _.level + 1,
"data-tree-column": n.column.key === i.treeColumn || void 0,
"data-disabled": b || void 0
- }, /*#__PURE__*/ I.createElement(eO.Provider, { value: QD }, x.children));
+ }, /*#__PURE__*/ I.createElement(QD.Provider, { value: XD }, x.children));
});
-function Xae(e, t) {
+function Qae(e, t) {
t = Ih(t);
- let { dragAndDropHooks: n, dropState: r } = (0, I.useContext)(XO), i = (0, I.useRef)(null), { dropIndicatorProps: a, isHidden: o, isDropTarget: s } = n.useDropIndicator(e, r, i);
+ let { dragAndDropHooks: n, dropState: r } = (0, I.useContext)(JO), i = (0, I.useRef)(null), { dropIndicatorProps: a, isHidden: o, isDropTarget: s } = n.useDropIndicator(e, r, i);
if (o) return null;
let c = r && e.target.type === "item" ? (r.collection.getItem(e.target.key)?.level || 0) + 1 : 1;
- return /*#__PURE__*/ I.createElement(eoe, {
+ return /*#__PURE__*/ I.createElement(noe, {
...e,
dropIndicatorProps: a,
isDropTarget: s,
@@ -32686,40 +32686,40 @@ function Xae(e, t) {
ref: t
});
}
-var Zae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, I.useContext)(eO);
- return n ? /*#__PURE__*/ I.createElement(JD.div, {
+var $ae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, I.useContext)(QD);
+ return n ? /*#__PURE__*/ I.createElement(KD.div, {
...e,
ref: t
- }) : /*#__PURE__*/ I.createElement(JD.tr, {
+ }) : /*#__PURE__*/ I.createElement(KD.tr, {
...e,
ref: t
});
-}), Qae = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, I.useContext)(eO);
- return n ? /*#__PURE__*/ I.createElement(JD.div, {
+}), eoe = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, I.useContext)(QD);
+ return n ? /*#__PURE__*/ I.createElement(KD.div, {
...e,
ref: t
- }) : /*#__PURE__*/ I.createElement(JD.td, {
+ }) : /*#__PURE__*/ I.createElement(KD.td, {
...e,
ref: t
});
});
-function $ae(e, t) {
- let { dropIndicatorProps: n, isDropTarget: r, buttonRef: i, level: a, ...o } = e, s = (0, I.useContext)(nA), { visuallyHiddenProps: c } = rv(), l = HD({
+function toe(e, t) {
+ let { dropIndicatorProps: n, isDropTarget: r, buttonRef: i, level: a, ...o } = e, s = (0, I.useContext)(eA), { visuallyHiddenProps: c } = rv(), l = BD({
...o,
defaultClassName: "react-aria-DropIndicator",
defaultStyle: { "--table-row-level": a + 1 },
values: { isDropTarget: r }
});
- return /*#__PURE__*/ I.createElement(Zae, {
+ return /*#__PURE__*/ I.createElement($ae, {
...zg(e, { global: !0 }),
...l,
role: "row",
ref: t,
"data-drop-target": r || void 0,
"aria-level": a
- }, /*#__PURE__*/ I.createElement(Qae, {
+ }, /*#__PURE__*/ I.createElement(eoe, {
role: "gridcell",
colSpan: s.collection.columnCount,
style: { padding: 0 }
@@ -32730,14 +32730,14 @@ function $ae(e, t) {
ref: i
}), l.children));
}
-var eoe = /*#__PURE__*/ (0, I.forwardRef)($ae);
-function toe() {
- let e = (0, I.useContext)(nA), { dragAndDropHooks: t, dropState: n } = (0, I.useContext)(XO), r = (0, I.useRef)(null), { dropIndicatorProps: i } = t.useDropIndicator({ target: { type: "root" } }, n, r), a = n.isDropTarget({ type: "root" }), { visuallyHiddenProps: o } = rv();
- return !a && i["aria-hidden"] ? null : /*#__PURE__*/ I.createElement(dA, {
+var noe = /*#__PURE__*/ (0, I.forwardRef)(toe);
+function roe() {
+ let e = (0, I.useContext)(eA), { dragAndDropHooks: t, dropState: n } = (0, I.useContext)(JO), r = (0, I.useRef)(null), { dropIndicatorProps: i } = t.useDropIndicator({ target: { type: "root" } }, n, r), a = n.isDropTarget({ type: "root" }), { visuallyHiddenProps: o } = rv();
+ return !a && i["aria-hidden"] ? null : /*#__PURE__*/ I.createElement(lA, {
role: "row",
"aria-hidden": i["aria-hidden"],
style: { height: 0 }
- }, /*#__PURE__*/ I.createElement(pA, {
+ }, /*#__PURE__*/ I.createElement(dA, {
role: "gridcell",
colSpan: e.collection.columnCount,
style: { padding: 0 }
@@ -32749,8 +32749,8 @@ function toe() {
})));
}
og(op, function(e, t, n) {
- let r = (0, I.useContext)(nA), { isVirtualized: i } = (0, I.useContext)(eO), { isLoading: a, onLoadMore: o, scrollOffset: s, ...c } = e, l = r.collection.columns.length, u = (0, I.useRef)(null);
- hk((0, I.useMemo)(() => ({
+ let r = (0, I.useContext)(eA), { isVirtualized: i } = (0, I.useContext)(QD), { isLoading: a, onLoadMore: o, scrollOffset: s, ...c } = e, l = r.collection.columns.length, u = (0, I.useRef)(null);
+ pk((0, I.useMemo)(() => ({
onLoadMore: o,
collection: r?.collection,
sentinelRef: u,
@@ -32760,7 +32760,7 @@ og(op, function(e, t, n) {
s,
r?.collection
]), u);
- let d = HD({
+ let d = BD({
...c,
id: void 0,
children: n.rendered,
@@ -32768,10 +32768,10 @@ og(op, function(e, t, n) {
defaultStyle: { "--table-row-level": n.level + 1 },
values: void 0
}), f = {}, p = {}, m = {};
- return i ? (p["aria-colspan"] = l, m = { display: "contents" }) : p.colSpan = l, /*#__PURE__*/ I.createElement(I.Fragment, null, /*#__PURE__*/ I.createElement(dA, {
+ return i ? (p["aria-colspan"] = l, m = { display: "contents" }) : p.colSpan = l, /*#__PURE__*/ I.createElement(I.Fragment, null, /*#__PURE__*/ I.createElement(lA, {
style: { height: 0 },
- inert: ik(!0)
- }, /*#__PURE__*/ I.createElement(pA, { style: {
+ inert: nk(!0)
+ }, /*#__PURE__*/ I.createElement(dA, { style: {
padding: 0,
border: 0
} }, /*#__PURE__*/ I.createElement("div", {
@@ -32782,14 +32782,14 @@ og(op, function(e, t, n) {
height: 1,
width: 1
}
- }))), a && d.children && /*#__PURE__*/ I.createElement(dA, {
+ }))), a && d.children && /*#__PURE__*/ I.createElement(lA, {
...H(zg(e, { global: !0 }), f),
...d,
role: "row",
ref: t,
"aria-level": n.level + 1,
"data-level": n.level + 1
- }, /*#__PURE__*/ I.createElement(pA, {
+ }, /*#__PURE__*/ I.createElement(dA, {
role: "rowheader",
...p,
style: m
@@ -32797,8 +32797,8 @@ og(op, function(e, t, n) {
});
//#endregion
//#region node_modules/react-stately/dist/private/list/useSingleSelectListState.mjs
-function noe(e) {
- let [t, n] = $_(e.selectedKey, e.defaultSelectedKey ?? null, e.onSelectionChange), r = (0, I.useMemo)(() => t == null ? [] : [t], [t]), { collection: i, disabledKeys: a, selectionManager: o } = pk({
+function ioe(e) {
+ let [t, n] = $_(e.selectedKey, e.defaultSelectedKey ?? null, e.onSelectionChange), r = (0, I.useMemo)(() => t == null ? [] : [t], [t]), { collection: i, disabledKeys: a, selectionManager: o } = dk({
...e,
selectionMode: "single",
disallowEmptySelection: !0,
@@ -32821,24 +32821,24 @@ function noe(e) {
}
//#endregion
//#region node_modules/react-stately/dist/private/tabs/useTabListState.mjs
-function roe(e) {
- let t = noe({
+function aoe(e) {
+ let t = ioe({
...e,
onSelectionChange: e.onSelectionChange ? (t) => {
t != null && e.onSelectionChange?.(t);
} : void 0,
suppressTextValueWarning: !0,
- defaultSelectedKey: e.defaultSelectedKey ?? hA(e.collection, e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set()) ?? void 0
+ defaultSelectedKey: e.defaultSelectedKey ?? pA(e.collection, e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set()) ?? void 0
}), { selectionManager: n, collection: r, selectedKey: i } = t, a = (0, I.useRef)(i);
return (0, I.useEffect)(() => {
let o = i;
- e.selectedKey == null && (n.isEmpty || o == null || !r.getItem(o)) && (o = hA(r, t.disabledKeys), o != null && n.setSelectedKeys([o])), (o != null && n.focusedKey == null || !n.isFocused && o !== a.current) && n.setFocusedKey(o), a.current = o;
+ e.selectedKey == null && (n.isEmpty || o == null || !r.getItem(o)) && (o = pA(r, t.disabledKeys), o != null && n.setSelectedKeys([o])), (o != null && n.focusedKey == null || !n.isFocused && o !== a.current) && n.setFocusedKey(o), a.current = o;
}), {
...t,
isDisabled: e.isDisabled || !1
};
}
-function hA(e, t) {
+function pA(e, t) {
let n = null;
if (e) {
for (n = e.getFirstKey(); n != null && (t.has(n) || e.getItem(n)?.props?.isDisabled) && n !== e.getLastKey();) n = e.getKeyAfter(n);
@@ -32848,24 +32848,24 @@ function hA(e, t) {
}
//#endregion
//#region node_modules/react-aria-components/dist/private/Tabs.mjs
-var gA = /*#__PURE__*/ (0, I.createContext)(null), _A = /*#__PURE__*/ (0, I.createContext)(null), vA = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- [e, t] = WD(e, t, gA);
+var mA = /*#__PURE__*/ (0, I.createContext)(null), hA = /*#__PURE__*/ (0, I.createContext)(null), gA = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ [e, t] = HD(e, t, mA);
let { children: n, orientation: r = "horizontal" } = e;
return n = (0, I.useMemo)(() => typeof n == "function" ? n({
orientation: r,
defaultChildren: null
- }) : n, [n, r]), /*#__PURE__*/ I.createElement($h, { content: n }, (n) => /*#__PURE__*/ I.createElement(ioe, {
+ }) : n, [n, r]), /*#__PURE__*/ I.createElement($h, { content: n }, (n) => /*#__PURE__*/ I.createElement(ooe, {
props: e,
collection: n,
tabsRef: t
}));
});
-function ioe({ props: e, tabsRef: t, collection: n }) {
- let { orientation: r = "horizontal" } = e, i = roe({
+function ooe({ props: e, tabsRef: t, collection: n }) {
+ let { orientation: r = "horizontal" } = e, i = aoe({
...e,
collection: n,
children: void 0
- }), { focusProps: a, isFocused: o, isFocusVisible: s } = Ty({ within: !0 }), c = (0, I.useMemo)(() => ({
+ }), { focusProps: a, isFocused: o, isFocusVisible: s } = wy({ within: !0 }), c = (0, I.useMemo)(() => ({
orientation: r,
isFocusWithin: o,
isFocusVisible: s
@@ -32873,12 +32873,12 @@ function ioe({ props: e, tabsRef: t, collection: n }) {
r,
o,
s
- ]), l = HD({
+ ]), l = BD({
...e,
defaultClassName: "react-aria-Tabs",
values: c
}), u = zg(e, { global: !0 });
- return /*#__PURE__*/ I.createElement(JD.div, {
+ return /*#__PURE__*/ I.createElement(KD.div, {
...H(u, l, a),
ref: t,
slot: e.slot || void 0,
@@ -32886,20 +32886,20 @@ function ioe({ props: e, tabsRef: t, collection: n }) {
"data-orientation": r,
"data-focus-visible": s || void 0,
"data-disabled": i.isDisabled || void 0
- }, /*#__PURE__*/ I.createElement(VD, { values: [[gA, e], [_A, i]] }, l.children));
+ }, /*#__PURE__*/ I.createElement(zD, { values: [[mA, e], [hA, i]] }, l.children));
}
-var yA = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
- return (0, I.useContext)(_A) ? /*#__PURE__*/ I.createElement(aoe, {
+var _A = /*#__PURE__*/ (0, I.forwardRef)(function(e, t) {
+ return (0, I.useContext)(hA) ? /*#__PURE__*/ I.createElement(soe, {
props: e,
forwardedRef: t
}) : /*#__PURE__*/ I.createElement(ug, e);
});
-function aoe({ props: e, forwardedRef: t }) {
- let n = (0, I.useContext)(_A), { CollectionRoot: r } = (0, I.useContext)(eO), { orientation: i = "horizontal", keyboardActivation: a = "automatic" } = UD(gA), o = Ih(t), { tabListProps: s } = RS({
+function soe({ props: e, forwardedRef: t }) {
+ let n = (0, I.useContext)(hA), { CollectionRoot: r } = (0, I.useContext)(QD), { orientation: i = "horizontal", keyboardActivation: a = "automatic" } = VD(mA), o = Ih(t), { tabListProps: s } = LS({
...e,
orientation: i,
keyboardActivation: a
- }, n, o), c = HD({
+ }, n, o), c = BD({
...e,
children: null,
defaultClassName: "react-aria-TabList",
@@ -32908,29 +32908,29 @@ function aoe({ props: e, forwardedRef: t }) {
state: n
}
}), l = zg(e, { global: !0 });
- return delete l.id, /*#__PURE__*/ I.createElement(JD.div, {
+ return delete l.id, /*#__PURE__*/ I.createElement(KD.div, {
...H(l, c, s),
ref: o,
"data-orientation": i || void 0
- }, /*#__PURE__*/ I.createElement(tk, null, /*#__PURE__*/ I.createElement(r, {
+ }, /*#__PURE__*/ I.createElement($O, null, /*#__PURE__*/ I.createElement(r, {
collection: n.collection,
- persistedKeys: tO(n.selectionManager.focusedKey)
+ persistedKeys: $D(n.selectionManager.focusedKey)
})));
}
-var bA = /*#__PURE__*/ og(class extends ip {
+var vA = /*#__PURE__*/ og(class extends ip {
static {
this.type = "item";
}
}, (e, t, n) => {
- let r = (0, I.useContext)(_A), i = Ih(t), { tabProps: a, isSelected: o, isDisabled: s, isPressed: c } = IS({
+ let r = (0, I.useContext)(hA), i = Ih(t), { tabProps: a, isSelected: o, isDisabled: s, isPressed: c } = FS({
key: n.key,
...e
- }, r, i), { focusProps: l, isFocused: u, isFocusVisible: d } = Ty(), { hoverProps: f, isHovered: p } = My({
+ }, r, i), { focusProps: l, isFocused: u, isFocusVisible: d } = wy(), { hoverProps: f, isHovered: p } = jy({
isDisabled: s,
onHoverStart: e.onHoverStart,
onHoverEnd: e.onHoverEnd,
onHoverChange: e.onHoverChange
- }), m = HD({
+ }), m = BD({
...e,
id: void 0,
children: n.rendered,
@@ -32943,7 +32943,7 @@ var bA = /*#__PURE__*/ og(class extends ip {
isPressed: c,
isHovered: p
}
- }), h = n.props.href ? JD.a : JD.div, g = zg(e, { global: !0 });
+ }), h = n.props.href ? KD.a : KD.div, g = zg(e, { global: !0 });
return delete g.id, delete g.onClick, /*#__PURE__*/ I.createElement(h, {
...H(g, m, a, l, f),
ref: i,
@@ -32953,26 +32953,26 @@ var bA = /*#__PURE__*/ og(class extends ip {
"data-focus-visible": d || void 0,
"data-pressed": c || void 0,
"data-hovered": p || void 0
- }, /*#__PURE__*/ I.createElement(nk.Provider, { value: { isSelected: o } }, m.children));
-}), xA = /*#__PURE__*/ Uh(function(e, t) {
- let n = (0, I.useContext)(_A), r = Ih(t), i = n.selectedKey === e.id, [a, o] = (0, I.useState)(n.selectedKey == null ? null : i);
+ }, /*#__PURE__*/ I.createElement(ek.Provider, { value: { isSelected: o } }, m.children));
+}), yA = /*#__PURE__*/ Uh(function(e, t) {
+ let n = (0, I.useContext)(hA), r = Ih(t), i = n.selectedKey === e.id, [a, o] = (0, I.useState)(n.selectedKey == null ? null : i);
a == null && n.selectedKey != null ? o(i) : !i && a && o(!1);
- let s = xk(r, i);
- return !i && !e.shouldForceMount && !s ? null : /*#__PURE__*/ I.createElement(ooe, {
+ let s = yk(r, i);
+ return !i && !e.shouldForceMount && !s ? null : /*#__PURE__*/ I.createElement(coe, {
...e,
tabPanelRef: r,
isInitiallySelected: a || !1,
isExiting: s
});
});
-function ooe(e) {
- let t = (0, I.useContext)(_A), { id: n, tabPanelRef: r, isInitiallySelected: i, isExiting: a, ...o } = e, { tabPanelProps: s } = zS(e, t, r), { focusProps: c, isFocused: l, isFocusVisible: u } = Ty(), d = t.selectedKey === e.id, f = bk(r) && !i, p = HD({
+function coe(e) {
+ let t = (0, I.useContext)(hA), { id: n, tabPanelRef: r, isInitiallySelected: i, isExiting: a, ...o } = e, { tabPanelProps: s } = RS(e, t, r), { focusProps: c, isFocused: l, isFocusVisible: u } = wy(), d = t.selectedKey === e.id, f = vk(r) && !i, p = BD({
...e,
defaultClassName: "react-aria-TabPanel",
values: {
isFocused: l,
isFocusVisible: u,
- isInert: ik(!d),
+ isInert: nk(!d),
isEntering: f,
isExiting: a,
state: t
@@ -32980,31 +32980,31 @@ function ooe(e) {
}), m = zg(o, { global: !0 });
delete m.id;
let h = d ? H(m, s, c, p) : H(m, p);
- return /*#__PURE__*/ I.createElement(JD.div, {
+ return /*#__PURE__*/ I.createElement(KD.div, {
...h,
ref: r,
"data-focused": l || void 0,
"data-focus-visible": u || void 0,
- inert: ik(!d || e.inert),
+ inert: nk(!d || e.inert),
"data-inert": d ? void 0 : "true",
"data-entering": f || void 0,
"data-exiting": a || void 0
- }, /*#__PURE__*/ I.createElement(VD, { values: [[gA, null], [_A, null]] }, /*#__PURE__*/ I.createElement(eO.Provider, { value: QD }, p.children)));
+ }, /*#__PURE__*/ I.createElement(zD, { values: [[mA, null], [hA, null]] }, /*#__PURE__*/ I.createElement(QD.Provider, { value: XD }, p.children)));
}
//#endregion
//#region node_modules/react-aria-components/dist/private/TextArea.mjs
-var soe = /*#__PURE__*/ (0, I.createContext)({}), coe = /*#__PURE__*/ (0, I.createContext)(null), loe = /*#__PURE__*/ Uh(function(e, t) {
- [e, t] = WD(e, t, coe);
- let { validationBehavior: n } = UD(lO) || {}, r = e.validationBehavior ?? n ?? "native", i = (0, I.useRef)(null);
- [e, i] = WD(e, i, XD);
- let [a, o] = GD(!e["aria-label"] && !e["aria-labelledby"]), [s, c] = (0, I.useState)("input"), { labelProps: l, inputProps: u, descriptionProps: d, errorMessageProps: f, ...p } = Wee({
- ...KD(e),
+var loe = /*#__PURE__*/ (0, I.createContext)({}), uoe = /*#__PURE__*/ (0, I.createContext)(null), doe = /*#__PURE__*/ Uh(function(e, t) {
+ [e, t] = HD(e, t, uoe);
+ let { validationBehavior: n } = VD(sO) || {}, r = e.validationBehavior ?? n ?? "native", i = (0, I.useRef)(null);
+ [e, i] = HD(e, i, JD);
+ let [a, o] = UD(!e["aria-label"] && !e["aria-labelledby"]), [s, c] = (0, I.useState)("input"), { labelProps: l, inputProps: u, descriptionProps: d, errorMessageProps: f, ...p } = Wee({
+ ...WD(e),
inputElementType: s,
label: o,
validationBehavior: r
}, i), m = (0, I.useCallback)((e) => {
i.current = e, e && c(e instanceof HTMLTextAreaElement ? "textarea" : "input");
- }, [i]), h = HD({
+ }, [i]), h = BD({
...e,
values: {
isDisabled: e.isDisabled || !1,
@@ -33014,7 +33014,7 @@ var soe = /*#__PURE__*/ (0, I.createContext)({}), coe = /*#__PURE__*/ (0, I.crea
},
defaultClassName: "react-aria-TextField"
}), g = zg(e, { global: !0 });
- return delete g.id, /*#__PURE__*/ I.createElement(JD.div, {
+ return delete g.id, /*#__PURE__*/ I.createElement(KD.div, {
...g,
...h,
ref: t,
@@ -33023,31 +33023,31 @@ var soe = /*#__PURE__*/ (0, I.createContext)({}), coe = /*#__PURE__*/ (0, I.crea
"data-invalid": p.isInvalid || void 0,
"data-readonly": e.isReadOnly || void 0,
"data-required": e.isRequired || void 0
- }, /*#__PURE__*/ I.createElement(VD, { values: [
- [nO, {
+ }, /*#__PURE__*/ I.createElement(zD, { values: [
+ [eO, {
...l,
ref: a
}],
- [mO, {
+ [fO, {
...u,
ref: m
}],
- [soe, {
+ [loe, {
...u,
ref: m
}],
- [pO, {
+ [dO, {
role: "presentation",
isInvalid: p.isInvalid,
isDisabled: e.isDisabled || !1
}],
- [sO, { slots: {
+ [aO, { slots: {
description: d,
errorMessage: f
} }],
- [cO, p]
+ [oO, p]
] }, h.children));
-}), uoe = {
+}), foe = {
selection: {
type: oi,
duration: .16,
@@ -33059,7 +33059,7 @@ var soe = /*#__PURE__*/ (0, I.createContext)({}), coe = /*#__PURE__*/ (0, I.crea
bounce: 0
}
};
-function SA(e) {
+function bA(e) {
let [t, n] = (0, I.useState)(null);
return (0, I.useLayoutEffect)(() => {
if (!t) return;
@@ -33080,7 +33080,7 @@ function SA(e) {
let E = `translate(${b}px, ${x}px) scale(1, 1)`;
if (u && a && !r.matches && T && s !== h) {
let r = `translate(${(T.left - _.left) / v + t.scrollLeft - t.clientLeft}px, ${(T.top - _.top) / y + t.scrollTop - t.clientTop}px) scale(${T.width / v / S}, ${T.height / y / C})`;
- l = np(n, { transform: [r, E] }, uoe[e]);
+ l = np(n, { transform: [r, E] }, foe[e]);
} else n.style.transform = E;
s = h, c = w, t.dataset.surfaceReady = "";
}, m = (t) => {
@@ -33117,16 +33117,16 @@ function SA(e) {
}
//#endregion
//#region src/react/components/menu-dialog.tsx
-function CA(e) {
- let t = SA("hover");
- return /* @__PURE__ */ (0, L.jsx)(Ik, {
+function xA(e) {
+ let t = bA("hover");
+ return /* @__PURE__ */ (0, L.jsx)(Pk, {
...e,
ref: t
});
}
//#endregion
//#region src/react/boardui/components/base/buttons/link-button.tsx
-var wA = lw({
+var SA = cw({
base: [
"inline-flex items-center justify-center gap-1 whitespace-nowrap",
"font-sans select-none cursor-pointer rounded-sm",
@@ -33150,15 +33150,15 @@ var wA = lw({
secondary: ["text-text-secondary active:text-text-primary", "disabled:text-text-tertiary aria-disabled:text-text-tertiary"].join(" ")
}
});
-function TA({ variant: e = "primary", size: t = "medium", leadingIcon: n, trailingIcon: r, children: i, className: a, disabled: o = !1, ...s }) {
- let c = cw(wA.base, wA.size[t], wA.variant[e], a), l = /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [
+function CA({ variant: e = "primary", size: t = "medium", leadingIcon: n, trailingIcon: r, children: i, className: a, disabled: o = !1, ...s }) {
+ let c = sw(SA.base, SA.size[t], SA.variant[e], a), l = /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [
n ? /* @__PURE__ */ (0, L.jsx)(n, {
- className: wA.icon[t],
+ className: SA.icon[t],
"aria-hidden": !0
}) : null,
i != null && /* @__PURE__ */ (0, L.jsx)("span", { children: i }),
r ? /* @__PURE__ */ (0, L.jsx)(r, {
- className: wA.icon[t],
+ className: SA.icon[t],
"aria-hidden": !0
}) : null
] });
@@ -33185,7 +33185,7 @@ function TA({ variant: e = "primary", size: t = "medium", leadingIcon: n, traili
}
//#endregion
//#region src/react/boardui/components/base/dropdown/menu-styles.ts
-var EA = [
+var wA = [
"max-w-[calc(100vw-32px)] overflow-y-auto",
"rounded-2xl border border-border-button-default bg-background-primary-default p-2.5 shadow-dropdown",
"transition duration-150 ease-out",
@@ -33193,74 +33193,74 @@ var EA = [
"data-[exiting]:opacity-0 data-[exiting]:scale-95 data-[exiting]:blur-[2px]",
"data-[placement=bottom]:origin-top-left data-[placement=top]:origin-bottom-left",
"data-[placement=left]:origin-right data-[placement=right]:origin-left"
-].join(" "), doe = "w-[266px]", foe = "flex w-full flex-col gap-1 outline-none", DA = ["flex w-full cursor-pointer items-center gap-2 rounded-2lg p-2 text-left", "text-text-primary outline-none transition-colors"].join(" "), OA = "hover:bg-dropdown-item-hover-background focus-visible:bg-dropdown-item-hover-background";
+].join(" "), poe = "w-[266px]", moe = "flex w-full flex-col gap-1 outline-none", TA = ["flex w-full cursor-pointer items-center gap-2 rounded-2lg p-2 text-left", "text-text-primary outline-none transition-colors"].join(" "), EA = "hover:bg-dropdown-item-hover-background focus-visible:bg-dropdown-item-hover-background";
({
medium: "h-9 rounded-2lg p-2 text-body-medium",
small: "h-8 rounded-lg px-2 py-1.5 text-body-medium"
}).medium;
//#endregion
//#region src/management.ts
-var poe = "扫描媒体文件夹,导入已有资料,采集缺失信息。两段也可以分开跑:新盘刚接上时先只扫描,几万个文件登记完就能用;采集被网络拖住时只重跑采集,不必再扫一遍磁盘。", moe = "修缺时间戳表(播放卡顿)和缺索引(打不开)的 MP4。常看的片子先修。", hoe = _w({
+var hoe = "扫描媒体文件夹,导入已有资料,采集缺失信息。两段也可以分开跑:新盘刚接上时先只扫描,几万个文件登记完就能用;采集被网络拖住时只重跑采集,不必再扫一遍磁盘。", goe = "修缺时间戳表(播放卡顿)和缺索引(打不开)的 MP4。常看的片子先修。", _oe = gw({
padding: "none",
bordered: "line",
className: "overflow-hidden"
-}), goe = {
+}), voe = {
split: "min-w-0 p-6",
stack: "flex min-h-30 min-w-0 flex-1 flex-col px-5 pt-5 pb-4 max-cleanup-tight:min-h-0 max-cleanup-tight:p-4.5"
-}, _oe = {
+}, yoe = {
split: "flex flex-wrap items-center justify-end gap-2 self-stretch p-6 max-[1001px]:justify-start max-[1001px]:pt-0",
stack: "flex min-h-14 flex-wrap items-center justify-end gap-2 border-t border-border-button-default bg-card-footer px-5 py-3 max-cleanup-tight:px-4.5"
-}, voe = "flex min-h-14 flex-wrap items-center justify-end gap-2 border-t px-5 py-3", yoe = {
+}, boe = "flex min-h-14 flex-wrap items-center justify-end gap-2 border-t px-5 py-3", xoe = {
neutral: "border-border-button-default bg-card-footer",
error: "border-border-error-default bg-background-tertiary-error"
-}, boe = _w({
+}, Soe = gw({
padding: "none",
radius: "surface",
bordered: "line",
className: "overflow-hidden"
-}), kA = "border-t border-border-button-default p-4 first:border-t-0";
-function AA({ tone: e = "neutral", status: t, children: n }) {
+}), DA = "border-t border-border-button-default p-4 first:border-t-0";
+function OA({ tone: e = "neutral", status: t, children: n }) {
return /* @__PURE__ */ (0, L.jsxs)("div", {
- className: `${voe} ${yoe[e]}`,
+ className: `${boe} ${xoe[e]}`,
children: [t ? /* @__PURE__ */ (0, L.jsx)("p", {
className: `mr-auto min-w-0 text-caption-1-regular ${e === "error" ? "text-text-error-primary" : "text-text-secondary"}`,
children: t
}) : null, n]
});
}
-function jA({ id: e, children: t }) {
+function kA({ id: e, children: t }) {
return /* @__PURE__ */ (0, L.jsx)("h2", {
id: e,
className: "text-title-2-medium! m-0! text-text-primary",
children: t
});
}
-function MA({ id: e, gap: t = "none", children: n }) {
+function AA({ id: e, gap: t = "none", children: n }) {
return /* @__PURE__ */ (0, L.jsx)("h3", {
id: e,
className: `text-title-2-medium text-text-primary ${t === "medium" ? "mb-3" : t === "small" ? "mb-2" : ""}`,
children: n
});
}
-function NA({ layout: e, label: t, labelledBy: n, id: r, footer: i, children: a, attributes: o }) {
+function jA({ layout: e, label: t, labelledBy: n, id: r, footer: i, children: a, attributes: o }) {
return /* @__PURE__ */ (0, L.jsxs)("section", {
id: r,
"aria-label": t,
"aria-labelledby": n,
...o,
- className: `${hoe} ${e === "split" ? "fieldset-split" : "flex flex-col"}`,
+ className: `${_oe} ${e === "split" ? "fieldset-split" : "flex flex-col"}`,
children: [/* @__PURE__ */ (0, L.jsx)("div", {
- className: goe[e],
+ className: voe[e],
children: a
}), i ? /* @__PURE__ */ (0, L.jsx)("footer", {
- className: _oe[e],
+ className: yoe[e],
children: i
}) : null]
});
}
//#endregion
//#region src/react/components/overlay-scrollbar.ts
-function PA() {
+function MA() {
let e = (0, I.useRef)(null);
return (0, I.useEffect)(() => {
h(e.current);
@@ -33268,7 +33268,7 @@ function PA() {
}
//#endregion
//#region src/react/boardui/components/base/buttons/icon-button.tsx
-var FA = lw({
+var NA = cw({
base: [
"relative inline-flex shrink-0 items-center justify-center overflow-visible rounded-2lg",
"bg-background-primary-default text-foreground-icon-primary",
@@ -33289,21 +33289,21 @@ var FA = lw({
small: "size-4 shrink-0"
}
});
-function IA({ icon: e, size: t = "medium", className: n, type: r = "button", ref: i, ...a }) {
+function PA({ icon: e, size: t = "medium", className: n, type: r = "button", ref: i, ...a }) {
return /* @__PURE__ */ (0, L.jsx)("button", {
ref: i,
type: r,
- className: cw(FA.base, FA.size[t], n),
+ className: sw(NA.base, NA.size[t], n),
...a,
children: /* @__PURE__ */ (0, L.jsx)(e, {
- className: FA.icon[t],
+ className: NA.icon[t],
"aria-hidden": !0
})
});
}
//#endregion
//#region src/react/components/path-line.tsx
-function LA({ className: e }) {
+function FA({ className: e }) {
return /* @__PURE__ */ (0, L.jsx)("svg", {
"aria-hidden": !0,
viewBox: "0 0 24 24",
@@ -33316,8 +33316,8 @@ function LA({ className: e }) {
children: /* @__PURE__ */ (0, L.jsx)("use", { href: "#i-folder-open" })
});
}
-var RA = "打开文件管理器失败,请重试";
-function zA({ path: e, prefix: t, className: n, onRevealed: r }) {
+var IA = "打开文件管理器失败,请重试";
+function LA({ path: e, prefix: t, className: n, onRevealed: r }) {
let [i, a] = (0, I.useState)(!1), [o, s] = (0, I.useState)(""), c = (0, I.useRef)(!0);
(0, I.useEffect)(() => () => {
c.current = !1;
@@ -33328,7 +33328,7 @@ function zA({ path: e, prefix: t, className: n, onRevealed: r }) {
try {
await q("/api/reveal", { path: e }), r?.("已在资源管理器中显示");
} catch (e) {
- c.current && s(e instanceof mw ? e.message : RA);
+ c.current && s(e instanceof pw ? e.message : IA);
} finally {
c.current && a(!1);
}
@@ -33339,10 +33339,10 @@ function zA({ path: e, prefix: t, className: n, onRevealed: r }) {
children: [/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex items-center justify-between gap-2",
children: [/* @__PURE__ */ (0, L.jsxs)("p", {
- className: cw("min-w-0 break-all", n),
+ className: sw("min-w-0 break-all", n),
children: [t, e]
- }), /* @__PURE__ */ (0, L.jsx)(IA, {
- icon: LA,
+ }), /* @__PURE__ */ (0, L.jsx)(PA, {
+ icon: FA,
size: "small",
className: "shrink-0",
"aria-label": "在资源管理器中显示",
@@ -33357,41 +33357,41 @@ function zA({ path: e, prefix: t, className: n, onRevealed: r }) {
}
//#endregion
//#region src/react/components/task-progress.tsx
-function BA({ label: e, value: t = 0, total: n, embedded: r = !1 }) {
+function RA({ label: e, value: t = 0, total: n, embedded: r = !1 }) {
return /* @__PURE__ */ (0, L.jsx)("div", {
"data-task-progress": !0,
- className: r ? "flex flex-col gap-1.5" : _w({
+ className: r ? "flex flex-col gap-1.5" : gw({
variant: "outlined",
padding: "none",
className: "flex flex-col gap-1.5 px-4 py-3.5"
}),
- children: n && n > 0 ? /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(Sw, {
+ children: n && n > 0 ? /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(xw, {
label: e,
value: t,
max: n
}), /* @__PURE__ */ (0, L.jsx)("p", {
className: "text-caption-1-regular text-text-secondary",
children: e
- })] }) : /* @__PURE__ */ (0, L.jsx)(yw, { label: e })
+ })] }) : /* @__PURE__ */ (0, L.jsx)(vw, { label: e })
});
}
//#endregion
//#region src/react/boardui/components/application/settings/settings-rows.tsx
-function VA({ className: e, children: t }) {
+function zA({ className: e, children: t }) {
return /* @__PURE__ */ (0, L.jsx)("div", {
- className: cw("flex w-full flex-col rounded-2xl bg-background-secondary-default pl-3", e),
+ className: sw("flex w-full flex-col rounded-2xl bg-background-secondary-default pl-3", e),
children: t
});
}
-function HA({ className: e, children: t }) {
+function BA({ className: e, children: t }) {
return /* @__PURE__ */ (0, L.jsx)("p", {
- className: cw("w-full px-3 text-body-2-medium text-text-secondary", e),
+ className: sw("w-full px-3 text-body-2-medium text-text-secondary", e),
children: t
});
}
-function UA({ label: e, description: t, children: n }) {
+function VA({ label: e, description: t, children: n }) {
return /* @__PURE__ */ (0, L.jsxs)("div", {
- className: cw("flex min-h-[52px] w-full items-center justify-between gap-4 py-2.5 pr-2.5", "border-b border-separator-border last:border-b-0"),
+ className: sw("flex min-h-[52px] w-full items-center justify-between gap-4 py-2.5 pr-2.5", "border-b border-separator-border last:border-b-0"),
children: [/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex min-w-0 flex-col",
children: [/* @__PURE__ */ (0, L.jsx)("p", {
@@ -33406,14 +33406,14 @@ function UA({ label: e, description: t, children: n }) {
}
//#endregion
//#region src/react/settings/section.tsx
-function WA({ title: e, id: t, aside: n, onSubmit: r, children: i }) {
+function HA({ title: e, id: t, aside: n, onSubmit: r, children: i }) {
let a = /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [n ? /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex w-full flex-wrap items-center justify-between gap-2",
children: [/* @__PURE__ */ (0, L.jsx)("div", {
className: "min-w-0 flex-1",
- children: /* @__PURE__ */ (0, L.jsx)(HA, { children: e })
+ children: /* @__PURE__ */ (0, L.jsx)(BA, { children: e })
}), n]
- }) : /* @__PURE__ */ (0, L.jsx)(HA, { children: e }), /* @__PURE__ */ (0, L.jsx)(VA, { children: i })] });
+ }) : /* @__PURE__ */ (0, L.jsx)(BA, { children: e }), /* @__PURE__ */ (0, L.jsx)(zA, { children: i })] });
return r ? /* @__PURE__ */ (0, L.jsx)("form", {
id: t,
"aria-label": e,
@@ -33428,13 +33428,13 @@ function WA({ title: e, id: t, aside: n, onSubmit: r, children: i }) {
children: a
});
}
-function GA({ children: e }) {
+function UA({ children: e }) {
return /* @__PURE__ */ (0, L.jsx)("div", {
className: "flex flex-col",
children: e
});
}
-function KA({ divided: e = !1, children: t }) {
+function WA({ divided: e = !1, children: t }) {
return e ? /* @__PURE__ */ (0, L.jsx)("div", {
className: "flex flex-col gap-4 border-t border-separator-border py-4 pr-3",
children: t
@@ -33443,7 +33443,7 @@ function KA({ divided: e = !1, children: t }) {
children: t
});
}
-function qA({ status: e, children: t }) {
+function GA({ status: e, children: t }) {
return /* @__PURE__ */ (0, L.jsxs)("div", {
className: "-ml-3 flex flex-wrap items-center justify-end gap-3 rounded-b-2xl border-t border-separator-border bg-card-footer px-3 py-3",
children: [e ? /* @__PURE__ */ (0, L.jsx)("div", {
@@ -33452,43 +33452,43 @@ function qA({ status: e, children: t }) {
}) : null, t]
});
}
-function JA({ role: e, children: t }) {
+function KA({ role: e, children: t }) {
return /* @__PURE__ */ (0, L.jsx)("p", {
role: e,
className: "text-body-2-regular text-text-secondary",
children: t
});
}
-function YA({ children: e }) {
+function qA({ children: e }) {
return /* @__PURE__ */ (0, L.jsx)("p", {
role: "alert",
className: "text-body-2-regular text-text-error-primary",
children: e
});
}
-function XA({ children: e }) {
+function JA({ children: e }) {
return /* @__PURE__ */ (0, L.jsx)("p", {
className: "text-body-medium text-text-primary",
children: e
});
}
-function ZA({ href: e, children: t }) {
- return /* @__PURE__ */ (0, L.jsx)(TA, {
+function YA({ href: e, children: t }) {
+ return /* @__PURE__ */ (0, L.jsx)(CA, {
href: e,
target: "_blank",
rel: "noopener noreferrer",
size: "small",
- trailingIcon: iC,
+ trailingIcon: rC,
children: t
});
}
-function QA({ children: e }) {
+function XA({ children: e }) {
return /* @__PURE__ */ (0, L.jsx)("dl", {
className: "flex flex-col",
children: e
});
}
-function $A({ term: e, children: t }) {
+function ZA({ term: e, children: t }) {
return /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex min-h-11 items-center justify-between gap-4 border-b border-separator-border py-2.5 pr-3 last:border-b-0",
children: [/* @__PURE__ */ (0, L.jsx)("dt", {
@@ -33500,7 +33500,7 @@ function $A({ term: e, children: t }) {
})]
});
}
-function ej({ summary: e, defaultOpen: t = !1, children: n }) {
+function QA({ summary: e, defaultOpen: t = !1, children: n }) {
let r = (0, I.useId)(), i = (0, I.useRef)(null), a = (0, I.useRef)(null), o = (0, I.useRef)(!1), [s, c] = (0, I.useState)(t);
return /* @__PURE__ */ (0, L.jsxs)("details", {
ref: (e) => {
@@ -33513,7 +33513,7 @@ function ej({ summary: e, defaultOpen: t = !1, children: n }) {
e.preventDefault(), !(!i.current || !a.current) && (O(i.current, a.current, !s), c(!s));
},
className: "flex w-fit cursor-pointer list-none items-center gap-1 rounded-sm text-body-2-medium text-text-secondary outline-none select-none hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring",
- children: [/* @__PURE__ */ (0, L.jsx)(JS, {
+ children: [/* @__PURE__ */ (0, L.jsx)(qS, {
"aria-hidden": !0,
className: s ? "size-4 shrink-0 rotate-90 transition-transform" : "size-4 shrink-0 transition-transform"
}), e]
@@ -33528,7 +33528,7 @@ function ej({ summary: e, defaultOpen: t = !1, children: n }) {
})]
});
}
-function tj({ name: e }) {
+function $A({ name: e }) {
return /* @__PURE__ */ (0, L.jsx)("svg", {
"aria-hidden": !0,
viewBox: "0 0 24 24",
@@ -33537,29 +33537,29 @@ function tj({ name: e }) {
children: /* @__PURE__ */ (0, L.jsx)("use", { href: `#i-${e}` })
});
}
-function nj({ mark: e }) {
+function ej({ mark: e }) {
return e.startsWith("data:image/png;base64,") ? /* @__PURE__ */ (0, L.jsx)("img", {
src: e,
alt: "",
width: 16,
height: 16,
className: "size-4 shrink-0"
- }) : /* @__PURE__ */ (0, L.jsx)(tj, { name: e });
+ }) : /* @__PURE__ */ (0, L.jsx)($A, { name: e });
}
//#endregion
//#region src/react/library-processing/use-library-processing.ts
-function rj({ toast: e, mode: t, monitor: n }) {
+function tj({ toast: e, mode: t, monitor: n }) {
let r = t === "notice" || !!n, i = Ft({
- queryKey: JT,
- queryFn: ({ signal: e }) => YT(e),
- refetchInterval: (e) => eE(e.state.data, r)
+ queryKey: KT,
+ queryFn: ({ signal: e }) => qT(e),
+ refetchInterval: (e) => QT(e.state.data, r)
}), [a, o] = (0, I.useState)(null), s = (0, I.useRef)(void 0), c = i.data;
return (0, I.useEffect)(() => {
if (!c) return;
let n = s.current;
s.current = c.status;
let r = n === "running" && c.status !== "running";
- r && o(c), (r || t === "notice") && cE(c, e, r);
+ r && o(c), (r || t === "notice") && oE(c, e, r);
}, [
c,
t,
@@ -33572,29 +33572,29 @@ function rj({ toast: e, mode: t, monitor: n }) {
}
//#endregion
//#region src/react/library-processing/library-processing-card.tsx
-var ij = [
+var nj = [
{
label: "扫描并补全资料",
- icon: tC,
+ icon: eC,
command: {}
},
{
label: "只扫描",
- icon: cC,
+ icon: sC,
command: { stage: "scan" }
},
{
label: "只采集",
- icon: sC,
+ icon: oC,
command: { stage: "collect" }
}
-], aj = cw(DA, OA, "text-body-2-medium"), oj = "这一项耗时较长,暂时没有新进展。任务结束后可以重试未完成的部分。", sj = (e) => {
+], rj = sw(TA, EA, "text-body-2-medium"), ij = "这一项耗时较长,暂时没有新进展。任务结束后可以重试未完成的部分。", aj = (e) => {
let t = e.performer_aliases || 0, n = e.performer_avatars || 0, r = e.performer_profile_conflicts || 0, i = e.performer_profile_failed || 0;
if (!t && !n && !r && !i) return "";
let a = [`补齐女优资料:别名 ${t} 个,头像 ${n} 张`];
return r && a.push(`${r} 个同名冲突交回人工`), i && a.push(`${i} 张头像未取得`), `${a.join(",")}。`;
-}, cj = (e) => `已扫描 ${e.scanned || 0} 个文件,识别 ${e.identified || 0} 个番号,整理 ${e.candidates || 0} 组资料候选,自动落库 ${e.auto_applied || 0} 条。` + sj(e);
-function lj({ busy: e, onRun: t }) {
+}, oj = (e) => `已扫描 ${e.scanned || 0} 个文件,识别 ${e.identified || 0} 个番号,整理 ${e.candidates || 0} 组资料候选,自动落库 ${e.auto_applied || 0} 条。` + aj(e);
+function sj({ busy: e, onRun: t }) {
let n = (0, I.useRef)(null), [r, i] = (0, I.useState)(!1), a = (n) => {
e || (i(!1), t(n));
};
@@ -33603,14 +33603,14 @@ function lj({ busy: e, onRun: t }) {
"data-split-button": !0,
"data-variant": "primary",
children: [/* @__PURE__ */ (0, L.jsx)(G, {
- leadingIcon: tC,
+ leadingIcon: eC,
onClick: () => a({}),
...Y(e),
children: "扫描并补全资料"
}), /* @__PURE__ */ (0, L.jsx)(G, {
ref: n,
iconOnly: !0,
- leadingIcon: KS,
+ leadingIcon: GS,
"aria-label": "更多扫描与采集方式",
"aria-haspopup": "dialog",
"aria-expanded": r,
@@ -33619,19 +33619,19 @@ function lj({ busy: e, onRun: t }) {
e || i(!0);
}
})]
- }), /* @__PURE__ */ (0, L.jsx)(Tk, {
+ }), /* @__PURE__ */ (0, L.jsx)(Ck, {
triggerRef: n,
isOpen: r,
onOpenChange: i,
placement: "bottom end",
offset: 4,
- className: EA,
- children: /* @__PURE__ */ (0, L.jsx)(CA, {
+ className: wA,
+ children: /* @__PURE__ */ (0, L.jsx)(xA, {
"aria-label": "更多扫描与采集方式",
className: "flex w-52 flex-col gap-1 outline-none",
- children: ij.map(({ label: e, icon: t, command: n }) => /* @__PURE__ */ (0, L.jsxs)("button", {
+ children: nj.map(({ label: e, icon: t, command: n }) => /* @__PURE__ */ (0, L.jsxs)("button", {
type: "button",
- className: aj,
+ className: rj,
onClick: () => a(n),
children: [/* @__PURE__ */ (0, L.jsx)(t, {
"aria-hidden": !0,
@@ -33641,8 +33641,8 @@ function lj({ busy: e, onRun: t }) {
})
})] });
}
-function uj({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
- let a = aE(e), o = e.status === "failed" && !!e.retryable_asset_ids?.length, s = rE(e.notes || {}), c = PA();
+function cj({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
+ let a = rE(e), o = e.status === "failed" && !!e.retryable_asset_ids?.length, s = tE(e.notes || {}), c = MA();
return /* @__PURE__ */ (0, L.jsxs)("div", {
"aria-live": "polite",
className: "flex flex-col gap-4 empty:hidden",
@@ -33650,7 +33650,7 @@ function uj({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
e.status === "running" && e.stalled ? /* @__PURE__ */ (0, L.jsx)(J, {
tone: "warning",
title: "处理较慢",
- children: oj
+ children: ij
}) : null,
t || e.status === "failed" ? /* @__PURE__ */ (0, L.jsx)(J, {
tone: "error",
@@ -33662,7 +33662,7 @@ function uj({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
}) : null,
extra: a ? /* @__PURE__ */ (0, L.jsx)("div", {
className: "mt-1.5 border-t border-current/20 pt-1.5",
- children: /* @__PURE__ */ (0, L.jsxs)(ej, {
+ children: /* @__PURE__ */ (0, L.jsxs)(QA, {
summary: a.label,
children: [/* @__PURE__ */ (0, L.jsx)("div", {
className: "relative",
@@ -33693,7 +33693,7 @@ function uj({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
})
}), a.log ? /* @__PURE__ */ (0, L.jsx)("div", {
className: "mt-2 border-t border-current/20 pt-2 text-text-secondary",
- children: /* @__PURE__ */ (0, L.jsx)(zA, {
+ children: /* @__PURE__ */ (0, L.jsx)(LA, {
path: a.log,
prefix: "完整记录:",
className: "text-caption-1-regular",
@@ -33707,13 +33707,13 @@ function uj({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
n?.status === "complete" ? /* @__PURE__ */ (0, L.jsx)(J, {
tone: "success",
title: "处理完成",
- children: cj(n)
+ children: oj(n)
}) : null,
e.status !== "running" && s ? /* @__PURE__ */ (0, L.jsx)(J, {
tone: "neutral",
extra: e.issues_log ? /* @__PURE__ */ (0, L.jsx)("div", {
className: "mt-1.5 border-t border-current/20 pt-1.5 text-text-secondary",
- children: /* @__PURE__ */ (0, L.jsx)(zA, {
+ children: /* @__PURE__ */ (0, L.jsx)(LA, {
path: e.issues_log,
prefix: "完整记录:",
className: "text-caption-1-regular",
@@ -33725,38 +33725,38 @@ function uj({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
]
});
}
-function dj(e) {
- let { toast: t, onComplete: n } = e, { job: r, settled: i, forget: a } = rj(e), o = It({
- mutationFn: (e) => q(qT, e),
+function lj(e) {
+ let { toast: t, onComplete: n } = e, { job: r, settled: i, forget: a } = tj(e), o = It({
+ mutationFn: (e) => q(GT, e),
onSuccess: (e) => {
- a(), X.setQueryData(JT, e), X.invalidateQueries({ queryKey: JT });
+ a(), X.setQueryData(KT, e), X.invalidateQueries({ queryKey: KT });
}
});
(0, I.useEffect)(() => {
i && n?.();
}, [i, n]);
- let s = r.data ?? { status: "idle" }, c = o.error ? K(o.error) : r.isError ? r.data ? $T : K(r.error) : "", l = o.isPending || s.status === "running", u = iE(s), d = (e) => {
+ let s = r.data ?? { status: "idle" }, c = o.error ? K(o.error) : r.isError ? r.data ? ZT : K(r.error) : "", l = o.isPending || s.status === "running", u = nE(s), d = (e) => {
l || (o.reset(), o.mutate(e));
};
return /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col gap-4",
- children: [/* @__PURE__ */ (0, L.jsx)(NA, {
+ children: [/* @__PURE__ */ (0, L.jsx)(jA, {
layout: "stack",
label: "扫描与采集",
footer: /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [
- /* @__PURE__ */ (0, L.jsx)(TA, {
+ /* @__PURE__ */ (0, L.jsx)(CA, {
href: "/scraping",
size: "small",
- trailingIcon: qS,
+ trailingIcon: KS,
children: "来源和凭证"
}),
- s.candidates ? /* @__PURE__ */ (0, L.jsx)(TA, {
+ s.candidates ? /* @__PURE__ */ (0, L.jsx)(CA, {
href: "/review",
size: "small",
- trailingIcon: qS,
+ trailingIcon: KS,
children: "复核资料"
}) : null,
- /* @__PURE__ */ (0, L.jsx)(lj, {
+ /* @__PURE__ */ (0, L.jsx)(sj, {
busy: l,
onRun: d
})
@@ -33764,12 +33764,12 @@ function dj(e) {
children: /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col gap-2",
children: [
- /* @__PURE__ */ (0, L.jsx)(MA, { children: "扫描与采集" }),
+ /* @__PURE__ */ (0, L.jsx)(AA, { children: "扫描与采集" }),
/* @__PURE__ */ (0, L.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
- children: poe
+ children: hoe
}),
- s.status === "running" ? /* @__PURE__ */ (0, L.jsx)(BA, {
+ s.status === "running" ? /* @__PURE__ */ (0, L.jsx)(RA, {
embedded: !0,
label: u,
value: s.checked,
@@ -33777,7 +33777,7 @@ function dj(e) {
}) : null
]
})
- }), /* @__PURE__ */ (0, L.jsx)(uj, {
+ }), /* @__PURE__ */ (0, L.jsx)(cj, {
state: s,
problem: c,
settled: i,
@@ -33793,7 +33793,7 @@ function dj(e) {
}
//#endregion
//#region src/react/boardui/components/foundations/icons/chevrons.tsx
-function fj(e) {
+function uj(e) {
return /* @__PURE__ */ (0, L.jsx)("svg", {
viewBox: "0 0 16 16",
fill: "none",
@@ -33807,7 +33807,7 @@ function fj(e) {
})
});
}
-function pj(e) {
+function dj(e) {
return /* @__PURE__ */ (0, L.jsx)("svg", {
viewBox: "0 0 24 24",
fill: "none",
@@ -33821,7 +33821,7 @@ function pj(e) {
}
//#endregion
//#region src/react/boardui/utils/use-dismiss-on-outside-press.ts
-function mj(e, t, n) {
+function fj(e, t, n) {
(0, I.useEffect)(() => {
if (!e) return;
let r = (e) => {
@@ -33835,7 +33835,7 @@ function mj(e, t, n) {
n
]);
}
-function hj(e, t) {
+function pj(e, t) {
let n = (0, I.useRef)(!1);
return (0, I.useEffect)(() => {
if (!e) return;
@@ -33849,33 +33849,33 @@ function hj(e, t) {
}
//#endregion
//#region src/react/boardui/components/base/select/select.tsx
-var gj = (0, I.createContext)("md");
-function _j({ className: e, triggerClassName: t, popoverClassName: n, size: r = "md", children: i, items: a, renderValue: o, ref: s, ...c }) {
+var mj = (0, I.createContext)("md");
+function hj({ className: e, triggerClassName: t, popoverClassName: n, size: r = "md", children: i, items: a, renderValue: o, ref: s, ...c }) {
let l = (0, I.useRef)(null), u = (0, I.useRef)(null), [d, f] = (0, I.useState)(!1);
- mj(d, () => f(!1), [l, u]);
- let p = hj(d, l);
- return /* @__PURE__ */ (0, L.jsx)(bae, {
+ fj(d, () => f(!1), [l, u]);
+ let p = pj(d, l);
+ return /* @__PURE__ */ (0, L.jsx)(Sae, {
ref: s,
...c,
isOpen: d,
onOpenChange: (e) => p(e) && f(e),
- className: cw("group flex flex-col", e),
- children: ({ isOpen: e }) => /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsxs)(iO, {
+ className: sw("group flex flex-col", e),
+ children: ({ isOpen: e }) => /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsxs)(nO, {
ref: l,
- className: cw("flex w-full cursor-pointer items-center justify-between rounded-2lg", "border border-border-button-default bg-background-primary-default shadow-xs", "text-text-primary", "transition-[background-color,border-color,box-shadow,padding,font-size] duration-200 ease", "hover:bg-background-primary-hover hover:border-border-button-hover", "outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-border-focus-ring", "disabled:cursor-not-allowed disabled:bg-background-primary-disabled disabled:text-text-tertiary disabled:shadow-none", r === "sm" ? "gap-1 px-[7px] py-1 text-body-2-medium" : "gap-1.5 px-2.5 py-2 text-body-medium", t),
- children: [/* @__PURE__ */ (0, L.jsx)(Cae, {
- className: cw("flex min-w-0 items-center truncate", r === "sm" ? "gap-1" : "gap-[5px]"),
+ className: sw("flex w-full cursor-pointer items-center justify-between rounded-2lg", "border border-border-button-default bg-background-primary-default shadow-xs", "text-text-primary", "transition-[background-color,border-color,box-shadow,padding,font-size] duration-200 ease", "hover:bg-background-primary-hover hover:border-border-button-hover", "outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-border-focus-ring", "disabled:cursor-not-allowed disabled:bg-background-primary-disabled disabled:text-text-tertiary disabled:shadow-none", r === "sm" ? "gap-1 px-[7px] py-1 text-body-2-medium" : "gap-1.5 px-2.5 py-2 text-body-medium", t),
+ children: [/* @__PURE__ */ (0, L.jsx)(Tae, {
+ className: sw("flex min-w-0 items-center truncate", r === "sm" ? "gap-1" : "gap-[5px]"),
children: o
- }), /* @__PURE__ */ (0, L.jsx)(fj, { className: cw("shrink-0 text-text-secondary transition-transform duration-200 ease", r === "sm" ? "size-3.5" : "size-4", e && "rotate-180") })]
- }), /* @__PURE__ */ (0, L.jsx)(Tk, {
+ }), /* @__PURE__ */ (0, L.jsx)(uj, { className: sw("shrink-0 text-text-secondary transition-transform duration-200 ease", r === "sm" ? "size-3.5" : "size-4", e && "rotate-180") })]
+ }), /* @__PURE__ */ (0, L.jsx)(Ck, {
ref: u,
isNonModal: !0,
offset: 4,
- className: cw(doe, EA, "p-2", n),
- children: /* @__PURE__ */ (0, L.jsx)(Vie, {
+ className: sw(poe, wA, "p-2", n),
+ children: /* @__PURE__ */ (0, L.jsx)(Uie, {
items: a,
- className: cw(foe, "max-h-[240px] overflow-auto"),
- children: /* @__PURE__ */ (0, L.jsx)(gj.Provider, {
+ className: sw(moe, "max-h-[240px] overflow-auto"),
+ children: /* @__PURE__ */ (0, L.jsx)(mj.Provider, {
value: r,
children: i
})
@@ -33883,19 +33883,19 @@ function _j({ className: e, triggerClassName: t, popoverClassName: n, size: r =
})] })
});
}
-function vj({ className: e, children: t, ...n }) {
- let r = (0, I.useContext)(gj);
- return /* @__PURE__ */ (0, L.jsx)(Wie, {
+function gj({ className: e, children: t, ...n }) {
+ let r = (0, I.useContext)(mj);
+ return /* @__PURE__ */ (0, L.jsx)(Kie, {
...n,
- className: (t) => cw(DA, r === "sm" ? "px-2 py-1.5 text-body-2-medium" : "text-body-medium", (t.isFocused || t.isSelected) && "bg-dropdown-item-hover-background", t.isDisabled && "cursor-not-allowed text-text-disabled", typeof e == "function" ? e(t) : e),
+ className: (t) => sw(TA, r === "sm" ? "px-2 py-1.5 text-body-2-medium" : "text-body-medium", (t.isFocused || t.isSelected) && "bg-dropdown-item-hover-background", t.isDisabled && "cursor-not-allowed text-text-disabled", typeof e == "function" ? e(t) : e),
children: t
});
}
//#endregion
//#region src/react/background-job.ts
-var yj = 2e3, bj = (e) => e, xj = (e, t) => t;
-function Sj(e) {
- let { queryKey: t, jobOf: n = bj, withJob: r = xj, idlePollMs: i } = e, [a, o] = (0, I.useState)(!1), [s, c] = (0, I.useState)(null), l = (0, I.useRef)(e);
+var _j = 2e3, vj = (e) => e, yj = (e, t) => t;
+function bj(e) {
+ let { queryKey: t, jobOf: n = vj, withJob: r = yj, idlePollMs: i } = e, [a, o] = (0, I.useState)(!1), [s, c] = (0, I.useState)(null), l = (0, I.useRef)(e);
(0, I.useEffect)(() => {
l.current = e;
});
@@ -33904,7 +33904,7 @@ function Sj(e) {
queryFn: ({ signal: e }) => l.current.queryFn({ signal: e }),
refetchInterval: (e) => {
let t = e.state.data;
- return t !== void 0 && n(t)?.status === "running" ? yj : i ?? !1;
+ return t !== void 0 && n(t)?.status === "running" ? _j : i ?? !1;
}
}), d = It({
mutationFn: (e) => l.current.start(e),
@@ -33935,32 +33935,32 @@ function Sj(e) {
}
//#endregion
//#region src/react/media-repair/media-repair-card.tsx
-var Cj = (e) => m[e] || e, wj = (e) => X.setQueryData(uE, e);
-function Tj() {
+var xj = (e) => m[e] || e, Sj = (e) => X.setQueryData(cE, e);
+function Cj() {
let e = Ft({
- queryKey: uE,
- queryFn: ({ signal: e }) => pE(e),
- refetchInterval: (e) => e.state.data?.status === "running" && yj
+ queryKey: cE,
+ queryFn: ({ signal: e }) => dE(e),
+ refetchInterval: (e) => e.state.data?.status === "running" && _j
}), t = Ft({
- queryKey: dE,
- queryFn: ({ signal: e }) => mE(e)
- }), [n, r] = (0, I.useState)(""), i = Cw(), a = e.data ?? fE, o = t.data ?? [], s = a.status === "running", c = o.find((e) => e.id === (s ? a.library : n)) ?? o.find((e) => e.id === a.library) ?? o[0], l = () => {
+ queryKey: lE,
+ queryFn: ({ signal: e }) => fE(e)
+ }), [n, r] = (0, I.useState)(""), i = Sw(), a = e.data ?? uE, o = t.data ?? [], s = a.status === "running", c = o.find((e) => e.id === (s ? a.library : n)) ?? o.find((e) => e.id === a.library) ?? o[0], l = () => {
c && g({
title: `修复媒体库「${c.name}」`,
body: "缺时间戳表的片子另存一份修好的头,原文件不动;缺索引的片子重建后替换原文件,坏原件改名成同目录的隐藏文件(.文件名.peach-original)留着。" + (c.metered ? "这个库在计费来源上,每修一部都要把片子完整拉一遍。" : ""),
confirmLabel: "修复媒体库",
- onConfirm: async () => wj(await q(lE, {
+ onConfirm: async () => Sj(await q(sE, {
library: c.id,
restart: !0
}))
});
- }, u = () => void i.run("stop", (e) => q(lE, { stop: !0 }, "POST", e), wj), d = _E(a), f = a.status === "complete", p = i.error || a.error || (e.error ? "读不到媒体修复的状态" : "");
+ }, u = () => void i.run("stop", (e) => q(sE, { stop: !0 }, "POST", e), Sj), d = hE(a), f = a.status === "complete", p = i.error || a.error || (e.error ? "读不到媒体修复的状态" : "");
return /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col gap-4",
- children: [/* @__PURE__ */ (0, L.jsx)(NA, {
+ children: [/* @__PURE__ */ (0, L.jsx)(jA, {
layout: "split",
label: "媒体修复",
- footer: /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(_j, {
+ footer: /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(hj, {
"aria-label": "媒体库",
className: "w-48",
selectedKey: c?.id ?? null,
@@ -33968,10 +33968,10 @@ function Tj() {
onSelectionChange: (e) => {
e !== null && r(String(e));
},
- children: o.map((e) => /* @__PURE__ */ (0, L.jsxs)(vj, {
+ children: o.map((e) => /* @__PURE__ */ (0, L.jsxs)(gj, {
id: e.id,
textValue: e.name,
- children: [/* @__PURE__ */ (0, L.jsx)(nj, { mark: Cj(e.icon) }), e.name]
+ children: [/* @__PURE__ */ (0, L.jsx)(ej, { mark: xj(e.icon) }), e.name]
}, e.id))
}), s ? /* @__PURE__ */ (0, L.jsx)(G, {
onClick: u,
@@ -33985,12 +33985,12 @@ function Tj() {
children: /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col gap-2",
children: [
- /* @__PURE__ */ (0, L.jsx)(MA, { children: "媒体修复" }),
+ /* @__PURE__ */ (0, L.jsx)(AA, { children: "媒体修复" }),
/* @__PURE__ */ (0, L.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
- children: moe
+ children: goe
}),
- s && a.total ? /* @__PURE__ */ (0, L.jsx)(Sw, {
+ s && a.total ? /* @__PURE__ */ (0, L.jsx)(xw, {
label: "修复进度",
value: a.checked,
max: a.total
@@ -34014,7 +34014,7 @@ function Tj() {
f && a.missing_tool ? /* @__PURE__ */ (0, L.jsx)(J, {
tone: "warning",
title: "缺少 untrunc",
- children: vE(a)
+ children: gE(a)
}) : null,
p ? /* @__PURE__ */ (0, L.jsx)(J, {
tone: "error",
@@ -34026,7 +34026,7 @@ function Tj() {
}
//#endregion
//#region src/react/boardui/components/base/checkbox/checkbox-glyph.tsx
-var Ej = {
+var wj = {
md: {
box: "size-4",
glyph: "size-4",
@@ -34040,11 +34040,11 @@ var Ej = {
gap: "gap-1.5"
}
};
-function Dj({ state: e, size: t = "md" }) {
- let { isSelected: n, isIndeterminate: r, isFocusVisible: i, isDisabled: a, isHovered: o } = e, s = Ej[t], c = n || r, l = o && !a;
+function Tj({ state: e, size: t = "md" }) {
+ let { isSelected: n, isIndeterminate: r, isFocusVisible: i, isDisabled: a, isHovered: o } = e, s = wj[t], c = n || r, l = o && !a;
return /* @__PURE__ */ (0, L.jsx)("span", {
"aria-hidden": !0,
- className: cw("flex shrink-0 items-center justify-center rounded-sm", "transition-[background-color,border-color,box-shadow] duration-150 ease", s.box, c ? cw("bg-linear-to-b shadow-checkbox-selected", l ? "from-accent-400 to-accent-500" : "from-accent-500 to-accent-600") : cw("border bg-background-primary-default shadow-xs", l ? "border-border-checkbox-hover" : "border-border-checkbox-default"), a && "opacity-50", i && "ring-2 ring-border-focus-ring ring-offset-2"),
+ className: sw("flex shrink-0 items-center justify-center rounded-sm", "transition-[background-color,border-color,box-shadow] duration-150 ease", s.box, c ? sw("bg-linear-to-b shadow-checkbox-selected", l ? "from-accent-400 to-accent-500" : "from-accent-500 to-accent-600") : sw("border bg-background-primary-default shadow-xs", l ? "border-border-checkbox-hover" : "border-border-checkbox-default"), a && "opacity-50", i && "ring-2 ring-border-focus-ring ring-offset-2"),
children: /* @__PURE__ */ (0, L.jsx)("svg", {
viewBox: "0 0 16 16",
fill: "none",
@@ -34068,36 +34068,36 @@ function Dj({ state: e, size: t = "md" }) {
}
//#endregion
//#region src/react/boardui/components/base/checkbox/checkbox.tsx
-function Oj({ className: e, children: t, size: n = "md", ref: r, ...i }) {
- let a = Ej[n];
- return /* @__PURE__ */ (0, L.jsx)(kie, {
+function Ej({ className: e, children: t, size: n = "md", ref: r, ...i }) {
+ let a = wj[n];
+ return /* @__PURE__ */ (0, L.jsx)(jie, {
ref: r,
...i,
- className: (t) => cw("group inline-flex items-center select-none", a.gap, t.isDisabled ? "cursor-not-allowed" : "cursor-pointer", typeof e == "function" ? e(t) : e),
- children: (e) => /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(Dj, {
+ className: (t) => sw("group inline-flex items-center select-none", a.gap, t.isDisabled ? "cursor-not-allowed" : "cursor-pointer", typeof e == "function" ? e(t) : e),
+ children: (e) => /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(Tj, {
state: e,
size: n
}), t != null && /* @__PURE__ */ (0, L.jsx)("span", {
- className: cw(a.label, "text-text-primary"),
+ className: sw(a.label, "text-text-primary"),
children: t
})] })
});
}
//#endregion
//#region src/react/boardui/components/base/table/table.tsx
-function kj({ size: e = "md", className: t, containerClassName: n, ref: r, ...i }) {
+function Dj({ size: e = "md", className: t, containerClassName: n, ref: r, ...i }) {
return /* @__PURE__ */ (0, L.jsx)("div", {
- className: cw("w-full overflow-x-auto", n),
- children: /* @__PURE__ */ (0, L.jsx)(Lae, {
+ className: sw("w-full overflow-x-auto", n),
+ children: /* @__PURE__ */ (0, L.jsx)(zae, {
ref: r,
...i,
- className: cw("bui-table", e === "sm" && "bui-table-sm", t)
+ className: sw("bui-table", e === "sm" && "bui-table-sm", t)
})
});
}
//#endregion
//#region src/react/components/row-click.ts
-var Aj = [
+var Oj = [
"a",
"button",
"input",
@@ -34110,15 +34110,15 @@ var Aj = [
"[role=\"link\"]",
"[role=\"menu\"]"
].join(",");
-function jj(e, t) {
+function kj(e, t) {
let n = e.target;
if (!(n instanceof Element) || !t.contains(n)) return !1;
- let r = n.closest(Aj);
+ let r = n.closest(Oj);
return !r || !t.contains(r) || r === t;
}
//#endregion
//#region src/react/components/data-table-frame.tsx
-function Mj({ children: e, follow: t = !1, onRowClick: n }) {
+function Aj({ children: e, follow: t = !1, onRowClick: n }) {
return /* @__PURE__ */ (0, L.jsx)("div", {
"data-board-data-table": !0,
"data-follow-table": t || void 0,
@@ -34126,15 +34126,15 @@ function Mj({ children: e, follow: t = !1, onRowClick: n }) {
let t = e.target;
if (!(t instanceof Element)) return;
let r = t.closest("[role=\"row\"][data-key]");
- r && jj(e, r) && n(r.dataset.key);
+ r && kj(e, r) && n(r.dataset.key);
} : void 0,
children: e
});
}
//#endregion
//#region src/react/data-cleanup/link-manager.tsx
-var Nj = cT("unlink"), Pj = cT("rotate-cw"), Fj = "站点返回 404 或 410,确认这个地址不存在。", Ij = "站点拒绝程序访问或一次临时故障都会落在这里。链接保留,可勾选后单独重试。", Lj = "删除前会逐条重验一次;此操作不可撤销。", Rj = "暂时无法读取进度,正在重新连接…", zj = (e) => Number(e || 0).toLocaleString();
-function Bj({ label: e, value: t, note: n }) {
+var jj = oT("unlink"), Mj = oT("rotate-cw"), Nj = "站点返回 404 或 410,确认这个地址不存在。", Pj = "站点拒绝程序访问或一次临时故障都会落在这里。链接保留,可勾选后单独重试。", Fj = "删除前会逐条重验一次;此操作不可撤销。", Ij = "暂时无法读取进度,正在重新连接…", Lj = (e) => Number(e || 0).toLocaleString();
+function Rj({ label: e, value: t, note: n }) {
return /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex min-w-0 flex-col gap-0.5",
children: [
@@ -34153,11 +34153,11 @@ function Bj({ label: e, value: t, note: n }) {
]
});
}
-function Vj({ title: e, items: t, hint: n, picked: r, onPick: i, children: a }) {
+function zj({ title: e, items: t, hint: n, picked: r, onPick: i, children: a }) {
if (!t.length) return null;
let o = r ?? [], s = o.length > 0 && o.length === t.length;
return /* @__PURE__ */ (0, L.jsxs)("div", {
- className: kA,
+ className: DA,
children: [
/* @__PURE__ */ (0, L.jsxs)("h4", {
className: "mb-1 text-body-semibold text-text-primary",
@@ -34170,13 +34170,13 @@ function Vj({ title: e, items: t, hint: n, picked: r, onPick: i, children: a })
className: "mb-3 text-caption-1-regular text-text-secondary",
children: n
}),
- /* @__PURE__ */ (0, L.jsx)(Mj, { children: /* @__PURE__ */ (0, L.jsxs)(kj, {
+ /* @__PURE__ */ (0, L.jsx)(Aj, { children: /* @__PURE__ */ (0, L.jsxs)(Dj, {
"aria-label": e,
size: "sm",
- children: [/* @__PURE__ */ (0, L.jsxs)(oA, { children: [
- i ? /* @__PURE__ */ (0, L.jsx)(sA, {
+ children: [/* @__PURE__ */ (0, L.jsxs)(iA, { children: [
+ i ? /* @__PURE__ */ (0, L.jsx)(aA, {
id: "pick",
- children: /* @__PURE__ */ (0, L.jsx)(Oj, {
+ children: /* @__PURE__ */ (0, L.jsx)(Ej, {
slot: null,
"aria-label": "全选本次未访问成功的链接",
isSelected: s,
@@ -34184,44 +34184,44 @@ function Vj({ title: e, items: t, hint: n, picked: r, onPick: i, children: a })
onChange: (e) => i(e ? t.map((e) => e.id) : [])
})
}) : null,
- /* @__PURE__ */ (0, L.jsx)(sA, {
+ /* @__PURE__ */ (0, L.jsx)(aA, {
id: "entity",
isRowHeader: !0,
children: "所属"
}),
- /* @__PURE__ */ (0, L.jsx)(sA, {
+ /* @__PURE__ */ (0, L.jsx)(aA, {
id: "kind",
children: "类型"
}),
- /* @__PURE__ */ (0, L.jsx)(sA, {
+ /* @__PURE__ */ (0, L.jsx)(aA, {
id: "label",
children: "标签"
}),
- /* @__PURE__ */ (0, L.jsx)(sA, {
+ /* @__PURE__ */ (0, L.jsx)(aA, {
id: "note",
children: "结果"
}),
- /* @__PURE__ */ (0, L.jsx)(sA, {
+ /* @__PURE__ */ (0, L.jsx)(aA, {
id: "url",
children: "地址"
})
- ] }), /* @__PURE__ */ (0, L.jsx)(lA, { children: t.map((e) => /* @__PURE__ */ (0, L.jsxs)(fA, {
+ ] }), /* @__PURE__ */ (0, L.jsx)(sA, { children: t.map((e) => /* @__PURE__ */ (0, L.jsxs)(uA, {
id: e.id,
children: [
- i ? /* @__PURE__ */ (0, L.jsx)(mA, { children: /* @__PURE__ */ (0, L.jsx)(Oj, {
+ i ? /* @__PURE__ */ (0, L.jsx)(fA, { children: /* @__PURE__ */ (0, L.jsx)(Ej, {
slot: null,
"aria-label": `选择 ${e.entity} 的${e.label || e.url}`,
isSelected: o.includes(e.id),
onChange: (t) => i(t ? [...o, e.id] : o.filter((t) => t !== e.id))
}) }) : null,
- /* @__PURE__ */ (0, L.jsx)(mA, { children: e.entity }),
- /* @__PURE__ */ (0, L.jsx)(mA, { children: sD[e.link_kind] || e.link_kind }),
- /* @__PURE__ */ (0, L.jsx)(mA, { children: e.label || "" }),
- /* @__PURE__ */ (0, L.jsx)(mA, { children: /* @__PURE__ */ (0, L.jsx)("span", {
+ /* @__PURE__ */ (0, L.jsx)(fA, { children: e.entity }),
+ /* @__PURE__ */ (0, L.jsx)(fA, { children: aD[e.link_kind] || e.link_kind }),
+ /* @__PURE__ */ (0, L.jsx)(fA, { children: e.label || "" }),
+ /* @__PURE__ */ (0, L.jsx)(fA, { children: /* @__PURE__ */ (0, L.jsx)("span", {
className: "tabular-nums text-text-error-primary",
children: e.note
}) }),
- /* @__PURE__ */ (0, L.jsx)(mA, { children: /* @__PURE__ */ (0, L.jsxs)("a", {
+ /* @__PURE__ */ (0, L.jsx)(fA, { children: /* @__PURE__ */ (0, L.jsxs)("a", {
href: e.url,
target: "_blank",
rel: "noreferrer",
@@ -34231,7 +34231,7 @@ function Vj({ title: e, items: t, hint: n, picked: r, onPick: i, children: a })
"data-middle-truncate": !0,
className: "min-w-0 truncate",
children: e.url
- }), /* @__PURE__ */ (0, L.jsx)(iC, {
+ }), /* @__PURE__ */ (0, L.jsx)(rC, {
"aria-hidden": !0,
className: "size-3.5 shrink-0"
})]
@@ -34243,27 +34243,27 @@ function Vj({ title: e, items: t, hint: n, picked: r, onPick: i, children: a })
]
});
}
-function Hj() {
+function Bj() {
let e = Ft({
+ queryKey: nD,
+ queryFn: ({ signal: e }) => sD(e)
+ }), [t, n] = (0, I.useState)([]), r = bj({
queryKey: iD,
- queryFn: ({ signal: e }) => lD(e)
- }), [t, n] = (0, I.useState)([]), r = Sj({
- queryKey: oD,
- queryFn: ({ signal: e }) => dD(e),
- start: Rre,
+ queryFn: ({ signal: e }) => lD(e),
+ start: Bre,
onFinish: () => {
X.invalidateQueries({
- queryKey: iD,
+ queryKey: nD,
exact: !0
}), X.invalidateQueries({
- queryKey: aD,
+ queryKey: rD,
exact: !0
});
}
- }), i = Sj({
- queryKey: aD,
- queryFn: ({ signal: e }) => uD(e),
- start: Lre,
+ }), i = bj({
+ queryKey: rD,
+ queryFn: ({ signal: e }) => cD(e),
+ start: zre,
onStarted: () => {
r.dismiss(), n([]);
}
@@ -34293,7 +34293,7 @@ function Hj() {
else if (v) x = /* @__PURE__ */ (0, L.jsx)(J, {
tone: "success",
title: "完成",
- children: zre(v)
+ children: Vre(v)
});
else if (y) x = /* @__PURE__ */ (0, L.jsx)(J, {
tone: "error",
@@ -34303,7 +34303,7 @@ function Hj() {
else if (i.query.isError && a) x = /* @__PURE__ */ (0, L.jsx)(J, {
tone: "neutral",
title: "任务状态",
- children: Rj
+ children: Ij
});
else if (a?.status === "failed") x = /* @__PURE__ */ (0, L.jsx)(J, {
tone: "error",
@@ -34311,12 +34311,12 @@ function Hj() {
children: a.error || "检查失败"
});
else if (a && a.status !== "idle") {
- b = /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [a.status === "running" ? /* @__PURE__ */ (0, L.jsx)(BA, {
+ b = /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [a.status === "running" ? /* @__PURE__ */ (0, L.jsx)(RA, {
embedded: !0,
- label: Bre(a),
+ label: Hre(a),
value: a.checked,
total: a.total
- }) : null, c ? /* @__PURE__ */ (0, L.jsx)(BA, {
+ }) : null, c ? /* @__PURE__ */ (0, L.jsx)(RA, {
embedded: !0,
label: r.job?.message || "正在重验并删除失效链接…",
value: r.job?.checked,
@@ -34324,38 +34324,38 @@ function Hj() {
}) : null] });
let e = t.length ? `重试选中的 ${t.length} 条` : "重试选中的链接";
x = l || u.length || d.length ? /* @__PURE__ */ (0, L.jsxs)("div", {
- className: boe,
+ className: Soe,
children: [
- /* @__PURE__ */ (0, L.jsx)(Vj, {
+ /* @__PURE__ */ (0, L.jsx)(zj, {
title: "地址已失效",
items: u,
- hint: Fj
+ hint: Nj
}),
- /* @__PURE__ */ (0, L.jsx)(Vj, {
+ /* @__PURE__ */ (0, L.jsx)(zj, {
title: "本次未访问成功",
items: d,
- hint: Ij,
+ hint: Pj,
picked: f.length ? t : void 0,
onPick: f.length ? n : void 0,
children: f.length ? /* @__PURE__ */ (0, L.jsx)("div", {
className: "-mx-4 mt-3 -mb-4",
- children: /* @__PURE__ */ (0, L.jsxs)(AA, { children: [/* @__PURE__ */ (0, L.jsx)(G, {
- leadingIcon: Pj,
+ children: /* @__PURE__ */ (0, L.jsxs)(OA, { children: [/* @__PURE__ */ (0, L.jsx)(G, {
+ leadingIcon: Mj,
disabled: !t.length,
...Y(s),
onClick: () => h(t),
children: e
}), /* @__PURE__ */ (0, L.jsx)(G, {
- leadingIcon: Pj,
+ leadingIcon: Mj,
...Y(s),
onClick: () => h(f.map((e) => e.id)),
children: `全部重试(${f.length})`
})] })
}) : null
}),
- l && u.length ? /* @__PURE__ */ (0, L.jsx)(AA, {
+ l && u.length ? /* @__PURE__ */ (0, L.jsx)(OA, {
tone: "error",
- status: Lj,
+ status: Fj,
children: /* @__PURE__ */ (0, L.jsx)(G, {
variant: "danger",
...Y(c),
@@ -34364,7 +34364,7 @@ function Hj() {
})
}) : null,
l && !u.length && !d.length ? /* @__PURE__ */ (0, L.jsx)("p", {
- className: `${kA} text-body-regular text-notification-success-foreground`,
+ className: `${DA} text-body-regular text-notification-success-foreground`,
children: "全部链接均可访问。"
}) : null
]
@@ -34375,21 +34375,21 @@ function Hj() {
"aria-labelledby": "link-manager-title",
className: "flex scroll-mt-20 flex-col gap-4",
children: [
- /* @__PURE__ */ (0, L.jsx)(jA, {
+ /* @__PURE__ */ (0, L.jsx)(kA, {
id: "link-manager-title",
children: "链接管理"
}),
- /* @__PURE__ */ (0, L.jsxs)(NA, {
+ /* @__PURE__ */ (0, L.jsxs)(jA, {
layout: "stack",
labelledBy: "link-manager-box",
footer: /* @__PURE__ */ (0, L.jsx)(G, {
- leadingIcon: Nj,
+ leadingIcon: jj,
...Y(s),
onClick: () => h(),
children: s ? "检查中" : l ? "重新检查" : "检查死链"
}),
children: [
- /* @__PURE__ */ (0, L.jsx)(MA, {
+ /* @__PURE__ */ (0, L.jsx)(AA, {
id: "link-manager-box",
gap: "small",
children: "站外链接"
@@ -34400,13 +34400,13 @@ function Hj() {
children: K(e.error)
}) : p ? /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsxs)("div", {
className: "link-stat-grid mt-4 gap-x-8 gap-y-3",
- children: [/* @__PURE__ */ (0, L.jsx)(Bj, {
+ children: [/* @__PURE__ */ (0, L.jsx)(Rj, {
label: "链接总数",
- value: zj(p.total),
- note: `分布在 ${zj(p.entities)} 个女优、厂牌与系列`
- }), Object.entries(p.by_kind ?? {}).map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(Bj, {
- label: sD[e] || e,
- value: zj(t)
+ value: Lj(p.total),
+ note: `分布在 ${Lj(p.entities)} 个女优、厂牌与系列`
+ }), Object.entries(p.by_kind ?? {}).map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(Rj, {
+ label: aD[e] || e,
+ value: Lj(t)
}, e))]
}), m ? /* @__PURE__ */ (0, L.jsxs)("div", {
className: "mt-4 flex min-w-0 flex-col gap-0.5",
@@ -34435,11 +34435,11 @@ function Hj() {
}
//#endregion
//#region src/react/boardui/components/base/input/label.tsx
-function Uj({ isRequired: e = !1, isInvalid: t, tooltip: n, className: r, children: i, ...a }) {
- return /* @__PURE__ */ (0, L.jsxs)(Sie, {
+function Vj({ isRequired: e = !1, isInvalid: t, tooltip: n, className: r, children: i, ...a }) {
+ return /* @__PURE__ */ (0, L.jsxs)(wie, {
"data-label": "true",
...a,
- className: cw("flex cursor-default items-center gap-0.5", "text-body-medium text-text-primary", r),
+ className: sw("flex cursor-default items-center gap-0.5", "text-body-medium text-text-primary", r),
children: [
i,
e && /* @__PURE__ */ (0, L.jsx)("span", {
@@ -34447,7 +34447,7 @@ function Uj({ isRequired: e = !1, isInvalid: t, tooltip: n, className: r, childr
className: "text-body-medium text-text-error-primary",
children: "*"
}),
- n && /* @__PURE__ */ (0, L.jsx)(dC, {
+ n && /* @__PURE__ */ (0, L.jsx)(uC, {
className: "size-4 shrink-0 text-foreground-icon-quaternary",
"aria-hidden": !0
})
@@ -34456,33 +34456,33 @@ function Uj({ isRequired: e = !1, isInvalid: t, tooltip: n, className: r, childr
}
//#endregion
//#region src/react/boardui/components/base/input/hint-text.tsx
-function Wj({ isInvalid: e = !1, className: t, ...n }) {
- return /* @__PURE__ */ (0, L.jsx)(Eie, {
+function Hj({ isInvalid: e = !1, className: t, ...n }) {
+ return /* @__PURE__ */ (0, L.jsx)(Oie, {
slot: e ? "errorMessage" : "description",
...n,
- className: cw("pt-px text-caption-1-medium text-text-secondary", e && "text-text-error-primary", t)
+ className: sw("pt-px text-caption-1-medium text-text-secondary", e && "text-text-error-primary", t)
});
}
//#endregion
//#region src/react/boardui/components/base/input/input.tsx
-var Gj = (0, I.createContext)({});
-function Kj({ size: e = "medium", fieldClassName: t, inputClassName: n, className: r, children: i, ...a }) {
- return /* @__PURE__ */ (0, L.jsx)(Gj.Provider, {
+var Uj = (0, I.createContext)({});
+function Wj({ size: e = "medium", fieldClassName: t, inputClassName: n, className: r, children: i, ...a }) {
+ return /* @__PURE__ */ (0, L.jsx)(Uj.Provider, {
value: {
size: e,
fieldClassName: t,
inputClassName: n
},
- children: /* @__PURE__ */ (0, L.jsx)(loe, {
+ children: /* @__PURE__ */ (0, L.jsx)(doe, {
...a,
"data-input-size": e,
- className: cw("group flex h-max w-full flex-col items-start gap-1", r),
+ className: sw("group flex h-max w-full flex-col items-start gap-1", r),
children: i
})
});
}
-Kj.displayName = "TextField";
-var qj = lw({
+Wj.displayName = "TextField";
+var Gj = cw({
field: [
"relative flex w-full items-center",
"rounded-2lg",
@@ -34511,44 +34511,44 @@ var qj = lw({
].join(" "),
icon: "size-5 shrink-0"
});
-function Jj({ size: e, leadingIcon: t, trailingIcon: n, leadingAddon: r, fieldClassName: i, className: a, ref: o, groupRef: s, ...c }) {
- let l = (0, I.useContext)(Gj), u = e ?? l.size ?? "medium", d = r != null;
- return /* @__PURE__ */ (0, L.jsx)(jie, {
+function Kj({ size: e, leadingIcon: t, trailingIcon: n, leadingAddon: r, fieldClassName: i, className: a, ref: o, groupRef: s, ...c }) {
+ let l = (0, I.useContext)(Uj), u = e ?? l.size ?? "medium", d = r != null;
+ return /* @__PURE__ */ (0, L.jsx)(Nie, {
ref: s,
- className: ({ isFocusWithin: e, isHovered: t, isDisabled: n, isInvalid: r }) => cw(qj.field, d ? qj.fieldWithAddonSize[u] : qj.fieldSize[u], t && !e && !n && !r && "ring-border-button-hover", e && !n && !r && "ring-border-button-active", n && "bg-input-disabled-background text-input-disabled-foreground", r && "bg-background-tertiary-error text-foreground-icon-error", l.fieldClassName, i),
+ className: ({ isFocusWithin: e, isHovered: t, isDisabled: n, isInvalid: r }) => sw(Gj.field, d ? Gj.fieldWithAddonSize[u] : Gj.fieldSize[u], t && !e && !n && !r && "ring-border-button-hover", e && !n && !r && "ring-border-button-active", n && "bg-input-disabled-background text-input-disabled-foreground", r && "bg-background-tertiary-error text-foreground-icon-error", l.fieldClassName, i),
children: /* @__PURE__ */ (0, L.jsxs)("div", {
- className: qj.content,
+ className: Gj.content,
children: [/* @__PURE__ */ (0, L.jsxs)("div", {
- className: qj.leftSection,
+ className: Gj.leftSection,
children: [d ? r : t ? /* @__PURE__ */ (0, L.jsx)(t, {
- className: qj.icon,
+ className: Gj.icon,
"aria-hidden": !0
- }) : null, /* @__PURE__ */ (0, L.jsx)(Nie, {
+ }) : null, /* @__PURE__ */ (0, L.jsx)(Fie, {
ref: o,
...c,
- className: cw(qj.input, l.inputClassName, a)
+ className: sw(Gj.input, l.inputClassName, a)
})]
}), n ? /* @__PURE__ */ (0, L.jsx)(n, {
- className: qj.icon,
+ className: Gj.icon,
"aria-hidden": !0
}) : null]
})
});
}
-Jj.displayName = "InputBase";
-function Yj({ label: e, hint: t, tooltip: n, placeholder: r, leadingIcon: i, trailingIcon: a, leadingAddon: o, fieldClassName: s, ref: c, groupRef: l, className: u, ...d }) {
- return /* @__PURE__ */ (0, L.jsx)(Kj, {
+Kj.displayName = "InputBase";
+function qj({ label: e, hint: t, tooltip: n, placeholder: r, leadingIcon: i, trailingIcon: a, leadingAddon: o, fieldClassName: s, ref: c, groupRef: l, className: u, ...d }) {
+ return /* @__PURE__ */ (0, L.jsx)(Wj, {
...d,
className: u,
"aria-label": d["aria-label"] ?? (!e && typeof r == "string" ? r : void 0),
children: ({ isRequired: u, isInvalid: d }) => /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [
- e && /* @__PURE__ */ (0, L.jsx)(Uj, {
+ e && /* @__PURE__ */ (0, L.jsx)(Vj, {
isRequired: u,
isInvalid: d,
tooltip: n,
children: e
}),
- /* @__PURE__ */ (0, L.jsx)(Jj, {
+ /* @__PURE__ */ (0, L.jsx)(Kj, {
ref: c,
groupRef: l,
placeholder: r,
@@ -34557,28 +34557,28 @@ function Yj({ label: e, hint: t, tooltip: n, placeholder: r, leadingIcon: i, tra
leadingAddon: o,
fieldClassName: s
}),
- t && /* @__PURE__ */ (0, L.jsx)(Wj, {
+ t && /* @__PURE__ */ (0, L.jsx)(Hj, {
isInvalid: d,
children: t
})
] })
});
}
-Yj.displayName = "Input";
+qj.displayName = "Input";
//#endregion
//#region src/react/data-cleanup/organize-card.tsx
-var Xj = (e) => `将按这两份模板改动「${e}」上的文件名与目录,目标已存在的行会整行跳过。这一批可以从「回滚上一批」整批退回。`, Zj = "将把上一批整理动过的文件退回整理前的名字与位置,账本路径跟着退回。退回后这一批不再出现在这里。", Qj = 8;
-function $j({ plan: e }) {
+var Jj = (e) => `将按这两份模板改动「${e}」上的文件名与目录,目标已存在的行会整行跳过。这一批可以从「回滚上一批」整批退回。`, Yj = "将把上一批整理动过的文件退回整理前的名字与位置,账本路径跟着退回。退回后这一批不再出现在这里。", Xj = 8;
+function Zj({ plan: e }) {
return /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)("ol", {
className: "mt-2 flex min-w-0 flex-col gap-1",
- children: e.rows.slice(0, Qj).map((e) => /* @__PURE__ */ (0, L.jsxs)("li", {
+ children: e.rows.slice(0, Xj).map((e) => /* @__PURE__ */ (0, L.jsxs)("li", {
className: "flex min-w-0 items-center gap-2 text-caption-1-regular text-text-secondary",
children: [
/* @__PURE__ */ (0, L.jsx)("span", {
"data-middle-truncate": !0,
title: e.current_path,
className: "min-w-0 truncate",
- children: hD(e.current_path)
+ children: pD(e.current_path)
}),
/* @__PURE__ */ (0, L.jsx)("span", {
"aria-hidden": !0,
@@ -34588,7 +34588,7 @@ function $j({ plan: e }) {
"data-middle-truncate": !0,
title: e.target_path,
className: "min-w-0 truncate text-text-primary",
- children: hD(e.target_path)
+ children: pD(e.target_path)
})
]
}, e.current_path))
@@ -34597,10 +34597,10 @@ function $j({ plan: e }) {
children: "只列出前 8 行,完整计划在计划 CSV 里。"
}) : null] });
}
-function eM({ toast: t, failure: n }) {
+function Qj({ toast: t, failure: n }) {
let r = Ft({
- queryKey: pD,
- queryFn: ({ signal: e }) => mD(e)
+ queryKey: dD,
+ queryFn: ({ signal: e }) => fD(e)
}), i = r.data, a = i?.locations ?? [], [o, s] = (0, I.useState)(""), c = a.some((e) => e.location === o) ? o : a[0]?.location ?? "", l = i?.templates?.[c], [u, d] = (0, I.useState)(null), f = u?.location === c ? u : {
location: c,
file: l?.file ?? "",
@@ -34613,8 +34613,8 @@ function eM({ toast: t, failure: n }) {
file_template: f.file.trim(),
dir_template: f.dir.trim()
}), x = It({
- mutationFn: qre,
- onSuccess: (e, t) => void Yre({
+ mutationFn: Yre,
+ onSuccess: (e, t) => void Zre({
...i?.templates ?? {},
[t.location]: {
file: t.file_template,
@@ -34622,29 +34622,29 @@ function eM({ toast: t, failure: n }) {
}
}),
onError: (e) => {
- let t = Zre.test(K(e)) ? "dir" : "file";
+ let t = $re.test(K(e)) ? "dir" : "file";
_(t), (t === "dir" ? y : v).current?.focus();
}
- }), S = Sj({
- queryKey: pD,
- queryFn: ({ signal: e }) => mD(e),
- start: Jre,
+ }), S = bj({
+ queryKey: dD,
+ queryFn: ({ signal: e }) => fD(e),
+ start: Xre,
jobOf: (e) => e,
- withJob: Xre,
+ withJob: Qre,
onStarted: () => x.reset(),
onFinish: (e) => {
if (X.invalidateQueries({
- queryKey: pD,
+ queryKey: dD,
exact: !0
}), e.status !== "complete") return;
- let { text: r, failed: i } = _D(e);
+ let { text: r, failed: i } = hD(e);
i ? n("按模板整理", /* @__PURE__ */ Error(`${i} 行未能处理`)) : t(r.replace(/。$/, ""));
}
}), C = S.running || S.start.isPending, w = x.data, T = Number(w?.counts?.change || 0), E = e[c] || c, D = (i?.placeholders ?? []).map((e) => `{${e.key}} ${e.label}`).join(" · "), O = () => {
x.isPending || !c || (_(null), x.mutate(b()));
}, k = () => void g({
title: "按模板整理文件",
- body: Xj(E),
+ body: Jj(E),
confirmLabel: "整理文件",
onConfirm: () => S.start.mutateAsync({
kind: "apply",
@@ -34652,13 +34652,13 @@ function eM({ toast: t, failure: n }) {
})
}), A = () => void g({
title: "回滚上一批整理",
- body: Zj,
+ body: Yj,
confirmLabel: "回滚整理",
onConfirm: () => S.start.mutateAsync({ kind: "rollback" })
}), j = null, M = S.job, N = S.outcome;
if (M?.status === "running") {
let e = M.message || M.stage || "正在整理文件…";
- j = /* @__PURE__ */ (0, L.jsx)(BA, {
+ j = /* @__PURE__ */ (0, L.jsx)(RA, {
embedded: !0,
label: e,
value: M.checked,
@@ -34670,7 +34670,7 @@ function eM({ toast: t, failure: n }) {
children: N.error || "请查看任务记录,核对已处理的文件。"
});
else if (N) {
- let { text: e, failed: t } = _D(N);
+ let { text: e, failed: t } = hD(N);
j = /* @__PURE__ */ (0, L.jsx)(J, {
tone: t ? "warning" : "success",
title: t ? "部分完成" : "整理结果",
@@ -34680,7 +34680,7 @@ function eM({ toast: t, failure: n }) {
tone: "error",
title: "整理失败",
children: K(S.start.error)
- }) : x.isPending ? j = /* @__PURE__ */ (0, L.jsx)(BA, {
+ }) : x.isPending ? j = /* @__PURE__ */ (0, L.jsx)(RA, {
embedded: !0,
label: "正在按模板算计划…"
}) : x.isError ? j = /* @__PURE__ */ (0, L.jsx)(J, {
@@ -34690,9 +34690,9 @@ function eM({ toast: t, failure: n }) {
}) : w && (j = /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(J, {
tone: "neutral",
title: "预览结果",
- children: Qre(w)
- }), T ? /* @__PURE__ */ (0, L.jsx)($j, { plan: w }) : null] }));
- return /* @__PURE__ */ (0, L.jsxs)(NA, {
+ children: eie(w)
+ }), T ? /* @__PURE__ */ (0, L.jsx)(Zj, { plan: w }) : null] }));
+ return /* @__PURE__ */ (0, L.jsxs)(jA, {
layout: "stack",
id: "organize",
labelledBy: "cleanup-organize-title",
@@ -34716,7 +34716,7 @@ function eM({ toast: t, failure: n }) {
}) : null
] }),
children: [
- /* @__PURE__ */ (0, L.jsx)(MA, {
+ /* @__PURE__ */ (0, L.jsx)(AA, {
id: "cleanup-organize-title",
gap: "medium",
children: "整理"
@@ -34736,20 +34736,20 @@ function eM({ toast: t, failure: n }) {
/* @__PURE__ */ (0, L.jsxs)("div", {
className: "mt-3 flex flex-col gap-3",
children: [
- a.length ? /* @__PURE__ */ (0, L.jsx)(_j, {
+ a.length ? /* @__PURE__ */ (0, L.jsx)(hj, {
"aria-label": "整理哪个来源",
className: "w-fit min-w-25",
selectedKey: c || null,
onSelectionChange: (e) => {
e !== null && (s(String(e)), _(null), x.reset());
},
- children: a.map((t) => /* @__PURE__ */ (0, L.jsxs)(vj, {
+ children: a.map((t) => /* @__PURE__ */ (0, L.jsxs)(gj, {
id: t.location,
textValue: e[t.location] || t.location,
- children: [/* @__PURE__ */ (0, L.jsx)(nj, { mark: m[t.location] || "database" }), e[t.location] || t.location]
+ children: [/* @__PURE__ */ (0, L.jsx)(ej, { mark: m[t.location] || "database" }), e[t.location] || t.location]
}, t.location))
}) : null,
- /* @__PURE__ */ (0, L.jsx)(Yj, {
+ /* @__PURE__ */ (0, L.jsx)(qj, {
label: "文件名模板",
placeholder: "{number}[ {title}]",
value: f.file,
@@ -34760,7 +34760,7 @@ function eM({ toast: t, failure: n }) {
p({ file: e }), _(null);
}
}),
- /* @__PURE__ */ (0, L.jsx)(Yj, {
+ /* @__PURE__ */ (0, L.jsx)(qj, {
label: "目录模板",
placeholder: "留空表示原地改名",
value: f.dir,
@@ -34800,91 +34800,91 @@ function eM({ toast: t, failure: n }) {
}
//#endregion
//#region src/react/data-cleanup/resource-sync-card.tsx
-var tM = cT("git-compare"), nM = cT("rotate-cw"), rM = "暂时无法读取进度,正在重新连接…", iM = "清理失效条目", aM = "inline-grid w-full grid-flow-col auto-cols-fr gap-4 max-plain-stat-pair:grid-flow-row max-plain-stat-pair:grid-cols-2 max-plain-stat-single:grid-cols-1", oM = (e) => Number(e || 0).toLocaleString();
-function sM({ scan: e }) {
+var $j = oT("git-compare"), eM = oT("rotate-cw"), tM = "暂时无法读取进度,正在重新连接…", nM = "清理失效条目", rM = "inline-grid w-full grid-flow-col auto-cols-fr gap-4 max-plain-stat-pair:grid-flow-row max-plain-stat-pair:grid-cols-2 max-plain-stat-single:grid-cols-1", iM = (e) => Number(e || 0).toLocaleString();
+function aM({ scan: e }) {
let t = e.cache ?? {
files: 0,
bytes: 0
};
return /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)("div", {
- className: aM,
+ className: rM,
children: (e.sources ?? []).map((e) => /* @__PURE__ */ (0, L.jsx)("article", {
- className: LD(),
- children: /* @__PURE__ */ (0, L.jsx)(RD, {
- label: rie[e.location] || "媒体来源",
- mark: /* @__PURE__ */ (0, L.jsx)(nj, { mark: m[e.location] ?? "database" }),
+ className: FD(),
+ children: /* @__PURE__ */ (0, L.jsx)(ID, {
+ label: aie[e.location] || "媒体来源",
+ mark: /* @__PURE__ */ (0, L.jsx)(ej, { mark: m[e.location] ?? "database" }),
aside: /* @__PURE__ */ (0, L.jsx)("span", {
className: e.online ? "text-notification-success-foreground" : "text-text-error-primary",
children: e.online ? "可访问" : "离线,已跳过"
}),
- figure: e.online ? `${oM(e.missing)} 项` : "—",
- meta: sie(e),
+ figure: e.online ? `${iM(e.missing)} 项` : "—",
+ meta: lie(e),
wrapMeta: !0
})
}, e.location))
}), /* @__PURE__ */ (0, L.jsxs)("div", {
- className: aM,
+ className: rM,
children: [
/* @__PURE__ */ (0, L.jsx)("article", {
- className: LD(),
- children: /* @__PURE__ */ (0, L.jsx)(RD, {
+ className: FD(),
+ children: /* @__PURE__ */ (0, L.jsx)(ID, {
label: "待永久删除",
- figure: `${oM(e.missing)} 项`,
+ figure: `${iM(e.missing)} 项`,
meta: "文件已不在盘上,含回收站"
})
}),
/* @__PURE__ */ (0, L.jsx)("article", {
- className: LD(),
- children: /* @__PURE__ */ (0, L.jsx)(RD, {
+ className: FD(),
+ children: /* @__PURE__ */ (0, L.jsx)(ID, {
label: "空文件夹",
- figure: `${oM(e.empty)} 个`,
+ figure: `${iM(e.empty)} 个`,
meta: "保留来源根目录"
})
}),
/* @__PURE__ */ (0, L.jsx)("article", {
- className: LD(),
- children: /* @__PURE__ */ (0, L.jsx)(RD, {
+ className: FD(),
+ children: /* @__PURE__ */ (0, L.jsx)(ID, {
label: "可清理的缓存",
- figure: `${oM(t.files)} 个`,
+ figure: `${iM(t.files)} 个`,
meta: t.files ? a(t.bytes) : ""
})
})
]
})] });
}
-function cM({ toast: e }) {
- let t = Sj({
- queryKey: xD,
- queryFn: ({ signal: e }) => CD(e),
- start: eie,
+function oM({ toast: e }) {
+ let t = bj({
+ queryKey: yD,
+ queryFn: ({ signal: e }) => xD(e),
+ start: nie,
onFinish: (t) => {
if (X.invalidateQueries({
- queryKey: AD,
+ queryKey: OD,
exact: !0
}), X.invalidateQueries({
- queryKey: bD,
+ queryKey: vD,
exact: !0
}), t.status !== "complete") return;
- let { done: n, left: r } = ED(t);
- r ? e(`已完成 ${oM(n)} 项,${oM(r)} 项没有处理`, { warning: !0 }) : e("已清理失效条目");
+ let { done: n, left: r } = wD(t);
+ r ? e(`已完成 ${iM(n)} 项,${iM(r)} 项没有处理`, { warning: !0 }) : e("已清理失效条目");
}
- }), n = Sj({
- queryKey: bD,
- queryFn: ({ signal: e }) => SD(e),
- start: $re,
+ }), n = bj({
+ queryKey: vD,
+ queryFn: ({ signal: e }) => bD(e),
+ start: tie,
onStarted: () => t.dismiss()
}), r = n.job, i = n.running || n.start.isPending, o = t.running || t.start.isPending, s = r?.status === "complete" || r?.status === "failed", c = i ? "扫描中" : s ? "重新扫描" : "检查文件", l = (e) => void g({
- title: iM,
- body: oie(e),
- confirmLabel: iM,
+ title: nM,
+ body: cie(e),
+ confirmLabel: nM,
danger: !0,
onConfirm: () => t.start.mutateAsync(e.scan_id || "")
}), u = t.outcome, d = (e) => {
- let t = ED(e).left > 0;
+ let t = wD(e).left > 0;
return /* @__PURE__ */ (0, L.jsx)(J, {
tone: t ? "warning" : "success",
title: t ? "部分完成" : "清理结果",
- children: cie(e, a)
+ children: uie(e, a)
});
}, f = null, p = null;
if (u?.status === "failed") p = /* @__PURE__ */ (0, L.jsx)(J, {
@@ -34893,7 +34893,7 @@ function cM({ toast: e }) {
children: u.error || "请查看任务记录,核对已处理的文件。"
});
else if (u) p = d(u);
- else if (t.running) f = /* @__PURE__ */ (0, L.jsx)(BA, {
+ else if (t.running) f = /* @__PURE__ */ (0, L.jsx)(RA, {
embedded: !0,
label: t.job?.message || "正在复核并清理失效条目…"
});
@@ -34905,11 +34905,11 @@ function cM({ toast: e }) {
else if (n.query.isError && r) p = /* @__PURE__ */ (0, L.jsx)(J, {
tone: "neutral",
title: "任务状态",
- children: rM
+ children: tM
});
else if (r?.status === "running") {
- let e = iie(r);
- f = /* @__PURE__ */ (0, L.jsx)(BA, {
+ let e = oie(r);
+ f = /* @__PURE__ */ (0, L.jsx)(RA, {
embedded: !0,
label: e,
value: r.completed_sources,
@@ -34926,13 +34926,13 @@ function cM({ toast: e }) {
children: "这次检查的结果已经清理,重新扫描可再核对。"
});
else if (r?.status === "complete") {
- let e = nie(r);
+ let e = iie(r);
p = /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [
- /* @__PURE__ */ (0, L.jsx)(sM, { scan: r }),
+ /* @__PURE__ */ (0, L.jsx)(aM, { scan: r }),
e ? /* @__PURE__ */ (0, L.jsx)(J, {
tone: "neutral",
title: "清理内容",
- children: aie(r)
+ children: sie(r)
}) : null,
/* @__PURE__ */ (0, L.jsx)("div", {
className: "flex flex-wrap items-center justify-end gap-2",
@@ -34940,7 +34940,7 @@ function cM({ toast: e }) {
variant: "danger",
...Y(o),
onClick: () => l(r),
- children: o ? "正在复核并清理…" : iM
+ children: o ? "正在复核并清理…" : nM
}) : /* @__PURE__ */ (0, L.jsx)("p", {
className: "mr-auto text-body-regular text-notification-success-foreground",
children: "已检查可访问的来源,没有待清理的记录、空文件夹或缓存。"
@@ -34957,16 +34957,16 @@ function cM({ toast: e }) {
"aria-labelledby": "resource-sync-title",
className: "flex scroll-mt-20 flex-col gap-4",
children: [
- /* @__PURE__ */ (0, L.jsx)(jA, {
+ /* @__PURE__ */ (0, L.jsx)(kA, {
id: "resource-sync-title",
children: "资源同步"
}),
- /* @__PURE__ */ (0, L.jsxs)(NA, {
+ /* @__PURE__ */ (0, L.jsxs)(jA, {
layout: "split",
labelledBy: "resource-sync-box",
footer: /* @__PURE__ */ (0, L.jsx)(G, {
"data-resource-scan": !0,
- leadingIcon: s && !i ? nM : tM,
+ leadingIcon: s && !i ? eM : $j,
...Y(i),
onClick: () => {
i || n.start.mutate();
@@ -34974,7 +34974,7 @@ function cM({ toast: e }) {
children: c
}),
children: [
- /* @__PURE__ */ (0, L.jsx)(MA, {
+ /* @__PURE__ */ (0, L.jsx)(AA, {
id: "resource-sync-box",
gap: "small",
children: "文件与记录核对"
@@ -35000,16 +35000,16 @@ function cM({ toast: e }) {
}
//#endregion
//#region src/react/data-cleanup/data-cleanup-page.tsx
-function lM(e, t) {
+function sM(e, t) {
return e.data === void 0 ? { figure: e.isError ? "读取失败" : "—" } : t(e.data);
}
-function uM({ section: e, label: t, icon: n, value: r, open: i }) {
+function cM({ section: e, label: t, icon: n, value: r, open: i }) {
return /* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
- className: LD({ interactive: !0 }),
+ className: FD({ interactive: !0 }),
"data-cleanup-go": e,
onClick: () => i(e),
- children: /* @__PURE__ */ (0, L.jsx)(RD, {
+ children: /* @__PURE__ */ (0, L.jsx)(ID, {
label: t,
icon: n,
figure: r.figure,
@@ -35017,80 +35017,80 @@ function uM({ section: e, label: t, icon: n, value: r, open: i }) {
})
});
}
-var dM = cT("square-check-big"), fM = cT("sparkles"), pM = cT("file-stack"), mM = cT("file-archive"), hM = cT("trash"), gM = [
- DD,
- bE,
- IT
-], _M = () => {
- for (let e of gM) X.invalidateQueries({
+var lM = oT("square-check-big"), uM = oT("sparkles"), dM = oT("file-stack"), fM = oT("file-archive"), pM = oT("trash"), mM = [
+ TD,
+ vE,
+ PT
+], hM = () => {
+ for (let e of mM) X.invalidateQueries({
queryKey: e,
exact: !0
});
};
-function vM({ toast: e, failure: t, open: n }) {
+function gM({ toast: e, failure: t, open: n }) {
let r = Ft({
- queryKey: DD,
- queryFn: ({ signal: e }) => jD(e)
+ queryKey: TD,
+ queryFn: ({ signal: e }) => kD(e)
}), i = Ft({
- queryKey: bE,
- queryFn: ({ signal: e }) => xE(e)
+ queryKey: vE,
+ queryFn: ({ signal: e }) => yE(e)
}), o = Ft({
- queryKey: IT,
- queryFn: ({ signal: e }) => RT(e)
+ queryKey: PT,
+ queryFn: ({ signal: e }) => IT(e)
}), s = Ft({
- queryKey: OD,
- queryFn: ({ signal: e }) => MD(e)
+ queryKey: ED,
+ queryFn: ({ signal: e }) => AD(e)
}), c = Ft({
- queryKey: AD,
- queryFn: ({ signal: e }) => ND(e)
+ queryKey: OD,
+ queryFn: ({ signal: e }) => jD(e)
}), l = Ft({
- queryKey: AT,
- queryFn: ({ signal: e }) => jT(e)
+ queryKey: OT,
+ queryFn: ({ signal: e }) => kT(e)
}), u = (t) => e(t);
- return /* @__PURE__ */ (0, L.jsxs)(bw, { children: [
+ return /* @__PURE__ */ (0, L.jsxs)(yw, { children: [
/* @__PURE__ */ (0, L.jsxs)("div", {
- className: yie,
+ className: xie,
children: [
- /* @__PURE__ */ (0, L.jsx)(uM, {
+ /* @__PURE__ */ (0, L.jsx)(cM, {
section: "review",
label: "人工复核",
- icon: dM,
+ icon: lM,
open: n,
- value: lM(r, fie)
+ value: sM(r, mie)
}),
- /* @__PURE__ */ (0, L.jsx)(uM, {
+ /* @__PURE__ */ (0, L.jsx)(cM, {
section: "quality",
label: "高清版",
- icon: fM,
+ icon: uM,
open: n,
- value: lM(i, (e) => ({ figure: `${Number(e.total || 0).toLocaleString()} 个待升级` }))
+ value: sM(i, (e) => ({ figure: `${Number(e.total || 0).toLocaleString()} 个待升级` }))
}),
- /* @__PURE__ */ (0, L.jsx)(uM, {
+ /* @__PURE__ */ (0, L.jsx)(cM, {
section: "duplicates",
label: "重复文件",
- icon: pM,
+ icon: dM,
open: n,
- value: lM(o, (e) => Number(e.total || 0) ? {
+ value: sM(o, (e) => Number(e.total || 0) ? {
figure: `${Number(e.total).toLocaleString()} 组 · ${Number(e.files || 0).toLocaleString()} 个文件`,
meta: `可回收 ${a(e.reclaimable || 0)}`
} : { figure: "没有重复内容" })
}),
- /* @__PURE__ */ (0, L.jsx)(uM, {
+ /* @__PURE__ */ (0, L.jsx)(cM, {
section: "ads",
label: "垃圾文件",
- icon: mM,
+ icon: fM,
open: n,
- value: lM(s, (e) => ({
+ value: sM(s, (e) => ({
figure: `${Number(e.pending_total || 0).toLocaleString()} 个待判断`,
- meta: pie(e)
+ meta: hie(e)
}))
}),
- /* @__PURE__ */ (0, L.jsx)(uM, {
+ /* @__PURE__ */ (0, L.jsx)(cM, {
section: "trash",
label: "回收站",
- icon: hM,
+ icon: pM,
open: n,
- value: lM(c, (e) => ({
+ value: sM(c, (e) => ({
figure: `${Number(e.total || 0).toLocaleString()} 项在回收站`,
meta: e.total ? `占用 ${a(e.bytes || 0)}` : ""
}))
@@ -35103,29 +35103,29 @@ function vM({ toast: e, failure: t, open: n }) {
/* @__PURE__ */ (0, L.jsx)("div", {
id: "libraryProcessing",
className: "scroll-mt-20",
- children: /* @__PURE__ */ (0, L.jsx)(dj, {
+ children: /* @__PURE__ */ (0, L.jsx)(lj, {
toast: u,
monitor: !0,
- onComplete: _M
+ onComplete: hM
})
}),
/* @__PURE__ */ (0, L.jsx)("div", {
id: "mediaRepair",
- children: /* @__PURE__ */ (0, L.jsx)(Tj, {})
+ children: /* @__PURE__ */ (0, L.jsx)(Cj, {})
}),
- /* @__PURE__ */ (0, L.jsx)(eM, {
+ /* @__PURE__ */ (0, L.jsx)(Qj, {
toast: u,
failure: t
})
]
}),
- /* @__PURE__ */ (0, L.jsx)(Hj, {}),
- wD(l.data) ? /* @__PURE__ */ (0, L.jsx)(cM, { toast: e }) : null
+ /* @__PURE__ */ (0, L.jsx)(Bj, {}),
+ SD(l.data) ? /* @__PURE__ */ (0, L.jsx)(oM, { toast: e }) : null
] });
}
//#endregion
//#region src/react/components/collection-summary.tsx
-function yM({ label: e, figure: t, detail: n = "", pending: r = !1, flush: i = !1 }) {
+function _M({ label: e, figure: t, detail: n = "", pending: r = !1, flush: i = !1 }) {
return /* @__PURE__ */ (0, L.jsxs)("div", {
"data-collection-summary": "",
className: `${i ? "" : "mb-5 "}flex items-end justify-between gap-4 rounded-surface bg-background-secondary-default px-6 py-5
@@ -35152,7 +35152,7 @@ function yM({ label: e, figure: t, detail: n = "", pending: r = !1, flush: i = !
}
//#endregion
//#region src/react/components/use-stuck.ts
-function bM(e) {
+function vM(e) {
(0, I.useEffect)(() => {
let t = e.current;
if (!t) return;
@@ -35170,9 +35170,9 @@ function bM(e) {
}
//#endregion
//#region src/react/components/filter-glass.tsx
-function xM({ title: e, children: t }) {
+function yM({ title: e, children: t }) {
let n = (0, I.useRef)(null);
- return bM(n), /* @__PURE__ */ (0, L.jsxs)("div", {
+ return vM(n), /* @__PURE__ */ (0, L.jsxs)("div", {
ref: n,
role: "group",
"aria-label": e,
@@ -35185,51 +35185,51 @@ function xM({ title: e, children: t }) {
}), t]
});
}
-function SM({ label: e, topLabel: t, top: n, bottom: r, className: i, topClassName: a, bottomClassName: o, panes: s, attrs: c, busy: l, bottomRef: u }) {
+function bM({ label: e, topLabel: t, top: n, bottom: r, className: i, topClassName: a, bottomClassName: o, panes: s, attrs: c, busy: l, bottomRef: u }) {
let d = (0, I.useRef)(null);
- return bM(d), /* @__PURE__ */ (0, L.jsxs)("div", {
+ return vM(d), /* @__PURE__ */ (0, L.jsxs)("div", {
ref: d,
role: "group",
"aria-label": e,
"data-filter-glass": !0,
"data-glass-pane": "",
...c,
- className: cw("sticky top-topbar z-10 mb-5.5 flex flex-col", i),
+ className: sw("sticky top-topbar z-10 mb-5.5 flex flex-col", i),
children: [
s,
/* @__PURE__ */ (0, L.jsx)("div", {
role: "group",
"aria-label": t,
"data-filter-row": "top",
- className: cw("flex h-12 min-w-0 items-center gap-1.75 overflow-x-auto overscroll-x-contain px-3 py-2", a),
+ className: sw("flex h-12 min-w-0 items-center gap-1.75 overflow-x-auto overscroll-x-contain px-3 py-2", a),
children: n
}),
/* @__PURE__ */ (0, L.jsx)("div", {
ref: u,
"data-filter-row": "bottom",
"aria-busy": l || void 0,
- className: cw("flex min-h-11.5 min-w-0 items-center gap-3 px-3 py-2", o),
+ className: sw("flex min-h-11.5 min-w-0 items-center gap-3 px-3 py-2", o),
children: r
})
]
});
}
-var CM = "flex h-7.5 flex-none cursor-pointer items-center gap-1.75 rounded-lg border border-dashed border-(--glass-low) bg-transparent px-2.5 text-body-2-regular leading-5 whitespace-nowrap text-inherit outline-none hover:border-solid focus-visible:ring-2 focus-visible:ring-border-focus-ring";
-function wM({ children: e, pressed: t, onPress: n, className: r, ...i }) {
+var xM = "flex h-7.5 flex-none cursor-pointer items-center gap-1.75 rounded-lg border border-dashed border-(--glass-low) bg-transparent px-2.5 text-body-2-regular leading-5 whitespace-nowrap text-inherit outline-none hover:border-solid focus-visible:ring-2 focus-visible:ring-border-focus-ring";
+function SM({ children: e, pressed: t, onPress: n, className: r, ...i }) {
return /* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
...i,
"aria-pressed": t,
- className: cw(CM, r),
+ className: sw(xM, r),
onClick: n,
children: e
});
}
-var TM = "h-7.5 cursor-pointer rounded-full border border-(--glass-low) bg-transparent px-3 text-body-2-regular leading-none whitespace-nowrap text-inherit outline-none hover:border-(--glass-rim) hover:bg-(--glass-pick-fill) focus-visible:ring-2 focus-visible:ring-border-focus-ring aria-busy:cursor-wait aria-busy:opacity-55";
-function EM({ children: e, onPress: t, busy: n = !1 }) {
+var CM = "h-7.5 cursor-pointer rounded-full border border-(--glass-low) bg-transparent px-3 text-body-2-regular leading-none whitespace-nowrap text-inherit outline-none hover:border-(--glass-rim) hover:bg-(--glass-pick-fill) focus-visible:ring-2 focus-visible:ring-border-focus-ring aria-busy:cursor-wait aria-busy:opacity-55";
+function wM({ children: e, onPress: t, busy: n = !1 }) {
return /* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
- className: TM,
+ className: CM,
"aria-busy": n || void 0,
"aria-disabled": n || void 0,
onClick: () => {
@@ -35240,29 +35240,29 @@ function EM({ children: e, onPress: t, busy: n = !1 }) {
}
//#endregion
//#region src/react/duplicates/duplicates-page.tsx
-var DM = cT("play"), OM = cT("file-stack"), kM = _w({
+var TM = oT("play"), EM = oT("file-stack"), DM = gw({
padding: "none",
radius: "surface",
className: "mb-6 overflow-hidden dark:bg-background-primary-default"
-}), AM = "rounded-sm px-1.5 py-px text-caption-1-regular leading-5", jM = "rounded-sm px-2 py-0.5 text-caption-1-regular leading-5", MM = "font-mono text-caption-1-regular leading-5 text-text-secondary", NM = () => {
+}), OM = "rounded-sm px-1.5 py-px text-caption-1-regular leading-5", kM = "rounded-sm px-2 py-0.5 text-caption-1-regular leading-5", AM = "font-mono text-caption-1-regular leading-5 text-text-secondary", jM = () => {
X.invalidateQueries({
- queryKey: IT,
+ queryKey: PT,
exact: !0
}), X.invalidateQueries({
- queryKey: AD,
+ queryKey: OD,
exact: !0
});
};
-function PM(e) {
+function MM(e) {
return e.identical ? /* @__PURE__ */ (0, L.jsx)("span", {
- className: `${jM} text-(--keep)`,
+ className: `${kM} text-(--keep)`,
children: "sha1 一致"
}) : /* @__PURE__ */ (0, L.jsx)("span", {
- className: `${jM} text-text-secondary`,
+ className: `${kM} text-text-secondary`,
children: e.evidence === "same_code_short_copy" ? "同番号短版本" : "时长推断"
});
}
-function FM({ file: t, openItem: n }) {
+function NM({ file: t, openItem: n }) {
let r = () => n(t.id);
return /* @__PURE__ */ (0, L.jsxs)("div", {
className: "duplicate-row items-center gap-3 border-t border-separator-border px-5 py-4 max-compact:p-4",
@@ -35272,7 +35272,7 @@ function FM({ file: t, openItem: n }) {
onClick: r,
"aria-label": `预览 ${t.name}`,
className: "relative row-span-2 inline-grid aspect-16/10 w-full cursor-pointer place-items-center overflow-hidden rounded-2lg bg-background-tertiary-default text-text-secondary",
- children: [/* @__PURE__ */ (0, L.jsx)(DM, {
+ children: [/* @__PURE__ */ (0, L.jsx)(TM, {
"aria-hidden": !0,
className: "size-6"
}), /* @__PURE__ */ (0, L.jsx)("img", {
@@ -35296,55 +35296,55 @@ function FM({ file: t, openItem: n }) {
}), t.is_largest || t.is_longest ? /* @__PURE__ */ (0, L.jsxs)("span", {
className: "flex flex-none gap-1",
children: [t.is_largest ? /* @__PURE__ */ (0, L.jsx)("i", {
- className: `${AM} not-italic bg-background-primary-hover text-text-secondary`,
+ className: `${OM} not-italic bg-background-primary-hover text-text-secondary`,
children: "最大"
}) : null, t.is_longest ? /* @__PURE__ */ (0, L.jsx)("i", {
- className: `${AM} not-italic bg-(--keep)/22 text-(--keep)`,
+ className: `${OM} not-italic bg-(--keep)/22 text-(--keep)`,
children: "最长"
}) : null]
}) : null]
}),
/* @__PURE__ */ (0, L.jsxs)("span", {
- className: `${MM} flex min-w-0 items-center gap-1.5`,
- children: [/* @__PURE__ */ (0, L.jsx)(nj, { mark: m[t.location] || "database" }), /* @__PURE__ */ (0, L.jsx)("span", {
+ className: `${AM} flex min-w-0 items-center gap-1.5`,
+ children: [/* @__PURE__ */ (0, L.jsx)(ej, { mark: m[t.location] || "database" }), /* @__PURE__ */ (0, L.jsx)("span", {
className: "whitespace-nowrap",
children: e[t.location] || t.location || t.drive
})]
}),
/* @__PURE__ */ (0, L.jsx)("span", {
- className: MM,
+ className: AM,
children: a(t.size || 0)
}),
/* @__PURE__ */ (0, L.jsx)("span", {
- className: MM,
+ className: AM,
children: i(t.duration)
}),
/* @__PURE__ */ (0, L.jsx)("span", {
"data-middle-truncate": !0,
title: t.path ?? "",
- className: `${MM} col-start-2 -col-end-1 min-w-0 truncate pt-0.5 max-duplicate-narrow:col-span-full`,
+ className: `${AM} col-start-2 -col-end-1 min-w-0 truncate pt-0.5 max-duplicate-narrow:col-span-full`,
children: t.path ?? ""
})
]
});
}
-function IM({ openItem: t, toast: n, failure: r }) {
+function PM({ openItem: t, toast: n, failure: r }) {
let i = Ft({
- queryKey: IT,
- queryFn: ({ signal: e }) => RT(e)
+ queryKey: PT,
+ queryFn: ({ signal: e }) => IT(e)
}), o = Ft({
- queryKey: AT,
- queryFn: ({ signal: e }) => jT(e)
+ queryKey: OT,
+ queryFn: ({ signal: e }) => kT(e)
}), [s, c] = (0, I.useState)(""), l = It({
- mutationFn: (e) => KT(e, "dispose"),
+ mutationFn: (e) => WT(e, "dispose"),
onSuccess: (e, t) => {
- NM(), n(`已把 ${t.length} 项移入回收站`, { undo: async () => {
+ jM(), n(`已把 ${t.length} 项移入回收站`, { undo: async () => {
try {
- await KT(t, "restore");
+ await WT(t, "restore");
} catch (e) {
r("撤销移入回收站", e);
} finally {
- NM();
+ jM();
}
} });
},
@@ -35358,12 +35358,12 @@ function IM({ openItem: t, toast: n, failure: r }) {
children: i.error ? K(i.error) : "未取得重复文件列表,请刷新页面重试。"
})
});
- let d = u.groups ?? [], f = PT(o.data), p = ({ groups: e, keep: t, key: n }) => {
+ let d = u.groups ?? [], f = MT(o.data), p = ({ groups: e, keep: t, key: n }) => {
if (l.isPending) return;
- let r = WT(e, t);
+ let r = HT(e, t);
r.length && g({
title: "移入回收站",
- body: `将把 ${r.length} 个重复文件的馆藏记录移入回收站,每组保留${BT[t] ?? BT.largest}。文件共 ${a(GT(e, r))},记录可从回收站还原。`,
+ body: `将把 ${r.length} 个重复文件的馆藏记录移入回收站,每组保留${RT[t] ?? RT.largest}。文件共 ${a(UT(e, r))},记录可从回收站还原。`,
confirmLabel: "移入回收站",
onConfirm: () => (c(n), l.mutateAsync(r))
});
@@ -35371,15 +35371,15 @@ function IM({ openItem: t, toast: n, failure: r }) {
return /* @__PURE__ */ (0, L.jsxs)("div", {
className: "mx-auto w-full max-w-board pb-10.5",
children: [
- /* @__PURE__ */ (0, L.jsx)(yM, {
+ /* @__PURE__ */ (0, L.jsx)(_M, {
label: "重复内容",
figure: `${Number(u.total || 0).toLocaleString()} 组`,
detail: `${u.files} 个文件 · 可回收 ${a(u.reclaimable)}`
}),
- d.length ? /* @__PURE__ */ (0, L.jsxs)(xM, {
+ d.length ? /* @__PURE__ */ (0, L.jsxs)(yM, {
title: "批量保留",
children: [
- /* @__PURE__ */ (0, L.jsx)(EM, {
+ /* @__PURE__ */ (0, L.jsx)(wM, {
busy: s === "all:largest",
onPress: () => p({
groups: d,
@@ -35388,7 +35388,7 @@ function IM({ openItem: t, toast: n, failure: r }) {
}),
children: "全部保留最大"
}),
- /* @__PURE__ */ (0, L.jsx)(EM, {
+ /* @__PURE__ */ (0, L.jsx)(wM, {
busy: s === "all:longest",
onPress: () => p({
groups: d,
@@ -35397,7 +35397,7 @@ function IM({ openItem: t, toast: n, failure: r }) {
}),
children: "全部保留最长"
}),
- UT(d, f).map((t) => /* @__PURE__ */ (0, L.jsx)(EM, {
+ VT(d, f).map((t) => /* @__PURE__ */ (0, L.jsx)(wM, {
busy: s === `all:${t}`,
onPress: () => p({
groups: d,
@@ -35420,7 +35420,7 @@ function IM({ openItem: t, toast: n, failure: r }) {
let i = [n], o = (e) => `${r}:${e}`;
return /* @__PURE__ */ (0, L.jsxs)("section", {
"aria-label": n.code,
- className: kM,
+ className: DM,
children: [/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-wrap items-center gap-3 bg-background-tertiary-default p-5 max-compact:p-4 dark:bg-background-secondary-default",
children: [
@@ -35432,9 +35432,9 @@ function IM({ openItem: t, toast: n, failure: r }) {
className: "font-mono text-caption-1-regular leading-5 text-text-primary",
children: `${n.count} 个 · 可回收 ${a(n.reclaimable)}`
}),
- PM(n),
+ MM(n),
n.cross_drive ? /* @__PURE__ */ (0, L.jsx)("span", {
- className: `${jM} text-text-secondary`,
+ className: `${kM} text-text-secondary`,
children: `跨盘 ${n.drives.join(" ")}`
}) : null,
/* @__PURE__ */ (0, L.jsxs)("span", {
@@ -35462,7 +35462,7 @@ function IM({ openItem: t, toast: n, failure: r }) {
}),
children: "留最长"
}),
- HT(n.files, f).map((t) => /* @__PURE__ */ (0, L.jsx)(G, {
+ BT(n.files, f).map((t) => /* @__PURE__ */ (0, L.jsx)(G, {
variant: "secondary",
size: "small",
...m(o(t)),
@@ -35487,13 +35487,13 @@ function IM({ openItem: t, toast: n, failure: r }) {
]
})
]
- }), /* @__PURE__ */ (0, L.jsx)("div", { children: n.files.map((e) => /* @__PURE__ */ (0, L.jsx)(FM, {
+ }), /* @__PURE__ */ (0, L.jsx)("div", { children: n.files.map((e) => /* @__PURE__ */ (0, L.jsx)(NM, {
file: e,
openItem: t
}, e.id)) })]
}, `${n.code}-${r}`);
- }) : /* @__PURE__ */ (0, L.jsx)(vw, {
- icon: OM,
+ }) : /* @__PURE__ */ (0, L.jsx)(_w, {
+ icon: EM,
title: "没有找到重复文件",
children: "所有来源之间没有检测到内容相同的文件。扫描新来源后,这里会自动更新。"
})
@@ -35502,43 +35502,43 @@ function IM({ openItem: t, toast: n, failure: r }) {
}
//#endregion
//#region src/react/follow/online-vocab.ts
-var LM = "/api/follow/authors", RM = "/api/follow/tags", zM = (e) => [
+var FM = "/api/follow/authors", IM = "/api/follow/tags", LM = (e) => [
"follow",
"authors",
e
-], BM = (e, t) => [
+], RM = (e, t) => [
"follow",
"tags",
e,
t
];
-function VM(e, t, n) {
+function zM(e, t, n) {
let r = new URLSearchParams({
limit: String(t),
offset: String(n)
});
- return e && r.set("q", e), `${LM}?${r}`;
+ return e && r.set("q", e), `${FM}?${r}`;
}
-function HM(e, t, n, r) {
+function BM(e, t, n, r) {
let i = new URLSearchParams({
types: "all",
limit: String(n),
offset: String(r)
});
- return t && t !== "all" && i.set("type", t), e && i.set("q", e), `${RM}?${i}`;
+ return t && t !== "all" && i.set("type", t), e && i.set("q", e), `${IM}?${i}`;
}
-var UM = (e, t, n, r) => gw(VM(e, t, n), r), WM = (e, t, n, r, i) => gw(HM(e, t, n, r), i), GM = "/api/index", KM = {
+var VM = (e, t, n, r) => hw(zM(e, t, n), r), HM = (e, t, n, r, i) => hw(BM(e, t, n, r), i), UM = "/api/index", WM = {
performers: "艺人",
creators: "创作者",
studios: "厂牌",
agencies: "事务所",
tags: "标签"
-}, qM = {
+}, GM = {
performers: "performer",
creators: "creator",
studios: "studio",
agencies: "agency"
-}, JM = [
+}, KM = [
["all", "全部"],
["meta", "影片属性"],
["relationship", "人物关系"],
@@ -35548,26 +35548,26 @@ var UM = (e, t, n, r) => gw(VM(e, t, n), r), WM = (e, t, n, r, i) => gw(HM(e, t,
["story", "故事剧情"],
["position", "性交体位"],
["general", "其他内容"]
-], YM = [
+], qM = [
["all", "全部"],
["general", "通用"],
["artist", "创作者"],
["character", "角色"],
["copyright", "作品"],
["metadata", "元数据"]
-], XM = {
+], JM = {
people: 120,
tags: 180
-}, ZM = (e) => e !== "tags", QM = (e) => e === "studios" || e === "agencies";
-function $M(e) {
- let t = e.kind === "tags" || e.kind === "performers" ? e.scope : "local", n = (t === "online" ? YM : JM).some(([t]) => t === e.category);
+}, YM = (e) => e !== "tags", XM = (e) => e === "studios" || e === "agencies";
+function ZM(e) {
+ let t = e.kind === "tags" || e.kind === "performers" ? e.scope : "local", n = (t === "online" ? qM : KM).some(([t]) => t === e.category);
return {
...e,
scope: t,
category: e.kind === "tags" && n ? e.category : "all"
};
}
-function eN(e) {
+function QM(e) {
let { kind: t, q: n, scope: r, category: i } = e;
return t === "tags" ? r === "online" ? {
what: "online-tags",
@@ -35586,50 +35586,50 @@ function eN(e) {
q: n
};
}
-var tN = (e, t, n = "all") => [
+var $M = (e, t, n = "all") => [
"index",
e,
t,
...e === "tags" ? [n] : []
];
-function nN(e, t, n, r, i) {
+function eN(e, t, n, r, i) {
let a = new URLSearchParams({
kind: e,
limit: String(r),
offset: String(i)
});
- return t && a.set("q", t), e === "tags" && n !== "all" && a.set("category", n), `${GM}?${a}`;
+ return t && a.set("q", t), e === "tags" && n !== "all" && a.set("category", n), `${UM}?${a}`;
}
-function rN(e) {
- let t = e.what === "people" || e.what === "online-authors" ? XM.people : XM.tags, n = {
+function tN(e) {
+ let t = e.what === "people" || e.what === "online-authors" ? JM.people : JM.tags, n = {
initialPageParam: 0,
getNextPageParam: (e, t) => e.has_more ? t.reduce((e, t) => e + t.items.length, 0) : void 0
};
switch (e.what) {
case "people": return {
...n,
- queryKey: tN(e.kind, e.q),
- queryFn: ({ pageParam: n, signal: r }) => gw(nN(e.kind, e.q, "all", t, n), r)
+ queryKey: $M(e.kind, e.q),
+ queryFn: ({ pageParam: n, signal: r }) => hw(eN(e.kind, e.q, "all", t, n), r)
};
case "tags": return {
...n,
- queryKey: tN("tags", e.q, e.category),
- queryFn: ({ pageParam: n, signal: r }) => gw(nN("tags", e.q, e.category, t, n), r)
+ queryKey: $M("tags", e.q, e.category),
+ queryFn: ({ pageParam: n, signal: r }) => hw(eN("tags", e.q, e.category, t, n), r)
};
case "online-authors": return {
...n,
- queryKey: zM(e.q),
- queryFn: ({ pageParam: n, signal: r }) => UM(e.q, t, n, r)
+ queryKey: LM(e.q),
+ queryFn: ({ pageParam: n, signal: r }) => VM(e.q, t, n, r)
};
case "online-tags": return {
...n,
- queryKey: BM(e.q, e.category),
- queryFn: ({ pageParam: n, signal: r }) => WM(e.q, e.category, t, n, r)
+ queryKey: RM(e.q, e.category),
+ queryFn: ({ pageParam: n, signal: r }) => HM(e.q, e.category, t, n, r)
};
}
}
-async function iN(e, t) {
- let n = rN(eN($M(e)));
+async function nN(e, t) {
+ let n = tN(QM(ZM(e)));
X.removeQueries({
queryKey: n.queryKey,
exact: !0
@@ -35643,13 +35643,13 @@ async function iN(e, t) {
getNextPageParam: n.getNextPageParam
});
}
-var aN = (e) => e ? e.pages.flatMap((e) => e.items) : [], oN = (e, t) => `${e}${t ? "+" : ""} 项`, sN = (e, t) => e ? `r34-${t || "unknown"}` : t || "general", cN = (e, t) => e === "agencies" ? `${(t.members || 0).toLocaleString()} 人` : t.n.toLocaleString(), lN = {
+var rN = (e) => e ? e.pages.flatMap((e) => e.items) : [], iN = (e, t) => `${e}${t ? "+" : ""} 项`, aN = (e, t) => e ? `r34-${t || "unknown"}` : t || "general", oN = (e, t) => e === "agencies" ? `${(t.members || 0).toLocaleString()} 人` : t.n.toLocaleString(), sN = {
numeric: !0,
sensitivity: "base"
};
-function uN(e, t) {
+function cN(e, t) {
let n = /* @__PURE__ */ new Map();
- for (let r of [...e].sort((e, t) => e.k.localeCompare(t.k, "zh-CN", lN))) {
+ for (let r of [...e].sort((e, t) => e.k.localeCompare(t.k, "zh-CN", sN))) {
let e = t(r.k).normalize("NFKC").trim().charAt(0).toUpperCase(), i = /[A-Z]/.test(e) ? e : /[0-9]/.test(e) ? "#" : /[㐀-鿿]/.test(e) ? "中文" : "其他", a = n.get(i);
a ? a.push(r) : n.set(i, [r]);
}
@@ -35657,7 +35657,7 @@ function uN(e, t) {
}
//#endregion
//#region src/react/index/index-people.tsx
-function dN({ html: e, face: t, company: n, big: r }) {
+function lN({ html: e, face: t, company: n, big: r }) {
let i = (0, I.useRef)(null);
return (0, I.useLayoutEffect)(() => {
t ? i.current?.style.setProperty("--face", t) : i.current?.style.removeProperty("--face");
@@ -35669,18 +35669,18 @@ function dN({ html: e, face: t, company: n, big: r }) {
dangerouslySetInnerHTML: { __html: e }
});
}
-var fN = "flex cursor-pointer flex-col gap-2 p-3 text-inherit";
-function pN({ name: e, readout: t, big: n, children: r, onPress: i, ...a }) {
+var uN = "flex cursor-pointer flex-col gap-2 p-3 text-inherit";
+function dN({ name: e, readout: t, big: n, children: r, onPress: i, ...a }) {
return /* @__PURE__ */ (0, L.jsxs)("button", {
type: "button",
...a,
"data-index-cell": "",
onClick: i,
- className: _w({
+ className: gw({
radius: "plain",
padding: "none",
interactive: !0,
- className: `${fN} ${n ? "items-stretch text-left" : "items-center text-center"}`
+ className: `${uN} ${n ? "items-stretch text-left" : "items-center text-center"}`
}),
children: [
r,
@@ -35697,8 +35697,8 @@ function pN({ name: e, readout: t, big: n, children: r, onPress: i, ...a }) {
]
});
}
-function mN({ kind: e, items: t, layout: n, props: r }) {
- let i = qM[e], a = QM(e), o = n === "big";
+function fN({ kind: e, items: t, layout: n, props: r }) {
+ let i = GM[e], a = XM(e), o = n === "big";
return /* @__PURE__ */ (0, L.jsx)("div", {
"data-index-grid": "",
"data-layout": n,
@@ -35706,14 +35706,14 @@ function mN({ kind: e, items: t, layout: n, props: r }) {
className: `${a ? "index-grid-company" : "index-grid-person"} gap-3`,
children: t.map((t) => {
let n = r.personAvatar(t, i, o);
- return /* @__PURE__ */ (0, L.jsx)(pN, {
+ return /* @__PURE__ */ (0, L.jsx)(dN, {
"data-k": t.k,
"data-kind": i,
name: t.k,
- readout: cN(e, t),
+ readout: oN(e, t),
big: o,
onPress: () => r.openEntity(i, t.k),
- children: /* @__PURE__ */ (0, L.jsx)(dN, {
+ children: /* @__PURE__ */ (0, L.jsx)(lN, {
html: n.html,
face: n.face,
company: a,
@@ -35723,21 +35723,21 @@ function mN({ kind: e, items: t, layout: n, props: r }) {
})
});
}
-function hN({ items: e, layout: t, props: n }) {
+function pN({ items: e, layout: t, props: n }) {
let r = t === "big";
return /* @__PURE__ */ (0, L.jsx)("div", {
"data-index-grid": "",
"data-layout": t,
"data-cells": "people",
className: "index-grid-person gap-3",
- children: e.map((e) => /* @__PURE__ */ (0, L.jsx)(pN, {
+ children: e.map((e) => /* @__PURE__ */ (0, L.jsx)(dN, {
"data-follow-author": e.key,
"data-kind": "performer",
name: e.k,
readout: `${e.n.toLocaleString()} 项更新`,
big: r,
onPress: () => n.openFollowAuthor(e.key),
- children: /* @__PURE__ */ (0, L.jsx)(dN, {
+ children: /* @__PURE__ */ (0, L.jsx)(lN, {
html: n.authorAvatar(e),
company: !1,
big: r
@@ -35747,7 +35747,7 @@ function hN({ items: e, layout: t, props: n }) {
}
//#endregion
//#region src/board-controls.ts
-function gN(e) {
+function mN(e) {
let t = Number(e.min) || 0, n = Number(e.max) || 100, r = Number(e.value), i = n > t ? Math.max(0, Math.min(100, (r - t) / (n - t) * 100)) : 0;
e.style.setProperty("--board-range-value", `${i}%`);
let a = e.closest(".dual-range");
@@ -35759,8 +35759,8 @@ function gN(e) {
}
//#endregion
//#region src/react/photo-lightbox/photo-lightbox.ts
-var _N = "/vendor/swiper/14.2.0/", vN = null, yN = () => vN ??= Promise.all([new Promise((e, t) => {
- let n = `${_N}swiper-bundle.min.css`, r = document.querySelector(`link[href="${n}"]`);
+var hN = "/vendor/swiper/14.2.0/", gN = null, _N = () => gN ??= Promise.all([new Promise((e, t) => {
+ let n = `${hN}swiper-bundle.min.css`, r = document.querySelector(`link[href="${n}"]`);
if (r?.sheet) {
e();
return;
@@ -35774,11 +35774,11 @@ var _N = "/vendor/swiper/14.2.0/", vN = null, yN = () => vN ??= Promise.all([new
return;
}
let r = document.createElement("script");
- r.src = `${_N}swiper-bundle.min.js`, r.onload = () => e(window.Swiper), r.onerror = () => t(/* @__PURE__ */ Error("swiper unavailable")), document.head.append(r);
+ r.src = `${hN}swiper-bundle.min.js`, r.onload = () => e(window.Swiper), r.onerror = () => t(/* @__PURE__ */ Error("swiper unavailable")), document.head.append(r);
})]).then(([, e]) => e).catch((e) => {
- throw vN = null, e;
+ throw gN = null, e;
});
-function bN(e, t, n) {
+function vN(e, t, n) {
let r = "fit", i = () => t.slides?.[t.activeIndex]?.querySelector("img"), a = () => {
let e = i();
return !e?.naturalWidth || !e.naturalHeight ? 100 : Math.min(100, e.offsetWidth / e.naturalWidth * 100, e.offsetHeight / e.naturalHeight * 100);
@@ -35799,48 +35799,48 @@ function bN(e, t, n) {
}
};
}
-var xN = (e) => {
+var yN = (e) => {
let t = Number(e) || 0;
return t ? (t < 1048576 ? `${Math.max(1, Math.round(t / 1024))} KB` : a(t)).replace(" ", "\xA0") : "大小未知";
-}, SN = (e) => e.asset?.name || e.name || "未命名图片";
-function CN(t, n) {
+}, bN = (e) => e.asset?.name || e.name || "未命名图片";
+function xN(t, n) {
let r = t.asset;
- if (r) return [e[r.location ?? ""] || r.location || "来源未知", xN(r.size)].join(" · ");
+ if (r) return [e[r.location ?? ""] || r.location || "来源未知", yN(r.size)].join(" · ");
let i = (t.total ?? 0) > 1 ? `第 ${t.position} / ${t.total} 张` : "", a = n?.[0] && n[1] ? `${n[0]} × ${n[1]}` : "";
return [
t.source || "在线图片",
i,
a,
- t.size ? xN(t.size) : ""
+ t.size ? yN(t.size) : ""
].filter(Boolean).join(" · ");
}
//#endregion
//#region src/react/photo-lightbox/photo-lightbox-dialog.tsx
-var wN = null, TN = null, EN = 0;
-function DN() {
- return (!TN || !wN?.isConnected) && (TN?.unmount(), wN = document.createElement("div"), wN.className = "peach-react", wN.dataset.photoLightboxHost = "", document.body.append(wN), TN = (0, US.createRoot)(wN)), TN;
+var SN = null, CN = null, wN = 0;
+function TN() {
+ return (!CN || !SN?.isConnected) && (CN?.unmount(), SN = document.createElement("div"), SN.className = "peach-react", SN.dataset.photoLightboxHost = "", document.body.append(SN), CN = (0, HS.createRoot)(SN)), CN;
}
-async function ON(e, t, n) {
+async function EN(e, t, n) {
if (!t.length || e < 0 || e >= t.length) return;
let r;
try {
- r = await yN();
+ r = await _N();
} catch {
window.open(t[e].src, "_blank", "noopener");
return;
}
- let i = DN();
- (0, Yh.flushSync)(() => i.render(/* @__PURE__ */ (0, L.jsx)(AN, {
+ let i = TN();
+ (0, Yh.flushSync)(() => i.render(/* @__PURE__ */ (0, L.jsx)(ON, {
slides: t,
index: e,
Swiper: r,
host: n ?? null
- }, ++EN)));
+ }, ++wN)));
}
-function kN() {
- TN && (0, Yh.flushSync)(() => TN.render(null));
+function DN() {
+ CN && (0, Yh.flushSync)(() => CN.render(null));
}
-function AN({ slides: e, index: t, Swiper: n, host: r }) {
+function ON({ slides: e, index: t, Swiper: n, host: r }) {
let i = e.length > 1, a = (0, I.useId)(), o = (0, I.useRef)(null), c = (0, I.useRef)(null), l = (0, I.useRef)(null), u = (0, I.useRef)(null), d = (0, I.useRef)(null), f = (0, I.useRef)(null), p = (0, I.useRef)(null), m = (0, I.useRef)(null), h = (0, I.useRef)(null), g = (0, I.useRef)(null), _ = (0, I.useRef)(null), [v, y] = (0, I.useState)(t), [b, x] = (0, I.useState)(100), [S, C] = (0, I.useState)({}), [w, T] = (0, I.useState)(() => /* @__PURE__ */ new Set()), [E, O] = (0, I.useState)(!1), [j, M] = (0, I.useState)({
at: t,
text: ""
@@ -35883,7 +35883,7 @@ function AN({ slides: e, index: t, Swiper: n, host: r }) {
y(this.activeIndex), i(this.activeIndex);
} }
});
- i(t, 0), g.current = bN(e, a, x);
+ i(t, 0), g.current = vN(e, a, x);
let s = A(e, p.current, m.current), h = (e = !1) => {
s.hide(), p.current?.setAttribute("aria-expanded", "false"), e && p.current && document.contains(p.current) && p.current.focus();
};
@@ -35900,13 +35900,13 @@ function AN({ slides: e, index: t, Swiper: n, host: r }) {
});
v.observe(e);
let b = (e) => {
- e.key === "Escape" && (e.preventDefault(), e.stopImmediatePropagation(), _.current?.isOpen() ? _.current.dismiss(!0) : kN());
+ e.key === "Escape" && (e.preventDefault(), e.stopImmediatePropagation(), _.current?.isOpen() ? _.current.dismiss(!0) : DN());
};
return document.addEventListener("keydown", b, !0), () => {
document.removeEventListener("keydown", b, !0), h(), v.disconnect(), a.destroy(!0, !0), r.destroy(!0, !0), g.current = null, _.current = null, e.close(), document.body.classList.remove("photolight-open");
};
}, []), (0, I.useLayoutEffect)(() => {
- h.current && gN(h.current);
+ h.current && mN(h.current);
}, [b]);
let N = e[v], ee = N.asset ?? null, te = async (e) => {
if (!ee || !r || e.getAttribute("aria-busy") === "true") return;
@@ -35937,18 +35937,18 @@ function AN({ slides: e, index: t, Swiper: n, host: r }) {
"data-photo-lightbox": "",
"data-has-strip": i ? "" : void 0,
onCancel: (e) => {
- e.preventDefault(), kN();
+ e.preventDefault(), DN();
},
onClick: (e) => {
let t = e.target;
- _.current?.dismissOutside(t) || (t === o.current || t.classList.contains("swiper-zoom-container")) && kN();
+ _.current?.dismissOutside(t) || (t === o.current || t.classList.contains("swiper-zoom-container")) && DN();
},
children: [
/* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
"data-photo-close": "",
"aria-label": "关闭",
- onClick: kN,
+ onClick: DN,
dangerouslySetInnerHTML: { __html: s("x") }
}),
/* @__PURE__ */ (0, L.jsxs)("div", {
@@ -36081,10 +36081,10 @@ function AN({ slides: e, index: t, Swiper: n, host: r }) {
id: `${a}-title`,
"data-middle-truncate": "",
tabIndex: -1,
- children: SN(N)
+ children: bN(N)
}, v), /* @__PURE__ */ (0, L.jsx)("span", {
"data-photo-detail-meta": "",
- children: CN(N, S[v])
+ children: xN(N, S[v])
})]
}),
/* @__PURE__ */ (0, L.jsx)("button", {
@@ -36123,33 +36123,33 @@ function AN({ slides: e, index: t, Swiper: n, host: r }) {
}
//#endregion
//#region src/react/entity-body/entity-body-page.tsx
-function jN(e) {
- return e.view === "people" && e.roster ? /* @__PURE__ */ (0, L.jsx)(MN, {
+function kN(e) {
+ return e.view === "people" && e.roster ? /* @__PURE__ */ (0, L.jsx)(AN, {
roster: e.roster,
props: e
- }) : e.view === "videos" ? /* @__PURE__ */ (0, L.jsx)(NN, { ...e }, e.revision) : e.view === "photos" && e.photos ? /* @__PURE__ */ (0, L.jsx)(zN, {
+ }) : e.view === "videos" ? /* @__PURE__ */ (0, L.jsx)(jN, { ...e }, e.revision) : e.view === "photos" && e.photos ? /* @__PURE__ */ (0, L.jsx)(LN, {
photos: e.photos,
props: e
}, e.photos.revision) : null;
}
-function MN({ roster: e, props: t }) {
+function AN({ roster: e, props: t }) {
let { helpers: n, actions: r } = t, i = (0, I.useMemo)(() => ({
personAvatar: n.personAvatar,
openEntity: r.openEntity
}), [n, r]);
- return /* @__PURE__ */ (0, L.jsx)(mN, {
+ return /* @__PURE__ */ (0, L.jsx)(fN, {
kind: e.kind,
items: e.people,
layout: e.layout,
props: i
});
}
-function NN(e) {
- let t = Hw(!e.items, e.skeletonHtml);
+function jN(e) {
+ let t = Vw(!e.items, e.skeletonHtml);
return /* @__PURE__ */ (0, L.jsxs)("div", {
"data-entity-grid": "",
"data-grid-reveal": t.fading ? "" : void 0,
- children: [t.layer, e.items ? /* @__PURE__ */ (0, L.jsx)(bT, {
+ children: [t.layer, e.items ? /* @__PURE__ */ (0, L.jsx)(vT, {
mode: "entity",
entityKey: `${e.kind}:${e.name}`,
revision: e.revision,
@@ -36169,16 +36169,16 @@ function NN(e) {
}) : null]
});
}
-var PN = (e) => Array.from({ length: e.n }, (t, n) => ({
+var MN = (e) => Array.from({ length: e.n }, (t, n) => ({
sample: !0,
code: e.code,
position: n + 1,
total: e.n,
name: `${e.code} 样张 ${n + 1}`,
source: e.site_label || "官方样张"
-})), FN = (e) => e.sample === !0, IN = (e) => `code=${encodeURIComponent(e.code)}&n=${e.position}`, LN = (e) => FN(e) ? `/sample-thumb?${IN(e)}` : `/photo-thumb?id=${e.id}`, RN = (e) => FN(e) ? {
- src: `/sample-image?${IN(e)}`,
- thumb: LN(e),
+})), NN = (e) => e.sample === !0, PN = (e) => `code=${encodeURIComponent(e.code)}&n=${e.position}`, FN = (e) => NN(e) ? `/sample-thumb?${PN(e)}` : `/photo-thumb?id=${e.id}`, IN = (e) => NN(e) ? {
+ src: `/sample-image?${PN(e)}`,
+ thumb: FN(e),
name: e.name,
asset: null,
source: e.source,
@@ -36186,18 +36186,18 @@ var PN = (e) => Array.from({ length: e.n }, (t, n) => ({
total: e.total
} : {
src: `/photo?id=${e.id}`,
- thumb: LN(e),
+ thumb: FN(e),
name: e.name || "",
asset: e
};
-function zN({ photos: e, props: t }) {
- let { photoSize: n, photoLayout: r, actions: i, canLoadMore: a } = t, o = (0, I.useMemo)(() => [...e.codeSets.flatMap(PN), ...e.items], [e]), [s, c] = (0, I.useState)(() => /* @__PURE__ */ new Set()), l = (0, I.useCallback)((e) => c((t) => {
+function LN({ photos: e, props: t }) {
+ let { photoSize: n, photoLayout: r, actions: i, canLoadMore: a } = t, o = (0, I.useMemo)(() => [...e.codeSets.flatMap(MN), ...e.items], [e]), [s, c] = (0, I.useState)(() => /* @__PURE__ */ new Set()), l = (0, I.useCallback)((e) => c((t) => {
if (t.has(e)) return t;
let n = new Set(t);
return n.add(e), n;
}), []), u = (0, I.useCallback)((e) => {
- ON(e, o.map(RN), { revealSource: i.revealSource });
- }, [i, o]), d = (e, t) => /* @__PURE__ */ (0, L.jsx)(VN, {
+ EN(e, o.map(IN), { revealSource: i.revealSource });
+ }, [i, o]), d = (e, t) => /* @__PURE__ */ (0, L.jsx)(zN, {
item: e,
index: t,
lost: s.has(t),
@@ -36215,7 +36215,7 @@ function zN({ photos: e, props: t }) {
};
}), h = p;
return /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [
- m.map(({ set: e, from: t }) => /* @__PURE__ */ (0, L.jsxs)(I.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(BN, {
+ m.map(({ set: e, from: t }) => /* @__PURE__ */ (0, L.jsxs)(I.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(RN, {
label: e.code,
title: e.name,
meta: [
@@ -36227,7 +36227,7 @@ function zN({ photos: e, props: t }) {
...f,
children: o.slice(t, t + e.n).map((e, n) => d(e, t + n))
})] }, e.code)),
- m.length && e.total ? /* @__PURE__ */ (0, L.jsx)(BN, {
+ m.length && e.total ? /* @__PURE__ */ (0, L.jsx)(RN, {
label: "本地图片",
meta: `${e.total.toLocaleString()} 张`
}) : null,
@@ -36236,14 +36236,14 @@ function zN({ photos: e, props: t }) {
"data-local-wall": "",
children: e.items.map((e, t) => s.has(h + t) ? null : d(e, h + t))
}),
- e.hasMore ? /* @__PURE__ */ (0, L.jsx)(wT, {
+ e.hasMore ? /* @__PURE__ */ (0, L.jsx)(ST, {
entity: !0,
load: i.loadMorePhotos,
enabled: () => a?.() !== !1
}, e.items.length) : null
] });
}
-function BN({ label: e, title: t, meta: n }) {
+function RN({ label: e, title: t, meta: n }) {
return /* @__PURE__ */ (0, L.jsxs)("div", {
"data-photo-group": "",
children: [
@@ -36260,7 +36260,7 @@ function BN({ label: e, title: t, meta: n }) {
]
});
}
-function VN({ item: e, index: t, lost: n, onLose: r, onOpen: i }) {
+function zN({ item: e, index: t, lost: n, onLose: r, onOpen: i }) {
let a = e.name ?? "";
return /* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
@@ -36269,7 +36269,7 @@ function VN({ item: e, index: t, lost: n, onLose: r, onOpen: i }) {
title: a,
onClick: () => i(t),
children: n ? null : /* @__PURE__ */ (0, L.jsx)("img", {
- src: LN(e),
+ src: FN(e),
alt: a,
loading: "lazy",
decoding: "async",
@@ -36280,24 +36280,24 @@ function VN({ item: e, index: t, lost: n, onLose: r, onOpen: i }) {
}
//#endregion
//#region src/react/components/segmented.tsx
-function HN(e) {
- let t = SA("selection");
- return /* @__PURE__ */ (0, L.jsx)(yA, {
+function BN(e) {
+ let t = bA("selection");
+ return /* @__PURE__ */ (0, L.jsx)(_A, {
...e,
ref: t
});
}
-function UN(e) {
- let t = SA("selection");
- return /* @__PURE__ */ (0, L.jsx)(Uk, {
+function VN(e) {
+ let t = bA("selection");
+ return /* @__PURE__ */ (0, L.jsx)(Vk, {
...e,
ref: t
});
}
-var WN = "inline-flex w-max max-w-full items-center gap-0.5 overflow-x-auto overscroll-x-contain rounded-2lg bg-background-tertiary-default p-1", GN = "flex min-h-7 flex-none cursor-pointer items-center gap-1.5 rounded-md px-2.5 py-1 text-body-medium whitespace-nowrap text-text-secondary outline-none transition-colors hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring data-focus-visible:ring-2 data-focus-visible:ring-border-focus-ring data-selected:bg-background-primary-default data-selected:text-text-primary data-selected:shadow-card dark:data-selected:bg-background-primary-hover", KN = "flex size-7 flex-none cursor-pointer items-center justify-center rounded-md text-text-secondary outline-none transition-colors hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring data-focus-visible:ring-2 data-focus-visible:ring-border-focus-ring data-selected:bg-background-primary-default data-selected:text-text-primary data-selected:shadow-card dark:data-selected:bg-background-primary-hover", qN = "inline-flex w-max max-w-full flex-none items-center gap-0.5 rounded-lg", JN = "flex size-7.5 flex-none cursor-pointer items-center justify-center rounded-lg text-(--glass-text)/62 outline-none transition-colors hover:text-(--glass-text) focus-visible:ring-2 focus-visible:ring-border-focus-ring data-selected:text-(--glass-text)";
+var HN = "inline-flex w-max max-w-full items-center gap-0.5 overflow-x-auto overscroll-x-contain rounded-2lg bg-background-tertiary-default p-1", UN = "flex min-h-7 flex-none cursor-pointer items-center gap-1.5 rounded-md px-2.5 py-1 text-body-medium whitespace-nowrap text-text-secondary outline-none transition-colors hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring data-focus-visible:ring-2 data-focus-visible:ring-border-focus-ring data-selected:bg-background-primary-default data-selected:text-text-primary data-selected:shadow-card dark:data-selected:bg-background-primary-hover", WN = "flex size-7 flex-none cursor-pointer items-center justify-center rounded-md text-text-secondary outline-none transition-colors hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring data-focus-visible:ring-2 data-focus-visible:ring-border-focus-ring data-selected:bg-background-primary-default data-selected:text-text-primary data-selected:shadow-card dark:data-selected:bg-background-primary-hover", GN = "inline-flex w-max max-w-full flex-none items-center gap-0.5 rounded-lg", KN = "flex size-7.5 flex-none cursor-pointer items-center justify-center rounded-lg text-(--glass-text)/62 outline-none transition-colors hover:text-(--glass-text) focus-visible:ring-2 focus-visible:ring-border-focus-ring data-selected:text-(--glass-text)";
//#endregion
//#region src/react/components/use-view-glide.ts
-function YN(e, t) {
+function qN(e, t) {
if (!t.contains(e)) return null;
let n = 0, r = 0;
for (let i = e; i && i !== t; i = i.offsetParent) n += i.offsetLeft, r += i.offsetTop;
@@ -36313,11 +36313,11 @@ function YN(e, t) {
h: e.offsetHeight
};
}
-function XN(e, t, n, r) {
+function JN(e, t, n, r) {
let i = (0, I.useRef)(null), a = (0, I.useCallback)((r, a) => {
let o = e.current, s = t.current, c = o?.parentElement;
if (!o) return;
- let l = s && s.offsetWidth ? r ?? s.querySelector(n) : null, u = l && c ? YN(l, c) : null;
+ let l = s && s.offsetWidth ? r ?? s.querySelector(n) : null, u = l && c ? qN(l, c) : null;
if (!u || !u.w) {
o.hidden = !0;
return;
@@ -36355,19 +36355,19 @@ function XN(e, t, n, r) {
}
//#endregion
//#region src/react/entity-filter/entity-filter.ts
-var ZN = (e) => e === "videos", QN = () => /* @__PURE__ */ (0, L.jsx)("span", {
+var YN = (e) => e === "videos", XN = () => /* @__PURE__ */ (0, L.jsx)("span", {
"data-entity-sep": "",
"aria-hidden": "true"
});
-function $N(e) {
- let { view: t, views: n, state: r, states: i, tags: a, combo: o, actions: s, helpers: c } = e, l = ZN(t), u = (0, I.useRef)(null), d = (0, I.useRef)(null), f = (0, I.useRef)(null), p = (0, I.useRef)(null), m = (0, I.useRef)(null), h = (0, I.useRef)(null), g = (0, I.useRef)(null), _ = XN(u, f, "[data-entity-state][aria-pressed=\"true\"]", `${t}:${r}`), v = XN(d, p, "[data-media-view][aria-pressed=\"true\"]", `${t}:${!!n}`);
+function ZN(e) {
+ let { view: t, views: n, state: r, states: i, tags: a, combo: o, actions: s, helpers: c } = e, l = YN(t), u = (0, I.useRef)(null), d = (0, I.useRef)(null), f = (0, I.useRef)(null), p = (0, I.useRef)(null), m = (0, I.useRef)(null), h = (0, I.useRef)(null), g = (0, I.useRef)(null), _ = JN(u, f, "[data-entity-state][aria-pressed=\"true\"]", `${t}:${r}`), v = JN(d, p, "[data-media-view][aria-pressed=\"true\"]", `${t}:${!!n}`);
return (0, I.useEffect)(() => {
c.wireDrag(h.current), c.wireScroller(m.current), c.wireDrag(g.current);
- }, [c]), /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(tP, {
+ }, [c]), /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)($N, {
items: o,
hidden: !l,
actions: s
- }), /* @__PURE__ */ (0, L.jsx)(SM, {
+ }), /* @__PURE__ */ (0, L.jsx)(bM, {
label: "筛选与排序",
topLabel: "媒体与标签",
attrs: {
@@ -36387,13 +36387,13 @@ function $N(e) {
"data-view-glide": "round",
"aria-hidden": "true"
})] }),
- top: /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [n ? /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(eP, {
+ top: /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [n ? /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(QN, {
keys: n,
view: t,
row: p,
glide: v,
onView: s.setView
- }), l ? /* @__PURE__ */ (0, L.jsx)(QN, {}) : null] }) : null, /* @__PURE__ */ (0, L.jsxs)("div", {
+ }), l ? /* @__PURE__ */ (0, L.jsx)(XN, {}) : null] }) : null, /* @__PURE__ */ (0, L.jsxs)("div", {
ref: m,
"data-entity-scroll": "",
children: [/* @__PURE__ */ (0, L.jsxs)("div", {
@@ -36413,11 +36413,11 @@ function $N(e) {
r !== e.k && s.setState(e.k);
},
children: e.label
- }, e.k)), /* @__PURE__ */ (0, L.jsx)(QN, {})]
+ }, e.k)), /* @__PURE__ */ (0, L.jsx)(XN, {})]
}), /* @__PURE__ */ (0, L.jsx)("div", {
ref: h,
"data-entity-tags": "",
- children: l ? a.map((e) => /* @__PURE__ */ (0, L.jsxs)(wM, {
+ children: l ? a.map((e) => /* @__PURE__ */ (0, L.jsxs)(SM, {
"data-entity-tag": e.k,
"data-entity-press": "",
pressed: e.selected,
@@ -36429,10 +36429,10 @@ function $N(e) {
}, e.k)) : null
})]
})] }),
- bottom: /* @__PURE__ */ (0, L.jsx)(nP, { ...e })
+ bottom: /* @__PURE__ */ (0, L.jsx)(eP, { ...e })
})] });
}
-function eP({ keys: e, view: t, row: n, glide: r, onView: i }) {
+function QN({ keys: e, view: t, row: n, glide: r, onView: i }) {
let a = [];
return e.people && a.push({
value: "people",
@@ -36474,7 +36474,7 @@ function eP({ keys: e, view: t, row: n, glide: r, onView: i }) {
})
});
}
-function tP({ items: e, hidden: t, actions: n }) {
+function $N({ items: e, hidden: t, actions: n }) {
return /* @__PURE__ */ (0, L.jsx)("div", {
"data-entity-combo": "",
hidden: t,
@@ -36494,7 +36494,7 @@ function tP({ items: e, hidden: t, actions: n }) {
})] }) : null
});
}
-function nP(e) {
+function eP(e) {
let { view: t, readout: n, busy: r, video: i, photo: a, actions: o, helpers: c } = e;
return /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [
t === "photos" && a?.back ? /* @__PURE__ */ (0, L.jsxs)("button", {
@@ -36506,22 +36506,22 @@ function nP(e) {
dangerouslySetInnerHTML: { __html: s("chevron-left") }
}), /* @__PURE__ */ (0, L.jsx)("span", { children: "全部照片" })]
}) : null,
- /* @__PURE__ */ (0, L.jsx)(rP, {
+ /* @__PURE__ */ (0, L.jsx)(tP, {
text: n,
busy: r
}),
- t === "videos" && i ? /* @__PURE__ */ (0, L.jsx)(oP, {
+ t === "videos" && i ? /* @__PURE__ */ (0, L.jsx)(iP, {
head: i,
actions: o
}) : null,
- t === "photos" && a ? /* @__PURE__ */ (0, L.jsx)(sP, {
+ t === "photos" && a ? /* @__PURE__ */ (0, L.jsx)(aP, {
head: a,
actions: o,
helpers: c
}) : null
] });
}
-function rP({ text: e, busy: t }) {
+function tP({ text: e, busy: t }) {
return /* @__PURE__ */ (0, L.jsx)("h3", {
"data-entity-readout": "",
children: t ? /* @__PURE__ */ (0, L.jsx)("span", {
@@ -36531,21 +36531,21 @@ function rP({ text: e, busy: t }) {
}) : e
});
}
-function iP({ label: e, value: t, options: n, onChange: r }) {
- return /* @__PURE__ */ (0, L.jsx)(Uk, {
+function nP({ label: e, value: t, options: n, onChange: r }) {
+ return /* @__PURE__ */ (0, L.jsx)(Vk, {
"aria-label": e,
orientation: "horizontal",
value: t,
onChange: r,
"data-entity-layout": "",
- className: qN,
+ className: GN,
children: n.map(([e, t, n]) => {
- let r = cT(n);
- return /* @__PURE__ */ (0, L.jsx)(Wk, {
+ let r = oT(n);
+ return /* @__PURE__ */ (0, L.jsx)(Hk, {
value: e,
"aria-label": t,
"data-glass-segment": "",
- className: JN,
+ className: KN,
children: /* @__PURE__ */ (0, L.jsx)("span", {
title: t,
className: "contents",
@@ -36555,7 +36555,7 @@ function iP({ label: e, value: t, options: n, onChange: r }) {
})
});
}
-function aP({ onPress: e, busy: t = !1 }) {
+function rP({ onPress: e, busy: t = !1 }) {
return /* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
"data-entity-batch": "",
@@ -36569,19 +36569,19 @@ function aP({ onPress: e, busy: t = !1 }) {
dangerouslySetInnerHTML: { __html: t ? k("正在换一批") : s("shuffle") }
});
}
-function oP({ head: e, actions: t }) {
+function iP({ head: e, actions: t }) {
return /* @__PURE__ */ (0, L.jsxs)("span", {
"data-entity-sorts": "",
children: [
- /* @__PURE__ */ (0, L.jsx)(aP, { onPress: () => void t.reshuffle() }),
- e.jav ? /* @__PURE__ */ (0, L.jsx)(iP, {
+ /* @__PURE__ */ (0, L.jsx)(rP, { onPress: () => void t.reshuffle() }),
+ e.jav ? /* @__PURE__ */ (0, L.jsx)(nP, {
label: "JAV 卡片版式",
value: e.jav.layout,
options: e.jav.options,
onChange: t.setJavLayout
}) : null,
e.sorts.map((e) => {
- let n = cT(e.dir === "asc" ? "arrow-up" : "arrow-down");
+ let n = oT(e.dir === "asc" ? "arrow-up" : "arrow-down");
return /* @__PURE__ */ (0, L.jsxs)("button", {
type: "button",
"data-entity-sort": e.key,
@@ -36595,20 +36595,20 @@ function oP({ head: e, actions: t }) {
]
});
}
-function sP({ head: e, actions: t, helpers: n }) {
+function aP({ head: e, actions: t, helpers: n }) {
let [r, i] = (0, I.useState)(!1), a = (0, I.useRef)(null), o = e.back ? n.sourceToolsHtml(e.setId) : "";
return (0, I.useEffect)(() => {
a.current && o && n.wireSourceTools(a.current);
}, [n, o]), /* @__PURE__ */ (0, L.jsxs)("span", {
"data-entity-sorts": "",
children: [
- e.shuffle ? /* @__PURE__ */ (0, L.jsx)(aP, {
+ e.shuffle ? /* @__PURE__ */ (0, L.jsx)(rP, {
onPress: () => {
i(!0), t.reshuffle().finally(() => i(!1));
},
busy: r
}) : null,
- /* @__PURE__ */ (0, L.jsx)(iP, {
+ /* @__PURE__ */ (0, L.jsx)(nP, {
label: "图片布局",
value: e.layout,
options: e.layouts,
@@ -36622,7 +36622,7 @@ function sP({ head: e, actions: t, helpers: n }) {
]
});
}
-function cP(e) {
+function oP(e) {
return {
x0: 0,
y0: 0,
@@ -36630,7 +36630,7 @@ function cP(e) {
y1: e.height
};
}
-function lP(e) {
+function sP(e) {
return {
x0: Math.round(e.x0),
y0: Math.round(e.y0),
@@ -36638,40 +36638,40 @@ function lP(e) {
y1: Math.round(e.y1)
};
}
-function uP(e) {
+function cP(e) {
return !!e && Number.isFinite(e.width) && Number.isFinite(e.height) && e.width > 0 && e.height > 0;
}
-function dP(e, t) {
- if (!uP(e)) return {
+function lP(e, t) {
+ if (!cP(e)) return {
x0: 0,
y0: 0,
x1: 0,
y1: 0
};
- if (t == null || !(t > 0)) return cP(e);
+ if (t == null || !(t > 0)) return oP(e);
let n = e.width, r = n / t;
r > e.height && (r = e.height, n = r * t);
let i = (e.width - n) / 2, a = (e.height - r) / 2;
- return lP({
+ return sP({
x0: i,
y0: a,
x1: i + n,
y1: a + r
});
}
-function fP(e, t) {
- if (!uP(e) || !(t > 0)) return cP(e);
+function uP(e, t) {
+ if (!cP(e) || !(t > 0)) return oP(e);
let n = Math.min(e.width, e.height * t);
- return lP({
+ return sP({
x0: e.width - n,
y0: 0,
x1: e.width,
y1: e.height
});
}
-function pP(e, t, n) {
- if (!uP(t) || !(n > 0)) return cP(t);
- let r = mP(e, t), i = dP({
+function dP(e, t, n) {
+ if (!cP(t) || !(n > 0)) return oP(t);
+ let r = fP(e, t), i = lP({
width: r.x1 - r.x0,
height: r.y1 - r.y0
}, n);
@@ -36682,8 +36682,8 @@ function pP(e, t, n) {
y1: r.y0 + i.y1
};
}
-function mP(e, t, n = null, r = "width") {
- if (!uP(t)) return {
+function fP(e, t, n = null, r = "width") {
+ if (!cP(t)) return {
x0: 0,
y0: 0,
x1: 0,
@@ -36692,43 +36692,43 @@ function mP(e, t, n = null, r = "width") {
let i = Math.min(16, t.width, t.height), a = Math.max(i, Math.min(e.x1 - e.x0, t.width)), o = Math.max(i, Math.min(e.y1 - e.y0, t.height));
n != null && n > 0 && (r === "width" ? (o = a / n, o > t.height && (o = t.height, a = o * n)) : (a = o * n, a > t.width && (a = t.width, o = a / n)), a > t.width && (a = t.width, o = a / n));
let s = Math.max(0, Math.min(e.x0, t.width - a)), c = Math.max(0, Math.min(e.y0, t.height - o));
- return lP({
+ return sP({
x0: s,
y0: c,
x1: s + a,
y1: c + o
});
}
-function hP(e, t, n, r) {
+function pP(e, t, n, r) {
let i = e.x1 - e.x0, a = e.y1 - e.y0, o = Math.max(0, Math.min(e.x0 + t, r.width - i)), s = Math.max(0, Math.min(e.y0 + n, r.height - a));
- return lP({
+ return sP({
x0: o,
y0: s,
x1: o + i,
y1: s + a
});
}
-function gP(e, t, n, r = null) {
- if (!uP(n) || !(t > 0)) return e;
+function mP(e, t, n, r = null) {
+ if (!cP(n) || !(t > 0)) return e;
let i = (e.x0 + e.x1) / 2, a = (e.y0 + e.y1) / 2, o = (e.x1 - e.x0) * t, s = (e.y1 - e.y0) * t;
- return mP({
+ return fP({
x0: i - o / 2,
y0: a - s / 2,
x1: i + o / 2,
y1: a + s / 2
}, n, r);
}
-function _P(e, t, n, r, i = null) {
+function hP(e, t, n, r, i = null) {
let a = {
x0: e.x0,
y0: e.y0,
x1: Math.max(e.x0 + 1, t),
y1: Math.max(e.y0 + 1, n)
};
- return mP(a, r, i, (a.x1 - a.x0) / Math.max(1, a.y1 - a.y0) > (i ?? 1) ? "height" : "width");
+ return fP(a, r, i, (a.x1 - a.x0) / Math.max(1, a.y1 - a.y0) > (i ?? 1) ? "height" : "width");
}
-function vP(e, t) {
- return uP(t) ? {
+function gP(e, t) {
+ return cP(t) ? {
left: e.x0 / t.width * 100,
top: e.y0 / t.height * 100,
width: (e.x1 - e.x0) / t.width * 100,
@@ -36740,8 +36740,8 @@ function vP(e, t) {
height: 0
};
}
-function yP(e, t) {
- if (!uP(t)) return {
+function _P(e, t) {
+ if (!cP(t)) return {
size: "cover",
position: "50% 50%"
};
@@ -36751,7 +36751,7 @@ function yP(e, t) {
position: `${i(e.x0, t.width, n)}% ${i(e.y0, t.height, r)}%`
};
}
-function bP(e, t) {
+function vP(e, t) {
let n = Math.max(1, e.x1 - e.x0), r = Math.max(1, e.y1 - e.y0);
return {
left: `${-e.x0 / n * 100}%`,
@@ -36760,29 +36760,29 @@ function bP(e, t) {
height: `${t.height / r * 100}%`
};
}
-function xP(e, t, n) {
+function yP(e, t, n) {
return t > 0 ? e * n / t : 0;
}
//#endregion
//#region src/react/components/modal-frame.tsx
-var SP = {
+var bP = {
"avatar-picker": "max-w-avatar-picker",
"cover-crop": "max-w-cover-crop",
form: "max-w-form-modal"
};
-function CP({ isOpen: e, onOpenChange: t, width: n, label: r, children: i }) {
+function xP({ isOpen: e, onOpenChange: t, width: n, label: r, children: i }) {
let { isFocusVisible: a } = eh();
- return /* @__PURE__ */ (0, L.jsx)(Bk, {
+ return /* @__PURE__ */ (0, L.jsx)(Rk, {
isOpen: e,
onOpenChange: t,
isDismissable: !0,
"data-modal-motion": "",
"data-motion-instant": a || void 0,
className: "fixed inset-0 z-dialog flex items-center justify-center bg-scrim p-4",
- children: /* @__PURE__ */ (0, L.jsx)(cae, {
+ children: /* @__PURE__ */ (0, L.jsx)(uae, {
"data-modal-surface": "",
- className: `flex max-h-full w-full ${SP[n]} flex-col overflow-hidden rounded-2-5xl border border-separator-border bg-background-full shadow-dropdown`,
- children: /* @__PURE__ */ (0, L.jsx)(Ik, {
+ className: `flex max-h-full w-full ${bP[n]} flex-col overflow-hidden rounded-2-5xl border border-separator-border bg-background-full shadow-dropdown`,
+ children: /* @__PURE__ */ (0, L.jsx)(Pk, {
"aria-label": r,
className: "flex min-h-0 flex-col outline-none",
children: i
@@ -36790,7 +36790,7 @@ function CP({ isOpen: e, onOpenChange: t, width: n, label: r, children: i }) {
})
});
}
-function wP({ children: e }) {
+function SP({ children: e }) {
return /* @__PURE__ */ (0, L.jsx)("span", {
"aria-hidden": !0,
className: "flex size-14 shrink-0 items-center justify-center rounded-2xl border border-separator-border bg-background-secondary-default text-foreground-icon-secondary",
@@ -36799,8 +36799,8 @@ function wP({ children: e }) {
}
//#endregion
//#region src/react/crop/crop-frame.tsx
-var TP = .02, EP = 1.08;
-function DP({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o }) {
+var CP = .02, wP = 1.08;
+function TP({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o }) {
let s = (0, I.useRef)(null), c = (0, I.useRef)(null), [l, u] = (0, I.useState)(!1);
(0, I.useEffect)(() => {
u(!1);
@@ -36811,8 +36811,8 @@ function DP({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o
dx: 0,
dy: 0
} : {
- dx: xP(e, n.clientWidth, r.width),
- dy: xP(t, n.clientHeight, r.height)
+ dx: yP(e, n.clientWidth, r.width),
+ dy: yP(t, n.clientHeight, r.height)
};
}, [r]);
function f(e) {
@@ -36830,29 +36830,29 @@ function DP({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o
if (!n || !a || !r) return;
let o = d(e.clientX - n.x, e.clientY - n.y);
if (n.mode === "move") {
- i(hP(n.box, o.dx, o.dy, r));
+ i(pP(n.box, o.dx, o.dy, r));
return;
}
- i(_P(n.box, n.box.x0 + (n.box.x1 - n.box.x0) + o.dx, n.box.y0 + (n.box.y1 - n.box.y0) + o.dy, r, t));
+ i(hP(n.box, n.box.x0 + (n.box.x1 - n.box.x0) + o.dx, n.box.y0 + (n.box.y1 - n.box.y0) + o.dy, r, t));
}
function m(e) {
c.current && (c.current = null, e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId));
}
function h(e) {
if (!n || !r) return;
- let a = Math.max(1, (n.x1 - n.x0) * TP), o = {
+ let a = Math.max(1, (n.x1 - n.x0) * CP), o = {
ArrowLeft: [-a, 0],
ArrowRight: [a, 0],
ArrowUp: [0, -a],
ArrowDown: [0, a]
};
if (o[e.key]) {
- e.preventDefault(), i(hP(n, o[e.key][0], o[e.key][1], r));
+ e.preventDefault(), i(pP(n, o[e.key][0], o[e.key][1], r));
return;
}
- (e.key === "+" || e.key === "=" || e.key === "-") && (e.preventDefault(), i(gP(n, e.key === "-" ? 1 / EP : EP, r, t)));
+ (e.key === "+" || e.key === "=" || e.key === "-") && (e.preventDefault(), i(mP(n, e.key === "-" ? 1 / wP : wP, r, t)));
}
- let g = n && r ? vP(mP(n, r, t), r) : null, _ = g ? {
+ let g = n && r ? gP(fP(n, r, t), r) : null, _ = g ? {
"--crop-l": `${g.left}%`,
"--crop-t": `${g.top}%`,
"--crop-w": `${g.width}%`,
@@ -36871,7 +36871,7 @@ function DP({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o
draggable: !1,
onLoad: (e) => {
let t = e.currentTarget;
- uP({
+ cP({
width: t.naturalWidth,
height: t.naturalHeight
}) && a({
@@ -36910,7 +36910,7 @@ function DP({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o
onPointerCancel: m,
onKeyDown: h,
onWheel: (e) => {
- !n || !r || i(gP(n, e.deltaY > 0 ? EP : 1 / EP, r, t));
+ !n || !r || i(mP(n, e.deltaY > 0 ? wP : 1 / wP, r, t));
},
className: "absolute left-(--crop-l) top-(--crop-t) h-(--crop-h) w-(--crop-w) cursor-move touch-none outline-none ring-2 ring-border-focus-ring ring-inset focus-visible:ring-4",
children: /* @__PURE__ */ (0, L.jsx)("span", {
@@ -36932,61 +36932,61 @@ function DP({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o
}
//#endregion
//#region src/react/avatar-picker/avatar-picker.ts
-var OP = "/api/avatar-choices", kP = "/api/avatar-pick", AP = "/api/avatar-code-cover", jP = "/avatar-choice", MP = (e, t) => [
+var EP = "/api/avatar-choices", DP = "/api/avatar-pick", OP = "/api/avatar-code-cover", kP = "/avatar-choice", AP = (e, t) => [
"avatar-choices",
e,
t
-], NP = (e, t) => `?kind=${encodeURIComponent(e)}&id=${t}`, PP = (e, t, n) => `${jP}${NP(e, t)}&ref=${encodeURIComponent(n)}`, FP = (e, t, n) => gw(OP + NP(e, t), n), IP = (e) => q(AP, { code: e });
-function LP(e, t, n) {
+], jP = (e, t) => `?kind=${encodeURIComponent(e)}&id=${t}`, MP = (e, t, n) => `${kP}${jP(e, t)}&ref=${encodeURIComponent(n)}`, NP = (e, t, n) => hw(EP + jP(e, t), n), PP = (e) => q(OP, { code: e });
+function FP(e, t, n) {
let r = t.width === e.width && t.height === e.height;
- return e.focus && r ? pP(e.focus, t, n) : dP(t, n);
+ return e.focus && r ? dP(e.focus, t, n) : lP(t, n);
}
-var RP = (e) => e.crop && uP({
+var IP = (e) => e.crop && cP({
width: e.width,
height: e.height
});
-async function zP(e, t, n) {
+async function LP(e, t, n) {
if (!("file" in n)) {
- await q(kP, {
+ await q(DP, {
kind: e,
id: t,
...n
});
return;
}
- let r = n.file, i = await fetch(`${kP}${NP(e, t)}&name=${encodeURIComponent(r.name)}`, {
+ let r = n.file, i = await fetch(`${DP}${jP(e, t)}&name=${encodeURIComponent(r.name)}`, {
method: "POST",
credentials: "same-origin",
body: r
});
if (i.ok) return;
let a = await i.json().catch(() => null);
- throw new mw(a?.error || `请求失败(${i.status})`, i.status, a);
+ throw new pw(a?.error || `请求失败(${i.status})`, i.status, a);
}
-function BP(e, t) {
+function RP(e, t) {
if (!t) return e;
let n = t.matched_names.filter((t) => t !== e);
return n.length ? `${e}:图库里按「${n.join("」「")}」找到的。` : t.choices.length ? `${e}:换上的那张留在本机,随时能换回来。` : `${e}:图库里没有这个名字,用下面两种方式换。`;
}
-var VP = (e) => e < 48 ? `${Math.max(1, Math.round(e))} 小时` : `${Math.floor(e / 24)} 天`;
-function xoe(e) {
- return !e || !e.index_stale || e.choices.some((e) => e.source === "gfriends") ? "" : e.index_age_hours === null ? "图库索引还没取过,只能从用过的图里选。" : `图库索引 ${VP(e.index_age_hours)}没更新,新收的人像这里还查不到。`;
+var zP = (e) => e < 48 ? `${Math.max(1, Math.round(e))} 小时` : `${Math.floor(e / 24)} 天`;
+function BP(e) {
+ return !e || !e.index_stale || e.choices.some((e) => e.source === "gfriends") ? "" : e.index_age_hours === null ? "图库索引还没取过,只能从用过的图里选。" : `图库索引 ${zP(e.index_age_hours)}没更新,新收的人像这里还查不到。`;
}
-var HP = (e) => e.cast > 1, Soe = (e) => HP(e) ? `${e.label}:${e.cast} 人合演,先找到她自己的脸,再拖动方框选一块。` : `${e.label}:拖动方框选一块,滚轮或角上那枚方块改大小。`, Coe = {
+var VP = (e) => e.cast > 1, Coe = (e) => VP(e) ? `${e.label}:${e.cast} 人合演,先找到她自己的脸,再拖动方框选一块。` : `${e.label}:拖动方框选一块,滚轮或角上那枚方块改大小。`, woe = {
gfriends: "图库",
history: "用过的",
asset: "作品画面",
code: "番号封面"
};
-function woe(e) {
+function Toe(e) {
if (e.startsWith("cover:")) return "封面";
let t = e.split(":")[2] || "";
if (t === "cover") return "封面";
let n = Number(t.replace("cell", ""));
return Number.isFinite(n) ? `第 ${n + 1} 格` : t;
}
-var Toe = (e) => `${Coe[e.source] || e.source} · ${e.label}` + (e.width ? ` · ${e.width}×${e.height}` : "") + (HP(e) ? ` · ${e.cast} 人合演` : "") + (e.found_by ? ` · 按「${e.found_by}」找到` : ""), Eoe = 8, Doe = 3 / 4;
-function Ooe({ kind: e, entityId: t, name: n, onPicked: r }) {
+var Eoe = (e) => `${woe[e.source] || e.source} · ${e.label}` + (e.width ? ` · ${e.width}×${e.height}` : "") + (VP(e) ? ` · ${e.cast} 人合演` : "") + (e.found_by ? ` · 按「${e.found_by}」找到` : ""), Doe = 8, Ooe = 3 / 4;
+function koe({ kind: e, entityId: t, name: n, onPicked: r }) {
let [i, a] = (0, I.useState)(!1);
return /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)("span", {
className: "absolute right-1 bottom-1 z-10",
@@ -36996,17 +36996,17 @@ function Ooe({ kind: e, entityId: t, name: n, onPicked: r }) {
"aria-label": `更换${n}的头像`,
onClick: () => a(!0),
className: "flex size-7 cursor-pointer items-center justify-center rounded-full border border-border-button-default bg-background-primary-default text-foreground-icon-primary shadow-xs outline-none ring-2 ring-background-full transition-colors hover:border-border-button-hover hover:bg-background-primary-hover/60 dark:hover:bg-background-primary-hover focus-visible:ring-border-focus-ring active:bg-background-primary-active",
- children: /* @__PURE__ */ (0, L.jsx)(WS, {
+ children: /* @__PURE__ */ (0, L.jsx)(US, {
"aria-hidden": !0,
className: "size-4"
})
})
- }), /* @__PURE__ */ (0, L.jsx)(CP, {
+ }), /* @__PURE__ */ (0, L.jsx)(xP, {
isOpen: i,
onOpenChange: a,
width: "avatar-picker",
label: "更换头像",
- children: /* @__PURE__ */ (0, L.jsx)(koe, {
+ children: /* @__PURE__ */ (0, L.jsx)(Aoe, {
kind: e,
entityId: t,
name: n,
@@ -37015,50 +37015,50 @@ function Ooe({ kind: e, entityId: t, name: n, onPicked: r }) {
})
})] });
}
-function koe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
- let a = (0, I.useRef)(null), o = PA(), [s, c] = (0, I.useState)(""), [l, u] = (0, I.useState)(""), [d, f] = (0, I.useState)(""), [p, m] = (0, I.useState)(null), h = MP(e, t), g = (0, I.useRef)(!1), _ = Ft({
+function Aoe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
+ let a = (0, I.useRef)(null), o = MA(), [s, c] = (0, I.useState)(""), [l, u] = (0, I.useState)(""), [d, f] = (0, I.useState)(""), [p, m] = (0, I.useState)(null), h = AP(e, t), g = (0, I.useRef)(!1), _ = Ft({
queryKey: h,
- queryFn: ({ signal: n }) => FP(e, t, n),
+ queryFn: ({ signal: n }) => NP(e, t, n),
retryOnMount: !0
});
(0, I.useEffect)(() => () => {
- g.current && X.removeQueries({ queryKey: MP(e, t) });
+ g.current && X.removeQueries({ queryKey: AP(e, t) });
}, [e, t]);
let v = It({
- mutationFn: (n) => zP(e, t, n),
+ mutationFn: (n) => LP(e, t, n),
onSuccess: () => {
g.current = !0, i(), r();
}
}), y = It({
- mutationFn: (e) => IP(e),
+ mutationFn: (e) => PP(e),
onSuccess: (e) => m(e)
});
function b(e) {
let t = e.currentTarget, n = t.files?.[0];
t.value = "", f(""), n && v.mutate({ file: n });
}
- let x = _.data, S = x?.choices ?? [], C = d || (v.error ? K(v.error) : "") || (!p && y.error ? K(y.error) : "") || (_.error ? K(_.error) : ""), w = v.isPending || y.isPending, T = p ? "" : xoe(x);
+ let x = _.data, S = x?.choices ?? [], C = d || (v.error ? K(v.error) : "") || (!p && y.error ? K(y.error) : "") || (_.error ? K(_.error) : ""), w = v.isPending || y.isPending, T = p ? "" : BP(x);
return /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex shrink-0 items-start gap-4 p-5",
children: [
- /* @__PURE__ */ (0, L.jsx)(wP, { children: /* @__PURE__ */ (0, L.jsx)(yC, { className: "size-6" }) }),
+ /* @__PURE__ */ (0, L.jsx)(SP, { children: /* @__PURE__ */ (0, L.jsx)(vC, { className: "size-6" }) }),
/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex min-w-0 flex-1 flex-col gap-2",
children: [
/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
- children: [/* @__PURE__ */ (0, L.jsx)(oO, {
+ children: [/* @__PURE__ */ (0, L.jsx)(iO, {
slot: "title",
className: "text-title-3-semibold text-text-primary",
children: p ? "框出头像那一块" : "更换头像"
- }), !p && S.length ? /* @__PURE__ */ (0, L.jsxs)(dw, {
+ }), !p && S.length ? /* @__PURE__ */ (0, L.jsxs)(uw, {
color: "soft",
children: [S.length, " 张可选"]
}) : null]
}),
/* @__PURE__ */ (0, L.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
- children: p ? Soe(p) : BP(n, x)
+ children: p ? Coe(p) : RP(n, x)
}),
T ? /* @__PURE__ */ (0, L.jsx)(J, {
tone: "neutral",
@@ -37070,14 +37070,14 @@ function koe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
}) : null
]
}),
- /* @__PURE__ */ (0, L.jsx)(IA, {
- icon: $S,
+ /* @__PURE__ */ (0, L.jsx)(PA, {
+ icon: QS,
size: "small",
"aria-label": "关闭",
onClick: i
})
]
- }), p ? /* @__PURE__ */ (0, L.jsx)(joe, {
+ }), p ? /* @__PURE__ */ (0, L.jsx)(Moe, {
kind: e,
entityId: t,
choice: p,
@@ -37100,7 +37100,7 @@ function koe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
"aria-busy": _.isPending || void 0,
"data-skeleton": _.isPending ? "avatar-choices" : void 0,
className: "inline-grid grid-cols-3 content-start gap-2 sm:grid-cols-4",
- children: _.isPending ? Array.from({ length: Eoe }, (e, t) => /* @__PURE__ */ (0, L.jsxs)("span", {
+ children: _.isPending ? Array.from({ length: Doe }, (e, t) => /* @__PURE__ */ (0, L.jsxs)("span", {
"aria-hidden": !0,
"data-avatar-skeleton": !0,
className: "flex flex-col gap-1 overflow-hidden rounded-2lg border border-separator-border bg-background-secondary-default pb-1 text-caption-1-regular",
@@ -37113,15 +37113,15 @@ function koe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
role: "option",
"data-avatar-choice": !0,
"aria-selected": n.current,
- title: Toe(n),
+ title: Eoe(n),
...Y(w),
onClick: () => {
w || (n.crop ? m(n) : v.mutate({ ref: n.ref }));
},
className: "relative flex cursor-pointer flex-col gap-1 overflow-hidden rounded-2lg border border-separator-border bg-background-secondary-default pb-1 text-center text-caption-1-regular text-text-secondary outline-none hover:border-border-button-hover hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring aria-selected:border-border-focus-ring aria-selected:bg-background-tertiary-default aria-selected:text-text-primary aria-disabled:cursor-progress aria-disabled:opacity-60",
children: [
- /* @__PURE__ */ (0, L.jsx)(Aoe, {
- src: PP(e, t, n.ref),
+ /* @__PURE__ */ (0, L.jsx)(joe, {
+ src: MP(e, t, n.ref),
choice: n
}),
/* @__PURE__ */ (0, L.jsx)("span", {
@@ -37130,15 +37130,15 @@ function koe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
}),
n.current ? /* @__PURE__ */ (0, L.jsx)("span", {
className: "absolute top-1 left-1",
- children: /* @__PURE__ */ (0, L.jsx)(dw, {
+ children: /* @__PURE__ */ (0, L.jsx)(uw, {
variant: "caption",
color: "gray",
children: "在用"
})
}) : null,
- HP(n) ? /* @__PURE__ */ (0, L.jsx)("span", {
+ VP(n) ? /* @__PURE__ */ (0, L.jsx)("span", {
className: "absolute top-1 right-1",
- children: /* @__PURE__ */ (0, L.jsxs)(dw, {
+ children: /* @__PURE__ */ (0, L.jsxs)(uw, {
variant: "caption",
color: "gray",
children: [n.cast, " 人"]
@@ -37157,7 +37157,7 @@ function koe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
},
children: [/* @__PURE__ */ (0, L.jsx)("div", {
className: "min-w-0 flex-1",
- children: /* @__PURE__ */ (0, L.jsx)(Yj, {
+ children: /* @__PURE__ */ (0, L.jsx)(qj, {
"aria-label": "番号",
placeholder: "番号,如 ABW-232",
value: l,
@@ -37192,7 +37192,7 @@ function koe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
className: "flex min-w-0 flex-1 items-center gap-2",
children: [/* @__PURE__ */ (0, L.jsx)("div", {
className: "min-w-0 flex-1",
- children: /* @__PURE__ */ (0, L.jsx)(Yj, {
+ children: /* @__PURE__ */ (0, L.jsx)(qj, {
type: "url",
"aria-label": "图片地址",
placeholder: "https://…",
@@ -37212,7 +37212,7 @@ function koe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
})]
})] })] });
}
-function Aoe({ src: e, choice: t }) {
+function joe({ src: e, choice: t }) {
let n = (0, I.useRef)(null), [r, i] = (0, I.useState)(!1);
(0, I.useEffect)(() => {
n.current?.complete && n.current.naturalWidth && i(!0);
@@ -37220,7 +37220,7 @@ function Aoe({ src: e, choice: t }) {
let a = {
width: t.width,
height: t.height
- }, o = RP(t) ? bP(LP(t, a, Doe), a) : null, s = r ? !0 : void 0;
+ }, o = IP(t) ? vP(FP(t, a, Ooe), a) : null, s = r ? !0 : void 0;
return /* @__PURE__ */ (0, L.jsxs)("span", {
className: "relative block w-full aspect-avatar-choice overflow-hidden",
children: [/* @__PURE__ */ (0, L.jsx)("img", {
@@ -37245,23 +37245,23 @@ function Aoe({ src: e, choice: t }) {
})]
});
}
-function joe({ kind: e, entityId: t, choice: n, busy: r, back: i, confirm: a }) {
- let o = n.bases.length ? n.bases : [n.ref], [s, c] = (0, I.useState)(o[0]), [l, u] = (0, I.useState)(null), [d, f] = (0, I.useState)(null), p = PP(e, t, s), m = PA();
+function Moe({ kind: e, entityId: t, choice: n, busy: r, back: i, confirm: a }) {
+ let o = n.bases.length ? n.bases : [n.ref], [s, c] = (0, I.useState)(o[0]), [l, u] = (0, I.useState)(null), [d, f] = (0, I.useState)(null), p = MP(e, t, s), m = MA();
function h(e) {
c(e), u(null), f(null);
}
- let g = d && l ? yP(d, l) : null;
+ let g = d && l ? _P(d, l) : null;
return /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsxs)("div", {
ref: m,
className: "flex min-h-0 flex-1 flex-col items-center gap-4 overflow-y-auto border-t border-separator-border px-5 py-4",
- children: [/* @__PURE__ */ (0, L.jsx)(DP, {
+ children: [/* @__PURE__ */ (0, L.jsx)(TP, {
src: p,
aspect: 1,
box: d,
size: l,
label: `${n.label} 的头像取景框`,
onSize: (e) => {
- u(e), uP(e) && f(s === n.ref ? LP(n, e, 1) : dP(e, 1));
+ u(e), cP(e) && f(s === n.ref ? FP(n, e, 1) : lP(e, 1));
},
onBox: f
}), o.length > 1 ? /* @__PURE__ */ (0, L.jsx)("div", {
@@ -37275,7 +37275,7 @@ function joe({ kind: e, entityId: t, choice: n, busy: r, back: i, confirm: a })
"data-crop-base": !0,
onClick: () => h(e),
className: "cursor-pointer rounded-lg px-2 py-1 text-caption-1-regular text-text-secondary outline-none hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring aria-checked:bg-background-tertiary-default aria-checked:text-text-primary",
- children: woe(e)
+ children: Toe(e)
}, e))
}) : null]
}), /* @__PURE__ */ (0, L.jsxs)("div", {
@@ -37309,12 +37309,12 @@ function joe({ kind: e, entityId: t, choice: n, busy: r, back: i, confirm: a })
}
//#endregion
//#region src/react/entity-hero/glyph.tsx
-var Moe = {
+var Noe = {
"text-aa": 1.435,
"mark-javdb": 326 / 111
};
-function UP({ name: e }) {
- let t = Moe[e];
+function HP({ name: e }) {
+ let t = Noe[e];
return /* @__PURE__ */ (0, L.jsx)("svg", {
viewBox: t ? `0 0 ${(24 * t).toFixed(2)} 24` : "0 0 24 24",
"aria-hidden": "true",
@@ -37324,19 +37324,19 @@ function UP({ name: e }) {
}
//#endregion
//#region src/react/entity-hero/hero-pop.tsx
-function WP(e, t) {
+function UP(e, t) {
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect();
t.style.left = `${Math.max(8, Math.min(innerWidth - r.width - 8, n.left))}px`;
let i = n.bottom + 8;
t.style.top = `${i + r.height <= innerHeight - 8 ? i : Math.max(8, n.top - r.height - 8)}px`;
}
-var GP = (e) => !!e?.isConnected && e.matches(":popover-open");
-function KP(e, t, n, r) {
+var WP = (e) => !!e?.isConnected && e.matches(":popover-open");
+function GP(e, t, n, r) {
let i = (0, I.useRef)(r);
i.current = r, (0, I.useEffect)(() => {
if (!e) return;
let r = () => {
- t.current && GP(n.current) ? WP(t.current, n.current) : i.current();
+ t.current && WP(n.current) ? UP(t.current, n.current) : i.current();
};
return addEventListener("scroll", r, {
capture: !0,
@@ -37350,17 +37350,17 @@ function KP(e, t, n, r) {
n
]);
}
-function qP({ id: e, rest: t, label: n, heading: r, hook: i, children: a }) {
+function KP({ id: e, rest: t, label: n, heading: r, hook: i, children: a }) {
let o = (0, I.useRef)(null), s = (0, I.useRef)(null), [c, l] = (0, I.useState)(!1), u = (0, I.useRef)(!1), d = (0, I.useRef)(0), f = () => {
- clearTimeout(d.current), u.current = !1, GP(s.current) && s.current.hidePopover(), l(!1);
+ clearTimeout(d.current), u.current = !1, WP(s.current) && s.current.hidePopover(), l(!1);
}, p = () => {
- clearTimeout(d.current), !(!s.current || !o.current || GP(s.current)) && (s.current.showPopover(), WP(o.current, s.current), l(!0));
+ clearTimeout(d.current), !(!s.current || !o.current || WP(s.current)) && (s.current.showPopover(), UP(o.current, s.current), l(!0));
}, m = () => {
clearTimeout(d.current), d.current = window.setTimeout(() => {
!u.current && !o.current?.matches(":hover,:focus-visible") && !s.current?.matches(":hover") && f();
}, 150);
};
- return KP(c, o, s, f), (0, I.useEffect)(() => {
+ return GP(c, o, s, f), (0, I.useEffect)(() => {
if (!c) return;
let e = (e) => {
let t = e.target;
@@ -37386,7 +37386,7 @@ function qP({ id: e, rest: t, label: n, heading: r, hook: i, children: a }) {
u.current ? f() : (p(), u.current = !0);
},
onKeyDown: (e) => {
- e.key === "Escape" && GP(s.current) && (e.preventDefault(), f());
+ e.key === "Escape" && WP(s.current) && (e.preventDefault(), f());
},
children: ["+", t]
}), /* @__PURE__ */ (0, L.jsxs)("div", {
@@ -37404,16 +37404,16 @@ function qP({ id: e, rest: t, label: n, heading: r, hook: i, children: a }) {
}), a]
})] });
}
-function Noe({ following: e, busy: t, onToggle: n, tip: r }) {
+function Poe({ following: e, busy: t, onToggle: n, tip: r }) {
let i = (0, I.useRef)(null), a = (0, I.useRef)(null), o = (0, I.useRef)(null), [s, c] = (0, I.useState)(!1), l = (0, I.useRef)(!1), u = () => {
- GP(o.current) && o.current.hidePopover(), c(!1);
+ WP(o.current) && o.current.hidePopover(), c(!1);
}, d = () => {
- l.current || !o.current || !i.current || GP(o.current) || (o.current.showPopover(), WP(i.current, o.current), c(!0));
+ l.current || !o.current || !i.current || WP(o.current) || (o.current.showPopover(), UP(i.current, o.current), c(!0));
}, f = () => {
l.current = !1, u();
};
- return KP(s, i, o, () => c(!1)), (0, I.useEffect)(() => {
- i.current && GP(o.current) && WP(i.current, o.current);
+ return GP(s, i, o, () => c(!1)), (0, I.useEffect)(() => {
+ i.current && WP(o.current) && UP(i.current, o.current);
}, [r]), /* @__PURE__ */ (0, L.jsxs)("label", {
ref: i,
"data-entry-feed": "",
@@ -37422,7 +37422,7 @@ function Noe({ following: e, busy: t, onToggle: n, tip: r }) {
a.current?.matches(":focus-visible") || f();
},
children: [
- /* @__PURE__ */ (0, L.jsx)(UP, { name: "rss" }),
+ /* @__PURE__ */ (0, L.jsx)(HP, { name: "rss" }),
/* @__PURE__ */ (0, L.jsx)("input", {
ref: a,
type: "checkbox",
@@ -37457,29 +37457,29 @@ function Noe({ following: e, busy: t, onToggle: n, tip: r }) {
}
//#endregion
//#region src/react/entity-hero/name-picker.tsx
-function Poe({ current: e, choices: t, onChoose: n, onAddAlias: r }) {
+function Foe({ current: e, choices: t, onChoose: n, onAddAlias: r }) {
let [i, a] = (0, I.useState)(!1), o = (0, I.useRef)(null);
return (0, I.useEffect)(() => {
o.current?.setAttribute("title", "名字与别名");
- }, []), /* @__PURE__ */ (0, L.jsxs)(eae, {
+ }, []), /* @__PURE__ */ (0, L.jsxs)(nae, {
isOpen: i,
onOpenChange: a,
- children: [/* @__PURE__ */ (0, L.jsx)(iO, {
+ children: [/* @__PURE__ */ (0, L.jsx)(nO, {
ref: o,
"data-namepick-toggle": "",
"aria-label": "名字与别名",
- children: /* @__PURE__ */ (0, L.jsx)(UP, { name: "chevron-down" })
- }), /* @__PURE__ */ (0, L.jsx)(Tk, {
+ children: /* @__PURE__ */ (0, L.jsx)(HP, { name: "chevron-down" })
+ }), /* @__PURE__ */ (0, L.jsx)(Ck, {
placement: "bottom start",
offset: 8,
containerPadding: 8,
- className: EA,
+ className: wA,
"data-namepick-menu": "",
- children: /* @__PURE__ */ (0, L.jsxs)(nae, {
+ children: /* @__PURE__ */ (0, L.jsxs)(iae, {
"aria-label": "名字与别名",
"data-namepick-list": "",
children: [
- /* @__PURE__ */ (0, L.jsx)(Mk, {
+ /* @__PURE__ */ (0, L.jsx)(Ak, {
selectionMode: "single",
disallowEmptySelection: !0,
selectedKeys: [e],
@@ -37487,31 +37487,31 @@ function Poe({ current: e, choices: t, onChoose: n, onAddAlias: r }) {
let r = [...t][0];
r && r !== e && n(r);
},
- children: t.map((e) => /* @__PURE__ */ (0, L.jsxs)(Pk, {
+ children: t.map((e) => /* @__PURE__ */ (0, L.jsxs)(Mk, {
id: e,
textValue: e,
"data-namepick-name": e,
- children: [/* @__PURE__ */ (0, L.jsx)(UP, { name: "check" }), /* @__PURE__ */ (0, L.jsx)("span", { children: e })]
+ children: [/* @__PURE__ */ (0, L.jsx)(HP, { name: "check" }), /* @__PURE__ */ (0, L.jsx)("span", { children: e })]
}, e))
}),
- /* @__PURE__ */ (0, L.jsx)(Iie, { "data-namepick-rule": "" }),
- /* @__PURE__ */ (0, L.jsx)(Mk, { children: /* @__PURE__ */ (0, L.jsxs)(Pk, {
+ /* @__PURE__ */ (0, L.jsx)(Rie, { "data-namepick-rule": "" }),
+ /* @__PURE__ */ (0, L.jsx)(Ak, { children: /* @__PURE__ */ (0, L.jsxs)(Mk, {
id: "alias",
textValue: "添加别名",
"data-namepick-alias": "",
onAction: r,
- children: [/* @__PURE__ */ (0, L.jsx)(UP, { name: "plus" }), /* @__PURE__ */ (0, L.jsx)("span", { children: "添加别名…" })]
+ children: [/* @__PURE__ */ (0, L.jsx)(HP, { name: "plus" }), /* @__PURE__ */ (0, L.jsx)("span", { children: "添加别名…" })]
}) })
]
})
})]
});
}
-var Foe = (e) => e === "studio" || e === "agency", Ioe = (e) => e === "performer" || e === "creator", Loe = (e) => e ? "已订阅新作:库里还没有的新片排在资料卡下面。再点一下取消订阅。" : "订阅新作:定时去 JavDB 查这位有没有出新片,库里还没有的排在资料卡下面。";
-function Roe(e) {
+var Ioe = (e) => e === "studio" || e === "agency", Loe = (e) => e === "performer" || e === "creator", Roe = (e) => e ? "已订阅新作:库里还没有的新片排在资料卡下面。再点一下取消订阅。" : "订阅新作:定时去 JavDB 查这位有没有出新片,库里还没有的排在资料卡下面。";
+function zoe(e) {
return [e.canonical_name, ...e.aliases || []].filter((e, t, n) => e && n.indexOf(e) === t);
}
-function JP(e) {
+function qP(e) {
if (e.agency) return {
name: e.agency.canonical_name,
linked: !0
@@ -37522,13 +37522,13 @@ function JP(e) {
linked: !1
} : null;
}
-function YP(e, t) {
+function JP(e, t) {
let n = u(e, "performer"), r = o(t);
return r && [e.label, n].map(o).some((e) => e && (r.includes(e) || e.includes(r))) ? `${t} 官方资料` : n || e.label || "";
}
-var XP = (e) => ({ site: c(e) });
-function zoe(e, n) {
- let r = JP(e)?.name || "", i = (e.entry_links || []).filter((e) => e.slot === "pill").map((e) => ({
+var YP = (e) => ({ site: c(e) });
+function Boe(e, n) {
+ let r = qP(e)?.name || "", i = (e.entry_links || []).filter((e) => e.slot === "pill").map((e) => ({
type: "icon",
url: e.url,
title: e.label,
@@ -37538,7 +37538,7 @@ function zoe(e, n) {
let t = e.retired_year ? `已于 ${e.retired_year} 年隐退` : "链接已失效";
return {
type: "gone",
- title: `${YP(e, r)} · ${t}`
+ title: `${JP(e, r)} · ${t}`
};
}
let i = e.url || "";
@@ -37549,8 +37549,8 @@ function zoe(e, n) {
if (n === "performer" && e.link_kind !== "social") return {
type: "icon",
url: i,
- title: YP(e, r),
- mark: XP(e)
+ title: JP(e, r),
+ mark: YP(e)
};
if (e.link_kind === "social") {
let n = t(i);
@@ -37558,7 +37558,7 @@ function zoe(e, n) {
type: "icon",
url: i,
title: e.label || "",
- mark: n ? { brand: n } : XP(e)
+ mark: n ? { brand: n } : YP(e)
};
}
return {
@@ -37566,13 +37566,13 @@ function zoe(e, n) {
url: i,
title: e.label || "",
text: u(e, n, a),
- mark: XP(e)
+ mark: YP(e)
};
});
return [...i, ...o];
}
-var ZP = (e) => (e.entry_links || []).filter((e) => e.slot === "mark");
-function Boe(e) {
+var XP = (e) => (e.entry_links || []).filter((e) => e.slot === "mark");
+function Voe(e) {
if (!e) return [];
let t = [];
e.birth_date && t.push({
@@ -37629,14 +37629,14 @@ function Boe(e) {
tags: e.tags
}), t;
}
-function Voe(e) {
+function Hoe(e) {
let t = e.length > 5 ? 4 : e.length;
return {
shown: e.slice(0, t),
rest: e.length - t
};
}
-function Hoe(e) {
+function Uoe(e) {
if (!e) return null;
let t = e.shown || [], n = [e.reading || "", ...t].filter(Boolean), r = (e.total || 0) - t.length;
return n.length || r > 0 ? {
@@ -37647,8 +37647,8 @@ function Hoe(e) {
}
//#endregion
//#region src/react/entity-hero/entity-hero-page.tsx
-function Uoe({ kind: e, name: t, entity: n, feedNew: i, feedHost: a, actions: o, helpers: s }) {
- let c = Ioe(e), l = Foe(e), u = e === "performer" ? Boe(n.profile) : [], d = zoe(n, e), f = ZP(n), p = e === "agency" ? [] : n.related_performers || [], m = (0, I.useRef)(null), h = (0, I.useRef)(null);
+function Woe({ kind: e, name: t, entity: n, feedNew: i, feedHost: a, actions: o, helpers: s }) {
+ let c = Loe(e), l = Ioe(e), u = e === "performer" ? Voe(n.profile) : [], d = Boe(n, e), f = XP(n), p = e === "agency" ? [] : n.related_performers || [], m = (0, I.useRef)(null), h = (0, I.useRef)(null);
return (0, I.useEffect)(() => {
s.wireScroller(m.current);
}, [s, d.length]), (0, I.useEffect)(() => {
@@ -37661,7 +37661,7 @@ function Uoe({ kind: e, name: t, entity: n, feedNew: i, feedHost: a, actions: o,
children: [
/* @__PURE__ */ (0, L.jsxs)("div", {
"data-entity-portrait-wrap": "",
- children: [/* @__PURE__ */ (0, L.jsx)(Woe, {
+ children: [/* @__PURE__ */ (0, L.jsx)(Goe, {
kind: e,
name: t,
helpers: s,
@@ -37669,7 +37669,7 @@ function Uoe({ kind: e, name: t, entity: n, feedNew: i, feedHost: a, actions: o,
company: l
}), c && n.id ? /* @__PURE__ */ (0, L.jsx)("span", {
"data-avatar-picker": "",
- children: /* @__PURE__ */ (0, L.jsx)(Ooe, {
+ children: /* @__PURE__ */ (0, L.jsx)(koe, {
kind: e,
entityId: Number(n.id),
name: n.canonical_name || t,
@@ -37682,14 +37682,14 @@ function Uoe({ kind: e, name: t, entity: n, feedNew: i, feedHost: a, actions: o,
children: [
/* @__PURE__ */ (0, L.jsxs)("div", {
"data-entity-title": "",
- children: [/* @__PURE__ */ (0, L.jsx)("h2", { children: n.canonical_name }), /* @__PURE__ */ (0, L.jsx)(Poe, {
+ children: [/* @__PURE__ */ (0, L.jsx)("h2", { children: n.canonical_name }), /* @__PURE__ */ (0, L.jsx)(Foe, {
current: n.canonical_name,
- choices: Roe(n),
+ choices: zoe(n),
onChoose: o.chooseName,
onAddAlias: o.addAlias
})]
}),
- /* @__PURE__ */ (0, L.jsx)(Goe, {
+ /* @__PURE__ */ (0, L.jsx)(Koe, {
kind: e,
entity: n,
actions: o
@@ -37697,9 +37697,9 @@ function Uoe({ kind: e, name: t, entity: n, feedNew: i, feedHost: a, actions: o,
d.length ? /* @__PURE__ */ (0, L.jsx)("div", {
ref: m,
"data-entity-links": "",
- children: d.map((e, t) => /* @__PURE__ */ (0, L.jsx)(Yoe, { link: e }, t))
+ children: d.map((e, t) => /* @__PURE__ */ (0, L.jsx)(Xoe, { link: e }, t))
}) : null,
- f.length || n.feed ? /* @__PURE__ */ (0, L.jsx)(Xoe, {
+ f.length || n.feed ? /* @__PURE__ */ (0, L.jsx)(Zoe, {
entity: n,
actions: o,
helpers: s
@@ -37708,11 +37708,11 @@ function Uoe({ kind: e, name: t, entity: n, feedNew: i, feedHost: a, actions: o,
}),
u.length ? /* @__PURE__ */ (0, L.jsx)("dl", {
"data-entity-facts": "",
- children: u.map((e) => /* @__PURE__ */ (0, L.jsx)(qoe, {
+ children: u.map((e) => /* @__PURE__ */ (0, L.jsx)(Joe, {
glyph: e.glyph,
label: e.label,
clip: e.clip,
- children: e.tags ? /* @__PURE__ */ (0, L.jsx)(Joe, { tags: e.tags }) : e.parts.map((e, t) => /* @__PURE__ */ (0, L.jsxs)("span", {
+ children: e.tags ? /* @__PURE__ */ (0, L.jsx)(Yoe, { tags: e.tags }) : e.parts.map((e, t) => /* @__PURE__ */ (0, L.jsxs)("span", {
"data-fact-tone": e.tone === "plain" ? void 0 : e.tone,
children: [t ? " " : "", e.text]
}, t))
@@ -37739,14 +37739,14 @@ function Uoe({ kind: e, name: t, entity: n, feedNew: i, feedHost: a, actions: o,
}, e.k))
})
}) : null]
- }), a ? (0, Yh.createPortal)(/* @__PURE__ */ (0, L.jsx)(Zoe, {
+ }), a ? (0, Yh.createPortal)(/* @__PURE__ */ (0, L.jsx)(Qoe, {
feedNew: i,
host: a,
actions: o,
helpers: s
}), a) : null] });
}
-function Woe({ kind: e, name: t, helpers: n, people: i, company: a }) {
+function Goe({ kind: e, name: t, helpers: n, people: i, company: a }) {
let [o] = (0, I.useState)(() => `${n.portraitImg()}<span>${r(t.slice(0, 1))}</span>`);
return /* @__PURE__ */ (0, L.jsx)("div", {
"data-entity-portrait": i ? "round" : "square",
@@ -37755,8 +37755,8 @@ function Woe({ kind: e, name: t, helpers: n, people: i, company: a }) {
dangerouslySetInnerHTML: { __html: o }
});
}
-function Goe({ kind: e, entity: t, actions: r }) {
- let i = JP(t), a = (e, t) => (n) => {
+function Koe({ kind: e, entity: t, actions: r }) {
+ let i = qP(t), a = (e, t) => (n) => {
n.preventDefault(), r.openEntity(e, t);
}, o = i ? i.linked ? /* @__PURE__ */ (0, L.jsx)("a", {
href: n("agency", i.name),
@@ -37765,36 +37765,36 @@ function Goe({ kind: e, entity: t, actions: r }) {
children: i.name
}) : i.name : null, s = /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)("b", { children: t.asset_count.toLocaleString() }), " 个视频"] });
if (e === "performer") {
- let e = Hoe(t.name_groups);
+ let e = Uoe(t.name_groups);
return /* @__PURE__ */ (0, L.jsxs)("div", {
"data-entity-alias": "meta",
children: [
/* @__PURE__ */ (0, L.jsxs)("span", {
"data-meta-item": "",
title: "视频",
- children: [/* @__PURE__ */ (0, L.jsx)(UP, { name: "film" }), /* @__PURE__ */ (0, L.jsx)("span", { children: s })]
+ children: [/* @__PURE__ */ (0, L.jsx)(HP, { name: "film" }), /* @__PURE__ */ (0, L.jsx)("span", { children: s })]
}),
o ? /* @__PURE__ */ (0, L.jsxs)("span", {
"data-meta-item": "",
title: "事务所",
- children: [/* @__PURE__ */ (0, L.jsx)(UP, { name: "briefcase" }), /* @__PURE__ */ (0, L.jsx)("span", { children: o })]
+ children: [/* @__PURE__ */ (0, L.jsx)(HP, { name: "briefcase" }), /* @__PURE__ */ (0, L.jsx)("span", { children: o })]
}) : null,
e ? /* @__PURE__ */ (0, L.jsxs)("div", {
"data-meta-item": "names",
children: [
- /* @__PURE__ */ (0, L.jsx)(UP, { name: "id-card" }),
+ /* @__PURE__ */ (0, L.jsx)(HP, { name: "id-card" }),
/* @__PURE__ */ (0, L.jsx)("span", {
"data-alias-names": "",
title: "别名",
children: e.names.map((e, t) => /* @__PURE__ */ (0, L.jsx)("span", { children: e }, t))
}),
- e.rest > 0 ? /* @__PURE__ */ (0, L.jsx)(qP, {
+ e.rest > 0 ? /* @__PURE__ */ (0, L.jsx)(KP, {
id: "entityAliasPop",
hook: "alias",
rest: e.rest,
label: `另外 ${e.rest} 个别名`,
heading: `${e.total} 个别名`,
- children: /* @__PURE__ */ (0, L.jsx)("dl", { children: (t.name_groups?.groups || []).map((e, t) => /* @__PURE__ */ (0, L.jsx)(Koe, {
+ children: /* @__PURE__ */ (0, L.jsx)("dl", { children: (t.name_groups?.groups || []).map((e, t) => /* @__PURE__ */ (0, L.jsx)(qoe, {
label: e.label,
names: e.names
}, t)) })
@@ -37829,25 +37829,25 @@ function Goe({ kind: e, entity: t, actions: r }) {
]
});
}
-function Koe({ label: e, names: t }) {
+function qoe({ label: e, names: t }) {
return /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [e ? /* @__PURE__ */ (0, L.jsx)("dt", { children: e }) : null, /* @__PURE__ */ (0, L.jsx)("dd", {
"data-wide": e ? void 0 : "",
children: t.map((e, t) => /* @__PURE__ */ (0, L.jsxs)("span", { children: [e.name, e.reading ? /* @__PURE__ */ (0, L.jsx)("small", { children: e.reading }) : null] }, t))
})] });
}
-function qoe({ glyph: e, label: t, clip: n, children: r }) {
- return /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsxs)("dt", { children: [/* @__PURE__ */ (0, L.jsx)(UP, { name: e }), t] }), /* @__PURE__ */ (0, L.jsx)("dd", {
+function Joe({ glyph: e, label: t, clip: n, children: r }) {
+ return /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsxs)("dt", { children: [/* @__PURE__ */ (0, L.jsx)(HP, { name: e }), t] }), /* @__PURE__ */ (0, L.jsx)("dd", {
"data-fact": e === "tags" ? "tags" : n ? "clip" : e === "calendar-range" ? "num" : void 0,
title: n,
children: r
})] });
}
-function Joe({ tags: e }) {
- let { shown: t, rest: n } = Voe(e);
+function Yoe({ tags: e }) {
+ let { shown: t, rest: n } = Hoe(e);
return /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [t.map((e) => /* @__PURE__ */ (0, L.jsx)("span", {
"data-fact-tag": "",
children: e
- }, e)), n ? /* @__PURE__ */ (0, L.jsx)(qP, {
+ }, e)), n ? /* @__PURE__ */ (0, L.jsx)(KP, {
id: "entityTagPop",
hook: "fact",
rest: n,
@@ -37862,10 +37862,10 @@ function Joe({ tags: e }) {
})
}) : null] });
}
-function QP({ mark: e }) {
+function ZP({ mark: e }) {
if ("brand" in e) return /* @__PURE__ */ (0, L.jsx)("span", {
"data-link-icon": "brand",
- children: /* @__PURE__ */ (0, L.jsx)(UP, { name: e.brand })
+ children: /* @__PURE__ */ (0, L.jsx)(HP, { name: e.brand })
});
let t = s("globe") + ("site" in e ? `<img src="${r(e.site)}" alt="" loading="lazy" referrerpolicy="no-referrer" data-drop="self">` : "");
return /* @__PURE__ */ (0, L.jsx)("span", {
@@ -37873,7 +37873,7 @@ function QP({ mark: e }) {
dangerouslySetInnerHTML: { __html: t }
});
}
-function Yoe({ link: e }) {
+function Xoe({ link: e }) {
switch (e.type) {
case "icon": return /* @__PURE__ */ (0, L.jsx)("a", {
"data-link": "icon",
@@ -37882,19 +37882,19 @@ function Yoe({ link: e }) {
rel: "noreferrer",
title: e.title,
"aria-label": e.title,
- children: /* @__PURE__ */ (0, L.jsx)(QP, { mark: e.mark })
+ children: /* @__PURE__ */ (0, L.jsx)(ZP, { mark: e.mark })
});
case "gone": return /* @__PURE__ */ (0, L.jsx)("span", {
"data-link": "gone",
tabIndex: 0,
title: e.title,
"aria-label": e.title,
- children: /* @__PURE__ */ (0, L.jsx)(QP, { mark: { globe: !0 } })
+ children: /* @__PURE__ */ (0, L.jsx)(ZP, { mark: { globe: !0 } })
});
case "private": return /* @__PURE__ */ (0, L.jsxs)("span", {
"data-link": "private",
title: "私人馆藏来源记录,不直接打开下载页",
- children: [/* @__PURE__ */ (0, L.jsx)(QP, { mark: { globe: !0 } }), /* @__PURE__ */ (0, L.jsxs)("span", {
+ children: [/* @__PURE__ */ (0, L.jsx)(ZP, { mark: { globe: !0 } }), /* @__PURE__ */ (0, L.jsxs)("span", {
"data-link-label": "",
children: ["来源 · ", e.label]
})]
@@ -37905,14 +37905,14 @@ function Yoe({ link: e }) {
target: "_blank",
rel: "noreferrer",
title: e.title,
- children: [/* @__PURE__ */ (0, L.jsx)(QP, { mark: e.mark }), /* @__PURE__ */ (0, L.jsx)("span", {
+ children: [/* @__PURE__ */ (0, L.jsx)(ZP, { mark: e.mark }), /* @__PURE__ */ (0, L.jsx)("span", {
"data-link-label": "",
children: e.text
})]
});
}
}
-function Xoe({ entity: e, actions: t, helpers: n }) {
+function Zoe({ entity: e, actions: t, helpers: n }) {
let [r, i] = (0, I.useState)(!!e.feed?.following), [a, o] = (0, I.useState)(!1), s = (0, I.useRef)(!1), c = async (e) => {
if (s.current) return !1;
s.current = !0, o(!0);
@@ -37930,31 +37930,31 @@ function Xoe({ entity: e, actions: t, helpers: n }) {
};
return /* @__PURE__ */ (0, L.jsxs)("div", {
"data-entry-marks": "",
- children: [ZP(e).map((e, t) => /* @__PURE__ */ (0, L.jsxs)("a", {
+ children: [XP(e).map((e, t) => /* @__PURE__ */ (0, L.jsxs)("a", {
"data-entry-mark": "",
href: e.url,
target: "_blank",
rel: "noreferrer",
title: e.label,
"aria-label": e.label,
- children: [e.mark ? /* @__PURE__ */ (0, L.jsx)(UP, { name: e.mark }) : /* @__PURE__ */ (0, L.jsxs)("span", {
+ children: [e.mark ? /* @__PURE__ */ (0, L.jsx)(HP, { name: e.mark }) : /* @__PURE__ */ (0, L.jsxs)("span", {
"data-missav-mark": "",
children: [/* @__PURE__ */ (0, L.jsx)("span", { children: "MISS" }), /* @__PURE__ */ (0, L.jsx)("span", { children: "AV" })]
}), e.ordinal ? /* @__PURE__ */ (0, L.jsx)("span", {
"data-entry-ordinal": "",
children: e.ordinal
}) : null]
- }, t)), e.feed ? /* @__PURE__ */ (0, L.jsx)(Noe, {
+ }, t)), e.feed ? /* @__PURE__ */ (0, L.jsx)(Poe, {
following: r,
busy: a,
onToggle: (e) => {
l(e);
},
- tip: Loe(r)
+ tip: Roe(r)
}) : null]
});
}
-function Zoe({ feedNew: e, host: t, actions: n, helpers: r }) {
+function Qoe({ feedNew: e, host: t, actions: n, helpers: r }) {
let i = (0, I.useRef)(null), a = e?.items.length ? e.html : "";
(0, I.useLayoutEffect)(() => {
t.removeAttribute("aria-busy"), t.hidden = !a;
@@ -37978,7 +37978,7 @@ function Zoe({ feedNew: e, host: t, actions: n, helpers: r }) {
}
//#endregion
//#region src/follow-sort.ts
-var $P = [
+var QP = [
["checked", "检查时间"],
["added", "添加时间"],
["name", "创作者名称"],
@@ -37986,7 +37986,7 @@ var $P = [
["source", "来源名称"],
["provider", "站点"],
["status", "状态"]
-], Qoe = "checked", eF = {
+], $oe = "checked", $P = {
checked: "desc",
added: "desc",
name: "asc",
@@ -37994,32 +37994,32 @@ var $P = [
source: "asc",
provider: "asc",
status: "asc"
-}, $oe = (e) => $P.some(([t]) => t === e);
-function tF(e, t) {
- let n = $oe(e) ? e : Qoe;
+}, ese = (e) => QP.some(([t]) => t === e);
+function eF(e, t) {
+ let n = ese(e) ? e : $oe;
return {
sort: n,
- dir: t === "asc" || t === "desc" ? t : eF[n]
+ dir: t === "asc" || t === "desc" ? t : $P[n]
};
}
//#endregion
//#region src/react/follow-manage/follow-manage.ts
-var nF = "/api/follow", rF = "/api/follow/credentials", iF = "/api/follow/check", aF = "/api/follow/source", oF = "/api/follow/resolve", ese = "/api/follow/suggest", sF = "/api/follow/author-alias", tse = "/api/follow/credential", cF = "/api/follow/status", nse = "/api/feeds", lF = "/api/feeds/source", rse = "/api/feeds/check", ise = "/api/feeds/lookup", uF = ["follow-manage"], dF = ["follow-manage", "credentials"], ase = ["follow-manage", "check"], ose = ["follow-manage", "resolve"], fF = ["follow-manage", "feeds"], sse = (e) => [
+var tF = "/api/follow", nF = "/api/follow/credentials", rF = "/api/follow/check", iF = "/api/follow/source", aF = "/api/follow/resolve", tse = "/api/follow/suggest", oF = "/api/follow/author-alias", nse = "/api/follow/credential", sF = "/api/follow/status", rse = "/api/feeds", cF = "/api/feeds/source", ise = "/api/feeds/check", ase = "/api/feeds/lookup", lF = ["follow-manage"], uF = ["follow-manage", "credentials"], ose = ["follow-manage", "check"], sse = ["follow-manage", "resolve"], dF = ["follow-manage", "feeds"], cse = (e) => [
"follow-manage",
"suggest",
e
-], pF = [["default", "默认视图"], ["table", "表格视图"]], mF = [
+], fF = [["default", "默认视图"], ["table", "表格视图"]], pF = [
10,
20,
50,
100
-], cse = Object.fromEntries($P), hF = {
+], lse = Object.fromEntries(QP), mF = {
author: "name",
source: "source",
provider: "provider",
status: "status",
checked: "checked"
-}, lse = (e) => pF.some(([t]) => t === e), use = (e) => mF.includes(Number(e)) ? Number(e) : 20, dse = {
+}, use = (e) => fF.some(([t]) => t === e), dse = (e) => pF.includes(Number(e)) ? Number(e) : 20, fse = {
checked: ["从近到远", "从远到近"],
added: ["从近到远", "从远到近"],
name: ["倒序", "正序"],
@@ -38027,25 +38027,25 @@ var nF = "/api/follow", rF = "/api/follow/credentials", iF = "/api/follow/check"
source: ["倒序", "正序"],
provider: ["倒序", "正序"],
status: ["倒序", "正序"]
-}, fse = (e, t) => `按${cse[e]}${dse[e][t === "asc" ? 0 : 1]}排序`;
-function gF(e) {
+}, pse = (e, t) => `按${lse[e]}${fse[e][t === "asc" ? 0 : 1]}排序`;
+function hF(e) {
let t = e.last_status;
return t === "error" || t === "unauthorized" ? 0 : e.enabled ? t === "ok" ? 3 : 2 : 1;
}
-function pse(e) {
+function mse(e) {
return e.history_exhausted ? "没有更多" : e.enabled ? e.last_status === "ok" ? "正常" : e.last_status === "error" || e.last_status === "unauthorized" ? "检查失败" : "未检查" : "已暂停";
}
-var _F = (e) => e.last_status === "error" || e.last_status === "unauthorized", vF = (e, t) => String(e.label || "").localeCompare(String(t.label || ""), "zh-CN", { numeric: !0 }), yF = {
- source: vF,
- provider: (e, t) => String(e.provider_label || "").localeCompare(String(t.provider_label || ""), "zh-CN") || vF(e, t),
- status: (e, t) => gF(e) - gF(t) || vF(e, t)
-}, bF = (e) => Date.parse(e || "") || 0, xF = (e) => String(e || "").replace(/\s*[·|]\s*[A-Za-z0-9_-]+\s*$/, "").replace(/\s+collections?\s*$/i, "").trim();
-function SF(e, t = []) {
+var gF = (e) => e.last_status === "error" || e.last_status === "unauthorized", _F = (e, t) => String(e.label || "").localeCompare(String(t.label || ""), "zh-CN", { numeric: !0 }), vF = {
+ source: _F,
+ provider: (e, t) => String(e.provider_label || "").localeCompare(String(t.provider_label || ""), "zh-CN") || _F(e, t),
+ status: (e, t) => hF(e) - hF(t) || _F(e, t)
+}, yF = (e) => Date.parse(e || "") || 0, bF = (e) => String(e || "").replace(/\s*[·|]\s*[A-Za-z0-9_-]+\s*$/, "").replace(/\s+collections?\s*$/i, "").trim();
+function xF(e, t = []) {
if (!e.length) return "";
- let n = (e) => String(e.author_name || "").trim() || xF(e.label), r = e.find((e) => e.entity_name);
+ let n = (e) => String(e.author_name || "").trim() || bF(e.label), r = e.find((e) => e.entity_name);
if (r) return r.entity_name;
let i = t.find((t) => `name:${t.canonical_key}` === e[0]?.author_key);
- if (i) return xF(i.canonical_name);
+ if (i) return bF(i.canonical_name);
let a = e.find((e) => e.official_avatar_url);
if (a && n(a)) return n(a);
let o = e.map(n).filter(Boolean);
@@ -38053,18 +38053,18 @@ function SF(e, t = []) {
let s = (e) => (e.match(/[A-Z]/g) || []).length;
return o.reduce((e, t) => s(t) > s(e) ? t : e, o[0]);
}
-function mse(e) {
+function hse(e) {
let t = e.trim().match(/[A-Za-z0-9]/);
return (t ? t[0] : Array.from(e.trim())[0] || "?").toUpperCase();
}
-function hse(e) {
+function gse(e) {
let t = e.find((e) => e.official_avatar_url), n = e.find((e) => e.avatar_url), r = t?.official_avatar_url || n?.avatar_url || "";
return {
src: r,
fallback: t && n && n.avatar_url !== r && n.avatar_url || ""
};
}
-function CF(e) {
+function SF(e) {
let t = [], n = /* @__PURE__ */ new Map();
for (let r of e) {
let e = r.author_key || `source:${r.id}`;
@@ -38072,32 +38072,32 @@ function CF(e) {
}
return t.map((e) => n.get(e));
}
-function gse(e, t, n, r = []) {
- let i = CF(e), a = n === eF[t] ? 1 : -1, o = (e) => SF(e, r), s = (e, t) => o(e).localeCompare(o(t), "zh-CN", { numeric: !0 }), c = yF[t];
+function _se(e, t, n, r = []) {
+ let i = SF(e), a = n === $P[t] ? 1 : -1, o = (e) => xF(e, r), s = (e, t) => o(e).localeCompare(o(t), "zh-CN", { numeric: !0 }), c = vF[t];
if (c) {
for (let e of i) e.sort((e, t) => a * c(e, t));
return i.sort((e, t) => a * c(e[0], t[0]) || s(e, t));
}
- let l = (e) => Math.max(...e.map((e) => bF(e.last_checked_at))), u = (e) => Math.max(...e.map((e) => bF(e.created_at)));
+ let l = (e) => Math.max(...e.map((e) => yF(e.last_checked_at))), u = (e) => Math.max(...e.map((e) => yF(e.created_at)));
return i.sort((e, n) => t === "name" ? a * s(e, n) : t === "sources" ? a * (n.length - e.length) || s(e, n) : t === "added" ? a * (u(n) - u(e)) || s(e, n) : a * (l(n) - l(e)) || s(e, n));
}
-function _se(e, t, n, r = []) {
+function vse(e, t, n, r = []) {
let i = e.flatMap((e) => {
- let t = SF(e, r);
+ let t = xF(e, r);
return e.map((n) => ({
source: n,
group: e,
author: t
}));
- }), a = yF[t];
+ }), a = vF[t];
if (a) {
- let e = n === eF[t] ? 1 : -1;
+ let e = n === $P[t] ? 1 : -1;
i.sort((t, n) => e * a(t.source, n.source));
}
return i;
}
-function wF(e, t, n) {
- let r = TE(e, t), i = EE(n, r), a = (i - 1) * t;
+function CF(e, t, n) {
+ let r = CE(e, t), i = wE(n, r), a = (i - 1) * t;
return {
page: i,
pages: r,
@@ -38106,91 +38106,91 @@ function wF(e, t, n) {
end: Math.min(a + t, e)
};
}
-function vse(e, t) {
+function yse(e, t) {
let n = new Set(t.map((e) => e.id));
return new Set([...e].filter((e) => n.has(e)));
}
-function TF(e, t) {
+function wF(e, t) {
let n = t.filter((t) => e.has(t)).length;
return {
all: t.length > 0 && n === t.length,
some: n > 0 && n < t.length
};
}
-function EF(e, t, n) {
+function TF(e, t, n) {
let r = new Set(e);
for (let e of t) n ? r.add(e) : r.delete(e);
return r;
}
-var DF = (e) => gw(`${nF}?summary=1`, e), OF = (e) => gw(rF, e), yse = (e) => gw(iF, e), bse = (e) => gw(oF, e), xse = (e, t) => gw(`${ese}?q=${encodeURIComponent(e)}`, t), kF = (e) => q(iF, {
+var EF = (e) => hw(`${tF}?summary=1`, e), DF = (e) => hw(nF, e), bse = (e) => hw(rF, e), xse = (e) => hw(aF, e), Sse = (e, t) => hw(`${tse}?q=${encodeURIComponent(e)}`, t), OF = (e) => q(rF, {
...e?.length ? { sources: e } : {},
background: !0
-}), Sse = (e) => q(oF, {
+}), Cse = (e) => q(aF, {
lines: e,
background: !0
-}), AF = (e, t) => q(aF, {
+}), kF = (e, t) => q(iF, {
action: "enabled",
id: e,
enabled: t
-}), jF = (e) => q(aF, {
+}), AF = (e) => q(iF, {
action: "remove",
id: e
-}), Cse = (e) => q(aF, {
+}), wse = (e) => q(iF, {
action: "add",
url: e.url,
label: e.label,
author: e.author || "",
aliases: e.aliases || [],
defer_check: !0
-}), MF = (e, t) => q(sF, {
+}), jF = (e, t) => q(oF, {
action: "add",
canonical: e,
alias: t
-}), wse = (e) => q(sF, {
+}), Tse = (e) => q(oF, {
action: "remove",
alias: e
-}), Tse = (e, t) => q(tse, {
+}), Ese = (e, t) => q(nse, {
provider: e,
values: t
-}), Ese = (e, t) => q(cF, {
+}), Dse = (e, t) => q(sF, {
item: e,
to: t
-}), Dse = () => gw(`${nF}?status=new&limit=1000`);
-async function NF(e) {
- let t = await gw(nse, e);
+}), Ose = () => hw(`${tF}?status=new&limit=1000`);
+async function MF(e) {
+ let t = await hw(rse, e);
if (!Array.isArray(t?.sources)) throw Error("没有读到订阅源");
return t;
}
-var PF = (e, t, n) => q(lF, {
+var NF = (e, t, n) => q(cF, {
action: "enabled",
id: e,
enabled: t
-}, "POST", n), FF = (e, t) => q(lF, {
+}, "POST", n), PF = (e, t) => q(cF, {
action: "remove",
id: e
-}, "POST", t), IF = (e, t) => q(rse, t?.length ? { sources: t } : { all: !0 }, "POST", e), Ose = (e, t) => gw(`${ise}?q=${encodeURIComponent(e)}`, t), kse = (e, t, n) => q(lF, {
+}, "POST", t), FF = (e, t) => q(ise, t?.length ? { sources: t } : { all: !0 }, "POST", e), kse = (e, t) => hw(`${ase}?q=${encodeURIComponent(e)}`, t), Ase = (e, t, n) => q(cF, {
action: "follow-name",
name: e,
ids: t
}, "POST", n);
-async function Ase(e, t = "") {
+async function jse(e, t = "") {
await Promise.all([
X.fetchQuery({
- queryKey: uF,
- queryFn: () => DF(e)
+ queryKey: lF,
+ queryFn: () => EF(e)
}),
X.fetchQuery({
- queryKey: dF,
- queryFn: () => OF(e)
+ queryKey: uF,
+ queryFn: () => DF(e)
}),
t === "feeds" ? X.fetchQuery({
- queryKey: fF,
- queryFn: () => NF(e)
+ queryKey: dF,
+ queryFn: () => MF(e)
}) : null
]);
}
-function LF(e, t) {
- X.setQueryData(uF, (n) => n && {
+function IF(e, t) {
+ X.setQueryData(lF, (n) => n && {
...n,
sources: n.sources.map((n) => n.id === e ? {
...n,
@@ -38198,24 +38198,24 @@ function LF(e, t) {
} : n)
});
}
-function RF(e) {
+function LF(e) {
let t = new Set(e);
- X.setQueryData(uF, (e) => e && {
+ X.setQueryData(lF, (e) => e && {
...e,
sources: e.sources.filter((e) => !t.has(e.id))
});
}
-var zF = () => X.invalidateQueries({
- queryKey: uF,
+var RF = () => X.invalidateQueries({
+ queryKey: lF,
exact: !0
});
-function jse(e) {
+function Mse(e) {
let t = e.results || [], n = (e) => t.reduce((t, n) => t + (e(n) || 0), 0), r = n((e) => e.added), i = n((e) => e.updated), a = n((e) => e.skipped_compilations), o = n((e) => e.skipped) - a, s = n((e) => e.history_skipped), c = n((e) => e.probed), l = t.filter((e) => e.ok && !e.added && !e.updated).length, u = t.filter((e) => !e.ok).length, d = [];
r && d.push(`新增 ${r} 条`), i && d.push(`更新 ${i} 条`), o && d.push(`跳过 ${o} 条无资源`), a && d.push(`排除 ${a} 个超大合集`), s && d.push(`跳过 ${s} 条超出首次采集范围的历史内容`), c && d.push(`回查 ${c} 条`), l && d.push(`${l} 个来源没有更新`), d.length || d.push("没有任何更新");
let f = t.filter((e) => e.exhausted).length;
return f && d.push(`${f} 个没有更多内容`), u && d.push(`${u} 个失败`), `检查了 ${t.length} 个来源:${d.join(" · ")}`;
}
-var Mse = (e) => (e?.results || []).filter((e) => !e.ok), Nse = (e) => (e?.results || []).find((e) => e.evidence_error)?.evidence_error || "", BF = (e) => e.last_checked_at ? OE(e.last_checked_at) : "未检查", Pse = /* @__PURE__ */ new Set([
+var Nse = (e) => (e?.results || []).filter((e) => !e.ok), Pse = (e) => (e?.results || []).find((e) => e.evidence_error)?.evidence_error || "", zF = (e) => e.last_checked_at ? EE(e.last_checked_at) : "未检查", Fse = /* @__PURE__ */ new Set([
"fanbox",
"patreon",
"subscribestar",
@@ -38228,50 +38228,50 @@ var Mse = (e) => (e?.results || []).filter((e) => !e.ok), Nse = (e) => (e?.resul
"gofile",
"f95zone",
"simpcity"
-]), Fse = (e) => Pse.has(e) ? `/source-icon?provider=${encodeURIComponent(e)}` : "", Ise = {
+]), Ise = (e) => Fse.has(e) ? `/source-icon?provider=${encodeURIComponent(e)}` : "", Lse = {
required: "需要",
optional: "可选",
none: "不需要",
blocked: "接不进来"
-}, VF = (e) => !!e.present && !e.missing.length, Lse = [
+}, BF = (e) => !!e.present && !e.missing.length, Rse = [
["", "全部"],
["new", "未看"],
["saved", "已保存"],
["ignored", "已忽略"]
-], Rse = [
+], zse = [
["new", "更新时间"],
["hot", "热度"],
["dur", "时长"]
-], HF = {
+], VF = {
new: ["从新到旧", "从旧到新"],
hot: ["从高到低", "从低到高"],
dur: ["从长到短", "从短到长"]
};
-function UF(e, t) {
+function HF(e, t) {
let n = (e) => encodeURIComponent(e.join(","));
return `/api/follow?limit=300&offset=${t}` + (e.status ? `&status=${e.status}` : "") + (e.author ? `&author=${n([e.author])}` : "") + (e.provider ? `&provider=${n([e.provider])}` : "") + (e.tags.length ? `&tag=${n(e.tags)}` : "") + (e.work ? `&work=${n([e.work])}` : "") + (e.sort === "new" ? "" : `&sort=${e.sort}`) + (e.sort === "rand" ? `&seed=${e.seed}` : "") + (e.dir === "desc" ? "" : `&dir=${e.dir}`);
}
-function WF(e, t) {
+function UF(e, t) {
return {
queryKey: [
"follow-feed",
- UF(e, 0),
+ HF(e, 0),
t
],
- queryFn: ({ pageParam: t, signal: n }) => gw(UF(e, t), n),
+ queryFn: ({ pageParam: t, signal: n }) => hw(HF(e, t), n),
initialPageParam: 0,
getNextPageParam: (e) => e.has_more ? (e.offset || 0) + 300 : void 0,
placeholderData: Pe
};
}
-var GF = ["follow-feed", "credentials"], KF = (e) => gw(rF, e).catch(() => ({ providers: [] }));
-async function zse(e, t) {
- let n = WF(e.view, e.revision);
+var WF = ["follow-feed", "credentials"], GF = (e) => hw(nF, e).catch(() => ({ providers: [] }));
+async function Bse(e, t) {
+ let n = UF(e.view, e.revision);
X.removeQueries({
queryKey: n.queryKey,
exact: !0
}), X.removeQueries({
- queryKey: GF,
+ queryKey: WF,
exact: !0
}), await Promise.all([X.fetchInfiniteQuery({
queryKey: n.queryKey,
@@ -38282,11 +38282,11 @@ async function zse(e, t) {
initialPageParam: 0,
getNextPageParam: n.getNextPageParam
}), X.fetchQuery({
- queryKey: GF,
- queryFn: () => KF(t)
+ queryKey: WF,
+ queryFn: () => GF(t)
})]);
}
-function qF(e) {
+function KF(e) {
if (!e?.pages.length) return null;
let t = e.pages, n = t[t.length - 1];
return {
@@ -38295,10 +38295,10 @@ function qF(e) {
groups: t.flatMap((e) => e.groups || [])
};
}
-function JF(e, t, n) {
+function qF(e, t, n) {
return [...e].sort((e, r) => f(n, t(e)) - f(n, t(r)) || String(t(e)).localeCompare(String(t(r))));
}
-function YF(e) {
+function JF(e) {
let t = /* @__PURE__ */ new Set();
return [
e.primary,
@@ -38306,12 +38306,12 @@ function YF(e) {
...e.duplicates
].filter((e) => !e || t.has(e.id) ? !1 : (t.add(e.id), !0));
}
-function Bse(e) {
+function Vse(e) {
for (let [, t] of X.getQueriesData({ queryKey: ["follow-feed"] })) {
if (!Array.isArray(t?.pages) || !t.pages.length) continue;
let n = t.pages[t.pages.length - 1];
for (let r of t.pages) for (let t of r.groups || []) {
- let r = YF(t).find((t) => t.id === e);
+ let r = JF(t).find((t) => t.id === e);
if (r) return {
item: r,
group: t,
@@ -38322,7 +38322,7 @@ function Bse(e) {
}
return null;
}
-function Vse(e) {
+function Hse(e) {
X.setQueriesData({
queryKey: ["follow-feed"],
predicate: (e) => Array.isArray(e.state.data?.pages)
@@ -38332,7 +38332,7 @@ function Vse(e) {
...t,
groups: (t.groups || []).map((t) => {
let n = (t) => t.id === e.id ? e : t;
- return YF(t).some((t) => t.id === e.id) ? {
+ return JF(t).some((t) => t.id === e.id) ? {
...t,
primary: n(t.primary),
variants: t.variants.map(n),
@@ -38342,39 +38342,39 @@ function Vse(e) {
}))
});
}
-function Hse(e, t) {
+function Use(e, t) {
X.setQueriesData({
queryKey: ["follow-feed"],
predicate: (e) => Array.isArray(e.state.data?.pages)
- }, (n) => n && rI(n, null, e, t));
+ }, (n) => n && nI(n, null, e, t));
}
-function XF(e) {
- return YF(e).sort((e, t) => (Date.parse(t.published_at || "") || 0) - (Date.parse(e.published_at || "") || 0) || (+t.id || 0) - (+e.id || 0));
+function YF(e) {
+ return JF(e).sort((e, t) => (Date.parse(t.published_at || "") || 0) - (Date.parse(e.published_at || "") || 0) || (+t.id || 0) - (+e.id || 0));
}
-function ZF(e) {
+function XF(e) {
let t = /* @__PURE__ */ new Set(), n = e.media_items || [];
return n.length ? n.forEach((e) => {
(e.media_kind === "image" || e.media_kind === "video") && t.add(e.media_kind);
}) : (e.media_kind === "image" || e.media_kind === "video") && t.add(e.media_kind), t;
}
-function QF(e) {
+function ZF(e) {
let t = /* @__PURE__ */ new Set();
- return YF(e).forEach((e) => ZF(e).forEach((e) => t.add(e))), t;
+ return JF(e).forEach((e) => XF(e).forEach((e) => t.add(e))), t;
}
-function $F(e, t) {
+function QF(e, t) {
let n = t === "images" ? "image" : "video";
- return XF(e).find((e) => ZF(e).has(n)) || e.primary;
+ return YF(e).find((e) => XF(e).has(n)) || e.primary;
}
-function eI(e) {
- return XF(e).filter((e) => e.playable && e.media_kind === "video");
+function $F(e) {
+ return YF(e).filter((e) => e.playable && e.media_kind === "video");
}
-var tI = {
+var eI = {
video: "个视频",
image: "张图片",
mixed: "个媒体"
};
-function Use({ cover: e = "", coverFace: t = null, stack: n = null, imageView: r = !1, limit: i = 9 } = {}) {
- let a = n?.media || 0, o = n?.copies || 0, s = n?.kind || "", c = a > 1 ? `${a} ${tI[s] || tI.mixed}` : o > 1 ? `${o} 个来源` : "", l = s === "image" || s !== "video" && r ? "pics" : "play", u = /* @__PURE__ */ new Set([t ?? e]), d = e ? [e] : [];
+function Wse({ cover: e = "", coverFace: t = null, stack: n = null, imageView: r = !1, limit: i = 9 } = {}) {
+ let a = n?.media || 0, o = n?.copies || 0, s = n?.kind || "", c = a > 1 ? `${a} ${eI[s] || eI.mixed}` : o > 1 ? `${o} 个来源` : "", l = s === "image" || s !== "video" && r ? "pics" : "play", u = /* @__PURE__ */ new Set([t ?? e]), d = e ? [e] : [];
for (let t of n?.faces || []) r && t.media_kind !== "image" || !t.thumb_url || t.thumb_url === e || u.has(t.face) || (u.add(t.face), d.push(t.thumb_url));
return {
isMix: !!c,
@@ -38383,14 +38383,14 @@ function Use({ cover: e = "", coverFace: t = null, stack: n = null, imageView: r
faces: d.length > 1 ? d.slice(0, i) : []
};
}
-function Wse(e) {
+function Gse(e) {
let t = e.filter((e) => e.can_backfill).map((e) => (e.backfill_page || 0) + 1);
if (!t.length) return "";
let n = Math.max(...t), r = Math.min(...t);
return n <= 1 ? "每个来源都只抓了第 1 页" : r === n ? `每个来源都抓到第 ${n} 页` : `已抓到第 ${r}–${n} 页`;
}
-function nI(e, t, n) {
- return e === t ? HF[e] ? {
+function tI(e, t, n) {
+ return e === t ? VF[e] ? {
sort: e,
dir: n === "asc" ? "desc" : "asc"
} : null : {
@@ -38398,13 +38398,13 @@ function nI(e, t, n) {
dir: "desc"
};
}
-function Gse(e, t, n, r) {
- let i = nI(e, n, r);
+function Kse(e, t, n, r) {
+ let i = tI(e, n, r);
if (!i) return "";
- let a = HF[i.sort];
+ let a = VF[i.sort];
return `按${t}${a ? a[+(i.dir === "asc")] : ""}排序`;
}
-function rI(e, t, n, r) {
+function nI(e, t, n, r) {
let i = "", a = e.pages.map((e) => ({
...e,
groups: (e.groups || []).flatMap((e) => {
@@ -38434,7 +38434,7 @@ function rI(e, t, n, r) {
})
};
}
-function Kse(e, t) {
+function qse(e, t) {
let n = [];
return e.author && n.push({
kind: "创作者",
@@ -38454,7 +38454,7 @@ function Kse(e, t) {
label: e
})), n;
}
-function qse(e, t) {
+function Jse(e, t) {
return t.kind === "创作者" ? {
...e,
author: ""
@@ -38469,7 +38469,7 @@ function qse(e, t) {
tags: e.tags.filter((e) => e !== t.key)
};
}
-function Jse(e, t) {
+function Yse(e, t) {
for (let n of e) {
let e = n.primary?.tag_types?.[t];
if (e) return e;
@@ -38478,11 +38478,11 @@ function Jse(e, t) {
}
//#endregion
//#region src/react/follow-detail/follow-detail.ts
-var iI = (e) => ["follow-item", e], Yse = (e) => `/api/follow?item=${encodeURIComponent(e)}`, Xse = "/api/follow/save", Zse = "/api/follow/media/hide";
-async function aI(e, t) {
- let n = await gw(Yse(e), t);
+var rI = (e) => ["follow-item", e], Xse = (e) => `/api/follow?item=${encodeURIComponent(e)}`, Zse = "/api/follow/save", Qse = "/api/follow/media/hide";
+async function iI(e, t) {
+ let n = await hw(Xse(e), t);
for (let t of n.groups || []) {
- let r = YF(t).find((t) => t.id === e);
+ let r = JF(t).find((t) => t.id === e);
if (r) return {
item: r,
group: t,
@@ -38492,21 +38492,21 @@ async function aI(e, t) {
}
throw Error("这条关注内容已不存在");
}
-async function Qse(e, t) {
- let n = iI(e.id), r = Bse(e.id), i = X.getQueryData(GF) ? null : X.fetchQuery({
- queryKey: GF,
- queryFn: () => KF(t)
+async function $se(e, t) {
+ let n = rI(e.id), r = Vse(e.id), i = X.getQueryData(WF) ? null : X.fetchQuery({
+ queryKey: WF,
+ queryFn: () => GF(t)
});
r ? X.setQueryData(n, {
...r,
item: r.item
}) : await X.fetchQuery({
queryKey: n,
- queryFn: () => aI(e.id, t)
+ queryFn: () => iI(e.id, t)
}), await i;
}
-function $se(e, t, n, r) {
- let i = e.media_items || [], a = r === "images" ? "image" : "video", o = i.find((e) => e.media_kind === a) || i[0], s = i.length ? i.find((e) => e.index === (n ?? o.index)) || o : null, c = i.filter((e) => e.media_kind === "image"), l = c.findIndex((e) => e.index === s?.index), u = c.length > 1 && l >= 0, d = i.length > 1 && !u, f = !i.length && t && eI(t).length > 1 ? t : null, p = s?.media_kind || e.media_kind || "", m = (u ? [...c, e] : [s, e]).filter((e) => !!e && (e.width || 0) > 0 && (e.height || 0) > 0);
+function ece(e, t, n, r) {
+ let i = e.media_items || [], a = r === "images" ? "image" : "video", o = i.find((e) => e.media_kind === a) || i[0], s = i.length ? i.find((e) => e.index === (n ?? o.index)) || o : null, c = i.filter((e) => e.media_kind === "image"), l = c.findIndex((e) => e.index === s?.index), u = c.length > 1 && l >= 0, d = i.length > 1 && !u, f = !i.length && t && $F(t).length > 1 ? t : null, p = s?.media_kind || e.media_kind || "", m = (u ? [...c, e] : [s, e]).filter((e) => !!e && (e.width || 0) > 0 && (e.height || 0) > 0);
return {
embedded: i,
selected: s,
@@ -38520,32 +38520,32 @@ function $se(e, t, n, r) {
src: e.playable ? `/follow-stream?id=${e.id}${s ? `&media=${s.index}` : ""}` : ""
};
}
-var ece = (e) => YF(e).find((e) => (e.media_items || []).some((e) => e.resource_group)), tce = {
+var tce = (e) => JF(e).find((e) => (e.media_items || []).some((e) => e.resource_group)), nce = {
"gofile.io": "Gofile",
"pixeldrain.com": "Pixeldrain",
"mega.nz": "MEGA",
"mega.io": "MEGA",
"mediafire.com": "MediaFire",
"drive.google.com": "Google Drive"
-}, nce = {
+}, rce = {
gofile: "Gofile",
pixeldrain: "Pixeldrain",
mega: "MEGA",
mediafire: "MediaFire",
google_drive: "Google Drive"
};
-function rce(e) {
+function ice(e) {
try {
let t = new URL(e).hostname.replace(/^www\./, "");
- return tce[t] || t;
+ return nce[t] || t;
} catch {
return "外部文件页";
}
}
-function oI(e, t) {
- return nce[e?.resource_provider || ""] || t.provider_label || t.provider || "在线图片";
+function aI(e, t) {
+ return rce[e?.resource_provider || ""] || t.provider_label || t.provider || "在线图片";
}
-function ice(e, t, n = "") {
+function ace(e, t, n = "") {
let r = n;
!r && e.is_release && (r = t.variant_label || t.variant_kind || ""), r ||= t.variant_kind === "wip" ? "WIP" : t.variant_label || t.variant_kind || "视频";
let i = e.is_release ? t.summary || (t.has_media ? "(仅附件)" : "(无正文)") : t.title;
@@ -38554,56 +38554,56 @@ function ice(e, t, n = "") {
title: e.is_release && t.author ? `${t.author}:${i}` : i
};
}
-var ace = (e) => String(e.name || "").trim(), sI = (e, t) => e.tag_types?.[t] || "unknown", oce = /* @__PURE__ */ new Set([
+var oce = (e) => String(e.name || "").trim(), oI = (e, t) => e.tag_types?.[t] || "unknown", sce = /* @__PURE__ */ new Set([
"artist",
"character",
"copyright",
"metadata",
"unknown"
]);
-function sce(e, t) {
- let n = sI(e, t);
- return `r34-${oce.has(n) ? n : "general"}`;
+function cce(e, t) {
+ let n = oI(e, t);
+ return `r34-${sce.has(n) ? n : "general"}`;
}
-var cI = [
+var sI = [
"copyright",
"character",
"artist",
"general",
"metadata"
];
-function cce(e, t) {
+function lce(e, t) {
let n = e.detail_tags || e.tags || [], r = (t) => {
- let n = cI.indexOf(sI(e, t));
- return n < 0 ? cI.length : n;
+ let n = sI.indexOf(oI(e, t));
+ return n < 0 ? sI.length : n;
};
return [...n].sort((e, n) => r(e) - r(n) || t(e).localeCompare(t(n)));
}
-function lce(e, t) {
+function uce(e, t) {
let n = t.find((t) => t.id === e.source_id), r = t.filter((e) => n?.author_key && e.author_key === n.author_key);
return !r.length && n && r.push(n), r;
}
-var uce = (e, t) => ({
+var dce = (e, t) => ({
sources: e.sources,
aliases: e.aliases,
credentials: t
-}), lI = (e) => e?.size ? { size: e.size } : {};
-function dce(e, t) {
+}), cI = (e) => e?.size ? { size: e.size } : {};
+function fce(e, t) {
let { images: n, kind: r, src: i, selected: a } = t;
return n.length ? n.map((t, r) => ({
src: `/follow-stream?id=${e.id}&media=${t.index}`,
thumb: t.thumb_url || e.thumb_url || `/follow-stream?id=${e.id}&media=${t.index}`,
name: t.name || e.title,
- source: oI(t, e),
- ...lI(t),
+ source: aI(t, e),
+ ...cI(t),
position: r + 1,
total: n.length
})) : r === "image" && i ? [{
src: i,
thumb: e.thumb_url || i,
name: e.title,
- source: oI(a, e),
- ...lI(a),
+ source: aI(a, e),
+ ...cI(a),
position: 1,
total: 1
}] : e.thumb_url ? [{
@@ -38615,10 +38615,10 @@ function dce(e, t) {
total: 1
}] : [];
}
-var fce = (e) => e === "seen" ? "已标记看过" : "已更新关注状态";
+var pce = (e) => e === "seen" ? "已标记看过" : "已更新关注状态";
//#endregion
//#region src/react/components/mix-queue.tsx
-function uI({ kind: e, title: t, summary: n, onClose: r, actions: i, listRef: a, children: o, ...c }) {
+function lI({ kind: e, title: t, summary: n, onClose: r, actions: i, listRef: a, children: o, ...c }) {
return /* @__PURE__ */ (0, L.jsxs)("aside", {
className: "mixqueue",
"data-queue-kind": e,
@@ -38646,7 +38646,7 @@ function uI({ kind: e, title: t, summary: n, onClose: r, actions: i, listRef: a,
})]
});
}
-function dI({ current: e, pic: t, lead: n, after: r, row: i, children: a, ...o }) {
+function uI({ current: e, pic: t, lead: n, after: r, row: i, children: a, ...o }) {
let s = /* @__PURE__ */ (0, L.jsx)("span", {
className: "mixitemtext",
children: a
@@ -38669,29 +38669,29 @@ function dI({ current: e, pic: t, lead: n, after: r, row: i, children: a, ...o }
}), r]
});
}
-var pce = ({ label: e, count: t }) => /* @__PURE__ */ (0, L.jsxs)("h3", {
+var mce = ({ label: e, count: t }) => /* @__PURE__ */ (0, L.jsxs)("h3", {
className: "mixgrouplabel",
children: [
e,
" ",
/* @__PURE__ */ (0, L.jsx)("span", { children: t })
]
-}), fI = (e) => Number(e) > 0, mce = ({ name: e }) => /* @__PURE__ */ (0, L.jsx)("span", {
+}), dI = (e) => Number(e) > 0, hce = ({ name: e }) => /* @__PURE__ */ (0, L.jsx)("span", {
className: "contents",
dangerouslySetInnerHTML: { __html: s(e) }
-}), pI = s("external-link", "externalmark");
-function hce(e) {
+}), fI = s("external-link", "externalmark");
+function gce(e) {
let { id: t, actions: n } = e, r = Ft({
- queryKey: iI(t),
- queryFn: ({ signal: e }) => aI(t, e)
+ queryKey: rI(t),
+ queryFn: ({ signal: e }) => iI(t, e)
}), i = Ft({
- queryKey: GF,
- queryFn: ({ signal: e }) => KF(e)
+ queryKey: WF,
+ queryFn: ({ signal: e }) => GF(e)
}), a = (0, I.useMemo)(() => new Set((i.data?.providers || []).filter((e) => e.present).map((e) => e.provider)), [i.data]), [o, s] = (0, I.useState)(e.mediaIndex);
- return r.data ? /* @__PURE__ */ (0, L.jsx)(gce, {
+ return r.data ? /* @__PURE__ */ (0, L.jsx)(_ce, {
...e,
data: r.data,
- context: uce(r.data, a),
+ context: dce(r.data, a),
mediaIndex: o,
onMedia: s
}) : /* @__PURE__ */ (0, L.jsx)("div", {
@@ -38700,9 +38700,9 @@ function hce(e) {
children: /* @__PURE__ */ (0, L.jsxs)("div", {
className: "vwrap",
"data-follow-detail-media": "none",
- children: [/* @__PURE__ */ (0, L.jsx)(mI, { onClose: n.close }), /* @__PURE__ */ (0, L.jsx)("div", {
+ children: [/* @__PURE__ */ (0, L.jsx)(pI, { onClose: n.close }), /* @__PURE__ */ (0, L.jsx)("div", {
"data-follow-detail-placeholder": "",
- children: r.isError ? /* @__PURE__ */ (0, L.jsx)(Uw, {
+ children: r.isError ? /* @__PURE__ */ (0, L.jsx)(Hw, {
message: d(r.error),
onRetry: () => void r.refetch()
}) : null
@@ -38710,7 +38710,7 @@ function hce(e) {
})
});
}
-var mI = ({ onClose: e }) => /* @__PURE__ */ (0, L.jsx)("button", {
+var pI = ({ onClose: e }) => /* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
className: "closestage",
id: "closeStage",
@@ -38719,8 +38719,8 @@ var mI = ({ onClose: e }) => /* @__PURE__ */ (0, L.jsx)("button", {
onClick: e,
dangerouslySetInnerHTML: { __html: s("x") }
});
-function gce({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, helpers: a, actions: o }) {
- let { item: s, group: c } = e, l = $se(s, c, n, i), u = bce(s, o, r), d = `${s.id}:${l.selected?.index ?? ""}`, [f, p] = (0, I.useState)({
+function _ce({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, helpers: a, actions: o }) {
+ let { item: s, group: c } = e, l = ece(s, c, n, i), u = xce(s, o, r), d = `${s.id}:${l.selected?.index ?? ""}`, [f, p] = (0, I.useState)({
key: "",
kind: ""
}), m = {
@@ -38740,20 +38740,20 @@ function gce({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, hel
s,
l.kind
]);
- let h = !l.embedded.length && l.collection ? ece(l.collection) : void 0, g = l.embeddedQueue ? /* @__PURE__ */ (0, L.jsx)(vI, {
+ let h = !l.embedded.length && l.collection ? tce(l.collection) : void 0, g = l.embeddedQueue ? /* @__PURE__ */ (0, L.jsx)(_I, {
item: s,
current: l.selected.index,
helpers: a,
actions: o,
onMedia: r
- }) : l.collection ? h ? /* @__PURE__ */ (0, L.jsx)(vI, {
+ }) : l.collection ? h ? /* @__PURE__ */ (0, L.jsx)(_I, {
item: h,
current: null,
helpers: a,
actions: o,
onMedia: r,
currentId: s.id
- }) : /* @__PURE__ */ (0, L.jsx)(vce, {
+ }) : /* @__PURE__ */ (0, L.jsx)(yce, {
group: l.collection,
itemId: s.id,
helpers: a,
@@ -38763,7 +38763,7 @@ function gce({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, hel
className: g ? "sgrid mixgrid" : "sgrid",
"data-follow-detail": "",
children: [
- /* @__PURE__ */ (0, L.jsx)(_ce, {
+ /* @__PURE__ */ (0, L.jsx)(vce, {
item: s,
media: l,
helpers: a,
@@ -38772,7 +38772,7 @@ function gce({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, hel
issues: m
}, d),
g,
- /* @__PURE__ */ (0, L.jsx)(yce, {
+ /* @__PURE__ */ (0, L.jsx)(bce, {
item: s,
data: e,
context: t,
@@ -38785,8 +38785,8 @@ function gce({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, hel
]
});
}
-function _ce({ item: e, media: t, helpers: n, actions: r, onMedia: i, issues: a }) {
- let { kind: o, selected: c, src: l, images: u, position: d, carousel: f, frameRatio: p } = t, m = (0, I.useRef)(null), [h, g] = (0, I.useState)(null), _ = dce(e, t), v = c?.thumb_url || e.thumb_url || "", y = e.playable && o === "video", b = e.playable && o === "image" ? l : e.thumb_url || "", x = e.playable && o === "image" && v && v !== l ? v : "", [S, C] = (0, I.useState)(b), w = (0, I.useRef)(null), T = (0, I.useRef)({
+function vce({ item: e, media: t, helpers: n, actions: r, onMedia: i, issues: a }) {
+ let { kind: o, selected: c, src: l, images: u, position: d, carousel: f, frameRatio: p } = t, m = (0, I.useRef)(null), [h, g] = (0, I.useState)(null), _ = fce(e, t), v = c?.thumb_url || e.thumb_url || "", y = e.playable && o === "video", b = e.playable && o === "image" ? l : e.thumb_url || "", x = e.playable && o === "image" && v && v !== l ? v : "", [S, C] = (0, I.useState)(b), w = (0, I.useRef)(null), T = (0, I.useRef)({
item: e,
selected: c
});
@@ -38816,7 +38816,7 @@ function _ce({ item: e, media: t, helpers: n, actions: r, onMedia: i, issues: a
"--follow-image-arrow-inset": h === null ? void 0 : `${h}px`
},
children: [
- /* @__PURE__ */ (0, L.jsx)(mI, { onClose: r.close }),
+ /* @__PURE__ */ (0, L.jsx)(pI, { onClose: r.close }),
y ? /* @__PURE__ */ (0, L.jsx)("video", {
ref: w,
className: "video-js vjs-big-play-centered",
@@ -38831,7 +38831,7 @@ function _ce({ item: e, media: t, helpers: n, actions: r, onMedia: i, issues: a
src: S,
alt: e.title,
referrerPolicy: "no-referrer",
- onClick: _.length ? () => void ON(Math.max(0, d), _) : void 0,
+ onClick: _.length ? () => void EN(Math.max(0, d), _) : void 0,
onError: () => {
if (x && S !== x) {
C(x), a.thumbFallback();
@@ -38882,11 +38882,11 @@ function _ce({ item: e, media: t, helpers: n, actions: r, onMedia: i, issues: a
]
});
}
-var hI = ({ kind: e }) => /* @__PURE__ */ (0, L.jsx)("span", {
+var mI = ({ kind: e }) => /* @__PURE__ */ (0, L.jsx)("span", {
"data-follow-nothumb": "",
dangerouslySetInnerHTML: { __html: s(e === "image" ? "image-off" : "play") }
});
-function gI({ src: e }) {
+function hI({ src: e }) {
let [t, n] = (0, I.useState)(!1);
return t ? null : /* @__PURE__ */ (0, L.jsx)("img", {
src: e,
@@ -38896,14 +38896,14 @@ function gI({ src: e }) {
onError: () => n(!0)
});
}
-function _I(e) {
+function gI(e) {
return (0, I.useCallback)((t) => {
t && e.wireDrag(t);
}, [e]);
}
-function vce({ group: e, itemId: t, helpers: n, actions: r }) {
- let a = eI(e), o = _I(n);
- return /* @__PURE__ */ (0, L.jsx)(uI, {
+function yce({ group: e, itemId: t, helpers: n, actions: r }) {
+ let a = $F(e), o = gI(n);
+ return /* @__PURE__ */ (0, L.jsx)(lI, {
kind: "collection",
"data-follow-queue": "",
title: "视频合集",
@@ -38911,12 +38911,12 @@ function vce({ group: e, itemId: t, helpers: n, actions: r }) {
listRef: o,
summary: `${e.primary.title || "未命名合集"} · ${a.length} 个视频`,
children: a.map((a) => {
- let o = e.duplicates.includes(a), s = ice(e, a, o ? a.provider_label : ""), c = o ? n.sourceIcon(a.provider, a.provider_label) : "";
- return /* @__PURE__ */ (0, L.jsxs)(dI, {
+ let o = e.duplicates.includes(a), s = ace(e, a, o ? a.provider_label : ""), c = o ? n.sourceIcon(a.provider, a.provider_label) : "";
+ return /* @__PURE__ */ (0, L.jsxs)(uI, {
current: a.id === t,
"data-follow-queue-item": a.id,
onClick: () => r.openItem(a.id),
- pic: /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [a.thumb_url ? /* @__PURE__ */ (0, L.jsx)(gI, { src: a.thumb_url }) : /* @__PURE__ */ (0, L.jsx)(hI, { kind: "video" }), fI(a.duration) ? /* @__PURE__ */ (0, L.jsx)("i", {
+ pic: /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [a.thumb_url ? /* @__PURE__ */ (0, L.jsx)(hI, { src: a.thumb_url }) : /* @__PURE__ */ (0, L.jsx)(mI, { kind: "video" }), dI(a.duration) ? /* @__PURE__ */ (0, L.jsx)("i", {
className: "dur mono",
children: i(a.duration)
}) : null] }),
@@ -38940,8 +38940,8 @@ function vce({ group: e, itemId: t, helpers: n, actions: r }) {
})
});
}
-function vI({ item: e, current: t, currentId: n = e.id, helpers: r, actions: i, onMedia: a }) {
- let o = e.media_items || [], s = _I(r), c = [];
+function _I({ item: e, current: t, currentId: n = e.id, helpers: r, actions: i, onMedia: a }) {
+ let o = e.media_items || [], s = gI(r), c = [];
o.forEach((e) => {
let t = e.resource_group || "ungrouped", n = c.find((e) => e.key === t);
n || (n = {
@@ -38951,26 +38951,26 @@ function vI({ item: e, current: t, currentId: n = e.id, helpers: r, actions: i,
}, c.push(n)), n.items.push(e);
});
let l = (t) => e.id === n ? a(t.index) : i.openItem(e.id, t.index);
- return /* @__PURE__ */ (0, L.jsx)(uI, {
+ return /* @__PURE__ */ (0, L.jsx)(lI, {
kind: "media",
"data-follow-queue": "",
title: "多媒体",
onClose: i.close,
listRef: s,
summary: `${e.title || "未命名内容"} · ${o.length} 个媒体`,
- children: c.map((n) => [n.label ? /* @__PURE__ */ (0, L.jsx)(pce, {
+ children: c.map((n) => [n.label ? /* @__PURE__ */ (0, L.jsx)(mce, {
label: n.label,
count: n.items.length
- }, `label:${n.key}`) : null, ...n.items.map((n) => /* @__PURE__ */ (0, L.jsxs)(dI, {
+ }, `label:${n.key}`) : null, ...n.items.map((n) => /* @__PURE__ */ (0, L.jsxs)(uI, {
current: n.index === t,
"data-follow-media-owner": e.id,
"data-follow-media-item": n.index,
"data-media-kind": n.media_kind || "",
onClick: () => l(n),
- pic: n.thumb_url ? /* @__PURE__ */ (0, L.jsx)(gI, { src: n.thumb_url }) : /* @__PURE__ */ (0, L.jsx)(hI, { kind: n.media_kind || "" }),
+ pic: n.thumb_url ? /* @__PURE__ */ (0, L.jsx)(hI, { src: n.thumb_url }) : /* @__PURE__ */ (0, L.jsx)(mI, { kind: n.media_kind || "" }),
children: [/* @__PURE__ */ (0, L.jsx)("b", {
"data-middle-truncate": "",
- children: ace(n)
+ children: oce(n)
}), /* @__PURE__ */ (0, L.jsx)("span", {
"data-truncate-end": "",
children: n.media_kind === "image" ? "图片" : "视频"
@@ -38978,13 +38978,13 @@ function vI({ item: e, current: t, currentId: n = e.id, helpers: r, actions: i,
}, n.index))])
});
}
-function yce({ item: e, data: t, context: n, media: a, write: c, issue: l, helpers: u, actions: d }) {
+function bce({ item: e, data: t, context: n, media: a, write: c, issue: l, helpers: u, actions: d }) {
let { kind: f, selected: p, src: m } = a, h = {
primary: e,
variants: [],
duplicates: [],
has_wip: e.variant_kind === "wip"
- }, g = u.badges(h, e), _ = u.identity(e, lce(e, t.sources), n), v = _.credited ? "" : e.author && o(e.author) !== o(_.author) ? e.author : "", y = u.mediaIssue(e, n), b = cce(e, u.tagLabel), x = e.status === "saved", { busy: S } = c, C = (e) => S.has(e) ? {
+ }, g = u.badges(h, e), _ = u.identity(e, uce(e, t.sources), n), v = _.credited ? "" : e.author && o(e.author) !== o(_.author) ? e.author : "", y = u.mediaIssue(e, n), b = lce(e, u.tagLabel), x = e.status === "saved", { busy: S } = c, C = (e) => S.has(e) ? {
"aria-busy": !0,
"aria-disabled": !0
} : {};
@@ -39009,7 +39009,7 @@ function yce({ item: e, data: t, context: n, media: a, write: c, issue: l, helpe
rel: "noreferrer noopener",
title: "打开来源页面",
"aria-label": "打开来源页面",
- dangerouslySetInnerHTML: { __html: pI }
+ dangerouslySetInnerHTML: { __html: fI }
}) : null]
}),
/* @__PURE__ */ (0, L.jsxs)("div", {
@@ -39029,7 +39029,7 @@ function yce({ item: e, data: t, context: n, media: a, write: c, issue: l, helpe
"data-reveal-line": "",
children: [
/* @__PURE__ */ (0, L.jsx)("span", { children: u.when(e) }),
- fI(e.duration) ? /* @__PURE__ */ (0, L.jsx)("span", { children: i(e.duration) }) : null,
+ dI(e.duration) ? /* @__PURE__ */ (0, L.jsx)("span", { children: i(e.duration) }) : null,
g ? /* @__PURE__ */ (0, L.jsx)("span", {
"data-follow-badges": "",
dangerouslySetInnerHTML: { __html: g }
@@ -39063,9 +39063,9 @@ function yce({ item: e, data: t, context: n, media: a, write: c, issue: l, helpe
href: e,
target: "_blank",
rel: "noreferrer noopener",
- children: [rce(e), /* @__PURE__ */ (0, L.jsx)("span", {
+ children: [ice(e), /* @__PURE__ */ (0, L.jsx)("span", {
className: "contents",
- dangerouslySetInnerHTML: { __html: pI }
+ dangerouslySetInnerHTML: { __html: fI }
})]
}, e))
}) : null,
@@ -39153,7 +39153,7 @@ function yce({ item: e, data: t, context: n, media: a, write: c, issue: l, helpe
"aria-label": `恢复显示 ${e.name || ""}`,
...C(`restore:${e.index}`),
onClick: () => c.restore(e.index),
- children: [e.thumb_url ? /* @__PURE__ */ (0, L.jsx)(gI, { src: e.thumb_url }) : /* @__PURE__ */ (0, L.jsx)(mce, { name: "image-off" }), /* @__PURE__ */ (0, L.jsx)("i", { dangerouslySetInnerHTML: { __html: s("rotate-ccw") } })]
+ children: [e.thumb_url ? /* @__PURE__ */ (0, L.jsx)(hI, { src: e.thumb_url }) : /* @__PURE__ */ (0, L.jsx)(hce, { name: "image-off" }), /* @__PURE__ */ (0, L.jsx)("i", { dangerouslySetInnerHTML: { __html: s("rotate-ccw") } })]
}, e.index))
})]
}) : null,
@@ -39168,7 +39168,7 @@ function yce({ item: e, data: t, context: n, media: a, write: c, issue: l, helpe
children: b.map((t) => /* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
className: "tg",
- "data-tag-cat": sce(e, t),
+ "data-tag-cat": cce(e, t),
"data-follow-tag": t,
onClick: () => d.openTag(t),
children: u.tagLabel(t)
@@ -39178,8 +39178,8 @@ function yce({ item: e, data: t, context: n, media: a, write: c, issue: l, helpe
})
});
}
-function bce(e, t, n) {
- let r = e.id, i = iI(r), [a, o] = (0, I.useState)(() => /* @__PURE__ */ new Set()), [s, c] = (0, I.useState)(""), l = (e, t) => o((n) => {
+function xce(e, t, n) {
+ let r = e.id, i = rI(r), [a, o] = (0, I.useState)(() => /* @__PURE__ */ new Set()), [s, c] = (0, I.useState)(""), l = (e, t) => o((n) => {
let r = new Set(n);
return t ? r.add(e) : r.delete(e), r;
}), u = (e) => {
@@ -39189,17 +39189,17 @@ function bce(e, t, n) {
...t.item,
status: e
}
- }), Hse(r, e);
+ }), Use(r, e);
}, f = (e) => {
c(d(e) || "操作失败"), t.failure("更新关注状态", e);
}, p = It({
- mutationFn: ({ to: e }) => q(cF, {
+ mutationFn: ({ to: e }) => q(sF, {
item: r,
to: e
}),
onSuccess: (e, { to: n, was: i }) => {
- u(n), c(""), t.toast(fce(n), { undo: i === "saved" ? void 0 : async () => {
- await q(cF, {
+ u(n), c(""), t.toast(pce(n), { undo: i === "saved" ? void 0 : async () => {
+ await q(sF, {
item: r,
to: i
}), u(i);
@@ -39208,7 +39208,7 @@ function bce(e, t, n) {
onError: f,
onSettled: (e, t, { to: n }) => l(n, !1)
}), m = It({
- mutationFn: () => q(Xse, { item: r }),
+ mutationFn: () => q(Zse, { item: r }),
onSuccess: () => {
u("saved"), c(""), t.toast("已保存到账本");
},
@@ -39216,7 +39216,7 @@ function bce(e, t, n) {
onSettled: () => l("save", !1)
}), h = It({
mutationFn: async ({ index: e, hidden: t }) => {
- await q(Zse, {
+ await q(Qse, {
item: r,
media: e,
hidden: t
@@ -39227,7 +39227,7 @@ function bce(e, t, n) {
},
onSuccess: (e, { hidden: r, next: a }) => {
let o = X.getQueryData(i);
- o && Vse(o.item), n(a), c(""), t.toast(r ? "已隐藏这张图" : "已恢复显示");
+ o && Hse(o.item), n(a), c(""), t.toast(r ? "已隐藏这张图" : "已恢复显示");
},
onError: f,
onSettled: (e, t, { index: n, hidden: r }) => l(`${r ? "hide" : "restore"}:${n}`, !1)
@@ -39263,18 +39263,18 @@ function bce(e, t, n) {
}
//#endregion
//#region src/sidebar.ts
-function xce(e) {
+function Sce(e) {
let t = /* @__PURE__ */ new Map();
for (let n of e) for (let e of new Set(n.tags || [])) t.set(e, (t.get(e) || 0) + 1);
return [...t].sort((e, t) => t[1] - e[1]).slice(0, 30);
}
//#endregion
//#region src/react/follow-feed/follow-card.tsx
-var Sce = (e) => Number(e) > 0;
-function Cce(e) {
+var Cce = (e) => Number(e) > 0;
+function wce(e) {
return /^\d{4}-/.test(e) ? e.startsWith(String((/* @__PURE__ */ new Date()).getFullYear())) ? e.slice(5, 10) : e.slice(0, 10) : e;
}
-function wce({ src: e, width: t, height: n, onLearn: r }) {
+function Tce({ src: e, width: t, height: n, onLearn: r }) {
let [i, a] = (0, I.useState)(!1);
return i ? null : /* @__PURE__ */ (0, L.jsx)("img", {
src: e,
@@ -39290,8 +39290,8 @@ function wce({ src: e, width: t, height: n, onLearn: r }) {
} : void 0
});
}
-function Tce(e) {
- let { group: t, authorSources: n, media: a, context: o, selected: c, selectMode: l, busy: u, failure: d, helpers: f, actions: p } = e, m = $F(t, a), h = a === "images", g = h ? (m.media_items || []).find((e) => e.media_kind === "image") : void 0, _ = g?.thumb_url || m.thumb_url || "", v = g && g.thumb_url === _ ? g : null, y = !v || _ === m.thumb_url, b = h ? [v, y ? m : null].find((e) => Number(e?.width) > 0 && Number(e?.height) > 0) : null, x = h && !b && _ ? (e, t) => f.learnDims(m.id, v ? v.index : null, e, t) : void 0, S = a === "videos" ? eI(t) : [], C = (m.media_items || []).length > 1 ? m.id : S[0]?.id || m.id, w = Use({
+function Ece(e) {
+ let { group: t, authorSources: n, media: a, context: o, selected: c, selectMode: l, busy: u, failure: d, helpers: f, actions: p } = e, m = QF(t, a), h = a === "images", g = h ? (m.media_items || []).find((e) => e.media_kind === "image") : void 0, _ = g?.thumb_url || m.thumb_url || "", v = g && g.thumb_url === _ ? g : null, y = !v || _ === m.thumb_url, b = h ? [v, y ? m : null].find((e) => Number(e?.width) > 0 && Number(e?.height) > 0) : null, x = h && !b && _ ? (e, t) => f.learnDims(m.id, v ? v.index : null, e, t) : void 0, S = a === "videos" ? $F(t) : [], C = (m.media_items || []).length > 1 ? m.id : S[0]?.id || m.id, w = Wse({
cover: _,
coverFace: (g?.thumb_url ? g : m).face,
stack: t.stack,
@@ -39299,7 +39299,7 @@ function Tce(e) {
limit: 9
}), T = (0, I.useRef)(w.faces);
T.current = w.faces;
- let E = pT({
+ let E = dT({
load: async () => T.current,
canFlip: () => T.current.length > 1 && p.canFlip(),
referrerPolicy: "no-referrer"
@@ -39341,7 +39341,7 @@ function Tce(e) {
"data-follow-open": "",
"aria-label": `打开 ${m.title} 详情`
}),
- _ ? /* @__PURE__ */ (0, L.jsx)(wce, {
+ _ ? /* @__PURE__ */ (0, L.jsx)(Tce, {
src: _,
width: b?.width,
height: b?.height,
@@ -39376,7 +39376,7 @@ function Tce(e) {
},
dangerouslySetInnerHTML: { __html: s("check") }
}),
- Sce(m.duration) ? /* @__PURE__ */ (0, L.jsx)("span", {
+ Cce(m.duration) ? /* @__PURE__ */ (0, L.jsx)("span", {
"data-media-duration": "",
children: i(m.duration)
}) : null,
@@ -39469,7 +39469,7 @@ function Tce(e) {
}), /* @__PURE__ */ (0, L.jsx)("time", {
dateTime: m.published_at || "",
title: A,
- children: Cce(A)
+ children: wce(A)
})]
}),
k.credited ? /* @__PURE__ */ (0, L.jsx)("div", {
@@ -39505,10 +39505,10 @@ function Tce(e) {
]
});
}
-var Ece = (0, I.memo)(Tce), yI = () => /* @__PURE__ */ (0, L.jsx)("span", {
+var Dce = (0, I.memo)(Ece), vI = () => /* @__PURE__ */ (0, L.jsx)("span", {
"data-entity-sep": "",
"aria-hidden": "true"
-}), Dce = cT("settings"), Oce = cT("chevron-down"), kce = cT("history"), Ace = [[
+}), Oce = oT("settings"), kce = oT("chevron-down"), Ace = oT("history"), jce = [[
"fixed",
"固定比例",
"layout-grid"
@@ -39517,19 +39517,19 @@ var Ece = (0, I.memo)(Tce), yI = () => /* @__PURE__ */ (0, L.jsx)("span", {
"瀑布流",
"columns-2"
]];
-function jce(e, t, n) {
+function Mce(e, t, n) {
return (0, I.useMemo)(() => {
let r = e?.groups || [], i = e?.counts || {}, a = e?.sources || [], o = e?.facets || {}, s = new Set(o.authors || []), c = new Map(a.map((e) => [e.provider, e.provider_label || e.provider])), l = new Map((o.providers || []).map((e) => [e, c.get(e) || e])), u = new Map(o.tags || []), d = /* @__PURE__ */ new Map();
a.forEach((e) => {
e.author_key && (d.has(e.author_key) || d.set(e.author_key, []), d.get(e.author_key).push(e));
});
- let f = JF([...d.keys()].filter((e) => s.has(e)), (e) => e, n), p = JF(o.works || [], (e) => e[0], n).slice(0, 24);
+ let f = qF([...d.keys()].filter((e) => s.has(e)), (e) => e, n), p = qF(o.works || [], (e) => e[0], n).slice(0, 24);
t.work && !p.some((e) => e[0] === t.work) && p.push([
t.work,
t.work,
0
]);
- let m = Object.values(i).reduce((e, t) => e + (Number(t) || 0), 0), h = JF([...u], (e) => e[0], n).slice(0, 20);
+ let m = Object.values(i).reduce((e, t) => e + (Number(t) || 0), 0), h = qF([...u], (e) => e[0], n).slice(0, 20);
t.tags.forEach((e) => {
h.some(([t]) => t === e) || h.push([e, u.get(e) || m]);
});
@@ -39537,7 +39537,7 @@ function jce(e, t, n) {
videos: 0,
images: 0
};
- r.forEach((e) => QF(e).forEach((e) => {
+ r.forEach((e) => ZF(e).forEach((e) => {
g[e === "image" ? "images" : "videos"] += 1;
}));
let _ = t.media === "images" ? "image" : "video";
@@ -39552,7 +39552,7 @@ function jce(e, t, n) {
workRows: p,
allCount: m,
mediaCounts: g,
- visible: r.filter((e) => QF(e).has(_)),
+ visible: r.filter((e) => ZF(e).has(_)),
author: d.has(t.author) && s.has(t.author) ? t.author : "",
provider: l.has(t.provider) ? t.provider : "",
workNames: new Map((o.works || []).map((e) => [e[0], e[1]])),
@@ -39565,15 +39565,15 @@ function jce(e, t, n) {
n
]);
}
-function Mce(e) {
- let { view: t, seed: n, revision: r, helpers: i, actions: a } = e, o = WF(t, r), s = Lt(o), c = Ft({
- queryKey: GF,
- queryFn: ({ signal: e }) => KF(e)
- }), l = (0, I.useMemo)(() => qF(s.data), [s.data]), u = (0, I.useMemo)(() => new Set((c.data?.providers || []).filter((e) => e.present).map((e) => e.provider)), [c.data]), f = (0, I.useMemo)(() => ({
+function Nce(e) {
+ let { view: t, seed: n, revision: r, helpers: i, actions: a } = e, o = UF(t, r), s = Lt(o), c = Ft({
+ queryKey: WF,
+ queryFn: ({ signal: e }) => GF(e)
+ }), l = (0, I.useMemo)(() => KF(s.data), [s.data]), u = (0, I.useMemo)(() => new Set((c.data?.providers || []).filter((e) => e.present).map((e) => e.provider)), [c.data]), f = (0, I.useMemo)(() => ({
sources: l?.sources || [],
aliases: l?.author_aliases || [],
credentials: u
- }), [l, u]), p = jce(l, t, n), m = s.isPending || s.isPlaceholderData, h = !m && !!l, g = (0, I.useMemo)(() => xce(p.visible.flatMap(YF).map((e) => ({ tags: e.tags || [] }))), [p.visible]);
+ }), [l, u]), p = Mce(l, t, n), m = s.isPending || s.isPlaceholderData, h = !m && !!l, g = (0, I.useMemo)(() => Sce(p.visible.flatMap(JF).map((e) => ({ tags: e.tags || [] }))), [p.visible]);
(0, I.useEffect)(() => {
h && a.loaded(g);
}, [
@@ -39581,15 +39581,15 @@ function Mce(e) {
g,
a
]);
- let _ = Nce(e, !!l);
- if (!l) return s.isError ? /* @__PURE__ */ (0, L.jsx)(Uw, {
+ let _ = Pce(e, !!l);
+ if (!l) return s.isError ? /* @__PURE__ */ (0, L.jsx)(Hw, {
message: d(s.error),
onRetry: () => void s.refetch()
}) : null;
let v = (e) => a.route({
...t,
...e
- }), y = Kse({
+ }), y = qse({
...t,
author: p.author,
provider: p.provider
@@ -39614,7 +39614,7 @@ function Mce(e) {
"data-follow-head-actions": "",
children: [/* @__PURE__ */ (0, L.jsx)(G, {
variant: "secondary",
- leadingIcon: Dce,
+ leadingIcon: Oce,
"data-follow-manage": "",
onClick: a.openManage,
children: "管理关注"
@@ -39631,20 +39631,20 @@ function Mce(e) {
}) : null]
})]
}),
- /* @__PURE__ */ (0, L.jsx)(Pce, {
+ /* @__PURE__ */ (0, L.jsx)(Fce, {
facets: p,
pressed: p.author,
context: f,
props: e,
onPick: (e) => v({ author: p.author === e ? "" : e })
}),
- /* @__PURE__ */ (0, L.jsx)(Fce, {
+ /* @__PURE__ */ (0, L.jsx)(Ice, {
rows: p.workRows,
pressed: t.work,
props: e,
onPick: (e) => v({ work: t.work === e ? "" : e })
}),
- /* @__PURE__ */ (0, L.jsx)(Ice, {
+ /* @__PURE__ */ (0, L.jsx)(Lce, {
facets: p,
view: t,
total: b,
@@ -39652,9 +39652,9 @@ function Mce(e) {
props: e,
route: v
}),
- /* @__PURE__ */ (0, L.jsx)(Lce, {
+ /* @__PURE__ */ (0, L.jsx)(Rce, {
conditions: y,
- onDrop: (e) => a.route(qse(t, e)),
+ onDrop: (e) => a.route(Jse(t, e)),
onClear: () => v({
author: "",
provider: "",
@@ -39662,11 +39662,11 @@ function Mce(e) {
tags: []
})
}),
- p.broken.length ? /* @__PURE__ */ (0, L.jsx)(Rce, {
+ p.broken.length ? /* @__PURE__ */ (0, L.jsx)(zce, {
count: p.broken.length,
onManage: a.openManage
}) : null,
- /* @__PURE__ */ (0, L.jsx)(zce, {
+ /* @__PURE__ */ (0, L.jsx)(Bce, {
pending: m,
facets: p,
data: l,
@@ -39677,19 +39677,19 @@ function Mce(e) {
"data-follow-pagination": "",
children: [l.has_more ? /* @__PURE__ */ (0, L.jsx)("span", {
"data-follow-page-action": "",
- children: /* @__PURE__ */ (0, L.jsxs)(wT, {
+ children: /* @__PURE__ */ (0, L.jsxs)(ST, {
entity: !0,
enabled: () => !_.busyRef.current,
load: async () => {
await s.fetchNextPage({ throwOnError: !0 });
},
- children: [/* @__PURE__ */ (0, L.jsx)(Oce, { className: "size-3.5" }), "加载更多"]
+ children: [/* @__PURE__ */ (0, L.jsx)(kce, { className: "size-3.5" }), "加载更多"]
}, s.data?.pages.length)
}) : null, x ? /* @__PURE__ */ (0, L.jsxs)("span", {
"data-follow-page-action": "",
children: [/* @__PURE__ */ (0, L.jsx)(G, {
variant: "secondary",
- leadingIcon: _.olderBusy ? void 0 : kce,
+ leadingIcon: _.olderBusy ? void 0 : Ace,
"data-follow-older": "",
"aria-busy": _.busy || void 0,
onClick: () => void _.start(!0),
@@ -39699,14 +39699,14 @@ function Mce(e) {
}), /* @__PURE__ */ (0, L.jsx)("span", { children: "抓取中…" })] }) : "抓更早的一页"
}), /* @__PURE__ */ (0, L.jsx)("span", {
"data-follow-backfill": "",
- children: Wse(p.sources)
+ children: Gse(p.sources)
})]
}) : null]
}) : null
]
})] });
}
-function Nce(e, t) {
+function Pce(e, t) {
let { helpers: n, actions: r } = e, [i, a] = (0, I.useState)(0), [o, s] = (0, I.useState)(!1), [c, l] = (0, I.useState)(""), [u, f] = (0, I.useState)(!1), p = (0, I.useRef)(!1), m = (0, I.useRef)(null), h = (0, I.useRef)({
helpers: n,
actions: r
@@ -39721,7 +39721,7 @@ function Nce(e, t) {
return h.current.helpers.jobProgress({
host: e,
active: () => t,
- read: (e) => gw(iF, e),
+ read: (e) => hw(rF, e),
busy: (e) => {
t && (p.current = e, s(e));
},
@@ -39746,7 +39746,7 @@ function Nce(e, t) {
p.current = !0, l(e ? "older" : "check");
let t = !1;
try {
- let n = await q(iF, e ? {
+ let n = await q(rF, e ? {
older: !0,
background: !0
} : { background: !0 });
@@ -39764,7 +39764,7 @@ function Nce(e, t) {
olderBusy: c === "older" || u && o
};
}
-function Pce({ facets: e, pressed: t, context: n, props: r, onPick: i }) {
+function Fce({ facets: e, pressed: t, context: n, props: r, onPick: i }) {
let a = (0, I.useRef)(null);
return (0, I.useEffect)(() => {
r.helpers.wireDrag(a.current);
@@ -39790,7 +39790,7 @@ function Pce({ facets: e, pressed: t, context: n, props: r, onPick: i }) {
})
}) : null;
}
-function Fce({ rows: e, pressed: t, props: n, onPick: r }) {
+function Ice({ rows: e, pressed: t, props: n, onPick: r }) {
let i = (0, I.useRef)(null);
return (0, I.useEffect)(() => {
n.helpers.wireDrag(i.current);
@@ -39811,13 +39811,13 @@ function Fce({ rows: e, pressed: t, props: n, onPick: r }) {
}, e[0]))
}) : null;
}
-function Ice({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
- let { helpers: o, actions: c } = i, l = (0, I.useRef)(null), u = (0, I.useRef)(null), d = (0, I.useRef)(null), f = (0, I.useRef)(null), p = (0, I.useRef)(null), m = (0, I.useRef)(null), h = !!e.mediaCounts.images || t.media === "images", g = XN(l, d, "[data-follow-filter][aria-pressed=\"true\"]", t.status), _ = XN(u, f, "[data-media-view][aria-pressed=\"true\"]", `${t.media}:${h}`);
+function Lce({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
+ let { helpers: o, actions: c } = i, l = (0, I.useRef)(null), u = (0, I.useRef)(null), d = (0, I.useRef)(null), f = (0, I.useRef)(null), p = (0, I.useRef)(null), m = (0, I.useRef)(null), h = !!e.mediaCounts.images || t.media === "images", g = JN(l, d, "[data-follow-filter][aria-pressed=\"true\"]", t.status), _ = JN(u, f, "[data-media-view][aria-pressed=\"true\"]", `${t.media}:${h}`);
(0, I.useEffect)(() => {
o.wireDrag(p.current), o.wireDrag(m.current), o.wireScroller(m.current);
}, [o]);
let v = [...e.providers], y = v.length + e.tagRows.length > 0, b = t.media === "images";
- return /* @__PURE__ */ (0, L.jsx)(SM, {
+ return /* @__PURE__ */ (0, L.jsx)(bM, {
label: "筛选与排序",
topLabel: h ? "媒体与关注筛选" : "关注筛选",
attrs: {
@@ -39869,7 +39869,7 @@ function Ice({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
dangerouslySetInnerHTML: { __html: s(i) }
}, e);
})
- }), /* @__PURE__ */ (0, L.jsx)(yI, {})] }) : null, /* @__PURE__ */ (0, L.jsxs)("div", {
+ }), /* @__PURE__ */ (0, L.jsx)(vI, {})] }) : null, /* @__PURE__ */ (0, L.jsxs)("div", {
ref: p,
"data-entity-scroll": "",
children: [/* @__PURE__ */ (0, L.jsxs)("div", {
@@ -39878,7 +39878,7 @@ function Ice({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
"aria-label": "状态",
"data-entity-states": "",
onPointerLeave: g.leave,
- children: [Lse.map(([e, n]) => /* @__PURE__ */ (0, L.jsx)("button", {
+ children: [Rse.map(([e, n]) => /* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
"data-entity-state": e,
"data-follow-filter": e,
@@ -39889,7 +39889,7 @@ function Ice({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
t.status !== e && a({ status: e });
},
children: n
- }, e)), y ? /* @__PURE__ */ (0, L.jsx)(yI, {}) : null]
+ }, e)), y ? /* @__PURE__ */ (0, L.jsx)(vI, {}) : null]
}), /* @__PURE__ */ (0, L.jsxs)("div", {
ref: m,
"data-entity-tags": "",
@@ -39904,11 +39904,11 @@ function Ice({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
onClick: () => a({ provider: e.provider === t ? "" : t }),
dangerouslySetInnerHTML: { __html: o.sourceIcon(t) }
}, t)),
- v.length && e.tagRows.length ? /* @__PURE__ */ (0, L.jsx)(yI, {}) : null,
- e.tagRows.map(([n, r]) => /* @__PURE__ */ (0, L.jsxs)(wM, {
+ v.length && e.tagRows.length ? /* @__PURE__ */ (0, L.jsx)(vI, {}) : null,
+ e.tagRows.map(([n, r]) => /* @__PURE__ */ (0, L.jsxs)(SM, {
"data-follow-tag": n,
"data-entity-press": "",
- "data-tag-cat": `r34-${Jse(e.groups, n)}`,
+ "data-tag-cat": `r34-${Yse(e.groups, n)}`,
pressed: t.tags.includes(n),
onPress: () => a({ tags: t.tags.includes(n) ? t.tags.filter((e) => e !== n) : [...t.tags, n] }),
children: [o.tagLabel(n), r ? /* @__PURE__ */ (0, L.jsx)("span", {
@@ -39926,11 +39926,11 @@ function Ice({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
}), /* @__PURE__ */ (0, L.jsxs)("span", {
"data-entity-sorts": "",
children: [
- /* @__PURE__ */ (0, L.jsx)(aP, { onPress: c.shuffle }),
- b ? /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(iP, {
+ /* @__PURE__ */ (0, L.jsx)(rP, { onPress: c.shuffle }),
+ b ? /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(nP, {
label: "图片布局",
value: i.photoLayout,
- options: Ace,
+ options: jce,
onChange: (e) => c.setPhotoLayout(e === "fixed" ? "fixed" : "masonry")
}), /* @__PURE__ */ (0, L.jsxs)("button", {
type: "button",
@@ -39947,17 +39947,17 @@ function Ice({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
dangerouslySetInnerHTML: { __html: s("captions-off") }
})]
})] }) : null,
- Rse.map(([e, n]) => {
- let r = t.sort === e, i = cT(t.dir === "asc" ? "arrow-up" : "arrow-down");
+ zse.map(([e, n]) => {
+ let r = t.sort === e, i = oT(t.dir === "asc" ? "arrow-up" : "arrow-down");
return /* @__PURE__ */ (0, L.jsxs)("button", {
type: "button",
"data-entity-sort": e,
"data-follow-sort": e,
"data-entity-press": "",
"aria-pressed": r,
- "aria-label": Gse(e, n, t.sort, t.dir) || void 0,
+ "aria-label": Kse(e, n, t.sort, t.dir) || void 0,
onClick: () => {
- let n = nI(e, t.sort, t.dir);
+ let n = tI(e, t.sort, t.dir);
n && a(n);
},
children: [n, r ? /* @__PURE__ */ (0, L.jsx)(i, { className: "size-3.5" }) : null]
@@ -39967,7 +39967,7 @@ function Ice({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
})] })
});
}
-function Lce({ conditions: e, onDrop: t, onClear: n }) {
+function Rce({ conditions: e, onDrop: t, onClear: n }) {
return /* @__PURE__ */ (0, L.jsx)("div", {
"data-entity-combo": "",
"data-follow-combo": "",
@@ -39992,7 +39992,7 @@ function Lce({ conditions: e, onDrop: t, onClear: n }) {
})] }) : null
});
}
-function Rce({ count: e, onManage: t }) {
+function zce({ count: e, onManage: t }) {
return /* @__PURE__ */ (0, L.jsx)("div", {
"data-follow-broken": "",
onClick: (e) => {
@@ -40001,12 +40001,12 @@ function Rce({ count: e, onManage: t }) {
dangerouslySetInnerHTML: { __html: `<div class="geist-note geist-note-error fwarn" role="alert">${s("alert")}<span>${e} 个来源上次检查失败,去<button type="button" class="flink" data-follow-manage>管理关注</button>看原因。</span></div>` }
});
}
-function zce({ pending: e, facets: t, data: n, context: r, props: i }) {
- let { view: a, helpers: o } = i, s = a.media === "images", c = Hw(e, () => o.listSkeletonHtml(a.media));
+function Bce({ pending: e, facets: t, data: n, context: r, props: i }) {
+ let { view: a, helpers: o } = i, s = a.media === "images", c = Vw(e, () => o.listSkeletonHtml(a.media));
return /* @__PURE__ */ (0, L.jsxs)("div", {
"data-follow-list-body": "",
"data-grid-reveal": c.fading ? "" : void 0,
- children: [c.layer, e ? null : /* @__PURE__ */ (0, L.jsx)(Bce, {
+ children: [c.layer, e ? null : /* @__PURE__ */ (0, L.jsx)(Vce, {
facets: t,
data: n,
context: r,
@@ -40015,39 +40015,39 @@ function zce({ pending: e, facets: t, data: n, context: r, props: i }) {
})]
});
}
-function Bce({ facets: e, data: t, context: n, props: r, images: i }) {
- let { view: a, helpers: o, actions: s } = r, c = Uce(r), l = i ? {
+function Vce({ facets: e, data: t, context: n, props: r, images: i }) {
+ let { view: a, helpers: o, actions: s } = r, c = Wce(r), l = i ? {
"data-size": r.photoSize,
"data-layout": r.photoLayout,
"data-images-only": String(r.imagesOnly)
} : {}, u;
return u = e.visible.length ? e.visible.map((t) => {
let i = e.byId.get(t.primary?.source_id), l = i?.author_key && e.authorSources.get(i.author_key) || [], u = t.primary.id;
- return /* @__PURE__ */ (0, L.jsx)(Ece, {
+ return /* @__PURE__ */ (0, L.jsx)(Dce, {
group: t,
authorSources: l,
media: a.media,
context: n,
- selected: r.selected.has(bI(t, a)),
+ selected: r.selected.has(yI(t, a)),
selectMode: r.selectMode,
- busy: c.busy.get(bI(t, a)) || "",
- failure: c.failures.get(bI(t, a)) || "",
+ busy: c.busy.get(yI(t, a)) || "",
+ failure: c.failures.get(yI(t, a)) || "",
helpers: o,
actions: s,
onStatus: c.status,
onSave: c.save
}, `${u}:${a.media}`);
- }) : /* @__PURE__ */ (0, L.jsx)(Vce, { data: t }), /* @__PURE__ */ (0, L.jsx)("div", {
+ }) : /* @__PURE__ */ (0, L.jsx)(Hce, { data: t }), /* @__PURE__ */ (0, L.jsx)("div", {
"data-follow-list": "",
"data-follow-wall": i ? "" : void 0,
...l,
children: u
});
}
-function bI(e, t) {
- return $F(e, t.media).id;
+function yI(e, t) {
+ return QF(e, t.media).id;
}
-function Vce({ data: e }) {
+function Hce({ data: e }) {
let t = (e.groups || []).length ? v("search-x", "当前筛选下没有更新", "切换媒体类型、创作者、来源或标签后再试。") : (e.sources || []).length ? v("rss", "没有符合条件的更新", "切换状态或来源筛选后再试。") : v("rss", "还没有关注任何来源", "添加创作者或订阅来源后,更新会集中显示在这里。", { actions: "<a class=\"geist-button primary\" href=\"/follow-manage?tab=add\">添加关注</a>" });
return /* @__PURE__ */ (0, L.jsx)("div", {
"data-follow-empty": "",
@@ -40055,22 +40055,22 @@ function Vce({ data: e }) {
dangerouslySetInnerHTML: { __html: t }
});
}
-var Hce = {
+var Uce = {
new: "已恢复未看",
seen: "已标记已看",
ignored: "已忽略"
};
-function Uce(e) {
- let { view: t, revision: n, actions: r } = e, [i, a] = (0, I.useState)(() => /* @__PURE__ */ new Map()), [o, s] = (0, I.useState)(() => /* @__PURE__ */ new Map()), c = WF(t, n).queryKey, l = (e, t, n) => n((n) => {
+function Wce(e) {
+ let { view: t, revision: n, actions: r } = e, [i, a] = (0, I.useState)(() => /* @__PURE__ */ new Map()), [o, s] = (0, I.useState)(() => /* @__PURE__ */ new Map()), c = UF(t, n).queryKey, l = (e, t, n) => n((n) => {
let r = new Map(n);
return t ? r.set(e, t) : r.delete(e), r;
}), u = (e, n) => {
- X.setQueryData(c, (r) => r && rI(r, t, e, n));
+ X.setQueryData(c, (r) => r && nI(r, t, e, n));
}, f = () => void X.invalidateQueries({
queryKey: c,
exact: !0
}), p = (e) => {
- let t = qF(X.getQueryData(c));
+ let t = KF(X.getQueryData(c));
for (let n of t?.groups || []) for (let t of [
n.primary,
...n.variants,
@@ -40078,13 +40078,13 @@ function Uce(e) {
]) if (t.id === e) return t.status;
return "new";
}, m = It({
- mutationFn: ({ id: e, to: t }) => q(cF, {
+ mutationFn: ({ id: e, to: t }) => q(sF, {
item: e,
to: t
}),
onSuccess: (e, { id: t, to: n, was: i }) => {
- u(t, n), f(), r.toast(Hce[n] || "已更新关注状态", { undo: i === "saved" ? void 0 : async () => {
- await q(cF, {
+ u(t, n), f(), r.toast(Uce[n] || "已更新关注状态", { undo: i === "saved" ? void 0 : async () => {
+ await q(sF, {
item: t,
to: i
}), u(t, i), f();
@@ -40129,8 +40129,8 @@ function Uce(e) {
}
//#endregion
//#region src/react/follow-manage/source-view.tsx
-function xI({ provider: e, label: t }) {
- let n = Fse(e), [r, i] = (0, I.useState)(!1);
+function bI({ provider: e, label: t }) {
+ let n = Ise(e), [r, i] = (0, I.useState)(!1);
return !n || r ? t ? /* @__PURE__ */ (0, L.jsx)(L.Fragment, { children: t }) : null : /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)("img", {
src: n,
alt: "",
@@ -40141,8 +40141,8 @@ function xI({ provider: e, label: t }) {
className: "size-3.5 shrink-0 rounded-sm object-contain"
}), t ? /* @__PURE__ */ (0, L.jsx)(iv, { children: t }) : null] });
}
-function SI({ group: e, name: t }) {
- let { src: n, fallback: r } = hse(e), [i, a] = (0, I.useState)(0), o = [n, r].filter(Boolean)[i];
+function xI({ group: e, name: t }) {
+ let { src: n, fallback: r } = gse(e), [i, a] = (0, I.useState)(0), o = [n, r].filter(Boolean)[i];
return o ? /* @__PURE__ */ (0, L.jsx)("img", {
src: o,
alt: "",
@@ -40155,18 +40155,18 @@ function SI({ group: e, name: t }) {
}) : /* @__PURE__ */ (0, L.jsx)("span", {
title: "没有可用头像",
className: "inline-grid size-8 shrink-0 place-items-center rounded-full bg-background-tertiary-default text-caption-1-semibold text-text-secondary",
- children: mse(t)
+ children: hse(t)
});
}
-function CI({ source: e }) {
- let t = _F(e) ? "rose" : e.enabled && e.last_status === "ok" ? "lime" : e.enabled ? "yellow" : "neutral";
- return /* @__PURE__ */ (0, L.jsx)(dw, {
+function SI({ source: e }) {
+ let t = gF(e) ? "rose" : e.enabled && e.last_status === "ok" ? "lime" : e.enabled ? "yellow" : "neutral";
+ return /* @__PURE__ */ (0, L.jsx)(uw, {
variant: "caption",
color: t,
- children: pse(e)
+ children: mse(e)
});
}
-function wI({ source: e }) {
+function CI({ source: e }) {
return /* @__PURE__ */ (0, L.jsx)("a", {
href: e.url,
target: "_blank",
@@ -40178,11 +40178,11 @@ function wI({ source: e }) {
}
//#endregion
//#region src/react/follow-manage/add-source.tsx
-var TI = cw(DA, OA, "text-body-2-medium"), Wce = "粘贴来源链接,或输入创作者名、id…", Gce = "查找中…(首次按名字查要下载创作者索引,可能几十秒)", Kce = "识别中…", qce = "站内没有查到来源", EI = (e, t) => `${e}:${t.url}`;
-function Jce({ field: e, menu: t, options: n, active: r, busy: i, onPick: a, onClose: o }) {
+var wI = sw(TA, EA, "text-body-2-medium"), Gce = "粘贴来源链接,或输入创作者名、id…", Kce = "查找中…(首次按名字查要下载创作者索引,可能几十秒)", qce = "识别中…", Jce = "站内没有查到来源", TI = (e, t) => `${e}:${t.url}`;
+function Yce({ field: e, menu: t, options: n, active: r, busy: i, onPick: a, onClose: o }) {
return (0, I.useEffect)(() => {
t.current?.querySelector("[aria-current=\"true\"]")?.scrollIntoView({ block: "nearest" });
- }, [t, r]), /* @__PURE__ */ (0, L.jsxs)(Tk, {
+ }, [t, r]), /* @__PURE__ */ (0, L.jsxs)(Ck, {
ref: t,
triggerRef: e,
isOpen: !0,
@@ -40194,17 +40194,17 @@ function Jce({ field: e, menu: t, options: n, active: r, busy: i, onPick: a, onC
placement: "bottom start",
offset: 4,
"aria-label": "来源建议",
- className: cw(EA, "flex w-(--trigger-width) flex-col gap-1 overscroll-contain"),
+ className: sw(wA, "flex w-(--trigger-width) flex-col gap-1 overscroll-contain"),
children: [i && !n.length ? /* @__PURE__ */ (0, L.jsx)("div", {
className: "px-2 py-1.5",
- children: /* @__PURE__ */ (0, L.jsx)(yw, { label: "正在查找建议" })
+ children: /* @__PURE__ */ (0, L.jsx)(vw, { label: "正在查找建议" })
}) : null, n.map((e, t) => /* @__PURE__ */ (0, L.jsxs)(I.Fragment, { children: [e.group === n[t - 1]?.group ? null : /* @__PURE__ */ (0, L.jsx)("div", {
className: "px-2 pt-1 text-caption-1-regular text-text-tertiary",
children: e.group
}), /* @__PURE__ */ (0, L.jsxs)("button", {
type: "button",
"aria-current": t === r ? "true" : void 0,
- className: t === r ? cw(TI, "bg-background-secondary-default") : TI,
+ className: t === r ? sw(wI, "bg-background-secondary-default") : wI,
onMouseDown: (e) => e.preventDefault(),
onClick: () => a(e.value),
children: [
@@ -40224,7 +40224,7 @@ function Jce({ field: e, menu: t, options: n, active: r, busy: i, onPick: a, onC
})] }, `${e.group}-${e.value}`))]
});
}
-function Yce({ credentials: e, hidden: t, onHidden: n, openCredentials: r }) {
+function Xce({ credentials: e, hidden: t, onHidden: n, openCredentials: r }) {
let i = (0, I.useRef)(null), [a, o] = (0, I.useState)(!1), s = (e.providers || []).filter((e) => e.followable), c = s.filter((e) => !t.has(e.provider_label)).length, l = c === s.length ? "全部来源" : `${c}/${s.length} 个来源`, u = (e, r) => {
let i = new Set(t);
r ? i.delete(e) : i.add(e), n(i);
@@ -40232,20 +40232,20 @@ function Yce({ credentials: e, hidden: t, onHidden: n, openCredentials: r }) {
return /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(G, {
ref: i,
variant: "secondary",
- leadingIcon: oC,
+ leadingIcon: aC,
"aria-haspopup": "dialog",
"aria-expanded": a,
"aria-label": l,
onClick: () => o(!0),
children: l
- }), /* @__PURE__ */ (0, L.jsx)(Tk, {
+ }), /* @__PURE__ */ (0, L.jsx)(Ck, {
triggerRef: i,
isOpen: a,
onOpenChange: o,
placement: "bottom end",
offset: 4,
- className: EA,
- children: /* @__PURE__ */ (0, L.jsxs)(Ik, {
+ className: wA,
+ children: /* @__PURE__ */ (0, L.jsxs)(Pk, {
"aria-label": "来源筛选",
className: "flex w-64 flex-col gap-1 outline-none",
children: [s.length ? /* @__PURE__ */ (0, L.jsxs)("div", {
@@ -40261,16 +40261,16 @@ function Yce({ credentials: e, hidden: t, onHidden: n, openCredentials: r }) {
onClick: () => n(new Set(s.map((e) => e.provider_label))),
children: "全不选"
})]
- }) : /* @__PURE__ */ (0, L.jsx)(JA, { children: "暂无可用来源" }), s.map((e) => {
+ }) : /* @__PURE__ */ (0, L.jsx)(KA, { children: "暂无可用来源" }), s.map((e) => {
let n = e.requirement === "required" && (!e.present || (e.missing || []).length > 0);
return /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex items-center gap-2",
- children: [/* @__PURE__ */ (0, L.jsx)(Oj, {
+ children: [/* @__PURE__ */ (0, L.jsx)(Ej, {
isSelected: !t.has(e.provider_label),
onChange: (t) => u(e.provider_label, t),
children: /* @__PURE__ */ (0, L.jsxs)("span", {
className: "flex min-w-0 items-center gap-1.5",
- children: [/* @__PURE__ */ (0, L.jsx)(xI, { provider: e.provider }), e.provider_label]
+ children: [/* @__PURE__ */ (0, L.jsx)(bI, { provider: e.provider }), e.provider_label]
})
}), n ? /* @__PURE__ */ (0, L.jsx)(G, {
variant: "ghost",
@@ -40286,7 +40286,7 @@ function Yce({ credentials: e, hidden: t, onHidden: n, openCredentials: r }) {
})
})] });
}
-function Xce({ row: e, at: t, hidden: n, unpicked: r, onPick: i }) {
+function Zce({ row: e, at: t, hidden: n, unpicked: r, onPick: i }) {
if (e.kind === "error") return /* @__PURE__ */ (0, L.jsx)(J, {
tone: "error",
title: e.line,
@@ -40294,7 +40294,7 @@ function Xce({ row: e, at: t, hidden: n, unpicked: r, onPick: i }) {
});
let a = (e.candidates || []).filter((e) => !n.has(e.provider_label || "")), o = Object.entries(e.failures || {});
return /* @__PURE__ */ (0, L.jsxs)("div", {
- className: _w({
+ className: gw({
variant: "outlined",
padding: "none",
className: "flex flex-col gap-2 p-4"
@@ -40305,15 +40305,15 @@ function Xce({ row: e, at: t, hidden: n, unpicked: r, onPick: i }) {
children: e.line
}),
a.length ? a.map((e) => {
- let n = EI(t, e);
- return /* @__PURE__ */ (0, L.jsx)(Oj, {
+ let n = TI(t, e);
+ return /* @__PURE__ */ (0, L.jsx)(Ej, {
isSelected: !e.known && !r.has(n),
isDisabled: e.known,
onChange: (e) => i(n, e),
children: /* @__PURE__ */ (0, L.jsxs)("span", {
className: "flex min-w-0 flex-wrap items-center gap-1.5",
children: [
- /* @__PURE__ */ (0, L.jsx)(xI, { provider: e.provider }),
+ /* @__PURE__ */ (0, L.jsx)(bI, { provider: e.provider }),
/* @__PURE__ */ (0, L.jsx)("b", {
className: "text-body-medium",
children: e.provider_label
@@ -40329,22 +40329,22 @@ function Xce({ row: e, at: t, hidden: n, unpicked: r, onPick: i }) {
]
})
}, n);
- }) : /* @__PURE__ */ (0, L.jsx)(JA, { children: qce }),
+ }) : /* @__PURE__ */ (0, L.jsx)(KA, { children: Jce }),
(e.external_searches || []).map((e) => /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
children: [/* @__PURE__ */ (0, L.jsx)("small", {
className: "text-caption-1-regular text-text-secondary",
children: e.evidence
- }), /* @__PURE__ */ (0, L.jsx)(ZA, {
+ }), /* @__PURE__ */ (0, L.jsx)(YA, {
href: e.url,
children: `${e.label}:${e.query}`
})]
}, e.url)),
- o.length ? /* @__PURE__ */ (0, L.jsx)(JA, { children: o.map(([e, t]) => `${e}:${t}`).join(";") }) : null
+ o.length ? /* @__PURE__ */ (0, L.jsx)(KA, { children: o.map(([e, t]) => `${e}:${t}`).join(";") }) : null
]
});
}
-function Zce({ data: e, credentials: t, readOnly: n, toast: r, openCredentials: i }) {
+function Qce({ data: e, credentials: t, readOnly: n, toast: r, openCredentials: i }) {
let [a, o] = (0, I.useState)(""), [s, c] = (0, I.useState)(""), [l, u] = (0, I.useState)(""), [d, f] = (0, I.useState)(!1), [p, m] = (0, I.useState)(null), [h, g] = (0, I.useState)(-1), _ = (0, I.useRef)(null), v = (0, I.useRef)(null), [y, b] = (0, I.useState)(/* @__PURE__ */ new Set()), [x, S] = (0, I.useState)(/* @__PURE__ */ new Set()), [C, w] = (0, I.useState)(""), [T, E] = (0, I.useState)(0);
(0, I.useEffect)(() => {
let e = a.trim();
@@ -40356,18 +40356,18 @@ function Zce({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
return () => clearTimeout(t);
}, [a]);
let D = Ft({
- queryKey: sse(l),
- queryFn: ({ signal: e }) => xse(l, e),
+ queryKey: cse(l),
+ queryFn: ({ signal: e }) => Sse(l, e),
enabled: l.length > 0 && d
}), O = (0, I.useMemo)(() => (D.data?.groups || []).flatMap((e) => e.items.map((t) => ({
value: t.value,
matched: t.matched || "",
n: t.n || 0,
group: e.label
- }))), [D.data]), { job: k, running: A, outcome: j, start: M, dismiss: N } = Sj({
- queryKey: ose,
- queryFn: ({ signal: e }) => bse(e),
- start: (e) => Sse([e]),
+ }))), [D.data]), { job: k, running: A, outcome: j, start: M, dismiss: N } = bj({
+ queryKey: sse,
+ queryFn: ({ signal: e }) => xse(e),
+ start: (e) => Cse([e]),
onStarted: () => S(/* @__PURE__ */ new Set()),
onError: (e) => w(K(e)),
onFinish: (e) => {
@@ -40401,14 +40401,14 @@ function Zce({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
}
}, re = j?.results || [], ie = re.flatMap((e, t) => (e.candidates || []).filter((e) => !e.known && !y.has(e.provider_label || "")).map((e) => ({
candidate: e,
- key: EI(t, e)
+ key: TI(t, e)
})).filter((e) => !x.has(e.key))), ae = It({
mutationFn: async (e) => {
let t = [], n = [];
E(0);
for (let r of e) {
try {
- let e = await Cse(r.candidate);
+ let e = await wse(r.candidate);
n.push(e.source);
} catch (e) {
t.push(`${r.candidate.label}:${K(e)}`);
@@ -40416,7 +40416,7 @@ function Zce({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
E((e) => e + 1);
}
if (n.length) try {
- await kF(n);
+ await OF(n);
} catch (e) {
t.push(K(e));
}
@@ -40426,7 +40426,7 @@ function Zce({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
};
},
onSuccess: (e) => {
- if (zF(), e.failures.length) {
+ if (RF(), e.failures.length) {
w(e.failures.join(";"));
return;
}
@@ -40435,7 +40435,7 @@ function Zce({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
onError: (e) => w(K(e))
}), oe = e.suggestions || [], se = !s.includes("/");
return /* @__PURE__ */ (0, L.jsxs)("div", {
- className: _w({
+ className: gw({
padding: "none",
className: "flex flex-col gap-4 px-6 py-5 max-sm:px-4"
}),
@@ -40455,15 +40455,15 @@ function Zce({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
let t = e.relatedTarget;
!e.currentTarget.contains(t) && !v.current?.contains(t) && f(!1);
},
- children: [/* @__PURE__ */ (0, L.jsx)(Yj, {
+ children: [/* @__PURE__ */ (0, L.jsx)(qj, {
"aria-label": "来源链接、名字或 id",
- placeholder: Wce,
+ placeholder: Gce,
value: a,
- leadingIcon: _C,
+ leadingIcon: gC,
isDisabled: n,
onChange: o,
onKeyDown: F
- }), P ? /* @__PURE__ */ (0, L.jsx)(Jce, {
+ }), P ? /* @__PURE__ */ (0, L.jsx)(Yce, {
field: _,
menu: v,
options: O,
@@ -40473,7 +40473,7 @@ function Zce({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
onClose: ne
}) : null]
}),
- /* @__PURE__ */ (0, L.jsx)(Yce, {
+ /* @__PURE__ */ (0, L.jsx)(Xce, {
credentials: t,
hidden: y,
onHidden: b,
@@ -40491,9 +40491,9 @@ function Zce({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
/* @__PURE__ */ (0, L.jsxs)("div", {
"aria-live": "polite",
className: "flex flex-col gap-3 empty:hidden",
- children: [A || M.isPending ? /* @__PURE__ */ (0, L.jsx)(BA, {
+ children: [A || M.isPending ? /* @__PURE__ */ (0, L.jsx)(RA, {
embedded: !0,
- label: k?.message || (k?.total ? `查找中:${k.checked || 0}/${k.total}` : se ? Gce : Kce),
+ label: k?.message || (k?.total ? `查找中:${k.checked || 0}/${k.total}` : se ? Kce : qce),
value: k?.checked,
total: k?.total
}) : null, C ? /* @__PURE__ */ (0, L.jsx)(J, {
@@ -40505,8 +40505,8 @@ function Zce({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
re.length ? /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col gap-3",
children: [
- /* @__PURE__ */ (0, L.jsx)(XA, { children: "查找结果" }),
- re.map((e, t) => /* @__PURE__ */ (0, L.jsx)(Xce, {
+ /* @__PURE__ */ (0, L.jsx)(JA, { children: "查找结果" }),
+ re.map((e, t) => /* @__PURE__ */ (0, L.jsx)(Zce, {
row: e,
at: t,
hidden: y,
@@ -40561,16 +40561,16 @@ function Zce({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
}
//#endregion
//#region src/react/follow-manage/alias-manager.tsx
-var Qce = (e) => `将移除别名「${e}」,对应来源恢复为独立创作者组。`, DI = (e) => e.alias;
-function $ce(e, t, n) {
+var $ce = (e) => `将移除别名「${e}」,对应来源恢复为独立创作者组。`, EI = (e) => e.alias;
+function ele(e, t, n) {
let r = n ? `name:${n}` : "", i = r ? e.find((e) => e.author_key === r) : e.find((e) => e.author_name === t || e.entity_name === t);
return i ? e.filter((e) => e.author_key === i.author_key) : [];
}
-function OI({ sources: e, name: t, canonicalKey: n }) {
+function DI({ sources: e, name: t, canonicalKey: n }) {
return /* @__PURE__ */ (0, L.jsxs)("span", {
className: "flex items-center gap-2",
- children: [/* @__PURE__ */ (0, L.jsx)(SI, {
- group: $ce(e, t, n),
+ children: [/* @__PURE__ */ (0, L.jsx)(xI, {
+ group: ele(e, t, n),
name: t
}), /* @__PURE__ */ (0, L.jsx)("b", {
className: "text-body-medium",
@@ -40578,15 +40578,15 @@ function OI({ sources: e, name: t, canonicalKey: n }) {
})]
});
}
-function ele({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i }) {
+function tle({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i }) {
let [a, o] = (0, I.useState)(/* @__PURE__ */ new Set()), [s, c] = (0, I.useState)(""), [l, u] = (0, I.useState)(""), [d, f] = (0, I.useState)(""), p = It({
mutationFn: async (e) => {
let t = 0;
for (let n of e) {
try {
- await MF(n.canonical, n.alias);
+ await jF(n.canonical, n.alias);
} catch (n) {
- throw t && zF(), Error(`${K(n)}(还有 ${e.length - t} 组没有合并)`);
+ throw t && RF(), Error(`${K(n)}(还有 ${e.length - t} 组没有合并)`);
}
t += 1;
}
@@ -40596,19 +40596,19 @@ function ele({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
};
},
onSuccess: (e) => {
- c(""), o(/* @__PURE__ */ new Set()), zF(), i(`已合并 ${e.done} 组创作者别名`);
+ c(""), o(/* @__PURE__ */ new Set()), RF(), i(`已合并 ${e.done} 组创作者别名`);
},
onError: (e) => c(K(e))
}), m = It({
- mutationFn: (e) => MF(e.canonical, e.alias),
+ mutationFn: (e) => jF(e.canonical, e.alias),
onSuccess: () => {
- c(""), u(""), f(""), zF(), i("已保存创作者别名");
+ c(""), u(""), f(""), RF(), i("已保存创作者别名");
},
onError: (e) => c(K(e))
}), h = It({
- mutationFn: (e) => wse(e),
+ mutationFn: (e) => Tse(e),
onSuccess: () => {
- c(""), zF(), i("已移除创作者别名");
+ c(""), RF(), i("已移除创作者别名");
},
onError: (e) => c(K(e))
}), _ = (e, t) => {
@@ -40618,9 +40618,9 @@ function ele({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
confirmLabel: t ? "合并全部别名" : "合并所选别名",
onConfirm: () => p.mutateAsync(e)
});
- }, v = t.filter((e) => a.has(DI(e))), y = t.length > 0 && v.length === t.length, b = Y(p.isPending);
+ }, v = t.filter((e) => a.has(EI(e))), y = t.length > 0 && v.length === t.length, b = Y(p.isPending);
return /* @__PURE__ */ (0, L.jsxs)("div", {
- className: _w({
+ className: gw({
padding: "none",
className: "flex flex-col gap-4 px-6 py-5 max-sm:px-4"
}),
@@ -40631,10 +40631,10 @@ function ele({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
}),
/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col gap-2",
- children: [/* @__PURE__ */ (0, L.jsx)(XA, { children: "手动添加别名" }), /* @__PURE__ */ (0, L.jsxs)("div", {
+ children: [/* @__PURE__ */ (0, L.jsx)(JA, { children: "手动添加别名" }), /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-wrap items-end gap-2",
children: [
- /* @__PURE__ */ (0, L.jsx)(Yj, {
+ /* @__PURE__ */ (0, L.jsx)(qj, {
"aria-label": "规范创作者名",
placeholder: "规范创作者名",
value: l,
@@ -40642,7 +40642,7 @@ function ele({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
isDisabled: r,
className: "w-56"
}),
- /* @__PURE__ */ (0, L.jsx)(Yj, {
+ /* @__PURE__ */ (0, L.jsx)(qj, {
"aria-label": "平台别名",
placeholder: "平台别名",
value: d,
@@ -40663,13 +40663,13 @@ function ele({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
]
})]
}),
- s ? /* @__PURE__ */ (0, L.jsx)(YA, { children: s }) : null,
+ s ? /* @__PURE__ */ (0, L.jsx)(qA, { children: s }) : null,
t.length ? /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col gap-2",
children: [/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
children: [
- /* @__PURE__ */ (0, L.jsx)(XA, { children: "待合并" }),
+ /* @__PURE__ */ (0, L.jsx)(JA, { children: "待合并" }),
/* @__PURE__ */ (0, L.jsx)("span", {
className: "mr-auto text-body-2-regular text-text-secondary",
children: `${t.length} 组`
@@ -40691,44 +40691,44 @@ function ele({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
children: `全部合并(${t.length})`
})
]
- }), /* @__PURE__ */ (0, L.jsx)(Mj, { children: /* @__PURE__ */ (0, L.jsxs)(kj, {
+ }), /* @__PURE__ */ (0, L.jsx)(Aj, { children: /* @__PURE__ */ (0, L.jsxs)(Dj, {
"aria-label": "待合并创作者别名",
size: "sm",
- children: [/* @__PURE__ */ (0, L.jsxs)(oA, { children: [
- /* @__PURE__ */ (0, L.jsx)(sA, {
+ children: [/* @__PURE__ */ (0, L.jsxs)(iA, { children: [
+ /* @__PURE__ */ (0, L.jsx)(aA, {
id: "select",
- children: /* @__PURE__ */ (0, L.jsx)(Oj, {
+ children: /* @__PURE__ */ (0, L.jsx)(Ej, {
slot: null,
isSelected: y,
isIndeterminate: v.length > 0 && !y,
"aria-label": "全选待合并别名",
- onChange: (e) => o(e ? new Set(t.map(DI)) : /* @__PURE__ */ new Set())
+ onChange: (e) => o(e ? new Set(t.map(EI)) : /* @__PURE__ */ new Set())
})
}),
- /* @__PURE__ */ (0, L.jsx)(sA, {
+ /* @__PURE__ */ (0, L.jsx)(aA, {
id: "canonical",
children: "规范创作者"
}),
- /* @__PURE__ */ (0, L.jsx)(sA, {
+ /* @__PURE__ */ (0, L.jsx)(aA, {
id: "alias",
isRowHeader: !0,
children: "平台别名"
}),
- /* @__PURE__ */ (0, L.jsx)(sA, {
+ /* @__PURE__ */ (0, L.jsx)(aA, {
id: "evidence",
children: "依据"
}),
- /* @__PURE__ */ (0, L.jsx)(sA, {
+ /* @__PURE__ */ (0, L.jsx)(aA, {
id: "actions",
children: "操作"
})
- ] }), /* @__PURE__ */ (0, L.jsx)(lA, { children: t.map((e) => {
- let t = DI(e);
- return /* @__PURE__ */ (0, L.jsxs)(fA, {
+ ] }), /* @__PURE__ */ (0, L.jsx)(sA, { children: t.map((e) => {
+ let t = EI(e);
+ return /* @__PURE__ */ (0, L.jsxs)(uA, {
id: t,
"data-board-selected": a.has(t) || void 0,
children: [
- /* @__PURE__ */ (0, L.jsx)(mA, { children: /* @__PURE__ */ (0, L.jsx)(Oj, {
+ /* @__PURE__ */ (0, L.jsx)(fA, { children: /* @__PURE__ */ (0, L.jsx)(Ej, {
slot: null,
isSelected: a.has(t),
"aria-label": `选择别名 ${e.alias},归入 ${e.canonical}`,
@@ -40737,16 +40737,16 @@ function ele({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
e ? n.add(t) : n.delete(t), o(n);
}
}) }),
- /* @__PURE__ */ (0, L.jsx)(mA, { children: /* @__PURE__ */ (0, L.jsx)(OI, {
+ /* @__PURE__ */ (0, L.jsx)(fA, { children: /* @__PURE__ */ (0, L.jsx)(DI, {
sources: n,
name: e.canonical
}) }),
- /* @__PURE__ */ (0, L.jsx)(mA, { children: e.alias }),
- /* @__PURE__ */ (0, L.jsx)(mA, { children: /* @__PURE__ */ (0, L.jsx)("span", {
+ /* @__PURE__ */ (0, L.jsx)(fA, { children: e.alias }),
+ /* @__PURE__ */ (0, L.jsx)(fA, { children: /* @__PURE__ */ (0, L.jsx)("span", {
className: "text-body-2-regular text-text-secondary",
children: e.evidence
}) }),
- /* @__PURE__ */ (0, L.jsx)(mA, { children: /* @__PURE__ */ (0, L.jsx)(G, {
+ /* @__PURE__ */ (0, L.jsx)(fA, { children: /* @__PURE__ */ (0, L.jsx)(G, {
variant: "secondary",
size: "small",
disabled: r,
@@ -40763,27 +40763,27 @@ function ele({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
className: "flex flex-col gap-2",
children: [/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
- children: [/* @__PURE__ */ (0, L.jsx)(XA, { children: "已保存别名" }), /* @__PURE__ */ (0, L.jsx)("span", {
+ children: [/* @__PURE__ */ (0, L.jsx)(JA, { children: "已保存别名" }), /* @__PURE__ */ (0, L.jsx)("span", {
className: "text-body-2-regular text-text-secondary",
children: `${e.length} 组`
})]
- }), e.length ? /* @__PURE__ */ (0, L.jsx)(Mj, { children: /* @__PURE__ */ (0, L.jsxs)(kj, {
+ }), e.length ? /* @__PURE__ */ (0, L.jsx)(Aj, { children: /* @__PURE__ */ (0, L.jsxs)(Dj, {
"aria-label": "已保存创作者别名",
size: "sm",
- children: [/* @__PURE__ */ (0, L.jsxs)(oA, { children: [/* @__PURE__ */ (0, L.jsx)(sA, {
+ children: [/* @__PURE__ */ (0, L.jsxs)(iA, { children: [/* @__PURE__ */ (0, L.jsx)(aA, {
id: "canonical",
isRowHeader: !0,
children: "规范创作者"
- }), /* @__PURE__ */ (0, L.jsx)(sA, {
+ }), /* @__PURE__ */ (0, L.jsx)(aA, {
id: "aliases",
children: "平台别名"
- })] }), /* @__PURE__ */ (0, L.jsx)(lA, { children: e.map((e) => /* @__PURE__ */ (0, L.jsxs)(fA, {
+ })] }), /* @__PURE__ */ (0, L.jsx)(sA, { children: e.map((e) => /* @__PURE__ */ (0, L.jsxs)(uA, {
id: e.canonical_key,
- children: [/* @__PURE__ */ (0, L.jsx)(mA, { children: /* @__PURE__ */ (0, L.jsx)(OI, {
+ children: [/* @__PURE__ */ (0, L.jsx)(fA, { children: /* @__PURE__ */ (0, L.jsx)(DI, {
sources: n,
name: e.canonical_name,
canonicalKey: e.canonical_key
- }) }), /* @__PURE__ */ (0, L.jsx)(mA, { children: /* @__PURE__ */ (0, L.jsx)("span", {
+ }) }), /* @__PURE__ */ (0, L.jsx)(fA, { children: /* @__PURE__ */ (0, L.jsx)("span", {
className: "flex flex-wrap items-center gap-1.5",
children: e.aliases.map((e) => /* @__PURE__ */ (0, L.jsxs)("span", {
className: "inline-flex items-center gap-1 rounded-md bg-background-secondary-default px-1.5 py-1 text-caption-1-medium text-text-secondary",
@@ -40791,13 +40791,13 @@ function ele({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
variant: "ghost",
size: "xs",
iconOnly: !0,
- leadingIcon: $S,
+ leadingIcon: QS,
"aria-label": `移除别名 ${e.name}`,
disabled: r,
...Y(h.isPending),
onClick: () => void g({
title: "移除创作者别名",
- body: Qce(e.name),
+ body: $ce(e.name),
confirmLabel: "移除创作者别名",
onConfirm: () => h.mutateAsync(e.name)
})
@@ -40805,9 +40805,9 @@ function ele({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
}, e.key))
}) })]
}, e.canonical_key)) })]
- }) }) : /* @__PURE__ */ (0, L.jsx)(vw, {
+ }) }) : /* @__PURE__ */ (0, L.jsx)(_w, {
shell: "plain",
- icon: yC,
+ icon: vC,
title: "还没有保存创作者别名",
children: "填写规范创作者名和平台别名以添加。"
})]
@@ -40817,33 +40817,33 @@ function ele({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
}
//#endregion
//#region src/react/follow-manage/credentials.tsx
-var tle = "这些账号信息存在哪里", nle = "存成运行 Peach 那台电脑上的一个文件。在 Windows 上它不额外加锁,能登录那台电脑的人都能打开。", rle = "将清除这个来源在本机和共享副本中的登录凭据。", ile = "文件权限过宽。在运行 Peach 的 POSIX 主机上收紧为 0600。";
-function ale(e, t) {
+var nle = "这些账号信息存在哪里", rle = "存成运行 Peach 那台电脑上的一个文件。在 Windows 上它不额外加锁,能登录那台电脑的人都能打开。", ile = "将清除这个来源在本机和共享副本中的登录凭据。", ale = "文件权限过宽。在运行 Peach 的 POSIX 主机上收紧为 0600。";
+function ole(e, t) {
return (e.shared_fields || []).includes(t) ? "来自共享,留空表示不改" : e.fields.includes(t) ? "已保存,留空表示不改" : "未填写";
}
-function ole({ row: e }) {
- if (VF(e)) return /* @__PURE__ */ (0, L.jsx)(dw, {
+function sle({ row: e }) {
+ if (BF(e)) return /* @__PURE__ */ (0, L.jsx)(uw, {
variant: "caption",
color: "lime",
children: "已配置"
});
let t = e.requirement === "required" ? "yellow" : e.requirement === "blocked" ? "rose" : "neutral";
- return /* @__PURE__ */ (0, L.jsx)(dw, {
+ return /* @__PURE__ */ (0, L.jsx)(uw, {
variant: "caption",
color: t,
- children: Ise[e.requirement] || ""
+ children: Lse[e.requirement] || ""
});
}
-function sle({ row: e, readOnly: t, toast: n }) {
- let [r, i] = (0, I.useState)({}), [a, o] = (0, I.useState)(""), s = VF(e), c = It({
- mutationFn: (t) => Tse(e.provider, t),
+function cle({ row: e, readOnly: t, toast: n }) {
+ let [r, i] = (0, I.useState)({}), [a, o] = (0, I.useState)(""), s = BF(e), c = It({
+ mutationFn: (t) => Ese(e.provider, t),
onSuccess: (e, t) => {
if (e.note) {
o(e.note);
return;
}
o(""), i({}), X.invalidateQueries({
- queryKey: dF,
+ queryKey: uF,
exact: !0
}), n(Object.keys(t).length ? "已保存来源凭据" : "已清除来源凭据");
},
@@ -40859,17 +40859,17 @@ function sle({ row: e, readOnly: t, toast: n }) {
return /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col gap-3",
children: [
- /* @__PURE__ */ (0, L.jsxs)(JA, { children: [e.why, e.where ? /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [" ", /* @__PURE__ */ (0, L.jsx)(ZA, {
+ /* @__PURE__ */ (0, L.jsxs)(KA, { children: [e.why, e.where ? /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [" ", /* @__PURE__ */ (0, L.jsx)(YA, {
href: e.where,
children: "去取"
})] }) : null] }),
- e.howto ? /* @__PURE__ */ (0, L.jsx)(JA, { children: e.howto }) : null,
+ e.howto ? /* @__PURE__ */ (0, L.jsx)(KA, { children: e.howto }) : null,
/* @__PURE__ */ (0, L.jsx)("div", {
className: "flex flex-wrap items-end gap-3",
- children: (e.needs || []).map((n) => /* @__PURE__ */ (0, L.jsx)(Yj, {
+ children: (e.needs || []).map((n) => /* @__PURE__ */ (0, L.jsx)(qj, {
type: "password",
label: n,
- placeholder: ale(e, n),
+ placeholder: ole(e, n),
autoComplete: "off",
spellCheck: "false",
isDisabled: t,
@@ -40897,7 +40897,7 @@ function sle({ row: e, readOnly: t, toast: n }) {
...Y(c.isPending),
onClick: () => void g({
title: "清除来源凭据",
- body: rle,
+ body: ile,
confirmLabel: "清除来源凭据",
danger: !0,
onConfirm: () => c.mutateAsync({})
@@ -40905,9 +40905,9 @@ function sle({ row: e, readOnly: t, toast: n }) {
children: "清除"
}) : null]
}),
- a ? /* @__PURE__ */ (0, L.jsx)(YA, { children: a }) : null,
- (e.shared_fields || []).length ? /* @__PURE__ */ (0, L.jsx)(JA, { children: `${e.shared_fields.join("、")} 是从共享副本回填的,本机没有单独存。清除会把两边一起删。` }) : null,
- e.path ? /* @__PURE__ */ (0, L.jsx)(zA, {
+ a ? /* @__PURE__ */ (0, L.jsx)(qA, { children: a }) : null,
+ (e.shared_fields || []).length ? /* @__PURE__ */ (0, L.jsx)(KA, { children: `${e.shared_fields.join("、")} 是从共享副本回填的,本机没有单独存。清除会把两边一起删。` }) : null,
+ e.path ? /* @__PURE__ */ (0, L.jsx)(LA, {
path: e.path,
className: "font-mono text-caption-1-regular text-text-tertiary",
onRevealed: n
@@ -40915,25 +40915,25 @@ function sle({ row: e, readOnly: t, toast: n }) {
e.world_readable ? /* @__PURE__ */ (0, L.jsx)(J, {
tone: "error",
title: "凭据文件权限过宽",
- children: ile
+ children: ale
}) : null
]
});
}
-function cle({ row: e, readOnly: t, toast: n }) {
+function lle({ row: e, readOnly: t, toast: n }) {
let r = /* @__PURE__ */ (0, L.jsxs)("span", {
className: "flex min-w-0 items-center gap-2",
children: [
/* @__PURE__ */ (0, L.jsx)("span", {
className: "inline-flex size-3.5 shrink-0 items-center justify-center",
- children: /* @__PURE__ */ (0, L.jsx)(xI, { provider: e.provider })
+ children: /* @__PURE__ */ (0, L.jsx)(bI, { provider: e.provider })
}),
/* @__PURE__ */ (0, L.jsx)("b", {
className: "text-body-medium text-text-primary",
children: e.provider_label
}),
- /* @__PURE__ */ (0, L.jsx)(ole, { row: e }),
- e.missing.length ? /* @__PURE__ */ (0, L.jsx)(dw, {
+ /* @__PURE__ */ (0, L.jsx)(sle, { row: e }),
+ e.missing.length ? /* @__PURE__ */ (0, L.jsx)(uw, {
variant: "caption",
color: "rose",
children: `缺 ${e.missing.join("、")}`
@@ -40942,13 +40942,13 @@ function cle({ row: e, readOnly: t, toast: n }) {
});
return e.requirement === "none" || e.requirement === "blocked" ? /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-wrap items-center gap-3 border-b border-separator-border px-6 py-5 last:border-b-0 max-sm:px-4",
- children: [r, e.requirement === "blocked" ? /* @__PURE__ */ (0, L.jsx)(JA, { children: e.why }) : null]
+ children: [r, e.requirement === "blocked" ? /* @__PURE__ */ (0, L.jsx)(KA, { children: e.why }) : null]
}) : /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col gap-2 border-b border-separator-border px-6 py-5 last:border-b-0 max-sm:px-4",
- children: [r, /* @__PURE__ */ (0, L.jsx)(ej, {
- summary: VF(e) ? "修改凭据" : "填写凭据",
- defaultOpen: e.requirement === "required" && !VF(e),
- children: /* @__PURE__ */ (0, L.jsx)(sle, {
+ children: [r, /* @__PURE__ */ (0, L.jsx)(QA, {
+ summary: BF(e) ? "修改凭据" : "填写凭据",
+ defaultOpen: e.requirement === "required" && !BF(e),
+ children: /* @__PURE__ */ (0, L.jsx)(cle, {
row: e,
readOnly: t,
toast: n
@@ -40956,10 +40956,10 @@ function cle({ row: e, readOnly: t, toast: n }) {
})]
});
}
-function lle({ data: e, readOnly: t, toast: n }) {
- let r = e.providers || [], i = r.filter((e) => e.requirement === "required" && !VF(e));
+function ule({ data: e, readOnly: t, toast: n }) {
+ let r = e.providers || [], i = r.filter((e) => e.requirement === "required" && !BF(e));
return r.length ? /* @__PURE__ */ (0, L.jsxs)("div", {
- className: _w({
+ className: gw({
padding: "none",
className: "flex flex-col gap-4 px-6 py-5 max-sm:px-4"
}),
@@ -40994,12 +40994,12 @@ function lle({ data: e, readOnly: t, toast: n }) {
className: "text-body-medium text-text-secondary",
children: e.title
}), /* @__PURE__ */ (0, L.jsx)("div", {
- className: _w({
+ className: gw({
variant: "outlined",
padding: "none",
className: "flex flex-col overflow-hidden"
}),
- children: e.rows.map((e) => /* @__PURE__ */ (0, L.jsx)(cle, {
+ children: e.rows.map((e) => /* @__PURE__ */ (0, L.jsx)(lle, {
row: e,
readOnly: t,
toast: n
@@ -41011,13 +41011,13 @@ function lle({ data: e, readOnly: t, toast: n }) {
children: [
/* @__PURE__ */ (0, L.jsx)("b", {
className: "text-body-medium text-text-primary",
- children: tle
+ children: nle
}),
/* @__PURE__ */ (0, L.jsx)("span", {
className: "text-body-2-regular text-text-secondary",
- children: nle
+ children: rle
}),
- /* @__PURE__ */ (0, L.jsx)(zA, {
+ /* @__PURE__ */ (0, L.jsx)(LA, {
path: e.root,
prefix: "凭据文件在 ",
className: "text-body-2-regular text-text-secondary",
@@ -41026,16 +41026,16 @@ function lle({ data: e, readOnly: t, toast: n }) {
]
})
]
- }) : /* @__PURE__ */ (0, L.jsx)(vw, {
+ }) : /* @__PURE__ */ (0, L.jsx)(_w, {
shell: "plain",
- icon: pC,
+ icon: fC,
title: "没有可配置的来源",
children: "已接入的站点及其凭据状态会显示在这里。"
});
}
//#endregion
//#region node_modules/@tanstack/table-core/build/lib/index.mjs
-function kI() {
+function OI() {
return {
accessor: (e, t) => typeof e == "function" ? {
...t,
@@ -41048,24 +41048,24 @@ function kI() {
group: (e) => e
};
}
-function AI(e, t) {
+function kI(e, t) {
return typeof e == "function" ? e(t) : e;
}
-function jI(e, t) {
+function AI(e, t) {
return (n) => {
t.setState((t) => ({
...t,
- [e]: AI(n, t[e])
+ [e]: kI(n, t[e])
}));
};
}
-function MI(e) {
+function jI(e) {
return e instanceof Function;
}
-function ule(e) {
+function dle(e) {
return Array.isArray(e) && e.every((e) => typeof e == "number");
}
-function dle(e, t) {
+function fle(e, t) {
let n = [], r = (e) => {
e.forEach((e) => {
n.push(e);
@@ -41075,7 +41075,7 @@ function dle(e, t) {
};
return r(e), n;
}
-function NI(e, t, n) {
+function MI(e, t, n) {
let r = [], i;
return (a) => {
let o;
@@ -41097,21 +41097,21 @@ function NI(e, t, n) {
return i;
};
}
-function PI(e, t, n, r) {
+function NI(e, t, n, r) {
return {
debug: () => e?.debugAll ?? e[t],
key: !1,
onChange: r
};
}
-function fle(e, t, n, r) {
+function ple(e, t, n, r) {
let i = {
id: `${t.id}_${n.id}`,
row: t,
column: n,
getValue: () => t.getValue(r),
renderValue: () => i.getValue() ?? e.options.renderFallbackValue,
- getContext: NI(() => [
+ getContext: MI(() => [
e,
n,
t,
@@ -41123,13 +41123,13 @@ function fle(e, t, n, r) {
cell: r,
getValue: r.getValue,
renderValue: r.renderValue
- }), PI(e.options, "debugCells", "cell.getContext"))
+ }), NI(e.options, "debugCells", "cell.getContext"))
};
return e._features.forEach((r) => {
r.createCell == null || r.createCell(i, n, t, e);
}, {}), i;
}
-function ple(e, t, n, r) {
+function mle(e, t, n, r) {
let i = {
...e._getDefaultColumnDef(),
...t
@@ -41146,17 +41146,17 @@ function ple(e, t, n, r) {
depth: n,
columnDef: i,
columns: [],
- getFlatColumns: NI(() => [!0], () => [c, ...c.columns?.flatMap((e) => e.getFlatColumns())], PI(e.options, "debugColumns", "column.getFlatColumns")),
- getLeafColumns: NI(() => [e._getOrderColumnsFn()], (e) => {
+ getFlatColumns: MI(() => [!0], () => [c, ...c.columns?.flatMap((e) => e.getFlatColumns())], NI(e.options, "debugColumns", "column.getFlatColumns")),
+ getLeafColumns: MI(() => [e._getOrderColumnsFn()], (e) => {
var t;
return (t = c.columns) != null && t.length ? e(c.columns.flatMap((e) => e.getLeafColumns())) : [c];
- }, PI(e.options, "debugColumns", "column.getLeafColumns"))
+ }, NI(e.options, "debugColumns", "column.getLeafColumns"))
};
for (let t of e._features) t.createColumn == null || t.createColumn(c, e);
return c;
}
-var FI = "debugHeaders";
-function II(e, t, n) {
+var PI = "debugHeaders";
+function FI(e, t, n) {
let r = {
id: n.id ?? t.id,
column: t,
@@ -41184,42 +41184,42 @@ function II(e, t, n) {
t.createHeader == null || t.createHeader(r, e);
}), r;
}
-var mle = { createTable: (e) => {
- e.getHeaderGroups = NI(() => [
+var hle = { createTable: (e) => {
+ e.getHeaderGroups = MI(() => [
e.getAllColumns(),
e.getVisibleLeafColumns(),
e.getState().columnPinning.left,
e.getState().columnPinning.right
], (t, n, r, i) => {
let a = r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], o = i?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], s = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id)));
- return LI(t, [
+ return II(t, [
...a,
...s,
...o
], e);
- }, PI(e.options, FI, "getHeaderGroups")), e.getCenterHeaderGroups = NI(() => [
+ }, NI(e.options, PI, "getHeaderGroups")), e.getCenterHeaderGroups = MI(() => [
e.getAllColumns(),
e.getVisibleLeafColumns(),
e.getState().columnPinning.left,
e.getState().columnPinning.right
- ], (t, n, r, i) => (n = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id))), LI(t, n, e, "center")), PI(e.options, FI, "getCenterHeaderGroups")), e.getLeftHeaderGroups = NI(() => [
+ ], (t, n, r, i) => (n = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id))), II(t, n, e, "center")), NI(e.options, PI, "getCenterHeaderGroups")), e.getLeftHeaderGroups = MI(() => [
e.getAllColumns(),
e.getVisibleLeafColumns(),
e.getState().columnPinning.left
- ], (t, n, r) => LI(t, r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], e, "left"), PI(e.options, FI, "getLeftHeaderGroups")), e.getRightHeaderGroups = NI(() => [
+ ], (t, n, r) => II(t, r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], e, "left"), NI(e.options, PI, "getLeftHeaderGroups")), e.getRightHeaderGroups = MI(() => [
e.getAllColumns(),
e.getVisibleLeafColumns(),
e.getState().columnPinning.right
- ], (t, n, r) => LI(t, r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], e, "right"), PI(e.options, FI, "getRightHeaderGroups")), e.getFooterGroups = NI(() => [e.getHeaderGroups()], (e) => [...e].reverse(), PI(e.options, FI, "getFooterGroups")), e.getLeftFooterGroups = NI(() => [e.getLeftHeaderGroups()], (e) => [...e].reverse(), PI(e.options, FI, "getLeftFooterGroups")), e.getCenterFooterGroups = NI(() => [e.getCenterHeaderGroups()], (e) => [...e].reverse(), PI(e.options, FI, "getCenterFooterGroups")), e.getRightFooterGroups = NI(() => [e.getRightHeaderGroups()], (e) => [...e].reverse(), PI(e.options, FI, "getRightFooterGroups")), e.getFlatHeaders = NI(() => [e.getHeaderGroups()], (e) => e.map((e) => e.headers).flat(), PI(e.options, FI, "getFlatHeaders")), e.getLeftFlatHeaders = NI(() => [e.getLeftHeaderGroups()], (e) => e.map((e) => e.headers).flat(), PI(e.options, FI, "getLeftFlatHeaders")), e.getCenterFlatHeaders = NI(() => [e.getCenterHeaderGroups()], (e) => e.map((e) => e.headers).flat(), PI(e.options, FI, "getCenterFlatHeaders")), e.getRightFlatHeaders = NI(() => [e.getRightHeaderGroups()], (e) => e.map((e) => e.headers).flat(), PI(e.options, FI, "getRightFlatHeaders")), e.getCenterLeafHeaders = NI(() => [e.getCenterFlatHeaders()], (e) => e.filter((e) => {
+ ], (t, n, r) => II(t, r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], e, "right"), NI(e.options, PI, "getRightHeaderGroups")), e.getFooterGroups = MI(() => [e.getHeaderGroups()], (e) => [...e].reverse(), NI(e.options, PI, "getFooterGroups")), e.getLeftFooterGroups = MI(() => [e.getLeftHeaderGroups()], (e) => [...e].reverse(), NI(e.options, PI, "getLeftFooterGroups")), e.getCenterFooterGroups = MI(() => [e.getCenterHeaderGroups()], (e) => [...e].reverse(), NI(e.options, PI, "getCenterFooterGroups")), e.getRightFooterGroups = MI(() => [e.getRightHeaderGroups()], (e) => [...e].reverse(), NI(e.options, PI, "getRightFooterGroups")), e.getFlatHeaders = MI(() => [e.getHeaderGroups()], (e) => e.map((e) => e.headers).flat(), NI(e.options, PI, "getFlatHeaders")), e.getLeftFlatHeaders = MI(() => [e.getLeftHeaderGroups()], (e) => e.map((e) => e.headers).flat(), NI(e.options, PI, "getLeftFlatHeaders")), e.getCenterFlatHeaders = MI(() => [e.getCenterHeaderGroups()], (e) => e.map((e) => e.headers).flat(), NI(e.options, PI, "getCenterFlatHeaders")), e.getRightFlatHeaders = MI(() => [e.getRightHeaderGroups()], (e) => e.map((e) => e.headers).flat(), NI(e.options, PI, "getRightFlatHeaders")), e.getCenterLeafHeaders = MI(() => [e.getCenterFlatHeaders()], (e) => e.filter((e) => {
var t;
return !((t = e.subHeaders) != null && t.length);
- }), PI(e.options, FI, "getCenterLeafHeaders")), e.getLeftLeafHeaders = NI(() => [e.getLeftFlatHeaders()], (e) => e.filter((e) => {
+ }), NI(e.options, PI, "getCenterLeafHeaders")), e.getLeftLeafHeaders = MI(() => [e.getLeftFlatHeaders()], (e) => e.filter((e) => {
var t;
return !((t = e.subHeaders) != null && t.length);
- }), PI(e.options, FI, "getLeftLeafHeaders")), e.getRightLeafHeaders = NI(() => [e.getRightFlatHeaders()], (e) => e.filter((e) => {
+ }), NI(e.options, PI, "getLeftLeafHeaders")), e.getRightLeafHeaders = MI(() => [e.getRightFlatHeaders()], (e) => e.filter((e) => {
var t;
return !((t = e.subHeaders) != null && t.length);
- }), PI(e.options, FI, "getRightLeafHeaders")), e.getLeafHeaders = NI(() => [
+ }), NI(e.options, PI, "getRightLeafHeaders")), e.getLeafHeaders = MI(() => [
e.getLeftHeaderGroups(),
e.getCenterHeaderGroups(),
e.getRightHeaderGroups()
@@ -41227,9 +41227,9 @@ var mle = { createTable: (e) => {
...e[0]?.headers ?? [],
...t[0]?.headers ?? [],
...n[0]?.headers ?? []
- ].map((e) => e.getLeafHeaders()).flat(), PI(e.options, FI, "getLeafHeaders"));
+ ].map((e) => e.getLeafHeaders()).flat(), NI(e.options, PI, "getLeafHeaders"));
} };
-function LI(e, t, n, r) {
+function II(e, t, n, r) {
let i = 0, a = function(e, t) {
t === void 0 && (t = 1), i = Math.max(i, t), e.filter((e) => e.getIsVisible()).forEach((e) => {
var n;
@@ -41247,7 +41247,7 @@ function LI(e, t, n, r) {
let o = [...a].reverse()[0], s = e.column.depth === i.depth, c, l = !1;
if (s && e.column.parent ? c = e.column.parent : (c = e.column, l = !0), o && o?.column === c) o.subHeaders.push(e);
else {
- let i = II(n, c, {
+ let i = FI(n, c, {
id: [
r,
t,
@@ -41264,7 +41264,7 @@ function LI(e, t, n, r) {
i.headers.push(e), e.headerGroup = i;
}), o.push(i), t > 0 && s(a, t - 1);
};
- s(t.map((e, t) => II(n, e, {
+ s(t.map((e, t) => FI(n, e, {
depth: i,
index: t
})), i - 1), o.reverse();
@@ -41282,7 +41282,7 @@ function LI(e, t, n, r) {
});
return c(o[0]?.headers ?? []), o;
}
-var hle = (e, t, n, r, i, a, o) => {
+var gle = (e, t, n, r, i, a, o) => {
let s = {
id: t,
index: r,
@@ -41303,7 +41303,7 @@ var hle = (e, t, n, r, i, a, o) => {
},
renderValue: (t) => s.getValue(t) ?? e.options.renderFallbackValue,
subRows: a ?? [],
- getLeafRows: () => dle(s.subRows, (e) => e.subRows),
+ getLeafRows: () => fle(s.subRows, (e) => e.subRows),
getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
getParentRows: () => {
let e = [], t = s;
@@ -41314,95 +41314,95 @@ var hle = (e, t, n, r, i, a, o) => {
}
return e.reverse();
},
- getAllCells: NI(() => [e.getAllLeafColumns()], (t) => t.map((t) => fle(e, s, t, t.id)), PI(e.options, "debugRows", "getAllCells")),
- _getAllCellsByColumnId: NI(() => [s.getAllCells()], (e) => e.reduce((e, t) => (e[t.column.id] = t, e), {}), PI(e.options, "debugRows", "getAllCellsByColumnId"))
+ getAllCells: MI(() => [e.getAllLeafColumns()], (t) => t.map((t) => ple(e, s, t, t.id)), NI(e.options, "debugRows", "getAllCells")),
+ _getAllCellsByColumnId: MI(() => [s.getAllCells()], (e) => e.reduce((e, t) => (e[t.column.id] = t, e), {}), NI(e.options, "debugRows", "getAllCellsByColumnId"))
};
for (let t = 0; t < e._features.length; t++) {
let n = e._features[t];
n == null || n.createRow == null || n.createRow(s, e);
}
return s;
-}, gle = { createColumn: (e, t) => {
+}, _le = { createColumn: (e, t) => {
e._getFacetedRowModel = t.options.getFacetedRowModel && t.options.getFacetedRowModel(t, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : t.getPreFilteredRowModel(), e._getFacetedUniqueValues = t.options.getFacetedUniqueValues && t.options.getFacetedUniqueValues(t, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = t.options.getFacetedMinMaxValues && t.options.getFacetedMinMaxValues(t, e.id), e.getFacetedMinMaxValues = () => {
if (e._getFacetedMinMaxValues) return e._getFacetedMinMaxValues();
};
-} }, RI = (e, t, n) => {
+} }, LI = (e, t, n) => {
var r, i;
let a = n == null || (r = n.toString()) == null ? void 0 : r.toLowerCase();
return !!((i = e.getValue(t)) != null && (i = i.toString()) != null && (i = i.toLowerCase()) != null && i.includes(a));
};
-RI.autoRemove = (e) => JI(e);
-var zI = (e, t, n) => {
+LI.autoRemove = (e) => qI(e);
+var RI = (e, t, n) => {
var r;
return !!((r = e.getValue(t)) != null && (r = r.toString()) != null && r.includes(n));
};
-zI.autoRemove = (e) => JI(e);
-var BI = (e, t, n) => {
+RI.autoRemove = (e) => qI(e);
+var zI = (e, t, n) => {
var r;
return ((r = e.getValue(t)) == null || (r = r.toString()) == null ? void 0 : r.toLowerCase()) === n?.toLowerCase();
};
-BI.autoRemove = (e) => JI(e);
-var VI = (e, t, n) => e.getValue(t)?.includes(n);
-VI.autoRemove = (e) => JI(e);
-var HI = (e, t, n) => !n.some((n) => {
+zI.autoRemove = (e) => qI(e);
+var BI = (e, t, n) => e.getValue(t)?.includes(n);
+BI.autoRemove = (e) => qI(e);
+var VI = (e, t, n) => !n.some((n) => {
var r;
return !((r = e.getValue(t)) != null && r.includes(n));
});
-HI.autoRemove = (e) => JI(e) || !(e != null && e.length);
-var UI = (e, t, n) => n.some((n) => e.getValue(t)?.includes(n));
-UI.autoRemove = (e) => JI(e) || !(e != null && e.length);
-var WI = (e, t, n) => e.getValue(t) === n;
-WI.autoRemove = (e) => JI(e);
-var GI = (e, t, n) => e.getValue(t) == n;
-GI.autoRemove = (e) => JI(e);
-var KI = (e, t, n) => {
+VI.autoRemove = (e) => qI(e) || !(e != null && e.length);
+var HI = (e, t, n) => n.some((n) => e.getValue(t)?.includes(n));
+HI.autoRemove = (e) => qI(e) || !(e != null && e.length);
+var UI = (e, t, n) => e.getValue(t) === n;
+UI.autoRemove = (e) => qI(e);
+var WI = (e, t, n) => e.getValue(t) == n;
+WI.autoRemove = (e) => qI(e);
+var GI = (e, t, n) => {
let [r, i] = n, a = e.getValue(t);
return a >= r && a <= i;
};
-KI.resolveFilterValue = (e) => {
+GI.resolveFilterValue = (e) => {
let [t, n] = e, r = typeof t == "number" ? t : parseFloat(t), i = typeof n == "number" ? n : parseFloat(n), a = t === null || Number.isNaN(r) ? -Infinity : r, o = n === null || Number.isNaN(i) ? Infinity : i;
if (a > o) {
let e = a;
a = o, o = e;
}
return [a, o];
-}, KI.autoRemove = (e) => JI(e) || JI(e[0]) && JI(e[1]);
-var qI = {
- includesString: RI,
- includesStringSensitive: zI,
- equalsString: BI,
- arrIncludes: VI,
- arrIncludesAll: HI,
- arrIncludesSome: UI,
- equals: WI,
- weakEquals: GI,
- inNumberRange: KI
+}, GI.autoRemove = (e) => qI(e) || qI(e[0]) && qI(e[1]);
+var KI = {
+ includesString: LI,
+ includesStringSensitive: RI,
+ equalsString: zI,
+ arrIncludes: BI,
+ arrIncludesAll: VI,
+ arrIncludesSome: HI,
+ equals: UI,
+ weakEquals: WI,
+ inNumberRange: GI
};
-function JI(e) {
+function qI(e) {
return e == null || e === "";
}
-var _le = {
+var vle = {
getDefaultColumnDef: () => ({ filterFn: "auto" }),
getInitialState: (e) => ({
columnFilters: [],
...e
}),
getDefaultOptions: (e) => ({
- onColumnFiltersChange: jI("columnFilters", e),
+ onColumnFiltersChange: AI("columnFilters", e),
filterFromLeafRows: !1,
maxLeafRowFilterDepth: 100
}),
createColumn: (e, t) => {
e.getAutoFilterFn = () => {
let n = t.getCoreRowModel().flatRows[0]?.getValue(e.id);
- return typeof n == "string" ? qI.includesString : typeof n == "number" ? qI.inNumberRange : typeof n == "boolean" || typeof n == "object" && n ? qI.equals : Array.isArray(n) ? qI.arrIncludes : qI.weakEquals;
- }, e.getFilterFn = () => MI(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : t.options.filterFns?.[e.columnDef.filterFn] ?? qI[e.columnDef.filterFn], e.getCanFilter = () => (e.columnDef.enableColumnFilter ?? !0) && (t.options.enableColumnFilters ?? !0) && (t.options.enableFilters ?? !0) && !!e.accessorFn, e.getIsFiltered = () => e.getFilterIndex() > -1, e.getFilterValue = () => {
+ return typeof n == "string" ? KI.includesString : typeof n == "number" ? KI.inNumberRange : typeof n == "boolean" || typeof n == "object" && n ? KI.equals : Array.isArray(n) ? KI.arrIncludes : KI.weakEquals;
+ }, e.getFilterFn = () => jI(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : t.options.filterFns?.[e.columnDef.filterFn] ?? KI[e.columnDef.filterFn], e.getCanFilter = () => (e.columnDef.enableColumnFilter ?? !0) && (t.options.enableColumnFilters ?? !0) && (t.options.enableFilters ?? !0) && !!e.accessorFn, e.getIsFiltered = () => e.getFilterIndex() > -1, e.getFilterValue = () => {
var n;
return (n = t.getState().columnFilters) == null || (n = n.find((t) => t.id === e.id)) == null ? void 0 : n.value;
}, e.getFilterIndex = () => t.getState().columnFilters?.findIndex((t) => t.id === e.id) ?? -1, e.setFilterValue = (n) => {
t.setColumnFilters((t) => {
- let r = e.getFilterFn(), i = t?.find((t) => t.id === e.id), a = AI(n, i ? i.value : void 0);
- if (YI(r, a, e)) return t?.filter((t) => t.id !== e.id) ?? [];
+ let r = e.getFilterFn(), i = t?.find((t) => t.id === e.id), a = kI(n, i ? i.value : void 0);
+ if (JI(r, a, e)) return t?.filter((t) => t.id !== e.id) ?? [];
let o = {
id: e.id,
value: a
@@ -41417,19 +41417,19 @@ var _le = {
createTable: (e) => {
e.setColumnFilters = (t) => {
let n = e.getAllLeafColumns();
- e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange((e) => AI(t, e)?.filter((e) => {
+ e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange((e) => kI(t, e)?.filter((e) => {
let t = n.find((t) => t.id === e.id);
- return !(t && YI(t.getFilterFn(), e.value, t));
+ return !(t && JI(t.getFilterFn(), e.value, t));
}));
}, e.resetColumnFilters = (t) => {
e.setColumnFilters(t ? [] : e.initialState?.columnFilters ?? []);
}, e.getPreFilteredRowModel = () => e.getCoreRowModel(), e.getFilteredRowModel = () => (!e._getFilteredRowModel && e.options.getFilteredRowModel && (e._getFilteredRowModel = e.options.getFilteredRowModel(e)), e.options.manualFiltering || !e._getFilteredRowModel ? e.getPreFilteredRowModel() : e._getFilteredRowModel());
}
};
-function YI(e, t, n) {
+function JI(e, t, n) {
return (e && e.autoRemove ? e.autoRemove(t, n) : !1) || t === void 0 || typeof t == "string" && !t;
}
-var XI = {
+var YI = {
sum: (e, t, n) => n.reduce((t, n) => {
let r = n.getValue(e);
return t + (typeof r == "number" ? r : 0);
@@ -41465,7 +41465,7 @@ var XI = {
median: (e, t) => {
if (!t.length) return;
let n = t.map((t) => t.getValue(e));
- if (!ule(n)) return;
+ if (!dle(n)) return;
if (n.length === 1) return n[0];
let r = Math.floor(n.length / 2), i = n.sort((e, t) => e - t);
return n.length % 2 == 0 ? (i[r - 1] + i[r]) / 2 : i[r];
@@ -41473,7 +41473,7 @@ var XI = {
unique: (e, t) => Array.from(new Set(t.map((t) => t.getValue(e))).values()),
uniqueCount: (e, t) => new Set(t.map((t) => t.getValue(e))).size,
count: (e, t) => t.length
-}, vle = {
+}, yle = {
getDefaultColumnDef: () => ({
aggregatedCell: (e) => {
var t;
@@ -41486,7 +41486,7 @@ var XI = {
...e
}),
getDefaultOptions: (e) => ({
- onGroupingChange: jI("grouping", e),
+ onGroupingChange: AI("grouping", e),
groupedColumnMode: "reorder"
}),
createColumn: (e, t) => {
@@ -41499,11 +41499,11 @@ var XI = {
};
}, e.getAutoAggregationFn = () => {
let n = t.getCoreRowModel().flatRows[0]?.getValue(e.id);
- if (typeof n == "number") return XI.sum;
- if (Object.prototype.toString.call(n) === "[object Date]") return XI.extent;
+ if (typeof n == "number") return YI.sum;
+ if (Object.prototype.toString.call(n) === "[object Date]") return YI.extent;
}, e.getAggregationFn = () => {
if (!e) throw Error();
- return MI(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : t.options.aggregationFns?.[e.columnDef.aggregationFn] ?? XI[e.columnDef.aggregationFn];
+ return jI(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : t.options.aggregationFns?.[e.columnDef.aggregationFn] ?? YI[e.columnDef.aggregationFn];
};
},
createTable: (e) => {
@@ -41525,27 +41525,27 @@ var XI = {
};
}
};
-function yle(e, t, n) {
+function ble(e, t, n) {
if (!(t != null && t.length) || !n) return e;
let r = e.filter((e) => !t.includes(e.id));
return n === "remove" ? r : [...t.map((t) => e.find((e) => e.id === t)).filter(Boolean), ...r];
}
-var ble = {
+var xle = {
getInitialState: (e) => ({
columnOrder: [],
...e
}),
- getDefaultOptions: (e) => ({ onColumnOrderChange: jI("columnOrder", e) }),
+ getDefaultOptions: (e) => ({ onColumnOrderChange: AI("columnOrder", e) }),
createColumn: (e, t) => {
- e.getIndex = NI((e) => [nL(t, e)], (t) => t.findIndex((t) => t.id === e.id), PI(t.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (n) => nL(t, n)[0]?.id === e.id, e.getIsLastColumn = (n) => {
- let r = nL(t, n);
+ e.getIndex = MI((e) => [tL(t, e)], (t) => t.findIndex((t) => t.id === e.id), NI(t.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (n) => tL(t, n)[0]?.id === e.id, e.getIsLastColumn = (n) => {
+ let r = tL(t, n);
return r[r.length - 1]?.id === e.id;
};
},
createTable: (e) => {
e.setColumnOrder = (t) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(t), e.resetColumnOrder = (t) => {
e.setColumnOrder(t ? [] : e.initialState.columnOrder ?? []);
- }, e._getOrderColumnsFn = NI(() => [
+ }, e._getOrderColumnsFn = MI(() => [
e.getState().columnOrder,
e.getState().grouping,
e.options.groupedColumnMode
@@ -41560,18 +41560,18 @@ var ble = {
}
i = [...i, ...n];
}
- return yle(i, t, n);
- }, PI(e.options, "debugTable", "_getOrderColumnsFn"));
+ return ble(i, t, n);
+ }, NI(e.options, "debugTable", "_getOrderColumnsFn"));
}
-}, ZI = () => ({
+}, XI = () => ({
left: [],
right: []
-}), xle = {
+}), Sle = {
getInitialState: (e) => ({
- columnPinning: ZI(),
+ columnPinning: XI(),
...e
}),
- getDefaultOptions: (e) => ({ onColumnPinningChange: jI("columnPinning", e) }),
+ getDefaultOptions: (e) => ({ onColumnPinningChange: AI("columnPinning", e) }),
createColumn: (e, t) => {
e.pin = (n) => {
let r = e.getLeafColumns().map((e) => e.id).filter(Boolean);
@@ -41595,75 +41595,75 @@ var ble = {
};
},
createRow: (e, t) => {
- e.getCenterVisibleCells = NI(() => [
+ e.getCenterVisibleCells = MI(() => [
e._getAllVisibleCells(),
t.getState().columnPinning.left,
t.getState().columnPinning.right
], (e, t, n) => {
let r = [...t ?? [], ...n ?? []];
return e.filter((e) => !r.includes(e.column.id));
- }, PI(t.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = NI(() => [e._getAllVisibleCells(), t.getState().columnPinning.left], (e, t) => (t ?? []).map((t) => e.find((e) => e.column.id === t)).filter(Boolean).map((e) => ({
+ }, NI(t.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = MI(() => [e._getAllVisibleCells(), t.getState().columnPinning.left], (e, t) => (t ?? []).map((t) => e.find((e) => e.column.id === t)).filter(Boolean).map((e) => ({
...e,
position: "left"
- })), PI(t.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = NI(() => [e._getAllVisibleCells(), t.getState().columnPinning.right], (e, t) => (t ?? []).map((t) => e.find((e) => e.column.id === t)).filter(Boolean).map((e) => ({
+ })), NI(t.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = MI(() => [e._getAllVisibleCells(), t.getState().columnPinning.right], (e, t) => (t ?? []).map((t) => e.find((e) => e.column.id === t)).filter(Boolean).map((e) => ({
...e,
position: "right"
- })), PI(t.options, "debugRows", "getRightVisibleCells"));
+ })), NI(t.options, "debugRows", "getRightVisibleCells"));
},
createTable: (e) => {
- e.setColumnPinning = (t) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(t), e.resetColumnPinning = (t) => e.setColumnPinning(t ? ZI() : e.initialState?.columnPinning ?? ZI()), e.getIsSomeColumnsPinned = (t) => {
+ e.setColumnPinning = (t) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(t), e.resetColumnPinning = (t) => e.setColumnPinning(t ? XI() : e.initialState?.columnPinning ?? XI()), e.getIsSomeColumnsPinned = (t) => {
let n = e.getState().columnPinning;
return t ? !!n[t]?.length : !!(n.left?.length || n.right?.length);
- }, e.getLeftLeafColumns = NI(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (e, t) => (t ?? []).map((t) => e.find((e) => e.id === t)).filter(Boolean), PI(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = NI(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (e, t) => (t ?? []).map((t) => e.find((e) => e.id === t)).filter(Boolean), PI(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = NI(() => [
+ }, e.getLeftLeafColumns = MI(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (e, t) => (t ?? []).map((t) => e.find((e) => e.id === t)).filter(Boolean), NI(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = MI(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (e, t) => (t ?? []).map((t) => e.find((e) => e.id === t)).filter(Boolean), NI(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = MI(() => [
e.getAllLeafColumns(),
e.getState().columnPinning.left,
e.getState().columnPinning.right
], (e, t, n) => {
let r = [...t ?? [], ...n ?? []];
return e.filter((e) => !r.includes(e.id));
- }, PI(e.options, "debugColumns", "getCenterLeafColumns"));
+ }, NI(e.options, "debugColumns", "getCenterLeafColumns"));
}
};
-function Sle(e) {
+function Cle(e) {
return e || (typeof document < "u" ? document : null);
}
-var QI = {
+var ZI = {
size: 150,
minSize: 20,
maxSize: 2 ** 53 - 1
-}, $I = () => ({
+}, QI = () => ({
startOffset: null,
startSize: null,
deltaOffset: null,
deltaPercentage: null,
isResizingColumn: !1,
columnSizingStart: []
-}), Cle = {
- getDefaultColumnDef: () => QI,
+}), wle = {
+ getDefaultColumnDef: () => ZI,
getInitialState: (e) => ({
columnSizing: {},
- columnSizingInfo: $I(),
+ columnSizingInfo: QI(),
...e
}),
getDefaultOptions: (e) => ({
columnResizeMode: "onEnd",
columnResizeDirection: "ltr",
- onColumnSizingChange: jI("columnSizing", e),
- onColumnSizingInfoChange: jI("columnSizingInfo", e)
+ onColumnSizingChange: AI("columnSizing", e),
+ onColumnSizingInfoChange: AI("columnSizingInfo", e)
}),
createColumn: (e, t) => {
e.getSize = () => {
let n = t.getState().columnSizing[e.id];
- return Math.min(Math.max(e.columnDef.minSize ?? QI.minSize, n ?? e.columnDef.size ?? QI.size), e.columnDef.maxSize ?? QI.maxSize);
- }, e.getStart = NI((e) => [
+ return Math.min(Math.max(e.columnDef.minSize ?? ZI.minSize, n ?? e.columnDef.size ?? ZI.size), e.columnDef.maxSize ?? ZI.maxSize);
+ }, e.getStart = MI((e) => [
e,
- nL(t, e),
+ tL(t, e),
t.getState().columnSizing
- ], (t, n) => n.slice(0, e.getIndex(t)).reduce((e, t) => e + t.getSize(), 0), PI(t.options, "debugColumns", "getStart")), e.getAfter = NI((e) => [
+ ], (t, n) => n.slice(0, e.getIndex(t)).reduce((e, t) => e + t.getSize(), 0), NI(t.options, "debugColumns", "getStart")), e.getAfter = MI((e) => [
e,
- nL(t, e),
+ tL(t, e),
t.getState().columnSizing
- ], (t, n) => n.slice(e.getIndex(t) + 1).reduce((e, t) => e + t.getSize(), 0), PI(t.options, "debugColumns", "getAfter")), e.resetSize = () => {
+ ], (t, n) => n.slice(e.getIndex(t) + 1).reduce((e, t) => e + t.getSize(), 0), NI(t.options, "debugColumns", "getAfter")), e.resetSize = () => {
t.setColumnSizing((t) => {
let { [e.id]: n, ...r } = t;
return r;
@@ -41685,8 +41685,8 @@ var QI = {
}, e.getResizeHandler = (n) => {
let r = t.getColumn(e.column.id), i = r?.getCanResize();
return (a) => {
- if (!r || !i || (a.persist == null || a.persist(), tL(a) && a.touches && a.touches.length > 1)) return;
- let o = e.getSize(), s = e ? e.getLeafHeaders().map((e) => [e.column.id, e.column.getSize()]) : [[r.id, r.getSize()]], c = tL(a) ? Math.round(a.touches[0].clientX) : a.clientX, l = {}, u = (e, n) => {
+ if (!r || !i || (a.persist == null || a.persist(), eL(a) && a.touches && a.touches.length > 1)) return;
+ let o = e.getSize(), s = e ? e.getLeafHeaders().map((e) => [e.column.id, e.column.getSize()]) : [[r.id, r.getSize()]], c = eL(a) ? Math.round(a.touches[0].clientX) : a.clientX, l = {}, u = (e, n) => {
typeof n == "number" && (t.setColumnSizingInfo((e) => {
let r = t.options.columnResizeDirection === "rtl" ? -1 : 1, i = (n - (e?.startOffset ?? 0)) * r, a = Math.max(i / (e?.startSize ?? 0), -.999999);
return e.columnSizingStart.forEach((e) => {
@@ -41711,7 +41711,7 @@ var QI = {
deltaPercentage: null,
columnSizingStart: []
}));
- }, p = Sle(n), m = {
+ }, p = Cle(n), m = {
moveHandler: (e) => d(e.clientX),
upHandler: (e) => {
p?.removeEventListener("mousemove", m.moveHandler), p?.removeEventListener("mouseup", m.upHandler), f(e.clientX);
@@ -41721,8 +41721,8 @@ var QI = {
upHandler: (e) => {
p?.removeEventListener("touchmove", h.moveHandler), p?.removeEventListener("touchend", h.upHandler), e.cancelable && (e.preventDefault(), e.stopPropagation()), f(e.touches[0]?.clientX);
}
- }, g = wle() ? { passive: !1 } : !1;
- tL(a) ? (p?.addEventListener("touchmove", h.moveHandler, g), p?.addEventListener("touchend", h.upHandler, g)) : (p?.addEventListener("mousemove", m.moveHandler, g), p?.addEventListener("mouseup", m.upHandler, g)), t.setColumnSizingInfo((e) => ({
+ }, g = Tle() ? { passive: !1 } : !1;
+ eL(a) ? (p?.addEventListener("touchmove", h.moveHandler, g), p?.addEventListener("touchend", h.upHandler, g)) : (p?.addEventListener("mousemove", m.moveHandler, g), p?.addEventListener("mouseup", m.upHandler, g)), t.setColumnSizingInfo((e) => ({
...e,
startOffset: c,
startSize: o,
@@ -41738,12 +41738,12 @@ var QI = {
e.setColumnSizing = (t) => e.options.onColumnSizingChange == null ? void 0 : e.options.onColumnSizingChange(t), e.setColumnSizingInfo = (t) => e.options.onColumnSizingInfoChange == null ? void 0 : e.options.onColumnSizingInfoChange(t), e.resetColumnSizing = (t) => {
e.setColumnSizing(t ? {} : e.initialState.columnSizing ?? {});
}, e.resetHeaderSizeInfo = (t) => {
- e.setColumnSizingInfo(t ? $I() : e.initialState.columnSizingInfo ?? $I());
+ e.setColumnSizingInfo(t ? QI() : e.initialState.columnSizingInfo ?? QI());
}, e.getTotalSize = () => e.getHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0, e.getLeftTotalSize = () => e.getLeftHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0, e.getCenterTotalSize = () => e.getCenterHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0, e.getRightTotalSize = () => e.getRightHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0;
}
-}, eL = null;
-function wle() {
- if (typeof eL == "boolean") return eL;
+}, $I = null;
+function Tle() {
+ if (typeof $I == "boolean") return $I;
let e = !1;
try {
let t = { get passive() {
@@ -41753,17 +41753,17 @@ function wle() {
} catch {
e = !1;
}
- return eL = e, eL;
+ return $I = e, $I;
}
-function tL(e) {
+function eL(e) {
return e.type === "touchstart";
}
-var Tle = {
+var Ele = {
getInitialState: (e) => ({
columnVisibility: {},
...e
}),
- getDefaultOptions: (e) => ({ onColumnVisibilityChange: jI("columnVisibility", e) }),
+ getDefaultOptions: (e) => ({ onColumnVisibilityChange: AI("columnVisibility", e) }),
createColumn: (e, t) => {
e.toggleVisibility = (n) => {
e.getCanHide() && t.setColumnVisibility((t) => ({
@@ -41778,7 +41778,7 @@ var Tle = {
};
},
createRow: (e, t) => {
- e._getAllVisibleCells = NI(() => [e.getAllCells(), t.getState().columnVisibility], (e) => e.filter((e) => e.column.getIsVisible()), PI(t.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = NI(() => [
+ e._getAllVisibleCells = MI(() => [e.getAllCells(), t.getState().columnVisibility], (e) => e.filter((e) => e.column.getIsVisible()), NI(t.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = MI(() => [
e.getLeftVisibleCells(),
e.getCenterVisibleCells(),
e.getRightVisibleCells()
@@ -41786,10 +41786,10 @@ var Tle = {
...e,
...t,
...n
- ], PI(t.options, "debugRows", "getVisibleCells"));
+ ], NI(t.options, "debugRows", "getVisibleCells"));
},
createTable: (e) => {
- let t = (t, n) => NI(() => [n(), n().filter((e) => e.getIsVisible()).map((e) => e.id).join("_")], (e) => e.filter((e) => e.getIsVisible == null ? void 0 : e.getIsVisible()), PI(e.options, "debugColumns", t));
+ let t = (t, n) => MI(() => [n(), n().filter((e) => e.getIsVisible()).map((e) => e.id).join("_")], (e) => e.filter((e) => e.getIsVisible == null ? void 0 : e.getIsVisible()), NI(e.options, "debugColumns", t));
e.getVisibleFlatColumns = t("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = t("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = t("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = t("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = t("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
e.setColumnVisibility(t ? {} : e.initialState.columnVisibility ?? {});
}, e.toggleAllColumnsVisible = (t) => {
@@ -41802,20 +41802,20 @@ var Tle = {
};
}
};
-function nL(e, t) {
+function tL(e, t) {
return t ? t === "center" ? e.getCenterVisibleLeafColumns() : t === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
}
-var Ele = { createTable: (e) => {
+var Dle = { createTable: (e) => {
e._getGlobalFacetedRowModel = e.options.getFacetedRowModel && e.options.getFacetedRowModel(e, "__global__"), e.getGlobalFacetedRowModel = () => e.options.manualFiltering || !e._getGlobalFacetedRowModel ? e.getPreFilteredRowModel() : e._getGlobalFacetedRowModel(), e._getGlobalFacetedUniqueValues = e.options.getFacetedUniqueValues && e.options.getFacetedUniqueValues(e, "__global__"), e.getGlobalFacetedUniqueValues = () => e._getGlobalFacetedUniqueValues ? e._getGlobalFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getGlobalFacetedMinMaxValues = e.options.getFacetedMinMaxValues && e.options.getFacetedMinMaxValues(e, "__global__"), e.getGlobalFacetedMinMaxValues = () => {
if (e._getGlobalFacetedMinMaxValues) return e._getGlobalFacetedMinMaxValues();
};
-} }, Dle = {
+} }, Ole = {
getInitialState: (e) => ({
globalFilter: void 0,
...e
}),
getDefaultOptions: (e) => ({
- onGlobalFilterChange: jI("globalFilter", e),
+ onGlobalFilterChange: AI("globalFilter", e),
globalFilterFn: "auto",
getColumnCanGlobalFilter: (t) => {
var n;
@@ -41827,22 +41827,22 @@ var Ele = { createTable: (e) => {
e.getCanGlobalFilter = () => (e.columnDef.enableGlobalFilter ?? !0) && (t.options.enableGlobalFilter ?? !0) && (t.options.enableFilters ?? !0) && ((t.options.getColumnCanGlobalFilter == null ? void 0 : t.options.getColumnCanGlobalFilter(e)) ?? !0) && !!e.accessorFn;
},
createTable: (e) => {
- e.getGlobalAutoFilterFn = () => qI.includesString, e.getGlobalFilterFn = () => {
+ e.getGlobalAutoFilterFn = () => KI.includesString, e.getGlobalFilterFn = () => {
let { globalFilterFn: t } = e.options;
- return MI(t) ? t : t === "auto" ? e.getGlobalAutoFilterFn() : e.options.filterFns?.[t] ?? qI[t];
+ return jI(t) ? t : t === "auto" ? e.getGlobalAutoFilterFn() : e.options.filterFns?.[t] ?? KI[t];
}, e.setGlobalFilter = (t) => {
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(t);
}, e.resetGlobalFilter = (t) => {
e.setGlobalFilter(t ? void 0 : e.initialState.globalFilter);
};
}
-}, Ole = {
+}, kle = {
getInitialState: (e) => ({
expanded: {},
...e
}),
getDefaultOptions: (e) => ({
- onExpandedChange: jI("expanded", e),
+ onExpandedChange: AI("expanded", e),
paginateExpandedRows: !0
}),
createTable: (e) => {
@@ -41913,18 +41913,18 @@ var Ele = { createTable: (e) => {
};
};
}
-}, rL = 0, iL = 10, aL = () => ({
- pageIndex: rL,
- pageSize: iL
-}), kle = {
+}, nL = 0, rL = 10, iL = () => ({
+ pageIndex: nL,
+ pageSize: rL
+}), Ale = {
getInitialState: (e) => ({
...e,
pagination: {
- ...aL(),
+ ...iL(),
...e?.pagination
}
}),
- getDefaultOptions: (e) => ({ onPaginationChange: jI("pagination", e) }),
+ getDefaultOptions: (e) => ({ onPaginationChange: AI("pagination", e) }),
createTable: (e) => {
let t = !1, n = !1;
e._autoResetPageIndex = () => {
@@ -41940,11 +41940,11 @@ var Ele = { createTable: (e) => {
e.resetPageIndex(), n = !1;
});
}
- }, e.setPagination = (t) => e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange((e) => AI(t, e)), e.resetPagination = (t) => {
- e.setPagination(t ? aL() : e.initialState.pagination ?? aL());
+ }, e.setPagination = (t) => e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange((e) => kI(t, e)), e.resetPagination = (t) => {
+ e.setPagination(t ? iL() : e.initialState.pagination ?? iL());
}, e.setPageIndex = (t) => {
e.setPagination((n) => {
- let r = AI(t, n.pageIndex), i = e.options.pageCount === void 0 || e.options.pageCount === -1 ? 2 ** 53 - 1 : e.options.pageCount - 1;
+ let r = kI(t, n.pageIndex), i = e.options.pageCount === void 0 || e.options.pageCount === -1 ? 2 ** 53 - 1 : e.options.pageCount - 1;
return r = Math.max(0, Math.min(r, i)), {
...n,
pageIndex: r
@@ -41952,13 +41952,13 @@ var Ele = { createTable: (e) => {
});
}, e.resetPageIndex = (t) => {
var n;
- e.setPageIndex(t ? rL : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageIndex) ?? rL);
+ e.setPageIndex(t ? nL : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageIndex) ?? nL);
}, e.resetPageSize = (t) => {
var n;
- e.setPageSize(t ? iL : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageSize) ?? iL);
+ e.setPageSize(t ? rL : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageSize) ?? rL);
}, e.setPageSize = (t) => {
e.setPagination((e) => {
- let n = Math.max(1, AI(t, e.pageSize)), r = e.pageSize * e.pageIndex, i = Math.floor(r / n);
+ let n = Math.max(1, kI(t, e.pageSize)), r = e.pageSize * e.pageIndex, i = Math.floor(r / n);
return {
...e,
pageIndex: i,
@@ -41966,28 +41966,28 @@ var Ele = { createTable: (e) => {
};
});
}, e.setPageCount = (t) => e.setPagination((n) => {
- let r = AI(t, e.options.pageCount ?? -1);
+ let r = kI(t, e.options.pageCount ?? -1);
return typeof r == "number" && (r = Math.max(-1, r)), {
...n,
pageCount: r
};
- }), e.getPageOptions = NI(() => [e.getPageCount()], (e) => {
+ }), e.getPageOptions = MI(() => [e.getPageCount()], (e) => {
let t = [];
return e && e > 0 && (t = [...Array(e)].fill(null).map((e, t) => t)), t;
- }, PI(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
+ }, NI(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
let { pageIndex: t } = e.getState().pagination, n = e.getPageCount();
return n === -1 || n !== 0 && t < n - 1;
}, e.previousPage = () => e.setPageIndex((e) => e - 1), e.nextPage = () => e.setPageIndex((e) => e + 1), e.firstPage = () => e.setPageIndex(0), e.lastPage = () => e.setPageIndex(e.getPageCount() - 1), e.getPrePaginationRowModel = () => e.getExpandedRowModel(), e.getPaginationRowModel = () => (!e._getPaginationRowModel && e.options.getPaginationRowModel && (e._getPaginationRowModel = e.options.getPaginationRowModel(e)), e.options.manualPagination || !e._getPaginationRowModel ? e.getPrePaginationRowModel() : e._getPaginationRowModel()), e.getPageCount = () => e.options.pageCount ?? Math.ceil(e.getRowCount() / e.getState().pagination.pageSize), e.getRowCount = () => e.options.rowCount ?? e.getPrePaginationRowModel().rows.length;
}
-}, oL = () => ({
+}, aL = () => ({
top: [],
bottom: []
-}), Ale = {
+}), jle = {
getInitialState: (e) => ({
- rowPinning: oL(),
+ rowPinning: aL(),
...e
}),
- getDefaultOptions: (e) => ({ onRowPinningChange: jI("rowPinning", e) }),
+ getDefaultOptions: (e) => ({ onRowPinningChange: AI("rowPinning", e) }),
createRow: (e, t) => {
e.pin = (n, r, i) => {
let a = r ? e.getLeafRows().map((e) => {
@@ -42026,7 +42026,7 @@ var Ele = { createTable: (e) => {
};
},
createTable: (e) => {
- e.setRowPinning = (t) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(t), e.resetRowPinning = (t) => e.setRowPinning(t ? oL() : e.initialState?.rowPinning ?? oL()), e.getIsSomeRowsPinned = (t) => {
+ e.setRowPinning = (t) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(t), e.resetRowPinning = (t) => e.setRowPinning(t ? aL() : e.initialState?.rowPinning ?? aL()), e.getIsSomeRowsPinned = (t) => {
let n = e.getState().rowPinning;
return t ? !!n[t]?.length : !!(n.top?.length || n.bottom?.length);
}, e._getPinnedRows = (t, n, r) => (e.options.keepPinnedRows ?? !0 ? (n ?? []).map((t) => {
@@ -42035,22 +42035,22 @@ var Ele = { createTable: (e) => {
}) : (n ?? []).map((e) => t.find((t) => t.id === e))).filter(Boolean).map((e) => ({
...e,
position: r
- })), e.getTopRows = NI(() => [e.getRowModel().rows, e.getState().rowPinning.top], (t, n) => e._getPinnedRows(t, n, "top"), PI(e.options, "debugRows", "getTopRows")), e.getBottomRows = NI(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (t, n) => e._getPinnedRows(t, n, "bottom"), PI(e.options, "debugRows", "getBottomRows")), e.getCenterRows = NI(() => [
+ })), e.getTopRows = MI(() => [e.getRowModel().rows, e.getState().rowPinning.top], (t, n) => e._getPinnedRows(t, n, "top"), NI(e.options, "debugRows", "getTopRows")), e.getBottomRows = MI(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (t, n) => e._getPinnedRows(t, n, "bottom"), NI(e.options, "debugRows", "getBottomRows")), e.getCenterRows = MI(() => [
e.getRowModel().rows,
e.getState().rowPinning.top,
e.getState().rowPinning.bottom
], (e, t, n) => {
let r = /* @__PURE__ */ new Set([...t ?? [], ...n ?? []]);
return e.filter((e) => !r.has(e.id));
- }, PI(e.options, "debugRows", "getCenterRows"));
+ }, NI(e.options, "debugRows", "getCenterRows"));
}
-}, jle = {
+}, Mle = {
getInitialState: (e) => ({
rowSelection: {},
...e
}),
getDefaultOptions: (e) => ({
- onRowSelectionChange: jI("rowSelection", e),
+ onRowSelectionChange: AI("rowSelection", e),
enableRowSelection: !0,
enableMultiRowSelection: !0,
enableSubRowSelection: !0
@@ -42069,21 +42069,21 @@ var Ele = { createTable: (e) => {
}, e.toggleAllPageRowsSelected = (t) => e.setRowSelection((n) => {
let r = t === void 0 ? !e.getIsAllPageRowsSelected() : t, i = { ...n };
return e.getRowModel().rows.forEach((t) => {
- sL(i, t.id, r, !0, e);
+ oL(i, t.id, r, !0, e);
}), i;
- }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = NI(() => [e.getState().rowSelection, e.getCoreRowModel()], (t, n) => Object.keys(t).length ? cL(e, n) : {
+ }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = MI(() => [e.getState().rowSelection, e.getCoreRowModel()], (t, n) => Object.keys(t).length ? sL(e, n) : {
rows: [],
flatRows: [],
rowsById: {}
- }, PI(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = NI(() => [e.getState().rowSelection, e.getFilteredRowModel()], (t, n) => Object.keys(t).length ? cL(e, n) : {
+ }, NI(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = MI(() => [e.getState().rowSelection, e.getFilteredRowModel()], (t, n) => Object.keys(t).length ? sL(e, n) : {
rows: [],
flatRows: [],
rowsById: {}
- }, PI(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = NI(() => [e.getState().rowSelection, e.getSortedRowModel()], (t, n) => Object.keys(t).length ? cL(e, n) : {
+ }, NI(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = MI(() => [e.getState().rowSelection, e.getSortedRowModel()], (t, n) => Object.keys(t).length ? sL(e, n) : {
rows: [],
flatRows: [],
rowsById: {}
- }, PI(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
+ }, NI(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
let t = e.getFilteredRowModel().flatRows, { rowSelection: n } = e.getState(), r = !!(t.length && Object.keys(n).length);
return r && t.some((e) => e.getCanSelect() && !n[e.id]) && (r = !1), r;
}, e.getIsAllPageRowsSelected = () => {
@@ -42107,17 +42107,17 @@ var Ele = { createTable: (e) => {
t.setRowSelection((a) => {
if (n = n === void 0 ? !i : n, e.getCanSelect() && i === n) return a;
let o = { ...a };
- return sL(o, e.id, n, r?.selectChildren ?? !0, t), o;
+ return oL(o, e.id, n, r?.selectChildren ?? !0, t), o;
});
}, e.getIsSelected = () => {
let { rowSelection: n } = t.getState();
- return lL(e, n);
+ return cL(e, n);
}, e.getIsSomeSelected = () => {
let { rowSelection: n } = t.getState();
- return uL(e, n) === "some";
+ return lL(e, n) === "some";
}, e.getIsAllSubRowsSelected = () => {
let { rowSelection: n } = t.getState();
- return uL(e, n) === "all";
+ return lL(e, n) === "all";
}, e.getCanSelect = () => typeof t.options.enableRowSelection == "function" ? t.options.enableRowSelection(e) : t.options.enableRowSelection ?? !0, e.getCanSelectSubRows = () => typeof t.options.enableSubRowSelection == "function" ? t.options.enableSubRowSelection(e) : t.options.enableSubRowSelection ?? !0, e.getCanMultiSelect = () => typeof t.options.enableMultiRowSelection == "function" ? t.options.enableMultiRowSelection(e) : t.options.enableMultiRowSelection ?? !0, e.getToggleSelectedHandler = () => {
let t = e.getCanSelect();
return (n) => {
@@ -42125,16 +42125,16 @@ var Ele = { createTable: (e) => {
};
};
}
-}, sL = (e, t, n, r, i) => {
+}, oL = (e, t, n, r, i) => {
var a;
let o = i.getRow(t, !0);
- n ? (o.getCanMultiSelect() || Object.keys(e).forEach((t) => delete e[t]), o.getCanSelect() && (e[t] = !0)) : delete e[t], r && (a = o.subRows) != null && a.length && o.getCanSelectSubRows() && o.subRows.forEach((t) => sL(e, t.id, n, r, i));
+ n ? (o.getCanMultiSelect() || Object.keys(e).forEach((t) => delete e[t]), o.getCanSelect() && (e[t] = !0)) : delete e[t], r && (a = o.subRows) != null && a.length && o.getCanSelectSubRows() && o.subRows.forEach((t) => oL(e, t.id, n, r, i));
};
-function cL(e, t) {
+function sL(e, t) {
let n = e.getState().rowSelection, r = [], i = {}, a = function(e, t) {
return e.map((e) => {
var t;
- let o = lL(e, n);
+ let o = cL(e, n);
if (o && (r.push(e), i[e.id] = e), (t = e.subRows) != null && t.length && (e = {
...e,
subRows: a(e.subRows)
@@ -42147,32 +42147,32 @@ function cL(e, t) {
rowsById: i
};
}
-function lL(e, t) {
+function cL(e, t) {
return t[e.id] ?? !1;
}
-function uL(e, t, n) {
+function lL(e, t, n) {
var r;
if (!((r = e.subRows) != null && r.length)) return !1;
let i = !0, a = !1;
return e.subRows.forEach((e) => {
- if (!(a && !i) && (e.getCanSelect() && (lL(e, t) ? a = !0 : i = !1), e.subRows && e.subRows.length)) {
- let n = uL(e, t);
+ if (!(a && !i) && (e.getCanSelect() && (cL(e, t) ? a = !0 : i = !1), e.subRows && e.subRows.length)) {
+ let n = lL(e, t);
n === "all" ? a = !0 : (n === "some" && (a = !0), i = !1);
}
}), i ? "all" : a ? "some" : !1;
}
-var dL = /([0-9]+)/gm, Mle = (e, t, n) => mL(pL(e.getValue(n)).toLowerCase(), pL(t.getValue(n)).toLowerCase()), Nle = (e, t, n) => mL(pL(e.getValue(n)), pL(t.getValue(n))), Ple = (e, t, n) => fL(pL(e.getValue(n)).toLowerCase(), pL(t.getValue(n)).toLowerCase()), Fle = (e, t, n) => fL(pL(e.getValue(n)), pL(t.getValue(n))), Ile = (e, t, n) => {
+var uL = /([0-9]+)/gm, Nle = (e, t, n) => pL(fL(e.getValue(n)).toLowerCase(), fL(t.getValue(n)).toLowerCase()), Ple = (e, t, n) => pL(fL(e.getValue(n)), fL(t.getValue(n))), Fle = (e, t, n) => dL(fL(e.getValue(n)).toLowerCase(), fL(t.getValue(n)).toLowerCase()), Ile = (e, t, n) => dL(fL(e.getValue(n)), fL(t.getValue(n))), Lle = (e, t, n) => {
let r = e.getValue(n), i = t.getValue(n);
return r > i ? 1 : r < i ? -1 : 0;
-}, Lle = (e, t, n) => fL(e.getValue(n), t.getValue(n));
-function fL(e, t) {
+}, Rle = (e, t, n) => dL(e.getValue(n), t.getValue(n));
+function dL(e, t) {
return e === t ? 0 : e > t ? 1 : -1;
}
-function pL(e) {
+function fL(e) {
return typeof e == "number" ? isNaN(e) || e === Infinity || e === -Infinity ? "" : String(e) : typeof e == "string" ? e : "";
}
-function mL(e, t) {
- let n = e.split(dL).filter(Boolean), r = t.split(dL).filter(Boolean);
+function pL(e, t) {
+ let n = e.split(uL).filter(Boolean), r = t.split(uL).filter(Boolean);
for (; n.length && r.length;) {
let e = n.shift(), t = r.shift(), i = parseInt(e, 10), a = parseInt(t, 10), o = [i, a].sort();
if (isNaN(o[0])) {
@@ -42186,22 +42186,22 @@ function mL(e, t) {
}
return n.length - r.length;
}
-var hL = {
- alphanumeric: Mle,
- alphanumericCaseSensitive: Nle,
- text: Ple,
- textCaseSensitive: Fle,
- datetime: Ile,
- basic: Lle
-}, Rle = [
- mle,
- Tle,
- ble,
+var mL = {
+ alphanumeric: Nle,
+ alphanumericCaseSensitive: Ple,
+ text: Fle,
+ textCaseSensitive: Ile,
+ datetime: Lle,
+ basic: Rle
+}, zle = [
+ hle,
+ Ele,
xle,
- gle,
+ Sle,
_le,
- Ele,
+ vle,
Dle,
+ Ole,
{
getInitialState: (e) => ({
sorting: [],
@@ -42212,7 +42212,7 @@ var hL = {
sortUndefined: 1
}),
getDefaultOptions: (e) => ({
- onSortingChange: jI("sorting", e),
+ onSortingChange: AI("sorting", e),
isMultiSortEvent: (e) => e.shiftKey
}),
createColumn: (e, t) => {
@@ -42220,13 +42220,13 @@ var hL = {
let n = t.getFilteredRowModel().flatRows.slice(10), r = !1;
for (let t of n) {
let n = t?.getValue(e.id);
- if (Object.prototype.toString.call(n) === "[object Date]") return hL.datetime;
- if (typeof n == "string" && (r = !0, n.split(dL).length > 1)) return hL.alphanumeric;
+ if (Object.prototype.toString.call(n) === "[object Date]") return mL.datetime;
+ if (typeof n == "string" && (r = !0, n.split(uL).length > 1)) return mL.alphanumeric;
}
- return r ? hL.text : hL.basic;
+ return r ? mL.text : mL.basic;
}, e.getAutoSortDir = () => typeof t.getFilteredRowModel().flatRows[0]?.getValue(e.id) == "string" ? "asc" : "desc", e.getSortingFn = () => {
if (!e) throw Error();
- return MI(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : t.options.sortingFns?.[e.columnDef.sortingFn] ?? hL[e.columnDef.sortingFn];
+ return jI(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : t.options.sortingFns?.[e.columnDef.sortingFn] ?? mL[e.columnDef.sortingFn];
}, e.toggleSorting = (n, r) => {
let i = e.getNextSortingOrder(), a = n != null;
t.setSorting((o) => {
@@ -42263,15 +42263,15 @@ var hL = {
}, e.getPreSortedRowModel = () => e.getGroupedRowModel(), e.getSortedRowModel = () => (!e._getSortedRowModel && e.options.getSortedRowModel && (e._getSortedRowModel = e.options.getSortedRowModel(e)), e.options.manualSorting || !e._getSortedRowModel ? e.getPreSortedRowModel() : e._getSortedRowModel());
}
},
- vle,
- Ole,
+ yle,
kle,
Ale,
jle,
- Cle
+ Mle,
+ wle
];
-function zle(e) {
- let t = [...Rle, ...e._features ?? []], n = { _features: t }, r = n._features.reduce((e, t) => Object.assign(e, t.getDefaultOptions == null ? void 0 : t.getDefaultOptions(n)), {}), i = (e) => n.options.mergeOptions ? n.options.mergeOptions(r, e) : {
+function Ble(e) {
+ let t = [...zle, ...e._features ?? []], n = { _features: t }, r = n._features.reduce((e, t) => Object.assign(e, t.getDefaultOptions == null ? void 0 : t.getDefaultOptions(n)), {}), i = (e) => n.options.mergeOptions ? n.options.mergeOptions(r, e) : {
...r,
...e
}, a = { ...e.initialState ?? {} };
@@ -42297,7 +42297,7 @@ function zle(e) {
n.setState(n.initialState);
},
setOptions: (e) => {
- let t = AI(e, n.options);
+ let t = kI(e, n.options);
n.options = i(t);
},
getState: () => n.options.state,
@@ -42312,7 +42312,7 @@ function zle(e) {
if (!r && (r = n.getCoreRowModel().rowsById[e], !r)) throw Error();
return r;
},
- _getDefaultColumnDef: NI(() => [n.options.defaultColumn], (e) => (e ??= {}, {
+ _getDefaultColumnDef: MI(() => [n.options.defaultColumn], (e) => (e ??= {}, {
header: (e) => {
let t = e.header.column.columnDef;
return t.accessorKey ? t.accessorKey : t.accessorFn ? t.id : null;
@@ -42323,20 +42323,20 @@ function zle(e) {
},
...n._features.reduce((e, t) => Object.assign(e, t.getDefaultColumnDef == null ? void 0 : t.getDefaultColumnDef()), {}),
...e
- }), PI(e, "debugColumns", "_getDefaultColumnDef")),
+ }), NI(e, "debugColumns", "_getDefaultColumnDef")),
_getColumnDefs: () => n.options.columns,
- getAllColumns: NI(() => [n._getColumnDefs()], (e) => {
+ getAllColumns: MI(() => [n._getColumnDefs()], (e) => {
let t = function(e, r, i) {
return i === void 0 && (i = 0), e.map((e) => {
- let a = ple(n, e, i, r), o = e;
+ let a = mle(n, e, i, r), o = e;
return a.columns = o.columns ? t(o.columns, a, i + 1) : [], a;
});
};
return t(e);
- }, PI(e, "debugColumns", "getAllColumns")),
- getAllFlatColumns: NI(() => [n.getAllColumns()], (e) => e.flatMap((e) => e.getFlatColumns()), PI(e, "debugColumns", "getAllFlatColumns")),
- _getAllFlatColumnsById: NI(() => [n.getAllFlatColumns()], (e) => e.reduce((e, t) => (e[t.id] = t, e), {}), PI(e, "debugColumns", "getAllFlatColumnsById")),
- getAllLeafColumns: NI(() => [n.getAllColumns(), n._getOrderColumnsFn()], (e, t) => t(e.flatMap((e) => e.getLeafColumns())), PI(e, "debugColumns", "getAllLeafColumns")),
+ }, NI(e, "debugColumns", "getAllColumns")),
+ getAllFlatColumns: MI(() => [n.getAllColumns()], (e) => e.flatMap((e) => e.getFlatColumns()), NI(e, "debugColumns", "getAllFlatColumns")),
+ _getAllFlatColumnsById: MI(() => [n.getAllFlatColumns()], (e) => e.reduce((e, t) => (e[t.id] = t, e), {}), NI(e, "debugColumns", "getAllFlatColumnsById")),
+ getAllLeafColumns: MI(() => [n.getAllColumns(), n._getOrderColumnsFn()], (e, t) => t(e.flatMap((e) => e.getLeafColumns())), NI(e, "debugColumns", "getAllLeafColumns")),
getColumn: (e) => n._getAllFlatColumnsById()[e]
};
Object.assign(n, c);
@@ -42346,8 +42346,8 @@ function zle(e) {
}
return n;
}
-function gL() {
- return (e) => NI(() => [e.options.data], (t) => {
+function hL() {
+ return (e) => MI(() => [e.options.data], (t) => {
let n = {
rows: [],
flatRows: [],
@@ -42356,7 +42356,7 @@ function gL() {
i === void 0 && (i = 0);
let o = [];
for (let c = 0; c < t.length; c++) {
- let l = hle(e, e._getRowId(t[c], c, a), t[c], c, i, void 0, a?.id);
+ let l = gle(e, e._getRowId(t[c], c, a), t[c], c, i, void 0, a?.id);
if (n.flatRows.push(l), n.rowsById[l.id] = l, o.push(l), e.options.getSubRows) {
var s;
l.originalSubRows = e.options.getSubRows(t[c], c), (s = l.originalSubRows) != null && s.length && (l.subRows = r(l.originalSubRows, i + 1, l));
@@ -42365,9 +42365,9 @@ function gL() {
return o;
};
return n.rows = r(t), n;
- }, PI(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
+ }, NI(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
}
-function Ble(e) {
+function Vle(e) {
let t = [], n = (e) => {
var r;
t.push(e), (r = e.subRows) != null && r.length && e.getIsExpanded() && e.subRows.forEach(n);
@@ -42378,8 +42378,8 @@ function Ble(e) {
rowsById: e.rowsById
};
}
-function _L(e) {
- return (e) => NI(() => [
+function gL(e) {
+ return (e) => MI(() => [
e.getState().pagination,
e.getPrePaginationRowModel(),
e.options.paginateExpandedRows ? void 0 : e.getState().expanded
@@ -42392,7 +42392,7 @@ function _L(e) {
rows: a,
flatRows: o,
rowsById: s
- } : Ble({
+ } : Vle({
rows: a,
flatRows: o,
rowsById: s
@@ -42401,32 +42401,32 @@ function _L(e) {
u.flatRows.push(e), e.subRows.length && e.subRows.forEach(d);
};
return u.rows.forEach(d), u;
- }, PI(e.options, "debugTable", "getPaginationRowModel"));
+ }, NI(e.options, "debugTable", "getPaginationRowModel"));
}
//#endregion
//#region node_modules/@tanstack/react-table/build/lib/index.mjs
-function vL(e, t) {
- return e ? Vle(e) ? /*#__PURE__*/ I.createElement(e, t) : e : null;
-}
-function Vle(e) {
- return Hle(e) || typeof e == "function" || Ule(e);
+function _L(e, t) {
+ return e ? Hle(e) ? /*#__PURE__*/ I.createElement(e, t) : e : null;
}
function Hle(e) {
+ return Ule(e) || typeof e == "function" || Wle(e);
+}
+function Ule(e) {
return typeof e == "function" && (() => {
let t = Object.getPrototypeOf(e);
return t.prototype && t.prototype.isReactComponent;
})();
}
-function Ule(e) {
+function Wle(e) {
return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
}
-function yL(e) {
+function vL(e) {
let t = {
state: {},
onStateChange: () => {},
renderFallbackValue: null,
...e
- }, [n] = I.useState(() => ({ current: zle(t) })), [r, i] = I.useState(() => n.current.initialState);
+ }, [n] = I.useState(() => ({ current: Ble(t) })), [r, i] = I.useState(() => n.current.initialState);
return n.current.setOptions((t) => ({
...t,
...e,
@@ -42441,7 +42441,7 @@ function yL(e) {
}
//#endregion
//#region src/react/boardui/components/base/switch/switch.tsx
-var Wle = lw({
+var Gle = cw({
sm: {
track: "h-4 w-7",
trackRadius: {
@@ -42503,23 +42503,23 @@ var Wle = lw({
}
}
});
-function Gle({ state: e, size: t = "md", shape: n = "pill" }) {
- let r = Wle[t];
+function Kle({ state: e, size: t = "md", shape: n = "pill" }) {
+ let r = Gle[t];
return /* @__PURE__ */ (0, L.jsx)("span", {
"aria-hidden": !0,
- className: cw("relative shrink-0 transition-colors duration-200 ease", r.track, r.trackRadius[n], e.isSelected ? cw("bg-linear-to-b from-accent-500 to-accent-600", r.onShadow) : "bg-background-tertiary-default", e.isDisabled && "opacity-50", e.isFocusVisible && "ring-2 ring-border-focus-ring ring-offset-2"),
+ className: sw("relative shrink-0 transition-colors duration-200 ease", r.track, r.trackRadius[n], e.isSelected ? sw("bg-linear-to-b from-accent-500 to-accent-600", r.onShadow) : "bg-background-tertiary-default", e.isDisabled && "opacity-50", e.isFocusVisible && "ring-2 ring-border-focus-ring ring-offset-2"),
children: /* @__PURE__ */ (0, L.jsx)("span", {
- className: cw("absolute flex items-center justify-center", "bg-linear-to-b from-control-indicator-background from-[43.837%] to-control-indicator-background-subtle", "shadow-[0_3px_3px_0_rgb(0_0_0/0.03),0_0.75px_0_0_rgb(0_0_0/0.05)]", "transition-transform duration-200 ease", r.thumb, r.thumbRadius[n], r.offset, e.isSelected && r.travel),
- children: /* @__PURE__ */ (0, L.jsx)("span", { className: cw("border-solid bg-linear-to-t from-[43.837%]", r.chip, r.chipRadius[n], e.isSelected ? "border-accent-600 from-switch-on-chip-start to-switch-on-chip-end" : "border-border-button-default/50 from-switch-off-chip-start to-switch-off-chip-end") })
+ className: sw("absolute flex items-center justify-center", "bg-linear-to-b from-control-indicator-background from-[43.837%] to-control-indicator-background-subtle", "shadow-[0_3px_3px_0_rgb(0_0_0/0.03),0_0.75px_0_0_rgb(0_0_0/0.05)]", "transition-transform duration-200 ease", r.thumb, r.thumbRadius[n], r.offset, e.isSelected && r.travel),
+ children: /* @__PURE__ */ (0, L.jsx)("span", { className: sw("border-solid bg-linear-to-t from-[43.837%]", r.chip, r.chipRadius[n], e.isSelected ? "border-accent-600 from-switch-on-chip-start to-switch-on-chip-end" : "border-border-button-default/50 from-switch-off-chip-start to-switch-off-chip-end") })
})
});
}
-function bL({ className: e, children: t, size: n = "md", shape: r = "pill", ref: i, ...a }) {
- return /* @__PURE__ */ (0, L.jsx)(Tae, {
+function yL({ className: e, children: t, size: n = "md", shape: r = "pill", ref: i, ...a }) {
+ return /* @__PURE__ */ (0, L.jsx)(Dae, {
ref: i,
...a,
- className: (t) => cw("group inline-flex items-center gap-2 select-none", t.isDisabled ? "cursor-not-allowed" : "cursor-pointer", typeof e == "function" ? e(t) : e),
- children: (e) => /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(Gle, {
+ className: (t) => sw("group inline-flex items-center gap-2 select-none", t.isDisabled ? "cursor-not-allowed" : "cursor-pointer", typeof e == "function" ? e(t) : e),
+ children: (e) => /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(Kle, {
state: e,
size: n,
shape: r
@@ -42531,12 +42531,12 @@ function bL({ className: e, children: t, size: n = "md", shape: r = "pill", ref:
}
//#endregion
//#region src/react/components/legacy-avatar.ts
-var xL = "[&_img]:absolute [&_img]:inset-0 [&_img]:size-full [&_img]:max-w-none [&_img]:max-h-none [&_img]:object-cover", SL = "(prefers-reduced-motion: reduce)", Kle = () => matchMedia(SL).matches, qle = (e) => {
- let t = matchMedia(SL);
+var bL = "[&_img]:absolute [&_img]:inset-0 [&_img]:size-full [&_img]:max-w-none [&_img]:max-h-none [&_img]:object-cover", xL = "(prefers-reduced-motion: reduce)", qle = () => matchMedia(xL).matches, Jle = (e) => {
+ let t = matchMedia(xL);
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
};
-function Jle({ children: e, count: t, label: n }) {
- let r = Hu(), i = (0, I.useSyncExternalStore)(qle, Kle, () => !1), { isFocusVisible: a } = eh(), o = i || a, s = {
+function Yle({ children: e, count: t, label: n }) {
+ let r = Hu(), i = (0, I.useSyncExternalStore)(Jle, qle, () => !1), { isFocusVisible: a } = eh(), o = i || a, s = {
opacity: 0,
transform: "translate(-50%, 8px)"
};
@@ -42572,13 +42572,13 @@ function Jle({ children: e, count: t, label: n }) {
}), e]
});
}
-function CL({ visible: e, ...t }) {
- return /* @__PURE__ */ (0, L.jsx)(Ku, { children: e ? /* @__PURE__ */ (0, L.jsx)(Jle, { ...t }, "selection") : null });
+function SL({ visible: e, ...t }) {
+ return /* @__PURE__ */ (0, L.jsx)(Ku, { children: e ? /* @__PURE__ */ (0, L.jsx)(Yle, { ...t }, "selection") : null });
}
//#endregion
//#region src/react/follow-manage/add-feed.tsx
-var Yle = "输入女优名,到 JavDB 找她的演员页";
-function Xle(e, t) {
+var Xle = "输入女优名,到 JavDB 找她的演员页";
+function Zle(e, t) {
let n = /* @__PURE__ */ new Map();
for (let r of e.candidates) t.has(r.id) && r.held_by && n.set(r.held_by.id, r.held_by.name);
if (n.size > 1) return {
@@ -42597,10 +42597,10 @@ function Xle(e, t) {
blocked: !1
};
}
-function Zle({ card: e, picked: t, onPick: n }) {
+function Qle({ card: e, picked: t, onPick: n }) {
return /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
- children: [/* @__PURE__ */ (0, L.jsx)(Oj, {
+ children: [/* @__PURE__ */ (0, L.jsx)(Ej, {
isSelected: t,
onChange: n,
children: /* @__PURE__ */ (0, L.jsxs)("span", {
@@ -42610,7 +42610,7 @@ function Zle({ card: e, picked: t, onPick: n }) {
className: "min-w-0 break-words",
children: e.names.join("、")
}),
- e.record ? /* @__PURE__ */ (0, L.jsx)(dw, {
+ e.record ? /* @__PURE__ */ (0, L.jsx)(uw, {
variant: "caption",
color: "neutral",
children: e.record
@@ -42621,16 +42621,16 @@ function Zle({ card: e, picked: t, onPick: n }) {
}) : null
]
})
- }), /* @__PURE__ */ (0, L.jsx)(ZA, {
+ }), /* @__PURE__ */ (0, L.jsx)(YA, {
href: e.url,
children: e.id
})]
});
}
-function Qle({ readOnly: e, toast: t, onAdded: n }) {
- let [r, i] = (0, I.useState)(""), [a, o] = (0, I.useState)(null), [s, c] = (0, I.useState)(/* @__PURE__ */ new Set()), l = Cw(), u = () => {
+function $le({ readOnly: e, toast: t, onAdded: n }) {
+ let [r, i] = (0, I.useState)(""), [a, o] = (0, I.useState)(null), [s, c] = (0, I.useState)(/* @__PURE__ */ new Set()), l = Sw(), u = () => {
let t = r.trim();
- !t || e || l.run("lookup", (e) => Ose(t, e), (e) => {
+ !t || e || l.run("lookup", (e) => kse(t, e), (e) => {
o(e), c(new Set(e.suggested));
});
}, d = (e) => {
@@ -42638,12 +42638,12 @@ function Qle({ readOnly: e, toast: t, onAdded: n }) {
}, f = () => {
o(null), c(/* @__PURE__ */ new Set()), l.setError("");
}, p = () => {
- a && l.run("follow", (e) => kse(a.q, [...s], e), (e) => {
+ a && l.run("follow", (e) => Ase(a.q, [...s], e), (e) => {
t(e.created ? `已新建「${e.entity_name}」并订阅她的新作` : `已订阅「${e.entity_name}」的新作`), i(""), f(), n();
});
- }, m = a ? Xle(a, s) : null;
+ }, m = a ? Zle(a, s) : null;
return /* @__PURE__ */ (0, L.jsxs)("div", {
- className: _w({
+ className: gw({
padding: "none",
className: "flex flex-col gap-4 px-6 py-5 max-sm:px-4"
}),
@@ -42656,11 +42656,11 @@ function Qle({ readOnly: e, toast: t, onAdded: n }) {
className: "flex flex-wrap items-end gap-2",
children: [/* @__PURE__ */ (0, L.jsx)("div", {
className: "min-w-64 grow",
- children: /* @__PURE__ */ (0, L.jsx)(Yj, {
+ children: /* @__PURE__ */ (0, L.jsx)(qj, {
"aria-label": "女优名",
- placeholder: Yle,
+ placeholder: Xle,
value: r,
- leadingIcon: _C,
+ leadingIcon: gC,
isDisabled: e,
onChange: i,
onKeyDown: d
@@ -42681,16 +42681,16 @@ function Qle({ readOnly: e, toast: t, onAdded: n }) {
a ? /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col gap-3",
children: [
- /* @__PURE__ */ (0, L.jsx)(XA, { children: "JavDB 上的演员卡" }),
- a.candidates.length ? a.candidates.map((e) => /* @__PURE__ */ (0, L.jsx)(Zle, {
+ /* @__PURE__ */ (0, L.jsx)(JA, { children: "JavDB 上的演员卡" }),
+ a.candidates.length ? a.candidates.map((e) => /* @__PURE__ */ (0, L.jsx)(Qle, {
card: e,
picked: s.has(e.id),
onPick: (t) => c((n) => {
let r = new Set(n);
return t ? r.add(e.id) : r.delete(e.id), r;
})
- }, e.id)) : /* @__PURE__ */ (0, L.jsx)(JA, { children: "JavDB 上没有搜到这个名字。" }),
- a.candidates.length ? /* @__PURE__ */ (0, L.jsx)(JA, {
+ }, e.id)) : /* @__PURE__ */ (0, L.jsx)(KA, { children: "JavDB 上没有搜到这个名字。" }),
+ a.candidates.length ? /* @__PURE__ */ (0, L.jsx)(KA, {
role: "status",
children: s.size ? m.text : "勾选她的演员卡;有碼与無碼两条记录都是她的话,两张都勾。"
}) : null,
@@ -42717,19 +42717,19 @@ function Qle({ readOnly: e, toast: t, onAdded: n }) {
}
//#endregion
//#region src/react/follow-manage/source-list.tsx
-var $le = Object.fromEntries(Object.entries(hF).map(([e, t]) => [t, e])), wL = 740;
-function eue() {
+var eue = Object.fromEntries(Object.entries(mF).map(([e, t]) => [t, e])), CL = 740;
+function tue() {
let [e, t] = (0, I.useState)(!1), n = (0, I.useRef)(null), r = (0, I.useCallback)((e) => {
if (n.current?.disconnect(), !e) {
n.current = null;
return;
}
- let r = new ResizeObserver(() => t(e.clientWidth < wL));
- r.observe(e), n.current = r, t(e.clientWidth < wL);
+ let r = new ResizeObserver(() => t(e.clientWidth < CL));
+ r.observe(e), n.current = r, t(e.clientWidth < CL);
}, []);
return (0, I.useEffect)(() => () => n.current?.disconnect(), []), [r, e];
}
-var tue = {
+var nue = {
select: "选择",
author: "创作者",
source: "来源",
@@ -42738,7 +42738,7 @@ var tue = {
checked: "上次检查",
actions: "操作"
};
-function TL({ page: e, pages: t, onPage: n, label: r = "关注列表分页" }) {
+function wL({ page: e, pages: t, onPage: n, label: r = "关注列表分页" }) {
return t <= 1 ? null : /* @__PURE__ */ (0, L.jsxs)("nav", {
"aria-label": r,
className: "flex flex-wrap items-center justify-center gap-2",
@@ -42752,7 +42752,7 @@ function TL({ page: e, pages: t, onPage: n, label: r = "关注列表分页" }) {
}),
/* @__PURE__ */ (0, L.jsx)("ul", {
className: "flex flex-wrap items-center gap-1",
- children: wE(e, t).map((t, r) => /* @__PURE__ */ (0, L.jsx)("li", { children: t === "…" ? /* @__PURE__ */ (0, L.jsx)("span", {
+ children: SE(e, t).map((t, r) => /* @__PURE__ */ (0, L.jsx)("li", { children: t === "…" ? /* @__PURE__ */ (0, L.jsx)("span", {
"aria-hidden": !0,
className: "px-1 text-body-2-regular text-text-tertiary",
children: "…"
@@ -42775,22 +42775,22 @@ function TL({ page: e, pages: t, onPage: n, label: r = "关注列表分页" }) {
]
});
}
-function nue({ source: e, selected: t, onToggle: n, handlers: r }) {
+function rue({ source: e, selected: t, onToggle: n, handlers: r }) {
return /* @__PURE__ */ (0, L.jsxs)("div", {
"data-selected": t || void 0,
className: "flex min-h-16 flex-wrap items-center gap-3 px-2 py-3",
onClick: (e) => {
- jj(e, e.currentTarget) && n(!t);
+ kj(e, e.currentTarget) && n(!t);
},
children: [
- /* @__PURE__ */ (0, L.jsx)(Oj, {
+ /* @__PURE__ */ (0, L.jsx)(Ej, {
isSelected: t,
onChange: n,
"aria-label": `选择 ${e.label}`
}),
/* @__PURE__ */ (0, L.jsxs)("span", {
className: "flex min-w-0 grow flex-col gap-0.5",
- children: [/* @__PURE__ */ (0, L.jsx)(wI, { source: e }), e.last_error ? /* @__PURE__ */ (0, L.jsx)("small", {
+ children: [/* @__PURE__ */ (0, L.jsx)(CI, { source: e }), e.last_error ? /* @__PURE__ */ (0, L.jsx)("small", {
className: "text-caption-1-regular text-text-error-primary",
children: e.last_error
}) : null]
@@ -42798,17 +42798,17 @@ function nue({ source: e, selected: t, onToggle: n, handlers: r }) {
/* @__PURE__ */ (0, L.jsx)("span", {
className: "flex shrink-0 items-center gap-1.5 text-body-2-regular text-text-secondary",
title: e.provider_label,
- children: /* @__PURE__ */ (0, L.jsx)(xI, {
+ children: /* @__PURE__ */ (0, L.jsx)(bI, {
provider: e.provider,
label: e.provider_label
})
}),
- /* @__PURE__ */ (0, L.jsx)(CI, { source: e }),
+ /* @__PURE__ */ (0, L.jsx)(SI, { source: e }),
/* @__PURE__ */ (0, L.jsx)("span", {
className: "shrink-0 text-body-2-regular whitespace-nowrap text-text-secondary",
- children: BF(e)
+ children: zF(e)
}),
- /* @__PURE__ */ (0, L.jsx)(bL, {
+ /* @__PURE__ */ (0, L.jsx)(yL, {
"aria-label": `启用 ${e.label}`,
isSelected: e.enabled,
isDisabled: r.readOnly,
@@ -42820,7 +42820,7 @@ function nue({ source: e, selected: t, onToggle: n, handlers: r }) {
variant: "secondary",
size: "small",
iconOnly: !0,
- leadingIcon: hC,
+ leadingIcon: mC,
"aria-label": `检查 ${e.label} 的更新`,
disabled: !e.enabled || r.readOnly,
...Y(r.busy),
@@ -42829,7 +42829,7 @@ function nue({ source: e, selected: t, onToggle: n, handlers: r }) {
variant: "secondary",
size: "small",
iconOnly: !0,
- leadingIcon: nC,
+ leadingIcon: tC,
"aria-label": `移除 ${e.label}`,
disabled: r.readOnly,
onClick: () => r.remove(e)
@@ -42838,11 +42838,11 @@ function nue({ source: e, selected: t, onToggle: n, handlers: r }) {
]
});
}
-function rue({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a, onToggleGroup: o, onToggle: s }) {
- let c = e.map((e) => e.id), l = e.filter((e) => e.enabled).map((e) => e.id), u = e.filter(_F).length, d = [...new Set(e.map((e) => e.provider_label || e.provider))].join("、"), f = `follow-author-${e[0].id}`, p = TF(r, c);
+function iue({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a, onToggleGroup: o, onToggle: s }) {
+ let c = e.map((e) => e.id), l = e.filter((e) => e.enabled).map((e) => e.id), u = e.filter(gF).length, d = [...new Set(e.map((e) => e.provider_label || e.provider))].join("、"), f = `follow-author-${e[0].id}`, p = wF(r, c);
return /* @__PURE__ */ (0, L.jsxs)("section", {
"aria-label": `${t} 的关注来源`,
- className: _w({
+ className: gw({
variant: "raised",
padding: "none",
className: "flex flex-col overflow-hidden p-2"
@@ -42852,7 +42852,7 @@ function rue({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a,
"data-open": n || void 0,
className: "flex flex-wrap items-center gap-3 px-2 py-2.5",
children: [
- /* @__PURE__ */ (0, L.jsx)(SI, {
+ /* @__PURE__ */ (0, L.jsx)(xI, {
group: e,
name: t
}),
@@ -42864,7 +42864,7 @@ function rue({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a,
variant: "secondary",
size: "small",
iconOnly: !0,
- leadingIcon: hC,
+ leadingIcon: mC,
"aria-label": `检查 ${t} 的全部来源`,
disabled: !l.length || i.readOnly,
...Y(i.busy),
@@ -42873,7 +42873,7 @@ function rue({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a,
/* @__PURE__ */ (0, L.jsxs)("span", {
className: "flex shrink-0 items-center gap-1",
title: d,
- children: [e.map((e) => /* @__PURE__ */ (0, L.jsx)(xI, { provider: e.provider }, e.id)), /* @__PURE__ */ (0, L.jsx)(iv, { children: `来源:${d}` })]
+ children: [e.map((e) => /* @__PURE__ */ (0, L.jsx)(bI, { provider: e.provider }, e.id)), /* @__PURE__ */ (0, L.jsx)(iv, { children: `来源:${d}` })]
}),
u ? /* @__PURE__ */ (0, L.jsx)("span", {
className: "shrink-0 text-body-2-regular text-text-error-primary",
@@ -42882,7 +42882,7 @@ function rue({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a,
/* @__PURE__ */ (0, L.jsx)(G, {
variant: "secondary",
size: "small",
- leadingIcon: ZS,
+ leadingIcon: XS,
"aria-pressed": p.all ? "true" : p.some ? "mixed" : "false",
"aria-label": `${p.all ? "取消全选" : "全选"} ${t} 的来源`,
onClick: () => o(!p.all),
@@ -42893,7 +42893,7 @@ function rue({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a,
size: "small",
"aria-expanded": n,
"aria-controls": f,
- leadingIcon: n ? XS : KS,
+ leadingIcon: n ? YS : GS,
"aria-label": `${n ? "收起" : "展开"} ${t} 的来源`,
onClick: () => a(!n),
children: n ? "收起" : "展开"
@@ -42903,7 +42903,7 @@ function rue({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a,
id: f,
hidden: !n,
"data-source-divider": !0,
- children: e.map((e) => /* @__PURE__ */ (0, L.jsx)(nue, {
+ children: e.map((e) => /* @__PURE__ */ (0, L.jsx)(rue, {
source: e,
handlers: i,
selected: r.has(e.id),
@@ -42912,37 +42912,37 @@ function rue({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a,
})]
});
}
-function iue(e) {
- let { data: t, sort: n, dir: r, page: i, layout: a, pageSize: o, selected: s, readOnly: c, onSort: u, onPage: d, onLayout: f, onPageSize: p, onSelected: m, toast: h, openFollow: _ } = e, v = t.sources, y = (0, I.useMemo)(() => t.author_aliases || [], [t.author_aliases]), b = t.counts || {}, [x, S] = (0, I.useState)(/* @__PURE__ */ new Set()), [C, w] = eue(), [T, E] = (0, I.useState)(""), D = (0, I.useMemo)(() => gse(v, n, r, y), [
+function aue(e) {
+ let { data: t, sort: n, dir: r, page: i, layout: a, pageSize: o, selected: s, readOnly: c, onSort: u, onPage: d, onLayout: f, onPageSize: p, onSelected: m, toast: h, openFollow: _ } = e, v = t.sources, y = (0, I.useMemo)(() => t.author_aliases || [], [t.author_aliases]), b = t.counts || {}, [x, S] = (0, I.useState)(/* @__PURE__ */ new Set()), [C, w] = tue(), [T, E] = (0, I.useState)(""), D = (0, I.useMemo)(() => _se(v, n, r, y), [
v,
n,
r,
y
- ]), O = (0, I.useMemo)(() => _se(D, n, r, y), [
+ ]), O = (0, I.useMemo)(() => vse(D, n, r, y), [
D,
n,
r,
y
- ]), { job: k, running: A, outcome: j, start: M } = Sj({
- queryKey: ase,
- queryFn: ({ signal: e }) => yse(e),
- start: (e) => kF(e),
+ ]), { job: k, running: A, outcome: j, start: M } = bj({
+ queryKey: ose,
+ queryFn: ({ signal: e }) => bse(e),
+ start: (e) => OF(e),
onError: (e) => E(K(e)),
onFinish: (e) => {
- zF(), h(e.status === "failed" ? e.error || "检查失败" : jse(e));
+ RF(), h(e.status === "failed" ? e.error || "检查失败" : Mse(e));
}
}), N = (e) => {
A || M.isPending || (E(""), M.mutate(e));
- }, ee = (e, t) => m(EF(s, [e], t)), te = (e, t) => m(EF(s, e, t)), P = It({
- mutationFn: (e) => jF(e),
+ }, ee = (e, t) => m(TF(s, [e], t)), te = (e, t) => m(TF(s, e, t)), P = It({
+ mutationFn: (e) => AF(e),
onSuccess: (e, t) => {
- RF([t]), m(EF(s, [t], !1)), h("已取消关注来源");
+ LF([t]), m(TF(s, [t], !1)), h("已取消关注来源");
},
onError: (e) => E(K(e))
}), ne = It({
- mutationFn: (e) => AF(e.id, e.enabled),
+ mutationFn: (e) => kF(e.id, e.enabled),
onSuccess: (e, t) => {
- LF(t.id, { enabled: t.enabled }), E("");
+ IF(t.id, { enabled: t.enabled }), E("");
},
onError: (e) => E(K(e))
}), F = (e) => void g({
@@ -42954,7 +42954,7 @@ function iue(e) {
}), re = It({
mutationFn: async (e) => {
let t = await l(e.ids, 4, async (t) => {
- e.action === "remove" ? await jF(t) : await AF(t, e.action === "enabled");
+ e.action === "remove" ? await AF(t) : await kF(t, e.action === "enabled");
});
return {
...e,
@@ -42963,9 +42963,9 @@ function iue(e) {
};
},
onSuccess: (e) => {
- if (e.action === "remove") RF(e.done);
- else for (let t of e.done) LF(t, { enabled: e.action === "enabled" });
- m(EF(s, e.done, !1));
+ if (e.action === "remove") LF(e.done);
+ else for (let t of e.done) IF(t, { enabled: e.action === "enabled" });
+ m(TF(s, e.done, !1));
let t = e.results.filter((e) => !e.ok);
if (t.length) {
E(`${t.length}/${e.ids.length} 个来源未更新:${K(t[0]?.error)}`);
@@ -42978,18 +42978,18 @@ function iue(e) {
onError: (e) => E(K(e))
}), ie = It({
mutationFn: async (e) => {
- let t = ((await Dse()).groups || []).flatMap((e) => [
+ let t = ((await Ose()).groups || []).flatMap((e) => [
e.primary,
...e.variants,
...e.duplicates
]).filter((e) => e.status === "new").map((e) => e.id);
return {
ids: t,
- failed: (await l(t, 6, (t) => Ese(t, e))).filter((e) => !e.ok)
+ failed: (await l(t, 6, (t) => Dse(t, e))).filter((e) => !e.ok)
};
},
onSuccess: (e) => {
- if (zF(), e.failed.length) {
+ if (RF(), e.failed.length) {
E(`批量更新 ${e.failed.length}/${e.ids.length} 项未完成`);
return;
}
@@ -43014,12 +43014,12 @@ function iue(e) {
readOnly: c
};
let se = oe.current, ce = (0, I.useMemo)(() => {
- let e = kI(), t = (e) => () => tue[e] || e;
+ let e = OI(), t = (e) => () => nue[e] || e;
return [
e.display({
id: "select",
header: t("select"),
- cell: (e) => /* @__PURE__ */ (0, L.jsx)(Oj, {
+ cell: (e) => /* @__PURE__ */ (0, L.jsx)(Ej, {
slot: null,
isSelected: e.row.getIsSelected(),
onChange: (t) => e.row.toggleSelected(t),
@@ -43031,7 +43031,7 @@ function iue(e) {
header: t("author"),
cell: (e) => /* @__PURE__ */ (0, L.jsxs)("span", {
className: "flex min-w-0 items-center gap-2",
- children: [/* @__PURE__ */ (0, L.jsx)(SI, {
+ children: [/* @__PURE__ */ (0, L.jsx)(xI, {
group: e.row.original.group,
name: e.row.original.author
}), /* @__PURE__ */ (0, L.jsx)("span", {
@@ -43045,7 +43045,7 @@ function iue(e) {
header: t("source"),
cell: (e) => /* @__PURE__ */ (0, L.jsxs)("span", {
className: "flex min-w-0 flex-col gap-0.5",
- children: [/* @__PURE__ */ (0, L.jsx)(wI, { source: e.row.original.source }), e.row.original.source.last_error ? /* @__PURE__ */ (0, L.jsx)("small", {
+ children: [/* @__PURE__ */ (0, L.jsx)(CI, { source: e.row.original.source }), e.row.original.source.last_error ? /* @__PURE__ */ (0, L.jsx)("small", {
className: "text-caption-1-regular text-text-error-primary",
children: e.row.original.source.last_error
}) : null]
@@ -43056,18 +43056,18 @@ function iue(e) {
header: t("provider"),
cell: (e) => /* @__PURE__ */ (0, L.jsxs)("span", {
className: "flex items-center gap-1.5",
- children: [/* @__PURE__ */ (0, L.jsx)(xI, { provider: e.row.original.source.provider }), e.row.original.source.provider_label]
+ children: [/* @__PURE__ */ (0, L.jsx)(bI, { provider: e.row.original.source.provider }), e.row.original.source.provider_label]
})
}),
e.display({
id: "status",
header: t("status"),
- cell: (e) => /* @__PURE__ */ (0, L.jsx)(CI, { source: e.row.original.source })
+ cell: (e) => /* @__PURE__ */ (0, L.jsx)(SI, { source: e.row.original.source })
}),
e.accessor((e) => e.source.last_checked_at || "", {
id: "checked",
header: t("checked"),
- cell: (e) => BF(e.row.original.source)
+ cell: (e) => zF(e.row.original.source)
}),
e.display({
id: "actions",
@@ -43075,7 +43075,7 @@ function iue(e) {
cell: (e) => /* @__PURE__ */ (0, L.jsxs)("span", {
className: "flex items-center gap-1",
children: [
- /* @__PURE__ */ (0, L.jsx)(bL, {
+ /* @__PURE__ */ (0, L.jsx)(yL, {
"aria-label": `启用 ${e.row.original.source.label}`,
isSelected: e.row.original.source.enabled,
isDisabled: se.readOnly,
@@ -43085,7 +43085,7 @@ function iue(e) {
variant: "secondary",
size: "small",
iconOnly: !0,
- leadingIcon: hC,
+ leadingIcon: mC,
"aria-label": `检查 ${e.row.original.source.label} 的更新`,
disabled: !e.row.original.source.enabled || se.readOnly,
...Y(se.busy),
@@ -43095,7 +43095,7 @@ function iue(e) {
variant: "secondary",
size: "small",
iconOnly: !0,
- leadingIcon: nC,
+ leadingIcon: tC,
"aria-label": `移除 ${e.row.original.source.label}`,
disabled: se.readOnly,
onClick: () => oe.current.remove(e.row.original.source)
@@ -43105,12 +43105,12 @@ function iue(e) {
})
];
}, [se]), le = (0, I.useMemo)(() => {
- let e = $le[n];
+ let e = eue[n];
return e ? [{
id: e,
desc: r === "desc"
}] : [];
- }, [n, r]), ue = (0, I.useMemo)(() => Object.fromEntries([...s].map((e) => [String(e), !0])), [s]), R = a === "table", z = wF(R ? O.length : D.length, o, i), de = yL({
+ }, [n, r]), ue = (0, I.useMemo)(() => Object.fromEntries([...s].map((e) => [String(e), !0])), [s]), R = a === "table", z = CF(R ? O.length : D.length, o, i), de = vL({
data: O,
columns: ce,
getRowId: (e) => String(e.source.id),
@@ -43127,7 +43127,7 @@ function iue(e) {
onSortingChange: (e) => {
let t = (typeof e == "function" ? e(le) : e)[0];
if (!t) return;
- let n = hF[t.id];
+ let n = mF[t.id];
n && u(n, t.desc ? "desc" : "asc");
},
onRowSelectionChange: (e) => {
@@ -43141,11 +43141,11 @@ function iue(e) {
}, n = typeof e == "function" ? e(t) : e;
n.pageSize === o ? n.pageIndex !== t.pageIndex && d(n.pageIndex + 1) : p(n.pageSize);
},
- getCoreRowModel: gL(),
- getPaginationRowModel: _L()
- }), fe = de.getRowModel().rows, pe = R ? fe.map((e) => e.original.source.id) : D.slice(z.start, z.end).flatMap((e) => e.map((e) => e.id)), me = TF(s, pe), he = [...s], ge = Mse(j), _e = Nse(j), ve = D.length > 0 && x.size >= D.length;
+ getCoreRowModel: hL(),
+ getPaginationRowModel: gL()
+ }), fe = de.getRowModel().rows, pe = R ? fe.map((e) => e.original.source.id) : D.slice(z.start, z.end).flatMap((e) => e.map((e) => e.id)), me = wF(s, pe), he = [...s], ge = Nse(j), _e = Pse(j), ve = D.length > 0 && x.size >= D.length;
return v.length ? /* @__PURE__ */ (0, L.jsxs)("div", {
- className: _w({
+ className: gw({
padding: "none",
className: "flex flex-col gap-4 px-6 py-5 max-sm:px-4"
}),
@@ -43164,7 +43164,7 @@ function iue(e) {
}),
/* @__PURE__ */ (0, L.jsx)(G, {
variant: "primary",
- leadingIcon: hC,
+ leadingIcon: mC,
disabled: c,
"aria-label": "检查全部",
iconOnly: w,
@@ -43179,28 +43179,28 @@ function iue(e) {
children: [/* @__PURE__ */ (0, L.jsx)(G, {
variant: "ghost",
iconOnly: !0,
- leadingIcon: Hte,
- "aria-label": pF[0][1],
+ leadingIcon: Ute,
+ "aria-label": fF[0][1],
"aria-pressed": !R,
onClick: () => f("default")
}), /* @__PURE__ */ (0, L.jsx)(G, {
variant: "ghost",
iconOnly: !0,
- leadingIcon: Wte,
- "aria-label": pF[1][1],
+ leadingIcon: Gte,
+ "aria-label": fF[1][1],
"aria-pressed": R,
onClick: () => f("table")
})]
}),
- /* @__PURE__ */ (0, L.jsx)(_j, {
+ /* @__PURE__ */ (0, L.jsx)(hj, {
"aria-label": "关注列表排序",
selectedKey: n,
onSelectionChange: (e) => {
if (e === null) return;
let t = String(e);
- u(t, eF[t]);
+ u(t, $P[t]);
},
- children: $P.map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(vj, {
+ children: QP.map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(gj, {
id: e,
children: t
}, e))
@@ -43208,14 +43208,14 @@ function iue(e) {
/* @__PURE__ */ (0, L.jsx)(G, {
variant: "secondary",
iconOnly: !0,
- leadingIcon: r === "asc" ? YS : GS,
- "aria-label": fse(n, r),
+ leadingIcon: r === "asc" ? JS : WS,
+ "aria-label": pse(n, r),
onClick: () => u(n, r === "asc" ? "desc" : "asc")
}),
R ? null : /* @__PURE__ */ (0, L.jsx)(G, {
variant: "secondary",
iconOnly: w,
- leadingIcon: ve ? KS : XS,
+ leadingIcon: ve ? GS : YS,
"aria-label": ve ? "全部展开" : "全部收起",
onClick: () => S(ve ? /* @__PURE__ */ new Set() : new Set(D.map((e) => String(e[0].author_key || e[0].id)))),
children: ve ? "全部展开" : "全部收起"
@@ -43226,7 +43226,7 @@ function iue(e) {
"aria-live": "polite",
className: "flex flex-col gap-3 empty:hidden",
children: [
- A ? /* @__PURE__ */ (0, L.jsx)(BA, {
+ A ? /* @__PURE__ */ (0, L.jsx)(RA, {
embedded: !0,
label: k?.message || (k?.total ? `${k.older ? "抓取历史" : "检查更新"}:已完成 ${k.checked || 0}/${k.total} 个来源` : "正在准备检查任务"),
value: k?.checked,
@@ -43252,7 +43252,7 @@ function iue(e) {
}) : null
]
}),
- /* @__PURE__ */ (0, L.jsxs)(CL, {
+ /* @__PURE__ */ (0, L.jsxs)(SL, {
label: "关注来源批量操作",
visible: he.length > 0,
count: `已选 ${he.length} 个来源`,
@@ -43312,10 +43312,10 @@ function iue(e) {
})
]
}),
- R ? /* @__PURE__ */ (0, L.jsx)(Mj, {
+ R ? /* @__PURE__ */ (0, L.jsx)(Aj, {
follow: !0,
onRowClick: (e) => ee(Number(e), !s.has(Number(e))),
- children: /* @__PURE__ */ (0, L.jsxs)(kj, {
+ children: /* @__PURE__ */ (0, L.jsxs)(Dj, {
"aria-label": "关注来源",
size: "sm",
sortDescriptor: le[0] ? {
@@ -43326,9 +43326,9 @@ function iue(e) {
id: String(e.column),
desc: e.direction === "descending"
}]),
- children: [/* @__PURE__ */ (0, L.jsx)(oA, { children: de.getHeaderGroups()[0].headers.map((e) => {
- let t = e.column.id in hF, n = vL(e.column.columnDef.header, e.getContext());
- return /* @__PURE__ */ (0, L.jsx)(sA, {
+ children: [/* @__PURE__ */ (0, L.jsx)(iA, { children: de.getHeaderGroups()[0].headers.map((e) => {
+ let t = e.column.id in mF, n = _L(e.column.columnDef.header, e.getContext());
+ return /* @__PURE__ */ (0, L.jsx)(aA, {
id: e.id,
allowsSorting: t,
isRowHeader: e.column.id === "source",
@@ -43337,20 +43337,20 @@ function iue(e) {
children: [n, /* @__PURE__ */ (0, L.jsx)("span", {
"data-sort-indicator": !0,
"data-direction": e || void 0,
- children: /* @__PURE__ */ (0, L.jsx)(pj, {})
+ children: /* @__PURE__ */ (0, L.jsx)(dj, {})
})]
}) : /* @__PURE__ */ (0, L.jsx)(iv, { children: n })
}, e.id);
- }) }), /* @__PURE__ */ (0, L.jsx)(lA, {
+ }) }), /* @__PURE__ */ (0, L.jsx)(sA, {
renderEmptyState: () => "这一页没有来源",
- children: fe.map((e) => /* @__PURE__ */ (0, L.jsx)(fA, {
+ children: fe.map((e) => /* @__PURE__ */ (0, L.jsx)(uA, {
id: e.id,
"data-follow-selected": e.getIsSelected() || void 0,
- children: e.getVisibleCells().map((e) => /* @__PURE__ */ (0, L.jsx)(mA, { children: vL(e.column.columnDef.cell, e.getContext()) }, e.id))
+ children: e.getVisibleCells().map((e) => /* @__PURE__ */ (0, L.jsx)(fA, { children: _L(e.column.columnDef.cell, e.getContext()) }, e.id))
}, e.id))
})]
})
- }) : /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(Oj, {
+ }) : /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(Ej, {
isSelected: me.all,
isIndeterminate: me.some,
onChange: (e) => te(pe, e),
@@ -43360,9 +43360,9 @@ function iue(e) {
className: "flex flex-col gap-3",
children: D.slice(z.start, z.end).map((e) => {
let t = String(e[0].author_key || e[0].id);
- return /* @__PURE__ */ (0, L.jsx)(rue, {
+ return /* @__PURE__ */ (0, L.jsx)(iue, {
group: e,
- name: SF(e, y),
+ name: xF(e, y),
handlers: se,
selected: s,
open: !x.has(t),
@@ -43382,19 +43382,19 @@ function iue(e) {
className: "text-body-2-regular text-text-secondary",
children: `${z.start + 1}–${z.end} / ${z.total} ${R ? "个来源" : "位创作者"}`
}),
- /* @__PURE__ */ (0, L.jsx)(_j, {
+ /* @__PURE__ */ (0, L.jsx)(hj, {
"aria-label": "每页显示数量",
size: "sm",
selectedKey: String(o),
onSelectionChange: (e) => {
e !== null && de.setPageSize(Number(e));
},
- children: mF.map((e) => /* @__PURE__ */ (0, L.jsx)(vj, {
+ children: pF.map((e) => /* @__PURE__ */ (0, L.jsx)(gj, {
id: String(e),
children: `每页 ${e} ${R ? "条" : "位"}`
}, e))
}),
- /* @__PURE__ */ (0, L.jsx)(TL, {
+ /* @__PURE__ */ (0, L.jsx)(wL, {
page: z.page,
pages: z.pages,
onPage: (e) => de.setPageIndex(e - 1)
@@ -43443,11 +43443,11 @@ function iue(e) {
]
}) : null
]
- }) : /* @__PURE__ */ (0, L.jsx)(vw, {
+ }) : /* @__PURE__ */ (0, L.jsx)(_w, {
shell: "plain",
- icon: gC,
+ icon: hC,
title: "还没有关注来源",
- actions: /* @__PURE__ */ (0, L.jsx)(pw, {
+ actions: /* @__PURE__ */ (0, L.jsx)(fw, {
variant: "primary",
size: "small",
href: "/follow-manage?tab=add",
@@ -43458,7 +43458,7 @@ function iue(e) {
}
//#endregion
//#region src/react/follow-manage/feed-sources.tsx
-var aue = {
+var oue = {
select: "选择",
name: "名称",
kind: "类型",
@@ -43468,33 +43468,33 @@ var aue = {
fetched: "上次拉取",
fresh: "上次新增",
actions: "操作"
-}, oue = /* @__PURE__ */ new Set(["select", "actions"]), EL = () => X.invalidateQueries({
- queryKey: fF,
+}, sue = /* @__PURE__ */ new Set(["select", "actions"]), TL = () => X.invalidateQueries({
+ queryKey: dF,
exact: !0
-}), DL = (e) => e.name || e.url, sue = (e) => e >= 60 ? `每 ${Math.round(e / 60)} 小时` : `每 ${e} 分钟`;
-function cue(e) {
+}), EL = (e) => e.name || e.url, cue = (e) => e >= 60 ? `每 ${Math.round(e / 60)} 小时` : `每 ${e} 分钟`;
+function lue(e) {
try {
return new URL(e).hostname.replace(/^www\./, "");
} catch {
return e;
}
}
-function lue({ source: e }) {
- return e.last_error ? /* @__PURE__ */ (0, L.jsx)(dw, {
+function uue({ source: e }) {
+ return e.last_error ? /* @__PURE__ */ (0, L.jsx)(uw, {
variant: "caption",
color: "rose",
children: "拉取失败"
- }) : e.enabled ? /* @__PURE__ */ (0, L.jsx)(dw, {
+ }) : e.enabled ? /* @__PURE__ */ (0, L.jsx)(uw, {
variant: "caption",
color: "lime",
children: "正常"
- }) : /* @__PURE__ */ (0, L.jsx)(dw, {
+ }) : /* @__PURE__ */ (0, L.jsx)(uw, {
variant: "caption",
color: "neutral",
children: "已暂停"
});
}
-function uue({ source: e, avatarInner: t }) {
+function due({ source: e, avatarInner: t }) {
let n = e.entity_id ? {
id: e.entity_id,
has_image: !!e.has_image,
@@ -43502,31 +43502,31 @@ function uue({ source: e, avatarInner: t }) {
} : null;
return /* @__PURE__ */ (0, L.jsx)("span", {
"aria-hidden": !0,
- className: `relative inline-grid size-8 shrink-0 place-items-center overflow-hidden rounded-full bg-background-tertiary-default text-caption-1-semibold text-text-secondary ${xL}`,
- dangerouslySetInnerHTML: { __html: t(DL(e), n, null, "performer") }
+ className: `relative inline-grid size-8 shrink-0 place-items-center overflow-hidden rounded-full bg-background-tertiary-default text-caption-1-semibold text-text-secondary ${bL}`,
+ dangerouslySetInnerHTML: { __html: t(EL(e), n, null, "performer") }
});
}
-var due = (e, t) => e.entity_id !== null && t.has(e.entity_id) && e.page_name && e.page_name !== e.name ? e.page_name : "";
-function fue(e) {
+var fue = (e, t) => e.entity_id !== null && t.has(e.entity_id) && e.page_name && e.page_name !== e.name ? e.page_name : "";
+function pue(e) {
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
for (let { entity_id: r } of e) r !== null && (t.has(r) ? n.add(r) : t.add(r));
return n;
}
-function OL(e, t) {
+function DL(e, t) {
let n = e.length === 1 ? e[0] : null;
return g({
title: n ? "移除订阅源" : `移除 ${e.length} 条订阅源`,
- body: n ? `将移除订阅源「${DL(n)}」,之后不再拉取它的新作;已经拉到的新作保留。` : "将移除所选订阅源,之后不再拉取它们的新作;已经拉到的新作保留。",
+ body: n ? `将移除订阅源「${EL(n)}」,之后不再拉取它的新作;已经拉到的新作保留。` : "将移除所选订阅源,之后不再拉取它们的新作;已经拉到的新作保留。",
confirmLabel: n ? "移除订阅源" : "移除所选订阅源",
danger: !0,
onConfirm: t
});
}
-function pue({ readOnly: e, toast: t, avatarInner: n }) {
+function mue({ readOnly: e, toast: t, avatarInner: n }) {
let r = Ft({
- queryKey: fF,
- queryFn: ({ signal: e }) => NF(e)
- }), i = Cw(), a = r.data, o = (0, I.useMemo)(() => a?.sources ?? [], [a]), [s, c] = (0, I.useState)(/* @__PURE__ */ new Set()), [u, d] = (0, I.useState)(1), [f, p] = (0, I.useState)(20), m = wF(o.length, f, u);
+ queryKey: dF,
+ queryFn: ({ signal: e }) => MF(e)
+ }), i = Sw(), a = r.data, o = (0, I.useMemo)(() => a?.sources ?? [], [a]), [s, c] = (0, I.useState)(/* @__PURE__ */ new Set()), [u, d] = (0, I.useState)(1), [f, p] = (0, I.useState)(20), m = CF(o.length, f, u);
(0, I.useEffect)(() => {
d((e) => Math.min(e, m.pages));
}, [m.pages]), (0, I.useEffect)(() => {
@@ -43538,7 +43538,7 @@ function pue({ readOnly: e, toast: t, avatarInner: n }) {
let h = It({
mutationFn: async (e) => {
let t = await l(e.ids, 4, async (t) => {
- e.action === "remove" ? await FF(t) : await PF(t, e.action === "enabled");
+ e.action === "remove" ? await PF(t) : await NF(t, e.action === "enabled");
});
return {
...e,
@@ -43547,13 +43547,13 @@ function pue({ readOnly: e, toast: t, avatarInner: n }) {
},
onSuccess: (e) => {
let n = e.results.filter((e) => !e.ok), r = e.ids.length - n.length;
- if (c(/* @__PURE__ */ new Set()), EL(), e.action === "remove" && r && t(`已移除 ${r} 条订阅源`), n.length) {
+ if (c(/* @__PURE__ */ new Set()), TL(), e.action === "remove" && r && t(`已移除 ${r} 条订阅源`), n.length) {
let e = n[0];
i.setError(`${n.length} 条没有写入:${e.ok ? "" : K(e.error)}`);
}
},
onError: (e) => i.setError(K(e))
- }), g = (0, I.useMemo)(() => fue(o), [o]), _ = (0, I.useRef)({
+ }), g = (0, I.useMemo)(() => pue(o), [o]), _ = (0, I.useRef)({
readOnly: e,
avatarInner: n,
shared: g,
@@ -43567,34 +43567,34 @@ function pue({ readOnly: e, toast: t, avatarInner: n }) {
avatarInner: n,
shared: g,
busy: i.busy,
- toggle: (e, t) => void i.run(`enabled-${e.id}`, (n) => PF(e.id, t, n), () => void EL()),
- fetch: (e) => void i.run(`check-${e.id}`, (t) => IF(t, [e.id]), () => void EL()),
- remove: (e) => void OL([e], async () => {
- await FF(e.id), t(`已移除订阅源「${DL(e)}」`), EL();
+ toggle: (e, t) => void i.run(`enabled-${e.id}`, (n) => NF(e.id, t, n), () => void TL()),
+ fetch: (e) => void i.run(`check-${e.id}`, (t) => FF(t, [e.id]), () => void TL()),
+ remove: (e) => void DL([e], async () => {
+ await PF(e.id), t(`已移除订阅源「${EL(e)}」`), TL();
})
};
let v = (0, I.useMemo)(() => {
- let e = kI(), t = (e) => () => aue[e] || e;
+ let e = OI(), t = (e) => () => oue[e] || e;
return [
e.display({
id: "select",
header: t("select"),
- cell: (e) => /* @__PURE__ */ (0, L.jsx)(Oj, {
+ cell: (e) => /* @__PURE__ */ (0, L.jsx)(Ej, {
slot: null,
isSelected: e.row.getIsSelected(),
onChange: (t) => e.row.toggleSelected(t),
- "aria-label": `选择 ${DL(e.row.original)}`
+ "aria-label": `选择 ${EL(e.row.original)}`
})
}),
- e.accessor(DL, {
+ e.accessor(EL, {
id: "name",
header: t("name"),
cell: (e) => {
- let t = due(e.row.original, _.current.shared);
+ let t = fue(e.row.original, _.current.shared);
return /* @__PURE__ */ (0, L.jsxs)("span", {
className: "flex items-center gap-2 whitespace-nowrap text-body-medium text-text-primary",
children: [
- /* @__PURE__ */ (0, L.jsx)(uue, {
+ /* @__PURE__ */ (0, L.jsx)(due, {
source: e.row.original,
avatarInner: _.current.avatarInner
}),
@@ -43625,15 +43625,15 @@ function pue({ readOnly: e, toast: t, avatarInner: n }) {
rel: "noreferrer noopener",
title: "打开来源页面",
className: "text-text-primary underline-offset-2 hover:underline",
- children: cue(e.getValue())
+ children: lue(e.getValue())
})
}),
e.display({
id: "status",
header: t("status"),
- cell: (e) => /* @__PURE__ */ (0, L.jsx)(lue, { source: e.row.original })
+ cell: (e) => /* @__PURE__ */ (0, L.jsx)(uue, { source: e.row.original })
}),
- e.accessor((e) => sue(e.interval_minutes), {
+ e.accessor((e) => cue(e.interval_minutes), {
id: "interval",
header: t("interval"),
cell: (e) => /* @__PURE__ */ (0, L.jsx)("span", {
@@ -43641,7 +43641,7 @@ function pue({ readOnly: e, toast: t, avatarInner: n }) {
children: e.getValue()
})
}),
- e.accessor((e) => e.last_fetched_at ? OE(e.last_fetched_at) : "还没拉过", {
+ e.accessor((e) => e.last_fetched_at ? EE(e.last_fetched_at) : "还没拉过", {
id: "fetched",
header: t("fetched"),
cell: (e) => /* @__PURE__ */ (0, L.jsx)("span", {
@@ -43663,8 +43663,8 @@ function pue({ readOnly: e, toast: t, avatarInner: n }) {
cell: (e) => /* @__PURE__ */ (0, L.jsxs)("span", {
className: "flex items-center gap-1",
children: [
- /* @__PURE__ */ (0, L.jsx)(bL, {
- "aria-label": `启用 ${DL(e.row.original)}`,
+ /* @__PURE__ */ (0, L.jsx)(yL, {
+ "aria-label": `启用 ${EL(e.row.original)}`,
isSelected: e.row.original.enabled,
isDisabled: _.current.readOnly,
onChange: (t) => _.current.toggle(e.row.original, t)
@@ -43673,8 +43673,8 @@ function pue({ readOnly: e, toast: t, avatarInner: n }) {
variant: "secondary",
size: "xs",
iconOnly: !0,
- leadingIcon: hC,
- "aria-label": `拉取 ${DL(e.row.original)}`,
+ leadingIcon: mC,
+ "aria-label": `拉取 ${EL(e.row.original)}`,
disabled: _.current.readOnly,
...Y(_.current.busy === `check-${e.row.original.id}`),
onClick: () => _.current.fetch(e.row.original)
@@ -43683,8 +43683,8 @@ function pue({ readOnly: e, toast: t, avatarInner: n }) {
variant: "secondary",
size: "xs",
iconOnly: !0,
- leadingIcon: nC,
- "aria-label": `移除 ${DL(e.row.original)}`,
+ leadingIcon: tC,
+ "aria-label": `移除 ${EL(e.row.original)}`,
disabled: _.current.readOnly,
onClick: () => _.current.remove(e.row.original)
})
@@ -43692,7 +43692,7 @@ function pue({ readOnly: e, toast: t, avatarInner: n }) {
})
})
];
- }, []), y = (0, I.useMemo)(() => Object.fromEntries([...s].map((e) => [String(e), !0])), [s]), b = yL({
+ }, []), y = (0, I.useMemo)(() => Object.fromEntries([...s].map((e) => [String(e), !0])), [s]), b = vL({
data: o,
columns: v,
getRowId: (e) => String(e.id),
@@ -43708,27 +43708,27 @@ function pue({ readOnly: e, toast: t, avatarInner: n }) {
let t = typeof e == "function" ? e(y) : e;
c(new Set(Object.entries(t).filter(([, e]) => e).map(([e]) => Number(e))));
},
- getCoreRowModel: gL(),
- getPaginationRowModel: _L()
+ getCoreRowModel: hL(),
+ getPaginationRowModel: gL()
});
if (!a) return r.error ? /* @__PURE__ */ (0, L.jsx)(J, {
tone: "error",
title: "打不开订阅源",
children: K(r.error)
- }) : /* @__PURE__ */ (0, L.jsx)(JA, { children: "正在读订阅源。" });
- let x = () => void i.run("check", (e) => IF(e), () => void EL()), S = (e) => c((t) => {
+ }) : /* @__PURE__ */ (0, L.jsx)(KA, { children: "正在读订阅源。" });
+ let x = () => void i.run("check", (e) => FF(e), () => void TL()), S = (e) => c((t) => {
let n = new Set(t);
return n.has(e) ? n.delete(e) : n.add(e), n;
}), C = o.filter((e) => s.has(e.id)), w = o.filter((e) => e.last_error);
return /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col gap-3",
- children: [/* @__PURE__ */ (0, L.jsx)(Qle, {
+ children: [/* @__PURE__ */ (0, L.jsx)($le, {
readOnly: e,
toast: t,
- onAdded: () => void EL()
+ onAdded: () => void TL()
}), /* @__PURE__ */ (0, L.jsxs)("section", {
"aria-label": "JAV 订阅列表",
- className: _w({
+ className: gw({
padding: "none",
className: "flex flex-col gap-4 px-6 py-5 max-sm:px-4"
}),
@@ -43756,11 +43756,11 @@ function pue({ readOnly: e, toast: t, avatarInner: n }) {
className: "flex flex-col gap-3",
children: [w.map((e) => /* @__PURE__ */ (0, L.jsx)(J, {
tone: "error",
- title: `${DL(e)} 拉取失败`,
+ title: `${EL(e)} 拉取失败`,
children: e.last_error
- }, e.id)), i.error ? /* @__PURE__ */ (0, L.jsx)(YA, { children: i.error }) : null]
+ }, e.id)), i.error ? /* @__PURE__ */ (0, L.jsx)(qA, { children: i.error }) : null]
}) : null,
- /* @__PURE__ */ (0, L.jsxs)(CL, {
+ /* @__PURE__ */ (0, L.jsxs)(SL, {
visible: C.length > 0,
label: "订阅源批量操作",
count: `已选 ${C.length} 条订阅源`,
@@ -43792,7 +43792,7 @@ function pue({ readOnly: e, toast: t, avatarInner: n }) {
size: "small",
disabled: e,
...Y(h.isPending),
- onClick: () => void OL(C, () => h.mutateAsync({
+ onClick: () => void DL(C, () => h.mutateAsync({
ids: C.map((e) => e.id),
action: "remove"
})),
@@ -43806,26 +43806,26 @@ function pue({ readOnly: e, toast: t, avatarInner: n }) {
})
]
}),
- o.length ? /* @__PURE__ */ (0, L.jsx)(Mj, {
+ o.length ? /* @__PURE__ */ (0, L.jsx)(Aj, {
onRowClick: (e) => S(Number(e)),
- children: /* @__PURE__ */ (0, L.jsxs)(kj, {
+ children: /* @__PURE__ */ (0, L.jsxs)(Dj, {
"aria-label": "JAV 订阅源",
size: "sm",
- children: [/* @__PURE__ */ (0, L.jsx)(oA, { children: b.getHeaderGroups()[0].headers.map((e) => {
- let t = vL(e.column.columnDef.header, e.getContext());
- return /* @__PURE__ */ (0, L.jsx)(sA, {
+ children: [/* @__PURE__ */ (0, L.jsx)(iA, { children: b.getHeaderGroups()[0].headers.map((e) => {
+ let t = _L(e.column.columnDef.header, e.getContext());
+ return /* @__PURE__ */ (0, L.jsx)(aA, {
id: e.id,
isRowHeader: e.column.id === "name",
- children: oue.has(e.column.id) ? /* @__PURE__ */ (0, L.jsx)(iv, { children: t }) : t
+ children: sue.has(e.column.id) ? /* @__PURE__ */ (0, L.jsx)(iv, { children: t }) : t
}, e.id);
- }) }), /* @__PURE__ */ (0, L.jsx)(lA, { children: b.getRowModel().rows.map((e) => /* @__PURE__ */ (0, L.jsx)(fA, {
+ }) }), /* @__PURE__ */ (0, L.jsx)(sA, { children: b.getRowModel().rows.map((e) => /* @__PURE__ */ (0, L.jsx)(uA, {
id: e.id,
"data-follow-selected": e.getIsSelected() || void 0,
- children: e.getVisibleCells().map((e) => /* @__PURE__ */ (0, L.jsx)(mA, { children: vL(e.column.columnDef.cell, e.getContext()) }, e.id))
+ children: e.getVisibleCells().map((e) => /* @__PURE__ */ (0, L.jsx)(fA, { children: _L(e.column.columnDef.cell, e.getContext()) }, e.id))
}, e.id)) })]
})
- }) : /* @__PURE__ */ (0, L.jsx)(vw, {
- icon: gC,
+ }) : /* @__PURE__ */ (0, L.jsx)(_w, {
+ icon: hC,
title: "还没有订阅源",
shell: "plain",
children: "在上面按女优名添加,或在人物页点「订阅新作」。"
@@ -43837,19 +43837,19 @@ function pue({ readOnly: e, toast: t, avatarInner: n }) {
className: "text-body-2-regular text-text-secondary",
children: `${m.start + 1}–${m.end} / ${m.total} 个订阅源`
}),
- /* @__PURE__ */ (0, L.jsx)(_j, {
+ /* @__PURE__ */ (0, L.jsx)(hj, {
"aria-label": "每页显示数量",
size: "sm",
selectedKey: String(f),
onSelectionChange: (e) => {
e !== null && (p(Number(e)), d(1));
},
- children: mF.map((e) => /* @__PURE__ */ (0, L.jsx)(vj, {
+ children: pF.map((e) => /* @__PURE__ */ (0, L.jsx)(gj, {
id: String(e),
children: `每页 ${e} 条`
}, e))
}),
- /* @__PURE__ */ (0, L.jsx)(TL, {
+ /* @__PURE__ */ (0, L.jsx)(wL, {
label: "JAV 订阅分页",
page: m.page,
pages: m.pages,
@@ -43871,15 +43871,15 @@ function pue({ readOnly: e, toast: t, avatarInner: n }) {
}
//#endregion
//#region src/react/follow-manage/follow-manage-page.tsx
-var kL = [
+var OL = [
["list", "关注列表"],
["add", "添加关注"],
["feeds", "JAV 订阅源"],
["source", "来源和凭证"]
-], AL = (e) => kL.some(([t]) => t === e);
-function jL({ term: e, figure: t, unit: n }) {
+], kL = (e) => OL.some(([t]) => t === e);
+function AL({ term: e, figure: t, unit: n }) {
return /* @__PURE__ */ (0, L.jsxs)("div", {
- className: _w({
+ className: gw({
padding: "none",
className: "flex flex-col gap-3 px-6 py-5 max-sm:gap-2 max-sm:p-4"
}),
@@ -43895,23 +43895,23 @@ function jL({ term: e, figure: t, unit: n }) {
})]
});
}
-function mue(e) {
- let { route: t, savePreference: n, toast: r, openFollow: i, readOnly: a, readOnlyMessage: o, writerUrl: s } = e, [c, l] = (0, I.useState)(AL(e.tab) ? e.tab : "list"), [u, d] = (0, I.useState)(Math.max(1, Math.floor(e.page) || 1)), [f, p] = (0, I.useState)(() => tF(e.sort, e.dir).sort), [m, h] = (0, I.useState)(() => tF(e.sort, e.dir).dir), [g, _] = (0, I.useState)(lse(e.layout) ? e.layout : "default"), [v, y] = (0, I.useState)(use(e.pageSize)), [b, x] = (0, I.useState)(/* @__PURE__ */ new Set()), S = Ft({
+function hue(e) {
+ let { route: t, savePreference: n, toast: r, openFollow: i, readOnly: a, readOnlyMessage: o, writerUrl: s } = e, [c, l] = (0, I.useState)(kL(e.tab) ? e.tab : "list"), [u, d] = (0, I.useState)(Math.max(1, Math.floor(e.page) || 1)), [f, p] = (0, I.useState)(() => eF(e.sort, e.dir).sort), [m, h] = (0, I.useState)(() => eF(e.sort, e.dir).dir), [g, _] = (0, I.useState)(use(e.layout) ? e.layout : "default"), [v, y] = (0, I.useState)(dse(e.pageSize)), [b, x] = (0, I.useState)(/* @__PURE__ */ new Set()), S = Ft({
+ queryKey: lF,
+ queryFn: ({ signal: e }) => EF(e)
+ }), C = Ft({
queryKey: uF,
queryFn: ({ signal: e }) => DF(e)
- }), C = Ft({
- queryKey: dF,
- queryFn: ({ signal: e }) => OF(e)
}), w = Ft({
- queryKey: fF,
- queryFn: ({ signal: e }) => NF(e)
+ queryKey: dF,
+ queryFn: ({ signal: e }) => MF(e)
}), T = S.data || { sources: [] }, E = C.data || {
root: "",
providers: []
}, D = T.sources;
(0, I.useEffect)(() => {
x((e) => {
- let t = vse(e, D);
+ let t = yse(e, D);
return t.size === e.size ? e : t;
});
}, [D]);
@@ -43921,10 +43921,10 @@ function mue(e) {
tab: e.tab ?? c,
page: e.page ?? u,
sort: n === "checked" ? "" : n,
- dir: r === eF[n] ? "" : r
+ dir: r === $P[n] ? "" : r
});
- }, k = CF(D), A = D.filter(_F).length, j = D.filter((e) => e.enabled).length, M = (E.providers || []).filter((e) => e.requirement === "required" && !VF(e)).length, N = new Set((w.data?.sources || []).map((e) => e.entity_id ?? `source-${e.id}`)).size;
- return /* @__PURE__ */ (0, L.jsxs)(bw, { children: [
+ }, k = SF(D), A = D.filter(gF).length, j = D.filter((e) => e.enabled).length, M = (E.providers || []).filter((e) => e.requirement === "required" && !BF(e)).length, N = new Set((w.data?.sources || []).map((e) => e.entity_id ?? `source-${e.id}`)).size;
+ return /* @__PURE__ */ (0, L.jsxs)(yw, { children: [
a ? /* @__PURE__ */ (0, L.jsx)(J, {
tone: "warning",
title: "本机只能浏览",
@@ -43939,64 +43939,64 @@ function mue(e) {
children: o
}) : null,
/* @__PURE__ */ (0, L.jsxs)("div", {
- className: vie,
+ className: bie,
"aria-label": "关注概览",
children: [
- /* @__PURE__ */ (0, L.jsx)(jL, {
+ /* @__PURE__ */ (0, L.jsx)(AL, {
term: "关注创作者",
figure: k.length,
unit: "位"
}),
- /* @__PURE__ */ (0, L.jsx)(jL, {
+ /* @__PURE__ */ (0, L.jsx)(AL, {
term: "启用来源",
figure: j,
unit: `/ ${D.length}`
}),
- /* @__PURE__ */ (0, L.jsx)(jL, {
+ /* @__PURE__ */ (0, L.jsx)(AL, {
term: "检查失败",
figure: A,
unit: "个来源"
}),
- /* @__PURE__ */ (0, L.jsx)(jL, {
+ /* @__PURE__ */ (0, L.jsx)(AL, {
term: "未看更新",
figure: T.counts?.new || 0,
unit: "条"
}),
- /* @__PURE__ */ (0, L.jsx)(jL, {
+ /* @__PURE__ */ (0, L.jsx)(AL, {
term: "JAV 订阅",
figure: N,
unit: "位"
}),
- /* @__PURE__ */ (0, L.jsx)(jL, {
+ /* @__PURE__ */ (0, L.jsx)(AL, {
term: "未看新作",
figure: w.data?.unread || 0,
unit: "条"
})
]
}),
- /* @__PURE__ */ (0, L.jsxs)(vA, {
+ /* @__PURE__ */ (0, L.jsxs)(gA, {
selectedKey: c,
onSelectionChange: (e) => {
let t = String(e);
- AL(t) && (l(t), O({ tab: t }));
+ kL(t) && (l(t), O({ tab: t }));
},
className: "flex flex-col gap-6",
children: [
- /* @__PURE__ */ (0, L.jsx)(yA, {
+ /* @__PURE__ */ (0, L.jsx)(_A, {
"aria-label": "关注管理区域",
"data-section-nav": !0,
"data-section-items": !0,
className: "flex max-w-full flex-nowrap overflow-x-auto",
- children: kL.map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(bA, {
+ children: OL.map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(vA, {
id: e,
className: "cursor-pointer whitespace-nowrap",
children: e === "source" && M ? `${t}(${M})` : t
}, e))
}),
- /* @__PURE__ */ (0, L.jsx)(xA, {
+ /* @__PURE__ */ (0, L.jsx)(yA, {
id: "list",
className: "flex flex-col gap-4",
- children: /* @__PURE__ */ (0, L.jsx)(iue, {
+ children: /* @__PURE__ */ (0, L.jsx)(aue, {
data: T,
sort: f,
dir: m,
@@ -44026,10 +44026,10 @@ function mue(e) {
}
})
}),
- /* @__PURE__ */ (0, L.jsxs)(xA, {
+ /* @__PURE__ */ (0, L.jsxs)(yA, {
id: "add",
className: "flex flex-col gap-8",
- children: [/* @__PURE__ */ (0, L.jsx)(Zce, {
+ children: [/* @__PURE__ */ (0, L.jsx)(Qce, {
data: T,
credentials: E,
readOnly: a,
@@ -44037,7 +44037,7 @@ function mue(e) {
openCredentials: () => {
l("source"), O({ tab: "source" });
}
- }), /* @__PURE__ */ (0, L.jsx)(ele, {
+ }), /* @__PURE__ */ (0, L.jsx)(tle, {
groups: T.author_aliases || [],
readOnly: a,
toast: r,
@@ -44045,19 +44045,19 @@ function mue(e) {
sources: T.sources
})]
}),
- /* @__PURE__ */ (0, L.jsx)(xA, {
+ /* @__PURE__ */ (0, L.jsx)(yA, {
id: "feeds",
className: "flex flex-col gap-4",
- children: /* @__PURE__ */ (0, L.jsx)(pue, {
+ children: /* @__PURE__ */ (0, L.jsx)(mue, {
readOnly: a,
toast: r,
avatarInner: e.avatarInner
})
}),
- /* @__PURE__ */ (0, L.jsx)(xA, {
+ /* @__PURE__ */ (0, L.jsx)(yA, {
id: "source",
className: "flex flex-col gap-4",
- children: /* @__PURE__ */ (0, L.jsx)(lle, {
+ children: /* @__PURE__ */ (0, L.jsx)(ule, {
data: E,
readOnly: a,
toast: r
@@ -44069,32 +44069,32 @@ function mue(e) {
}
//#endregion
//#region src/react/item-detail/item-detail.ts
-var ML = (e) => ["item", e], NL = (e) => [
+var jL = (e) => ["item", e], ML = (e) => [
"item-queue",
e.kind,
e.kind === "playlist" ? e.playlistId : e.seedId
-], hue = (e, t) => [
+], gue = (e, t) => [
"item-related",
e,
t
-], gue = (e) => `/api/item?id=${e}`, _ue = (e, t) => `/api/related?id=${e}&limit=${t}`, PL = "/api/playlist", vue = "/api/feedback", FL = "/api/item-tag", IL = "/api/watch-later", LL = "/api/quality-goal", RL = "/api/preference", zL = class extends Error {};
-async function BL(e, t) {
- let n = await gw(gue(e), t);
- if (n.error) throw new zL(n.error);
+], _ue = (e) => `/api/item?id=${e}`, vue = (e, t) => `/api/related?id=${e}&limit=${t}`, NL = "/api/playlist", yue = "/api/feedback", PL = "/api/item-tag", FL = "/api/watch-later", IL = "/api/quality-goal", LL = "/api/preference", RL = class extends Error {};
+async function zL(e, t) {
+ let n = await hw(_ue(e), t);
+ if (n.error) throw new RL(n.error);
return n;
}
-async function VL(e, t, n) {
+async function BL(e, t, n) {
if (e.kind === "mix") {
- let r = e.seedId, [i, a] = await Promise.all([BL(r, n), t.mixRelated(r)]);
- return X.setQueryData(ML(i.id), i), {
+ let r = e.seedId, [i, a] = await Promise.all([zL(r, n), t.mixRelated(r)]);
+ return X.setQueryData(jL(i.id), i), {
kind: "mix",
seedId: r,
title: `Mix · ${t.mixLabel(i)}`,
items: [i, ...a.filter((e) => e.id !== i.id)]
};
}
- if (e.kind === "playlist") return HL(await gw(`${PL}?id=${e.playlistId}`, n));
- let r = await gw(`/api/${e.kind}?id=${e.seedId}`, n);
+ if (e.kind === "playlist") return VL(await hw(`${NL}?id=${e.playlistId}`, n));
+ let r = await hw(`/api/${e.kind}?id=${e.seedId}`, n);
if (r.error || !r.items?.length) throw Error(r.error || "这一组已不存在");
return {
kind: e.kind,
@@ -44103,17 +44103,17 @@ async function VL(e, t, n) {
items: r.items
};
}
-var HL = (e) => ({
+var VL = (e) => ({
kind: "playlist",
playlistId: e.id,
title: e.name,
items: e.items || [],
currentAssetId: e.current_asset_id
});
-function UL(e, t) {
+function HL(e, t) {
return e.kind === "mix" ? t : e.items.length ? t != null && e.items.some((e) => e.id === t) ? t : e.kind === "playlist" && e.currentAssetId || e.items[0].id : null;
}
-function yue(e, t) {
+function bue(e, t) {
if (t?.kind !== "parts") return e;
let n = t.items.find((t) => t.id === e.id)?.part_label || "";
return e.part_label === n ? e : {
@@ -44121,14 +44121,14 @@ function yue(e, t) {
part_label: n
};
}
-async function bue(e, t) {
+async function xue(e, t) {
let { queue: n, actions: r } = e, i = null;
if (n) {
- let a = NL(n);
+ let a = ML(n);
try {
i = (n.fresh ? void 0 : X.getQueryData(a)) || await X.fetchQuery({
queryKey: a,
- queryFn: () => VL(n, e.helpers, t),
+ queryFn: () => BL(n, e.helpers, t),
staleTime: 0
});
} catch (n) {
@@ -44141,19 +44141,19 @@ async function bue(e, t) {
}
e.grid.cache(i.items);
}
- let a = i ? UL(i, e.id) : e.id;
+ let a = i ? HL(i, e.id) : e.id;
if (a == null) {
r.redirect(i?.kind === "playlist" ? { kind: "playlists" } : { kind: "gone" });
return;
}
let o;
try {
- o = X.getQueryData(ML(a)) || await X.fetchQuery({
- queryKey: ML(a),
- queryFn: () => BL(a, t)
+ o = X.getQueryData(jL(a)) || await X.fetchQuery({
+ queryKey: jL(a),
+ queryFn: () => zL(a, t)
});
} catch (e) {
- if (e instanceof zL) {
+ if (e instanceof RL) {
r.redirect({ kind: "gone" });
return;
}
@@ -44164,7 +44164,7 @@ async function bue(e, t) {
id: Number(o.follow_item_id)
});
}
-function xue(e) {
+function Sue(e) {
let t = e.entity_refs || {}, n = /* @__PURE__ */ new Set(), r = (e) => {
let t = o(e.name);
return !e.name || n.has(t) ? !1 : (n.add(t), !0);
@@ -44185,42 +44185,42 @@ function xue(e) {
unowned: !i.length && !l.length && !String(e.creator || "").trim()
};
}
-var WL = (e) => Math.min(Math.max(e || 0, 0), 100), GL = (e) => Math.round(WL(e) / 20), Sue = (e) => {
- let t = GL(e);
+var UL = (e) => Math.min(Math.max(e || 0, 0), 100), WL = (e) => Math.round(UL(e) / 20), Cue = (e) => {
+ let t = WL(e);
return t ? `${t} 星` : "未评分";
-}, Cue = (e, t) => {
+}, wue = (e, t) => {
let n = t * 20;
return n === (e || 0) ? 0 : n;
};
-function wue(e, t) {
+function Tue(e, t) {
let n = /* @__PURE__ */ new Map();
return (e.tags || []).filter((e) => !t.isDurationTag(e.k)).forEach((e) => {
let r = o(t.tagLabel(e.k)), i = n.get(r);
(!i || o(e.k) === r && o(i.k) !== r) && n.set(r, e);
}), [...n.values()].slice(0, 40);
}
-var KL = (e, t) => (e.tags || []).some((e) => o(e.k) === o(t)), qL = (e, t) => ({
+var GL = (e, t) => (e.tags || []).some((e) => o(e.k) === o(t)), KL = (e, t) => ({
...e,
tags: (e.tags || []).filter((e) => o(e.k) !== o(t))
-}), JL = (e, t) => KL(e, t.k) ? e : {
+}), qL = (e, t) => GL(e, t.k) ? e : {
...e,
tags: [...e.tags || [], t]
-}, YL = "peach.recentTags";
-function XL() {
+}, JL = "peach.recentTags";
+function YL() {
try {
- let e = JSON.parse(localStorage.getItem(YL) || "[]");
+ let e = JSON.parse(localStorage.getItem(JL) || "[]");
return Array.isArray(e) ? e.map(String) : [];
} catch {
return [];
}
}
-function Tue(e) {
+function Eue(e) {
try {
- let t = XL().filter((t) => o(t) !== o(e));
- localStorage.setItem(YL, JSON.stringify([e, ...t].slice(0, 12)));
+ let t = YL().filter((t) => o(t) !== o(e));
+ localStorage.setItem(JL, JSON.stringify([e, ...t].slice(0, 12)));
} catch {}
}
-function Eue(e, t, n) {
+function Due(e, t, n) {
let r = o(e), i = new Map(t.map((e) => [o(e.k), e])), a = t.filter((e) => !r || o(e.k).includes(r)).slice(0, 120), s = r ? [] : n.map((e) => i.get(o(e)) || {
k: e,
n: 0
@@ -44231,59 +44231,59 @@ function Eue(e, t, n) {
create: r && !c ? e.trim() : ""
};
}
-var Due = {
+var Oue = {
中字: "subtitle",
无码: "uncensored",
无码破解: "cracked",
有码: "censored"
-}, Oue = {
+}, kue = {
mix: "Mix",
parts: "分卷",
editions: "版本",
playlist: "播放列表"
};
-function kue(e) {
+function Aue(e) {
let t = e.items.length, n = e.kind === "parts" ? `${t} 卷` : e.kind === "editions" ? `${t} 个版本` : `${t} 个视频`;
return {
- title: Oue[e.kind],
+ title: kue[e.kind],
summary: e.kind === "editions" ? n : `${e.title} · ${n}`
};
}
-var ZL = (e = "") => /^(?:\d+|[a-h])$/i.test(e) ? `第 ${e} 卷` : e, Aue = (e, t) => t?.kind === "parts" && e.part_label ? `<small class="javedition partlabel">${r(ZL(e.part_label))}</small>` : "";
-function jue(e, t, n, r) {
+var XL = (e = "") => /^(?:\d+|[a-h])$/i.test(e) ? `第 ${e} 卷` : e, jue = (e, t) => t?.kind === "parts" && e.part_label ? `<small class="javedition partlabel">${r(XL(e.part_label))}</small>` : "";
+function Mue(e, t, n, r) {
let i = e.filter((e) => e !== t), a = i.indexOf(n);
return i.splice(a + +!!r, 0, t), i;
}
-var Mue = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]);
-function Nue(e, t) {
+var Nue = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]);
+function Pue(e, t) {
return t ? "offline" : e.location === "online" && !e.follow_item_id ? "online" : e.cost === "metered" && e.location !== "online" ? "metered" : "";
}
-function Pue(e) {
+function Fue(e) {
let t = Number(e.duration) > 0 ? Number(e.duration) : 0;
return !e.play_seconds || !t ? null : Math.min(Number(e.play_seconds) / t, 1) * 100;
}
-function Fue(e, t) {
+function Iue(e, t) {
return e === "dislike" ? t.feedback === "dislike" ? "已标记不合口味" : "已取消不合口味" : e === "seen" ? t.feedback === "seen" ? "已标记看过" : "已取消看过" : e === "dispose" ? t.disposal === "trash" ? "已移入回收站" : "已移出回收站" : "已记录一次高潮";
}
//#endregion
//#region src/react/components/overlay-host.ts
-function Iue(e) {
+function Lue(e) {
let t = e.querySelector(":scope > [data-react-overlays]");
if (t) return t;
let n = e.ownerDocument.createElement("div");
return n.className = "peach-react", n.dataset.reactOverlays = "", e.append(n), n;
}
-function Lue(e) {
+function Rue(e) {
let t = e?.ownerDocument ?? globalThis.document, n = e?.closest("dialog[open]");
- return Iue(n ?? t.body);
+ return Lue(n ?? t.body);
}
//#endregion
//#region src/react/cover-crop/cover-crop.ts
-var Rue = "/api/cover-crop", zue = (e, t) => q(Rue, {
+var zue = "/api/cover-crop", Bue = (e, t) => q(zue, {
code: e,
box: t
-}), QL = .704;
-function $L({ className: e }) {
+}), ZL = .704;
+function QL({ className: e }) {
return /* @__PURE__ */ (0, L.jsx)("svg", {
"aria-hidden": !0,
viewBox: "0 0 24 24",
@@ -44296,7 +44296,7 @@ function $L({ className: e }) {
children: /* @__PURE__ */ (0, L.jsx)("use", { href: "#i-crop" })
});
}
-function Bue({ code: e, coverUrl: t, box: n, onSaved: r }) {
+function Vue({ code: e, coverUrl: t, box: n, onSaved: r }) {
let [i, a] = (0, I.useState)(!1), o = (0, I.useRef)(null);
return /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)("button", {
ref: o,
@@ -44307,15 +44307,15 @@ function Bue({ code: e, coverUrl: t, box: n, onSaved: r }) {
title: "裁剪封面:框出正封那一块",
onClick: () => a(!0),
className: "flex size-7 cursor-pointer items-center justify-center rounded-lg text-foreground-icon-secondary outline-none transition-colors hover:bg-background-primary-hover hover:text-foreground-icon-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring",
- children: /* @__PURE__ */ (0, L.jsx)($L, { className: "size-3.75" })
- }), /* @__PURE__ */ (0, L.jsx)(yy, {
- getContainer: () => Lue(o.current),
- children: /* @__PURE__ */ (0, L.jsx)(CP, {
+ children: /* @__PURE__ */ (0, L.jsx)(QL, { className: "size-3.75" })
+ }), /* @__PURE__ */ (0, L.jsx)(vy, {
+ getContainer: () => Rue(o.current),
+ children: /* @__PURE__ */ (0, L.jsx)(xP, {
isOpen: i,
onOpenChange: a,
width: "cover-crop",
label: "裁剪封面",
- children: /* @__PURE__ */ (0, L.jsx)(Vue, {
+ children: /* @__PURE__ */ (0, L.jsx)(Hue, {
code: e,
coverUrl: t,
box: n,
@@ -44325,9 +44325,9 @@ function Bue({ code: e, coverUrl: t, box: n, onSaved: r }) {
})
})] });
}
-function Vue({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
- let [a, o] = (0, I.useState)(null), [s, c] = (0, I.useState)(null), [l, u] = (0, I.useState)(!0), d = PA(), f = It({
- mutationFn: (t) => zue(e, t),
+function Hue({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
+ let [a, o] = (0, I.useState)(null), [s, c] = (0, I.useState)(null), [l, u] = (0, I.useState)(!0), d = MA(), f = It({
+ mutationFn: (t) => Bue(e, t),
onSuccess: () => {
i(), r();
}
@@ -44339,19 +44339,19 @@ function Vue({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
y0: n.y0,
x1: n.x1,
y1: n.y1
- } : fP(e, QL);
- c(mP(t, e, null));
+ } : uP(e, ZL);
+ c(fP(t, e, null));
}
let m = f.isPending;
return /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [
/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex shrink-0 items-start gap-4 p-5",
children: [
- /* @__PURE__ */ (0, L.jsx)(wP, { children: /* @__PURE__ */ (0, L.jsx)($L, { className: "size-6" }) }),
+ /* @__PURE__ */ (0, L.jsx)(SP, { children: /* @__PURE__ */ (0, L.jsx)(QL, { className: "size-6" }) }),
/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex min-w-0 flex-1 flex-col gap-2",
children: [
- /* @__PURE__ */ (0, L.jsx)(oO, {
+ /* @__PURE__ */ (0, L.jsx)(iO, {
slot: "title",
className: "text-title-3-semibold text-text-primary",
children: "裁剪封面"
@@ -44366,8 +44366,8 @@ function Vue({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
}) : null
]
}),
- /* @__PURE__ */ (0, L.jsx)(IA, {
- icon: $S,
+ /* @__PURE__ */ (0, L.jsx)(PA, {
+ icon: QS,
size: "small",
"aria-label": "关闭",
onClick: i
@@ -44377,24 +44377,24 @@ function Vue({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
/* @__PURE__ */ (0, L.jsx)("div", {
ref: d,
className: "flex min-h-0 flex-1 flex-col items-center gap-4 overflow-y-auto border-t border-separator-border px-5 py-4",
- children: /* @__PURE__ */ (0, L.jsx)(DP, {
+ children: /* @__PURE__ */ (0, L.jsx)(TP, {
src: t,
- aspect: l ? QL : null,
+ aspect: l ? ZL : null,
box: s,
size: a,
label: `${e} 的正封取景框`,
onSize: (e) => {
- uP(e) && p(e);
+ cP(e) && p(e);
},
onBox: c
})
}),
/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex shrink-0 flex-wrap items-center gap-3 border-t border-separator-border p-5",
- children: [/* @__PURE__ */ (0, L.jsx)(bL, {
+ children: [/* @__PURE__ */ (0, L.jsx)(yL, {
isSelected: l,
onChange: (e) => {
- u(e), e && s && a && c(mP(s, a, QL));
+ u(e), e && s && a && c(fP(s, a, ZL));
},
children: /* @__PURE__ */ (0, L.jsx)("span", {
className: "text-body-2-regular text-text-secondary",
@@ -44423,21 +44423,21 @@ function Vue({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
}
//#endregion
//#region src/react/item-detail/item-detail-page.tsx
-var eR = ({ name: e }) => /* @__PURE__ */ (0, L.jsx)("span", {
+var $L = ({ name: e }) => /* @__PURE__ */ (0, L.jsx)("span", {
className: "contents",
dangerouslySetInnerHTML: { __html: s(e) }
-}), tR = ({ html: e }) => /* @__PURE__ */ (0, L.jsx)("span", {
+}), eR = ({ html: e }) => /* @__PURE__ */ (0, L.jsx)("span", {
className: "contents",
dangerouslySetInnerHTML: { __html: e }
});
-function Hue(e) {
+function Uue(e) {
let { queue: t, actions: n } = e, r = Ft({
- queryKey: t ? NL(t) : ["item-queue", "none"],
- queryFn: ({ signal: n }) => VL(t, e.helpers, n),
+ queryKey: t ? ML(t) : ["item-queue", "none"],
+ queryFn: ({ signal: n }) => BL(t, e.helpers, n),
enabled: !!t
- }), i = t && r.data || null, a = i ? UL(i, e.id) : t ? null : e.id, o = Ft({
- queryKey: ML(a ?? 0),
- queryFn: ({ signal: e }) => BL(a, e),
+ }), i = t && r.data || null, a = i ? HL(i, e.id) : t ? null : e.id, o = Ft({
+ queryKey: jL(a ?? 0),
+ queryFn: ({ signal: e }) => zL(a, e),
enabled: a != null
});
if (!o.data || t && !i) {
@@ -44448,9 +44448,9 @@ function Hue(e) {
children: /* @__PURE__ */ (0, L.jsxs)("div", {
className: "vwrap",
"data-item-media": "none",
- children: [/* @__PURE__ */ (0, L.jsx)(nR, { onClose: n.close }), /* @__PURE__ */ (0, L.jsx)("div", {
+ children: [/* @__PURE__ */ (0, L.jsx)(tR, { onClose: n.close }), /* @__PURE__ */ (0, L.jsx)("div", {
"data-item-placeholder": "",
- children: e ? /* @__PURE__ */ (0, L.jsx)(Uw, {
+ children: e ? /* @__PURE__ */ (0, L.jsx)(Hw, {
message: d(e),
onRetry: () => {
r.error && r.refetch(), o.error && o.refetch();
@@ -44460,13 +44460,13 @@ function Hue(e) {
})
});
}
- return /* @__PURE__ */ (0, L.jsx)(Uue, {
+ return /* @__PURE__ */ (0, L.jsx)(Wue, {
...e,
- item: yue(o.data, i),
+ item: bue(o.data, i),
queue: i
}, o.data.id);
}
-var nR = ({ onClose: e }) => /* @__PURE__ */ (0, L.jsx)("button", {
+var tR = ({ onClose: e }) => /* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
className: "closestage",
id: "closeStage",
@@ -44475,35 +44475,35 @@ var nR = ({ onClose: e }) => /* @__PURE__ */ (0, L.jsx)("button", {
onClick: e,
dangerouslySetInnerHTML: { __html: s("x") }
});
-function Uue(e) {
- let { item: t, queue: n, actions: r, helpers: i } = e, a = ade(t, r, e.grid.cache, i.tagLabel), o = (0, I.useRef)(t);
+function Wue(e) {
+ let { item: t, queue: n, actions: r, helpers: i } = e, a = ode(t, r, e.grid.cache, i.tagLabel), o = (0, I.useRef)(t);
(0, I.useLayoutEffect)(() => {
r.present(o.current, n);
}, [r]), (0, I.useEffect)(() => {
- n?.kind === "playlist" && q(PL, {
+ n?.kind === "playlist" && q(NL, {
action: "progress",
id: n.playlistId,
asset_id: t.id
}).catch(() => {});
}, []);
- let s = Nue(t, i.sourceOffline(t.location || ""));
+ let s = Pue(t, i.sourceOffline(t.location || ""));
return /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsxs)("div", {
className: n ? "sgrid mixgrid" : "sgrid",
"data-item-detail": "",
children: [
- /* @__PURE__ */ (0, L.jsx)(Wue, {
+ /* @__PURE__ */ (0, L.jsx)(Gue, {
item: t,
gate: s,
helpers: i,
actions: r
}),
- n ? /* @__PURE__ */ (0, L.jsx)(Kue, {
+ n ? /* @__PURE__ */ (0, L.jsx)(que, {
queue: n,
itemId: t.id,
helpers: i,
actions: r
}) : null,
- /* @__PURE__ */ (0, L.jsx)(Yue, {
+ /* @__PURE__ */ (0, L.jsx)(Xue, {
item: t,
queue: n,
write: a,
@@ -44511,9 +44511,9 @@ function Uue(e) {
actions: r
})
]
- }), !n && e.relatedLimit > 0 ? /* @__PURE__ */ (0, L.jsx)(ide, { ...e }) : null] });
+ }), !n && e.relatedLimit > 0 ? /* @__PURE__ */ (0, L.jsx)(ade, { ...e }) : null] });
}
-function Wue({ item: e, gate: t, helpers: n, actions: r }) {
+function Gue({ item: e, gate: t, helpers: n, actions: r }) {
let [i, o] = (0, I.useState)(t ? "" : "auto"), s = (0, I.useRef)(null), c = (0, I.useRef)(e);
(0, I.useLayoutEffect)(() => {
let e = s.current;
@@ -44524,8 +44524,8 @@ function Wue({ item: e, gate: t, helpers: n, actions: r }) {
className: "vwrap",
"data-item-media": t || "video",
children: [
- /* @__PURE__ */ (0, L.jsx)(nR, { onClose: r.close }),
- t === "offline" ? /* @__PURE__ */ (0, L.jsx)(Gue, {
+ /* @__PURE__ */ (0, L.jsx)(tR, { onClose: r.close }),
+ t === "offline" ? /* @__PURE__ */ (0, L.jsx)(Kue, {
item: e,
badge: l,
helpers: n,
@@ -44535,7 +44535,7 @@ function Wue({ item: e, gate: t, helpers: n, actions: r }) {
role: "status",
"data-item-gate": "online",
children: [
- /* @__PURE__ */ (0, L.jsx)(tR, { html: l }),
+ /* @__PURE__ */ (0, L.jsx)(eR, { html: l }),
/* @__PURE__ */ (0, L.jsx)("b", { children: "在线资产" }),
/* @__PURE__ */ (0, L.jsx)("span", { children: "这条没有对应的关注条目,媒体地址无从解析。" }),
/* @__PURE__ */ (0, L.jsx)("button", {
@@ -44550,7 +44550,7 @@ function Wue({ item: e, gate: t, helpers: n, actions: r }) {
id: "gate",
"data-item-gate": "metered",
onClick: () => o("clicked"),
- children: [/* @__PURE__ */ (0, L.jsx)(tR, { html: l }), /* @__PURE__ */ (0, L.jsxs)("span", { children: ["点此开始拉流 · ", a(e.size || 0)] })]
+ children: [/* @__PURE__ */ (0, L.jsx)(eR, { html: l }), /* @__PURE__ */ (0, L.jsxs)("span", { children: ["点此开始拉流 · ", a(e.size || 0)] })]
}) : null,
/* @__PURE__ */ (0, L.jsx)("video", {
ref: s,
@@ -44564,7 +44564,7 @@ function Wue({ item: e, gate: t, helpers: n, actions: r }) {
]
});
}
-function Gue({ item: e, badge: t, helpers: n, actions: r }) {
+function Kue({ item: e, badge: t, helpers: n, actions: r }) {
let [i, a] = (0, I.useState)(!1), [o, s] = (0, I.useState)(!1), c = async () => {
a(!0);
let t = await r.checkSource(e.location || "").catch(() => !1);
@@ -44575,7 +44575,7 @@ function Gue({ item: e, badge: t, helpers: n, actions: r }) {
role: "status",
"data-item-gate": "offline",
children: [
- /* @__PURE__ */ (0, L.jsx)(tR, { html: t }),
+ /* @__PURE__ */ (0, L.jsx)(eR, { html: t }),
/* @__PURE__ */ (0, L.jsx)("b", { children: "脱盘模式" }),
/* @__PURE__ */ (0, L.jsx)("span", { children: n.offlineReason(e.location || "") }),
/* @__PURE__ */ (0, L.jsx)("button", {
@@ -44589,8 +44589,8 @@ function Gue({ item: e, badge: t, helpers: n, actions: r }) {
]
});
}
-function Kue({ queue: e, itemId: t, helpers: n, actions: r }) {
- let a = kue(e), o = (0, I.useRef)(null), c = Jue(e, t, r), l = (0, I.useRef)(c);
+function que({ queue: e, itemId: t, helpers: n, actions: r }) {
+ let a = Aue(e), o = (0, I.useRef)(null), c = Yue(e, t, r), l = (0, I.useRef)(c);
l.current = c;
let u = (0, I.useCallback)((t) => {
o.current = t, t && (n.wireDrag(t), e.kind === "playlist" && n.wireDragReorder(t, {
@@ -44598,7 +44598,7 @@ function Kue({ queue: e, itemId: t, helpers: n, actions: r }) {
attribute: "data-queue-row",
onMove: (e, t, n) => l.current.move(+e, +t, n)
}));
- }, [n, e.kind]), d = que(e, r), f = e.kind === "mix" ? /* @__PURE__ */ (0, L.jsx)("button", {
+ }, [n, e.kind]), d = Jue(e, r), f = e.kind === "mix" ? /* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
"data-save-mix": "",
title: "保存为播放列表",
@@ -44617,7 +44617,7 @@ function Kue({ queue: e, itemId: t, helpers: n, actions: r }) {
seedId: e.seedId,
playlistId: e.playlistId
};
- return /* @__PURE__ */ (0, L.jsx)(uI, {
+ return /* @__PURE__ */ (0, L.jsx)(lI, {
kind: e.kind,
title: a.title,
summary: a.summary,
@@ -44626,33 +44626,33 @@ function Kue({ queue: e, itemId: t, helpers: n, actions: r }) {
listRef: u,
children: e.items.map((a) => {
let o = e.kind === "editions" && a.edition_label ? /* @__PURE__ */ (0, L.jsx)("i", {
- className: `javedition ${Due[a.edition_label] || "censored"}`,
+ className: `javedition ${Oue[a.edition_label] || "censored"}`,
"data-queue-edition": "",
children: a.edition_label
}) : null;
- return /* @__PURE__ */ (0, L.jsxs)(dI, {
+ return /* @__PURE__ */ (0, L.jsxs)(uI, {
current: a.id === t,
"data-queue-item": a.id,
row: { "data-queue-row": a.id },
onClick: () => r.openQueueItem(p, a.id),
- pic: /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(tR, { html: n.queueThumbHtml(a) }), /* @__PURE__ */ (0, L.jsx)("i", {
+ pic: /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(eR, { html: n.queueThumbHtml(a) }), /* @__PURE__ */ (0, L.jsx)("i", {
className: "dur mono",
children: i(a.duration)
})] }),
- lead: /* @__PURE__ */ (0, L.jsx)(tR, { html: n.queueAvatarHtml(a) }),
+ lead: /* @__PURE__ */ (0, L.jsx)(eR, { html: n.queueAvatarHtml(a) }),
after: e.kind === "playlist" ? /* @__PURE__ */ (0, L.jsxs)("span", {
"data-queue-edit": "",
children: [/* @__PURE__ */ (0, L.jsx)("i", {
"data-queue-grip": "",
"aria-hidden": "true",
- children: /* @__PURE__ */ (0, L.jsx)(eR, { name: "grip-vertical" })
+ children: /* @__PURE__ */ (0, L.jsx)($L, { name: "grip-vertical" })
}), /* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
"data-queue-remove": a.id,
title: "移出播放列表",
"aria-label": "移出播放列表",
onClick: () => c.remove(a.id),
- children: /* @__PURE__ */ (0, L.jsx)(eR, { name: "x" })
+ children: /* @__PURE__ */ (0, L.jsx)($L, { name: "x" })
})]
}) : null,
children: [/* @__PURE__ */ (0, L.jsxs)("span", {
@@ -44663,14 +44663,14 @@ function Kue({ queue: e, itemId: t, helpers: n, actions: r }) {
})]
}), /* @__PURE__ */ (0, L.jsx)("span", {
"data-truncate-end": "",
- children: e.kind === "parts" ? ZL(a.part_label) : n.mixLabel(a)
+ children: e.kind === "parts" ? XL(a.part_label) : n.mixLabel(a)
})]
}, a.id);
})
});
}
-function que(e, t) {
- let n = It({ mutationFn: (t) => q(PL, {
+function Jue(e, t) {
+ let n = It({ mutationFn: (t) => q(NL, {
action: "create",
name: t,
asset_ids: e.items.map((e) => e.id),
@@ -44683,11 +44683,11 @@ function que(e, t) {
save: (e) => n.mutateAsync(e)
});
}
-function Jue(e, t, n) {
- let r = NL({
+function Yue(e, t, n) {
+ let r = ML({
kind: "playlist",
playlistId: e.playlistId
- }), i = (e) => (X.setQueryData(r, HL(e)), e), a = (t) => q(PL, {
+ }), i = (e) => (X.setQueryData(r, VL(e)), e), a = (t) => q(NL, {
id: e.playlistId,
...t
}).then((e) => e.playlist), o = It({
@@ -44703,8 +44703,8 @@ function Jue(e, t, n) {
return {
move: async (t, r, c) => {
if (e.kind !== "playlist") return;
- let l = jue(s, t, r, c);
- if (Mue(l, s)) return;
+ let l = Mue(s, t, r, c);
+ if (Nue(l, s)) return;
let u = s;
await o.mutateAsync(l), n.toast("已调整播放顺序", { undo: async () => {
i(await a({
@@ -44750,7 +44750,7 @@ function Jue(e, t, n) {
}
};
}
-function Yue({ item: e, queue: t, write: n, helpers: r, actions: i }) {
+function Xue({ item: e, queue: t, write: n, helpers: r, actions: i }) {
let o = e.location === "online", s = n.busyAttrs, [c, l] = (0, I.useState)(!1);
return /* @__PURE__ */ (0, L.jsx)("div", {
className: "side",
@@ -44758,7 +44758,7 @@ function Yue({ item: e, queue: t, write: n, helpers: r, actions: i }) {
children: /* @__PURE__ */ (0, L.jsxs)("div", {
className: "sidecontent",
children: [
- /* @__PURE__ */ (0, L.jsx)(Xue, {
+ /* @__PURE__ */ (0, L.jsx)(Zue, {
item: e,
queue: t,
helpers: r,
@@ -44770,7 +44770,7 @@ function Yue({ item: e, queue: t, write: n, helpers: r, actions: i }) {
"aria-live": "polite",
children: n.sourceState
}),
- /* @__PURE__ */ (0, L.jsx)(Que, {
+ /* @__PURE__ */ (0, L.jsx)($ue, {
item: e,
write: n
}),
@@ -44780,7 +44780,7 @@ function Yue({ item: e, queue: t, write: n, helpers: r, actions: i }) {
children: [
/* @__PURE__ */ (0, L.jsxs)("span", {
"data-spec-item": "",
- children: [/* @__PURE__ */ (0, L.jsx)(eR, { name: "monitor" }), /* @__PURE__ */ (0, L.jsxs)("span", { children: [
+ children: [/* @__PURE__ */ (0, L.jsx)($L, { name: "monitor" }), /* @__PURE__ */ (0, L.jsxs)("span", { children: [
e.width || "?",
"×",
e.height || "?"
@@ -44788,11 +44788,11 @@ function Yue({ item: e, queue: t, write: n, helpers: r, actions: i }) {
}),
/* @__PURE__ */ (0, L.jsxs)("span", {
"data-spec-item": "",
- children: [/* @__PURE__ */ (0, L.jsx)(eR, { name: "hard-drive" }), /* @__PURE__ */ (0, L.jsx)("span", { children: a(e.size || 0) })]
+ children: [/* @__PURE__ */ (0, L.jsx)($L, { name: "hard-drive" }), /* @__PURE__ */ (0, L.jsx)("span", { children: a(e.size || 0) })]
}),
e.release_date ? /* @__PURE__ */ (0, L.jsxs)("span", {
"data-spec-item": "",
- children: [/* @__PURE__ */ (0, L.jsx)(eR, { name: "calendar" }), /* @__PURE__ */ (0, L.jsx)("span", { children: e.release_date })]
+ children: [/* @__PURE__ */ (0, L.jsx)($L, { name: "calendar" }), /* @__PURE__ */ (0, L.jsx)("span", { children: e.release_date })]
}) : null,
e.region_label ? /* @__PURE__ */ (0, L.jsxs)("button", {
type: "button",
@@ -44800,22 +44800,22 @@ function Yue({ item: e, queue: t, write: n, helpers: r, actions: i }) {
"data-open-region": e.region || "",
title: e.region_settled ? "已判定的产地;打开同产地的作品" : "按番号或厂牌推断的产地,批量判定后不再变;打开同产地的作品",
onClick: () => i.openRegion(e.region || ""),
- children: [/* @__PURE__ */ (0, L.jsx)(eR, { name: "globe" }), /* @__PURE__ */ (0, L.jsxs)("span", { children: [e.region_label, e.region_settled ? "" : "(推断)"] })]
+ children: [/* @__PURE__ */ (0, L.jsx)($L, { name: "globe" }), /* @__PURE__ */ (0, L.jsxs)("span", { children: [e.region_label, e.region_settled ? "" : "(推断)"] })]
}) : null
]
}),
- /* @__PURE__ */ (0, L.jsx)($ue, {
+ /* @__PURE__ */ (0, L.jsx)(ede, {
item: e,
helpers: r,
actions: i
}),
- /* @__PURE__ */ (0, L.jsx)(ede, {
+ /* @__PURE__ */ (0, L.jsx)(tde, {
item: e,
write: n,
helpers: r,
actions: i
}),
- /* @__PURE__ */ (0, L.jsx)(nde, { item: e }),
+ /* @__PURE__ */ (0, L.jsx)(rde, { item: e }),
/* @__PURE__ */ (0, L.jsxs)("div", {
className: "fb",
"data-item-feedback": "",
@@ -44829,7 +44829,7 @@ function Yue({ item: e, queue: t, write: n, helpers: r, actions: i }) {
"aria-pressed": !!e.liked,
...s("like"),
onClick: () => n.preference({ liked: !e.liked }),
- children: /* @__PURE__ */ (0, L.jsx)(eR, { name: "thumbs-up" })
+ children: /* @__PURE__ */ (0, L.jsx)($L, { name: "thumbs-up" })
}),
/* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
@@ -44841,7 +44841,7 @@ function Yue({ item: e, queue: t, write: n, helpers: r, actions: i }) {
"aria-controls": "preferencePanel",
"data-has-reason": String(!!e.like_reason),
onClick: () => l((e) => !e),
- children: /* @__PURE__ */ (0, L.jsx)(eR, { name: "notebook-pen" })
+ children: /* @__PURE__ */ (0, L.jsx)($L, { name: "notebook-pen" })
}),
/* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
@@ -44852,7 +44852,7 @@ function Yue({ item: e, queue: t, write: n, helpers: r, actions: i }) {
"aria-pressed": e.feedback === "dislike",
...s("dislike"),
onClick: () => n.feedback("dislike"),
- children: /* @__PURE__ */ (0, L.jsx)(eR, { name: "thumbs-down" })
+ children: /* @__PURE__ */ (0, L.jsx)($L, { name: "thumbs-down" })
}),
/* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
@@ -44863,7 +44863,7 @@ function Yue({ item: e, queue: t, write: n, helpers: r, actions: i }) {
"aria-pressed": e.feedback === "seen",
...s("seen"),
onClick: () => n.feedback("seen"),
- children: /* @__PURE__ */ (0, L.jsx)(eR, { name: "eye" })
+ children: /* @__PURE__ */ (0, L.jsx)($L, { name: "eye" })
}),
/* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
@@ -44874,7 +44874,7 @@ function Yue({ item: e, queue: t, write: n, helpers: r, actions: i }) {
"aria-pressed": !!e.watch_later,
...s("later"),
onClick: n.later,
- children: /* @__PURE__ */ (0, L.jsx)(eR, { name: e.watch_later ? "check" : "bookmark-plus" })
+ children: /* @__PURE__ */ (0, L.jsx)($L, { name: e.watch_later ? "check" : "bookmark-plus" })
}),
/* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
@@ -44883,7 +44883,7 @@ function Yue({ item: e, queue: t, write: n, helpers: r, actions: i }) {
"aria-label": "加入播放列表",
title: "加入播放列表",
onClick: () => i.addToPlaylist(e),
- children: /* @__PURE__ */ (0, L.jsx)(eR, { name: "playlist" })
+ children: /* @__PURE__ */ (0, L.jsx)($L, { name: "playlist" })
}),
/* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
@@ -44894,7 +44894,7 @@ function Yue({ item: e, queue: t, write: n, helpers: r, actions: i }) {
"aria-pressed": !!e.better_version,
...s("quality"),
onClick: n.quality,
- children: /* @__PURE__ */ (0, L.jsx)(eR, { name: "sparkles" })
+ children: /* @__PURE__ */ (0, L.jsx)($L, { name: "sparkles" })
}),
/* @__PURE__ */ (0, L.jsx)("button", {
type: "button",
@@ -44905,11 +44905,11 @@ function Yue({ item: e, queue: t, write: n, helpers: r, actions: i }) {
"aria-pressed": e.disposal === "trash",
...s("dispose"),
onClick: () => n.feedback("dispose"),
- children: /* @__PURE__ */ (0, L.jsx)(eR, { name: "trash" })
+ children: /* @__PURE__ */ (0, L.jsx)($L, { name: "trash" })
})
]
}),
- /* @__PURE__ */ (0, L.jsx)(rde, {
+ /* @__PURE__ */ (0, L.jsx)(ide, {
item: e,
open: c,
write: n
@@ -44920,7 +44920,7 @@ function Yue({ item: e, queue: t, write: n, helpers: r, actions: i }) {
...s("o"),
onClick: () => n.feedback("o"),
children: [
- /* @__PURE__ */ (0, L.jsx)(eR, { name: "sperm" }),
+ /* @__PURE__ */ (0, L.jsx)($L, { name: "sperm" }),
/* @__PURE__ */ (0, L.jsx)("span", { children: "记一次高潮" }),
/* @__PURE__ */ (0, L.jsx)("b", {
className: "mono",
@@ -44933,7 +44933,7 @@ function Yue({ item: e, queue: t, write: n, helpers: r, actions: i }) {
})
});
}
-function Xue({ item: e, queue: t, helpers: n, actions: r, onStatus: i }) {
+function Zue({ item: e, queue: t, helpers: n, actions: r, onStatus: i }) {
let a = (0, I.useRef)(null), [o, s] = (0, I.useState)(!1), [c, l] = (0, I.useState)(!1);
(0, I.useLayoutEffect)(() => {
let e = a.current;
@@ -44943,7 +44943,7 @@ function Xue({ item: e, queue: t, helpers: n, actions: r, onStatus: i }) {
}, n = new ResizeObserver(t);
return n.observe(e), t(), () => n.disconnect();
}, []);
- let u = () => s((e) => !e), d = n.badgeHtml(e.location || "", e.cost || "", "srcbig") + n.titleHtml(e) + Aue(e, t);
+ let u = () => s((e) => !e), d = n.badgeHtml(e.location || "", e.cost || "", "srcbig") + n.titleHtml(e) + jue(e, t);
return /* @__PURE__ */ (0, L.jsx)("div", {
"data-item-title": "",
children: /* @__PURE__ */ (0, L.jsxs)("div", {
@@ -44970,18 +44970,18 @@ function Xue({ item: e, queue: t, helpers: n, actions: r, onStatus: i }) {
"aria-label": o ? "收起标题" : "展开标题",
title: o ? "收起标题" : "展开完整标题",
onClick: u,
- children: /* @__PURE__ */ (0, L.jsx)(eR, { name: o ? "chevron-up" : "chevron-down" })
+ children: /* @__PURE__ */ (0, L.jsx)($L, { name: o ? "chevron-up" : "chevron-down" })
}),
- e.has_cover && e.code ? /* @__PURE__ */ (0, L.jsx)(Bue, {
+ e.has_cover && e.code ? /* @__PURE__ */ (0, L.jsx)(Vue, {
code: e.code,
coverUrl: `/cover?code=${encodeURIComponent(e.code)}`,
box: e.poster_box || null,
onSaved: () => void X.invalidateQueries({
- queryKey: ML(e.id),
+ queryKey: jL(e.id),
exact: !0
})
}) : null,
- e.location === "online" ? null : /* @__PURE__ */ (0, L.jsx)(Zue, {
+ e.location === "online" ? null : /* @__PURE__ */ (0, L.jsx)(Que, {
id: e.id,
actions: r,
onStatus: i
@@ -44991,7 +44991,7 @@ function Xue({ item: e, queue: t, helpers: n, actions: r, onStatus: i }) {
})
});
}
-function Zue({ id: e, actions: t, onStatus: n }) {
+function Que({ id: e, actions: t, onStatus: n }) {
let [r, i] = (0, I.useState)(""), a = async () => {
r || (i("reveal"), n(""), n(await t.reveal(e)), i(""));
}, o = async () => {
@@ -45021,17 +45021,17 @@ function Zue({ id: e, actions: t, onStatus: n }) {
"aria-disabled": !0
} : {},
onClick: () => void o(),
- children: /* @__PURE__ */ (0, L.jsx)(eR, { name: "folder-sync" })
+ children: /* @__PURE__ */ (0, L.jsx)($L, { name: "folder-sync" })
})] });
}
-function Que({ item: e, write: t }) {
- let n = GL(e.rating);
+function $ue({ item: e, write: t }) {
+ let n = WL(e.rating);
return /* @__PURE__ */ (0, L.jsxs)("div", {
id: "detailRating",
role: "group",
"data-item-rating": "",
"aria-label": "评分",
- "data-value": WL(e.rating),
+ "data-value": UL(e.rating),
children: [/* @__PURE__ */ (0, L.jsx)("div", {
"data-rating-stars": "",
children: [
@@ -45048,18 +45048,18 @@ function Que({ item: e, write: t }) {
"aria-label": e === n ? `取消评分(当前 ${e} 星)` : `评为 ${e} 星`,
...t.busyAttrs(`rate:${e}`),
onClick: () => t.rate(e),
- children: /* @__PURE__ */ (0, L.jsx)(eR, { name: "star" })
+ children: /* @__PURE__ */ (0, L.jsx)($L, { name: "star" })
}, e))
}), /* @__PURE__ */ (0, L.jsx)("span", {
"data-rating-value": "",
"aria-live": "polite",
- children: Sue(e.rating)
+ children: Cue(e.rating)
})]
});
}
-function $ue({ item: e, helpers: t, actions: n }) {
- let r = (0, I.useMemo)(() => xue(e), [e]), [i, a] = (0, I.useState)(!1), o = Math.max(0, r.cast.length - 8), s = (e, r, a) => {
- let o = e === "performer" && a >= 8 && !i, s = e === "performer" ? /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)("span", { children: r.name.slice(0, 1) }), /* @__PURE__ */ (0, L.jsx)(tR, { html: t.faceHtml(r) })] }) : e === "studio" ? /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)("span", { children: r.name.slice(0, 2) }), r.has_logo ? /* @__PURE__ */ (0, L.jsx)("img", {
+function ede({ item: e, helpers: t, actions: n }) {
+ let r = (0, I.useMemo)(() => Sue(e), [e]), [i, a] = (0, I.useState)(!1), o = Math.max(0, r.cast.length - 8), s = (e, r, a) => {
+ let o = e === "performer" && a >= 8 && !i, s = e === "performer" ? /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)("span", { children: r.name.slice(0, 1) }), /* @__PURE__ */ (0, L.jsx)(eR, { html: t.faceHtml(r) })] }) : e === "studio" ? /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)("span", { children: r.name.slice(0, 2) }), r.has_logo ? /* @__PURE__ */ (0, L.jsx)("img", {
src: `/logo?studio=${encodeURIComponent(r.name)}&variant=icon`,
alt: "",
loading: "lazy",
@@ -45113,7 +45113,7 @@ function $ue({ item: e, helpers: t, actions: n }) {
onClick: n.openUnowned,
children: [/* @__PURE__ */ (0, L.jsx)("span", {
"data-id-face": "",
- children: /* @__PURE__ */ (0, L.jsx)(eR, { name: "user-round" })
+ children: /* @__PURE__ */ (0, L.jsx)($L, { name: "user-round" })
}), /* @__PURE__ */ (0, L.jsx)("span", {
"data-id-name": "",
children: "未归属"
@@ -45156,19 +45156,19 @@ function $ue({ item: e, helpers: t, actions: n }) {
"data-entity-name": e.name,
title: e.name,
onClick: () => n.openEntity("series", e.name),
- children: [/* @__PURE__ */ (0, L.jsx)(eR, { name: "tags" }), /* @__PURE__ */ (0, L.jsx)("span", { children: e.name })]
+ children: [/* @__PURE__ */ (0, L.jsx)($L, { name: "tags" }), /* @__PURE__ */ (0, L.jsx)("span", { children: e.name })]
}, e.name) : /* @__PURE__ */ (0, L.jsxs)("span", {
"data-series-link": "",
title: e.name,
- children: [/* @__PURE__ */ (0, L.jsx)(eR, { name: "tags" }), /* @__PURE__ */ (0, L.jsx)("span", { children: e.name })]
+ children: [/* @__PURE__ */ (0, L.jsx)($L, { name: "tags" }), /* @__PURE__ */ (0, L.jsx)("span", { children: e.name })]
}, e.name))
})]
}) : null
]
});
}
-function ede({ item: e, write: t, helpers: n, actions: r }) {
- let i = wue(e, n);
+function tde({ item: e, write: t, helpers: n, actions: r }) {
+ let i = Tue(e, n);
return /* @__PURE__ */ (0, L.jsxs)("div", {
className: "stags",
id: "detailTags",
@@ -45187,16 +45187,16 @@ function ede({ item: e, write: t, helpers: n, actions: r }) {
"aria-label": `删除标签 ${n.tagLabel(e.k)}`,
...t.busyAttrs(`tag:${e.k}`),
onClick: () => t.removeTag(e),
- children: /* @__PURE__ */ (0, L.jsx)(eR, { name: "x" })
+ children: /* @__PURE__ */ (0, L.jsx)($L, { name: "x" })
})]
- }, e.k)), /* @__PURE__ */ (0, L.jsx)(tde, {
+ }, e.k)), /* @__PURE__ */ (0, L.jsx)(nde, {
item: e,
write: t,
helpers: n
})]
});
}
-function tde({ item: e, write: t, helpers: n }) {
+function nde({ item: e, write: t, helpers: n }) {
let r = (0, I.useRef)(null), i = (0, I.useRef)(null), a = (0, I.useRef)(null), o = (0, I.useRef)(!1), [s, c] = (0, I.useState)(!1), [l, u] = (0, I.useState)(""), [d, f] = (0, I.useState)(""), [p, m] = (0, I.useState)(-1), h = (0, I.useCallback)(() => {
i.current && _(i.current), c(!1);
}, []);
@@ -45210,7 +45210,7 @@ function tde({ item: e, write: t, helpers: n }) {
clearTimeout(t), document.removeEventListener("pointerdown", e, !0);
};
}, [s, h]);
- let g = s ? Eue(d, n.tagCandidates(), XL()) : {
+ let g = s ? Due(d, n.tagCandidates(), YL()) : {
recent: [],
results: [],
create: ""
@@ -45238,12 +45238,12 @@ function tde({ item: e, write: t, helpers: n }) {
if (n.key === "Enter") {
n.preventDefault();
let r = p >= 0 ? v[p] : null;
- r ? y(r, r.n !== -1 && KL(e, r.k)) : l.trim() && (h(), t.addTag(l.trim()));
+ r ? y(r, r.n !== -1 && GL(e, r.k)) : l.trim() && (h(), t.addTag(l.trim()));
}
}
}, x = -1, S = (t) => {
x += 1;
- let r = x, i = KL(e, t.k);
+ let r = x, i = GL(e, t.k);
return /* @__PURE__ */ (0, L.jsxs)("button", {
type: "button",
"data-pick": t.k,
@@ -45251,7 +45251,7 @@ function tde({ item: e, write: t, helpers: n }) {
"aria-pressed": i,
onClick: () => y(t, i),
children: [
- /* @__PURE__ */ (0, L.jsx)(eR, { name: i ? "check" : "tags" }),
+ /* @__PURE__ */ (0, L.jsx)($L, { name: i ? "check" : "tags" }),
/* @__PURE__ */ (0, L.jsx)("span", {
"data-pick-name": "",
children: n.tagLabel(t.k)
@@ -45274,7 +45274,7 @@ function tde({ item: e, write: t, helpers: n }) {
onClick: () => {
i.current && (E(i.current), c(!0), u(""), f(""), m(-1), requestAnimationFrame(() => a.current?.focus()));
},
- children: /* @__PURE__ */ (0, L.jsx)(eR, { name: "plus" })
+ children: /* @__PURE__ */ (0, L.jsx)($L, { name: "plus" })
}), /* @__PURE__ */ (0, L.jsxs)("div", {
ref: i,
id: "tagPicker",
@@ -45284,7 +45284,7 @@ function tde({ item: e, write: t, helpers: n }) {
hidden: !0,
children: [/* @__PURE__ */ (0, L.jsxs)("label", {
"data-tag-search": "",
- children: [/* @__PURE__ */ (0, L.jsx)(eR, { name: "search" }), /* @__PURE__ */ (0, L.jsx)("input", {
+ children: [/* @__PURE__ */ (0, L.jsx)($L, { name: "search" }), /* @__PURE__ */ (0, L.jsx)("input", {
ref: a,
id: "tagPickSearch",
maxLength: 80,
@@ -45325,7 +45325,7 @@ function tde({ item: e, write: t, helpers: n }) {
onClick: () => {
h(), t.addTag(g.create);
},
- children: [/* @__PURE__ */ (0, L.jsx)(eR, { name: "plus" }), /* @__PURE__ */ (0, L.jsxs)("span", {
+ children: [/* @__PURE__ */ (0, L.jsx)($L, { name: "plus" }), /* @__PURE__ */ (0, L.jsxs)("span", {
"data-pick-name": "",
children: [
"新建“",
@@ -45340,8 +45340,8 @@ function tde({ item: e, write: t, helpers: n }) {
})]
})] });
}
-function nde({ item: e }) {
- let t = Pue(e);
+function rde({ item: e }) {
+ let t = Fue(e);
return /* @__PURE__ */ (0, L.jsxs)("div", {
"data-item-trace": "",
children: [/* @__PURE__ */ (0, L.jsxs)("div", {
@@ -45375,7 +45375,7 @@ function nde({ item: e }) {
})]
});
}
-function rde({ item: e, open: t, write: n }) {
+function ide({ item: e, open: t, write: n }) {
let [r, i] = (0, I.useState)(e.like_reason || ""), a = (0, I.useRef)(null);
(0, I.useEffect)(() => {
t && a.current?.focus();
@@ -45414,11 +45414,11 @@ function rde({ item: e, open: t, write: n }) {
})]
});
}
-function ide(e) {
+function ade(e) {
let { item: t, relatedLimit: n, helpers: r, grid: i } = e, a = Ft({
- queryKey: hue(t.id, n),
+ queryKey: gue(t.id, n),
queryFn: async ({ signal: e }) => {
- let r = await gw(_ue(t.id, n), e);
+ let r = await hw(vue(t.id, n), e);
return i.cache(r.items || []), r.items || [];
}
}), [o] = (0, I.useState)(() => r.relatedSkeletonHtml()), s = (0, I.useCallback)((e) => {
@@ -45433,7 +45433,7 @@ function ide(e) {
ref: s,
id: "nrow",
"data-related-row": "",
- children: a.data ? /* @__PURE__ */ (0, L.jsx)(bT, {
+ children: a.data ? /* @__PURE__ */ (0, L.jsx)(vT, {
mode: "items",
variant: "next",
items: a.data,
@@ -45447,12 +45447,12 @@ function ide(e) {
cache: i.cache,
wireDrag: r.wireDrag,
skeletonHtml: () => ""
- }) : a.isError ? null : /* @__PURE__ */ (0, L.jsx)(tR, { html: o })
+ }) : a.isError ? null : /* @__PURE__ */ (0, L.jsx)(eR, { html: o })
})]
});
}
-function ade(e, t, n, r) {
- let i = e.id, a = ML(i), [o, s] = (0, I.useState)(() => /* @__PURE__ */ new Set()), [c, l] = (0, I.useState)(""), [u, d] = (0, I.useState)(""), f = (e, t) => s((n) => {
+function ode(e, t, n, r) {
+ let i = e.id, a = jL(i), [o, s] = (0, I.useState)(() => /* @__PURE__ */ new Set()), [c, l] = (0, I.useState)(""), [u, d] = (0, I.useState)(""), f = (e, t) => s((n) => {
let r = new Set(n);
return t ? r.add(e) : r.delete(e), r;
}), p = () => X.getQueryData(a) || e, m = (e) => {
@@ -45468,7 +45468,7 @@ function ade(e, t, n, r) {
rating: t.rating,
o_count: t.o_count
};
- return Ore(i, r), n([t]), t;
+ return kre(i, r), n([t]), t;
}, h = (e, t) => q(e, {
id: i,
...t
@@ -45483,7 +45483,7 @@ function ade(e, t, n, r) {
run: n
}));
}, v = async (e, t) => {
- let n = await h(vue, t === void 0 ? { kind: e } : {
+ let n = await h(yue, t === void 0 ? { kind: e } : {
kind: e,
value: t
});
@@ -45503,21 +45503,21 @@ function ade(e, t, n, r) {
"aria-disabled": !0
} : {},
rate: (e) => _(`rate:${e}`, "评分", async () => {
- let n = p().rating || 0, r = Cue(n, e);
- await v("rate", r), t.toast(r ? `已评 ${GL(r)} 星` : "已取消评分", { undo: async () => {
+ let n = p().rating || 0, r = wue(n, e);
+ await v("rate", r), t.toast(r ? `已评 ${WL(r)} 星` : "已取消评分", { undo: async () => {
await v("rate", n);
} });
}),
feedback: (e) => _(e, "操作", async () => {
let n = { feedback: p().feedback || null }, r = await v(e);
- t.toast(Fue(e, r), { undo: async () => {
+ t.toast(Iue(e, r), { undo: async () => {
e === "o" ? await v("o-undo") : e === "dispose" ? await v("dispose") : (r.feedback && await v(r.feedback), n.feedback && await v(n.feedback)), await t.trashChanged(p().disposal || null, !0);
} }), e === "dispose" && await t.trashChanged(r.disposal || null, !1);
}),
later: () => _("later", "更新稍后看", async () => {
- let e = await h(IL, {});
+ let e = await h(FL, {});
m({ watch_later: e.watch_later }), t.toast(e.watch_later ? "已加入稍后看" : "已移出稍后看", { undo: async () => {
- m({ watch_later: (await h(IL, {})).watch_later });
+ m({ watch_later: (await h(FL, {})).watch_later });
} });
}),
quality: () => _("quality", "更新版本需求", async () => {
@@ -45527,9 +45527,9 @@ function ade(e, t, n, r) {
}, n = (e) => m({
better_version: e.better_version,
better_version_reason: e.better_version_reason || ""
- }), r = await h(LL, { wanted: !e.wanted });
+ }), r = await h(IL, { wanted: !e.wanted });
n(r), t.toast(r.better_version ? "已标记寻找更好版本" : "已取消寻找更好版本", { undo: async () => {
- n(await h(LL, e));
+ n(await h(IL, e));
} });
}),
preference: ({ liked: e, reason: n }) => {
@@ -45543,7 +45543,7 @@ function ade(e, t, n, r) {
});
d("保存中…");
try {
- o(await h(RL, {
+ o(await h(LL, {
liked: a,
reason: i
}));
@@ -45553,7 +45553,7 @@ function ade(e, t, n, r) {
d("已保存"), setTimeout(() => d((e) => e === "已保存" ? "" : e), 1400);
let s = p();
t.toast(s.liked ? "已保存喜欢偏好" : "已取消喜欢", { undo: async () => {
- o(await h(RL, r));
+ o(await h(LL, r));
} });
});
},
@@ -45562,11 +45562,11 @@ function ade(e, t, n, r) {
operation: "remove",
tag: e.k
})).ok) throw Error("标签未删除");
- m((t) => qL(t, e.k)), t.toast(`已删除标签「${r(e.k)}」`, { undo: async () => {
- await h(FL, {
+ m((t) => KL(t, e.k)), t.toast(`已删除标签「${r(e.k)}」`, { undo: async () => {
+ await h(PL, {
operation: "add",
tag: e.k
- }), m((t) => JL(t, e));
+ }), m((t) => qL(t, e));
} });
}),
addTag: (e) => {
@@ -45575,14 +45575,14 @@ function ade(e, t, n, r) {
(await h("/api/item-tag", {
operation: "add",
tag: n
- })).ok && (m((e) => JL(e, {
+ })).ok && (m((e) => qL(e, {
k: n,
cat: "general"
- })), Tue(n), t.toast(`已添加标签「${r(n)}」`, { undo: async () => {
- await h(FL, {
+ })), Eue(n), t.toast(`已添加标签「${r(n)}」`, { undo: async () => {
+ await h(PL, {
operation: "remove",
tag: n
- }), m((e) => qL(e, n));
+ }), m((e) => KL(e, n));
} }));
});
}
@@ -45590,15 +45590,15 @@ function ade(e, t, n, r) {
}
//#endregion
//#region src/react/components/board-tabs.tsx
-function ode({ value: e }) {
+function sde({ value: e }) {
return /* @__PURE__ */ (0, L.jsx)("span", {
"data-tab-count": "",
className: "ml-1.5 inline-block rounded-sm bg-text-primary/10 px-1 py-px text-caption-1-medium text-text-primary opacity-50",
children: e.toLocaleString()
});
}
-var sde = "relative z-1 flex flex-none cursor-pointer items-center whitespace-nowrap border-b-2 border-transparent px-3 py-2.5 text-body-regular text-text-secondary outline-none focus-visible:outline-2 focus-visible:-outline-offset-3 focus-visible:outline-border-focus-ring aria-selected:font-medium aria-selected:text-border-focus-ring max-board-narrow:px-2.25 max-board-narrow:text-body-2-regular";
-function rR({ tabs: e, value: t, label: n, onChange: r }) {
+var cde = "relative z-1 flex flex-none cursor-pointer items-center whitespace-nowrap border-b-2 border-transparent px-3 py-2.5 text-body-regular text-text-secondary outline-none focus-visible:outline-2 focus-visible:-outline-offset-3 focus-visible:outline-border-focus-ring aria-selected:font-medium aria-selected:text-border-focus-ring max-board-narrow:px-2.25 max-board-narrow:text-body-2-regular";
+function nR({ tabs: e, value: t, label: n, onChange: r }) {
let i = (0, I.useRef)(null), a = (0, I.useRef)(null);
return (0, I.useLayoutEffect)(() => {
let e = i.current;
@@ -45626,14 +45626,14 @@ function rR({ tabs: e, value: t, label: n, onChange: r }) {
},
className: "relative mb-5.5 flex flex-none gap-1 overflow-x-auto border-b border-border-button-default max-board-narrow:gap-0",
children: [e.map((e) => {
- let n = e.symbol ? cT(e.symbol) : null, i = e.value === t;
+ let n = e.symbol ? oT(e.symbol) : null, i = e.value === t;
return /* @__PURE__ */ (0, L.jsxs)("button", {
type: "button",
role: "tab",
"data-tab": e.value,
"aria-selected": i,
tabIndex: i ? 0 : -1,
- className: sde,
+ className: cde,
onClick: () => {
i || r(e.value);
},
@@ -45649,23 +45649,23 @@ function rR({ tabs: e, value: t, label: n, onChange: r }) {
}
//#endregion
//#region src/react/index/index-tags.tsx
-var iR = () => /* @__PURE__ */ (0, L.jsx)("span", {
+var rR = () => /* @__PURE__ */ (0, L.jsx)("span", {
"aria-hidden": !0,
"data-tag-dot": "",
className: "size-1.75 flex-none rounded-full"
});
-function cde({ tag: e, actions: t }) {
+function lde({ tag: e, actions: t }) {
let n = t.picked.has(e.k);
return /* @__PURE__ */ (0, L.jsxs)("button", {
type: "button",
"data-alpha-tag": "",
"data-k": e.k,
- "data-tag-cat": sN(t.online, e.cat),
+ "data-tag-cat": aN(t.online, e.cat),
"aria-pressed": n,
onClick: () => t.press(e.k),
className: "flex h-9 min-w-0 cursor-pointer items-center gap-2.25 rounded-lg px-2.5 text-left text-body-regular text-text-secondary outline-none hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring",
children: [
- /* @__PURE__ */ (0, L.jsx)(iR, {}),
+ /* @__PURE__ */ (0, L.jsx)(rR, {}),
/* @__PURE__ */ (0, L.jsx)("span", {
className: "min-w-0 flex-1 truncate",
children: e.label
@@ -45677,23 +45677,23 @@ function cde({ tag: e, actions: t }) {
]
});
}
-function lde({ groups: e, actions: t }) {
+function ude({ groups: e, actions: t }) {
return /* @__PURE__ */ (0, L.jsx)("div", {
"data-alphabet": "",
className: "flex flex-col gap-4",
children: e.map(([e, n], r) => /* @__PURE__ */ (0, L.jsxs)("section", {
"data-alpha-group": r,
- className: _w({
+ className: gw({
radius: "plain",
padding: "none",
className: "px-5 pt-4 pb-3"
}),
children: [/* @__PURE__ */ (0, L.jsxs)("h3", {
className: "mb-2 flex items-center text-title-2-medium text-text-primary",
- children: [e, /* @__PURE__ */ (0, L.jsx)(ode, { value: n.length })]
+ children: [e, /* @__PURE__ */ (0, L.jsx)(sde, { value: n.length })]
}), /* @__PURE__ */ (0, L.jsx)("div", {
className: "index-tag-list gap-x-4 gap-y-0.5",
- children: n.map((e) => /* @__PURE__ */ (0, L.jsx)(cde, {
+ children: n.map((e) => /* @__PURE__ */ (0, L.jsx)(lde, {
tag: e,
actions: t
}, e.k))
@@ -45701,8 +45701,8 @@ function lde({ groups: e, actions: t }) {
}, e))
});
}
-var ude = "\xA0";
-function dde({ tags: e, actions: t }) {
+var dde = "\xA0";
+function fde({ tags: e, actions: t }) {
return /* @__PURE__ */ (0, L.jsx)("div", {
"data-tag-cloud": "",
className: "flex flex-wrap gap-1.75",
@@ -45710,11 +45710,11 @@ function dde({ tags: e, actions: t }) {
type: "button",
"data-tag-chip": "",
"data-k": e.k,
- "data-tag-cat": sN(t.online, e.cat),
+ "data-tag-cat": aN(t.online, e.cat),
"aria-pressed": t.picked.has(e.k),
onClick: () => t.press(e.k),
className: "inline-flex cursor-pointer items-center rounded-lg border px-3 py-1.25 text-body-2-regular text-text-secondary outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring",
- children: [e.label + ude, /* @__PURE__ */ (0, L.jsx)("span", {
+ children: [e.label + dde, /* @__PURE__ */ (0, L.jsx)("span", {
"data-tag-n": "",
className: "text-caption-1-regular opacity-60",
children: e.n.toLocaleString()
@@ -45722,7 +45722,7 @@ function dde({ tags: e, actions: t }) {
}, e.k))
});
}
-var fde = [[
+var pde = [[
"cloud",
"标签云",
"tags"
@@ -45731,16 +45731,16 @@ var fde = [[
"字母表",
"text-aa"
]];
-function pde({ categories: e, category: t, online: n, readout: r, letters: i, view: a, onCategory: o, onJump: s, onView: c }) {
- return /* @__PURE__ */ (0, L.jsx)(SM, {
+function mde({ categories: e, category: t, online: n, readout: r, letters: i, view: a, onCategory: o, onJump: s, onView: c }) {
+ return /* @__PURE__ */ (0, L.jsx)(bM, {
label: "标签筛选",
topLabel: "标签类型",
- top: e.map(([e, r]) => /* @__PURE__ */ (0, L.jsxs)(wM, {
+ top: e.map(([e, r]) => /* @__PURE__ */ (0, L.jsxs)(SM, {
"data-tag-pill": "",
- "data-tag-cat": e === "all" ? "all" : sN(n, e),
+ "data-tag-cat": e === "all" ? "all" : aN(n, e),
pressed: t === e,
onPress: () => o(e),
- children: [/* @__PURE__ */ (0, L.jsx)(iR, {}), r]
+ children: [/* @__PURE__ */ (0, L.jsx)(rR, {}), r]
}, e)),
bottom: /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [
/* @__PURE__ */ (0, L.jsx)("span", {
@@ -45759,19 +45759,19 @@ function pde({ categories: e, category: t, online: n, readout: r, letters: i, vi
children: e
}, e))
}) : null,
- /* @__PURE__ */ (0, L.jsx)(Uk, {
+ /* @__PURE__ */ (0, L.jsx)(Vk, {
"aria-label": "标签视图",
orientation: "horizontal",
value: a,
onChange: (e) => c(e),
- className: `ml-auto ${qN}`,
- children: fde.map(([e, t, n]) => {
- let r = cT(n);
- return /* @__PURE__ */ (0, L.jsx)(Wk, {
+ className: `ml-auto ${GN}`,
+ children: pde.map(([e, t, n]) => {
+ let r = oT(n);
+ return /* @__PURE__ */ (0, L.jsx)(Hk, {
value: e,
"aria-label": t,
"data-glass-segment": "",
- className: JN,
+ className: KN,
children: /* @__PURE__ */ (0, L.jsx)("span", {
title: t,
className: "contents",
@@ -45783,13 +45783,13 @@ function pde({ categories: e, category: t, online: n, readout: r, letters: i, vi
] })
});
}
-function mde({ count: e, match: t, onMatch: n, onClear: r, onApply: i }) {
- return /* @__PURE__ */ (0, L.jsxs)(CL, {
+function hde({ count: e, match: t, onMatch: n, onClear: r, onApply: i }) {
+ return /* @__PURE__ */ (0, L.jsxs)(SL, {
visible: e > 0,
label: "所选标签操作",
count: `已选 ${e} 个标签`,
children: [
- /* @__PURE__ */ (0, L.jsx)(Oj, {
+ /* @__PURE__ */ (0, L.jsx)(Ej, {
isSelected: t === "any",
onChange: (e) => n(e ? "any" : "all"),
children: /* @__PURE__ */ (0, L.jsxs)("span", {
@@ -45821,7 +45821,7 @@ function mde({ count: e, match: t, onMatch: n, onClear: r, onApply: i }) {
}
//#endregion
//#region src/react/index/index-page.tsx
-var hde = [{
+var gde = [{
value: "studios",
label: "厂牌",
symbol: "clapperboard"
@@ -45829,7 +45829,7 @@ var hde = [{
value: "agencies",
label: "事务所",
symbol: "briefcase"
-}], aR = [{
+}], iR = [{
value: "local",
label: "本地",
symbol: "hard-drive"
@@ -45837,7 +45837,7 @@ var hde = [{
value: "online",
label: "在线",
symbol: "rss"
-}], gde = {
+}], _de = {
people: [[
"big",
"大图 · 竖幅头像",
@@ -45857,20 +45857,20 @@ var hde = [{
"layout-grid"
]]
};
-function _de({ kind: e, layout: t, onChange: n }) {
- return /* @__PURE__ */ (0, L.jsx)(UN, {
- "aria-label": `${KM[e]}索引版式`,
+function vde({ kind: e, layout: t, onChange: n }) {
+ return /* @__PURE__ */ (0, L.jsx)(VN, {
+ "aria-label": `${WM[e]}索引版式`,
orientation: "horizontal",
value: t,
onChange: (e) => n(e),
"data-index-layout": "",
- className: `flex-none max-board-narrow:order-3 ${WN}`,
- children: gde[QM(e) ? "company" : "people"].map(([e, t, n]) => {
- let r = cT(n);
- return /* @__PURE__ */ (0, L.jsx)(Wk, {
+ className: `flex-none max-board-narrow:order-3 ${HN}`,
+ children: _de[XM(e) ? "company" : "people"].map(([e, t, n]) => {
+ let r = oT(n);
+ return /* @__PURE__ */ (0, L.jsx)(Hk, {
value: e,
"aria-label": t,
- className: KN,
+ className: WN,
children: /* @__PURE__ */ (0, L.jsx)("span", {
title: t,
className: "contents",
@@ -45880,8 +45880,8 @@ function _de({ kind: e, layout: t, onChange: n }) {
})
});
}
-var vde = cT("search");
-function yde({ label: e, value: t, onQuery: n }) {
+var yde = oT("search");
+function bde({ label: e, value: t, onQuery: n }) {
let [r, i] = (0, I.useState)(t), a = (0, I.useRef)(!1), o = (0, I.useRef)(void 0);
(0, I.useEffect)(() => () => clearTimeout(o.current), []);
let s = (e) => {
@@ -45896,15 +45896,15 @@ function yde({ label: e, value: t, onQuery: n }) {
onCompositionEnd: (e) => {
a.current = !1, s(e.target.value);
},
- children: /* @__PURE__ */ (0, L.jsx)(Kj, {
+ children: /* @__PURE__ */ (0, L.jsx)(Wj, {
"aria-label": e,
value: r,
onChange: (e) => {
i(e), a.current || s(e);
},
- children: /* @__PURE__ */ (0, L.jsx)(Jj, {
+ children: /* @__PURE__ */ (0, L.jsx)(Kj, {
type: "search",
- leadingIcon: vde,
+ leadingIcon: yde,
spellCheck: !1,
autoComplete: "off",
onKeyDown: (e) => {
@@ -45914,14 +45914,14 @@ function yde({ label: e, value: t, onQuery: n }) {
})
});
}
-function bde(e) {
- let [t, n] = (0, I.useState)(() => $M({
+function xde(e) {
+ let [t, n] = (0, I.useState)(() => ZM({
kind: e.kind,
q: e.q,
scope: e.scope,
view: e.view,
category: e.category
- })), [r, i] = (0, I.useState)(e.layout), [a, o] = (0, I.useState)(/* @__PURE__ */ new Set()), [s, c] = (0, I.useState)("any"), l = (0, I.useRef)(null), { kind: u, q: f, scope: p, view: m, category: h } = t, g = KM[u], _ = u === "tags" && p === "online", v = u === "performers" && p === "online";
+ })), [r, i] = (0, I.useState)(e.layout), [a, o] = (0, I.useState)(/* @__PURE__ */ new Set()), [s, c] = (0, I.useState)("any"), l = (0, I.useRef)(null), { kind: u, q: f, scope: p, view: m, category: h } = t, g = WM[u], _ = u === "tags" && p === "online", v = u === "performers" && p === "online";
(0, I.useEffect)(() => {
e.selectMode || o(/* @__PURE__ */ new Set());
}, [e.selectMode]);
@@ -45931,7 +45931,7 @@ function bde(e) {
...r
};
x(Object.keys(r).every((e) => e === "q")), n(a), e.route(a, { replace: i });
- }, C = rN(eN(t)), w = Lt({
+ }, C = tN(QM(t)), w = Lt({
queryKey: C.queryKey,
queryFn: ({ pageParam: e, signal: t }) => C.queryFn({
pageParam: e,
@@ -45940,21 +45940,21 @@ function bde(e) {
initialPageParam: 0,
getNextPageParam: C.getNextPageParam,
placeholderData: y ? Pe : void 0
- }), T = aN(w.data), E = !!w.hasNextPage && !w.isPlaceholderData, D = oN(T.length, !!w.hasNextPage);
+ }), T = rN(w.data), E = !!w.hasNextPage && !w.isPlaceholderData, D = iN(T.length, !!w.hasNextPage);
(0, I.useEffect)(() => {
l.current && e.refitImages(l.current);
}, [r]);
let O = (0, I.useMemo)(() => u === "tags" ? T.map((t) => ({
...t,
label: e.tagLabel(t.k)
- })) : [], [T, u]), k = (0, I.useMemo)(() => u === "tags" && m === "alphabet" ? uN(O, (t) => e.tagLabel(t)) : [], [
+ })) : [], [T, u]), k = (0, I.useMemo)(() => u === "tags" && m === "alphabet" ? cN(O, (t) => e.tagLabel(t)) : [], [
O,
m,
u
]), A = (t) => {
i(t), e.savePreference({ layout: t });
- }, j = u === "tags" ? /* @__PURE__ */ (0, L.jsx)(rR, {
- tabs: aR,
+ }, j = u === "tags" ? /* @__PURE__ */ (0, L.jsx)(nR, {
+ tabs: iR,
value: p,
label: "词表",
onChange: (e) => {
@@ -45964,15 +45964,15 @@ function bde(e) {
view: e === "online" ? "alphabet" : m
});
}
- }) : u === "performers" ? /* @__PURE__ */ (0, L.jsx)(rR, {
- tabs: aR,
+ }) : u === "performers" ? /* @__PURE__ */ (0, L.jsx)(nR, {
+ tabs: iR,
value: p,
label: "名册",
onChange: (t) => {
t === "online" && e.exitSelectMode(), S({ scope: t });
}
- }) : QM(u) ? /* @__PURE__ */ (0, L.jsx)(rR, {
- tabs: hde,
+ }) : XM(u) ? /* @__PURE__ */ (0, L.jsx)(nR, {
+ tabs: gde,
value: u,
label: "公司类型",
onChange: (e) => S({ kind: e })
@@ -45989,7 +45989,7 @@ function bde(e) {
let n = new Set(e);
return n.delete(t) || n.add(t), n;
});
- }, N = (_ ? YM : JM).filter(([e]) => e === "all" || Number(w.data?.pages[0]?.categories?.[e] || 0) > 0);
+ }, N = (_ ? qM : KM).filter(([e]) => e === "all" || Number(w.data?.pages[0]?.categories?.[e] || 0) > 0);
return /* @__PURE__ */ (0, L.jsxs)("div", {
ref: l,
"data-index-page": u,
@@ -46004,12 +46004,12 @@ function bde(e) {
className: "flex items-center text-display-4-medium whitespace-nowrap text-text-primary max-board-narrow:text-title-1-medium",
children: g
}),
- ZM(u) ? /* @__PURE__ */ (0, L.jsx)("span", {
+ YM(u) ? /* @__PURE__ */ (0, L.jsx)("span", {
"data-index-count": "",
className: "text-caption-1-regular leading-5 whitespace-nowrap text-text-secondary tabular-nums",
children: w.isPending ? "" : D
}) : null,
- ZM(u) ? /* @__PURE__ */ (0, L.jsx)(_de, {
+ YM(u) ? /* @__PURE__ */ (0, L.jsx)(vde, {
kind: u,
layout: r,
onChange: A
@@ -46018,7 +46018,7 @@ function bde(e) {
"aria-hidden": !0,
className: "hidden h-0 basis-full max-board-narrow:order-2 max-board-narrow:block"
}),
- /* @__PURE__ */ (0, L.jsx)(yde, {
+ /* @__PURE__ */ (0, L.jsx)(bde, {
label: `过滤${g}`,
value: f,
onQuery: (e) => {
@@ -46028,7 +46028,7 @@ function bde(e) {
]
}),
j,
- u === "tags" ? /* @__PURE__ */ (0, L.jsx)(pde, {
+ u === "tags" ? /* @__PURE__ */ (0, L.jsx)(mde, {
categories: N,
category: h,
online: _,
@@ -46053,8 +46053,8 @@ function bde(e) {
mode: m
}) }
});
- if (w.isError) return /* @__PURE__ */ (0, L.jsx)(vw, {
- icon: cT("search"),
+ if (w.isError) return /* @__PURE__ */ (0, L.jsx)(_w, {
+ icon: oT("search"),
title: `没能读取${g}`,
actions: /* @__PURE__ */ (0, L.jsx)(G, {
variant: "secondary",
@@ -46063,18 +46063,18 @@ function bde(e) {
}),
children: d(w.error)
});
- if (!T.length) return /* @__PURE__ */ (0, L.jsx)(Sde, {
+ if (!T.length) return /* @__PURE__ */ (0, L.jsx)(Cde, {
kind: u,
filtered: !!f || u === "tags" && h !== "all",
online: _ || v,
configurable: e.configurable
});
- if (v) return /* @__PURE__ */ (0, L.jsx)(hN, {
+ if (v) return /* @__PURE__ */ (0, L.jsx)(pN, {
items: T,
layout: r,
props: e
});
- if (ZM(u)) return /* @__PURE__ */ (0, L.jsx)(mN, {
+ if (YM(u)) return /* @__PURE__ */ (0, L.jsx)(fN, {
kind: u,
items: T,
layout: r,
@@ -46085,10 +46085,10 @@ function bde(e) {
picked: a,
press: M
};
- return m === "alphabet" ? /* @__PURE__ */ (0, L.jsx)(lde, {
+ return m === "alphabet" ? /* @__PURE__ */ (0, L.jsx)(ude, {
groups: k,
actions: t
- }) : /* @__PURE__ */ (0, L.jsx)(dde, {
+ }) : /* @__PURE__ */ (0, L.jsx)(fde, {
tags: O,
actions: t
});
@@ -46103,13 +46103,13 @@ function bde(e) {
disabled: w.isFetchingNextPage,
"aria-busy": w.isFetchingNextPage || void 0,
onClick: () => void w.fetchNextPage(),
- children: w.isFetchingNextPage ? /* @__PURE__ */ (0, L.jsx)(yw, {
+ children: w.isFetchingNextPage ? /* @__PURE__ */ (0, L.jsx)(vw, {
inline: !0,
label: "继续载入中…"
}) : "载入更多"
})
}) : null,
- u === "tags" && !_ && e.selectMode ? /* @__PURE__ */ (0, L.jsx)(mde, {
+ u === "tags" && !_ && e.selectMode ? /* @__PURE__ */ (0, L.jsx)(hde, {
count: a.size,
match: s,
onMatch: c,
@@ -46122,31 +46122,31 @@ function bde(e) {
]
});
}
-var xde = {
+var Sde = {
tags: "标签",
performers: "艺人",
creators: "创作者",
studios: "厂牌",
agencies: "事务所"
};
-function Sde({ kind: e, filtered: t, online: n, configurable: r }) {
- if (t) return /* @__PURE__ */ (0, L.jsx)(vw, {
- icon: cT("search"),
+function Cde({ kind: e, filtered: t, online: n, configurable: r }) {
+ if (t) return /* @__PURE__ */ (0, L.jsx)(_w, {
+ icon: oT("search"),
title: "没有符合条件的内容",
- actions: /* @__PURE__ */ (0, L.jsx)(pw, {
+ actions: /* @__PURE__ */ (0, L.jsx)(fw, {
variant: "primary",
href: "/?loc=&thumb=0",
children: "查看全部内容"
}),
children: "清除筛选或搜索条件后查看全部内容。"
});
- let i = n && e === "performers" ? "创作者" : xde[e], a = /* @__PURE__ */ (0, L.jsx)(pw, {
+ let i = n && e === "performers" ? "创作者" : Sde[e], a = /* @__PURE__ */ (0, L.jsx)(fw, {
variant: !r || n ? "primary" : "secondary",
href: "/follow-manage?tab=add",
children: "添加关注"
});
- return /* @__PURE__ */ (0, L.jsx)(vw, {
- icon: cT(e === "tags" ? "tags" : "user-round"),
+ return /* @__PURE__ */ (0, L.jsx)(_w, {
+ icon: oT(e === "tags" ? "tags" : "user-round"),
title: `还没有${i}`,
actions: n ? a : /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [r ? /* @__PURE__ */ (0, L.jsx)(G, {
variant: "primary",
@@ -46156,15 +46156,15 @@ function Sde({ kind: e, filtered: t, online: n, configurable: r }) {
children: n ? `添加关注来源并获取内容后,这里会显示来源上的${i}。` : "添加内容并补充资料后,这里会显示对应信息。"
});
}
-var oR = {
+var aR = {
video: ["视频", "play"],
image: ["图片", "pics"],
archive: ["压缩包", "file-archive"],
audio: ["音频", "file-audio"],
url: ["网址快捷方式", "globe"],
other: ["其它文件", "hard-drive"]
-}, Cde = (e) => oR[e.junk_kind || "other"] || oR.other;
-function wde(e) {
+}, wde = (e) => aR[e.junk_kind || "other"] || aR.other;
+function Tde(e) {
return e === "dismissed" ? {
operation: "reconsider-junk",
label: "重新判断",
@@ -46175,21 +46175,21 @@ function wde(e) {
glyph: "check"
};
}
-var Tde = (e, t) => Number((t ? e.counts?.[t] : e.all_total) || 0), Ede = (e, t) => [
+var Ede = (e, t) => Number((t ? e.counts?.[t] : e.all_total) || 0), Dde = (e, t) => [
"junk-queue",
e.view,
e.kind,
t
];
-function Dde({ kind: e, view: t }) {
+function Ode({ kind: e, view: t }) {
let n = new URLSearchParams({
limit: "200",
status: t
});
return e && n.set("kind", e), n.toString();
}
-async function Ode(e, t) {
- let n = await gw(`/api/ads?${Dde(e)}`, t);
+async function kde(e, t) {
+ let n = await hw(`/api/ads?${Ode(e)}`, t);
return {
...n,
items: n.items || []
@@ -46197,19 +46197,19 @@ async function Ode(e, t) {
}
//#endregion
//#region src/react/junk-queue/junk-card.tsx
-function sR({ name: e }) {
+function oR({ name: e }) {
return /* @__PURE__ */ (0, L.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, L.jsx)("use", { href: `#i-${e}` })
});
}
-var cR = (e, t) => e || t.shiftKey || t.ctrlKey || t.metaKey;
-function kde({ item: e, view: t, selected: n, selectMode: i, helpers: o, actions: s }) {
- let c = (0, I.useRef)(null), [l, u] = (0, I.useState)(""), [d, f] = (0, I.useState)(""), p = e.junk_kind || "other", [m, h] = Cde(e), g = String(e.name || ""), _ = wde(t), v = p === "video" ? `/thumb?id=${e.id}&c=4` : p === "image" ? `/photo-thumb?id=${e.id}` : "", y = p === "video" || p === "image", b = (t) => {
- t.target.closest("[data-junk-actions]") || cR(i, t) && (t.preventDefault(), s.toggleSelection(e.id, t.shiftKey));
+var sR = (e, t) => e || t.shiftKey || t.ctrlKey || t.metaKey;
+function Ade({ item: e, view: t, selected: n, selectMode: i, helpers: o, actions: s }) {
+ let c = (0, I.useRef)(null), [l, u] = (0, I.useState)(""), [d, f] = (0, I.useState)(""), p = e.junk_kind || "other", [m, h] = wde(e), g = String(e.name || ""), _ = Tde(t), v = p === "video" ? `/thumb?id=${e.id}&c=4` : p === "image" ? `/photo-thumb?id=${e.id}` : "", y = p === "video" || p === "image", b = (t) => {
+ t.target.closest("[data-junk-actions]") || sR(i, t) && (t.preventDefault(), s.toggleSelection(e.id, t.shiftKey));
}, x = (t) => {
- if (t.stopPropagation(), cR(i, t)) {
+ if (t.stopPropagation(), sR(i, t)) {
t.preventDefault(), s.toggleSelection(e.id, t.shiftKey);
return;
}
@@ -46251,7 +46251,7 @@ function kde({ item: e, view: t, selected: n, selectMode: i, helpers: o, actions
children: [
/* @__PURE__ */ (0, L.jsxs)("span", {
"data-media-glyph": "",
- children: [/* @__PURE__ */ (0, L.jsx)(sR, { name: h }), /* @__PURE__ */ (0, L.jsx)("b", { children: m })]
+ children: [/* @__PURE__ */ (0, L.jsx)(oR, { name: h }), /* @__PURE__ */ (0, L.jsx)("b", { children: m })]
}),
v ? /* @__PURE__ */ (0, L.jsx)("span", {
"data-media-art": "thumb",
@@ -46263,7 +46263,7 @@ function kde({ item: e, view: t, selected: n, selectMode: i, helpers: o, actions
}),
/* @__PURE__ */ (0, L.jsx)("span", {
"data-media-check": "",
- children: /* @__PURE__ */ (0, L.jsx)(sR, { name: "check" })
+ children: /* @__PURE__ */ (0, L.jsx)(oR, { name: "check" })
})
]
}),
@@ -46300,7 +46300,7 @@ function kde({ item: e, view: t, selected: n, selectMode: i, helpers: o, actions
children: [l === "reveal" ? /* @__PURE__ */ (0, L.jsx)("span", {
"data-junk-spinner": "",
dangerouslySetInnerHTML: { __html: k("正在定位") }
- }) : /* @__PURE__ */ (0, L.jsx)(sR, { name: "folder-open" }), /* @__PURE__ */ (0, L.jsx)("span", {
+ }) : /* @__PURE__ */ (0, L.jsx)(oR, { name: "folder-open" }), /* @__PURE__ */ (0, L.jsx)("span", {
"data-junk-label": "",
children: "打开位置"
})]
@@ -46312,7 +46312,7 @@ function kde({ item: e, view: t, selected: n, selectMode: i, helpers: o, actions
"aria-label": _.label,
...w(_.operation),
onClick: C(_.operation),
- children: [/* @__PURE__ */ (0, L.jsx)(sR, { name: _.glyph }), /* @__PURE__ */ (0, L.jsx)("span", {
+ children: [/* @__PURE__ */ (0, L.jsx)(oR, { name: _.glyph }), /* @__PURE__ */ (0, L.jsx)("span", {
"data-junk-label": "",
children: _.label
})]
@@ -46324,7 +46324,7 @@ function kde({ item: e, view: t, selected: n, selectMode: i, helpers: o, actions
"aria-label": "移入回收站",
...w("dispose"),
onClick: C("dispose"),
- children: [/* @__PURE__ */ (0, L.jsx)(sR, { name: "trash" }), /* @__PURE__ */ (0, L.jsx)("span", {
+ children: [/* @__PURE__ */ (0, L.jsx)(oR, { name: "trash" }), /* @__PURE__ */ (0, L.jsx)("span", {
"data-junk-label": "",
children: "移入回收站"
})]
@@ -46339,7 +46339,7 @@ function kde({ item: e, view: t, selected: n, selectMode: i, helpers: o, actions
]
});
}
-var Ade = (0, I.memo)(kde), jde = [
+var jde = (0, I.memo)(Ade), Mde = [
[
"",
"全部",
@@ -46376,53 +46376,53 @@ var Ade = (0, I.memo)(kde), jde = [
"hard-drive"
]
];
-function lR(e = "", t = "pending") {
+function cR(e = "", t = "pending") {
let n = new URLSearchParams();
e && n.set("type", e), t === "dismissed" && n.set("view", "dismissed");
let r = n.toString();
return `/junk-files${r ? `?${r}` : ""}`;
}
-function Mde(e) {
+function Nde(e) {
return e === "dismissed" ? {
view: "pending",
label: "返回待判断",
glyph: "rotate-ccw",
- href: lR("", "pending")
+ href: cR("", "pending")
} : {
view: "dismissed",
label: "已排除",
glyph: "eye-off",
- href: lR("", "dismissed")
+ href: cR("", "dismissed")
};
}
-var Nde = (e) => e === "dismissed" ? "已排除" : "待判断";
+var Pde = (e) => e === "dismissed" ? "已排除" : "待判断";
//#endregion
//#region src/react/junk-queue/junk-count.tsx
-function uR({ name: e }) {
+function lR({ name: e }) {
return /* @__PURE__ */ (0, L.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, L.jsx)("use", { href: `#i-${e}` })
});
}
-function dR({ scope: e, count: t }) {
+function uR({ scope: e, count: t }) {
return t ? /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [" ", /* @__PURE__ */ (0, L.jsx)("span", {
"data-count-badge": `junk:${e}`,
children: t.toLocaleString()
})] }) : null;
}
-function Pde({ route: e, page: t, failed: n, onNavigate: r }) {
- let i = PA(), { kind: a, view: o } = e, s = Mde(o), c = (e) => {
+function Fde({ route: e, page: t, failed: n, onNavigate: r }) {
+ let i = MA(), { kind: a, view: o } = e, s = Nde(o), c = (e) => {
let t = e.target.closest("a");
- !t || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || (e.preventDefault(), r(t.getAttribute("href") || lR()));
+ !t || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || (e.preventDefault(), r(t.getAttribute("href") || cR()));
}, l = t ? `${Number(t.total || 0).toLocaleString()} 个` : n ? "—" : "";
return /* @__PURE__ */ (0, L.jsxs)("div", {
"data-junk-count": "",
children: [/* @__PURE__ */ (0, L.jsx)("div", {
"data-junk-summary": "",
"aria-live": "polite",
- children: /* @__PURE__ */ (0, L.jsx)(yM, {
- label: Nde(o),
+ children: /* @__PURE__ */ (0, L.jsx)(_M, {
+ label: Pde(o),
figure: l,
pending: !t && !n,
flush: !0
@@ -46435,16 +46435,16 @@ function Pde({ route: e, page: t, failed: n, onNavigate: r }) {
"aria-label": "垃圾文件分类",
onClick: c,
children: [
- jde.map(([e, n, r]) => /* @__PURE__ */ (0, L.jsxs)("a", {
- href: lR(e, o),
+ Mde.map(([e, n, r]) => /* @__PURE__ */ (0, L.jsxs)("a", {
+ href: cR(e, o),
"data-junk-kind-link": e,
"aria-current": e === a ? "page" : void 0,
children: [
- /* @__PURE__ */ (0, L.jsx)(uR, { name: r }),
+ /* @__PURE__ */ (0, L.jsx)(lR, { name: r }),
n,
- /* @__PURE__ */ (0, L.jsx)(dR, {
+ /* @__PURE__ */ (0, L.jsx)(uR, {
scope: e,
- count: t ? Tde(t, e) : 0
+ count: t ? Ede(t, e) : 0
})
]
}, e || "all")),
@@ -46457,9 +46457,9 @@ function Pde({ route: e, page: t, failed: n, onNavigate: r }) {
"data-junk-view-link": s.view,
"aria-current": o === "dismissed" ? "page" : void 0,
children: [
- /* @__PURE__ */ (0, L.jsx)(uR, { name: s.glyph }),
+ /* @__PURE__ */ (0, L.jsx)(lR, { name: s.glyph }),
s.label,
- /* @__PURE__ */ (0, L.jsx)(dR, {
+ /* @__PURE__ */ (0, L.jsx)(uR, {
scope: "dismissed",
count: Number(t?.dismissed_total || 0)
})
@@ -46472,38 +46472,38 @@ function Pde({ route: e, page: t, failed: n, onNavigate: r }) {
}
//#endregion
//#region src/react/junk-queue/junk-queue-page.tsx
-var Fde = cT("check"), Ide = (e, t) => e[1] === t.view && e[2] === t.kind;
-function Lde(e) {
+var Ide = oT("check"), Lde = (e, t) => e[1] === t.view && e[2] === t.kind;
+function Rde(e) {
let t = {
kind: e.kind,
view: e.view
}, n = (0, I.useRef)(e.cache);
n.current = e.cache;
let r = Ft({
- queryKey: Ede(t, e.revision),
+ queryKey: Dde(t, e.revision),
queryFn: async ({ signal: e }) => {
- let r = await Ode(t, e);
+ let r = await kde(t, e);
return n.current(r.items), r;
},
- placeholderData: (e, n) => n && Ide(n.queryKey, t) ? e : void 0
+ placeholderData: (e, n) => n && Lde(n.queryKey, t) ? e : void 0
});
(0, I.useEffect)(() => {
r.isFetching || e.settled?.(e.revision);
}, [r.isFetching, e.revision]);
- let i = Rde(e.countRow), a = r.isPending;
+ let i = zde(e.countRow), a = r.isPending;
(0, I.useLayoutEffect)(() => {
let t = e.countRow;
t && (a ? t.setAttribute("aria-busy", "true") : t.removeAttribute("aria-busy"));
}, [e.countRow, a]), (0, I.useLayoutEffect)(() => {
i && r.data && w(i, "junk");
}, [i, r.data]);
- let { navigate: o } = e.actions, s = i ? (0, Yh.createPortal)(/* @__PURE__ */ (0, L.jsx)(Pde, {
+ let { navigate: o } = e.actions, s = i ? (0, Yh.createPortal)(/* @__PURE__ */ (0, L.jsx)(Fde, {
route: t,
page: r.data,
failed: r.isError && !r.data,
onNavigate: o
}), i) : null;
- return /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [s, /* @__PURE__ */ (0, L.jsx)(zde, {
+ return /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [s, /* @__PURE__ */ (0, L.jsx)(Bde, {
props: e,
data: r.data,
pending: a,
@@ -46511,7 +46511,7 @@ function Lde(e) {
retry: () => void r.refetch()
}, `${t.view}:${t.kind}`)] });
}
-function Rde(e) {
+function zde(e) {
let [t, n] = (0, I.useState)(null);
return (0, I.useLayoutEffect)(() => {
if (!e) return;
@@ -46521,8 +46521,8 @@ function Rde(e) {
};
}, [e]), t;
}
-function zde({ props: e, data: t, pending: n, error: r, retry: i }) {
- let a = Hw(n, e.skeletonHtml), o = Math.max(1, e.batchSize || 60), [s, c] = (0, I.useState)(1), l = t?.items || [], u = l.slice(0, s * o), { canLoadMore: f } = e, p = (0, I.useCallback)(() => {
+function Bde({ props: e, data: t, pending: n, error: r, retry: i }) {
+ let a = Vw(n, e.skeletonHtml), o = Math.max(1, e.batchSize || 60), [s, c] = (0, I.useState)(1), l = t?.items || [], u = l.slice(0, s * o), { canLoadMore: f } = e, p = (0, I.useCallback)(() => {
f?.() !== !1 && c((e) => e + 1);
}, [f]);
return /* @__PURE__ */ (0, L.jsxs)("div", {
@@ -46530,14 +46530,14 @@ function zde({ props: e, data: t, pending: n, error: r, retry: i }) {
"data-grid-reveal": a.fading ? "" : void 0,
children: [a.layer, (() => {
if (n) return null;
- if (!t) return /* @__PURE__ */ (0, L.jsx)(Uw, {
+ if (!t) return /* @__PURE__ */ (0, L.jsx)(Hw, {
message: d(r),
onRetry: i
});
if (!l.length) {
let t = e.view === "dismissed";
- return /* @__PURE__ */ (0, L.jsx)(vw, {
- icon: Fde,
+ return /* @__PURE__ */ (0, L.jsx)(_w, {
+ icon: Ide,
title: t ? "没有已排除的文件" : "没有待判断的垃圾文件",
children: t ? "点“不是垃圾”的资源会保留在这里,可随时重新判断。" : "当前分类没有候选文件。"
});
@@ -46546,7 +46546,7 @@ function zde({ props: e, data: t, pending: n, error: r, retry: i }) {
"data-media-grid": "",
"data-junk-grid": "",
"data-select-mode": e.selectMode ? "" : void 0,
- children: u.map((t) => /* @__PURE__ */ (0, L.jsx)(Ade, {
+ children: u.map((t) => /* @__PURE__ */ (0, L.jsx)(jde, {
item: t,
view: e.view,
selected: e.selected.has(t.id),
@@ -46554,11 +46554,11 @@ function zde({ props: e, data: t, pending: n, error: r, retry: i }) {
helpers: e.helpers,
actions: e.actions
}, t.id))
- }), u.length < l.length ? /* @__PURE__ */ (0, L.jsx)(Bde, { onMore: p }, s) : null] });
+ }), u.length < l.length ? /* @__PURE__ */ (0, L.jsx)(Vde, { onMore: p }, s) : null] });
})()]
});
}
-function Bde({ onMore: e }) {
+function Vde({ onMore: e }) {
let t = (0, I.useRef)(null);
return (0, I.useEffect)(() => {
let n = t.current;
@@ -46576,12 +46576,12 @@ function Bde({ onMore: e }) {
}
//#endregion
//#region src/react/library-processing/library-processing-notice.tsx
-var fR = "flex min-h-10 flex-wrap items-center justify-center gap-x-4 gap-y-2 border-y px-6 py-2 max-sm:justify-start", Vde = {
- gray: `${fR} border-separator-border bg-background-secondary-default text-text-secondary`,
- warning: `${fR} border-current/35 bg-status-yellow-background text-status-yellow-text`,
- error: `${fR} border-current/35 bg-background-tertiary-error text-text-error-primary`
+var dR = "flex min-h-10 flex-wrap items-center justify-center gap-x-4 gap-y-2 border-y px-6 py-2 max-sm:justify-start", Hde = {
+ gray: `${dR} border-separator-border bg-background-secondary-default text-text-secondary`,
+ warning: `${dR} border-current/35 bg-status-yellow-background text-status-yellow-text`,
+ error: `${dR} border-current/35 bg-background-tertiary-error text-text-error-primary`
};
-function Hde({ value: e, max: t }) {
+function Ude({ value: e, max: t }) {
let n = Math.max(0, Math.min(100, e / t * 100));
return /* @__PURE__ */ (0, L.jsxs)("svg", {
role: "progressbar",
@@ -46609,16 +46609,16 @@ function Hde({ value: e, max: t }) {
})]
});
}
-function Ude(e) {
- let { job: t } = rj(e), n = t.data, r = t.isError ? n ? $T : K(t.error) : "", i = n?.status ?? "idle", a = i === "failed", o = i === "running";
+function Wde(e) {
+ let { job: t } = tj(e), n = t.data, r = t.isError ? n ? ZT : K(t.error) : "", i = n?.status ?? "idle", a = i === "failed", o = i === "running";
if (!r && !o && !a) return null;
- let s = a ? "error" : r || n?.stalled ? "warning" : "gray", c = n?.checked || 0, l = n?.total || 0, u = r || (a ? "扫描与资料采集未完成" : iE(n) + (l ? ` · ${c} / ${l}` : "")), d = s === "gray" ? fC : rC;
+ let s = a ? "error" : r || n?.stalled ? "warning" : "gray", c = n?.checked || 0, l = n?.total || 0, u = r || (a ? "扫描与资料采集未完成" : nE(n) + (l ? ` · ${c} / ${l}` : "")), d = s === "gray" ? dC : nC;
return /* @__PURE__ */ (0, L.jsxs)("aside", {
role: a ? "alert" : "status",
- className: Vde[s],
+ className: Hde[s],
children: [/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex min-w-0 items-center gap-3",
- children: [o && l ? /* @__PURE__ */ (0, L.jsx)(Hde, {
+ children: [o && l ? /* @__PURE__ */ (0, L.jsx)(Ude, {
value: c,
max: l
}) : /* @__PURE__ */ (0, L.jsx)(d, {
@@ -46628,42 +46628,42 @@ function Ude(e) {
className: "min-w-0 text-body-2-regular",
children: u
})]
- }), /* @__PURE__ */ (0, L.jsx)(TA, {
+ }), /* @__PURE__ */ (0, L.jsx)(CA, {
href: "/data-cleanup#libraryProcessing",
size: "small",
- trailingIcon: qS,
+ trailingIcon: KS,
children: r || a ? "查看并处理" : "查看进度"
})]
});
}
//#endregion
//#region src/react/playlists/playlists.ts
-var Wde = "/api/playlists", pR = "/api/playlist", mR = ["playlists"], hR = (e) => gw(Wde, e);
-async function Gde(e) {
+var Gde = "/api/playlists", fR = "/api/playlist", pR = ["playlists"], mR = (e) => hw(Gde, e);
+async function Kde(e) {
await X.fetchQuery({
- queryKey: mR,
- queryFn: () => hR(e),
+ queryKey: pR,
+ queryFn: () => mR(e),
staleTime: 0
});
}
-var gR = () => X.invalidateQueries({
- queryKey: mR,
+var hR = () => X.invalidateQueries({
+ queryKey: pR,
exact: !0
-}), Kde = (e) => e.current_asset_id || e.preview_asset_id || null, _R = (e) => `/poster?id=${e}&c=4`, qde = (e) => q(pR, {
+}), qde = (e) => e.current_asset_id || e.preview_asset_id || null, gR = (e) => `/poster?id=${e}&c=4`, Jde = (e) => q(fR, {
action: "create",
name: e,
asset_ids: []
-}), vR = (e, t) => q(pR, {
+}), _R = (e, t) => q(fR, {
action: "rename",
id: e,
name: t
-}), yR = (e) => q(pR, {
+}), vR = (e) => q(fR, {
action: "delete",
id: e
-}), Jde = (e) => gw(`${pR}?id=${e}`).catch(() => null);
-function Yde(e) {
+}), Yde = (e) => hw(`${fR}?id=${e}`).catch(() => null);
+function Xde(e) {
let t = (e.items || []).map((e) => e.id), n = e.source_seed_asset_id;
- return q(pR, {
+ return q(fR, {
action: "create",
name: e.name,
asset_ids: t,
@@ -46673,18 +46673,18 @@ function Yde(e) {
}
//#endregion
//#region src/react/playlists/playlists-page.tsx
-var Xde = cT("ellipsis"), Zde = cT("pencil"), Qde = cT("trash"), $de = cT("playlist"), bR = cw(DA, OA, "text-body-2-medium"), xR = "播放列表名称不能为空", SR = (e) => async () => {
+var Zde = oT("ellipsis"), Qde = oT("pencil"), $de = oT("trash"), efe = oT("playlist"), yR = sw(TA, EA, "text-body-2-medium"), bR = "播放列表名称不能为空", xR = (e) => async () => {
try {
await e();
} finally {
- gR();
+ hR();
}
};
-function efe({ toast: e }) {
+function tfe({ toast: e }) {
let [t, n] = (0, I.useState)(""), [r, i] = (0, I.useState)(""), a = It({
- mutationFn: (e) => qde(e),
+ mutationFn: (e) => Jde(e),
onSuccess: (t) => {
- n(""), i(""), gR(), e("已新建播放列表", { undo: SR(() => yR(t.playlist.id)) });
+ n(""), i(""), hR(), e("已新建播放列表", { undo: xR(() => vR(t.playlist.id)) });
},
onError: (e) => i(K(e) || "新建失败")
});
@@ -46694,7 +46694,7 @@ function efe({ toast: e }) {
onSubmit: (e) => {
if (e.preventDefault(), !a.isPending) {
if (!t.trim()) {
- i(xR);
+ i(bR);
return;
}
a.mutate(t);
@@ -46703,7 +46703,7 @@ function efe({ toast: e }) {
className: "flex flex-wrap items-end gap-2",
children: [/* @__PURE__ */ (0, L.jsx)("div", {
className: "min-w-50 max-w-80 flex-1 basis-50 max-board-narrow:min-w-0 max-board-narrow:max-w-none",
- children: /* @__PURE__ */ (0, L.jsx)(Yj, {
+ children: /* @__PURE__ */ (0, L.jsx)(qj, {
label: "新播放列表",
placeholder: "输入名称",
maxLength: 80,
@@ -46722,7 +46722,7 @@ function efe({ toast: e }) {
})]
});
}
-function tfe({ target: e, close: t, toast: n }) {
+function nfe({ target: e, close: t, toast: n }) {
let [r, i] = (0, I.useState)(""), [a, o] = (0, I.useState)(""), s = (0, I.useRef)(null);
(0, I.useEffect)(() => {
if (!e) return;
@@ -46733,13 +46733,13 @@ function tfe({ target: e, close: t, toast: n }) {
return () => cancelAnimationFrame(t);
}, [e]);
let c = It({
- mutationFn: ({ row: e, value: t }) => vR(e.id, t),
+ mutationFn: ({ row: e, value: t }) => _R(e.id, t),
onSuccess: (e, { row: r }) => {
- t(), gR(), n("已重命名播放列表", { undo: SR(() => vR(r.id, r.name)) });
+ t(), hR(), n("已重命名播放列表", { undo: xR(() => _R(r.id, r.name)) });
},
onError: (e) => o(K(e))
});
- return /* @__PURE__ */ (0, L.jsx)(CP, {
+ return /* @__PURE__ */ (0, L.jsx)(xP, {
isOpen: !!e,
onOpenChange: (e) => {
e || t();
@@ -46751,7 +46751,7 @@ function tfe({ target: e, close: t, toast: n }) {
if (t.preventDefault(), !e || c.isPending) return;
let n = r.trim();
if (!n) {
- o(xR);
+ o(bR);
return;
}
c.mutate({
@@ -46762,11 +46762,11 @@ function tfe({ target: e, close: t, toast: n }) {
className: "flex min-h-0 flex-col",
children: [/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col gap-4 p-5",
- children: [/* @__PURE__ */ (0, L.jsx)(oO, {
+ children: [/* @__PURE__ */ (0, L.jsx)(iO, {
slot: "title",
className: "text-title-2-semibold text-text-primary",
children: "编辑名称"
- }), /* @__PURE__ */ (0, L.jsx)(Yj, {
+ }), /* @__PURE__ */ (0, L.jsx)(qj, {
ref: s,
label: "名称",
placeholder: "输入名称",
@@ -46794,7 +46794,7 @@ function tfe({ target: e, close: t, toast: n }) {
})
});
}
-function nfe({ name: e, onRename: t, onDelete: n }) {
+function rfe({ name: e, onRename: t, onDelete: n }) {
let r = (0, I.useRef)(null), [i, a] = (0, I.useState)(!1), o = (e) => {
a(!1), e();
};
@@ -46808,33 +46808,33 @@ function nfe({ name: e, onRename: t, onDelete: n }) {
"data-playlist-menu": "",
onClick: () => a(!0),
className: "flex size-7.5 flex-none cursor-pointer items-center justify-center rounded-2lg text-foreground-icon-secondary outline-none transition-colors hover:bg-background-primary-hover hover:text-foreground-icon-primary aria-expanded:bg-background-primary-hover aria-expanded:text-foreground-icon-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring",
- children: /* @__PURE__ */ (0, L.jsx)(Xde, {
+ children: /* @__PURE__ */ (0, L.jsx)(Zde, {
"aria-hidden": !0,
className: "size-4.5"
})
- }), /* @__PURE__ */ (0, L.jsx)(Tk, {
+ }), /* @__PURE__ */ (0, L.jsx)(Ck, {
triggerRef: r,
isOpen: i,
onOpenChange: a,
placement: "bottom end",
offset: 4,
- className: EA,
- children: /* @__PURE__ */ (0, L.jsxs)(CA, {
+ className: wA,
+ children: /* @__PURE__ */ (0, L.jsxs)(xA, {
"aria-label": `播放列表操作:${e}`,
className: "flex w-37.5 flex-col gap-0.5 outline-none",
children: [/* @__PURE__ */ (0, L.jsxs)("button", {
type: "button",
- className: bR,
+ className: yR,
onClick: () => o(t),
- children: [/* @__PURE__ */ (0, L.jsx)(Zde, {
+ children: [/* @__PURE__ */ (0, L.jsx)(Qde, {
"aria-hidden": !0,
className: "size-4 shrink-0"
}), "编辑名称"]
}), /* @__PURE__ */ (0, L.jsxs)("button", {
type: "button",
- className: bR,
+ className: yR,
onClick: () => o(n),
- children: [/* @__PURE__ */ (0, L.jsx)(Qde, {
+ children: [/* @__PURE__ */ (0, L.jsx)($de, {
"aria-hidden": !0,
className: "size-4 shrink-0"
}), "删除播放列表"]
@@ -46842,13 +46842,13 @@ function nfe({ name: e, onRename: t, onDelete: n }) {
})
})] });
}
-function rfe({ openPlaylist: e, openEntity: t, faceAvatar: n, canFlip: r, toast: i, revision: a }) {
+function ife({ openPlaylist: e, openEntity: t, faceAvatar: n, canFlip: r, toast: i, revision: a }) {
let o = Ft({
- queryKey: mR,
- queryFn: ({ signal: e }) => hR(e)
+ queryKey: pR,
+ queryFn: ({ signal: e }) => mR(e)
}), [s, c] = (0, I.useState)(null), l = (0, I.useRef)(a);
(0, I.useEffect)(() => {
- l.current !== a && (l.current = a, gR());
+ l.current !== a && (l.current = a, hR());
}, [a]);
let u = o.data;
if (!u) return /* @__PURE__ */ (0, L.jsx)("div", {
@@ -46866,8 +46866,8 @@ function rfe({ openPlaylist: e, openEntity: t, faceAvatar: n, canFlip: r, toast:
confirmLabel: "删除播放列表",
danger: !0,
onConfirm: async () => {
- let t = await Jde(e.id);
- await yR(e.id), gR(), i("已删除播放列表", t ? { undo: SR(() => Yde(t)) } : void 0);
+ let t = await Yde(e.id);
+ await vR(e.id), hR(), i("已删除播放列表", t ? { undo: xR(() => Xde(t)) } : void 0);
}
});
};
@@ -46882,39 +46882,39 @@ function rfe({ openPlaylist: e, openEntity: t, faceAvatar: n, canFlip: r, toast:
}), /* @__PURE__ */ (0, L.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
children: "保存 Mix,按自己的顺序继续播放。"
- })] }), /* @__PURE__ */ (0, L.jsx)(efe, { toast: i })]
+ })] }), /* @__PURE__ */ (0, L.jsx)(tfe, { toast: i })]
}),
d.length ? /* @__PURE__ */ (0, L.jsx)("div", {
"data-playlist-grid": "",
className: "card-grid-cover gap-4.5",
children: d.map((i) => {
- let a = Kde(i);
- return /* @__PURE__ */ (0, L.jsx)(vT, {
+ let a = qde(i);
+ return /* @__PURE__ */ (0, L.jsx)(gT, {
"data-playlist-card": String(i.id),
name: i.name,
caption: i.source_kind === "mix" ? "由 Mix 保存" : "手动播放列表",
count: i.item_count,
- poster: i.preview_asset_id ? _R(i.preview_asset_id) : null,
- flipImages: async () => (i.preview_ids || []).map(_R),
+ poster: i.preview_asset_id ? gR(i.preview_asset_id) : null,
+ flipImages: async () => (i.preview_ids || []).map(gR),
canFlip: r,
faces: i.faces || [],
faceAvatar: n,
onOpenEntity: t,
...a ? { onOpen: () => e(i.id, a) } : {},
openLabel: `打开播放列表 ${i.name}`,
- menu: /* @__PURE__ */ (0, L.jsx)(nfe, {
+ menu: /* @__PURE__ */ (0, L.jsx)(rfe, {
name: i.name,
onRename: () => c(i),
onDelete: () => f(i)
})
}, i.id);
})
- }) : /* @__PURE__ */ (0, L.jsx)(vw, {
- icon: $de,
+ }) : /* @__PURE__ */ (0, L.jsx)(_w, {
+ icon: efe,
title: "还没有播放列表",
children: "保存 Mix 或新建列表后,会在这里按自己的顺序继续播放。"
}),
- /* @__PURE__ */ (0, L.jsx)(tfe, {
+ /* @__PURE__ */ (0, L.jsx)(nfe, {
target: s,
close: () => c(null),
toast: i
@@ -46924,11 +46924,11 @@ function rfe({ openPlaylist: e, openEntity: t, faceAvatar: n, canFlip: r, toast:
}
//#endregion
//#region src/react/quality-goals/quality-goals-page.tsx
-function ife({ item: t, openItem: n, javTitleHtml: r, javDisplayName: o, srcBadge: s }) {
+function afe({ item: t, openItem: n, javTitleHtml: r, javDisplayName: o, srcBadge: s }) {
let c = () => n(t.id);
return /* @__PURE__ */ (0, L.jsxs)("li", {
"data-goal-id": t.id,
- className: _w({
+ className: gw({
padding: "none",
bordered: "soft",
className: "flex flex-col gap-3 p-3"
@@ -46944,7 +46944,7 @@ function ife({ item: t, openItem: n, javTitleHtml: r, javDisplayName: o, srcBadg
className: "text-caption-1-regular text-text-secondary",
children: "暂无预览"
}), /* @__PURE__ */ (0, L.jsx)("img", {
- src: CE(t),
+ src: xE(t),
alt: "",
loading: "lazy",
onError: (e) => e.currentTarget.remove(),
@@ -46992,19 +46992,19 @@ function ife({ item: t, openItem: n, javTitleHtml: r, javDisplayName: o, srcBadg
})]
});
}
-function afe(e) {
+function ofe(e) {
let t = Ft({
- queryKey: bE,
- queryFn: ({ signal: e }) => xE(e)
+ queryKey: vE,
+ queryFn: ({ signal: e }) => yE(e)
}), n = t.data;
- if (!n) return /* @__PURE__ */ (0, L.jsx)(bw, { children: /* @__PURE__ */ (0, L.jsx)(J, {
+ if (!n) return /* @__PURE__ */ (0, L.jsx)(yw, { children: /* @__PURE__ */ (0, L.jsx)(J, {
tone: "error",
title: "高清版目标读取失败",
children: t.error ? K(t.error) : "未取得高清版目标,请刷新页面重试。"
}) });
let r = n.items || [];
- return r.length ? /* @__PURE__ */ (0, L.jsxs)(bw, { children: [/* @__PURE__ */ (0, L.jsxs)("div", {
- className: _w({
+ return r.length ? /* @__PURE__ */ (0, L.jsxs)(yw, { children: [/* @__PURE__ */ (0, L.jsxs)("div", {
+ className: gw({
variant: "raised",
className: "flex flex-col gap-1 px-6 py-5 max-sm:px-4"
}),
@@ -47017,21 +47017,21 @@ function afe(e) {
})]
}), /* @__PURE__ */ (0, L.jsx)("ul", {
className: "card-grid-cover gap-5",
- children: r.map((t) => /* @__PURE__ */ (0, L.jsx)(ife, {
+ children: r.map((t) => /* @__PURE__ */ (0, L.jsx)(afe, {
item: t,
...e
}, t.id))
- })] }) : /* @__PURE__ */ (0, L.jsx)(bw, { children: /* @__PURE__ */ (0, L.jsx)(vw, {
+ })] }) : /* @__PURE__ */ (0, L.jsx)(yw, { children: /* @__PURE__ */ (0, L.jsx)(_w, {
shell: "plain",
- icon: Jte,
+ icon: Yte,
title: "没有标记中的高清版目标",
children: "现有版本都已满足条件,或还没有加入追踪。"
}) });
}
//#endregion
//#region src/react/review/bulk-toolbar.tsx
-function ofe(e) {
- let { groupOptions: t, groupBy: n, onGroupBy: r, groups: i, filter: a, onFilter: o, pageKeys: s, selected: c, onSelected: l, selectedRows: u, metadata: d, approvable: f, busy: p, feedback: m, onUnifySource: h, onRun: g } = e, _ = s.filter((e) => c.has(e)), v = _.length > 0 && _.length === s.length, y = HE(u), b = d && u.some((e) => (e.candidates?.length || 0) > 1), x = y.length ? "统一选择来源" : "所选项目无共同来源";
+function sfe(e) {
+ let { groupOptions: t, groupBy: n, onGroupBy: r, groups: i, filter: a, onFilter: o, pageKeys: s, selected: c, onSelected: l, selectedRows: u, metadata: d, approvable: f, busy: p, feedback: m, onUnifySource: h, onRun: g } = e, _ = s.filter((e) => c.has(e)), v = _.length > 0 && _.length === s.length, y = BE(u), b = d && u.some((e) => (e.candidates?.length || 0) > 1), x = y.length ? "统一选择来源" : "所选项目无共同来源";
return /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsxs)("div", {
role: "group",
"aria-label": "复核筛选",
@@ -47039,29 +47039,29 @@ function ofe(e) {
"data-glass-pane": "",
className: "sticky top-topbar z-10 flex flex-wrap items-center gap-2 p-3",
children: [
- /* @__PURE__ */ (0, L.jsx)(_j, {
+ /* @__PURE__ */ (0, L.jsx)(hj, {
"aria-label": "筛选分组方式",
size: "sm",
selectedKey: n,
onSelectionChange: (e) => {
e !== null && r(String(e));
},
- children: t.map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(vj, {
+ children: t.map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(gj, {
id: e,
children: t
}, e))
}),
- i.length > 1 ? /* @__PURE__ */ (0, L.jsxs)(_j, {
+ i.length > 1 ? /* @__PURE__ */ (0, L.jsxs)(hj, {
"aria-label": n === "field" ? "筛选字段分类" : "筛选当前分类",
size: "sm",
selectedKey: a || "*",
onSelectionChange: (e) => {
e !== null && o(String(e) === "*" ? "" : String(e));
},
- children: [/* @__PURE__ */ (0, L.jsx)(vj, {
+ children: [/* @__PURE__ */ (0, L.jsx)(gj, {
id: "*",
children: "全部分类"
- }), i.map((e) => /* @__PURE__ */ (0, L.jsx)(vj, {
+ }), i.map((e) => /* @__PURE__ */ (0, L.jsx)(gj, {
id: e.key,
children: `${e.title} · ${e.rows.length}`
}, e.key))]
@@ -47069,7 +47069,7 @@ function ofe(e) {
/* @__PURE__ */ (0, L.jsx)(G, {
variant: "secondary",
size: "small",
- leadingIcon: ZS,
+ leadingIcon: XS,
"aria-pressed": v,
disabled: p || !s.length,
onClick: () => {
@@ -47080,12 +47080,12 @@ function ofe(e) {
children: v ? "清空当前选择" : a ? "全选当前分类" : "全选本页"
})
]
- }), /* @__PURE__ */ (0, L.jsxs)(CL, {
+ }), /* @__PURE__ */ (0, L.jsxs)(SL, {
label: "复核所选项目",
visible: c.size > 0,
count: `已选 ${c.size} 项`,
children: [
- b ? /* @__PURE__ */ (0, L.jsxs)(_j, {
+ b ? /* @__PURE__ */ (0, L.jsxs)(hj, {
"aria-label": "统一选择来源",
size: "sm",
selectedKey: "",
@@ -47093,10 +47093,10 @@ function ofe(e) {
onSelectionChange: (e) => {
e !== null && e !== "" && h(String(e));
},
- children: [/* @__PURE__ */ (0, L.jsx)(vj, {
+ children: [/* @__PURE__ */ (0, L.jsx)(gj, {
id: "",
children: x
- }), y.map((e) => /* @__PURE__ */ (0, L.jsx)(vj, {
+ }), y.map((e) => /* @__PURE__ */ (0, L.jsx)(gj, {
id: e,
children: e
}, e))]
@@ -47132,7 +47132,7 @@ function ofe(e) {
}
//#endregion
//#region src/react/review/candidate-form.tsx
-var sfe = {
+var cfe = {
title: "标题",
original_title: "原标题",
runtime: "来源时长",
@@ -47142,14 +47142,14 @@ var sfe = {
cover_url: "封面",
screenshot_urls: "截图",
trailer_url: "预告片"
-}, CR = "reviewgenretags";
-function cfe({ tags: e }) {
+}, SR = "reviewgenretags";
+function lfe({ tags: e }) {
return e.length ? /* @__PURE__ */ (0, L.jsx)("datalist", {
- id: CR,
+ id: SR,
children: e.map((e) => /* @__PURE__ */ (0, L.jsx)("option", { value: e }, e))
}) : null;
}
-function wR({ candidate: e, selectable: t = !1 }) {
+function CR({ candidate: e, selectable: t = !1 }) {
let n = Object.entries(e.catalog_evidence || {}).filter(([, e]) => e && e.display_value), r = e.content_id || e.provider_id;
return /* @__PURE__ */ (0, L.jsxs)("span", {
className: "flex min-w-0 flex-1 flex-col",
@@ -47186,7 +47186,7 @@ function wR({ candidate: e, selectable: t = !1 }) {
children: [
/* @__PURE__ */ (0, L.jsx)("dt", {
className: "text-body-2-regular text-text-secondary",
- children: sfe[e] || e
+ children: cfe[e] || e
}),
/* @__PURE__ */ (0, L.jsx)("dd", {
className: "min-w-0 text-body-2-regular break-words text-text-primary",
@@ -47201,36 +47201,36 @@ function wR({ candidate: e, selectable: t = !1 }) {
}) : null]
});
}
-function lfe({ row: e, fieldName: t, value: n, onChange: r, locked: i }) {
+function ufe({ row: e, fieldName: t, value: n, onChange: r, locked: i }) {
let a = e.candidates || [];
return a.length ? a.length === 1 ? /* @__PURE__ */ (0, L.jsx)("div", {
className: "flex overflow-hidden rounded-surface border border-separator-border bg-background-secondary-default",
- children: /* @__PURE__ */ (0, L.jsx)(wR, { candidate: a[0] })
- }) : /* @__PURE__ */ (0, L.jsx)(Uk, {
+ children: /* @__PURE__ */ (0, L.jsx)(CR, { candidate: a[0] })
+ }) : /* @__PURE__ */ (0, L.jsx)(Vk, {
"aria-label": `${t || "候选"}的来源`,
value: n,
isDisabled: i,
onChange: r,
className: "flex flex-col gap-2",
- children: a.map((e) => /* @__PURE__ */ (0, L.jsx)(Wk, {
+ children: a.map((e) => /* @__PURE__ */ (0, L.jsx)(Hk, {
value: e.candidate_key,
className: "group flex cursor-pointer items-center gap-2 overflow-hidden rounded-surface border border-separator-border bg-background-secondary-default outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring data-selected:border-border-button-active data-disabled:cursor-not-allowed",
- children: /* @__PURE__ */ (0, L.jsx)(wR, {
+ children: /* @__PURE__ */ (0, L.jsx)(CR, {
candidate: e,
selectable: !0
})
}, e.candidate_key))
}) : null;
}
-function ufe({ genre: e, tags: t, locked: n, toast: r }) {
+function dfe({ genre: e, tags: t, locked: n, toast: r }) {
let [i, a] = (0, I.useState)(""), [o, s] = (0, I.useState)(""), c = It({
- mutationFn: (t) => Mre(e, t),
+ mutationFn: (t) => Pre(e, t),
onSuccess: async (t, n) => {
if (!t.ok) {
s(t.error || "服务端拒绝了这次收录");
return;
}
- r(n ? `已把「${e}」收录为标签「${n}」` : `已把「${e}」判为非内容标签`), await Pre();
+ r(n ? `已把「${e}」收录为标签「${n}」` : `已把「${e}」判为非内容标签`), await Ire();
},
onError: (e) => s(K(e))
}), l = () => {
@@ -47249,16 +47249,16 @@ function ufe({ genre: e, tags: t, locked: n, toast: r }) {
className: "text-body-medium text-text-primary",
children: e
}),
- /* @__PURE__ */ (0, L.jsx)(Kj, {
+ /* @__PURE__ */ (0, L.jsx)(Wj, {
"aria-label": `「${e}」收录成的中文标签`,
value: i,
onChange: a,
maxLength: 40,
isDisabled: n || c.isPending,
className: "min-w-40 flex-1",
- children: /* @__PURE__ */ (0, L.jsx)(Jj, {
+ children: /* @__PURE__ */ (0, L.jsx)(Kj, {
size: "small",
- list: t.length ? CR : void 0,
+ list: t.length ? SR : void 0,
autoComplete: "off",
placeholder: "中文标签",
onKeyDown: (e) => {
@@ -47290,8 +47290,8 @@ function ufe({ genre: e, tags: t, locked: n, toast: r }) {
]
});
}
-function dfe({ row: e, tags: t, locked: n, toast: r }) {
- let i = XE(e);
+function ffe({ row: e, tags: t, locked: n, toast: r }) {
+ let i = JE(e);
return i.length ? /* @__PURE__ */ (0, L.jsxs)("div", {
role: "group",
"aria-label": "未收录 genre",
@@ -47299,7 +47299,7 @@ function dfe({ row: e, tags: t, locked: n, toast: r }) {
children: [/* @__PURE__ */ (0, L.jsx)("h5", {
className: "text-body-2-medium text-text-secondary",
children: `未收录 genre · ${i.length}`
- }), i.map((e) => /* @__PURE__ */ (0, L.jsx)(ufe, {
+ }), i.map((e) => /* @__PURE__ */ (0, L.jsx)(dfe, {
genre: e,
tags: t,
locked: n,
@@ -47309,9 +47309,9 @@ function dfe({ row: e, tags: t, locked: n, toast: r }) {
}
//#endregion
//#region src/react/review/review-evidence.tsx
-var TR = (e = "") => /^https?:\/\//i.test(e) ? e : "", ffe = (e = "") => TR(e) || (e.startsWith("/") && !e.startsWith("//") ? e : "");
-function ER({ url: e }) {
- let t = ffe(e || ""), [n, r] = (0, I.useState)(!1);
+var wR = (e = "") => /^https?:\/\//i.test(e) ? e : "", pfe = (e = "") => wR(e) || (e.startsWith("/") && !e.startsWith("//") ? e : "");
+function TR({ url: e }) {
+ let t = pfe(e || ""), [n, r] = (0, I.useState)(!1);
return /* @__PURE__ */ (0, L.jsx)("div", {
className: "flex h-review-image items-center justify-center overflow-hidden rounded-surface bg-background-secondary-default",
children: t && !n ? /* @__PURE__ */ (0, L.jsx)("img", {
@@ -47326,7 +47326,7 @@ function ER({ url: e }) {
})
});
}
-function DR({ asset: e, openItem: t }) {
+function ER({ asset: e, openItem: t }) {
let n = e.name || "";
return /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex min-w-0 items-center gap-2.5 rounded-surface bg-background-secondary-default p-2",
@@ -47352,21 +47352,21 @@ function DR({ asset: e, openItem: t }) {
}), /* @__PURE__ */ (0, L.jsx)(G, {
variant: "secondary",
size: "small",
- leadingIcon: Ute,
+ leadingIcon: Wte,
onClick: () => t(e.id),
children: "打开原视频"
})]
})]
});
}
-function pfe({ kind: e, name: t, works: n, avatar: r, openEntity: i }) {
+function mfe({ kind: e, name: t, works: n, avatar: r, openEntity: i }) {
return /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex min-w-0 items-center gap-3",
children: [/* @__PURE__ */ (0, L.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 ${xL}`,
+ 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 ${bL}`,
dangerouslySetInnerHTML: { __html: r }
}), /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex min-w-0 flex-col items-start",
@@ -47382,8 +47382,8 @@ function pfe({ kind: e, name: t, works: n, avatar: r, openEntity: i }) {
})]
});
}
-function mfe({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, note: a }) {
- let o = TR(e.profile_url || ""), s = (e.preview_assets || []).slice(0, 6), c = Math.max(0, Number(e.video_count || e.videos || 0));
+function hfe({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, note: a }) {
+ let o = wR(e.profile_url || ""), s = (e.preview_assets || []).slice(0, 6), c = Math.max(0, Number(e.video_count || e.videos || 0));
return /* @__PURE__ */ (0, L.jsxs)("section", {
className: "flex flex-col gap-3",
children: [
@@ -47393,10 +47393,10 @@ function mfe({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, no
}),
/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
- children: [o ? /* @__PURE__ */ (0, L.jsx)(pw, {
+ children: [o ? /* @__PURE__ */ (0, L.jsx)(fw, {
variant: "secondary",
size: "small",
- trailingIcon: iC,
+ trailingIcon: rC,
href: o,
target: "_blank",
rel: "noopener noreferrer",
@@ -47408,7 +47408,7 @@ function mfe({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, no
children: `查看全部 ${c.toLocaleString()} 部作品`
})]
}),
- /* @__PURE__ */ (0, L.jsx)(ER, { url: e.preview_url }),
+ /* @__PURE__ */ (0, L.jsx)(TR, { url: e.preview_url }),
/* @__PURE__ */ (0, L.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
children: "通过后记录身份判断。"
@@ -47451,7 +47451,7 @@ function mfe({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, no
]
});
}
-function hfe({ assets: e, picked: t, onPicked: n, locked: r }) {
+function gfe({ assets: e, picked: t, onPicked: n, locked: r }) {
let [i, a] = (0, I.useState)(null), o = new Set(t), s = (t, s) => {
if (r) return;
let c = new Set(o);
@@ -47507,7 +47507,7 @@ function hfe({ assets: e, picked: t, onPicked: n, locked: r }) {
}),
/* @__PURE__ */ (0, L.jsx)("span", {
className: "absolute top-1 right-1",
- children: /* @__PURE__ */ (0, L.jsx)(Dj, {
+ children: /* @__PURE__ */ (0, L.jsx)(Tj, {
size: "sm",
state: {
isSelected: n,
@@ -47527,19 +47527,19 @@ function hfe({ assets: e, picked: t, onPicked: n, locked: r }) {
}
//#endregion
//#region src/react/review/review-card.tsx
-var gfe = _w({
+var _fe = gw({
variant: "outlined",
padding: "none",
className: "flex flex-col gap-4 px-5 pt-4"
-}), OR = "flex min-h-6 min-w-0 items-center", _fe = (e) => e === "western_identity" ? "h-review-card-tall" : "h-review-card";
-function vfe(e) {
- let { category: t, row: n, choice: r, onChoice: i, selected: a, onSelect: o, locked: s, busy: c, problem: l, genreTags: u, onDecide: d, handlers: f } = e, p = (0, I.useRef)(!1), m = PA(), h = PA(), g = t === "metadata_fields", _ = LE[t] || "", v = String(n.creator || "").trim(), y = !!_ && !!v, b = qE(t, n), x = KE(t, n), S = GE(t, n), C = JE(n), w = YE(n), T = WE(t, n), E = n.comparison_assets || [], D = n.preview_assets || [], O = String(n.decision || "pending") !== "pending", k = E.length > 1 ? /* @__PURE__ */ (0, L.jsx)("div", {
+}), DR = "flex min-h-6 min-w-0 items-center", vfe = (e) => e === "western_identity" ? "h-review-card-tall" : "h-review-card";
+function yfe(e) {
+ let { category: t, row: n, choice: r, onChoice: i, selected: a, onSelect: o, locked: s, busy: c, problem: l, genreTags: u, onDecide: d, handlers: f } = e, p = (0, I.useRef)(!1), m = MA(), h = MA(), g = t === "metadata_fields", _ = FE[t] || "", v = String(n.creator || "").trim(), y = !!_ && !!v, b = GE(t, n), x = WE(t, n), S = UE(t, n), C = KE(n), w = qE(n), T = HE(t, n), E = n.comparison_assets || [], D = n.preview_assets || [], O = String(n.decision || "pending") !== "pending", k = E.length > 1 ? /* @__PURE__ */ (0, L.jsx)("div", {
className: "flex flex-col gap-3",
- children: E.map((e) => /* @__PURE__ */ (0, L.jsx)(DR, {
+ children: E.map((e) => /* @__PURE__ */ (0, L.jsx)(ER, {
asset: e,
openItem: f.openItem
}, e.id))
- }) : y ? /* @__PURE__ */ (0, L.jsx)(pfe, {
+ }) : y ? /* @__PURE__ */ (0, L.jsx)(mfe, {
kind: _,
name: v,
works: Number(n.video_count || n.videos || 0),
@@ -47549,14 +47549,14 @@ function vfe(e) {
has_image: !!n.has_image,
avatar_focus: n.avatar_focus
} : null, null, _)
- }) : n.asset_id ? /* @__PURE__ */ (0, L.jsx)(DR, {
+ }) : n.asset_id ? /* @__PURE__ */ (0, L.jsx)(ER, {
openItem: f.openItem,
asset: {
id: n.asset_id,
name: n.asset_name,
preview_url: n.asset_preview_url
}
- }) : null, A = g ? /* @__PURE__ */ (0, L.jsx)(lfe, {
+ }) : null, A = g ? /* @__PURE__ */ (0, L.jsx)(ufe, {
row: n,
fieldName: x,
value: r.candidateKey,
@@ -47565,7 +47565,7 @@ function vfe(e) {
candidateKey: e
}),
locked: s
- }) : t === "creator_tags" ? D.length ? /* @__PURE__ */ (0, L.jsx)(hfe, {
+ }) : t === "creator_tags" ? D.length ? /* @__PURE__ */ (0, L.jsx)(gfe, {
assets: D,
picked: r.assets,
locked: s,
@@ -47573,21 +47573,21 @@ function vfe(e) {
...r,
assets: e
})
- }) : /* @__PURE__ */ (0, L.jsx)(vw, {
+ }) : /* @__PURE__ */ (0, L.jsx)(_w, {
shell: "inset",
- icon: uC,
+ icon: lC,
title: "这批作品尚未抽帧",
children: `${n.video_count || ""} 条作品还没有可用预览;批准后仍会按候选写入标签。`
- }) : t === "fc2_similarity" ? null : t === "western_identity" ? /* @__PURE__ */ (0, L.jsx)(mfe, {
+ }) : t === "fc2_similarity" ? null : t === "western_identity" ? /* @__PURE__ */ (0, L.jsx)(hfe, {
row: n,
openItem: f.openItem,
openEntity: f.openEntity,
onReveal: f.onReveal,
revealing: f.revealing,
note: f.revealNote
- }) : /* @__PURE__ */ (0, L.jsx)(ER, { url: n.preview_url }), j = y ? k : x ? /* @__PURE__ */ (0, L.jsxs)("h4", {
- className: `${OR} flex-wrap gap-2`,
- children: [/* @__PURE__ */ (0, L.jsx)(dw, {
+ }) : /* @__PURE__ */ (0, L.jsx)(TR, { url: n.preview_url }), j = y ? k : x ? /* @__PURE__ */ (0, L.jsxs)("h4", {
+ className: `${DR} flex-wrap gap-2`,
+ children: [/* @__PURE__ */ (0, L.jsx)(uw, {
variant: "caption",
color: "blue",
children: x
@@ -47597,7 +47597,7 @@ function vfe(e) {
children: S
})]
}) : /* @__PURE__ */ (0, L.jsx)("h4", {
- className: OR,
+ className: DR,
children: /* @__PURE__ */ (0, L.jsx)("span", {
title: b,
className: "min-w-0 truncate text-body-medium text-text-primary",
@@ -47607,20 +47607,20 @@ function vfe(e) {
return /* @__PURE__ */ (0, L.jsxs)("section", {
"aria-label": b,
"data-review-key": n.item_key,
- className: `${gfe} ${_fe(t)} overflow-hidden`,
+ className: `${_fe} ${vfe(t)} overflow-hidden`,
children: [
/* @__PURE__ */ (0, L.jsxs)("header", {
className: "flex min-w-0 shrink-0 items-start gap-2",
children: [
s ? null : /* @__PURE__ */ (0, L.jsx)("span", {
- className: `${OR} shrink-0`,
+ className: `${DR} shrink-0`,
onPointerDownCapture: (e) => {
p.current = e.shiftKey;
},
onKeyDownCapture: (e) => {
p.current = e.shiftKey;
},
- children: /* @__PURE__ */ (0, L.jsx)(Oj, {
+ children: /* @__PURE__ */ (0, L.jsx)(Ej, {
isSelected: a,
"aria-label": `选择 ${b}`,
onChange: (e) => o(p.current, e)
@@ -47630,7 +47630,7 @@ function vfe(e) {
className: "min-w-0 flex-1",
children: j
}),
- O ? /* @__PURE__ */ (0, L.jsx)(dw, {
+ O ? /* @__PURE__ */ (0, L.jsx)(uw, {
variant: "caption",
color: "neutral",
children: n.decision
@@ -47654,7 +47654,7 @@ function vfe(e) {
!y && k ? k : null,
w.length || t === "creator_tags" ? /* @__PURE__ */ (0, L.jsx)("div", {
className: "flex flex-wrap gap-1",
- children: w.length ? w.map((e) => /* @__PURE__ */ (0, L.jsx)(dw, {
+ children: w.length ? w.map((e) => /* @__PURE__ */ (0, L.jsx)(uw, {
variant: "caption",
color: "soft",
children: e
@@ -47664,7 +47664,7 @@ function vfe(e) {
})
}) : null,
A,
- /* @__PURE__ */ (0, L.jsx)(dfe, {
+ /* @__PURE__ */ (0, L.jsx)(ffe, {
row: n,
tags: u,
locked: s,
@@ -47726,8 +47726,8 @@ function vfe(e) {
}
//#endregion
//#region src/react/review/review-page.tsx
-var yfe = "flex cursor-pointer items-center justify-between gap-2";
-function bfe({ page: e, pages: t, onPage: n }) {
+var bfe = "flex cursor-pointer items-center justify-between gap-2";
+function xfe({ page: e, pages: t, onPage: n }) {
return t <= 1 ? null : /* @__PURE__ */ (0, L.jsxs)("nav", {
"aria-label": "复核分页",
className: "flex w-full flex-wrap items-center justify-between gap-2",
@@ -47741,7 +47741,7 @@ function bfe({ page: e, pages: t, onPage: n }) {
}),
/* @__PURE__ */ (0, L.jsx)("ul", {
className: "flex flex-wrap items-center gap-1",
- children: wE(e, t).map((t, r) => /* @__PURE__ */ (0, L.jsx)("li", { children: t === "…" ? /* @__PURE__ */ (0, L.jsx)("span", {
+ children: SE(e, t).map((t, r) => /* @__PURE__ */ (0, L.jsx)("li", { children: t === "…" ? /* @__PURE__ */ (0, L.jsx)("span", {
"aria-hidden": !0,
className: "px-1 text-body-2-regular text-text-tertiary",
children: "…"
@@ -47764,38 +47764,38 @@ function bfe({ page: e, pages: t, onPage: n }) {
]
});
}
-function xfe(e) {
+function Sfe(e) {
let [t, n] = (0, I.useState)(() => matchMedia("(max-width:900px)").matches);
(0, I.useEffect)(() => {
let e = matchMedia("(max-width:900px)"), t = () => n(e.matches);
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
}, []);
- let { route: r, openItem: i, openEntity: a, revealSource: o, avatarInner: s, toast: c, readOnly: l, readOnlyMessage: u, writerUrl: d } = e, [f, p] = (0, I.useState)(IE(e.category) ? e.category : FE), [m, h] = (0, I.useState)("candidates"), [g, _] = (0, I.useState)(""), [v, y] = (0, I.useState)(1), [b, x] = (0, I.useState)(/* @__PURE__ */ new Set()), [S, C] = (0, I.useState)(/* @__PURE__ */ new Map()), [w, T] = (0, I.useState)(/* @__PURE__ */ new Map()), [E, D] = (0, I.useState)(""), O = (0, I.useRef)(null), [k, A] = (0, I.useState)(0), [j, M] = (0, I.useState)(""), N = (0, I.useRef)(!0);
+ let { route: r, openItem: i, openEntity: a, revealSource: o, avatarInner: s, toast: c, readOnly: l, readOnlyMessage: u, writerUrl: d } = e, [f, p] = (0, I.useState)(PE(e.category) ? e.category : NE), [m, h] = (0, I.useState)("candidates"), [g, _] = (0, I.useState)(""), [v, y] = (0, I.useState)(1), [b, x] = (0, I.useState)(/* @__PURE__ */ new Set()), [S, C] = (0, I.useState)(/* @__PURE__ */ new Map()), [w, T] = (0, I.useState)(/* @__PURE__ */ new Map()), [E, D] = (0, I.useState)(""), O = (0, I.useRef)(null), [k, A] = (0, I.useState)(0), [j, M] = (0, I.useState)(""), N = (0, I.useRef)(!0);
(0, I.useEffect)(() => () => {
N.current = !1;
}, []);
let ee = Ft({
- queryKey: ME,
- queryFn: ({ signal: e }) => $E(e)
+ queryKey: AE,
+ queryFn: ({ signal: e }) => ZE(e)
}).data || {
sections: {},
counts: {}
- }, te = ee.sections[f] || [], P = f === "metadata_fields", ne = l, F = RE(te, P), re = F.some(([e]) => e === m) ? m : "candidates", ie = zE(te, re), ae = ie.some((e) => e.key === g) ? g : "", oe = VE(BE(te, re, ae), v), se = oe.rows.map((e) => e.item_key), ce = new Set(se), le = ie.map((e) => ({
+ }, te = ee.sections[f] || [], P = f === "metadata_fields", ne = l, F = IE(te, P), re = F.some(([e]) => e === m) ? m : "candidates", ie = LE(te, re), ae = ie.some((e) => e.key === g) ? g : "", oe = zE(RE(te, re, ae), v), se = oe.rows.map((e) => e.item_key), ce = new Set(se), le = ie.map((e) => ({
...e,
rows: e.rows.filter((e) => ce.has(e.item_key))
- })).filter((e) => e.rows.length), ue = (e) => S.get(e.item_key) || ZE(e), R = te.filter((e) => b.has(e.item_key)), z = (e) => {
+ })).filter((e) => e.rows.length), ue = (e) => S.get(e.item_key) || YE(e), R = te.filter((e) => b.has(e.item_key)), z = (e) => {
let t = new Set(e);
x((e) => new Set([...e].filter((e) => !t.has(e)))), C((e) => new Map([...e].filter(([e]) => !t.has(e)))), T((e) => new Map([...e].filter(([e]) => !t.has(e))));
}, de = (e, t) => T((n) => new Map(n).set(e, t)), fe = (e) => {
p(e), h("candidates"), _(""), y(1), x(/* @__PURE__ */ new Set()), C(/* @__PURE__ */ new Map()), T(/* @__PURE__ */ new Map()), D(""), O.current = null, r({ category: e === "metadata_fields" ? "" : e });
}, pe = It({
- mutationFn: ({ row: e, status: t }) => eD(QE(f, e, t, ue(e))),
+ mutationFn: ({ row: e, status: t }) => QE(XE(f, e, t, ue(e))),
onSuccess: (e, { row: t, status: n }) => {
if (!e.ok) {
de(t.item_key, e.error || "服务端拒绝了这次判定");
return;
}
- tD(f, [t.item_key]), z([t.item_key]), c(jre(n));
+ $E(f, [t.item_key]), z([t.item_key]), c(Nre(n));
},
onError: (e, { row: t }) => de(t.item_key, K(e))
}), me = It({
@@ -47805,7 +47805,7 @@ function xfe(e) {
if (!N.current) break;
D(`正在处理 ${i} / ${t.length}`);
try {
- let t = await eD(QE(f, a, e, ue(a)));
+ let t = await QE(XE(f, a, e, ue(a)));
if (!t.ok) throw Error(t.error || "服务端未采用该项");
n.push(a.item_key);
} catch (e) {
@@ -47819,7 +47819,7 @@ function xfe(e) {
};
},
onSuccess: ({ status: e, done: t, failures: n }) => {
- tD(f, t), z(t), n.forEach(([e, t]) => de(e, t)), D(""), c(`已${e === "approved" ? "通过" : "拒绝"} ${t.length} 项` + (n.length ? `,${n.length} 项未完成` : ""));
+ $E(f, t), z(t), n.forEach(([e, t]) => de(e, t)), D(""), c(`已${e === "approved" ? "通过" : "拒绝"} ${t.length} 项` + (n.length ? `,${n.length} 项未完成` : ""));
},
onError: (e) => {
D(K(e));
@@ -47849,7 +47849,7 @@ function xfe(e) {
A(e), M("");
let t = await o(e);
N.current && (A(0), M(t));
- }, ve = Fre(ee.mirror, u), ye = ee.genre_tags || [], be = {
+ }, ve = Lre(ee.mirror, u), ye = ee.genre_tags || [], be = {
openItem: i,
openEntity: a,
onReveal: _e,
@@ -47858,7 +47858,7 @@ function xfe(e) {
avatarInner: s,
toast: c
};
- return /* @__PURE__ */ (0, L.jsx)(bw, { children: /* @__PURE__ */ (0, L.jsxs)("div", {
+ return /* @__PURE__ */ (0, L.jsx)(yw, { children: /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col gap-5 pb-10",
children: [
ne ? /* @__PURE__ */ (0, L.jsx)(J, {
@@ -47874,13 +47874,13 @@ function xfe(e) {
}) : void 0,
children: ve
}) : null,
- /* @__PURE__ */ (0, L.jsx)(cfe, { tags: ye }),
- /* @__PURE__ */ (0, L.jsxs)(vA, {
+ /* @__PURE__ */ (0, L.jsx)(lfe, { tags: ye }),
+ /* @__PURE__ */ (0, L.jsxs)(gA, {
orientation: t ? "horizontal" : "vertical",
selectedKey: f,
onSelectionChange: (e) => {
let t = String(e);
- IE(t) && fe(t);
+ PE(t) && fe(t);
},
className: "flex flex-col gap-5 review-split:flex-row-reverse review-split:items-start review-split:gap-6",
children: [/* @__PURE__ */ (0, L.jsxs)("div", {
@@ -47889,27 +47889,27 @@ function xfe(e) {
children: [/* @__PURE__ */ (0, L.jsx)("h2", {
id: "reviewcategories",
children: "复核分类"
- }), /* @__PURE__ */ (0, L.jsx)(yA, {
+ }), /* @__PURE__ */ (0, L.jsx)(_A, {
"aria-labelledby": "reviewcategories",
"data-section-items": !0,
className: "flex review-split:flex-col review-split:items-stretch",
- children: PE.map((e) => {
+ children: ME.map((e) => {
let t = Number(ee.counts[e] || 0);
- return /* @__PURE__ */ (0, L.jsxs)(bA, {
+ return /* @__PURE__ */ (0, L.jsxs)(vA, {
id: e,
- className: yfe,
- children: [NE[e], t ? /* @__PURE__ */ (0, L.jsx)("span", {
+ className: bfe,
+ children: [jE[e], t ? /* @__PURE__ */ (0, L.jsx)("span", {
className: "tabular-nums text-caption-1-medium text-text-secondary",
children: t.toLocaleString()
}) : null]
}, e);
})
})]
- }), /* @__PURE__ */ (0, L.jsxs)(xA, {
+ }), /* @__PURE__ */ (0, L.jsxs)(yA, {
id: f,
className: "flex min-w-0 flex-1 flex-col gap-5",
children: [
- te.length && !ne ? /* @__PURE__ */ (0, L.jsx)(ofe, {
+ te.length && !ne ? /* @__PURE__ */ (0, L.jsx)(sfe, {
groupOptions: F,
groupBy: re,
onGroupBy: (e) => {
@@ -47925,7 +47925,7 @@ function xfe(e) {
onSelected: x,
selectedRows: R,
metadata: P,
- approvable: R.every((e) => WE(f, e)),
+ approvable: R.every((e) => HE(f, e)),
busy: me.isPending,
feedback: E,
onUnifySource: ge,
@@ -47950,7 +47950,7 @@ function xfe(e) {
})]
}) : null, /* @__PURE__ */ (0, L.jsx)("div", {
className: "review-grid gap-5",
- children: e.rows.map((e) => /* @__PURE__ */ (0, L.jsx)(vfe, {
+ children: e.rows.map((e) => /* @__PURE__ */ (0, L.jsx)(yfe, {
category: f,
row: e,
choice: ue(e),
@@ -47958,7 +47958,7 @@ function xfe(e) {
selected: b.has(e.item_key),
onSelect: (t, n) => x((r) => {
let i = new Set(r);
- return O.current = UE(i, se, O.current, e.item_key, t, n), i;
+ return O.current = VE(i, se, O.current, e.item_key, t, n), i;
}),
locked: ne,
busy: pe.isPending && pe.variables?.row.item_key === e.item_key,
@@ -47973,12 +47973,12 @@ function xfe(e) {
handlers: be
}, e.item_key))
})]
- }, e.key)) : /* @__PURE__ */ (0, L.jsx)(vw, {
- icon: QS,
+ }, e.key)) : /* @__PURE__ */ (0, L.jsx)(_w, {
+ icon: ZS,
title: "此分类没有待复核项目",
children: "可切换分类查看其他候选。"
}),
- /* @__PURE__ */ (0, L.jsx)(bfe, {
+ /* @__PURE__ */ (0, L.jsx)(xfe, {
page: oe.page,
pages: oe.pages,
onPage: y
@@ -47991,9 +47991,13 @@ function xfe(e) {
}
//#endregion
//#region src/react/scraping/scraping.ts
-var Sfe = "/api/scraping", Cfe = "/api/scraping/settings", wfe = "/api/scraping/check", kR = "/api/scraping/cover", Tfe = "/api/scraping/amane-bridge", Efe = "/api/scraping/amane-bridge/check", Dfe = "/api/scraping/amane-bridge/rebuild", AR = ["scraping"], jR = ["scraping", "cover"], MR = ["scraping", "amane-bridge"], NR = (e) => gw(Sfe, e), PR = (e) => gw(kR, e), FR = (e) => gw(Tfe, e);
-async function Ofe(e) {
+var Cfe = "/api/scraping", wfe = "/api/scraping/settings", Tfe = "/api/scraping/check", OR = "/api/scraping/cover", Efe = "/api/scraping/amane-bridge", Dfe = "/api/scraping/amane-bridge/check", Ofe = "/api/scraping/amane-bridge/rebuild", kR = ["scraping"], AR = ["scraping", "cover"], jR = ["scraping", "amane-bridge"], MR = (e) => hw(Cfe, e), NR = (e) => hw(OR, e), PR = (e) => hw(Efe, e);
+async function kfe(e) {
await Promise.all([
+ X.fetchQuery({
+ queryKey: kR,
+ queryFn: () => MR(e)
+ }),
X.fetchQuery({
queryKey: AR,
queryFn: () => NR(e)
@@ -48001,22 +48005,24 @@ async function Ofe(e) {
X.fetchQuery({
queryKey: jR,
queryFn: () => PR(e)
- }),
- X.fetchQuery({
- queryKey: MR,
- queryFn: () => FR(e)
})
]);
}
-function kfe(e, t) {
+function Afe(e, t) {
return `${t}${e.label === "来源页面" ? "" : " 高清图片"}:${e.ok ? "可连接" : "不能连接"}` + (e.width ? ` · ${e.width} × ${e.height}` : "") + (e.message ? `。${e.message}` : "");
}
//#endregion
//#region src/react/scraping/scraping-page.tsx
-var Afe = [["peach", "Peach 代理"], ["direct", "直接连接"]], IR = [["paste", "粘贴 Cookie"], ["file", "导入文件"]];
-function jfe({ source: e }) {
+var jfe = [["peach", "Peach 代理"], ["direct", "直接连接"]], FR = [["paste", "粘贴 Cookie"], ["file", "导入文件"]];
+function IR({ source: e }) {
+ let t = [
+ "javten",
+ "fc2ppvdb",
+ "avwikidb",
+ "github"
+ ].includes(e);
return /* @__PURE__ */ (0, L.jsx)("img", {
- src: p({ source: e }),
+ src: t ? `/vendor/site-marks/${e}.png` : p({ source: e }),
alt: "",
width: 16,
height: 16,
@@ -48026,12 +48032,12 @@ function jfe({ source: e }) {
});
}
function Mfe({ source: e, toast: t }) {
- let [n, r] = (0, I.useState)(e.network), [i, a] = (0, I.useState)(""), [o, s] = (0, I.useState)(""), [c, l] = (0, I.useState)(IR[0][0]), [u, d] = (0, I.useState)(""), [f, p] = (0, I.useState)(""), m = (0, I.useRef)(null);
+ let [n, r] = (0, I.useState)(e.network), [i, a] = (0, I.useState)(""), [o, s] = (0, I.useState)(""), [c, l] = (0, I.useState)(FR[0][0]), [u, d] = (0, I.useState)(""), [f, p] = (0, I.useState)(""), m = (0, I.useRef)(null);
function h() {
a(""), s(""), d(""), p(""), m.current && (m.current.value = "");
}
let g = It({
- mutationFn: (t) => q(Cfe, {
+ mutationFn: (t) => q(wfe, {
source: e.source,
network: n,
cookie: i,
@@ -48039,12 +48045,12 @@ function Mfe({ source: e, toast: t }) {
revoke: t
}),
onSuccess: (e, n) => {
- X.setQueryData(AR, (t) => t && {
+ X.setQueryData(kR, (t) => t && {
...t,
sources: t.sources.map((t) => t.source === e.saved.source ? e.saved : t)
}), h(), t(n ? "Cookie 已撤销" : "来源设置已保存");
}
- }), _ = It({ mutationFn: () => q(wfe, { source: e.source }) }), v = g.isPending || _.isPending, y = (e) => {
+ }), _ = It({ mutationFn: () => q(Tfe, { source: e.source }) }), v = g.isPending || _.isPending, y = (e) => {
e.preventDefault(), !v && (_.reset(), g.mutate(!1));
}, b = () => {
v || (_.reset(), g.mutate(!0));
@@ -48069,40 +48075,40 @@ function Mfe({ source: e, toast: t }) {
}
}
let C = f || (g.error ? K(g.error) : "") || (_.error ? K(_.error) : ""), w = _.data?.results ?? [], T = n === "peach" || e.accepts_cookie || e.browser || !!C || w.length > 0;
- return /* @__PURE__ */ (0, L.jsxs)(WA, {
+ return /* @__PURE__ */ (0, L.jsxs)(HA, {
title: e.label,
onSubmit: y,
aside: /* @__PURE__ */ (0, L.jsxs)("span", {
className: "flex min-w-0 items-center gap-1",
- children: [/* @__PURE__ */ (0, L.jsx)(jfe, { source: e.source }), /* @__PURE__ */ (0, L.jsx)(ZA, {
+ children: [/* @__PURE__ */ (0, L.jsx)(IR, { source: e.source }), /* @__PURE__ */ (0, L.jsx)(YA, {
href: e.login,
children: e.login
})]
}),
children: [
- /* @__PURE__ */ (0, L.jsx)(GA, { children: /* @__PURE__ */ (0, L.jsx)(UA, {
+ /* @__PURE__ */ (0, L.jsx)(UA, { children: /* @__PURE__ */ (0, L.jsx)(VA, {
label: "连接方式",
- children: /* @__PURE__ */ (0, L.jsx)(_j, {
+ children: /* @__PURE__ */ (0, L.jsx)(hj, {
"aria-label": "连接方式",
selectedKey: n,
onSelectionChange: (e) => {
e !== null && r(String(e));
},
- children: Afe.map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(vj, {
+ children: jfe.map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(gj, {
id: e,
children: t
}, e))
})
}) }),
- T ? /* @__PURE__ */ (0, L.jsxs)(KA, {
+ T ? /* @__PURE__ */ (0, L.jsxs)(WA, {
divided: !0,
children: [
n === "peach" ? /* @__PURE__ */ (0, L.jsx)("span", {
className: "self-start",
- children: /* @__PURE__ */ (0, L.jsx)(TA, {
+ children: /* @__PURE__ */ (0, L.jsx)(CA, {
href: "/configuration#peachProxy",
size: "small",
- trailingIcon: qS,
+ trailingIcon: KS,
children: "配置 Peach 代理"
})
}) : null,
@@ -48115,20 +48121,20 @@ function Mfe({ source: e, toast: t }) {
className: "text-body-2-regular text-text-secondary",
children: e.cookie_saved ? "Cookie 已保存;登录是否有效要到抓取时才知道。" : "需要登录时,任选一种方式提供 Cookie。"
}),
- /* @__PURE__ */ (0, L.jsx)(UN, {
+ /* @__PURE__ */ (0, L.jsx)(VN, {
"aria-label": "提供 Cookie 的方式(二选一)",
value: c,
onChange: (e) => {
l(e), h();
},
- className: WN,
- children: IR.map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(Wk, {
+ className: HN,
+ children: FR.map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(Hk, {
value: e,
- className: GN,
+ className: UN,
children: t
}, e))
}),
- c === "paste" ? /* @__PURE__ */ (0, L.jsx)(Yj, {
+ c === "paste" ? /* @__PURE__ */ (0, L.jsx)(qj, {
type: "password",
label: "Cookie",
autoComplete: "off",
@@ -48137,7 +48143,7 @@ function Mfe({ source: e, toast: t }) {
}) : /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col gap-2",
children: [
- /* @__PURE__ */ (0, L.jsx)(XA, { children: "Netscape Cookie 文件(.txt)" }),
+ /* @__PURE__ */ (0, L.jsx)(JA, { children: "Netscape Cookie 文件(.txt)" }),
/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-wrap items-center gap-3",
children: [/* @__PURE__ */ (0, L.jsx)(G, {
@@ -48163,14 +48169,14 @@ function Mfe({ source: e, toast: t }) {
]
})
] }) : null,
- C ? /* @__PURE__ */ (0, L.jsx)(YA, { children: C }) : null,
+ C ? /* @__PURE__ */ (0, L.jsx)(qA, { children: C }) : null,
w.map((t) => /* @__PURE__ */ (0, L.jsx)(J, {
tone: t.ok ? "success" : "error",
- children: kfe(t, e.label)
+ children: Afe(t, e.label)
}, t.label))
]
}) : null,
- /* @__PURE__ */ (0, L.jsxs)(qA, { children: [
+ /* @__PURE__ */ (0, L.jsxs)(GA, { children: [
e.accepts_cookie && e.cookie_saved ? /* @__PURE__ */ (0, L.jsx)(G, {
variant: "secondary",
onClick: b,
@@ -48193,25 +48199,25 @@ function Mfe({ source: e, toast: t }) {
});
}
function Nfe({ toast: e }) {
- let [t, n] = (0, I.useState)(""), { running: r, outcome: i, start: a } = Sj({
- queryKey: jR,
- queryFn: ({ signal: e }) => PR(e),
- start: () => q(kR, { code: t }),
+ let [t, n] = (0, I.useState)(""), { running: r, outcome: i, start: a } = bj({
+ queryKey: AR,
+ queryFn: ({ signal: e }) => NR(e),
+ start: () => q(OR, { code: t }),
onFinish: (t) => {
t.status === "complete" && e(t.result || "封面采集完成");
}
}), o = (e) => {
e.preventDefault(), !(r || a.isPending || !t.trim()) && a.mutate();
}, s = a.error ? K(a.error) : i?.status === "failed" ? i.error || "采集未取得" : "";
- return /* @__PURE__ */ (0, L.jsx)(WA, {
+ return /* @__PURE__ */ (0, L.jsx)(HA, {
title: "高清封面",
onSubmit: o,
- children: /* @__PURE__ */ (0, L.jsxs)(KA, { children: [
+ children: /* @__PURE__ */ (0, L.jsxs)(WA, { children: [
/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-wrap items-end gap-2",
children: [/* @__PURE__ */ (0, L.jsx)("div", {
className: "min-w-0 flex-1",
- children: /* @__PURE__ */ (0, L.jsx)(Yj, {
+ children: /* @__PURE__ */ (0, L.jsx)(qj, {
"aria-label": "馆藏番号",
isRequired: !0,
isDisabled: r,
@@ -48226,7 +48232,7 @@ function Nfe({ toast: e }) {
children: "抓取封面"
})]
}),
- r ? /* @__PURE__ */ (0, L.jsx)(yw, { label: "正在抓取封面" }) : null,
+ r ? /* @__PURE__ */ (0, L.jsx)(vw, { label: "正在抓取封面" }) : null,
s ? /* @__PURE__ */ (0, L.jsx)(J, {
tone: "error",
children: s
@@ -48239,10 +48245,10 @@ function Nfe({ toast: e }) {
});
}
function Pfe({ toast: e }) {
- let { query: t, running: n, outcome: r, start: i } = Sj({
- queryKey: MR,
- queryFn: ({ signal: e }) => FR(e),
- start: () => q(Dfe, {}),
+ let { query: t, running: n, outcome: r, start: i } = bj({
+ queryKey: jR,
+ queryFn: ({ signal: e }) => PR(e),
+ start: () => q(Ofe, {}),
jobOf: (e) => e.job,
withJob: (e, t) => e && {
...e,
@@ -48251,49 +48257,53 @@ function Pfe({ toast: e }) {
onFinish: (t) => {
t.status === "complete" && e(t.result || "amane 桥已重建");
}
- }), a = It({ mutationFn: () => q(Efe, {}) }), o = t.data;
- if (!o) return t.error ? /* @__PURE__ */ (0, L.jsx)(WA, {
- title: "amane 桥",
- children: /* @__PURE__ */ (0, L.jsx)(KA, { children: /* @__PURE__ */ (0, L.jsx)(J, {
+ }), a = It({ mutationFn: () => q(Dfe, {}) }), o = t.data;
+ if (!o) return t.error ? /* @__PURE__ */ (0, L.jsx)(HA, {
+ title: "amane",
+ children: /* @__PURE__ */ (0, L.jsx)(WA, { children: /* @__PURE__ */ (0, L.jsx)(J, {
tone: "error",
children: K(t.error)
}) })
}) : null;
let s = n || i.isPending || a.isPending, c = i.error ? K(i.error) : a.error ? K(a.error) : r?.status === "failed" ? r.error || "重建未完成" : "";
- return /* @__PURE__ */ (0, L.jsxs)(WA, {
- title: "amane 桥",
- aside: /* @__PURE__ */ (0, L.jsx)(ZA, {
+ return /* @__PURE__ */ (0, L.jsxs)(HA, {
+ title: "amane",
+ aside: /* @__PURE__ */ (0, L.jsxs)(YA, {
href: o.repository,
- children: o.repository
+ children: [/* @__PURE__ */ (0, L.jsx)(IR, { source: "github" }), o.repository]
}),
children: [
- /* @__PURE__ */ (0, L.jsxs)(QA, { children: [
- /* @__PURE__ */ (0, L.jsxs)($A, {
- term: "钉住的版本",
- children: [o.version ? `${o.version} · ` : "", o.revision.slice(0, 12)]
+ /* @__PURE__ */ (0, L.jsxs)(XA, { children: [
+ /* @__PURE__ */ (0, L.jsx)(ZA, {
+ term: "已安装版本",
+ children: o.installed_version || "未安装"
}),
- /* @__PURE__ */ (0, L.jsx)($A, {
+ /* @__PURE__ */ (0, L.jsx)(ZA, {
term: "上游最新版本",
children: a.data?.latest ?? "尚未检查"
}),
- /* @__PURE__ */ (0, L.jsx)($A, {
+ /* @__PURE__ */ (0, L.jsx)(ZA, {
term: "运行环境",
children: o.installed ? "已安装" : "未安装"
}),
- /* @__PURE__ */ (0, L.jsx)($A, {
- term: "开放的站",
+ /* @__PURE__ */ (0, L.jsx)(ZA, {
+ term: "内置站点",
children: o.sites.map((e) => e.label).join("、")
})
] }),
- /* @__PURE__ */ (0, L.jsxs)(KA, {
+ /* @__PURE__ */ (0, L.jsxs)(WA, {
divided: !0,
children: [
- /* @__PURE__ */ (0, L.jsxs)(JA, { children: [
- "这几站由 amane(",
+ /* @__PURE__ */ (0, L.jsxs)(KA, { children: [
+ "已安装版本:",
+ o.installed_version || "未安装",
+ "。amane(",
o.license,
- ")的解析器经独立子进程回答,运行环境按钉住的版本单独安装, 不随上游自动升级;换版本要人读过上游改动再改清单。首次安装约需下载 98 MB。"
+ ")提供这些内置站点的解析能力。 重新安装会使用 Peach 内置的 ",
+ o.version,
+ " 版本,不随上游自动升级。"
] }),
- n ? /* @__PURE__ */ (0, L.jsx)(yw, { label: "正在重建运行环境" }) : null,
+ n ? /* @__PURE__ */ (0, L.jsx)(vw, { label: "正在重建运行环境" }) : null,
c ? /* @__PURE__ */ (0, L.jsx)(J, {
tone: "error",
children: c
@@ -48304,7 +48314,7 @@ function Pfe({ toast: e }) {
}) : null
]
}),
- /* @__PURE__ */ (0, L.jsxs)(qA, { children: [/* @__PURE__ */ (0, L.jsx)(G, {
+ /* @__PURE__ */ (0, L.jsxs)(GA, { children: [/* @__PURE__ */ (0, L.jsx)(G, {
variant: "secondary",
onClick: () => {
s || a.mutate();
@@ -48323,10 +48333,10 @@ function Pfe({ toast: e }) {
}
function Ffe({ toast: e }) {
let t = Ft({
- queryKey: AR,
- queryFn: ({ signal: e }) => NR(e)
+ queryKey: kR,
+ queryFn: ({ signal: e }) => MR(e)
}), n = t.data;
- return n ? /* @__PURE__ */ (0, L.jsxs)(bw, { children: [
+ return n ? /* @__PURE__ */ (0, L.jsxs)(yw, { children: [
/* @__PURE__ */ (0, L.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
children: "高清图片可能要经代理才能下载,先检查连接。"
@@ -48337,7 +48347,7 @@ function Ffe({ toast: e }) {
toast: e
}, t.source)),
/* @__PURE__ */ (0, L.jsx)(Pfe, { toast: e })
- ] }) : /* @__PURE__ */ (0, L.jsx)(bw, { children: /* @__PURE__ */ (0, L.jsx)(J, {
+ ] }) : /* @__PURE__ */ (0, L.jsx)(yw, { children: /* @__PURE__ */ (0, L.jsx)(J, {
tone: "error",
title: "采集来源读取失败",
children: t.error ? K(t.error) : "读取采集来源失败"
@@ -48345,7 +48355,7 @@ function Ffe({ toast: e }) {
}
//#endregion
//#region src/configuration-endpoints.ts
-var LR = "/api/configuration", Ife = "/api/pick-folder", RR = ["configuration"], zR = (e) => gw(LR, e);
+var LR = "/api/configuration", Ife = "/api/pick-folder", RR = ["configuration"], zR = (e) => hw(LR, e);
async function BR(e) {
await X.fetchQuery({
queryKey: RR,
@@ -48358,11 +48368,11 @@ var Lfe = "JavDB 或 MISSAV 无法访问时,可填写能访问的镜像域名
//#endregion
//#region src/react/settings/entry-links-settings.tsx
function zfe({ initial: e, receipt: t }) {
- let [n, r] = (0, I.useState)(e.sites), i = Cw(), a = (e, t) => r((n) => n.map((n) => n.key === e ? {
+ let [n, r] = (0, I.useState)(e.sites), i = Sw(), a = (e, t) => r((n) => n.map((n) => n.key === e ? {
...n,
host: t
} : n));
- return /* @__PURE__ */ (0, L.jsxs)(WA, {
+ return /* @__PURE__ */ (0, L.jsxs)(HA, {
title: "外部入口",
onSubmit: (e) => {
e.preventDefault();
@@ -48371,9 +48381,9 @@ function zfe({ initial: e, receipt: t }) {
r(e.sites), t("已保存配置");
});
},
- children: [/* @__PURE__ */ (0, L.jsxs)(KA, { children: [
- /* @__PURE__ */ (0, L.jsx)(JA, { children: Lfe }),
- n.map((e) => /* @__PURE__ */ (0, L.jsx)(Yj, {
+ children: [/* @__PURE__ */ (0, L.jsxs)(WA, { children: [
+ /* @__PURE__ */ (0, L.jsx)(KA, { children: Lfe }),
+ n.map((e) => /* @__PURE__ */ (0, L.jsx)(qj, {
id: `entry-link-${e.key}`,
label: `${e.label} 地址`,
autoComplete: "off",
@@ -48384,8 +48394,8 @@ function zfe({ initial: e, receipt: t }) {
validationBehavior: "aria",
hint: Rfe
}, e.key)),
- i.error ? /* @__PURE__ */ (0, L.jsx)(YA, { children: i.error }) : null
- ] }), /* @__PURE__ */ (0, L.jsx)(qA, { children: /* @__PURE__ */ (0, L.jsx)(G, {
+ i.error ? /* @__PURE__ */ (0, L.jsx)(qA, { children: i.error }) : null
+ ] }), /* @__PURE__ */ (0, L.jsx)(GA, { children: /* @__PURE__ */ (0, L.jsx)(G, {
type: "submit",
...Y(i.busy === "save"),
children: "保存配置"
@@ -48407,8 +48417,8 @@ function Bfe({ data: e, receipt: t }) {
});
}
function Vfe({ startup: e, receipt: t }) {
- let [n, r] = (0, I.useState)(e.enabled), [i, a] = (0, I.useState)(e.silent), [o, s] = (0, I.useState)(e.desktop), c = Cw(), l = e.available && !e.desktop_message;
- return /* @__PURE__ */ (0, L.jsxs)(WA, {
+ let [n, r] = (0, I.useState)(e.enabled), [i, a] = (0, I.useState)(e.silent), [o, s] = (0, I.useState)(e.desktop), c = Sw(), l = e.available && !e.desktop_message;
+ return /* @__PURE__ */ (0, L.jsxs)(HA, {
title: "开机自启",
onSubmit: (r) => {
r.preventDefault(), e.available && c.run("save", (e) => q("/api/configuration/startup", {
@@ -48418,30 +48428,30 @@ function Vfe({ startup: e, receipt: t }) {
}, "POST", e), () => t("已保存配置"));
},
children: [
- /* @__PURE__ */ (0, L.jsxs)(GA, { children: [
- /* @__PURE__ */ (0, L.jsx)(UA, {
+ /* @__PURE__ */ (0, L.jsxs)(UA, { children: [
+ /* @__PURE__ */ (0, L.jsx)(VA, {
label: "开机后启动 Peach",
- children: /* @__PURE__ */ (0, L.jsx)(bL, {
+ children: /* @__PURE__ */ (0, L.jsx)(yL, {
"aria-label": "开机后启动 Peach",
isSelected: n,
isDisabled: !e.available,
onChange: r
})
}),
- /* @__PURE__ */ (0, L.jsx)(UA, {
+ /* @__PURE__ */ (0, L.jsx)(VA, {
label: "静默启动",
description: "开机后只显示托盘图标,不打开网页;「开机后启动 Peach」打开时生效。",
- children: /* @__PURE__ */ (0, L.jsx)(bL, {
+ children: /* @__PURE__ */ (0, L.jsx)(yL, {
"aria-label": "静默启动",
isSelected: i,
isDisabled: !e.available || !n,
onChange: a
})
}),
- /* @__PURE__ */ (0, L.jsx)(UA, {
+ /* @__PURE__ */ (0, L.jsx)(VA, {
label: "在桌面创建快捷方式",
description: e.desktop_message || "双击图标打开 Peach 网页;卸载时一并移除。",
- children: /* @__PURE__ */ (0, L.jsx)(bL, {
+ children: /* @__PURE__ */ (0, L.jsx)(yL, {
"aria-label": "在桌面创建快捷方式",
isSelected: o,
isDisabled: !l,
@@ -48449,11 +48459,11 @@ function Vfe({ startup: e, receipt: t }) {
})
})
] }),
- e.message || c.error ? /* @__PURE__ */ (0, L.jsxs)(KA, {
+ e.message || c.error ? /* @__PURE__ */ (0, L.jsxs)(WA, {
divided: !0,
- children: [e.message ? /* @__PURE__ */ (0, L.jsx)(JA, { children: e.message }) : null, c.error ? /* @__PURE__ */ (0, L.jsx)(YA, { children: c.error }) : null]
+ children: [e.message ? /* @__PURE__ */ (0, L.jsx)(KA, { children: e.message }) : null, c.error ? /* @__PURE__ */ (0, L.jsx)(qA, { children: c.error }) : null]
}) : null,
- /* @__PURE__ */ (0, L.jsx)(qA, { children: /* @__PURE__ */ (0, L.jsx)(G, {
+ /* @__PURE__ */ (0, L.jsx)(GA, { children: /* @__PURE__ */ (0, L.jsx)(G, {
type: "submit",
disabled: !e.available,
...Y(c.busy === "save"),
@@ -48480,7 +48490,7 @@ function Ufe({ initial: e, initialJob: t }) {
let [n, r] = (0, I.useState)(e), [i, a] = (0, I.useState)(t || {
state: "idle",
progress: 0
- }), [o, s] = (0, I.useState)(""), c = Cw(), l = (0, I.useRef)(!1), u = (0, I.useRef)(!0), d = VR.has(i.state);
+ }), [o, s] = (0, I.useState)(""), c = Sw(), l = (0, I.useRef)(!1), u = (0, I.useRef)(!0), d = VR.has(i.state);
(0, I.useEffect)(() => (u.current = !0, () => {
u.current = !1;
}), []);
@@ -48499,7 +48509,7 @@ function Ufe({ initial: e, initialJob: t }) {
}, [i.state]), (0, I.useEffect)(() => {
let e = new AbortController(), t = VR.has(i.state) ? 1e3 : 3e4, n, o = 0, c = async () => {
try {
- let t = await gw("/api/configuration/update-status", e.signal);
+ let t = await hw("/api/configuration/update-status", e.signal);
if (e.signal.aborted) return;
a(t), o = 0, t.state === "complete" && r((e) => ({
...e,
@@ -48507,7 +48517,7 @@ function Ufe({ initial: e, initialJob: t }) {
state: "current",
message: "已是最新测试版。"
}));
- let n = await gw("/api/configuration/automatic-updates", e.signal);
+ let n = await hw("/api/configuration/automatic-updates", e.signal);
!e.signal.aborted && n.result && r(n.result);
} catch {
o += 1, o >= HR && !e.signal.aborted && s("尚未连接到 Peach,请检查托盘后刷新页面。");
@@ -48520,63 +48530,63 @@ function Ufe({ initial: e, initialJob: t }) {
}, [i.state]);
let m = () => {
d || (l.current = !1, s(""), c.run("download", (e) => q("/api/configuration/update", {}, "POST", e), a));
- }, h = () => void c.run("check", (e) => gw("/api/configuration/updates", e), r, (t) => {
+ }, h = () => void c.run("check", (e) => hw("/api/configuration/updates", e), r, (t) => {
r({
...e,
state: "error"
}), c.setError(K(t));
}), _ = c.error || o, v = i.state === "downloading" && i.total ? `${((i.downloaded || 0) / 1048576).toFixed(1)} / ${(i.total / 1048576).toFixed(1)} MB` : `${i.progress}%`;
- return /* @__PURE__ */ (0, L.jsxs)(WA, {
+ return /* @__PURE__ */ (0, L.jsxs)(HA, {
title: "检查更新",
children: [
- /* @__PURE__ */ (0, L.jsxs)(QA, { children: [
- /* @__PURE__ */ (0, L.jsx)($A, {
+ /* @__PURE__ */ (0, L.jsxs)(XA, { children: [
+ /* @__PURE__ */ (0, L.jsx)(ZA, {
term: "当前版本",
children: n.current_version
}),
- /* @__PURE__ */ (0, L.jsx)($A, {
+ /* @__PURE__ */ (0, L.jsx)(ZA, {
term: "安装方式",
children: n.installation
}),
- /* @__PURE__ */ (0, L.jsx)($A, {
+ /* @__PURE__ */ (0, L.jsx)(ZA, {
term: "更新通道",
children: n.channel
}),
- /* @__PURE__ */ (0, L.jsx)($A, {
+ /* @__PURE__ */ (0, L.jsx)(ZA, {
term: "最新版本",
children: n.latest_version || (n.state === "unchecked" ? "尚未检查" : "未取得")
})
] }),
- /* @__PURE__ */ (0, L.jsxs)(KA, {
+ /* @__PURE__ */ (0, L.jsxs)(WA, {
divided: !0,
children: [
- n.checked_at ? /* @__PURE__ */ (0, L.jsxs)(JA, { children: ["检查于 ", (/* @__PURE__ */ new Date(n.checked_at * 1e3)).toLocaleString()] }) : null,
+ n.checked_at ? /* @__PURE__ */ (0, L.jsxs)(KA, { children: ["检查于 ", (/* @__PURE__ */ new Date(n.checked_at * 1e3)).toLocaleString()] }) : null,
n.state === "available" && !_ ? /* @__PURE__ */ (0, L.jsx)(J, {
tone: "info",
title: "有可用更新",
children: n.message
- }) : _ || n.state === "error" ? /* @__PURE__ */ (0, L.jsx)(YA, { children: _ || n.message }) : /* @__PURE__ */ (0, L.jsx)(JA, {
+ }) : _ || n.state === "error" ? /* @__PURE__ */ (0, L.jsx)(qA, { children: _ || n.message }) : /* @__PURE__ */ (0, L.jsx)(KA, {
role: "status",
children: n.message
}),
- i.state === "error" ? /* @__PURE__ */ (0, L.jsx)(YA, { children: i.message }) : null,
+ i.state === "error" ? /* @__PURE__ */ (0, L.jsx)(qA, { children: i.message }) : null,
i.state !== "idle" && i.state !== "error" ? /* @__PURE__ */ (0, L.jsxs)("div", {
"aria-live": "polite",
className: "flex flex-col gap-2",
children: [
- /* @__PURE__ */ (0, L.jsx)(Sw, {
+ /* @__PURE__ */ (0, L.jsx)(xw, {
label: "更新准备进度",
value: i.progress,
stops: Hfe
}),
- /* @__PURE__ */ (0, L.jsxs)(JA, { children: ["下载 → 校验 → 解压 → 准备安装 · ", i.message] }),
- /* @__PURE__ */ (0, L.jsx)(JA, { children: v })
+ /* @__PURE__ */ (0, L.jsxs)(KA, { children: ["下载 → 校验 → 解压 → 准备安装 · ", i.message] }),
+ /* @__PURE__ */ (0, L.jsx)(KA, { children: v })
]
}) : null
]
}),
- /* @__PURE__ */ (0, L.jsxs)(qA, {
- status: /* @__PURE__ */ (0, L.jsx)(ZA, {
+ /* @__PURE__ */ (0, L.jsxs)(GA, {
+ status: /* @__PURE__ */ (0, L.jsx)(YA, {
href: n.release_url,
children: "查看发布页"
}),
@@ -48633,10 +48643,10 @@ function Gfe({ data: e, receipt: t, reopenTutorial: n }) {
});
}
function Kfe({ receipt: e, reopenTutorial: t }) {
- let n = Cw();
- return /* @__PURE__ */ (0, L.jsxs)(WA, {
+ let n = Sw();
+ return /* @__PURE__ */ (0, L.jsxs)(HA, {
title: "安装教程",
- children: [/* @__PURE__ */ (0, L.jsxs)(KA, { children: [/* @__PURE__ */ (0, L.jsx)(JA, { children: "重新显示已关闭或跳过的安装步骤,保留已完成的记录。" }), n.error ? /* @__PURE__ */ (0, L.jsx)(YA, { children: n.error }) : null] }), /* @__PURE__ */ (0, L.jsx)(qA, { children: /* @__PURE__ */ (0, L.jsx)(G, {
+ children: [/* @__PURE__ */ (0, L.jsxs)(WA, { children: [/* @__PURE__ */ (0, L.jsx)(KA, { children: "重新显示已关闭或跳过的安装步骤,保留已完成的记录。" }), n.error ? /* @__PURE__ */ (0, L.jsx)(qA, { children: n.error }) : null] }), /* @__PURE__ */ (0, L.jsx)(GA, { children: /* @__PURE__ */ (0, L.jsx)(G, {
onClick: () => void n.run("reopen", () => t(), () => e("已重新打开安装教程")),
...Y(n.busy === "reopen"),
children: "重新打开教程"
@@ -48644,57 +48654,57 @@ function Kfe({ receipt: e, reopenTutorial: t }) {
});
}
function qfe({ initial: e, receipt: t }) {
- let [n, r] = (0, I.useState)(e.mode), [i, a] = (0, I.useState)(e.interval_hours), o = Cw(e.error), s = (r) => {
+ let [n, r] = (0, I.useState)(e.mode), [i, a] = (0, I.useState)(e.interval_hours), o = Sw(e.error), s = (r) => {
r.preventDefault(), e.available && o.run("save", (e) => q("/api/configuration/automatic-updates", {
mode: n,
interval_hours: i
}, "POST", e), () => t("已保存配置"));
}, c = e.available ? e.download_available ? "开启后一分钟内开始检查。下载完成后,在此确认重启安装。" : "开启后一分钟内开始检查。源码运行时在发布页获取新版本。" : "自动更新需要由托盘管理的服务。";
- return /* @__PURE__ */ (0, L.jsxs)(WA, {
+ return /* @__PURE__ */ (0, L.jsxs)(HA, {
title: "自动更新",
onSubmit: s,
children: [
- /* @__PURE__ */ (0, L.jsxs)(GA, { children: [
- /* @__PURE__ */ (0, L.jsx)(UA, {
+ /* @__PURE__ */ (0, L.jsxs)(UA, { children: [
+ /* @__PURE__ */ (0, L.jsx)(VA, {
label: "自动检查新版本",
- children: /* @__PURE__ */ (0, L.jsx)(bL, {
+ children: /* @__PURE__ */ (0, L.jsx)(yL, {
"aria-label": "自动检查新版本",
isSelected: n !== "off",
isDisabled: !e.available,
onChange: (e) => r(e ? "check" : "off")
})
}),
- /* @__PURE__ */ (0, L.jsx)(UA, {
+ /* @__PURE__ */ (0, L.jsx)(VA, {
label: "自动下载更新",
- children: /* @__PURE__ */ (0, L.jsx)(bL, {
+ children: /* @__PURE__ */ (0, L.jsx)(yL, {
"aria-label": "自动下载更新",
isSelected: n === "download",
isDisabled: !e.available || !e.download_available || n === "off",
onChange: (e) => r(e ? "download" : "check")
})
}),
- /* @__PURE__ */ (0, L.jsx)(UA, {
+ /* @__PURE__ */ (0, L.jsx)(VA, {
label: "检查频率",
description: c,
- children: /* @__PURE__ */ (0, L.jsx)(_j, {
+ children: /* @__PURE__ */ (0, L.jsx)(hj, {
"aria-label": "检查频率",
selectedKey: String(i),
isDisabled: !e.available,
onSelectionChange: (e) => {
e !== null && a(Number(e));
},
- children: Wfe.map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(vj, {
+ children: Wfe.map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(gj, {
id: e,
children: t
}, e))
})
})
] }),
- o.error ? /* @__PURE__ */ (0, L.jsx)(KA, {
+ o.error ? /* @__PURE__ */ (0, L.jsx)(WA, {
divided: !0,
- children: /* @__PURE__ */ (0, L.jsx)(YA, { children: o.error })
+ children: /* @__PURE__ */ (0, L.jsx)(qA, { children: o.error })
}) : null,
- /* @__PURE__ */ (0, L.jsx)(qA, { children: /* @__PURE__ */ (0, L.jsx)(G, {
+ /* @__PURE__ */ (0, L.jsx)(GA, { children: /* @__PURE__ */ (0, L.jsx)(G, {
type: "submit",
disabled: !e.available,
...Y(o.busy === "save"),
@@ -48704,11 +48714,11 @@ function qfe({ initial: e, receipt: t }) {
});
}
function Jfe({ facts: e }) {
- return /* @__PURE__ */ (0, L.jsx)(WA, {
+ return /* @__PURE__ */ (0, L.jsx)(HA, {
title: "运行信息",
- children: /* @__PURE__ */ (0, L.jsx)(QA, { children: e.map((e) => /* @__PURE__ */ (0, L.jsxs)($A, {
+ children: /* @__PURE__ */ (0, L.jsx)(XA, { children: e.map((e) => /* @__PURE__ */ (0, L.jsxs)(ZA, {
term: e.term,
- children: [e.value, e.download_url ? /* @__PURE__ */ (0, L.jsx)(ZA, {
+ children: [e.value, e.download_url ? /* @__PURE__ */ (0, L.jsx)(YA, {
href: e.download_url,
children: e.download_label
}) : null]
@@ -48729,26 +48739,26 @@ function Yfe({ uninstall: e, receipt: t }) {
a(e.message);
}
}), s = i || e.message, c = [.../* @__PURE__ */ new Set([e.data_root, ...e.directories])];
- return /* @__PURE__ */ (0, L.jsxs)(WA, {
+ return /* @__PURE__ */ (0, L.jsxs)(HA, {
id: "uninstallPeach",
title: "卸载 Peach",
- children: [/* @__PURE__ */ (0, L.jsxs)(KA, { children: [
- e.available ? /* @__PURE__ */ (0, L.jsx)(JA, { children: "卸载移除 Peach 程序本身,原始媒体文件保留。" }) : null,
- /* @__PURE__ */ (0, L.jsx)(Oj, {
+ children: [/* @__PURE__ */ (0, L.jsxs)(WA, { children: [
+ e.available ? /* @__PURE__ */ (0, L.jsx)(KA, { children: "卸载移除 Peach 程序本身,原始媒体文件保留。" }) : null,
+ /* @__PURE__ */ (0, L.jsx)(Ej, {
isSelected: n,
isDisabled: !e.full_available || !!i,
onChange: r,
children: "完全卸载:同时删除设置、本地数据库、观看记录、凭据和缓存"
}),
- /* @__PURE__ */ (0, L.jsx)(ej, {
+ /* @__PURE__ */ (0, L.jsx)(QA, {
summary: "数据目录",
- children: c.map((e) => /* @__PURE__ */ (0, L.jsx)(zA, {
+ children: c.map((e) => /* @__PURE__ */ (0, L.jsx)(LA, {
path: e,
className: "text-body-2-regular text-text-secondary",
onRevealed: t
}, e))
})
- ] }), /* @__PURE__ */ (0, L.jsx)(qA, {
+ ] }), /* @__PURE__ */ (0, L.jsx)(GA, {
status: s ? /* @__PURE__ */ (0, L.jsx)("p", {
role: i ? "status" : void 0,
children: s
@@ -48791,13 +48801,13 @@ var Xfe = [
function Qfe() {
return /* @__PURE__ */ (0, L.jsxs)("div", {
className: "@container flex flex-col gap-3",
- children: [/* @__PURE__ */ (0, L.jsxs)(JA, { children: ["先在 CloudDrive 登录网盘并挂载,开启「启动时自动挂载」。", /* @__PURE__ */ (0, L.jsx)(ZA, {
+ children: [/* @__PURE__ */ (0, L.jsxs)(KA, { children: ["先在 CloudDrive 登录网盘并挂载,开启「启动时自动挂载」。", /* @__PURE__ */ (0, L.jsx)(YA, {
href: "https://www.clouddrive2.com/help.html",
children: "挂载帮助"
- })] }), /* @__PURE__ */ (0, L.jsxs)(ej, {
+ })] }), /* @__PURE__ */ (0, L.jsxs)(QA, {
summary: "CloudDrive 缓存建议",
children: [
- /* @__PURE__ */ (0, L.jsx)(JA, { children: "按缓存所在硬盘和可用内存选择起步值,再根据播放表现调整。" }),
+ /* @__PURE__ */ (0, L.jsx)(KA, { children: "按缓存所在硬盘和可用内存选择起步值,再根据播放表现调整。" }),
/* @__PURE__ */ (0, L.jsx)("ul", {
"aria-label": "按缓存所在硬盘分档",
className: "flex flex-col gap-2",
@@ -48829,9 +48839,9 @@ function Qfe() {
/* @__PURE__ */ (0, L.jsx)("li", { children: "Buffer Cache 占内存,磁盘缓存和文件夹缓存占硬盘,改一个管不住另外两个。" })
]
}),
- /* @__PURE__ */ (0, L.jsxs)(JA, { children: [
+ /* @__PURE__ */ (0, L.jsxs)(KA, { children: [
"三处缓存的分工、往上调的方法和这些起步值的来源在",
- /* @__PURE__ */ (0, L.jsx)(ZA, {
+ /* @__PURE__ */ (0, L.jsx)(YA, {
href: "https://github.com/longmeidao/peach/blob/master/docs/CLOUDDRIVE.md",
children: "CloudDrive 配置与调优"
}),
@@ -48907,34 +48917,34 @@ function epe({ value: e, label: t, kind: n = "local", onChange: r }) {
children: /* @__PURE__ */ (0, L.jsxs)("span", {
"data-icon-choice": !0,
className: "flex items-center gap-2",
- children: [/* @__PURE__ */ (0, L.jsx)(nj, { mark: e || l }), ((e) => e && UR.find(([t]) => t === e)?.[1] || u)(e)]
+ children: [/* @__PURE__ */ (0, L.jsx)(ej, { mark: e || l }), ((e) => e && UR.find(([t]) => t === e)?.[1] || u)(e)]
})
- }), /* @__PURE__ */ (0, L.jsx)(Tk, {
+ }), /* @__PURE__ */ (0, L.jsx)(Ck, {
triggerRef: i,
isOpen: a,
onOpenChange: o,
placement: "bottom start",
offset: 4,
- className: EA,
- children: /* @__PURE__ */ (0, L.jsxs)(Ik, {
+ className: wA,
+ children: /* @__PURE__ */ (0, L.jsxs)(Pk, {
"aria-label": `${t}候选`,
className: "flex w-72 flex-col gap-3 outline-none",
children: [
- /* @__PURE__ */ (0, L.jsx)(oO, {
+ /* @__PURE__ */ (0, L.jsx)(iO, {
slot: "title",
className: "px-1 text-body-medium text-text-primary",
children: "选择媒体库图标"
}),
- /* @__PURE__ */ (0, L.jsx)(Uk, {
+ /* @__PURE__ */ (0, L.jsx)(Vk, {
"aria-label": "候选图标",
value: s || WR,
onChange: (e) => c(e === WR ? "" : e),
className: "inline-grid grid-cols-7 gap-1",
- children: UR.map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(Wk, {
+ children: UR.map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(Hk, {
value: e || WR,
"aria-label": e ? t : u,
className: "flex h-10 cursor-pointer items-center justify-center rounded-lg text-foreground-icon-secondary outline-none hover:bg-dropdown-item-hover-background focus-visible:ring-2 focus-visible:ring-border-focus-ring data-selected:bg-dropdown-item-hover-background data-selected:text-text-primary",
- children: /* @__PURE__ */ (0, L.jsx)(nj, { mark: e || l })
+ children: /* @__PURE__ */ (0, L.jsx)(ej, { mark: e || l })
}, e || WR))
}),
/* @__PURE__ */ (0, L.jsxs)("div", {
@@ -48959,13 +48969,13 @@ function epe({ value: e, label: t, kind: n = "local", onChange: r }) {
//#region src/react/settings/push-discovery-settings.tsx
var tpe = "/api/configuration/push-discovery", npe = "/api/configuration/push-discovery/secret";
function rpe({ initial: e, receipt: t }) {
- let [n, r] = (0, I.useState)(e), [i, a] = (0, I.useState)(e.prefixes), [o, s] = (0, I.useState)(""), c = Cw(), l = PA(), u = n.media_roots, [d, f] = (0, I.useState)(e), p = (e, n) => {
+ let [n, r] = (0, I.useState)(e), [i, a] = (0, I.useState)(e.prefixes), [o, s] = (0, I.useState)(""), c = Sw(), l = MA(), u = n.media_roots, [d, f] = (0, I.useState)(e), p = (e, n) => {
r(e), f(e), a(e.prefixes), s(""), t(n);
}, m = (e, t) => a((n) => n.map((n, r) => r === e ? {
...n,
...t
} : n));
- return /* @__PURE__ */ (0, L.jsxs)(WA, {
+ return /* @__PURE__ */ (0, L.jsxs)(HA, {
title: "推送发现",
onSubmit: (e) => {
e.preventDefault();
@@ -48978,11 +48988,11 @@ function rpe({ initial: e, receipt: t }) {
c.run("save", (e) => q(tpe, t, "POST", e), (e) => p(e, "已保存配置"), (e) => s(K(e)));
},
children: [
- /* @__PURE__ */ (0, L.jsxs)(GA, { children: [
- /* @__PURE__ */ (0, L.jsx)(UA, {
+ /* @__PURE__ */ (0, L.jsxs)(UA, { children: [
+ /* @__PURE__ */ (0, L.jsx)(VA, {
label: "新文件落地就入库",
description: "打开之后不必等下一轮扫描。定期全量扫描照常进行,漏掉的由它补上。",
- children: /* @__PURE__ */ (0, L.jsx)(bL, {
+ children: /* @__PURE__ */ (0, L.jsx)(yL, {
"aria-label": "新文件落地就入库",
isSelected: n.enabled,
isDisabled: !n.available,
@@ -48992,10 +49002,10 @@ function rpe({ initial: e, receipt: t }) {
})
})
}),
- /* @__PURE__ */ (0, L.jsx)(UA, {
+ /* @__PURE__ */ (0, L.jsx)(VA, {
label: "监视本机文件夹",
description: "订阅本地来源的文件系统事件。网盘挂载不监视,因为遍历它就是走网络。",
- children: /* @__PURE__ */ (0, L.jsx)(bL, {
+ children: /* @__PURE__ */ (0, L.jsx)(yL, {
"aria-label": "监视本机文件夹",
isSelected: n.watch_local,
isDisabled: !n.available || !n.enabled,
@@ -49005,10 +49015,10 @@ function rpe({ initial: e, receipt: t }) {
})
})
}),
- /* @__PURE__ */ (0, L.jsx)(UA, {
+ /* @__PURE__ */ (0, L.jsx)(VA, {
label: "接收 CloudDrive2 通知",
description: "由 CloudDrive2 把网盘里的新文件推给 Peach。只接受本机与局域网发来的请求。",
- children: /* @__PURE__ */ (0, L.jsx)(bL, {
+ children: /* @__PURE__ */ (0, L.jsx)(yL, {
"aria-label": "接收 CloudDrive2 通知",
isSelected: n.cloud,
isDisabled: !n.available || !n.enabled,
@@ -49019,30 +49029,30 @@ function rpe({ initial: e, receipt: t }) {
})
})
] }),
- d.enabled ? /* @__PURE__ */ (0, L.jsx)(KA, {
+ d.enabled ? /* @__PURE__ */ (0, L.jsx)(WA, {
divided: !0,
- children: /* @__PURE__ */ (0, L.jsxs)(QA, { children: [d.watch_local ? /* @__PURE__ */ (0, L.jsx)($A, {
+ children: /* @__PURE__ */ (0, L.jsxs)(XA, { children: [d.watch_local ? /* @__PURE__ */ (0, L.jsx)(ZA, {
term: "本机文件夹监视",
children: d.local_running ? d.local_roots.join("、") : d.local_message || "没有运行"
- }) : null, /* @__PURE__ */ (0, L.jsx)($A, {
+ }) : null, /* @__PURE__ */ (0, L.jsx)(ZA, {
term: "已入库",
children: `${d.queue.ingested} 个文件,队列里还有 ${d.queue.pending} 条`
})] })
}) : null,
- d.enabled && d.cloud ? /* @__PURE__ */ (0, L.jsx)(KA, {
+ d.enabled && d.cloud ? /* @__PURE__ */ (0, L.jsx)(WA, {
divided: !0,
children: /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col gap-3",
children: [
- /* @__PURE__ */ (0, L.jsx)(XA, { children: "CloudDrive2 配置内容" }),
- /* @__PURE__ */ (0, L.jsx)(JA, { children: "Webhook 需要 CloudDrive2 会员;非会员的配置即使显示有效,也不会发送通知。 在「设置 → Webhooks」中添加配置,粘贴下方内容并保存。地址和密钥已填好;更换密钥后需重新复制。 Windows 桌面版若因换行问题显示「无效」,将配置保存为 .toml 文件,放入 %LOCALAPPDATA%\\CloudDrive.WinUI\\webhooks\\ 目录。" }),
+ /* @__PURE__ */ (0, L.jsx)(JA, { children: "CloudDrive2 配置内容" }),
+ /* @__PURE__ */ (0, L.jsx)(KA, { children: "Webhook 需要 CloudDrive2 会员;非会员的配置即使显示有效,也不会发送通知。 在「设置 → Webhooks」中添加配置,粘贴下方内容并保存。地址和密钥已填好;更换密钥后需重新复制。 Windows 桌面版若因换行问题显示「无效」,将配置保存为 .toml 文件,放入 %LOCALAPPDATA%\\CloudDrive.WinUI\\webhooks\\ 目录。" }),
d.config_toml ? /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)("div", { children: /* @__PURE__ */ (0, L.jsx)(G, {
size: "small",
onClick: () => {
navigator.clipboard.writeText(d.config_toml).then(() => t("已复制 CloudDrive2 配置"), () => s("浏览器没让这一页写剪贴板,展开「查看这段配置」选中自己复制。"));
},
children: "复制配置"
- }) }), /* @__PURE__ */ (0, L.jsx)(ej, {
+ }) }), /* @__PURE__ */ (0, L.jsx)(QA, {
summary: "查看这段配置",
children: /* @__PURE__ */ (0, L.jsx)("div", {
className: "relative",
@@ -49053,17 +49063,17 @@ function rpe({ initial: e, receipt: t }) {
children: d.config_toml
})
})
- })] }) : /* @__PURE__ */ (0, L.jsx)(JA, { children: d.origin ? "尚未生成共享密钥,请保存配置后复制。" : "请先配置 CloudDrive2 能访问的 HTTPS 地址,再生成通知配置。HTTP 地址不接受通知写入,也不会自动转发。" })
+ })] }) : /* @__PURE__ */ (0, L.jsx)(KA, { children: d.origin ? "尚未生成共享密钥,请保存配置后复制。" : "请先配置 CloudDrive2 能访问的 HTTPS 地址,再生成通知配置。HTTP 地址不接受通知写入,也不会自动转发。" })
]
})
}) : null,
- n.enabled && n.cloud ? /* @__PURE__ */ (0, L.jsx)(KA, {
+ n.enabled && n.cloud ? /* @__PURE__ */ (0, L.jsx)(WA, {
divided: !0,
children: /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col gap-3",
children: [
- /* @__PURE__ */ (0, L.jsx)(XA, { children: "云端路径前缀" }),
- /* @__PURE__ */ (0, L.jsx)(JA, { children: "左侧填写 CloudDrive2 中的目录前缀,右侧选择对应的媒体文件夹。 Peach 按此对应关系定位通知中的文件。" }),
+ /* @__PURE__ */ (0, L.jsx)(JA, { children: "云端路径前缀" }),
+ /* @__PURE__ */ (0, L.jsx)(KA, { children: "左侧填写 CloudDrive2 中的目录前缀,右侧选择对应的媒体文件夹。 Peach 按此对应关系定位通知中的文件。" }),
/* @__PURE__ */ (0, L.jsx)("div", {
role: "group",
"aria-label": "云端路径前缀",
@@ -49071,7 +49081,7 @@ function rpe({ initial: e, receipt: t }) {
children: i.map((e, t) => /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex items-start gap-2",
children: [
- /* @__PURE__ */ (0, L.jsx)(Yj, {
+ /* @__PURE__ */ (0, L.jsx)(qj, {
className: "min-w-0 flex-1",
"aria-label": `云端路径前缀 ${t + 1}`,
placeholder: "/115",
@@ -49080,19 +49090,19 @@ function rpe({ initial: e, receipt: t }) {
value: e.prefix,
onChange: (e) => m(t, { prefix: e })
}),
- /* @__PURE__ */ (0, L.jsx)(_j, {
+ /* @__PURE__ */ (0, L.jsx)(hj, {
"aria-label": `前缀 ${t + 1} 对应的媒体根`,
selectedKey: e.root,
onSelectionChange: (e) => {
e !== null && m(t, { root: String(e) });
},
- children: u.map((e) => /* @__PURE__ */ (0, L.jsx)(vj, {
+ children: u.map((e) => /* @__PURE__ */ (0, L.jsx)(gj, {
id: e,
children: e
}, e))
}),
- /* @__PURE__ */ (0, L.jsx)(IA, {
- icon: $S,
+ /* @__PURE__ */ (0, L.jsx)(PA, {
+ icon: QS,
"aria-label": "移除这一条",
onClick: () => a((e) => e.filter((e, n) => n !== t))
})
@@ -49110,11 +49120,11 @@ function rpe({ initial: e, receipt: t }) {
]
})
}) : null,
- o || c.error ? /* @__PURE__ */ (0, L.jsx)(KA, {
+ o || c.error ? /* @__PURE__ */ (0, L.jsx)(WA, {
divided: !0,
- children: /* @__PURE__ */ (0, L.jsx)(YA, { children: o || c.error })
+ children: /* @__PURE__ */ (0, L.jsx)(qA, { children: o || c.error })
}) : null,
- /* @__PURE__ */ (0, L.jsxs)(qA, {
+ /* @__PURE__ */ (0, L.jsxs)(GA, {
status: d.enabled && d.cloud ? "换过密钥之后,CloudDrive2 那一侧要重新贴一次配置,否则它推来的一律被拒。" : void 0,
children: [d.enabled && d.cloud ? /* @__PURE__ */ (0, L.jsx)(G, {
onClick: () => {
@@ -49170,7 +49180,7 @@ function spe(e) {
library_icon: e.library_icon || ""
})) : (e.media_dirs.length ? e.media_dirs : [""]).map((e) => qR(e));
}
-var cpe = (e) => !(e instanceof mw) || e.status !== 400 ? null : e.body?.errors ?? null;
+var cpe = (e) => !(e instanceof pw) || e.status !== 400 ? null : e.body?.errors ?? null;
function lpe({ data: e, receipt: t }) {
return /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col gap-6",
@@ -49192,7 +49202,7 @@ function lpe({ data: e, receipt: t }) {
});
}
function upe({ data: e, receipt: t }) {
- let [n, r] = (0, I.useState)(() => spe(e)), [i, a] = (0, I.useState)(String(e.port)), [o, s] = (0, I.useState)(!1), [c, l] = (0, I.useState)([]), [u, d] = (0, I.useState)(""), [f, p] = (0, I.useState)(""), [m, h] = (0, I.useState)(null), [g, _] = (0, I.useState)(null), [v, y] = (0, I.useState)(null), b = (0, I.useRef)(!1), x = (0, I.useRef)(e.revision), S = (0, I.useRef)([]), C = Cw();
+ let [n, r] = (0, I.useState)(() => spe(e)), [i, a] = (0, I.useState)(String(e.port)), [o, s] = (0, I.useState)(!1), [c, l] = (0, I.useState)([]), [u, d] = (0, I.useState)(""), [f, p] = (0, I.useState)(""), [m, h] = (0, I.useState)(null), [g, _] = (0, I.useState)(null), [v, y] = (0, I.useState)(null), b = (0, I.useRef)(!1), x = (0, I.useRef)(e.revision), S = (0, I.useRef)([]), C = Sw();
(0, I.useLayoutEffect)(() => {
g !== null && (S.current[g]?.focus(), _(null));
}, [g]), (0, I.useEffect)(() => {
@@ -49237,14 +49247,14 @@ function upe({ data: e, receipt: t }) {
l(t?.media_dirs ?? []), d(t?.port ?? ""), t || p(K(e));
});
};
- if (m) return /* @__PURE__ */ (0, L.jsx)(WA, {
+ if (m) return /* @__PURE__ */ (0, L.jsx)(HA, {
title: "这台电脑",
- children: /* @__PURE__ */ (0, L.jsx)(KA, { children: /* @__PURE__ */ (0, L.jsxs)(J, {
+ children: /* @__PURE__ */ (0, L.jsx)(WA, { children: /* @__PURE__ */ (0, L.jsxs)(J, {
tone: "success",
title: "配置已保存",
children: [
"Peach 正在重新启动。稍后自动跳转,或点击",
- /* @__PURE__ */ (0, L.jsx)(TA, {
+ /* @__PURE__ */ (0, L.jsx)(CA, {
href: m.url,
size: "small",
children: "进入馆藏"
@@ -49254,14 +49264,14 @@ function upe({ data: e, receipt: t }) {
}) })
});
let A = n.some((e) => e.location === "115" || e.location === "pikpak"), j = A ? (e.mount_dependencies ?? []).filter((e) => !e.available) : [];
- return /* @__PURE__ */ (0, L.jsxs)(WA, {
+ return /* @__PURE__ */ (0, L.jsxs)(HA, {
title: "这台电脑",
onSubmit: k,
- children: [/* @__PURE__ */ (0, L.jsxs)(KA, { children: [
+ children: [/* @__PURE__ */ (0, L.jsxs)(WA, { children: [
/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col gap-3",
children: [
- /* @__PURE__ */ (0, L.jsx)(XA, { children: "媒体文件夹" }),
+ /* @__PURE__ */ (0, L.jsx)(JA, { children: "媒体文件夹" }),
/* @__PURE__ */ (0, L.jsx)("div", {
role: "group",
"aria-label": "媒体文件夹",
@@ -49272,7 +49282,7 @@ function upe({ data: e, receipt: t }) {
children: [/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex items-start gap-2",
children: [
- /* @__PURE__ */ (0, L.jsx)(Yj, {
+ /* @__PURE__ */ (0, L.jsx)(qj, {
className: "min-w-0 flex-1",
"aria-label": `媒体文件夹 ${r + 1}`,
placeholder: "本机文件夹路径",
@@ -49285,14 +49295,14 @@ function upe({ data: e, receipt: t }) {
isInvalid: !!c[r],
hint: c[r] || void 0
}),
- /* @__PURE__ */ (0, L.jsx)(IA, {
+ /* @__PURE__ */ (0, L.jsx)(PA, {
icon: ape,
"aria-label": "选择文件夹",
onClick: () => void O(r),
...Y(v === r)
}),
- n.length > 1 ? /* @__PURE__ */ (0, L.jsx)(IA, {
- icon: $S,
+ n.length > 1 ? /* @__PURE__ */ (0, L.jsx)(PA, {
+ icon: QS,
"aria-label": "移除这个文件夹",
onClick: () => D(r)
}) : null
@@ -49300,7 +49310,7 @@ function upe({ data: e, receipt: t }) {
}), /* @__PURE__ */ (0, L.jsxs)("div", {
className: "inline-grid grid-cols-1 gap-3 @lg:grid-cols-2",
children: [
- /* @__PURE__ */ (0, L.jsx)(Yj, {
+ /* @__PURE__ */ (0, L.jsx)(qj, {
label: "媒体库名称",
maxLength: 80,
placeholder: "同名文件夹归入同一个媒体库",
@@ -49309,7 +49319,7 @@ function upe({ data: e, receipt: t }) {
}),
/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col gap-1.5",
- children: [/* @__PURE__ */ (0, L.jsx)(XA, { children: "媒体库图标" }), /* @__PURE__ */ (0, L.jsx)(epe, {
+ children: [/* @__PURE__ */ (0, L.jsx)(JA, { children: "媒体库图标" }), /* @__PURE__ */ (0, L.jsx)(epe, {
label: `媒体库图标 ${r + 1}`,
value: t.library_icon,
kind: t.location,
@@ -49318,20 +49328,20 @@ function upe({ data: e, receipt: t }) {
}),
/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col gap-1.5",
- children: [/* @__PURE__ */ (0, L.jsx)(XA, { children: "媒体来源" }), /* @__PURE__ */ (0, L.jsx)(_j, {
+ children: [/* @__PURE__ */ (0, L.jsx)(JA, { children: "媒体来源" }), /* @__PURE__ */ (0, L.jsx)(hj, {
"aria-label": `媒体来源 ${r + 1}`,
selectedKey: t.location,
onSelectionChange: (e) => {
e !== null && w(r, { location: String(e) });
},
- children: GR.map(([e, t]) => /* @__PURE__ */ (0, L.jsxs)(vj, {
+ children: GR.map(([e, t]) => /* @__PURE__ */ (0, L.jsxs)(gj, {
id: e,
textValue: t,
- children: [/* @__PURE__ */ (0, L.jsx)(nj, { mark: KR(e) }), t]
+ children: [/* @__PURE__ */ (0, L.jsx)(ej, { mark: KR(e) }), t]
}, e))
})]
}),
- e.windows === !1 ? /* @__PURE__ */ (0, L.jsx)(Yj, {
+ e.windows === !1 ? /* @__PURE__ */ (0, L.jsx)(qj, {
label: "Windows 中的对应路径",
placeholder: "例如 B:\\",
value: t.root,
@@ -49349,17 +49359,17 @@ function upe({ data: e, receipt: t }) {
]
}),
A ? /* @__PURE__ */ (0, L.jsx)(Qfe, {}) : null,
- j.map((e) => /* @__PURE__ */ (0, L.jsxs)(JA, { children: [
+ j.map((e) => /* @__PURE__ */ (0, L.jsxs)(KA, { children: [
"未检测到 ",
e.name,
"。",
- /* @__PURE__ */ (0, L.jsxs)(ZA, {
+ /* @__PURE__ */ (0, L.jsxs)(YA, {
href: e.download_url,
children: ["下载 ", e.name]
})
] }, e.name)),
- e.windows === !1 ? /* @__PURE__ */ (0, L.jsx)(JA, { children: "本机文件夹是这台电脑读取媒体的位置。Windows 中的对应路径用于匹配馆藏中已有的路径,例如 B:\\ 对应本机挂载文件夹。" }) : null,
- e.port_editable === !1 ? null : /* @__PURE__ */ (0, L.jsx)(Yj, {
+ e.windows === !1 ? /* @__PURE__ */ (0, L.jsx)(KA, { children: "本机文件夹是这台电脑读取媒体的位置。Windows 中的对应路径用于匹配馆藏中已有的路径,例如 B:\\ 对应本机挂载文件夹。" }) : null,
+ e.port_editable === !1 ? null : /* @__PURE__ */ (0, L.jsx)(qj, {
id: "configPort",
label: "本机访问端口",
inputMode: "numeric",
@@ -49369,7 +49379,7 @@ function upe({ data: e, receipt: t }) {
isInvalid: !!u,
hint: u || "浏览器地址里冒号后面的数字,一般不用改。"
}),
- /* @__PURE__ */ (0, L.jsx)(Oj, {
+ /* @__PURE__ */ (0, L.jsx)(Ej, {
isSelected: o,
onChange: s,
children: "保存后扫描并补全资料"
@@ -49379,7 +49389,7 @@ function upe({ data: e, receipt: t }) {
title: "没有保存",
children: f
}) : null
- ] }), /* @__PURE__ */ (0, L.jsx)(qA, {
+ ] }), /* @__PURE__ */ (0, L.jsx)(GA, {
status: e.port_editable === !1 ? "保存后 Peach 会重新载入配置。" : "保存后 Peach 会重新启动,端口改了就用新地址打开。",
children: /* @__PURE__ */ (0, L.jsx)(G, {
type: "submit",
@@ -49414,19 +49424,19 @@ function dpe({ online: e }) {
});
}
function fpe({ data: e }) {
- let t = e.media_sources, n = Cw();
- return t ? /* @__PURE__ */ (0, L.jsxs)(WA, {
+ let t = e.media_sources, n = Sw();
+ return t ? /* @__PURE__ */ (0, L.jsxs)(HA, {
title: "挂载状态",
children: [
- /* @__PURE__ */ (0, L.jsx)(QA, { children: t.map((e, t) => /* @__PURE__ */ (0, L.jsxs)($A, {
- term: /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(nj, { mark: KR(e.location) }), ope(e.location)] }),
+ /* @__PURE__ */ (0, L.jsx)(XA, { children: t.map((e, t) => /* @__PURE__ */ (0, L.jsxs)(ZA, {
+ term: /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(ej, { mark: KR(e.location) }), ope(e.location)] }),
children: [e.path || "未配置挂载点", /* @__PURE__ */ (0, L.jsx)(dpe, { online: e.online })]
}, t)) }),
- n.error ? /* @__PURE__ */ (0, L.jsx)(KA, {
+ n.error ? /* @__PURE__ */ (0, L.jsx)(WA, {
divided: !0,
- children: /* @__PURE__ */ (0, L.jsx)(YA, { children: n.error })
+ children: /* @__PURE__ */ (0, L.jsx)(qA, { children: n.error })
}) : null,
- /* @__PURE__ */ (0, L.jsx)(qA, { children: /* @__PURE__ */ (0, L.jsx)(G, {
+ /* @__PURE__ */ (0, L.jsx)(GA, { children: /* @__PURE__ */ (0, L.jsx)(G, {
onClick: () => void n.run("refresh", (e) => zR(e), (e) => X.setQueryData(RR, e)),
...Y(n.busy === "refresh"),
children: "刷新挂载状态"
@@ -49442,7 +49452,7 @@ var ppe = {
password: "已设置密码。新设备需要登录,登录时勾选「保持登录」可保持 30 天。"
};
function mpe({ initial: e, receipt: t }) {
- let [n, r] = (0, I.useState)(e), [i, a] = (0, I.useState)(""), [o, s] = (0, I.useState)(""), [c, l] = (0, I.useState)(""), [u, d] = (0, I.useState)(!1), [f, p] = (0, I.useState)({}), m = (0, I.useRef)(null), h = Cw(), g = (e) => {
+ let [n, r] = (0, I.useState)(e), [i, a] = (0, I.useState)(""), [o, s] = (0, I.useState)(""), [c, l] = (0, I.useState)(""), [u, d] = (0, I.useState)(!1), [f, p] = (0, I.useState)({}), m = (0, I.useRef)(null), h = Sw(), g = (e) => {
e.preventDefault();
let f = {};
if (n.mode === "password" && !i && (f.current_password = "请输入当前访问密码"), u || ((o.length < 8 || o.length > 256) && (f.password = "访问密码需为 8–256 个字符"), o !== c && (f.confirmation = "两次输入的密码不一致")), p(f), Object.keys(f).length) {
@@ -49459,28 +49469,28 @@ function mpe({ initial: e, receipt: t }) {
}, "POST", e), (e) => {
r(e), a(""), s(""), l(""), d(!1), p({}), t(e.mode === "open" ? "已关闭访问密码" : "已保存配置");
}, (e) => {
- let t = e instanceof mw ? e.body : null, n = t?.errors || t?.detail?.errors;
+ let t = e instanceof pw ? e.body : null, n = t?.errors || t?.detail?.errors;
n ? p(n) : h.setError(K(e));
});
}, _ = ppe[n.mode], v = n.mode !== "locked";
- return /* @__PURE__ */ (0, L.jsxs)(WA, {
+ return /* @__PURE__ */ (0, L.jsxs)(HA, {
title: "访问密码",
onSubmit: g,
children: [/* @__PURE__ */ (0, L.jsx)("div", {
ref: m,
- children: /* @__PURE__ */ (0, L.jsxs)(KA, { children: [
- _ ? /* @__PURE__ */ (0, L.jsx)(JA, { children: _ }) : null,
+ children: /* @__PURE__ */ (0, L.jsxs)(WA, { children: [
+ _ ? /* @__PURE__ */ (0, L.jsx)(KA, { children: _ }) : null,
n.mode === "open" ? /* @__PURE__ */ (0, L.jsx)(J, {
tone: "warning",
title: "未设置访问密码",
children: "能连接到 Peach 的设备打开地址就能看馆藏,不需要登录。"
}) : null,
- n.mode === "password" || n.mode === "legacy" ? /* @__PURE__ */ (0, L.jsx)(Oj, {
+ n.mode === "password" || n.mode === "legacy" ? /* @__PURE__ */ (0, L.jsx)(Ej, {
isSelected: u,
onChange: d,
children: "关闭访问密码"
}) : null,
- n.mode === "password" ? /* @__PURE__ */ (0, L.jsx)(Yj, {
+ n.mode === "password" ? /* @__PURE__ */ (0, L.jsx)(qj, {
id: "access-current",
type: "password",
label: "当前访问密码",
@@ -49493,7 +49503,7 @@ function mpe({ initial: e, receipt: t }) {
isInvalid: !!f.current_password,
hint: f.current_password
}) : null,
- v ? /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(Yj, {
+ v ? /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(qj, {
id: "access-password",
type: "password",
label: n.mode === "password" ? "新访问密码" : "设置访问密码",
@@ -49506,7 +49516,7 @@ function mpe({ initial: e, receipt: t }) {
validationBehavior: "aria",
isInvalid: !u && !!f.password,
hint: u ? "关闭访问密码时无需填写。" : f.password || "至少 8 个字符。保存后其他设备需要重新登录。"
- }), /* @__PURE__ */ (0, L.jsx)(Yj, {
+ }), /* @__PURE__ */ (0, L.jsx)(qj, {
id: "access-confirm",
type: "password",
label: "确认访问密码",
@@ -49525,9 +49535,9 @@ function mpe({ initial: e, receipt: t }) {
title: "访问范围",
children: "保存后,能连接到 Peach 的设备将直接访问馆藏。"
}) : null,
- h.error ? /* @__PURE__ */ (0, L.jsx)(YA, { children: h.error }) : null
+ h.error ? /* @__PURE__ */ (0, L.jsx)(qA, { children: h.error }) : null
] })
- }), v ? /* @__PURE__ */ (0, L.jsx)(qA, {
+ }), v ? /* @__PURE__ */ (0, L.jsx)(GA, {
status: "保存后立即生效。",
children: /* @__PURE__ */ (0, L.jsx)(G, {
type: "submit",
@@ -49544,7 +49554,7 @@ var hpe = 2e3, gpe = [["quick", "临时链接"], ["named", "命名隧道"]], _pe
named: "地址是 Cloudflare 后台绑定的公开主机名,重启后不变。启动前必须设置访问密码,身份策略在 Cloudflare Access 里配置。"
};
function vpe({ revision: e, initial: t, receipt: n }) {
- let [r, i] = (0, I.useState)(t), [a, o] = (0, I.useState)(e), [s, c] = (0, I.useState)(t.mode), [l, u] = (0, I.useState)(t.hostname), [d, f] = (0, I.useState)(""), [p, m] = (0, I.useState)({}), h = Cw(), g = r.state === "starting" || r.state === "running", _ = r.named_available && s === "named";
+ let [r, i] = (0, I.useState)(t), [a, o] = (0, I.useState)(e), [s, c] = (0, I.useState)(t.mode), [l, u] = (0, I.useState)(t.hostname), [d, f] = (0, I.useState)(""), [p, m] = (0, I.useState)({}), h = Sw(), g = r.state === "starting" || r.state === "running", _ = r.named_available && s === "named";
(0, I.useEffect)(() => {
if (r.state !== "starting") return;
let e = new AbortController(), t = window.setInterval(() => {
@@ -49566,30 +49576,30 @@ function vpe({ revision: e, initial: t, receipt: n }) {
}, "POST", e), (e) => {
i(e), o(e.revision), c(e.mode), u(e.hostname), f(""), n(e);
}, (e) => {
- let t = e instanceof mw ? e.body : null, n = t?.errors || t?.detail?.errors;
+ let t = e instanceof pw ? e.body : null, n = t?.errors || t?.detail?.errors;
n ? m(n) : h.setError(K(e));
});
};
- return /* @__PURE__ */ (0, L.jsxs)(WA, {
+ return /* @__PURE__ */ (0, L.jsxs)(HA, {
title: "Cloudflare 公网入口",
onSubmit: (e) => {
e.preventDefault(), v("save", g, () => n("已保存配置"));
},
- children: [/* @__PURE__ */ (0, L.jsxs)(KA, { children: [
- r.named_available ? /* @__PURE__ */ (0, L.jsx)(UN, {
+ children: [/* @__PURE__ */ (0, L.jsxs)(WA, { children: [
+ r.named_available ? /* @__PURE__ */ (0, L.jsx)(VN, {
"aria-label": "公网入口的形态(二选一)",
value: s,
isDisabled: g,
onChange: (e) => c(e),
- className: WN,
- children: gpe.map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(Wk, {
+ className: HN,
+ children: gpe.map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(Hk, {
value: e,
- className: GN,
+ className: UN,
children: t
}, e))
}) : null,
- /* @__PURE__ */ (0, L.jsx)(JA, { children: _pe[_ ? "named" : "quick"] }),
- _ ? /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(Yj, {
+ /* @__PURE__ */ (0, L.jsx)(KA, { children: _pe[_ ? "named" : "quick"] }),
+ _ ? /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [/* @__PURE__ */ (0, L.jsx)(qj, {
id: "tunnel-hostname",
label: "公开主机名",
autoComplete: "off",
@@ -49600,7 +49610,7 @@ function vpe({ revision: e, initial: t, receipt: n }) {
validationBehavior: "aria",
isInvalid: !!p.hostname,
hint: p.hostname || "在 Cloudflare Zero Trust 里指向本机 origin 的那个主机名。"
- }), /* @__PURE__ */ (0, L.jsx)(Yj, {
+ }), /* @__PURE__ */ (0, L.jsx)(qj, {
id: "tunnel-token",
type: "password",
label: "隧道令牌",
@@ -49620,7 +49630,7 @@ function vpe({ revision: e, initial: t, receipt: n }) {
r.state === "running" && r.url ? /* @__PURE__ */ (0, L.jsx)(J, {
tone: "info",
title: "公网地址",
- children: /* @__PURE__ */ (0, L.jsx)(ZA, {
+ children: /* @__PURE__ */ (0, L.jsx)(YA, {
href: r.url,
children: r.url
})
@@ -49630,9 +49640,9 @@ function vpe({ revision: e, initial: t, receipt: n }) {
title: "正在连接",
children: "正在等待 cloudflared 连上 Cloudflare 边缘。"
}) : null,
- r.error ? /* @__PURE__ */ (0, L.jsx)(YA, { children: r.error }) : null,
- h.error ? /* @__PURE__ */ (0, L.jsx)(YA, { children: h.error }) : null
- ] }), /* @__PURE__ */ (0, L.jsxs)(qA, {
+ r.error ? /* @__PURE__ */ (0, L.jsx)(qA, { children: r.error }) : null,
+ h.error ? /* @__PURE__ */ (0, L.jsx)(qA, { children: h.error }) : null
+ ] }), /* @__PURE__ */ (0, L.jsxs)(GA, {
status: r.enabled ? "服务重启时会按设置尝试恢复。" : "服务重启后保持关闭。",
children: [/* @__PURE__ */ (0, L.jsx)(G, {
onClick: () => v("toggle", !g, (e) => n(e.enabled ? "公网入口已启动" : "公网入口已停止")),
@@ -49674,8 +49684,8 @@ function bpe({ data: e, receipt: t }) {
});
}
function xpe({ initial: e, receipt: t }) {
- let [n, r] = (0, I.useState)(e), [i, a] = (0, I.useState)(e.mode), [o, s] = (0, I.useState)(""), c = Cw();
- return /* @__PURE__ */ (0, L.jsxs)(WA, {
+ let [n, r] = (0, I.useState)(e), [i, a] = (0, I.useState)(e.mode), [o, s] = (0, I.useState)(""), c = Sw();
+ return /* @__PURE__ */ (0, L.jsxs)(HA, {
id: "peachProxy",
title: "Peach 代理",
onSubmit: (e) => {
@@ -49687,25 +49697,25 @@ function xpe({ initial: e, receipt: t }) {
});
},
children: [
- /* @__PURE__ */ (0, L.jsx)(GA, { children: /* @__PURE__ */ (0, L.jsx)(UA, {
+ /* @__PURE__ */ (0, L.jsx)(UA, { children: /* @__PURE__ */ (0, L.jsx)(VA, {
label: "连接方式",
description: "采集来源选「Peach 代理」时共用这里的连接方式。",
- children: /* @__PURE__ */ (0, L.jsx)(_j, {
+ children: /* @__PURE__ */ (0, L.jsx)(hj, {
"aria-label": "连接方式",
selectedKey: i,
onSelectionChange: (e) => {
e !== null && a(String(e));
},
- children: ype.map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(vj, {
+ children: ype.map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(gj, {
id: e,
children: t
}, e))
})
}) }),
- i === "proxy" || n.needs_selection || c.error ? /* @__PURE__ */ (0, L.jsxs)(KA, {
+ i === "proxy" || n.needs_selection || c.error ? /* @__PURE__ */ (0, L.jsxs)(WA, {
divided: !0,
children: [
- i === "proxy" ? /* @__PURE__ */ (0, L.jsx)(Yj, {
+ i === "proxy" ? /* @__PURE__ */ (0, L.jsx)(qj, {
id: "peachProxyAddress",
type: "password",
label: "代理地址",
@@ -49719,10 +49729,10 @@ function xpe({ initial: e, receipt: t }) {
title: "需要选择连接方式",
children: "已有来源的代理地址不同,请选择公共连接方式。"
}) : null,
- c.error ? /* @__PURE__ */ (0, L.jsx)(YA, { children: c.error }) : null
+ c.error ? /* @__PURE__ */ (0, L.jsx)(qA, { children: c.error }) : null
]
}) : null,
- /* @__PURE__ */ (0, L.jsx)(qA, { children: /* @__PURE__ */ (0, L.jsx)(G, {
+ /* @__PURE__ */ (0, L.jsx)(GA, { children: /* @__PURE__ */ (0, L.jsx)(G, {
type: "submit",
...Y(c.busy === "save"),
children: "保存配置"
@@ -49791,24 +49801,24 @@ function wpe({ openConfiguration: e }) {
}), n = t.data;
return /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-col",
- children: [n ? /* @__PURE__ */ (0, L.jsxs)(QA, { children: [
- /* @__PURE__ */ (0, L.jsx)($A, {
+ children: [n ? /* @__PURE__ */ (0, L.jsxs)(XA, { children: [
+ /* @__PURE__ */ (0, L.jsx)(ZA, {
term: "媒体库",
children: `${n.library_count} 个`
}),
- /* @__PURE__ */ (0, L.jsx)($A, {
+ /* @__PURE__ */ (0, L.jsx)(ZA, {
term: "端口",
children: String(n.port)
}),
- /* @__PURE__ */ (0, L.jsx)($A, {
+ /* @__PURE__ */ (0, L.jsx)(ZA, {
term: "更新",
children: Cpe(n)
})
- ] }) : /* @__PURE__ */ (0, L.jsx)(KA, { children: /* @__PURE__ */ (0, L.jsx)(J, {
+ ] }) : /* @__PURE__ */ (0, L.jsx)(WA, { children: /* @__PURE__ */ (0, L.jsx)(J, {
tone: "error",
title: "配置读取失败",
children: t.error ? K(t.error) : "未取得配置,请刷新页面重试。"
- }) }), /* @__PURE__ */ (0, L.jsx)(qA, {
+ }) }), /* @__PURE__ */ (0, L.jsx)(GA, {
status: "媒体文件夹、端口、代理与更新在配置页上改。",
children: /* @__PURE__ */ (0, L.jsx)(G, {
onClick: e,
@@ -49819,7 +49829,7 @@ function wpe({ openConfiguration: e }) {
}
//#endregion
//#region src/react/stats/stats.ts
-var Tpe = "/api/stats", JR = ["stats"], YR = (e) => gw(Tpe, e);
+var Tpe = "/api/stats", JR = ["stats"], YR = (e) => hw(Tpe, e);
async function Epe(e) {
await X.fetchQuery({
queryKey: JR,
@@ -68828,7 +68838,7 @@ var Jje = ["axis", "item"], Yje = Q5(Q5({}, q5), {}, {
//#endregion
//#region src/react/charts/cn.ts
function e7(...e) {
- return cw(bh(e));
+ return sw(bh(e));
}
//#endregion
//#region src/react/evilcharts/registry/ui/recharts-chart.tsx
@@ -70376,7 +70386,7 @@ var IMe = ({ chartId: e, onShimmerExit: t }) => /* @__PURE__ */ (0, L.jsxs)(L.Fr
x7.Bar = _Me, x7.XAxis = vMe, x7.YAxis = yMe, x7.Grid = bMe, x7.Tooltip = xMe, x7.Legend = SMe, x7.Brush = m7;
//#endregion
//#region src/react/charts/chart-card.tsx
-var C7 = `${_w({ radius: "chart" })} flex flex-col gap-4 max-sm:p-4`;
+var C7 = `${gw({ radius: "chart" })} flex flex-col gap-4 max-sm:p-4`;
function w7({ title: e, figure: t, note: n }) {
return /* @__PURE__ */ (0, L.jsxs)("header", {
className: "flex flex-wrap items-end justify-between gap-x-4 gap-y-1",
@@ -70763,7 +70773,7 @@ function H7({ children: e, className: t = "", previewCount: n = 10 }) {
onClick: () => {
c(!0), o((e) => !e);
},
- children: /* @__PURE__ */ (0, L.jsx)(KS, { "aria-hidden": !0 })
+ children: /* @__PURE__ */ (0, L.jsx)(GS, { "aria-hidden": !0 })
}) : null]
});
}
@@ -71066,7 +71076,7 @@ function Y7({ title: e, rows: t, unit: n = "个视频" }) {
}
//#endregion
//#region src/react/stats/stats-page.tsx
-var iNe = 10, X7 = T7[5], aNe = T7[4], oNe = `${_w()} flex flex-col gap-4`, sNe = "添加媒体文件夹或关注来源后,这里会显示馆藏统计。", cNe = "补全资料或添加标签后,这里会显示馆藏中的内容标签。", lNe = "开始播放后,这里会显示最近的真实观看证据。", uNe = "刮削或手动打标之后,这里会显示每个来源覆盖了多少视频。", dNe = "添加媒体文件夹后,这里会显示存储空间。";
+var iNe = 10, X7 = T7[5], aNe = T7[4], oNe = `${gw()} flex flex-col gap-4`, sNe = "添加媒体文件夹或关注来源后,这里会显示馆藏统计。", cNe = "补全资料或添加标签后,这里会显示馆藏中的内容标签。", lNe = "开始播放后,这里会显示最近的真实观看证据。", uNe = "刮削或手动打标之后,这里会显示每个来源覆盖了多少视频。", dNe = "添加媒体文件夹后,这里会显示存储空间。";
function Z7({ term: e, value: t }) {
return /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex min-h-16 min-w-0 flex-col gap-1.5 rounded-2lg bg-background-primary-default p-3",
@@ -71091,7 +71101,7 @@ function Q7({ term: e, value: t, total: n }) {
children: [XR(t, n), "%"]
})]
})]
- }), /* @__PURE__ */ (0, L.jsx)(Sw, {
+ }), /* @__PURE__ */ (0, L.jsx)(xw, {
label: `${e}:${t.toLocaleString()} / ${n.toLocaleString()}`,
value: t,
max: Math.max(n, 1)
@@ -71173,15 +71183,15 @@ function fNe({ data: t, configurable: n, openMediaSettings: r }) {
})
]
})]
- }) : /* @__PURE__ */ (0, L.jsx)(vw, {
+ }) : /* @__PURE__ */ (0, L.jsx)(_w, {
shell: "plain",
- icon: qte,
+ icon: Jte,
title: "还没有视频",
actions: /* @__PURE__ */ (0, L.jsxs)(L.Fragment, { children: [n ? /* @__PURE__ */ (0, L.jsx)(G, {
size: "small",
onClick: r,
children: "添加媒体文件夹"
- }) : null, /* @__PURE__ */ (0, L.jsx)(pw, {
+ }) : null, /* @__PURE__ */ (0, L.jsx)(fw, {
variant: "secondary",
href: "/follow-manage?tab=add",
size: "small",
@@ -71263,7 +71273,7 @@ function hNe({ volume: e }) {
})]
})]
}),
- t == null ? null : /* @__PURE__ */ (0, L.jsx)(Sw, {
+ t == null ? null : /* @__PURE__ */ (0, L.jsx)(xw, {
label: `${e.label}空间使用率`,
value: n,
max: Math.max(t, 1)
@@ -71285,9 +71295,9 @@ function gNe({ volumes: e, configurable: t, openMediaSettings: n }) {
return e.length ? /* @__PURE__ */ (0, L.jsx)("div", {
className: "flex flex-col",
children: e.map((e) => /* @__PURE__ */ (0, L.jsx)(hNe, { volume: e }, `${e.kind}:${e.label}`))
- }) : /* @__PURE__ */ (0, L.jsx)(vw, {
+ }) : /* @__PURE__ */ (0, L.jsx)(_w, {
shell: "plain",
- icon: cC,
+ icon: sC,
title: "还没有存储来源",
actions: t ? /* @__PURE__ */ (0, L.jsx)(G, {
size: "small",
@@ -71323,11 +71333,11 @@ function _Ne({ tags: e, tagLabel: t, onTag: n }) {
]
})
}, e.k))
- }) : /* @__PURE__ */ (0, L.jsx)(vw, {
+ }) : /* @__PURE__ */ (0, L.jsx)(_w, {
shell: "plain",
- icon: mC,
+ icon: pC,
title: "还没有内容标签",
- actions: /* @__PURE__ */ (0, L.jsx)(pw, {
+ actions: /* @__PURE__ */ (0, L.jsx)(fw, {
variant: "secondary",
href: "/data-cleanup",
size: "small",
@@ -71359,7 +71369,7 @@ function vNe({ rows: e }) {
})]
}), /* @__PURE__ */ (0, L.jsxs)("div", {
className: "min-w-0 basis-40",
- children: [/* @__PURE__ */ (0, L.jsx)(Sw, {
+ children: [/* @__PURE__ */ (0, L.jsx)(xw, {
label: `真实观看 ${t.toFixed(0)}%`,
value: t
}), /* @__PURE__ */ (0, L.jsx)("small", {
@@ -71369,11 +71379,11 @@ function vNe({ rows: e }) {
})]
}, `${e.kind}:${e.id}`);
})
- }) : /* @__PURE__ */ (0, L.jsx)(vw, {
+ }) : /* @__PURE__ */ (0, L.jsx)(_w, {
shell: "plain",
- icon: lC,
+ icon: cC,
title: "还没有观看记录",
- actions: /* @__PURE__ */ (0, L.jsx)(pw, {
+ actions: /* @__PURE__ */ (0, L.jsx)(fw, {
variant: "secondary",
href: "/",
size: "small",
@@ -71401,7 +71411,7 @@ function yNe({ sources: e, videos: t }) {
})]
})]
}),
- /* @__PURE__ */ (0, L.jsx)(Sw, {
+ /* @__PURE__ */ (0, L.jsx)(xw, {
label: `${e.k} 覆盖视频`,
value: e.assets,
max: Math.max(t, 1)
@@ -71412,11 +71422,11 @@ function yNe({ sources: e, videos: t }) {
})
]
}, e.k))
- }) : /* @__PURE__ */ (0, L.jsx)(vw, {
+ }) : /* @__PURE__ */ (0, L.jsx)(_w, {
shell: "plain",
- icon: mC,
+ icon: pC,
title: "还没有标签来源",
- actions: /* @__PURE__ */ (0, L.jsx)(pw, {
+ actions: /* @__PURE__ */ (0, L.jsx)(fw, {
variant: "secondary",
href: "/data-cleanup",
size: "small",
@@ -71426,13 +71436,13 @@ function yNe({ sources: e, videos: t }) {
});
}
function t9({ id: e, label: t, figure: n, detail: r, icon: i, accent: a }) {
- return /* @__PURE__ */ (0, L.jsx)(bA, {
+ return /* @__PURE__ */ (0, L.jsx)(vA, {
id: e,
- className: FD({
+ className: ND({
interactive: !0,
selectable: !0
}),
- children: /* @__PURE__ */ (0, L.jsx)(zD, {
+ children: /* @__PURE__ */ (0, L.jsx)(LD, {
label: t,
icon: i,
accent: a,
@@ -71446,28 +71456,28 @@ function bNe(e) {
queryKey: JR,
queryFn: ({ signal: e }) => YR(e)
}), n = t.data;
- if (!n) return /* @__PURE__ */ (0, L.jsx)(bw, { children: /* @__PURE__ */ (0, L.jsx)(J, {
+ if (!n) return /* @__PURE__ */ (0, L.jsx)(yw, { children: /* @__PURE__ */ (0, L.jsx)(J, {
tone: "error",
title: "馆藏统计读取失败",
children: t.error ? K(t.error) : "未取得统计数据,请刷新页面重试。"
}) });
let r = n.consumption, i = n.storage_summary, o = n.by_loc.reduce((e, t) => e + t.videos, 0), s = n.by_loc.reduce((e, t) => e + t.bytes, 0), c = XR(n.tag_cov, n.attribution.videos);
- return /* @__PURE__ */ (0, L.jsxs)(bw, { children: [
+ return /* @__PURE__ */ (0, L.jsxs)(yw, { children: [
/* @__PURE__ */ (0, L.jsx)("p", {
className: "text-caption-1-regular text-text-secondary",
children: `账本当前快照 · ${o.toLocaleString()} 个视频 · ${a(s)}`
}),
- /* @__PURE__ */ (0, L.jsxs)(vA, {
+ /* @__PURE__ */ (0, L.jsxs)(gA, {
className: "flex flex-col gap-4",
children: [
- /* @__PURE__ */ (0, L.jsxs)(yA, {
+ /* @__PURE__ */ (0, L.jsxs)(_A, {
"aria-label": "统计视图",
- className: ID,
+ className: PD,
children: [
/* @__PURE__ */ (0, L.jsx)(t9, {
id: "inventory",
label: "馆藏视频",
- icon: tC,
+ icon: eC,
accent: 0,
figure: o.toLocaleString(),
detail: a(s)
@@ -71475,7 +71485,7 @@ function bNe(e) {
/* @__PURE__ */ (0, L.jsx)(t9, {
id: "viewing",
label: "看过",
- icon: aC,
+ icon: iC,
accent: 1,
figure: r.played.toLocaleString(),
detail: Dpe(r.play_seconds)
@@ -71483,7 +71493,7 @@ function bNe(e) {
/* @__PURE__ */ (0, L.jsx)(t9, {
id: "coverage",
label: "内容标签",
- icon: mC,
+ icon: pC,
accent: 2,
figure: `${c}%`,
detail: `${n.tag_cov.toLocaleString()} / ${n.attribution.videos.toLocaleString()}`
@@ -71491,21 +71501,21 @@ function bNe(e) {
/* @__PURE__ */ (0, L.jsx)(t9, {
id: "storage",
label: "使用空间",
- icon: cC,
+ icon: sC,
accent: 3,
figure: `${i.online} 个卷`,
detail: i.measured ? `已用 ${a(i.used)}` : "容量未取得"
})
]
}),
- /* @__PURE__ */ (0, L.jsx)(xA, {
+ /* @__PURE__ */ (0, L.jsx)(yA, {
id: "inventory",
children: /* @__PURE__ */ (0, L.jsx)(fNe, {
data: n,
...e
})
}),
- /* @__PURE__ */ (0, L.jsxs)(xA, {
+ /* @__PURE__ */ (0, L.jsxs)(yA, {
id: "viewing",
className: "flex flex-col gap-5",
children: [/* @__PURE__ */ (0, L.jsx)(e9, {
@@ -71553,7 +71563,7 @@ function bNe(e) {
})
}), /* @__PURE__ */ (0, L.jsx)(pNe, { data: n })]
}),
- /* @__PURE__ */ (0, L.jsx)(xA, {
+ /* @__PURE__ */ (0, L.jsx)(yA, {
id: "coverage",
children: /* @__PURE__ */ (0, L.jsx)(e9, {
headline: /* @__PURE__ */ (0, L.jsx)($7, {
@@ -71564,7 +71574,7 @@ function bNe(e) {
children: /* @__PURE__ */ (0, L.jsx)(mNe, { attribution: n.attribution })
})
}),
- /* @__PURE__ */ (0, L.jsx)(xA, {
+ /* @__PURE__ */ (0, L.jsx)(yA, {
id: "storage",
children: /* @__PURE__ */ (0, L.jsx)(e9, {
headline: /* @__PURE__ */ (0, L.jsx)($7, {
@@ -71580,34 +71590,34 @@ function bNe(e) {
})
]
}),
- /* @__PURE__ */ (0, L.jsxs)(vA, {
- className: `${_w({ padding: "none" })} flex flex-col`,
+ /* @__PURE__ */ (0, L.jsxs)(gA, {
+ className: `${gw({ padding: "none" })} flex flex-col`,
children: [
/* @__PURE__ */ (0, L.jsx)("div", {
className: "px-4 pt-3",
- children: /* @__PURE__ */ (0, L.jsxs)(HN, {
+ children: /* @__PURE__ */ (0, L.jsxs)(BN, {
"aria-label": "统计维度",
- className: WN,
+ className: HN,
children: [
- /* @__PURE__ */ (0, L.jsx)(bA, {
+ /* @__PURE__ */ (0, L.jsx)(vA, {
id: "tags",
- className: GN,
+ className: UN,
children: "内容标签"
}),
- /* @__PURE__ */ (0, L.jsx)(bA, {
+ /* @__PURE__ */ (0, L.jsx)(vA, {
id: "recent",
- className: GN,
+ className: UN,
children: "最近看过"
}),
- /* @__PURE__ */ (0, L.jsx)(bA, {
+ /* @__PURE__ */ (0, L.jsx)(vA, {
id: "sources",
- className: GN,
+ className: UN,
children: "标签来源"
})
]
})
}),
- /* @__PURE__ */ (0, L.jsx)(xA, {
+ /* @__PURE__ */ (0, L.jsx)(yA, {
id: "tags",
className: "px-4 pt-3.5 pb-4",
children: /* @__PURE__ */ (0, L.jsx)(_Ne, {
@@ -71615,12 +71625,12 @@ function bNe(e) {
...e
})
}),
- /* @__PURE__ */ (0, L.jsx)(xA, {
+ /* @__PURE__ */ (0, L.jsx)(yA, {
id: "recent",
className: "px-4 pt-3.5 pb-4",
children: /* @__PURE__ */ (0, L.jsx)(vNe, { rows: n.recent })
}),
- /* @__PURE__ */ (0, L.jsx)(xA, {
+ /* @__PURE__ */ (0, L.jsx)(yA, {
id: "sources",
className: "px-4 pt-3.5 pb-4",
children: /* @__PURE__ */ (0, L.jsx)(yNe, {
@@ -71985,7 +71995,7 @@ var RNe = "/api/taste", h9 = "/api/taste/refresh", zNe = "/api/taste/import", BN
["90d", "最近 90 天"],
["365d", "最近一年"],
["all", "全部时间"]
-], _9 = (e, t) => gw(`${RNe}?window=${e}`, t), UNe = (e) => gw(h9, e);
+], _9 = (e, t) => hw(`${RNe}?window=${e}`, t), UNe = (e) => hw(h9, e);
async function WNe(e, t) {
await X.fetchQuery({
queryKey: g9(e),
@@ -72015,7 +72025,7 @@ async function qNe(e) {
} catch {}
if (!t.ok) {
let e = n?.error;
- throw new mw(e || `导入失败(${t.status})`, t.status, n);
+ throw new pw(e || `导入失败(${t.status})`, t.status, n);
}
return n;
}
@@ -72673,11 +72683,11 @@ function DPe({ flows: e }) {
}
//#endregion
//#region src/react/taste/taste-page.tsx
-var OPe = 10, F9 = cw(DA, OA, "text-body-2-medium"), I9 = `${_w()} flex flex-col gap-4`, L9 = "rounded-xl bg-background-primary-default p-3", kPe = "读取运行 Peach 的这台电脑上的浏览记录", APe = "导入或读取浏览记录后,这里会列出已采集设备。", jPe = "馆藏里暂时没有对得上浏览信号的标签。", MPe = "采集浏览记录后,这里会显示聚合后的口味证据。", NPe = "这些词在浏览记录中出现,但 Peach 观看记录还没有对应证据", PPe = "在运行 Peach 的电脑上使用浏览器:点上面的「读取浏览器历史」。", FPe = "记录在其他设备上:导出文件后,点上面的「导入历史文件」。多台设备的文件分别导入。", IPe = "需要刷新时再次读取或导入;数据源可在页面底部移除。", LPe = "这个数据源将不再用于口味分析。原始导出文件保留。", R9 = "peach-taste-guide-dismissed";
+var OPe = 10, F9 = sw(TA, EA, "text-body-2-medium"), I9 = `${gw()} flex flex-col gap-4`, L9 = "rounded-xl bg-background-primary-default p-3", kPe = "读取运行 Peach 的这台电脑上的浏览记录", APe = "导入或读取浏览记录后,这里会列出已采集设备。", jPe = "馆藏里暂时没有对得上浏览信号的标签。", MPe = "采集浏览记录后,这里会显示聚合后的口味证据。", NPe = "这些词在浏览记录中出现,但 Peach 观看记录还没有对应证据", PPe = "在运行 Peach 的电脑上使用浏览器:点上面的「读取浏览器历史」。", FPe = "记录在其他设备上:导出文件后,点上面的「导入历史文件」。多台设备的文件分别导入。", IPe = "需要刷新时再次读取或导入;数据源可在页面底部移除。", LPe = "这个数据源将不再用于口味分析。原始导出文件保留。", R9 = "peach-taste-guide-dismissed";
function z9({ icon: e, term: t, figure: n, detail: r, accent: i }) {
return /* @__PURE__ */ (0, L.jsx)("div", {
- className: FD(),
- children: /* @__PURE__ */ (0, L.jsx)(zD, {
+ className: ND(),
+ children: /* @__PURE__ */ (0, L.jsx)(LD, {
label: t,
icon: e,
accent: i,
@@ -72702,14 +72712,14 @@ function B9({ name: e, domain: t }) {
}
function RPe({ html: e }) {
return /* @__PURE__ */ (0, L.jsx)("span", {
- className: `relative inline-grid size-8 shrink-0 place-items-center overflow-hidden rounded-full bg-background-tertiary-default text-caption-1-medium text-text-secondary ${xL}`,
+ className: `relative inline-grid size-8 shrink-0 place-items-center overflow-hidden rounded-full bg-background-tertiary-default text-caption-1-medium text-text-secondary ${bL}`,
dangerouslySetInnerHTML: { __html: e }
});
}
function zPe({ rows: e, kind: t, visual: n, empty: r, onSignal: i, avatarInner: a }) {
- if (!e.length) return /* @__PURE__ */ (0, L.jsx)(vw, {
+ if (!e.length) return /* @__PURE__ */ (0, L.jsx)(_w, {
shell: "plain",
- icon: _C,
+ icon: gC,
title: "暂无足够证据",
children: r
});
@@ -72757,7 +72767,7 @@ function zPe({ rows: e, kind: t, visual: n, empty: r, onSignal: i, avatarInner:
children: ZNe(e)
})]
}),
- s ? /* @__PURE__ */ (0, L.jsx)(JS, {
+ s ? /* @__PURE__ */ (0, L.jsx)(qS, {
"aria-hidden": !0,
className: "size-4 shrink-0 text-text-tertiary"
}) : null
@@ -72778,20 +72788,20 @@ function zPe({ rows: e, kind: t, visual: n, empty: r, onSignal: i, avatarInner:
});
}
function V9({ label: e, panels: t, onSignal: n, avatarInner: r }) {
- return /* @__PURE__ */ (0, L.jsxs)(vA, {
- className: `${_w({ padding: "none" })} flex flex-col`,
+ return /* @__PURE__ */ (0, L.jsxs)(gA, {
+ className: `${gw({ padding: "none" })} flex flex-col`,
children: [/* @__PURE__ */ (0, L.jsx)("div", {
className: "px-4 pt-3",
- children: /* @__PURE__ */ (0, L.jsx)(HN, {
+ children: /* @__PURE__ */ (0, L.jsx)(BN, {
"aria-label": e,
- className: WN,
- children: t.map((e) => /* @__PURE__ */ (0, L.jsx)(bA, {
+ className: HN,
+ children: t.map((e) => /* @__PURE__ */ (0, L.jsx)(vA, {
id: e.id,
- className: GN,
+ className: UN,
children: e.name
}, e.id))
})
- }), t.map((e) => /* @__PURE__ */ (0, L.jsx)(xA, {
+ }), t.map((e) => /* @__PURE__ */ (0, L.jsx)(yA, {
id: e.id,
className: "px-4 pt-3.5 pb-4",
children: /* @__PURE__ */ (0, L.jsx)(zPe, {
@@ -72868,14 +72878,14 @@ function BPe({ data: e, onSignal: t, navigate: n }) {
className: "text-caption-1-regular text-text-secondary",
children: e.detail
})]
- }), /* @__PURE__ */ (0, L.jsx)(JS, {
+ }), /* @__PURE__ */ (0, L.jsx)(qS, {
"aria-hidden": !0,
className: "size-4 shrink-0 text-text-tertiary"
})]
}, e.key))
- }) : /* @__PURE__ */ (0, L.jsx)(vw, {
+ }) : /* @__PURE__ */ (0, L.jsx)(_w, {
shell: "plain",
- icon: _C,
+ icon: gC,
title: "还没有可探索的入口",
children: jPe
})
@@ -72891,11 +72901,11 @@ function VPe({ onboarding: e, done: t }) {
}
});
return t || n ? null : /* @__PURE__ */ (0, L.jsx)("div", {
- className: _w({
+ className: gw({
padding: "none",
className: "p-4"
}),
- children: /* @__PURE__ */ (0, L.jsxs)(ej, {
+ children: /* @__PURE__ */ (0, L.jsxs)(QA, {
summary: "浏览器历史记录导入指南",
defaultOpen: e,
children: [
@@ -72964,7 +72974,7 @@ function HPe({ busy: e, onRefresh: t, onImport: n }) {
"data-split-button": !0,
"data-variant": "primary",
children: [/* @__PURE__ */ (0, L.jsx)(G, {
- leadingIcon: eC,
+ leadingIcon: $S,
title: kPe,
onClick: t,
...Y(e),
@@ -72972,7 +72982,7 @@ function HPe({ busy: e, onRefresh: t, onImport: n }) {
}), /* @__PURE__ */ (0, L.jsx)(G, {
ref: r,
iconOnly: !0,
- leadingIcon: KS,
+ leadingIcon: GS,
"aria-label": "更多取得浏览记录的方式",
"aria-haspopup": "dialog",
"aria-expanded": i,
@@ -72981,21 +72991,21 @@ function HPe({ busy: e, onRefresh: t, onImport: n }) {
e || a(!0);
}
})]
- }), /* @__PURE__ */ (0, L.jsx)(Tk, {
+ }), /* @__PURE__ */ (0, L.jsx)(Ck, {
triggerRef: r,
isOpen: i,
onOpenChange: a,
placement: "bottom end",
offset: 4,
- className: EA,
- children: /* @__PURE__ */ (0, L.jsxs)(CA, {
+ className: wA,
+ children: /* @__PURE__ */ (0, L.jsxs)(xA, {
"aria-label": "更多取得浏览记录的方式",
className: "flex w-52 flex-col gap-1 outline-none",
children: [/* @__PURE__ */ (0, L.jsxs)("button", {
type: "button",
className: F9,
onClick: () => o(t),
- children: [/* @__PURE__ */ (0, L.jsx)(eC, {
+ children: [/* @__PURE__ */ (0, L.jsx)($S, {
"aria-hidden": !0,
className: "size-4 shrink-0"
}), "读取浏览器历史"]
@@ -73003,7 +73013,7 @@ function HPe({ busy: e, onRefresh: t, onImport: n }) {
type: "button",
className: F9,
onClick: () => o(n),
- children: [/* @__PURE__ */ (0, L.jsx)(vC, {
+ children: [/* @__PURE__ */ (0, L.jsx)(_C, {
"aria-hidden": !0,
className: "size-4 shrink-0"
}), "导入历史文件"]
@@ -73037,10 +73047,10 @@ function UPe({ sources: e, window: t, toast: n }) {
children: [
/* @__PURE__ */ (0, L.jsx)("span", {
className: "inline-grid size-8 shrink-0 place-items-center rounded-lg text-text-secondary",
- children: e.browser === "browserexport" ? /* @__PURE__ */ (0, L.jsx)(vC, {
+ children: e.browser === "browserexport" ? /* @__PURE__ */ (0, L.jsx)(_C, {
"aria-hidden": !0,
className: "size-4"
- }) : /* @__PURE__ */ (0, L.jsx)(tC, {
+ }) : /* @__PURE__ */ (0, L.jsx)(eC, {
"aria-hidden": !0,
className: "size-4"
})
@@ -73060,7 +73070,7 @@ function UPe({ sources: e, window: t, toast: n }) {
size: "small",
"aria-label": `移除 ${e.profile}`,
iconOnly: !0,
- leadingIcon: nC,
+ leadingIcon: tC,
...Y(r.isPending),
onClick: () => {
r.isPending || g({
@@ -73073,9 +73083,9 @@ function UPe({ sources: e, window: t, toast: n }) {
})
]
}, e.source_key))
- }) : /* @__PURE__ */ (0, L.jsx)(vw, {
+ }) : /* @__PURE__ */ (0, L.jsx)(_w, {
shell: "plain",
- icon: tC,
+ icon: eC,
title: "还没有数据源",
children: APe
})
@@ -73087,7 +73097,7 @@ function WPe(e) {
queryKey: g9(s),
queryFn: ({ signal: e }) => _9(s, e),
placeholderData: Pe
- }), { job: p, running: m, outcome: h, start: g } = Sj({
+ }), { job: p, running: m, outcome: h, start: g } = bj({
queryKey: VNe,
queryFn: ({ signal: e }) => UNe(e),
start: () => GNe(s),
@@ -73106,42 +73116,42 @@ function WPe(e) {
}, y = () => {
m || g.isPending || (g.reset(), g.mutate());
}, b = f.data;
- if (!b) return /* @__PURE__ */ (0, L.jsx)(bw, { children: /* @__PURE__ */ (0, L.jsx)(J, {
+ if (!b) return /* @__PURE__ */ (0, L.jsx)(yw, { children: /* @__PURE__ */ (0, L.jsx)(J, {
tone: "error",
title: "口味分析读取失败",
children: f.error ? K(f.error) : "读取口味分析失败"
}) });
let x = b.summary || {}, S = b.coverage || {}, C = b.rankings || {}, w = b.storage || {}, T = C.browser_categories || [], E = b.gaps || [], D = S.tagged || 0, O = S.identified || 0, k = g.error ? K(g.error) : _.error ? K(_.error) : h?.status === "failed" ? h.error || "读取未取得" : "";
- return /* @__PURE__ */ (0, L.jsxs)(bw, { children: [
- /* @__PURE__ */ (0, L.jsxs)(vA, {
+ return /* @__PURE__ */ (0, L.jsxs)(yw, { children: [
+ /* @__PURE__ */ (0, L.jsxs)(gA, {
selectedKey: l,
onSelectionChange: (e) => u(String(e)),
className: "flex flex-col gap-5",
children: [
/* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-wrap items-center justify-between gap-3",
- children: [/* @__PURE__ */ (0, L.jsxs)(HN, {
+ children: [/* @__PURE__ */ (0, L.jsxs)(BN, {
"aria-label": "口味证据来源",
- className: WN,
- children: [/* @__PURE__ */ (0, L.jsx)(bA, {
+ className: HN,
+ children: [/* @__PURE__ */ (0, L.jsx)(vA, {
id: "browser",
- className: GN,
+ className: UN,
children: "浏览器记录"
- }), /* @__PURE__ */ (0, L.jsx)(bA, {
+ }), /* @__PURE__ */ (0, L.jsx)(vA, {
id: "peach",
- className: GN,
+ className: UN,
children: "Peach 内部"
})]
}), /* @__PURE__ */ (0, L.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
children: [
- /* @__PURE__ */ (0, L.jsx)(_j, {
+ /* @__PURE__ */ (0, L.jsx)(hj, {
"aria-label": "分析范围",
selectedKey: s,
onSelectionChange: (e) => {
e !== null && c(String(e));
},
- children: HNe.map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(vj, {
+ children: HNe.map(([e, t]) => /* @__PURE__ */ (0, L.jsx)(gj, {
id: e,
children: t
}, e))
@@ -73170,48 +73180,48 @@ function WPe(e) {
"aria-live": "polite",
className: "flex flex-col gap-3 empty:hidden",
children: [
- m ? /* @__PURE__ */ (0, L.jsx)(BA, {
+ m ? /* @__PURE__ */ (0, L.jsx)(RA, {
label: p?.message || "正在读取浏览记录并更新口味分析",
value: p?.checked,
total: p?.total
}) : null,
- _.isPending ? /* @__PURE__ */ (0, L.jsx)(BA, { label: "正在导入历史文件" }) : null,
+ _.isPending ? /* @__PURE__ */ (0, L.jsx)(RA, { label: "正在导入历史文件" }) : null,
k ? /* @__PURE__ */ (0, L.jsx)(J, {
tone: "error",
children: k
}) : null
]
}),
- /* @__PURE__ */ (0, L.jsxs)(xA, {
+ /* @__PURE__ */ (0, L.jsxs)(yA, {
id: "browser",
className: "flex flex-col gap-5",
children: [
/* @__PURE__ */ (0, L.jsxs)("div", {
- className: ID,
+ className: PD,
children: [
/* @__PURE__ */ (0, L.jsx)(z9, {
accent: 0,
- icon: lC,
+ icon: cC,
term: "浏览记录",
figure: Number(x.history_visits || 0).toLocaleString(),
detail: `${x.history_sources || 0} 个数据源 · ${v9(x.range_start)}—${v9(x.range_end)}`
}),
/* @__PURE__ */ (0, L.jsx)(z9, {
accent: 1,
- icon: mC,
+ icon: pC,
term: "口味维度",
figure: T.length.toLocaleString(),
detail: T[0]?.name || "尚无主维度"
}),
/* @__PURE__ */ (0, L.jsx)(z9, {
accent: 2,
- icon: _C,
+ icon: gC,
term: "浏览候选",
figure: E.length.toLocaleString()
}),
/* @__PURE__ */ (0, L.jsx)(z9, {
accent: 3,
- icon: tC,
+ icon: eC,
term: "私有导出",
figure: Number(w.exports || 0).toLocaleString(),
detail: a(w.bytes || 0)
@@ -73242,9 +73252,9 @@ function WPe(e) {
children: T.length ? /* @__PURE__ */ (0, L.jsx)(EPe, {
rows: T,
label: "口味维度排名"
- }) : /* @__PURE__ */ (0, L.jsx)(vw, {
+ }) : /* @__PURE__ */ (0, L.jsx)(_w, {
shell: "plain",
- icon: _C,
+ icon: gC,
title: "暂无口味维度",
children: MPe
})
@@ -73312,35 +73322,35 @@ function WPe(e) {
})
]
}),
- /* @__PURE__ */ (0, L.jsxs)(xA, {
+ /* @__PURE__ */ (0, L.jsxs)(yA, {
id: "peach",
className: "flex flex-col gap-5",
children: [
/* @__PURE__ */ (0, L.jsxs)("div", {
- className: ID,
+ className: PD,
children: [
/* @__PURE__ */ (0, L.jsx)(z9, {
accent: 0,
- icon: aC,
+ icon: iC,
term: "Peach 看过",
figure: Number(x.peach_items || 0).toLocaleString(),
detail: YNe(x.peach_seconds || 0)
}),
/* @__PURE__ */ (0, L.jsx)(z9, {
accent: 1,
- icon: Kte,
+ icon: qte,
term: "喜欢",
figure: Number(x.liked || 0).toLocaleString()
}),
/* @__PURE__ */ (0, L.jsx)(z9, {
accent: 2,
- icon: Gte,
+ icon: Kte,
term: "不合口味",
figure: Number(x.disliked || 0).toLocaleString()
}),
/* @__PURE__ */ (0, L.jsx)(z9, {
accent: 3,
- icon: mC,
+ icon: pC,
term: "有标签",
figure: D.toLocaleString()
})
@@ -73444,7 +73454,7 @@ function H9({ term: e, value: t, rest: n }) {
children: `${n} 项待补`
})]
})]
- }), /* @__PURE__ */ (0, L.jsx)(Sw, {
+ }), /* @__PURE__ */ (0, L.jsx)(xw, {
label: `${e}:${t.toLocaleString()} / ${r.toLocaleString()}`,
value: t,
max: r
@@ -74082,7 +74092,7 @@ var hFe = /*#__PURE__*/ I.forwardRef(function(e, t) {
"aria-hidden": "true",
dangerouslySetInnerHTML: { __html: e }
}), Z9 = !1, gFe = (e, t) => {
- Z9 || (Z9 = !0, (0, US.createRoot)(e).render(/* @__PURE__ */ (0, L.jsx)(hFe, {
+ Z9 || (Z9 = !0, (0, HS.createRoot)(e).render(/* @__PURE__ */ (0, L.jsx)(hFe, {
position: "bottom-right",
closeButton: !0,
gap: 8,
@@ -74121,11 +74131,11 @@ function vFe() {
}
function $9(e) {
return (t, n) => {
- let r = (0, US.createRoot)(t), i = (t) => r.render(/* @__PURE__ */ (0, L.jsx)(de, {
+ let r = (0, HS.createRoot)(t), i = (t) => r.render(/* @__PURE__ */ (0, L.jsx)(de, {
client: X,
children: /* @__PURE__ */ (0, L.jsx)(sd, {
reducedMotion: "user",
- children: /* @__PURE__ */ (0, L.jsx)(yy, {
+ children: /* @__PURE__ */ (0, L.jsx)(vy, {
getContainer: vFe,
children: /* @__PURE__ */ (0, L.jsx)(e, { ...t })
})
@@ -74139,12 +74149,12 @@ function $9(e) {
}
var yFe = {
activity: {
- prefetch: (e, t) => ere(t),
- mount: $9(fre)
+ prefetch: (e, t) => tre(t),
+ mount: $9(pre)
},
"catalog-grid": {
- prefetch: bre,
- mount: $9(bT)
+ prefetch: xre,
+ mount: $9(vT)
},
configuration: {
prefetch: (e, t) => BR(t),
@@ -74155,67 +74165,67 @@ var yFe = {
mount: $9(wpe)
},
"data-cleanup": {
- prefetch: (e, t) => hie(t),
- mount: $9(vM)
+ prefetch: (e, t) => _ie(t),
+ mount: $9(gM)
},
duplicates: {
- prefetch: (e, t) => zT(t),
- mount: $9(IM)
+ prefetch: (e, t) => LT(t),
+ mount: $9(PM)
},
"entity-hero": {
prefetch: async () => {},
- mount: $9(Uoe)
+ mount: $9(Woe)
},
"entity-filter": {
prefetch: async () => {},
- mount: $9($N)
+ mount: $9(ZN)
},
"entity-body": {
prefetch: async () => {},
- mount: $9(jN)
+ mount: $9(kN)
},
"follow-detail": {
- prefetch: Qse,
- mount: $9(hce)
+ prefetch: $se,
+ mount: $9(gce)
},
"follow-feed": {
- prefetch: zse,
- mount: $9(Mce)
+ prefetch: Bse,
+ mount: $9(Nce)
},
"item-detail": {
- prefetch: bue,
- mount: $9(Hue)
+ prefetch: xue,
+ mount: $9(Uue)
},
"follow-manage": {
- prefetch: (e, t) => Ase(t, e.tab),
- mount: $9(mue)
+ prefetch: (e, t) => jse(t, e.tab),
+ mount: $9(hue)
},
index: {
- prefetch: (e, t) => iN(e, t),
- mount: $9(bde)
+ prefetch: (e, t) => nN(e, t),
+ mount: $9(xde)
},
"junk-queue": {
prefetch: async () => {},
- mount: $9(Lde)
+ mount: $9(Rde)
},
"library-processing": {
- prefetch: (e, t) => XT(t),
- mount: $9((e) => e.mode === "notice" ? /* @__PURE__ */ (0, L.jsx)(Ude, { ...e }) : /* @__PURE__ */ (0, L.jsx)(dj, { ...e }))
+ prefetch: (e, t) => JT(t),
+ mount: $9((e) => e.mode === "notice" ? /* @__PURE__ */ (0, L.jsx)(Wde, { ...e }) : /* @__PURE__ */ (0, L.jsx)(lj, { ...e }))
},
playlists: {
- prefetch: (e, t) => Gde(t),
- mount: $9(rfe)
+ prefetch: (e, t) => Kde(t),
+ mount: $9(ife)
},
"quality-goals": {
- prefetch: (e, t) => SE(t),
- mount: $9(afe)
+ prefetch: (e, t) => bE(t),
+ mount: $9(ofe)
},
review: {
- prefetch: (e, t) => Nre(t),
- mount: $9(xfe)
+ prefetch: (e, t) => Fre(t),
+ mount: $9(Sfe)
},
scraping: {
- prefetch: (e, t) => Ofe(t),
+ prefetch: (e, t) => kfe(t),
mount: $9(Ffe)
},
stats: {
diff --git a/web/index.html b/web/index.html
index fe540c624..008e88f3b 100644
--- a/web/index.html
+++ b/web/index.html
@@ -323,7 +323,7 @@
<div class="settingrow settingsortrow"><span><b>默认排序</b><small id="sortDirectionHelp">随机排序不使用方向。</small></span><div class="settingsortcontrols"><div id="defaultSortSetting"></div><div id="defaultSortDirectionSetting" aria-describedby="sortDirectionHelp"></div></div></div>
<label class="settingrow"><span><b>合并分卷与版本</b><small>同一番号的多个分卷或版次只占一张卡,展示第一个。</small></span><input type="checkbox" id="groupCollapseSetting" class="ptoggle" role="switch"></label>
<div class="settingrow"><span><b>JAV 默认封面</b><small>首页、接着看和 Mix 等位置共用;缺图时使用另一种封面。</small></span><div id="javImageSetting"></div></div>
- <div class="settingrow settingrelated"><span><b>JAV 封面默认大小</b><small>JAV 作品列表的默认版式;小图使用所选封面。</small></span><div id="javSizeSetting"></div></div>
+ <div class="settingrow settingrelated"><span><b>视频封面默认大小</b><small>首页和 JAV 等视频列表共用;小图展示完整封套,大图展示完整正封。</small></span><div id="javSizeSetting"></div></div>
<label class="settingrow"><span><b>新作自动滚动</b><small id="feedAutoScrollDescription">首页和人物页那一行未入库的新作缓缓向前滚,到头停一下再往回;指针移上去或手动滚过时停下。</small></span><input class="ptoggle" type="checkbox" id="feedAutoScrollSetting" role="switch" aria-describedby="feedAutoScrollDescription"></label>
<label class="settingrow"><span><b>新作收起大合集</b><small id="feedHideGroupDescription">多人片段拼成的精选、总集和连发不进新作那一行,也不替它们补封面。</small></span><input class="ptoggle" type="checkbox" id="feedHideGroupSetting" role="switch" aria-describedby="feedHideGroupDescription"></label>
<label class="settingrow"><span><b>新作收起单人合集</b><small id="feedHideSoloDescription">只有一位女优的精选与长时间合集,比如「8時間 BEST」。</small></span><input class="ptoggle" type="checkbox" id="feedHideSoloSetting" role="switch" aria-describedby="feedHideSoloDescription"></label>
diff --git a/web/vendor/site-marks/ORIGIN.md b/web/vendor/site-marks/ORIGIN.md
new file mode 100644
index 000000000..4b0c71165
--- /dev/null
+++ b/web/vendor/site-marks/ORIGIN.md
@@ -0,0 +1,12 @@
+# 来源图标
+
+这四枚图标用于「来源和凭证」页的站点身份,归各站点所有,不用于 Peach 品牌。
+
+| 文件 | 来源 | 获取原因 |
+| --- | --- | --- |
+| javten.png | JAVten 的公开图标缓存:`https://www.google.com/s2/favicons?domain=javten.com&sz=64` | 官方首页与图标端点返回 Cloudflare 403,favicon.ico 返回空文件 |
+| fc2ppvdb.png | FC2PPV-DB 的公开图标缓存:`https://www.google.com/s2/favicons?domain=fc2ppv-db.com&sz=64` | 官方首页与图标端点返回 Cloudflare 403 |
+| avwikidb.png | `https://avwikidb.com/apple-touch-icon.png` | 首页有验证页,公开图标可读取 |
+| github.png | `https://github.githubassets.com/favicons/favicon.svg` | 官方声明的矢量图标,经现有 `link_marks` 渲染 |
+
+取证:2026-09-30。前端直接读取静态文件,不向图标缓存服务发送访客请求;其余站点沿用 `/site-mark` 的发现与缓存。
diff --git a/web/vendor/site-marks/avwikidb.png b/web/vendor/site-marks/avwikidb.png
new file mode 100644
index 000000000..531598e96
Binary files /dev/null and b/web/vendor/site-marks/avwikidb.png differ
diff --git a/web/vendor/site-marks/fc2ppvdb.png b/web/vendor/site-marks/fc2ppvdb.png
new file mode 100644
index 000000000..3b2505d14
Binary files /dev/null and b/web/vendor/site-marks/fc2ppvdb.png differ
diff --git a/web/vendor/site-marks/github.png b/web/vendor/site-marks/github.png
new file mode 100644
index 000000000..c566f5fbd
Binary files /dev/null and b/web/vendor/site-marks/github.png differ
diff --git a/web/vendor/site-marks/javten.png b/web/vendor/site-marks/javten.png
new file mode 100644
index 000000000..ca3764e32
Binary files /dev/null and b/web/vendor/site-marks/javten.png differ